attaform 0.28.0 → 0.30.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 -5
- package/dist/abstract.mjs +4 -4
- package/dist/dev/abstract.mjs +4 -4
- package/dist/dev/chunks/dev-key-collision-warnings.mjs +47 -8
- package/dist/dev/chunks/devtools.mjs +1 -1
- package/dist/dev/directive.mjs +1 -1
- package/dist/dev/history.mjs +1 -2
- package/dist/dev/index.mjs +5 -5
- package/dist/dev/runtime/plugins/attaform.mjs +3 -3
- package/dist/dev/shared/{attaform-dev.oYrkP9dj.mjs → attaform-dev.BK6Ge2qR.mjs} +80 -341
- package/dist/dev/shared/{attaform-dev.Dr2YzS5B.mjs → attaform-dev.BQc5QV3Y.mjs} +11 -19
- package/dist/dev/shared/{attaform-dev.BR8u0YOZ.mjs → attaform-dev.BcNtyOmf.mjs} +4 -4
- package/dist/{shared/attaform.h0i6LijT.mjs → dev/shared/attaform-dev.BcYT6tFh.mjs} +152 -20
- package/dist/dev/shared/{attaform-dev.6qxD-Yqo.mjs → attaform-dev.BisFstxh.mjs} +227 -88
- package/dist/dev/shared/{attaform-dev.WmuhD_CZ.mjs → attaform-dev.CQ2rJiAX.mjs} +833 -656
- package/dist/dev/shared/{attaform-dev.P7cseiEG.mjs → attaform-dev.D6CLvaQT.mjs} +20 -11
- package/dist/dev/shared/{attaform-dev.D2I8e_Mm.mjs → attaform-dev.DTrHonpc.mjs} +225 -238
- package/dist/dev/shared/{attaform-dev.BXE2cr0L.mjs → attaform-dev.DUZckyV8.mjs} +1 -3
- package/dist/dev/zod-v3.mjs +6 -6
- package/dist/dev/zod-v4.mjs +6 -6
- package/dist/dev/zod.mjs +5 -5
- package/dist/directive.d.mts +2 -2
- package/dist/directive.mjs +1 -1
- package/dist/history.d.mts +1 -1
- package/dist/history.mjs +1 -2
- package/dist/index.d.mts +9 -7
- package/dist/index.mjs +5 -5
- package/dist/nuxt.d.mts +11 -20
- package/dist/nuxt.mjs +0 -1
- package/dist/runtime/plugins/attaform.mjs +3 -3
- package/dist/shared/{attaform.uLbun31C.mjs → attaform.B3resMQ1.mjs} +19 -11
- package/dist/shared/{attaform.Cs2Rbdlo.mjs → attaform.BK0cgu2K.mjs} +123 -139
- package/dist/{dev/shared/attaform-dev.By4PRjt0.mjs → shared/attaform.BRDDQeHV.mjs} +136 -26
- package/dist/shared/{attaform.NLmerepI.mjs → attaform.BXneBxEj.mjs} +71 -334
- package/dist/shared/{attaform.D6DCnnQu.mjs → attaform.ByWP6kSx.mjs} +4 -4
- package/dist/shared/{attaform.CJP3RkGa.mjs → attaform.CJ8DpRGj.mjs} +223 -238
- package/dist/shared/{attaform.C09fpdLS.mjs → attaform.CUfrMK7t.mjs} +227 -88
- package/dist/shared/{attaform.wfY8XFvm.mjs → attaform.CdZIEf7_.mjs} +11 -19
- package/dist/shared/{attaform.JfSWdEcb.d.mts → attaform.Clz0ArIi.d.mts} +1 -1
- package/dist/shared/{attaform.B8k8JrmK.mjs → attaform.DNJOWjQw.mjs} +826 -612
- package/dist/shared/{attaform.B4VkS43-.d.mts → attaform.Rc9u4Vfw.d.mts} +1 -1
- package/dist/shared/{attaform.D5V4tZWq.d.mts → attaform.UGyOK83T.d.mts} +200 -218
- package/dist/shared/{attaform.Dq4vWxuG.mjs → attaform.WiGdIqgx.mjs} +1 -3
- package/dist/shared/{attaform.Cgu-hdSb.d.mts → attaform.bKLzMU0o.d.mts} +321 -523
- package/dist/transforms.d.mts +0 -22
- package/dist/transforms.mjs +1 -1
- package/dist/vite.d.mts +13 -4
- package/dist/vite.mjs +8 -2
- package/dist/zod-v3.d.mts +6 -4
- package/dist/zod-v3.mjs +6 -6
- package/dist/zod-v4.d.mts +18 -31
- package/dist/zod-v4.mjs +6 -6
- package/dist/zod.d.mts +4 -4
- package/dist/zod.mjs +5 -5
- package/package.json +19 -15
- package/skills/attaform/SKILL.md +6 -3
- package/skills/attaform/references/custom-components.md +8 -3
- package/skills/attaform/references/errors.md +8 -3
- package/skills/attaform/references/saving.md +77 -0
- package/skills/attaform/references/wizards.md +10 -8
- package/dist/chunks/fingerprint.mjs +0 -183
- package/dist/chunks/fingerprint2.mjs +0 -159
- package/dist/dev/chunks/fingerprint.mjs +0 -183
- package/dist/dev/chunks/fingerprint2.mjs +0 -159
- package/dist/dev/shared/attaform-dev.BJGA_UOS.mjs +0 -36
- package/dist/shared/attaform.BJGA_UOS.mjs +0 -36
package/dist/dev/zod-v4.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import { i as installingFieldMetaStore, g as getFieldMetaForSchema } from './shared/attaform-dev.
|
|
3
|
-
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.
|
|
4
|
-
export { A as AttaformErrorCode,
|
|
5
|
-
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.
|
|
6
|
-
export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.
|
|
1
|
+
export { a as assertZodVersion, k as kindOf, u as useForm, z as zodAdapter } from './shared/attaform-dev.BK6Ge2qR.mjs';
|
|
2
|
+
import { i as installingFieldMetaStore, g as getFieldMetaForSchema } from './shared/attaform-dev.BisFstxh.mjs';
|
|
3
|
+
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.BQc5QV3Y.mjs';
|
|
4
|
+
export { A as AttaformErrorCode, e as escapeForInlineScript, g as gate, i as injectForm, a as injectWizard, b as isUnset, l as lazy, u as unset, d as useRegister, f as useWizard } from './shared/attaform-dev.CQ2rJiAX.mjs';
|
|
5
|
+
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.DUZckyV8.mjs';
|
|
6
|
+
export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.D6CLvaQT.mjs';
|
|
7
7
|
|
|
8
8
|
const fieldMeta = installingFieldMetaStore;
|
|
9
9
|
function withMeta(schema, payload) {
|
package/dist/dev/zod.mjs
CHANGED
|
@@ -1,5 +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.
|
|
2
|
-
export { A as AttaformErrorCode,
|
|
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.
|
|
4
|
-
export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.
|
|
5
|
-
export { f as fieldMeta, u as useForm, w as withMeta } from './shared/attaform-dev.
|
|
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.BQc5QV3Y.mjs';
|
|
2
|
+
export { A as AttaformErrorCode, e as escapeForInlineScript, g as gate, i as injectForm, a as injectWizard, b as isUnset, l as lazy, u as unset, d as useRegister, f as useWizard } from './shared/attaform-dev.CQ2rJiAX.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.DUZckyV8.mjs';
|
|
4
|
+
export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.D6CLvaQT.mjs';
|
|
5
|
+
export { f as fieldMeta, u as useForm, w as withMeta } from './shared/attaform-dev.BcNtyOmf.mjs';
|
package/dist/directive.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { i as installVRegister, v as vRegister } from './shared/attaform.
|
|
2
|
-
import {
|
|
1
|
+
export { i as installVRegister, v as vRegister } from './shared/attaform.Clz0ArIi.mjs';
|
|
2
|
+
import { ao as RegisterModelDynamicCustomDirective } from './shared/attaform.bKLzMU0o.mjs';
|
|
3
3
|
import 'vue';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/directive.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { i as installVRegister, v as vRegister, b as vRegisterFile } from './shared/attaform.
|
|
1
|
+
export { i as installVRegister, v as vRegister, b as vRegisterFile } from './shared/attaform.B3resMQ1.mjs';
|
package/dist/history.d.mts
CHANGED
package/dist/history.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowRef, computed } from 'vue';
|
|
2
|
-
import { n as normalizeNumericOption, D as DEFAULT_HISTORY_MAX_SNAPSHOTS, s as structuralSnapshot } from './shared/attaform.
|
|
2
|
+
import { n as normalizeNumericOption, D as DEFAULT_HISTORY_MAX_SNAPSHOTS, s as structuralSnapshot } from './shared/attaform.BRDDQeHV.mjs';
|
|
3
3
|
|
|
4
4
|
function captureErrorCells(map) {
|
|
5
5
|
const out = [];
|
|
@@ -77,7 +77,6 @@ function historyPlugin(options) {
|
|
|
77
77
|
const max = normalizeNumericOption({
|
|
78
78
|
value: options?.max ?? DEFAULT_HISTORY_MAX_SNAPSHOTS,
|
|
79
79
|
source: "historyPlugin({ max })",
|
|
80
|
-
allowInfinity: false,
|
|
81
80
|
min: 0,
|
|
82
81
|
defaultValue: DEFAULT_HISTORY_MAX_SNAPSHOTS
|
|
83
82
|
});
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
export { a as AnyForm, b as AttaformDevtoolsBridge, c as AttaformError, d as AttaformErrorCode, e as AttaformPluginOptions, A as AttaformRegistry, C as CompiledStep, D as
|
|
2
|
-
import { G as GenericForm, F as FormKey, U as UseFormConfiguration,
|
|
3
|
-
|
|
4
|
-
export { v as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export { a as AnyForm, b as AttaformDevtoolsBridge, c as AttaformError, d as AttaformErrorCode, e as AttaformPluginOptions, A as AttaformRegistry, C as CompiledStep, D as DEVTOOLS_WINDOW_KEY, F as FormStatus, f as FormStatusSeed, G as GateMarker, I as InjectWizardInput, g as InvalidPathError, h as InvalidUseFormConfigError, L as LazyMarker, O as OutsideSetupError, R as RegistryNotInstalledError, i as ReservedFormKeyError, S as SerializedAttaformState, j as SerializedFormData, k as StepSlot, l as SubmitErrorHandlerError, U as UseRegisterOptions, m as UseRegisterReturn, n as UseWizardReturnType, W as WizardAggregateError, o as WizardCtx, p as WizardCtxForm, q as WizardOnError, r as WizardOnSubmit, s as WizardOptions, t as WizardPersistFn, u as WizardRestoreFn, v as WizardRestoreState, w as WizardStatusesProxy, x as WizardSubmitContext, y as assignKey, z as createAttaform, B as createRegistry, E as escapeForInlineScript, H as gate, J as getRegistryFromApp, K as hydrateAttaformState, M as injectForm, N as injectWizard, P as isRegisterValue, Q as kAttaformRegistry, T as lazy, V as renderAttaformState, X as useRegister, Y as useRegistry, Z as useWizard } from './shared/attaform.UGyOK83T.mjs';
|
|
2
|
+
import { G as GenericForm, F as FormKey, U as UseFormConfiguration, aq as AcceptableDefaults, ac as ValidateOnConfig, a as UseFormReturnType, D as DefaultValuesInput, h as FieldMetaPayload } from './shared/attaform.bKLzMU0o.mjs';
|
|
3
|
+
import { AbstractSchema } from './abstract.mjs';
|
|
4
|
+
export { b as ArrayItem, c as ArrayPath, C as CustomDirectiveRegisterAssignerFn, d as DeepPartial, e as DefaultValuesShape, f as DisplayState, E as ErrorInput, g as ErrorsProxyShape, i as FieldState, j as FieldStateMap, k as FieldStateMapEntry, l as FlatPath, m as FormErrorRecord, n as FormErrorsSurface, o as FormMeta, H as HandleSubmit, p as HistoryPlugin, I as IsTuple, q as IsUnion, J as JoinSegments, r as Json, K as KeyofUnion, L as LiftedValueShape, M as MetaTrackerValue, N as NestedReadType, s as NestedType, O as OnError, t as OnSubmit, P as ParseOptions, u as PartialFlatPath, v as Path, w as PathKey, x as PendingValidationStatus, y as Primitive, R as ROOT_PATH, z as ROOT_PATH_KEY, B as ReactiveValidationStatus, Q as RecordPath, S as RecordValue, T as RegisterDirective, V as RegisterFlatPath, W as RegisterOptions, X as RegisterSelectModifier, Y as RegisterTextModifier, Z as RegisterTransform, _ as RegisterValue, $ as SchemaDefaultsResult, a0 as SchemaParseErrorWithData, a1 as SchemaParseErrorWithoutData, a2 as SchemaParseResult, a3 as SchemaParseSuccess, a4 as Segment, a5 as SetValueCallback, a6 as SetValuePayload, a7 as SettledValidationStatus, a8 as SlimPrimitiveKind, a9 as SubmitHandler, aa as Unset, ab as ValidateOn, ad as ValidationError, ae as ValidationResponse, af as ValidationResponseWithoutValue, ag as ValueOfUnion, ah as WriteMeta, ai as WriteShape, aj as canonicalizePath, ak as isPathPrefix, al as isUnset, am as parseDottedPath, an as unset } from './shared/attaform.bKLzMU0o.mjs';
|
|
5
|
+
export { v as vRegister } from './shared/attaform.Clz0ArIi.mjs';
|
|
6
|
+
import { S as SupportedRootSchema, b as StorageShape } from './shared/attaform.Rc9u4Vfw.mjs';
|
|
7
|
+
export { P as PathInput, a as PathOutput } from './shared/attaform.Rc9u4Vfw.mjs';
|
|
8
|
+
import { S as SupportedRootSchema$1, a as StorageShape$1 } from './shared/attaform.DRUT703x.mjs';
|
|
9
|
+
import { UnwrapZodRoot } from './zod-v3.mjs';
|
|
8
10
|
import { z } from 'zod';
|
|
9
11
|
import 'vue';
|
|
10
12
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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.
|
|
2
|
-
export { A as AttaformErrorCode,
|
|
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.
|
|
4
|
-
export { a as assignKey, v as vRegister } from './shared/attaform.
|
|
5
|
-
export { f as fieldMeta, u as useForm, w as withMeta } from './shared/attaform.
|
|
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.CdZIEf7_.mjs';
|
|
2
|
+
export { A as AttaformErrorCode, e as escapeForInlineScript, g as gate, i as injectForm, a as injectWizard, b as isUnset, l as lazy, u as unset, d as useRegister, f as useWizard } from './shared/attaform.DNJOWjQw.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.WiGdIqgx.mjs';
|
|
4
|
+
export { a as assignKey, v as vRegister } from './shared/attaform.B3resMQ1.mjs';
|
|
5
|
+
export { f as fieldMeta, u as useForm, w as withMeta } from './shared/attaform.ByWP6kSx.mjs';
|
|
6
6
|
export { i as isRegisterValue } from './shared/attaform.KvlEedlF.mjs';
|
package/dist/nuxt.d.mts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
-
import { d as AttaformDefaults } from './shared/attaform.Cgu-hdSb.mjs';
|
|
3
|
-
import 'vue';
|
|
4
2
|
|
|
5
3
|
/**
|
|
6
4
|
* Options accepted by `attaform/nuxt` under the `attaform`
|
|
@@ -11,18 +9,12 @@ import 'vue';
|
|
|
11
9
|
* export default defineNuxtConfig({
|
|
12
10
|
* modules: ['attaform/nuxt'],
|
|
13
11
|
* attaform: {
|
|
14
|
-
*
|
|
12
|
+
* autoImports: false,
|
|
15
13
|
* },
|
|
16
14
|
* })
|
|
17
15
|
* ```
|
|
18
16
|
*/
|
|
19
17
|
interface AttaformModuleOptions {
|
|
20
|
-
/**
|
|
21
|
-
* App-level defaults applied to every `useForm` call. Per-form
|
|
22
|
-
* options always win. See `AttaformDefaults` for the
|
|
23
|
-
* supported option set and merge rules.
|
|
24
|
-
*/
|
|
25
|
-
defaults?: AttaformDefaults;
|
|
26
18
|
/**
|
|
27
19
|
* Forwarded to `attaform/vite`'s `resolveZodAlias` option.
|
|
28
20
|
* Default `true` — `attaform` and `attaform/zod` imports are rewritten
|
|
@@ -33,25 +25,24 @@ interface AttaformModuleOptions {
|
|
|
33
25
|
resolveZodAlias?: boolean;
|
|
34
26
|
/**
|
|
35
27
|
* Auto-import Attaform's form composables (`useForm`, `useWizard`,
|
|
36
|
-
* `injectForm`, `injectWizard`, `fieldMeta`, `withMeta`, `lazy
|
|
37
|
-
* components can call them without an
|
|
38
|
-
* `true`. The set is declared in
|
|
39
|
-
* resolves from `attaform/zod`,
|
|
40
|
-
* still ships a single Zod major.
|
|
41
|
-
*
|
|
42
|
-
* auto-import already loses to an
|
|
43
|
-
* same name, so opting out is only
|
|
44
|
-
* global scope altogether.
|
|
28
|
+
* `injectForm`, `injectWizard`, `fieldMeta`, `withMeta`, `lazy`,
|
|
29
|
+
* `gate`, `useRegister`) so components can call them without an
|
|
30
|
+
* explicit `import`. Default `true`. The set is declared in
|
|
31
|
+
* Attaform's auto-import manifest and resolves from `attaform/zod`,
|
|
32
|
+
* so the build-time adapter rewrite still ships a single Zod major.
|
|
33
|
+
* Set to `false` to suppress the names entirely and import the
|
|
34
|
+
* composables yourself. Note a Nuxt auto-import already loses to an
|
|
35
|
+
* explicit or local binding of the same name, so opting out is only
|
|
36
|
+
* needed to keep the names out of global scope altogether.
|
|
45
37
|
*/
|
|
46
38
|
autoImports?: boolean;
|
|
47
39
|
}
|
|
48
40
|
/**
|
|
49
41
|
* Shape of the Nuxt public runtime-config slot the module populates.
|
|
50
42
|
* Reach it via `useRuntimeConfig().public.attaform` if you need to
|
|
51
|
-
* read the
|
|
43
|
+
* read the library version outside the form library itself.
|
|
52
44
|
*/
|
|
53
45
|
type AttaformRuntimeConfig = {
|
|
54
|
-
defaults: AttaformDefaults;
|
|
55
46
|
/**
|
|
56
47
|
* Library version, read from the package's own `package.json` at
|
|
57
48
|
* module setup. Surfaced to the runtime plugin so the DevTools
|
package/dist/nuxt.mjs
CHANGED
|
@@ -34,7 +34,6 @@ var nuxt_default = defineNuxtModule({
|
|
|
34
34
|
addVitePlugin(attaform({ resolveZodAlias: _options.resolveZodAlias !== false }));
|
|
35
35
|
const runtimePublic = nuxt.options.runtimeConfig.public;
|
|
36
36
|
runtimePublic["attaform"] = {
|
|
37
|
-
defaults: _options.defaults ?? {},
|
|
38
37
|
version: pkgVersion
|
|
39
38
|
};
|
|
40
39
|
(_a = nuxt.options.vite).optimizeDeps ?? (_a.optimizeDeps = {});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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.
|
|
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.WiGdIqgx.mjs';
|
|
3
3
|
|
|
4
4
|
var attaform_default = defineNuxtPlugin({
|
|
5
5
|
// `enforce: 'pre'` makes the "we run before any component's setup" claim
|
|
@@ -11,8 +11,8 @@ var attaform_default = defineNuxtPlugin({
|
|
|
11
11
|
setup(nuxtApp) {
|
|
12
12
|
const isServer = import.meta.server;
|
|
13
13
|
const config = useRuntimeConfig().public;
|
|
14
|
-
const {
|
|
15
|
-
nuxtApp.vueApp.use(createAttaform({ ssr: isServer
|
|
14
|
+
const { version } = config.attaform;
|
|
15
|
+
nuxtApp.vueApp.use(createAttaform({ ssr: isServer }));
|
|
16
16
|
nuxtApp.vueApp.provide(kAttaformWizardActiveStepResolver, (param) => {
|
|
17
17
|
const value = useRoute().query[param];
|
|
18
18
|
if (typeof value === "string") return value;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { reactive, markRaw, effectScope, watch, nextTick } from 'vue';
|
|
2
2
|
import { i as isRegisterValue, a as isTransforming, S as SSR_COMPONENT_HOST_MODIFIER, R as REGISTER_OWNER_MARKER, b as V_REGISTER_MARKER } from './attaform.KvlEedlF.mjs';
|
|
3
|
-
import { e as canonicalizePath } from './attaform.
|
|
3
|
+
import { e as canonicalizePath } from './attaform.CdZIEf7_.mjs';
|
|
4
4
|
|
|
5
5
|
const INTERACTIVE_TAG_NAMES = /* @__PURE__ */ new Set(["INPUT", "SELECT", "TEXTAREA"]);
|
|
6
6
|
|
|
@@ -271,7 +271,7 @@ function isCheckboxInput(tagName, type) {
|
|
|
271
271
|
return tagName === "INPUT" && typeof type === "string" && type.toLowerCase() === "checkbox";
|
|
272
272
|
}
|
|
273
273
|
function applyAria(el, rv, vnode) {
|
|
274
|
-
if (rv.
|
|
274
|
+
if (rv.ariaDisplayState === void 0) return;
|
|
275
275
|
if (!INTERACTIVE_TAG_NAMES.has(el.tagName)) return;
|
|
276
276
|
const locks = el[ariaLockKey] ?? EMPTY_ARIA_LOCKS;
|
|
277
277
|
const ds = rv.ariaDisplayState.value;
|
|
@@ -286,7 +286,7 @@ function applyAria(el, rv, vnode) {
|
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
function setupAria(el, rv, vnode) {
|
|
289
|
-
if (rv.
|
|
289
|
+
if (rv.ariaDisplayState === void 0) return;
|
|
290
290
|
if (!INTERACTIVE_TAG_NAMES.has(el.tagName)) return;
|
|
291
291
|
mergeAriaLocks(el, vnode);
|
|
292
292
|
applyAria(el, rv, vnode);
|
|
@@ -308,7 +308,7 @@ function seedLocksFromDom(el) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
function setupAriaLive(el, rv) {
|
|
311
|
-
if (rv.
|
|
311
|
+
if (rv.ariaDisplayState === void 0) return;
|
|
312
312
|
if (!INTERACTIVE_TAG_NAMES.has(el.tagName)) return;
|
|
313
313
|
seedLocksFromDom(el);
|
|
314
314
|
applyAria(el, rv, null);
|
|
@@ -320,7 +320,7 @@ function setupAriaLive(el, rv) {
|
|
|
320
320
|
el[ariaScopeKey] = () => scope.stop();
|
|
321
321
|
}
|
|
322
322
|
function getSSRAriaProps(rv, vnode) {
|
|
323
|
-
if (rv.
|
|
323
|
+
if (rv.ariaDisplayState === void 0) return void 0;
|
|
324
324
|
const props = vnode?.props ?? null;
|
|
325
325
|
const ds = rv.ariaDisplayState.value;
|
|
326
326
|
const tagName = typeof vnode?.type === "string" ? vnode.type.toUpperCase() : "";
|
|
@@ -1107,6 +1107,14 @@ function setSelected(el, value) {
|
|
|
1107
1107
|
const externalValue = value.innerRef.value;
|
|
1108
1108
|
const isMultiple = el.multiple;
|
|
1109
1109
|
const isArrayValue = isArray(externalValue);
|
|
1110
|
+
const isUnset = externalValue === null || externalValue === void 0;
|
|
1111
|
+
if (isMultiple && isUnset) {
|
|
1112
|
+
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
1113
|
+
const option = el.options[i];
|
|
1114
|
+
if (option !== void 0) option.selected = false;
|
|
1115
|
+
}
|
|
1116
|
+
return;
|
|
1117
|
+
}
|
|
1110
1118
|
if (isMultiple && !isArrayValue && !isSet(externalValue)) {
|
|
1111
1119
|
return;
|
|
1112
1120
|
}
|
|
@@ -1134,10 +1142,11 @@ function setSelected(el, value) {
|
|
|
1134
1142
|
}
|
|
1135
1143
|
return;
|
|
1136
1144
|
}
|
|
1145
|
+
const target = value.displayValue.value === "" ? "" : externalValue;
|
|
1137
1146
|
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
1138
1147
|
const option = el.options[i];
|
|
1139
1148
|
if (!option) continue;
|
|
1140
|
-
if (looseEqual(applyCoerce(getValue(option), value),
|
|
1149
|
+
if (looseEqual(applyCoerce(getValue(option), value), target)) {
|
|
1141
1150
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
1142
1151
|
return;
|
|
1143
1152
|
}
|
|
@@ -1221,8 +1230,7 @@ function observeForLateHostControl(el, rv) {
|
|
|
1221
1230
|
hostHealObservers.set(el, observer);
|
|
1222
1231
|
}
|
|
1223
1232
|
function activateComponentHost(el, rv) {
|
|
1224
|
-
if (rv.hasRegisteredDescendant(el))
|
|
1225
|
-
return;
|
|
1233
|
+
if (rv.hasRegisteredDescendant(el)) return;
|
|
1226
1234
|
el[REGISTER_OWNER_MARKER] = true;
|
|
1227
1235
|
if (!el.tagName.includes("-")) {
|
|
1228
1236
|
el.removeAttribute("registerValue");
|
|
@@ -1256,7 +1264,7 @@ const vRegisterDynamic = {
|
|
|
1256
1264
|
callModelHook(el, binding, vnode, prevVNode, "beforeUpdate");
|
|
1257
1265
|
const ariaEl = el;
|
|
1258
1266
|
const value = binding.value;
|
|
1259
|
-
if (!isRegisterValue(value) || value.
|
|
1267
|
+
if (!isRegisterValue(value) || value.ariaDisplayState === void 0) {
|
|
1260
1268
|
teardownAria(ariaEl);
|
|
1261
1269
|
} else {
|
|
1262
1270
|
const old = binding.oldValue;
|
|
@@ -1301,8 +1309,8 @@ const vRegisterDynamic = {
|
|
|
1301
1309
|
// The lifecycle hooks above don't run on the server (Vue skips
|
|
1302
1310
|
// directive lifecycle during SSR), so emit the same aria attributes
|
|
1303
1311
|
// here from the SSR-time gated display state. Honors authored attrs
|
|
1304
|
-
// (vnode-level lockout)
|
|
1305
|
-
//
|
|
1312
|
+
// (vnode-level lockout), touches no DOM, and shares
|
|
1313
|
+
// `resolveAriaValue` with the client path. Ids are SSR-stable
|
|
1306
1314
|
// (formInstanceId derives from Vue's useId), so a server-rendered
|
|
1307
1315
|
// describedby matches the client after hydration.
|
|
1308
1316
|
getSSRProps(binding, vnode) {
|