@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.
Files changed (170) hide show
  1. package/dist/angular/index.cjs +1 -1
  2. package/dist/angular/index.cjs.map +1 -1
  3. package/dist/angular/index.d.cts +27 -59
  4. package/dist/angular/index.d.ts +27 -59
  5. package/dist/angular/index.js +1 -1
  6. package/dist/angular/index.js.map +1 -1
  7. package/dist/bus-BFOBGmd9.d.ts +41 -0
  8. package/dist/bus-DzTqgkZ4.d.cts +41 -0
  9. package/dist/chunk-2AFWJAQG.js +2 -0
  10. package/dist/chunk-2AFWJAQG.js.map +1 -0
  11. package/dist/chunk-3KI3GEU3.cjs +2 -0
  12. package/dist/chunk-3KI3GEU3.cjs.map +1 -0
  13. package/dist/chunk-4RQFECC7.cjs +2 -0
  14. package/dist/chunk-4RQFECC7.cjs.map +1 -0
  15. package/dist/chunk-FLFIOW75.js +2 -0
  16. package/dist/chunk-FLFIOW75.js.map +1 -0
  17. package/dist/chunk-G2FQQDRK.js +2 -0
  18. package/dist/chunk-G2FQQDRK.js.map +1 -0
  19. package/dist/chunk-GPMAT4PT.cjs +2 -0
  20. package/dist/chunk-GPMAT4PT.cjs.map +1 -0
  21. package/dist/chunk-GQ2QJCBF.js +2 -0
  22. package/dist/chunk-GQ2QJCBF.js.map +1 -0
  23. package/dist/chunk-ICYXODTQ.js +2 -0
  24. package/dist/chunk-ICYXODTQ.js.map +1 -0
  25. package/dist/{chunk-P2YWYBWG.cjs → chunk-IVPCXKYW.cjs} +2 -2
  26. package/dist/{chunk-P2YWYBWG.cjs.map → chunk-IVPCXKYW.cjs.map} +1 -1
  27. package/dist/{chunk-JC4R5WCC.js → chunk-LX4GSDUV.js} +2 -2
  28. package/dist/chunk-NVFZ22A7.cjs +2 -0
  29. package/dist/chunk-NVFZ22A7.cjs.map +1 -0
  30. package/dist/chunk-OPC7HFNN.js +2 -0
  31. package/dist/chunk-OPC7HFNN.js.map +1 -0
  32. package/dist/chunk-PA43XYOW.cjs +2 -0
  33. package/dist/{chunk-IV32WXCF.cjs.map → chunk-PA43XYOW.cjs.map} +1 -1
  34. package/dist/chunk-PG7ZH32Z.js +2 -0
  35. package/dist/chunk-PG7ZH32Z.js.map +1 -0
  36. package/dist/{chunk-D7JQWF6V.cjs → chunk-RHMJPKNV.cjs} +1 -1
  37. package/dist/{chunk-D7JQWF6V.cjs.map → chunk-RHMJPKNV.cjs.map} +1 -1
  38. package/dist/{chunk-EQ55DKX2.js → chunk-UIKO6GGW.js} +1 -1
  39. package/dist/chunk-UIKO6GGW.js.map +1 -0
  40. package/dist/chunk-VBX5I5XG.cjs +2 -0
  41. package/dist/chunk-VBX5I5XG.cjs.map +1 -0
  42. package/dist/chunk-ZKAFHJPU.cjs +2 -0
  43. package/dist/chunk-ZKAFHJPU.cjs.map +1 -0
  44. package/dist/cli/index.cjs +5 -5
  45. package/dist/{types-D6LhF5GC.d.cts → config-types-5eR82k2V.d.cts} +45 -168
  46. package/dist/{types-CG5nYeRk.d.ts → config-types-D9n-rQLk.d.ts} +45 -168
  47. package/dist/core/bindings.cjs +1 -1
  48. package/dist/core/bindings.cjs.map +1 -1
  49. package/dist/core/bindings.d.cts +33 -21
  50. package/dist/core/bindings.d.ts +33 -21
  51. package/dist/core/bindings.js +1 -1
  52. package/dist/core/status.cjs +1 -1
  53. package/dist/core/status.d.cts +5 -6
  54. package/dist/core/status.d.ts +5 -6
  55. package/dist/core/status.js +1 -1
  56. package/dist/core/store.cjs +1 -1
  57. package/dist/core/store.cjs.map +1 -1
  58. package/dist/core/store.d.cts +8 -6
  59. package/dist/core/store.d.ts +8 -6
  60. package/dist/core/store.js +1 -1
  61. package/dist/core/utils.cjs +1 -1
  62. package/dist/core/utils.cjs.map +1 -1
  63. package/dist/core/utils.d.cts +4 -12
  64. package/dist/core/utils.d.ts +4 -12
  65. package/dist/core/utils.js +1 -1
  66. package/dist/core.cjs +1 -1
  67. package/dist/core.cjs.map +1 -1
  68. package/dist/core.d.cts +10 -9
  69. package/dist/core.d.ts +10 -9
  70. package/dist/core.js +1 -1
  71. package/dist/devtools/bridge.cjs +1 -1
  72. package/dist/devtools/bridge.cjs.map +1 -1
  73. package/dist/devtools/bridge.d.cts +2 -3
  74. package/dist/devtools/bridge.d.ts +2 -3
  75. package/dist/devtools/bridge.js +1 -1
  76. package/dist/devtools/index.cjs +2 -2
  77. package/dist/devtools/index.cjs.map +1 -1
  78. package/dist/devtools/index.d.cts +5 -3
  79. package/dist/devtools/index.d.ts +5 -3
  80. package/dist/devtools/index.js +1 -1
  81. package/dist/devtools/index.js.map +1 -1
  82. package/dist/{field-binding-MX6jVQbT.d.ts → field-binding-Bi1g-D8X.d.ts} +1 -1
  83. package/dist/{field-binding-B_OX3bjp.d.cts → field-binding-X5TkvfUt.d.cts} +1 -1
  84. package/dist/index.cjs +1 -1
  85. package/dist/index.cjs.map +1 -1
  86. package/dist/index.d.cts +7 -5
  87. package/dist/index.d.ts +7 -5
  88. package/dist/index.js +1 -1
  89. package/dist/mask.cjs +1 -1
  90. package/dist/mask.cjs.map +1 -1
  91. package/dist/mask.d.cts +2 -2
  92. package/dist/mask.d.ts +2 -2
  93. package/dist/mask.js +1 -1
  94. package/dist/mask.js.map +1 -1
  95. package/dist/meta-types-BC1VLABk.d.cts +28 -0
  96. package/dist/meta-types-BC1VLABk.d.ts +28 -0
  97. package/dist/react/index.cjs +1 -1
  98. package/dist/react/index.cjs.map +1 -1
  99. package/dist/react/index.d.cts +12 -12
  100. package/dist/react/index.d.ts +12 -12
  101. package/dist/react/index.js +1 -1
  102. package/dist/react/index.js.map +1 -1
  103. package/dist/react-native/index.cjs +1 -1
  104. package/dist/react-native/index.cjs.map +1 -1
  105. package/dist/react-native/index.d.cts +10 -9
  106. package/dist/react-native/index.d.ts +10 -9
  107. package/dist/react-native/index.js +1 -1
  108. package/dist/react-native/index.js.map +1 -1
  109. package/dist/resolvers/index.d.cts +2 -3
  110. package/dist/resolvers/index.d.ts +2 -3
  111. package/dist/resolvers/joi.d.cts +2 -3
  112. package/dist/resolvers/joi.d.ts +2 -3
  113. package/dist/resolvers/yup.d.cts +2 -3
  114. package/dist/resolvers/yup.d.ts +2 -3
  115. package/dist/resolvers/zod.d.cts +2 -3
  116. package/dist/resolvers/zod.d.ts +2 -3
  117. package/dist/runtime-types-D1SRZr-n.d.cts +43 -0
  118. package/dist/runtime-types-D1SRZr-n.d.ts +43 -0
  119. package/dist/state-types-8bUndWfg.d.cts +42 -0
  120. package/dist/state-types-8bUndWfg.d.ts +42 -0
  121. package/dist/{store-api-types-DPi30jQF.d.ts → store-api-types-Bozwlwyb.d.ts} +18 -14
  122. package/dist/{store-api-types-D-ZHxzRy.d.cts → store-api-types-DSgYwMS3.d.cts} +18 -14
  123. package/dist/{types-D8DgIUhJ.d.cts → types-CUXh7PqD.d.cts} +1 -1
  124. package/dist/{types-D8DgIUhJ.d.ts → types-CUXh7PqD.d.ts} +1 -1
  125. package/dist/upload-C4JqIaU2.d.cts +89 -0
  126. package/dist/upload-ao6skK9K.d.ts +89 -0
  127. package/dist/{use-bit-persist-BTwy8kvA.d.ts → use-bit-persist-Bd1H2fge.d.ts} +12 -45
  128. package/dist/{use-bit-persist-C2LHNTVv.d.cts → use-bit-persist-DDxV21AN.d.cts} +12 -45
  129. package/dist/utils.cjs +1 -1
  130. package/dist/utils.js +1 -1
  131. package/dist/vue/index.cjs +1 -1
  132. package/dist/vue/index.cjs.map +1 -1
  133. package/dist/vue/index.d.cts +18 -51
  134. package/dist/vue/index.d.ts +18 -51
  135. package/dist/vue/index.js +1 -1
  136. package/dist/vue/index.js.map +1 -1
  137. package/package.json +10 -7
  138. package/dist/array-controller-B5bfXV1W.d.cts +0 -23
  139. package/dist/array-controller-Cx-DMH7Y.d.ts +0 -23
  140. package/dist/bus-B2VEKrPI.d.ts +0 -19
  141. package/dist/bus-ZLQeq4Vr.d.cts +0 -19
  142. package/dist/chunk-63OJBMKK.js +0 -2
  143. package/dist/chunk-63OJBMKK.js.map +0 -1
  144. package/dist/chunk-CPP7ELA5.js +0 -2
  145. package/dist/chunk-CPP7ELA5.js.map +0 -1
  146. package/dist/chunk-E2NZR44P.js +0 -2
  147. package/dist/chunk-E2NZR44P.js.map +0 -1
  148. package/dist/chunk-EQ55DKX2.js.map +0 -1
  149. package/dist/chunk-IV32WXCF.cjs +0 -2
  150. package/dist/chunk-M6WBNHIT.cjs +0 -2
  151. package/dist/chunk-M6WBNHIT.cjs.map +0 -1
  152. package/dist/chunk-MFSQATNZ.cjs +0 -2
  153. package/dist/chunk-MFSQATNZ.cjs.map +0 -1
  154. package/dist/chunk-MFTWAFMG.cjs +0 -2
  155. package/dist/chunk-MFTWAFMG.cjs.map +0 -1
  156. package/dist/chunk-O5UPA33R.js +0 -2
  157. package/dist/chunk-O5UPA33R.js.map +0 -1
  158. package/dist/chunk-RD73EBSN.js +0 -2
  159. package/dist/chunk-RD73EBSN.js.map +0 -1
  160. package/dist/chunk-T2JRSWQU.cjs +0 -2
  161. package/dist/chunk-T2JRSWQU.cjs.map +0 -1
  162. package/dist/chunk-UQ3DSUWC.js +0 -2
  163. package/dist/chunk-UQ3DSUWC.js.map +0 -1
  164. package/dist/chunk-VZHG372Q.cjs +0 -2
  165. package/dist/chunk-VZHG372Q.cjs.map +0 -1
  166. package/dist/meta-types-Bzmm21TP.d.cts +0 -18
  167. package/dist/meta-types-Bzmm21TP.d.ts +0 -18
  168. package/dist/upload-C2mpfhp1.d.cts +0 -17
  169. package/dist/upload-C2mpfhp1.d.ts +0 -17
  170. /package/dist/{chunk-JC4R5WCC.js.map → chunk-LX4GSDUV.js.map} +0 -0
