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.
Files changed (66) hide show
  1. package/dist/abstract.d.mts +5 -5
  2. package/dist/abstract.mjs +4 -4
  3. package/dist/dev/abstract.mjs +4 -4
  4. package/dist/dev/chunks/dev-key-collision-warnings.mjs +47 -8
  5. package/dist/dev/chunks/devtools.mjs +1 -1
  6. package/dist/dev/directive.mjs +1 -1
  7. package/dist/dev/history.mjs +1 -2
  8. package/dist/dev/index.mjs +5 -5
  9. package/dist/dev/runtime/plugins/attaform.mjs +3 -3
  10. package/dist/dev/shared/{attaform-dev.oYrkP9dj.mjs → attaform-dev.BK6Ge2qR.mjs} +80 -341
  11. package/dist/dev/shared/{attaform-dev.Dr2YzS5B.mjs → attaform-dev.BQc5QV3Y.mjs} +11 -19
  12. package/dist/dev/shared/{attaform-dev.BR8u0YOZ.mjs → attaform-dev.BcNtyOmf.mjs} +4 -4
  13. package/dist/{shared/attaform.h0i6LijT.mjs → dev/shared/attaform-dev.BcYT6tFh.mjs} +152 -20
  14. package/dist/dev/shared/{attaform-dev.6qxD-Yqo.mjs → attaform-dev.BisFstxh.mjs} +227 -88
  15. package/dist/dev/shared/{attaform-dev.WmuhD_CZ.mjs → attaform-dev.CQ2rJiAX.mjs} +833 -656
  16. package/dist/dev/shared/{attaform-dev.P7cseiEG.mjs → attaform-dev.D6CLvaQT.mjs} +20 -11
  17. package/dist/dev/shared/{attaform-dev.D2I8e_Mm.mjs → attaform-dev.DTrHonpc.mjs} +225 -238
  18. package/dist/dev/shared/{attaform-dev.BXE2cr0L.mjs → attaform-dev.DUZckyV8.mjs} +1 -3
  19. package/dist/dev/zod-v3.mjs +6 -6
  20. package/dist/dev/zod-v4.mjs +6 -6
  21. package/dist/dev/zod.mjs +5 -5
  22. package/dist/directive.d.mts +2 -2
  23. package/dist/directive.mjs +1 -1
  24. package/dist/history.d.mts +1 -1
  25. package/dist/history.mjs +1 -2
  26. package/dist/index.d.mts +9 -7
  27. package/dist/index.mjs +5 -5
  28. package/dist/nuxt.d.mts +11 -20
  29. package/dist/nuxt.mjs +0 -1
  30. package/dist/runtime/plugins/attaform.mjs +3 -3
  31. package/dist/shared/{attaform.uLbun31C.mjs → attaform.B3resMQ1.mjs} +19 -11
  32. package/dist/shared/{attaform.Cs2Rbdlo.mjs → attaform.BK0cgu2K.mjs} +123 -139
  33. package/dist/{dev/shared/attaform-dev.By4PRjt0.mjs → shared/attaform.BRDDQeHV.mjs} +136 -26
  34. package/dist/shared/{attaform.NLmerepI.mjs → attaform.BXneBxEj.mjs} +71 -334
  35. package/dist/shared/{attaform.D6DCnnQu.mjs → attaform.ByWP6kSx.mjs} +4 -4
  36. package/dist/shared/{attaform.CJP3RkGa.mjs → attaform.CJ8DpRGj.mjs} +223 -238
  37. package/dist/shared/{attaform.C09fpdLS.mjs → attaform.CUfrMK7t.mjs} +227 -88
  38. package/dist/shared/{attaform.wfY8XFvm.mjs → attaform.CdZIEf7_.mjs} +11 -19
  39. package/dist/shared/{attaform.JfSWdEcb.d.mts → attaform.Clz0ArIi.d.mts} +1 -1
  40. package/dist/shared/{attaform.B8k8JrmK.mjs → attaform.DNJOWjQw.mjs} +826 -612
  41. package/dist/shared/{attaform.B4VkS43-.d.mts → attaform.Rc9u4Vfw.d.mts} +1 -1
  42. package/dist/shared/{attaform.D5V4tZWq.d.mts → attaform.UGyOK83T.d.mts} +200 -218
  43. package/dist/shared/{attaform.Dq4vWxuG.mjs → attaform.WiGdIqgx.mjs} +1 -3
  44. package/dist/shared/{attaform.Cgu-hdSb.d.mts → attaform.bKLzMU0o.d.mts} +321 -523
  45. package/dist/transforms.d.mts +0 -22
  46. package/dist/transforms.mjs +1 -1
  47. package/dist/vite.d.mts +13 -4
  48. package/dist/vite.mjs +8 -2
  49. package/dist/zod-v3.d.mts +6 -4
  50. package/dist/zod-v3.mjs +6 -6
  51. package/dist/zod-v4.d.mts +18 -31
  52. package/dist/zod-v4.mjs +6 -6
  53. package/dist/zod.d.mts +4 -4
  54. package/dist/zod.mjs +5 -5
  55. package/package.json +19 -15
  56. package/skills/attaform/SKILL.md +6 -3
  57. package/skills/attaform/references/custom-components.md +8 -3
  58. package/skills/attaform/references/errors.md +8 -3
  59. package/skills/attaform/references/saving.md +77 -0
  60. package/skills/attaform/references/wizards.md +10 -8
  61. package/dist/chunks/fingerprint.mjs +0 -183
  62. package/dist/chunks/fingerprint2.mjs +0 -159
  63. package/dist/dev/chunks/fingerprint.mjs +0 -183
  64. package/dist/dev/chunks/fingerprint2.mjs +0 -159
  65. package/dist/dev/shared/attaform-dev.BJGA_UOS.mjs +0 -36
  66. package/dist/shared/attaform.BJGA_UOS.mjs +0 -36
