完成世界书、骰子、apiconfig页面处理

This commit is contained in:
2026-04-30 01:35:10 +08:00
parent a3e3711b2b
commit ba9b925c32
4602 changed files with 785225 additions and 23 deletions

25
frontend/node_modules/zustand/ts3.4/context.d.ts generated vendored Normal file
View File

@@ -0,0 +1,25 @@
import ReactExports from 'react';
import { ReactNode } from 'react';
import { StoreApi } from 'zustand';
type UseContextStore<S extends StoreApi<unknown>> = {
(): ExtractState<S>;
<U>(selector: (state: ExtractState<S>) => U, equalityFn?: (a: U, b: U) => boolean): U;
};
type ExtractState<S> = S extends {
getState: () => infer T;
} ? T : never;
type WithoutCallSignature<T> = {
[K in keyof T]: T[K];
};
/**
* @deprecated Use `createStore` and `useStore` for context usage
*/
declare function createContext<S extends StoreApi<unknown>>(): {
Provider: ({ createStore, children, }: {
createStore: () => S;
children: ReactNode;
}) => ReactExports.FunctionComponentElement<ReactExports.ProviderProps<S | undefined>>;
useStore: UseContextStore<S>;
useStoreApi: () => WithoutCallSignature<S>;
};
export default createContext;

View File

@@ -0,0 +1 @@
export declare function useShallow<S, U>(selector: (state: S) => U): (state: S) => U;

106
frontend/node_modules/zustand/ts3.4/esm/vanilla.d.ts generated vendored Normal file
View File

@@ -0,0 +1,106 @@
type SetStateInternal<T> = {
_(partial: T | Partial<T> | {
_(state: T): T | Partial<T>;
}['_'], replace?: boolean | undefined): void;
}['_'];
export interface StoreApi<T> {
setState: SetStateInternal<T>;
getState: () => T;
getInitialState: () => T;
subscribe: (listener: (state: T, prevState: T) => void) => () => void;
/**
* @deprecated Use `unsubscribe` returned by `subscribe`
*/
destroy: () => void;
}
type Get<T, K, F> = K extends keyof T ? T[K] : F;
export type Mutate<S, Ms> = number extends Ms['length' & keyof Ms] ? S : Ms extends [
] ? S : Ms extends [
[
infer Mi,
infer Ma
],
...infer Mrs
] ? Mutate<StoreMutators<S, Ma>[Mi & StoreMutatorIdentifier], Mrs> : never;
export type StateCreator<T, Mis extends [
StoreMutatorIdentifier,
unknown
][] = [
], Mos extends [
StoreMutatorIdentifier,
unknown
][] = [
], U = T> = ((setState: Get<Mutate<StoreApi<T>, Mis>, 'setState', never>, getState: Get<Mutate<StoreApi<T>, Mis>, 'getState', never>, store: Mutate<StoreApi<T>, Mis>) => U) & {
$$storeMutators?: Mos;
};
export interface StoreMutators<S, A> {
}
export type StoreMutatorIdentifier = keyof StoreMutators<unknown, unknown>;
type CreateStore = {
<T, Mos extends [
StoreMutatorIdentifier,
unknown
][] = [
]>(initializer: StateCreator<T, [
], Mos>): Mutate<StoreApi<T>, Mos>;
<T>(): <Mos extends [
StoreMutatorIdentifier,
unknown
][] = [
]>(initializer: StateCreator<T, [
], Mos>) => Mutate<StoreApi<T>, Mos>;
};
export declare const createStore: CreateStore;
/**
* @deprecated Use `import { createStore } from 'zustand/vanilla'`
*/
declare const _default: CreateStore;
export default _default;
/**
* @deprecated Use `unknown` instead of `State`
*/
export type State = unknown;
/**
* @deprecated Use `Partial<T> | ((s: T) => Partial<T>)` instead of `PartialState<T>`
*/
export type PartialState<T extends State> = Partial<T> | ((state: T) => Partial<T>);
/**
* @deprecated Use `(s: T) => U` instead of `StateSelector<T, U>`
*/
export type StateSelector<T extends State, U> = (state: T) => U;
/**
* @deprecated Use `(a: T, b: T) => boolean` instead of `EqualityChecker<T>`
*/
export type EqualityChecker<T> = (state: T, newState: T) => boolean;
/**
* @deprecated Use `(state: T, previousState: T) => void` instead of `StateListener<T>`
*/
export type StateListener<T> = (state: T, previousState: T) => void;
/**
* @deprecated Use `(slice: T, previousSlice: T) => void` instead of `StateSliceListener<T>`.
*/
export type StateSliceListener<T> = (slice: T, previousSlice: T) => void;
/**
* @deprecated Use `(listener: (state: T) => void) => void` instead of `Subscribe<T>`.
*/
export type Subscribe<T extends State> = {
(listener: (state: T, previousState: T) => void): () => void;
};
/**
* @deprecated You might be looking for `StateCreator`, if not then
* use `StoreApi<T>['setState']` instead of `SetState<T>`.
*/
export type SetState<T extends State> = {
_(partial: T | Partial<T> | {
_(state: T): T | Partial<T>;
}['_'], replace?: boolean | undefined): void;
}['_'];
/**
* @deprecated You might be looking for `StateCreator`, if not then
* use `StoreApi<T>['getState']` instead of `GetState<T>`.
*/
export type GetState<T extends State> = () => T;
/**
* @deprecated Use `StoreApi<T>['destroy']` instead of `Destroy`.
*/
export type Destroy = () => void;