@@ -1,53 +1,8 @@
1
- import { B as BitMask, a as BitMaskName } from './types-D8DgIUhJ.js';
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
- interface DevToolsOptions {
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
- mode?: "local" | "remote";
145
- url?: string;
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
- type BitMaybePromise<T> = T | Promise<T>;
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 `setTimeout`-based scheduler.
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. When omitted, the
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: "submit" | "validation" | "persist") => void;
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 { BitPlugin as A, BitAfterSubmitEvent as B, BitPluginContext as C, BitPluginErrorEvent as D, BitPluginHooks as E, BitScheduler as F, BitState as G, BitSubmitResult as H, BitTouched as I, BitTransformFn as J, BitValidationConfig as K, DeepPartial as L, DevToolsOptions as M, ValidatorFn as N, BitPersistResolvedConfig as O, BitIdFactory as P, ScopeStatus as S, ValidateScopeResult as V, BitAfterValidateEvent as a, BitArrayItem as b, BitArrayPath as c, BitBeforeSubmitEvent as d, BitBeforeValidateEvent as e, BitBus as f, BitBusListener as g, BitBusStorePort as h, BitComputedFn as i, BitConfig as j, BitErrors as k, BitFieldChangeEvent as l, BitFieldChangeMeta as m, BitFieldConditional as n, BitFieldDefinition as o, BitFieldState as p, BitFieldValidation as q, BitFormGlobal as r, BitHistoryConfig as s, BitNormalizeFn as t, BitPath as u, BitPathValue as v, BitPersistConfig as w, BitPersistMetadata as x, BitPersistMode as y, BitPersistStorageAdapter as z };
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 };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMFTWAFMGcjs = require('../chunk-MFTWAFMG.cjs');require('../chunk-T2JRSWQU.cjs');var _chunkPFPGASVZcjs = require('../chunk-PFPGASVZ.cjs');exports.cleanupRegisteredField = _chunkMFTWAFMGcjs.j; exports.cleanupRegisteredPrefix = _chunkMFTWAFMGcjs.k; exports.createArrayBindingController = _chunkMFTWAFMGcjs.i; exports.createFrameworkFormBinding = _chunkMFTWAFMGcjs.g; exports.createFrameworkMaskedFieldBinding = _chunkMFTWAFMGcjs.h; exports.formatMaskedValue = _chunkPFPGASVZcjs.b; exports.isBitFieldInputEventObject = _chunkPFPGASVZcjs.a; exports.observeFormMetaSnapshot = _chunkMFTWAFMGcjs.c; exports.observePersistMetaSnapshot = _chunkMFTWAFMGcjs.f; exports.parseMaskedInput = _chunkPFPGASVZcjs.c; exports.readFormMetaSnapshot = _chunkMFTWAFMGcjs.a; exports.readPersistMetaSnapshot = _chunkMFTWAFMGcjs.d; exports.subscribeFormMetaSnapshot = _chunkMFTWAFMGcjs.b; exports.subscribePersistMetaSnapshot = _chunkMFTWAFMGcjs.e;
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,+wBAA4a","file":"/home/runner/work/bit-form/bit-form/dist/core/bindings.cjs"}
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"}
@@ -1,23 +1,43 @@
1
- import { B as BitFormMeta, b as BitValidationOptions } from '../meta-types-Bzmm21TP.cjs';
2
- import { e as BitStoreApi } from '../store-api-types-D-ZHxzRy.cjs';
3
- import { x as BitPersistMetadata, u as BitPath, v as BitPathValue, L as DeepPartial } from '../types-D6LhF5GC.cjs';
4
- import '../bus-ZLQeq4Vr.cjs';
5
- export { B as BitArrayBindingController, a as BitArrayBindingField, c as createArrayBindingController } from '../array-controller-B5bfXV1W.cjs';
6
- export { B as BitFieldInputEvent, f as formatMaskedValue, i as isBitFieldInputEventObject, p as parseMaskedInput } from '../field-binding-B_OX3bjp.cjs';
7
- export { B as BitDeleteUploadFn, a as BitUploadFn, b as BitUploadResult } from '../upload-C2mpfhp1.cjs';
8
- import '../types-D8DgIUhJ.cjs';
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: BitStoreApi<any>, listener: () => void): () => void;
20
- declare function observePersistMetaSnapshot(store: BitStoreApi<any>, listener: (meta: BitPersistMetadata) => void): () => void;
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) => void | Promise<void>) => (event?: BitFormDomEvent) => Promise<void>;
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>) => void;
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 };
@@ -1,23 +1,43 @@
1
- import { B as BitFormMeta, b as BitValidationOptions } from '../meta-types-Bzmm21TP.js';
2
- import { e as BitStoreApi } from '../store-api-types-DPi30jQF.js';
3
- import { x as BitPersistMetadata, u as BitPath, v as BitPathValue, L as DeepPartial } from '../types-CG5nYeRk.js';
4
- import '../bus-B2VEKrPI.js';
5
- export { B as BitArrayBindingController, a as BitArrayBindingField, c as createArrayBindingController } from '../array-controller-Cx-DMH7Y.js';
6
- export { B as BitFieldInputEvent, f as formatMaskedValue, i as isBitFieldInputEventObject, p as parseMaskedInput } from '../field-binding-MX6jVQbT.js';
7
- export { B as BitDeleteUploadFn, a as BitUploadFn, b as BitUploadResult } from '../upload-C2mpfhp1.js';
8
- import '../types-D8DgIUhJ.js';
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: BitStoreApi<any>, listener: () => void): () => void;
20
- declare function observePersistMetaSnapshot(store: BitStoreApi<any>, listener: (meta: BitPersistMetadata) => void): () => void;
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) => void | Promise<void>) => (event?: BitFormDomEvent) => Promise<void>;
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>) => void;
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 };
@@ -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-E2NZR44P.js";import"../chunk-RD73EBSN.js";import{a as h,b as i,c as j}from"../chunk-3NUJVIAM.js";export{m as cleanupRegisteredField,n as cleanupRegisteredPrefix,l as createArrayBindingController,g 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};
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
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBSGJ3T5Scjs = require('../chunk-BSGJ3T5S.cjs');var _chunkD7JQWF6Vcjs = require('../chunk-D7JQWF6V.cjs');exports.areScopeErrorsEqual = _chunkD7JQWF6Vcjs.a; exports.getScopeSubscriptionPaths = _chunkD7JQWF6Vcjs.c; exports.isHistoryMetaEqual = _chunkD7JQWF6Vcjs.e; exports.isScopeStatusEqual = _chunkD7JQWF6Vcjs.b; exports.observeHistoryMetaSnapshot = _chunkD7JQWF6Vcjs.g; exports.observeScopeStatusSnapshot = _chunkBSGJ3T5Scjs.a; exports.readHistoryMetaSnapshot = _chunkD7JQWF6Vcjs.f;
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
@@ -1,7 +1,6 @@
1
- import { a as BitHistoryMetadata } from '../meta-types-Bzmm21TP.cjs';
2
- import { S as ScopeStatus } from '../types-D6LhF5GC.cjs';
3
- export { V as ValidateScopeResult } from '../types-D6LhF5GC.cjs';
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<T extends object>(store: {
16
+ declare function readHistoryMetaSnapshot<_T extends object>(store: {
18
17
  read: {
19
18
  getHistoryMetadata(): BitHistoryMetadata;
20
19
  };
21
20
  }): HistoryMeta;
22
- declare function observeHistoryMetaSnapshot<T extends object>(store: {
21
+ declare function observeHistoryMetaSnapshot<_T extends object>(store: {
23
22
  read: {
24
23
  getHistoryMetadata(): BitHistoryMetadata;
25
24
  };
@@ -1,7 +1,6 @@
1
- import { a as BitHistoryMetadata } from '../meta-types-Bzmm21TP.js';
2
- import { S as ScopeStatus } from '../types-CG5nYeRk.js';
3
- export { V as ValidateScopeResult } from '../types-CG5nYeRk.js';
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<T extends object>(store: {
16
+ declare function readHistoryMetaSnapshot<_T extends object>(store: {
18
17
  read: {
19
18
  getHistoryMetadata(): BitHistoryMetadata;
20
19
  };
21
20
  }): HistoryMeta;
22
- declare function observeHistoryMetaSnapshot<T extends object>(store: {
21
+ declare function observeHistoryMetaSnapshot<_T extends object>(store: {
23
22
  read: {
24
23
  getHistoryMetadata(): BitHistoryMetadata;
25
24
  };
@@ -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-EQ55DKX2.js";export{a as areScopeErrorsEqual,c as getScopeSubscriptionPaths,d as isHistoryMetaEqual,b as isScopeStatusEqual,f as observeHistoryMetaSnapshot,g as observeScopeStatusSnapshot,e as readHistoryMetaSnapshot};
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
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVZHG372Qcjs = require('../chunk-VZHG372Q.cjs');require('../chunk-D7JQWF6V.cjs');require('../chunk-T2JRSWQU.cjs');exports.bitBus = _chunkVZHG372Qcjs.a; exports.createBitBus = _chunkVZHG372Qcjs.b; exports.createBitStore = _chunkVZHG372Qcjs.e; exports.createFrameworkStoreAdapter = _chunkVZHG372Qcjs.d; exports.extractFeatureSlice = _chunkVZHG372Qcjs.i; exports.extractObserveSlice = _chunkVZHG372Qcjs.g; exports.extractReadSlice = _chunkVZHG372Qcjs.f; exports.extractSlices = _chunkVZHG372Qcjs.j; exports.extractWriteSlice = _chunkVZHG372Qcjs.h; exports.resolveBitStoreForHooks = _chunkVZHG372Qcjs.c;
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
@@ -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"}
@@ -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-D-ZHxzRy.cjs';
3
- export { B as BitEqualityFn, a as BitFrameworkConfig, b as BitFrameworkStoreApi, c as BitSelector, d as BitSelectorSubscriptionOptions } from '../store-api-types-D-ZHxzRy.cjs';
4
- export { B as BitFormMeta, a as BitHistoryMetadata, b as BitValidationOptions } from '../meta-types-Bzmm21TP.cjs';
5
- export { B as BitAfterSubmitEvent, a as BitAfterValidateEvent, b as BitArrayItem, c as BitArrayPath, d as BitBeforeSubmitEvent, e as BitBeforeValidateEvent, f as BitBus, g as BitBusListener, h as BitBusStorePort, i as BitComputedFn, j as BitConfig, k as BitErrors, l as BitFieldChangeEvent, m as BitFieldChangeMeta, n as BitFieldConditional, o as BitFieldDefinition, p as BitFieldState, q as BitFieldValidation, r as BitFormGlobal, s as BitHistoryConfig, t as BitNormalizeFn, u as BitPath, v as BitPathValue, w as BitPersistConfig, x as BitPersistMetadata, y as BitPersistMode, z as BitPersistStorageAdapter, A as BitPlugin, C as BitPluginContext, D as BitPluginErrorEvent, E as BitPluginHooks, F as BitScheduler, G as BitState, H as BitSubmitResult, I as BitTouched, J as BitTransformFn, K as BitValidationConfig, L as DeepPartial, M as DevToolsOptions, S as ScopeStatus, V as ValidateScopeResult, N as ValidatorFn } from '../types-D6LhF5GC.cjs';
6
- export { b as bitBus, c as createBitBus } from '../bus-ZLQeq4Vr.cjs';
7
- import '../types-D8DgIUhJ.cjs';
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.
@@ -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-DPi30jQF.js';
3
- export { B as BitEqualityFn, a as BitFrameworkConfig, b as BitFrameworkStoreApi, c as BitSelector, d as BitSelectorSubscriptionOptions } from '../store-api-types-DPi30jQF.js';
4
- export { B as BitFormMeta, a as BitHistoryMetadata, b as BitValidationOptions } from '../meta-types-Bzmm21TP.js';
5
- export { B as BitAfterSubmitEvent, a as BitAfterValidateEvent, b as BitArrayItem, c as BitArrayPath, d as BitBeforeSubmitEvent, e as BitBeforeValidateEvent, f as BitBus, g as BitBusListener, h as BitBusStorePort, i as BitComputedFn, j as BitConfig, k as BitErrors, l as BitFieldChangeEvent, m as BitFieldChangeMeta, n as BitFieldConditional, o as BitFieldDefinition, p as BitFieldState, q as BitFieldValidation, r as BitFormGlobal, s as BitHistoryConfig, t as BitNormalizeFn, u as BitPath, v as BitPathValue, w as BitPersistConfig, x as BitPersistMetadata, y as BitPersistMode, z as BitPersistStorageAdapter, A as BitPlugin, C as BitPluginContext, D as BitPluginErrorEvent, E as BitPluginHooks, F as BitScheduler, G as BitState, H as BitSubmitResult, I as BitTouched, J as BitTransformFn, K as BitValidationConfig, L as DeepPartial, M as DevToolsOptions, S as ScopeStatus, V as ValidateScopeResult, N as ValidatorFn } from '../types-CG5nYeRk.js';
6
- export { b as bitBus, c as createBitBus } from '../bus-B2VEKrPI.js';
7
- import '../types-D8DgIUhJ.js';
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.
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g,h,i,j}from"../chunk-UQ3DSUWC.js";import"../chunk-EQ55DKX2.js";import"../chunk-RD73EBSN.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};
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