@ng-forge/dynamic-form-mcp 1.2.0-next.8 → 1.2.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.
package/src/index.js CHANGED
@@ -22,7 +22,7 @@ var FIELD_TYPES = [
22
22
  },
23
23
  validationSupported: true,
24
24
  source: "adapter",
25
- allowedIn: ["top-level", "page", "row", "group", "array"],
25
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
26
26
  example: `{
27
27
  key: 'email',
28
28
  type: 'input',
@@ -57,7 +57,7 @@ var FIELD_TYPES = [
57
57
  },
58
58
  validationSupported: true,
59
59
  source: "adapter",
60
- allowedIn: ["top-level", "page", "row", "group", "array"],
60
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
61
61
  example: `{
62
62
  key: 'description',
63
63
  type: 'textarea',
@@ -91,7 +91,7 @@ var FIELD_TYPES = [
91
91
  },
92
92
  validationSupported: true,
93
93
  source: "adapter",
94
- allowedIn: ["top-level", "page", "row", "group", "array"],
94
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
95
95
  example: `{
96
96
  key: 'country',
97
97
  type: 'select',
@@ -113,7 +113,7 @@ var FIELD_TYPES = [
113
113
  props: {},
114
114
  validationSupported: true,
115
115
  source: "adapter",
116
- allowedIn: ["top-level", "page", "row", "group", "array"],
116
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
117
117
  example: `{
118
118
  key: 'acceptTerms',
119
119
  type: 'checkbox',
@@ -138,7 +138,7 @@ var FIELD_TYPES = [
138
138
  },
139
139
  validationSupported: true,
140
140
  source: "adapter",
141
- allowedIn: ["top-level", "page", "row", "group", "array"],
141
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
142
142
  example: `{
143
143
  key: 'interests',
144
144
  type: 'multi-checkbox',
@@ -168,7 +168,7 @@ var FIELD_TYPES = [
168
168
  },
169
169
  validationSupported: true,
170
170
  source: "adapter",
171
- allowedIn: ["top-level", "page", "row", "group", "array"],
171
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
172
172
  example: `{
173
173
  key: 'gender',
174
174
  type: 'radio',
@@ -203,7 +203,7 @@ var FIELD_TYPES = [
203
203
  },
204
204
  validationSupported: true,
205
205
  source: "adapter",
206
- allowedIn: ["top-level", "page", "row", "group", "array"],
206
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
207
207
  example: `{
208
208
  key: 'birthDate',
209
209
  type: 'datepicker',
@@ -222,7 +222,7 @@ var FIELD_TYPES = [
222
222
  props: {},
223
223
  validationSupported: true,
224
224
  source: "adapter",
225
- allowedIn: ["top-level", "page", "row", "group", "array"],
225
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
226
226
  example: `{
227
227
  key: 'notifications',
228
228
  type: 'toggle',
@@ -261,7 +261,7 @@ var FIELD_TYPES = [
261
261
  },
262
262
  validationSupported: true,
263
263
  source: "adapter",
264
- allowedIn: ["top-level", "page", "row", "group", "array"],
264
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
265
265
  example: `{
266
266
  key: 'volume',
267
267
  type: 'slider',
@@ -282,8 +282,8 @@ var FIELD_TYPES = [
282
282
  props: {},
283
283
  validationSupported: false,
284
284
  source: "core",
285
- allowedIn: ["top-level (single-page forms only)", "page.fields", "group.fields", "array.fields"],
286
- notAllowedIn: ["row", "top-level when using pages"],
285
+ allowedIn: ["top-level (single-page forms only)", "page.fields", "group.fields", "array.fields", "row", "container"],
286
+ notAllowedIn: ["top-level when using pages"],
287
287
  example: `// Hidden field - value is REQUIRED!
288
288
  {
289
289
  key: 'userId',
@@ -300,7 +300,8 @@ var FIELD_TYPES = [
300
300
  // - label, logic, validators, required, props
301
301
  // - disabled, readonly, hidden, col, tabIndex, meta
302
302
  // - Validation shorthand: email, min, max, minLength, maxLength, pattern`,
303
- minimalExample: `{ key: 'id', type: 'hidden', value: 'abc123' }`
303
+ minimalExample: `{ key: 'id', type: 'hidden', value: 'abc123' }`,
304
+ illustrative: { example: "several snippets and a forbidden-property list, not one expression" }
304
305
  },
305
306
  {
306
307
  type: "text",
@@ -319,7 +320,7 @@ var FIELD_TYPES = [
319
320
  },
320
321
  validationSupported: false,
321
322
  source: "core",
322
- allowedIn: ["top-level", "page", "row", "group", "array"],
323
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
323
324
  example: `{
324
325
  key: 'sectionTitle',
325
326
  type: 'text',
@@ -380,7 +381,8 @@ var FIELD_TYPES = [
380
381
  }
381
382
  // NOT ALLOWED in rows:
382
383
  // - type: 'page' (pages are top-level only)`,
383
- minimalExample: `{ key: 'row1', type: 'row', fields: [...] }`
384
+ minimalExample: `{ key: 'row1', type: 'row', fields: [{ key: 'firstName', type: 'input', label: 'First Name', col: 6 }, { key: 'lastName', type: 'input', label: 'Last Name', col: 6 }] }`,
385
+ illustrative: { example: "ends with a not-allowed-in list, so it is not one expression" }
384
386
  },
385
387
  {
386
388
  type: "group",
@@ -422,11 +424,12 @@ var FIELD_TYPES = [
422
424
  },
423
425
  validationSupported: true,
424
426
  source: "core",
425
- allowedIn: ["top-level", "page", "row", "array"],
427
+ allowedIn: ["top-level", "page", "row", "array", "container"],
426
428
  notAllowedIn: ["group"],
427
429
  canContain: [
428
430
  "row",
429
431
  "array",
432
+ "container",
430
433
  "input",
431
434
  "textarea",
432
435
  "select",
@@ -466,7 +469,8 @@ var FIELD_TYPES = [
466
469
  validators: [{ type: 'custom', functionName: 'dateOrder' }],
467
470
  validationMessages: { dateOrder: 'The end must not be before the start.' }
468
471
  }`,
469
- minimalExample: `{ key: 'address', type: 'group', fields: [...] }`
472
+ minimalExample: `{ key: 'address', type: 'group', fields: [{ key: 'street', type: 'input', label: 'Street' }] }`,
473
+ illustrative: { example: "two snippets: a plain group and one carrying a cross-field rule" }
470
474
  },
471
475
  {
472
476
  type: "array",
@@ -520,11 +524,12 @@ var FIELD_TYPES = [
520
524
  },
521
525
  validationSupported: true,
522
526
  source: "core",
523
- allowedIn: ["top-level", "page", "row", "group"],
527
+ allowedIn: ["top-level", "page", "row", "group", "container"],
524
528
  notAllowedIn: ["array"],
525
529
  canContain: [
526
530
  "row",
527
531
  "group",
532
+ "container",
528
533
  "input",
529
534
  "textarea",
530
535
  "select",
@@ -584,7 +589,77 @@ var FIELD_TYPES = [
584
589
  // periodOrder receives the whole item list:
585
590
  // (ctx) => (ctx.value() ?? []).some(r => r.from && r.to && r.to < r.from)
586
591
  // ? { kind: 'periodOrder' } : null`,
587
- minimalExample: `{ key: 'items', type: 'array', fields: [...] }`
592
+ minimalExample: `{ key: 'items', type: 'array', fields: [{ key: 'tag', type: 'input', label: 'Tag' }] }`,
593
+ illustrative: { example: "three snippets: flat, object-item and per-row-rule arrays" }
594
+ },
595
+ {
596
+ type: "container",
597
+ category: "container",
598
+ description: "Wraps its children in UI chrome via a chain of wrapper components. Containers do NOT have a label property and do NOT create a nesting level in form values \u2014 child values are flattened into the parent, exactly like rows. The 'wrappers' property is REQUIRED (use [] for no chrome). A container is NOT a group with chrome and the two are not substitutable: a container flattens child values into the parent (like a row), while a group nests them under its own key and owns a schema path, so swapping one for the other changes the submitted value shape and which validators can run. Wrappers are applied outermost-first, so the first entry in the array is the outermost element. Supports only 'hidden' logic type for conditional visibility. Like `row` and `page`, a container flattens into its parent and has no schema path of its own, so it does NOT support container-level `validators`, `required` or `validationMessages` \u2014 use `group` or `array` for cross-field rules.",
599
+ valueType: void 0,
600
+ baseInterface: "FieldDef",
601
+ props: {
602
+ fields: {
603
+ name: "fields",
604
+ type: "ContainerAllowedChildren[]",
605
+ description: "Child fields to render inside the wrapper chain. Allowed: rows, groups, arrays, nested containers, hidden fields, and value fields (input, select, etc). NOT ALLOWED: pages",
606
+ required: true
607
+ },
608
+ wrappers: {
609
+ name: "wrappers",
610
+ type: "WrapperConfig[]",
611
+ description: "REQUIRED. Wrapper components chained around the children, outermost first. Use [] for no chrome. Each entry needs a 'type'; the built-in wrapper is 'css', which takes 'cssClasses'. Custom wrapper types can be registered.",
612
+ required: true
613
+ }
614
+ },
615
+ validationSupported: false,
616
+ source: "core",
617
+ allowedIn: ["top-level", "page", "group", "array", "row", "container"],
618
+ notAllowedIn: [],
619
+ canContain: [
620
+ "row",
621
+ "group",
622
+ "array",
623
+ "container",
624
+ "hidden",
625
+ "input",
626
+ "textarea",
627
+ "select",
628
+ "checkbox",
629
+ "multi-checkbox",
630
+ "radio",
631
+ "datepicker",
632
+ "toggle",
633
+ "slider",
634
+ "text",
635
+ "button",
636
+ "submit",
637
+ "next",
638
+ "previous",
639
+ "add-array-item",
640
+ "prepend-array-item",
641
+ "insert-array-item",
642
+ "remove-array-item",
643
+ "pop-array-item",
644
+ "shift-array-item"
645
+ ],
646
+ cannotContain: ["page"],
647
+ example: `{
648
+ key: 'billingChrome',
649
+ type: 'container',
650
+ // NOTE: Containers do NOT have a label property
651
+ // wrappers is REQUIRED \u2014 use [] when no chrome is needed
652
+ wrappers: [{ type: 'css', cssClasses: 'card p-3' }],
653
+ fields: [
654
+ { key: 'street', type: 'input', label: 'Street' },
655
+ { key: 'city', type: 'input', label: 'City' }
656
+ ]
657
+ }
658
+ // Values flatten: { street: '', city: '' } \u2014 no 'billingChrome' key
659
+ // NOT ALLOWED in containers:
660
+ // - type: 'page' (pages are top-level only)`,
661
+ minimalExample: `{ key: 'chrome', type: 'container', wrappers: [], fields: [{ key: 'street', type: 'input', label: 'Street' }] }`,
662
+ illustrative: { example: "ends with a not-allowed-in list, so it is not one expression" }
588
663
  },
589
664
  {
590
665
  type: "page",
@@ -603,11 +678,12 @@ var FIELD_TYPES = [
603
678
  validationSupported: false,
604
679
  source: "core",
605
680
  allowedIn: ["top-level"],
606
- notAllowedIn: ["page", "row", "group", "array"],
681
+ notAllowedIn: ["page", "row", "group", "array", "container"],
607
682
  canContain: [
608
683
  "row",
609
684
  "group",
610
685
  "array",
686
+ "container",
611
687
  "input",
612
688
  "textarea",
613
689
  "select",
@@ -636,7 +712,7 @@ var FIELD_TYPES = [
636
712
  { key: 'next', type: 'next', label: 'Next' }
637
713
  ]
638
714
  }`,
639
- minimalExample: `{ key: 'step1', type: 'page', fields: [...] }`
715
+ minimalExample: `{ key: 'step1', type: 'page', fields: [{ key: 'firstName', type: 'input', label: 'First Name' }] }`
640
716
  },
641
717
  {
642
718
  type: "next",
@@ -647,7 +723,7 @@ var FIELD_TYPES = [
647
723
  props: {},
648
724
  validationSupported: false,
649
725
  source: "adapter",
650
- allowedIn: ["top-level", "page", "row", "group", "array"],
726
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
651
727
  example: `{
652
728
  key: 'next',
653
729
  type: 'next',
@@ -664,7 +740,7 @@ var FIELD_TYPES = [
664
740
  props: {},
665
741
  validationSupported: false,
666
742
  source: "adapter",
667
- allowedIn: ["top-level", "page", "row", "group", "array"],
743
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
668
744
  example: `{
669
745
  key: 'back',
670
746
  type: 'previous',
@@ -688,7 +764,7 @@ var FIELD_TYPES = [
688
764
  },
689
765
  validationSupported: false,
690
766
  source: "adapter",
691
- allowedIn: ["top-level", "page", "row", "group", "array"],
767
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
692
768
  example: `// RECOMMENDED: Use pre-defined button types for common actions
693
769
  { key: 'submit', type: 'submit', label: 'Submit Form' }
694
770
  { key: 'next', type: 'next', label: 'Next' }
@@ -704,7 +780,11 @@ var FIELD_TYPES = [
704
780
  label: 'Custom Action',
705
781
  event: MyCustomEvent // Must be the class reference
706
782
  }`,
707
- minimalExample: `{ key: 'action', type: 'button', label: 'Action', event: MyEvent }`
783
+ minimalExample: `{ key: 'action', type: 'button', label: 'Action', event: MyEvent }`,
784
+ illustrative: {
785
+ minimalExample: "names an event class only a real app defines and registers",
786
+ example: "four snippets plus the registration steps they depend on"
787
+ }
708
788
  },
709
789
  {
710
790
  type: "submit",
@@ -715,7 +795,7 @@ var FIELD_TYPES = [
715
795
  props: {},
716
796
  validationSupported: false,
717
797
  source: "adapter",
718
- allowedIn: ["top-level", "page", "row", "group", "array"],
798
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
719
799
  example: `{
720
800
  key: 'submit',
721
801
  type: 'submit',
@@ -729,16 +809,34 @@ var FIELD_TYPES = [
729
809
  description: "Button to append a new item to the end of an array field. Must be placed within or near the array container. (Legacy alias: addArrayItem.)",
730
810
  valueType: void 0,
731
811
  baseInterface: "FieldDef",
732
- props: {},
812
+ props: {
813
+ template: {
814
+ name: "template",
815
+ type: "ArrayAllowedChildren | readonly ArrayAllowedChildren[]",
816
+ description: "REQUIRED. The item this button adds. A single field creates a primitive item (its value is used directly); an array of fields creates an object item (the fields are merged into an object). Without it the config does not compile.",
817
+ required: true
818
+ },
819
+ arrayKey: {
820
+ name: "arrayKey",
821
+ type: "string",
822
+ description: "Key of the array to act on. Optional when the button sits inside that array, which supplies it from context.",
823
+ required: false
824
+ }
825
+ },
733
826
  validationSupported: false,
734
827
  source: "adapter",
735
- allowedIn: ["array", "row", "group"],
828
+ allowedIn: ["array", "row", "group", "container"],
736
829
  example: `{
737
830
  key: 'addContact',
738
831
  type: 'add-array-item',
739
- label: 'Add Contact'
832
+ label: 'Add Contact',
833
+ // REQUIRED: what one new item looks like.
834
+ template: [
835
+ { key: 'name', type: 'input', label: 'Name' },
836
+ { key: 'email', type: 'input', label: 'Email' }
837
+ ]
740
838
  }`,
741
- minimalExample: `{ key: 'add', type: 'add-array-item', label: 'Add Item' }`
839
+ minimalExample: `{ key: 'add', type: 'add-array-item', label: 'Add Item', template: { key: 'tag', type: 'input', label: 'Tag' } }`
742
840
  },
743
841
  {
744
842
  type: "prepend-array-item",
@@ -746,16 +844,34 @@ var FIELD_TYPES = [
746
844
  description: "Button to add a new item to the beginning of an array field. (Legacy alias: prependArrayItem.)",
747
845
  valueType: void 0,
748
846
  baseInterface: "FieldDef",
749
- props: {},
847
+ props: {
848
+ template: {
849
+ name: "template",
850
+ type: "ArrayAllowedChildren | readonly ArrayAllowedChildren[]",
851
+ description: "REQUIRED. The item this button adds. A single field creates a primitive item (its value is used directly); an array of fields creates an object item (the fields are merged into an object). Without it the config does not compile.",
852
+ required: true
853
+ },
854
+ arrayKey: {
855
+ name: "arrayKey",
856
+ type: "string",
857
+ description: "Key of the array to act on. Optional when the button sits inside that array, which supplies it from context.",
858
+ required: false
859
+ }
860
+ },
750
861
  validationSupported: false,
751
862
  source: "adapter",
752
- allowedIn: ["array", "row", "group"],
863
+ allowedIn: ["array", "row", "group", "container"],
753
864
  example: `{
754
865
  key: 'prependContact',
755
866
  type: 'prepend-array-item',
756
- label: 'Add to Top'
867
+ label: 'Add to Top',
868
+ // REQUIRED: what one new item looks like.
869
+ template: [
870
+ { key: 'name', type: 'input', label: 'Name' },
871
+ { key: 'email', type: 'input', label: 'Email' }
872
+ ]
757
873
  }`,
758
- minimalExample: `{ key: 'prepend', type: 'prepend-array-item', label: 'Add First' }`
874
+ minimalExample: `{ key: 'prepend', type: 'prepend-array-item', label: 'Add First', template: { key: 'tag', type: 'input', label: 'Tag' } }`
759
875
  },
760
876
  {
761
877
  type: "insert-array-item",
@@ -763,17 +879,41 @@ var FIELD_TYPES = [
763
879
  description: "Button to insert a new item at a specific index in an array field (set via the index property). (Legacy alias: insertArrayItem.)",
764
880
  valueType: void 0,
765
881
  baseInterface: "FieldDef",
766
- props: {},
882
+ props: {
883
+ index: {
884
+ name: "index",
885
+ type: "number",
886
+ description: "REQUIRED. The position to insert at.",
887
+ required: true
888
+ },
889
+ template: {
890
+ name: "template",
891
+ type: "ArrayAllowedChildren | readonly ArrayAllowedChildren[]",
892
+ description: "REQUIRED. The item this button adds. A single field creates a primitive item (its value is used directly); an array of fields creates an object item (the fields are merged into an object). Without it the config does not compile.",
893
+ required: true
894
+ },
895
+ arrayKey: {
896
+ name: "arrayKey",
897
+ type: "string",
898
+ description: "Key of the array to act on. Optional when the button sits inside that array, which supplies it from context.",
899
+ required: false
900
+ }
901
+ },
767
902
  validationSupported: false,
768
903
  source: "adapter",
769
- allowedIn: ["array", "row", "group"],
904
+ allowedIn: ["array", "row", "group", "container"],
770
905
  example: `{
771
906
  key: 'insertContact',
772
907
  type: 'insert-array-item',
773
908
  label: 'Insert',
774
- index: 1
909
+ index: 1,
910
+ // REQUIRED: what one new item looks like.
911
+ template: [
912
+ { key: 'name', type: 'input', label: 'Name' },
913
+ { key: 'email', type: 'input', label: 'Email' }
914
+ ]
775
915
  }`,
776
- minimalExample: `{ key: 'insert', type: 'insert-array-item', label: 'Insert', index: 0 }`
916
+ minimalExample: `{ key: 'insert', type: 'insert-array-item', label: 'Insert', index: 0, template: { key: 'tag', type: 'input', label: 'Tag' } }`
777
917
  },
778
918
  {
779
919
  type: "remove-array-item",
@@ -784,7 +924,7 @@ var FIELD_TYPES = [
784
924
  props: {},
785
925
  validationSupported: false,
786
926
  source: "adapter",
787
- allowedIn: ["array", "row", "group"],
927
+ allowedIn: ["array", "row", "group", "container"],
788
928
  example: `{
789
929
  key: 'removeContact',
790
930
  type: 'remove-array-item',
@@ -801,7 +941,7 @@ var FIELD_TYPES = [
801
941
  props: {},
802
942
  validationSupported: false,
803
943
  source: "adapter",
804
- allowedIn: ["array", "row", "group"],
944
+ allowedIn: ["array", "row", "group", "container"],
805
945
  example: `{
806
946
  key: 'popContact',
807
947
  type: 'pop-array-item',
@@ -819,7 +959,7 @@ var FIELD_TYPES = [
819
959
  props: {},
820
960
  validationSupported: false,
821
961
  source: "adapter",
822
- allowedIn: ["array", "row", "group"],
962
+ allowedIn: ["array", "row", "group", "container"],
823
963
  example: `{
824
964
  key: 'shiftContact',
825
965
  type: 'shift-array-item',
@@ -2745,7 +2885,7 @@ You MUST follow these practices when generating FormConfig objects for ng-forge.
2745
2885
 
2746
2886
  ## Core Principles
2747
2887
 
2748
- 1. **Configuration-driven**: ng-forge wraps Angular Reactive Forms. Define structure declaratively via \`FormConfig\`, not imperatively.
2888
+ 1. **Configuration-driven**: ng-forge is built on Angular Signal Forms. Define structure declaratively via \`FormConfig\`, not imperatively.
2749
2889
  2. **Type-safe**: Use TypeScript interfaces for form values. The library provides full type inference.
2750
2890
  3. **Validation-first**: Always include validation and user-friendly error messages.
2751
2891
 
@@ -3242,6 +3382,7 @@ Recommended when consuming Ionic's \`apply-ionic-legacy-error-styles\` mixin, wh
3242
3382
  - \`withEventFormValue()\` \u2014 attach the current form value to every dispatched event
3243
3383
  - \`withValueExclusionDefaults(options)\` \u2014 set form-wide value exclusion defaults
3244
3384
  - \`withValidationExecutionDefaults(options)\` \u2014 set form-wide validation execution defaults (e.g. defer until touched)
3385
+ - \`withExperimentalWebMcp()\` \u2014 EXPERIMENTAL. Expose forms to browser AI agents as WebMCP tools. Opt a form in with \`options.webMcp: { name, description }\`; it registers \`fill_{name}\`, which validates and applies a partial patch of values to the form and returns what it set, which fields apply, which are still empty, and validation errors. Groups are merged key by key; lists are replaced whole, so an agent cannot rewrite a list whose items already hold values it is not allowed to set (a hidden id, a \`readonly\` price) \u2014 that write is refused rather than silently dropping them. Submission is a separate per-form opt-in: add \`allowSubmit: true\` to also register \`submit_{name}\`, which waits for the submission and reports its real outcome. Leave \`allowSubmit\` off for anything that spends money, sends a message, or cannot be undone. \`webMcp.name\` must be 1-121 characters of A-Z, a-z, 0-9, \`_\`, \`-\` or \`.\`, and short enough to read in a tool list. By default a response returns only the values the call set; \`readback: 'all'\` returns the whole readable model and hands the agent everything the form holds, so add it only when asked. Per field, \`webMcp: { readable, writable }\` (or \`webMcp: false\`) overrides the defaults: a \`hidden\` field type is neither readable nor writable, a password input is not readable, a \`readonly\` or derived field is not writable. Do NOT add \`options.webMcp\` unless the user explicitly asks for agent/WebMCP support.
3245
3386
 
3246
3387
  All features are exported from \`@ng-forge/dynamic-forms\`.
3247
3388
 
@@ -3287,23 +3428,31 @@ All features are exported from \`@ng-forge/dynamic-forms\`.
3287
3428
 
3288
3429
  ## CRITICAL: UI Library Differences
3289
3430
 
3290
- Different UI libraries support different properties. Always validate against the correct library using \`ngforge_validate\` with the appropriate \`uiIntegration\` parameter.
3431
+ Different UI libraries support different \`props\`. Always validate against the library the project actually uses.
3291
3432
 
3292
- ### Property Differences by Library
3433
+ Which props exist is answered per adapter, not here: use the adapter's own reference
3434
+ (\`ngforge_lookup\` with the adapter, or the \`ng-forge-dynamic-forms-<adapter>\` skill). A table
3435
+ repeated here would be a second copy of the adapter registries and would drift from them.
3293
3436
 
3294
- | Property | Material | Bootstrap | PrimeNG | Ionic |
3295
- |----------|----------|-----------|---------|-------|
3296
- | \`appearance\` | \u2713 (fill, outline) | \u2717 | \u2717 | \u2713 (fill, outline) |
3297
- | \`subscriptSizing\` | \u2713 | \u2717 | \u2717 | \u2717 |
3298
- | \`floatLabel\` | \u2713 (auto, always, never) | \u2717 | \u2717 | \u2717 |
3299
- | \`hideRequiredMarker\` | \u2713 | \u2717 | \u2717 | \u2717 |
3300
- | \`hint\` | \u2713 | \u2713 (as \`helpText\`) | \u2713 | \u2713 |
3437
+ Two adapters cannot both provide the same field type, so a project has one adapter per
3438
+ field type; TypeScript reports error 2717 when two try.
3301
3439
 
3302
3440
  ### Container Fields
3303
3441
 
3304
- Container fields (\`page\`, \`group\`, \`row\`) do NOT support these properties:
3305
- - \`label\` - Use \`text\` field type for headings instead
3306
- - \`required\`, \`email\`, \`min\`, \`max\`, etc. - Validation is for leaf fields only
3442
+ No container has a \`label\`. Use a \`text\` field for a heading instead.
3443
+
3444
+ Validation splits by whether the container owns a value:
3445
+
3446
+ - \`group\` and \`array\` DO accept \`required\`, \`validators\`, \`validationMessages\`
3447
+ and \`validateWhenHidden\`. A validator there runs against the container's own
3448
+ subtree, so a cross-field rule (dateTo after dateFrom) belongs on the group
3449
+ rather than on one of its children. \`ctx.value()\` is the group's object or the
3450
+ array's item list.
3451
+ - \`page\`, \`row\` and \`container\` do NOT. They flatten into their parent and have
3452
+ no schema path, so a validator on them would have nothing to run against.
3453
+
3454
+ Leaf-level validators such as \`email\`, \`min\` and \`max\` belong on the field that
3455
+ holds the value, on any container.
3307
3456
 
3308
3457
  ### Common Mistakes to Avoid
3309
3458
 
@@ -3321,34 +3470,48 @@ Container fields (\`page\`, \`group\`, \`row\`) do NOT support these properties:
3321
3470
 
3322
3471
  3. **Adding \`id\` to FormConfig** - The root FormConfig does not accept an \`id\` property.
3323
3472
 
3324
- 4. **Putting slider min/max in props** - For slider fields, \`min\`, \`max\`, and \`step\` are field-level properties:
3473
+ 4. **Using \`min\`/\`max\` for a slider's range** - A slider's range is
3474
+ \`minValue\`, \`maxValue\` and \`step\`, at field level. \`min\` and \`max\` are
3475
+ validation shorthands: they typecheck, they validate clean, and the slider
3476
+ still renders its default 0-100 range, so nothing catches the mistake.
3325
3477
  \`\`\`typescript
3326
- // \u274C WRONG
3478
+ // \u274C WRONG - validates clean, renders the wrong range
3327
3479
  { key: 'volume', type: 'slider', label: 'Volume', props: { min: 0, max: 100 } }
3480
+ { key: 'volume', type: 'slider', label: 'Volume', min: 0, max: 100 }
3328
3481
 
3329
3482
  // \u2705 CORRECT
3330
- { key: 'volume', type: 'slider', label: 'Volume', min: 0, max: 100 }
3483
+ { key: 'volume', type: 'slider', label: 'Volume', minValue: 0, maxValue: 100, step: 5 }
3331
3484
  \`\`\`
3332
3485
 
3333
3486
  5. **Using unsupported field types** - Each UI library supports specific field types. Use \`ngforge_lookup\` with \`depth: "schema"\` to see available types.
3334
3487
 
3335
3488
  ## Validation Before Use
3336
3489
 
3337
- Always validate your FormConfig using the \`ngforge_validate\` tool before using it. This tool uses the actual TypeScript/Zod schemas, so if validation passes, the config will work correctly at runtime.
3490
+ Never hand back a config you have not checked. Two routes, depending on what is
3491
+ available:
3338
3492
 
3339
- \`\`\`typescript
3340
- // Always specify the UI integration you're using
3341
- ngforge_validate({
3342
- uiIntegration: 'material', // or 'bootstrap', 'primeng', 'ionic'
3343
- config: { fields: [...] }
3344
- })
3345
- \`\`\`
3493
+ - With the MCP server: \`ngforge_validate({ uiIntegration: 'material', config })\`
3494
+ - Without it: \`npx --yes @ng-forge/dynamic-forms-cli@next "path/to/your.form.ts" --ui material\`
3346
3495
 
3347
- To understand what properties are supported for each field type, use \`ngforge_lookup\` with \`depth: "schema"\`:
3496
+ Both run the same schemas, so they agree.
3348
3497
 
3349
- \`\`\`typescript
3350
- ngforge_lookup({ topic: 'input', depth: 'schema', uiIntegration: 'material' })
3351
- \`\`\`
3498
+ ### What a clean run does and does not mean
3499
+
3500
+ A clean run means the structure is right: the field types exist, required
3501
+ properties are present, options are in the right place, and containers are not
3502
+ carrying properties they cannot have.
3503
+
3504
+ It does NOT mean every property you wrote is real. The schemas strip unknown keys
3505
+ rather than rejecting them, so an invented or misplaced property passes
3506
+ validation and is silently dropped at runtime. Measured examples that pass today:
3507
+ \`hideWhen\` on a field and \`targetProperty\` inside a derivation.
3508
+
3509
+ \`as const satisfies FormConfig\` is what catches those, because TypeScript checks
3510
+ the property names. Use both: the type annotation for what exists, the validator
3511
+ for what is structurally correct.
3512
+
3513
+ To see which properties a field type supports, use \`ngforge_lookup\` with
3514
+ \`depth: "schema"\`, or read the field-types reference in the skill.
3352
3515
  `;
3353
3516
 
3354
3517
  // packages/dynamic-form-mcp/src/resources/instructions.resource.ts
@@ -4378,18 +4541,41 @@ import { z as z3 } from "zod";
4378
4541
  var FieldMetaSchema = z3.record(z3.string(), z3.union([z3.string(), z3.number(), z3.boolean(), z3.undefined()]));
4379
4542
 
4380
4543
  // internal/dynamic-forms-validation/src/lib/schemas/field/field-def.schema.ts
4544
+ import { z as z5 } from "zod";
4545
+
4546
+ // internal/dynamic-forms-validation/src/lib/schemas/field/field-web-mcp.schema.ts
4381
4547
  import { z as z4 } from "zod";
4382
- var BaseFieldDefSchema = z4.object({
4548
+ var FieldWebMcpOptionsSchema = z4.object({
4549
+ /**
4550
+ * Whether an agent may see this field's value in a tool response.
4551
+ *
4552
+ * Defaults to true, except for a `hidden` field type or an input whose
4553
+ * `props.type` is `'password'`. A withheld value is replaced by a marker
4554
+ * rather than dropped, so the agent still knows the field exists.
4555
+ */
4556
+ readable: z4.boolean().optional(),
4557
+ /**
4558
+ * Whether an agent may write this field.
4559
+ *
4560
+ * Defaults to true, except for a `hidden` field type, a field with a
4561
+ * `derivation`, or one that is `readonly`.
4562
+ */
4563
+ writable: z4.boolean().optional()
4564
+ });
4565
+ var FieldWebMcpConfigSchema = z4.union([FieldWebMcpOptionsSchema, z4.literal(false)]);
4566
+
4567
+ // internal/dynamic-forms-validation/src/lib/schemas/field/field-def.schema.ts
4568
+ var BaseFieldDefSchema = z5.object({
4383
4569
  /**
4384
4570
  * Unique field identifier within the form.
4385
4571
  * Used as the form control name and for targeting in logic expressions.
4386
4572
  */
4387
- key: z4.string(),
4573
+ key: z5.string(),
4388
4574
  /**
4389
4575
  * Field type discriminant.
4390
4576
  * Determines which component renders the field.
4391
4577
  */
4392
- type: z4.string(),
4578
+ type: z5.string(),
4393
4579
  /**
4394
4580
  * Human-readable label displayed next to the field.
4395
4581
  */
@@ -4402,58 +4588,68 @@ var BaseFieldDefSchema = z4.object({
4402
4588
  /**
4403
4589
  * CSS classes applied to the field wrapper (space-separated).
4404
4590
  */
4405
- className: z4.string().optional(),
4591
+ className: z5.string().optional(),
4406
4592
  /**
4407
4593
  * Whether the field is disabled (non-interactive but visible).
4408
4594
  */
4409
- disabled: z4.boolean().optional(),
4595
+ disabled: z5.boolean().optional(),
4410
4596
  /**
4411
4597
  * Whether the field is read-only (displays value but not editable).
4412
4598
  */
4413
- readonly: z4.boolean().optional(),
4599
+ readonly: z5.boolean().optional(),
4414
4600
  /**
4415
4601
  * Whether the field is hidden from view.
4416
4602
  */
4417
- hidden: z4.boolean().optional(),
4603
+ hidden: z5.boolean().optional(),
4418
4604
  /**
4419
4605
  * Tab order for keyboard navigation.
4420
4606
  */
4421
- tabIndex: z4.number().optional(),
4607
+ tabIndex: z5.number().optional(),
4422
4608
  /**
4423
4609
  * Grid column width (1-12) in a 12-column layout system.
4424
4610
  */
4425
- col: z4.number().min(1).max(12).optional(),
4611
+ col: z5.number().min(1).max(12).optional(),
4426
4612
  /**
4427
4613
  * Whether to exclude this field's value from submission output when hidden.
4428
4614
  * Overrides both the global and form-level settings.
4429
4615
  */
4430
- excludeValueIfHidden: z4.boolean().optional(),
4616
+ excludeValueIfHidden: z5.boolean().optional(),
4431
4617
  /**
4432
4618
  * Whether to exclude this field's value from submission output when disabled.
4433
4619
  * Overrides both the global and form-level settings.
4434
4620
  */
4435
- excludeValueIfDisabled: z4.boolean().optional(),
4621
+ excludeValueIfDisabled: z5.boolean().optional(),
4436
4622
  /**
4437
4623
  * Whether to exclude this field's value from submission output when readonly.
4438
4624
  * Overrides both the global and form-level settings.
4439
4625
  */
4440
- excludeValueIfReadonly: z4.boolean().optional(),
4626
+ excludeValueIfReadonly: z5.boolean().optional(),
4441
4627
  /**
4442
4628
  * Whether to run validation when this field is hidden.
4443
4629
  * Inherited from the parent field (and form/global defaults). Defaults to false.
4444
4630
  */
4445
- validateWhenHidden: z4.boolean().optional()
4631
+ validateWhenHidden: z5.boolean().optional(),
4632
+ /**
4633
+ * What a browser AI agent may do with this field, when the form opts in to
4634
+ * WebMCP through `options.webMcp`.
4635
+ *
4636
+ * Overrides either axis of the conservative default, or `false` to hide the
4637
+ * field from agents entirely. Without this key on the schema a parsed config
4638
+ * silently loses the policy, so a generated or round-tripped config would
4639
+ * quietly widen what an agent can see and write.
4640
+ */
4641
+ webMcp: FieldWebMcpConfigSchema.optional()
4446
4642
  });
4447
4643
 
4448
4644
  // internal/dynamic-forms-validation/src/lib/schemas/field/field-with-validation.schema.ts
4449
- import { z as z11 } from "zod";
4645
+ import { z as z12 } from "zod";
4450
4646
 
4451
4647
  // internal/dynamic-forms-validation/src/lib/schemas/validation/validator-config.schema.ts
4452
- import { z as z6 } from "zod";
4648
+ import { z as z7 } from "zod";
4453
4649
 
4454
4650
  // internal/dynamic-forms-validation/src/lib/schemas/logic/conditional-expression.schema.ts
4455
- import { z as z5 } from "zod";
4456
- var ComparisonOperatorSchema = z5.enum([
4651
+ import { z as z6 } from "zod";
4652
+ var ComparisonOperatorSchema = z6.enum([
4457
4653
  "equals",
4458
4654
  "notEquals",
4459
4655
  "greater",
@@ -4465,35 +4661,35 @@ var ComparisonOperatorSchema = z5.enum([
4465
4661
  "endsWith",
4466
4662
  "matches"
4467
4663
  ]);
4468
- var BaseComparisonConditionSchema = z5.object({
4664
+ var BaseComparisonConditionSchema = z6.object({
4469
4665
  operator: ComparisonOperatorSchema.optional(),
4470
- value: z5.unknown().optional()
4666
+ value: z6.unknown().optional()
4471
4667
  });
4472
4668
  var FieldValueConditionSchema = BaseComparisonConditionSchema.extend({
4473
- type: z5.literal("fieldValue"),
4669
+ type: z6.literal("fieldValue"),
4474
4670
  /**
4475
4671
  * Path to the field to check.
4476
4672
  * Supports dot notation for nested fields.
4477
4673
  */
4478
- fieldPath: z5.string()
4674
+ fieldPath: z6.string()
4479
4675
  });
4480
- var CustomConditionSchema = z5.object({
4481
- type: z5.literal("custom"),
4676
+ var CustomConditionSchema = z6.object({
4677
+ type: z6.literal("custom"),
4482
4678
  /**
4483
4679
  * Name of a registered custom function to invoke.
4484
4680
  */
4485
- functionName: z5.string()
4681
+ functionName: z6.string()
4486
4682
  });
4487
- var JavaScriptConditionSchema = z5.object({
4488
- type: z5.literal("javascript"),
4683
+ var JavaScriptConditionSchema = z6.object({
4684
+ type: z6.literal("javascript"),
4489
4685
  /**
4490
4686
  * JavaScript expression to evaluate.
4491
4687
  * Has access to: fieldValue, formValue, fieldPath
4492
4688
  */
4493
- expression: z5.string()
4689
+ expression: z6.string()
4494
4690
  });
4495
- var ConditionalExpressionSchema = z5.lazy(
4496
- () => z5.discriminatedUnion("type", [
4691
+ var ConditionalExpressionSchema = z6.lazy(
4692
+ () => z6.discriminatedUnion("type", [
4497
4693
  FieldValueConditionSchema,
4498
4694
  CustomConditionSchema,
4499
4695
  JavaScriptConditionSchema,
@@ -4501,116 +4697,116 @@ var ConditionalExpressionSchema = z5.lazy(
4501
4697
  OrConditionSchema
4502
4698
  ])
4503
4699
  );
4504
- var AndConditionSchema = z5.object({
4505
- type: z5.literal("and"),
4700
+ var AndConditionSchema = z6.object({
4701
+ type: z6.literal("and"),
4506
4702
  /**
4507
4703
  * Array of conditions that must all be true.
4508
4704
  */
4509
- conditions: z5.array(z5.lazy(() => ConditionalExpressionSchema))
4705
+ conditions: z6.array(z6.lazy(() => ConditionalExpressionSchema))
4510
4706
  });
4511
- var OrConditionSchema = z5.object({
4512
- type: z5.literal("or"),
4707
+ var OrConditionSchema = z6.object({
4708
+ type: z6.literal("or"),
4513
4709
  /**
4514
4710
  * Array of conditions where at least one must be true.
4515
4711
  */
4516
- conditions: z5.array(z5.lazy(() => ConditionalExpressionSchema))
4712
+ conditions: z6.array(z6.lazy(() => ConditionalExpressionSchema))
4517
4713
  });
4518
4714
 
4519
4715
  // internal/dynamic-forms-validation/src/lib/schemas/validation/validator-config.schema.ts
4520
- var BaseValidatorSchema = z6.object({
4716
+ var BaseValidatorSchema = z7.object({
4521
4717
  /**
4522
4718
  * Condition for when this validator should be applied.
4523
4719
  * If omitted, validator is always active.
4524
4720
  */
4525
4721
  when: ConditionalExpressionSchema.optional()
4526
4722
  });
4527
- var BuiltInValidatorParamsSchema = z6.object({
4723
+ var BuiltInValidatorParamsSchema = z7.object({
4528
4724
  /**
4529
4725
  * Static value for the validator parameter.
4530
4726
  */
4531
- value: z6.union([z6.number(), z6.string()]).optional(),
4727
+ value: z7.union([z7.number(), z7.string()]).optional(),
4532
4728
  /**
4533
4729
  * Dynamic expression that evaluates to the validator parameter.
4534
4730
  */
4535
- expression: z6.string().optional()
4731
+ expression: z7.string().optional()
4536
4732
  });
4537
- var ValidatorConfigSchema = z6.discriminatedUnion("type", [
4733
+ var ValidatorConfigSchema = z7.discriminatedUnion("type", [
4538
4734
  // Built-in validators
4539
4735
  BaseValidatorSchema.merge(BuiltInValidatorParamsSchema).extend({
4540
- type: z6.literal("required")
4736
+ type: z7.literal("required")
4541
4737
  }),
4542
4738
  BaseValidatorSchema.merge(BuiltInValidatorParamsSchema).extend({
4543
- type: z6.literal("email")
4739
+ type: z7.literal("email")
4544
4740
  }),
4545
4741
  BaseValidatorSchema.merge(BuiltInValidatorParamsSchema).extend({
4546
- type: z6.literal("min")
4742
+ type: z7.literal("min")
4547
4743
  }),
4548
4744
  BaseValidatorSchema.merge(BuiltInValidatorParamsSchema).extend({
4549
- type: z6.literal("max")
4745
+ type: z7.literal("max")
4550
4746
  }),
4551
4747
  BaseValidatorSchema.merge(BuiltInValidatorParamsSchema).extend({
4552
- type: z6.literal("minLength")
4748
+ type: z7.literal("minLength")
4553
4749
  }),
4554
4750
  BaseValidatorSchema.merge(BuiltInValidatorParamsSchema).extend({
4555
- type: z6.literal("maxLength")
4751
+ type: z7.literal("maxLength")
4556
4752
  }),
4557
4753
  BaseValidatorSchema.merge(BuiltInValidatorParamsSchema).extend({
4558
- type: z6.literal("pattern")
4754
+ type: z7.literal("pattern")
4559
4755
  }),
4560
4756
  // Custom synchronous validators
4561
4757
  BaseValidatorSchema.extend({
4562
- type: z6.literal("custom"),
4758
+ type: z7.literal("custom"),
4563
4759
  /**
4564
4760
  * Name of a registered custom validator function.
4565
4761
  */
4566
- functionName: z6.string().optional(),
4762
+ functionName: z7.string().optional(),
4567
4763
  /**
4568
4764
  * Parameters passed to the custom validator function.
4569
4765
  */
4570
- params: z6.record(z6.string(), z6.unknown()).optional(),
4766
+ params: z7.record(z7.string(), z7.unknown()).optional(),
4571
4767
  /**
4572
4768
  * JavaScript expression to evaluate for validation.
4573
4769
  */
4574
- expression: z6.string().optional(),
4770
+ expression: z7.string().optional(),
4575
4771
  /**
4576
4772
  * Error kind identifier for linking to validation messages.
4577
4773
  */
4578
- kind: z6.string().optional(),
4774
+ kind: z7.string().optional(),
4579
4775
  /**
4580
4776
  * Error context parameters for message interpolation.
4581
4777
  */
4582
- errorParams: z6.record(z6.string(), z6.string()).optional()
4778
+ errorParams: z7.record(z7.string(), z7.string()).optional()
4583
4779
  }),
4584
4780
  // Async validators
4585
4781
  BaseValidatorSchema.extend({
4586
- type: z6.literal("async"),
4782
+ type: z7.literal("async"),
4587
4783
  /**
4588
4784
  * Name of a registered async validator function. Required.
4589
4785
  */
4590
- functionName: z6.string(),
4786
+ functionName: z7.string(),
4591
4787
  /**
4592
4788
  * Parameters passed to the async validator function.
4593
4789
  */
4594
- params: z6.record(z6.string(), z6.unknown()).optional()
4790
+ params: z7.record(z7.string(), z7.unknown()).optional()
4595
4791
  }),
4596
4792
  // HTTP validators
4597
4793
  BaseValidatorSchema.extend({
4598
- type: z6.literal("http"),
4794
+ type: z7.literal("http"),
4599
4795
  /**
4600
4796
  * Name of a registered HTTP validator config function. Required.
4601
4797
  */
4602
- functionName: z6.string(),
4798
+ functionName: z7.string(),
4603
4799
  /**
4604
4800
  * Parameters passed to the HTTP validator function.
4605
4801
  */
4606
- params: z6.record(z6.string(), z6.unknown()).optional()
4802
+ params: z7.record(z7.string(), z7.unknown()).optional()
4607
4803
  })
4608
4804
  ]);
4609
- var ValidatorsArraySchema = z6.array(ValidatorConfigSchema);
4805
+ var ValidatorsArraySchema = z7.array(ValidatorConfigSchema);
4610
4806
 
4611
4807
  // internal/dynamic-forms-validation/src/lib/schemas/validation/validation-messages.schema.ts
4612
- import { z as z7 } from "zod";
4613
- var ValidationMessagesSchema = z7.object({
4808
+ import { z as z8 } from "zod";
4809
+ var ValidationMessagesSchema = z8.object({
4614
4810
  required: DynamicTextSchema.optional(),
4615
4811
  email: DynamicTextSchema.optional(),
4616
4812
  min: DynamicTextSchema.optional(),
@@ -4621,15 +4817,15 @@ var ValidationMessagesSchema = z7.object({
4621
4817
  }).catchall(DynamicTextSchema.optional());
4622
4818
 
4623
4819
  // internal/dynamic-forms-validation/src/lib/schemas/logic/logic-config.schema.ts
4624
- import { z as z10 } from "zod";
4820
+ import { z as z11 } from "zod";
4625
4821
 
4626
4822
  // internal/dynamic-forms-validation/src/lib/schemas/logic/state-logic.schema.ts
4627
- import { z as z8 } from "zod";
4628
- var StateLogicTypeSchema = z8.enum(["hidden", "readonly", "disabled", "required"]);
4629
- var FormStateConditionSchema = z8.enum(["formInvalid", "formSubmitting", "pageInvalid"]);
4630
- var StateConditionSchema = z8.union([ConditionalExpressionSchema, z8.boolean(), FormStateConditionSchema]);
4631
- var LogicTriggerSchema = z8.enum(["onChange", "debounced"]);
4632
- var ImmediateStateLogicConfigSchema = z8.object({
4823
+ import { z as z9 } from "zod";
4824
+ var StateLogicTypeSchema = z9.enum(["hidden", "readonly", "disabled", "required"]);
4825
+ var FormStateConditionSchema = z9.enum(["formInvalid", "formSubmitting", "pageInvalid"]);
4826
+ var StateConditionSchema = z9.union([ConditionalExpressionSchema, z9.boolean(), FormStateConditionSchema]);
4827
+ var LogicTriggerSchema = z9.enum(["onChange", "debounced"]);
4828
+ var ImmediateStateLogicConfigSchema = z9.object({
4633
4829
  /**
4634
4830
  * The state property to control.
4635
4831
  */
@@ -4641,9 +4837,9 @@ var ImmediateStateLogicConfigSchema = z8.object({
4641
4837
  /**
4642
4838
  * Trigger type - defaults to 'onChange' for immediate evaluation.
4643
4839
  */
4644
- trigger: z8.literal("onChange").optional()
4840
+ trigger: z9.literal("onChange").optional()
4645
4841
  });
4646
- var DebouncedStateLogicConfigSchema = z8.object({
4842
+ var DebouncedStateLogicConfigSchema = z9.object({
4647
4843
  /**
4648
4844
  * The state property to control.
4649
4845
  */
@@ -4655,101 +4851,101 @@ var DebouncedStateLogicConfigSchema = z8.object({
4655
4851
  /**
4656
4852
  * Trigger type - must be 'debounced' for delayed evaluation.
4657
4853
  */
4658
- trigger: z8.literal("debounced"),
4854
+ trigger: z9.literal("debounced"),
4659
4855
  /**
4660
4856
  * Debounce duration in milliseconds. Defaults to 500.
4661
4857
  */
4662
- debounceMs: z8.number().positive().optional()
4858
+ debounceMs: z9.number().positive().optional()
4663
4859
  });
4664
- var StateLogicConfigSchema = z8.union([ImmediateStateLogicConfigSchema, DebouncedStateLogicConfigSchema]);
4860
+ var StateLogicConfigSchema = z9.union([ImmediateStateLogicConfigSchema, DebouncedStateLogicConfigSchema]);
4665
4861
 
4666
4862
  // internal/dynamic-forms-validation/src/lib/schemas/logic/derivation-logic.schema.ts
4667
- import { z as z9 } from "zod";
4668
- var OnChangeDerivationLogicConfigSchema = z9.object({
4863
+ import { z as z10 } from "zod";
4864
+ var OnChangeDerivationLogicConfigSchema = z10.object({
4669
4865
  /**
4670
4866
  * Discriminant for derivation logic.
4671
4867
  */
4672
- type: z9.literal("derivation"),
4868
+ type: z10.literal("derivation"),
4673
4869
  /**
4674
4870
  * Debug name for logging and troubleshooting.
4675
4871
  */
4676
- debugName: z9.string().optional(),
4872
+ debugName: z10.string().optional(),
4677
4873
  /**
4678
4874
  * Condition for when this derivation should run.
4679
4875
  * Defaults to true (always runs).
4680
4876
  */
4681
- condition: z9.union([ConditionalExpressionSchema, z9.boolean()]).optional(),
4877
+ condition: z10.union([ConditionalExpressionSchema, z10.boolean()]).optional(),
4682
4878
  /**
4683
4879
  * Static value to set. Mutually exclusive with expression/functionName.
4684
4880
  */
4685
- value: z9.unknown().optional(),
4881
+ value: z10.unknown().optional(),
4686
4882
  /**
4687
4883
  * JavaScript expression to evaluate for the value.
4688
4884
  * Has access to: fieldValue, formValue, fieldPath
4689
4885
  */
4690
- expression: z9.string().optional(),
4886
+ expression: z10.string().optional(),
4691
4887
  /**
4692
4888
  * Name of a registered derivation function.
4693
4889
  * The function must be registered in customFnConfig.derivations.
4694
4890
  */
4695
- functionName: z9.string().optional(),
4891
+ functionName: z10.string().optional(),
4696
4892
  /**
4697
4893
  * Explicit dependencies for determining when to re-evaluate.
4698
4894
  * If omitted, dependencies are auto-detected from the expression.
4699
4895
  */
4700
- dependsOn: z9.array(z9.string()).optional(),
4896
+ dependsOn: z10.array(z10.string()).optional(),
4701
4897
  /**
4702
4898
  * Trigger type - defaults to 'onChange' for immediate evaluation.
4703
4899
  */
4704
- trigger: z9.literal("onChange").optional()
4900
+ trigger: z10.literal("onChange").optional()
4705
4901
  });
4706
- var DebouncedDerivationLogicConfigSchema = z9.object({
4902
+ var DebouncedDerivationLogicConfigSchema = z10.object({
4707
4903
  /**
4708
4904
  * Discriminant for derivation logic.
4709
4905
  */
4710
- type: z9.literal("derivation"),
4906
+ type: z10.literal("derivation"),
4711
4907
  /**
4712
4908
  * Debug name for logging and troubleshooting.
4713
4909
  */
4714
- debugName: z9.string().optional(),
4910
+ debugName: z10.string().optional(),
4715
4911
  /**
4716
4912
  * Condition for when this derivation should run.
4717
4913
  */
4718
- condition: z9.union([ConditionalExpressionSchema, z9.boolean()]).optional(),
4914
+ condition: z10.union([ConditionalExpressionSchema, z10.boolean()]).optional(),
4719
4915
  /**
4720
4916
  * Static value to set.
4721
4917
  */
4722
- value: z9.unknown().optional(),
4918
+ value: z10.unknown().optional(),
4723
4919
  /**
4724
4920
  * JavaScript expression to evaluate for the value.
4725
4921
  */
4726
- expression: z9.string().optional(),
4922
+ expression: z10.string().optional(),
4727
4923
  /**
4728
4924
  * Name of a registered derivation function.
4729
4925
  */
4730
- functionName: z9.string().optional(),
4926
+ functionName: z10.string().optional(),
4731
4927
  /**
4732
4928
  * Explicit dependencies for determining when to re-evaluate.
4733
4929
  */
4734
- dependsOn: z9.array(z9.string()).optional(),
4930
+ dependsOn: z10.array(z10.string()).optional(),
4735
4931
  /**
4736
4932
  * Trigger type - must be 'debounced' for delayed evaluation.
4737
4933
  */
4738
- trigger: z9.literal("debounced"),
4934
+ trigger: z10.literal("debounced"),
4739
4935
  /**
4740
4936
  * Debounce duration in milliseconds. Defaults to 500.
4741
4937
  */
4742
- debounceMs: z9.number().positive().optional()
4938
+ debounceMs: z10.number().positive().optional()
4743
4939
  });
4744
- var DerivationLogicConfigSchema = z9.union([OnChangeDerivationLogicConfigSchema, DebouncedDerivationLogicConfigSchema]);
4940
+ var DerivationLogicConfigSchema = z10.union([OnChangeDerivationLogicConfigSchema, DebouncedDerivationLogicConfigSchema]);
4745
4941
 
4746
4942
  // internal/dynamic-forms-validation/src/lib/schemas/logic/logic-config.schema.ts
4747
- var LogicConfigSchema = z10.union([StateLogicConfigSchema, DerivationLogicConfigSchema]);
4748
- var LogicArraySchema = z10.array(LogicConfigSchema);
4943
+ var LogicConfigSchema = z11.union([StateLogicConfigSchema, DerivationLogicConfigSchema]);
4944
+ var LogicArraySchema = z11.array(LogicConfigSchema);
4749
4945
 
4750
4946
  // internal/dynamic-forms-validation/src/lib/schemas/field/field-with-validation.schema.ts
4751
- var SchemaApplicationTypeSchema = z11.enum(["apply", "applyWhen", "applyWhenValue", "applyEach"]);
4752
- var SchemaApplicationConfigSchema = z11.object({
4947
+ var SchemaApplicationTypeSchema = z12.enum(["apply", "applyWhen", "applyWhenValue", "applyEach"]);
4948
+ var SchemaApplicationConfigSchema = z12.object({
4753
4949
  /**
4754
4950
  * How to apply the schema.
4755
4951
  */
@@ -4758,7 +4954,7 @@ var SchemaApplicationConfigSchema = z11.object({
4758
4954
  * Schema name (reference) or inline schema definition.
4759
4955
  * For JSON configs, this is always a string reference.
4760
4956
  */
4761
- schema: z11.string(),
4957
+ schema: z12.string(),
4762
4958
  /**
4763
4959
  * Condition for 'applyWhen' type.
4764
4960
  */
@@ -4766,34 +4962,34 @@ var SchemaApplicationConfigSchema = z11.object({
4766
4962
  /**
4767
4963
  * Type predicate expression for 'applyWhenValue' type.
4768
4964
  */
4769
- typePredicate: z11.string().optional()
4965
+ typePredicate: z12.string().optional()
4770
4966
  });
4771
- var FieldWithValidationSchema = z11.object({
4967
+ var FieldWithValidationSchema = z12.object({
4772
4968
  // Simple validation rules (ease of use)
4773
4969
  /**
4774
4970
  * Whether the field is required.
4775
4971
  */
4776
- required: z11.boolean().optional(),
4972
+ required: z12.boolean().optional(),
4777
4973
  /**
4778
4974
  * Whether to apply email validation.
4779
4975
  */
4780
- email: z11.boolean().optional(),
4976
+ email: z12.boolean().optional(),
4781
4977
  /**
4782
4978
  * Minimum numeric value.
4783
4979
  */
4784
- min: z11.number().optional(),
4980
+ min: z12.number().optional(),
4785
4981
  /**
4786
4982
  * Maximum numeric value.
4787
4983
  */
4788
- max: z11.number().optional(),
4984
+ max: z12.number().optional(),
4789
4985
  /**
4790
4986
  * Minimum string length.
4791
4987
  */
4792
- minLength: z11.number().optional(),
4988
+ minLength: z12.number().optional(),
4793
4989
  /**
4794
4990
  * Maximum string length.
4795
4991
  */
4796
- maxLength: z11.number().optional(),
4992
+ maxLength: z12.number().optional(),
4797
4993
  /**
4798
4994
  * Regex pattern for validation.
4799
4995
  *
@@ -4809,7 +5005,7 @@ var FieldWithValidationSchema = z11.object({
4809
5005
  * "pattern": "^[a-z]+$"
4810
5006
  * ```
4811
5007
  */
4812
- pattern: z11.string().optional(),
5008
+ pattern: z12.string().optional(),
4813
5009
  // Advanced validation configuration
4814
5010
  /**
4815
5011
  * Array of advanced validator configurations.
@@ -4828,22 +5024,22 @@ var FieldWithValidationSchema = z11.object({
4828
5024
  * Shorthand for simple computed/derived fields.
4829
5025
  * JavaScript expression that computes the field value.
4830
5026
  */
4831
- derivation: z11.string().optional(),
5027
+ derivation: z12.string().optional(),
4832
5028
  // Schema applications
4833
5029
  /**
4834
5030
  * Array of schema applications for reusable validation patterns.
4835
5031
  */
4836
- schemas: z11.array(SchemaApplicationConfigSchema).optional()
5032
+ schemas: z12.array(SchemaApplicationConfigSchema).optional()
4837
5033
  });
4838
5034
 
4839
5035
  // internal/dynamic-forms-validation/src/lib/schemas/field/nullable-value.refinement.ts
4840
- import { z as z12 } from "zod";
5036
+ import { z as z13 } from "zod";
4841
5037
  var nullableValueRefine = (data, ctx) => {
4842
5038
  if (!data || typeof data !== "object") return;
4843
5039
  const field = data;
4844
5040
  if (field.value === null && field.nullable !== true) {
4845
5041
  ctx.addIssue({
4846
- code: z12.ZodIssueCode.custom,
5042
+ code: z13.ZodIssueCode.custom,
4847
5043
  path: ["value"],
4848
5044
  message: "value: null is only allowed when nullable is true. Add `nullable: true` or remove the null value."
4849
5045
  });
@@ -4851,20 +5047,28 @@ var nullableValueRefine = (data, ctx) => {
4851
5047
  };
4852
5048
 
4853
5049
  // internal/dynamic-forms-validation/src/lib/schemas/containers/factories.ts
4854
- import { z as z13 } from "zod";
4855
- var ContainerLogicSchema = z13.object({
4856
- type: z13.literal("hidden"),
4857
- condition: z13.union([ConditionalExpressionSchema, z13.boolean()])
4858
- });
5050
+ import { z as z14 } from "zod";
5051
+ var ContainerLogicSchema = z14.object({
5052
+ type: z14.literal("hidden"),
5053
+ condition: z14.union([ConditionalExpressionSchema, z14.boolean()])
5054
+ });
5055
+ var SIMPLIFIED_ONLY_PROPS = ["template", "value", "addButton", "removeButton"];
5056
+ var SIMPLIFIED_ONLY_HINTS = {
5057
+ template: 'Use "fields" for the full API, or "template" for the simplified one.',
5058
+ value: 'Set initial values on the field definitions inside "fields".',
5059
+ addButton: 'Add an "add-array-item" or "insert-array-item" button as a field.',
5060
+ removeButton: 'Add a "remove-array-item" button to the item definition.'
5061
+ };
4859
5062
  function createContainerSchemas(options) {
4860
5063
  const { leafFieldSchema } = options;
4861
- const AnyFieldSchema = z13.lazy(
4862
- () => z13.union([
5064
+ const AnyFieldSchema = z14.lazy(
5065
+ () => z14.discriminatedUnion("type", [
4863
5066
  leafFieldSchema,
4864
5067
  PageFieldSchema,
4865
5068
  RowFieldSchema,
4866
5069
  GroupFieldSchema,
4867
- ArrayFieldSchema
5070
+ ArrayFieldSchema,
5071
+ ContainerFieldSchema
4868
5072
  ])
4869
5073
  );
4870
5074
  const ContainerBaseSchema = BaseFieldDefSchema.omit({
@@ -4873,81 +5077,133 @@ function createContainerSchemas(options) {
4873
5077
  }).extend({
4874
5078
  // Explicitly forbid label on container fields
4875
5079
  // This makes Zod reject any value for these properties
4876
- label: z13.never().optional(),
4877
- meta: z13.never().optional()
5080
+ label: z14.never().optional(),
5081
+ meta: z14.never().optional()
5082
+ });
5083
+ const ContainerValidationShape = {
5084
+ required: z14.boolean().optional(),
5085
+ validators: ValidatorsArraySchema.optional(),
5086
+ validationMessages: ValidationMessagesSchema.optional()
5087
+ };
5088
+ const WrapperConfigSchema = z14.object({ type: z14.string() }).passthrough();
5089
+ const ContainerFieldSchema = ContainerBaseSchema.extend({
5090
+ type: z14.literal("container"),
5091
+ fields: z14.array(AnyFieldSchema),
5092
+ wrappers: z14.array(WrapperConfigSchema),
5093
+ logic: z14.array(ContainerLogicSchema).optional()
4878
5094
  });
4879
5095
  const PageFieldSchema = ContainerBaseSchema.extend({
4880
- type: z13.literal("page"),
4881
- fields: z13.array(AnyFieldSchema),
4882
- logic: z13.array(ContainerLogicSchema).optional(),
5096
+ type: z14.literal("page"),
5097
+ fields: z14.array(AnyFieldSchema),
5098
+ logic: z14.array(ContainerLogicSchema).optional(),
4883
5099
  // Also forbid title (common mistake)
4884
- title: z13.never().optional()
5100
+ title: z14.never().optional()
4885
5101
  });
4886
5102
  const RowFieldSchema = ContainerBaseSchema.extend({
4887
- type: z13.literal("row"),
4888
- fields: z13.array(AnyFieldSchema),
5103
+ type: z14.literal("row"),
5104
+ fields: z14.array(AnyFieldSchema),
4889
5105
  // Container logic - only 'hidden' type allowed (same as pages)
4890
- logic: z13.array(ContainerLogicSchema).optional()
5106
+ logic: z14.array(ContainerLogicSchema).optional()
4891
5107
  });
4892
5108
  const GroupFieldSchema = ContainerBaseSchema.extend({
4893
- type: z13.literal("group"),
4894
- fields: z13.array(AnyFieldSchema),
5109
+ type: z14.literal("group"),
5110
+ fields: z14.array(AnyFieldSchema),
5111
+ ...ContainerValidationShape,
4895
5112
  // Container logic - only 'hidden' type allowed (same as pages)
4896
- logic: z13.array(ContainerLogicSchema).optional()
4897
- });
4898
- const ArrayButtonConfigSchema = z13.object({
4899
- label: z13.string().optional(),
4900
- props: z13.record(z13.unknown()).optional()
5113
+ logic: z14.array(ContainerLogicSchema).optional()
4901
5114
  });
4902
- const FullArrayFieldSchema = ContainerBaseSchema.extend({
4903
- type: z13.literal("array"),
4904
- fields: z13.array(AnyFieldSchema),
4905
- logic: z13.array(ContainerLogicSchema).optional(),
4906
- // Full API does not use template
4907
- template: z13.never().optional(),
4908
- // Array length validation
4909
- minLength: z13.number().int().min(0).optional(),
4910
- maxLength: z13.number().int().min(0).optional()
5115
+ const ArrayButtonConfigSchema = z14.object({
5116
+ label: z14.string().optional(),
5117
+ props: z14.record(z14.string(), z14.unknown()).optional()
4911
5118
  });
4912
- const ArrayAllowedChildSchema = z13.lazy(
5119
+ const ArrayAllowedChildSchema = z14.lazy(
4913
5120
  () => AnyFieldSchema.refine((field) => field.type !== "page" && field.type !== "array", {
4914
5121
  message: "Array templates cannot contain page or array fields. Only leaf fields, rows, and groups are allowed."
4915
5122
  })
4916
5123
  );
4917
- const SimplifiedArrayFieldSchema = ContainerBaseSchema.extend({
4918
- type: z13.literal("array"),
4919
- // Template: single field (primitive array) or array of fields (object array)
5124
+ const ArrayFieldSchema = ContainerBaseSchema.extend({
5125
+ type: z14.literal("array"),
5126
+ ...ContainerValidationShape,
5127
+ // Full API: explicit item definitions.
5128
+ fields: z14.array(AnyFieldSchema).optional(),
5129
+ // Simplified API: single field (primitive array) or array of fields (object array).
4920
5130
  // Only ArrayAllowedChildren (leaf fields, rows, groups) are valid — no pages or nested arrays.
4921
- template: z13.union([ArrayAllowedChildSchema, z13.array(ArrayAllowedChildSchema)]),
5131
+ template: z14.union([ArrayAllowedChildSchema, z14.array(ArrayAllowedChildSchema)]).optional(),
4922
5132
  // Initial values for the array
4923
- value: z13.array(z13.unknown()).optional(),
5133
+ value: z14.array(z14.unknown()).optional(),
4924
5134
  // Button customization or opt-out (false to disable)
4925
- addButton: z13.union([ArrayButtonConfigSchema, z13.literal(false)]).optional(),
4926
- removeButton: z13.union([ArrayButtonConfigSchema, z13.literal(false)]).optional(),
4927
- logic: z13.array(ContainerLogicSchema).optional(),
5135
+ addButton: z14.union([ArrayButtonConfigSchema, z14.literal(false)]).optional(),
5136
+ removeButton: z14.union([ArrayButtonConfigSchema, z14.literal(false)]).optional(),
5137
+ logic: z14.array(ContainerLogicSchema).optional(),
4928
5138
  // Array length validation
4929
- minLength: z13.number().int().min(0).optional(),
4930
- maxLength: z13.number().int().min(0).optional(),
4931
- // Simplified API does not use fields
4932
- fields: z13.never().optional(),
4933
- minItems: z13.never().optional(),
4934
- maxItems: z13.never().optional()
5139
+ minLength: z14.number().int().min(0).optional(),
5140
+ maxLength: z14.number().int().min(0).optional(),
5141
+ // The array size properties are minLength/maxLength. These are the common
5142
+ // wrong spelling, and naming them keeps the mistake from being silently
5143
+ // stripped. Previously only the simplified API rejected them.
5144
+ minItems: z14.never().optional(),
5145
+ maxItems: z14.never().optional()
5146
+ }).superRefine((field, ctx) => {
5147
+ const hasFields = field.fields !== void 0;
5148
+ const hasTemplate = field.template !== void 0;
5149
+ if (hasFields && hasTemplate) {
5150
+ ctx.addIssue({
5151
+ code: "custom",
5152
+ message: 'Array has BOTH "fields" and "template". These are mutually exclusive: use "fields" for the full API, or "template" + "value" for the simplified API.'
5153
+ });
5154
+ return;
5155
+ }
5156
+ if (!hasFields && !hasTemplate) {
5157
+ ctx.addIssue({
5158
+ code: "custom",
5159
+ message: 'Array is MISSING both "fields" and "template". Use "fields" (full API) or "template" + "value" (simplified API).'
5160
+ });
5161
+ return;
5162
+ }
5163
+ if (hasFields) {
5164
+ for (const prop of SIMPLIFIED_ONLY_PROPS) {
5165
+ if (prop === "template" || field[prop] === void 0) continue;
5166
+ ctx.addIssue({
5167
+ code: "custom",
5168
+ path: [prop],
5169
+ message: `Array uses the full API ("fields"), so "${prop}" is not allowed: it belongs to the simplified API. ${SIMPLIFIED_ONLY_HINTS[prop]}`
5170
+ });
5171
+ }
5172
+ }
5173
+ }).meta({
5174
+ // The refinement above is invisible to JSON Schema generation, and the
5175
+ // generated schema is authoring guidance for a model. Two optional
5176
+ // properties with no stated relationship reads as "pass either, both or
5177
+ // neither", which is exactly the mistake the refinement rejects at
5178
+ // runtime. Restating the rule as `oneOf` keeps the published schema
5179
+ // saying what the validator enforces — the union of two array schemas
5180
+ // used to express this, and collapsing them to one schema lost it.
5181
+ description: 'Array field. Use EXACTLY ONE of "fields" (full API: explicit item definitions) or "template" (simplified API: one field, or an array of fields, repeated per item). Never both, never neither. "value", "addButton" and "removeButton" belong to the simplified API only: with "fields", put initial values on the item definitions and add buttons as fields.',
5182
+ oneOf: [
5183
+ {
5184
+ required: ["fields"],
5185
+ // `not` wraps an `anyOf`, not one multi-name `required`: the latter
5186
+ // would only forbid all of them being present at once.
5187
+ not: { anyOf: SIMPLIFIED_ONLY_PROPS.map((prop) => ({ required: [prop] })) }
5188
+ },
5189
+ { required: ["template"], not: { required: ["fields"] } }
5190
+ ]
4935
5191
  });
4936
- const ArrayFieldSchema = z13.union([FullArrayFieldSchema, SimplifiedArrayFieldSchema]);
4937
5192
  const AllFieldsSchema = AnyFieldSchema;
4938
5193
  return {
4939
5194
  PageFieldSchema,
4940
5195
  RowFieldSchema,
4941
5196
  GroupFieldSchema,
4942
5197
  ArrayFieldSchema,
5198
+ ContainerFieldSchema,
4943
5199
  AllFieldsSchema
4944
5200
  };
4945
5201
  }
4946
5202
 
4947
5203
  // internal/dynamic-forms-validation/src/lib/schemas/leaves/text-field.schema.ts
4948
- import { z as z14 } from "zod";
4949
- var TextElementTypeSchema = z14.enum(["p", "h1", "h2", "h3", "h4", "h5", "h6", "span"]);
4950
- var TextPropsSchema = z14.object({
5204
+ import { z as z15 } from "zod";
5205
+ var TextElementTypeSchema = z15.enum(["p", "h1", "h2", "h3", "h4", "h5", "h6", "span"]);
5206
+ var TextPropsSchema = z15.object({
4951
5207
  /**
4952
5208
  * HTML element type to render the text.
4953
5209
  */
@@ -4957,7 +5213,7 @@ var TextFieldSchema = BaseFieldDefSchema.extend({
4957
5213
  /**
4958
5214
  * Field type discriminant.
4959
5215
  */
4960
- type: z14.literal("text"),
5216
+ type: z15.literal("text"),
4961
5217
  /**
4962
5218
  * Text-specific properties.
4963
5219
  */
@@ -4969,9 +5225,9 @@ var TextFieldSchema = BaseFieldDefSchema.extend({
4969
5225
  });
4970
5226
 
4971
5227
  // internal/dynamic-forms-validation/src/lib/schemas/leaves/hidden-field.schema.ts
4972
- import { z as z15 } from "zod";
4973
- var HiddenScalarSchema = z15.union([z15.string(), z15.number(), z15.boolean()]);
4974
- var HiddenValueSchema = z15.union([HiddenScalarSchema, z15.array(HiddenScalarSchema)]);
5228
+ import { z as z16 } from "zod";
5229
+ var HiddenScalarSchema = z16.union([z16.string(), z16.number(), z16.boolean()]);
5230
+ var HiddenValueSchema = z16.union([HiddenScalarSchema, z16.array(HiddenScalarSchema)]);
4975
5231
  var HiddenFieldSchema = BaseFieldDefSchema.omit({
4976
5232
  label: true,
4977
5233
  meta: true,
@@ -4987,7 +5243,7 @@ var HiddenFieldSchema = BaseFieldDefSchema.omit({
4987
5243
  /**
4988
5244
  * Field type discriminant.
4989
5245
  */
4990
- type: z15.literal("hidden"),
5246
+ type: z16.literal("hidden"),
4991
5247
  /**
4992
5248
  * The value to store. Required for hidden fields.
4993
5249
  */
@@ -4995,42 +5251,70 @@ var HiddenFieldSchema = BaseFieldDefSchema.omit({
4995
5251
  });
4996
5252
 
4997
5253
  // internal/dynamic-forms-validation/src/lib/schemas/form/form-options.schema.ts
4998
- import { z as z16 } from "zod";
4999
- var SubmitButtonOptionsSchema = z16.object({
5254
+ import { z as z17 } from "zod";
5255
+ var SubmitButtonOptionsSchema = z17.object({
5000
5256
  /**
5001
5257
  * Whether to disable the submit button when the form is invalid.
5002
5258
  * Defaults to true.
5003
5259
  */
5004
- disableWhenInvalid: z16.boolean().optional(),
5260
+ disableWhenInvalid: z17.boolean().optional(),
5005
5261
  /**
5006
5262
  * Whether to disable the submit button while the form is submitting.
5007
5263
  * Defaults to true.
5008
5264
  */
5009
- disableWhileSubmitting: z16.boolean().optional()
5265
+ disableWhileSubmitting: z17.boolean().optional()
5010
5266
  });
5011
- var NextButtonOptionsSchema = z16.object({
5267
+ var NextButtonOptionsSchema = z17.object({
5012
5268
  /**
5013
5269
  * Whether to disable the next button when the current page is invalid.
5014
5270
  * Defaults to true.
5015
5271
  */
5016
- disableWhenPageInvalid: z16.boolean().optional(),
5272
+ disableWhenPageInvalid: z17.boolean().optional(),
5017
5273
  /**
5018
5274
  * Whether to disable the next button while the form is submitting.
5019
5275
  * Defaults to true.
5020
5276
  */
5021
- disableWhileSubmitting: z16.boolean().optional()
5277
+ disableWhileSubmitting: z17.boolean().optional()
5022
5278
  });
5023
- var FormOptionsSchema = z16.object({
5279
+ var WebMcpToolOptionsSchema = z17.object({
5280
+ /**
5281
+ * Base name for this form's tools, registered as `fill_{name}` and
5282
+ * `submit_{name}`. Must be unique across every form mounted on the page.
5283
+ *
5284
+ * The registered name has to satisfy the WebMCP draft's own rule — 1-128
5285
+ * characters of `A-Z`, `a-z`, `0-9`, `_`, `-` or `.` — and `registerTool()`
5286
+ * rejects anything else, so the same rule is enforced here (minus the room the
5287
+ * `fill_` / `submit_` prefix takes).
5288
+ *
5289
+ * @see https://webmachinelearning.github.io/webmcp/
5290
+ */
5291
+ name: z17.string().min(1).max(121).regex(/^[A-Za-z0-9_.-]+$/, 'Only A-Z, a-z, 0-9, "_", "-" and "." are allowed in a WebMCP tool name'),
5292
+ /**
5293
+ * What this form is for, and when an agent should reach for it.
5294
+ */
5295
+ description: z17.string().min(1),
5296
+ /**
5297
+ * Whether an agent may submit this form directly. Off by default; without it
5298
+ * the agent can fill the form but a human presses the button.
5299
+ */
5300
+ allowSubmit: z17.boolean().optional(),
5301
+ /**
5302
+ * How much of the form a tool response hands back. `'changed'` (the default)
5303
+ * returns only what the call set; `'all'` returns the whole readable model.
5304
+ */
5305
+ readback: z17.enum(["changed", "all"]).optional()
5306
+ });
5307
+ var FormOptionsSchema = z17.object({
5024
5308
  /**
5025
5309
  * Whether the entire form is disabled.
5026
5310
  */
5027
- disabled: z16.boolean().optional(),
5311
+ disabled: z17.boolean().optional(),
5028
5312
  /**
5029
5313
  * Maximum number of derivation iterations before stopping.
5030
5314
  * Prevents infinite loops in circular derivations.
5031
5315
  * Defaults to 10.
5032
5316
  */
5033
- maxDerivationIterations: z16.number().positive().optional(),
5317
+ maxDerivationIterations: z17.number().positive().optional(),
5034
5318
  /**
5035
5319
  * Options for the submit button behavior.
5036
5320
  */
@@ -5043,42 +5327,47 @@ var FormOptionsSchema = z16.object({
5043
5327
  * Whether to exclude values of hidden fields from submission output.
5044
5328
  * Overrides the global withValueExclusionDefaults() setting for this form.
5045
5329
  */
5046
- excludeValueIfHidden: z16.boolean().optional(),
5330
+ excludeValueIfHidden: z17.boolean().optional(),
5047
5331
  /**
5048
5332
  * Whether to exclude values of disabled fields from submission output.
5049
5333
  * Overrides the global withValueExclusionDefaults() setting for this form.
5050
5334
  */
5051
- excludeValueIfDisabled: z16.boolean().optional(),
5335
+ excludeValueIfDisabled: z17.boolean().optional(),
5052
5336
  /**
5053
5337
  * Whether to exclude values of readonly fields from submission output.
5054
5338
  * Overrides the global withValueExclusionDefaults() setting for this form.
5055
5339
  */
5056
- excludeValueIfReadonly: z16.boolean().optional(),
5340
+ excludeValueIfReadonly: z17.boolean().optional(),
5057
5341
  /**
5058
5342
  * Whether to run validation while a field is hidden.
5059
5343
  * Acts as the root inherited value for the form. Per-field
5060
5344
  * validateWhenHidden overrides cascade through the field tree.
5061
5345
  */
5062
- validateWhenHidden: z16.boolean().optional()
5346
+ validateWhenHidden: z17.boolean().optional(),
5347
+ /**
5348
+ * Exposes this form to browser AI agents as WebMCP tools (experimental).
5349
+ * Requires the `withExperimentalWebMcp()` feature on `provideDynamicForm(...)`.
5350
+ */
5351
+ webMcp: WebMcpToolOptionsSchema.optional()
5063
5352
  });
5064
5353
 
5065
5354
  // internal/dynamic-forms-validation/src/lib/schemas/form/schema-definition.schema.ts
5066
- import { z as z17 } from "zod";
5067
- var SchemaDefinitionSchema = z17.object({
5355
+ import { z as z18 } from "zod";
5356
+ var SchemaDefinitionSchema = z18.object({
5068
5357
  /**
5069
5358
  * Unique identifier for the schema.
5070
5359
  * Used to reference the schema in SchemaApplicationConfig.
5071
5360
  */
5072
- name: z17.string(),
5361
+ name: z18.string(),
5073
5362
  /**
5074
5363
  * Human-readable description of what this schema validates.
5075
5364
  */
5076
- description: z17.string().optional(),
5365
+ description: z18.string().optional(),
5077
5366
  /**
5078
5367
  * Field path pattern for automatic schema application.
5079
5368
  * Supports glob-like patterns.
5080
5369
  */
5081
- pathPattern: z17.string().optional(),
5370
+ pathPattern: z18.string().optional(),
5082
5371
  /**
5083
5372
  * Validators to apply to fields using this schema.
5084
5373
  */
@@ -5090,18 +5379,18 @@ var SchemaDefinitionSchema = z17.object({
5090
5379
  /**
5091
5380
  * Nested schema applications for composing schemas.
5092
5381
  */
5093
- subSchemas: z17.array(SchemaApplicationConfigSchema).optional()
5382
+ subSchemas: z18.array(SchemaApplicationConfigSchema).optional()
5094
5383
  });
5095
- var SchemaDefinitionsArraySchema = z17.array(SchemaDefinitionSchema);
5384
+ var SchemaDefinitionsArraySchema = z18.array(SchemaDefinitionSchema);
5096
5385
 
5097
5386
  // internal/dynamic-forms-validation/src/lib/schemas/form/form-config.schema.ts
5098
- import { z as z18 } from "zod";
5387
+ import { z as z19 } from "zod";
5099
5388
  function createFormConfigSchema(fieldSchema, propsSchema) {
5100
- const baseSchema = z18.object({
5389
+ const baseSchema = z19.object({
5101
5390
  /**
5102
5391
  * Array of field definitions that make up the form.
5103
5392
  */
5104
- fields: z18.array(fieldSchema),
5393
+ fields: z19.array(fieldSchema),
5105
5394
  /**
5106
5395
  * Form-level options controlling behavior.
5107
5396
  */
@@ -5141,23 +5430,23 @@ function createFormConfigSchema(fieldSchema, propsSchema) {
5141
5430
  }
5142
5431
  return baseSchema;
5143
5432
  }
5144
- var BaseFormConfigSchema = z18.object({
5145
- fields: z18.array(z18.any()),
5433
+ var BaseFormConfigSchema = z19.object({
5434
+ fields: z19.array(z19.any()),
5146
5435
  options: FormOptionsSchema.optional(),
5147
5436
  schemas: SchemaDefinitionsArraySchema.optional(),
5148
5437
  defaultValidationMessages: ValidationMessagesSchema.optional()
5149
5438
  });
5150
5439
 
5151
5440
  // internal/dynamic-forms-validation/validate/src/json-schema/form-config-json-schema.ts
5152
- import zodToJsonSchema from "zod-to-json-schema";
5441
+ import { z as z57 } from "zod";
5153
5442
 
5154
5443
  // internal/dynamic-forms-validation/material/src/props/mat-common-props.schema.ts
5155
- import { z as z19 } from "zod";
5156
- var MatFormFieldAppearanceSchema = z19.enum(["fill", "outline"]);
5157
- var SubscriptSizingSchema = z19.enum(["fixed", "dynamic"]);
5158
- var ThemePaletteSchema = z19.enum(["primary", "accent", "warn"]);
5159
- var LabelPositionSchema = z19.enum(["before", "after"]);
5160
- var MatFormFieldPropsSchema = z19.object({
5444
+ import { z as z20 } from "zod";
5445
+ var MatFormFieldAppearanceSchema = z20.enum(["fill", "outline"]);
5446
+ var SubscriptSizingSchema = z20.enum(["fixed", "dynamic"]);
5447
+ var ThemePaletteSchema = z20.enum(["primary", "accent", "warn"]);
5448
+ var LabelPositionSchema = z20.enum(["before", "after"]);
5449
+ var MatFormFieldPropsSchema = z20.object({
5161
5450
  /**
5162
5451
  * Form field appearance style.
5163
5452
  */
@@ -5171,13 +5460,13 @@ var MatFormFieldPropsSchema = z19.object({
5171
5460
  */
5172
5461
  hint: DynamicTextSchema.optional()
5173
5462
  });
5174
- var RipplePropsSchema = z19.object({
5463
+ var RipplePropsSchema = z20.object({
5175
5464
  /**
5176
5465
  * Whether to disable the ripple effect.
5177
5466
  */
5178
- disableRipple: z19.boolean().optional()
5467
+ disableRipple: z20.boolean().optional()
5179
5468
  });
5180
- var ColorPropsSchema = z19.object({
5469
+ var ColorPropsSchema = z20.object({
5181
5470
  /**
5182
5471
  * Material theme color.
5183
5472
  */
@@ -5185,9 +5474,9 @@ var ColorPropsSchema = z19.object({
5185
5474
  });
5186
5475
 
5187
5476
  // internal/dynamic-forms-validation/material/src/props/mat-input-props.schema.ts
5188
- import { z as z20 } from "zod";
5189
- var MatInputTypeSchema = z20.enum(["text", "email", "password", "number", "tel", "url", "search"]);
5190
- var MatInputPropsSchema = z20.object({
5477
+ import { z as z21 } from "zod";
5478
+ var MatInputTypeSchema = z21.enum(["text", "email", "password", "number", "tel", "url", "search"]);
5479
+ var MatInputPropsSchema = z21.object({
5191
5480
  /**
5192
5481
  * HTML input type.
5193
5482
  */
@@ -5203,7 +5492,7 @@ var MatInputPropsSchema = z20.object({
5203
5492
  /**
5204
5493
  * Whether to disable the ripple effect.
5205
5494
  */
5206
- disableRipple: z20.boolean().optional(),
5495
+ disableRipple: z21.boolean().optional(),
5207
5496
  /**
5208
5497
  * How to size the subscript (hint/error area).
5209
5498
  */
@@ -5215,9 +5504,9 @@ var MatInputPropsSchema = z20.object({
5215
5504
  });
5216
5505
 
5217
5506
  // internal/dynamic-forms-validation/material/src/props/mat-textarea-props.schema.ts
5218
- import { z as z21 } from "zod";
5219
- var TextareaResizeSchema = z21.enum(["none", "both", "horizontal", "vertical"]);
5220
- var MatTextareaPropsSchema = z21.object({
5507
+ import { z as z22 } from "zod";
5508
+ var TextareaResizeSchema = z22.enum(["none", "both", "horizontal", "vertical"]);
5509
+ var MatTextareaPropsSchema = z22.object({
5221
5510
  /**
5222
5511
  * Placeholder text for the textarea.
5223
5512
  */
@@ -5225,11 +5514,11 @@ var MatTextareaPropsSchema = z21.object({
5225
5514
  /**
5226
5515
  * Number of visible text rows.
5227
5516
  */
5228
- rows: z21.number().positive().optional(),
5517
+ rows: z22.number().positive().optional(),
5229
5518
  /**
5230
5519
  * Number of visible text columns.
5231
5520
  */
5232
- cols: z21.number().positive().optional(),
5521
+ cols: z22.number().positive().optional(),
5233
5522
  /**
5234
5523
  * Form field appearance style.
5235
5524
  */
@@ -5249,12 +5538,12 @@ var MatTextareaPropsSchema = z21.object({
5249
5538
  /**
5250
5539
  * Maximum character length.
5251
5540
  */
5252
- maxLength: z21.number().positive().optional()
5541
+ maxLength: z22.number().positive().optional()
5253
5542
  });
5254
5543
 
5255
5544
  // internal/dynamic-forms-validation/material/src/props/mat-select-props.schema.ts
5256
- import { z as z22 } from "zod";
5257
- var MatSelectPropsSchema = z22.object({
5545
+ import { z as z23 } from "zod";
5546
+ var MatSelectPropsSchema = z23.object({
5258
5547
  /**
5259
5548
  * Placeholder text for the select.
5260
5549
  */
@@ -5266,11 +5555,11 @@ var MatSelectPropsSchema = z22.object({
5266
5555
  /**
5267
5556
  * Whether to allow multiple selections.
5268
5557
  */
5269
- multiple: z22.boolean().optional(),
5558
+ multiple: z23.boolean().optional(),
5270
5559
  /**
5271
5560
  * Maximum height of the select panel (CSS value).
5272
5561
  */
5273
- panelMaxHeight: z22.string().optional(),
5562
+ panelMaxHeight: z23.string().optional(),
5274
5563
  /**
5275
5564
  * How to size the subscript (hint/error area).
5276
5565
  */
@@ -5286,8 +5575,8 @@ var MatSelectPropsSchema = z22.object({
5286
5575
  });
5287
5576
 
5288
5577
  // internal/dynamic-forms-validation/material/src/props/mat-checkbox-props.schema.ts
5289
- import { z as z23 } from "zod";
5290
- var MatCheckboxPropsSchema = z23.object({
5578
+ import { z as z24 } from "zod";
5579
+ var MatCheckboxPropsSchema = z24.object({
5291
5580
  /**
5292
5581
  * Material theme color.
5293
5582
  */
@@ -5295,7 +5584,7 @@ var MatCheckboxPropsSchema = z23.object({
5295
5584
  /**
5296
5585
  * Whether to disable the ripple effect.
5297
5586
  */
5298
- disableRipple: z23.boolean().optional(),
5587
+ disableRipple: z24.boolean().optional(),
5299
5588
  /**
5300
5589
  * Position of the label relative to the checkbox.
5301
5590
  */
@@ -5307,12 +5596,12 @@ var MatCheckboxPropsSchema = z23.object({
5307
5596
  /**
5308
5597
  * Whether the checkbox is in indeterminate state.
5309
5598
  */
5310
- indeterminate: z23.boolean().optional()
5599
+ indeterminate: z24.boolean().optional()
5311
5600
  });
5312
5601
 
5313
5602
  // internal/dynamic-forms-validation/material/src/props/mat-radio-props.schema.ts
5314
- import { z as z24 } from "zod";
5315
- var MatRadioPropsSchema = z24.object({
5603
+ import { z as z25 } from "zod";
5604
+ var MatRadioPropsSchema = z25.object({
5316
5605
  /**
5317
5606
  * Material theme color.
5318
5607
  */
@@ -5320,7 +5609,7 @@ var MatRadioPropsSchema = z24.object({
5320
5609
  /**
5321
5610
  * Whether to disable the ripple effect.
5322
5611
  */
5323
- disableRipple: z24.boolean().optional(),
5612
+ disableRipple: z25.boolean().optional(),
5324
5613
  /**
5325
5614
  * Position of the label relative to the radio button.
5326
5615
  */
@@ -5332,8 +5621,8 @@ var MatRadioPropsSchema = z24.object({
5332
5621
  });
5333
5622
 
5334
5623
  // internal/dynamic-forms-validation/material/src/props/mat-multi-checkbox-props.schema.ts
5335
- import { z as z25 } from "zod";
5336
- var MatMultiCheckboxPropsSchema = z25.object({
5624
+ import { z as z26 } from "zod";
5625
+ var MatMultiCheckboxPropsSchema = z26.object({
5337
5626
  /**
5338
5627
  * Material theme color.
5339
5628
  */
@@ -5341,11 +5630,11 @@ var MatMultiCheckboxPropsSchema = z25.object({
5341
5630
  /**
5342
5631
  * Whether to disable the ripple effect.
5343
5632
  */
5344
- disableRipple: z25.boolean().optional(),
5633
+ disableRipple: z26.boolean().optional(),
5345
5634
  /**
5346
5635
  * Tab index for keyboard navigation.
5347
5636
  */
5348
- tabIndex: z25.number().optional(),
5637
+ tabIndex: z26.number().optional(),
5349
5638
  /**
5350
5639
  * Position of the labels relative to the checkboxes.
5351
5640
  */
@@ -5357,8 +5646,8 @@ var MatMultiCheckboxPropsSchema = z25.object({
5357
5646
  });
5358
5647
 
5359
5648
  // internal/dynamic-forms-validation/material/src/props/mat-toggle-props.schema.ts
5360
- import { z as z26 } from "zod";
5361
- var MatTogglePropsSchema = z26.object({
5649
+ import { z as z27 } from "zod";
5650
+ var MatTogglePropsSchema = z27.object({
5362
5651
  /**
5363
5652
  * Material theme color.
5364
5653
  */
@@ -5366,7 +5655,7 @@ var MatTogglePropsSchema = z26.object({
5366
5655
  /**
5367
5656
  * Whether to disable the ripple effect.
5368
5657
  */
5369
- disableRipple: z26.boolean().optional(),
5658
+ disableRipple: z27.boolean().optional(),
5370
5659
  /**
5371
5660
  * Position of the label relative to the toggle.
5372
5661
  */
@@ -5382,12 +5671,12 @@ var MatTogglePropsSchema = z26.object({
5382
5671
  /**
5383
5672
  * Whether to hide the icon inside the toggle.
5384
5673
  */
5385
- hideIcon: z26.boolean().optional()
5674
+ hideIcon: z27.boolean().optional()
5386
5675
  });
5387
5676
 
5388
5677
  // internal/dynamic-forms-validation/material/src/props/mat-slider-props.schema.ts
5389
- import { z as z27 } from "zod";
5390
- var MatSliderPropsSchema = z27.object({
5678
+ import { z as z28 } from "zod";
5679
+ var MatSliderPropsSchema = z28.object({
5391
5680
  /**
5392
5681
  * Material theme color.
5393
5682
  */
@@ -5404,25 +5693,25 @@ var MatSliderPropsSchema = z27.object({
5404
5693
  * Whether to display the thumb label.
5405
5694
  * @deprecated Use showThumbLabel instead
5406
5695
  */
5407
- thumbLabel: z27.boolean().optional(),
5696
+ thumbLabel: z28.boolean().optional(),
5408
5697
  /**
5409
5698
  * Whether to show the thumb label with the current value.
5410
5699
  */
5411
- showThumbLabel: z27.boolean().optional(),
5700
+ showThumbLabel: z28.boolean().optional(),
5412
5701
  /**
5413
5702
  * Interval for tick marks. 'auto' spaces them automatically.
5414
5703
  */
5415
- tickInterval: z27.union([z27.number().positive(), z27.literal("auto")]).optional(),
5704
+ tickInterval: z28.union([z28.number().positive(), z28.literal("auto")]).optional(),
5416
5705
  /**
5417
5706
  * Step increment for the slider.
5418
5707
  */
5419
- step: z27.number().positive().optional()
5708
+ step: z28.number().positive().optional()
5420
5709
  });
5421
5710
 
5422
5711
  // internal/dynamic-forms-validation/material/src/props/mat-datepicker-props.schema.ts
5423
- import { z as z28 } from "zod";
5424
- var DatepickerStartViewSchema = z28.enum(["month", "year", "multi-year"]);
5425
- var MatDatepickerPropsSchema = z28.object({
5712
+ import { z as z29 } from "zod";
5713
+ var DatepickerStartViewSchema = z29.enum(["month", "year", "multi-year"]);
5714
+ var MatDatepickerPropsSchema = z29.object({
5426
5715
  /**
5427
5716
  * Placeholder text for the datepicker input.
5428
5717
  */
@@ -5438,7 +5727,7 @@ var MatDatepickerPropsSchema = z28.object({
5438
5727
  /**
5439
5728
  * Whether to disable the ripple effect.
5440
5729
  */
5441
- disableRipple: z28.boolean().optional(),
5730
+ disableRipple: z29.boolean().optional(),
5442
5731
  /**
5443
5732
  * How to size the subscript (hint/error area).
5444
5733
  */
@@ -5450,7 +5739,7 @@ var MatDatepickerPropsSchema = z28.object({
5450
5739
  /**
5451
5740
  * Whether to use touch-friendly UI mode.
5452
5741
  */
5453
- touchUi: z28.boolean().optional(),
5742
+ touchUi: z29.boolean().optional(),
5454
5743
  /**
5455
5744
  * Hint text displayed below the field.
5456
5745
  */
@@ -5458,9 +5747,9 @@ var MatDatepickerPropsSchema = z28.object({
5458
5747
  });
5459
5748
 
5460
5749
  // internal/dynamic-forms-validation/material/src/props/mat-button-props.schema.ts
5461
- import { z as z29 } from "zod";
5462
- var ButtonTypeSchema = z29.enum(["button", "submit", "reset"]);
5463
- var MatButtonPropsSchema = z29.object({
5750
+ import { z as z30 } from "zod";
5751
+ var ButtonTypeSchema = z30.enum(["button", "submit", "reset"]);
5752
+ var MatButtonPropsSchema = z30.object({
5464
5753
  /**
5465
5754
  * Material theme color.
5466
5755
  */
@@ -5472,17 +5761,17 @@ var MatButtonPropsSchema = z29.object({
5472
5761
  });
5473
5762
 
5474
5763
  // internal/dynamic-forms-validation/material/src/fields/mat-input-field.schema.ts
5475
- import { z as z30 } from "zod";
5764
+ import { z as z31 } from "zod";
5476
5765
  var MatInputFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5477
5766
  /**
5478
5767
  * Field type discriminant.
5479
5768
  */
5480
- type: z30.literal("input"),
5481
- nullable: z30.boolean().optional(),
5769
+ type: z31.literal("input"),
5770
+ nullable: z31.boolean().optional(),
5482
5771
  /**
5483
5772
  * Initial value for the input.
5484
5773
  */
5485
- value: z30.string().nullable().optional(),
5774
+ value: z31.string().nullable().optional(),
5486
5775
  /**
5487
5776
  * Placeholder text (can also be in props).
5488
5777
  */
@@ -5495,17 +5784,17 @@ var MatInputFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSche
5495
5784
  var MatInputFieldSchema = MatInputFieldSchemaObject.superRefine(nullableValueRefine);
5496
5785
 
5497
5786
  // internal/dynamic-forms-validation/material/src/fields/mat-textarea-field.schema.ts
5498
- import { z as z31 } from "zod";
5787
+ import { z as z32 } from "zod";
5499
5788
  var MatTextareaFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5500
5789
  /**
5501
5790
  * Field type discriminant.
5502
5791
  */
5503
- type: z31.literal("textarea"),
5504
- nullable: z31.boolean().optional(),
5792
+ type: z32.literal("textarea"),
5793
+ nullable: z32.boolean().optional(),
5505
5794
  /**
5506
5795
  * Initial value for the textarea.
5507
5796
  */
5508
- value: z31.string().nullable().optional(),
5797
+ value: z32.string().nullable().optional(),
5509
5798
  /**
5510
5799
  * Placeholder text (can also be in props).
5511
5800
  */
@@ -5518,18 +5807,18 @@ var MatTextareaFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationS
5518
5807
  var MatTextareaFieldSchema = MatTextareaFieldSchemaObject.superRefine(nullableValueRefine);
5519
5808
 
5520
5809
  // internal/dynamic-forms-validation/material/src/fields/mat-select-field.schema.ts
5521
- import { z as z32 } from "zod";
5810
+ import { z as z33 } from "zod";
5522
5811
  var MatSelectFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5523
5812
  /**
5524
5813
  * Field type discriminant.
5525
5814
  */
5526
- type: z32.literal("select"),
5527
- nullable: z32.boolean().optional(),
5815
+ type: z33.literal("select"),
5816
+ nullable: z33.boolean().optional(),
5528
5817
  /**
5529
5818
  * Initial value for the select.
5530
5819
  * Can be single value or array if multiple is enabled.
5531
5820
  */
5532
- value: z32.unknown().nullable().optional(),
5821
+ value: z33.unknown().nullable().optional(),
5533
5822
  /**
5534
5823
  * Placeholder text (can also be in props).
5535
5824
  */
@@ -5546,16 +5835,16 @@ var MatSelectFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSch
5546
5835
  var MatSelectFieldSchema = MatSelectFieldSchemaObject.superRefine(nullableValueRefine);
5547
5836
 
5548
5837
  // internal/dynamic-forms-validation/material/src/fields/mat-checkbox-field.schema.ts
5549
- import { z as z33 } from "zod";
5838
+ import { z as z34 } from "zod";
5550
5839
  var MatCheckboxFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5551
5840
  /**
5552
5841
  * Field type discriminant.
5553
5842
  */
5554
- type: z33.literal("checkbox"),
5843
+ type: z34.literal("checkbox"),
5555
5844
  /**
5556
5845
  * Initial checked state.
5557
5846
  */
5558
- value: z33.boolean().optional(),
5847
+ value: z34.boolean().optional(),
5559
5848
  /**
5560
5849
  * Placeholder/helper text.
5561
5850
  */
@@ -5567,17 +5856,17 @@ var MatCheckboxFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema)
5567
5856
  });
5568
5857
 
5569
5858
  // internal/dynamic-forms-validation/material/src/fields/mat-radio-field.schema.ts
5570
- import { z as z34 } from "zod";
5859
+ import { z as z35 } from "zod";
5571
5860
  var MatRadioFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5572
5861
  /**
5573
5862
  * Field type discriminant.
5574
5863
  */
5575
- type: z34.literal("radio"),
5576
- nullable: z34.boolean().optional(),
5864
+ type: z35.literal("radio"),
5865
+ nullable: z35.boolean().optional(),
5577
5866
  /**
5578
5867
  * Initial selected value.
5579
5868
  */
5580
- value: z34.unknown().nullable().optional(),
5869
+ value: z35.unknown().nullable().optional(),
5581
5870
  /**
5582
5871
  * Placeholder/helper text.
5583
5872
  */
@@ -5594,17 +5883,17 @@ var MatRadioFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSche
5594
5883
  var MatRadioFieldSchema = MatRadioFieldSchemaObject.superRefine(nullableValueRefine);
5595
5884
 
5596
5885
  // internal/dynamic-forms-validation/material/src/fields/mat-multi-checkbox-field.schema.ts
5597
- import { z as z35 } from "zod";
5886
+ import { z as z36 } from "zod";
5598
5887
  var MatMultiCheckboxFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5599
5888
  /**
5600
5889
  * Field type discriminant.
5601
5890
  */
5602
- type: z35.literal("multi-checkbox"),
5603
- nullable: z35.boolean().optional(),
5891
+ type: z36.literal("multi-checkbox"),
5892
+ nullable: z36.boolean().optional(),
5604
5893
  /**
5605
5894
  * Initial selected values (array).
5606
5895
  */
5607
- value: z35.array(z35.unknown()).nullable().optional(),
5896
+ value: z36.array(z36.unknown()).nullable().optional(),
5608
5897
  /**
5609
5898
  * Placeholder/helper text.
5610
5899
  */
@@ -5621,16 +5910,16 @@ var MatMultiCheckboxFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValida
5621
5910
  var MatMultiCheckboxFieldSchema = MatMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
5622
5911
 
5623
5912
  // internal/dynamic-forms-validation/material/src/fields/mat-toggle-field.schema.ts
5624
- import { z as z36 } from "zod";
5913
+ import { z as z37 } from "zod";
5625
5914
  var MatToggleFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5626
5915
  /**
5627
5916
  * Field type discriminant.
5628
5917
  */
5629
- type: z36.literal("toggle"),
5918
+ type: z37.literal("toggle"),
5630
5919
  /**
5631
5920
  * Initial toggle state.
5632
5921
  */
5633
- value: z36.boolean().optional(),
5922
+ value: z37.boolean().optional(),
5634
5923
  /**
5635
5924
  * Placeholder/helper text.
5636
5925
  */
@@ -5642,29 +5931,29 @@ var MatToggleFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).e
5642
5931
  });
5643
5932
 
5644
5933
  // internal/dynamic-forms-validation/material/src/fields/mat-slider-field.schema.ts
5645
- import { z as z37 } from "zod";
5934
+ import { z as z38 } from "zod";
5646
5935
  var MatSliderFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5647
5936
  /**
5648
5937
  * Field type discriminant.
5649
5938
  */
5650
- type: z37.literal("slider"),
5651
- nullable: z37.boolean().optional(),
5939
+ type: z38.literal("slider"),
5940
+ nullable: z38.boolean().optional(),
5652
5941
  /**
5653
5942
  * Initial slider value.
5654
5943
  */
5655
- value: z37.number().nullable().optional(),
5944
+ value: z38.number().nullable().optional(),
5656
5945
  /**
5657
5946
  * Minimum slider value.
5658
5947
  */
5659
- minValue: z37.number().optional(),
5948
+ minValue: z38.number().optional(),
5660
5949
  /**
5661
5950
  * Maximum slider value.
5662
5951
  */
5663
- maxValue: z37.number().optional(),
5952
+ maxValue: z38.number().optional(),
5664
5953
  /**
5665
5954
  * Step increment.
5666
5955
  */
5667
- step: z37.number().positive().optional(),
5956
+ step: z38.number().positive().optional(),
5668
5957
  /**
5669
5958
  * Placeholder/helper text.
5670
5959
  */
@@ -5677,14 +5966,14 @@ var MatSliderFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSch
5677
5966
  var MatSliderFieldSchema = MatSliderFieldSchemaObject.superRefine(nullableValueRefine);
5678
5967
 
5679
5968
  // internal/dynamic-forms-validation/material/src/fields/mat-datepicker-field.schema.ts
5680
- import { z as z38 } from "zod";
5681
- var DateValueSchema = z38.union([z38.string(), z38.null()]);
5969
+ import { z as z39 } from "zod";
5970
+ var DateValueSchema = z39.union([z39.string(), z39.null()]);
5682
5971
  var MatDatepickerFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5683
5972
  /**
5684
5973
  * Field type discriminant.
5685
5974
  */
5686
- type: z38.literal("datepicker"),
5687
- nullable: z38.boolean().optional(),
5975
+ type: z39.literal("datepicker"),
5976
+ nullable: z39.boolean().optional(),
5688
5977
  /**
5689
5978
  * Initial date value (ISO string in JSON configs).
5690
5979
  */
@@ -5713,22 +6002,29 @@ var MatDatepickerFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidatio
5713
6002
  var MatDatepickerFieldSchema = MatDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
5714
6003
 
5715
6004
  // internal/dynamic-forms-validation/material/src/fields/mat-button-field.schema.ts
5716
- import { z as z39 } from "zod";
5717
- var EventArgSchema = z39.union([z39.string(), z39.number(), z39.boolean(), z39.null(), z39.undefined()]);
6005
+ import { z as z41 } from "zod";
6006
+
6007
+ // internal/dynamic-forms-validation/src/lib/schemas/field/array-item-template.schema.ts
6008
+ import { z as z40 } from "zod";
6009
+ var FieldLikeSchema = z40.object({ type: z40.string() }).passthrough();
6010
+ var ArrayItemTemplateSchema = z40.union([FieldLikeSchema, z40.array(FieldLikeSchema)]);
6011
+
6012
+ // internal/dynamic-forms-validation/material/src/fields/mat-button-field.schema.ts
6013
+ var EventArgSchema = z41.union([z41.string(), z41.number(), z41.boolean(), z41.null(), z41.undefined()]);
5718
6014
  var MatButtonFieldSchema = BaseFieldDefSchema.extend({
5719
6015
  /**
5720
6016
  * Field type discriminant.
5721
6017
  */
5722
- type: z39.literal("button"),
6018
+ type: z41.literal("button"),
5723
6019
  /**
5724
6020
  * Event type name (string reference to registered event).
5725
6021
  * Note: Full event configuration requires runtime setup.
5726
6022
  */
5727
- event: z39.string().optional(),
6023
+ event: z41.string().optional(),
5728
6024
  /**
5729
6025
  * Arguments passed to the event constructor.
5730
6026
  */
5731
- eventArgs: z39.array(EventArgSchema).optional(),
6027
+ eventArgs: z41.array(EventArgSchema).optional(),
5732
6028
  /**
5733
6029
  * Material-specific button properties.
5734
6030
  */
@@ -5739,79 +6035,94 @@ var MatButtonFieldSchema = BaseFieldDefSchema.extend({
5739
6035
  logic: LogicArraySchema.optional()
5740
6036
  });
5741
6037
  var MatSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
5742
- type: z39.literal("submit"),
6038
+ type: z41.literal("submit"),
5743
6039
  props: MatButtonPropsSchema.optional(),
5744
6040
  logic: LogicArraySchema.optional()
5745
6041
  });
5746
6042
  var MatNextButtonFieldSchema = BaseFieldDefSchema.extend({
5747
- type: z39.literal("next"),
6043
+ type: z41.literal("next"),
5748
6044
  props: MatButtonPropsSchema.optional(),
5749
6045
  logic: LogicArraySchema.optional()
5750
6046
  });
5751
6047
  var MatPreviousButtonFieldSchema = BaseFieldDefSchema.extend({
5752
- type: z39.literal("previous"),
6048
+ type: z41.literal("previous"),
5753
6049
  props: MatButtonPropsSchema.optional()
5754
6050
  });
5755
6051
  var MatAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
5756
- type: z39.literal("add-array-item"),
6052
+ /**
6053
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6054
+ * item, or a list of them for an object item.
6055
+ */
6056
+ template: ArrayItemTemplateSchema,
6057
+ type: z41.literal("add-array-item"),
5757
6058
  /**
5758
6059
  * Key of the array field to add items to.
5759
6060
  * If omitted, uses the parent array context.
5760
6061
  */
5761
- arrayKey: z39.string().optional(),
6062
+ arrayKey: z41.string().optional(),
5762
6063
  props: MatButtonPropsSchema.optional()
5763
6064
  });
5764
6065
  var MatRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
5765
- type: z39.literal("remove-array-item"),
6066
+ type: z41.literal("remove-array-item"),
5766
6067
  /**
5767
6068
  * Key of the array field to remove items from.
5768
6069
  * If omitted, uses the parent array context.
5769
6070
  */
5770
- arrayKey: z39.string().optional(),
6071
+ arrayKey: z41.string().optional(),
5771
6072
  props: MatButtonPropsSchema.optional()
5772
6073
  });
5773
6074
  var MatPrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
5774
- type: z39.literal("prepend-array-item"),
6075
+ /**
6076
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6077
+ * item, or a list of them for an object item.
6078
+ */
6079
+ template: ArrayItemTemplateSchema,
6080
+ type: z41.literal("prepend-array-item"),
5775
6081
  /**
5776
6082
  * Key of the array field to prepend items to.
5777
6083
  * If omitted, uses the parent array context.
5778
6084
  */
5779
- arrayKey: z39.string().optional(),
6085
+ arrayKey: z41.string().optional(),
5780
6086
  props: MatButtonPropsSchema.optional()
5781
6087
  });
5782
6088
  var MatInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
5783
- type: z39.literal("insert-array-item"),
6089
+ /**
6090
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6091
+ * item, or a list of them for an object item.
6092
+ */
6093
+ template: ArrayItemTemplateSchema,
6094
+ type: z41.literal("insert-array-item"),
5784
6095
  /**
5785
6096
  * Key of the array field to insert items into.
5786
6097
  * If omitted, uses the parent array context.
5787
6098
  */
5788
- arrayKey: z39.string().optional(),
6099
+ arrayKey: z41.string().optional(),
5789
6100
  /**
5790
6101
  * Index at which to insert the new item.
5791
6102
  */
5792
- index: z39.number(),
6103
+ index: z41.number(),
5793
6104
  props: MatButtonPropsSchema.optional()
5794
6105
  });
5795
6106
  var MatPopArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
5796
- type: z39.literal("pop-array-item"),
6107
+ type: z41.literal("pop-array-item"),
5797
6108
  /**
5798
6109
  * Key of the array field to pop items from.
5799
6110
  */
5800
- arrayKey: z39.string(),
6111
+ arrayKey: z41.string(),
5801
6112
  props: MatButtonPropsSchema.optional()
5802
6113
  });
5803
6114
  var MatShiftArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
5804
- type: z39.literal("shift-array-item"),
6115
+ type: z41.literal("shift-array-item"),
5805
6116
  /**
5806
6117
  * Key of the array field to shift items from.
5807
6118
  */
5808
- arrayKey: z39.string(),
6119
+ arrayKey: z41.string(),
5809
6120
  props: MatButtonPropsSchema.optional()
5810
6121
  });
5811
6122
 
5812
6123
  // internal/dynamic-forms-validation/material/src/mat-leaf-field.schema.ts
5813
- import { z as z40 } from "zod";
5814
- var MatLeafFieldSchema = z40.discriminatedUnion("type", [
6124
+ import { z as z42 } from "zod";
6125
+ var MatLeafFieldSchema = z42.discriminatedUnion("type", [
5815
6126
  // Default fields
5816
6127
  TextFieldSchema,
5817
6128
  HiddenFieldSchema,
@@ -5849,8 +6160,8 @@ var MatArrayFieldSchema = containerSchemas.ArrayFieldSchema;
5849
6160
  var MatFieldSchema = containerSchemas.AllFieldsSchema;
5850
6161
 
5851
6162
  // internal/dynamic-forms-validation/material/src/mat-form-config.schema.ts
5852
- import { z as z41 } from "zod";
5853
- var MatFormDefaultPropsSchema = z41.object({
6163
+ import { z as z43 } from "zod";
6164
+ var MatFormDefaultPropsSchema = z43.object({
5854
6165
  /**
5855
6166
  * Default form field appearance for all fields.
5856
6167
  */
@@ -5867,15 +6178,15 @@ var MatFormDefaultPropsSchema = z41.object({
5867
6178
  var MatFormConfigSchema = createFormConfigSchema(MatFieldSchema, MatFormDefaultPropsSchema);
5868
6179
 
5869
6180
  // internal/dynamic-forms-validation/bootstrap/src/props/index.ts
5870
- import { z as z43 } from "zod";
6181
+ import { z as z45 } from "zod";
5871
6182
 
5872
6183
  // internal/dynamic-forms-validation/bootstrap/src/props/bs-common-props.schema.ts
5873
- import { z as z42 } from "zod";
5874
- var BsSizeSchema = z42.enum(["sm", "lg"]);
5875
- var BsButtonVariantSchema = z42.enum(["primary", "secondary", "success", "danger", "warning", "info", "light", "dark", "link"]);
5876
- var BsFormFieldPropsSchema = z42.object({
6184
+ import { z as z44 } from "zod";
6185
+ var BsSizeSchema = z44.enum(["sm", "lg"]);
6186
+ var BsButtonVariantSchema = z44.enum(["primary", "secondary", "success", "danger", "warning", "info", "light", "dark", "link"]);
6187
+ var BsFormFieldPropsSchema = z44.object({
5877
6188
  size: BsSizeSchema.optional(),
5878
- floatingLabel: z42.boolean().optional(),
6189
+ floatingLabel: z44.boolean().optional(),
5879
6190
  hint: DynamicTextSchema.optional(),
5880
6191
  validFeedback: DynamicTextSchema.optional(),
5881
6192
  invalidFeedback: DynamicTextSchema.optional()
@@ -5883,94 +6194,94 @@ var BsFormFieldPropsSchema = z42.object({
5883
6194
 
5884
6195
  // internal/dynamic-forms-validation/bootstrap/src/props/index.ts
5885
6196
  var BsInputPropsSchema = BsFormFieldPropsSchema.extend({
5886
- type: z43.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
6197
+ type: z45.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
5887
6198
  placeholder: DynamicTextSchema.optional(),
5888
- plaintext: z43.boolean().optional()
6199
+ plaintext: z45.boolean().optional()
5889
6200
  });
5890
6201
  var BsTextareaPropsSchema = BsFormFieldPropsSchema.extend({
5891
- rows: z43.number().positive().optional(),
6202
+ rows: z45.number().positive().optional(),
5892
6203
  placeholder: DynamicTextSchema.optional()
5893
6204
  });
5894
6205
  var BsSelectPropsSchema = BsFormFieldPropsSchema.extend({
5895
- multiple: z43.boolean().optional(),
5896
- htmlSize: z43.number().positive().optional(),
6206
+ multiple: z45.boolean().optional(),
6207
+ htmlSize: z45.number().positive().optional(),
5897
6208
  placeholder: DynamicTextSchema.optional()
5898
6209
  });
5899
- var BsCheckboxPropsSchema = z43.object({
5900
- switch: z43.boolean().optional(),
5901
- inline: z43.boolean().optional(),
5902
- reverse: z43.boolean().optional(),
5903
- indeterminate: z43.boolean().optional(),
6210
+ var BsCheckboxPropsSchema = z45.object({
6211
+ switch: z45.boolean().optional(),
6212
+ inline: z45.boolean().optional(),
6213
+ reverse: z45.boolean().optional(),
6214
+ indeterminate: z45.boolean().optional(),
5904
6215
  hint: DynamicTextSchema.optional()
5905
6216
  });
5906
- var BsRadioPropsSchema = z43.object({
5907
- inline: z43.boolean().optional(),
5908
- reverse: z43.boolean().optional(),
5909
- buttonGroup: z43.boolean().optional(),
6217
+ var BsRadioPropsSchema = z45.object({
6218
+ inline: z45.boolean().optional(),
6219
+ reverse: z45.boolean().optional(),
6220
+ buttonGroup: z45.boolean().optional(),
5910
6221
  buttonSize: BsSizeSchema.optional(),
5911
6222
  hint: DynamicTextSchema.optional()
5912
6223
  });
5913
- var BsMultiCheckboxPropsSchema = z43.object({
5914
- switch: z43.boolean().optional(),
5915
- inline: z43.boolean().optional(),
5916
- reverse: z43.boolean().optional(),
6224
+ var BsMultiCheckboxPropsSchema = z45.object({
6225
+ switch: z45.boolean().optional(),
6226
+ inline: z45.boolean().optional(),
6227
+ reverse: z45.boolean().optional(),
5917
6228
  hint: DynamicTextSchema.optional()
5918
6229
  });
5919
- var BsTogglePropsSchema = z43.object({
6230
+ var BsTogglePropsSchema = z45.object({
5920
6231
  size: BsSizeSchema.optional(),
5921
- reverse: z43.boolean().optional(),
5922
- inline: z43.boolean().optional(),
6232
+ reverse: z45.boolean().optional(),
6233
+ inline: z45.boolean().optional(),
5923
6234
  hint: DynamicTextSchema.optional()
5924
6235
  });
5925
6236
  var BsDatepickerPropsSchema = BsFormFieldPropsSchema.extend({
5926
- useNgBootstrap: z43.boolean().optional(),
5927
- displayMonths: z43.number().positive().optional(),
5928
- navigation: z43.enum(["select", "arrows", "none"]).optional(),
5929
- outsideDays: z43.enum(["visible", "collapsed", "hidden"]).optional(),
5930
- showWeekNumbers: z43.boolean().optional(),
6237
+ useNgBootstrap: z45.boolean().optional(),
6238
+ displayMonths: z45.number().positive().optional(),
6239
+ navigation: z45.enum(["select", "arrows", "none"]).optional(),
6240
+ outsideDays: z45.enum(["visible", "collapsed", "hidden"]).optional(),
6241
+ showWeekNumbers: z45.boolean().optional(),
5931
6242
  placeholder: DynamicTextSchema.optional()
5932
6243
  });
5933
- var BsSliderPropsSchema = z43.object({
5934
- showValue: z43.boolean().optional(),
5935
- valuePrefix: z43.string().optional(),
5936
- valueSuffix: z43.string().optional(),
6244
+ var BsSliderPropsSchema = z45.object({
6245
+ showValue: z45.boolean().optional(),
6246
+ valuePrefix: z45.string().optional(),
6247
+ valueSuffix: z45.string().optional(),
5937
6248
  hint: DynamicTextSchema.optional(),
5938
- min: z43.number().optional(),
5939
- max: z43.number().optional(),
5940
- step: z43.number().positive().optional()
6249
+ min: z45.number().optional(),
6250
+ max: z45.number().optional(),
6251
+ step: z45.number().positive().optional()
5941
6252
  });
5942
- var BsButtonPropsSchema = z43.object({
6253
+ var BsButtonPropsSchema = z45.object({
5943
6254
  variant: BsButtonVariantSchema.optional(),
5944
- outline: z43.boolean().optional(),
6255
+ outline: z45.boolean().optional(),
5945
6256
  size: BsSizeSchema.optional(),
5946
- block: z43.boolean().optional(),
5947
- active: z43.boolean().optional(),
5948
- type: z43.enum(["button", "submit", "reset"]).optional()
6257
+ block: z45.boolean().optional(),
6258
+ active: z45.boolean().optional(),
6259
+ type: z45.enum(["button", "submit", "reset"]).optional()
5949
6260
  });
5950
6261
 
5951
6262
  // internal/dynamic-forms-validation/bootstrap/src/fields/index.ts
5952
- import { z as z44 } from "zod";
6263
+ import { z as z46 } from "zod";
5953
6264
  var BsValueFieldBase = BaseFieldDefSchema.merge(FieldWithValidationSchema);
5954
6265
  var BsInputFieldSchemaObject = BsValueFieldBase.extend({
5955
- type: z44.literal("input"),
5956
- nullable: z44.boolean().optional(),
5957
- value: z44.string().nullable().optional(),
6266
+ type: z46.literal("input"),
6267
+ nullable: z46.boolean().optional(),
6268
+ value: z46.string().nullable().optional(),
5958
6269
  placeholder: DynamicTextSchema.optional(),
5959
6270
  props: BsInputPropsSchema.optional()
5960
6271
  });
5961
6272
  var BsInputFieldSchema = BsInputFieldSchemaObject.superRefine(nullableValueRefine);
5962
6273
  var BsTextareaFieldSchemaObject = BsValueFieldBase.extend({
5963
- type: z44.literal("textarea"),
5964
- nullable: z44.boolean().optional(),
5965
- value: z44.string().nullable().optional(),
6274
+ type: z46.literal("textarea"),
6275
+ nullable: z46.boolean().optional(),
6276
+ value: z46.string().nullable().optional(),
5966
6277
  placeholder: DynamicTextSchema.optional(),
5967
6278
  props: BsTextareaPropsSchema.optional()
5968
6279
  });
5969
6280
  var BsTextareaFieldSchema = BsTextareaFieldSchemaObject.superRefine(nullableValueRefine);
5970
6281
  var BsSelectFieldSchemaObject = BsValueFieldBase.extend({
5971
- type: z44.literal("select"),
5972
- nullable: z44.boolean().optional(),
5973
- value: z44.string().nullable().optional(),
6282
+ type: z46.literal("select"),
6283
+ nullable: z46.boolean().optional(),
6284
+ value: z46.string().nullable().optional(),
5974
6285
  // Bootstrap select only supports strings
5975
6286
  placeholder: DynamicTextSchema.optional(),
5976
6287
  options: FieldOptionsSchema,
@@ -5978,113 +6289,128 @@ var BsSelectFieldSchemaObject = BsValueFieldBase.extend({
5978
6289
  });
5979
6290
  var BsSelectFieldSchema = BsSelectFieldSchemaObject.superRefine(nullableValueRefine);
5980
6291
  var BsCheckboxFieldSchema = BsValueFieldBase.extend({
5981
- type: z44.literal("checkbox"),
5982
- value: z44.boolean().optional(),
6292
+ type: z46.literal("checkbox"),
6293
+ value: z46.boolean().optional(),
5983
6294
  placeholder: DynamicTextSchema.optional(),
5984
6295
  props: BsCheckboxPropsSchema.optional()
5985
6296
  });
5986
6297
  var BsRadioFieldSchemaObject = BsValueFieldBase.extend({
5987
- type: z44.literal("radio"),
5988
- nullable: z44.boolean().optional(),
5989
- value: z44.unknown().nullable().optional(),
6298
+ type: z46.literal("radio"),
6299
+ nullable: z46.boolean().optional(),
6300
+ value: z46.unknown().nullable().optional(),
5990
6301
  placeholder: DynamicTextSchema.optional(),
5991
6302
  options: FieldOptionsSchema,
5992
6303
  props: BsRadioPropsSchema.optional()
5993
6304
  });
5994
6305
  var BsRadioFieldSchema = BsRadioFieldSchemaObject.superRefine(nullableValueRefine);
5995
6306
  var BsMultiCheckboxFieldSchemaObject = BsValueFieldBase.extend({
5996
- type: z44.literal("multi-checkbox"),
5997
- nullable: z44.boolean().optional(),
5998
- value: z44.array(z44.unknown()).nullable().optional(),
6307
+ type: z46.literal("multi-checkbox"),
6308
+ nullable: z46.boolean().optional(),
6309
+ value: z46.array(z46.unknown()).nullable().optional(),
5999
6310
  placeholder: DynamicTextSchema.optional(),
6000
6311
  options: FieldOptionsSchema,
6001
6312
  props: BsMultiCheckboxPropsSchema.optional()
6002
6313
  });
6003
6314
  var BsMultiCheckboxFieldSchema = BsMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
6004
6315
  var BsToggleFieldSchema = BsValueFieldBase.extend({
6005
- type: z44.literal("toggle"),
6006
- value: z44.boolean().optional(),
6316
+ type: z46.literal("toggle"),
6317
+ value: z46.boolean().optional(),
6007
6318
  placeholder: DynamicTextSchema.optional(),
6008
6319
  props: BsTogglePropsSchema.optional()
6009
6320
  });
6010
6321
  var BsDatepickerFieldSchemaObject = BsValueFieldBase.extend({
6011
- type: z44.literal("datepicker"),
6012
- nullable: z44.boolean().optional(),
6013
- value: z44.union([z44.string(), z44.null()]).optional(),
6014
- minDate: z44.union([z44.string(), z44.null()]).optional(),
6015
- maxDate: z44.union([z44.string(), z44.null()]).optional(),
6016
- startAt: z44.union([z44.string(), z44.null()]).optional(),
6322
+ type: z46.literal("datepicker"),
6323
+ nullable: z46.boolean().optional(),
6324
+ value: z46.union([z46.string(), z46.null()]).optional(),
6325
+ minDate: z46.union([z46.string(), z46.null()]).optional(),
6326
+ maxDate: z46.union([z46.string(), z46.null()]).optional(),
6327
+ startAt: z46.union([z46.string(), z46.null()]).optional(),
6017
6328
  placeholder: DynamicTextSchema.optional(),
6018
6329
  props: BsDatepickerPropsSchema.optional()
6019
6330
  });
6020
6331
  var BsDatepickerFieldSchema = BsDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
6021
6332
  var BsSliderFieldSchemaObject = BsValueFieldBase.extend({
6022
- type: z44.literal("slider"),
6023
- nullable: z44.boolean().optional(),
6024
- value: z44.number().nullable().optional(),
6025
- minValue: z44.number().optional(),
6026
- maxValue: z44.number().optional(),
6027
- step: z44.number().positive().optional(),
6333
+ type: z46.literal("slider"),
6334
+ nullable: z46.boolean().optional(),
6335
+ value: z46.number().nullable().optional(),
6336
+ minValue: z46.number().optional(),
6337
+ maxValue: z46.number().optional(),
6338
+ step: z46.number().positive().optional(),
6028
6339
  placeholder: DynamicTextSchema.optional(),
6029
6340
  props: BsSliderPropsSchema.optional()
6030
6341
  });
6031
6342
  var BsSliderFieldSchema = BsSliderFieldSchemaObject.superRefine(nullableValueRefine);
6032
6343
  var BsButtonFieldSchema = BaseFieldDefSchema.extend({
6033
- type: z44.literal("button"),
6034
- event: z44.string().optional(),
6035
- eventArgs: z44.array(z44.union([z44.string(), z44.number(), z44.boolean(), z44.null(), z44.undefined()])).optional(),
6344
+ type: z46.literal("button"),
6345
+ event: z46.string().optional(),
6346
+ eventArgs: z46.array(z46.union([z46.string(), z46.number(), z46.boolean(), z46.null(), z46.undefined()])).optional(),
6036
6347
  props: BsButtonPropsSchema.optional(),
6037
6348
  logic: LogicArraySchema.optional()
6038
6349
  });
6039
6350
  var BsSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
6040
- type: z44.literal("submit"),
6351
+ type: z46.literal("submit"),
6041
6352
  props: BsButtonPropsSchema.optional(),
6042
6353
  logic: LogicArraySchema.optional()
6043
6354
  });
6044
6355
  var BsNextButtonFieldSchema = BaseFieldDefSchema.extend({
6045
- type: z44.literal("next"),
6356
+ type: z46.literal("next"),
6046
6357
  props: BsButtonPropsSchema.optional(),
6047
6358
  logic: LogicArraySchema.optional()
6048
6359
  });
6049
6360
  var BsPreviousButtonFieldSchema = BaseFieldDefSchema.extend({
6050
- type: z44.literal("previous"),
6361
+ type: z46.literal("previous"),
6051
6362
  props: BsButtonPropsSchema.optional()
6052
6363
  });
6053
6364
  var BsAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6054
- type: z44.literal("add-array-item"),
6055
- arrayKey: z44.string().optional(),
6365
+ /**
6366
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6367
+ * item, or a list of them for an object item.
6368
+ */
6369
+ template: ArrayItemTemplateSchema,
6370
+ type: z46.literal("add-array-item"),
6371
+ arrayKey: z46.string().optional(),
6056
6372
  props: BsButtonPropsSchema.optional()
6057
6373
  });
6058
6374
  var BsRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6059
- type: z44.literal("remove-array-item"),
6060
- arrayKey: z44.string().optional(),
6375
+ type: z46.literal("remove-array-item"),
6376
+ arrayKey: z46.string().optional(),
6061
6377
  props: BsButtonPropsSchema.optional()
6062
6378
  });
6063
6379
  var BsPrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6064
- type: z44.literal("prepend-array-item"),
6065
- arrayKey: z44.string().optional(),
6380
+ /**
6381
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6382
+ * item, or a list of them for an object item.
6383
+ */
6384
+ template: ArrayItemTemplateSchema,
6385
+ type: z46.literal("prepend-array-item"),
6386
+ arrayKey: z46.string().optional(),
6066
6387
  props: BsButtonPropsSchema.optional()
6067
6388
  });
6068
6389
  var BsInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6069
- type: z44.literal("insert-array-item"),
6070
- arrayKey: z44.string().optional(),
6071
- index: z44.number(),
6390
+ /**
6391
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6392
+ * item, or a list of them for an object item.
6393
+ */
6394
+ template: ArrayItemTemplateSchema,
6395
+ type: z46.literal("insert-array-item"),
6396
+ arrayKey: z46.string().optional(),
6397
+ index: z46.number(),
6072
6398
  props: BsButtonPropsSchema.optional()
6073
6399
  });
6074
6400
  var BsPopArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6075
- type: z44.literal("pop-array-item"),
6076
- arrayKey: z44.string(),
6401
+ type: z46.literal("pop-array-item"),
6402
+ arrayKey: z46.string(),
6077
6403
  props: BsButtonPropsSchema.optional()
6078
6404
  });
6079
6405
  var BsShiftArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6080
- type: z44.literal("shift-array-item"),
6081
- arrayKey: z44.string(),
6406
+ type: z46.literal("shift-array-item"),
6407
+ arrayKey: z46.string(),
6082
6408
  props: BsButtonPropsSchema.optional()
6083
6409
  });
6084
6410
 
6085
6411
  // internal/dynamic-forms-validation/bootstrap/src/bs-leaf-field.schema.ts
6086
- import { z as z45 } from "zod";
6087
- var BsLeafFieldSchema = z45.discriminatedUnion("type", [
6412
+ import { z as z47 } from "zod";
6413
+ var BsLeafFieldSchema = z47.discriminatedUnion("type", [
6088
6414
  TextFieldSchema,
6089
6415
  HiddenFieldSchema,
6090
6416
  BsInputFieldSchemaObject,
@@ -6109,7 +6435,7 @@ var BsLeafFieldSchema = z45.discriminatedUnion("type", [
6109
6435
  ]).superRefine(nullableValueRefine);
6110
6436
 
6111
6437
  // internal/dynamic-forms-validation/bootstrap/src/bs-form-config.schema.ts
6112
- import { z as z46 } from "zod";
6438
+ import { z as z48 } from "zod";
6113
6439
  var containerSchemas2 = createContainerSchemas({
6114
6440
  leafFieldSchema: BsLeafFieldSchema
6115
6441
  });
@@ -6118,210 +6444,225 @@ var BsRowFieldSchema = containerSchemas2.RowFieldSchema;
6118
6444
  var BsGroupFieldSchema = containerSchemas2.GroupFieldSchema;
6119
6445
  var BsArrayFieldSchema = containerSchemas2.ArrayFieldSchema;
6120
6446
  var BsFieldSchema = containerSchemas2.AllFieldsSchema;
6121
- var BsFormDefaultPropsSchema = z46.object({
6447
+ var BsFormDefaultPropsSchema = z48.object({
6122
6448
  size: BsSizeSchema.optional(),
6123
- floatingLabel: z46.boolean().optional()
6449
+ floatingLabel: z48.boolean().optional()
6124
6450
  });
6125
6451
  var BsFormConfigSchema = createFormConfigSchema(BsFieldSchema, BsFormDefaultPropsSchema);
6126
6452
 
6127
6453
  // internal/dynamic-forms-validation/primeng/src/props/index.ts
6128
- import { z as z47 } from "zod";
6129
- var PrimeSeveritySchema = z47.enum(["primary", "secondary", "success", "info", "warn", "danger", "help", "contrast"]);
6130
- var PrimeCommonPropsSchema = z47.object({
6131
- styleClass: z47.string().optional(),
6454
+ import { z as z49 } from "zod";
6455
+ var PrimeSeveritySchema = z49.enum(["primary", "secondary", "success", "info", "warn", "danger", "help", "contrast"]);
6456
+ var PrimeCommonPropsSchema = z49.object({
6457
+ styleClass: z49.string().optional(),
6132
6458
  hint: DynamicTextSchema.optional()
6133
6459
  });
6134
6460
  var PrimeInputPropsSchema = PrimeCommonPropsSchema.extend({
6135
- type: z47.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
6461
+ type: z49.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
6136
6462
  placeholder: DynamicTextSchema.optional(),
6137
- size: z47.enum(["small", "large"]).optional(),
6138
- variant: z47.enum(["outlined", "filled"]).optional()
6463
+ size: z49.enum(["small", "large"]).optional(),
6464
+ variant: z49.enum(["outlined", "filled"]).optional()
6139
6465
  });
6140
6466
  var PrimeCheckboxPropsSchema = PrimeCommonPropsSchema.extend({
6141
- binary: z47.boolean().optional(),
6142
- trueValue: z47.unknown().optional(),
6143
- falseValue: z47.unknown().optional()
6467
+ binary: z49.boolean().optional(),
6468
+ trueValue: z49.unknown().optional(),
6469
+ falseValue: z49.unknown().optional()
6144
6470
  });
6145
6471
  var PrimeRadioPropsSchema = PrimeCommonPropsSchema.extend({
6146
- name: z47.string().optional()
6472
+ name: z49.string().optional()
6147
6473
  });
6148
6474
  var PrimeSelectPropsSchema = PrimeCommonPropsSchema.extend({
6149
- multiple: z47.boolean().optional(),
6150
- filter: z47.boolean().optional(),
6475
+ multiple: z49.boolean().optional(),
6476
+ filter: z49.boolean().optional(),
6151
6477
  placeholder: DynamicTextSchema.optional(),
6152
- showClear: z47.boolean().optional()
6478
+ showClear: z49.boolean().optional()
6153
6479
  });
6154
6480
  var PrimeMultiCheckboxPropsSchema = PrimeCommonPropsSchema;
6155
6481
  var PrimeDatepickerPropsSchema = PrimeCommonPropsSchema.extend({
6156
- dateFormat: z47.string().optional(),
6157
- inline: z47.boolean().optional(),
6158
- showIcon: z47.boolean().optional(),
6159
- showButtonBar: z47.boolean().optional(),
6160
- selectionMode: z47.enum(["single", "multiple", "range"]).optional(),
6161
- touchUI: z47.boolean().optional(),
6162
- view: z47.enum(["date", "month", "year"]).optional(),
6482
+ dateFormat: z49.string().optional(),
6483
+ inline: z49.boolean().optional(),
6484
+ showIcon: z49.boolean().optional(),
6485
+ showButtonBar: z49.boolean().optional(),
6486
+ selectionMode: z49.enum(["single", "multiple", "range"]).optional(),
6487
+ touchUI: z49.boolean().optional(),
6488
+ view: z49.enum(["date", "month", "year"]).optional(),
6163
6489
  placeholder: DynamicTextSchema.optional()
6164
6490
  });
6165
6491
  var PrimeTextareaPropsSchema = PrimeCommonPropsSchema.extend({
6166
- rows: z47.number().positive().optional(),
6167
- autoResize: z47.boolean().optional(),
6492
+ rows: z49.number().positive().optional(),
6493
+ autoResize: z49.boolean().optional(),
6168
6494
  placeholder: DynamicTextSchema.optional()
6169
6495
  });
6170
6496
  var PrimeSliderPropsSchema = PrimeCommonPropsSchema.extend({
6171
- min: z47.number().optional(),
6172
- max: z47.number().optional(),
6173
- step: z47.number().positive().optional(),
6174
- range: z47.boolean().optional(),
6175
- orientation: z47.enum(["horizontal", "vertical"]).optional()
6497
+ min: z49.number().optional(),
6498
+ max: z49.number().optional(),
6499
+ step: z49.number().positive().optional(),
6500
+ range: z49.boolean().optional(),
6501
+ orientation: z49.enum(["horizontal", "vertical"]).optional()
6176
6502
  });
6177
6503
  var PrimeTogglePropsSchema = PrimeCommonPropsSchema;
6178
- var PrimeButtonPropsSchema = z47.object({
6504
+ var PrimeButtonPropsSchema = z49.object({
6179
6505
  severity: PrimeSeveritySchema.optional(),
6180
- text: z47.boolean().optional(),
6181
- outlined: z47.boolean().optional(),
6182
- raised: z47.boolean().optional(),
6183
- rounded: z47.boolean().optional(),
6184
- icon: z47.string().optional(),
6185
- iconPos: z47.enum(["left", "right", "top", "bottom"]).optional(),
6186
- type: z47.enum(["button", "submit", "reset"]).optional()
6506
+ text: z49.boolean().optional(),
6507
+ outlined: z49.boolean().optional(),
6508
+ raised: z49.boolean().optional(),
6509
+ rounded: z49.boolean().optional(),
6510
+ icon: z49.string().optional(),
6511
+ iconPos: z49.enum(["left", "right", "top", "bottom"]).optional(),
6512
+ type: z49.enum(["button", "submit", "reset"]).optional()
6187
6513
  });
6188
6514
 
6189
6515
  // internal/dynamic-forms-validation/primeng/src/fields/index.ts
6190
- import { z as z48 } from "zod";
6516
+ import { z as z50 } from "zod";
6191
6517
  var PrimeValueFieldBase = BaseFieldDefSchema.merge(FieldWithValidationSchema);
6192
6518
  var PrimeInputFieldSchemaObject = PrimeValueFieldBase.extend({
6193
- type: z48.literal("input"),
6194
- nullable: z48.boolean().optional(),
6195
- value: z48.string().nullable().optional(),
6519
+ type: z50.literal("input"),
6520
+ nullable: z50.boolean().optional(),
6521
+ value: z50.string().nullable().optional(),
6196
6522
  placeholder: DynamicTextSchema.optional(),
6197
6523
  props: PrimeInputPropsSchema.optional()
6198
6524
  });
6199
6525
  var PrimeInputFieldSchema = PrimeInputFieldSchemaObject.superRefine(nullableValueRefine);
6200
6526
  var PrimeCheckboxFieldSchema = PrimeValueFieldBase.extend({
6201
- type: z48.literal("checkbox"),
6202
- value: z48.boolean().optional(),
6527
+ type: z50.literal("checkbox"),
6528
+ value: z50.boolean().optional(),
6203
6529
  placeholder: DynamicTextSchema.optional(),
6204
6530
  props: PrimeCheckboxPropsSchema.optional()
6205
6531
  });
6206
6532
  var PrimeRadioFieldSchemaObject = PrimeValueFieldBase.extend({
6207
- type: z48.literal("radio"),
6208
- nullable: z48.boolean().optional(),
6209
- value: z48.unknown().nullable().optional(),
6533
+ type: z50.literal("radio"),
6534
+ nullable: z50.boolean().optional(),
6535
+ value: z50.unknown().nullable().optional(),
6210
6536
  placeholder: DynamicTextSchema.optional(),
6211
6537
  options: FieldOptionsSchema,
6212
6538
  props: PrimeRadioPropsSchema.optional()
6213
6539
  });
6214
6540
  var PrimeRadioFieldSchema = PrimeRadioFieldSchemaObject.superRefine(nullableValueRefine);
6215
6541
  var PrimeSelectFieldSchemaObject = PrimeValueFieldBase.extend({
6216
- type: z48.literal("select"),
6217
- nullable: z48.boolean().optional(),
6218
- value: z48.unknown().nullable().optional(),
6542
+ type: z50.literal("select"),
6543
+ nullable: z50.boolean().optional(),
6544
+ value: z50.unknown().nullable().optional(),
6219
6545
  placeholder: DynamicTextSchema.optional(),
6220
6546
  options: FieldOptionsSchema,
6221
6547
  props: PrimeSelectPropsSchema.optional()
6222
6548
  });
6223
6549
  var PrimeSelectFieldSchema = PrimeSelectFieldSchemaObject.superRefine(nullableValueRefine);
6224
6550
  var PrimeMultiCheckboxFieldSchemaObject = PrimeValueFieldBase.extend({
6225
- type: z48.literal("multi-checkbox"),
6226
- nullable: z48.boolean().optional(),
6227
- value: z48.array(z48.unknown()).nullable().optional(),
6551
+ type: z50.literal("multi-checkbox"),
6552
+ nullable: z50.boolean().optional(),
6553
+ value: z50.array(z50.unknown()).nullable().optional(),
6228
6554
  placeholder: DynamicTextSchema.optional(),
6229
6555
  options: FieldOptionsSchema,
6230
6556
  props: PrimeMultiCheckboxPropsSchema.optional()
6231
6557
  });
6232
6558
  var PrimeMultiCheckboxFieldSchema = PrimeMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
6233
6559
  var PrimeDatepickerFieldSchemaObject = PrimeValueFieldBase.extend({
6234
- type: z48.literal("datepicker"),
6235
- nullable: z48.boolean().optional(),
6236
- value: z48.union([z48.string(), z48.null()]).optional(),
6237
- minDate: z48.union([z48.string(), z48.null()]).optional(),
6238
- maxDate: z48.union([z48.string(), z48.null()]).optional(),
6239
- startAt: z48.union([z48.string(), z48.null()]).optional(),
6560
+ type: z50.literal("datepicker"),
6561
+ nullable: z50.boolean().optional(),
6562
+ value: z50.union([z50.string(), z50.null()]).optional(),
6563
+ minDate: z50.union([z50.string(), z50.null()]).optional(),
6564
+ maxDate: z50.union([z50.string(), z50.null()]).optional(),
6565
+ startAt: z50.union([z50.string(), z50.null()]).optional(),
6240
6566
  placeholder: DynamicTextSchema.optional(),
6241
6567
  props: PrimeDatepickerPropsSchema.optional()
6242
6568
  });
6243
6569
  var PrimeDatepickerFieldSchema = PrimeDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
6244
6570
  var PrimeTextareaFieldSchemaObject = PrimeValueFieldBase.extend({
6245
- type: z48.literal("textarea"),
6246
- nullable: z48.boolean().optional(),
6247
- value: z48.string().nullable().optional(),
6571
+ type: z50.literal("textarea"),
6572
+ nullable: z50.boolean().optional(),
6573
+ value: z50.string().nullable().optional(),
6248
6574
  placeholder: DynamicTextSchema.optional(),
6249
6575
  props: PrimeTextareaPropsSchema.optional()
6250
6576
  });
6251
6577
  var PrimeTextareaFieldSchema = PrimeTextareaFieldSchemaObject.superRefine(nullableValueRefine);
6252
6578
  var PrimeSliderFieldSchemaObject = PrimeValueFieldBase.extend({
6253
- type: z48.literal("slider"),
6254
- nullable: z48.boolean().optional(),
6255
- value: z48.number().nullable().optional(),
6256
- minValue: z48.number().optional(),
6257
- maxValue: z48.number().optional(),
6258
- step: z48.number().positive().optional(),
6579
+ type: z50.literal("slider"),
6580
+ nullable: z50.boolean().optional(),
6581
+ value: z50.number().nullable().optional(),
6582
+ minValue: z50.number().optional(),
6583
+ maxValue: z50.number().optional(),
6584
+ step: z50.number().positive().optional(),
6259
6585
  placeholder: DynamicTextSchema.optional(),
6260
6586
  props: PrimeSliderPropsSchema.optional()
6261
6587
  });
6262
6588
  var PrimeSliderFieldSchema = PrimeSliderFieldSchemaObject.superRefine(nullableValueRefine);
6263
6589
  var PrimeToggleFieldSchema = PrimeValueFieldBase.extend({
6264
- type: z48.literal("toggle"),
6265
- value: z48.boolean().optional(),
6590
+ type: z50.literal("toggle"),
6591
+ value: z50.boolean().optional(),
6266
6592
  placeholder: DynamicTextSchema.optional(),
6267
6593
  props: PrimeTogglePropsSchema.optional()
6268
6594
  });
6269
6595
  var PrimeButtonFieldSchema = BaseFieldDefSchema.extend({
6270
- type: z48.literal("button"),
6271
- event: z48.string().optional(),
6272
- eventArgs: z48.array(z48.union([z48.string(), z48.number(), z48.boolean(), z48.null(), z48.undefined()])).optional(),
6596
+ type: z50.literal("button"),
6597
+ event: z50.string().optional(),
6598
+ eventArgs: z50.array(z50.union([z50.string(), z50.number(), z50.boolean(), z50.null(), z50.undefined()])).optional(),
6273
6599
  props: PrimeButtonPropsSchema.optional(),
6274
6600
  logic: LogicArraySchema.optional()
6275
6601
  });
6276
6602
  var PrimeSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
6277
- type: z48.literal("submit"),
6603
+ type: z50.literal("submit"),
6278
6604
  props: PrimeButtonPropsSchema.optional(),
6279
6605
  logic: LogicArraySchema.optional()
6280
6606
  });
6281
6607
  var PrimeNextButtonFieldSchema = BaseFieldDefSchema.extend({
6282
- type: z48.literal("next"),
6608
+ type: z50.literal("next"),
6283
6609
  props: PrimeButtonPropsSchema.optional(),
6284
6610
  logic: LogicArraySchema.optional()
6285
6611
  });
6286
6612
  var PrimePreviousButtonFieldSchema = BaseFieldDefSchema.extend({
6287
- type: z48.literal("previous"),
6613
+ type: z50.literal("previous"),
6288
6614
  props: PrimeButtonPropsSchema.optional()
6289
6615
  });
6290
6616
  var PrimeAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6291
- type: z48.literal("add-array-item"),
6292
- arrayKey: z48.string().optional(),
6617
+ /**
6618
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6619
+ * item, or a list of them for an object item.
6620
+ */
6621
+ template: ArrayItemTemplateSchema,
6622
+ type: z50.literal("add-array-item"),
6623
+ arrayKey: z50.string().optional(),
6293
6624
  props: PrimeButtonPropsSchema.optional()
6294
6625
  });
6295
6626
  var PrimeRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6296
- type: z48.literal("remove-array-item"),
6297
- arrayKey: z48.string().optional(),
6627
+ type: z50.literal("remove-array-item"),
6628
+ arrayKey: z50.string().optional(),
6298
6629
  props: PrimeButtonPropsSchema.optional()
6299
6630
  });
6300
6631
  var PrimePrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6301
- type: z48.literal("prepend-array-item"),
6302
- arrayKey: z48.string().optional(),
6632
+ /**
6633
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6634
+ * item, or a list of them for an object item.
6635
+ */
6636
+ template: ArrayItemTemplateSchema,
6637
+ type: z50.literal("prepend-array-item"),
6638
+ arrayKey: z50.string().optional(),
6303
6639
  props: PrimeButtonPropsSchema.optional()
6304
6640
  });
6305
6641
  var PrimeInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6306
- type: z48.literal("insert-array-item"),
6307
- arrayKey: z48.string().optional(),
6308
- index: z48.number(),
6642
+ /**
6643
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6644
+ * item, or a list of them for an object item.
6645
+ */
6646
+ template: ArrayItemTemplateSchema,
6647
+ type: z50.literal("insert-array-item"),
6648
+ arrayKey: z50.string().optional(),
6649
+ index: z50.number(),
6309
6650
  props: PrimeButtonPropsSchema.optional()
6310
6651
  });
6311
6652
  var PrimePopArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6312
- type: z48.literal("pop-array-item"),
6313
- arrayKey: z48.string(),
6653
+ type: z50.literal("pop-array-item"),
6654
+ arrayKey: z50.string(),
6314
6655
  props: PrimeButtonPropsSchema.optional()
6315
6656
  });
6316
6657
  var PrimeShiftArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6317
- type: z48.literal("shift-array-item"),
6318
- arrayKey: z48.string(),
6658
+ type: z50.literal("shift-array-item"),
6659
+ arrayKey: z50.string(),
6319
6660
  props: PrimeButtonPropsSchema.optional()
6320
6661
  });
6321
6662
 
6322
6663
  // internal/dynamic-forms-validation/primeng/src/prime-leaf-field.schema.ts
6323
- import { z as z49 } from "zod";
6324
- var PrimeLeafFieldSchema = z49.discriminatedUnion("type", [
6664
+ import { z as z51 } from "zod";
6665
+ var PrimeLeafFieldSchema = z51.discriminatedUnion("type", [
6325
6666
  TextFieldSchema,
6326
6667
  HiddenFieldSchema,
6327
6668
  PrimeInputFieldSchemaObject,
@@ -6346,7 +6687,7 @@ var PrimeLeafFieldSchema = z49.discriminatedUnion("type", [
6346
6687
  ]).superRefine(nullableValueRefine);
6347
6688
 
6348
6689
  // internal/dynamic-forms-validation/primeng/src/prime-form-config.schema.ts
6349
- import { z as z50 } from "zod";
6690
+ import { z as z52 } from "zod";
6350
6691
  var containerSchemas3 = createContainerSchemas({
6351
6692
  leafFieldSchema: PrimeLeafFieldSchema
6352
6693
  });
@@ -6355,252 +6696,267 @@ var PrimeRowFieldSchema = containerSchemas3.RowFieldSchema;
6355
6696
  var PrimeGroupFieldSchema = containerSchemas3.GroupFieldSchema;
6356
6697
  var PrimeArrayFieldSchema = containerSchemas3.ArrayFieldSchema;
6357
6698
  var PrimeFieldSchema = containerSchemas3.AllFieldsSchema;
6358
- var PrimeFormDefaultPropsSchema = z50.object({
6359
- styleClass: z50.string().optional()
6699
+ var PrimeFormDefaultPropsSchema = z52.object({
6700
+ styleClass: z52.string().optional()
6360
6701
  });
6361
6702
  var PrimeFormConfigSchema = createFormConfigSchema(PrimeFieldSchema, PrimeFormDefaultPropsSchema);
6362
6703
 
6363
6704
  // internal/dynamic-forms-validation/ionic/src/props/index.ts
6364
- import { z as z51 } from "zod";
6365
- var IonicColorSchema = z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", "dark"]);
6366
- var IonicLabelPlacementSchema = z51.enum(["start", "end", "fixed", "stacked", "floating"]);
6367
- var IonicJustifySchema = z51.enum(["start", "end", "space-between"]);
6368
- var IonicFillSchema = z51.enum(["solid", "outline", "clear", "default"]);
6369
- var IonicInputPropsSchema = z51.object({
6370
- fill: z51.enum(["solid", "outline"]).optional(),
6371
- shape: z51.literal("round").optional(),
6705
+ import { z as z53 } from "zod";
6706
+ var IonicColorSchema = z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", "dark"]);
6707
+ var IonicLabelPlacementSchema = z53.enum(["start", "end", "fixed", "stacked", "floating"]);
6708
+ var IonicJustifySchema = z53.enum(["start", "end", "space-between"]);
6709
+ var IonicFillSchema = z53.enum(["solid", "outline", "clear", "default"]);
6710
+ var IonicInputPropsSchema = z53.object({
6711
+ fill: z53.enum(["solid", "outline"]).optional(),
6712
+ shape: z53.literal("round").optional(),
6372
6713
  labelPlacement: IonicLabelPlacementSchema.optional(),
6373
6714
  color: IonicColorSchema.optional(),
6374
6715
  hint: DynamicTextSchema.optional(),
6375
6716
  errorText: DynamicTextSchema.optional(),
6376
- counter: z51.boolean().optional(),
6377
- clearInput: z51.boolean().optional(),
6378
- type: z51.enum(["text", "email", "password", "number", "tel", "url", "search"]).optional(),
6717
+ counter: z53.boolean().optional(),
6718
+ clearInput: z53.boolean().optional(),
6719
+ type: z53.enum(["text", "email", "password", "number", "tel", "url", "search"]).optional(),
6379
6720
  placeholder: DynamicTextSchema.optional()
6380
6721
  });
6381
- var IonicCheckboxPropsSchema = z51.object({
6382
- labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
6722
+ var IonicCheckboxPropsSchema = z53.object({
6723
+ labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6383
6724
  justify: IonicJustifySchema.optional(),
6384
- color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6385
- indeterminate: z51.boolean().optional(),
6725
+ color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6726
+ indeterminate: z53.boolean().optional(),
6386
6727
  hint: DynamicTextSchema.optional()
6387
6728
  });
6388
- var IonicRadioPropsSchema = z51.object({
6389
- labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
6729
+ var IonicRadioPropsSchema = z53.object({
6730
+ labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6390
6731
  justify: IonicJustifySchema.optional(),
6391
- color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6732
+ color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6392
6733
  hint: DynamicTextSchema.optional()
6393
6734
  });
6394
- var IonicTogglePropsSchema = z51.object({
6395
- labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
6735
+ var IonicTogglePropsSchema = z53.object({
6736
+ labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6396
6737
  justify: IonicJustifySchema.optional(),
6397
- color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6398
- enableOnOffLabels: z51.boolean().optional(),
6738
+ color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6739
+ enableOnOffLabels: z53.boolean().optional(),
6399
6740
  hint: DynamicTextSchema.optional()
6400
6741
  });
6401
- var IonicSliderPropsSchema = z51.object({
6402
- min: z51.number().optional(),
6403
- max: z51.number().optional(),
6404
- step: z51.number().positive().optional(),
6405
- dualKnobs: z51.boolean().optional(),
6406
- pin: z51.boolean().optional(),
6407
- ticks: z51.boolean().optional(),
6408
- snaps: z51.boolean().optional(),
6409
- color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6410
- labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
6742
+ var IonicSliderPropsSchema = z53.object({
6743
+ min: z53.number().optional(),
6744
+ max: z53.number().optional(),
6745
+ step: z53.number().positive().optional(),
6746
+ dualKnobs: z53.boolean().optional(),
6747
+ pin: z53.boolean().optional(),
6748
+ ticks: z53.boolean().optional(),
6749
+ snaps: z53.boolean().optional(),
6750
+ color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6751
+ labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6411
6752
  hint: DynamicTextSchema.optional()
6412
6753
  });
6413
- var IonicDatepickerPropsSchema = z51.object({
6414
- presentation: z51.enum(["date", "date-time", "time", "time-date", "month", "month-year", "year"]).optional(),
6415
- multiple: z51.boolean().optional(),
6416
- preferWheel: z51.boolean().optional(),
6417
- showDefaultButtons: z51.boolean().optional(),
6418
- showDefaultTitle: z51.boolean().optional(),
6419
- showDefaultTimeLabel: z51.boolean().optional(),
6420
- showClearButton: z51.boolean().optional(),
6421
- doneText: z51.string().optional(),
6422
- cancelText: z51.string().optional(),
6423
- size: z51.enum(["cover", "fixed"]).optional(),
6424
- color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6754
+ var IonicDatepickerPropsSchema = z53.object({
6755
+ presentation: z53.enum(["date", "date-time", "time", "time-date", "month", "month-year", "year"]).optional(),
6756
+ multiple: z53.boolean().optional(),
6757
+ preferWheel: z53.boolean().optional(),
6758
+ showDefaultButtons: z53.boolean().optional(),
6759
+ showDefaultTitle: z53.boolean().optional(),
6760
+ showDefaultTimeLabel: z53.boolean().optional(),
6761
+ showClearButton: z53.boolean().optional(),
6762
+ doneText: z53.string().optional(),
6763
+ cancelText: z53.string().optional(),
6764
+ size: z53.enum(["cover", "fixed"]).optional(),
6765
+ color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6425
6766
  hint: DynamicTextSchema.optional(),
6426
6767
  placeholder: DynamicTextSchema.optional()
6427
6768
  });
6428
- var IonicSelectPropsSchema = z51.object({
6429
- multiple: z51.boolean().optional(),
6430
- interface: z51.enum(["action-sheet", "popover", "alert"]).optional(),
6431
- cancelText: z51.string().optional(),
6432
- okText: z51.string().optional(),
6769
+ var IonicSelectPropsSchema = z53.object({
6770
+ multiple: z53.boolean().optional(),
6771
+ interface: z53.enum(["action-sheet", "popover", "alert"]).optional(),
6772
+ cancelText: z53.string().optional(),
6773
+ okText: z53.string().optional(),
6433
6774
  placeholder: DynamicTextSchema.optional(),
6434
- fill: z51.enum(["solid", "outline"]).optional(),
6435
- shape: z51.literal("round").optional(),
6775
+ fill: z53.enum(["solid", "outline"]).optional(),
6776
+ shape: z53.literal("round").optional(),
6436
6777
  labelPlacement: IonicLabelPlacementSchema.optional(),
6437
- color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6778
+ color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6438
6779
  hint: DynamicTextSchema.optional()
6439
6780
  });
6440
- var IonicTextareaPropsSchema = z51.object({
6441
- rows: z51.number().positive().optional(),
6442
- autoGrow: z51.boolean().optional(),
6443
- counter: z51.boolean().optional(),
6444
- fill: z51.enum(["solid", "outline"]).optional(),
6445
- shape: z51.literal("round").optional(),
6781
+ var IonicTextareaPropsSchema = z53.object({
6782
+ rows: z53.number().positive().optional(),
6783
+ autoGrow: z53.boolean().optional(),
6784
+ counter: z53.boolean().optional(),
6785
+ fill: z53.enum(["solid", "outline"]).optional(),
6786
+ shape: z53.literal("round").optional(),
6446
6787
  labelPlacement: IonicLabelPlacementSchema.optional(),
6447
6788
  hint: DynamicTextSchema.optional(),
6448
6789
  errorText: DynamicTextSchema.optional(),
6449
6790
  color: IonicColorSchema.optional(),
6450
6791
  placeholder: DynamicTextSchema.optional()
6451
6792
  });
6452
- var IonicMultiCheckboxPropsSchema = z51.object({
6453
- labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
6793
+ var IonicMultiCheckboxPropsSchema = z53.object({
6794
+ labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6454
6795
  justify: IonicJustifySchema.optional(),
6455
- color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6796
+ color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6456
6797
  hint: DynamicTextSchema.optional()
6457
6798
  });
6458
- var IonicButtonPropsSchema = z51.object({
6459
- expand: z51.enum(["full", "block"]).optional(),
6799
+ var IonicButtonPropsSchema = z53.object({
6800
+ expand: z53.enum(["full", "block"]).optional(),
6460
6801
  fill: IonicFillSchema.optional(),
6461
- shape: z51.literal("round").optional(),
6462
- size: z51.enum(["small", "default", "large"]).optional(),
6802
+ shape: z53.literal("round").optional(),
6803
+ size: z53.enum(["small", "default", "large"]).optional(),
6463
6804
  color: IonicColorSchema.optional(),
6464
- strong: z51.boolean().optional(),
6465
- type: z51.enum(["button", "submit", "reset"]).optional()
6805
+ strong: z53.boolean().optional(),
6806
+ type: z53.enum(["button", "submit", "reset"]).optional()
6466
6807
  });
6467
6808
 
6468
6809
  // internal/dynamic-forms-validation/ionic/src/fields/index.ts
6469
- import { z as z52 } from "zod";
6810
+ import { z as z54 } from "zod";
6470
6811
  var IonicValueFieldBase = BaseFieldDefSchema.merge(FieldWithValidationSchema);
6471
6812
  var IonicInputFieldSchemaObject = IonicValueFieldBase.extend({
6472
- type: z52.literal("input"),
6473
- nullable: z52.boolean().optional(),
6474
- value: z52.string().nullable().optional(),
6813
+ type: z54.literal("input"),
6814
+ nullable: z54.boolean().optional(),
6815
+ value: z54.string().nullable().optional(),
6475
6816
  placeholder: DynamicTextSchema.optional(),
6476
6817
  props: IonicInputPropsSchema.optional()
6477
6818
  });
6478
6819
  var IonicInputFieldSchema = IonicInputFieldSchemaObject.superRefine(nullableValueRefine);
6479
6820
  var IonicCheckboxFieldSchema = IonicValueFieldBase.extend({
6480
- type: z52.literal("checkbox"),
6481
- value: z52.boolean().optional(),
6821
+ type: z54.literal("checkbox"),
6822
+ value: z54.boolean().optional(),
6482
6823
  placeholder: DynamicTextSchema.optional(),
6483
6824
  props: IonicCheckboxPropsSchema.optional()
6484
6825
  });
6485
6826
  var IonicRadioFieldSchemaObject = IonicValueFieldBase.extend({
6486
- type: z52.literal("radio"),
6487
- nullable: z52.boolean().optional(),
6488
- value: z52.unknown().nullable().optional(),
6827
+ type: z54.literal("radio"),
6828
+ nullable: z54.boolean().optional(),
6829
+ value: z54.unknown().nullable().optional(),
6489
6830
  placeholder: DynamicTextSchema.optional(),
6490
6831
  options: FieldOptionsSchema,
6491
6832
  props: IonicRadioPropsSchema.optional()
6492
6833
  });
6493
6834
  var IonicRadioFieldSchema = IonicRadioFieldSchemaObject.superRefine(nullableValueRefine);
6494
6835
  var IonicToggleFieldSchema = IonicValueFieldBase.extend({
6495
- type: z52.literal("toggle"),
6496
- value: z52.boolean().optional(),
6836
+ type: z54.literal("toggle"),
6837
+ value: z54.boolean().optional(),
6497
6838
  placeholder: DynamicTextSchema.optional(),
6498
6839
  props: IonicTogglePropsSchema.optional()
6499
6840
  });
6500
6841
  var IonicSliderFieldSchemaObject = IonicValueFieldBase.extend({
6501
- type: z52.literal("slider"),
6502
- nullable: z52.boolean().optional(),
6503
- value: z52.number().nullable().optional(),
6504
- minValue: z52.number().optional(),
6505
- maxValue: z52.number().optional(),
6506
- step: z52.number().positive().optional(),
6842
+ type: z54.literal("slider"),
6843
+ nullable: z54.boolean().optional(),
6844
+ value: z54.number().nullable().optional(),
6845
+ minValue: z54.number().optional(),
6846
+ maxValue: z54.number().optional(),
6847
+ step: z54.number().positive().optional(),
6507
6848
  placeholder: DynamicTextSchema.optional(),
6508
6849
  props: IonicSliderPropsSchema.optional()
6509
6850
  });
6510
6851
  var IonicSliderFieldSchema = IonicSliderFieldSchemaObject.superRefine(nullableValueRefine);
6511
6852
  var IonicDatepickerFieldSchemaObject = IonicValueFieldBase.extend({
6512
- type: z52.literal("datepicker"),
6513
- nullable: z52.boolean().optional(),
6514
- value: z52.union([z52.string(), z52.null()]).optional(),
6515
- minDate: z52.union([z52.string(), z52.null()]).optional(),
6516
- maxDate: z52.union([z52.string(), z52.null()]).optional(),
6517
- startAt: z52.union([z52.string(), z52.null()]).optional(),
6853
+ type: z54.literal("datepicker"),
6854
+ nullable: z54.boolean().optional(),
6855
+ value: z54.union([z54.string(), z54.null()]).optional(),
6856
+ minDate: z54.union([z54.string(), z54.null()]).optional(),
6857
+ maxDate: z54.union([z54.string(), z54.null()]).optional(),
6858
+ startAt: z54.union([z54.string(), z54.null()]).optional(),
6518
6859
  placeholder: DynamicTextSchema.optional(),
6519
6860
  props: IonicDatepickerPropsSchema.optional()
6520
6861
  });
6521
6862
  var IonicDatepickerFieldSchema = IonicDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
6522
6863
  var IonicSelectFieldSchemaObject = IonicValueFieldBase.extend({
6523
- type: z52.literal("select"),
6524
- nullable: z52.boolean().optional(),
6525
- value: z52.unknown().nullable().optional(),
6864
+ type: z54.literal("select"),
6865
+ nullable: z54.boolean().optional(),
6866
+ value: z54.unknown().nullable().optional(),
6526
6867
  placeholder: DynamicTextSchema.optional(),
6527
6868
  options: FieldOptionsSchema,
6528
6869
  props: IonicSelectPropsSchema.optional()
6529
6870
  });
6530
6871
  var IonicSelectFieldSchema = IonicSelectFieldSchemaObject.superRefine(nullableValueRefine);
6531
6872
  var IonicTextareaFieldSchemaObject = IonicValueFieldBase.extend({
6532
- type: z52.literal("textarea"),
6533
- nullable: z52.boolean().optional(),
6534
- value: z52.string().nullable().optional(),
6873
+ type: z54.literal("textarea"),
6874
+ nullable: z54.boolean().optional(),
6875
+ value: z54.string().nullable().optional(),
6535
6876
  placeholder: DynamicTextSchema.optional(),
6536
6877
  props: IonicTextareaPropsSchema.optional()
6537
6878
  });
6538
6879
  var IonicTextareaFieldSchema = IonicTextareaFieldSchemaObject.superRefine(nullableValueRefine);
6539
6880
  var IonicMultiCheckboxFieldSchemaObject = IonicValueFieldBase.extend({
6540
- type: z52.literal("multi-checkbox"),
6541
- nullable: z52.boolean().optional(),
6542
- value: z52.array(z52.unknown()).nullable().optional(),
6881
+ type: z54.literal("multi-checkbox"),
6882
+ nullable: z54.boolean().optional(),
6883
+ value: z54.array(z54.unknown()).nullable().optional(),
6543
6884
  placeholder: DynamicTextSchema.optional(),
6544
6885
  options: FieldOptionsSchema,
6545
6886
  props: IonicMultiCheckboxPropsSchema.optional()
6546
6887
  });
6547
6888
  var IonicMultiCheckboxFieldSchema = IonicMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
6548
6889
  var IonicButtonFieldSchema = BaseFieldDefSchema.extend({
6549
- type: z52.literal("button"),
6550
- event: z52.string().optional(),
6551
- eventArgs: z52.array(z52.union([z52.string(), z52.number(), z52.boolean(), z52.null(), z52.undefined()])).optional(),
6890
+ type: z54.literal("button"),
6891
+ event: z54.string().optional(),
6892
+ eventArgs: z54.array(z54.union([z54.string(), z54.number(), z54.boolean(), z54.null(), z54.undefined()])).optional(),
6552
6893
  props: IonicButtonPropsSchema.optional(),
6553
6894
  logic: LogicArraySchema.optional()
6554
6895
  });
6555
6896
  var IonicSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
6556
- type: z52.literal("submit"),
6897
+ type: z54.literal("submit"),
6557
6898
  props: IonicButtonPropsSchema.optional(),
6558
6899
  logic: LogicArraySchema.optional()
6559
6900
  });
6560
6901
  var IonicNextButtonFieldSchema = BaseFieldDefSchema.extend({
6561
- type: z52.literal("next"),
6902
+ type: z54.literal("next"),
6562
6903
  props: IonicButtonPropsSchema.optional(),
6563
6904
  logic: LogicArraySchema.optional()
6564
6905
  });
6565
6906
  var IonicPreviousButtonFieldSchema = BaseFieldDefSchema.extend({
6566
- type: z52.literal("previous"),
6907
+ type: z54.literal("previous"),
6567
6908
  props: IonicButtonPropsSchema.optional()
6568
6909
  });
6569
6910
  var IonicAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6570
- type: z52.literal("add-array-item"),
6571
- arrayKey: z52.string().optional(),
6911
+ /**
6912
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6913
+ * item, or a list of them for an object item.
6914
+ */
6915
+ template: ArrayItemTemplateSchema,
6916
+ type: z54.literal("add-array-item"),
6917
+ arrayKey: z54.string().optional(),
6572
6918
  props: IonicButtonPropsSchema.optional()
6573
6919
  });
6574
6920
  var IonicRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6575
- type: z52.literal("remove-array-item"),
6576
- arrayKey: z52.string().optional(),
6921
+ type: z54.literal("remove-array-item"),
6922
+ arrayKey: z54.string().optional(),
6577
6923
  props: IonicButtonPropsSchema.optional()
6578
6924
  });
6579
6925
  var IonicPrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6580
- type: z52.literal("prepend-array-item"),
6581
- arrayKey: z52.string().optional(),
6926
+ /**
6927
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6928
+ * item, or a list of them for an object item.
6929
+ */
6930
+ template: ArrayItemTemplateSchema,
6931
+ type: z54.literal("prepend-array-item"),
6932
+ arrayKey: z54.string().optional(),
6582
6933
  props: IonicButtonPropsSchema.optional()
6583
6934
  });
6584
6935
  var IonicInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6585
- type: z52.literal("insert-array-item"),
6586
- arrayKey: z52.string().optional(),
6587
- index: z52.number(),
6936
+ /**
6937
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6938
+ * item, or a list of them for an object item.
6939
+ */
6940
+ template: ArrayItemTemplateSchema,
6941
+ type: z54.literal("insert-array-item"),
6942
+ arrayKey: z54.string().optional(),
6943
+ index: z54.number(),
6588
6944
  props: IonicButtonPropsSchema.optional()
6589
6945
  });
6590
6946
  var IonicPopArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6591
- type: z52.literal("pop-array-item"),
6592
- arrayKey: z52.string(),
6947
+ type: z54.literal("pop-array-item"),
6948
+ arrayKey: z54.string(),
6593
6949
  props: IonicButtonPropsSchema.optional()
6594
6950
  });
6595
6951
  var IonicShiftArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6596
- type: z52.literal("shift-array-item"),
6597
- arrayKey: z52.string(),
6952
+ type: z54.literal("shift-array-item"),
6953
+ arrayKey: z54.string(),
6598
6954
  props: IonicButtonPropsSchema.optional()
6599
6955
  });
6600
6956
 
6601
6957
  // internal/dynamic-forms-validation/ionic/src/ionic-leaf-field.schema.ts
6602
- import { z as z53 } from "zod";
6603
- var IonicLeafFieldSchema = z53.discriminatedUnion("type", [
6958
+ import { z as z55 } from "zod";
6959
+ var IonicLeafFieldSchema = z55.discriminatedUnion("type", [
6604
6960
  TextFieldSchema,
6605
6961
  HiddenFieldSchema,
6606
6962
  IonicInputFieldSchemaObject,
@@ -6625,7 +6981,7 @@ var IonicLeafFieldSchema = z53.discriminatedUnion("type", [
6625
6981
  ]).superRefine(nullableValueRefine);
6626
6982
 
6627
6983
  // internal/dynamic-forms-validation/ionic/src/ionic-form-config.schema.ts
6628
- import { z as z54 } from "zod";
6984
+ import { z as z56 } from "zod";
6629
6985
  var containerSchemas4 = createContainerSchemas({
6630
6986
  leafFieldSchema: IonicLeafFieldSchema
6631
6987
  });
@@ -6634,7 +6990,7 @@ var IonicRowFieldSchema = containerSchemas4.RowFieldSchema;
6634
6990
  var IonicGroupFieldSchema = containerSchemas4.GroupFieldSchema;
6635
6991
  var IonicArrayFieldSchema = containerSchemas4.ArrayFieldSchema;
6636
6992
  var IonicFieldSchema = containerSchemas4.AllFieldsSchema;
6637
- var IonicFormDefaultPropsSchema = z54.object({
6993
+ var IonicFormDefaultPropsSchema = z56.object({
6638
6994
  color: IonicColorSchema.optional(),
6639
6995
  labelPlacement: IonicLabelPlacementSchema.optional()
6640
6996
  });
@@ -6647,24 +7003,20 @@ var formConfigSchemas = {
6647
7003
  primeng: PrimeFormConfigSchema,
6648
7004
  ionic: IonicFormConfigSchema
6649
7005
  };
7006
+ function toJsonSchema(schema, name, basePath) {
7007
+ const jsonSchema = z57.toJSONSchema(schema, { target: "draft-7", io: "input", unrepresentable: "any" });
7008
+ jsonSchema["$id"] = basePath ? `${basePath.replace(/\/$/, "")}/${name}` : name;
7009
+ return jsonSchema;
7010
+ }
6650
7011
  function getFormConfigJsonSchema(uiIntegration, options = {}) {
6651
7012
  const schema = formConfigSchemas[uiIntegration];
6652
7013
  if (!schema) {
6653
7014
  throw new Error(`Unknown UI integration: ${uiIntegration}. Valid options: material, bootstrap, primeng, ionic`);
6654
7015
  }
6655
- const { name, basePath } = options;
6656
- const jsonSchema = zodToJsonSchema(schema, {
6657
- name: name ?? `${uiIntegration}FormConfig`,
6658
- basePath: basePath ? basePath.split("/") : void 0,
6659
- $refStrategy: "none",
6660
- // Inline all definitions for MCP compatibility
6661
- errorMessages: true
6662
- });
6663
- return jsonSchema;
7016
+ return toJsonSchema(schema, options.name ?? `${uiIntegration}FormConfig`, options.basePath);
6664
7017
  }
6665
7018
 
6666
7019
  // internal/dynamic-forms-validation/validate/src/json-schema/field-type-json-schemas.ts
6667
- import zodToJsonSchema2 from "zod-to-json-schema";
6668
7020
  var leafFieldSchemas = {
6669
7021
  material: MatLeafFieldSchema,
6670
7022
  bootstrap: BsLeafFieldSchema,
@@ -6759,53 +7111,41 @@ function getFieldTypeJsonSchema(uiIntegration, fieldType) {
6759
7111
  if (!schema) {
6760
7112
  throw new Error(`Unknown field type: ${fieldType}. Valid: ${getSupportedFieldTypes().join(", ")}`);
6761
7113
  }
6762
- const jsonSchema = zodToJsonSchema2(schema, {
6763
- name: `${uiIntegration}${fieldType.charAt(0).toUpperCase() + fieldType.slice(1)}Field`,
6764
- $refStrategy: "none",
6765
- errorMessages: true
6766
- });
6767
- return jsonSchema;
7114
+ return toJsonSchema(schema, `${uiIntegration}${fieldType.charAt(0).toUpperCase() + fieldType.slice(1)}Field`);
6768
7115
  }
6769
7116
  function getLeafFieldJsonSchema(uiIntegration) {
6770
7117
  const schema = leafFieldSchemas[uiIntegration];
6771
7118
  if (!schema) {
6772
7119
  throw new Error(`Unknown UI integration: ${uiIntegration}`);
6773
7120
  }
6774
- const jsonSchema = zodToJsonSchema2(schema, {
6775
- name: `${uiIntegration}LeafField`,
6776
- $refStrategy: "none",
6777
- errorMessages: true
6778
- });
6779
- return jsonSchema;
7121
+ return toJsonSchema(schema, `${uiIntegration}LeafField`);
6780
7122
  }
6781
7123
 
6782
7124
  // internal/dynamic-forms-validation/src/lib/schemas/field-type-names.ts
6783
- import { z as z55 } from "zod";
7125
+ import { z as z58 } from "zod";
6784
7126
  var MAX_DEPTH = 20;
6785
7127
  function collectDiscriminator(schema, into) {
6786
- if (schema instanceof z55.ZodLiteral) {
6787
- if (typeof schema.value === "string") into.add(schema.value);
7128
+ if (schema instanceof z58.ZodLiteral) {
7129
+ for (const value of schema.def.values) {
7130
+ if (typeof value === "string") into.add(value);
7131
+ }
6788
7132
  return;
6789
7133
  }
6790
- if (schema instanceof z55.ZodEnum) {
7134
+ if (schema instanceof z58.ZodEnum) {
6791
7135
  for (const value of schema.options) into.add(value);
6792
7136
  }
6793
7137
  }
6794
7138
  function visit(schema, into, depth) {
6795
7139
  if (depth > MAX_DEPTH) return;
6796
- if (schema instanceof z55.ZodLazy) {
6797
- visit(schema.schema, into, depth + 1);
7140
+ if (schema instanceof z58.ZodLazy) {
7141
+ visit(schema.unwrap(), into, depth + 1);
6798
7142
  return;
6799
7143
  }
6800
- if (schema instanceof z55.ZodEffects) {
6801
- visit(schema.innerType(), into, depth + 1);
6802
- return;
6803
- }
6804
- if (schema instanceof z55.ZodDiscriminatedUnion || schema instanceof z55.ZodUnion) {
7144
+ if (schema instanceof z58.ZodUnion) {
6805
7145
  for (const option of schema.options) visit(option, into, depth + 1);
6806
7146
  return;
6807
7147
  }
6808
- if (schema instanceof z55.ZodObject) {
7148
+ if (schema instanceof z58.ZodObject) {
6809
7149
  collectDiscriminator(schema.shape["type"], into);
6810
7150
  return;
6811
7151
  }
@@ -6878,14 +7218,14 @@ var DID_YOU_MEAN = {
6878
7218
  validation: "Did you mean to use validator shorthand (`required`, `email`, `min`, etc.) or `validators: [...]` array?"
6879
7219
  };
6880
7220
  function formatZodError(error, uiIntegration, config) {
6881
- const errors = error.errors.map((err) => {
7221
+ const errors = error.issues.map((err) => {
6882
7222
  const path = err.path.join(".") || "root";
6883
7223
  let message = err.message;
6884
7224
  let expected;
6885
7225
  let received;
6886
7226
  if ("expected" in err) expected = String(err.expected);
6887
7227
  if ("received" in err) received = String(err.received);
6888
- if (message === "Invalid input" || message === "Invalid union") {
7228
+ if (err.code === "invalid_union") {
6889
7229
  const fieldMatch = path.match(/fields\.(\d+)/);
6890
7230
  if (fieldMatch && config && typeof config === "object" && "fields" in config) {
6891
7231
  const fields = config.fields;
@@ -7016,121 +7356,31 @@ var FORBIDDEN_HIDDEN_PROPS = [
7016
7356
  "pattern",
7017
7357
  "placeholder"
7018
7358
  ];
7019
- var CONTAINER_FORBIDDEN_PROPS = ["validators", "required", "email", "min", "max", "minLength", "maxLength", "pattern", "value"];
7359
+ var CONTAINER_FORBIDDEN_PROPS = ["email", "min", "max", "pattern", "value"];
7360
+ var VALIDATING_CONTAINERS = ["group", "array"];
7361
+ var CONTAINER_VALIDATION_PROPS = ["validators", "required", "validationMessages"];
7362
+ var ARRAY_SIZE_PROPS = ["minLength", "maxLength"];
7020
7363
  var FIELDS_REQUIRING_OPTIONS = ["select", "radio", "multi-checkbox"];
7364
+ var CONTAINER_NESTING = {
7365
+ forbidden: ["page"],
7366
+ message: "Containers and rows cannot contain pages. ALL top-level fields must be pages if using multi-page mode."
7367
+ };
7021
7368
  var NESTING_RULES = {
7022
7369
  page: {
7023
- allowed: [
7024
- "row",
7025
- "group",
7026
- "array",
7027
- "input",
7028
- "textarea",
7029
- "select",
7030
- "checkbox",
7031
- "multi-checkbox",
7032
- "radio",
7033
- "datepicker",
7034
- "toggle",
7035
- "slider",
7036
- "hidden",
7037
- "text",
7038
- "button",
7039
- "submit",
7040
- "next",
7041
- "previous",
7042
- "add-array-item",
7043
- "prepend-array-item",
7044
- "insert-array-item",
7045
- "remove-array-item",
7046
- "pop-array-item",
7047
- "shift-array-item"
7048
- ],
7049
7370
  forbidden: ["page"],
7050
7371
  message: "Pages cannot be nested inside other containers. ALL top-level fields must be pages if using multi-page mode."
7051
7372
  },
7052
- row: {
7053
- allowed: [
7054
- "group",
7055
- "array",
7056
- "input",
7057
- "textarea",
7058
- "select",
7059
- "checkbox",
7060
- "multi-checkbox",
7061
- "radio",
7062
- "datepicker",
7063
- "toggle",
7064
- "slider",
7065
- "text",
7066
- "button",
7067
- "submit",
7068
- "next",
7069
- "previous",
7070
- "add-array-item",
7071
- "prepend-array-item",
7072
- "insert-array-item",
7073
- "remove-array-item",
7074
- "pop-array-item",
7075
- "shift-array-item"
7076
- ],
7077
- forbidden: ["page", "row", "hidden"],
7078
- message: "Rows cannot contain pages, other rows, or hidden fields. Hidden fields should be at page or form level."
7079
- },
7373
+ container: CONTAINER_NESTING,
7374
+ // A row resolves to a container at runtime, and the types say so outright:
7375
+ // `RowAllowedChildren` is an alias of `ContainerAllowedChildren`. Sharing the
7376
+ // entry keeps that an alias here too, rather than a fifth copy of the list
7377
+ // that can drift from the type it is derived from.
7378
+ row: CONTAINER_NESTING,
7080
7379
  group: {
7081
- allowed: [
7082
- "row",
7083
- "input",
7084
- "textarea",
7085
- "select",
7086
- "checkbox",
7087
- "multi-checkbox",
7088
- "radio",
7089
- "datepicker",
7090
- "toggle",
7091
- "slider",
7092
- "hidden",
7093
- "text",
7094
- "button",
7095
- "submit",
7096
- "next",
7097
- "previous",
7098
- "add-array-item",
7099
- "prepend-array-item",
7100
- "insert-array-item",
7101
- "remove-array-item",
7102
- "pop-array-item",
7103
- "shift-array-item"
7104
- ],
7105
7380
  forbidden: ["page", "group"],
7106
7381
  message: "Groups cannot contain pages or other groups (no nested groups)."
7107
7382
  },
7108
7383
  array: {
7109
- allowed: [
7110
- "row",
7111
- "group",
7112
- "input",
7113
- "textarea",
7114
- "select",
7115
- "checkbox",
7116
- "multi-checkbox",
7117
- "radio",
7118
- "datepicker",
7119
- "toggle",
7120
- "slider",
7121
- "hidden",
7122
- "text",
7123
- "button",
7124
- "submit",
7125
- "next",
7126
- "previous",
7127
- "add-array-item",
7128
- "prepend-array-item",
7129
- "insert-array-item",
7130
- "remove-array-item",
7131
- "pop-array-item",
7132
- "shift-array-item"
7133
- ],
7134
7384
  forbidden: ["page", "array"],
7135
7385
  message: "Arrays cannot contain pages or other arrays (no nested arrays)."
7136
7386
  }
@@ -7141,6 +7391,7 @@ var EXPECTED_STRUCTURE = {
7141
7391
  radio: `{ key: 'fieldKey', type: 'radio', label: 'Label', options: [{ label: 'Option', value: 'value' }] }`,
7142
7392
  "multi-checkbox": `{ key: 'fieldKey', type: 'multi-checkbox', label: 'Label', options: [{ label: 'Option', value: 'value' }] }`,
7143
7393
  slider: `{ key: 'fieldKey', type: 'slider', label: 'Label', minValue: 0, maxValue: 100, step: 1 }`,
7394
+ container: `{ key: 'containerKey', type: 'container', wrappers: [{ type: 'css', cssClasses: 'card' }], fields: [...childFields] }`,
7144
7395
  row: `{ key: 'rowKey', type: 'row', fields: [...childFields] }`,
7145
7396
  group: `{ key: 'groupKey', type: 'group', fields: [...childFields] }`,
7146
7397
  array: `Full API: { key: 'arrayKey', type: 'array', fields: [...itemDefs] } OR Simplified API: { key: 'arrayKey', type: 'array', template: { type: 'input', label: 'Item' }, value: [] }`,
@@ -7182,6 +7433,7 @@ function preValidateConfig(config) {
7182
7433
  if (prop in v) {
7183
7434
  errors.push({
7184
7435
  path: `${path}.validators[${vIdx}].${prop}`,
7436
+ ruleId: "core/validation-messages-location",
7185
7437
  message: `"${prop}" is NOT a valid validator property. Error messages go in "validationMessages" at the FIELD level, not on the validator config. Use "kind" to specify an error key, then define the message in the field's validationMessages.`
7186
7438
  });
7187
7439
  }
@@ -7189,7 +7441,7 @@ function preValidateConfig(config) {
7189
7441
  }
7190
7442
  });
7191
7443
  }
7192
- if (["row", "group", "array"].includes(fieldType || "")) {
7444
+ if (["row", "group", "array", "container"].includes(fieldType || "")) {
7193
7445
  for (const prop of INVALID_CONTAINER_PROPS) {
7194
7446
  if (prop in f) {
7195
7447
  errors.push({
@@ -7206,10 +7458,30 @@ function preValidateConfig(config) {
7206
7458
  const expected = EXPECTED_STRUCTURE[fieldType || ""] || "";
7207
7459
  errors.push({
7208
7460
  path: `${path}.${prop}`,
7209
- message: `"${fieldType}" containers do NOT support "${prop}". Containers don't hold values or validate - they are purely for layout/grouping.${expected ? ` Expected structure: ${expected}` : ""}`
7461
+ message: `"${fieldType}" containers do NOT support "${prop}". Containers don't hold values - they are purely for layout/grouping.${expected ? ` Expected structure: ${expected}` : ""}`
7210
7462
  });
7211
7463
  }
7212
7464
  }
7465
+ if (!VALIDATING_CONTAINERS.includes(fieldType || "")) {
7466
+ for (const prop of CONTAINER_VALIDATION_PROPS) {
7467
+ if (prop in f) {
7468
+ errors.push({
7469
+ path: `${path}.${prop}`,
7470
+ message: `"${fieldType}" containers do NOT support "${prop}". They flatten into their parent and have no schema path, so a container-level validator would have no value to run against. Use "group" or "array" for cross-field rules, or move the rule onto a child field.`
7471
+ });
7472
+ }
7473
+ }
7474
+ }
7475
+ if (fieldType !== "array") {
7476
+ for (const prop of ARRAY_SIZE_PROPS) {
7477
+ if (prop in f) {
7478
+ errors.push({
7479
+ path: `${path}.${prop}`,
7480
+ message: `"${fieldType}" containers do NOT support "${prop}". Array size constraints apply to "array" fields only.`
7481
+ });
7482
+ }
7483
+ }
7484
+ }
7213
7485
  if ("logic" in f && Array.isArray(f["logic"])) {
7214
7486
  const nonHiddenLogic = f["logic"].filter(
7215
7487
  (l) => l && typeof l === "object" && l["type"] !== "hidden"
@@ -7240,12 +7512,21 @@ function preValidateConfig(config) {
7240
7512
  });
7241
7513
  }
7242
7514
  }
7515
+ for (const prop of [...CONTAINER_VALIDATION_PROPS, ...ARRAY_SIZE_PROPS]) {
7516
+ if (prop in f) {
7517
+ errors.push({
7518
+ path: `${path}.${prop}`,
7519
+ message: `"page" containers do NOT support "${prop}". Pages flatten into the form and have no schema path of their own.`
7520
+ });
7521
+ }
7522
+ }
7243
7523
  }
7244
7524
  if (parentType && NESTING_RULES[parentType]) {
7245
7525
  const rules = NESTING_RULES[parentType];
7246
7526
  if (fieldType && rules.forbidden.includes(fieldType)) {
7247
7527
  errors.push({
7248
7528
  path,
7529
+ ruleId: "core/nesting",
7249
7530
  message: `"${fieldType}" is NOT allowed inside "${parentType}". ${rules.message}`
7250
7531
  });
7251
7532
  }
@@ -7294,6 +7575,7 @@ function preValidateConfig(config) {
7294
7575
  if (wrongProps.length > 0) {
7295
7576
  errors.push({
7296
7577
  path: `${path}.props`,
7578
+ ruleId: "core/slider-range-properties",
7297
7579
  message: `Slider has properties in wrong location: ${wrongProps.join(", ")}. For sliders, use minValue, maxValue, and step at FIELD level, not inside props. Expected structure: ${EXPECTED_STRUCTURE["slider"]}`
7298
7580
  });
7299
7581
  }
@@ -7316,11 +7598,12 @@ function preValidateConfig(config) {
7316
7598
  const propList = foundForbidden.map((p) => `"${p}"`).join(", ");
7317
7599
  errors.push({
7318
7600
  path,
7601
+ ruleId: "core/hidden-minimal",
7319
7602
  message: `Hidden field "${fieldKey || "unknown"}" has FORBIDDEN properties: ${propList}. Hidden fields ONLY support: key, type, value, className. They do not render and cannot be validated. Expected structure: ${EXPECTED_STRUCTURE["hidden"]}`
7320
7603
  });
7321
7604
  }
7322
7605
  }
7323
- if (["row", "group", "page"].includes(fieldType || "")) {
7606
+ if (["row", "group", "page", "container"].includes(fieldType || "")) {
7324
7607
  if (!("fields" in f)) {
7325
7608
  errors.push({
7326
7609
  path: `${path}.fields`,
@@ -7333,6 +7616,19 @@ function preValidateConfig(config) {
7333
7616
  });
7334
7617
  }
7335
7618
  }
7619
+ if (fieldType === "container") {
7620
+ if (!("wrappers" in f)) {
7621
+ errors.push({
7622
+ path: `${path}.wrappers`,
7623
+ message: `"container" container "${fieldKey || "unknown"}" is MISSING required "wrappers" property. Add a wrappers array naming the UI chrome to wrap the children in, or [] for no chrome. Do NOT switch to a "group" instead: a container flattens its children into the parent value, while a group nests them under its own key and owns a schema path, so the submitted value shape and validation behaviour both change. Expected structure: ${EXPECTED_STRUCTURE["container"]}`
7624
+ });
7625
+ } else if (!Array.isArray(f["wrappers"])) {
7626
+ errors.push({
7627
+ path: `${path}.wrappers`,
7628
+ message: `"container" container "${fieldKey || "unknown"}" has invalid "wrappers" - must be an array of wrapper objects, not ${typeof f["wrappers"]}.`
7629
+ });
7630
+ }
7631
+ }
7336
7632
  if (fieldType === "array") {
7337
7633
  const hasFields = "fields" in f;
7338
7634
  const hasTemplate = "template" in f;
@@ -7396,7 +7692,13 @@ function normalizeLegacyArrayActionTypes(value) {
7396
7692
  }
7397
7693
  return value;
7398
7694
  }
7399
- function validateFormConfig(uiIntegration, config) {
7695
+ function applyDisabledRules(errors, disabled) {
7696
+ if (disabled.size === 0) return errors;
7697
+ return errors.map(
7698
+ (error) => error.ruleId && disabled.has(error.ruleId) ? { ...error, severity: "warning" } : { ...error, severity: "error" }
7699
+ );
7700
+ }
7701
+ function validateFormConfig(uiIntegration, config, options) {
7400
7702
  const schema = formConfigSchemas2[uiIntegration];
7401
7703
  if (!schema) {
7402
7704
  return {
@@ -7420,11 +7722,15 @@ function validateFormConfig(uiIntegration, config) {
7420
7722
  };
7421
7723
  }
7422
7724
  const zodErrors = result.success ? [] : formatZodError(result.error, uiIntegration, normalizedConfig);
7423
- const allErrors = [...preErrors, ...zodErrors];
7725
+ const allErrors = applyDisabledRules([...preErrors, ...zodErrors], options?.disabledRules ?? /* @__PURE__ */ new Set());
7726
+ const blocking = allErrors.filter((error) => error.severity !== "warning");
7727
+ if (blocking.length === 0) {
7728
+ return { valid: true, data: result.success ? result.data : void 0, errors: allErrors };
7729
+ }
7424
7730
  return {
7425
7731
  valid: false,
7426
7732
  errors: allErrors,
7427
- errorSummary: generateErrorSummary(allErrors)
7733
+ errorSummary: generateErrorSummary(blocking)
7428
7734
  };
7429
7735
  }
7430
7736
  function isValidFormConfig(uiIntegration, config) {
@@ -7806,7 +8112,7 @@ function extractNode(node, path, warnings, errors) {
7806
8112
 
7807
8113
  // internal/dynamic-forms-validation/discovery/validate-file.ts
7808
8114
  import { readFile } from "node:fs/promises";
7809
- function validateSource(source, filePath, uiIntegration) {
8115
+ function validateSource(source, filePath, uiIntegration, options) {
7810
8116
  const sourceFile = createSourceFile(source, filePath);
7811
8117
  const candidates = findFormConfigCandidates(sourceFile);
7812
8118
  const results = candidates.map((candidate) => {
@@ -7816,7 +8122,7 @@ function validateSource(source, filePath, uiIntegration) {
7816
8122
  line: candidate.startLine,
7817
8123
  matchReason: candidate.matchReason,
7818
8124
  extraction,
7819
- validation: validateFormConfig(uiIntegration, extraction.value)
8125
+ validation: validateFormConfig(uiIntegration, extraction.value, options)
7820
8126
  };
7821
8127
  });
7822
8128
  return {
@@ -7825,12 +8131,16 @@ function validateSource(source, filePath, uiIntegration) {
7825
8131
  results,
7826
8132
  noConfigsFound: results.length === 0,
7827
8133
  valid: results.every((r) => r.validation.valid),
7828
- errorCount: results.reduce((sum, r) => sum + (r.validation.errors?.length ?? 0), 0)
8134
+ // Errors only. A finding downgraded to a warning by a disabled rule does
8135
+ // not block, so counting it here reported "1 error" on a file the same run
8136
+ // called valid.
8137
+ errorCount: results.reduce((sum, r) => sum + (r.validation.errors ?? []).filter((e) => e.severity !== "warning").length, 0),
8138
+ warningCount: results.reduce((sum, r) => sum + (r.validation.errors ?? []).filter((e) => e.severity === "warning").length, 0)
7829
8139
  };
7830
8140
  }
7831
- async function validateFile(filePath, uiIntegration) {
8141
+ async function validateFile(filePath, uiIntegration, options) {
7832
8142
  const source = await readFile(filePath, "utf-8");
7833
- return validateSource(source, filePath, uiIntegration);
8143
+ return validateSource(source, filePath, uiIntegration, options);
7834
8144
  }
7835
8145
  function isFilePath(value) {
7836
8146
  return value.startsWith("/") || value.startsWith("./") || value.startsWith("../") || value.startsWith("~") || /^[a-zA-Z]:\\/.test(value) || value.endsWith(".ts") || value.endsWith(".js") || value.endsWith(".tsx") || value.endsWith(".jsx");
@@ -7907,6 +8217,21 @@ function pushErrors(lines, errors) {
7907
8217
  }
7908
8218
  }
7909
8219
  }
8220
+ function isWarning(error) {
8221
+ return error.severity === "warning";
8222
+ }
8223
+ function pushWarnings(lines, warnings) {
8224
+ if (warnings.length === 0) {
8225
+ return;
8226
+ }
8227
+ lines.push(`### ${warnings.length} Warning(s)`);
8228
+ lines.push("");
8229
+ for (const { name, error } of warnings) {
8230
+ const rule2 = error.ruleId ? ` (${error.ruleId}, disabled)` : "";
8231
+ lines.push(`- **${name}** \`${error.path}\`${rule2}: ${error.message}`);
8232
+ }
8233
+ lines.push("");
8234
+ }
7910
8235
  function pushRelatedDocs(lines, errors, options) {
7911
8236
  const hints = options?.relatedDocs?.(errors) ?? [];
7912
8237
  if (hints.length === 0) {
@@ -7954,30 +8279,35 @@ function formatFileReport(result, options) {
7954
8279
  }
7955
8280
  lines.push("");
7956
8281
  }
8282
+ const warnings = result.results.flatMap(
8283
+ (entry) => (entry.validation.errors ?? []).filter(isWarning).map((error) => ({ name: entry.name, error }))
8284
+ );
7957
8285
  if (result.valid) {
7958
8286
  lines.push("### All Configs Valid");
7959
8287
  lines.push("");
7960
8288
  for (const entry of result.results) {
7961
8289
  lines.push(`- **${entry.name}** (line ${entry.line}): Valid`);
7962
8290
  }
7963
- return lines.join("\n");
8291
+ lines.push("");
8292
+ pushWarnings(lines, warnings);
8293
+ return lines.join("\n").trimEnd();
7964
8294
  }
7965
8295
  lines.push(`### ${result.errorCount} Error(s) Found`);
7966
8296
  lines.push("");
7967
8297
  const allErrors = [];
7968
8298
  for (const entry of result.results) {
7969
- if (entry.validation.valid) {
8299
+ const blocking = (entry.validation.errors ?? []).filter((error) => !isWarning(error));
8300
+ if (blocking.length === 0) {
7970
8301
  lines.push(`#### ${entry.name} (line ${entry.line}): Valid`);
7971
8302
  } else {
7972
8303
  lines.push(`#### ${entry.name} (line ${entry.line}): Invalid`);
7973
8304
  lines.push("");
7974
- if (entry.validation.errors) {
7975
- pushErrors(lines, entry.validation.errors);
7976
- allErrors.push(...entry.validation.errors);
7977
- }
8305
+ pushErrors(lines, blocking);
8306
+ allErrors.push(...blocking);
7978
8307
  }
7979
8308
  lines.push("");
7980
8309
  }
8310
+ pushWarnings(lines, warnings);
7981
8311
  pushRelatedDocs(lines, allErrors, options);
7982
8312
  return lines.join("\n");
7983
8313
  }
@@ -8002,6 +8332,95 @@ function formatConfigReport(uiIntegration, validation, options) {
8002
8332
  return lines.join("\n");
8003
8333
  }
8004
8334
 
8335
+ // internal/dynamic-forms-validation/rules/catalogue.ts
8336
+ function rule(id, summary, why) {
8337
+ return { id, summary, why };
8338
+ }
8339
+ var RULES = Object.freeze(
8340
+ Object.fromEntries(
8341
+ [
8342
+ rule(
8343
+ "core/hidden-minimal",
8344
+ "Keep hidden fields to `key`, `type`, `value` and `className`",
8345
+ "Hidden fields render nothing, so labels, validation and layout properties on them have no effect and mislead the next reader."
8346
+ ),
8347
+ rule(
8348
+ "core/nesting",
8349
+ "Respect which field types may nest inside which",
8350
+ "A page inside a row, or an array inside an array, has no rendering path and fails at runtime rather than at build time."
8351
+ ),
8352
+ rule(
8353
+ "core/validation-messages-location",
8354
+ "Put error text in `validationMessages`, not on the validator",
8355
+ "A message on the validator object is dropped and the field falls back to the default text."
8356
+ ),
8357
+ rule(
8358
+ "core/slider-range-properties",
8359
+ "Use `minValue`, `maxValue` and `step` for a slider range",
8360
+ "`min` and `max` are validation shorthands. They typecheck and validate clean, and the slider still renders its default range, so nothing catches the mistake."
8361
+ )
8362
+ ].map((entry) => [entry.id, entry])
8363
+ )
8364
+ );
8365
+ var RULE_IDS = Object.freeze(Object.keys(RULES).sort());
8366
+ var UnknownRuleError = class extends Error {
8367
+ constructor(unknown) {
8368
+ super(
8369
+ `[Dynamic Forms] unknown rule id(s): ${unknown.join(", ")}. A rule that does not exist cannot be disabled, and silently ignoring it would leave you believing a rule is off when it is not. Known ids: ${RULE_IDS.join(", ")}.`
8370
+ );
8371
+ this.name = "UnknownRuleError";
8372
+ }
8373
+ };
8374
+ function resolveDisabledRules(disabled) {
8375
+ const unknown = disabled.filter((id) => !RULES[id]);
8376
+ if (unknown.length > 0) throw new UnknownRuleError(unknown);
8377
+ return new Set(disabled);
8378
+ }
8379
+
8380
+ // internal/dynamic-forms-validation/rules/project-rules.ts
8381
+ import { readFile as readFile2 } from "node:fs/promises";
8382
+ import { dirname, join } from "node:path";
8383
+ var RULES_FILE = join(".ng-forge", "rules.json");
8384
+ var RulesConfigError = class extends Error {
8385
+ constructor(path, detail) {
8386
+ super(`[Dynamic Forms] ${path}: ${detail}`);
8387
+ this.name = "RulesConfigError";
8388
+ }
8389
+ };
8390
+ function errorCode(cause) {
8391
+ return typeof cause === "object" && cause !== null && "code" in cause ? String(cause.code) : void 0;
8392
+ }
8393
+ async function loadProjectRules(packageJsonPath) {
8394
+ if (!packageJsonPath) return { disabled: /* @__PURE__ */ new Set() };
8395
+ const path = join(dirname(packageJsonPath), RULES_FILE);
8396
+ let raw;
8397
+ try {
8398
+ raw = await readFile2(path, "utf-8");
8399
+ } catch (cause) {
8400
+ const code = errorCode(cause);
8401
+ if (code === "ENOENT") return { disabled: /* @__PURE__ */ new Set() };
8402
+ throw new RulesConfigError(path, `cannot be read (${code ?? cause.message})`);
8403
+ }
8404
+ let parsed;
8405
+ try {
8406
+ parsed = JSON.parse(raw);
8407
+ } catch (cause) {
8408
+ throw new RulesConfigError(path, `not valid JSON (${cause.message})`);
8409
+ }
8410
+ if (parsed === null || typeof parsed !== "object") {
8411
+ throw new RulesConfigError(path, "must be a JSON object");
8412
+ }
8413
+ const disabled = parsed.disabled ?? [];
8414
+ if (!Array.isArray(disabled) || disabled.some((id) => typeof id !== "string")) {
8415
+ throw new RulesConfigError(path, '"disabled" must be an array of rule ids');
8416
+ }
8417
+ try {
8418
+ return { disabled: resolveDisabledRules(disabled), source: path };
8419
+ } catch (cause) {
8420
+ throw new RulesConfigError(path, cause.message.replace("[Dynamic Forms] ", ""));
8421
+ }
8422
+ }
8423
+
8005
8424
  // packages/dynamic-form-mcp/src/resources/schemas.resource.ts
8006
8425
  var UI_INTEGRATIONS = ["material", "bootstrap", "primeng", "ionic"];
8007
8426
  function registerSchemasResource(server) {
@@ -8170,7 +8589,7 @@ function registerResources(server) {
8170
8589
  }
8171
8590
 
8172
8591
  // packages/dynamic-form-mcp/src/tools/lookup.tool.ts
8173
- import { z as z56 } from "zod";
8592
+ import { z as z59 } from "zod";
8174
8593
 
8175
8594
  // packages/dynamic-form-mcp/src/tools/data/lookup-topics.ts
8176
8595
  var TOPICS = {
@@ -9905,25 +10324,42 @@ provideDynamicForm({
9905
10324
  | FieldContext | \`ctx.value()\` | \`ctx.valueOf('path' as never)\` | custom validators |`
9906
10325
  },
9907
10326
  containers: {
9908
- brief: `| Container | Label? | Logic? | Notes |
9909
- |-----------|--------|--------|-------|
9910
- | page | NO | hidden only | Nav buttons INSIDE |
9911
- | group | NO | hidden only | Creates nested object |
9912
- | array | NO | hidden only | Two APIs: \`template\`+\`value\` (simplified) or \`fields\` (full) |
9913
- | row | NO | hidden only | Layout only |`,
10327
+ brief: `| Container | Label? | Logic? | Value | Notes |
10328
+ |-----------|--------|--------|-------|-------|
10329
+ | page | NO | hidden only | flattened | Nav buttons INSIDE |
10330
+ | group | NO | hidden only | nested under its key | Creates nested object |
10331
+ | array | NO | hidden only | nested under its key | Two APIs: \`template\`+\`value\` (simplified) or \`fields\` (full) |
10332
+ | row | NO | hidden only | flattened | Layout only |
10333
+ | container | NO | hidden only | flattened | Layout + REQUIRED \`wrappers\` chain |`,
9914
10334
  full: `# Container Rules
9915
10335
 
9916
- | Container | Label? | Logic? | Allowed Children | Notes |
9917
- |-----------|--------|--------|------------------|-------|
9918
- | page | NO | YES (hidden only) | rows, groups, arrays, leaf fields, buttons | Nav buttons go INSIDE |
9919
- | group | NO | YES (hidden only) | rows, arrays, leaf fields (NOT pages, groups) | Creates nested object |
9920
- | array | NO | YES (hidden only) | rows, groups, leaf fields (NOT pages, arrays) | Two APIs: \`template\`+\`value\` (simplified) or \`fields\` (full) |
9921
- | row | NO | YES (hidden only) | groups, arrays, containers, nested rows, hidden fields, leaf fields (NOT pages) | Layout only |
10336
+ | Container | Label? | Logic? | Value Handling | Allowed Children | Notes |
10337
+ |-----------|--------|--------|----------------|------------------|-------|
10338
+ | page | NO | YES (hidden only) | flattened | rows, groups, arrays, containers, hidden, leaf fields, buttons (NOT pages) | Nav buttons go INSIDE |
10339
+ | group | NO | YES (hidden only) | nested under its key | rows, arrays, containers, hidden, leaf fields, buttons (NOT pages, groups) | Creates nested object |
10340
+ | array | NO | YES (hidden only) | nested under its key | rows, groups, containers, hidden, leaf fields, buttons (NOT pages, arrays) | Two APIs: \`template\`+\`value\` (simplified) or \`fields\` (full) |
10341
+ | row | NO | YES (hidden only) | flattened | groups, arrays, containers, leaf fields, buttons (NOT pages, nested rows, hidden) | Layout only |
10342
+ | container | NO | YES (hidden only) | flattened | rows, groups, arrays, nested containers, hidden, leaf fields, buttons (NOT pages) | \`wrappers\` is REQUIRED (use [] for none) |
10343
+
10344
+ **Value handling decides which container you want.** \`page\`, \`row\` and \`container\` flatten: their children land directly in the parent value, and the container key never appears in the submitted data. \`group\` and \`array\` nest their children under their own key.
10345
+
10346
+ That difference is not cosmetic, so these are not interchangeable:
10347
+
10348
+ \`\`\`typescript
10349
+ // container \u2192 { street: '', city: '' } (chrome only, key not in the value)
10350
+ { key: 'billing', type: 'container', wrappers: [{ type: 'css', cssClasses: 'card' }], fields: [street, city] }
10351
+
10352
+ // group \u2192 { billing: { street: '', city: '' } } (adds a level to the value)
10353
+ { key: 'billing', type: 'group', fields: [street, city] }
10354
+ \`\`\`
10355
+
10356
+ Only \`group\` and \`array\` own a schema path, so only they take container-level \`validators\`, \`required\` and \`validationMessages\`. Reach for \`container\` when you want chrome around fields without changing the data shape, and for \`group\` when you want the nesting or the cross-field validation.
9922
10357
 
9923
10358
  **CRITICAL:**
9924
- - All containers (page, group, row, array) support only the \`hidden\` logic type for conditional visibility.
10359
+ - All containers (page, group, row, array, container) support only the \`hidden\` logic type for conditional visibility.
9925
10360
  - For other logic types (disabled, required, readonly, derivation), apply them to child fields instead.
9926
- - Pages cannot be nested - ALL top-level fields must be pages if using multi-page mode.`
10361
+ - Pages cannot be nested - ALL top-level fields must be pages if using multi-page mode.
10362
+ - Rows reject nested rows and hidden fields; put hidden fields at page or form level.`
9927
10363
  },
9928
10364
  "field-placement": {
9929
10365
  brief: `**Multi-page:** ALL root fields must be pages. Hidden fields go INSIDE first page.
@@ -10717,7 +11153,8 @@ var TOPIC_DESCRIPTIONS = {
10717
11153
  "field-placement": "Which fields can go where \u2014 nesting and placement rules",
10718
11154
  "logic-matrix": "Which logic types are supported on which field types",
10719
11155
  "context-api": "FieldContext API \u2014 valueOf(), formValue, parent, arrayIndex",
10720
- containers: "Overview of all container types (group, row, array, page)",
11156
+ containers: "Overview of all container types (group, row, array, container, page) and what each may hold",
11157
+ container: "Wraps children in a wrapper chain; flattens their values into the parent like a row",
10721
11158
  "array-buttons": "Add/remove array item button configuration",
10722
11159
  "custom-validators": "Custom validator functions via validators array",
10723
11160
  conditions: "Condition operators and types for logic rules",
@@ -10977,7 +11414,7 @@ function formatTopicItem(key) {
10977
11414
  }
10978
11415
  function getTopicList() {
10979
11416
  const fieldTypes = ["input", "select", "slider", "radio", "checkbox", "textarea", "datepicker", "toggle", "text", "hidden"];
10980
- const containers = ["group", "row", "array", "simplified-array", "page"];
11417
+ const containers = [...getFieldTypesByCategory("container").map((f) => f.type), "simplified-array"];
10981
11418
  const wrappers = ["wrappers", ...getWrappers().map((w) => w.type)];
10982
11419
  const addons = ["addons", ...getAddonTypes().map((k) => k.type)];
10983
11420
  const concepts = [
@@ -11033,7 +11470,7 @@ ${patterns.map(formatTopicItem).join("\n")}
11033
11470
  }
11034
11471
  function formatFieldInfoFull(field, uiFieldType) {
11035
11472
  const lines = [];
11036
- const isContainer = ["row", "group", "array", "page"].includes(field.type);
11473
+ const isContainer = field.category === "container";
11037
11474
  const isHidden = field.type === "hidden";
11038
11475
  lines.push(`## ${field.type} field`);
11039
11476
  lines.push("");
@@ -11462,11 +11899,11 @@ Patterns: field-placement, logic-matrix, context-api, containers, multi-page-got
11462
11899
  Use topic="list" to see all available topics with descriptions.
11463
11900
  Use ngforge_search query="your question" to find topics by keyword.`,
11464
11901
  {
11465
- topic: z56.string().describe(
11466
- 'Topic to look up: field types (input, select, hidden, group, row, array, page), wrappers (wrappers, css, section, arraySection), concepts (validation, conditional, derivation, property-derivation, options-format), patterns (golden-path, pitfalls, multi-page-gotchas), or "list" to see all topics'
11902
+ topic: z59.string().describe(
11903
+ 'Topic to look up: field types (input, select, hidden, group, row, array, container, page), wrappers (wrappers, css, section, arraySection), concepts (validation, conditional, derivation, property-derivation, options-format), patterns (golden-path, pitfalls, multi-page-gotchas), or "list" to see all topics'
11467
11904
  ),
11468
- depth: z56.enum(["brief", "full", "schema"]).default("full").describe("brief=quick syntax (~20 lines), full=complete docs with examples, schema=include JSON schema"),
11469
- uiIntegration: z56.enum(UI_INTEGRATIONS2).optional().describe("Filter UI-specific info (only with depth=schema). material, bootstrap, primeng, ionic")
11905
+ depth: z59.enum(["brief", "full", "schema"]).default("full").describe("brief=quick syntax (~20 lines), full=complete docs with examples, schema=include JSON schema"),
11906
+ uiIntegration: z59.enum(UI_INTEGRATIONS2).optional().describe("Filter UI-specific info (only with depth=schema). material, bootstrap, primeng, ionic")
11470
11907
  },
11471
11908
  async ({ topic, depth, uiIntegration }) => {
11472
11909
  const normalizedTopic = topic.toLowerCase().trim();
@@ -11514,7 +11951,7 @@ ${nextSteps}`;
11514
11951
  }
11515
11952
 
11516
11953
  // packages/dynamic-form-mcp/src/tools/examples.tool.ts
11517
- import { z as z57 } from "zod";
11954
+ import { z as z60 } from "zod";
11518
11955
  var PATTERNS = {
11519
11956
  // ========== MINIMAL PATTERNS (NEW) ==========
11520
11957
  "minimal-multipage": {
@@ -13779,10 +14216,10 @@ Standard patterns: derivation, property-derivation, multi-page, conditional, val
13779
14216
  Use pattern="list" to see all available patterns.
13780
14217
  Use depth="minimal" for code-only output (no markdown).`,
13781
14218
  {
13782
- pattern: z57.string().optional().describe(
14219
+ pattern: z60.string().optional().describe(
13783
14220
  'Pattern to get: minimal-multipage, minimal-array, minimal-simplified-array, minimal-conditional, minimal-validation, minimal-hidden, derivation, property-derivation, multi-page, conditional, validation, complete, mega. Use "list" to see all.'
13784
14221
  ),
13785
- depth: z57.enum(["minimal", "brief", "full", "explained"]).default("full").describe(
14222
+ depth: z60.enum(["minimal", "brief", "full", "explained"]).default("full").describe(
13786
14223
  "minimal=code only (~20-50 lines), brief=code+summary, full=code+comments (default), explained=code+detailed explanation"
13787
14224
  )
13788
14225
  },
@@ -13847,8 +14284,29 @@ function extractCode(markdown) {
13847
14284
  }
13848
14285
 
13849
14286
  // packages/dynamic-form-mcp/src/tools/validate.tool.ts
13850
- import { z as z58 } from "zod";
14287
+ import { access } from "node:fs/promises";
14288
+ import { dirname as dirname2, join as join2, parse, resolve } from "node:path";
14289
+ import { z as z61 } from "zod";
13851
14290
  var UI_INTEGRATIONS3 = ["material", "bootstrap", "primeng", "ionic"];
14291
+ async function projectDisabledRules(filePath) {
14292
+ return (await loadProjectRules(await nearestManifest(dirname2(filePath)))).disabled;
14293
+ }
14294
+ function countBySeverity(errors, severity) {
14295
+ return (errors ?? []).filter((error) => (error.severity ?? "error") === severity).length;
14296
+ }
14297
+ async function nearestManifest(start) {
14298
+ const from = resolve(start);
14299
+ const { root } = parse(from);
14300
+ for (let dir = from; ; dir = dirname2(dir)) {
14301
+ const candidate = join2(dir, "package.json");
14302
+ try {
14303
+ await access(candidate);
14304
+ return candidate;
14305
+ } catch {
14306
+ }
14307
+ if (dir === root) return void 0;
14308
+ }
14309
+ }
13852
14310
  var ERROR_TOPIC_HINTS = [
13853
14311
  { pattern: /options/i, hint: '`ngforge_lookup topic="options-format"` \u2014 correct options syntax' },
13854
14312
  { pattern: /hidden/i, hint: '`ngforge_lookup topic="hidden"` \u2014 hidden field rules' },
@@ -13900,16 +14358,17 @@ Example errors you'll see:
13900
14358
  - "options MUST be at FIELD level, NOT inside props"
13901
14359
  - "containers only support 'hidden' logic type"`,
13902
14360
  {
13903
- config: z58.union([z58.string(), z58.object({}).passthrough()]).describe(
14361
+ config: z61.union([z61.string(), z61.object({}).passthrough()]).describe(
13904
14362
  "File path (.ts/.js) OR JSON string OR JSON object. Auto-detects: paths ending in .ts/.js or starting with / are treated as files."
13905
14363
  ),
13906
- uiIntegration: z58.enum(UI_INTEGRATIONS3).default("material").describe("UI library to validate against (material, bootstrap, primeng, ionic). Defaults to material.")
14364
+ uiIntegration: z61.enum(UI_INTEGRATIONS3).default("material").describe("UI library to validate against (material, bootstrap, primeng, ionic). Defaults to material.")
13907
14365
  },
13908
14366
  async ({ config, uiIntegration }) => {
13909
14367
  try {
13910
14368
  const parsed = parseConfigInput(config);
13911
14369
  if (parsed.type === "file") {
13912
- const result2 = await validateFile(parsed.path, uiIntegration);
14370
+ const disabledRules = await projectDisabledRules(parsed.path);
14371
+ const result2 = await validateFile(parsed.path, uiIntegration, { disabledRules });
13913
14372
  const report2 = formatFileReport(result2, { relatedDocs: collectErrorTopicHints });
13914
14373
  const structured2 = {
13915
14374
  type: "file",
@@ -13917,11 +14376,14 @@ Example errors you'll see:
13917
14376
  uiIntegration,
13918
14377
  configsFound: result2.results.length,
13919
14378
  allValid: result2.valid,
14379
+ errorCount: result2.errorCount,
14380
+ warningCount: result2.warningCount,
13920
14381
  results: result2.results.map((r) => ({
13921
14382
  name: r.name,
13922
14383
  line: r.line,
13923
14384
  valid: r.validation.valid,
13924
- errorCount: r.validation.errors?.length || 0
14385
+ errorCount: countBySeverity(r.validation.errors, "error"),
14386
+ warningCount: countBySeverity(r.validation.errors, "warning")
13925
14387
  }))
13926
14388
  };
13927
14389
  return {
@@ -13938,7 +14400,8 @@ Example errors you'll see:
13938
14400
  type: parsed.type,
13939
14401
  uiIntegration,
13940
14402
  valid: result.valid,
13941
- errorCount: result.errors?.length || 0,
14403
+ errorCount: countBySeverity(result.errors, "error"),
14404
+ warningCount: countBySeverity(result.errors, "warning"),
13942
14405
  errors: result.errors
13943
14406
  };
13944
14407
  return {
@@ -13995,7 +14458,7 @@ If validating JSON, ensure:
13995
14458
  }
13996
14459
 
13997
14460
  // packages/dynamic-form-mcp/src/tools/scaffold.tool.ts
13998
- import { z as z59 } from "zod";
14461
+ import { z as z62 } from "zod";
13999
14462
  var UI_INTEGRATIONS4 = ["material", "bootstrap", "primeng", "ionic"];
14000
14463
  function parseFieldDefs(fields) {
14001
14464
  return fields.map((f) => {
@@ -14250,12 +14713,12 @@ Examples:
14250
14713
  - With groups: pages=0 groups=["address","billing"]
14251
14714
  - With hidden: hidden=["userId:abc123","source:web"]`,
14252
14715
  {
14253
- pages: z59.number().min(0).max(10).default(0).describe("Number of pages (0 = single-page form, 1-10 = multi-page wizard)"),
14254
- arrays: z59.array(z59.string()).optional().describe('Array field names for dynamic lists, e.g., ["contacts", "addresses"]'),
14255
- groups: z59.array(z59.string()).optional().describe('Group field names for nested objects, e.g., ["address", "billing"]'),
14256
- hidden: z59.array(z59.string()).optional().describe('Hidden fields as "name:value" pairs, e.g., ["userId:abc", "version:1"]'),
14257
- fields: z59.array(z59.string()).optional().describe('Basic fields as "name:type" pairs, e.g., ["email:input", "country:select", "age:slider"]'),
14258
- uiIntegration: z59.enum(UI_INTEGRATIONS4).default("material").describe("UI library (for future UI-specific props). Defaults to material.")
14716
+ pages: z62.number().min(0).max(10).default(0).describe("Number of pages (0 = single-page form, 1-10 = multi-page wizard)"),
14717
+ arrays: z62.array(z62.string()).optional().describe('Array field names for dynamic lists, e.g., ["contacts", "addresses"]'),
14718
+ groups: z62.array(z62.string()).optional().describe('Group field names for nested objects, e.g., ["address", "billing"]'),
14719
+ hidden: z62.array(z62.string()).optional().describe('Hidden fields as "name:value" pairs, e.g., ["userId:abc", "version:1"]'),
14720
+ fields: z62.array(z62.string()).optional().describe('Basic fields as "name:type" pairs, e.g., ["email:input", "country:select", "age:slider"]'),
14721
+ uiIntegration: z62.enum(UI_INTEGRATIONS4).default("material").describe("UI library (for future UI-specific props). Defaults to material.")
14259
14722
  },
14260
14723
  async ({ pages, arrays = [], groups = [], hidden = [], fields = [] }) => {
14261
14724
  const fieldDefs = parseFieldDefs(fields);
@@ -14297,11 +14760,11 @@ Examples:
14297
14760
  }
14298
14761
 
14299
14762
  // packages/dynamic-form-mcp/src/tools/search.tool.ts
14300
- import { z as z60 } from "zod";
14763
+ import { z as z63 } from "zod";
14301
14764
  var searchIndex = null;
14302
14765
  function getTopicSubcategory(key) {
14303
14766
  const fieldTypes = ["input", "select", "slider", "radio", "checkbox", "textarea", "datepicker", "toggle", "text", "hidden"];
14304
- const containers = ["group", "row", "array", "simplified-array", "page"];
14767
+ const containers = [...getFieldTypesByCategory("container").map((f) => f.type), "simplified-array"];
14305
14768
  const concepts = [
14306
14769
  "validation",
14307
14770
  "validation-messages",
@@ -14341,6 +14804,19 @@ function buildIndex() {
14341
14804
  toolCall: `ngforge_lookup topic="${key}"`
14342
14805
  });
14343
14806
  }
14807
+ for (const field of getFieldTypes()) {
14808
+ if (TOPICS[field.type]) continue;
14809
+ const description = TOPIC_DESCRIPTIONS[field.type] || field.description;
14810
+ entries.push({
14811
+ id: field.type,
14812
+ category: "topic",
14813
+ subcategory: getTopicSubcategory(field.type),
14814
+ description,
14815
+ aliases: aliasMap[field.type] || [],
14816
+ content: `${description} ${field.description}`.toLowerCase(),
14817
+ toolCall: `ngforge_lookup topic="${field.type}"`
14818
+ });
14819
+ }
14344
14820
  for (const [key, pattern] of Object.entries(PATTERNS)) {
14345
14821
  entries.push({
14346
14822
  id: key,
@@ -14445,7 +14921,7 @@ Use this when you don't know the exact topic name.
14445
14921
 
14446
14922
  New to ng-forge? Start with: ngforge_lookup topic="workflow"`,
14447
14923
  {
14448
- query: z60.string().describe("Natural language or keywords to search for")
14924
+ query: z63.string().describe("Natural language or keywords to search for")
14449
14925
  },
14450
14926
  async ({ query }) => {
14451
14927
  const index = buildIndex();