attaform 0.30.0 → 0.31.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 +15 -21
- package/dist/abstract.mjs +3 -3
- package/dist/dev/abstract.mjs +4 -4
- package/dist/dev/chunks/devtools.mjs +4 -4
- package/dist/dev/directive.mjs +1 -1
- package/dist/dev/history.mjs +2 -2
- package/dist/dev/index.mjs +5 -5
- package/dist/dev/runtime/plugins/attaform.mjs +1 -1
- package/dist/dev/shared/{attaform-dev.DUZckyV8.mjs → attaform-dev.B1q-x9R9.mjs} +4 -4
- package/dist/dev/shared/{attaform-dev.BcYT6tFh.mjs → attaform-dev.CZz4GYZ6.mjs} +21 -9
- package/dist/dev/shared/{attaform-dev.BisFstxh.mjs → attaform-dev.Caibt7sb.mjs} +16 -15
- package/dist/dev/shared/{attaform-dev.DTrHonpc.mjs → attaform-dev.CtyqGia7.mjs} +176 -260
- package/dist/dev/shared/{attaform-dev.BK6Ge2qR.mjs → attaform-dev.DJ3nsWw6.mjs} +86 -122
- package/dist/dev/shared/{attaform-dev.BcNtyOmf.mjs → attaform-dev.DlaT4xGd.mjs} +4 -4
- package/dist/dev/shared/{attaform-dev.D6CLvaQT.mjs → attaform-dev.k5X47GMD.mjs} +520 -395
- package/dist/dev/shared/{attaform-dev.CQ2rJiAX.mjs → attaform-dev.y9x9Vp9F.mjs} +324 -234
- package/dist/dev/shared/{attaform-dev.BQc5QV3Y.mjs → attaform-dev.zlvDr0WB.mjs} +2 -2
- 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 +4 -4
- package/dist/directive.mjs +1 -1
- package/dist/esbuild.d.mts +11 -0
- package/dist/esbuild.mjs +1 -1
- package/dist/history.d.mts +3 -32
- package/dist/history.mjs +2 -2
- package/dist/index.d.mts +67 -70
- package/dist/index.mjs +4 -4
- package/dist/nuxt.d.mts +4 -3
- package/dist/nuxt.mjs +3 -6
- package/dist/rollup.d.mts +11 -0
- package/dist/rollup.mjs +1 -1
- package/dist/rspack.d.mts +19 -11
- package/dist/rspack.mjs +1 -1
- package/dist/runtime/components/AttaformDevtoolsPanel.vue +15 -15
- package/dist/runtime/components/DevtoolsValueTree.vue +2 -2
- package/dist/runtime/plugins/attaform.mjs +1 -1
- package/dist/shared/{attaform.BRDDQeHV.mjs → attaform.8mfKZCwH.mjs} +2 -2
- package/dist/shared/{attaform.DRUT703x.d.mts → attaform.B-Tb62qV.d.mts} +12 -12
- package/dist/shared/{attaform.v0fQtWyA.mjs → attaform.B1rH9ht6.mjs} +1 -1
- package/dist/shared/{attaform.DhnPb6nK.mjs → attaform.BAf3UNn4.mjs} +1 -1
- package/dist/shared/{attaform.BXneBxEj.mjs → attaform.BWUn8Kjy.mjs} +85 -121
- package/dist/shared/{attaform.WiGdIqgx.mjs → attaform.C4shmwyJ.mjs} +2 -2
- package/dist/shared/{attaform.Rc9u4Vfw.d.mts → attaform.CRVe8s82.d.mts} +83 -95
- package/dist/shared/attaform.D9RqPgGu.d.mts +42 -0
- package/dist/shared/attaform.DAo0QBmS.d.mts +2173 -0
- package/dist/shared/{attaform.BK0cgu2K.mjs → attaform.DBCbxlyk.mjs} +62 -4
- package/dist/shared/{attaform.CUfrMK7t.mjs → attaform.DL2nl_QR.mjs} +15 -14
- package/dist/shared/{attaform.DNJOWjQw.mjs → attaform.DNPJPOO7.mjs} +299 -218
- package/dist/shared/attaform.DZnrDrNb.d.mts +4657 -0
- package/dist/shared/{attaform.B3resMQ1.mjs → attaform.DxKQsqFZ.mjs} +496 -371
- package/dist/shared/{attaform.ByWP6kSx.mjs → attaform.L011tHgJ.mjs} +3 -3
- package/dist/shared/{attaform.CJ8DpRGj.mjs → attaform.LUPC-2Qg.mjs} +175 -257
- package/dist/transforms.d.mts +153 -26
- package/dist/transforms.mjs +1 -1
- package/dist/vite.d.mts +29 -52
- package/dist/vite.mjs +3 -3
- package/dist/webpack.d.mts +20 -12
- package/dist/webpack.mjs +1 -1
- package/dist/zod-v3.d.mts +90 -96
- package/dist/zod-v3.mjs +5 -5
- package/dist/zod-v4.d.mts +120 -118
- package/dist/zod-v4.mjs +5 -5
- package/dist/zod.d.mts +5 -5
- package/dist/zod.mjs +4 -4
- package/package.json +7 -6
- package/skills/attaform/SKILL.md +1 -1
- package/skills/attaform/references/custom-components.md +4 -0
- package/dist/shared/attaform.Clz0ArIi.d.mts +0 -44
- package/dist/shared/attaform.UGyOK83T.d.mts +0 -2366
- package/dist/shared/attaform.bKLzMU0o.d.mts +0 -4761
package/dist/zod.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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.
|
|
2
|
-
export { b as ArrayItem, c as ArrayPath, C as CustomDirectiveRegisterAssignerFn, d as DeepPartial, D as DefaultValuesInput, 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, F as FormKey, o as FormMeta, G as GenericForm, 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
|
|
3
|
-
export { v as vRegister } from './shared/attaform.
|
|
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.DAo0QBmS.mjs';
|
|
2
|
+
export { b as ArrayItem, c as ArrayPath, C as CustomDirectiveRegisterAssignerFn, d as DeepPartial, D as DefaultValuesInput, 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, F as FormKey, o as FormMeta, G as GenericForm, 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, U as UseFormConfiguration, a as UseFormReturnType, 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.DZnrDrNb.mjs';
|
|
3
|
+
export { v as vRegister } from './shared/attaform.D9RqPgGu.mjs';
|
|
4
4
|
export { UseFormConfig, UseFormConfigV3, UseFormConfigV4, UseFormReturn, UseFormReturnV3, UseFormReturnV4, fieldMeta, useForm, withMeta } from './index.mjs';
|
|
5
|
-
export { P as PathInput, a as PathOutput } from './shared/attaform.
|
|
5
|
+
export { P as PathInput, a as PathOutput } from './shared/attaform.CRVe8s82.mjs';
|
|
6
6
|
import 'vue';
|
|
7
|
-
import './shared/attaform.
|
|
7
|
+
import './shared/attaform.B-Tb62qV.mjs';
|
|
8
8
|
import 'zod';
|
package/dist/zod.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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.
|
|
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.
|
|
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.DNPJPOO7.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.C4shmwyJ.mjs';
|
|
4
|
+
export { a as assignKey, v as vRegister } from './shared/attaform.DxKQsqFZ.mjs';
|
|
5
|
+
export { f as fieldMeta, u as useForm, w as withMeta } from './shared/attaform.L011tHgJ.mjs';
|
|
6
6
|
export { i as isRegisterValue } from './shared/attaform.KvlEedlF.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "attaform",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"types": "./dist/index.d.mts",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"@commitlint/cli": "^21.0.1",
|
|
130
130
|
"@commitlint/config-conventional": "^21.0.1",
|
|
131
131
|
"@eslint/js": "^10.0.1",
|
|
132
|
-
"@fast-check/vitest": "^0.
|
|
132
|
+
"@fast-check/vitest": "^0.5.0",
|
|
133
133
|
"@nuxt/devtools": "^3.4.2",
|
|
134
134
|
"@nuxt/devtools-kit": "^3.2.0",
|
|
135
135
|
"@nuxt/kit": "^4.4.2",
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"@types/jsdom": "^30.0.0",
|
|
142
142
|
"@types/node": "^26.5.1",
|
|
143
143
|
"@vitejs/plugin-vue": "^6.0.6",
|
|
144
|
-
"@vitest/coverage-v8": "^
|
|
144
|
+
"@vitest/coverage-v8": "^5.0.1",
|
|
145
145
|
"@vue/compiler-core": "^3.5.33",
|
|
146
146
|
"@vue/compiler-sfc": "^3.5.33",
|
|
147
147
|
"@vue/devtools-api": "^8.1.1",
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"typescript-eslint": "^8.59.0",
|
|
172
172
|
"unbuild": "^3.6.1",
|
|
173
173
|
"vite": "^8.3.0",
|
|
174
|
-
"vitest": "^
|
|
174
|
+
"vitest": "^5.0.1",
|
|
175
175
|
"vue": "^3.5.33",
|
|
176
176
|
"vue-eslint-parser": "^10.4.0",
|
|
177
177
|
"vue-tsc": "^3.2.7",
|
|
@@ -212,8 +212,8 @@
|
|
|
212
212
|
"build:site": "pnpm --filter attaform-site build",
|
|
213
213
|
"lint": "eslint --cache --concurrency=auto --max-warnings 0 . && pnpm format:check",
|
|
214
214
|
"lint:fix": "eslint --cache --concurrency=auto --max-warnings 0 --fix . && pnpm format",
|
|
215
|
-
"format": "prettier --write '**/*.{ts,js,vue,css,scss,md,json,yml,yaml}'",
|
|
216
|
-
"format:check": "prettier --check '**/*.{ts,js,vue,css,scss,md,json,yml,yaml}'",
|
|
215
|
+
"format": "prettier --write '**/*.{ts,js,mjs,cjs,vue,css,scss,md,json,yml,yaml}'",
|
|
216
|
+
"format:check": "prettier --check '**/*.{ts,js,mjs,cjs,vue,css,scss,md,json,yml,yaml}'",
|
|
217
217
|
"check": "pnpm check:security-floors && pnpm lint && pnpm typecheck && pnpm check:site && pnpm test && pnpm test:nuxt-ui && pnpm check:size && pnpm check:tarball && pnpm check:eager && pnpm check:bench && pnpm check:coverage",
|
|
218
218
|
"fix": "pnpm lint:fix",
|
|
219
219
|
"typecheck": "tsc --noEmit",
|
|
@@ -233,6 +233,7 @@
|
|
|
233
233
|
"bench:delta": "node scripts/bench-delta.mjs",
|
|
234
234
|
"check:bundled-types": "node scripts/check-bundled-types.mjs",
|
|
235
235
|
"check:doc-snippets": "node scripts/check-doc-snippets.mjs",
|
|
236
|
+
"check:comment-only": "node scripts/check-comment-only.mjs",
|
|
236
237
|
"check:site": "pnpm dev:prepare && pnpm --filter attaform-site typecheck",
|
|
237
238
|
"fallow": "DO_NOT_TRACK=1 FALLOW_TELEMETRY=0 npx --yes fallow@2.88.3 --score",
|
|
238
239
|
"version": "node scripts/promote-changelog.mjs && (node scripts/generate-release-notes.mjs || echo '[version] release-notes step failed; continuing') && node scripts/sync-doc-versions.mjs && node scripts/build-bestpractices-json.mjs && git add CHANGELOG.md RELEASES.md docs/scorecard/cii-best-practices-answers.md .bestpractices.json"
|
package/skills/attaform/SKILL.md
CHANGED
|
@@ -119,7 +119,7 @@ Load one when the task reaches its area:
|
|
|
119
119
|
|
|
120
120
|
- **`references/wizards.md`**: multistep flows. The declarative step registry, `tryNext` vs `handleSubmit`, using a wizard as a flat multi-form coordinator, and how keyed `injectForm` / `injectWizard` resolve.
|
|
121
121
|
- **`references/errors.md`**: routing server and API errors. The `ValidationError` envelope, `setErrors` / `clearErrors`, the own-vs-subtree error axis, banners, and the one-normalizer pattern.
|
|
122
|
-
- **`references/custom-components.md`**: wrapping an input or binding a third-party component. `useRegister`, the three orthogonal primitives, attribute fallthrough, and the optional `form-key` prop.
|
|
122
|
+
- **`references/custom-components.md`**: wrapping an input or binding a third-party component, with its modifiers and live values. `useRegister`, the three orthogonal primitives, attribute fallthrough, and the optional `form-key` prop.
|
|
123
123
|
- **`references/ssr.md`**: debugging SSR and hydration. Why the value injection is a build-time transform, how to confirm it faithfully, and the test traps to avoid.
|
|
124
124
|
- **`references/validation.md`**: designing the schema. Client-is-UX / server-is-truth, keeping closed sets in sync, and why a clearable edit field is a required string.
|
|
125
125
|
- **`references/saving.md`**: persisting each decision as it is made. Choosing between an observing listener and a `watch`, the ordering that makes a listener safe, and the four things a production autosave adds.
|
|
@@ -43,6 +43,8 @@ The parent binds with `v-register`; the wrapper re-forwards that same instance a
|
|
|
43
43
|
|
|
44
44
|
`rv` and `field` may be `undefined` until the parent directive attaches, so defend every read with `?.`. `rv.path`, `rv.segments`, and `rv.formKey` pierce directly in script setup without `.value`.
|
|
45
45
|
|
|
46
|
+
Modifiers the parent writes reach the inner control: `<UiTextField v-register.trim="...">` trims at the inner `<input v-register="rv">`. Modifiers on the inner binding still apply, and the two sets combine. Do not add a prop to pass `.trim` or `.lazy` through by hand.
|
|
47
|
+
|
|
46
48
|
For a **compound** component that binds _multiple_ paths (a date range exposing start and end, an address subform), skip `useRegister` (it assumes a single binding) and reach for `injectForm<Form>()`, then call `form.register(path)` for each field.
|
|
47
49
|
|
|
48
50
|
## Let Attaform own display and ARIA
|
|
@@ -58,6 +60,8 @@ For a **compound** component that binds _multiple_ paths (a date range exposing
|
|
|
58
60
|
|
|
59
61
|
When the component renders exactly one real form control and forwards attributes to it, that control becomes the field's anchor: focus and blur tracking, ARIA, and the invalid-submit focus target all land on it. A **composite** widget (a PIN input of several boxes) or a **control-less** one (a slider built from `<div>`s) binds too; the directive declines the single-element latch and tracks focus at the widget root instead. Do not reach for an escape hatch on account of either.
|
|
60
62
|
|
|
63
|
+
Every value the component writes back follows the native input's rules. `.lazy`, `.trim`, and `.number` work on it (`.lazy` and `.trim` commit when focus leaves the component), and register `transforms` plus schema coercion run on each write, so a text component can back a `z.number()` leaf. A component that reports keystrokes through an `input` emit carrying `{ value }` (PrimeVue `InputNumber`) updates the form as the user types, not only when it commits on blur. None of this needs a `v-model`, an `@update:modelValue` handler, or a `modelModifiers` prop; adding one stacks a second writer.
|
|
64
|
+
|
|
61
65
|
The one shape that loses the directive half is a component whose root is a **fragment**, because Vue hands a runtime directive only to a single-element root. The value channel still works there; wrap it in an element you control to get the rest back.
|
|
62
66
|
|
|
63
67
|
## Do not re-declare native attributes as props
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
import { ao as RegisterModelDynamicCustomDirective } from './attaform.bKLzMU0o.mjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The `v-register` directive. Bind a form field to a native input,
|
|
6
|
-
* select, textarea, checkbox, or radio:
|
|
7
|
-
*
|
|
8
|
-
* ```vue
|
|
9
|
-
* <input v-register="form.register('email')" />
|
|
10
|
-
* <select v-register="form.register('country')">
|
|
11
|
-
* <option value="us">US</option>
|
|
12
|
-
* <option value="uk">UK</option>
|
|
13
|
-
* </select>
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* The directive picks the right binding strategy automatically based
|
|
17
|
-
* on the element's `tagName` and `type`. Delivered by the Vite / Nuxt
|
|
18
|
-
* plugin's compile-time binding, or by `installVRegister(app)`
|
|
19
|
-
* everywhere else. Most consumers never import it directly, but it's
|
|
20
|
-
* exposed for advanced integrations that wire directives manually.
|
|
21
|
-
*/
|
|
22
|
-
declare const vRegister: RegisterModelDynamicCustomDirective;
|
|
23
|
-
/**
|
|
24
|
-
* Register the `v-register` directive app-wide. The one-line setup for
|
|
25
|
-
* apps whose templates are compiled without Attaform's Vite or Nuxt
|
|
26
|
-
* plugin — a webpack-family bundler, a no-build / CDN page, or
|
|
27
|
-
* runtime-compiled templates:
|
|
28
|
-
*
|
|
29
|
-
* ```ts
|
|
30
|
-
* import { createApp } from 'vue'
|
|
31
|
-
* import { installVRegister } from 'attaform/directive'
|
|
32
|
-
*
|
|
33
|
-
* const app = createApp(App)
|
|
34
|
-
* installVRegister(app)
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* Vite and Nuxt consumers don't call this: the build plugin binds each
|
|
38
|
-
* template's `v-register` to the directive at compile time. Idempotent —
|
|
39
|
-
* a second call for the same app is a no-op, and an app-level directive
|
|
40
|
-
* a consumer registered under the same name is left in place.
|
|
41
|
-
*/
|
|
42
|
-
declare function installVRegister(app: App): void;
|
|
43
|
-
|
|
44
|
-
export { installVRegister as i, vRegister as v };
|