attaform 0.24.0 → 0.24.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/chunks/devtools.cjs +1 -1
- package/dist/chunks/devtools.mjs +1 -1
- package/dist/chunks/fingerprint2.cjs +1 -1
- package/dist/chunks/fingerprint2.mjs +1 -1
- package/dist/index.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- 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 +4 -3
- package/dist/index.mjs.map +1 -1
- 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.CAWKNCzc.mjs → attaform.0-00cYGw.mjs} +2 -2
- package/dist/shared/{attaform.CAWKNCzc.mjs.map → attaform.0-00cYGw.mjs.map} +1 -1
- package/dist/shared/{attaform.BNmkKz0q.d.mts → attaform.4zesozTg.d.mts} +1 -1
- package/dist/shared/{attaform.DwkU0oY9.cjs → attaform.B7UdTs_o.cjs} +79 -75
- package/dist/shared/attaform.B7UdTs_o.cjs.map +1 -0
- package/dist/shared/{attaform.nycEksJn.cjs → attaform.BOi6n2Pn.cjs} +2 -2
- package/dist/shared/{attaform.nycEksJn.cjs.map → attaform.BOi6n2Pn.cjs.map} +1 -1
- package/dist/shared/{attaform.K-3glmiT.d.cts → attaform.Bk7vnQhG.d.cts} +1 -1
- package/dist/shared/{attaform.C6eE50re.d.ts → attaform.Bq6Copxn.d.cts} +24 -15
- package/dist/shared/{attaform.DdUYEhkV.d.cts → attaform.BrFPMFgi.d.ts} +24 -15
- package/dist/shared/{attaform.C-dAB90u.mjs → attaform.BunnTiTw.mjs} +4 -4
- package/dist/shared/{attaform.C-dAB90u.mjs.map → attaform.BunnTiTw.mjs.map} +1 -1
- package/dist/shared/{attaform.DiWNbKWa.d.mts → attaform.BwAcpoRw.d.mts} +24 -15
- package/dist/shared/{attaform.BV_HyaMO.cjs → attaform.C-1W0T1n.cjs} +3 -3
- package/dist/shared/{attaform.BV_HyaMO.cjs.map → attaform.C-1W0T1n.cjs.map} +1 -1
- package/dist/shared/{attaform.o95Kjd3U.mjs → attaform.C-tQKknW.mjs} +3 -3
- package/dist/shared/{attaform.o95Kjd3U.mjs.map → attaform.C-tQKknW.mjs.map} +1 -1
- package/dist/shared/{attaform.Df-s8j1X.mjs → attaform.C0au8oXd.mjs} +36 -29
- package/dist/shared/attaform.C0au8oXd.mjs.map +1 -0
- package/dist/shared/attaform.CjdepGnw.cjs +27 -0
- package/dist/shared/attaform.CjdepGnw.cjs.map +1 -0
- package/dist/shared/{attaform.Z1qTwOYE.cjs → attaform.Cn6JoG9o.cjs} +4 -4
- package/dist/shared/{attaform.Z1qTwOYE.cjs.map → attaform.Cn6JoG9o.cjs.map} +1 -1
- package/dist/shared/{attaform.BnUXV01g.cjs → attaform.CrrIaHM8.cjs} +4 -4
- package/dist/shared/{attaform.BnUXV01g.cjs.map → attaform.CrrIaHM8.cjs.map} +1 -1
- package/dist/shared/{attaform.GJbSmwLB.d.ts → attaform.DBhrKb2j.d.cts} +25 -12
- package/dist/shared/{attaform.GJbSmwLB.d.cts → attaform.DBhrKb2j.d.mts} +25 -12
- package/dist/shared/{attaform.GJbSmwLB.d.mts → attaform.DBhrKb2j.d.ts} +25 -12
- package/dist/shared/{attaform.C42wL7EJ.cjs → attaform.DRQjF16I.cjs} +55 -18
- package/dist/shared/attaform.DRQjF16I.cjs.map +1 -0
- package/dist/shared/{attaform.CwFZGv5-.d.ts → attaform.Df4xXKbE.d.ts} +1 -1
- package/dist/shared/{attaform.BFWb6hDk.mjs → attaform.DhXl0Kdr.mjs} +7 -1
- package/dist/shared/attaform.DhXl0Kdr.mjs.map +1 -0
- package/dist/shared/{attaform.CR6wGvNu.cjs → attaform.DwLw3Kzv.cjs} +7 -1
- package/dist/shared/attaform.DwLw3Kzv.cjs.map +1 -0
- package/dist/shared/{attaform.BJ_W7q3U.mjs → attaform.FY5r1BpA.mjs} +4 -4
- package/dist/shared/{attaform.BJ_W7q3U.mjs.map → attaform.FY5r1BpA.mjs.map} +1 -1
- package/dist/shared/{attaform.CuBdtfbe.mjs → attaform.NWrEGrNo.mjs} +53 -16
- package/dist/shared/attaform.NWrEGrNo.mjs.map +1 -0
- package/dist/shared/attaform.WvcckZMD.mjs +21 -0
- package/dist/shared/attaform.WvcckZMD.mjs.map +1 -0
- package/dist/transforms.cjs +1 -1
- package/dist/transforms.mjs +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/zod-v3.cjs +2 -2
- 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 +2 -2
- package/dist/zod-v4.cjs +2 -2
- package/dist/zod-v4.d.cts +5 -5
- package/dist/zod-v4.d.mts +5 -5
- package/dist/zod-v4.d.ts +5 -5
- package/dist/zod-v4.mjs +2 -2
- 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 +5 -5
- package/package.json +1 -1
- package/dist/shared/attaform.BFWb6hDk.mjs.map +0 -1
- package/dist/shared/attaform.C42wL7EJ.cjs.map +0 -1
- package/dist/shared/attaform.CR6wGvNu.cjs.map +0 -1
- package/dist/shared/attaform.CuBdtfbe.mjs.map +0 -1
- package/dist/shared/attaform.Df-s8j1X.mjs.map +0 -1
- package/dist/shared/attaform.DwkU0oY9.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attaform.CjdepGnw.cjs","sources":["../../src/runtime/core/register-protocol.ts"],"sourcesContent":["import { isRef } from 'vue'\nimport type { InternalRegisterValue, RegisterValue } from '../types/types-api'\n\n// Shared register-protocol primitives: the markers and value guards that\n// the v-register directive, its file / lifecycle satellites, and\n// useRegister all build on. They live in this leaf (depending only on vue\n// and the types module) so those modules don't import directive.ts back,\n// which would form an import cycle.\n\n/**\n * Marker installed on the v-register directive object so consumers\n * (notably `useRegister`) can identify it in a child vnode's\n * directive list even when the consumer's bundler hasn't installed\n * attaform's compile-time transforms. `Symbol.for(...)` round-trips\n * across duplicate bundle copies: `attaform` and `attaform/zod` can\n * land on different `vRegister` references in the playground or\n * under pnpm-hoist edge cases, but both carry the same marker.\n */\nexport const V_REGISTER_MARKER: unique symbol = Symbol.for('attaform:v-register-directive')\n\n/**\n * Marker on the rendered root DOM element. Set by `useRegister`'s\n * `onMounted` hook; read by the directive's deferred warn check to\n * skip the \"is a no-op\" warn for components that handle binding via\n * an inner v-register.\n *\n * `Symbol.for(...)` so the marker round-trips across duplicate copies\n * of attaform — see `assignKey` in core/directive.ts for the same\n * reasoning. `useRegister` and the directive are typically loaded\n * from the same module copy, but a consumer importing from\n * `attaform/zod` (Vite-optimized bundle) and the Nuxt\n * plugin's relative-path import (live ESM) can land on different\n * copies; a global symbol means the marker check still works.\n */\nexport const REGISTER_OWNER_MARKER: unique symbol = Symbol.for('attaform:register-owner-marker')\n\n/**\n * Directive modifier the `componentBridgeTransform` stamps onto a\n * `v-register` that lands on a component host (or kebab custom element).\n * It is the compile-time -> runtime signal the directive's `getSSRProps`\n * reads under compiled SSR, where Vue passes a `null` vnode and the host\n * is otherwise indistinguishable from a native control. autoAria then\n * suppresses its attrs on the host root (the inner control the component\n * re-binds via useRegister carries them). Namespaced to avoid collision\n * with any author-written modifier. (#404)\n */\nexport const SSR_COMPONENT_HOST_MODIFIER = 'attaformComponentHost'\n\n/**\n * Type guard for a `RegisterValue`. Returns `true` when `val` looks\n * like the object returned from `form.register(path)`.\n *\n * ```ts\n * if (isRegisterValue(slotValue)) {\n * // slotValue.innerRef is now a Ref<unknown>\n * }\n * ```\n *\n * Useful when building wrapper components that accept either a\n * `RegisterValue` or a plain ref via the same prop.\n */\nexport function isRegisterValue<Value = unknown>(val: unknown): val is RegisterValue<Value> {\n if (typeof val !== 'object' || val === null) return false\n if (!('innerRef' in val)) return false\n if (!isRef(val.innerRef)) return false\n if (!('registerElement' in val)) return false\n if (typeof val.registerElement !== 'function') return false\n if (!('setValueWithInternalPath' in val)) return false\n if (typeof val.setValueWithInternalPath !== 'function') return false\n return true\n}\n\n/**\n * `true` while a deferred async transform is in flight at this path.\n * `beginTransform` flips it synchronously inside the assigner, so a\n * listener's post-write force-sync block reads it (right after the\n * assigner returns) to skip snapping the DOM back to stale storage —\n * the resolved value is painted in by the orchestrator's `syncDom`\n * once the run lands.\n */\nexport function isTransforming(value: unknown): boolean {\n return isRegisterValue(value) && (value as InternalRegisterValue).transforming\n}\n"],"names":["isRef"],"mappings":";;;;AAkBO,MAAM,iBAAA,GAAmC,MAAA,CAAO,GAAA,CAAI,+BAA+B;AAgBnF,MAAM,qBAAA,GAAuC,MAAA,CAAO,GAAA,CAAI,gCAAgC;AAYxF,MAAM,2BAAA,GAA8B;AAepC,SAAS,gBAAiC,GAAA,EAA2C;AAC1F,EAAA,IAAI,OAAO,GAAA,KAAQ,QAAA,IAAY,GAAA,KAAQ,MAAM,OAAO,KAAA;AACpD,EAAA,IAAI,EAAE,UAAA,IAAc,GAAA,CAAA,EAAM,OAAO,KAAA;AACjC,EAAA,IAAI,CAACA,SAAA,CAAM,GAAA,CAAI,QAAQ,GAAG,OAAO,KAAA;AACjC,EAAA,IAAI,EAAE,iBAAA,IAAqB,GAAA,CAAA,EAAM,OAAO,KAAA;AACxC,EAAA,IAAI,OAAO,GAAA,CAAI,eAAA,KAAoB,UAAA,EAAY,OAAO,KAAA;AACtD,EAAA,IAAI,EAAE,0BAAA,IAA8B,GAAA,CAAA,EAAM,OAAO,KAAA;AACjD,EAAA,IAAI,OAAO,GAAA,CAAI,wBAAA,KAA6B,UAAA,EAAY,OAAO,KAAA;AAC/D,EAAA,OAAO,IAAA;AACT;AAUO,SAAS,eAAe,KAAA,EAAyB;AACtD,EAAA,OAAO,eAAA,CAAgB,KAAK,CAAA,IAAM,KAAA,CAAgC,YAAA;AACpE;;;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const walkFieldMeta = require('./attaform.
|
|
4
|
-
const injectWizard = require('./attaform.
|
|
5
|
-
const paths = require('./attaform.
|
|
3
|
+
const walkFieldMeta = require('./attaform.C-1W0T1n.cjs');
|
|
4
|
+
const injectWizard = require('./attaform.DRQjF16I.cjs');
|
|
5
|
+
const paths = require('./attaform.B7UdTs_o.cjs');
|
|
6
6
|
|
|
7
7
|
const fieldMeta = walkFieldMeta.fieldMetaStore;
|
|
8
8
|
function withMeta(schema, payload) {
|
|
@@ -1634,4 +1634,4 @@ exports.isZodSchemaType = isZodSchemaType;
|
|
|
1634
1634
|
exports.useForm = useForm;
|
|
1635
1635
|
exports.withMeta = withMeta;
|
|
1636
1636
|
exports.zodAdapter = zodAdapter;
|
|
1637
|
-
//# sourceMappingURL=attaform.
|
|
1637
|
+
//# sourceMappingURL=attaform.Cn6JoG9o.cjs.map
|