attaform 0.27.6 → 0.28.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/abstract.d.mts +5 -4
- package/dist/abstract.mjs +4 -3
- package/dist/chunks/fingerprint.mjs +0 -1
- package/dist/chunks/fingerprint2.mjs +1 -2
- package/dist/dev/abstract.mjs +4 -0
- package/dist/{chunks → dev/chunks}/dev-key-collision-warnings.mjs +0 -1
- package/dist/{chunks → dev/chunks}/devtools.mjs +5 -6
- package/dist/{chunks/fingerprint.cjs → dev/chunks/fingerprint.mjs} +7 -10
- package/dist/{chunks/fingerprint2.cjs → dev/chunks/fingerprint2.mjs} +32 -35
- package/dist/dev/directive.mjs +1 -0
- package/dist/dev/history.mjs +89 -0
- package/dist/dev/index.mjs +5 -0
- package/dist/dev/runtime/plugins/attaform.mjs +40 -0
- package/dist/{shared/attaform.D6tk90Rc.cjs → dev/shared/attaform-dev.6qxD-Yqo.mjs} +187 -43
- package/dist/{shared/attaform.CQN9R62B.cjs → dev/shared/attaform-dev.BJGA_UOS.mjs} +1 -4
- package/dist/{shared/attaform.DYEr28Pt.mjs → dev/shared/attaform-dev.BR8u0YOZ.mjs} +6 -7
- package/dist/dev/shared/attaform-dev.BXE2cr0L.mjs +220 -0
- package/dist/dev/shared/attaform-dev.By4PRjt0.mjs +248 -0
- package/dist/{shared/attaform.B1ZYt2Li.mjs → dev/shared/attaform-dev.D2I8e_Mm.mjs} +132 -568
- package/dist/dev/shared/attaform-dev.Dr2YzS5B.mjs +197 -0
- package/dist/{shared/attaform.nMaz2C5P.mjs → dev/shared/attaform-dev.P7cseiEG.mjs} +178 -397
- package/dist/{shared/attaform.CKH2lGdL.mjs → dev/shared/attaform-dev.WmuhD_CZ.mjs} +3944 -5056
- package/dist/{shared/attaform.DMxM2kol.mjs → dev/shared/attaform-dev.oYrkP9dj.mjs} +160 -508
- package/dist/dev/zod-v3.mjs +17 -0
- package/dist/dev/zod-v4.mjs +16 -0
- package/dist/dev/zod.mjs +5 -0
- package/dist/directive.d.mts +20 -0
- package/dist/directive.mjs +1 -0
- package/dist/esbuild.mjs +0 -1
- package/dist/history.d.mts +59 -0
- package/dist/history.mjs +89 -0
- package/dist/index.d.mts +11 -5
- package/dist/index.mjs +5 -4
- package/dist/nuxt.d.mts +1 -1
- package/dist/nuxt.mjs +5 -2
- package/dist/rollup.mjs +0 -1
- package/dist/rspack.d.mts +6 -1
- package/dist/rspack.mjs +0 -1
- package/dist/runtime/components/AttaformDevtoolsPanel.vue +9 -8
- package/dist/runtime/plugins/attaform.mjs +1 -2
- package/dist/shared/{attaform.Fp3sCrVs.d.ts → attaform.B4VkS43-.d.mts} +2 -2
- package/dist/shared/{attaform.DrvMscNX.cjs → attaform.B8k8JrmK.mjs} +4073 -5630
- package/dist/shared/attaform.BJGA_UOS.mjs +0 -1
- package/dist/shared/{attaform.CoR4mWfv.mjs → attaform.C09fpdLS.mjs} +172 -16
- package/dist/shared/{attaform.D8kliaKw.cjs → attaform.CJP3RkGa.mjs} +141 -590
- package/dist/shared/{attaform.DniawQLP.d.cts → attaform.Cgu-hdSb.d.mts} +268 -68
- package/dist/shared/attaform.Cs2Rbdlo.mjs +0 -1
- package/dist/shared/{attaform.CHlJLAiv.d.mts → attaform.D5V4tZWq.d.mts} +69 -179
- package/dist/shared/{attaform.B9Wyhfro.cjs → attaform.D6DCnnQu.mjs} +11 -16
- package/dist/shared/attaform.DhnPb6nK.mjs +0 -1
- package/dist/shared/attaform.Dq4vWxuG.mjs +197 -0
- package/dist/shared/attaform.JfSWdEcb.d.mts +44 -0
- package/dist/shared/attaform.KvlEedlF.mjs +0 -1
- package/dist/shared/{attaform.DdQN7sgN.cjs → attaform.NLmerepI.mjs} +175 -557
- package/dist/shared/attaform.h0i6LijT.mjs +242 -0
- package/dist/shared/{attaform.Biytrv0-.cjs → attaform.uLbun31C.mjs} +204 -544
- package/dist/shared/attaform.v0fQtWyA.mjs +0 -1
- package/dist/shared/attaform.wfY8XFvm.mjs +197 -0
- package/dist/transforms.mjs +0 -1
- package/dist/vite.d.mts +17 -5
- package/dist/vite.mjs +24 -2
- package/dist/webpack.d.mts +6 -1
- package/dist/webpack.mjs +0 -1
- package/dist/zod-v3.d.mts +11 -6
- package/dist/zod-v3.mjs +17 -4
- package/dist/zod-v4.d.mts +12 -6
- package/dist/zod-v4.mjs +16 -4
- package/dist/zod.d.mts +4 -3
- package/dist/zod.mjs +5 -4
- package/package.json +23 -8
- package/skills/attaform/SKILL.md +2 -1
- package/dist/abstract.cjs +0 -48
- package/dist/abstract.cjs.map +0 -1
- package/dist/abstract.d.cts +0 -42
- package/dist/abstract.d.ts +0 -42
- package/dist/abstract.mjs.map +0 -1
- package/dist/chunks/dev-key-collision-warnings.cjs +0 -25
- package/dist/chunks/dev-key-collision-warnings.cjs.map +0 -1
- package/dist/chunks/dev-key-collision-warnings.mjs.map +0 -1
- package/dist/chunks/devtools.cjs +0 -157
- package/dist/chunks/devtools.cjs.map +0 -1
- package/dist/chunks/devtools.mjs.map +0 -1
- package/dist/chunks/fingerprint.cjs.map +0 -1
- package/dist/chunks/fingerprint.mjs.map +0 -1
- package/dist/chunks/fingerprint2.cjs.map +0 -1
- package/dist/chunks/fingerprint2.mjs.map +0 -1
- package/dist/esbuild.cjs +0 -28
- package/dist/esbuild.cjs.map +0 -1
- package/dist/esbuild.d.cts +0 -56
- package/dist/esbuild.d.ts +0 -56
- package/dist/esbuild.mjs.map +0 -1
- package/dist/index.cjs +0 -51
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -249
- package/dist/index.d.ts +0 -249
- package/dist/index.mjs.map +0 -1
- package/dist/nuxt.cjs +0 -84
- package/dist/nuxt.cjs.map +0 -1
- package/dist/nuxt.d.cts +0 -66
- package/dist/nuxt.d.ts +0 -66
- package/dist/nuxt.mjs.map +0 -1
- package/dist/rollup.cjs +0 -24
- package/dist/rollup.cjs.map +0 -1
- package/dist/rollup.d.cts +0 -35
- package/dist/rollup.d.ts +0 -35
- package/dist/rollup.mjs.map +0 -1
- package/dist/rspack.cjs +0 -10
- package/dist/rspack.cjs.map +0 -1
- package/dist/rspack.d.cts +0 -40
- package/dist/rspack.d.ts +0 -40
- package/dist/rspack.mjs.map +0 -1
- package/dist/runtime/components/AttaformDevtoolsPanel.vue.d.ts +0 -7
- package/dist/runtime/components/DevtoolsValueTree.vue.d.ts +0 -35
- package/dist/runtime/plugins/attaform.cjs +0 -43
- package/dist/runtime/plugins/attaform.cjs.map +0 -1
- package/dist/runtime/plugins/attaform.d.cts +0 -5
- package/dist/runtime/plugins/attaform.d.ts +0 -5
- package/dist/runtime/plugins/attaform.mjs.map +0 -1
- package/dist/shared/attaform.B1ZYt2Li.mjs.map +0 -1
- package/dist/shared/attaform.B9Wyhfro.cjs.map +0 -1
- package/dist/shared/attaform.BGDV42hI.d.cts +0 -232
- package/dist/shared/attaform.BJGA_UOS.mjs.map +0 -1
- package/dist/shared/attaform.Biytrv0-.cjs.map +0 -1
- package/dist/shared/attaform.Bn0IzhD_.cjs +0 -800
- package/dist/shared/attaform.Bn0IzhD_.cjs.map +0 -1
- package/dist/shared/attaform.C9fPTxjB.d.cts +0 -41
- package/dist/shared/attaform.C9fPTxjB.d.ts +0 -41
- package/dist/shared/attaform.CKH2lGdL.mjs.map +0 -1
- package/dist/shared/attaform.CQN9R62B.cjs.map +0 -1
- package/dist/shared/attaform.CoR4mWfv.mjs.map +0 -1
- package/dist/shared/attaform.Cs2Rbdlo.mjs.map +0 -1
- package/dist/shared/attaform.D6tk90Rc.cjs.map +0 -1
- package/dist/shared/attaform.D8kliaKw.cjs.map +0 -1
- package/dist/shared/attaform.DLknk9nF.d.mts +0 -232
- package/dist/shared/attaform.DMxM2kol.mjs.map +0 -1
- package/dist/shared/attaform.DRUT703x.d.cts +0 -56
- package/dist/shared/attaform.DRUT703x.d.ts +0 -56
- package/dist/shared/attaform.DYEr28Pt.mjs.map +0 -1
- package/dist/shared/attaform.DdQN7sgN.cjs.map +0 -1
- package/dist/shared/attaform.DhnPb6nK.mjs.map +0 -1
- package/dist/shared/attaform.DniawQLP.d.mts +0 -4763
- package/dist/shared/attaform.DniawQLP.d.ts +0 -4763
- package/dist/shared/attaform.DoQm_Vkd.cjs +0 -58
- package/dist/shared/attaform.DoQm_Vkd.cjs.map +0 -1
- package/dist/shared/attaform.DrvMscNX.cjs.map +0 -1
- package/dist/shared/attaform.F2Q8iv38.d.ts +0 -2494
- package/dist/shared/attaform.FmqKO1Ex.d.cts +0 -2494
- package/dist/shared/attaform.KvlEedlF.mjs.map +0 -1
- package/dist/shared/attaform.RaTzp1WF.cjs +0 -26
- package/dist/shared/attaform.RaTzp1WF.cjs.map +0 -1
- package/dist/shared/attaform.nMaz2C5P.mjs.map +0 -1
- package/dist/shared/attaform.v0fQtWyA.mjs.map +0 -1
- package/dist/shared/attaform.yUrz7C2z.cjs +0 -29
- package/dist/shared/attaform.yUrz7C2z.cjs.map +0 -1
- package/dist/transforms.cjs +0 -12
- package/dist/transforms.cjs.map +0 -1
- package/dist/transforms.d.cts +0 -73
- package/dist/transforms.d.ts +0 -73
- package/dist/transforms.mjs.map +0 -1
- package/dist/vite.cjs +0 -363
- package/dist/vite.cjs.map +0 -1
- package/dist/vite.d.cts +0 -133
- package/dist/vite.d.ts +0 -133
- package/dist/vite.mjs.map +0 -1
- package/dist/webpack.cjs +0 -10
- package/dist/webpack.cjs.map +0 -1
- package/dist/webpack.d.cts +0 -37
- package/dist/webpack.d.ts +0 -37
- package/dist/webpack.mjs.map +0 -1
- package/dist/zod-v3.cjs +0 -53
- package/dist/zod-v3.cjs.map +0 -1
- package/dist/zod-v3.d.cts +0 -246
- package/dist/zod-v3.d.ts +0 -246
- package/dist/zod-v3.mjs.map +0 -1
- package/dist/zod-v4.cjs +0 -55
- package/dist/zod-v4.cjs.map +0 -1
- package/dist/zod-v4.d.cts +0 -172
- package/dist/zod-v4.d.ts +0 -172
- package/dist/zod-v4.mjs.map +0 -1
- package/dist/zod.cjs +0 -51
- package/dist/zod.cjs.map +0 -1
- package/dist/zod.d.cts +0 -7
- package/dist/zod.d.ts +0 -7
- package/dist/zod.mjs.map +0 -1
package/dist/abstract.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { A as AttaformRegistry } from './shared/attaform.
|
|
2
|
-
export { a as AnyForm, b as AttaformDevtoolsBridge, c as AttaformError, d as AttaformErrorCode, e as AttaformPluginOptions, C as CompiledStep, D as DEFAULT_TIMINGS, f as DEVTOOLS_WINDOW_KEY, g as DisplayTimings, F as FormStatus, h as FormStatusSeed, G as GateMarker, I as InjectWizardInput, i as InvalidPathError, j as InvalidUseFormConfigError, L as LazyMarker, O as OutsideSetupError, R as RegistryNotInstalledError, k as ReservedFormKeyError, S as SerializedAttaformState, l as SerializedFormData, m as StepSlot, n as SubmitErrorHandlerError, U as UseRegisterReturn, o as UseWizardReturnType, W as WizardAggregateError, p as WizardCtx, q as WizardCtxForm, r as WizardOnError, s as WizardOnSubmit, t as WizardOptions, u as WizardPersistFn, v as WizardRestoreFn, w as WizardRestoreState, x as WizardStatusesProxy, y as WizardSubmitContext, z as assignKey, B as createAttaform, E as createRegistry, H as defaultCoercionRules, J as defaultDisplayState, K as defineCoercion, M as escapeForInlineScript, N as gate, P as getRegistryFromApp, Q as hydrateAttaformState, T as injectForm, V as injectWizard, X as isRegisterValue, Y as kAttaformRegistry, Z as lazy, _ as makeDefaultDisplayState, $ as renderAttaformState, a0 as useRegister, a1 as useRegistry, a2 as useWizard
|
|
3
|
-
import { G as GenericForm, F as FormKey, U as UseFormConfiguration, A as AbstractSchema, D as DefaultValuesInput, a as UseFormReturnType } from './shared/attaform.
|
|
4
|
-
export { b as ArrayItem, c as ArrayPath, d as AttaformDefaults, C as CoercionEntry, e as CoercionRegistry, f as CoercionResult, g as CustomDirectiveRegisterAssignerFn, h as DeepPartial, i as DefaultValuesResponse, j as DefaultValuesShape, k as DisplayCtx, l as DisplayMachine, m as DisplayState, E as ErrorInput, n as ErrorsProxyShape, o as FieldMetaPayload, p as FieldState, q as FieldStateMap, r as FieldStateMapEntry, s as FlatPath, t as FormErrorRecord, u as FormErrorsSurface, v as FormMeta, w as GetDisplayState, H as HandleSubmit, x as
|
|
1
|
+
import { A as AttaformRegistry } from './shared/attaform.D5V4tZWq.mjs';
|
|
2
|
+
export { a as AnyForm, b as AttaformDevtoolsBridge, c as AttaformError, d as AttaformErrorCode, e as AttaformPluginOptions, C as CompiledStep, D as DEFAULT_TIMINGS, f as DEVTOOLS_WINDOW_KEY, g as DisplayTimings, F as FormStatus, h as FormStatusSeed, G as GateMarker, I as InjectWizardInput, i as InvalidPathError, j as InvalidUseFormConfigError, L as LazyMarker, O as OutsideSetupError, R as RegistryNotInstalledError, k as ReservedFormKeyError, S as SerializedAttaformState, l as SerializedFormData, m as StepSlot, n as SubmitErrorHandlerError, U as UseRegisterReturn, o as UseWizardReturnType, W as WizardAggregateError, p as WizardCtx, q as WizardCtxForm, r as WizardOnError, s as WizardOnSubmit, t as WizardOptions, u as WizardPersistFn, v as WizardRestoreFn, w as WizardRestoreState, x as WizardStatusesProxy, y as WizardSubmitContext, z as assignKey, B as createAttaform, E as createRegistry, H as defaultCoercionRules, J as defaultDisplayState, K as defineCoercion, M as escapeForInlineScript, N as gate, P as getRegistryFromApp, Q as hydrateAttaformState, T as injectForm, V as injectWizard, X as isRegisterValue, Y as kAttaformRegistry, Z as lazy, _ as makeDefaultDisplayState, $ as renderAttaformState, a0 as useRegister, a1 as useRegistry, a2 as useWizard } from './shared/attaform.D5V4tZWq.mjs';
|
|
3
|
+
import { G as GenericForm, F as FormKey, U as UseFormConfiguration, A as AbstractSchema, D as DefaultValuesInput, a as UseFormReturnType } from './shared/attaform.Cgu-hdSb.mjs';
|
|
4
|
+
export { b as ArrayItem, c as ArrayPath, d as AttaformDefaults, C as CoercionEntry, e as CoercionRegistry, f as CoercionResult, g as CustomDirectiveRegisterAssignerFn, h as DeepPartial, i as DefaultValuesResponse, j as DefaultValuesShape, k as DisplayCtx, l as DisplayMachine, m as DisplayState, E as ErrorInput, n as ErrorsProxyShape, o as FieldMetaPayload, p as FieldState, q as FieldStateMap, r as FieldStateMapEntry, s as FlatPath, t as FormErrorRecord, u as FormErrorsSurface, v as FormMeta, w as GetDisplayState, H as HandleSubmit, x as HistoryPlugin, I as IsTuple, y as IsUnion, J as JoinSegments, z as Json, K as KeyofUnion, L as LiftedValueShape, M as MetaTrackerValue, N as NestedReadType, B as NestedType, O as OnError, P as OnInvalidSubmitPolicy, Q as OnSubmit, R as ParseOptions, S as PartialFlatPath, T as Path, V as PathKey, W as PendingValidationStatus, X as Primitive, Y as ROOT_PATH, Z as ROOT_PATH_KEY, _ as ReactiveValidationStatus, $ as RegisterDirective, a0 as RegisterFlatPath, a1 as RegisterOptions, a2 as RegisterSelectModifier, a3 as RegisterTextModifier, a4 as RegisterTransform, a5 as RegisterValue, a6 as Segment, a7 as SetValueCallback, a8 as SetValuePayload, a9 as SettledValidationStatus, aa as SlimPrimitiveKind, ab as SlimRuntimeOf, ac as SubmitHandler, ad as Unset, ae as ValidateOn, af as ValidateOnConfig, ag as ValidationError, ah as ValidationResponse, ai as ValidationResponseWithoutValue, aj as ValueOfUnion, ak as WriteMeta, al as WriteShape, am as canonicalizePath, an as isPathPrefix, ao as isUnset, ap as parseDottedPath, aq as unset } from './shared/attaform.Cgu-hdSb.mjs';
|
|
5
|
+
export { v as vRegister } from './shared/attaform.JfSWdEcb.mjs';
|
|
5
6
|
import 'vue';
|
|
6
7
|
|
|
7
8
|
/**
|
package/dist/abstract.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { A as AttaformErrorCode, D as DEFAULT_TIMINGS, d as defaultCoercionRules, a as defaultDisplayState, b as defineCoercion, e as escapeForInlineScript, g as gate, i as injectForm, c as injectWizard, f as isUnset, l as lazy, m as makeDefaultDisplayState, u as unset, h as useAbstractForm, j as useRegister, k as useWizard } from './shared/attaform.
|
|
2
|
-
export { A as AttaformError,
|
|
1
|
+
export { A as AttaformErrorCode, D as DEFAULT_TIMINGS, d as defaultCoercionRules, a as defaultDisplayState, b as defineCoercion, e as escapeForInlineScript, g as gate, i as injectForm, c as injectWizard, f as isUnset, l as lazy, m as makeDefaultDisplayState, u as unset, h as useAbstractForm, j as useRegister, k as useWizard } from './shared/attaform.B8k8JrmK.mjs';
|
|
2
|
+
export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform.wfY8XFvm.mjs';
|
|
3
|
+
export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform.Dq4vWxuG.mjs';
|
|
4
|
+
export { a as assignKey, v as vRegister } from './shared/attaform.uLbun31C.mjs';
|
|
3
5
|
export { i as isRegisterValue } from './shared/attaform.KvlEedlF.mjs';
|
|
4
|
-
//# sourceMappingURL=abstract.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as canonicalStringify } from '../shared/attaform.BJGA_UOS.mjs';
|
|
2
|
-
import { k as kindOf, g as getIntersectionLeft, b as getIntersectionRight, c as unwrapLazy, d as unwrapInner, e as unwrapPipe,
|
|
2
|
+
import { k as kindOf, g as getIntersectionLeft, b as getIntersectionRight, c as unwrapLazy, d as unwrapInner, e as unwrapPipe, f as getDiscriminator, h as getDiscriminatedOptions, i as getUnionOptions, j as getRecordKeyType, l as getRecordValueType, m as getTupleItems, n as getSetValueType, o as getArrayElement, p as getObjectShape, q as getEnumValues, r as getLiteralValues, s as getChecks, t as getCatchDefault, v as getDefaultValue } from '../shared/attaform.NLmerepI.mjs';
|
|
3
3
|
|
|
4
4
|
const cyclicSentinel = "<cyclic>";
|
|
5
5
|
function fingerprintZodSchema(schema) {
|
|
@@ -157,4 +157,3 @@ function compare(a, b) {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
export { fingerprintZodSchema };
|
|
160
|
-
//# sourceMappingURL=fingerprint2.mjs.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { A as AttaformErrorCode, D as DEFAULT_TIMINGS, d as defaultCoercionRules, a as defaultDisplayState, b as defineCoercion, e as escapeForInlineScript, g as gate, i as injectForm, c as injectWizard, f as isUnset, l as lazy, m as makeDefaultDisplayState, u as unset, h as useAbstractForm, j as useRegister, k as useWizard } from './shared/attaform-dev.WmuhD_CZ.mjs';
|
|
2
|
+
export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform-dev.Dr2YzS5B.mjs';
|
|
3
|
+
export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform-dev.BXE2cr0L.mjs';
|
|
4
|
+
export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.P7cseiEG.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e as canonicalizePath } from '../shared/attaform-dev.Dr2YzS5B.mjs';
|
|
2
2
|
|
|
3
3
|
const INSPECTOR_ID = "attaform";
|
|
4
4
|
const TIMELINE_LAYER_ID = "attaform:events";
|
|
@@ -114,15 +114,15 @@ function wire(api, app, registry) {
|
|
|
114
114
|
}
|
|
115
115
|
];
|
|
116
116
|
payload.state["Schema Errors"] = [
|
|
117
|
-
...[...state.
|
|
117
|
+
...[...state.errorCells.entries()].filter(([, cell]) => cell.schema.length > 0).map(([k, cell]) => ({
|
|
118
118
|
key: String(k),
|
|
119
|
-
value:
|
|
119
|
+
value: cell.schema
|
|
120
120
|
}))
|
|
121
121
|
];
|
|
122
122
|
payload.state["User Errors"] = [
|
|
123
|
-
...[...state.
|
|
123
|
+
...[...state.errorCells.entries()].filter(([, cell]) => cell.user.length > 0).map(([k, cell]) => ({
|
|
124
124
|
key: String(k),
|
|
125
|
-
value:
|
|
125
|
+
value: cell.user
|
|
126
126
|
}))
|
|
127
127
|
];
|
|
128
128
|
payload.state["Aggregates"] = [
|
|
@@ -152,4 +152,3 @@ function wire(api, app, registry) {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
export { setupAttaformDevtools };
|
|
155
|
-
//# sourceMappingURL=devtools.mjs.map
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const canonicalStringify = require('../shared/attaform.CQN9R62B.cjs');
|
|
1
|
+
import { c as canonicalStringify } from '../shared/attaform-dev.BJGA_UOS.mjs';
|
|
4
2
|
|
|
5
3
|
const cyclicSentinel = "<cyclic>";
|
|
6
4
|
function fingerprintZodSchema(schema) {
|
|
@@ -45,7 +43,7 @@ function computeFingerprint(schema, cache, inProgress) {
|
|
|
45
43
|
case "ZodNever":
|
|
46
44
|
return kind;
|
|
47
45
|
case "ZodLiteral":
|
|
48
|
-
return `ZodLiteral:${canonicalStringify
|
|
46
|
+
return `ZodLiteral:${canonicalStringify(def.value)}`;
|
|
49
47
|
case "ZodEnum": {
|
|
50
48
|
const values = Array.isArray(def.values) ? def.values : [];
|
|
51
49
|
const sorted = [...values].sort((a, b) => {
|
|
@@ -53,7 +51,7 @@ function computeFingerprint(schema, cache, inProgress) {
|
|
|
53
51
|
const bs = String(b);
|
|
54
52
|
return as < bs ? -1 : as > bs ? 1 : 0;
|
|
55
53
|
});
|
|
56
|
-
return `ZodEnum:${canonicalStringify
|
|
54
|
+
return `ZodEnum:${canonicalStringify(sorted)}`;
|
|
57
55
|
}
|
|
58
56
|
case "ZodNativeEnum": {
|
|
59
57
|
const values = def.values && typeof def.values === "object" && !Array.isArray(def.values) ? Object.values(def.values) : [];
|
|
@@ -62,7 +60,7 @@ function computeFingerprint(schema, cache, inProgress) {
|
|
|
62
60
|
const bs = String(b);
|
|
63
61
|
return as < bs ? -1 : as > bs ? 1 : 0;
|
|
64
62
|
});
|
|
65
|
-
return `ZodNativeEnum:${canonicalStringify
|
|
63
|
+
return `ZodNativeEnum:${canonicalStringify(sorted)}`;
|
|
66
64
|
}
|
|
67
65
|
case "ZodObject": {
|
|
68
66
|
const shape = readShapeSafely(def);
|
|
@@ -174,13 +172,12 @@ function defaultFactoryRepr(factory) {
|
|
|
174
172
|
}
|
|
175
173
|
if (!Object.is(first, second)) return "fn:*";
|
|
176
174
|
if (typeof first === "function") return "fn:*";
|
|
177
|
-
return canonicalStringify
|
|
175
|
+
return canonicalStringify(first);
|
|
178
176
|
}
|
|
179
177
|
function formatChecks(checks) {
|
|
180
178
|
if (!Array.isArray(checks) || checks.length === 0) return "";
|
|
181
|
-
const parts = checks.map((c) => canonicalStringify
|
|
179
|
+
const parts = checks.map((c) => canonicalStringify(c)).sort();
|
|
182
180
|
return `[${parts.join(";")}]`;
|
|
183
181
|
}
|
|
184
182
|
|
|
185
|
-
|
|
186
|
-
//# sourceMappingURL=fingerprint.cjs.map
|
|
183
|
+
export { fingerprintZodSchema };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const canonicalStringify = require('../shared/attaform.CQN9R62B.cjs');
|
|
4
|
-
const index = require('../shared/attaform.DdQN7sgN.cjs');
|
|
1
|
+
import { c as canonicalStringify } from '../shared/attaform-dev.BJGA_UOS.mjs';
|
|
2
|
+
import { k as kindOf, g as getIntersectionLeft, b as getIntersectionRight, c as unwrapLazy, d as unwrapInner, e as unwrapPipe, f as getDiscriminator, h as getDiscriminatedOptions, i as getUnionOptions, j as getRecordKeyType, l as getRecordValueType, m as getTupleItems, n as getSetValueType, o as getArrayElement, p as getObjectShape, q as getEnumValues, r as getLiteralValues, s as getChecks, t as getCatchDefault, v as getDefaultValue } from '../shared/attaform-dev.oYrkP9dj.mjs';
|
|
5
3
|
|
|
6
4
|
const cyclicSentinel = "<cyclic>";
|
|
7
5
|
function fingerprintZodSchema(schema) {
|
|
@@ -23,7 +21,7 @@ function visit(schema, cache, inProgress) {
|
|
|
23
21
|
}
|
|
24
22
|
}
|
|
25
23
|
function computeFingerprint(schema, cache, inProgress) {
|
|
26
|
-
const kind =
|
|
24
|
+
const kind = kindOf(schema);
|
|
27
25
|
const recurse = (child) => visit(child, cache, inProgress);
|
|
28
26
|
switch (kind) {
|
|
29
27
|
// Kind-only leaves: no further structure to descend into.
|
|
@@ -45,68 +43,68 @@ function computeFingerprint(schema, cache, inProgress) {
|
|
|
45
43
|
case "date":
|
|
46
44
|
return `${kind}${formatChecks(schema)}`;
|
|
47
45
|
case "literal": {
|
|
48
|
-
const values = [...
|
|
49
|
-
const as = canonicalStringify
|
|
50
|
-
const bs = canonicalStringify
|
|
46
|
+
const values = [...getLiteralValues(schema)].sort((a, b) => {
|
|
47
|
+
const as = canonicalStringify(a);
|
|
48
|
+
const bs = canonicalStringify(b);
|
|
51
49
|
return as < bs ? -1 : as > bs ? 1 : 0;
|
|
52
50
|
});
|
|
53
|
-
return `literal:${canonicalStringify
|
|
51
|
+
return `literal:${canonicalStringify(values)}`;
|
|
54
52
|
}
|
|
55
53
|
case "enum":
|
|
56
|
-
return `enum:${canonicalStringify
|
|
54
|
+
return `enum:${canonicalStringify([...getEnumValues(schema)].sort((a, b) => compare(a, b)))}`;
|
|
57
55
|
case "object": {
|
|
58
|
-
const shape =
|
|
56
|
+
const shape = getObjectShape(schema);
|
|
59
57
|
const sortedEntries = Object.entries(shape).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([k, v]) => `${JSON.stringify(k)}:${recurse(v)}`);
|
|
60
58
|
return `object{${sortedEntries.join(",")}}${formatChecks(schema)}`;
|
|
61
59
|
}
|
|
62
60
|
case "array":
|
|
63
|
-
return `array[${recurse(
|
|
61
|
+
return `array[${recurse(getArrayElement(schema))}]${formatChecks(schema)}`;
|
|
64
62
|
case "set":
|
|
65
|
-
return `set<${recurse(
|
|
63
|
+
return `set<${recurse(getSetValueType(schema))}>${formatChecks(schema)}`;
|
|
66
64
|
case "tuple":
|
|
67
|
-
return `tuple[${
|
|
65
|
+
return `tuple[${getTupleItems(schema).map(recurse).join(",")}]`;
|
|
68
66
|
case "record":
|
|
69
|
-
return `record<${recurse(
|
|
67
|
+
return `record<${recurse(getRecordKeyType(schema))},${recurse(getRecordValueType(schema))}>`;
|
|
70
68
|
case "union": {
|
|
71
|
-
const options =
|
|
69
|
+
const options = getUnionOptions(schema).map(recurse).sort();
|
|
72
70
|
return `union(${options.join("|")})`;
|
|
73
71
|
}
|
|
74
72
|
case "discriminated-union": {
|
|
75
|
-
const disc =
|
|
76
|
-
const options =
|
|
73
|
+
const disc = getDiscriminator(schema) ?? "?";
|
|
74
|
+
const options = getDiscriminatedOptions(schema).map(recurse).sort();
|
|
77
75
|
return `dunion[${JSON.stringify(disc)}](${options.join("|")})`;
|
|
78
76
|
}
|
|
79
77
|
case "optional": {
|
|
80
|
-
const inner =
|
|
78
|
+
const inner = unwrapInner(schema);
|
|
81
79
|
return inner === void 0 ? "optional(?)" : `optional(${recurse(inner)})`;
|
|
82
80
|
}
|
|
83
81
|
case "nullable": {
|
|
84
|
-
const inner =
|
|
82
|
+
const inner = unwrapInner(schema);
|
|
85
83
|
return inner === void 0 ? "nullable(?)" : `nullable(${recurse(inner)})`;
|
|
86
84
|
}
|
|
87
85
|
case "default": {
|
|
88
|
-
const inner =
|
|
89
|
-
return `default[${stableValueRepr(
|
|
86
|
+
const inner = unwrapInner(schema);
|
|
87
|
+
return `default[${stableValueRepr(getDefaultValue, schema)}](${inner === void 0 ? "?" : recurse(inner)})`;
|
|
90
88
|
}
|
|
91
89
|
case "readonly": {
|
|
92
|
-
const inner =
|
|
90
|
+
const inner = unwrapInner(schema);
|
|
93
91
|
return inner === void 0 ? "readonly(?)" : `readonly(${recurse(inner)})`;
|
|
94
92
|
}
|
|
95
93
|
case "pipe": {
|
|
96
|
-
const inner =
|
|
94
|
+
const inner = unwrapPipe(schema);
|
|
97
95
|
return inner === void 0 ? "pipe(?)" : `pipe(${recurse(inner)})`;
|
|
98
96
|
}
|
|
99
97
|
case "catch": {
|
|
100
|
-
const inner =
|
|
101
|
-
return `catch[${stableValueRepr(
|
|
98
|
+
const inner = unwrapInner(schema);
|
|
99
|
+
return `catch[${stableValueRepr(getCatchDefault, schema)}](${inner === void 0 ? "?" : recurse(inner)})`;
|
|
102
100
|
}
|
|
103
101
|
case "lazy": {
|
|
104
|
-
const inner =
|
|
102
|
+
const inner = unwrapLazy(schema);
|
|
105
103
|
return inner === void 0 ? "lazy(?)" : `lazy(${recurse(inner)})`;
|
|
106
104
|
}
|
|
107
105
|
case "intersection": {
|
|
108
|
-
const left =
|
|
109
|
-
const right =
|
|
106
|
+
const left = getIntersectionLeft(schema);
|
|
107
|
+
const right = getIntersectionRight(schema);
|
|
110
108
|
const leftFp = left === void 0 ? "?" : recurse(left);
|
|
111
109
|
const rightFp = right === void 0 ? "?" : recurse(right);
|
|
112
110
|
const parts = [leftFp, rightFp].sort();
|
|
@@ -137,10 +135,10 @@ function stableValueRepr(get, schema) {
|
|
|
137
135
|
const first = get(schema);
|
|
138
136
|
const second = get(schema);
|
|
139
137
|
if (!Object.is(first, second) || typeof first === "function") return "fn:*";
|
|
140
|
-
return canonicalStringify
|
|
138
|
+
return canonicalStringify(first);
|
|
141
139
|
}
|
|
142
140
|
function formatChecks(schema) {
|
|
143
|
-
const checks =
|
|
141
|
+
const checks = getChecks(schema);
|
|
144
142
|
if (checks.length === 0) return "";
|
|
145
143
|
const parts = checks.map((c) => serializeCheck(c)).sort();
|
|
146
144
|
return `[${parts.join(";")}]`;
|
|
@@ -148,9 +146,9 @@ function formatChecks(schema) {
|
|
|
148
146
|
function serializeCheck(check) {
|
|
149
147
|
if (check !== null && typeof check === "object") {
|
|
150
148
|
const def = check._zod?.def;
|
|
151
|
-
if (def !== void 0) return canonicalStringify
|
|
149
|
+
if (def !== void 0) return canonicalStringify(def);
|
|
152
150
|
}
|
|
153
|
-
return canonicalStringify
|
|
151
|
+
return canonicalStringify(check);
|
|
154
152
|
}
|
|
155
153
|
function compare(a, b) {
|
|
156
154
|
const as = String(a);
|
|
@@ -158,5 +156,4 @@ function compare(a, b) {
|
|
|
158
156
|
return as < bs ? -1 : as > bs ? 1 : 0;
|
|
159
157
|
}
|
|
160
158
|
|
|
161
|
-
|
|
162
|
-
//# sourceMappingURL=fingerprint2.cjs.map
|
|
159
|
+
export { fingerprintZodSchema };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { b as installVRegister, v as vRegister, c as vRegisterFile } from './shared/attaform-dev.P7cseiEG.mjs';
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { shallowRef, computed } from 'vue';
|
|
2
|
+
import { n as normalizeNumericOption, D as DEFAULT_HISTORY_MAX_SNAPSHOTS, s as structuralSnapshot } from './shared/attaform-dev.By4PRjt0.mjs';
|
|
3
|
+
|
|
4
|
+
function captureErrorCells(map) {
|
|
5
|
+
const out = [];
|
|
6
|
+
for (const [k, cell] of map) {
|
|
7
|
+
out.push([k, { schema: [...cell.schema], user: [...cell.user] }]);
|
|
8
|
+
}
|
|
9
|
+
return out;
|
|
10
|
+
}
|
|
11
|
+
function createHistoryRuntime(kernel, max) {
|
|
12
|
+
const capacity = Math.max(1, max);
|
|
13
|
+
function captureSnapshot() {
|
|
14
|
+
return {
|
|
15
|
+
form: structuralSnapshot(kernel.form.value),
|
|
16
|
+
blankPaths: [...kernel.blankPaths],
|
|
17
|
+
errorCells: captureErrorCells(kernel.errorCells)
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const positions = shallowRef([captureSnapshot()]);
|
|
21
|
+
const cursor = shallowRef(0);
|
|
22
|
+
let suppressNext = false;
|
|
23
|
+
const unsubscribeChange = kernel.onFormChange((_next, meta) => {
|
|
24
|
+
if (suppressNext) {
|
|
25
|
+
suppressNext = false;
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (meta?.hydration === true) {
|
|
29
|
+
clear();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const next = positions.value.slice(0, cursor.value + 1);
|
|
33
|
+
next.push(captureSnapshot());
|
|
34
|
+
while (next.length > capacity) next.shift();
|
|
35
|
+
positions.value = next;
|
|
36
|
+
cursor.value = next.length - 1;
|
|
37
|
+
});
|
|
38
|
+
function restorePosition(snap) {
|
|
39
|
+
suppressNext = true;
|
|
40
|
+
kernel.blankPaths.clear();
|
|
41
|
+
for (const key of snap.blankPaths) kernel.blankPaths.add(key);
|
|
42
|
+
kernel.applyFormReplacement(structuralSnapshot(snap.form));
|
|
43
|
+
kernel.restoreErrorCells(snap.errorCells);
|
|
44
|
+
}
|
|
45
|
+
function stepTo(nextCursor) {
|
|
46
|
+
const snap = positions.value[nextCursor];
|
|
47
|
+
if (snap === void 0) return false;
|
|
48
|
+
cursor.value = nextCursor;
|
|
49
|
+
restorePosition(snap);
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
function undo() {
|
|
53
|
+
return cursor.value > 0 && stepTo(cursor.value - 1);
|
|
54
|
+
}
|
|
55
|
+
function redo() {
|
|
56
|
+
return cursor.value < positions.value.length - 1 && stepTo(cursor.value + 1);
|
|
57
|
+
}
|
|
58
|
+
function clear() {
|
|
59
|
+
positions.value = [captureSnapshot()];
|
|
60
|
+
cursor.value = 0;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
undo,
|
|
64
|
+
redo,
|
|
65
|
+
clear,
|
|
66
|
+
canUndo: computed(() => cursor.value > 0),
|
|
67
|
+
canRedo: computed(() => cursor.value < positions.value.length - 1),
|
|
68
|
+
historySize: computed(() => positions.value.length),
|
|
69
|
+
dispose() {
|
|
70
|
+
unsubscribeChange();
|
|
71
|
+
positions.value = positions.value.slice(cursor.value, cursor.value + 1);
|
|
72
|
+
cursor.value = 0;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function historyPlugin(options) {
|
|
77
|
+
const max = normalizeNumericOption({
|
|
78
|
+
value: options?.max ?? DEFAULT_HISTORY_MAX_SNAPSHOTS,
|
|
79
|
+
source: "historyPlugin({ max })",
|
|
80
|
+
allowInfinity: false,
|
|
81
|
+
min: 0,
|
|
82
|
+
defaultValue: DEFAULT_HISTORY_MAX_SNAPSHOTS
|
|
83
|
+
});
|
|
84
|
+
return {
|
|
85
|
+
attach: (kernel) => createHistoryRuntime(kernel, max)
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export { historyPlugin };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform-dev.Dr2YzS5B.mjs';
|
|
2
|
+
export { A as AttaformErrorCode, D as DEFAULT_TIMINGS, d as defaultCoercionRules, a as defaultDisplayState, b as defineCoercion, e as escapeForInlineScript, g as gate, i as injectForm, c as injectWizard, f as isUnset, l as lazy, m as makeDefaultDisplayState, u as unset, j as useRegister, k as useWizard } from './shared/attaform-dev.WmuhD_CZ.mjs';
|
|
3
|
+
export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform-dev.BXE2cr0L.mjs';
|
|
4
|
+
export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.P7cseiEG.mjs';
|
|
5
|
+
export { f as fieldMeta, u as useForm, w as withMeta } from './shared/attaform-dev.BR8u0YOZ.mjs';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineNuxtPlugin, useRuntimeConfig, useRoute } from 'nuxt/app';
|
|
2
|
+
import { c as createAttaform, b as kAttaformWizardActiveStepResolver, r as renderAttaformState, h as hydrateAttaformState, g as getRegistryFromApp, D as DEVTOOLS_WINDOW_KEY } from '../../shared/attaform-dev.BXE2cr0L.mjs';
|
|
3
|
+
|
|
4
|
+
var attaform_default = defineNuxtPlugin({
|
|
5
|
+
// `enforce: 'pre'` makes the "we run before any component's setup" claim
|
|
6
|
+
// explicit. Combined with `prepend: true` on the addPlugin call in
|
|
7
|
+
// src/nuxt.ts, this guarantees hydration is staged into pendingHydration
|
|
8
|
+
// before any user plugin or page can call `useForm`. Without it, a user
|
|
9
|
+
// plugin running first would observe an empty registry and skip hydration.
|
|
10
|
+
enforce: "pre",
|
|
11
|
+
setup(nuxtApp) {
|
|
12
|
+
const isServer = import.meta.server;
|
|
13
|
+
const config = useRuntimeConfig().public;
|
|
14
|
+
const { defaults, version } = config.attaform;
|
|
15
|
+
nuxtApp.vueApp.use(createAttaform({ ssr: isServer, defaults }));
|
|
16
|
+
nuxtApp.vueApp.provide(kAttaformWizardActiveStepResolver, (param) => {
|
|
17
|
+
const value = useRoute().query[param];
|
|
18
|
+
if (typeof value === "string") return value;
|
|
19
|
+
if (Array.isArray(value) && typeof value[0] === "string") return value[0];
|
|
20
|
+
return void 0;
|
|
21
|
+
});
|
|
22
|
+
if (isServer) {
|
|
23
|
+
nuxtApp.hook("app:rendered", () => {
|
|
24
|
+
const state = renderAttaformState(nuxtApp.vueApp);
|
|
25
|
+
nuxtApp.payload.attaform = state;
|
|
26
|
+
});
|
|
27
|
+
} else {
|
|
28
|
+
const serialized = nuxtApp.payload.attaform;
|
|
29
|
+
if (serialized !== void 0) {
|
|
30
|
+
hydrateAttaformState(nuxtApp.vueApp, serialized);
|
|
31
|
+
}
|
|
32
|
+
if (import.meta.dev) {
|
|
33
|
+
const registry = getRegistryFromApp(nuxtApp.vueApp);
|
|
34
|
+
window[DEVTOOLS_WINDOW_KEY] = { registry, version };
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export { attaform_default as default };
|