attaform 0.30.1 → 0.31.1
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/devtools.mjs +3 -3
- package/dist/dev/directive.mjs +1 -1
- package/dist/dev/history.mjs +15 -2
- package/dist/dev/index.mjs +5 -5
- package/dist/dev/runtime/plugins/attaform.mjs +1 -1
- package/dist/dev/shared/{attaform-dev.zlvDr0WB.mjs → attaform-dev.04aupFBW.mjs} +3 -2
- package/dist/dev/shared/{attaform-dev.DxHdkkPG.mjs → attaform-dev.3uTCYwy8.mjs} +770 -254
- package/dist/dev/shared/{attaform-dev.BJK1kqHY.mjs → attaform-dev.BpVGFSFa.mjs} +88 -115
- package/dist/dev/shared/{attaform-dev.Chm4D6SJ.mjs → attaform-dev.Bu6wgrA5.mjs} +3 -3
- package/dist/dev/shared/{attaform-dev.BMQ3GcgD.mjs → attaform-dev.Cbx0AiQF.mjs} +476 -337
- package/dist/dev/shared/attaform-dev.CwYTWyPX.mjs +120 -0
- package/dist/dev/shared/{attaform-dev.DuEE4GU1.mjs → attaform-dev.D7lKyM_7.mjs} +4 -4
- package/dist/dev/shared/{attaform-dev.CT7MDjPy.mjs → attaform-dev.OceE0X3v.mjs} +154 -229
- package/dist/{shared/attaform.DRsANMok.mjs → dev/shared/attaform-dev.PTGM9KE1.mjs} +16 -15
- package/dist/{shared/attaform.8mfKZCwH.mjs → dev/shared/attaform-dev.n6n00owJ.mjs} +49 -128
- 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 +15 -2
- package/dist/index.d.mts +16 -55
- package/dist/index.mjs +5 -5
- package/dist/runtime/components/AttaformDevtoolsPanel.vue +3 -3
- package/dist/runtime/plugins/attaform.mjs +1 -1
- package/dist/shared/{attaform.CO918TdU.mjs → attaform.B5b-HmhH.mjs} +88 -115
- package/dist/shared/{attaform.2FslhB9R.d.mts → attaform.B9PYKlhB.d.mts} +43 -19
- package/dist/shared/{attaform.D_f1WgYf.mjs → attaform.BPMOl562.mjs} +458 -319
- package/dist/{dev/shared/attaform-dev.CZz4GYZ6.mjs → shared/attaform.BPSqtU7a.mjs} +44 -156
- package/dist/shared/{attaform.CdZIEf7_.mjs → attaform.BhtAZysa.mjs} +3 -2
- package/dist/shared/{attaform.BcQwgWaq.d.mts → attaform.CYlF4P6X.d.mts} +58 -17
- package/dist/shared/{attaform.WiGdIqgx.mjs → attaform.CdA9bfRv.mjs} +3 -3
- package/dist/shared/{attaform.BIWicztt.mjs → attaform.DAf4ehIe.mjs} +765 -251
- package/dist/shared/{attaform.ZYn2ahzJ.mjs → attaform.DBCbxlyk.mjs} +59 -1
- package/dist/shared/{attaform.L0kUn3vL.d.mts → attaform.DZOynI6c.d.mts} +1 -1
- package/dist/shared/{attaform.B2iebkPA.mjs → attaform.KEfNRDot.mjs} +4 -4
- package/dist/shared/attaform._1Zp3mDG.mjs +96 -0
- package/dist/shared/{attaform.Br8EBn5B.d.mts → attaform.i13OEHJF.d.mts} +195 -38
- package/dist/{dev/shared/attaform-dev.BUIFcTYf.mjs → shared/attaform.j9xI_ObC.mjs} +16 -15
- package/dist/shared/{attaform.D_pt1gOj.mjs → attaform.u6jfHoed.mjs} +154 -229
- package/dist/transforms.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/zod-v3.d.mts +4 -4
- package/dist/zod-v3.mjs +6 -6
- package/dist/zod-v4.d.mts +22 -16
- package/dist/zod-v4.mjs +6 -6
- package/dist/zod.d.mts +4 -4
- package/dist/zod.mjs +5 -5
- package/package.json +2 -1
- package/skills/attaform/SKILL.md +2 -1
- package/skills/attaform/references/custom-components.md +4 -0
package/dist/abstract.d.mts
CHANGED
|
@@ -1,8 +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 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.
|
|
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, C as CustomDirectiveRegisterAssignerFn, d as DeepPartial, e as DefaultValuesShape, f as DisplayState, E as ErrorInput, g as ErrorsProxyShape, h as FieldMetaPayload, 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
|
|
5
|
-
export { v as vRegister } from './shared/attaform.
|
|
1
|
+
import { A as AttaformRegistry } from './shared/attaform.CYlF4P6X.mjs';
|
|
2
|
+
export { a as AnyForm, b as AttaformDevtoolsBridge, c as AttaformError, d as AttaformErrorCode, e as AttaformPluginOptions, 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.CYlF4P6X.mjs';
|
|
3
|
+
import { G as GenericForm, F as FormKey, U as UseFormConfiguration, A as AbstractSchema, D as DefaultValuesInput, a as UseFormReturnType } from './shared/attaform.i13OEHJF.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, h as FieldMetaPayload, 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 SchemaParseErrorWithData, a0 as SchemaParseErrorWithoutData, a1 as SchemaParseResult, a2 as SchemaParseSuccess, a3 as Segment, a4 as SetValueCallback, a5 as SetValuePayload, a6 as SettledValidationStatus, a7 as SlimPrimitiveKind, a8 as SubmitHandler, a9 as Unset, aa as ValidateOn, ab as ValidateOnConfig, ac as ValidationError, ad as ValidationResponse, ae as ValidationResponseWithoutValue, af as ValueOfUnion, ag as WriteMeta, ah as WriteShape, ai as canonicalizePath, aj as isPathPrefix, ak as isUnset, al as parseDottedPath, am as unset } from './shared/attaform.i13OEHJF.mjs';
|
|
5
|
+
export { v as vRegister } from './shared/attaform.DZOynI6c.mjs';
|
|
6
6
|
import 'vue';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/abstract.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
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, c as useAbstractForm, d as useRegister, f as useWizard } from './shared/attaform.
|
|
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.
|
|
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.
|
|
1
|
+
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, c as useAbstractForm, d as useRegister, f as useWizard } from './shared/attaform.DAf4ehIe.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.BhtAZysa.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.CdA9bfRv.mjs';
|
|
4
|
+
export { a as assignKey, v as vRegister } from './shared/attaform.BPMOl562.mjs';
|
|
5
5
|
export { i as isRegisterValue } from './shared/attaform.KvlEedlF.mjs';
|
package/dist/dev/abstract.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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, c as useAbstractForm, d as useRegister, f as useWizard } from './shared/attaform-dev.
|
|
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.
|
|
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.
|
|
1
|
+
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, c as useAbstractForm, d as useRegister, f as useWizard } from './shared/attaform-dev.3uTCYwy8.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.04aupFBW.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.Bu6wgrA5.mjs';
|
|
4
|
+
export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.Cbx0AiQF.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as canonicalizePath } from '../shared/attaform-dev.
|
|
1
|
+
import { e as canonicalizePath } from '../shared/attaform-dev.04aupFBW.mjs';
|
|
2
2
|
|
|
3
3
|
const INSPECTOR_ID = "attaform";
|
|
4
4
|
const TIMELINE_LAYER_ID = "attaform:events";
|
|
@@ -114,13 +114,13 @@ function wire(api, app, registry) {
|
|
|
114
114
|
}
|
|
115
115
|
];
|
|
116
116
|
payload.state["Schema Errors"] = [
|
|
117
|
-
...[...state.errorCells.entries()].filter(([, cell]) => cell.schema.length > 0).map(([k, cell]) => ({
|
|
117
|
+
...[...state.errorCells().entries()].filter(([, cell]) => cell.schema.length > 0).map(([k, cell]) => ({
|
|
118
118
|
key: String(k),
|
|
119
119
|
value: cell.schema
|
|
120
120
|
}))
|
|
121
121
|
];
|
|
122
122
|
payload.state["User Errors"] = [
|
|
123
|
-
...[...state.errorCells.entries()].filter(([, cell]) => cell.user.length > 0).map(([k, cell]) => ({
|
|
123
|
+
...[...state.errorCells().entries()].filter(([, cell]) => cell.user.length > 0).map(([k, cell]) => ({
|
|
124
124
|
key: String(k),
|
|
125
125
|
value: cell.user
|
|
126
126
|
}))
|
package/dist/dev/directive.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { b as installVRegister, v as vRegister, c as vRegisterFile } from './shared/attaform-dev.
|
|
1
|
+
export { b as installVRegister, v as vRegister, c as vRegisterFile } from './shared/attaform-dev.Cbx0AiQF.mjs';
|
package/dist/dev/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-dev.
|
|
2
|
+
import { n as normalizeNumericOption, D as DEFAULT_HISTORY_MAX_SNAPSHOTS, s as structuralSnapshot } from './shared/attaform-dev.n6n00owJ.mjs';
|
|
3
3
|
|
|
4
4
|
function captureErrorCells(map) {
|
|
5
5
|
const out = [];
|
|
@@ -10,11 +10,14 @@ function captureErrorCells(map) {
|
|
|
10
10
|
}
|
|
11
11
|
function createHistoryRuntime(kernel, max) {
|
|
12
12
|
const capacity = Math.max(1, max);
|
|
13
|
+
let generation = 0;
|
|
13
14
|
function captureSnapshot() {
|
|
14
15
|
return {
|
|
15
16
|
form: structuralSnapshot(kernel.form.value),
|
|
16
17
|
blankPaths: [...kernel.blankPaths],
|
|
17
|
-
errorCells: captureErrorCells(kernel.errorCells)
|
|
18
|
+
errorCells: captureErrorCells(kernel.errorCells()),
|
|
19
|
+
structure: kernel.captureStructure(),
|
|
20
|
+
generation
|
|
18
21
|
};
|
|
19
22
|
}
|
|
20
23
|
const positions = shallowRef([captureSnapshot()]);
|
|
@@ -35,7 +38,16 @@ function createHistoryRuntime(kernel, max) {
|
|
|
35
38
|
positions.value = next;
|
|
36
39
|
cursor.value = next.length - 1;
|
|
37
40
|
});
|
|
41
|
+
const unsubscribeReset = kernel.onReset(() => {
|
|
42
|
+
generation += 1;
|
|
43
|
+
const current = positions.value[cursor.value];
|
|
44
|
+
if (current === void 0) return;
|
|
45
|
+
const next = [...positions.value];
|
|
46
|
+
next[cursor.value] = { ...current, structure: kernel.captureStructure(), generation };
|
|
47
|
+
positions.value = next;
|
|
48
|
+
});
|
|
38
49
|
function restorePosition(snap) {
|
|
50
|
+
if (snap.generation === generation) kernel.restoreStructure(snap.structure);
|
|
39
51
|
suppressNext = true;
|
|
40
52
|
kernel.blankPaths.clear();
|
|
41
53
|
for (const key of snap.blankPaths) kernel.blankPaths.add(key);
|
|
@@ -68,6 +80,7 @@ function createHistoryRuntime(kernel, max) {
|
|
|
68
80
|
historySize: computed(() => positions.value.length),
|
|
69
81
|
dispose() {
|
|
70
82
|
unsubscribeChange();
|
|
83
|
+
unsubscribeReset();
|
|
71
84
|
positions.value = positions.value.slice(cursor.value, cursor.value + 1);
|
|
72
85
|
cursor.value = 0;
|
|
73
86
|
}
|
package/dist/dev/index.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, 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.
|
|
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.04aupFBW.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.3uTCYwy8.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.Bu6wgrA5.mjs';
|
|
4
|
+
export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.Cbx0AiQF.mjs';
|
|
5
|
+
export { f as fieldMeta, u as useForm, w as withMeta } from './shared/attaform-dev.D7lKyM_7.mjs';
|
|
@@ -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-dev.
|
|
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.Bu6wgrA5.mjs';
|
|
3
3
|
|
|
4
4
|
var attaform_default = defineNuxtPlugin({
|
|
5
5
|
// `enforce: 'pre'` makes the "we run before any component's setup" claim
|
|
@@ -114,7 +114,8 @@ const canonicalStringCache = /* @__PURE__ */ new Map();
|
|
|
114
114
|
const PATHKEY_TO_SEGMENTS_MAX = 4096;
|
|
115
115
|
const pathKeyToSegments = /* @__PURE__ */ new Map();
|
|
116
116
|
function rememberSegmentsForPathKey(key, segments) {
|
|
117
|
-
if (
|
|
117
|
+
if (pathKeyToSegments.has(key)) return;
|
|
118
|
+
if (pathKeyToSegments.size >= PATHKEY_TO_SEGMENTS_MAX) {
|
|
118
119
|
const oldest = pathKeyToSegments.keys().next().value;
|
|
119
120
|
if (oldest !== void 0) pathKeyToSegments.delete(oldest);
|
|
120
121
|
}
|
|
@@ -156,7 +157,7 @@ function canonicalizePath(input) {
|
|
|
156
157
|
return keyForSegments(input);
|
|
157
158
|
}
|
|
158
159
|
function keyForSegments(input) {
|
|
159
|
-
const segments =
|
|
160
|
+
const segments = input.map(normalizeSegment);
|
|
160
161
|
const key = JSON.stringify(segments);
|
|
161
162
|
rememberSegmentsForPathKey(key, segments);
|
|
162
163
|
return { segments, key };
|