attaform 0.20.1 → 0.20.2
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 +1 -1
- package/dist/chunks/devtools.cjs +2 -2
- package/dist/chunks/devtools.cjs.map +1 -1
- package/dist/chunks/devtools.mjs +2 -2
- package/dist/chunks/devtools.mjs.map +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/session-storage.cjs +1 -1
- package/dist/chunks/session-storage.mjs +1 -1
- 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.SfhU0OEY.d.cts → attaform.99cfHcIt.d.cts} +26 -9
- package/dist/shared/{attaform.SfhU0OEY.d.mts → attaform.99cfHcIt.d.mts} +26 -9
- package/dist/shared/{attaform.SfhU0OEY.d.ts → attaform.99cfHcIt.d.ts} +26 -9
- package/dist/shared/{attaform.tVkmQh5w.mjs → attaform.BGk8cfw2.mjs} +3 -3
- package/dist/shared/{attaform.tVkmQh5w.mjs.map → attaform.BGk8cfw2.mjs.map} +1 -1
- package/dist/shared/{attaform.GbDo_lJi.d.cts → attaform.BXinSW2T.d.mts} +1 -1
- package/dist/shared/{attaform.DHRWn-cu.cjs → attaform.B_hph5AE.cjs} +3 -3
- package/dist/shared/{attaform.DHRWn-cu.cjs.map → attaform.B_hph5AE.cjs.map} +1 -1
- package/dist/shared/{attaform.iWo9soNX.mjs → attaform.C5aYC_T8.mjs} +4 -4
- package/dist/shared/{attaform.iWo9soNX.mjs.map → attaform.C5aYC_T8.mjs.map} +1 -1
- package/dist/shared/{attaform.BrrXNmfK.cjs → attaform.Cd4AOfwu.cjs} +4 -4
- package/dist/shared/{attaform.BrrXNmfK.cjs.map → attaform.Cd4AOfwu.cjs.map} +1 -1
- package/dist/shared/{attaform.EZG6fOFb.mjs → attaform.CnrxbkB6.mjs} +2 -2
- package/dist/shared/{attaform.EZG6fOFb.mjs.map → attaform.CnrxbkB6.mjs.map} +1 -1
- package/dist/shared/{attaform.DLnE5bZa.cjs → attaform.CwLjUqmQ.cjs} +7 -3
- package/dist/shared/attaform.CwLjUqmQ.cjs.map +1 -0
- package/dist/shared/{attaform.DoKXru-a.d.mts → attaform.CywE4y8x.d.cts} +1 -1
- package/dist/shared/{attaform.BPxsYtTe.cjs → attaform.D2SCCd4O.cjs} +2 -2
- package/dist/shared/{attaform.BPxsYtTe.cjs.map → attaform.D2SCCd4O.cjs.map} +1 -1
- package/dist/shared/{attaform.BCBxTyMC.cjs → attaform.DAKrGhxc.cjs} +4 -4
- package/dist/shared/{attaform.BCBxTyMC.cjs.map → attaform.DAKrGhxc.cjs.map} +1 -1
- package/dist/shared/{attaform.Dl5kDY-A.d.ts → attaform.DN5CvZrg.d.ts} +1 -1
- package/dist/shared/{attaform.D5-1XGQU.d.cts → attaform.DbRgDFa7.d.cts} +1 -1
- package/dist/shared/{attaform.D6CwqkPx.mjs → attaform.Dt7dEcHk.mjs} +4 -4
- package/dist/shared/{attaform.D6CwqkPx.mjs.map → attaform.Dt7dEcHk.mjs.map} +1 -1
- package/dist/shared/{attaform.BKozEdTr.mjs → attaform.QG5TG8lB.mjs} +51 -35
- package/dist/shared/attaform.QG5TG8lB.mjs.map +1 -0
- package/dist/shared/{attaform.EMzJcQci.d.mts → attaform.ceGEAEMk.d.ts} +1 -1
- package/dist/shared/{attaform.Bh3ACtts.d.ts → attaform.sWm8B15V.d.mts} +1 -1
- package/dist/shared/{attaform.BqZuwLTK.mjs → attaform.tiWEVznj.mjs} +7 -3
- package/dist/shared/attaform.tiWEVznj.mjs.map +1 -0
- package/dist/shared/{attaform.BPy-4qRx.cjs → attaform.z5j3LwJz.cjs} +51 -34
- package/dist/shared/attaform.z5j3LwJz.cjs.map +1 -0
- package/dist/zod-v3.cjs +3 -3
- 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 +3 -3
- package/dist/zod-v4.cjs +3 -3
- 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 +3 -3
- 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 +6 -6
- package/package.json +3 -3
- package/dist/shared/attaform.BKozEdTr.mjs.map +0 -1
- package/dist/shared/attaform.BPy-4qRx.cjs.map +0 -1
- package/dist/shared/attaform.BqZuwLTK.mjs.map +0 -1
- package/dist/shared/attaform.DLnE5bZa.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as FormKey, ae as SlimPrimitiveKind, C as CoercionEntry, g as CoercionRegistry, G as GenericForm, T as PathKey, S as Path, am as ValidationError, A as AbstractSchema, x as GetDisplayState, aq as WriteMeta, D as DeepPartial, ar as WriteShape, ak as ValidateOn, Y as PersistOptInRegistry, f as AttaformDefaults, aj as UseFormReturnType, a8 as RegisterValue } from './attaform.
|
|
1
|
+
import { t as FormKey, ae as SlimPrimitiveKind, C as CoercionEntry, g as CoercionRegistry, G as GenericForm, T as PathKey, S as Path, am as ValidationError, A as AbstractSchema, x as GetDisplayState, aq as WriteMeta, D as DeepPartial, ar as WriteShape, ak as ValidateOn, Y as PersistOptInRegistry, f as AttaformDefaults, aj as UseFormReturnType, a8 as RegisterValue } from './attaform.99cfHcIt.js';
|
|
2
2
|
import { Ref, ComputedRef, App, InjectionKey } from 'vue';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as FormKey, ae as SlimPrimitiveKind, C as CoercionEntry, g as CoercionRegistry, G as GenericForm, T as PathKey, S as Path, am as ValidationError, A as AbstractSchema, x as GetDisplayState, aq as WriteMeta, D as DeepPartial, ar as WriteShape, ak as ValidateOn, Y as PersistOptInRegistry, f as AttaformDefaults, aj as UseFormReturnType, a8 as RegisterValue } from './attaform.
|
|
1
|
+
import { t as FormKey, ae as SlimPrimitiveKind, C as CoercionEntry, g as CoercionRegistry, G as GenericForm, T as PathKey, S as Path, am as ValidationError, A as AbstractSchema, x as GetDisplayState, aq as WriteMeta, D as DeepPartial, ar as WriteShape, ak as ValidateOn, Y as PersistOptInRegistry, f as AttaformDefaults, aj as UseFormReturnType, a8 as RegisterValue } from './attaform.99cfHcIt.mjs';
|
|
2
2
|
import { Ref, ComputedRef, App, InjectionKey } from 'vue';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, ref, watchEffect, getCurrentScope, onScopeDispose, shallowReadonly, readonly, reactive, toRaw, watch, markRaw, shallowRef, getCurrentInstance, onServerPrefetch, provide, useId, inject, effectScope, nextTick } from 'vue';
|
|
2
|
-
import { _ as __DEV__, j as canonicalizePath,
|
|
2
|
+
import { _ as __DEV__, j as canonicalizePath, G as segmentsForPathKey, t as isPathPrefix, b as FORM_ERRORS_PATH_KEY, S as SubmitErrorHandlerError, A as AnonPersistError, k as captureUserCallSite, I as INTERACTIVE_TAG_NAMES, r as getOrAssignElementId, e as ROOT_PATH_KEY, R as ROOT_PATH, h as allowSensitivePersist, F as FORM_ERRORS_PATH, l as coerceToPathKey, v as isSensitivePath, o as createPersistOptInRegistry, d as InvalidUseFormConfigError, q as ensureAttaformInstalled, J as useRegistry, z as kFormContext, B as kFormInstanceId, g as ReservedFormKeyError, n as createIsSensitivePath, y as kAttaformWizardActiveStepResolver, w as kAttaformAncestorWizard } from './attaform.QG5TG8lB.mjs';
|
|
3
3
|
|
|
4
4
|
function safeAssign(target, key, value) {
|
|
5
5
|
if (key === "__proto__") {
|
|
@@ -2306,6 +2306,7 @@ function buildRegister(state, formInstanceId, instanceConfig) {
|
|
|
2306
2306
|
const isRequired = state.schema.isRequiredAtPath(segments);
|
|
2307
2307
|
const ariaEnabled = options?.autoAria ?? formAutoAria;
|
|
2308
2308
|
const ariaDisplayState = getDisplayStateAt !== void 0 ? computed(() => getDisplayStateAt(segments)) : void 0;
|
|
2309
|
+
let boundElement = null;
|
|
2309
2310
|
const internalRv = {
|
|
2310
2311
|
innerRef,
|
|
2311
2312
|
displayValue,
|
|
@@ -2324,6 +2325,7 @@ function buildRegister(state, formInstanceId, instanceConfig) {
|
|
|
2324
2325
|
state.markInteracted(segments);
|
|
2325
2326
|
},
|
|
2326
2327
|
registerElement: (element) => {
|
|
2328
|
+
boundElement = element;
|
|
2327
2329
|
if (!INTERACTIVE_TAG_NAMES.has(element.tagName)) return;
|
|
2328
2330
|
const added = state.registerElement(segments, element, formInstanceId);
|
|
2329
2331
|
if (added) attachFocusListeners(state, segments, element, instanceMeta);
|
|
@@ -2331,9 +2333,11 @@ function buildRegister(state, formInstanceId, instanceConfig) {
|
|
|
2331
2333
|
deregisterElement: (element) => {
|
|
2332
2334
|
detachFocusListeners(element);
|
|
2333
2335
|
state.deregisterElement(segments, element);
|
|
2336
|
+
if (boundElement === element) boundElement = null;
|
|
2334
2337
|
},
|
|
2335
2338
|
setValueWithInternalPath: (value, meta) => {
|
|
2336
|
-
|
|
2339
|
+
const resolvedMeta = meta === void 0 && boundElement !== null ? { persist: state.persistOptIns.hasOptIn(getOrAssignElementId(boundElement), pathKey) } : meta;
|
|
2340
|
+
return state.setValueAtPath(segments, value, withInstanceMeta(resolvedMeta));
|
|
2337
2341
|
},
|
|
2338
2342
|
// Called by the `vRegisterHint` compile-time transform's wrapping
|
|
2339
2343
|
// IIFE on every server-side render of `<element v-register="…">`.
|
|
@@ -7203,4 +7207,4 @@ function warnIfAmbientWizardProviderHadDuplicates() {
|
|
|
7203
7207
|
}
|
|
7204
7208
|
|
|
7205
7209
|
export { AttaformErrorCode as A, defaultDisplayState as a, defineCoercion as b, injectWizard as c, defaultCoercionRules as d, isPlainRecord as e, isUnset as f, getAtPath as g, humanize as h, injectForm as i, safeOwnRead as j, setAtPath as k, lazy as l, slimKindOf as m, normalizeNumericOption as n, useAbstractForm as o, useWizard as p, safeAssign as s, unset as u };
|
|
7206
|
-
//# sourceMappingURL=attaform.
|
|
7210
|
+
//# sourceMappingURL=attaform.tiWEVznj.mjs.map
|