chore(ui): upgrade zod

This commit is contained in:
psychedelicious
2025-07-17 21:42:18 +10:00
parent 49691aa07e
commit e58ee4c492
35 changed files with 46 additions and 37 deletions

View File

@@ -6,7 +6,7 @@ import { memo, useCallback, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import type { Equals } from 'tsafe';
import { assert } from 'tsafe';
import { z } from 'zod/v4';
import { z } from 'zod';
const zMode = z.enum(['fill', 'contain', 'cover']);
type Mode = z.infer<typeof zMode>;

View File

@@ -2,7 +2,7 @@ import type { PayloadAction, Selector } from '@reduxjs/toolkit';
import { createSelector, createSlice } from '@reduxjs/toolkit';
import type { PersistConfig, RootState } from 'app/store/store';
import { zRgbaColor } from 'features/controlLayers/store/types';
import { z } from 'zod/v4';
import { z } from 'zod';
const zAutoSwitchMode = z.enum(['off', 'switch_on_start', 'switch_on_finish']);

View File

@@ -4,7 +4,7 @@ import { zModelIdentifierField } from 'features/nodes/types/common';
import { Graph } from 'features/nodes/util/graph/generation/Graph';
import type { ControlLoRAModelConfig, ControlNetModelConfig, T2IAdapterModelConfig } from 'services/api/types';
import { assert } from 'tsafe';
import { z } from 'zod/v4';
import { z } from 'zod';
const zAjustImageChannels = z.enum([
'Red (RGBA)',

View File

@@ -21,7 +21,7 @@ import type { Invocation } from 'services/api/types';
import type { Equals } from 'tsafe';
import { assert } from 'tsafe';
import { describe, test } from 'vitest';
import type { z } from 'zod/v4';
import type { z } from 'zod';
import type {
CanvasEntityIdentifier,

View File

@@ -31,7 +31,7 @@ import {
} from 'features/parameters/types/parameterSchemas';
import { getImageDTOSafe } from 'services/api/endpoints/images';
import type { JsonObject } from 'type-fest';
import { z } from 'zod/v4';
import { z } from 'zod';
const zId = z.string().min(1);
const zName = z.string().min(1).nullable();