attaform 0.27.6 → 0.28.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 (184) hide show
  1. package/dist/abstract.d.mts +5 -4
  2. package/dist/abstract.mjs +4 -3
  3. package/dist/chunks/fingerprint.mjs +0 -1
  4. package/dist/chunks/fingerprint2.mjs +1 -2
  5. package/dist/dev/abstract.mjs +4 -0
  6. package/dist/{chunks → dev/chunks}/dev-key-collision-warnings.mjs +0 -1
  7. package/dist/{chunks → dev/chunks}/devtools.mjs +5 -6
  8. package/dist/{chunks/fingerprint.cjs → dev/chunks/fingerprint.mjs} +7 -10
  9. package/dist/{chunks/fingerprint2.cjs → dev/chunks/fingerprint2.mjs} +32 -35
  10. package/dist/dev/directive.mjs +1 -0
  11. package/dist/dev/history.mjs +89 -0
  12. package/dist/dev/index.mjs +5 -0
  13. package/dist/dev/runtime/plugins/attaform.mjs +40 -0
  14. package/dist/{shared/attaform.D6tk90Rc.cjs → dev/shared/attaform-dev.6qxD-Yqo.mjs} +187 -43
  15. package/dist/{shared/attaform.CQN9R62B.cjs → dev/shared/attaform-dev.BJGA_UOS.mjs} +1 -4
  16. package/dist/{shared/attaform.DYEr28Pt.mjs → dev/shared/attaform-dev.BR8u0YOZ.mjs} +6 -7
  17. package/dist/dev/shared/attaform-dev.BXE2cr0L.mjs +220 -0
  18. package/dist/dev/shared/attaform-dev.By4PRjt0.mjs +248 -0
  19. package/dist/{shared/attaform.B1ZYt2Li.mjs → dev/shared/attaform-dev.D2I8e_Mm.mjs} +132 -568
  20. package/dist/dev/shared/attaform-dev.Dr2YzS5B.mjs +197 -0
  21. package/dist/{shared/attaform.nMaz2C5P.mjs → dev/shared/attaform-dev.P7cseiEG.mjs} +178 -397
  22. package/dist/{shared/attaform.CKH2lGdL.mjs → dev/shared/attaform-dev.WmuhD_CZ.mjs} +3944 -5056
  23. package/dist/{shared/attaform.DMxM2kol.mjs → dev/shared/attaform-dev.oYrkP9dj.mjs} +160 -508
  24. package/dist/dev/zod-v3.mjs +17 -0
  25. package/dist/dev/zod-v4.mjs +16 -0
  26. package/dist/dev/zod.mjs +5 -0
  27. package/dist/directive.d.mts +20 -0
  28. package/dist/directive.mjs +1 -0
  29. package/dist/esbuild.mjs +0 -1
  30. package/dist/history.d.mts +59 -0
  31. package/dist/history.mjs +89 -0
  32. package/dist/index.d.mts +11 -5
  33. package/dist/index.mjs +5 -4
  34. package/dist/nuxt.d.mts +1 -1
  35. package/dist/nuxt.mjs +5 -2
  36. package/dist/rollup.mjs +0 -1
  37. package/dist/rspack.d.mts +6 -1
  38. package/dist/rspack.mjs +0 -1
  39. package/dist/runtime/components/AttaformDevtoolsPanel.vue +9 -8
  40. package/dist/runtime/plugins/attaform.mjs +1 -2
  41. package/dist/shared/{attaform.Fp3sCrVs.d.ts → attaform.B4VkS43-.d.mts} +2 -2
  42. package/dist/shared/{attaform.DrvMscNX.cjs → attaform.B8k8JrmK.mjs} +4073 -5630
  43. package/dist/shared/attaform.BJGA_UOS.mjs +0 -1
  44. package/dist/shared/{attaform.CoR4mWfv.mjs → attaform.C09fpdLS.mjs} +172 -16
  45. package/dist/shared/{attaform.D8kliaKw.cjs → attaform.CJP3RkGa.mjs} +141 -590
  46. package/dist/shared/{attaform.DniawQLP.d.cts → attaform.Cgu-hdSb.d.mts} +268 -68
  47. package/dist/shared/attaform.Cs2Rbdlo.mjs +0 -1
  48. package/dist/shared/{attaform.CHlJLAiv.d.mts → attaform.D5V4tZWq.d.mts} +69 -179
  49. package/dist/shared/{attaform.B9Wyhfro.cjs → attaform.D6DCnnQu.mjs} +11 -16
  50. package/dist/shared/attaform.DhnPb6nK.mjs +0 -1
  51. package/dist/shared/attaform.Dq4vWxuG.mjs +197 -0
  52. package/dist/shared/attaform.JfSWdEcb.d.mts +44 -0
  53. package/dist/shared/attaform.KvlEedlF.mjs +0 -1
  54. package/dist/shared/{attaform.DdQN7sgN.cjs → attaform.NLmerepI.mjs} +175 -557
  55. package/dist/shared/attaform.h0i6LijT.mjs +242 -0
  56. package/dist/shared/{attaform.Biytrv0-.cjs → attaform.uLbun31C.mjs} +204 -544
  57. package/dist/shared/attaform.v0fQtWyA.mjs +0 -1
  58. package/dist/shared/attaform.wfY8XFvm.mjs +197 -0
  59. package/dist/transforms.mjs +0 -1
  60. package/dist/vite.d.mts +17 -5
  61. package/dist/vite.mjs +24 -2
  62. package/dist/webpack.d.mts +6 -1
  63. package/dist/webpack.mjs +0 -1
  64. package/dist/zod-v3.d.mts +11 -6
  65. package/dist/zod-v3.mjs +17 -4
  66. package/dist/zod-v4.d.mts +12 -6
  67. package/dist/zod-v4.mjs +16 -4
  68. package/dist/zod.d.mts +4 -3
  69. package/dist/zod.mjs +5 -4
  70. package/package.json +23 -8
  71. package/skills/attaform/SKILL.md +2 -1
  72. package/dist/abstract.cjs +0 -48
  73. package/dist/abstract.cjs.map +0 -1
  74. package/dist/abstract.d.cts +0 -42
  75. package/dist/abstract.d.ts +0 -42
  76. package/dist/abstract.mjs.map +0 -1
  77. package/dist/chunks/dev-key-collision-warnings.cjs +0 -25
  78. package/dist/chunks/dev-key-collision-warnings.cjs.map +0 -1
  79. package/dist/chunks/dev-key-collision-warnings.mjs.map +0 -1
  80. package/dist/chunks/devtools.cjs +0 -157
  81. package/dist/chunks/devtools.cjs.map +0 -1
  82. package/dist/chunks/devtools.mjs.map +0 -1
  83. package/dist/chunks/fingerprint.cjs.map +0 -1
  84. package/dist/chunks/fingerprint.mjs.map +0 -1
  85. package/dist/chunks/fingerprint2.cjs.map +0 -1
  86. package/dist/chunks/fingerprint2.mjs.map +0 -1
  87. package/dist/esbuild.cjs +0 -28
  88. package/dist/esbuild.cjs.map +0 -1
  89. package/dist/esbuild.d.cts +0 -56
  90. package/dist/esbuild.d.ts +0 -56
  91. package/dist/esbuild.mjs.map +0 -1
  92. package/dist/index.cjs +0 -51
  93. package/dist/index.cjs.map +0 -1
  94. package/dist/index.d.cts +0 -249
  95. package/dist/index.d.ts +0 -249
  96. package/dist/index.mjs.map +0 -1
  97. package/dist/nuxt.cjs +0 -84
  98. package/dist/nuxt.cjs.map +0 -1
  99. package/dist/nuxt.d.cts +0 -66
  100. package/dist/nuxt.d.ts +0 -66
  101. package/dist/nuxt.mjs.map +0 -1
  102. package/dist/rollup.cjs +0 -24
  103. package/dist/rollup.cjs.map +0 -1
  104. package/dist/rollup.d.cts +0 -35
  105. package/dist/rollup.d.ts +0 -35
  106. package/dist/rollup.mjs.map +0 -1
  107. package/dist/rspack.cjs +0 -10
  108. package/dist/rspack.cjs.map +0 -1
  109. package/dist/rspack.d.cts +0 -40
  110. package/dist/rspack.d.ts +0 -40
  111. package/dist/rspack.mjs.map +0 -1
  112. package/dist/runtime/components/AttaformDevtoolsPanel.vue.d.ts +0 -7
  113. package/dist/runtime/components/DevtoolsValueTree.vue.d.ts +0 -35
  114. package/dist/runtime/plugins/attaform.cjs +0 -43
  115. package/dist/runtime/plugins/attaform.cjs.map +0 -1
  116. package/dist/runtime/plugins/attaform.d.cts +0 -5
  117. package/dist/runtime/plugins/attaform.d.ts +0 -5
  118. package/dist/runtime/plugins/attaform.mjs.map +0 -1
  119. package/dist/shared/attaform.B1ZYt2Li.mjs.map +0 -1
  120. package/dist/shared/attaform.B9Wyhfro.cjs.map +0 -1
  121. package/dist/shared/attaform.BGDV42hI.d.cts +0 -232
  122. package/dist/shared/attaform.BJGA_UOS.mjs.map +0 -1
  123. package/dist/shared/attaform.Biytrv0-.cjs.map +0 -1
  124. package/dist/shared/attaform.Bn0IzhD_.cjs +0 -800
  125. package/dist/shared/attaform.Bn0IzhD_.cjs.map +0 -1
  126. package/dist/shared/attaform.C9fPTxjB.d.cts +0 -41
  127. package/dist/shared/attaform.C9fPTxjB.d.ts +0 -41
  128. package/dist/shared/attaform.CKH2lGdL.mjs.map +0 -1
  129. package/dist/shared/attaform.CQN9R62B.cjs.map +0 -1
  130. package/dist/shared/attaform.CoR4mWfv.mjs.map +0 -1
  131. package/dist/shared/attaform.Cs2Rbdlo.mjs.map +0 -1
  132. package/dist/shared/attaform.D6tk90Rc.cjs.map +0 -1
  133. package/dist/shared/attaform.D8kliaKw.cjs.map +0 -1
  134. package/dist/shared/attaform.DLknk9nF.d.mts +0 -232
  135. package/dist/shared/attaform.DMxM2kol.mjs.map +0 -1
  136. package/dist/shared/attaform.DRUT703x.d.cts +0 -56
  137. package/dist/shared/attaform.DRUT703x.d.ts +0 -56
  138. package/dist/shared/attaform.DYEr28Pt.mjs.map +0 -1
  139. package/dist/shared/attaform.DdQN7sgN.cjs.map +0 -1
  140. package/dist/shared/attaform.DhnPb6nK.mjs.map +0 -1
  141. package/dist/shared/attaform.DniawQLP.d.mts +0 -4763
  142. package/dist/shared/attaform.DniawQLP.d.ts +0 -4763
  143. package/dist/shared/attaform.DoQm_Vkd.cjs +0 -58
  144. package/dist/shared/attaform.DoQm_Vkd.cjs.map +0 -1
  145. package/dist/shared/attaform.DrvMscNX.cjs.map +0 -1
  146. package/dist/shared/attaform.F2Q8iv38.d.ts +0 -2494
  147. package/dist/shared/attaform.FmqKO1Ex.d.cts +0 -2494
  148. package/dist/shared/attaform.KvlEedlF.mjs.map +0 -1
  149. package/dist/shared/attaform.RaTzp1WF.cjs +0 -26
  150. package/dist/shared/attaform.RaTzp1WF.cjs.map +0 -1
  151. package/dist/shared/attaform.nMaz2C5P.mjs.map +0 -1
  152. package/dist/shared/attaform.v0fQtWyA.mjs.map +0 -1
  153. package/dist/shared/attaform.yUrz7C2z.cjs +0 -29
  154. package/dist/shared/attaform.yUrz7C2z.cjs.map +0 -1
  155. package/dist/transforms.cjs +0 -12
  156. package/dist/transforms.cjs.map +0 -1
  157. package/dist/transforms.d.cts +0 -73
  158. package/dist/transforms.d.ts +0 -73
  159. package/dist/transforms.mjs.map +0 -1
  160. package/dist/vite.cjs +0 -363
  161. package/dist/vite.cjs.map +0 -1
  162. package/dist/vite.d.cts +0 -133
  163. package/dist/vite.d.ts +0 -133
  164. package/dist/vite.mjs.map +0 -1
  165. package/dist/webpack.cjs +0 -10
  166. package/dist/webpack.cjs.map +0 -1
  167. package/dist/webpack.d.cts +0 -37
  168. package/dist/webpack.d.ts +0 -37
  169. package/dist/webpack.mjs.map +0 -1
  170. package/dist/zod-v3.cjs +0 -53
  171. package/dist/zod-v3.cjs.map +0 -1
  172. package/dist/zod-v3.d.cts +0 -246
  173. package/dist/zod-v3.d.ts +0 -246
  174. package/dist/zod-v3.mjs.map +0 -1
  175. package/dist/zod-v4.cjs +0 -55
  176. package/dist/zod-v4.cjs.map +0 -1
  177. package/dist/zod-v4.d.cts +0 -172
  178. package/dist/zod-v4.d.ts +0 -172
  179. package/dist/zod-v4.mjs.map +0 -1
  180. package/dist/zod.cjs +0 -51
  181. package/dist/zod.cjs.map +0 -1
  182. package/dist/zod.d.cts +0 -7
  183. package/dist/zod.d.ts +0 -7
  184. package/dist/zod.mjs.map +0 -1