@@ -1,5 +1,5 @@
1
1
  import { reactive, markRaw, isRef, effectScope, watch, warn, nextTick } from 'vue';
2
- import { e as canonicalizePath } from './attaform-dev.Dr2YzS5B.mjs';
2
+ import { e as canonicalizePath } from './attaform-dev.BQc5QV3Y.mjs';
3
3
 
4
4
  const INTERACTIVE_TAG_NAMES = /* @__PURE__ */ new Set(["INPUT", "SELECT", "TEXTAREA"]);
5
5
 
@@ -288,7 +288,7 @@ function isCheckboxInput(tagName, type) {
288
288
  return tagName === "INPUT" && typeof type === "string" && type.toLowerCase() === "checkbox";
289
289
  }
290
290
  function applyAria(el, rv, vnode) {
291
- if (rv.ariaEnabled !== true || rv.ariaDisplayState === void 0) return;
291
+ if (rv.ariaDisplayState === void 0) return;
292
292
  if (!INTERACTIVE_TAG_NAMES.has(el.tagName)) return;
293
293
  const locks = el[ariaLockKey] ?? EMPTY_ARIA_LOCKS;
294
294
  const ds = rv.ariaDisplayState.value;
@@ -303,7 +303,7 @@ function applyAria(el, rv, vnode) {
303
303
  }
304
304
  }
305
305
  function setupAria(el, rv, vnode) {
306
- if (rv.ariaEnabled !== true || rv.ariaDisplayState === void 0) return;
306
+ if (rv.ariaDisplayState === void 0) return;
307
307
  if (!INTERACTIVE_TAG_NAMES.has(el.tagName)) return;
308
308
  mergeAriaLocks(el, vnode);
309
309
  applyAria(el, rv, vnode);
@@ -325,7 +325,7 @@ function seedLocksFromDom(el) {
325
325
  }
326
326
  }
