attaform 0.29.0 → 0.30.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.
Files changed (79) hide show
  1. package/dist/abstract.d.mts +15 -21
  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 +2 -2
  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.BO-71R54.mjs → attaform-dev.BJK1kqHY.mjs} +44 -198
  11. package/dist/dev/shared/{attaform-dev.D8aoKb89.mjs → attaform-dev.BMQ3GcgD.mjs} +51 -64
  12. package/dist/dev/shared/{attaform-dev.BgM6FdtA.mjs → attaform-dev.BUIFcTYf.mjs} +94 -62
  13. package/dist/dev/shared/{attaform-dev.q6UutkCx.mjs → attaform-dev.CT7MDjPy.mjs} +92 -152
  14. package/dist/dev/shared/{attaform-dev.ButTkwHd.mjs → attaform-dev.CZz4GYZ6.mjs} +26 -15
  15. package/dist/dev/shared/{attaform-dev.DD5m2W51.mjs → attaform-dev.Chm4D6SJ.mjs} +2 -4
  16. package/dist/dev/shared/{attaform-dev.DrzObAZo.mjs → attaform-dev.DuEE4GU1.mjs} +4 -4
  17. package/dist/dev/shared/{attaform-dev.DHuydLAC.mjs → attaform-dev.DxHdkkPG.mjs} +674 -734
  18. package/dist/dev/shared/{attaform-dev.A-TpJW0B.mjs → attaform-dev.zlvDr0WB.mjs} +3 -21
  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 +4 -4
  23. package/dist/directive.mjs +1 -1
  24. package/dist/esbuild.d.mts +11 -0
  25. package/dist/esbuild.mjs +1 -1
  26. package/dist/history.d.mts +3 -32
  27. package/dist/history.mjs +1 -2
  28. package/dist/index.d.mts +67 -70
  29. package/dist/index.mjs +5 -5
  30. package/dist/nuxt.d.mts +6 -14
  31. package/dist/nuxt.mjs +3 -7
  32. package/dist/rollup.d.mts +11 -0
  33. package/dist/rollup.mjs +1 -1
  34. package/dist/rspack.d.mts +19 -11
  35. package/dist/rspack.mjs +1 -1
  36. package/dist/runtime/components/AttaformDevtoolsPanel.vue +12 -12
  37. package/dist/runtime/components/DevtoolsValueTree.vue +2 -2
  38. package/dist/runtime/plugins/attaform.mjs +3 -3
  39. package/dist/shared/{attaform.CIWLMY-R.d.mts → attaform.2FslhB9R.d.mts} +83 -95
  40. package/dist/shared/{attaform.Cvao8bW5.mjs → attaform.8mfKZCwH.mjs} +7 -7
  41. package/dist/shared/{attaform.DRUT703x.d.mts → attaform.B-Tb62qV.d.mts} +12 -12
  42. package/dist/shared/{attaform.v0fQtWyA.mjs → attaform.B1rH9ht6.mjs} +1 -1
  43. package/dist/shared/{attaform.BndjUUYX.mjs → attaform.B2iebkPA.mjs} +4 -4
  44. package/dist/shared/{attaform.DhnPb6nK.mjs → attaform.BAf3UNn4.mjs} +1 -1
  45. package/dist/shared/{attaform.CZMAYwSK.mjs → attaform.BIWicztt.mjs} +651 -678
  46. package/dist/shared/attaform.BcQwgWaq.d.mts +2153 -0
  47. package/dist/shared/attaform.Br8EBn5B.d.mts +4553 -0
  48. package/dist/shared/{attaform.C2MVyuxC.mjs → attaform.CO918TdU.mjs} +44 -198
  49. package/dist/shared/{attaform.CZYt_5N_.mjs → attaform.CdZIEf7_.mjs} +1 -19
  50. package/dist/shared/{attaform.B0dKL8ST.mjs → attaform.DRsANMok.mjs} +94 -62
  51. package/dist/shared/{attaform.DffRL5pP.mjs → attaform.D_f1WgYf.mjs} +46 -59
  52. package/dist/shared/{attaform.D1fnTifF.mjs → attaform.D_pt1gOj.mjs} +92 -150
  53. package/dist/shared/attaform.L0kUn3vL.d.mts +42 -0
  54. package/dist/shared/{attaform.D0x-qSXm.mjs → attaform.WiGdIqgx.mjs} +1 -3
  55. package/dist/shared/{attaform.BK0cgu2K.mjs → attaform.ZYn2ahzJ.mjs} +3 -3
  56. package/dist/transforms.d.mts +153 -26
  57. package/dist/transforms.mjs +1 -1
  58. package/dist/vite.d.mts +29 -52
  59. package/dist/vite.mjs +8 -3
  60. package/dist/webpack.d.mts +20 -12
  61. package/dist/webpack.mjs +1 -1
  62. package/dist/zod-v3.d.mts +90 -96
  63. package/dist/zod-v3.mjs +6 -6
  64. package/dist/zod-v4.d.mts +119 -119
  65. package/dist/zod-v4.mjs +6 -6
  66. package/dist/zod.d.mts +5 -5
  67. package/dist/zod.mjs +5 -5
  68. package/package.json +9 -7
  69. package/skills/attaform/SKILL.md +1 -1
  70. package/skills/attaform/references/custom-components.md +1 -1
  71. package/dist/chunks/fingerprint.mjs +0 -183
  72. package/dist/chunks/fingerprint2.mjs +0 -159
  73. package/dist/dev/chunks/fingerprint.mjs +0 -183
  74. package/dist/dev/chunks/fingerprint2.mjs +0 -159
  75. package/dist/dev/shared/attaform-dev.BxfsuwBR.mjs +0 -44
  76. package/dist/shared/attaform.BxfsuwBR.mjs +0 -44
  77. package/dist/shared/attaform.CsoeRi3P.d.mts +0 -5155
  78. package/dist/shared/attaform.DDtqHYv1.d.mts +0 -2465
  79. package/dist/shared/attaform.axHXVQO7.d.mts +0 -44
