attaform 0.21.2 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/dev-key-collision-warnings.cjs +1 -1
- package/dist/chunks/dev-key-collision-warnings.mjs +1 -1
- package/dist/chunks/devtools.cjs +1 -1
- package/dist/chunks/devtools.mjs +1 -1
- package/dist/chunks/fingerprint2.cjs +1 -1
- package/dist/chunks/fingerprint2.mjs +1 -1
- package/dist/chunks/indexeddb.cjs +1 -1
- package/dist/chunks/indexeddb.mjs +1 -1
- package/dist/chunks/local-storage.cjs +1 -1
- package/dist/chunks/local-storage.mjs +1 -1
- package/dist/chunks/multi-tab-sync.cjs +2 -2
- package/dist/chunks/multi-tab-sync.mjs +2 -2
- package/dist/chunks/session-storage.cjs +1 -1
- package/dist/chunks/session-storage.mjs +1 -1
- package/dist/chunks/wire-persistence.cjs +2 -2
- package/dist/chunks/wire-persistence.mjs +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +5 -5
- package/dist/nuxt.d.cts +1 -1
- package/dist/nuxt.d.mts +1 -1
- package/dist/nuxt.d.ts +1 -1
- package/dist/runtime/plugins/attaform.cjs +2 -2
- package/dist/runtime/plugins/attaform.mjs +2 -2
- package/dist/shared/{attaform.B5LNzqQh.cjs → attaform.01iKS_lz.cjs} +18 -5
- package/dist/shared/{attaform.DP-u7_tk.mjs.map → attaform.01iKS_lz.cjs.map} +1 -1
- package/dist/shared/{attaform.C41gjp-a.mjs → attaform.6xE0Lcfd.mjs} +2 -2
- package/dist/shared/{attaform.C41gjp-a.mjs.map → attaform.6xE0Lcfd.mjs.map} +1 -1
- package/dist/shared/{attaform.BBDIKtKY.cjs → attaform.AyujQoHp.cjs} +4 -4
- package/dist/shared/{attaform.BBDIKtKY.cjs.map → attaform.AyujQoHp.cjs.map} +1 -1
- package/dist/shared/{attaform.BGf_J22U.d.ts → attaform.BGwNZ9GV.d.cts} +10 -2
- package/dist/shared/{attaform.DP-u7_tk.mjs → attaform.BKFwekY2.mjs} +16 -6
- package/dist/shared/{attaform.B5LNzqQh.cjs.map → attaform.BKFwekY2.mjs.map} +1 -1
- package/dist/shared/{attaform.CcnF1AKJ.cjs → attaform.C-RtnCJM.cjs} +116 -47
- package/dist/shared/attaform.C-RtnCJM.cjs.map +1 -0
- package/dist/shared/{attaform.BkjJfMvJ.d.cts → attaform.CCCeEPwa.d.mts} +10 -2
- package/dist/shared/{attaform.BwLp9KM7.cjs → attaform.CRzpFCjV.cjs} +2 -2
- package/dist/shared/{attaform.BwLp9KM7.cjs.map → attaform.CRzpFCjV.cjs.map} +1 -1
- package/dist/shared/{attaform.D2ZuIOCf.cjs → attaform.CjMcwV7W.cjs} +557 -126
- package/dist/shared/attaform.CjMcwV7W.cjs.map +1 -0
- package/dist/shared/{attaform.CTheKoTc.mjs → attaform.CsB-iKbU.mjs} +557 -126
- package/dist/shared/attaform.CsB-iKbU.mjs.map +1 -0
- package/dist/shared/{attaform.BCcrLApm.d.mts → attaform.D4XYaasQ.d.ts} +10 -2
- package/dist/shared/{attaform.D6GYGshL.mjs → attaform.DCjgGir_.mjs} +3 -3
- package/dist/shared/{attaform.D6GYGshL.mjs.map → attaform.DCjgGir_.mjs.map} +1 -1
- package/dist/shared/{attaform.BVeLgfEh.mjs → attaform.DNuiFCXG.mjs} +4 -4
- package/dist/shared/{attaform.BVeLgfEh.mjs.map → attaform.DNuiFCXG.mjs.map} +1 -1
- package/dist/shared/{attaform.BYgioWLF.d.ts → attaform.DUMWQefY.d.ts} +1 -1
- package/dist/shared/{attaform.CrD73S4m.mjs → attaform.DgCfLqay.mjs} +116 -47
- package/dist/shared/attaform.DgCfLqay.mjs.map +1 -0
- package/dist/shared/{attaform.ory-3WhV.d.ts → attaform.DvUH4a3o.d.cts} +181 -6
- package/dist/shared/{attaform.ory-3WhV.d.cts → attaform.DvUH4a3o.d.mts} +181 -6
- package/dist/shared/{attaform.ory-3WhV.d.mts → attaform.DvUH4a3o.d.ts} +181 -6
- package/dist/shared/{attaform.BoY6RZUl.d.cts → attaform.FN0vaQAg.d.mts} +1 -1
- package/dist/shared/{attaform.BwrowMp2.cjs → attaform.Q3eAD2wD.cjs} +3 -3
- package/dist/shared/{attaform.BwrowMp2.cjs.map → attaform.Q3eAD2wD.cjs.map} +1 -1
- package/dist/shared/{attaform.CnEl--PF.d.mts → attaform.aekT7mMx.d.cts} +1 -1
- package/dist/zod-v3.cjs +2 -2
- package/dist/zod-v3.d.cts +3 -3
- package/dist/zod-v3.d.mts +3 -3
- package/dist/zod-v3.d.ts +3 -3
- package/dist/zod-v3.mjs +2 -2
- package/dist/zod-v4.cjs +2 -2
- package/dist/zod-v4.d.cts +4 -4
- package/dist/zod-v4.d.mts +4 -4
- package/dist/zod-v4.d.ts +4 -4
- package/dist/zod-v4.mjs +2 -2
- package/dist/zod.cjs +5 -5
- package/dist/zod.d.cts +5 -5
- package/dist/zod.d.mts +5 -5
- package/dist/zod.d.ts +5 -5
- package/dist/zod.mjs +5 -5
- package/package.json +2 -2
- package/dist/shared/attaform.CTheKoTc.mjs.map +0 -1
- package/dist/shared/attaform.CcnF1AKJ.cjs.map +0 -1
- package/dist/shared/attaform.CrD73S4m.mjs.map +0 -1
- package/dist/shared/attaform.D2ZuIOCf.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FormKey,
|
|
1
|
+
import { F as FormKey, a5 as PathKey, p as DisplayCtx, d as GetDisplayState, q as DisplayMachine, a4 as Path, ap as SlimPrimitiveKind, C as CoercionEntry, j as CoercionRegistry, G as GenericForm, V as ValidationError, a as AbstractSchema, ay as WriteMeta, m as DeepPartial, az as WriteShape, aG as TransformAbortHolder, at as ValidateOn, $ as OnChangeSource, Z as OnChangeHandler, _ as OnChangeOptions, aH as PersistOptInRegistry, A as AttaformDefaults, b as UseFormReturnType, c as RegisterValue } from './attaform.DvUH4a3o.cjs';
|
|
2
2
|
import { Ref, ComputedRef, App, InjectionKey } from 'vue';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1126,7 +1126,7 @@ type FormStore<F extends GenericForm, G extends GenericForm = F> = {
|
|
|
1126
1126
|
} | null;
|
|
1127
1127
|
/**
|
|
1128
1128
|
* Cancel every in-flight field-level validation run — clears timers
|
|
1129
|
-
* for debounced 'change' runs that haven't fired,
|
|
1129
|
+
* for debounced 'change' runs that haven't fired, latches `aborted`
|
|
1130
1130
|
* for runs whose async parse is in flight. Called by `handleSubmit`
|
|
1131
1131
|
* at entry (submit validation is authoritative) and by `reset()`.
|
|
1132
1132
|
*/
|
|
@@ -1199,6 +1199,14 @@ type FormStore<F extends GenericForm, G extends GenericForm = F> = {
|
|
|
1199
1199
|
* function.
|
|
1200
1200
|
*/
|
|
1201
1201
|
onFormChange(listener: (next: F, meta?: WriteMeta) => void): () => void;
|
|
1202
|
+
/**
|
|
1203
|
+
* Register a `form.onChange` side-channel handler. `source === undefined`
|
|
1204
|
+
* is the whole form (root); `getForm` lazily resolves the public form
|
|
1205
|
+
* handle for `ctx.form`. Returns an idempotent `stop()`. A no-op on SSR.
|
|
1206
|
+
* The public `form.onChange` overloads and `useForm({ onChange })` wire
|
|
1207
|
+
* through here; dispatch happens in `commitWritePatches`.
|
|
1208
|
+
*/
|
|
1209
|
+
registerOnChange(source: OnChangeSource | undefined, handler: OnChangeHandler, options: OnChangeOptions | undefined, getForm: () => unknown): () => void;
|
|
1202
1210
|
/**
|
|
1203
1211
|
* Subscribe to successful submissions. Fires after the consumer's
|
|
1204
1212
|
* `onSubmit` callback has resolved — not on validation failure,
|
|
@@ -1670,17 +1670,20 @@ function canonicalizePath(input) {
|
|
|
1670
1670
|
if (typeof input === "string") {
|
|
1671
1671
|
const cached = canonicalStringCache.get(input);
|
|
1672
1672
|
if (cached !== void 0) return cached;
|
|
1673
|
-
const
|
|
1674
|
-
const
|
|
1675
|
-
const entry = { segments
|
|
1673
|
+
const segments = parseDottedPath(input);
|
|
1674
|
+
const key = JSON.stringify(segments);
|
|
1675
|
+
const entry = { segments, key };
|
|
1676
1676
|
if (canonicalStringCache.size >= CANONICAL_STRING_CACHE_MAX) {
|
|
1677
1677
|
const oldest = canonicalStringCache.keys().next().value;
|
|
1678
1678
|
if (oldest !== void 0) canonicalStringCache.delete(oldest);
|
|
1679
1679
|
}
|
|
1680
1680
|
canonicalStringCache.set(input, entry);
|
|
1681
|
-
rememberSegmentsForPathKey(
|
|
1681
|
+
rememberSegmentsForPathKey(key, segments);
|
|
1682
1682
|
return entry;
|
|
1683
1683
|
}
|
|
1684
|
+
return keyForSegments(input);
|
|
1685
|
+
}
|
|
1686
|
+
function keyForSegments(input) {
|
|
1684
1687
|
const segments = Array.from(input).map(normalizeSegment);
|
|
1685
1688
|
const key = JSON.stringify(segments);
|
|
1686
1689
|
rememberSegmentsForPathKey(key, segments);
|
|
@@ -1717,6 +1720,13 @@ function isPathPrefix(prefix, path) {
|
|
|
1717
1720
|
}
|
|
1718
1721
|
return true;
|
|
1719
1722
|
}
|
|
1723
|
+
function pathsEqual(a, b) {
|
|
1724
|
+
if (a.length !== b.length) return false;
|
|
1725
|
+
for (let i = 0; i < a.length; i++) {
|
|
1726
|
+
if (a[i] !== b[i]) return false;
|
|
1727
|
+
}
|
|
1728
|
+
return true;
|
|
1729
|
+
}
|
|
1720
1730
|
|
|
1721
|
-
export { AnonPersistError as A,
|
|
1722
|
-
//# sourceMappingURL=attaform.
|
|
1731
|
+
export { AnonPersistError as A, segmentsToDotted as B, coerceToPathKey as C, DEFAULT_SENSITIVE_NAMES as D, isSensitivePath as E, FORM_ERRORS_PATH_KEY as F, createPersistOptInRegistry as G, ensureAttaformInstalled as H, InvalidPathError as I, kFormContext as J, kFormInstanceId as K, createIsSensitivePath as L, REGISTER_OWNER_MARKER as M, kAttaformAncestorWizard as N, OutsideSetupError as O, ROOT_PATH as R, SubmitErrorHandlerError as S, V_REGISTER_MARKER as V, __DEV__ as _, canonicalizePath as a, AttaformError as b, createAttaform as c, InvalidUseFormConfigError as d, ROOT_PATH_KEY as e, RegistryNotInstalledError as f, getRegistryFromApp as g, ReservedFormKeyError as h, assignKey as i, createRegistry as j, kAttaformWizardActiveStepResolver as k, isPathPrefix as l, isRegisterValue as m, kAttaformRegistry as n, pathKeyToDotted as o, parseDottedPath as p, pathsEqual as q, keyForSegments as r, segmentsForPathKey as s, toError as t, useRegistry as u, vRegister as v, INTERACTIVE_TAG_NAMES as w, getOrAssignElementId as x, allowSensitivePersist as y, FORM_ERRORS_PATH as z };
|
|
1732
|
+
//# sourceMappingURL=attaform.BKFwekY2.mjs.map
|