attaform 0.17.2 → 0.18.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 (115) hide show
  1. package/README.md +77 -36
  2. package/dist/chunks/devtools.cjs +10 -37
  3. package/dist/chunks/devtools.cjs.map +1 -1
  4. package/dist/chunks/devtools.mjs +10 -37
  5. package/dist/chunks/devtools.mjs.map +1 -1
  6. package/dist/chunks/indexeddb.cjs +4 -4
  7. package/dist/chunks/indexeddb.cjs.map +1 -1
  8. package/dist/chunks/indexeddb.mjs +1 -1
  9. package/dist/chunks/local-storage.cjs +2 -2
  10. package/dist/chunks/local-storage.cjs.map +1 -1
  11. package/dist/chunks/local-storage.mjs +1 -1
  12. package/dist/chunks/session-storage.cjs +2 -2
  13. package/dist/chunks/session-storage.cjs.map +1 -1
  14. package/dist/chunks/session-storage.mjs +1 -1
  15. package/dist/index.cjs +42 -37
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +159 -196
  18. package/dist/index.d.mts +159 -196
  19. package/dist/index.d.ts +159 -196
  20. package/dist/index.mjs +5 -7
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/nuxt.cjs +31 -40
  23. package/dist/nuxt.cjs.map +1 -1
  24. package/dist/nuxt.d.cts +8 -1
  25. package/dist/nuxt.d.mts +8 -1
  26. package/dist/nuxt.d.ts +8 -1
  27. package/dist/nuxt.mjs +32 -41
  28. package/dist/nuxt.mjs.map +1 -1
  29. package/dist/runtime/components/AttaformDevtoolsPanel.d.vue.ts +7 -0
  30. package/dist/runtime/components/AttaformDevtoolsPanel.vue +453 -0
  31. package/dist/runtime/components/AttaformDevtoolsPanel.vue.d.ts +7 -0
  32. package/dist/runtime/components/DevtoolsValueTree.d.vue.ts +37 -0
  33. package/dist/runtime/components/DevtoolsValueTree.vue +192 -0
  34. package/dist/runtime/components/DevtoolsValueTree.vue.d.ts +37 -0
  35. package/dist/runtime/plugins/attaform.cjs +17 -6
  36. package/dist/runtime/plugins/attaform.cjs.map +1 -1
  37. package/dist/runtime/plugins/attaform.mjs +15 -4
  38. package/dist/runtime/plugins/attaform.mjs.map +1 -1
  39. package/dist/shared/{attaform.C0iFnTN0.d.ts → attaform.2b7M2mww.d.mts} +57 -23
  40. package/dist/shared/attaform.5UhpSVFI.cjs +63 -0
  41. package/dist/shared/attaform.5UhpSVFI.cjs.map +1 -0
  42. package/dist/shared/attaform.BDdFdjeX.mjs +57 -0
  43. package/dist/shared/attaform.BDdFdjeX.mjs.map +1 -0
  44. package/dist/shared/{attaform.Dee2rU1P.cjs → attaform.BqK_L4gK.cjs} +310 -24
  45. package/dist/shared/attaform.BqK_L4gK.cjs.map +1 -0
  46. package/dist/shared/attaform.Bubm_slq.cjs.map +1 -1
  47. package/dist/shared/attaform.CXpzmj38.mjs.map +1 -1
  48. package/dist/shared/{attaform.Drt6fivF.mjs → attaform.CtNUB9nf.mjs} +74 -76
  49. package/dist/shared/attaform.CtNUB9nf.mjs.map +1 -0
  50. package/dist/shared/{attaform.C5MH4lNh.d.mts → attaform.DF8wo-ry.d.ts} +4 -4
  51. package/dist/shared/attaform.DK9aj0N8.d.ts +1651 -0
  52. package/dist/shared/{attaform.BPRHR3Zs.cjs → attaform.DUHru0OF.cjs} +83 -85
  53. package/dist/shared/attaform.DUHru0OF.cjs.map +1 -0
  54. package/dist/shared/{attaform.C6lbmMUe.d.ts → attaform.DVLB6CAn.d.mts} +4 -4
  55. package/dist/shared/{attaform.C_5aB6EQ.d.ts → attaform.Dj9mwbaV.d.cts} +756 -148
  56. package/dist/shared/{attaform.C_5aB6EQ.d.mts → attaform.Dj9mwbaV.d.mts} +756 -148
  57. package/dist/shared/{attaform.C_5aB6EQ.d.cts → attaform.Dj9mwbaV.d.ts} +756 -148
  58. package/dist/shared/{attaform.BV40t5y2.cjs → attaform.Dlk1jMuv.cjs} +245 -108
  59. package/dist/shared/attaform.Dlk1jMuv.cjs.map +1 -0
  60. package/dist/shared/attaform.DoSuaKMd.d.cts +1651 -0
  61. package/dist/shared/{attaform.B3ZaPIzS.mjs → attaform.DsC3rZHG.mjs} +1804 -219
  62. package/dist/shared/attaform.DsC3rZHG.mjs.map +1 -0
  63. package/dist/shared/{attaform.Cer8JO_P.cjs → attaform.II89Pcf4.cjs} +1860 -272
  64. package/dist/shared/attaform.II89Pcf4.cjs.map +1 -0
  65. package/dist/shared/{attaform.CHorcsIU.d.cts → attaform.M33WKVV4.d.cts} +57 -23
  66. package/dist/shared/{attaform.CIEQgJnM.mjs → attaform.Xhg0AYNa.mjs} +300 -26
  67. package/dist/shared/attaform.Xhg0AYNa.mjs.map +1 -0
  68. package/dist/shared/{attaform.CpERWz3u.mjs → attaform.Xt0A3QUd.mjs} +232 -95
  69. package/dist/shared/attaform.Xt0A3QUd.mjs.map +1 -0
  70. package/dist/shared/attaform.iTqxvl-P.d.mts +1651 -0
  71. package/dist/shared/{attaform.CuE-bS1C.d.mts → attaform.tsNFcEW7.d.ts} +57 -23
  72. package/dist/shared/{attaform.DtMN-MAm.d.cts → attaform.tts_OM7j.d.cts} +4 -4
  73. package/dist/vite.cjs +288 -2
  74. package/dist/vite.cjs.map +1 -1
  75. package/dist/vite.mjs +288 -2
  76. package/dist/vite.mjs.map +1 -1
  77. package/dist/zod-v3.cjs +11 -8
  78. package/dist/zod-v3.cjs.map +1 -1
  79. package/dist/zod-v3.d.cts +6 -6
  80. package/dist/zod-v3.d.mts +6 -6
  81. package/dist/zod-v3.d.ts +6 -6
  82. package/dist/zod-v3.mjs +3 -3
  83. package/dist/zod-v4.cjs +11 -8
  84. package/dist/zod-v4.cjs.map +1 -1
  85. package/dist/zod-v4.d.cts +5 -5
  86. package/dist/zod-v4.d.mts +5 -5
  87. package/dist/zod-v4.d.ts +5 -5
  88. package/dist/zod-v4.mjs +3 -3
  89. package/dist/zod.cjs +15 -16
  90. package/dist/zod.cjs.map +1 -1
  91. package/dist/zod.d.cts +127 -40
  92. package/dist/zod.d.mts +127 -40
  93. package/dist/zod.d.ts +127 -40
  94. package/dist/zod.mjs +7 -11
  95. package/dist/zod.mjs.map +1 -1
  96. package/package.json +18 -7
  97. package/dist/shared/attaform.B1jvxsOF.d.mts +0 -156
  98. package/dist/shared/attaform.B3ZaPIzS.mjs.map +0 -1
  99. package/dist/shared/attaform.BBM2muQ9.cjs +0 -101
  100. package/dist/shared/attaform.BBM2muQ9.cjs.map +0 -1
  101. package/dist/shared/attaform.BPRHR3Zs.cjs.map +0 -1
  102. package/dist/shared/attaform.BV40t5y2.cjs.map +0 -1
  103. package/dist/shared/attaform.C6qzEdIM.d.cts +0 -156
  104. package/dist/shared/attaform.C8LVFVVe.cjs +0 -32
  105. package/dist/shared/attaform.C8LVFVVe.cjs.map +0 -1
  106. package/dist/shared/attaform.CIEQgJnM.mjs.map +0 -1
  107. package/dist/shared/attaform.CTwNcpLE.d.ts +0 -156
  108. package/dist/shared/attaform.Cer8JO_P.cjs.map +0 -1
  109. package/dist/shared/attaform.CpERWz3u.mjs.map +0 -1
  110. package/dist/shared/attaform.Dee2rU1P.cjs.map +0 -1
  111. package/dist/shared/attaform.Drt6fivF.mjs.map +0 -1
  112. package/dist/shared/attaform.Vo-Kft0t.mjs +0 -29
  113. package/dist/shared/attaform.Vo-Kft0t.mjs.map +0 -1
  114. package/dist/shared/attaform.h1sq3BFu.mjs +0 -92
  115. package/dist/shared/attaform.h1sq3BFu.mjs.map +0 -1
