cogsbox-state 0.5.147 → 0.5.148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CogsState.d.ts +3 -4
- package/dist/CogsState.jsx +257 -253
- package/dist/CogsState.jsx.map +1 -1
- package/dist/TRPCValidationLink.js +8 -8
- package/dist/node_modules/@trpc/server/dist/observable/observable.js +38 -0
- package/dist/node_modules/@trpc/server/dist/observable/observable.js.map +1 -0
- package/dist/store.d.ts +4 -0
- package/dist/store.js +78 -64
- package/dist/store.js.map +1 -1
- package/package.json +2 -2
- package/dist/node_modules/@trpc/server/dist/observable-ade1bad8.js +0 -43
- package/dist/node_modules/@trpc/server/dist/observable-ade1bad8.js.map +0 -1
package/dist/CogsState.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GenericObject } from './utility.js';
|
|
2
|
-
import {
|
|
3
|
-
import { ZodArray, ZodObject, ZodRawShape } from 'zod';
|
|
2
|
+
import { z } from 'zod';
|
|
4
3
|
import { ComponentsType } from './store.js';
|
|
5
4
|
|
|
6
5
|
type Prettify<T> = {
|
|
@@ -60,6 +59,7 @@ export type ArrayEndType<TShape extends unknown> = {
|
|
|
60
59
|
uniqueInsert: (payload: UpdateArg<InferArrayElement<TShape>>, fields?: (keyof InferArrayElement<TShape>)[], onMatch?: (existingItem: any) => any) => void;
|
|
61
60
|
stateFilter: (callbackfn: (value: InferArrayElement<TShape>, index: number) => void) => ArrayEndType<TShape>;
|
|
62
61
|
getSelected: () => StateObject<InferArrayElement<TShape>> | undefined;
|
|
62
|
+
clearSelected: () => void;
|
|
63
63
|
getSelectedIndex: () => number;
|
|
64
64
|
last: () => StateObject<InferArrayElement<TShape>> | undefined;
|
|
65
65
|
} & EndType<TShape> & {
|
|
@@ -177,7 +177,7 @@ export type CogsCookiesType<T extends string[] = string[]> = CookieType<ArrayToO
|
|
|
177
177
|
export type ReactivityType = "none" | "component" | "deps" | "all";
|
|
178
178
|
type ValidationOptionsType = {
|
|
179
179
|
key?: string;
|
|
180
|
-
zodSchema?:
|
|
180
|
+
zodSchema?: z.ZodTypeAny;
|
|
181
181
|
onBlur?: boolean;
|
|
182
182
|
};
|
|
183
183
|
export type OptionsType<T extends unknown = unknown> = {
|
|
@@ -225,7 +225,6 @@ export type ServerSyncType<T> = {
|
|
|
225
225
|
state: T;
|
|
226
226
|
}) => void;
|
|
227
227
|
debounce?: number;
|
|
228
|
-
mutation: UseMutationResult<any, unknown, any, unknown>;
|
|
229
228
|
snapshot?: {
|
|
230
229
|
name: (({ state }: {
|
|
231
230
|
state: T;
|