@@ -1,8 +1,7 @@
1
- import { q as humanize, h as useAbstractForm } from './attaform.CZMAYwSK.mjs';
2
- import { A as AttaformError, e as canonicalizePath, a as InvalidUseFormConfigError } from './attaform.CZYt_5N_.mjs';
3
- import { s as slimPrimitivesWalk, d as deriveDefaultWalk, m as mergeDeep, f as fixStructuralDefaults, w as walkPathSegments, c as createAbstractSchema, b as buildFieldMetaPathMap, a as getFieldMetaListForSchema, g as getFieldMetaForSchema } from './attaform.B0dKL8ST.mjs';
4
- import { c as callConsumerSchemaFn } from './attaform.Cvao8bW5.mjs';
5
- import { z } from 'zod';
1
+ import { j as humanize, c as useAbstractForm } from './attaform.BIWicztt.mjs';
2
+ import { A as AttaformError, e as canonicalizePath, a as InvalidUseFormConfigError } from './attaform.CdZIEf7_.mjs';
3
+ import { s as slimPrimitivesWalk, d as deriveDefaultWalk, m as mergeDeep, f as fixStructuralDefaults, w as walkPathSegments, c as createAbstractSchema, a as createSharedSchemaStore, b as buildFieldMetaPathMap, e as getFieldMetaListForSchema, g as getFieldMetaForSchema } from './attaform.DRsANMok.mjs';
4
+ import { c as callConsumerFn } from './attaform.8mfKZCwH.mjs';
6
5
 
