@lehnihon/bit-form 2.2.8 → 2.2.10
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/angular/index.cjs +1 -1
- package/dist/angular/index.cjs.map +1 -1
- package/dist/angular/index.d.cts +27 -59
- package/dist/angular/index.d.ts +27 -59
- 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-2AFWJAQG.js +2 -0
- package/dist/chunk-2AFWJAQG.js.map +1 -0
- package/dist/chunk-3KI3GEU3.cjs +2 -0
- package/dist/chunk-3KI3GEU3.cjs.map +1 -0
- package/dist/chunk-4RQFECC7.cjs +2 -0
- package/dist/chunk-4RQFECC7.cjs.map +1 -0
- package/dist/chunk-FLFIOW75.js +2 -0
- package/dist/chunk-FLFIOW75.js.map +1 -0
- package/dist/chunk-G2FQQDRK.js +2 -0
- package/dist/chunk-G2FQQDRK.js.map +1 -0
- package/dist/chunk-GPMAT4PT.cjs +2 -0
- package/dist/chunk-GPMAT4PT.cjs.map +1 -0
- package/dist/chunk-GQ2QJCBF.js +2 -0
- package/dist/chunk-GQ2QJCBF.js.map +1 -0
- package/dist/chunk-ICYXODTQ.js +2 -0
- package/dist/chunk-ICYXODTQ.js.map +1 -0
- package/dist/{chunk-P2YWYBWG.cjs → chunk-IVPCXKYW.cjs} +2 -2
- package/dist/{chunk-P2YWYBWG.cjs.map → chunk-IVPCXKYW.cjs.map} +1 -1
- package/dist/{chunk-JC4R5WCC.js → chunk-LX4GSDUV.js} +2 -2
- package/dist/chunk-NVFZ22A7.cjs +2 -0
- package/dist/chunk-NVFZ22A7.cjs.map +1 -0
- package/dist/chunk-OPC7HFNN.js +2 -0
- package/dist/chunk-OPC7HFNN.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-D7JQWF6V.cjs → chunk-RHMJPKNV.cjs} +1 -1
- package/dist/{chunk-D7JQWF6V.cjs.map → chunk-RHMJPKNV.cjs.map} +1 -1
- package/dist/{chunk-EQ55DKX2.js → chunk-UIKO6GGW.js} +1 -1
- package/dist/chunk-UIKO6GGW.js.map +1 -0
- package/dist/chunk-VBX5I5XG.cjs +2 -0
- package/dist/chunk-VBX5I5XG.cjs.map +1 -0
- package/dist/chunk-ZKAFHJPU.cjs +2 -0
- package/dist/chunk-ZKAFHJPU.cjs.map +1 -0
- package/dist/cli/index.cjs +5 -5
- package/dist/{types-D6LhF5GC.d.cts → config-types-5eR82k2V.d.cts} +45 -168
- package/dist/{types-CG5nYeRk.d.ts → config-types-D9n-rQLk.d.ts} +45 -168
- package/dist/core/bindings.cjs +1 -1
- package/dist/core/bindings.cjs.map +1 -1
- package/dist/core/bindings.d.cts +33 -21
- package/dist/core/bindings.d.ts +33 -21
- package/dist/core/bindings.js +1 -1
- package/dist/core/status.cjs +1 -1
- package/dist/core/status.d.cts +5 -6
- package/dist/core/status.d.ts +5 -6
- package/dist/core/status.js +1 -1
- package/dist/core/store.cjs +1 -1
- package/dist/core/store.cjs.map +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.cjs.map +1 -1
- package/dist/core/utils.d.cts +4 -12
- package/dist/core/utils.d.ts +4 -12
- package/dist/core/utils.js +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +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.cjs.map +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.cjs.map +1 -1
- 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/devtools/index.js.map +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.cjs.map +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.cjs +1 -1
- package/dist/mask.cjs.map +1 -1
- package/dist/mask.d.cts +2 -2
- package/dist/mask.d.ts +2 -2
- package/dist/mask.js +1 -1
- package/dist/mask.js.map +1 -1
- 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.cjs.map +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/react-native/index.js.map +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-DPi30jQF.d.ts → store-api-types-Bozwlwyb.d.ts} +18 -14
- package/dist/{store-api-types-D-ZHxzRy.d.cts → store-api-types-DSgYwMS3.d.cts} +18 -14
- 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-BTwy8kvA.d.ts → use-bit-persist-Bd1H2fge.d.ts} +12 -45
- package/dist/{use-bit-persist-C2LHNTVv.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.cjs.map +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 +10 -7
- package/dist/array-controller-B5bfXV1W.d.cts +0 -23
- package/dist/array-controller-Cx-DMH7Y.d.ts +0 -23
- package/dist/bus-B2VEKrPI.d.ts +0 -19
- package/dist/bus-ZLQeq4Vr.d.cts +0 -19
- package/dist/chunk-63OJBMKK.js +0 -2
- package/dist/chunk-63OJBMKK.js.map +0 -1
- package/dist/chunk-CPP7ELA5.js +0 -2
- package/dist/chunk-CPP7ELA5.js.map +0 -1
- package/dist/chunk-E2NZR44P.js +0 -2
- package/dist/chunk-E2NZR44P.js.map +0 -1
- package/dist/chunk-EQ55DKX2.js.map +0 -1
- package/dist/chunk-IV32WXCF.cjs +0 -2
- package/dist/chunk-M6WBNHIT.cjs +0 -2
- package/dist/chunk-M6WBNHIT.cjs.map +0 -1
- package/dist/chunk-MFSQATNZ.cjs +0 -2
- package/dist/chunk-MFSQATNZ.cjs.map +0 -1
- package/dist/chunk-MFTWAFMG.cjs +0 -2
- package/dist/chunk-MFTWAFMG.cjs.map +0 -1
- package/dist/chunk-O5UPA33R.js +0 -2
- package/dist/chunk-O5UPA33R.js.map +0 -1
- package/dist/chunk-RD73EBSN.js +0 -2
- package/dist/chunk-RD73EBSN.js.map +0 -1
- package/dist/chunk-T2JRSWQU.cjs +0 -2
- package/dist/chunk-T2JRSWQU.cjs.map +0 -1
- package/dist/chunk-UQ3DSUWC.js +0 -2
- package/dist/chunk-UQ3DSUWC.js.map +0 -1
- package/dist/chunk-VZHG372Q.cjs +0 -2
- package/dist/chunk-VZHG372Q.cjs.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-JC4R5WCC.js.map → chunk-LX4GSDUV.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,15 +50,41 @@ 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";
|
|
87
|
+
type BitOperationalErrorSource = "submit" | "validation" | "persist" | (string & {});
|
|
148
88
|
type BitFieldChangeOrigin = "setField" | "rebase" | "replaceValues" | "hydrate" | "array";
|
|
149
89
|
type BitArrayOperation = "push" | "prepend" | "insert" | "remove" | "move" | "swap" | "replace" | "clear";
|
|
150
90
|
interface BitFieldChangeMeta {
|
|
@@ -198,6 +138,7 @@ interface BitPluginErrorEvent<T extends object = Record<string, unknown>> {
|
|
|
198
138
|
values: Readonly<T>;
|
|
199
139
|
state: Readonly<BitState<T>>;
|
|
200
140
|
}
|
|
141
|
+
|
|
201
142
|
interface BitPluginContext<T extends object = Record<string, unknown>> {
|
|
202
143
|
storeId: string;
|
|
203
144
|
getState: () => Readonly<BitState<T>>;
|
|
@@ -216,35 +157,7 @@ interface BitPlugin<T extends object = Record<string, unknown>> {
|
|
|
216
157
|
setup?: (context: BitPluginContext<T>) => void | (() => void);
|
|
217
158
|
hooks?: BitPluginHooks<T>;
|
|
218
159
|
}
|
|
219
|
-
|
|
220
|
-
interface BitPersistStorageAdapter {
|
|
221
|
-
getItem(key: string): BitMaybePromise<string | null>;
|
|
222
|
-
setItem(key: string, value: string): BitMaybePromise<void>;
|
|
223
|
-
removeItem(key: string): BitMaybePromise<void>;
|
|
224
|
-
}
|
|
225
|
-
type BitPersistMode = "values" | "dirtyValues";
|
|
226
|
-
interface BitPersistConfig<T extends object = Record<string, unknown>> {
|
|
227
|
-
enabled?: boolean;
|
|
228
|
-
key?: string;
|
|
229
|
-
storage?: BitPersistStorageAdapter;
|
|
230
|
-
autoSave?: boolean;
|
|
231
|
-
debounceMs?: number;
|
|
232
|
-
mode?: BitPersistMode;
|
|
233
|
-
serialize?: (payload: unknown) => string;
|
|
234
|
-
deserialize?: (raw: string) => Partial<T>;
|
|
235
|
-
onError?: (error: unknown) => void;
|
|
236
|
-
}
|
|
237
|
-
interface BitPersistResolvedConfig<T extends object = Record<string, unknown>> {
|
|
238
|
-
enabled: boolean;
|
|
239
|
-
key: string;
|
|
240
|
-
storage?: BitPersistStorageAdapter;
|
|
241
|
-
autoSave: boolean;
|
|
242
|
-
debounceMs: number;
|
|
243
|
-
mode: BitPersistMode;
|
|
244
|
-
serialize: (payload: unknown) => string;
|
|
245
|
-
deserialize: (raw: string) => Partial<T>;
|
|
246
|
-
onError?: (error: unknown) => void;
|
|
247
|
-
}
|
|
160
|
+
|
|
248
161
|
/** Validation config. */
|
|
249
162
|
interface BitValidationConfig<T extends object> {
|
|
250
163
|
resolver?: ValidatorFn<T>;
|
|
@@ -290,57 +203,21 @@ interface BitConfig<T extends object = Record<string, unknown>> {
|
|
|
290
203
|
subscriptionCacheSize?: number;
|
|
291
204
|
/**
|
|
292
205
|
* Pluggable scheduler for validation debounce.
|
|
293
|
-
* Defaults to a
|
|
294
|
-
* Inject a framework-aware scheduler (e.g. React `startTransition`) for
|
|
295
|
-
* better integration with concurrent rendering.
|
|
206
|
+
* Defaults to a setTimeout-based scheduler.
|
|
296
207
|
*/
|
|
297
208
|
scheduler?: BitScheduler;
|
|
298
209
|
/**
|
|
299
|
-
* Custom bus instance for DevTools/observability.
|
|
300
|
-
* shared browser-global bus (`bitBus`) is used — suitable for most apps.
|
|
301
|
-
* Pass a `createBitBus()` instance when running in SSR/Edge environments
|
|
302
|
-
* where a global singleton is unsafe (e.g. Next.js Edge Runtime).
|
|
210
|
+
* Custom bus instance for DevTools/observability.
|
|
303
211
|
*/
|
|
304
212
|
bus?: BitFormGlobal;
|
|
213
|
+
/**
|
|
214
|
+
* Enables advanced tracked selector subscriptions (mode: tracked).
|
|
215
|
+
*/
|
|
216
|
+
trackedSubscriptions?: boolean;
|
|
305
217
|
/**
|
|
306
218
|
* Handler opcional para erros operacionais não tratados internamente.
|
|
307
|
-
* Se não informado, o runtime usa fallback para `console.error`.
|
|
308
219
|
*/
|
|
309
|
-
onUnhandledError?: (error: unknown, source:
|
|
220
|
+
onUnhandledError?: (error: unknown, source: BitOperationalErrorSource) => void;
|
|
310
221
|
}
|
|
311
|
-
type BitSubmitResult = {
|
|
312
|
-
status: "submitted";
|
|
313
|
-
} | {
|
|
314
|
-
status: "invalid";
|
|
315
|
-
} | {
|
|
316
|
-
status: "failed";
|
|
317
|
-
error: unknown;
|
|
318
|
-
} | {
|
|
319
|
-
status: "blocked";
|
|
320
|
-
reason: "isSubmitting" | "validating";
|
|
321
|
-
};
|
|
322
|
-
/** Return type of BitStore.getScopeStatus, used by useBitScope/injectBitScope. */
|
|
323
|
-
interface ScopeStatus {
|
|
324
|
-
hasErrors: boolean;
|
|
325
|
-
isDirty: boolean;
|
|
326
|
-
errors: Record<string, string>;
|
|
327
|
-
}
|
|
328
|
-
/** Return type of scope validation helpers, used by useBitScope/injectBitScope. */
|
|
329
|
-
interface ValidateScopeResult {
|
|
330
|
-
valid: boolean;
|
|
331
|
-
errors: Record<string, string>;
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Type-safe path utilities
|
|
335
|
-
*
|
|
336
|
-
* These are used to strengthen typing for field paths (e.g. "user.email", "items.0.name").
|
|
337
|
-
*/
|
|
338
|
-
type Primitive = string | number | boolean | bigint | symbol | null | undefined;
|
|
339
|
-
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>}` : {
|
|
340
|
-
[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]>}`;
|
|
341
|
-
}[keyof T & (string | number)];
|
|
342
|
-
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;
|
|
343
|
-
type BitArrayPath<T> = BitPath<T> extends infer P ? P extends string ? BitPathValue<T, P> extends readonly unknown[] ? P : never : never : never;
|
|
344
|
-
type BitArrayItem<A> = A extends readonly (infer U)[] ? U : A extends (infer U)[] ? U : never;
|
|
345
222
|
|
|
346
|
-
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 _chunkNVFZ22A7cjs = require('../chunk-NVFZ22A7.cjs');require('../chunk-VBX5I5XG.cjs');var _chunkPFPGASVZcjs = require('../chunk-PFPGASVZ.cjs');exports.cleanupRegisteredField = _chunkNVFZ22A7cjs.j; exports.cleanupRegisteredPrefix = _chunkNVFZ22A7cjs.k; exports.createArrayBinding = _chunkNVFZ22A7cjs.g; exports.createFrameworkFormBinding = _chunkNVFZ22A7cjs.i; exports.createFrameworkMaskedFieldBinding = _chunkNVFZ22A7cjs.h; exports.formatMaskedValue = _chunkPFPGASVZcjs.b; exports.isBitFieldInputEventObject = _chunkPFPGASVZcjs.a; exports.observeFormMetaSnapshot = _chunkNVFZ22A7cjs.c; exports.observePersistMetaSnapshot = _chunkNVFZ22A7cjs.f; exports.parseMaskedInput = _chunkPFPGASVZcjs.c; exports.readFormMetaSnapshot = _chunkNVFZ22A7cjs.a; exports.readPersistMetaSnapshot = _chunkNVFZ22A7cjs.d; exports.subscribeFormMetaSnapshot = _chunkNVFZ22A7cjs.b; exports.subscribePersistMetaSnapshot = _chunkNVFZ22A7cjs.e;
|
|
2
2
|
//# sourceMappingURL=bindings.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/bit-form/bit-form/dist/core/bindings.cjs"],"names":[],"mappings":"AAAA,kIAA4E,iCAA8B,yDAAwD
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/bit-form/bit-form/dist/core/bindings.cjs"],"names":[],"mappings":"AAAA,kIAA4E,iCAA8B,yDAAwD,qwBAAka","file":"/home/runner/work/bit-form/bit-form/dist/core/bindings.cjs"}
|
package/dist/core/bindings.d.cts
CHANGED
|
@@ -1,23 +1,43 @@
|
|
|
1
|
-
import { B as BitFormMeta, b as BitValidationOptions } from '../meta-types-
|
|
2
|
-
import { e as BitStoreApi } from '../store-api-types-
|
|
3
|
-
import {
|
|
4
|
-
import '../
|
|
5
|
-
export {
|
|
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;
|
|
12
14
|
declare function observeFormMetaSnapshot<T extends object>(store: BitStoreApi<T>, listener: (meta: BitFormMeta) => void): () => void;
|
|
13
15
|
|
|
16
|
+
type BitPersistMetaReadableStore = {
|
|
17
|
+
read: {
|
|
18
|
+
getPersistMetadata(): BitPersistMetadata;
|
|
19
|
+
};
|
|
20
|
+
observe: {
|
|
21
|
+
subscribePersistMeta(listener: (meta: BitPersistMetadata) => void): () => void;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
14
24
|
declare function readPersistMetaSnapshot(store: {
|
|
15
25
|
read: {
|
|
16
26
|
getPersistMetadata(): BitPersistMetadata;
|
|
17
27
|
};
|
|
18
28
|
}): BitPersistMetadata;
|
|
19
|
-
declare function subscribePersistMetaSnapshot(store:
|
|
20
|
-
declare function observePersistMetaSnapshot(store:
|
|
29
|
+
declare function subscribePersistMetaSnapshot(store: BitPersistMetaReadableStore, listener: () => void): () => void;
|
|
30
|
+
declare function observePersistMetaSnapshot(store: BitPersistMetaReadableStore, listener: (meta: BitPersistMetadata) => void): () => void;
|
|
31
|
+
|
|
32
|
+
declare function createArrayBinding<TForm extends object, P extends BitArrayPath<TForm>>(store: BitStoreApi<TForm>, path: P): BitArrayBinding<TForm, P>;
|
|
33
|
+
|
|
34
|
+
declare function createFrameworkMaskedFieldBinding<TForm extends object, P extends BitPath<TForm>>(store: BitStoreApi<TForm>, path: P): {
|
|
35
|
+
fieldController: {
|
|
36
|
+
setValue: (value: unknown) => void;
|
|
37
|
+
setBlur: () => void;
|
|
38
|
+
displayValue: (value: unknown) => string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
21
41
|
|
|
22
42
|
type BitFormDomEvent = {
|
|
23
43
|
preventDefault?: () => void;
|
|
@@ -34,7 +54,7 @@ interface BitFormControllerOptions {
|
|
|
34
54
|
|
|
35
55
|
declare function createFrameworkFormBinding<T extends object>(store: BitStoreApi<T>, runtime: BitFormControllerRuntime, options?: BitFormControllerOptions): {
|
|
36
56
|
controller: {
|
|
37
|
-
submit: (onSuccess: (values: T, dirtyValues?: Partial<T> | undefined) =>
|
|
57
|
+
submit: (onSuccess: (values: T, dirtyValues?: Partial<T> | undefined) => unknown | Promise<unknown>) => (event?: BitFormDomEvent) => Promise<void>;
|
|
38
58
|
onSubmit: (handler: (values: T, dirtyValues?: Partial<T> | undefined) => Promise<unknown>) => (event?: BitFormDomEvent) => Promise<void>;
|
|
39
59
|
reset: () => void;
|
|
40
60
|
getValues: () => T;
|
|
@@ -51,20 +71,12 @@ declare function createFrameworkFormBinding<T extends object>(store: BitStoreApi
|
|
|
51
71
|
}) => void;
|
|
52
72
|
setError: (path: string, message: string | undefined) => void;
|
|
53
73
|
setErrors: (errors: Partial<Record<BitPath<T, "">, string | undefined>>) => void;
|
|
54
|
-
setServerErrors: (serverErrors: Record<string, string[] | string
|
|
74
|
+
setServerErrors: (serverErrors: Record<string, string[] | string>, options?: BitServerErrorOptions) => void;
|
|
55
75
|
validate: (options?: BitValidationOptions) => Promise<boolean>;
|
|
56
76
|
transaction: <TResult>(callback: () => TResult) => TResult;
|
|
57
77
|
};
|
|
58
78
|
};
|
|
59
79
|
|
|
60
|
-
declare function createFrameworkMaskedFieldBinding<TForm extends object, P extends BitPath<TForm>>(store: BitStoreApi<TForm>, path: P): {
|
|
61
|
-
fieldController: {
|
|
62
|
-
setValue: (value: unknown) => void;
|
|
63
|
-
setBlur: () => void;
|
|
64
|
-
displayValue: (value: unknown) => string;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
|
|
68
80
|
type FieldCleanupStore = {
|
|
69
81
|
feature?: {
|
|
70
82
|
unregisterField?: (path: string) => void;
|
|
@@ -78,4 +90,4 @@ type PrefixCleanupStore = {
|
|
|
78
90
|
declare function cleanupRegisteredField(store: FieldCleanupStore, path: string): void;
|
|
79
91
|
declare function cleanupRegisteredPrefix(store: PrefixCleanupStore, prefix: string): void;
|
|
80
92
|
|
|
81
|
-
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,23 +1,43 @@
|
|
|
1
|
-
import { B as BitFormMeta, b as BitValidationOptions } from '../meta-types-
|
|
2
|
-
import { e as BitStoreApi } from '../store-api-types-
|
|
3
|
-
import {
|
|
4
|
-
import '../
|
|
5
|
-
export {
|
|
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;
|
|
12
14
|
declare function observeFormMetaSnapshot<T extends object>(store: BitStoreApi<T>, listener: (meta: BitFormMeta) => void): () => void;
|
|
13
15
|
|
|
16
|
+
type BitPersistMetaReadableStore = {
|
|
17
|
+
read: {
|
|
18
|
+
getPersistMetadata(): BitPersistMetadata;
|
|
19
|
+
};
|
|
20
|
+
observe: {
|
|
21
|
+
subscribePersistMeta(listener: (meta: BitPersistMetadata) => void): () => void;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
14
24
|
declare function readPersistMetaSnapshot(store: {
|
|
15
25
|
read: {
|
|
16
26
|
getPersistMetadata(): BitPersistMetadata;
|
|
17
27
|
};
|
|
18
28
|
}): BitPersistMetadata;
|
|
19
|
-
declare function subscribePersistMetaSnapshot(store:
|
|
20
|
-
declare function observePersistMetaSnapshot(store:
|
|
29
|
+
declare function subscribePersistMetaSnapshot(store: BitPersistMetaReadableStore, listener: () => void): () => void;
|
|
30
|
+
declare function observePersistMetaSnapshot(store: BitPersistMetaReadableStore, listener: (meta: BitPersistMetadata) => void): () => void;
|
|
31
|
+
|
|
32
|
+
declare function createArrayBinding<TForm extends object, P extends BitArrayPath<TForm>>(store: BitStoreApi<TForm>, path: P): BitArrayBinding<TForm, P>;
|
|
33
|
+
|
|
34
|
+
declare function createFrameworkMaskedFieldBinding<TForm extends object, P extends BitPath<TForm>>(store: BitStoreApi<TForm>, path: P): {
|
|
35
|
+
fieldController: {
|
|
36
|
+
setValue: (value: unknown) => void;
|
|
37
|
+
setBlur: () => void;
|
|
38
|
+
displayValue: (value: unknown) => string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
21
41
|
|
|
22
42
|
type BitFormDomEvent = {
|
|
23
43
|
preventDefault?: () => void;
|
|
@@ -34,7 +54,7 @@ interface BitFormControllerOptions {
|
|
|
34
54
|
|
|
35
55
|
declare function createFrameworkFormBinding<T extends object>(store: BitStoreApi<T>, runtime: BitFormControllerRuntime, options?: BitFormControllerOptions): {
|
|
36
56
|
controller: {
|
|
37
|
-
submit: (onSuccess: (values: T, dirtyValues?: Partial<T> | undefined) =>
|
|
57
|
+
submit: (onSuccess: (values: T, dirtyValues?: Partial<T> | undefined) => unknown | Promise<unknown>) => (event?: BitFormDomEvent) => Promise<void>;
|
|
38
58
|
onSubmit: (handler: (values: T, dirtyValues?: Partial<T> | undefined) => Promise<unknown>) => (event?: BitFormDomEvent) => Promise<void>;
|
|
39
59
|
reset: () => void;
|
|
40
60
|
getValues: () => T;
|
|
@@ -51,20 +71,12 @@ declare function createFrameworkFormBinding<T extends object>(store: BitStoreApi
|
|
|
51
71
|
}) => void;
|
|
52
72
|
setError: (path: string, message: string | undefined) => void;
|
|
53
73
|
setErrors: (errors: Partial<Record<BitPath<T, "">, string | undefined>>) => void;
|
|
54
|
-
setServerErrors: (serverErrors: Record<string, string[] | string
|
|
74
|
+
setServerErrors: (serverErrors: Record<string, string[] | string>, options?: BitServerErrorOptions) => void;
|
|
55
75
|
validate: (options?: BitValidationOptions) => Promise<boolean>;
|
|
56
76
|
transaction: <TResult>(callback: () => TResult) => TResult;
|
|
57
77
|
};
|
|
58
78
|
};
|
|
59
79
|
|
|
60
|
-
declare function createFrameworkMaskedFieldBinding<TForm extends object, P extends BitPath<TForm>>(store: BitStoreApi<TForm>, path: P): {
|
|
61
|
-
fieldController: {
|
|
62
|
-
setValue: (value: unknown) => void;
|
|
63
|
-
setBlur: () => void;
|
|
64
|
-
displayValue: (value: unknown) => string;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
|
|
68
80
|
type FieldCleanupStore = {
|
|
69
81
|
feature?: {
|
|
70
82
|
unregisterField?: (path: string) => void;
|
|
@@ -78,4 +90,4 @@ type PrefixCleanupStore = {
|
|
|
78
90
|
declare function cleanupRegisteredField(store: FieldCleanupStore, path: string): void;
|
|
79
91
|
declare function cleanupRegisteredPrefix(store: PrefixCleanupStore, prefix: string): void;
|
|
80
92
|
|
|
81
|
-
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-2AFWJAQG.js";import"../chunk-FLFIOW75.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.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBSGJ3T5Scjs = require('../chunk-BSGJ3T5S.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBSGJ3T5Scjs = require('../chunk-BSGJ3T5S.cjs');var _chunkRHMJPKNVcjs = require('../chunk-RHMJPKNV.cjs');exports.areScopeErrorsEqual = _chunkRHMJPKNVcjs.a; exports.getScopeSubscriptionPaths = _chunkRHMJPKNVcjs.c; exports.isHistoryMetaEqual = _chunkRHMJPKNVcjs.e; exports.isScopeStatusEqual = _chunkRHMJPKNVcjs.b; exports.observeHistoryMetaSnapshot = _chunkRHMJPKNVcjs.g; exports.observeScopeStatusSnapshot = _chunkBSGJ3T5Scjs.a; exports.readHistoryMetaSnapshot = _chunkRHMJPKNVcjs.f;
|
|
2
2
|
//# sourceMappingURL=status.cjs.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.
|
|
@@ -14,12 +13,12 @@ type HistoryMeta = Pick<BitHistoryMetadata, "canUndo" | "canRedo" | "historyInde
|
|
|
14
13
|
* permitindo que os bindings de framework ignorem atualizações não relacionadas.
|
|
15
14
|
*/
|
|
16
15
|
declare function isHistoryMetaEqual(a: HistoryMeta, b: HistoryMeta): boolean;
|
|
17
|
-
declare function readHistoryMetaSnapshot<
|
|
16
|
+
declare function readHistoryMetaSnapshot<_T extends object>(store: {
|
|
18
17
|
read: {
|
|
19
18
|
getHistoryMetadata(): BitHistoryMetadata;
|
|
20
19
|
};
|
|
21
20
|
}): HistoryMeta;
|
|
22
|
-
declare function observeHistoryMetaSnapshot<
|
|
21
|
+
declare function observeHistoryMetaSnapshot<_T extends object>(store: {
|
|
23
22
|
read: {
|
|
24
23
|
getHistoryMetadata(): BitHistoryMetadata;
|
|
25
24
|
};
|
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.
|
|
@@ -14,12 +13,12 @@ type HistoryMeta = Pick<BitHistoryMetadata, "canUndo" | "canRedo" | "historyInde
|
|
|
14
13
|
* permitindo que os bindings de framework ignorem atualizações não relacionadas.
|
|
15
14
|
*/
|
|
16
15
|
declare function isHistoryMetaEqual(a: HistoryMeta, b: HistoryMeta): boolean;
|
|
17
|
-
declare function readHistoryMetaSnapshot<
|
|
16
|
+
declare function readHistoryMetaSnapshot<_T extends object>(store: {
|
|
18
17
|
read: {
|
|
19
18
|
getHistoryMetadata(): BitHistoryMetadata;
|
|
20
19
|
};
|
|
21
20
|
}): HistoryMeta;
|
|
22
|
-
declare function observeHistoryMetaSnapshot<
|
|
21
|
+
declare function observeHistoryMetaSnapshot<_T extends object>(store: {
|
|
23
22
|
read: {
|
|
24
23
|
getHistoryMetadata(): BitHistoryMetadata;
|
|
25
24
|
};
|
package/dist/core/status.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"../chunk-W2E5UIXT.js";import{a,b,c,e as d,f as e,g as f}from"../chunk-
|
|
1
|
+
import{a as g}from"../chunk-W2E5UIXT.js";import{a,b,c,e as d,f as e,g as f}from"../chunk-UIKO6GGW.js";export{a as areScopeErrorsEqual,c as getScopeSubscriptionPaths,d as isHistoryMetaEqual,b as isScopeStatusEqual,f as observeHistoryMetaSnapshot,g as observeScopeStatusSnapshot,e as readHistoryMetaSnapshot};
|
|
2
2
|
//# sourceMappingURL=status.js.map
|
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 _chunk4RQFECC7cjs = require('../chunk-4RQFECC7.cjs');require('../chunk-RHMJPKNV.cjs');require('../chunk-ZKAFHJPU.cjs');require('../chunk-VBX5I5XG.cjs');exports.bitBus = _chunk4RQFECC7cjs.a; exports.createBitBus = _chunk4RQFECC7cjs.b; exports.createBitStore = _chunk4RQFECC7cjs.e; exports.createFrameworkStoreAdapter = _chunk4RQFECC7cjs.d; exports.extractFeatureSlice = _chunk4RQFECC7cjs.i; exports.extractObserveSlice = _chunk4RQFECC7cjs.g; exports.extractReadSlice = _chunk4RQFECC7cjs.f; exports.extractSlices = _chunk4RQFECC7cjs.j; exports.extractWriteSlice = _chunk4RQFECC7cjs.h; exports.resolveBitStoreForHooks = _chunk4RQFECC7cjs.c;
|
|
2
2
|
//# sourceMappingURL=store.cjs.map
|
package/dist/core/store.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/bit-form/bit-form/dist/core/store.cjs"],"names":[],"mappings":"AAAA,kIAAsD,iCAA8B,iCAA8B,qeAA0O","file":"/home/runner/work/bit-form/bit-form/dist/core/store.cjs"}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/bit-form/bit-form/dist/core/store.cjs"],"names":[],"mappings":"AAAA,kIAAsD,iCAA8B,iCAA8B,iCAA8B,qeAA0O","file":"/home/runner/work/bit-form/bit-form/dist/core/store.cjs"}
|
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-G2FQQDRK.js";import"../chunk-UIKO6GGW.js";import"../chunk-OPC7HFNN.js";import"../chunk-FLFIOW75.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
|