@lehnihon/bit-form 2.2.6 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -24
- package/dist/angular/index.cjs +1 -1
- package/dist/angular/index.cjs.map +1 -1
- package/dist/angular/index.d.cts +20 -20
- package/dist/angular/index.d.ts +20 -20
- package/dist/angular/index.js +1 -1
- package/dist/angular/index.js.map +1 -1
- package/dist/array-controller-B5bfXV1W.d.cts +23 -0
- package/dist/array-controller-Cx-DMH7Y.d.ts +23 -0
- package/dist/bus-B2VEKrPI.d.ts +19 -0
- package/dist/bus-ZLQeq4Vr.d.cts +19 -0
- package/dist/chunk-5NA2TFPG.js +1 -0
- package/dist/chunk-5NA2TFPG.js.map +1 -0
- package/dist/chunk-63OJBMKK.js +2 -0
- package/dist/chunk-63OJBMKK.js.map +1 -0
- package/dist/chunk-BSGJ3T5S.cjs +2 -0
- package/dist/chunk-BSGJ3T5S.cjs.map +1 -0
- package/dist/chunk-CPP7ELA5.js +2 -0
- package/dist/chunk-CPP7ELA5.js.map +1 -0
- package/dist/chunk-D7JQWF6V.cjs +2 -0
- package/dist/chunk-D7JQWF6V.cjs.map +1 -0
- package/dist/chunk-E2NZR44P.js +2 -0
- package/dist/chunk-E2NZR44P.js.map +1 -0
- package/dist/chunk-EQ55DKX2.js +2 -0
- package/dist/chunk-EQ55DKX2.js.map +1 -0
- package/dist/chunk-IV32WXCF.cjs +2 -0
- package/dist/chunk-IV32WXCF.cjs.map +1 -0
- package/dist/chunk-JC4R5WCC.js +2 -0
- package/dist/chunk-JC4R5WCC.js.map +1 -0
- package/dist/chunk-K5X37E3U.js +2 -0
- package/dist/chunk-K5X37E3U.js.map +1 -0
- package/dist/chunk-M6WBNHIT.cjs +2 -0
- package/dist/chunk-M6WBNHIT.cjs.map +1 -0
- package/dist/chunk-MFSQATNZ.cjs +2 -0
- package/dist/chunk-MFSQATNZ.cjs.map +1 -0
- package/dist/chunk-MFTWAFMG.cjs +2 -0
- package/dist/chunk-MFTWAFMG.cjs.map +1 -0
- package/dist/chunk-O5UPA33R.js +2 -0
- package/dist/chunk-O5UPA33R.js.map +1 -0
- package/dist/chunk-P2YWYBWG.cjs +2 -0
- package/dist/chunk-P2YWYBWG.cjs.map +1 -0
- package/dist/chunk-QKGTVKBU.cjs +2 -0
- package/dist/chunk-QKGTVKBU.cjs.map +1 -0
- package/dist/chunk-RD73EBSN.js +2 -0
- package/dist/chunk-RD73EBSN.js.map +1 -0
- package/dist/chunk-T2JRSWQU.cjs +2 -0
- package/dist/chunk-T2JRSWQU.cjs.map +1 -0
- package/dist/chunk-UQ3DSUWC.js +2 -0
- package/dist/chunk-UQ3DSUWC.js.map +1 -0
- package/dist/chunk-VZHG372Q.cjs +2 -0
- package/dist/chunk-VZHG372Q.cjs.map +1 -0
- package/dist/chunk-W2E5UIXT.js +2 -0
- package/dist/chunk-W2E5UIXT.js.map +1 -0
- package/dist/chunk-W5CLDRRE.cjs +1 -0
- package/dist/chunk-W5CLDRRE.cjs.map +1 -0
- package/dist/cli/index.cjs +22 -22
- package/dist/core/bindings.cjs +2 -0
- package/dist/core/bindings.cjs.map +1 -0
- package/dist/core/bindings.d.cts +81 -0
- package/dist/core/bindings.d.ts +81 -0
- package/dist/core/bindings.js +2 -0
- package/dist/core/bindings.js.map +1 -0
- package/dist/core/status.cjs +2 -0
- package/dist/core/status.cjs.map +1 -0
- package/dist/core/status.d.cts +44 -0
- package/dist/core/status.d.ts +44 -0
- package/dist/core/status.js +2 -0
- package/dist/core/status.js.map +1 -0
- package/dist/core/store.cjs +2 -0
- package/dist/core/store.cjs.map +1 -0
- package/dist/core/store.d.cts +84 -0
- package/dist/core/store.d.ts +84 -0
- package/dist/core/store.js +2 -0
- package/dist/core/store.js.map +1 -0
- package/dist/core/utils.cjs +2 -0
- package/dist/core/utils.cjs.map +1 -0
- package/dist/core/utils.d.cts +81 -0
- package/dist/core/utils.d.ts +81 -0
- package/dist/core/utils.js +2 -0
- package/dist/core/utils.js.map +1 -0
- package/dist/core.cjs +2 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.d.cts +14 -0
- package/dist/core.d.ts +14 -0
- package/dist/core.js +2 -0
- package/dist/core.js.map +1 -0
- package/dist/devtools/bridge.cjs +1 -1
- package/dist/devtools/bridge.cjs.map +1 -1
- package/dist/devtools/bridge.d.cts +5 -1
- package/dist/devtools/bridge.d.ts +5 -1
- package/dist/devtools/bridge.js +1 -1
- package/dist/devtools/bridge.js.map +1 -1
- package/dist/devtools/index.cjs +18 -18
- package/dist/devtools/index.cjs.map +1 -1
- package/dist/devtools/index.d.cts +27 -2
- package/dist/devtools/index.d.ts +27 -2
- package/dist/devtools/index.js +18 -18
- package/dist/devtools/index.js.map +1 -1
- package/dist/devtools/protocol.cjs +2 -0
- package/dist/devtools/protocol.cjs.map +1 -0
- package/dist/devtools/protocol.d.cts +54 -0
- package/dist/devtools/protocol.d.ts +54 -0
- package/dist/devtools/protocol.js +2 -0
- package/dist/devtools/protocol.js.map +1 -0
- package/dist/field-binding-B_OX3bjp.d.cts +25 -0
- package/dist/field-binding-MX6jVQbT.d.ts +25 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -193
- package/dist/index.d.ts +9 -193
- package/dist/index.js +1 -1
- package/dist/meta-types-Bzmm21TP.d.cts +18 -0
- package/dist/meta-types-Bzmm21TP.d.ts +18 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +10 -7
- package/dist/react/index.d.ts +10 -7
- 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 +8 -5
- package/dist/react-native/index.d.ts +8 -5
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/resolvers/index.cjs +1 -1
- package/dist/resolvers/index.cjs.map +1 -1
- package/dist/resolvers/index.d.cts +2 -1
- package/dist/resolvers/index.d.ts +2 -1
- package/dist/resolvers/index.js +1 -1
- package/dist/resolvers/joi.d.cts +2 -1
- package/dist/resolvers/joi.d.ts +2 -1
- package/dist/resolvers/yup.d.cts +2 -1
- package/dist/resolvers/yup.d.ts +2 -1
- package/dist/resolvers/zod.d.cts +2 -1
- package/dist/resolvers/zod.d.ts +2 -1
- package/dist/store-api-types-D-ZHxzRy.d.cts +161 -0
- package/dist/store-api-types-DPi30jQF.d.ts +161 -0
- package/dist/{bus-B4zZmB9C.d.ts → types-CG5nYeRk.d.ts} +140 -41
- package/dist/{bus-BeAeZwWu.d.cts → types-D6LhF5GC.d.cts} +140 -41
- package/dist/{upload-EXnJLq8k.d.cts → upload-C2mpfhp1.d.cts} +1 -1
- package/dist/{upload-EXnJLq8k.d.ts → upload-C2mpfhp1.d.ts} +1 -1
- package/dist/{use-bit-persist-Dk3fUrds.d.ts → use-bit-persist-BTwy8kvA.d.ts} +14 -14
- package/dist/{use-bit-persist-D_gimC9A.d.cts → use-bit-persist-C2LHNTVv.d.cts} +14 -14
- package/dist/utils.cjs +2 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +6 -0
- package/dist/utils.d.ts +6 -0
- package/dist/utils.js +2 -0
- package/dist/utils.js.map +1 -0
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.d.cts +17 -18
- package/dist/vue/index.d.ts +17 -18
- package/dist/vue/index.js +1 -1
- package/dist/vue/index.js.map +1 -1
- package/package.json +48 -17
- package/dist/chunk-2CVKNPWX.js +0 -2
- package/dist/chunk-2CVKNPWX.js.map +0 -1
- package/dist/chunk-3EDD3V43.cjs +0 -2
- package/dist/chunk-3EDD3V43.cjs.map +0 -1
- package/dist/chunk-PX6WKENM.js +0 -2
- package/dist/chunk-PX6WKENM.js.map +0 -1
- package/dist/chunk-QWH2NBVB.js +0 -2
- package/dist/chunk-QWH2NBVB.js.map +0 -1
- package/dist/chunk-T3FR7D5V.js +0 -2
- package/dist/chunk-T3FR7D5V.js.map +0 -1
- package/dist/chunk-VQ7MK5VB.cjs +0 -2
- package/dist/chunk-VQ7MK5VB.cjs.map +0 -1
- package/dist/chunk-Y2ONHDRE.cjs +0 -2
- package/dist/chunk-Y2ONHDRE.cjs.map +0 -1
- package/dist/chunk-YCSWULEN.cjs +0 -2
- package/dist/chunk-YCSWULEN.cjs.map +0 -1
- package/dist/field-binding-BXw0Ku2c.d.cts +0 -12
- package/dist/field-binding-BXw0Ku2c.d.ts +0 -12
- package/dist/public-types-Cd9ai20P.d.cts +0 -97
- package/dist/public-types-DdZxD6Op.d.ts +0 -97
|
@@ -0,0 +1,44 @@
|
|
|
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';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Subconjunto relevante de BitHistoryMetadata para comparação de igualdade.
|
|
8
|
+
* Evita re-renders/updates desnecessários quando o estado de histórico não muda.
|
|
9
|
+
*/
|
|
10
|
+
type HistoryMeta = Pick<BitHistoryMetadata, "canUndo" | "canRedo" | "historyIndex" | "historySize">;
|
|
11
|
+
/**
|
|
12
|
+
* Compara dois snapshots de metadata de histórico por valor.
|
|
13
|
+
* Retorna `true` quando todos os campos relevantes são idênticos,
|
|
14
|
+
* permitindo que os bindings de framework ignorem atualizações não relacionadas.
|
|
15
|
+
*/
|
|
16
|
+
declare function isHistoryMetaEqual(a: HistoryMeta, b: HistoryMeta): boolean;
|
|
17
|
+
declare function readHistoryMetaSnapshot<T extends object>(store: {
|
|
18
|
+
read: {
|
|
19
|
+
getHistoryMetadata(): BitHistoryMetadata;
|
|
20
|
+
};
|
|
21
|
+
}): HistoryMeta;
|
|
22
|
+
declare function observeHistoryMetaSnapshot<T extends object>(store: {
|
|
23
|
+
read: {
|
|
24
|
+
getHistoryMetadata(): BitHistoryMetadata;
|
|
25
|
+
};
|
|
26
|
+
observe: {
|
|
27
|
+
subscribeHistoryMeta(listener: (meta: BitHistoryMetadata) => void): () => void;
|
|
28
|
+
};
|
|
29
|
+
}, listener: (meta: HistoryMeta) => void): () => void;
|
|
30
|
+
|
|
31
|
+
declare function areScopeErrorsEqual(currentErrors: Record<string, string>, nextErrors: Record<string, string>): boolean;
|
|
32
|
+
declare function isScopeStatusEqual(currentStatus: ScopeStatus, nextStatus: ScopeStatus): boolean;
|
|
33
|
+
declare function getScopeSubscriptionPaths(scopeFields: readonly string[]): string[];
|
|
34
|
+
|
|
35
|
+
declare function observeScopeStatusSnapshot(store: {
|
|
36
|
+
read: {
|
|
37
|
+
getScopeStatus(scopeName: string): ScopeStatus;
|
|
38
|
+
};
|
|
39
|
+
observe: {
|
|
40
|
+
subscribeScopeStatus(scopeName: string, listener: (status: ScopeStatus) => void): () => void;
|
|
41
|
+
};
|
|
42
|
+
}, scopeName: string, listener: (status: ScopeStatus) => void): () => void;
|
|
43
|
+
|
|
44
|
+
export { type HistoryMeta, ScopeStatus, areScopeErrorsEqual, getScopeSubscriptionPaths, isHistoryMetaEqual, isScopeStatusEqual, observeHistoryMetaSnapshot, observeScopeStatusSnapshot, readHistoryMetaSnapshot };
|
|
@@ -0,0 +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};
|
|
2
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +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;
|
|
2
|
+
//# sourceMappingURL=store.cjs.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,84 @@
|
|
|
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';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Extracts the `read` slice from a BitStore instance.
|
|
11
|
+
*
|
|
12
|
+
* Use this to pass a read-only API to utility functions and services.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* function useFormValidation(read: BitStoreReadSliceApi<MyForm>) {
|
|
17
|
+
* const isValid = read.getIsValid();
|
|
18
|
+
* // ...
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* useFormValidation(extractReadSlice(store));
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare function extractReadSlice<T extends object>(store: BitStoreApi<T>): BitStoreReadSliceApi<T>;
|
|
25
|
+
/**
|
|
26
|
+
* Extracts the `observe` slice from a BitStore instance.
|
|
27
|
+
*
|
|
28
|
+
* Use this to pass an observation-only API to framework hooks and subscriptions.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* function useFormSubscribe(observe: BitStoreObserveSliceApi<MyForm>) {
|
|
33
|
+
* useEffect(() => observe.subscribe(handler), [observe]);
|
|
34
|
+
* }
|
|
35
|
+
*
|
|
36
|
+
* useFormSubscribe(extractObserveSlice(store));
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
declare function extractObserveSlice<T extends object>(store: BitStoreApi<T>): BitStoreObserveSliceApi<T>;
|
|
40
|
+
/**
|
|
41
|
+
* Extracts the `write` slice from a BitStore instance.
|
|
42
|
+
*
|
|
43
|
+
* Use this to pass a write-only API for form mutations.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
* function useFormActions(write: BitStoreWriteSliceApi<MyForm>) {
|
|
48
|
+
* const handleChange = (path: string, value: any) => {
|
|
49
|
+
* write.setField(path, value);
|
|
50
|
+
* };
|
|
51
|
+
* }
|
|
52
|
+
*
|
|
53
|
+
* useFormActions(extractWriteSlice(store));
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare function extractWriteSlice<T extends object>(store: BitStoreApi<T>): BitStoreWriteSliceApi<T>;
|
|
57
|
+
/**
|
|
58
|
+
* Extracts the `feature` slice from a BitStore instance.
|
|
59
|
+
*
|
|
60
|
+
* Use this to pass feature-specific APIs (validation, history, persistence, etc.)
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* function useFormValidation(feature: BitStoreFeatureApi<MyForm>) {
|
|
65
|
+
* const isValid = await feature.validate();
|
|
66
|
+
* }
|
|
67
|
+
*
|
|
68
|
+
* useFormValidation(extractFeatureSlice(store));
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
declare function extractFeatureSlice<T extends object>(store: BitStoreApi<T>): BitStoreFeatureApi<T>;
|
|
72
|
+
/**
|
|
73
|
+
* Extracts multiple slices at once for convenience.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* const [readApi, writeApi] = extractSlices(store, ["read", "write"]);
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
declare function extractSlices<T extends object, K extends (keyof BitStoreApi<T>)[]>(store: BitStoreApi<T>, keys: readonly [...K]): {
|
|
81
|
+
[P in K[number]]: BitStoreApi<T>[P];
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export { BitStoreApi, extractFeatureSlice, extractObserveSlice, extractReadSlice, extractSlices, extractWriteSlice };
|
|
@@ -0,0 +1,84 @@
|
|
|
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';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Extracts the `read` slice from a BitStore instance.
|
|
11
|
+
*
|
|
12
|
+
* Use this to pass a read-only API to utility functions and services.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* function useFormValidation(read: BitStoreReadSliceApi<MyForm>) {
|
|
17
|
+
* const isValid = read.getIsValid();
|
|
18
|
+
* // ...
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* useFormValidation(extractReadSlice(store));
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare function extractReadSlice<T extends object>(store: BitStoreApi<T>): BitStoreReadSliceApi<T>;
|
|
25
|
+
/**
|
|
26
|
+
* Extracts the `observe` slice from a BitStore instance.
|
|
27
|
+
*
|
|
28
|
+
* Use this to pass an observation-only API to framework hooks and subscriptions.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* function useFormSubscribe(observe: BitStoreObserveSliceApi<MyForm>) {
|
|
33
|
+
* useEffect(() => observe.subscribe(handler), [observe]);
|
|
34
|
+
* }
|
|
35
|
+
*
|
|
36
|
+
* useFormSubscribe(extractObserveSlice(store));
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
declare function extractObserveSlice<T extends object>(store: BitStoreApi<T>): BitStoreObserveSliceApi<T>;
|
|
40
|
+
/**
|
|
41
|
+
* Extracts the `write` slice from a BitStore instance.
|
|
42
|
+
*
|
|
43
|
+
* Use this to pass a write-only API for form mutations.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
* function useFormActions(write: BitStoreWriteSliceApi<MyForm>) {
|
|
48
|
+
* const handleChange = (path: string, value: any) => {
|
|
49
|
+
* write.setField(path, value);
|
|
50
|
+
* };
|
|
51
|
+
* }
|
|
52
|
+
*
|
|
53
|
+
* useFormActions(extractWriteSlice(store));
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare function extractWriteSlice<T extends object>(store: BitStoreApi<T>): BitStoreWriteSliceApi<T>;
|
|
57
|
+
/**
|
|
58
|
+
* Extracts the `feature` slice from a BitStore instance.
|
|
59
|
+
*
|
|
60
|
+
* Use this to pass feature-specific APIs (validation, history, persistence, etc.)
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* function useFormValidation(feature: BitStoreFeatureApi<MyForm>) {
|
|
65
|
+
* const isValid = await feature.validate();
|
|
66
|
+
* }
|
|
67
|
+
*
|
|
68
|
+
* useFormValidation(extractFeatureSlice(store));
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
declare function extractFeatureSlice<T extends object>(store: BitStoreApi<T>): BitStoreFeatureApi<T>;
|
|
72
|
+
/**
|
|
73
|
+
* Extracts multiple slices at once for convenience.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* const [readApi, writeApi] = extractSlices(store, ["read", "write"]);
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
declare function extractSlices<T extends object, K extends (keyof BitStoreApi<T>)[]>(store: BitStoreApi<T>, keys: readonly [...K]): {
|
|
81
|
+
[P in K[number]]: BitStoreApi<T>[P];
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export { BitStoreApi, extractFeatureSlice, extractObserveSlice, extractReadSlice, extractSlices, extractWriteSlice };
|
|
@@ -0,0 +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};
|
|
2
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkM6WBNHITcjs = require('../chunk-M6WBNHIT.cjs');var _chunkT2JRSWQUcjs = require('../chunk-T2JRSWQU.cjs');exports.areFieldSnapshotsEqual = _chunkM6WBNHITcjs.b; exports.cleanPrefixedKeys = _chunkT2JRSWQUcjs.j; exports.createFieldStateSnapshot = _chunkM6WBNHITcjs.a; exports.deepClone = _chunkT2JRSWQUcjs.a; exports.deepEqual = _chunkT2JRSWQUcjs.d; exports.deepMerge = _chunkT2JRSWQUcjs.b; exports.deriveFieldMeta = _chunkM6WBNHITcjs.c; exports.extractServerErrors = _chunkT2JRSWQUcjs.m; exports.getDeepValue = _chunkT2JRSWQUcjs.f; exports.isValidationErrorShape = _chunkT2JRSWQUcjs.l; exports.setDeepValue = _chunkT2JRSWQUcjs.g; exports.valueEqual = _chunkT2JRSWQUcjs.c;
|
|
2
|
+
//# sourceMappingURL=utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/bit-form/bit-form/dist/core/utils.cjs"],"names":[],"mappings":"AAAA,kIAAuD,yDAA8E,mjBAAoQ","file":"/home/runner/work/bit-form/bit-form/dist/core/utils.cjs"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export { cleanPrefixedKeys, extractServerErrors, isValidationErrorShape } from '../utils.cjs';
|
|
2
|
+
import { p as BitFieldState } from '../types-D6LhF5GC.cjs';
|
|
3
|
+
import '../types-D8DgIUhJ.cjs';
|
|
4
|
+
|
|
5
|
+
declare function deepClone<T>(obj: T): T;
|
|
6
|
+
declare function deepMerge<T>(target: T, source: any): T;
|
|
7
|
+
declare function valueEqual(a: any, b: any): boolean;
|
|
8
|
+
declare function deepEqual(a: any, b: any): boolean;
|
|
9
|
+
|
|
10
|
+
declare function getDeepValue(obj: any, path: string): any;
|
|
11
|
+
declare function setDeepValue(obj: any, path: string, value: any): any;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Field State Snapshot Utilities
|
|
15
|
+
*
|
|
16
|
+
* Shared utilities for creating and managing field state snapshots across frameworks
|
|
17
|
+
* (React, Vue, Angular). Reduces code duplication while maintaining type safety.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Represents a stable snapshot of field state that can be compared for equality.
|
|
21
|
+
*/
|
|
22
|
+
interface BitFieldSnapshot<TValue = any> {
|
|
23
|
+
value: TValue;
|
|
24
|
+
error: string | undefined;
|
|
25
|
+
touched: boolean;
|
|
26
|
+
isHidden: boolean;
|
|
27
|
+
isRequired: boolean;
|
|
28
|
+
isDirty: boolean;
|
|
29
|
+
isValidating: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates or reuses a field state snapshot with shallow equality checking.
|
|
33
|
+
*
|
|
34
|
+
* This function prevents unnecessary re-renders in frameworks like React by
|
|
35
|
+
* returning the same object reference when field state hasn't changed.
|
|
36
|
+
*
|
|
37
|
+
* @param nextState - The new field state from the store
|
|
38
|
+
* @param lastSnapshot - The previous snapshot (can be null on first call)
|
|
39
|
+
* @returns A stable snapshot object that can be used for equality comparison
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const snapshot = createFieldStateSnapshot(store.getFieldState("email"), lastSnapshot);
|
|
44
|
+
* if (snapshot !== lastSnapshot) {
|
|
45
|
+
* // Field state changed, update component
|
|
46
|
+
* render(snapshot);
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare function createFieldStateSnapshot<TValue = any>(nextState: {
|
|
51
|
+
value: TValue;
|
|
52
|
+
error: string | undefined;
|
|
53
|
+
touched: boolean;
|
|
54
|
+
isHidden: boolean;
|
|
55
|
+
isRequired: boolean;
|
|
56
|
+
isDirty: boolean;
|
|
57
|
+
isValidating: boolean;
|
|
58
|
+
}, lastSnapshot: BitFieldSnapshot<TValue> | null): BitFieldSnapshot<TValue>;
|
|
59
|
+
/**
|
|
60
|
+
* Deep comparison utility for field state snapshots.
|
|
61
|
+
* Useful for scenarios where shallow comparison isn't sufficient (e.g., object/array values).
|
|
62
|
+
*
|
|
63
|
+
* @param snapshotA - First snapshot
|
|
64
|
+
* @param snapshotB - Second snapshot
|
|
65
|
+
* @returns true if snapshots are deeply equal
|
|
66
|
+
*/
|
|
67
|
+
declare function areFieldSnapshotsEqual(snapshotA: BitFieldSnapshot | null | undefined, snapshotB: BitFieldSnapshot | null | undefined): boolean;
|
|
68
|
+
|
|
69
|
+
interface BitDerivedFieldMeta {
|
|
70
|
+
error: string | undefined;
|
|
71
|
+
touched: boolean;
|
|
72
|
+
invalid: boolean;
|
|
73
|
+
isValidating: boolean;
|
|
74
|
+
isDirty: boolean;
|
|
75
|
+
isHidden: boolean;
|
|
76
|
+
isRequired: boolean;
|
|
77
|
+
hasError: boolean;
|
|
78
|
+
}
|
|
79
|
+
declare function deriveFieldMeta<T extends object, TValue>(state: Readonly<BitFieldState<T, TValue>>): BitDerivedFieldMeta;
|
|
80
|
+
|
|
81
|
+
export { type BitDerivedFieldMeta, type BitFieldSnapshot, areFieldSnapshotsEqual, createFieldStateSnapshot, deepClone, deepEqual, deepMerge, deriveFieldMeta, getDeepValue, setDeepValue, valueEqual };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export { cleanPrefixedKeys, extractServerErrors, isValidationErrorShape } from '../utils.js';
|
|
2
|
+
import { p as BitFieldState } from '../types-CG5nYeRk.js';
|
|
3
|
+
import '../types-D8DgIUhJ.js';
|
|
4
|
+
|
|
5
|
+
declare function deepClone<T>(obj: T): T;
|
|
6
|
+
declare function deepMerge<T>(target: T, source: any): T;
|
|
7
|
+
declare function valueEqual(a: any, b: any): boolean;
|
|
8
|
+
declare function deepEqual(a: any, b: any): boolean;
|
|
9
|
+
|
|
10
|
+
declare function getDeepValue(obj: any, path: string): any;
|
|
11
|
+
declare function setDeepValue(obj: any, path: string, value: any): any;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Field State Snapshot Utilities
|
|
15
|
+
*
|
|
16
|
+
* Shared utilities for creating and managing field state snapshots across frameworks
|
|
17
|
+
* (React, Vue, Angular). Reduces code duplication while maintaining type safety.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Represents a stable snapshot of field state that can be compared for equality.
|
|
21
|
+
*/
|
|
22
|
+
interface BitFieldSnapshot<TValue = any> {
|
|
23
|
+
value: TValue;
|
|
24
|
+
error: string | undefined;
|
|
25
|
+
touched: boolean;
|
|
26
|
+
isHidden: boolean;
|
|
27
|
+
isRequired: boolean;
|
|
28
|
+
isDirty: boolean;
|
|
29
|
+
isValidating: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates or reuses a field state snapshot with shallow equality checking.
|
|
33
|
+
*
|
|
34
|
+
* This function prevents unnecessary re-renders in frameworks like React by
|
|
35
|
+
* returning the same object reference when field state hasn't changed.
|
|
36
|
+
*
|
|
37
|
+
* @param nextState - The new field state from the store
|
|
38
|
+
* @param lastSnapshot - The previous snapshot (can be null on first call)
|
|
39
|
+
* @returns A stable snapshot object that can be used for equality comparison
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const snapshot = createFieldStateSnapshot(store.getFieldState("email"), lastSnapshot);
|
|
44
|
+
* if (snapshot !== lastSnapshot) {
|
|
45
|
+
* // Field state changed, update component
|
|
46
|
+
* render(snapshot);
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare function createFieldStateSnapshot<TValue = any>(nextState: {
|
|
51
|
+
value: TValue;
|
|
52
|
+
error: string | undefined;
|
|
53
|
+
touched: boolean;
|
|
54
|
+
isHidden: boolean;
|
|
55
|
+
isRequired: boolean;
|
|
56
|
+
isDirty: boolean;
|
|
57
|
+
isValidating: boolean;
|
|
58
|
+
}, lastSnapshot: BitFieldSnapshot<TValue> | null): BitFieldSnapshot<TValue>;
|
|
59
|
+
/**
|
|
60
|
+
* Deep comparison utility for field state snapshots.
|
|
61
|
+
* Useful for scenarios where shallow comparison isn't sufficient (e.g., object/array values).
|
|
62
|
+
*
|
|
63
|
+
* @param snapshotA - First snapshot
|
|
64
|
+
* @param snapshotB - Second snapshot
|
|
65
|
+
* @returns true if snapshots are deeply equal
|
|
66
|
+
*/
|
|
67
|
+
declare function areFieldSnapshotsEqual(snapshotA: BitFieldSnapshot | null | undefined, snapshotB: BitFieldSnapshot | null | undefined): boolean;
|
|
68
|
+
|
|
69
|
+
interface BitDerivedFieldMeta {
|
|
70
|
+
error: string | undefined;
|
|
71
|
+
touched: boolean;
|
|
72
|
+
invalid: boolean;
|
|
73
|
+
isValidating: boolean;
|
|
74
|
+
isDirty: boolean;
|
|
75
|
+
isHidden: boolean;
|
|
76
|
+
isRequired: boolean;
|
|
77
|
+
hasError: boolean;
|
|
78
|
+
}
|
|
79
|
+
declare function deriveFieldMeta<T extends object, TValue>(state: Readonly<BitFieldState<T, TValue>>): BitDerivedFieldMeta;
|
|
80
|
+
|
|
81
|
+
export { type BitDerivedFieldMeta, type BitFieldSnapshot, areFieldSnapshotsEqual, createFieldStateSnapshot, deepClone, deepEqual, deepMerge, deriveFieldMeta, getDeepValue, setDeepValue, valueEqual };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as j,b as k,c as l}from"../chunk-63OJBMKK.js";import{a,b,c,d,f as e,g as f,j as g,l as h,m as i}from"../chunk-RD73EBSN.js";export{k as areFieldSnapshotsEqual,g as cleanPrefixedKeys,j as createFieldStateSnapshot,a as deepClone,d as deepEqual,b as deepMerge,l as deriveFieldMeta,i as extractServerErrors,e as getDeepValue,h as isValidationErrorShape,f as setDeepValue,c as valueEqual};
|
|
2
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/core.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-W5CLDRRE.cjs');var _chunkVZHG372Qcjs = require('./chunk-VZHG372Q.cjs');var _chunkMFTWAFMGcjs = require('./chunk-MFTWAFMG.cjs');var _chunkBSGJ3T5Scjs = require('./chunk-BSGJ3T5S.cjs');var _chunkD7JQWF6Vcjs = require('./chunk-D7JQWF6V.cjs');var _chunkM6WBNHITcjs = require('./chunk-M6WBNHIT.cjs');var _chunkT2JRSWQUcjs = require('./chunk-T2JRSWQU.cjs');var _chunkPFPGASVZcjs = require('./chunk-PFPGASVZ.cjs');exports.areFieldSnapshotsEqual = _chunkM6WBNHITcjs.b; exports.areScopeErrorsEqual = _chunkD7JQWF6Vcjs.a; exports.bitBus = _chunkVZHG372Qcjs.a; exports.cleanPrefixedKeys = _chunkT2JRSWQUcjs.j; exports.cleanupRegisteredField = _chunkMFTWAFMGcjs.j; exports.cleanupRegisteredPrefix = _chunkMFTWAFMGcjs.k; exports.createArrayBindingController = _chunkMFTWAFMGcjs.i; exports.createBitBus = _chunkVZHG372Qcjs.b; exports.createBitStore = _chunkVZHG372Qcjs.e; exports.createFieldStateSnapshot = _chunkM6WBNHITcjs.a; exports.createFrameworkFormBinding = _chunkMFTWAFMGcjs.g; exports.createFrameworkMaskedFieldBinding = _chunkMFTWAFMGcjs.h; exports.createFrameworkStoreAdapter = _chunkVZHG372Qcjs.d; exports.deepClone = _chunkT2JRSWQUcjs.a; exports.deepEqual = _chunkT2JRSWQUcjs.d; exports.deepMerge = _chunkT2JRSWQUcjs.b; exports.deriveFieldMeta = _chunkM6WBNHITcjs.c; exports.extractFeatureSlice = _chunkVZHG372Qcjs.i; exports.extractObserveSlice = _chunkVZHG372Qcjs.g; exports.extractReadSlice = _chunkVZHG372Qcjs.f; exports.extractServerErrors = _chunkT2JRSWQUcjs.m; exports.extractSlices = _chunkVZHG372Qcjs.j; exports.extractWriteSlice = _chunkVZHG372Qcjs.h; exports.formatMaskedValue = _chunkPFPGASVZcjs.b; exports.getDeepValue = _chunkT2JRSWQUcjs.f; exports.getScopeSubscriptionPaths = _chunkD7JQWF6Vcjs.c; exports.isBitFieldInputEventObject = _chunkPFPGASVZcjs.a; exports.isHistoryMetaEqual = _chunkD7JQWF6Vcjs.e; exports.isScopeStatusEqual = _chunkD7JQWF6Vcjs.b; exports.isValidationErrorShape = _chunkT2JRSWQUcjs.l; exports.observeFormMetaSnapshot = _chunkMFTWAFMGcjs.c; exports.observeHistoryMetaSnapshot = _chunkD7JQWF6Vcjs.g; exports.observePersistMetaSnapshot = _chunkMFTWAFMGcjs.f; exports.observeScopeStatusSnapshot = _chunkBSGJ3T5Scjs.a; exports.parseMaskedInput = _chunkPFPGASVZcjs.c; exports.readFormMetaSnapshot = _chunkMFTWAFMGcjs.a; exports.readHistoryMetaSnapshot = _chunkD7JQWF6Vcjs.f; exports.readPersistMetaSnapshot = _chunkMFTWAFMGcjs.d; exports.resolveBitStoreForHooks = _chunkVZHG372Qcjs.c; exports.setDeepValue = _chunkT2JRSWQUcjs.g; exports.subscribeFormMetaSnapshot = _chunkMFTWAFMGcjs.b; exports.subscribePersistMetaSnapshot = _chunkMFTWAFMGcjs.e; exports.valueEqual = _chunkT2JRSWQUcjs.c;
|
|
2
|
+
//# sourceMappingURL=core.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/bit-form/bit-form/dist/core.cjs"],"names":[],"mappings":"AAAA,yGAA4B,wDAAwG,wDAA+G,wDAAyC,wDAA4E,wDAAuD,wDAA6E,wDAAuD,oqEAA+kC","file":"/home/runner/work/bit-form/bit-form/dist/core.cjs"}
|
package/dist/core.d.cts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { createBitStore, createFrameworkStoreAdapter, resolveBitStoreForHooks } from './index.cjs';
|
|
2
|
+
export { extractFeatureSlice, extractObserveSlice, extractReadSlice, extractSlices, extractWriteSlice } from './core/store.cjs';
|
|
3
|
+
export { B as BitEqualityFn, a as BitFrameworkConfig, b as BitFrameworkStoreApi, c as BitSelector, d as BitSelectorSubscriptionOptions, e as BitStoreApi } from './store-api-types-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
|
+
export { cleanupRegisteredField, cleanupRegisteredPrefix, createFrameworkFormBinding, createFrameworkMaskedFieldBinding, observeFormMetaSnapshot, observePersistMetaSnapshot, readFormMetaSnapshot, readPersistMetaSnapshot, subscribeFormMetaSnapshot, subscribePersistMetaSnapshot } from './core/bindings.cjs';
|
|
8
|
+
export { B as BitArrayBindingController, a as BitArrayBindingField, c as createArrayBindingController } from './array-controller-B5bfXV1W.cjs';
|
|
9
|
+
export { B as BitFieldInputEvent, f as formatMaskedValue, i as isBitFieldInputEventObject, p as parseMaskedInput } from './field-binding-B_OX3bjp.cjs';
|
|
10
|
+
export { B as BitDeleteUploadFn, a as BitUploadFn, b as BitUploadResult } from './upload-C2mpfhp1.cjs';
|
|
11
|
+
export { HistoryMeta, areScopeErrorsEqual, getScopeSubscriptionPaths, isHistoryMetaEqual, isScopeStatusEqual, observeHistoryMetaSnapshot, observeScopeStatusSnapshot, readHistoryMetaSnapshot } from './core/status.cjs';
|
|
12
|
+
export { BitDerivedFieldMeta, BitFieldSnapshot, areFieldSnapshotsEqual, createFieldStateSnapshot, deepClone, deepEqual, deepMerge, deriveFieldMeta, getDeepValue, setDeepValue, valueEqual } from './core/utils.cjs';
|
|
13
|
+
export { cleanPrefixedKeys, extractServerErrors, isValidationErrorShape } from './utils.cjs';
|
|
14
|
+
import './types-D8DgIUhJ.cjs';
|
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { createBitStore, createFrameworkStoreAdapter, resolveBitStoreForHooks } from './index.js';
|
|
2
|
+
export { extractFeatureSlice, extractObserveSlice, extractReadSlice, extractSlices, extractWriteSlice } from './core/store.js';
|
|
3
|
+
export { B as BitEqualityFn, a as BitFrameworkConfig, b as BitFrameworkStoreApi, c as BitSelector, d as BitSelectorSubscriptionOptions, e as BitStoreApi } 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
|
+
export { cleanupRegisteredField, cleanupRegisteredPrefix, createFrameworkFormBinding, createFrameworkMaskedFieldBinding, observeFormMetaSnapshot, observePersistMetaSnapshot, readFormMetaSnapshot, readPersistMetaSnapshot, subscribeFormMetaSnapshot, subscribePersistMetaSnapshot } from './core/bindings.js';
|
|
8
|
+
export { B as BitArrayBindingController, a as BitArrayBindingField, c as createArrayBindingController } from './array-controller-Cx-DMH7Y.js';
|
|
9
|
+
export { B as BitFieldInputEvent, f as formatMaskedValue, i as isBitFieldInputEventObject, p as parseMaskedInput } from './field-binding-MX6jVQbT.js';
|
|
10
|
+
export { B as BitDeleteUploadFn, a as BitUploadFn, b as BitUploadResult } from './upload-C2mpfhp1.js';
|
|
11
|
+
export { HistoryMeta, areScopeErrorsEqual, getScopeSubscriptionPaths, isHistoryMetaEqual, isScopeStatusEqual, observeHistoryMetaSnapshot, observeScopeStatusSnapshot, readHistoryMetaSnapshot } from './core/status.js';
|
|
12
|
+
export { BitDerivedFieldMeta, BitFieldSnapshot, areFieldSnapshotsEqual, createFieldStateSnapshot, deepClone, deepEqual, deepMerge, deriveFieldMeta, getDeepValue, setDeepValue, valueEqual } from './core/utils.js';
|
|
13
|
+
export { cleanPrefixedKeys, extractServerErrors, isValidationErrorShape } from './utils.js';
|
|
14
|
+
import './types-D8DgIUhJ.js';
|
package/dist/core.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./chunk-5NA2TFPG.js";import{a as j,b as k,c as r,d as s,e as t,f as u,g as v,h as w,i as x,j as y}from"./chunk-UQ3DSUWC.js";import{a as z,b as A,c as B,d as C,e as D,f as E,g as F,h as J,i as K,j as L,k as M}from"./chunk-E2NZR44P.js";import{a as N}from"./chunk-W2E5UIXT.js";import{a as l,b as m,c as n,e as o,f as p,g as q}from"./chunk-EQ55DKX2.js";import{a as O,b as P,c as Q}from"./chunk-63OJBMKK.js";import{a,b,c,d,f as e,g as f,j as g,l as h,m as i}from"./chunk-RD73EBSN.js";import{a as G,b as H,c as I}from"./chunk-3NUJVIAM.js";export{P as areFieldSnapshotsEqual,l as areScopeErrorsEqual,j as bitBus,g as cleanPrefixedKeys,L as cleanupRegisteredField,M as cleanupRegisteredPrefix,K as createArrayBindingController,k as createBitBus,t as createBitStore,O as createFieldStateSnapshot,F as createFrameworkFormBinding,J as createFrameworkMaskedFieldBinding,s as createFrameworkStoreAdapter,a as deepClone,d as deepEqual,b as deepMerge,Q as deriveFieldMeta,x as extractFeatureSlice,v as extractObserveSlice,u as extractReadSlice,i as extractServerErrors,y as extractSlices,w as extractWriteSlice,H as formatMaskedValue,e as getDeepValue,n as getScopeSubscriptionPaths,G as isBitFieldInputEventObject,o as isHistoryMetaEqual,m as isScopeStatusEqual,h as isValidationErrorShape,B as observeFormMetaSnapshot,q as observeHistoryMetaSnapshot,E as observePersistMetaSnapshot,N as observeScopeStatusSnapshot,I as parseMaskedInput,z as readFormMetaSnapshot,p as readHistoryMetaSnapshot,C as readPersistMetaSnapshot,r as resolveBitStoreForHooks,f as setDeepValue,A as subscribeFormMetaSnapshot,D as subscribePersistMetaSnapshot,c as valueEqual};
|
|
2
|
+
//# sourceMappingURL=core.js.map
|
package/dist/core.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/devtools/bridge.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkP2YWYBWGcjs = require('../chunk-P2YWYBWG.cjs');require('../chunk-QKGTVKBU.cjs');require('../chunk-W5CLDRRE.cjs');require('../chunk-VZHG372Q.cjs');require('../chunk-MFTWAFMG.cjs');require('../chunk-BSGJ3T5S.cjs');require('../chunk-D7JQWF6V.cjs');require('../chunk-M6WBNHIT.cjs');require('../chunk-T2JRSWQU.cjs');require('../chunk-PFPGASVZ.cjs');exports.setupRemoteBridge = _chunkP2YWYBWGcjs.c;
|
|
2
2
|
//# sourceMappingURL=bridge.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/bit-form/bit-form/dist/devtools/bridge.cjs"
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/bit-form/bit-form/dist/devtools/bridge.cjs"],"names":[],"mappings":"AAAA,kIAAyC,iCAA8B,iCAA8B,iCAA8B,iCAA8B,iCAA8B,iCAA8B,iCAA8B,iCAA8B,iCAA8B,gDAA+B","file":"/home/runner/work/bit-form/bit-form/dist/devtools/bridge.cjs"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { f as BitBus } from '../types-D6LhF5GC.cjs';
|
|
2
|
+
import '../bus-ZLQeq4Vr.cjs';
|
|
3
|
+
import '../types-D8DgIUhJ.cjs';
|
|
4
|
+
|
|
5
|
+
declare function setupRemoteBridge(url: string, bus?: BitBus): () => void;
|
|
2
6
|
|
|
3
7
|
export { setupRemoteBridge };
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { f as BitBus } from '../types-CG5nYeRk.js';
|
|
2
|
+
import '../bus-B2VEKrPI.js';
|
|
3
|
+
import '../types-D8DgIUhJ.js';
|
|
4
|
+
|
|
5
|
+
declare function setupRemoteBridge(url: string, bus?: BitBus): () => void;
|
|
2
6
|
|
|
3
7
|
export { setupRemoteBridge };
|
package/dist/devtools/bridge.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as a}from"../chunk-JC4R5WCC.js";import"../chunk-K5X37E3U.js";import"../chunk-5NA2TFPG.js";import"../chunk-UQ3DSUWC.js";import"../chunk-E2NZR44P.js";import"../chunk-W2E5UIXT.js";import"../chunk-EQ55DKX2.js";import"../chunk-63OJBMKK.js";import"../chunk-RD73EBSN.js";import"../chunk-3NUJVIAM.js";export{a as setupRemoteBridge};
|
|
2
2
|
//# sourceMappingURL=bridge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|