3
frontend/node_modules/zustand/ts3.4/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export * from './vanilla';
export * from './react';
export { default } from './react';

View File

@@ -0,0 +1,102 @@
import { StateCreator, StoreApi, StoreMutatorIdentifier } from '../vanilla';
type Config = Parameters<(Window extends {
__REDUX_DEVTOOLS_EXTENSION__?: infer T;
} ? T : {
connect: (param: any) => any;
})['connect']>[0];
declare module '../vanilla' {
interface StoreMutators<S, A> {
'zustand/devtools': WithDevtools<S>;
}
}
type Cast<T, U> = T extends U ? T : U;
type Write<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
type TakeTwo<T> = T extends {
length: 0;
} ? [
undefined,
undefined
] : T extends {
length: 1;
} ? [
/*a0*/ ...Cast<T, unknown[]>,
/*a1*/ undefined
] : T extends {
length: 0 | 1;
} ? [
/*a0*/ ...Cast<T, unknown[]>,
/*a1*/ undefined
] : T extends {
length: 2;
} ? T : T extends {
length: 1 | 2;
} ? T : T extends {
length: 0 | 1 | 2;
} ? T : T extends [
infer A0,
infer A1,
...unknown[]
] ? [
A0,
A1
] : T extends [
infer A0,
(infer A1)?,
...unknown[]
] ? [
A0,
A1?
] : T extends [
(infer A0)?,
(infer A1)?,
...unknown[]
] ? [
A0?,
A1?
] : never;
type WithDevtools<S> = Write<S, StoreDevtools<S>>;
type StoreDevtools<S> = S extends {
setState: (...a: infer Sa) => infer Sr;
} ? {
setState<A extends string | {
type: string;
}>(...a: [
/*a*/ ...TakeTwo<Sa>,
/*action*/ A
]): Sr;
} : never;
export interface DevtoolsOptions extends Config {
name?: string;
enabled?: boolean;
anonymousActionType?: string;
store?: string;
}
type Devtools = <T, Mps extends [
StoreMutatorIdentifier,
unknown
][] = [
], Mcs extends [
StoreMutatorIdentifier,
unknown
][] = [
]>(initializer: StateCreator<T, [
...Mps,
[
'zustand/devtools',
never
]
], Mcs>, devtoolsOptions?: DevtoolsOptions) => StateCreator<T, Mps, [
[
'zustand/devtools',
never
],
...Mcs
]>;
declare module '../vanilla' {
interface StoreMutators<S, A> {
'zustand/devtools': WithDevtools<S>;
}
}
export type NamedSet<T> = WithDevtools<StoreApi<T>>['setState'];
export declare const devtools: Devtools;
export {};