@@ -34,4 +34,3 @@ function canonicalStringify(value, seen = /* @__PURE__ */ new WeakSet()) {
34
34
  }
35
35
 
36
36
  export { canonicalStringify as c };
37
- //# sourceMappingURL=attaform.BJGA_UOS.mjs.map
@@ -1,5 +1,6 @@
1
- import { A as AttaformErrorCode, n as isPlainRecord, s as safeOwnRead, o as safeAssign, p as slimKindOf } from './attaform.CKH2lGdL.mjs';
2
- import { f as canonicalizePath } from './attaform.nMaz2C5P.mjs';
1
+ import { A as AttaformErrorCode, n as isPlainRecord, s as slimKindOf } from './attaform.B8k8JrmK.mjs';
2
+ import { e as canonicalizePath } from './attaform.wfY8XFvm.mjs';
3
+ import { a as safeOwnRead, b as safeAssign } from './attaform.h0i6LijT.mjs';
3
4
 
4
5
  const PATH_SEPARATOR = ".";
5
6
  function createAbstractSchema(rootSchema, intro, services, formKey, options) {
@@ -9,6 +10,7 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
9
10
  const discriminatorCache = /* @__PURE__ */ new Map();
10
11
  let asyncValidationFlag = null;
11
12
  let containerRefineFlag = null;
13
+ let discriminatedUnionFlag = null;
12
14
  function computeDiscriminator(path) {
13
15
  const candidates = path.length === 0 ? [rootSchema] : services.getNestedSchemasAtPath(rootSchema, path, maxRecursionDepth);
14
16
  let matchedUnion;
@@ -60,6 +62,10 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
60
62
  containerRefineFlag ?? (containerRefineFlag = intro.hasContainerOrRootRefine(rootSchema));
61
63
  return containerRefineFlag;
62
64
  },
65
+ hasDiscriminatedUnions() {
66
+ discriminatedUnionFlag ?? (discriminatedUnionFlag = intro.containsDiscriminatedUnion(rootSchema));
67
+ return discriminatedUnionFlag;
68
+ },
63
69
  getDefaultValues(config) {
64
70
  return services.runStrictGetDefaults(rootSchema, config, formKey, maxRecursionDepth);
65
71
  },
@@ -81,14 +87,12 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
81
87
  return services.deriveDefault(first, false, maxRecursionDepth, formKey);
82
88
  },