327
327
  function setupAriaLive(el, rv) {
328
- if (rv.ariaEnabled !== true || rv.ariaDisplayState === void 0) return;
328
+ if (rv.ariaDisplayState === void 0) return;
329
329
  if (!INTERACTIVE_TAG_NAMES.has(el.tagName)) return;
330
330
  seedLocksFromDom(el);
331
331
  applyAria(el, rv, null);
@@ -337,7 +337,7 @@ function setupAriaLive(el, rv) {
337
337
  el[ariaScopeKey] = () => scope.stop();
338
338
  }
339
339
  function getSSRAriaProps(rv, vnode) {
340
- if (rv.ariaEnabled !== true || rv.ariaDisplayState === void 0) return void 0;
340
+ if (rv.ariaDisplayState === void 0) return void 0;
341
341
  const props = vnode?.props ?? null;
342
342
  const ds = rv.ariaDisplayState.value;
343
343
  const tagName = typeof vnode?.type === "string" ? vnode.type.toUpperCase() : "";
@@ -1143,6 +1143,14 @@ function setSelected(el, value) {
1143
1143
  const externalValue = value.innerRef.value;
1144
1144
  const isMultiple = el.multiple;
1145
1145
  const isArrayValue = isArray(externalValue);
1146
+ const isUnset = externalValue === null || externalValue === void 0;
1147
+ if (isMultiple && isUnset) {
1148
+ for (let i = 0, l = el.options.length; i < l; i++) {
1149
+ const option = el.options[i];
1150
+ if (option !== void 0) option.selected = false;
1151
+ }
1152
+ return;
1153
+ }
1146
1154
  if (isMultiple && !isArrayValue && !isSet(externalValue)) {
1147
1155
  {
1148
1156
  warn(
@@ -1180,10 +1188,11 @@ function setSelected(el, value) {
1180
1188
  }
1181
1189
  return;
1182
1190
  }
1191
+ const target = value.displayValue.value === "" ? "" : externalValue;
1183
1192
  for (let i = 0, l = el.options.length; i < l; i++) {
1184
1193
  const option = el.options[i];
1185
1194
  if (!option) continue;
1186
- if (looseEqual(applyCoerce(getValue(option), value), externalValue)) {
1195
+ if (looseEqual(applyCoerce(getValue(option), value), target)) {
1187
1196
  if (el.selectedIndex !== i) el.selectedIndex = i;
1188
1197
  return;
1189
1198
  }
@@ -1269,8 +1278,7 @@ function observeForLateHostControl(el, rv) {
1269
1278
  hostHealObservers.set(el, observer);
1270
1279
  }
1271
1280
  function activateComponentHost(el, rv) {
1272
- if (rv.hasRegisteredDescendant(el))
1273
- return;
1281
+ if (rv.hasRegisteredDescendant(el)) return;
1274
1282
  el[REGISTER_OWNER_MARKER] = true;
1275
1283
  if (!el.tagName.includes("-")) {
1276
1284
  el.removeAttribute("registerValue");
@@ -1319,7 +1327,7 @@ const vRegisterDynamic = {
1319
1327
  callModelHook(el, binding, vnode, prevVNode, "beforeUpdate");
1320
1328
  const ariaEl = el;
1321
1329
  const value = binding.value;
1322
- if (!isRegisterValue(value) || value.ariaEnabled !== true || value.ariaDisplayState === void 0) {
1330
+ if (!isRegisterValue(value) || value.ariaDisplayState === void 0) {
1323
1331
  teardownAria(ariaEl);
1324
1332
  } else {
1325
1333
  const old = binding.oldValue;
@@ -1364,8 +1372,8 @@ const vRegisterDynamic = {
1364
1372
  // The lifecycle hooks above don't run on the server (Vue skips
1365
1373
  // directive lifecycle during SSR), so emit the same aria attributes
1366
1374
  // here from the SSR-time gated display state. Honors authored attrs
1367
- // (vnode-level lockout) and the ariaEnabled gate, touches no DOM, and
1368
- // shares `resolveAriaValue` with the client path. Ids are SSR-stable
1375
+ // (vnode-level lockout), touches no DOM, and shares
1376
+ // `resolveAriaValue` with the client path. Ids are SSR-stable
1369
1377
  // (formInstanceId derives from Vue's useId), so a server-rendered
1370
1378
  // describedby matches the client after hydration.
1371
1379
  getSSRProps(binding, vnode) {
@@ -1394,6 +1402,7 @@ function resolveDynamicModel(tagName, type) {
1394
1402
  function warnRedundantStateBinding(el, binding, vnode) {
1395
1403
  if (warnedRedundantBindings === null) return;
1396
1404
  if (!INTERACTIVE_TAG_NAMES.has(el.tagName)) return;
1405
+ if (!isRegisterValue(binding.value)) return;
1397
1406
  if (binding.modifiers[V_REGISTER_COMPILED_MODIFIER] === true) return;
1398
1407
  const props = vnode.props;
1399
1408
  if (props == null) return;