View File

@@ -0,0 +1,42 @@
import { StateCreator, StoreMutatorIdentifier } from '../vanilla';
type SubscribeWithSelector = <T, Mps extends [
StoreMutatorIdentifier,
unknown
][] = [
], Mcs extends [
StoreMutatorIdentifier,
unknown
][] = [
]>(initializer: StateCreator<T, [
...Mps,
[
'zustand/subscribeWithSelector',
never
]
], Mcs>) => StateCreator<T, Mps, [
[
'zustand/subscribeWithSelector',
never
],
...Mcs
]>;
type Write<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
type WithSelectorSubscribe<S> = S extends {
getState: () => infer T;
} ? Write<S, StoreSubscribeWithSelector<T>> : never;
declare module '../vanilla' {
interface StoreMutators<S, A> {
['zustand/subscribeWithSelector']: WithSelectorSubscribe<S>;
}
}
type StoreSubscribeWithSelector<T> = {
subscribe: {
(listener: (selectedState: T, previousSelectedState: T) => void): () => void;
<U>(selector: (state: T) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
equalityFn?: (a: U, b: U) => boolean;
fireImmediately?: boolean;
}): () => void;
};
};
export declare const subscribeWithSelector: SubscribeWithSelector;
export {};

48
frontend/node_modules/zustand/ts3.4/react.d.ts generated vendored Normal file
View File

@@ -0,0 +1,48 @@
import { Mutate, StateCreator, StoreApi, StoreMutatorIdentifier } from './vanilla';
type ExtractState<S> = S extends {
getState: () => infer T;
} ? T : never;
type ReadonlyStoreApi<T> = Pick<StoreApi<T>, 'getState' | 'getInitialState' | 'subscribe'>;
type WithReact<S extends ReadonlyStoreApi<unknown>> = S & {
/** @deprecated please use api.getInitialState() */
getServerState?: () => ExtractState<S>;
};
export declare function useStore<S extends WithReact<ReadonlyStoreApi<unknown>>>(api: S): ExtractState<S>;
export declare function useStore<S extends WithReact<ReadonlyStoreApi<unknown>>, U>(api: S, selector: (state: ExtractState<S>) => U): U;
/**
* @deprecated The usage with three arguments is deprecated. Use `useStoreWithEqualityFn` from 'zustand/traditional'. The usage with one or two arguments is not deprecated.
* https://github.com/pmndrs/zustand/discussions/1937
*/
export declare function useStore<S extends WithReact<ReadonlyStoreApi<unknown>>, U>(api: S, selector: (state: ExtractState<S>) => U, equalityFn: ((a: U, b: U) => boolean) | undefined): U;
export type UseBoundStore<S extends WithReact<ReadonlyStoreApi<unknown>>> = {
(): ExtractState<S>;
<U>(selector: (state: ExtractState<S>) => U): U;
/**
* @deprecated Use `createWithEqualityFn` from 'zustand/traditional'
*/
<U>(selector: (state: ExtractState<S>) => U, equalityFn: (a: U, b: U) => boolean): U;
} & S;
type Create = {
<T, Mos extends [
StoreMutatorIdentifier,
unknown
][] = [
]>(initializer: StateCreator<T, [
], Mos>): UseBoundStore<Mutate<StoreApi<T>, Mos>>;
<T>(): <Mos extends [
StoreMutatorIdentifier,
unknown
][] = [
]>(initializer: StateCreator<T, [
], Mos>) => UseBoundStore<Mutate<StoreApi<T>, Mos>>;
/**
* @deprecated Use `useStore` hook to bind store
*/
<S extends StoreApi<unknown>>(store: S): UseBoundStore<S>;
};
export declare const create: Create;
/**
* @deprecated Use `import { create } from 'zustand'`
*/
declare const _default: Create;
export default _default;

View File

@@ -0,0 +1 @@
export declare function useShallow<S, U>(selector: (state: S) => U): (state: S) => U;