83
89
  arrayShapeAtPath(path) {
84
- if (path.length === 0) return void 0;
90
+ if (path.length === 0) return null;
85
91
  const [first] = services.getNestedSchemasAtPath(rootSchema, path, maxRecursionDepth);
86
- if (first === void 0) return void 0;
92
+ if (first === void 0) return null;
87
93
  const peeled = services.peelAllWrappers(first);
88
- const kind = intro.kindOf(peeled);
89
- if (kind === "tuple") return intro.getTupleItems(peeled).length;
90
- if (kind === "array") return null;
91
- return void 0;
94
+ if (intro.kindOf(peeled) === "tuple") return intro.getTupleItems(peeled).length;
95
+ return null;
92
96
  },
93
97
  isFixedObjectAtPath(path) {
94
98
  if (path.length === 0) {
@@ -172,7 +176,7 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
172
176
  function parseResultToResponse(result) {
173
177
  return result.success ? { data: result.data, errors: void 0, success: true, formKey } : {
174
178
  data: void 0,
175
- errors: services.issuesToValidationErrors(result.issues, formKey),
179
+ errors: services.issuesToValidationErrors(result.issues),
176
180
  success: false,
177
181
  formKey
178
182
  };
@@ -225,7 +229,6 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
225
229
  {
226
230
  message,
227
231
  path: [...errPath],
228
- formKey,
229
232
  code: AttaformErrorCode.ValidatorThrew
230
233
  }
231
234
  ],
@@ -240,7 +243,6 @@ function createAbstractSchema(rootSchema, intro, services, formKey, options) {
240
243
  {
241
244
  message: `Path '${p.join(PATH_SEPARATOR)}' did not resolve to any schema`,
242
245
  path: [...p],
243
- formKey,
244
246
  code: AttaformErrorCode.PathNotFound
245
247
  }
246
248
  ],
@@ -357,6 +359,144 @@ function walkPathSegments(schema, segments, intro, maxDepth, lazyDepth) {
357
359
  }
358
360
  }
359
361
 
362
+ function fixStructuralDefaults(schema, merged, useDefault, maxRecursionDepth, services) {
363
+ const ctx = {
364
+ useDefault,
365
+ maxDepth: maxRecursionDepth,
366
+ clean: true,
367
+ services
368
+ };
369
+ const data = fixNode(schema, merged, ctx, 0);
370
+ return { data, success: ctx.clean };
371
+ }
372
+ function fixNode(schema, value, ctx, lazyDepth) {
373
+ const { intro } = ctx.services;
374
+ if (intro.isCoercePrimitive(schema) || intro.isPreprocessNode(schema)) return value;
375
+ const kinds = ctx.services.slimPrimitivesOf(schema);
376
+ if (kinds.size > 0 && !kinds.has(slimKindOf(value))) {
377
+ const replacement = deriveFixValue(schema, value, ctx);
378
+ if (kinds.has(slimKindOf(replacement))) return replacement;
379
+ ctx.clean = false;
380
+ return replacement;
381
+ }
382
+ switch (intro.kindOf(schema)) {
383
+ case "optional":
384
+ case "nullable": {
385
+ if (value === void 0 || value === null) return value;
386
+ const inner = intro.unwrapInner(schema);
387
+ return inner === void 0 ? value : fixNode(inner, value, ctx, lazyDepth);
388
+ }
389
+ case "default":
390
+ case "readonly":
391
+ case "catch": {
392
+ const inner = intro.unwrapInner(schema);
393
+ return inner === void 0 ? value : fixNode(inner, value, ctx, lazyDepth);
394
+ }
395
+ case "branded": {
396
+ const inner = intro.unwrapBranded(schema);
397
+ return inner === void 0 ? value : fixNode(inner, value, ctx, lazyDepth);
398
+ }
399
+ case "effects": {
400
+ const inner = intro.unwrapEffectsSource(schema);
401
+ return inner === void 0 ? value : fixNode(inner, value, ctx, lazyDepth);
402
+ }
403
+ case "pipe":
404
+ case "pipeline": {
405
+ const pipeIn = intro.unwrapPipeIn(schema);
406
+ if (pipeIn === void 0 || intro.kindOf(pipeIn) === "transform") return value;
407
+ return fixNode(pipeIn, value, ctx, lazyDepth);
408
+ }
409
+ case "lazy": {
410
+ if (lazyDepth >= ctx.maxDepth) return value;
411
+ const inner = intro.unwrapLazy(schema);
412
+ return inner === void 0 ? value : fixNode(inner, value, ctx, lazyDepth + 1);
413
+ }
414
+ case "discriminated-union": {
415
+ if (value === null || typeof value !== "object") return value;
416
+ const variant = selectVariantByValue(schema, value, intro);
417
+ if (variant === void 0) return value;
418
+ const record = value;
419
+ const shape = intro.getObjectShape(variant);
420
+ for (const key of Object.keys(record)) {
421
+ if (!(key in shape)) delete record[key];
422
+ }
423
+ for (const [key, sub] of Object.entries(shape)) {
424
+ record[key] = fixNode(sub, record[key], ctx, lazyDepth);
425
+ }
426
+ return value;
427
+ }
428
+ case "object": {
429
+ if (value === null || typeof value !== "object") return value;
430
+ const record = value;
431
+ for (const [key, sub] of Object.entries(intro.getObjectShape(schema))) {
432
+ record[key] = fixNode(sub, record[key], ctx, lazyDepth);
433
+ }
434
+ return value;
435
+ }
436
+ case "array": {
437
+ if (!Array.isArray(value)) return value;
438
+ const element = intro.getArrayElement(schema);
439
+ if (element === void 0) return value;
440
+ for (let i = 0; i < value.length; i++) {
441
+ value[i] = fixNode(element, value[i], ctx, lazyDepth);
442
+ }
443
+ return value;
444
+ }
445
+ case "tuple": {
446
+ if (!Array.isArray(value)) return value;
447
+ const items = intro.getTupleItems(schema);
448
+ for (let i = 0; i < items.length; i++) {
449
+ const item = items[i];
450
+ if (item !== void 0) value[i] = fixNode(item, value[i], ctx, lazyDepth);
451
+ }
452
+ return value;
453
+ }
454
+ case "record": {
455
+ if (value === null || typeof value !== "object") return value;
456
+ const valueType = intro.getRecordValueType(schema);
457
+ if (valueType === void 0) return value;
458
+ const record = value;
459
+ for (const key of Object.keys(record)) {
460
+ record[key] = fixNode(valueType, record[key], ctx, lazyDepth);
461
+ }
462
+ return value;
463
+ }
464
+ case "intersection": {
465
+ const left = intro.getIntersectionLeft(schema);
466
+ const right = intro.getIntersectionRight(schema);
467
+ let out = value;
468
+ if (left !== void 0) out = fixNode(left, out, ctx, lazyDepth);
469
+ if (right !== void 0) out = fixNode(right, out, ctx, lazyDepth);
470
+ return out;
471
+ }
472
+ default:
473
+ return value;
474
+ }
475
+ }
476
+ function deriveFixValue(schema, value, ctx) {
477
+ const du = ctx.services.unwrapToDiscriminatedUnion(schema);
478
+ if (du !== void 0) {
479
+ const selected = selectVariantByValue(du, value, ctx.services.intro) ?? ctx.services.intro.getDiscriminatedOptions(du)[0];
480
+ if (selected !== void 0) {
481
+ return ctx.services.deriveDefault(selected, ctx.useDefault);
482
+ }
483
+ }
484
+ return ctx.services.deriveDefault(schema, ctx.useDefault);
485
+ }
486
+ function selectVariantByValue(du, value, intro) {
487
+ if (value === null || typeof value !== "object") return void 0;
488
+ const discKey = intro.getDiscriminator(du);
489
+ if (discKey === void 0) return void 0;
490
+ const discValue = value[discKey];
491
+ if (discValue === void 0) return void 0;
492
+ for (const opt of intro.getDiscriminatedOptions(du)) {
493
+ const litSchema = intro.getObjectShape(opt)[discKey];
494
+ if (litSchema === void 0 || intro.kindOf(litSchema) !== "literal") continue;
495
+ if (intro.getLiteralValues(litSchema).includes(discValue)) return opt;
496
+ }
497
+ return void 0;
498
+ }
499
+
360
500
  const NO_EMBEDDED_DEFAULT = /* @__PURE__ */ Symbol("atta:no-embedded-default");
361
501
  function peelEmbeddedDefault(schema, intro) {
362
502
  let current = schema;
@@ -539,9 +679,6 @@ function deriveDefaultWalk(schema, useDefault, intro, maxDepth, ctx, lazyDepth =
539
679
  }
540
680
  case "catch": {
541
681
  if (useDefault) return intro.getCatchDefault(schema);
542
- if (ctx.catchOnUseDefaultFalse === "preserveCatch" && intro.hasCatchValue(schema)) {
543
- return intro.getCatchDefault(schema);
544
- }
545
682
  const inner = intro.unwrapInner(schema);
546
683
  return inner === void 0 ? void 0 : deriveDefaultWalk(inner, useDefault, intro, maxDepth, ctx, lazyDepth);
547
684
  }
@@ -593,6 +730,13 @@ function getFieldMetaForSchema(schema) {
593
730
  function getFieldMetaListForSchema(schema) {
594
731
  return lists.get(schema) ?? [];
595
732
  }
733
+ let pathMapBuilder = null;
734
+ function installFieldMetaPathMapBuilder(builder) {
735
+ pathMapBuilder = builder;
736
+ }
737
+ function buildFieldMetaPathMap(rootSchema, services) {
738
+ return pathMapBuilder === null ? void 0 : pathMapBuilder(rootSchema, services);
739
+ }
596
740
 
597
741
  const PERMISSIVE_SLIM_KINDS = /* @__PURE__ */ new Set([
598
742
  "string",
@@ -752,6 +896,19 @@ function slimPrimitivesWalk(schema, intro, maxDepth, lazyDepth = 0) {
752
896
  }
753
897
  }
754
898
 
899
+ const installingFieldMetaStore = {
900
+ add(schema, payload) {
901
+ installFieldMetaPathMapBuilder(getFieldMetaPathMap);
902
+ fieldMetaStore.add(schema, payload);
903
+ return installingFieldMetaStore;
904
+ },
905
+ get: (schema) => fieldMetaStore.get(schema),
906
+ has: (schema) => fieldMetaStore.has(schema),
907
+ remove: (schema) => {
908
+ fieldMetaStore.remove(schema);
909
+ return installingFieldMetaStore;
910
+ }
911
+ };
755
912
  const pathMetaCache = /* @__PURE__ */ new WeakMap();
756
913
  function getFieldMetaPathMap(rootSchema, services) {
757
914
  const cached = pathMetaCache.get(rootSchema);
@@ -903,5 +1060,4 @@ function walkForMeta(schema, path, map, counters, lastPathPerSchema, inProgress,
903
1060
  }
904
1061
  }
905
1062
 
906
- export { NO_EMBEDDED_DEFAULT as N, getFieldMetaListForSchema as a, getFieldMetaPathMap as b, createAbstractSchema as c, deriveDefaultWalk as d, fieldMetaStore as f, getFieldMetaForSchema as g, mergeDeep as m, peelEmbeddedDefault as p, slimPrimitivesWalk as s, walkPathSegments as w };
907
- //# sourceMappingURL=attaform.CoR4mWfv.mjs.map
1063
+ export { getFieldMetaListForSchema as a, buildFieldMetaPathMap as b, createAbstractSchema as c, deriveDefaultWalk as d, fixStructuralDefaults as f, getFieldMetaForSchema as g, installingFieldMetaStore as i, mergeDeep as m, slimPrimitivesWalk as s, walkPathSegments as w };