@@ -2,10 +2,9 @@
2
2
 
3
3
  const lodashEs = require('lodash-es');
4
4
  const zod = require('zod');
5
- const useFormContext = require('./attaform.Cer8JO_P.cjs');
6
- const paths = require('./attaform.BBM2muQ9.cjs');
5
+ const injectWizard = require('./attaform.II89Pcf4.cjs');
6
+ const paths = require('./attaform.BqK_L4gK.cjs');
7
7
  const fieldMetaStore = require('./attaform.C8CyvYa_.cjs');
8
- const plugin = require('./attaform.Dee2rU1P.cjs');
9
8
 
10
9
  const fieldMeta = fieldMetaStore.fieldMetaStore;
11
10
  function withMeta(schema, payload) {
@@ -19,7 +18,7 @@ function getFieldMeta(schema) {
19
18
  return fieldMetaStore.getFieldMetaForSchema(schema);
20
19
  }
21
20
 
22
- class UnsupportedSchemaError extends plugin.AttaformError {
21
+ class UnsupportedSchemaError extends paths.AttaformError {
23
22
  }
24
23
 
25
24
  function isZodSchemaType(schema, expectedType) {
@@ -328,22 +327,37 @@ const PERMISSIVE_V3 = /* @__PURE__ */ new Set([
328
327
  "symbol",
329
328
  "function",
330
329
  "map",
331
- "set"
330
+ "set",
331
+ "file"
332
332
  ]);
333
+ const KIND_STRING = /* @__PURE__ */ new Set(["string"]);
334
+ const KIND_NUMBER = /* @__PURE__ */ new Set(["number"]);
335
+ const KIND_BOOLEAN = /* @__PURE__ */ new Set(["boolean"]);
336
+ const KIND_BIGINT = /* @__PURE__ */ new Set(["bigint"]);
337
+ const KIND_DATE = /* @__PURE__ */ new Set(["date"]);
338
+ const KIND_NULL = /* @__PURE__ */ new Set(["null"]);
339
+ const KIND_UNDEFINED = /* @__PURE__ */ new Set(["undefined"]);
340
+ const KIND_OBJECT = /* @__PURE__ */ new Set(["object"]);
341
+ const KIND_ARRAY = /* @__PURE__ */ new Set(["array"]);
342
+ const KIND_SET = /* @__PURE__ */ new Set(["set"]);
343
+ const EMPTY_KINDS = /* @__PURE__ */ new Set();
333
344
  const MAX_LAZY_DEPTH_V3 = 64;
334
345
  function slimPrimitivesV3(schema, depth = 0) {
335
- if (depth > MAX_LAZY_DEPTH_V3) return new Set(PERMISSIVE_V3);
346
+ return new Set(walk(schema, depth));
347
+ }
348
+ function walk(schema, depth) {
349
+ if (depth > MAX_LAZY_DEPTH_V3) return PERMISSIVE_V3;
336
350
  const def = schema._def;
337
351
  const typeName = def?.typeName;
338
- if (isZodSchemaType(schema, "ZodString")) return /* @__PURE__ */ new Set(["string"]);
339
- if (isZodSchemaType(schema, "ZodNumber")) return /* @__PURE__ */ new Set(["number"]);
340
- if (isZodSchemaType(schema, "ZodBoolean")) return /* @__PURE__ */ new Set(["boolean"]);
341
- if (isZodSchemaType(schema, "ZodBigInt")) return /* @__PURE__ */ new Set(["bigint"]);
342
- if (isZodSchemaType(schema, "ZodDate")) return /* @__PURE__ */ new Set(["date"]);
343
- if (isZodSchemaType(schema, "ZodNull")) return /* @__PURE__ */ new Set(["null"]);
344
- if (isZodSchemaType(schema, "ZodUndefined")) return /* @__PURE__ */ new Set(["undefined"]);
345
- if (typeName === "ZodVoid") return /* @__PURE__ */ new Set(["undefined"]);
346
- if (typeName === "ZodNaN") return /* @__PURE__ */ new Set(["number"]);
352
+ if (isZodSchemaType(schema, "ZodString")) return KIND_STRING;
353
+ if (isZodSchemaType(schema, "ZodNumber")) return KIND_NUMBER;
354
+ if (isZodSchemaType(schema, "ZodBoolean")) return KIND_BOOLEAN;
355
+ if (isZodSchemaType(schema, "ZodBigInt")) return KIND_BIGINT;
356
+ if (isZodSchemaType(schema, "ZodDate")) return KIND_DATE;
357
+ if (isZodSchemaType(schema, "ZodNull")) return KIND_NULL;
358
+ if (isZodSchemaType(schema, "ZodUndefined")) return KIND_UNDEFINED;
359
+ if (typeName === "ZodVoid") return KIND_UNDEFINED;
360
+ if (typeName === "ZodNaN") return KIND_NUMBER;
347
361
  if (isZodSchemaType(schema, "ZodEnum")) {
348
362
  const options = schema.options;
349
363
  const out = /* @__PURE__ */ new Set();
@@ -351,70 +365,72 @@ function slimPrimitivesV3(schema, depth = 0) {
351
365
  if (typeof v === "string") out.add("string");
352
366
  else if (typeof v === "number") out.add("number");
353
367
  }
354
- return out.size === 0 ? /* @__PURE__ */ new Set(["string"]) : out;
368
+ return out.size === 0 ? KIND_STRING : out;
355
369
  }
356
370
  if (isZodSchemaType(schema, "ZodLiteral")) {
357
371
  const value = schema.value;
358
372
  return /* @__PURE__ */ new Set([slimKindOfRawV3(value)]);
359
373
  }
360
374
  if (isZodSchemaType(schema, "ZodObject") || typeName === "ZodRecord") {
361
- return /* @__PURE__ */ new Set(["object"]);
375
+ return KIND_OBJECT;
362
376
  }
363
377
  if (isZodSchemaType(schema, "ZodArray") || typeName === "ZodTuple") {
364
- return /* @__PURE__ */ new Set(["array"]);
378
+ return KIND_ARRAY;
365
379
  }
366
380
  if (isZodSchemaType(schema, "ZodSet")) {
367
- return /* @__PURE__ */ new Set(["set"]);
381
+ return KIND_SET;
368
382
  }
369
383
  if (isZodSchemaType(schema, "ZodOptional")) {
370
384
  const inner = def?.innerType;
371
- const innerSet = inner === void 0 ? /* @__PURE__ */ new Set() : slimPrimitivesV3(inner, depth + 1);
372
- innerSet.add("undefined");
373
- return innerSet;
385
+ const innerSet = inner === void 0 ? EMPTY_KINDS : walk(inner, depth + 1);
386
+ const out = new Set(innerSet);
387
+ out.add("undefined");
388
+ return out;
374
389
  }
375
390
  if (isZodSchemaType(schema, "ZodNullable")) {
376
391
  const inner = def?.innerType;
377
- const innerSet = inner === void 0 ? /* @__PURE__ */ new Set() : slimPrimitivesV3(inner, depth + 1);
378
- innerSet.add("null");
379
- return innerSet;
392
+ const innerSet = inner === void 0 ? EMPTY_KINDS : walk(inner, depth + 1);
393
+ const out = new Set(innerSet);
394
+ out.add("null");
395
+ return out;
380
396
  }
381
397
  if (isZodSchemaType(schema, "ZodDefault") || isZodSchemaType(schema, "ZodReadonly") || isZodSchemaType(schema, "ZodCatch") || isZodSchemaType(schema, "ZodBranded")) {
382
398
  const inner = def?.innerType ?? def?.type;
383
- return inner === void 0 ? new Set(PERMISSIVE_V3) : slimPrimitivesV3(inner, depth + 1);
399
+ return inner === void 0 ? PERMISSIVE_V3 : walk(inner, depth + 1);
384
400
  }
385
401
  if (isZodSchemaType(schema, "ZodEffects")) {
386
402
  const inner = def?.schema;
387
- return inner === void 0 ? new Set(PERMISSIVE_V3) : slimPrimitivesV3(inner, depth + 1);
403
+ return inner === void 0 ? PERMISSIVE_V3 : walk(inner, depth + 1);
388
404
  }
389
405
  if (isZodSchemaType(schema, "ZodPipeline")) {
390
406
  const inner = def?.in;
391
- return inner === void 0 ? new Set(PERMISSIVE_V3) : slimPrimitivesV3(inner, depth + 1);
407
+ return inner === void 0 ? PERMISSIVE_V3 : walk(inner, depth + 1);
392
408
  }
393
409
  if (typeName === "ZodLazy") {
394
410
  const getter = def?.getter;
395
- if (typeof getter !== "function") return new Set(PERMISSIVE_V3);
396
- return slimPrimitivesV3(getter(), depth + 1);
411
+ if (typeof getter !== "function") return PERMISSIVE_V3;
412
+ return walk(getter(), depth + 1);
397
413
  }
398
414
  if (isZodSchemaType(schema, "ZodUnion") || isZodSchemaType(schema, "ZodDiscriminatedUnion")) {
399
415
  const options = def?.options ?? [];
400
416
  const out = /* @__PURE__ */ new Set();
401
417
  for (const opt of options) {
402
- for (const k of slimPrimitivesV3(opt, depth + 1)) out.add(k);
418
+ for (const k of walk(opt, depth + 1)) out.add(k);
403
419
  }
404
- return out.size === 0 ? new Set(PERMISSIVE_V3) : out;
420
+ return out.size === 0 ? PERMISSIVE_V3 : out;
405
421
  }
406
422
  if (typeName === "ZodIntersection") {
407
423
  const left = def?.left;
408
424
  const right = def?.right;
409
- const leftSet = left === void 0 ? new Set(PERMISSIVE_V3) : slimPrimitivesV3(left, depth + 1);
410
- const rightSet = right === void 0 ? new Set(PERMISSIVE_V3) : slimPrimitivesV3(right, depth + 1);
425
+ const leftSet = left === void 0 ? PERMISSIVE_V3 : walk(left, depth + 1);
426
+ const rightSet = right === void 0 ? PERMISSIVE_V3 : walk(right, depth + 1);
411
427
  const out = /* @__PURE__ */ new Set();
412
428
  for (const k of leftSet) if (rightSet.has(k)) out.add(k);
413
429
  return out;
414
430
  }
415
- if (typeName === "ZodNever") return /* @__PURE__ */ new Set();
416
- if (typeName === "ZodAny" || typeName === "ZodUnknown") return new Set(PERMISSIVE_V3);
417
- return new Set(PERMISSIVE_V3);
431
+ if (typeName === "ZodNever") return EMPTY_KINDS;
432
+ if (typeName === "ZodAny" || typeName === "ZodUnknown") return PERMISSIVE_V3;
433
+ return PERMISSIVE_V3;
418
434
  }
419
435
  function slimKindOfRawV3(value) {
420
436
  if (value === null) return "null";
@@ -477,6 +493,7 @@ function zodAdapter(zodSchema) {
477
493
  }
478
494
  }
479
495
  const leafCache = /* @__PURE__ */ new Map();
496
+ const preprocessOrCoerceCache = /* @__PURE__ */ new Map();
480
497
  const abstractSchema = {
481
498
  fingerprint: () => fingerprintZodSchema(_zodSchema),
482
499
  getDefaultValues(config) {
@@ -537,9 +554,9 @@ function zodAdapter(zodSchema) {
537
554
  }
538
555
  const candidate = schemasAtPath[0];
539
556
  if (candidate !== void 0) {
540
- const valueAtPath = useFormContext.getAtPath(rawDefaultValues, path);
557
+ const valueAtPath = injectWizard.getAtPath(rawDefaultValues, path);
541
558
  const slimKinds = slimPrimitivesV3(candidate);
542
- if (slimKinds.size > 0 && slimKinds.has(useFormContext.slimKindOf(valueAtPath))) {
559
+ if (slimKinds.size > 0 && slimKinds.has(injectWizard.slimKindOf(valueAtPath))) {
543
560
  continue;
544
561
  }
545
562
  }
@@ -615,35 +632,6 @@ function zodAdapter(zodSchema) {
615
632
  formKey: _formKey
616
633
  };
617
634
  },
618
- normalizeWriteValueAtPath(value, path) {
619
- const candidates = path.length === 0 ? [_zodSchema] : getNestedZodSchemasAtPath(_zodSchema, path);
620
- const [first] = candidates;
621
- if (first === void 0) return value;
622
- let current = first;
623
- let result = value;
624
- for (let i = 0; i < 64; i++) {
625
- if (!isZodSchemaType(current, "ZodEffects")) break;
626
- const def = current._def;
627
- const effect = def.effect;
628
- if (effect?.type !== "preprocess") break;
629
- const fn = effect.transform;
630
- if (typeof fn !== "function") break;
631
- let next;
632
- try {
633
- next = fn(result);
634
- } catch (cause) {
635
- throw new Error(
636
- `[attaform] input normalization at path "${path.join(".")}" threw \u2014 write rejected.`,
637
- { cause }
638
- );
639
- }
640
- if (next instanceof Promise) return value;
641
- result = next;
642
- if (def.schema === void 0) break;
643
- current = def.schema;
644
- }
645
- return result;
646
- },
647
635
  getDefaultAtPath(path) {
648
636
  if (path.length === 0) {
649
637
  return getDefaultValuesFromZodSchema(_zodSchema, true, _formKey);
@@ -774,6 +762,26 @@ function zodAdapter(zodSchema) {
774
762
  leafCache.set(cacheKey, isLeaf);
775
763
  return isLeaf;
776
764
  },
765
+ isPreprocessOrCoerceLeaf(path) {
766
+ const cacheKey = paths.canonicalizePath(path).key;
767
+ const cached = preprocessOrCoerceCache.get(cacheKey);
768
+ if (cached !== void 0) return cached;
769
+ let hit = false;
770
+ for (let i = 0; i <= path.length && !hit; i++) {
771
+ const prefix = path.slice(0, i);
772
+ const candidates = prefix.length === 0 ? [_zodSchema] : getNestedZodSchemasAtPath(_zodSchema, prefix);
773
+ for (const candidate of candidates) {
774
+ if (!isZodSchemaType(candidate, "ZodEffects")) continue;
775
+ const def = candidate._def;
776
+ if (def.effect?.type === "preprocess") {
777
+ hit = true;
778
+ break;
779
+ }
780
+ }
781
+ }
782
+ preprocessOrCoerceCache.set(cacheKey, hit);
783
+ return hit;
784
+ },
777
785
  validateAtPath(data, path, options) {
778
786
  const trySync = options?.sync === true;
779
787
  if (trySync) {
@@ -863,7 +871,7 @@ function zodIssuesToValidationErrors(issues, formKey) {
863
871
  code = `zod:${issue.code}`;
864
872
  } else {
865
873
  code = "zod:unknown";
866
- if (plugin.__DEV__ && !warnedZodCodeMissing) {
874
+ if (paths.__DEV__ && !warnedZodCodeMissing) {
867
875
  warnedZodCodeMissing = true;
868
876
  console.warn(
869
877
  "[attaform] zod-v3 adapter received an issue with no string `code`; stamping `'zod:unknown'`. This usually means a custom Zod plugin emitted an issue without the standard code field."
@@ -902,7 +910,7 @@ const NO_SCHEMAS_FOUND_AT_PATH_OF_CONCRETE_SCHEMA = (path, formKey) => [
902
910
  message: `Programming Error: useForm.validateAtPath failed to find 1 or more schemas corresponding to the path ${path} in the concrete schema. Does the nested schema exist on form with key '${formKey}'?`,
903
911
  path,
904
912
  formKey,
905
- code: useFormContext.AttaformErrorCode.PathNotFound
913
+ code: injectWizard.AttaformErrorCode.PathNotFound
906
914
  }
907
915
  ];
908
916
  function getNestedZodSchemasAtPath(zodSchema, segments) {
@@ -1549,7 +1557,7 @@ function resolveFieldMetaAtPathV3(rootSchema, path) {
1549
1557
  const target = path.length === 0 ? rootSchema : walkV3ToLeafSchema(rootSchema, path);
1550
1558
  if (target === void 0) {
1551
1559
  return {
1552
- label: useFormContext.humanize(lastSegment),
1560
+ label: injectWizard.humanize(lastSegment),
1553
1561
  description: void 0,
1554
1562
  placeholder: void 0,
1555
1563
  meta: Object.freeze({})
@@ -1561,7 +1569,7 @@ function resolveFieldMetaAtPathV3(rootSchema, path) {
1561
1569
  const peeledDescription = peeled !== target && typeof peeled.description === "string" ? peeled.description : void 0;
1562
1570
  const schemaDescription = targetDescription ?? peeledDescription;
1563
1571
  return {
1564
- label: payload?.label ?? useFormContext.humanize(lastSegment),
1572
+ label: payload?.label ?? injectWizard.humanize(lastSegment),
1565
1573
  description: payload?.description ?? schemaDescription ?? void 0,
1566
1574
  placeholder: payload?.placeholder ?? void 0,
1567
1575
  meta: Object.freeze({ ...payload ?? {} })
@@ -1570,25 +1578,15 @@ function resolveFieldMetaAtPathV3(rootSchema, path) {
1570
1578
 
1571
1579
  function useForm(configuration) {
1572
1580
  if (configuration === void 0 || configuration === null || configuration.schema === void 0) {
1573
- throw new plugin.InvalidUseFormConfigError();
1581
+ throw new paths.InvalidUseFormConfigError();
1574
1582
  }
1575
1583
  function isZodType(value) {
1576
1584
  return typeof value === "object" && value !== null && "_def" in value;
1577
1585
  }
1578
1586
  const { schema } = configuration;
1579
1587
  const abstractSchema = isZodType(schema) ? zodAdapter(schema) : schema;
1580
- return useFormContext.useAbstractForm({
1588
+ return injectWizard.useAbstractForm({
1581
1589
  ...configuration,
1582
- // `zodAdapter`'s constraint on its third generic is
1583
- // `GetValueFormType extends TypeWithNullableDynamicKeys<FormSchema>`,
1584
- // and `Schema` at this implementation overload is only constrained
1585
- // by `extends z.ZodSchema<unknown>` — too loose for
1586
- // `z.output<UnwrapZodObject<typeof schema>>` to resolve concretely.
1587
- // Pass `TypeWithNullableDynamicKeys<typeof schema>` here purely to
1588
- // satisfy the adapter's constraint at the structural-cast layer.
1589
- // The PUBLIC signature's `GetValueFormType` default (line 67) is
1590
- // what consumers see — that's `z.output<UnwrapZodObject<Schema>>`,
1591
- // matching the docstring promise. Runtime is unaffected either way.
1592
1590
  schema: abstractSchema,
1593
1591
  defaultValues: configuration.defaultValues
1594
1592
  });
@@ -1599,4 +1597,4 @@ exports.isZodSchemaType = isZodSchemaType;
1599
1597
  exports.useForm = useForm;
1600
1598
  exports.withMeta = withMeta;
1601
1599
  exports.zodAdapter = zodAdapter;
1602
- //# sourceMappingURL=attaform.BPRHR3Zs.cjs.map
1600
+ //# sourceMappingURL=attaform.DUHru0OF.cjs.map