7
6
  function readDef(schema) {
8
7
  if (schema === null || typeof schema !== "object") return void 0;
@@ -49,7 +48,9 @@ const IDENTITY_KINDS = /* @__PURE__ */ new Set([
49
48
  "file",
50
49
  "map",
51
50
  "symbol",
52
- "function"
51
+ "function",
52
+ "nonoptional",
53
+ "success"
53
54
  ]);
54
55
  function kindOf(schema) {
55
56
  const def = readDef(schema);
@@ -130,11 +131,7 @@ function unwrapLazy(schema) {
130
131
  const def = readDef(schema);
131
132
  const getter = def?.getter;
132
133
  if (typeof getter !== "function") return void 0;
133
- return callConsumerSchemaFn(() => getter(), void 0);
134
- }
135
- function getLazyGetter(schema) {
136
- const def = readDef(schema);
137
- return typeof def?.getter === "function" ? def.getter : void 0;
134
+ return callConsumerFn(() => getter(), void 0);
138
135
  }
139
136
  function getIntersectionLeft(schema) {
140
137
  const def = readDef(schema);
@@ -148,7 +145,7 @@ function getCatchDefault(schema) {
148
145
  const def = readDef(schema);
149
146
  const cv = def?.catchValue;
150
147
  if (typeof cv !== "function") return void 0;
151
- return callConsumerSchemaFn(
148
+ return callConsumerFn(
152
149
  () => cv({ error: new Error("atta:default-values"), input: void 0 }),
153
150
  void 0);
154
151
  }
@@ -158,7 +155,7 @@ function hasCatchValue(schema) {
158
155
  }
159
156
  function getDefaultValue(schema) {
160
157
  const def = readDef(schema);
161
- return callConsumerSchemaFn(() => def?.defaultValue, void 0);
158
+ return callConsumerFn(() => def?.defaultValue, void 0);
162
159
  }
163
160
  function getNativeEnumValues(_schema) {
164
161
  return void 0;
@@ -169,11 +166,6 @@ function unwrapEffectsSource(_schema) {
169
166
  function unwrapBranded(_schema) {
170
167
  return void 0;
171
168
  }
172
- function hasChecks(schema) {
173
- const def = readDef(schema);
174
- const checks = def?.checks;
175
- return Array.isArray(checks) && checks.length > 0;
176
- }
177
169
  function getChecks(schema) {
178
170
  const def = readDef(schema);
179
171
  const checks = def?.checks;
@@ -343,10 +335,10 @@ function zodIssuesToValidationErrors(issues) {
343
335
  }
344
336
  return {
345
337
  message: issue.message,
346
- // Adapter-side paths stay schema-relative — the validation
347
- // pipeline in `create-form-store.ts` prepends the parent path
348
- // to absolutise, then routes form-level (absolute path length 0)
349
- // entries to the empty-string bucket at storage time.
338
+ // Adapter-side paths stay schema-RELATIVE: the validation pipeline
339
+ // in `core/create-form-store.ts` prepends the parent path to
340
+ // absolutise, then routes form-level entries, those whose absolute
341
+ // path is empty, to the empty-string bucket at storage time.
350
342
  path: issue.path.map((seg) => typeof seg === "number" ? seg : String(seg)),
351
343
  code
352
344
  };
@@ -372,7 +364,6 @@ const V4_INTROSPECTOR = {
372
364
  return getArrayElement(schema);
373
365
  },
374
366
  getSetValueType: (schema) => kindOf(schema) === "set" ? getSetValueType(schema) : void 0,
375
- getRecordKeyType: (schema) => kindOf(schema) === "record" ? getRecordKeyType(schema) : void 0,
376
367
  getRecordValueType: (schema) => kindOf(schema) === "record" ? getRecordValueType(schema) : void 0,
377
368
  getMapKeyType: (schema) => kindOf(schema) === "map" ? getMapKeyType(schema) : void 0,
378
369
  getMapValueType: (schema) => kindOf(schema) === "map" ? getMapValueType(schema) : void 0,
@@ -387,7 +378,6 @@ const V4_INTROSPECTOR = {
387
378
  unwrapPipeIn,
388
379
  unwrapPipeOut,
389
380
  unwrapLazy,
390
- getLazyGetter,
391
381
  getDefaultValue,
392
382
  getCatchDefault,
393
383
  hasCatchValue
@@ -398,15 +388,12 @@ function slimPrimitivesOf(schema, maxRecursionDepth) {
398
388
  }
399
389
 
400
390
  function deriveDefault(schema, useDefault, maxRecursionDepth) {
401
- return deriveDefaultWalk(schema, useDefault, V4_INTROSPECTOR, maxRecursionDepth, {
402
- // v4 has an exhaustive switch against `SchemaIntrospector.kindOf`;
403
- // unknown kinds genuinely shouldn't appear, so return undefined.
404
- unsupportedKindFallback: () => void 0
405
- });
391
+ return deriveDefaultWalk(schema, useDefault, V4_INTROSPECTOR, maxRecursionDepth);
406
392
  }
407
393
  function getDefaultValuesFromZodSchema(opts) {
408
394
  const { schema, useDefaultSchemaValues, constraints, maxRecursionDepth } = opts;
409
395
  const initial = deriveDefault(schema, useDefaultSchemaValues, maxRecursionDepth);
396
+ if (constraints === void 0) return { data: initial, success: true };
410
397
  const merged = mergeDeep(initial, constraints);
411
398
  return fixStructuralDefaults(
412
399
  schema,
@@ -438,137 +425,6 @@ function getNestedZodSchemasAtPath(schema, path, maxRecursionDepth) {
438
425
  );
439
426
  }
440
427
 
441
- function carrySyncChecks(rebuilt, original) {
442
- if (!hasChecks(original)) return rebuilt;
443
- const checks = getChecks(original).filter((c) => !isAsyncCheck(c));
444
- if (checks.length === 0) return rebuilt;
445
- return rebuilt.check(
446
- ...checks
447
- );
448
- }
449
- function stripAsyncChecks(schema) {
450
- const seen = /* @__PURE__ */ new WeakSet();
451
- function recurse(s) {
452
- if (seen.has(s)) return s;
453
- seen.add(s);
454
- const kind = kindOf(s);
455
- switch (kind) {
456
- case "string":
457
- return hasChecks(s) ? carrySyncChecks(z.string(), s) : s;
458
- case "number":
459
- return hasChecks(s) ? carrySyncChecks(z.number(), s) : s;
460
- case "bigint":
461
- return hasChecks(s) ? carrySyncChecks(z.bigint(), s) : s;
462
- case "array": {
463
- const element = getArrayElement(s);
464
- return carrySyncChecks(z.array(recurse(element)), s);
465
- }
466
- case "set": {
467
- return carrySyncChecks(z.set(recurse(getSetValueType(s))), s);
468
- }
469
- case "tuple": {
470
- const items = getTupleItems(s).map(recurse);
471
- const rebuilt = z.tuple(
472
- items
473
- );
474
- return carrySyncChecks(rebuilt, s);
475
- }
476
- case "object": {
477
- const shape = getObjectShape(s);
478
- const next = {};
479
- for (const [k, v] of Object.entries(shape)) {
480
- next[k] = recurse(v);
481
- }
482
- return carrySyncChecks(z.object(next), s);
483
- }
484
- case "record": {
485
- const keyType = getRecordKeyType(s);
486
- const valueType = recurse(getRecordValueType(s));
487
- return carrySyncChecks(
488
- z.record(keyType, valueType),
489
- s
490
- );
491
- }
492
- case "union": {
493
- const options = getUnionOptions(s).map(recurse);
494
- return carrySyncChecks(
495
- z.union(options),
496
- s
497
- );
498
- }
499
- case "discriminated-union": {
500
- const options = getDiscriminatedOptions(s).map((opt) => recurse(opt));
501
- const discriminator = getDiscriminator(s);
502
- if (discriminator === void 0) return s;
503
- return z.discriminatedUnion(
504
- discriminator,
505
- options
506
- );
507
- }
508
- case "optional": {
509
- const inner = unwrapInner(s);
510
- return inner === void 0 ? s : recurse(inner).optional();
511
- }
512
- case "nullable": {
513
- const inner = unwrapInner(s);
514
- return inner === void 0 ? s : recurse(inner).nullable();
515
- }
516
- case "default": {
517
- const inner = unwrapInner(s);
518
- if (inner === void 0) return s;
519
- return recurse(inner).default(getDefaultValue(s));
520
- }
521
- case "readonly": {
522
- const inner = unwrapInner(s);
523
- return inner === void 0 ? s : recurse(inner).readonly();
524
- }
525
- case "lazy": {
526
- const inner = unwrapLazy(s);
527
- if (inner === void 0) return s;
528
- const stripped = recurse(inner);
529
- return z.lazy(() => stripped);
530
- }
531
- case "intersection": {
532
- const left = getIntersectionLeft(s);
533
- const right = getIntersectionRight(s);
534
- if (left === void 0 || right === void 0) return s;
535
- return z.intersection(recurse(left), recurse(right));
536
- }
537
- case "catch": {
538
- const inner = unwrapInner(s);
539
- if (inner === void 0) return s;
540
- return recurse(inner).catch(getCatchDefault(s));
541
- }
542
- // Pipes pass through (see the docblock); the rest are leaves
543
- // whose checks the strip walker deliberately leaves in place —
544
- // an async check on one of these still poisons the sync parse
545
- // and the callers' defensive catch owns that case.
546
- case "pipe":
547
- case "boolean":
548
- case "date":
549
- case "enum":
550
- case "literal":
551
- case "null":
552
- case "undefined":
553
- case "any":
554
- case "unknown":
555
- case "nan":
556
- case "void":
557
- case "never":
558
- case "promise":
559
- case "custom":
560
- case "template-literal":
561
- case "transform":
562
- case "file":
563
- case "map":
564
- case "symbol":
565
- case "function":
566
- return s;
567
- }
568
- }
569
- return recurse(schema);
570
- }
571
-
572
428
  function unwrapStructuralWrappers(schema) {
573
429
  let current = schema;
574
430
  for (let i = 0; i < 64; i++) {
@@ -662,29 +518,28 @@ function isLeafRequired(schema, depth = 0) {
662
518
  function zodV4Adapter(rootSchema) {
663
519
  assertZodVersion(rootSchema);
664
520
  assertKeyedRoot(rootSchema);
665
- return (formKey, options) => createAbstractSchema(
521
+ return (_formKey, options) => sharedV4Schemas(
666
522
  rootSchema,
667
- V4_INTROSPECTOR,
668
- buildV4Services(),
669
- formKey,
670
- options
523
+ options.maxRecursionDepth,
524
+ () => createAbstractSchema(
525
+ rootSchema,
526
+ V4_INTROSPECTOR,
527
+ buildV4Services(),
528
+ options
529
+ )
671
530
  );
672
531
  }
673
- async function lazyFingerprint(schema) {
674
- const { fingerprintZodSchema } = await import('../chunks/fingerprint2.mjs');
675
- return fingerprintZodSchema(schema);
676
- }
532
+ const sharedV4Schemas = createSharedSchemaStore();
677
533
  function buildV4Services() {
678
534
  return {
679
- fingerprint: (schema) => lazyFingerprint(schema),
680
535
  getNestedSchemasAtPath: (schema, path, maxRecursionDepth) => getNestedZodSchemasAtPath(schema, path, maxRecursionDepth),
681
- // v4 doesn't pre-strip for the slim-mode walk — its path walker
682
- // already peels every transparent wrapper inline, so the slim and
683
- // unstripped walks coincide.
536
+ // No pre-strip for the slim-mode walk: the path walker peels every
537
+ // transparent wrapper inline, so the slim and unstripped walks
538
+ // coincide.
684
539
  getNestedSchemasInSlimMode: (schema, path, maxRecursionDepth) => getNestedZodSchemasAtPath(schema, path, maxRecursionDepth),
685
540
  slimPrimitivesOf: (schema, maxRecursionDepth) => slimPrimitivesOf(schema, maxRecursionDepth),
686
541
  deriveDefault: (schema, useDefault, maxRecursionDepth) => deriveDefault(schema, useDefault, maxRecursionDepth),
687
- runStrictGetDefaults: (schema, config, fk, maxRecursionDepth) => runStrictGetDefaultsV4(schema, config, fk, maxRecursionDepth),
542
+ runGetDefaults: (schema, config, maxRecursionDepth) => runGetDefaultsV4(schema, config, maxRecursionDepth),
688
543
  unwrapStructuralWrappers: (schema) => unwrapStructuralWrappers(schema),
689
544
  unwrapToDiscriminatedUnion: (schema) => unwrapToDiscriminatedUnion(schema),
690
545
  peelAllWrappers: (schema) => peelAllWrappers(schema),
@@ -699,47 +554,40 @@ function buildV4Services() {
699
554
  const result = await schema.safeParseAsync(data);
700
555
  return result.success ? { success: true, data: result.data } : { success: false, issues: result.error.issues };
701
556
  },
702
- makeSubSchema: (schema, fk, maxRecursionDepth) => buildSubSchemaStubV4(schema, fk, maxRecursionDepth)
557
+ makeSubSchema: (schema, maxRecursionDepth) => buildSubSchemaStubV4(schema, maxRecursionDepth)
703
558
  };
704
559
  }
705
- function runStrictGetDefaultsV4(rootSchema, config, formKey, maxRecursionDepth) {
560
+ function runGetDefaultsV4(rootSchema, config, maxRecursionDepth) {
706
561
  const { data } = getDefaultValuesFromZodSchema({
707
562
  schema: rootSchema,
708
563
  useDefaultSchemaValues: config.useDefaultSchemaValues,
709
564
  constraints: config.constraints,
710
565
  maxRecursionDepth
711
566
  });
712
- if (config.strict === false) {
713
- return { data, errors: void 0, success: true, formKey };
714
- }
715
- if (containsAsyncTransform(rootSchema)) {
716
- return { data, errors: void 0, success: true, formKey };
567
+ if (containsAsyncTransform(rootSchema) || containsAsyncRefine(rootSchema)) {
568
+ return { data, errors: void 0, success: true };
717
569
  }
718
- const parseTarget = containsAsyncRefine(rootSchema) ? stripAsyncChecks(rootSchema) : rootSchema;
719
570
  try {
720
- const strictResult = parseTarget.safeParse(data);
721
- if (strictResult.success) {
722
- return { data, errors: void 0, success: true, formKey };
571
+ const parseResult = rootSchema.safeParse(data);
572
+ if (parseResult.success) {
573
+ return { data, errors: void 0, success: true };
723
574
  }
724
575
  return {
725
576
  data,
726
- errors: zodIssuesToValidationErrors(strictResult.error.issues),
727
- success: false,
728
- formKey
577
+ errors: zodIssuesToValidationErrors(parseResult.error.issues),
578
+ success: false
729
579
  };
730
580
  } catch {
731
- return { data, errors: void 0, success: true, formKey };
581
+ return { data, errors: void 0, success: true };
732
582
  }
733
583
  }
734
- function buildSubSchemaStubV4(schema, formKey, maxRecursionDepth) {
584
+ function buildSubSchemaStubV4(schema, maxRecursionDepth) {
735
585
  return {
736
- fingerprint: () => lazyFingerprint(schema),
737
586
  needsAsyncValidation: () => containsAsyncRefine(schema),
738
587
  getDefaultValues: () => ({
739
588
  data: deriveDefault(schema, true, maxRecursionDepth),
740
589
  errors: void 0,
741
- success: true,
742
- formKey
590
+ success: true
743
591
  }),
744
592
  getSchemasAtPath: () => [],
745
593
  validateAtPath: async (data) => {
@@ -748,15 +596,13 @@ function buildSubSchemaStubV4(schema, formKey, maxRecursionDepth) {
748
596
  return {
749
597
  data: result.data,
750
598
  errors: void 0,
751
- success: true,
752
- formKey
599
+ success: true
753
600
  };
754
601
  }
755
602
  return {
756
603
  data: void 0,
757
604
  errors: zodIssuesToValidationErrors(result.error.issues),
758
- success: false,
759
- formKey
605
+ success: false
760
606
  };
761
607
  }
762
608
  };
@@ -808,4 +654,4 @@ function useForm(configuration) {
808
654
  });
809
655
  }
810
656
 
811
- export { assertZodVersion as a, getIntersectionRight as b, unwrapLazy as c, unwrapInner as d, unwrapPipe as e, getDiscriminator as f, getIntersectionLeft as g, getDiscriminatedOptions as h, getUnionOptions as i, getRecordKeyType as j, kindOf as k, getRecordValueType as l, getTupleItems as m, getSetValueType as n, getArrayElement as o, getObjectShape as p, getEnumValues as q, getLiteralValues as r, getChecks as s, getCatchDefault as t, useForm as u, getDefaultValue as v, zodV4Adapter as z };
657
+ export { assertZodVersion as a, kindOf as k, useForm as u, zodV4Adapter as z };
@@ -40,12 +40,6 @@ function normalizeErrorInputs(input, scope, defaultCode) {
40
40
  const items = Array.isArray(input) ? input : [input];
41
41
  return items.map((item) => normalizeErrorInput(item, scope, defaultCode));
42
42
  }
43
- function* cellEntriesFor(cells, side) {
44
- for (const [key, cell] of cells) {
45
- const list = cell[side];
46
- if (list.length > 0) yield [key, list];
47
- }
48
- }
49
43
  class RegistryNotInstalledError extends AttaformError {
50
44
  constructor() {
51
45
  super(
@@ -175,18 +169,6 @@ function pathKeyToDotted(key) {
175
169
  if (segments === null) return null;
176
170
  return segmentsToDotted(segments);
177
171
  }
178
- function coerceToPathKey(input) {
179
- if (input.length > 0 && input.charCodeAt(0) === 91) {
180
- try {
181
- const parsed = JSON.parse(input);
182
- if (Array.isArray(parsed) && parsed.every((s) => typeof s === "string" || typeof s === "number")) {
183
- return input;
184
- }
185
- } catch {
186
- }
187
- }
188
- return canonicalizePath(input).key;
189
- }
190
172
  const ROOT_PATH = Object.freeze([]);
191
173
  const ROOT_PATH_KEY = "[]";
192
174
  function isPathPrefix(prefix, path) {
@@ -204,4 +186,4 @@ function pathsEqual(a, b) {
204
186
  return true;
205
187
  }
206
188
 
207
- export { AttaformError as A, InvalidPathError as I, OutsideSetupError as O, ROOT_PATH as R, SubmitErrorHandlerError as S, InvalidUseFormConfigError as a, ROOT_PATH_KEY as b, RegistryNotInstalledError as c, ReservedFormKeyError as d, canonicalizePath as e, pathsEqual as f, pathKeyToDotted as g, SET_MEMBER_SEGMENT as h, isPathPrefix as i, cellEntriesFor as j, keyForSegments as k, groupErrorsByKey as l, mapSegmentKeys as m, normalizeErrorInput as n, normalizeErrorInputs as o, parseDottedPath as p, coerceToPathKey as q, segmentsForPathKey as s, toError as t };
189
+ export { AttaformError as A, InvalidPathError as I, OutsideSetupError as O, ROOT_PATH as R, SubmitErrorHandlerError as S, InvalidUseFormConfigError as a, ROOT_PATH_KEY as b, RegistryNotInstalledError as c, ReservedFormKeyError as d, canonicalizePath as e, pathsEqual as f, pathKeyToDotted as g, SET_MEMBER_SEGMENT as h, isPathPrefix as i, groupErrorsByKey as j, keyForSegments as k, normalizeErrorInputs as l, mapSegmentKeys as m, normalizeErrorInput as n, parseDottedPath as p, segmentsForPathKey as s, toError as t };