@lehnihon/bit-form 2.2.9 → 2.2.11
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/README.md +17 -0
- package/dist/angular/index.cjs +1 -1
- package/dist/angular/index.d.cts +19 -52
- package/dist/angular/index.d.ts +19 -52
- package/dist/angular/index.js +1 -1
- package/dist/angular/index.js.map +1 -1
- package/dist/bus-BFOBGmd9.d.ts +41 -0
- package/dist/bus-DzTqgkZ4.d.cts +41 -0
- package/dist/chunk-23IYGRVG.js +2 -0
- package/dist/chunk-23IYGRVG.js.map +1 -0
- package/dist/chunk-ACEJG5FJ.cjs +2 -0
- package/dist/chunk-ACEJG5FJ.cjs.map +1 -0
- package/dist/chunk-DRLFDQ5Z.js +2 -0
- package/dist/chunk-DRLFDQ5Z.js.map +1 -0
- package/dist/{chunk-N4HCGMMM.js → chunk-HDZV334O.js} +2 -2
- package/dist/{chunk-GGZPA7AO.cjs → chunk-IQVY4MNY.cjs} +2 -2
- package/dist/{chunk-GGZPA7AO.cjs.map → chunk-IQVY4MNY.cjs.map} +1 -1
- package/dist/chunk-KYX4G4YS.cjs +2 -0
- package/dist/chunk-KYX4G4YS.cjs.map +1 -0
- package/dist/chunk-NYKX3QED.js +2 -0
- package/dist/chunk-NYKX3QED.js.map +1 -0
- package/dist/chunk-PA43XYOW.cjs +2 -0
- package/dist/{chunk-IV32WXCF.cjs.map → chunk-PA43XYOW.cjs.map} +1 -1
- package/dist/chunk-PG7ZH32Z.js +2 -0
- package/dist/chunk-PG7ZH32Z.js.map +1 -0
- package/dist/{chunk-2QLQPMCZ.js → chunk-RMD37PXW.js} +2 -2
- package/dist/{chunk-OLQVH24Z.cjs → chunk-UFJJOXVB.cjs} +2 -2
- package/dist/{chunk-OLQVH24Z.cjs.map → chunk-UFJJOXVB.cjs.map} +1 -1
- package/dist/chunk-VAP2C5QV.cjs +2 -0
- package/dist/{chunk-J5ALITQW.cjs.map → chunk-VAP2C5QV.cjs.map} +1 -1
- package/dist/chunk-W56UISAF.cjs +2 -0
- package/dist/chunk-W56UISAF.cjs.map +1 -0
- package/dist/chunk-YWBRZGEI.js +2 -0
- package/dist/chunk-YWBRZGEI.js.map +1 -0
- package/dist/cli/index.cjs +5 -5
- package/dist/{types-SOg9xEce.d.cts → config-types-5eR82k2V.d.cts} +40 -169
- package/dist/{types-CRCP4Pgq.d.ts → config-types-D9n-rQLk.d.ts} +40 -169
- package/dist/core/bindings.cjs +1 -1
- package/dist/core/bindings.d.cts +15 -11
- package/dist/core/bindings.d.ts +15 -11
- package/dist/core/bindings.js +1 -1
- package/dist/core/status.d.cts +3 -4
- package/dist/core/status.d.ts +3 -4
- package/dist/core/store.cjs +1 -1
- package/dist/core/store.d.cts +8 -6
- package/dist/core/store.d.ts +8 -6
- package/dist/core/store.js +1 -1
- package/dist/core/utils.cjs +1 -1
- package/dist/core/utils.d.cts +2 -3
- package/dist/core/utils.d.ts +2 -3
- package/dist/core/utils.js +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.cts +10 -9
- package/dist/core.d.ts +10 -9
- package/dist/core.js +1 -1
- package/dist/devtools/bridge.cjs +1 -1
- package/dist/devtools/bridge.d.cts +2 -3
- package/dist/devtools/bridge.d.ts +2 -3
- package/dist/devtools/bridge.js +1 -1
- package/dist/devtools/index.cjs +2 -2
- package/dist/devtools/index.d.cts +5 -3
- package/dist/devtools/index.d.ts +5 -3
- package/dist/devtools/index.js +1 -1
- package/dist/{field-binding-MX6jVQbT.d.ts → field-binding-Bi1g-D8X.d.ts} +1 -1
- package/dist/{field-binding-B_OX3bjp.d.cts → field-binding-X5TkvfUt.d.cts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +1 -1
- package/dist/mask.d.cts +2 -2
- package/dist/mask.d.ts +2 -2
- package/dist/meta-types-BC1VLABk.d.cts +28 -0
- package/dist/meta-types-BC1VLABk.d.ts +28 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +12 -12
- package/dist/react/index.d.ts +12 -12
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react-native/index.cjs +1 -1
- package/dist/react-native/index.d.cts +10 -9
- package/dist/react-native/index.d.ts +10 -9
- package/dist/react-native/index.js +1 -1
- package/dist/resolvers/index.d.cts +2 -3
- package/dist/resolvers/index.d.ts +2 -3
- package/dist/resolvers/joi.d.cts +2 -3
- package/dist/resolvers/joi.d.ts +2 -3
- package/dist/resolvers/yup.d.cts +2 -3
- package/dist/resolvers/yup.d.ts +2 -3
- package/dist/resolvers/zod.d.cts +2 -3
- package/dist/resolvers/zod.d.ts +2 -3
- package/dist/runtime-types-D1SRZr-n.d.cts +43 -0
- package/dist/runtime-types-D1SRZr-n.d.ts +43 -0
- package/dist/state-types-8bUndWfg.d.cts +42 -0
- package/dist/state-types-8bUndWfg.d.ts +42 -0
- package/dist/{store-api-types-Bm3EAqR_.d.cts → store-api-types-Bozwlwyb.d.ts} +9 -5
- package/dist/{store-api-types-DfTFy2h4.d.ts → store-api-types-DSgYwMS3.d.cts} +9 -5
- package/dist/{types-D8DgIUhJ.d.cts → types-CUXh7PqD.d.cts} +1 -1
- package/dist/{types-D8DgIUhJ.d.ts → types-CUXh7PqD.d.ts} +1 -1
- package/dist/upload-C4JqIaU2.d.cts +89 -0
- package/dist/upload-ao6skK9K.d.ts +89 -0
- package/dist/{use-bit-persist-BDMZmxBh.d.ts → use-bit-persist-Bd1H2fge.d.ts} +12 -45
- package/dist/{use-bit-persist-CBTZIMc5.d.cts → use-bit-persist-DDxV21AN.d.cts} +12 -45
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.d.cts +18 -51
- package/dist/vue/index.d.ts +18 -51
- package/dist/vue/index.js +1 -1
- package/dist/vue/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/array-controller-C61ByyG6.d.ts +0 -23
- package/dist/array-controller-CtlqjA0e.d.cts +0 -23
- package/dist/bus-BKuMV3E7.d.ts +0 -19
- package/dist/bus-WOHGxuVy.d.cts +0 -19
- package/dist/chunk-6LNXTSZ6.cjs +0 -2
- package/dist/chunk-6LNXTSZ6.cjs.map +0 -1
- package/dist/chunk-IV32WXCF.cjs +0 -2
- package/dist/chunk-J5ALITQW.cjs +0 -2
- package/dist/chunk-J5GQLEVA.js +0 -2
- package/dist/chunk-J5GQLEVA.js.map +0 -1
- package/dist/chunk-KDHPLXZF.cjs +0 -2
- package/dist/chunk-KDHPLXZF.cjs.map +0 -1
- package/dist/chunk-O5UPA33R.js +0 -2
- package/dist/chunk-O5UPA33R.js.map +0 -1
- package/dist/chunk-QX2IVNMK.js +0 -2
- package/dist/chunk-QX2IVNMK.js.map +0 -1
- package/dist/chunk-UARLAXZX.js +0 -2
- package/dist/chunk-UARLAXZX.js.map +0 -1
- package/dist/chunk-X5UCRGYJ.cjs +0 -2
- package/dist/chunk-X5UCRGYJ.cjs.map +0 -1
- package/dist/chunk-Y3XVQGCU.js +0 -2
- package/dist/chunk-Y3XVQGCU.js.map +0 -1
- package/dist/meta-types-Bzmm21TP.d.cts +0 -18
- package/dist/meta-types-Bzmm21TP.d.ts +0 -18
- package/dist/upload-C2mpfhp1.d.cts +0 -17
- package/dist/upload-C2mpfhp1.d.ts +0 -17
- /package/dist/{chunk-N4HCGMMM.js.map → chunk-HDZV334O.js.map} +0 -0
- /package/dist/{chunk-2QLQPMCZ.js.map → chunk-RMD37PXW.js.map} +0 -0
|
@@ -1,53 +1,8 @@
|
|
|
1
|
-
import { B as BitMask,
|
|
1
|
+
import { B as BitMask, b as BitMaskName } from './types-CUXh7PqD.js';
|
|
2
|
+
import { c as BitFormGlobal } from './bus-BFOBGmd9.js';
|
|
3
|
+
import { b as BitErrors, g as BitState } from './state-types-8bUndWfg.js';
|
|
4
|
+
import { b as BitIdFactory, D as DevToolsOptions, B as BitScheduler } from './runtime-types-D1SRZr-n.js';
|
|
2
5
|
|
|
3
|
-
interface BitBusStorePort<T extends object = object> {
|
|
4
|
-
getState: () => Readonly<BitState<T>>;
|
|
5
|
-
getHistoryMetadata: () => {
|
|
6
|
-
canUndo: boolean;
|
|
7
|
-
canRedo: boolean;
|
|
8
|
-
historySize: number;
|
|
9
|
-
historyIndex: number;
|
|
10
|
-
};
|
|
11
|
-
undo: () => void;
|
|
12
|
-
redo: () => void;
|
|
13
|
-
reset: () => void;
|
|
14
|
-
}
|
|
15
|
-
type BitBusListener<T extends object = object> = (storeId: string, newState: BitState<T>) => void;
|
|
16
|
-
interface BitFormGlobal {
|
|
17
|
-
stores: Record<string, BitBusStorePort<object>>;
|
|
18
|
-
listeners: Set<BitBusListener>;
|
|
19
|
-
dispatch: (storeId: string, state: BitState<object>) => void;
|
|
20
|
-
subscribe: (fn: BitBusListener) => () => void;
|
|
21
|
-
}
|
|
22
|
-
/** Alias for {@link BitFormGlobal}. Prefer this name in user-facing APIs. */
|
|
23
|
-
type BitBus = BitFormGlobal;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Pluggable scheduler used for validation debounce.
|
|
27
|
-
* Replace the default (setTimeout-based) with a framework-aware scheduler
|
|
28
|
-
* to integrate with React's concurrent mode, Vue's nextTick, etc.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* // React concurrent mode integration:
|
|
32
|
-
* const scheduler: BitScheduler = {
|
|
33
|
-
* schedule: (fn, delay) => {
|
|
34
|
-
* const id = setTimeout(() => startTransition(fn), delay);
|
|
35
|
-
* return () => clearTimeout(id);
|
|
36
|
-
* },
|
|
37
|
-
* };
|
|
38
|
-
*/
|
|
39
|
-
interface BitScheduler {
|
|
40
|
-
/**
|
|
41
|
-
* Schedule `fn` to run after `delayMs` milliseconds.
|
|
42
|
-
* Must return a cleanup function that cancels the scheduled call.
|
|
43
|
-
*/
|
|
44
|
-
schedule(fn: () => void, delayMs: number): () => void;
|
|
45
|
-
}
|
|
46
|
-
type DeepPartial<T> = T extends object ? {
|
|
47
|
-
[P in keyof T]?: DeepPartial<T[P]>;
|
|
48
|
-
} : T;
|
|
49
|
-
type BitErrors<T extends object> = Partial<Record<BitPath<T>, string | undefined>>;
|
|
50
|
-
type BitTouched<T extends object> = Partial<Record<BitPath<T>, boolean | undefined>>;
|
|
51
6
|
type BitBivariantFn<TArgs extends unknown[], TResult> = {
|
|
52
7
|
bivarianceHack(...args: TArgs): TResult;
|
|
53
8
|
}["bivarianceHack"];
|
|
@@ -60,37 +15,6 @@ type BitTransformFn<T> = BitBivariantFn<[
|
|
|
60
15
|
value: unknown,
|
|
61
16
|
allValues: T
|
|
62
17
|
], unknown>;
|
|
63
|
-
interface BitPersistMetadata {
|
|
64
|
-
isSaving: boolean;
|
|
65
|
-
isRestoring: boolean;
|
|
66
|
-
error: Error | null;
|
|
67
|
-
}
|
|
68
|
-
interface BitIdFactoryContext {
|
|
69
|
-
scope: "store" | "array";
|
|
70
|
-
path?: string;
|
|
71
|
-
index?: number;
|
|
72
|
-
storeName?: string;
|
|
73
|
-
}
|
|
74
|
-
type BitIdFactory = (context: BitIdFactoryContext) => string;
|
|
75
|
-
interface BitState<T extends object> {
|
|
76
|
-
values: T;
|
|
77
|
-
errors: BitErrors<T>;
|
|
78
|
-
touched: BitTouched<T>;
|
|
79
|
-
isValidating: Record<string, boolean>;
|
|
80
|
-
persist: BitPersistMetadata;
|
|
81
|
-
isValid: boolean;
|
|
82
|
-
isSubmitting: boolean;
|
|
83
|
-
isDirty: boolean;
|
|
84
|
-
}
|
|
85
|
-
interface BitFieldState<_T extends object = Record<string, unknown>, TValue = unknown> {
|
|
86
|
-
value: TValue;
|
|
87
|
-
error: string | undefined;
|
|
88
|
-
touched: boolean;
|
|
89
|
-
isHidden: boolean;
|
|
90
|
-
isRequired: boolean;
|
|
91
|
-
isDirty: boolean;
|
|
92
|
-
isValidating: boolean;
|
|
93
|
-
}
|
|
94
18
|
type ValidatorFn<T extends object> = (values: T, options?: {
|
|
95
19
|
scopeFields?: string[];
|
|
96
20
|
}) => Promise<BitErrors<T>> | BitErrors<T>;
|
|
@@ -99,35 +23,25 @@ interface BitFieldConditional<T extends object = Record<string, unknown>> {
|
|
|
99
23
|
dependsOn?: string[];
|
|
100
24
|
showIf?: (values: T) => boolean;
|
|
101
25
|
requiredIf?: (values: T) => boolean;
|
|
102
|
-
/** Custom message when field is required but empty. Fallback: "required field". */
|
|
103
26
|
requiredMessage?: string;
|
|
104
27
|
}
|
|
105
28
|
/** Field-level validation: async validation only. */
|
|
106
29
|
interface BitFieldValidation<T extends object = Record<string, unknown>> {
|
|
107
|
-
/**
|
|
108
|
-
* Breaking change: async validation now defaults to `blur` instead of eager `change`.
|
|
109
|
-
* `validate()`/submit still execute async validators for the targeted fields.
|
|
110
|
-
*/
|
|
111
30
|
asyncValidateOn?: "change" | "blur";
|
|
112
31
|
asyncValidate?: BitBivariantFn<[
|
|
113
32
|
value: unknown,
|
|
114
33
|
values: T
|
|
115
34
|
], Promise<string | null | undefined>>;
|
|
116
35
|
asyncValidateDelay?: number;
|
|
36
|
+
asyncValidateTimeout?: number;
|
|
117
37
|
}
|
|
118
38
|
interface BitFieldDefinitionBase<T extends object = Record<string, unknown>> {
|
|
119
39
|
conditional?: BitFieldConditional<T>;
|
|
120
40
|
validation?: BitFieldValidation<T>;
|
|
121
41
|
normalize?: BitNormalizeFn<T>;
|
|
122
|
-
/**
|
|
123
|
-
* Optional explicit dependencies for normalize re-evaluation.
|
|
124
|
-
* Defaults to the field own path when omitted.
|
|
125
|
-
*/
|
|
126
42
|
normalizeDependsOn?: string[];
|
|
127
43
|
transform?: BitTransformFn<T>;
|
|
128
|
-
/** Mask name (built-in or custom registry key) or BitMask instance. */
|
|
129
44
|
mask?: BitMask | BitMaskName;
|
|
130
|
-
/** Scope name (e.g. wizard step). */
|
|
131
45
|
scope?: string;
|
|
132
46
|
}
|
|
133
47
|
/** Full field definition: conditional, validation, transform, computed, mask, scope. */
|
|
@@ -136,14 +50,39 @@ type BitFieldDefinition<T extends object = Record<string, unknown>> = (BitFieldD
|
|
|
136
50
|
computedDependsOn?: never;
|
|
137
51
|
}) | (BitFieldDefinitionBase<T> & {
|
|
138
52
|
computed: BitComputedFn<T>;
|
|
139
|
-
/** Explicit dependencies are mandatory in v4 for deterministic computed scheduling. */
|
|
140
53
|
computedDependsOn: string[];
|
|
141
54
|
});
|
|
142
|
-
|
|
55
|
+
|
|
56
|
+
type BitMaybePromise<T> = T | Promise<T>;
|
|
57
|
+
interface BitPersistStorageAdapter {
|
|
58
|
+
getItem(key: string): BitMaybePromise<string | null>;
|
|
59
|
+
setItem(key: string, value: string): BitMaybePromise<void>;
|
|
60
|
+
removeItem(key: string): BitMaybePromise<void>;
|
|
61
|
+
}
|
|
62
|
+
type BitPersistMode = "values" | "dirtyValues";
|
|
63
|
+
interface BitPersistConfig<T extends object = Record<string, unknown>> {
|
|
143
64
|
enabled?: boolean;
|
|
144
|
-
|
|
145
|
-
|
|
65
|
+
key?: string;
|
|
66
|
+
storage?: BitPersistStorageAdapter;
|
|
67
|
+
autoSave?: boolean;
|
|
68
|
+
debounceMs?: number;
|
|
69
|
+
mode?: BitPersistMode;
|
|
70
|
+
serialize?: (payload: unknown) => string;
|
|
71
|
+
deserialize?: (raw: string) => Partial<T>;
|
|
72
|
+
onError?: (error: unknown) => void;
|
|
73
|
+
}
|
|
74
|
+
interface BitPersistResolvedConfig<T extends object = Record<string, unknown>> {
|
|
75
|
+
enabled: boolean;
|
|
76
|
+
key: string;
|
|
77
|
+
storage?: BitPersistStorageAdapter;
|
|
78
|
+
autoSave: boolean;
|
|
79
|
+
debounceMs: number;
|
|
80
|
+
mode: BitPersistMode;
|
|
81
|
+
serialize: (payload: unknown) => string;
|
|
82
|
+
deserialize: (raw: string) => Partial<T>;
|
|
83
|
+
onError?: (error: unknown) => void;
|
|
146
84
|
}
|
|
85
|
+
|
|
147
86
|
type BitPluginHookSource = "beforeValidate" | "afterValidate" | "beforeSubmit" | "afterSubmit" | "onFieldChange" | "setup" | "teardown" | "submit";
|
|
148
87
|
type BitOperationalErrorSource = "submit" | "validation" | "persist" | (string & {});
|
|
149
88
|
type BitFieldChangeOrigin = "setField" | "rebase" | "replaceValues" | "hydrate" | "array";
|
|
@@ -199,6 +138,7 @@ interface BitPluginErrorEvent<T extends object = Record<string, unknown>> {
|
|
|
199
138
|
values: Readonly<T>;
|
|
200
139
|
state: Readonly<BitState<T>>;
|
|
201
140
|
}
|
|
141
|
+
|
|
202
142
|
interface BitPluginContext<T extends object = Record<string, unknown>> {
|
|
203
143
|
storeId: string;
|
|
204
144
|
getState: () => Readonly<BitState<T>>;
|
|
@@ -217,35 +157,7 @@ interface BitPlugin<T extends object = Record<string, unknown>> {
|
|
|
217
157
|
setup?: (context: BitPluginContext<T>) => void | (() => void);
|
|
218
158
|
hooks?: BitPluginHooks<T>;
|
|
219
159
|
}
|
|
220
|
-
|
|
221
|
-
interface BitPersistStorageAdapter {
|
|
222
|
-
getItem(key: string): BitMaybePromise<string | null>;
|
|
223
|
-
setItem(key: string, value: string): BitMaybePromise<void>;
|
|
224
|
-
removeItem(key: string): BitMaybePromise<void>;
|
|
225
|
-
}
|
|
226
|
-
type BitPersistMode = "values" | "dirtyValues";
|
|
227
|
-
interface BitPersistConfig<T extends object = Record<string, unknown>> {
|
|
228
|
-
enabled?: boolean;
|
|
229
|
-
key?: string;
|
|
230
|
-
storage?: BitPersistStorageAdapter;
|
|
231
|
-
autoSave?: boolean;
|
|
232
|
-
debounceMs?: number;
|
|
233
|
-
mode?: BitPersistMode;
|
|
234
|
-
serialize?: (payload: unknown) => string;
|
|
235
|
-
deserialize?: (raw: string) => Partial<T>;
|
|
236
|
-
onError?: (error: unknown) => void;
|
|
237
|
-
}
|
|
238
|
-
interface BitPersistResolvedConfig<T extends object = Record<string, unknown>> {
|
|
239
|
-
enabled: boolean;
|
|
240
|
-
key: string;
|
|
241
|
-
storage?: BitPersistStorageAdapter;
|
|
242
|
-
autoSave: boolean;
|
|
243
|
-
debounceMs: number;
|
|
244
|
-
mode: BitPersistMode;
|
|
245
|
-
serialize: (payload: unknown) => string;
|
|
246
|
-
deserialize: (raw: string) => Partial<T>;
|
|
247
|
-
onError?: (error: unknown) => void;
|
|
248
|
-
}
|
|
160
|
+
|
|
249
161
|
/** Validation config. */
|
|
250
162
|
interface BitValidationConfig<T extends object> {
|
|
251
163
|
resolver?: ValidatorFn<T>;
|
|
@@ -291,62 +203,21 @@ interface BitConfig<T extends object = Record<string, unknown>> {
|
|
|
291
203
|
subscriptionCacheSize?: number;
|
|
292
204
|
/**
|
|
293
205
|
* Pluggable scheduler for validation debounce.
|
|
294
|
-
* Defaults to a
|
|
295
|
-
* Inject a framework-aware scheduler (e.g. React `startTransition`) for
|
|
296
|
-
* better integration with concurrent rendering.
|
|
206
|
+
* Defaults to a setTimeout-based scheduler.
|
|
297
207
|
*/
|
|
298
208
|
scheduler?: BitScheduler;
|
|
299
209
|
/**
|
|
300
|
-
* Custom bus instance for DevTools/observability.
|
|
301
|
-
* shared browser-global bus (`bitBus`) is used — suitable for most apps.
|
|
302
|
-
* Pass a `createBitBus()` instance when running in SSR/Edge environments
|
|
303
|
-
* where a global singleton is unsafe (e.g. Next.js Edge Runtime).
|
|
210
|
+
* Custom bus instance for DevTools/observability.
|
|
304
211
|
*/
|
|
305
212
|
bus?: BitFormGlobal;
|
|
306
213
|
/**
|
|
307
|
-
* Enables advanced tracked selector subscriptions (
|
|
308
|
-
* Disabled by default to keep observe semantics explicit and predictable.
|
|
214
|
+
* Enables advanced tracked selector subscriptions (mode: tracked).
|
|
309
215
|
*/
|
|
310
216
|
trackedSubscriptions?: boolean;
|
|
311
217
|
/**
|
|
312
218
|
* Handler opcional para erros operacionais não tratados internamente.
|
|
313
|
-
* Se não informado, o runtime usa fallback para `console.error`.
|
|
314
219
|
*/
|
|
315
220
|
onUnhandledError?: (error: unknown, source: BitOperationalErrorSource) => void;
|
|
316
221
|
}
|
|
317
|
-
type BitSubmitResult = {
|
|
318
|
-
status: "submitted";
|
|
319
|
-
} | {
|
|
320
|
-
status: "invalid";
|
|
321
|
-
} | {
|
|
322
|
-
status: "failed";
|
|
323
|
-
error: unknown;
|
|
324
|
-
} | {
|
|
325
|
-
status: "blocked";
|
|
326
|
-
reason: "isSubmitting" | "validating";
|
|
327
|
-
};
|
|
328
|
-
/** Return type of BitStore.getScopeStatus, used by useBitScope/injectBitScope. */
|
|
329
|
-
interface ScopeStatus {
|
|
330
|
-
hasErrors: boolean;
|
|
331
|
-
isDirty: boolean;
|
|
332
|
-
errors: Record<string, string>;
|
|
333
|
-
}
|
|
334
|
-
/** Return type of scope validation helpers, used by useBitScope/injectBitScope. */
|
|
335
|
-
interface ValidateScopeResult {
|
|
336
|
-
valid: boolean;
|
|
337
|
-
errors: Record<string, string>;
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* Type-safe path utilities
|
|
341
|
-
*
|
|
342
|
-
* These are used to strengthen typing for field paths (e.g. "user.email", "items.0.name").
|
|
343
|
-
*/
|
|
344
|
-
type Primitive = string | number | boolean | bigint | symbol | null | undefined;
|
|
345
|
-
type BitPath<T, Prefix extends string = ""> = T extends Primitive ? never : T extends readonly (infer U)[] ? Prefix extends "" ? `${number}` | `${number}.${BitPath<U>}` : `${Prefix}.${number}` | `${Prefix}.${number}.${BitPath<U>}` : {
|
|
346
|
-
[K in keyof T & (string | number)]: T[K] extends Primitive ? Prefix extends "" ? `${K & (string | number)}` : `${Prefix}.${K & (string | number)}` : Prefix extends "" ? `${K & (string | number)}` | `${K & (string | number)}.${BitPath<T[K]>}` : `${Prefix}.${K & (string | number)}` | `${Prefix}.${K & (string | number)}.${BitPath<T[K]>}`;
|
|
347
|
-
}[keyof T & (string | number)];
|
|
348
|
-
type BitPathValue<T, P extends string> = P extends `${infer K}.${infer Rest}` ? K extends `${number}` ? T extends readonly (infer U)[] ? BitPathValue<U, Rest> : never : K extends keyof T ? BitPathValue<T[K], Rest> : never : P extends `${number}` ? T extends readonly (infer U)[] ? U : never : P extends keyof T ? T[P] : never;
|
|
349
|
-
type BitArrayPath<T> = BitPath<T> extends infer P ? P extends string ? BitPathValue<T, P> extends readonly unknown[] ? P : never : never : never;
|
|
350
|
-
type BitArrayItem<A> = A extends readonly (infer U)[] ? U : A extends (infer U)[] ? U : never;
|
|
351
222
|
|
|
352
|
-
export type {
|
|
223
|
+
export type { BitAfterSubmitEvent as B, ValidatorFn as V, BitAfterValidateEvent as a, BitBeforeSubmitEvent as b, BitBeforeValidateEvent as c, BitComputedFn as d, BitConfig as e, BitFieldChangeEvent as f, BitFieldChangeMeta as g, BitFieldConditional as h, BitFieldDefinition as i, BitFieldValidation as j, BitHistoryConfig as k, BitNormalizeFn as l, BitPersistConfig as m, BitPersistMode as n, BitPersistStorageAdapter as o, BitPlugin as p, BitPluginContext as q, BitPluginErrorEvent as r, BitPluginHooks as s, BitTransformFn as t, BitValidationConfig as u, BitPersistResolvedConfig as v, BitOperationalErrorSource as w };
|
package/dist/core/bindings.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkACEJG5FJcjs = require('../chunk-ACEJG5FJ.cjs');require('../chunk-KYX4G4YS.cjs');var _chunkPFPGASVZcjs = require('../chunk-PFPGASVZ.cjs');exports.cleanupRegisteredField = _chunkACEJG5FJcjs.j; exports.cleanupRegisteredPrefix = _chunkACEJG5FJcjs.k; exports.createArrayBinding = _chunkACEJG5FJcjs.g; exports.createFrameworkFormBinding = _chunkACEJG5FJcjs.i; exports.createFrameworkMaskedFieldBinding = _chunkACEJG5FJcjs.h; exports.formatMaskedValue = _chunkPFPGASVZcjs.b; exports.isBitFieldInputEventObject = _chunkPFPGASVZcjs.a; exports.observeFormMetaSnapshot = _chunkACEJG5FJcjs.c; exports.observePersistMetaSnapshot = _chunkACEJG5FJcjs.f; exports.parseMaskedInput = _chunkPFPGASVZcjs.c; exports.readFormMetaSnapshot = _chunkACEJG5FJcjs.a; exports.readPersistMetaSnapshot = _chunkACEJG5FJcjs.d; exports.subscribeFormMetaSnapshot = _chunkACEJG5FJcjs.b; exports.subscribePersistMetaSnapshot = _chunkACEJG5FJcjs.e;
|
|
2
2
|
//# sourceMappingURL=bindings.cjs.map
|
package/dist/core/bindings.d.cts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { B as BitFormMeta, b as BitValidationOptions } from '../meta-types-
|
|
2
|
-
import { e as BitStoreApi } from '../store-api-types-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export { B as
|
|
8
|
-
import '../types-
|
|
1
|
+
import { B as BitFormMeta, c as BitServerErrorOptions, b as BitValidationOptions } from '../meta-types-BC1VLABk.cjs';
|
|
2
|
+
import { e as BitStoreApi } from '../store-api-types-DSgYwMS3.cjs';
|
|
3
|
+
import { f as BitPersistMetadata, a as BitArrayPath, d as BitPath, e as BitPathValue, D as DeepPartial } from '../state-types-8bUndWfg.cjs';
|
|
4
|
+
import { B as BitArrayBinding } from '../upload-C4JqIaU2.cjs';
|
|
5
|
+
export { a as BitArrayBindingField, b as BitDeleteUploadFn, c as BitHistoryAdapterResult, d as BitPersistAdapterResult, e as BitStepsAdapterResult, f as BitUploadAdapterResult, g as BitUploadFn, h as BitUploadInput, i as BitUploadResult, j as BitUploadValue } from '../upload-C4JqIaU2.cjs';
|
|
6
|
+
import '../bus-DzTqgkZ4.cjs';
|
|
7
|
+
export { B as BitFieldInputEvent, f as formatMaskedValue, i as isBitFieldInputEventObject, p as parseMaskedInput } from '../field-binding-X5TkvfUt.cjs';
|
|
8
|
+
import '../types-CUXh7PqD.cjs';
|
|
9
|
+
import '../config-types-5eR82k2V.cjs';
|
|
10
|
+
import '../runtime-types-D1SRZr-n.cjs';
|
|
9
11
|
|
|
10
12
|
declare function readFormMetaSnapshot<T extends object>(store: BitStoreApi<T>): BitFormMeta;
|
|
11
13
|
declare function subscribeFormMetaSnapshot<T extends object>(store: BitStoreApi<T>, listener: () => void): () => void;
|
|
@@ -27,6 +29,8 @@ declare function readPersistMetaSnapshot(store: {
|
|
|
27
29
|
declare function subscribePersistMetaSnapshot(store: BitPersistMetaReadableStore, listener: () => void): () => void;
|
|
28
30
|
declare function observePersistMetaSnapshot(store: BitPersistMetaReadableStore, listener: (meta: BitPersistMetadata) => void): () => void;
|
|
29
31
|
|
|
32
|
+
declare function createArrayBinding<TForm extends object, P extends BitArrayPath<TForm>>(store: BitStoreApi<TForm>, path: P): BitArrayBinding<TForm, P>;
|
|
33
|
+
|
|
30
34
|
declare function createFrameworkMaskedFieldBinding<TForm extends object, P extends BitPath<TForm>>(store: BitStoreApi<TForm>, path: P): {
|
|
31
35
|
fieldController: {
|
|
32
36
|
setValue: (value: unknown) => void;
|
|
@@ -50,7 +54,7 @@ interface BitFormControllerOptions {
|
|
|
50
54
|
|
|
51
55
|
declare function createFrameworkFormBinding<T extends object>(store: BitStoreApi<T>, runtime: BitFormControllerRuntime, options?: BitFormControllerOptions): {
|
|
52
56
|
controller: {
|
|
53
|
-
submit: (onSuccess: (values: T, dirtyValues?: Partial<T> | undefined) =>
|
|
57
|
+
submit: (onSuccess: (values: T, dirtyValues?: Partial<T> | undefined) => unknown | Promise<unknown>) => (event?: BitFormDomEvent) => Promise<void>;
|
|
54
58
|
onSubmit: (handler: (values: T, dirtyValues?: Partial<T> | undefined) => Promise<unknown>) => (event?: BitFormDomEvent) => Promise<void>;
|
|
55
59
|
reset: () => void;
|
|
56
60
|
getValues: () => T;
|
|
@@ -67,7 +71,7 @@ declare function createFrameworkFormBinding<T extends object>(store: BitStoreApi
|
|
|
67
71
|
}) => void;
|
|
68
72
|
setError: (path: string, message: string | undefined) => void;
|
|
69
73
|
setErrors: (errors: Partial<Record<BitPath<T, "">, string | undefined>>) => void;
|
|
70
|
-
setServerErrors: (serverErrors: Record<string, string[] | string
|
|
74
|
+
setServerErrors: (serverErrors: Record<string, string[] | string>, options?: BitServerErrorOptions) => void;
|
|
71
75
|
validate: (options?: BitValidationOptions) => Promise<boolean>;
|
|
72
76
|
transaction: <TResult>(callback: () => TResult) => TResult;
|
|
73
77
|
};
|
|
@@ -86,4 +90,4 @@ type PrefixCleanupStore = {
|
|
|
86
90
|
declare function cleanupRegisteredField(store: FieldCleanupStore, path: string): void;
|
|
87
91
|
declare function cleanupRegisteredPrefix(store: PrefixCleanupStore, prefix: string): void;
|
|
88
92
|
|
|
89
|
-
export { cleanupRegisteredField, cleanupRegisteredPrefix, createFrameworkFormBinding, createFrameworkMaskedFieldBinding, observeFormMetaSnapshot, observePersistMetaSnapshot, readFormMetaSnapshot, readPersistMetaSnapshot, subscribeFormMetaSnapshot, subscribePersistMetaSnapshot };
|
|
93
|
+
export { BitArrayBinding, cleanupRegisteredField, cleanupRegisteredPrefix, createArrayBinding, createFrameworkFormBinding, createFrameworkMaskedFieldBinding, observeFormMetaSnapshot, observePersistMetaSnapshot, readFormMetaSnapshot, readPersistMetaSnapshot, subscribeFormMetaSnapshot, subscribePersistMetaSnapshot };
|
package/dist/core/bindings.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { B as BitFormMeta, b as BitValidationOptions } from '../meta-types-
|
|
2
|
-
import { e as BitStoreApi } from '../store-api-types-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export { B as
|
|
8
|
-
import '../types-
|
|
1
|
+
import { B as BitFormMeta, c as BitServerErrorOptions, b as BitValidationOptions } from '../meta-types-BC1VLABk.js';
|
|
2
|
+
import { e as BitStoreApi } from '../store-api-types-Bozwlwyb.js';
|
|
3
|
+
import { f as BitPersistMetadata, a as BitArrayPath, d as BitPath, e as BitPathValue, D as DeepPartial } from '../state-types-8bUndWfg.js';
|
|
4
|
+
import { B as BitArrayBinding } from '../upload-ao6skK9K.js';
|
|
5
|
+
export { a as BitArrayBindingField, b as BitDeleteUploadFn, c as BitHistoryAdapterResult, d as BitPersistAdapterResult, e as BitStepsAdapterResult, f as BitUploadAdapterResult, g as BitUploadFn, h as BitUploadInput, i as BitUploadResult, j as BitUploadValue } from '../upload-ao6skK9K.js';
|
|
6
|
+
import '../bus-BFOBGmd9.js';
|
|
7
|
+
export { B as BitFieldInputEvent, f as formatMaskedValue, i as isBitFieldInputEventObject, p as parseMaskedInput } from '../field-binding-Bi1g-D8X.js';
|
|
8
|
+
import '../types-CUXh7PqD.js';
|
|
9
|
+
import '../config-types-D9n-rQLk.js';
|
|
10
|
+
import '../runtime-types-D1SRZr-n.js';
|
|
9
11
|
|
|
10
12
|
declare function readFormMetaSnapshot<T extends object>(store: BitStoreApi<T>): BitFormMeta;
|
|
11
13
|
declare function subscribeFormMetaSnapshot<T extends object>(store: BitStoreApi<T>, listener: () => void): () => void;
|
|
@@ -27,6 +29,8 @@ declare function readPersistMetaSnapshot(store: {
|
|
|
27
29
|
declare function subscribePersistMetaSnapshot(store: BitPersistMetaReadableStore, listener: () => void): () => void;
|
|
28
30
|
declare function observePersistMetaSnapshot(store: BitPersistMetaReadableStore, listener: (meta: BitPersistMetadata) => void): () => void;
|
|
29
31
|
|
|
32
|
+
declare function createArrayBinding<TForm extends object, P extends BitArrayPath<TForm>>(store: BitStoreApi<TForm>, path: P): BitArrayBinding<TForm, P>;
|
|
33
|
+
|
|
30
34
|
declare function createFrameworkMaskedFieldBinding<TForm extends object, P extends BitPath<TForm>>(store: BitStoreApi<TForm>, path: P): {
|
|
31
35
|
fieldController: {
|
|
32
36
|
setValue: (value: unknown) => void;
|
|
@@ -50,7 +54,7 @@ interface BitFormControllerOptions {
|
|
|
50
54
|
|
|
51
55
|
declare function createFrameworkFormBinding<T extends object>(store: BitStoreApi<T>, runtime: BitFormControllerRuntime, options?: BitFormControllerOptions): {
|
|
52
56
|
controller: {
|
|
53
|
-
submit: (onSuccess: (values: T, dirtyValues?: Partial<T> | undefined) =>
|
|
57
|
+
submit: (onSuccess: (values: T, dirtyValues?: Partial<T> | undefined) => unknown | Promise<unknown>) => (event?: BitFormDomEvent) => Promise<void>;
|
|
54
58
|
onSubmit: (handler: (values: T, dirtyValues?: Partial<T> | undefined) => Promise<unknown>) => (event?: BitFormDomEvent) => Promise<void>;
|
|
55
59
|
reset: () => void;
|
|
56
60
|
getValues: () => T;
|
|
@@ -67,7 +71,7 @@ declare function createFrameworkFormBinding<T extends object>(store: BitStoreApi
|
|
|
67
71
|
}) => void;
|
|
68
72
|
setError: (path: string, message: string | undefined) => void;
|
|
69
73
|
setErrors: (errors: Partial<Record<BitPath<T, "">, string | undefined>>) => void;
|
|
70
|
-
setServerErrors: (serverErrors: Record<string, string[] | string
|
|
74
|
+
setServerErrors: (serverErrors: Record<string, string[] | string>, options?: BitServerErrorOptions) => void;
|
|
71
75
|
validate: (options?: BitValidationOptions) => Promise<boolean>;
|
|
72
76
|
transaction: <TResult>(callback: () => TResult) => TResult;
|
|
73
77
|
};
|
|
@@ -86,4 +90,4 @@ type PrefixCleanupStore = {
|
|
|
86
90
|
declare function cleanupRegisteredField(store: FieldCleanupStore, path: string): void;
|
|
87
91
|
declare function cleanupRegisteredPrefix(store: PrefixCleanupStore, prefix: string): void;
|
|
88
92
|
|
|
89
|
-
export { cleanupRegisteredField, cleanupRegisteredPrefix, createFrameworkFormBinding, createFrameworkMaskedFieldBinding, observeFormMetaSnapshot, observePersistMetaSnapshot, readFormMetaSnapshot, readPersistMetaSnapshot, subscribeFormMetaSnapshot, subscribePersistMetaSnapshot };
|
|
93
|
+
export { BitArrayBinding, cleanupRegisteredField, cleanupRegisteredPrefix, createArrayBinding, createFrameworkFormBinding, createFrameworkMaskedFieldBinding, observeFormMetaSnapshot, observePersistMetaSnapshot, readFormMetaSnapshot, readPersistMetaSnapshot, subscribeFormMetaSnapshot, subscribePersistMetaSnapshot };
|
package/dist/core/bindings.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h as k,i as l,j as m,k as n}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h as k,i as l,j as m,k as n}from"../chunk-YWBRZGEI.js";import"../chunk-DRLFDQ5Z.js";import{a as h,b as i,c as j}from"../chunk-3NUJVIAM.js";export{m as cleanupRegisteredField,n as cleanupRegisteredPrefix,g as createArrayBinding,l as createFrameworkFormBinding,k as createFrameworkMaskedFieldBinding,i as formatMaskedValue,h as isBitFieldInputEventObject,c as observeFormMetaSnapshot,f as observePersistMetaSnapshot,j as parseMaskedInput,a as readFormMetaSnapshot,d as readPersistMetaSnapshot,b as subscribeFormMetaSnapshot,e as subscribePersistMetaSnapshot};
|
|
2
2
|
//# sourceMappingURL=bindings.js.map
|
package/dist/core/status.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { a as BitHistoryMetadata } from '../meta-types-
|
|
2
|
-
import { S as ScopeStatus } from '../types-
|
|
3
|
-
export { V as ValidateScopeResult } from '../types-
|
|
4
|
-
import '../types-D8DgIUhJ.cjs';
|
|
1
|
+
import { a as BitHistoryMetadata } from '../meta-types-BC1VLABk.cjs';
|
|
2
|
+
import { S as ScopeStatus } from '../runtime-types-D1SRZr-n.cjs';
|
|
3
|
+
export { V as ValidateScopeResult } from '../runtime-types-D1SRZr-n.cjs';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* Subconjunto relevante de BitHistoryMetadata para comparação de igualdade.
|
package/dist/core/status.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { a as BitHistoryMetadata } from '../meta-types-
|
|
2
|
-
import { S as ScopeStatus } from '../types-
|
|
3
|
-
export { V as ValidateScopeResult } from '../types-
|
|
4
|
-
import '../types-D8DgIUhJ.js';
|
|
1
|
+
import { a as BitHistoryMetadata } from '../meta-types-BC1VLABk.js';
|
|
2
|
+
import { S as ScopeStatus } from '../runtime-types-D1SRZr-n.js';
|
|
3
|
+
export { V as ValidateScopeResult } from '../runtime-types-D1SRZr-n.js';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* Subconjunto relevante de BitHistoryMetadata para comparação de igualdade.
|
package/dist/core/store.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVAP2C5QVcjs = require('../chunk-VAP2C5QV.cjs');require('../chunk-RHMJPKNV.cjs');require('../chunk-UFJJOXVB.cjs');require('../chunk-KYX4G4YS.cjs');exports.bitBus = _chunkVAP2C5QVcjs.a; exports.createBitBus = _chunkVAP2C5QVcjs.b; exports.createBitStore = _chunkVAP2C5QVcjs.e; exports.createFrameworkStoreAdapter = _chunkVAP2C5QVcjs.d; exports.extractFeatureSlice = _chunkVAP2C5QVcjs.i; exports.extractObserveSlice = _chunkVAP2C5QVcjs.g; exports.extractReadSlice = _chunkVAP2C5QVcjs.f; exports.extractSlices = _chunkVAP2C5QVcjs.j; exports.extractWriteSlice = _chunkVAP2C5QVcjs.h; exports.resolveBitStoreForHooks = _chunkVAP2C5QVcjs.c;
|
|
2
2
|
//# sourceMappingURL=store.cjs.map
|
package/dist/core/store.d.cts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export { createBitStore, createFrameworkStoreAdapter, resolveBitStoreForHooks } from '../index.cjs';
|
|
2
|
-
import { e as BitStoreApi, g as BitStoreFeatureApi, h as BitStoreObserveSliceApi, i as BitStoreReadSliceApi, j as BitStoreWriteSliceApi } from '../store-api-types-
|
|
3
|
-
export { B as BitEqualityFn, a as BitFrameworkConfig, b as BitFrameworkStoreApi, c as BitSelector, d as BitSelectorSubscriptionOptions } from '../store-api-types-
|
|
4
|
-
export { B as BitFormMeta, a as BitHistoryMetadata, b as BitValidationOptions } from '../meta-types-
|
|
5
|
-
export { B as BitAfterSubmitEvent, a as BitAfterValidateEvent, b as
|
|
6
|
-
export { b as
|
|
7
|
-
|
|
2
|
+
import { e as BitStoreApi, g as BitStoreFeatureApi, h as BitStoreObserveSliceApi, i as BitStoreReadSliceApi, j as BitStoreWriteSliceApi } from '../store-api-types-DSgYwMS3.cjs';
|
|
3
|
+
export { B as BitEqualityFn, a as BitFrameworkConfig, b as BitFrameworkStoreApi, c as BitSelector, d as BitSelectorSubscriptionOptions } from '../store-api-types-DSgYwMS3.cjs';
|
|
4
|
+
export { B as BitFormMeta, a as BitHistoryMetadata, b as BitValidationOptions } from '../meta-types-BC1VLABk.cjs';
|
|
5
|
+
export { B as BitAfterSubmitEvent, a as BitAfterValidateEvent, b as BitBeforeSubmitEvent, c as BitBeforeValidateEvent, d as BitComputedFn, e as BitConfig, f as BitFieldChangeEvent, g as BitFieldChangeMeta, h as BitFieldConditional, i as BitFieldDefinition, j as BitFieldValidation, k as BitHistoryConfig, l as BitNormalizeFn, m as BitPersistConfig, n as BitPersistMode, o as BitPersistStorageAdapter, p as BitPlugin, q as BitPluginContext, r as BitPluginErrorEvent, s as BitPluginHooks, t as BitTransformFn, u as BitValidationConfig, V as ValidatorFn } from '../config-types-5eR82k2V.cjs';
|
|
6
|
+
export { B as BitArrayItem, a as BitArrayPath, b as BitErrors, c as BitFieldState, d as BitPath, e as BitPathValue, f as BitPersistMetadata, g as BitState, h as BitTouched, D as DeepPartial } from '../state-types-8bUndWfg.cjs';
|
|
7
|
+
export { B as BitScheduler, a as BitSubmitResult, D as DevToolsOptions, S as ScopeStatus, V as ValidateScopeResult } from '../runtime-types-D1SRZr-n.cjs';
|
|
8
|
+
export { B as BitBus, a as BitBusListener, b as BitBusStorePort, c as BitFormGlobal, d as bitBus, e as createBitBus } from '../bus-DzTqgkZ4.cjs';
|
|
9
|
+
import '../types-CUXh7PqD.cjs';
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* Extracts the `read` slice from a BitStore instance.
|
package/dist/core/store.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export { createBitStore, createFrameworkStoreAdapter, resolveBitStoreForHooks } from '../index.js';
|
|
2
|
-
import { e as BitStoreApi, g as BitStoreFeatureApi, h as BitStoreObserveSliceApi, i as BitStoreReadSliceApi, j as BitStoreWriteSliceApi } from '../store-api-types-
|
|
3
|
-
export { B as BitEqualityFn, a as BitFrameworkConfig, b as BitFrameworkStoreApi, c as BitSelector, d as BitSelectorSubscriptionOptions } from '../store-api-types-
|
|
4
|
-
export { B as BitFormMeta, a as BitHistoryMetadata, b as BitValidationOptions } from '../meta-types-
|
|
5
|
-
export { B as BitAfterSubmitEvent, a as BitAfterValidateEvent, b as
|
|
6
|
-
export { b as
|
|
7
|
-
|
|
2
|
+
import { e as BitStoreApi, g as BitStoreFeatureApi, h as BitStoreObserveSliceApi, i as BitStoreReadSliceApi, j as BitStoreWriteSliceApi } from '../store-api-types-Bozwlwyb.js';
|
|
3
|
+
export { B as BitEqualityFn, a as BitFrameworkConfig, b as BitFrameworkStoreApi, c as BitSelector, d as BitSelectorSubscriptionOptions } from '../store-api-types-Bozwlwyb.js';
|
|
4
|
+
export { B as BitFormMeta, a as BitHistoryMetadata, b as BitValidationOptions } from '../meta-types-BC1VLABk.js';
|
|
5
|
+
export { B as BitAfterSubmitEvent, a as BitAfterValidateEvent, b as BitBeforeSubmitEvent, c as BitBeforeValidateEvent, d as BitComputedFn, e as BitConfig, f as BitFieldChangeEvent, g as BitFieldChangeMeta, h as BitFieldConditional, i as BitFieldDefinition, j as BitFieldValidation, k as BitHistoryConfig, l as BitNormalizeFn, m as BitPersistConfig, n as BitPersistMode, o as BitPersistStorageAdapter, p as BitPlugin, q as BitPluginContext, r as BitPluginErrorEvent, s as BitPluginHooks, t as BitTransformFn, u as BitValidationConfig, V as ValidatorFn } from '../config-types-D9n-rQLk.js';
|
|
6
|
+
export { B as BitArrayItem, a as BitArrayPath, b as BitErrors, c as BitFieldState, d as BitPath, e as BitPathValue, f as BitPersistMetadata, g as BitState, h as BitTouched, D as DeepPartial } from '../state-types-8bUndWfg.js';
|
|
7
|
+
export { B as BitScheduler, a as BitSubmitResult, D as DevToolsOptions, S as ScopeStatus, V as ValidateScopeResult } from '../runtime-types-D1SRZr-n.js';
|
|
8
|
+
export { B as BitBus, a as BitBusListener, b as BitBusStorePort, c as BitFormGlobal, d as bitBus, e as createBitBus } from '../bus-BFOBGmd9.js';
|
|
9
|
+
import '../types-CUXh7PqD.js';
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* Extracts the `read` slice from a BitStore instance.
|
package/dist/core/store.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j}from"../chunk-23IYGRVG.js";import"../chunk-UIKO6GGW.js";import"../chunk-RMD37PXW.js";import"../chunk-DRLFDQ5Z.js";export{a as bitBus,b as createBitBus,e as createBitStore,d as createFrameworkStoreAdapter,i as extractFeatureSlice,g as extractObserveSlice,f as extractReadSlice,j as extractSlices,h as extractWriteSlice,c as resolveBitStoreForHooks};
|
|
2
2
|
//# sourceMappingURL=store.js.map
|
package/dist/core/utils.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3KI3GEU3cjs = require('../chunk-3KI3GEU3.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3KI3GEU3cjs = require('../chunk-3KI3GEU3.cjs');var _chunkUFJJOXVBcjs = require('../chunk-UFJJOXVB.cjs');var _chunkKYX4G4YScjs = require('../chunk-KYX4G4YS.cjs');exports.areFieldSnapshotsEqual = _chunkUFJJOXVBcjs.b; exports.cleanPrefixedKeys = _chunkKYX4G4YScjs.j; exports.createFieldStateSnapshot = _chunkUFJJOXVBcjs.a; exports.deepClone = _chunkKYX4G4YScjs.a; exports.deepEqual = _chunkKYX4G4YScjs.d; exports.deepMerge = _chunkKYX4G4YScjs.b; exports.deriveFieldMeta = _chunk3KI3GEU3cjs.a; exports.extractServerErrors = _chunkKYX4G4YScjs.m; exports.getDeepValue = _chunkKYX4G4YScjs.f; exports.isValidationErrorShape = _chunkKYX4G4YScjs.l; exports.setDeepValue = _chunkKYX4G4YScjs.g; exports.valueEqual = _chunkKYX4G4YScjs.c;
|
|
2
2
|
//# sourceMappingURL=utils.cjs.map
|
package/dist/core/utils.d.cts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export { cleanPrefixedKeys, extractServerErrors, isValidationErrorShape } from '../utils.cjs';
|
|
2
|
-
import {
|
|
3
|
-
import '../types-D8DgIUhJ.cjs';
|
|
2
|
+
import { c as BitFieldState } from '../state-types-8bUndWfg.cjs';
|
|
4
3
|
|
|
5
4
|
declare function deepClone<T>(obj: T): T;
|
|
6
|
-
declare function deepMerge<T>(target: T, source: any): T;
|
|
5
|
+
declare function deepMerge<T>(target: T, source: any, activeMerges?: WeakMap<object, unknown>): T;
|
|
7
6
|
declare function valueEqual(a: any, b: any): boolean;
|
|
8
7
|
declare function deepEqual(a: any, b: any): boolean;
|
|
9
8
|
|
package/dist/core/utils.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export { cleanPrefixedKeys, extractServerErrors, isValidationErrorShape } from '../utils.js';
|
|
2
|
-
import {
|
|
3
|
-
import '../types-D8DgIUhJ.js';
|
|
2
|
+
import { c as BitFieldState } from '../state-types-8bUndWfg.js';
|
|
4
3
|
|
|
5
4
|
declare function deepClone<T>(obj: T): T;
|
|
6
|
-
declare function deepMerge<T>(target: T, source: any): T;
|
|
5
|
+
declare function deepMerge<T>(target: T, source: any, activeMerges?: WeakMap<object, unknown>): T;
|
|
7
6
|
declare function valueEqual(a: any, b: any): boolean;
|
|
8
7
|
declare function deepEqual(a: any, b: any): boolean;
|
|
9
8
|
|
package/dist/core/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"../chunk-ICYXODTQ.js";import{a as j,b as k}from"../chunk-
|
|
1
|
+
import{a as l}from"../chunk-ICYXODTQ.js";import{a as j,b as k}from"../chunk-RMD37PXW.js";import{a,b,c,d,f as e,g as f,j as g,l as h,m as i}from"../chunk-DRLFDQ5Z.js";export{k as areFieldSnapshotsEqual,g as cleanPrefixedKeys,j as createFieldStateSnapshot,a as deepClone,d as deepEqual,b as deepMerge,l as deriveFieldMeta,i as extractServerErrors,e as getDeepValue,h as isValidationErrorShape,f as setDeepValue,c as valueEqual};
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
package/dist/core.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-W5CLDRRE.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-W5CLDRRE.cjs');var _chunkVAP2C5QVcjs = require('./chunk-VAP2C5QV.cjs');var _chunkACEJG5FJcjs = require('./chunk-ACEJG5FJ.cjs');var _chunkBSGJ3T5Scjs = require('./chunk-BSGJ3T5S.cjs');var _chunkRHMJPKNVcjs = require('./chunk-RHMJPKNV.cjs');var _chunk3KI3GEU3cjs = require('./chunk-3KI3GEU3.cjs');var _chunkUFJJOXVBcjs = require('./chunk-UFJJOXVB.cjs');var _chunkKYX4G4YScjs = require('./chunk-KYX4G4YS.cjs');var _chunkPFPGASVZcjs = require('./chunk-PFPGASVZ.cjs');exports.areFieldSnapshotsEqual = _chunkUFJJOXVBcjs.b; exports.areScopeErrorsEqual = _chunkRHMJPKNVcjs.a; exports.bitBus = _chunkVAP2C5QVcjs.a; exports.cleanPrefixedKeys = _chunkKYX4G4YScjs.j; exports.cleanupRegisteredField = _chunkACEJG5FJcjs.j; exports.cleanupRegisteredPrefix = _chunkACEJG5FJcjs.k; exports.createArrayBinding = _chunkACEJG5FJcjs.g; exports.createBitBus = _chunkVAP2C5QVcjs.b; exports.createBitStore = _chunkVAP2C5QVcjs.e; exports.createFieldStateSnapshot = _chunkUFJJOXVBcjs.a; exports.createFrameworkFormBinding = _chunkACEJG5FJcjs.i; exports.createFrameworkMaskedFieldBinding = _chunkACEJG5FJcjs.h; exports.createFrameworkStoreAdapter = _chunkVAP2C5QVcjs.d; exports.deepClone = _chunkKYX4G4YScjs.a; exports.deepEqual = _chunkKYX4G4YScjs.d; exports.deepMerge = _chunkKYX4G4YScjs.b; exports.deriveFieldMeta = _chunk3KI3GEU3cjs.a; exports.extractFeatureSlice = _chunkVAP2C5QVcjs.i; exports.extractObserveSlice = _chunkVAP2C5QVcjs.g; exports.extractReadSlice = _chunkVAP2C5QVcjs.f; exports.extractServerErrors = _chunkKYX4G4YScjs.m; exports.extractSlices = _chunkVAP2C5QVcjs.j; exports.extractWriteSlice = _chunkVAP2C5QVcjs.h; exports.formatMaskedValue = _chunkPFPGASVZcjs.b; exports.getDeepValue = _chunkKYX4G4YScjs.f; exports.getScopeSubscriptionPaths = _chunkRHMJPKNVcjs.c; exports.isBitFieldInputEventObject = _chunkPFPGASVZcjs.a; exports.isHistoryMetaEqual = _chunkRHMJPKNVcjs.e; exports.isScopeStatusEqual = _chunkRHMJPKNVcjs.b; exports.isValidationErrorShape = _chunkKYX4G4YScjs.l; exports.observeFormMetaSnapshot = _chunkACEJG5FJcjs.c; exports.observeHistoryMetaSnapshot = _chunkRHMJPKNVcjs.g; exports.observePersistMetaSnapshot = _chunkACEJG5FJcjs.f; exports.observeScopeStatusSnapshot = _chunkBSGJ3T5Scjs.a; exports.parseMaskedInput = _chunkPFPGASVZcjs.c; exports.readFormMetaSnapshot = _chunkACEJG5FJcjs.a; exports.readHistoryMetaSnapshot = _chunkRHMJPKNVcjs.f; exports.readPersistMetaSnapshot = _chunkACEJG5FJcjs.d; exports.resolveBitStoreForHooks = _chunkVAP2C5QVcjs.c; exports.setDeepValue = _chunkKYX4G4YScjs.g; exports.subscribeFormMetaSnapshot = _chunkACEJG5FJcjs.b; exports.subscribePersistMetaSnapshot = _chunkACEJG5FJcjs.e; exports.valueEqual = _chunkKYX4G4YScjs.c;
|
|
2
2
|
//# sourceMappingURL=core.cjs.map
|
package/dist/core.d.cts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export { createBitStore, createFrameworkStoreAdapter, resolveBitStoreForHooks } from './index.cjs';
|
|
2
2
|
export { extractFeatureSlice, extractObserveSlice, extractReadSlice, extractSlices, extractWriteSlice } from './core/store.cjs';
|
|
3
|
-
export { B as BitEqualityFn, a as BitFrameworkConfig, b as BitFrameworkStoreApi, c as BitSelector, d as BitSelectorSubscriptionOptions, e as BitStoreApi } from './store-api-types-
|
|
4
|
-
export { B as BitFormMeta, a as BitHistoryMetadata, b as BitValidationOptions } from './meta-types-
|
|
5
|
-
export { B as BitAfterSubmitEvent, a as BitAfterValidateEvent, b as
|
|
6
|
-
export { b as
|
|
7
|
-
export {
|
|
8
|
-
export { B as
|
|
9
|
-
export {
|
|
10
|
-
export { B as
|
|
3
|
+
export { B as BitEqualityFn, a as BitFrameworkConfig, b as BitFrameworkStoreApi, c as BitSelector, d as BitSelectorSubscriptionOptions, e as BitStoreApi } from './store-api-types-DSgYwMS3.cjs';
|
|
4
|
+
export { B as BitFormMeta, a as BitHistoryMetadata, b as BitValidationOptions } from './meta-types-BC1VLABk.cjs';
|
|
5
|
+
export { B as BitAfterSubmitEvent, a as BitAfterValidateEvent, b as BitBeforeSubmitEvent, c as BitBeforeValidateEvent, d as BitComputedFn, e as BitConfig, f as BitFieldChangeEvent, g as BitFieldChangeMeta, h as BitFieldConditional, i as BitFieldDefinition, j as BitFieldValidation, k as BitHistoryConfig, l as BitNormalizeFn, m as BitPersistConfig, n as BitPersistMode, o as BitPersistStorageAdapter, p as BitPlugin, q as BitPluginContext, r as BitPluginErrorEvent, s as BitPluginHooks, t as BitTransformFn, u as BitValidationConfig, V as ValidatorFn } from './config-types-5eR82k2V.cjs';
|
|
6
|
+
export { B as BitArrayItem, a as BitArrayPath, b as BitErrors, c as BitFieldState, d as BitPath, e as BitPathValue, f as BitPersistMetadata, g as BitState, h as BitTouched, D as DeepPartial } from './state-types-8bUndWfg.cjs';
|
|
7
|
+
export { B as BitScheduler, a as BitSubmitResult, D as DevToolsOptions, S as ScopeStatus, V as ValidateScopeResult } from './runtime-types-D1SRZr-n.cjs';
|
|
8
|
+
export { B as BitBus, a as BitBusListener, b as BitBusStorePort, c as BitFormGlobal, d as bitBus, e as createBitBus } from './bus-DzTqgkZ4.cjs';
|
|
9
|
+
export { cleanupRegisteredField, cleanupRegisteredPrefix, createArrayBinding, createFrameworkFormBinding, createFrameworkMaskedFieldBinding, observeFormMetaSnapshot, observePersistMetaSnapshot, readFormMetaSnapshot, readPersistMetaSnapshot, subscribeFormMetaSnapshot, subscribePersistMetaSnapshot } from './core/bindings.cjs';
|
|
10
|
+
export { B as BitArrayBinding, a as BitArrayBindingField, b as BitDeleteUploadFn, c as BitHistoryAdapterResult, d as BitPersistAdapterResult, e as BitStepsAdapterResult, f as BitUploadAdapterResult, g as BitUploadFn, h as BitUploadInput, i as BitUploadResult, j as BitUploadValue } from './upload-C4JqIaU2.cjs';
|
|
11
|
+
export { B as BitFieldInputEvent, f as formatMaskedValue, i as isBitFieldInputEventObject, p as parseMaskedInput } from './field-binding-X5TkvfUt.cjs';
|
|
11
12
|
export { HistoryMeta, areScopeErrorsEqual, getScopeSubscriptionPaths, isHistoryMetaEqual, isScopeStatusEqual, observeHistoryMetaSnapshot, observeScopeStatusSnapshot, readHistoryMetaSnapshot } from './core/status.cjs';
|
|
12
13
|
export { BitDerivedFieldMeta, BitFieldSnapshot, areFieldSnapshotsEqual, createFieldStateSnapshot, deepClone, deepEqual, deepMerge, deriveFieldMeta, getDeepValue, setDeepValue, valueEqual } from './core/utils.cjs';
|
|
13
14
|
export { cleanPrefixedKeys, extractServerErrors, isValidationErrorShape } from './utils.cjs';
|
|
14
|
-
import './types-
|
|
15
|
+
import './types-CUXh7PqD.cjs';
|