@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.
@@ -24,7 +24,7 @@ var FIELD_TYPES = [
24
24
  },
25
25
  validationSupported: true,
26
26
  source: "adapter",
27
- allowedIn: ["top-level", "page", "row", "group", "array"],
27
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
28
28
  example: `{
29
29
  key: 'email',
30
30
  type: 'input',
@@ -59,7 +59,7 @@ var FIELD_TYPES = [
59
59
  },
60
60
  validationSupported: true,
61
61
  source: "adapter",
62
- allowedIn: ["top-level", "page", "row", "group", "array"],
62
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
63
63
  example: `{
64
64
  key: 'description',
65
65
  type: 'textarea',
@@ -93,7 +93,7 @@ var FIELD_TYPES = [
93
93
  },
94
94
  validationSupported: true,
95
95
  source: "adapter",
96
- allowedIn: ["top-level", "page", "row", "group", "array"],
96
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
97
97
  example: `{
98
98
  key: 'country',
99
99
  type: 'select',
@@ -115,7 +115,7 @@ var FIELD_TYPES = [
115
115
  props: {},
116
116
  validationSupported: true,
117
117
  source: "adapter",
118
- allowedIn: ["top-level", "page", "row", "group", "array"],
118
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
119
119
  example: `{
120
120
  key: 'acceptTerms',
121
121
  type: 'checkbox',
@@ -140,7 +140,7 @@ var FIELD_TYPES = [
140
140
  },
141
141
  validationSupported: true,
142
142
  source: "adapter",
143
- allowedIn: ["top-level", "page", "row", "group", "array"],
143
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
144
144
  example: `{
145
145
  key: 'interests',
146
146
  type: 'multi-checkbox',
@@ -170,7 +170,7 @@ var FIELD_TYPES = [
170
170
  },
171
171
  validationSupported: true,
172
172
  source: "adapter",
173
- allowedIn: ["top-level", "page", "row", "group", "array"],
173
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
174
174
  example: `{
175
175
  key: 'gender',
176
176
  type: 'radio',
@@ -205,7 +205,7 @@ var FIELD_TYPES = [
205
205
  },
206
206
  validationSupported: true,
207
207
  source: "adapter",
208
- allowedIn: ["top-level", "page", "row", "group", "array"],
208
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
209
209
  example: `{
210
210
  key: 'birthDate',
211
211
  type: 'datepicker',
@@ -224,7 +224,7 @@ var FIELD_TYPES = [
224
224
  props: {},
225
225
  validationSupported: true,
226
226
  source: "adapter",
227
- allowedIn: ["top-level", "page", "row", "group", "array"],
227
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
228
228
  example: `{
229
229
  key: 'notifications',
230
230
  type: 'toggle',
@@ -263,7 +263,7 @@ var FIELD_TYPES = [
263
263
  },
264
264
  validationSupported: true,
265
265
  source: "adapter",
266
- allowedIn: ["top-level", "page", "row", "group", "array"],
266
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
267
267
  example: `{
268
268
  key: 'volume',
269
269
  type: 'slider',
@@ -284,8 +284,8 @@ var FIELD_TYPES = [
284
284
  props: {},
285
285
  validationSupported: false,
286
286
  source: "core",
287
- allowedIn: ["top-level (single-page forms only)", "page.fields", "group.fields", "array.fields"],
288
- notAllowedIn: ["row", "top-level when using pages"],
287
+ allowedIn: ["top-level (single-page forms only)", "page.fields", "group.fields", "array.fields", "row", "container"],
288
+ notAllowedIn: ["top-level when using pages"],
289
289
  example: `// Hidden field - value is REQUIRED!
290
290
  {
291
291
  key: 'userId',
@@ -302,7 +302,8 @@ var FIELD_TYPES = [
302
302
  // - label, logic, validators, required, props
303
303
  // - disabled, readonly, hidden, col, tabIndex, meta
304
304
  // - Validation shorthand: email, min, max, minLength, maxLength, pattern`,
305
- minimalExample: `{ key: 'id', type: 'hidden', value: 'abc123' }`
305
+ minimalExample: `{ key: 'id', type: 'hidden', value: 'abc123' }`,
306
+ illustrative: { example: "several snippets and a forbidden-property list, not one expression" }
306
307
  },
307
308
  {
308
309
  type: "text",
@@ -321,7 +322,7 @@ var FIELD_TYPES = [
321
322
  },
322
323
  validationSupported: false,
323
324
  source: "core",
324
- allowedIn: ["top-level", "page", "row", "group", "array"],
325
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
325
326
  example: `{
326
327
  key: 'sectionTitle',
327
328
  type: 'text',
@@ -382,7 +383,8 @@ var FIELD_TYPES = [
382
383
  }
383
384
  // NOT ALLOWED in rows:
384
385
  // - type: 'page' (pages are top-level only)`,
385
- minimalExample: `{ key: 'row1', type: 'row', fields: [...] }`
386
+ minimalExample: `{ key: 'row1', type: 'row', fields: [{ key: 'firstName', type: 'input', label: 'First Name', col: 6 }, { key: 'lastName', type: 'input', label: 'Last Name', col: 6 }] }`,
387
+ illustrative: { example: "ends with a not-allowed-in list, so it is not one expression" }
386
388
  },
387
389
  {
388
390
  type: "group",
@@ -424,11 +426,12 @@ var FIELD_TYPES = [
424
426
  },
425
427
  validationSupported: true,
426
428
  source: "core",
427
- allowedIn: ["top-level", "page", "row", "array"],
429
+ allowedIn: ["top-level", "page", "row", "array", "container"],
428
430
  notAllowedIn: ["group"],
429
431
  canContain: [
430
432
  "row",
431
433
  "array",
434
+ "container",
432
435
  "input",
433
436
  "textarea",
434
437
  "select",
@@ -468,7 +471,8 @@ var FIELD_TYPES = [
468
471
  validators: [{ type: 'custom', functionName: 'dateOrder' }],
469
472
  validationMessages: { dateOrder: 'The end must not be before the start.' }
470
473
  }`,
471
- minimalExample: `{ key: 'address', type: 'group', fields: [...] }`
474
+ minimalExample: `{ key: 'address', type: 'group', fields: [{ key: 'street', type: 'input', label: 'Street' }] }`,
475
+ illustrative: { example: "two snippets: a plain group and one carrying a cross-field rule" }
472
476
  },
473
477
  {
474
478
  type: "array",
@@ -522,11 +526,12 @@ var FIELD_TYPES = [
522
526
  },
523
527
  validationSupported: true,
524
528
  source: "core",
525
- allowedIn: ["top-level", "page", "row", "group"],
529
+ allowedIn: ["top-level", "page", "row", "group", "container"],
526
530
  notAllowedIn: ["array"],
527
531
  canContain: [
528
532
  "row",
529
533
  "group",
534
+ "container",
530
535
  "input",
531
536
  "textarea",
532
537
  "select",
@@ -586,7 +591,77 @@ var FIELD_TYPES = [
586
591
  // periodOrder receives the whole item list:
587
592
  // (ctx) => (ctx.value() ?? []).some(r => r.from && r.to && r.to < r.from)
588
593
  // ? { kind: 'periodOrder' } : null`,
589
- minimalExample: `{ key: 'items', type: 'array', fields: [...] }`
594
+ minimalExample: `{ key: 'items', type: 'array', fields: [{ key: 'tag', type: 'input', label: 'Tag' }] }`,
595
+ illustrative: { example: "three snippets: flat, object-item and per-row-rule arrays" }
596
+ },
597
+ {
598
+ type: "container",
599
+ category: "container",
600
+ 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.",
601
+ valueType: void 0,
602
+ baseInterface: "FieldDef",
603
+ props: {
604
+ fields: {
605
+ name: "fields",
606
+ type: "ContainerAllowedChildren[]",
607
+ 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",
608
+ required: true
609
+ },
610
+ wrappers: {
611
+ name: "wrappers",
612
+ type: "WrapperConfig[]",
613
+ 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.",
614
+ required: true
615
+ }
616
+ },
617
+ validationSupported: false,
618
+ source: "core",
619
+ allowedIn: ["top-level", "page", "group", "array", "row", "container"],
620
+ notAllowedIn: [],
621
+ canContain: [
622
+ "row",
623
+ "group",
624
+ "array",
625
+ "container",
626
+ "hidden",
627
+ "input",
628
+ "textarea",
629
+ "select",
630
+ "checkbox",
631
+ "multi-checkbox",
632
+ "radio",
633
+ "datepicker",
634
+ "toggle",
635
+ "slider",
636
+ "text",
637
+ "button",
638
+ "submit",
639
+ "next",
640
+ "previous",
641
+ "add-array-item",
642
+ "prepend-array-item",
643
+ "insert-array-item",
644
+ "remove-array-item",
645
+ "pop-array-item",
646
+ "shift-array-item"
647
+ ],
648
+ cannotContain: ["page"],
649
+ example: `{
650
+ key: 'billingChrome',
651
+ type: 'container',
652
+ // NOTE: Containers do NOT have a label property
653
+ // wrappers is REQUIRED \u2014 use [] when no chrome is needed
654
+ wrappers: [{ type: 'css', cssClasses: 'card p-3' }],
655
+ fields: [
656
+ { key: 'street', type: 'input', label: 'Street' },
657
+ { key: 'city', type: 'input', label: 'City' }
658
+ ]
659
+ }
660
+ // Values flatten: { street: '', city: '' } \u2014 no 'billingChrome' key
661
+ // NOT ALLOWED in containers:
662
+ // - type: 'page' (pages are top-level only)`,
663
+ minimalExample: `{ key: 'chrome', type: 'container', wrappers: [], fields: [{ key: 'street', type: 'input', label: 'Street' }] }`,
664
+ illustrative: { example: "ends with a not-allowed-in list, so it is not one expression" }
590
665
  },
591
666
  {
592
667
  type: "page",
@@ -605,11 +680,12 @@ var FIELD_TYPES = [
605
680
  validationSupported: false,
606
681
  source: "core",
607
682
  allowedIn: ["top-level"],
608
- notAllowedIn: ["page", "row", "group", "array"],
683
+ notAllowedIn: ["page", "row", "group", "array", "container"],
609
684
  canContain: [
610
685
  "row",
611
686
  "group",
612
687
  "array",
688
+ "container",
613
689
  "input",
614
690
  "textarea",
615
691
  "select",
@@ -638,7 +714,7 @@ var FIELD_TYPES = [
638
714
  { key: 'next', type: 'next', label: 'Next' }
639
715
  ]
640
716
  }`,
641
- minimalExample: `{ key: 'step1', type: 'page', fields: [...] }`
717
+ minimalExample: `{ key: 'step1', type: 'page', fields: [{ key: 'firstName', type: 'input', label: 'First Name' }] }`
642
718
  },
643
719
  {
644
720
  type: "next",
@@ -649,7 +725,7 @@ var FIELD_TYPES = [
649
725
  props: {},
650
726
  validationSupported: false,
651
727
  source: "adapter",
652
- allowedIn: ["top-level", "page", "row", "group", "array"],
728
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
653
729
  example: `{
654
730
  key: 'next',
655
731
  type: 'next',
@@ -666,7 +742,7 @@ var FIELD_TYPES = [
666
742
  props: {},
667
743
  validationSupported: false,
668
744
  source: "adapter",
669
- allowedIn: ["top-level", "page", "row", "group", "array"],
745
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
670
746
  example: `{
671
747
  key: 'back',
672
748
  type: 'previous',
@@ -690,7 +766,7 @@ var FIELD_TYPES = [
690
766
  },
691
767
  validationSupported: false,
692
768
  source: "adapter",
693
- allowedIn: ["top-level", "page", "row", "group", "array"],
769
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
694
770
  example: `// RECOMMENDED: Use pre-defined button types for common actions
695
771
  { key: 'submit', type: 'submit', label: 'Submit Form' }
696
772
  { key: 'next', type: 'next', label: 'Next' }
@@ -706,7 +782,11 @@ var FIELD_TYPES = [
706
782
  label: 'Custom Action',
707
783
  event: MyCustomEvent // Must be the class reference
708
784
  }`,
709
- minimalExample: `{ key: 'action', type: 'button', label: 'Action', event: MyEvent }`
785
+ minimalExample: `{ key: 'action', type: 'button', label: 'Action', event: MyEvent }`,
786
+ illustrative: {
787
+ minimalExample: "names an event class only a real app defines and registers",
788
+ example: "four snippets plus the registration steps they depend on"
789
+ }
710
790
  },
711
791
  {
712
792
  type: "submit",
@@ -717,7 +797,7 @@ var FIELD_TYPES = [
717
797
  props: {},
718
798
  validationSupported: false,
719
799
  source: "adapter",
720
- allowedIn: ["top-level", "page", "row", "group", "array"],
800
+ allowedIn: ["top-level", "page", "row", "group", "array", "container"],
721
801
  example: `{
722
802
  key: 'submit',
723
803
  type: 'submit',
@@ -731,16 +811,34 @@ var FIELD_TYPES = [
731
811
  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.)",
732
812
  valueType: void 0,
733
813
  baseInterface: "FieldDef",
734
- props: {},
814
+ props: {
815
+ template: {
816
+ name: "template",
817
+ type: "ArrayAllowedChildren | readonly ArrayAllowedChildren[]",
818
+ 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.",
819
+ required: true
820
+ },
821
+ arrayKey: {
822
+ name: "arrayKey",
823
+ type: "string",
824
+ description: "Key of the array to act on. Optional when the button sits inside that array, which supplies it from context.",
825
+ required: false
826
+ }
827
+ },
735
828
  validationSupported: false,
736
829
  source: "adapter",
737
- allowedIn: ["array", "row", "group"],
830
+ allowedIn: ["array", "row", "group", "container"],
738
831
  example: `{
739
832
  key: 'addContact',
740
833
  type: 'add-array-item',
741
- label: 'Add Contact'
834
+ label: 'Add Contact',
835
+ // REQUIRED: what one new item looks like.
836
+ template: [
837
+ { key: 'name', type: 'input', label: 'Name' },
838
+ { key: 'email', type: 'input', label: 'Email' }
839
+ ]
742
840
  }`,
743
- minimalExample: `{ key: 'add', type: 'add-array-item', label: 'Add Item' }`
841
+ minimalExample: `{ key: 'add', type: 'add-array-item', label: 'Add Item', template: { key: 'tag', type: 'input', label: 'Tag' } }`
744
842
  },
745
843
  {
746
844
  type: "prepend-array-item",
@@ -748,16 +846,34 @@ var FIELD_TYPES = [
748
846
  description: "Button to add a new item to the beginning of an array field. (Legacy alias: prependArrayItem.)",
749
847
  valueType: void 0,
750
848
  baseInterface: "FieldDef",
751
- props: {},
849
+ props: {
850
+ template: {
851
+ name: "template",
852
+ type: "ArrayAllowedChildren | readonly ArrayAllowedChildren[]",
853
+ 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.",
854
+ required: true
855
+ },
856
+ arrayKey: {
857
+ name: "arrayKey",
858
+ type: "string",
859
+ description: "Key of the array to act on. Optional when the button sits inside that array, which supplies it from context.",
860
+ required: false
861
+ }
862
+ },
752
863
  validationSupported: false,
753
864
  source: "adapter",
754
- allowedIn: ["array", "row", "group"],
865
+ allowedIn: ["array", "row", "group", "container"],
755
866
  example: `{
756
867
  key: 'prependContact',
757
868
  type: 'prepend-array-item',
758
- label: 'Add to Top'
869
+ label: 'Add to Top',
870
+ // REQUIRED: what one new item looks like.
871
+ template: [
872
+ { key: 'name', type: 'input', label: 'Name' },
873
+ { key: 'email', type: 'input', label: 'Email' }
874
+ ]
759
875
  }`,
760
- minimalExample: `{ key: 'prepend', type: 'prepend-array-item', label: 'Add First' }`
876
+ minimalExample: `{ key: 'prepend', type: 'prepend-array-item', label: 'Add First', template: { key: 'tag', type: 'input', label: 'Tag' } }`
761
877
  },
762
878
  {
763
879
  type: "insert-array-item",
@@ -765,17 +881,41 @@ var FIELD_TYPES = [
765
881
  description: "Button to insert a new item at a specific index in an array field (set via the index property). (Legacy alias: insertArrayItem.)",
766
882
  valueType: void 0,
767
883
  baseInterface: "FieldDef",
768
- props: {},
884
+ props: {
885
+ index: {
886
+ name: "index",
887
+ type: "number",
888
+ description: "REQUIRED. The position to insert at.",
889
+ required: true
890
+ },
891
+ template: {
892
+ name: "template",
893
+ type: "ArrayAllowedChildren | readonly ArrayAllowedChildren[]",
894
+ 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.",
895
+ required: true
896
+ },
897
+ arrayKey: {
898
+ name: "arrayKey",
899
+ type: "string",
900
+ description: "Key of the array to act on. Optional when the button sits inside that array, which supplies it from context.",
901
+ required: false
902
+ }
903
+ },
769
904
  validationSupported: false,
770
905
  source: "adapter",
771
- allowedIn: ["array", "row", "group"],
906
+ allowedIn: ["array", "row", "group", "container"],
772
907
  example: `{
773
908
  key: 'insertContact',
774
909
  type: 'insert-array-item',
775
910
  label: 'Insert',
776
- index: 1
911
+ index: 1,
912
+ // REQUIRED: what one new item looks like.
913
+ template: [
914
+ { key: 'name', type: 'input', label: 'Name' },
915
+ { key: 'email', type: 'input', label: 'Email' }
916
+ ]
777
917
  }`,
778
- minimalExample: `{ key: 'insert', type: 'insert-array-item', label: 'Insert', index: 0 }`
918
+ minimalExample: `{ key: 'insert', type: 'insert-array-item', label: 'Insert', index: 0, template: { key: 'tag', type: 'input', label: 'Tag' } }`
779
919
  },
780
920
  {
781
921
  type: "remove-array-item",
@@ -786,7 +926,7 @@ var FIELD_TYPES = [
786
926
  props: {},
787
927
  validationSupported: false,
788
928
  source: "adapter",
789
- allowedIn: ["array", "row", "group"],
929
+ allowedIn: ["array", "row", "group", "container"],
790
930
  example: `{
791
931
  key: 'removeContact',
792
932
  type: 'remove-array-item',
@@ -803,7 +943,7 @@ var FIELD_TYPES = [
803
943
  props: {},
804
944
  validationSupported: false,
805
945
  source: "adapter",
806
- allowedIn: ["array", "row", "group"],
946
+ allowedIn: ["array", "row", "group", "container"],
807
947
  example: `{
808
948
  key: 'popContact',
809
949
  type: 'pop-array-item',
@@ -821,7 +961,7 @@ var FIELD_TYPES = [
821
961
  props: {},
822
962
  validationSupported: false,
823
963
  source: "adapter",
824
- allowedIn: ["array", "row", "group"],
964
+ allowedIn: ["array", "row", "group", "container"],
825
965
  example: `{
826
966
  key: 'shiftContact',
827
967
  type: 'shift-array-item',
@@ -2700,7 +2840,7 @@ You MUST follow these practices when generating FormConfig objects for ng-forge.
2700
2840
 
2701
2841
  ## Core Principles
2702
2842
 
2703
- 1. **Configuration-driven**: ng-forge wraps Angular Reactive Forms. Define structure declaratively via \`FormConfig\`, not imperatively.
2843
+ 1. **Configuration-driven**: ng-forge is built on Angular Signal Forms. Define structure declaratively via \`FormConfig\`, not imperatively.
2704
2844
  2. **Type-safe**: Use TypeScript interfaces for form values. The library provides full type inference.
2705
2845
  3. **Validation-first**: Always include validation and user-friendly error messages.
2706
2846
 
@@ -3197,6 +3337,7 @@ Recommended when consuming Ionic's \`apply-ionic-legacy-error-styles\` mixin, wh
3197
3337
  - \`withEventFormValue()\` \u2014 attach the current form value to every dispatched event
3198
3338
  - \`withValueExclusionDefaults(options)\` \u2014 set form-wide value exclusion defaults
3199
3339
  - \`withValidationExecutionDefaults(options)\` \u2014 set form-wide validation execution defaults (e.g. defer until touched)
3340
+ - \`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.
3200
3341
 
3201
3342
  All features are exported from \`@ng-forge/dynamic-forms\`.
3202
3343
 
@@ -3242,23 +3383,31 @@ All features are exported from \`@ng-forge/dynamic-forms\`.
3242
3383
 
3243
3384
  ## CRITICAL: UI Library Differences
3244
3385
 
3245
- Different UI libraries support different properties. Always validate against the correct library using \`ngforge_validate\` with the appropriate \`uiIntegration\` parameter.
3386
+ Different UI libraries support different \`props\`. Always validate against the library the project actually uses.
3246
3387
 
3247
- ### Property Differences by Library
3388
+ Which props exist is answered per adapter, not here: use the adapter's own reference
3389
+ (\`ngforge_lookup\` with the adapter, or the \`ng-forge-dynamic-forms-<adapter>\` skill). A table
3390
+ repeated here would be a second copy of the adapter registries and would drift from them.
3248
3391
 
3249
- | Property | Material | Bootstrap | PrimeNG | Ionic |
3250
- |----------|----------|-----------|---------|-------|
3251
- | \`appearance\` | \u2713 (fill, outline) | \u2717 | \u2717 | \u2713 (fill, outline) |
3252
- | \`subscriptSizing\` | \u2713 | \u2717 | \u2717 | \u2717 |
3253
- | \`floatLabel\` | \u2713 (auto, always, never) | \u2717 | \u2717 | \u2717 |
3254
- | \`hideRequiredMarker\` | \u2713 | \u2717 | \u2717 | \u2717 |
3255
- | \`hint\` | \u2713 | \u2713 (as \`helpText\`) | \u2713 | \u2713 |
3392
+ Two adapters cannot both provide the same field type, so a project has one adapter per
3393
+ field type; TypeScript reports error 2717 when two try.
3256
3394
 
3257
3395
  ### Container Fields
3258
3396
 
3259
- Container fields (\`page\`, \`group\`, \`row\`) do NOT support these properties:
3260
- - \`label\` - Use \`text\` field type for headings instead
3261
- - \`required\`, \`email\`, \`min\`, \`max\`, etc. - Validation is for leaf fields only
3397
+ No container has a \`label\`. Use a \`text\` field for a heading instead.
3398
+
3399
+ Validation splits by whether the container owns a value:
3400
+
3401
+ - \`group\` and \`array\` DO accept \`required\`, \`validators\`, \`validationMessages\`
3402
+ and \`validateWhenHidden\`. A validator there runs against the container's own
3403
+ subtree, so a cross-field rule (dateTo after dateFrom) belongs on the group
3404
+ rather than on one of its children. \`ctx.value()\` is the group's object or the
3405
+ array's item list.
3406
+ - \`page\`, \`row\` and \`container\` do NOT. They flatten into their parent and have
3407
+ no schema path, so a validator on them would have nothing to run against.
3408
+
3409
+ Leaf-level validators such as \`email\`, \`min\` and \`max\` belong on the field that
3410
+ holds the value, on any container.
3262
3411
 
3263
3412
  ### Common Mistakes to Avoid
3264
3413
 
@@ -3276,34 +3425,48 @@ Container fields (\`page\`, \`group\`, \`row\`) do NOT support these properties:
3276
3425
 
3277
3426
  3. **Adding \`id\` to FormConfig** - The root FormConfig does not accept an \`id\` property.
3278
3427
 
3279
- 4. **Putting slider min/max in props** - For slider fields, \`min\`, \`max\`, and \`step\` are field-level properties:
3428
+ 4. **Using \`min\`/\`max\` for a slider's range** - A slider's range is
3429
+ \`minValue\`, \`maxValue\` and \`step\`, at field level. \`min\` and \`max\` are
3430
+ validation shorthands: they typecheck, they validate clean, and the slider
3431
+ still renders its default 0-100 range, so nothing catches the mistake.
3280
3432
  \`\`\`typescript
3281
- // \u274C WRONG
3433
+ // \u274C WRONG - validates clean, renders the wrong range
3282
3434
  { key: 'volume', type: 'slider', label: 'Volume', props: { min: 0, max: 100 } }
3435
+ { key: 'volume', type: 'slider', label: 'Volume', min: 0, max: 100 }
3283
3436
 
3284
3437
  // \u2705 CORRECT
3285
- { key: 'volume', type: 'slider', label: 'Volume', min: 0, max: 100 }
3438
+ { key: 'volume', type: 'slider', label: 'Volume', minValue: 0, maxValue: 100, step: 5 }
3286
3439
  \`\`\`
3287
3440
 
3288
3441
  5. **Using unsupported field types** - Each UI library supports specific field types. Use \`ngforge_lookup\` with \`depth: "schema"\` to see available types.
3289
3442
 
3290
3443
  ## Validation Before Use
3291
3444
 
3292
- 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.
3445
+ Never hand back a config you have not checked. Two routes, depending on what is
3446
+ available:
3293
3447
 
3294
- \`\`\`typescript
3295
- // Always specify the UI integration you're using
3296
- ngforge_validate({
3297
- uiIntegration: 'material', // or 'bootstrap', 'primeng', 'ionic'
3298
- config: { fields: [...] }
3299
- })
3300
- \`\`\`
3448
+ - With the MCP server: \`ngforge_validate({ uiIntegration: 'material', config })\`
3449
+ - Without it: \`npx --yes @ng-forge/dynamic-forms-cli@next "path/to/your.form.ts" --ui material\`
3301
3450
 
3302
- To understand what properties are supported for each field type, use \`ngforge_lookup\` with \`depth: "schema"\`:
3451
+ Both run the same schemas, so they agree.
3303
3452
 
3304
- \`\`\`typescript
3305
- ngforge_lookup({ topic: 'input', depth: 'schema', uiIntegration: 'material' })
3306
- \`\`\`
3453
+ ### What a clean run does and does not mean
3454
+
3455
+ A clean run means the structure is right: the field types exist, required
3456
+ properties are present, options are in the right place, and containers are not
3457
+ carrying properties they cannot have.
3458
+
3459
+ It does NOT mean every property you wrote is real. The schemas strip unknown keys
3460
+ rather than rejecting them, so an invented or misplaced property passes
3461
+ validation and is silently dropped at runtime. Measured examples that pass today:
3462
+ \`hideWhen\` on a field and \`targetProperty\` inside a derivation.
3463
+
3464
+ \`as const satisfies FormConfig\` is what catches those, because TypeScript checks
3465
+ the property names. Use both: the type annotation for what exists, the validator
3466
+ for what is structurally correct.
3467
+
3468
+ To see which properties a field type supports, use \`ngforge_lookup\` with
3469
+ \`depth: "schema"\`, or read the field-types reference in the skill.
3307
3470
  `;
3308
3471
 
3309
3472
  // packages/dynamic-form-mcp/src/resources/instructions.resource.ts
@@ -4333,18 +4496,41 @@ import { z as z3 } from "zod";
4333
4496
  var FieldMetaSchema = z3.record(z3.string(), z3.union([z3.string(), z3.number(), z3.boolean(), z3.undefined()]));
4334
4497
 
4335
4498
  // internal/dynamic-forms-validation/src/lib/schemas/field/field-def.schema.ts
4499
+ import { z as z5 } from "zod";
4500
+
4501
+ // internal/dynamic-forms-validation/src/lib/schemas/field/field-web-mcp.schema.ts
4336
4502
  import { z as z4 } from "zod";
4337
- var BaseFieldDefSchema = z4.object({
4503
+ var FieldWebMcpOptionsSchema = z4.object({
4504
+ /**
4505
+ * Whether an agent may see this field's value in a tool response.
4506
+ *
4507
+ * Defaults to true, except for a `hidden` field type or an input whose
4508
+ * `props.type` is `'password'`. A withheld value is replaced by a marker
4509
+ * rather than dropped, so the agent still knows the field exists.
4510
+ */
4511
+ readable: z4.boolean().optional(),
4512
+ /**
4513
+ * Whether an agent may write this field.
4514
+ *
4515
+ * Defaults to true, except for a `hidden` field type, a field with a
4516
+ * `derivation`, or one that is `readonly`.
4517
+ */
4518
+ writable: z4.boolean().optional()
4519
+ });
4520
+ var FieldWebMcpConfigSchema = z4.union([FieldWebMcpOptionsSchema, z4.literal(false)]);
4521
+
4522
+ // internal/dynamic-forms-validation/src/lib/schemas/field/field-def.schema.ts
4523
+ var BaseFieldDefSchema = z5.object({
4338
4524
  /**
4339
4525
  * Unique field identifier within the form.
4340
4526
  * Used as the form control name and for targeting in logic expressions.
4341
4527
  */
4342
- key: z4.string(),
4528
+ key: z5.string(),
4343
4529
  /**
4344
4530
  * Field type discriminant.
4345
4531
  * Determines which component renders the field.
4346
4532
  */
4347
- type: z4.string(),
4533
+ type: z5.string(),
4348
4534
  /**
4349
4535
  * Human-readable label displayed next to the field.
4350
4536
  */
@@ -4357,58 +4543,68 @@ var BaseFieldDefSchema = z4.object({
4357
4543
  /**
4358
4544
  * CSS classes applied to the field wrapper (space-separated).
4359
4545
  */
4360
- className: z4.string().optional(),
4546
+ className: z5.string().optional(),
4361
4547
  /**
4362
4548
  * Whether the field is disabled (non-interactive but visible).
4363
4549
  */
4364
- disabled: z4.boolean().optional(),
4550
+ disabled: z5.boolean().optional(),
4365
4551
  /**
4366
4552
  * Whether the field is read-only (displays value but not editable).
4367
4553
  */
4368
- readonly: z4.boolean().optional(),
4554
+ readonly: z5.boolean().optional(),
4369
4555
  /**
4370
4556
  * Whether the field is hidden from view.
4371
4557
  */
4372
- hidden: z4.boolean().optional(),
4558
+ hidden: z5.boolean().optional(),
4373
4559
  /**
4374
4560
  * Tab order for keyboard navigation.
4375
4561
  */
4376
- tabIndex: z4.number().optional(),
4562
+ tabIndex: z5.number().optional(),
4377
4563
  /**
4378
4564
  * Grid column width (1-12) in a 12-column layout system.
4379
4565
  */
4380
- col: z4.number().min(1).max(12).optional(),
4566
+ col: z5.number().min(1).max(12).optional(),
4381
4567
  /**
4382
4568
  * Whether to exclude this field's value from submission output when hidden.
4383
4569
  * Overrides both the global and form-level settings.
4384
4570
  */
4385
- excludeValueIfHidden: z4.boolean().optional(),
4571
+ excludeValueIfHidden: z5.boolean().optional(),
4386
4572
  /**
4387
4573
  * Whether to exclude this field's value from submission output when disabled.
4388
4574
  * Overrides both the global and form-level settings.
4389
4575
  */
4390
- excludeValueIfDisabled: z4.boolean().optional(),
4576
+ excludeValueIfDisabled: z5.boolean().optional(),
4391
4577
  /**
4392
4578
  * Whether to exclude this field's value from submission output when readonly.
4393
4579
  * Overrides both the global and form-level settings.
4394
4580
  */
4395
- excludeValueIfReadonly: z4.boolean().optional(),
4581
+ excludeValueIfReadonly: z5.boolean().optional(),
4396
4582
  /**
4397
4583
  * Whether to run validation when this field is hidden.
4398
4584
  * Inherited from the parent field (and form/global defaults). Defaults to false.
4399
4585
  */
4400
- validateWhenHidden: z4.boolean().optional()
4586
+ validateWhenHidden: z5.boolean().optional(),
4587
+ /**
4588
+ * What a browser AI agent may do with this field, when the form opts in to
4589
+ * WebMCP through `options.webMcp`.
4590
+ *
4591
+ * Overrides either axis of the conservative default, or `false` to hide the
4592
+ * field from agents entirely. Without this key on the schema a parsed config
4593
+ * silently loses the policy, so a generated or round-tripped config would
4594
+ * quietly widen what an agent can see and write.
4595
+ */
4596
+ webMcp: FieldWebMcpConfigSchema.optional()
4401
4597
  });
4402
4598
 
4403
4599
  // internal/dynamic-forms-validation/src/lib/schemas/field/field-with-validation.schema.ts
4404
- import { z as z11 } from "zod";
4600
+ import { z as z12 } from "zod";
4405
4601
 
4406
4602
  // internal/dynamic-forms-validation/src/lib/schemas/validation/validator-config.schema.ts
4407
- import { z as z6 } from "zod";
4603
+ import { z as z7 } from "zod";
4408
4604
 
4409
4605
  // internal/dynamic-forms-validation/src/lib/schemas/logic/conditional-expression.schema.ts
4410
- import { z as z5 } from "zod";
4411
- var ComparisonOperatorSchema = z5.enum([
4606
+ import { z as z6 } from "zod";
4607
+ var ComparisonOperatorSchema = z6.enum([
4412
4608
  "equals",
4413
4609
  "notEquals",
4414
4610
  "greater",
@@ -4420,35 +4616,35 @@ var ComparisonOperatorSchema = z5.enum([
4420
4616
  "endsWith",
4421
4617
  "matches"
4422
4618
  ]);
4423
- var BaseComparisonConditionSchema = z5.object({
4619
+ var BaseComparisonConditionSchema = z6.object({
4424
4620
  operator: ComparisonOperatorSchema.optional(),
4425
- value: z5.unknown().optional()
4621
+ value: z6.unknown().optional()
4426
4622
  });
4427
4623
  var FieldValueConditionSchema = BaseComparisonConditionSchema.extend({
4428
- type: z5.literal("fieldValue"),
4624
+ type: z6.literal("fieldValue"),
4429
4625
  /**
4430
4626
  * Path to the field to check.
4431
4627
  * Supports dot notation for nested fields.
4432
4628
  */
4433
- fieldPath: z5.string()
4629
+ fieldPath: z6.string()
4434
4630
  });
4435
- var CustomConditionSchema = z5.object({
4436
- type: z5.literal("custom"),
4631
+ var CustomConditionSchema = z6.object({
4632
+ type: z6.literal("custom"),
4437
4633
  /**
4438
4634
  * Name of a registered custom function to invoke.
4439
4635
  */
4440
- functionName: z5.string()
4636
+ functionName: z6.string()
4441
4637
  });
4442
- var JavaScriptConditionSchema = z5.object({
4443
- type: z5.literal("javascript"),
4638
+ var JavaScriptConditionSchema = z6.object({
4639
+ type: z6.literal("javascript"),
4444
4640
  /**
4445
4641
  * JavaScript expression to evaluate.
4446
4642
  * Has access to: fieldValue, formValue, fieldPath
4447
4643
  */
4448
- expression: z5.string()
4644
+ expression: z6.string()
4449
4645
  });
4450
- var ConditionalExpressionSchema = z5.lazy(
4451
- () => z5.discriminatedUnion("type", [
4646
+ var ConditionalExpressionSchema = z6.lazy(
4647
+ () => z6.discriminatedUnion("type", [
4452
4648
  FieldValueConditionSchema,
4453
4649
  CustomConditionSchema,
4454
4650
  JavaScriptConditionSchema,
@@ -4456,116 +4652,116 @@ var ConditionalExpressionSchema = z5.lazy(
4456
4652
  OrConditionSchema
4457
4653
  ])
4458
4654
  );
4459
- var AndConditionSchema = z5.object({
4460
- type: z5.literal("and"),
4655
+ var AndConditionSchema = z6.object({
4656
+ type: z6.literal("and"),
4461
4657
  /**
4462
4658
  * Array of conditions that must all be true.
4463
4659
  */
4464
- conditions: z5.array(z5.lazy(() => ConditionalExpressionSchema))
4660
+ conditions: z6.array(z6.lazy(() => ConditionalExpressionSchema))
4465
4661
  });
4466
- var OrConditionSchema = z5.object({
4467
- type: z5.literal("or"),
4662
+ var OrConditionSchema = z6.object({
4663
+ type: z6.literal("or"),
4468
4664
  /**
4469
4665
  * Array of conditions where at least one must be true.
4470
4666
  */
4471
- conditions: z5.array(z5.lazy(() => ConditionalExpressionSchema))
4667
+ conditions: z6.array(z6.lazy(() => ConditionalExpressionSchema))
4472
4668
  });
4473
4669
 
4474
4670
  // internal/dynamic-forms-validation/src/lib/schemas/validation/validator-config.schema.ts
4475
- var BaseValidatorSchema = z6.object({
4671
+ var BaseValidatorSchema = z7.object({
4476
4672
  /**
4477
4673
  * Condition for when this validator should be applied.
4478
4674
  * If omitted, validator is always active.
4479
4675
  */
4480
4676
  when: ConditionalExpressionSchema.optional()
4481
4677
  });
4482
- var BuiltInValidatorParamsSchema = z6.object({
4678
+ var BuiltInValidatorParamsSchema = z7.object({
4483
4679
  /**
4484
4680
  * Static value for the validator parameter.
4485
4681
  */
4486
- value: z6.union([z6.number(), z6.string()]).optional(),
4682
+ value: z7.union([z7.number(), z7.string()]).optional(),
4487
4683
  /**
4488
4684
  * Dynamic expression that evaluates to the validator parameter.
4489
4685
  */
4490
- expression: z6.string().optional()
4686
+ expression: z7.string().optional()
4491
4687
  });
4492
- var ValidatorConfigSchema = z6.discriminatedUnion("type", [
4688
+ var ValidatorConfigSchema = z7.discriminatedUnion("type", [
4493
4689
  // Built-in validators
4494
4690
  BaseValidatorSchema.merge(BuiltInValidatorParamsSchema).extend({
4495
- type: z6.literal("required")
4691
+ type: z7.literal("required")
4496
4692
  }),
4497
4693
  BaseValidatorSchema.merge(BuiltInValidatorParamsSchema).extend({
4498
- type: z6.literal("email")
4694
+ type: z7.literal("email")
4499
4695
  }),
4500
4696
  BaseValidatorSchema.merge(BuiltInValidatorParamsSchema).extend({
4501
- type: z6.literal("min")
4697
+ type: z7.literal("min")
4502
4698
  }),
4503
4699
  BaseValidatorSchema.merge(BuiltInValidatorParamsSchema).extend({
4504
- type: z6.literal("max")
4700
+ type: z7.literal("max")
4505
4701
  }),
4506
4702
  BaseValidatorSchema.merge(BuiltInValidatorParamsSchema).extend({
4507
- type: z6.literal("minLength")
4703
+ type: z7.literal("minLength")
4508
4704
  }),
4509
4705
  BaseValidatorSchema.merge(BuiltInValidatorParamsSchema).extend({
4510
- type: z6.literal("maxLength")
4706
+ type: z7.literal("maxLength")
4511
4707
  }),
4512
4708
  BaseValidatorSchema.merge(BuiltInValidatorParamsSchema).extend({
4513
- type: z6.literal("pattern")
4709
+ type: z7.literal("pattern")
4514
4710
  }),
4515
4711
  // Custom synchronous validators
4516
4712
  BaseValidatorSchema.extend({
4517
- type: z6.literal("custom"),
4713
+ type: z7.literal("custom"),
4518
4714
  /**
4519
4715
  * Name of a registered custom validator function.
4520
4716
  */
4521
- functionName: z6.string().optional(),
4717
+ functionName: z7.string().optional(),
4522
4718
  /**
4523
4719
  * Parameters passed to the custom validator function.
4524
4720
  */
4525
- params: z6.record(z6.string(), z6.unknown()).optional(),
4721
+ params: z7.record(z7.string(), z7.unknown()).optional(),
4526
4722
  /**
4527
4723
  * JavaScript expression to evaluate for validation.
4528
4724
  */
4529
- expression: z6.string().optional(),
4725
+ expression: z7.string().optional(),
4530
4726
  /**
4531
4727
  * Error kind identifier for linking to validation messages.
4532
4728
  */
4533
- kind: z6.string().optional(),
4729
+ kind: z7.string().optional(),
4534
4730
  /**
4535
4731
  * Error context parameters for message interpolation.
4536
4732
  */
4537
- errorParams: z6.record(z6.string(), z6.string()).optional()
4733
+ errorParams: z7.record(z7.string(), z7.string()).optional()
4538
4734
  }),
4539
4735
  // Async validators
4540
4736
  BaseValidatorSchema.extend({
4541
- type: z6.literal("async"),
4737
+ type: z7.literal("async"),
4542
4738
  /**
4543
4739
  * Name of a registered async validator function. Required.
4544
4740
  */
4545
- functionName: z6.string(),
4741
+ functionName: z7.string(),
4546
4742
  /**
4547
4743
  * Parameters passed to the async validator function.
4548
4744
  */
4549
- params: z6.record(z6.string(), z6.unknown()).optional()
4745
+ params: z7.record(z7.string(), z7.unknown()).optional()
4550
4746
  }),
4551
4747
  // HTTP validators
4552
4748
  BaseValidatorSchema.extend({
4553
- type: z6.literal("http"),
4749
+ type: z7.literal("http"),
4554
4750
  /**
4555
4751
  * Name of a registered HTTP validator config function. Required.
4556
4752
  */
4557
- functionName: z6.string(),
4753
+ functionName: z7.string(),
4558
4754
  /**
4559
4755
  * Parameters passed to the HTTP validator function.
4560
4756
  */
4561
- params: z6.record(z6.string(), z6.unknown()).optional()
4757
+ params: z7.record(z7.string(), z7.unknown()).optional()
4562
4758
  })
4563
4759
  ]);
4564
- var ValidatorsArraySchema = z6.array(ValidatorConfigSchema);
4760
+ var ValidatorsArraySchema = z7.array(ValidatorConfigSchema);
4565
4761
 
4566
4762
  // internal/dynamic-forms-validation/src/lib/schemas/validation/validation-messages.schema.ts
4567
- import { z as z7 } from "zod";
4568
- var ValidationMessagesSchema = z7.object({
4763
+ import { z as z8 } from "zod";
4764
+ var ValidationMessagesSchema = z8.object({
4569
4765
  required: DynamicTextSchema.optional(),
4570
4766
  email: DynamicTextSchema.optional(),
4571
4767
  min: DynamicTextSchema.optional(),
@@ -4576,15 +4772,15 @@ var ValidationMessagesSchema = z7.object({
4576
4772
  }).catchall(DynamicTextSchema.optional());
4577
4773
 
4578
4774
  // internal/dynamic-forms-validation/src/lib/schemas/logic/logic-config.schema.ts
4579
- import { z as z10 } from "zod";
4775
+ import { z as z11 } from "zod";
4580
4776
 
4581
4777
  // internal/dynamic-forms-validation/src/lib/schemas/logic/state-logic.schema.ts
4582
- import { z as z8 } from "zod";
4583
- var StateLogicTypeSchema = z8.enum(["hidden", "readonly", "disabled", "required"]);
4584
- var FormStateConditionSchema = z8.enum(["formInvalid", "formSubmitting", "pageInvalid"]);
4585
- var StateConditionSchema = z8.union([ConditionalExpressionSchema, z8.boolean(), FormStateConditionSchema]);
4586
- var LogicTriggerSchema = z8.enum(["onChange", "debounced"]);
4587
- var ImmediateStateLogicConfigSchema = z8.object({
4778
+ import { z as z9 } from "zod";
4779
+ var StateLogicTypeSchema = z9.enum(["hidden", "readonly", "disabled", "required"]);
4780
+ var FormStateConditionSchema = z9.enum(["formInvalid", "formSubmitting", "pageInvalid"]);
4781
+ var StateConditionSchema = z9.union([ConditionalExpressionSchema, z9.boolean(), FormStateConditionSchema]);
4782
+ var LogicTriggerSchema = z9.enum(["onChange", "debounced"]);
4783
+ var ImmediateStateLogicConfigSchema = z9.object({
4588
4784
  /**
4589
4785
  * The state property to control.
4590
4786
  */
@@ -4596,9 +4792,9 @@ var ImmediateStateLogicConfigSchema = z8.object({
4596
4792
  /**
4597
4793
  * Trigger type - defaults to 'onChange' for immediate evaluation.
4598
4794
  */
4599
- trigger: z8.literal("onChange").optional()
4795
+ trigger: z9.literal("onChange").optional()
4600
4796
  });
4601
- var DebouncedStateLogicConfigSchema = z8.object({
4797
+ var DebouncedStateLogicConfigSchema = z9.object({
4602
4798
  /**
4603
4799
  * The state property to control.
4604
4800
  */
@@ -4610,101 +4806,101 @@ var DebouncedStateLogicConfigSchema = z8.object({
4610
4806
  /**
4611
4807
  * Trigger type - must be 'debounced' for delayed evaluation.
4612
4808
  */
4613
- trigger: z8.literal("debounced"),
4809
+ trigger: z9.literal("debounced"),
4614
4810
  /**
4615
4811
  * Debounce duration in milliseconds. Defaults to 500.
4616
4812
  */
4617
- debounceMs: z8.number().positive().optional()
4813
+ debounceMs: z9.number().positive().optional()
4618
4814
  });
4619
- var StateLogicConfigSchema = z8.union([ImmediateStateLogicConfigSchema, DebouncedStateLogicConfigSchema]);
4815
+ var StateLogicConfigSchema = z9.union([ImmediateStateLogicConfigSchema, DebouncedStateLogicConfigSchema]);
4620
4816
 
4621
4817
  // internal/dynamic-forms-validation/src/lib/schemas/logic/derivation-logic.schema.ts
4622
- import { z as z9 } from "zod";
4623
- var OnChangeDerivationLogicConfigSchema = z9.object({
4818
+ import { z as z10 } from "zod";
4819
+ var OnChangeDerivationLogicConfigSchema = z10.object({
4624
4820
  /**
4625
4821
  * Discriminant for derivation logic.
4626
4822
  */
4627
- type: z9.literal("derivation"),
4823
+ type: z10.literal("derivation"),
4628
4824
  /**
4629
4825
  * Debug name for logging and troubleshooting.
4630
4826
  */
4631
- debugName: z9.string().optional(),
4827
+ debugName: z10.string().optional(),
4632
4828
  /**
4633
4829
  * Condition for when this derivation should run.
4634
4830
  * Defaults to true (always runs).
4635
4831
  */
4636
- condition: z9.union([ConditionalExpressionSchema, z9.boolean()]).optional(),
4832
+ condition: z10.union([ConditionalExpressionSchema, z10.boolean()]).optional(),
4637
4833
  /**
4638
4834
  * Static value to set. Mutually exclusive with expression/functionName.
4639
4835
  */
4640
- value: z9.unknown().optional(),
4836
+ value: z10.unknown().optional(),
4641
4837
  /**
4642
4838
  * JavaScript expression to evaluate for the value.
4643
4839
  * Has access to: fieldValue, formValue, fieldPath
4644
4840
  */
4645
- expression: z9.string().optional(),
4841
+ expression: z10.string().optional(),
4646
4842
  /**
4647
4843
  * Name of a registered derivation function.
4648
4844
  * The function must be registered in customFnConfig.derivations.
4649
4845
  */
4650
- functionName: z9.string().optional(),
4846
+ functionName: z10.string().optional(),
4651
4847
  /**
4652
4848
  * Explicit dependencies for determining when to re-evaluate.
4653
4849
  * If omitted, dependencies are auto-detected from the expression.
4654
4850
  */
4655
- dependsOn: z9.array(z9.string()).optional(),
4851
+ dependsOn: z10.array(z10.string()).optional(),
4656
4852
  /**
4657
4853
  * Trigger type - defaults to 'onChange' for immediate evaluation.
4658
4854
  */
4659
- trigger: z9.literal("onChange").optional()
4855
+ trigger: z10.literal("onChange").optional()
4660
4856
  });
4661
- var DebouncedDerivationLogicConfigSchema = z9.object({
4857
+ var DebouncedDerivationLogicConfigSchema = z10.object({
4662
4858
  /**
4663
4859
  * Discriminant for derivation logic.
4664
4860
  */
4665
- type: z9.literal("derivation"),
4861
+ type: z10.literal("derivation"),
4666
4862
  /**
4667
4863
  * Debug name for logging and troubleshooting.
4668
4864
  */
4669
- debugName: z9.string().optional(),
4865
+ debugName: z10.string().optional(),
4670
4866
  /**
4671
4867
  * Condition for when this derivation should run.
4672
4868
  */
4673
- condition: z9.union([ConditionalExpressionSchema, z9.boolean()]).optional(),
4869
+ condition: z10.union([ConditionalExpressionSchema, z10.boolean()]).optional(),
4674
4870
  /**
4675
4871
  * Static value to set.
4676
4872
  */
4677
- value: z9.unknown().optional(),
4873
+ value: z10.unknown().optional(),
4678
4874
  /**
4679
4875
  * JavaScript expression to evaluate for the value.
4680
4876
  */
4681
- expression: z9.string().optional(),
4877
+ expression: z10.string().optional(),
4682
4878
  /**
4683
4879
  * Name of a registered derivation function.
4684
4880
  */
4685
- functionName: z9.string().optional(),
4881
+ functionName: z10.string().optional(),
4686
4882
  /**
4687
4883
  * Explicit dependencies for determining when to re-evaluate.
4688
4884
  */
4689
- dependsOn: z9.array(z9.string()).optional(),
4885
+ dependsOn: z10.array(z10.string()).optional(),
4690
4886
  /**
4691
4887
  * Trigger type - must be 'debounced' for delayed evaluation.
4692
4888
  */
4693
- trigger: z9.literal("debounced"),
4889
+ trigger: z10.literal("debounced"),
4694
4890
  /**
4695
4891
  * Debounce duration in milliseconds. Defaults to 500.
4696
4892
  */
4697
- debounceMs: z9.number().positive().optional()
4893
+ debounceMs: z10.number().positive().optional()
4698
4894
  });
4699
- var DerivationLogicConfigSchema = z9.union([OnChangeDerivationLogicConfigSchema, DebouncedDerivationLogicConfigSchema]);
4895
+ var DerivationLogicConfigSchema = z10.union([OnChangeDerivationLogicConfigSchema, DebouncedDerivationLogicConfigSchema]);
4700
4896
 
4701
4897
  // internal/dynamic-forms-validation/src/lib/schemas/logic/logic-config.schema.ts
4702
- var LogicConfigSchema = z10.union([StateLogicConfigSchema, DerivationLogicConfigSchema]);
4703
- var LogicArraySchema = z10.array(LogicConfigSchema);
4898
+ var LogicConfigSchema = z11.union([StateLogicConfigSchema, DerivationLogicConfigSchema]);
4899
+ var LogicArraySchema = z11.array(LogicConfigSchema);
4704
4900
 
4705
4901
  // internal/dynamic-forms-validation/src/lib/schemas/field/field-with-validation.schema.ts
4706
- var SchemaApplicationTypeSchema = z11.enum(["apply", "applyWhen", "applyWhenValue", "applyEach"]);
4707
- var SchemaApplicationConfigSchema = z11.object({
4902
+ var SchemaApplicationTypeSchema = z12.enum(["apply", "applyWhen", "applyWhenValue", "applyEach"]);
4903
+ var SchemaApplicationConfigSchema = z12.object({
4708
4904
  /**
4709
4905
  * How to apply the schema.
4710
4906
  */
@@ -4713,7 +4909,7 @@ var SchemaApplicationConfigSchema = z11.object({
4713
4909
  * Schema name (reference) or inline schema definition.
4714
4910
  * For JSON configs, this is always a string reference.
4715
4911
  */
4716
- schema: z11.string(),
4912
+ schema: z12.string(),
4717
4913
  /**
4718
4914
  * Condition for 'applyWhen' type.
4719
4915
  */
@@ -4721,34 +4917,34 @@ var SchemaApplicationConfigSchema = z11.object({
4721
4917
  /**
4722
4918
  * Type predicate expression for 'applyWhenValue' type.
4723
4919
  */
4724
- typePredicate: z11.string().optional()
4920
+ typePredicate: z12.string().optional()
4725
4921
  });
4726
- var FieldWithValidationSchema = z11.object({
4922
+ var FieldWithValidationSchema = z12.object({
4727
4923
  // Simple validation rules (ease of use)
4728
4924
  /**
4729
4925
  * Whether the field is required.
4730
4926
  */
4731
- required: z11.boolean().optional(),
4927
+ required: z12.boolean().optional(),
4732
4928
  /**
4733
4929
  * Whether to apply email validation.
4734
4930
  */
4735
- email: z11.boolean().optional(),
4931
+ email: z12.boolean().optional(),
4736
4932
  /**
4737
4933
  * Minimum numeric value.
4738
4934
  */
4739
- min: z11.number().optional(),
4935
+ min: z12.number().optional(),
4740
4936
  /**
4741
4937
  * Maximum numeric value.
4742
4938
  */
4743
- max: z11.number().optional(),
4939
+ max: z12.number().optional(),
4744
4940
  /**
4745
4941
  * Minimum string length.
4746
4942
  */
4747
- minLength: z11.number().optional(),
4943
+ minLength: z12.number().optional(),
4748
4944
  /**
4749
4945
  * Maximum string length.
4750
4946
  */
4751
- maxLength: z11.number().optional(),
4947
+ maxLength: z12.number().optional(),
4752
4948
  /**
4753
4949
  * Regex pattern for validation.
4754
4950
  *
@@ -4764,7 +4960,7 @@ var FieldWithValidationSchema = z11.object({
4764
4960
  * "pattern": "^[a-z]+$"
4765
4961
  * ```
4766
4962
  */
4767
- pattern: z11.string().optional(),
4963
+ pattern: z12.string().optional(),
4768
4964
  // Advanced validation configuration
4769
4965
  /**
4770
4966
  * Array of advanced validator configurations.
@@ -4783,22 +4979,22 @@ var FieldWithValidationSchema = z11.object({
4783
4979
  * Shorthand for simple computed/derived fields.
4784
4980
  * JavaScript expression that computes the field value.
4785
4981
  */
4786
- derivation: z11.string().optional(),
4982
+ derivation: z12.string().optional(),
4787
4983
  // Schema applications
4788
4984
  /**
4789
4985
  * Array of schema applications for reusable validation patterns.
4790
4986
  */
4791
- schemas: z11.array(SchemaApplicationConfigSchema).optional()
4987
+ schemas: z12.array(SchemaApplicationConfigSchema).optional()
4792
4988
  });
4793
4989
 
4794
4990
  // internal/dynamic-forms-validation/src/lib/schemas/field/nullable-value.refinement.ts
4795
- import { z as z12 } from "zod";
4991
+ import { z as z13 } from "zod";
4796
4992
  var nullableValueRefine = (data, ctx) => {
4797
4993
  if (!data || typeof data !== "object") return;
4798
4994
  const field = data;
4799
4995
  if (field.value === null && field.nullable !== true) {
4800
4996
  ctx.addIssue({
4801
- code: z12.ZodIssueCode.custom,
4997
+ code: z13.ZodIssueCode.custom,
4802
4998
  path: ["value"],
4803
4999
  message: "value: null is only allowed when nullable is true. Add `nullable: true` or remove the null value."
4804
5000
  });
@@ -4806,20 +5002,28 @@ var nullableValueRefine = (data, ctx) => {
4806
5002
  };
4807
5003
 
4808
5004
  // internal/dynamic-forms-validation/src/lib/schemas/containers/factories.ts
4809
- import { z as z13 } from "zod";
4810
- var ContainerLogicSchema = z13.object({
4811
- type: z13.literal("hidden"),
4812
- condition: z13.union([ConditionalExpressionSchema, z13.boolean()])
4813
- });
5005
+ import { z as z14 } from "zod";
5006
+ var ContainerLogicSchema = z14.object({
5007
+ type: z14.literal("hidden"),
5008
+ condition: z14.union([ConditionalExpressionSchema, z14.boolean()])
5009
+ });
5010
+ var SIMPLIFIED_ONLY_PROPS = ["template", "value", "addButton", "removeButton"];
5011
+ var SIMPLIFIED_ONLY_HINTS = {
5012
+ template: 'Use "fields" for the full API, or "template" for the simplified one.',
5013
+ value: 'Set initial values on the field definitions inside "fields".',
5014
+ addButton: 'Add an "add-array-item" or "insert-array-item" button as a field.',
5015
+ removeButton: 'Add a "remove-array-item" button to the item definition.'
5016
+ };
4814
5017
  function createContainerSchemas(options) {
4815
5018
  const { leafFieldSchema } = options;
4816
- const AnyFieldSchema = z13.lazy(
4817
- () => z13.union([
5019
+ const AnyFieldSchema = z14.lazy(
5020
+ () => z14.discriminatedUnion("type", [
4818
5021
  leafFieldSchema,
4819
5022
  PageFieldSchema,
4820
5023
  RowFieldSchema,
4821
5024
  GroupFieldSchema,
4822
- ArrayFieldSchema
5025
+ ArrayFieldSchema,
5026
+ ContainerFieldSchema
4823
5027
  ])
4824
5028
  );
4825
5029
  const ContainerBaseSchema = BaseFieldDefSchema.omit({
@@ -4828,81 +5032,133 @@ function createContainerSchemas(options) {
4828
5032
  }).extend({
4829
5033
  // Explicitly forbid label on container fields
4830
5034
  // This makes Zod reject any value for these properties
4831
- label: z13.never().optional(),
4832
- meta: z13.never().optional()
5035
+ label: z14.never().optional(),
5036
+ meta: z14.never().optional()
5037
+ });
5038
+ const ContainerValidationShape = {
5039
+ required: z14.boolean().optional(),
5040
+ validators: ValidatorsArraySchema.optional(),
5041
+ validationMessages: ValidationMessagesSchema.optional()
5042
+ };
5043
+ const WrapperConfigSchema = z14.object({ type: z14.string() }).passthrough();
5044
+ const ContainerFieldSchema = ContainerBaseSchema.extend({
5045
+ type: z14.literal("container"),
5046
+ fields: z14.array(AnyFieldSchema),
5047
+ wrappers: z14.array(WrapperConfigSchema),
5048
+ logic: z14.array(ContainerLogicSchema).optional()
4833
5049
  });
4834
5050
  const PageFieldSchema = ContainerBaseSchema.extend({
4835
- type: z13.literal("page"),
4836
- fields: z13.array(AnyFieldSchema),
4837
- logic: z13.array(ContainerLogicSchema).optional(),
5051
+ type: z14.literal("page"),
5052
+ fields: z14.array(AnyFieldSchema),
5053
+ logic: z14.array(ContainerLogicSchema).optional(),
4838
5054
  // Also forbid title (common mistake)
4839
- title: z13.never().optional()
5055
+ title: z14.never().optional()
4840
5056
  });
4841
5057
  const RowFieldSchema = ContainerBaseSchema.extend({
4842
- type: z13.literal("row"),
4843
- fields: z13.array(AnyFieldSchema),
5058
+ type: z14.literal("row"),
5059
+ fields: z14.array(AnyFieldSchema),
4844
5060
  // Container logic - only 'hidden' type allowed (same as pages)
4845
- logic: z13.array(ContainerLogicSchema).optional()
5061
+ logic: z14.array(ContainerLogicSchema).optional()
4846
5062
  });
4847
5063
  const GroupFieldSchema = ContainerBaseSchema.extend({
4848
- type: z13.literal("group"),
4849
- fields: z13.array(AnyFieldSchema),
5064
+ type: z14.literal("group"),
5065
+ fields: z14.array(AnyFieldSchema),
5066
+ ...ContainerValidationShape,
4850
5067
  // Container logic - only 'hidden' type allowed (same as pages)
4851
- logic: z13.array(ContainerLogicSchema).optional()
4852
- });
4853
- const ArrayButtonConfigSchema = z13.object({
4854
- label: z13.string().optional(),
4855
- props: z13.record(z13.unknown()).optional()
5068
+ logic: z14.array(ContainerLogicSchema).optional()
4856
5069
  });
4857
- const FullArrayFieldSchema = ContainerBaseSchema.extend({
4858
- type: z13.literal("array"),
4859
- fields: z13.array(AnyFieldSchema),
4860
- logic: z13.array(ContainerLogicSchema).optional(),
4861
- // Full API does not use template
4862
- template: z13.never().optional(),
4863
- // Array length validation
4864
- minLength: z13.number().int().min(0).optional(),
4865
- maxLength: z13.number().int().min(0).optional()
5070
+ const ArrayButtonConfigSchema = z14.object({
5071
+ label: z14.string().optional(),
5072
+ props: z14.record(z14.string(), z14.unknown()).optional()
4866
5073
  });
4867
- const ArrayAllowedChildSchema = z13.lazy(
5074
+ const ArrayAllowedChildSchema = z14.lazy(
4868
5075
  () => AnyFieldSchema.refine((field) => field.type !== "page" && field.type !== "array", {
4869
5076
  message: "Array templates cannot contain page or array fields. Only leaf fields, rows, and groups are allowed."
4870
5077
  })
4871
5078
  );
4872
- const SimplifiedArrayFieldSchema = ContainerBaseSchema.extend({
4873
- type: z13.literal("array"),
4874
- // Template: single field (primitive array) or array of fields (object array)
5079
+ const ArrayFieldSchema = ContainerBaseSchema.extend({
5080
+ type: z14.literal("array"),
5081
+ ...ContainerValidationShape,
5082
+ // Full API: explicit item definitions.
5083
+ fields: z14.array(AnyFieldSchema).optional(),
5084
+ // Simplified API: single field (primitive array) or array of fields (object array).
4875
5085
  // Only ArrayAllowedChildren (leaf fields, rows, groups) are valid — no pages or nested arrays.
4876
- template: z13.union([ArrayAllowedChildSchema, z13.array(ArrayAllowedChildSchema)]),
5086
+ template: z14.union([ArrayAllowedChildSchema, z14.array(ArrayAllowedChildSchema)]).optional(),
4877
5087
  // Initial values for the array
4878
- value: z13.array(z13.unknown()).optional(),
5088
+ value: z14.array(z14.unknown()).optional(),
4879
5089
  // Button customization or opt-out (false to disable)
4880
- addButton: z13.union([ArrayButtonConfigSchema, z13.literal(false)]).optional(),
4881
- removeButton: z13.union([ArrayButtonConfigSchema, z13.literal(false)]).optional(),
4882
- logic: z13.array(ContainerLogicSchema).optional(),
5090
+ addButton: z14.union([ArrayButtonConfigSchema, z14.literal(false)]).optional(),
5091
+ removeButton: z14.union([ArrayButtonConfigSchema, z14.literal(false)]).optional(),
5092
+ logic: z14.array(ContainerLogicSchema).optional(),
4883
5093
  // Array length validation
4884
- minLength: z13.number().int().min(0).optional(),
4885
- maxLength: z13.number().int().min(0).optional(),
4886
- // Simplified API does not use fields
4887
- fields: z13.never().optional(),
4888
- minItems: z13.never().optional(),
4889
- maxItems: z13.never().optional()
5094
+ minLength: z14.number().int().min(0).optional(),
5095
+ maxLength: z14.number().int().min(0).optional(),
5096
+ // The array size properties are minLength/maxLength. These are the common
5097
+ // wrong spelling, and naming them keeps the mistake from being silently
5098
+ // stripped. Previously only the simplified API rejected them.
5099
+ minItems: z14.never().optional(),
5100
+ maxItems: z14.never().optional()
5101
+ }).superRefine((field, ctx) => {
5102
+ const hasFields = field.fields !== void 0;
5103
+ const hasTemplate = field.template !== void 0;
5104
+ if (hasFields && hasTemplate) {
5105
+ ctx.addIssue({
5106
+ code: "custom",
5107
+ message: 'Array has BOTH "fields" and "template". These are mutually exclusive: use "fields" for the full API, or "template" + "value" for the simplified API.'
5108
+ });
5109
+ return;
5110
+ }
5111
+ if (!hasFields && !hasTemplate) {
5112
+ ctx.addIssue({
5113
+ code: "custom",
5114
+ message: 'Array is MISSING both "fields" and "template". Use "fields" (full API) or "template" + "value" (simplified API).'
5115
+ });
5116
+ return;
5117
+ }
5118
+ if (hasFields) {
5119
+ for (const prop of SIMPLIFIED_ONLY_PROPS) {
5120
+ if (prop === "template" || field[prop] === void 0) continue;
5121
+ ctx.addIssue({
5122
+ code: "custom",
5123
+ path: [prop],
5124
+ message: `Array uses the full API ("fields"), so "${prop}" is not allowed: it belongs to the simplified API. ${SIMPLIFIED_ONLY_HINTS[prop]}`
5125
+ });
5126
+ }
5127
+ }
5128
+ }).meta({
5129
+ // The refinement above is invisible to JSON Schema generation, and the
5130
+ // generated schema is authoring guidance for a model. Two optional
5131
+ // properties with no stated relationship reads as "pass either, both or
5132
+ // neither", which is exactly the mistake the refinement rejects at
5133
+ // runtime. Restating the rule as `oneOf` keeps the published schema
5134
+ // saying what the validator enforces — the union of two array schemas
5135
+ // used to express this, and collapsing them to one schema lost it.
5136
+ 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.',
5137
+ oneOf: [
5138
+ {
5139
+ required: ["fields"],
5140
+ // `not` wraps an `anyOf`, not one multi-name `required`: the latter
5141
+ // would only forbid all of them being present at once.
5142
+ not: { anyOf: SIMPLIFIED_ONLY_PROPS.map((prop) => ({ required: [prop] })) }
5143
+ },
5144
+ { required: ["template"], not: { required: ["fields"] } }
5145
+ ]
4890
5146
  });
4891
- const ArrayFieldSchema = z13.union([FullArrayFieldSchema, SimplifiedArrayFieldSchema]);
4892
5147
  const AllFieldsSchema = AnyFieldSchema;
4893
5148
  return {
4894
5149
  PageFieldSchema,
4895
5150
  RowFieldSchema,
4896
5151
  GroupFieldSchema,
4897
5152
  ArrayFieldSchema,
5153
+ ContainerFieldSchema,
4898
5154
  AllFieldsSchema
4899
5155
  };
4900
5156
  }
4901
5157
 
4902
5158
  // internal/dynamic-forms-validation/src/lib/schemas/leaves/text-field.schema.ts
4903
- import { z as z14 } from "zod";
4904
- var TextElementTypeSchema = z14.enum(["p", "h1", "h2", "h3", "h4", "h5", "h6", "span"]);
4905
- var TextPropsSchema = z14.object({
5159
+ import { z as z15 } from "zod";
5160
+ var TextElementTypeSchema = z15.enum(["p", "h1", "h2", "h3", "h4", "h5", "h6", "span"]);
5161
+ var TextPropsSchema = z15.object({
4906
5162
  /**
4907
5163
  * HTML element type to render the text.
4908
5164
  */
@@ -4912,7 +5168,7 @@ var TextFieldSchema = BaseFieldDefSchema.extend({
4912
5168
  /**
4913
5169
  * Field type discriminant.
4914
5170
  */
4915
- type: z14.literal("text"),
5171
+ type: z15.literal("text"),
4916
5172
  /**
4917
5173
  * Text-specific properties.
4918
5174
  */
@@ -4924,9 +5180,9 @@ var TextFieldSchema = BaseFieldDefSchema.extend({
4924
5180
  });
4925
5181
 
4926
5182
  // internal/dynamic-forms-validation/src/lib/schemas/leaves/hidden-field.schema.ts
4927
- import { z as z15 } from "zod";
4928
- var HiddenScalarSchema = z15.union([z15.string(), z15.number(), z15.boolean()]);
4929
- var HiddenValueSchema = z15.union([HiddenScalarSchema, z15.array(HiddenScalarSchema)]);
5183
+ import { z as z16 } from "zod";
5184
+ var HiddenScalarSchema = z16.union([z16.string(), z16.number(), z16.boolean()]);
5185
+ var HiddenValueSchema = z16.union([HiddenScalarSchema, z16.array(HiddenScalarSchema)]);
4930
5186
  var HiddenFieldSchema = BaseFieldDefSchema.omit({
4931
5187
  label: true,
4932
5188
  meta: true,
@@ -4942,7 +5198,7 @@ var HiddenFieldSchema = BaseFieldDefSchema.omit({
4942
5198
  /**
4943
5199
  * Field type discriminant.
4944
5200
  */
4945
- type: z15.literal("hidden"),
5201
+ type: z16.literal("hidden"),
4946
5202
  /**
4947
5203
  * The value to store. Required for hidden fields.
4948
5204
  */
@@ -4950,42 +5206,70 @@ var HiddenFieldSchema = BaseFieldDefSchema.omit({
4950
5206
  });
4951
5207
 
4952
5208
  // internal/dynamic-forms-validation/src/lib/schemas/form/form-options.schema.ts
4953
- import { z as z16 } from "zod";
4954
- var SubmitButtonOptionsSchema = z16.object({
5209
+ import { z as z17 } from "zod";
5210
+ var SubmitButtonOptionsSchema = z17.object({
4955
5211
  /**
4956
5212
  * Whether to disable the submit button when the form is invalid.
4957
5213
  * Defaults to true.
4958
5214
  */
4959
- disableWhenInvalid: z16.boolean().optional(),
5215
+ disableWhenInvalid: z17.boolean().optional(),
4960
5216
  /**
4961
5217
  * Whether to disable the submit button while the form is submitting.
4962
5218
  * Defaults to true.
4963
5219
  */
4964
- disableWhileSubmitting: z16.boolean().optional()
5220
+ disableWhileSubmitting: z17.boolean().optional()
4965
5221
  });
4966
- var NextButtonOptionsSchema = z16.object({
5222
+ var NextButtonOptionsSchema = z17.object({
4967
5223
  /**
4968
5224
  * Whether to disable the next button when the current page is invalid.
4969
5225
  * Defaults to true.
4970
5226
  */
4971
- disableWhenPageInvalid: z16.boolean().optional(),
5227
+ disableWhenPageInvalid: z17.boolean().optional(),
4972
5228
  /**
4973
5229
  * Whether to disable the next button while the form is submitting.
4974
5230
  * Defaults to true.
4975
5231
  */
4976
- disableWhileSubmitting: z16.boolean().optional()
5232
+ disableWhileSubmitting: z17.boolean().optional()
4977
5233
  });
4978
- var FormOptionsSchema = z16.object({
5234
+ var WebMcpToolOptionsSchema = z17.object({
5235
+ /**
5236
+ * Base name for this form's tools, registered as `fill_{name}` and
5237
+ * `submit_{name}`. Must be unique across every form mounted on the page.
5238
+ *
5239
+ * The registered name has to satisfy the WebMCP draft's own rule — 1-128
5240
+ * characters of `A-Z`, `a-z`, `0-9`, `_`, `-` or `.` — and `registerTool()`
5241
+ * rejects anything else, so the same rule is enforced here (minus the room the
5242
+ * `fill_` / `submit_` prefix takes).
5243
+ *
5244
+ * @see https://webmachinelearning.github.io/webmcp/
5245
+ */
5246
+ 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'),
5247
+ /**
5248
+ * What this form is for, and when an agent should reach for it.
5249
+ */
5250
+ description: z17.string().min(1),
5251
+ /**
5252
+ * Whether an agent may submit this form directly. Off by default; without it
5253
+ * the agent can fill the form but a human presses the button.
5254
+ */
5255
+ allowSubmit: z17.boolean().optional(),
5256
+ /**
5257
+ * How much of the form a tool response hands back. `'changed'` (the default)
5258
+ * returns only what the call set; `'all'` returns the whole readable model.
5259
+ */
5260
+ readback: z17.enum(["changed", "all"]).optional()
5261
+ });
5262
+ var FormOptionsSchema = z17.object({
4979
5263
  /**
4980
5264
  * Whether the entire form is disabled.
4981
5265
  */
4982
- disabled: z16.boolean().optional(),
5266
+ disabled: z17.boolean().optional(),
4983
5267
  /**
4984
5268
  * Maximum number of derivation iterations before stopping.
4985
5269
  * Prevents infinite loops in circular derivations.
4986
5270
  * Defaults to 10.
4987
5271
  */
4988
- maxDerivationIterations: z16.number().positive().optional(),
5272
+ maxDerivationIterations: z17.number().positive().optional(),
4989
5273
  /**
4990
5274
  * Options for the submit button behavior.
4991
5275
  */
@@ -4998,42 +5282,47 @@ var FormOptionsSchema = z16.object({
4998
5282
  * Whether to exclude values of hidden fields from submission output.
4999
5283
  * Overrides the global withValueExclusionDefaults() setting for this form.
5000
5284
  */
5001
- excludeValueIfHidden: z16.boolean().optional(),
5285
+ excludeValueIfHidden: z17.boolean().optional(),
5002
5286
  /**
5003
5287
  * Whether to exclude values of disabled fields from submission output.
5004
5288
  * Overrides the global withValueExclusionDefaults() setting for this form.
5005
5289
  */
5006
- excludeValueIfDisabled: z16.boolean().optional(),
5290
+ excludeValueIfDisabled: z17.boolean().optional(),
5007
5291
  /**
5008
5292
  * Whether to exclude values of readonly fields from submission output.
5009
5293
  * Overrides the global withValueExclusionDefaults() setting for this form.
5010
5294
  */
5011
- excludeValueIfReadonly: z16.boolean().optional(),
5295
+ excludeValueIfReadonly: z17.boolean().optional(),
5012
5296
  /**
5013
5297
  * Whether to run validation while a field is hidden.
5014
5298
  * Acts as the root inherited value for the form. Per-field
5015
5299
  * validateWhenHidden overrides cascade through the field tree.
5016
5300
  */
5017
- validateWhenHidden: z16.boolean().optional()
5301
+ validateWhenHidden: z17.boolean().optional(),
5302
+ /**
5303
+ * Exposes this form to browser AI agents as WebMCP tools (experimental).
5304
+ * Requires the `withExperimentalWebMcp()` feature on `provideDynamicForm(...)`.
5305
+ */
5306
+ webMcp: WebMcpToolOptionsSchema.optional()
5018
5307
  });
5019
5308
 
5020
5309
  // internal/dynamic-forms-validation/src/lib/schemas/form/schema-definition.schema.ts
5021
- import { z as z17 } from "zod";
5022
- var SchemaDefinitionSchema = z17.object({
5310
+ import { z as z18 } from "zod";
5311
+ var SchemaDefinitionSchema = z18.object({
5023
5312
  /**
5024
5313
  * Unique identifier for the schema.
5025
5314
  * Used to reference the schema in SchemaApplicationConfig.
5026
5315
  */
5027
- name: z17.string(),
5316
+ name: z18.string(),
5028
5317
  /**
5029
5318
  * Human-readable description of what this schema validates.
5030
5319
  */
5031
- description: z17.string().optional(),
5320
+ description: z18.string().optional(),
5032
5321
  /**
5033
5322
  * Field path pattern for automatic schema application.
5034
5323
  * Supports glob-like patterns.
5035
5324
  */
5036
- pathPattern: z17.string().optional(),
5325
+ pathPattern: z18.string().optional(),
5037
5326
  /**
5038
5327
  * Validators to apply to fields using this schema.
5039
5328
  */
@@ -5045,18 +5334,18 @@ var SchemaDefinitionSchema = z17.object({
5045
5334
  /**
5046
5335
  * Nested schema applications for composing schemas.
5047
5336
  */
5048
- subSchemas: z17.array(SchemaApplicationConfigSchema).optional()
5337
+ subSchemas: z18.array(SchemaApplicationConfigSchema).optional()
5049
5338
  });
5050
- var SchemaDefinitionsArraySchema = z17.array(SchemaDefinitionSchema);
5339
+ var SchemaDefinitionsArraySchema = z18.array(SchemaDefinitionSchema);
5051
5340
 
5052
5341
  // internal/dynamic-forms-validation/src/lib/schemas/form/form-config.schema.ts
5053
- import { z as z18 } from "zod";
5342
+ import { z as z19 } from "zod";
5054
5343
  function createFormConfigSchema(fieldSchema, propsSchema) {
5055
- const baseSchema = z18.object({
5344
+ const baseSchema = z19.object({
5056
5345
  /**
5057
5346
  * Array of field definitions that make up the form.
5058
5347
  */
5059
- fields: z18.array(fieldSchema),
5348
+ fields: z19.array(fieldSchema),
5060
5349
  /**
5061
5350
  * Form-level options controlling behavior.
5062
5351
  */
@@ -5096,20 +5385,23 @@ function createFormConfigSchema(fieldSchema, propsSchema) {
5096
5385
  }
5097
5386
  return baseSchema;
5098
5387
  }
5099
- var BaseFormConfigSchema = z18.object({
5100
- fields: z18.array(z18.any()),
5388
+ var BaseFormConfigSchema = z19.object({
5389
+ fields: z19.array(z19.any()),
5101
5390
  options: FormOptionsSchema.optional(),
5102
5391
  schemas: SchemaDefinitionsArraySchema.optional(),
5103
5392
  defaultValidationMessages: ValidationMessagesSchema.optional()
5104
5393
  });
5105
5394
 
5395
+ // internal/dynamic-forms-validation/validate/src/json-schema/form-config-json-schema.ts
5396
+ import { z as z57 } from "zod";
5397
+
5106
5398
  // internal/dynamic-forms-validation/material/src/props/mat-common-props.schema.ts
5107
- import { z as z19 } from "zod";
5108
- var MatFormFieldAppearanceSchema = z19.enum(["fill", "outline"]);
5109
- var SubscriptSizingSchema = z19.enum(["fixed", "dynamic"]);
5110
- var ThemePaletteSchema = z19.enum(["primary", "accent", "warn"]);
5111
- var LabelPositionSchema = z19.enum(["before", "after"]);
5112
- var MatFormFieldPropsSchema = z19.object({
5399
+ import { z as z20 } from "zod";
5400
+ var MatFormFieldAppearanceSchema = z20.enum(["fill", "outline"]);
5401
+ var SubscriptSizingSchema = z20.enum(["fixed", "dynamic"]);
5402
+ var ThemePaletteSchema = z20.enum(["primary", "accent", "warn"]);
5403
+ var LabelPositionSchema = z20.enum(["before", "after"]);
5404
+ var MatFormFieldPropsSchema = z20.object({
5113
5405
  /**
5114
5406
  * Form field appearance style.
5115
5407
  */
@@ -5123,13 +5415,13 @@ var MatFormFieldPropsSchema = z19.object({
5123
5415
  */
5124
5416
  hint: DynamicTextSchema.optional()
5125
5417
  });
5126
- var RipplePropsSchema = z19.object({
5418
+ var RipplePropsSchema = z20.object({
5127
5419
  /**
5128
5420
  * Whether to disable the ripple effect.
5129
5421
  */
5130
- disableRipple: z19.boolean().optional()
5422
+ disableRipple: z20.boolean().optional()
5131
5423
  });
5132
- var ColorPropsSchema = z19.object({
5424
+ var ColorPropsSchema = z20.object({
5133
5425
  /**
5134
5426
  * Material theme color.
5135
5427
  */
@@ -5137,9 +5429,9 @@ var ColorPropsSchema = z19.object({
5137
5429
  });
5138
5430
 
5139
5431
  // internal/dynamic-forms-validation/material/src/props/mat-input-props.schema.ts
5140
- import { z as z20 } from "zod";
5141
- var MatInputTypeSchema = z20.enum(["text", "email", "password", "number", "tel", "url", "search"]);
5142
- var MatInputPropsSchema = z20.object({
5432
+ import { z as z21 } from "zod";
5433
+ var MatInputTypeSchema = z21.enum(["text", "email", "password", "number", "tel", "url", "search"]);
5434
+ var MatInputPropsSchema = z21.object({
5143
5435
  /**
5144
5436
  * HTML input type.
5145
5437
  */
@@ -5155,7 +5447,7 @@ var MatInputPropsSchema = z20.object({
5155
5447
  /**
5156
5448
  * Whether to disable the ripple effect.
5157
5449
  */
5158
- disableRipple: z20.boolean().optional(),
5450
+ disableRipple: z21.boolean().optional(),
5159
5451
  /**
5160
5452
  * How to size the subscript (hint/error area).
5161
5453
  */
@@ -5167,9 +5459,9 @@ var MatInputPropsSchema = z20.object({
5167
5459
  });
5168
5460
 
5169
5461
  // internal/dynamic-forms-validation/material/src/props/mat-textarea-props.schema.ts
5170
- import { z as z21 } from "zod";
5171
- var TextareaResizeSchema = z21.enum(["none", "both", "horizontal", "vertical"]);
5172
- var MatTextareaPropsSchema = z21.object({
5462
+ import { z as z22 } from "zod";
5463
+ var TextareaResizeSchema = z22.enum(["none", "both", "horizontal", "vertical"]);
5464
+ var MatTextareaPropsSchema = z22.object({
5173
5465
  /**
5174
5466
  * Placeholder text for the textarea.
5175
5467
  */
@@ -5177,11 +5469,11 @@ var MatTextareaPropsSchema = z21.object({
5177
5469
  /**
5178
5470
  * Number of visible text rows.
5179
5471
  */
5180
- rows: z21.number().positive().optional(),
5472
+ rows: z22.number().positive().optional(),
5181
5473
  /**
5182
5474
  * Number of visible text columns.
5183
5475
  */
5184
- cols: z21.number().positive().optional(),
5476
+ cols: z22.number().positive().optional(),
5185
5477
  /**
5186
5478
  * Form field appearance style.
5187
5479
  */
@@ -5201,12 +5493,12 @@ var MatTextareaPropsSchema = z21.object({
5201
5493
  /**
5202
5494
  * Maximum character length.
5203
5495
  */
5204
- maxLength: z21.number().positive().optional()
5496
+ maxLength: z22.number().positive().optional()
5205
5497
  });
5206
5498
 
5207
5499
  // internal/dynamic-forms-validation/material/src/props/mat-select-props.schema.ts
5208
- import { z as z22 } from "zod";
5209
- var MatSelectPropsSchema = z22.object({
5500
+ import { z as z23 } from "zod";
5501
+ var MatSelectPropsSchema = z23.object({
5210
5502
  /**
5211
5503
  * Placeholder text for the select.
5212
5504
  */
@@ -5218,11 +5510,11 @@ var MatSelectPropsSchema = z22.object({
5218
5510
  /**
5219
5511
  * Whether to allow multiple selections.
5220
5512
  */
5221
- multiple: z22.boolean().optional(),
5513
+ multiple: z23.boolean().optional(),
5222
5514
  /**
5223
5515
  * Maximum height of the select panel (CSS value).
5224
5516
  */
5225
- panelMaxHeight: z22.string().optional(),
5517
+ panelMaxHeight: z23.string().optional(),
5226
5518
  /**
5227
5519
  * How to size the subscript (hint/error area).
5228
5520
  */
@@ -5238,8 +5530,8 @@ var MatSelectPropsSchema = z22.object({
5238
5530
  });
5239
5531
 
5240
5532
  // internal/dynamic-forms-validation/material/src/props/mat-checkbox-props.schema.ts
5241
- import { z as z23 } from "zod";
5242
- var MatCheckboxPropsSchema = z23.object({
5533
+ import { z as z24 } from "zod";
5534
+ var MatCheckboxPropsSchema = z24.object({
5243
5535
  /**
5244
5536
  * Material theme color.
5245
5537
  */
@@ -5247,7 +5539,7 @@ var MatCheckboxPropsSchema = z23.object({
5247
5539
  /**
5248
5540
  * Whether to disable the ripple effect.
5249
5541
  */
5250
- disableRipple: z23.boolean().optional(),
5542
+ disableRipple: z24.boolean().optional(),
5251
5543
  /**
5252
5544
  * Position of the label relative to the checkbox.
5253
5545
  */
@@ -5259,12 +5551,12 @@ var MatCheckboxPropsSchema = z23.object({
5259
5551
  /**
5260
5552
  * Whether the checkbox is in indeterminate state.
5261
5553
  */
5262
- indeterminate: z23.boolean().optional()
5554
+ indeterminate: z24.boolean().optional()
5263
5555
  });
5264
5556
 
5265
5557
  // internal/dynamic-forms-validation/material/src/props/mat-radio-props.schema.ts
5266
- import { z as z24 } from "zod";
5267
- var MatRadioPropsSchema = z24.object({
5558
+ import { z as z25 } from "zod";
5559
+ var MatRadioPropsSchema = z25.object({
5268
5560
  /**
5269
5561
  * Material theme color.
5270
5562
  */
@@ -5272,7 +5564,7 @@ var MatRadioPropsSchema = z24.object({
5272
5564
  /**
5273
5565
  * Whether to disable the ripple effect.
5274
5566
  */
5275
- disableRipple: z24.boolean().optional(),
5567
+ disableRipple: z25.boolean().optional(),
5276
5568
  /**
5277
5569
  * Position of the label relative to the radio button.
5278
5570
  */
@@ -5284,8 +5576,8 @@ var MatRadioPropsSchema = z24.object({
5284
5576
  });
5285
5577
 
5286
5578
  // internal/dynamic-forms-validation/material/src/props/mat-multi-checkbox-props.schema.ts
5287
- import { z as z25 } from "zod";
5288
- var MatMultiCheckboxPropsSchema = z25.object({
5579
+ import { z as z26 } from "zod";
5580
+ var MatMultiCheckboxPropsSchema = z26.object({
5289
5581
  /**
5290
5582
  * Material theme color.
5291
5583
  */
@@ -5293,11 +5585,11 @@ var MatMultiCheckboxPropsSchema = z25.object({
5293
5585
  /**
5294
5586
  * Whether to disable the ripple effect.
5295
5587
  */
5296
- disableRipple: z25.boolean().optional(),
5588
+ disableRipple: z26.boolean().optional(),
5297
5589
  /**
5298
5590
  * Tab index for keyboard navigation.
5299
5591
  */
5300
- tabIndex: z25.number().optional(),
5592
+ tabIndex: z26.number().optional(),
5301
5593
  /**
5302
5594
  * Position of the labels relative to the checkboxes.
5303
5595
  */
@@ -5309,8 +5601,8 @@ var MatMultiCheckboxPropsSchema = z25.object({
5309
5601
  });
5310
5602
 
5311
5603
  // internal/dynamic-forms-validation/material/src/props/mat-toggle-props.schema.ts
5312
- import { z as z26 } from "zod";
5313
- var MatTogglePropsSchema = z26.object({
5604
+ import { z as z27 } from "zod";
5605
+ var MatTogglePropsSchema = z27.object({
5314
5606
  /**
5315
5607
  * Material theme color.
5316
5608
  */
@@ -5318,7 +5610,7 @@ var MatTogglePropsSchema = z26.object({
5318
5610
  /**
5319
5611
  * Whether to disable the ripple effect.
5320
5612
  */
5321
- disableRipple: z26.boolean().optional(),
5613
+ disableRipple: z27.boolean().optional(),
5322
5614
  /**
5323
5615
  * Position of the label relative to the toggle.
5324
5616
  */
@@ -5334,12 +5626,12 @@ var MatTogglePropsSchema = z26.object({
5334
5626
  /**
5335
5627
  * Whether to hide the icon inside the toggle.
5336
5628
  */
5337
- hideIcon: z26.boolean().optional()
5629
+ hideIcon: z27.boolean().optional()
5338
5630
  });
5339
5631
 
5340
5632
  // internal/dynamic-forms-validation/material/src/props/mat-slider-props.schema.ts
5341
- import { z as z27 } from "zod";
5342
- var MatSliderPropsSchema = z27.object({
5633
+ import { z as z28 } from "zod";
5634
+ var MatSliderPropsSchema = z28.object({
5343
5635
  /**
5344
5636
  * Material theme color.
5345
5637
  */
@@ -5356,25 +5648,25 @@ var MatSliderPropsSchema = z27.object({
5356
5648
  * Whether to display the thumb label.
5357
5649
  * @deprecated Use showThumbLabel instead
5358
5650
  */
5359
- thumbLabel: z27.boolean().optional(),
5651
+ thumbLabel: z28.boolean().optional(),
5360
5652
  /**
5361
5653
  * Whether to show the thumb label with the current value.
5362
5654
  */
5363
- showThumbLabel: z27.boolean().optional(),
5655
+ showThumbLabel: z28.boolean().optional(),
5364
5656
  /**
5365
5657
  * Interval for tick marks. 'auto' spaces them automatically.
5366
5658
  */
5367
- tickInterval: z27.union([z27.number().positive(), z27.literal("auto")]).optional(),
5659
+ tickInterval: z28.union([z28.number().positive(), z28.literal("auto")]).optional(),
5368
5660
  /**
5369
5661
  * Step increment for the slider.
5370
5662
  */
5371
- step: z27.number().positive().optional()
5663
+ step: z28.number().positive().optional()
5372
5664
  });
5373
5665
 
5374
5666
  // internal/dynamic-forms-validation/material/src/props/mat-datepicker-props.schema.ts
5375
- import { z as z28 } from "zod";
5376
- var DatepickerStartViewSchema = z28.enum(["month", "year", "multi-year"]);
5377
- var MatDatepickerPropsSchema = z28.object({
5667
+ import { z as z29 } from "zod";
5668
+ var DatepickerStartViewSchema = z29.enum(["month", "year", "multi-year"]);
5669
+ var MatDatepickerPropsSchema = z29.object({
5378
5670
  /**
5379
5671
  * Placeholder text for the datepicker input.
5380
5672
  */
@@ -5390,7 +5682,7 @@ var MatDatepickerPropsSchema = z28.object({
5390
5682
  /**
5391
5683
  * Whether to disable the ripple effect.
5392
5684
  */
5393
- disableRipple: z28.boolean().optional(),
5685
+ disableRipple: z29.boolean().optional(),
5394
5686
  /**
5395
5687
  * How to size the subscript (hint/error area).
5396
5688
  */
@@ -5402,7 +5694,7 @@ var MatDatepickerPropsSchema = z28.object({
5402
5694
  /**
5403
5695
  * Whether to use touch-friendly UI mode.
5404
5696
  */
5405
- touchUi: z28.boolean().optional(),
5697
+ touchUi: z29.boolean().optional(),
5406
5698
  /**
5407
5699
  * Hint text displayed below the field.
5408
5700
  */
@@ -5410,9 +5702,9 @@ var MatDatepickerPropsSchema = z28.object({
5410
5702
  });
5411
5703
 
5412
5704
  // internal/dynamic-forms-validation/material/src/props/mat-button-props.schema.ts
5413
- import { z as z29 } from "zod";
5414
- var ButtonTypeSchema = z29.enum(["button", "submit", "reset"]);
5415
- var MatButtonPropsSchema = z29.object({
5705
+ import { z as z30 } from "zod";
5706
+ var ButtonTypeSchema = z30.enum(["button", "submit", "reset"]);
5707
+ var MatButtonPropsSchema = z30.object({
5416
5708
  /**
5417
5709
  * Material theme color.
5418
5710
  */
@@ -5424,17 +5716,17 @@ var MatButtonPropsSchema = z29.object({
5424
5716
  });
5425
5717
 
5426
5718
  // internal/dynamic-forms-validation/material/src/fields/mat-input-field.schema.ts
5427
- import { z as z30 } from "zod";
5719
+ import { z as z31 } from "zod";
5428
5720
  var MatInputFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5429
5721
  /**
5430
5722
  * Field type discriminant.
5431
5723
  */
5432
- type: z30.literal("input"),
5433
- nullable: z30.boolean().optional(),
5724
+ type: z31.literal("input"),
5725
+ nullable: z31.boolean().optional(),
5434
5726
  /**
5435
5727
  * Initial value for the input.
5436
5728
  */
5437
- value: z30.string().nullable().optional(),
5729
+ value: z31.string().nullable().optional(),
5438
5730
  /**
5439
5731
  * Placeholder text (can also be in props).
5440
5732
  */
@@ -5447,17 +5739,17 @@ var MatInputFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSche
5447
5739
  var MatInputFieldSchema = MatInputFieldSchemaObject.superRefine(nullableValueRefine);
5448
5740
 
5449
5741
  // internal/dynamic-forms-validation/material/src/fields/mat-textarea-field.schema.ts
5450
- import { z as z31 } from "zod";
5742
+ import { z as z32 } from "zod";
5451
5743
  var MatTextareaFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5452
5744
  /**
5453
5745
  * Field type discriminant.
5454
5746
  */
5455
- type: z31.literal("textarea"),
5456
- nullable: z31.boolean().optional(),
5747
+ type: z32.literal("textarea"),
5748
+ nullable: z32.boolean().optional(),
5457
5749
  /**
5458
5750
  * Initial value for the textarea.
5459
5751
  */
5460
- value: z31.string().nullable().optional(),
5752
+ value: z32.string().nullable().optional(),
5461
5753
  /**
5462
5754
  * Placeholder text (can also be in props).
5463
5755
  */
@@ -5470,18 +5762,18 @@ var MatTextareaFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationS
5470
5762
  var MatTextareaFieldSchema = MatTextareaFieldSchemaObject.superRefine(nullableValueRefine);
5471
5763
 
5472
5764
  // internal/dynamic-forms-validation/material/src/fields/mat-select-field.schema.ts
5473
- import { z as z32 } from "zod";
5765
+ import { z as z33 } from "zod";
5474
5766
  var MatSelectFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5475
5767
  /**
5476
5768
  * Field type discriminant.
5477
5769
  */
5478
- type: z32.literal("select"),
5479
- nullable: z32.boolean().optional(),
5770
+ type: z33.literal("select"),
5771
+ nullable: z33.boolean().optional(),
5480
5772
  /**
5481
5773
  * Initial value for the select.
5482
5774
  * Can be single value or array if multiple is enabled.
5483
5775
  */
5484
- value: z32.unknown().nullable().optional(),
5776
+ value: z33.unknown().nullable().optional(),
5485
5777
  /**
5486
5778
  * Placeholder text (can also be in props).
5487
5779
  */
@@ -5498,16 +5790,16 @@ var MatSelectFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSch
5498
5790
  var MatSelectFieldSchema = MatSelectFieldSchemaObject.superRefine(nullableValueRefine);
5499
5791
 
5500
5792
  // internal/dynamic-forms-validation/material/src/fields/mat-checkbox-field.schema.ts
5501
- import { z as z33 } from "zod";
5793
+ import { z as z34 } from "zod";
5502
5794
  var MatCheckboxFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5503
5795
  /**
5504
5796
  * Field type discriminant.
5505
5797
  */
5506
- type: z33.literal("checkbox"),
5798
+ type: z34.literal("checkbox"),
5507
5799
  /**
5508
5800
  * Initial checked state.
5509
5801
  */
5510
- value: z33.boolean().optional(),
5802
+ value: z34.boolean().optional(),
5511
5803
  /**
5512
5804
  * Placeholder/helper text.
5513
5805
  */
@@ -5519,17 +5811,17 @@ var MatCheckboxFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema)
5519
5811
  });
5520
5812
 
5521
5813
  // internal/dynamic-forms-validation/material/src/fields/mat-radio-field.schema.ts
5522
- import { z as z34 } from "zod";
5814
+ import { z as z35 } from "zod";
5523
5815
  var MatRadioFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5524
5816
  /**
5525
5817
  * Field type discriminant.
5526
5818
  */
5527
- type: z34.literal("radio"),
5528
- nullable: z34.boolean().optional(),
5819
+ type: z35.literal("radio"),
5820
+ nullable: z35.boolean().optional(),
5529
5821
  /**
5530
5822
  * Initial selected value.
5531
5823
  */
5532
- value: z34.unknown().nullable().optional(),
5824
+ value: z35.unknown().nullable().optional(),
5533
5825
  /**
5534
5826
  * Placeholder/helper text.
5535
5827
  */
@@ -5546,17 +5838,17 @@ var MatRadioFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSche
5546
5838
  var MatRadioFieldSchema = MatRadioFieldSchemaObject.superRefine(nullableValueRefine);
5547
5839
 
5548
5840
  // internal/dynamic-forms-validation/material/src/fields/mat-multi-checkbox-field.schema.ts
5549
- import { z as z35 } from "zod";
5841
+ import { z as z36 } from "zod";
5550
5842
  var MatMultiCheckboxFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5551
5843
  /**
5552
5844
  * Field type discriminant.
5553
5845
  */
5554
- type: z35.literal("multi-checkbox"),
5555
- nullable: z35.boolean().optional(),
5846
+ type: z36.literal("multi-checkbox"),
5847
+ nullable: z36.boolean().optional(),
5556
5848
  /**
5557
5849
  * Initial selected values (array).
5558
5850
  */
5559
- value: z35.array(z35.unknown()).nullable().optional(),
5851
+ value: z36.array(z36.unknown()).nullable().optional(),
5560
5852
  /**
5561
5853
  * Placeholder/helper text.
5562
5854
  */
@@ -5573,16 +5865,16 @@ var MatMultiCheckboxFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValida
5573
5865
  var MatMultiCheckboxFieldSchema = MatMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
5574
5866
 
5575
5867
  // internal/dynamic-forms-validation/material/src/fields/mat-toggle-field.schema.ts
5576
- import { z as z36 } from "zod";
5868
+ import { z as z37 } from "zod";
5577
5869
  var MatToggleFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5578
5870
  /**
5579
5871
  * Field type discriminant.
5580
5872
  */
5581
- type: z36.literal("toggle"),
5873
+ type: z37.literal("toggle"),
5582
5874
  /**
5583
5875
  * Initial toggle state.
5584
5876
  */
5585
- value: z36.boolean().optional(),
5877
+ value: z37.boolean().optional(),
5586
5878
  /**
5587
5879
  * Placeholder/helper text.
5588
5880
  */
@@ -5594,29 +5886,29 @@ var MatToggleFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).e
5594
5886
  });
5595
5887
 
5596
5888
  // internal/dynamic-forms-validation/material/src/fields/mat-slider-field.schema.ts
5597
- import { z as z37 } from "zod";
5889
+ import { z as z38 } from "zod";
5598
5890
  var MatSliderFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5599
5891
  /**
5600
5892
  * Field type discriminant.
5601
5893
  */
5602
- type: z37.literal("slider"),
5603
- nullable: z37.boolean().optional(),
5894
+ type: z38.literal("slider"),
5895
+ nullable: z38.boolean().optional(),
5604
5896
  /**
5605
5897
  * Initial slider value.
5606
5898
  */
5607
- value: z37.number().nullable().optional(),
5899
+ value: z38.number().nullable().optional(),
5608
5900
  /**
5609
5901
  * Minimum slider value.
5610
5902
  */
5611
- minValue: z37.number().optional(),
5903
+ minValue: z38.number().optional(),
5612
5904
  /**
5613
5905
  * Maximum slider value.
5614
5906
  */
5615
- maxValue: z37.number().optional(),
5907
+ maxValue: z38.number().optional(),
5616
5908
  /**
5617
5909
  * Step increment.
5618
5910
  */
5619
- step: z37.number().positive().optional(),
5911
+ step: z38.number().positive().optional(),
5620
5912
  /**
5621
5913
  * Placeholder/helper text.
5622
5914
  */
@@ -5629,14 +5921,14 @@ var MatSliderFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSch
5629
5921
  var MatSliderFieldSchema = MatSliderFieldSchemaObject.superRefine(nullableValueRefine);
5630
5922
 
5631
5923
  // internal/dynamic-forms-validation/material/src/fields/mat-datepicker-field.schema.ts
5632
- import { z as z38 } from "zod";
5633
- var DateValueSchema = z38.union([z38.string(), z38.null()]);
5924
+ import { z as z39 } from "zod";
5925
+ var DateValueSchema = z39.union([z39.string(), z39.null()]);
5634
5926
  var MatDatepickerFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
5635
5927
  /**
5636
5928
  * Field type discriminant.
5637
5929
  */
5638
- type: z38.literal("datepicker"),
5639
- nullable: z38.boolean().optional(),
5930
+ type: z39.literal("datepicker"),
5931
+ nullable: z39.boolean().optional(),
5640
5932
  /**
5641
5933
  * Initial date value (ISO string in JSON configs).
5642
5934
  */
@@ -5665,22 +5957,29 @@ var MatDatepickerFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidatio
5665
5957
  var MatDatepickerFieldSchema = MatDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
5666
5958
 
5667
5959
  // internal/dynamic-forms-validation/material/src/fields/mat-button-field.schema.ts
5668
- import { z as z39 } from "zod";
5669
- var EventArgSchema = z39.union([z39.string(), z39.number(), z39.boolean(), z39.null(), z39.undefined()]);
5960
+ import { z as z41 } from "zod";
5961
+
5962
+ // internal/dynamic-forms-validation/src/lib/schemas/field/array-item-template.schema.ts
5963
+ import { z as z40 } from "zod";
5964
+ var FieldLikeSchema = z40.object({ type: z40.string() }).passthrough();
5965
+ var ArrayItemTemplateSchema = z40.union([FieldLikeSchema, z40.array(FieldLikeSchema)]);
5966
+
5967
+ // internal/dynamic-forms-validation/material/src/fields/mat-button-field.schema.ts
5968
+ var EventArgSchema = z41.union([z41.string(), z41.number(), z41.boolean(), z41.null(), z41.undefined()]);
5670
5969
  var MatButtonFieldSchema = BaseFieldDefSchema.extend({
5671
5970
  /**
5672
5971
  * Field type discriminant.
5673
5972
  */
5674
- type: z39.literal("button"),
5973
+ type: z41.literal("button"),
5675
5974
  /**
5676
5975
  * Event type name (string reference to registered event).
5677
5976
  * Note: Full event configuration requires runtime setup.
5678
5977
  */
5679
- event: z39.string().optional(),
5978
+ event: z41.string().optional(),
5680
5979
  /**
5681
5980
  * Arguments passed to the event constructor.
5682
5981
  */
5683
- eventArgs: z39.array(EventArgSchema).optional(),
5982
+ eventArgs: z41.array(EventArgSchema).optional(),
5684
5983
  /**
5685
5984
  * Material-specific button properties.
5686
5985
  */
@@ -5691,79 +5990,94 @@ var MatButtonFieldSchema = BaseFieldDefSchema.extend({
5691
5990
  logic: LogicArraySchema.optional()
5692
5991
  });
5693
5992
  var MatSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
5694
- type: z39.literal("submit"),
5993
+ type: z41.literal("submit"),
5695
5994
  props: MatButtonPropsSchema.optional(),
5696
5995
  logic: LogicArraySchema.optional()
5697
5996
  });
5698
5997
  var MatNextButtonFieldSchema = BaseFieldDefSchema.extend({
5699
- type: z39.literal("next"),
5998
+ type: z41.literal("next"),
5700
5999
  props: MatButtonPropsSchema.optional(),
5701
6000
  logic: LogicArraySchema.optional()
5702
6001
  });
5703
6002
  var MatPreviousButtonFieldSchema = BaseFieldDefSchema.extend({
5704
- type: z39.literal("previous"),
6003
+ type: z41.literal("previous"),
5705
6004
  props: MatButtonPropsSchema.optional()
5706
6005
  });
5707
6006
  var MatAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
5708
- type: z39.literal("add-array-item"),
6007
+ /**
6008
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6009
+ * item, or a list of them for an object item.
6010
+ */
6011
+ template: ArrayItemTemplateSchema,
6012
+ type: z41.literal("add-array-item"),
5709
6013
  /**
5710
6014
  * Key of the array field to add items to.
5711
6015
  * If omitted, uses the parent array context.
5712
6016
  */
5713
- arrayKey: z39.string().optional(),
6017
+ arrayKey: z41.string().optional(),
5714
6018
  props: MatButtonPropsSchema.optional()
5715
6019
  });
5716
6020
  var MatRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
5717
- type: z39.literal("remove-array-item"),
6021
+ type: z41.literal("remove-array-item"),
5718
6022
  /**
5719
6023
  * Key of the array field to remove items from.
5720
6024
  * If omitted, uses the parent array context.
5721
6025
  */
5722
- arrayKey: z39.string().optional(),
6026
+ arrayKey: z41.string().optional(),
5723
6027
  props: MatButtonPropsSchema.optional()
5724
6028
  });
5725
6029
  var MatPrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
5726
- type: z39.literal("prepend-array-item"),
6030
+ /**
6031
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6032
+ * item, or a list of them for an object item.
6033
+ */
6034
+ template: ArrayItemTemplateSchema,
6035
+ type: z41.literal("prepend-array-item"),
5727
6036
  /**
5728
6037
  * Key of the array field to prepend items to.
5729
6038
  * If omitted, uses the parent array context.
5730
6039
  */
5731
- arrayKey: z39.string().optional(),
6040
+ arrayKey: z41.string().optional(),
5732
6041
  props: MatButtonPropsSchema.optional()
5733
6042
  });
5734
6043
  var MatInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
5735
- type: z39.literal("insert-array-item"),
6044
+ /**
6045
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6046
+ * item, or a list of them for an object item.
6047
+ */
6048
+ template: ArrayItemTemplateSchema,
6049
+ type: z41.literal("insert-array-item"),
5736
6050
  /**
5737
6051
  * Key of the array field to insert items into.
5738
6052
  * If omitted, uses the parent array context.
5739
6053
  */
5740
- arrayKey: z39.string().optional(),
6054
+ arrayKey: z41.string().optional(),
5741
6055
  /**
5742
6056
  * Index at which to insert the new item.
5743
6057
  */
5744
- index: z39.number(),
6058
+ index: z41.number(),
5745
6059
  props: MatButtonPropsSchema.optional()
5746
6060
  });
5747
6061
  var MatPopArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
5748
- type: z39.literal("pop-array-item"),
6062
+ type: z41.literal("pop-array-item"),
5749
6063
  /**
5750
6064
  * Key of the array field to pop items from.
5751
6065
  */
5752
- arrayKey: z39.string(),
6066
+ arrayKey: z41.string(),
5753
6067
  props: MatButtonPropsSchema.optional()
5754
6068
  });
5755
6069
  var MatShiftArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
5756
- type: z39.literal("shift-array-item"),
6070
+ type: z41.literal("shift-array-item"),
5757
6071
  /**
5758
6072
  * Key of the array field to shift items from.
5759
6073
  */
5760
- arrayKey: z39.string(),
6074
+ arrayKey: z41.string(),
5761
6075
  props: MatButtonPropsSchema.optional()
5762
6076
  });
5763
6077
 
5764
6078
  // internal/dynamic-forms-validation/material/src/mat-leaf-field.schema.ts
5765
- import { z as z40 } from "zod";
5766
- var MatLeafFieldSchema = z40.discriminatedUnion("type", [
6079
+ import { z as z42 } from "zod";
6080
+ var MatLeafFieldSchema = z42.discriminatedUnion("type", [
5767
6081
  // Default fields
5768
6082
  TextFieldSchema,
5769
6083
  HiddenFieldSchema,
@@ -5801,8 +6115,8 @@ var MatArrayFieldSchema = containerSchemas.ArrayFieldSchema;
5801
6115
  var MatFieldSchema = containerSchemas.AllFieldsSchema;
5802
6116
 
5803
6117
  // internal/dynamic-forms-validation/material/src/mat-form-config.schema.ts
5804
- import { z as z41 } from "zod";
5805
- var MatFormDefaultPropsSchema = z41.object({
6118
+ import { z as z43 } from "zod";
6119
+ var MatFormDefaultPropsSchema = z43.object({
5806
6120
  /**
5807
6121
  * Default form field appearance for all fields.
5808
6122
  */
@@ -5819,15 +6133,15 @@ var MatFormDefaultPropsSchema = z41.object({
5819
6133
  var MatFormConfigSchema = createFormConfigSchema(MatFieldSchema, MatFormDefaultPropsSchema);
5820
6134
 
5821
6135
  // internal/dynamic-forms-validation/bootstrap/src/props/index.ts
5822
- import { z as z43 } from "zod";
6136
+ import { z as z45 } from "zod";
5823
6137
 
5824
6138
  // internal/dynamic-forms-validation/bootstrap/src/props/bs-common-props.schema.ts
5825
- import { z as z42 } from "zod";
5826
- var BsSizeSchema = z42.enum(["sm", "lg"]);
5827
- var BsButtonVariantSchema = z42.enum(["primary", "secondary", "success", "danger", "warning", "info", "light", "dark", "link"]);
5828
- var BsFormFieldPropsSchema = z42.object({
6139
+ import { z as z44 } from "zod";
6140
+ var BsSizeSchema = z44.enum(["sm", "lg"]);
6141
+ var BsButtonVariantSchema = z44.enum(["primary", "secondary", "success", "danger", "warning", "info", "light", "dark", "link"]);
6142
+ var BsFormFieldPropsSchema = z44.object({
5829
6143
  size: BsSizeSchema.optional(),
5830
- floatingLabel: z42.boolean().optional(),
6144
+ floatingLabel: z44.boolean().optional(),
5831
6145
  hint: DynamicTextSchema.optional(),
5832
6146
  validFeedback: DynamicTextSchema.optional(),
5833
6147
  invalidFeedback: DynamicTextSchema.optional()
@@ -5835,94 +6149,94 @@ var BsFormFieldPropsSchema = z42.object({
5835
6149
 
5836
6150
  // internal/dynamic-forms-validation/bootstrap/src/props/index.ts
5837
6151
  var BsInputPropsSchema = BsFormFieldPropsSchema.extend({
5838
- type: z43.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
6152
+ type: z45.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
5839
6153
  placeholder: DynamicTextSchema.optional(),
5840
- plaintext: z43.boolean().optional()
6154
+ plaintext: z45.boolean().optional()
5841
6155
  });
5842
6156
  var BsTextareaPropsSchema = BsFormFieldPropsSchema.extend({
5843
- rows: z43.number().positive().optional(),
6157
+ rows: z45.number().positive().optional(),
5844
6158
  placeholder: DynamicTextSchema.optional()
5845
6159
  });
5846
6160
  var BsSelectPropsSchema = BsFormFieldPropsSchema.extend({
5847
- multiple: z43.boolean().optional(),
5848
- htmlSize: z43.number().positive().optional(),
6161
+ multiple: z45.boolean().optional(),
6162
+ htmlSize: z45.number().positive().optional(),
5849
6163
  placeholder: DynamicTextSchema.optional()
5850
6164
  });
5851
- var BsCheckboxPropsSchema = z43.object({
5852
- switch: z43.boolean().optional(),
5853
- inline: z43.boolean().optional(),
5854
- reverse: z43.boolean().optional(),
5855
- indeterminate: z43.boolean().optional(),
6165
+ var BsCheckboxPropsSchema = z45.object({
6166
+ switch: z45.boolean().optional(),
6167
+ inline: z45.boolean().optional(),
6168
+ reverse: z45.boolean().optional(),
6169
+ indeterminate: z45.boolean().optional(),
5856
6170
  hint: DynamicTextSchema.optional()
5857
6171
  });
5858
- var BsRadioPropsSchema = z43.object({
5859
- inline: z43.boolean().optional(),
5860
- reverse: z43.boolean().optional(),
5861
- buttonGroup: z43.boolean().optional(),
6172
+ var BsRadioPropsSchema = z45.object({
6173
+ inline: z45.boolean().optional(),
6174
+ reverse: z45.boolean().optional(),
6175
+ buttonGroup: z45.boolean().optional(),
5862
6176
  buttonSize: BsSizeSchema.optional(),
5863
6177
  hint: DynamicTextSchema.optional()
5864
6178
  });
5865
- var BsMultiCheckboxPropsSchema = z43.object({
5866
- switch: z43.boolean().optional(),
5867
- inline: z43.boolean().optional(),
5868
- reverse: z43.boolean().optional(),
6179
+ var BsMultiCheckboxPropsSchema = z45.object({
6180
+ switch: z45.boolean().optional(),
6181
+ inline: z45.boolean().optional(),
6182
+ reverse: z45.boolean().optional(),
5869
6183
  hint: DynamicTextSchema.optional()
5870
6184
  });
5871
- var BsTogglePropsSchema = z43.object({
6185
+ var BsTogglePropsSchema = z45.object({
5872
6186
  size: BsSizeSchema.optional(),
5873
- reverse: z43.boolean().optional(),
5874
- inline: z43.boolean().optional(),
6187
+ reverse: z45.boolean().optional(),
6188
+ inline: z45.boolean().optional(),
5875
6189
  hint: DynamicTextSchema.optional()
5876
6190
  });
5877
6191
  var BsDatepickerPropsSchema = BsFormFieldPropsSchema.extend({
5878
- useNgBootstrap: z43.boolean().optional(),
5879
- displayMonths: z43.number().positive().optional(),
5880
- navigation: z43.enum(["select", "arrows", "none"]).optional(),
5881
- outsideDays: z43.enum(["visible", "collapsed", "hidden"]).optional(),
5882
- showWeekNumbers: z43.boolean().optional(),
6192
+ useNgBootstrap: z45.boolean().optional(),
6193
+ displayMonths: z45.number().positive().optional(),
6194
+ navigation: z45.enum(["select", "arrows", "none"]).optional(),
6195
+ outsideDays: z45.enum(["visible", "collapsed", "hidden"]).optional(),
6196
+ showWeekNumbers: z45.boolean().optional(),
5883
6197
  placeholder: DynamicTextSchema.optional()
5884
6198
  });
5885
- var BsSliderPropsSchema = z43.object({
5886
- showValue: z43.boolean().optional(),
5887
- valuePrefix: z43.string().optional(),
5888
- valueSuffix: z43.string().optional(),
6199
+ var BsSliderPropsSchema = z45.object({
6200
+ showValue: z45.boolean().optional(),
6201
+ valuePrefix: z45.string().optional(),
6202
+ valueSuffix: z45.string().optional(),
5889
6203
  hint: DynamicTextSchema.optional(),
5890
- min: z43.number().optional(),
5891
- max: z43.number().optional(),
5892
- step: z43.number().positive().optional()
6204
+ min: z45.number().optional(),
6205
+ max: z45.number().optional(),
6206
+ step: z45.number().positive().optional()
5893
6207
  });
5894
- var BsButtonPropsSchema = z43.object({
6208
+ var BsButtonPropsSchema = z45.object({
5895
6209
  variant: BsButtonVariantSchema.optional(),
5896
- outline: z43.boolean().optional(),
6210
+ outline: z45.boolean().optional(),
5897
6211
  size: BsSizeSchema.optional(),
5898
- block: z43.boolean().optional(),
5899
- active: z43.boolean().optional(),
5900
- type: z43.enum(["button", "submit", "reset"]).optional()
6212
+ block: z45.boolean().optional(),
6213
+ active: z45.boolean().optional(),
6214
+ type: z45.enum(["button", "submit", "reset"]).optional()
5901
6215
  });
5902
6216
 
5903
6217
  // internal/dynamic-forms-validation/bootstrap/src/fields/index.ts
5904
- import { z as z44 } from "zod";
6218
+ import { z as z46 } from "zod";
5905
6219
  var BsValueFieldBase = BaseFieldDefSchema.merge(FieldWithValidationSchema);
5906
6220
  var BsInputFieldSchemaObject = BsValueFieldBase.extend({
5907
- type: z44.literal("input"),
5908
- nullable: z44.boolean().optional(),
5909
- value: z44.string().nullable().optional(),
6221
+ type: z46.literal("input"),
6222
+ nullable: z46.boolean().optional(),
6223
+ value: z46.string().nullable().optional(),
5910
6224
  placeholder: DynamicTextSchema.optional(),
5911
6225
  props: BsInputPropsSchema.optional()
5912
6226
  });
5913
6227
  var BsInputFieldSchema = BsInputFieldSchemaObject.superRefine(nullableValueRefine);
5914
6228
  var BsTextareaFieldSchemaObject = BsValueFieldBase.extend({
5915
- type: z44.literal("textarea"),
5916
- nullable: z44.boolean().optional(),
5917
- value: z44.string().nullable().optional(),
6229
+ type: z46.literal("textarea"),
6230
+ nullable: z46.boolean().optional(),
6231
+ value: z46.string().nullable().optional(),
5918
6232
  placeholder: DynamicTextSchema.optional(),
5919
6233
  props: BsTextareaPropsSchema.optional()
5920
6234
  });
5921
6235
  var BsTextareaFieldSchema = BsTextareaFieldSchemaObject.superRefine(nullableValueRefine);
5922
6236
  var BsSelectFieldSchemaObject = BsValueFieldBase.extend({
5923
- type: z44.literal("select"),
5924
- nullable: z44.boolean().optional(),
5925
- value: z44.string().nullable().optional(),
6237
+ type: z46.literal("select"),
6238
+ nullable: z46.boolean().optional(),
6239
+ value: z46.string().nullable().optional(),
5926
6240
  // Bootstrap select only supports strings
5927
6241
  placeholder: DynamicTextSchema.optional(),
5928
6242
  options: FieldOptionsSchema,
@@ -5930,113 +6244,128 @@ var BsSelectFieldSchemaObject = BsValueFieldBase.extend({
5930
6244
  });
5931
6245
  var BsSelectFieldSchema = BsSelectFieldSchemaObject.superRefine(nullableValueRefine);
5932
6246
  var BsCheckboxFieldSchema = BsValueFieldBase.extend({
5933
- type: z44.literal("checkbox"),
5934
- value: z44.boolean().optional(),
6247
+ type: z46.literal("checkbox"),
6248
+ value: z46.boolean().optional(),
5935
6249
  placeholder: DynamicTextSchema.optional(),
5936
6250
  props: BsCheckboxPropsSchema.optional()
5937
6251
  });
5938
6252
  var BsRadioFieldSchemaObject = BsValueFieldBase.extend({
5939
- type: z44.literal("radio"),
5940
- nullable: z44.boolean().optional(),
5941
- value: z44.unknown().nullable().optional(),
6253
+ type: z46.literal("radio"),
6254
+ nullable: z46.boolean().optional(),
6255
+ value: z46.unknown().nullable().optional(),
5942
6256
  placeholder: DynamicTextSchema.optional(),
5943
6257
  options: FieldOptionsSchema,
5944
6258
  props: BsRadioPropsSchema.optional()
5945
6259
  });
5946
6260
  var BsRadioFieldSchema = BsRadioFieldSchemaObject.superRefine(nullableValueRefine);
5947
6261
  var BsMultiCheckboxFieldSchemaObject = BsValueFieldBase.extend({
5948
- type: z44.literal("multi-checkbox"),
5949
- nullable: z44.boolean().optional(),
5950
- value: z44.array(z44.unknown()).nullable().optional(),
6262
+ type: z46.literal("multi-checkbox"),
6263
+ nullable: z46.boolean().optional(),
6264
+ value: z46.array(z46.unknown()).nullable().optional(),
5951
6265
  placeholder: DynamicTextSchema.optional(),
5952
6266
  options: FieldOptionsSchema,
5953
6267
  props: BsMultiCheckboxPropsSchema.optional()
5954
6268
  });
5955
6269
  var BsMultiCheckboxFieldSchema = BsMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
5956
6270
  var BsToggleFieldSchema = BsValueFieldBase.extend({
5957
- type: z44.literal("toggle"),
5958
- value: z44.boolean().optional(),
6271
+ type: z46.literal("toggle"),
6272
+ value: z46.boolean().optional(),
5959
6273
  placeholder: DynamicTextSchema.optional(),
5960
6274
  props: BsTogglePropsSchema.optional()
5961
6275
  });
5962
6276
  var BsDatepickerFieldSchemaObject = BsValueFieldBase.extend({
5963
- type: z44.literal("datepicker"),
5964
- nullable: z44.boolean().optional(),
5965
- value: z44.union([z44.string(), z44.null()]).optional(),
5966
- minDate: z44.union([z44.string(), z44.null()]).optional(),
5967
- maxDate: z44.union([z44.string(), z44.null()]).optional(),
5968
- startAt: z44.union([z44.string(), z44.null()]).optional(),
6277
+ type: z46.literal("datepicker"),
6278
+ nullable: z46.boolean().optional(),
6279
+ value: z46.union([z46.string(), z46.null()]).optional(),
6280
+ minDate: z46.union([z46.string(), z46.null()]).optional(),
6281
+ maxDate: z46.union([z46.string(), z46.null()]).optional(),
6282
+ startAt: z46.union([z46.string(), z46.null()]).optional(),
5969
6283
  placeholder: DynamicTextSchema.optional(),
5970
6284
  props: BsDatepickerPropsSchema.optional()
5971
6285
  });
5972
6286
  var BsDatepickerFieldSchema = BsDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
5973
6287
  var BsSliderFieldSchemaObject = BsValueFieldBase.extend({
5974
- type: z44.literal("slider"),
5975
- nullable: z44.boolean().optional(),
5976
- value: z44.number().nullable().optional(),
5977
- minValue: z44.number().optional(),
5978
- maxValue: z44.number().optional(),
5979
- step: z44.number().positive().optional(),
6288
+ type: z46.literal("slider"),
6289
+ nullable: z46.boolean().optional(),
6290
+ value: z46.number().nullable().optional(),
6291
+ minValue: z46.number().optional(),
6292
+ maxValue: z46.number().optional(),
6293
+ step: z46.number().positive().optional(),
5980
6294
  placeholder: DynamicTextSchema.optional(),
5981
6295
  props: BsSliderPropsSchema.optional()
5982
6296
  });
5983
6297
  var BsSliderFieldSchema = BsSliderFieldSchemaObject.superRefine(nullableValueRefine);
5984
6298
  var BsButtonFieldSchema = BaseFieldDefSchema.extend({
5985
- type: z44.literal("button"),
5986
- event: z44.string().optional(),
5987
- eventArgs: z44.array(z44.union([z44.string(), z44.number(), z44.boolean(), z44.null(), z44.undefined()])).optional(),
6299
+ type: z46.literal("button"),
6300
+ event: z46.string().optional(),
6301
+ eventArgs: z46.array(z46.union([z46.string(), z46.number(), z46.boolean(), z46.null(), z46.undefined()])).optional(),
5988
6302
  props: BsButtonPropsSchema.optional(),
5989
6303
  logic: LogicArraySchema.optional()
5990
6304
  });
5991
6305
  var BsSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
5992
- type: z44.literal("submit"),
6306
+ type: z46.literal("submit"),
5993
6307
  props: BsButtonPropsSchema.optional(),
5994
6308
  logic: LogicArraySchema.optional()
5995
6309
  });
5996
6310
  var BsNextButtonFieldSchema = BaseFieldDefSchema.extend({
5997
- type: z44.literal("next"),
6311
+ type: z46.literal("next"),
5998
6312
  props: BsButtonPropsSchema.optional(),
5999
6313
  logic: LogicArraySchema.optional()
6000
6314
  });
6001
6315
  var BsPreviousButtonFieldSchema = BaseFieldDefSchema.extend({
6002
- type: z44.literal("previous"),
6316
+ type: z46.literal("previous"),
6003
6317
  props: BsButtonPropsSchema.optional()
6004
6318
  });
6005
6319
  var BsAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6006
- type: z44.literal("add-array-item"),
6007
- arrayKey: z44.string().optional(),
6320
+ /**
6321
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6322
+ * item, or a list of them for an object item.
6323
+ */
6324
+ template: ArrayItemTemplateSchema,
6325
+ type: z46.literal("add-array-item"),
6326
+ arrayKey: z46.string().optional(),
6008
6327
  props: BsButtonPropsSchema.optional()
6009
6328
  });
6010
6329
  var BsRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6011
- type: z44.literal("remove-array-item"),
6012
- arrayKey: z44.string().optional(),
6330
+ type: z46.literal("remove-array-item"),
6331
+ arrayKey: z46.string().optional(),
6013
6332
  props: BsButtonPropsSchema.optional()
6014
6333
  });
6015
6334
  var BsPrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6016
- type: z44.literal("prepend-array-item"),
6017
- arrayKey: z44.string().optional(),
6335
+ /**
6336
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6337
+ * item, or a list of them for an object item.
6338
+ */
6339
+ template: ArrayItemTemplateSchema,
6340
+ type: z46.literal("prepend-array-item"),
6341
+ arrayKey: z46.string().optional(),
6018
6342
  props: BsButtonPropsSchema.optional()
6019
6343
  });
6020
6344
  var BsInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6021
- type: z44.literal("insert-array-item"),
6022
- arrayKey: z44.string().optional(),
6023
- index: z44.number(),
6345
+ /**
6346
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6347
+ * item, or a list of them for an object item.
6348
+ */
6349
+ template: ArrayItemTemplateSchema,
6350
+ type: z46.literal("insert-array-item"),
6351
+ arrayKey: z46.string().optional(),
6352
+ index: z46.number(),
6024
6353
  props: BsButtonPropsSchema.optional()
6025
6354
  });
6026
6355
  var BsPopArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6027
- type: z44.literal("pop-array-item"),
6028
- arrayKey: z44.string(),
6356
+ type: z46.literal("pop-array-item"),
6357
+ arrayKey: z46.string(),
6029
6358
  props: BsButtonPropsSchema.optional()
6030
6359
  });
6031
6360
  var BsShiftArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6032
- type: z44.literal("shift-array-item"),
6033
- arrayKey: z44.string(),
6361
+ type: z46.literal("shift-array-item"),
6362
+ arrayKey: z46.string(),
6034
6363
  props: BsButtonPropsSchema.optional()
6035
6364
  });
6036
6365
 
6037
6366
  // internal/dynamic-forms-validation/bootstrap/src/bs-leaf-field.schema.ts
6038
- import { z as z45 } from "zod";
6039
- var BsLeafFieldSchema = z45.discriminatedUnion("type", [
6367
+ import { z as z47 } from "zod";
6368
+ var BsLeafFieldSchema = z47.discriminatedUnion("type", [
6040
6369
  TextFieldSchema,
6041
6370
  HiddenFieldSchema,
6042
6371
  BsInputFieldSchemaObject,
@@ -6061,7 +6390,7 @@ var BsLeafFieldSchema = z45.discriminatedUnion("type", [
6061
6390
  ]).superRefine(nullableValueRefine);
6062
6391
 
6063
6392
  // internal/dynamic-forms-validation/bootstrap/src/bs-form-config.schema.ts
6064
- import { z as z46 } from "zod";
6393
+ import { z as z48 } from "zod";
6065
6394
  var containerSchemas2 = createContainerSchemas({
6066
6395
  leafFieldSchema: BsLeafFieldSchema
6067
6396
  });
@@ -6070,210 +6399,225 @@ var BsRowFieldSchema = containerSchemas2.RowFieldSchema;
6070
6399
  var BsGroupFieldSchema = containerSchemas2.GroupFieldSchema;
6071
6400
  var BsArrayFieldSchema = containerSchemas2.ArrayFieldSchema;
6072
6401
  var BsFieldSchema = containerSchemas2.AllFieldsSchema;
6073
- var BsFormDefaultPropsSchema = z46.object({
6402
+ var BsFormDefaultPropsSchema = z48.object({
6074
6403
  size: BsSizeSchema.optional(),
6075
- floatingLabel: z46.boolean().optional()
6404
+ floatingLabel: z48.boolean().optional()
6076
6405
  });
6077
6406
  var BsFormConfigSchema = createFormConfigSchema(BsFieldSchema, BsFormDefaultPropsSchema);
6078
6407
 
6079
6408
  // internal/dynamic-forms-validation/primeng/src/props/index.ts
6080
- import { z as z47 } from "zod";
6081
- var PrimeSeveritySchema = z47.enum(["primary", "secondary", "success", "info", "warn", "danger", "help", "contrast"]);
6082
- var PrimeCommonPropsSchema = z47.object({
6083
- styleClass: z47.string().optional(),
6409
+ import { z as z49 } from "zod";
6410
+ var PrimeSeveritySchema = z49.enum(["primary", "secondary", "success", "info", "warn", "danger", "help", "contrast"]);
6411
+ var PrimeCommonPropsSchema = z49.object({
6412
+ styleClass: z49.string().optional(),
6084
6413
  hint: DynamicTextSchema.optional()
6085
6414
  });
6086
6415
  var PrimeInputPropsSchema = PrimeCommonPropsSchema.extend({
6087
- type: z47.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
6416
+ type: z49.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
6088
6417
  placeholder: DynamicTextSchema.optional(),
6089
- size: z47.enum(["small", "large"]).optional(),
6090
- variant: z47.enum(["outlined", "filled"]).optional()
6418
+ size: z49.enum(["small", "large"]).optional(),
6419
+ variant: z49.enum(["outlined", "filled"]).optional()
6091
6420
  });
6092
6421
  var PrimeCheckboxPropsSchema = PrimeCommonPropsSchema.extend({
6093
- binary: z47.boolean().optional(),
6094
- trueValue: z47.unknown().optional(),
6095
- falseValue: z47.unknown().optional()
6422
+ binary: z49.boolean().optional(),
6423
+ trueValue: z49.unknown().optional(),
6424
+ falseValue: z49.unknown().optional()
6096
6425
  });
6097
6426
  var PrimeRadioPropsSchema = PrimeCommonPropsSchema.extend({
6098
- name: z47.string().optional()
6427
+ name: z49.string().optional()
6099
6428
  });
6100
6429
  var PrimeSelectPropsSchema = PrimeCommonPropsSchema.extend({
6101
- multiple: z47.boolean().optional(),
6102
- filter: z47.boolean().optional(),
6430
+ multiple: z49.boolean().optional(),
6431
+ filter: z49.boolean().optional(),
6103
6432
  placeholder: DynamicTextSchema.optional(),
6104
- showClear: z47.boolean().optional()
6433
+ showClear: z49.boolean().optional()
6105
6434
  });
6106
6435
  var PrimeMultiCheckboxPropsSchema = PrimeCommonPropsSchema;
6107
6436
  var PrimeDatepickerPropsSchema = PrimeCommonPropsSchema.extend({
6108
- dateFormat: z47.string().optional(),
6109
- inline: z47.boolean().optional(),
6110
- showIcon: z47.boolean().optional(),
6111
- showButtonBar: z47.boolean().optional(),
6112
- selectionMode: z47.enum(["single", "multiple", "range"]).optional(),
6113
- touchUI: z47.boolean().optional(),
6114
- view: z47.enum(["date", "month", "year"]).optional(),
6437
+ dateFormat: z49.string().optional(),
6438
+ inline: z49.boolean().optional(),
6439
+ showIcon: z49.boolean().optional(),
6440
+ showButtonBar: z49.boolean().optional(),
6441
+ selectionMode: z49.enum(["single", "multiple", "range"]).optional(),
6442
+ touchUI: z49.boolean().optional(),
6443
+ view: z49.enum(["date", "month", "year"]).optional(),
6115
6444
  placeholder: DynamicTextSchema.optional()
6116
6445
  });
6117
6446
  var PrimeTextareaPropsSchema = PrimeCommonPropsSchema.extend({
6118
- rows: z47.number().positive().optional(),
6119
- autoResize: z47.boolean().optional(),
6447
+ rows: z49.number().positive().optional(),
6448
+ autoResize: z49.boolean().optional(),
6120
6449
  placeholder: DynamicTextSchema.optional()
6121
6450
  });
6122
6451
  var PrimeSliderPropsSchema = PrimeCommonPropsSchema.extend({
6123
- min: z47.number().optional(),
6124
- max: z47.number().optional(),
6125
- step: z47.number().positive().optional(),
6126
- range: z47.boolean().optional(),
6127
- orientation: z47.enum(["horizontal", "vertical"]).optional()
6452
+ min: z49.number().optional(),
6453
+ max: z49.number().optional(),
6454
+ step: z49.number().positive().optional(),
6455
+ range: z49.boolean().optional(),
6456
+ orientation: z49.enum(["horizontal", "vertical"]).optional()
6128
6457
  });
6129
6458
  var PrimeTogglePropsSchema = PrimeCommonPropsSchema;
6130
- var PrimeButtonPropsSchema = z47.object({
6459
+ var PrimeButtonPropsSchema = z49.object({
6131
6460
  severity: PrimeSeveritySchema.optional(),
6132
- text: z47.boolean().optional(),
6133
- outlined: z47.boolean().optional(),
6134
- raised: z47.boolean().optional(),
6135
- rounded: z47.boolean().optional(),
6136
- icon: z47.string().optional(),
6137
- iconPos: z47.enum(["left", "right", "top", "bottom"]).optional(),
6138
- type: z47.enum(["button", "submit", "reset"]).optional()
6461
+ text: z49.boolean().optional(),
6462
+ outlined: z49.boolean().optional(),
6463
+ raised: z49.boolean().optional(),
6464
+ rounded: z49.boolean().optional(),
6465
+ icon: z49.string().optional(),
6466
+ iconPos: z49.enum(["left", "right", "top", "bottom"]).optional(),
6467
+ type: z49.enum(["button", "submit", "reset"]).optional()
6139
6468
  });
6140
6469
 
6141
6470
  // internal/dynamic-forms-validation/primeng/src/fields/index.ts
6142
- import { z as z48 } from "zod";
6471
+ import { z as z50 } from "zod";
6143
6472
  var PrimeValueFieldBase = BaseFieldDefSchema.merge(FieldWithValidationSchema);
6144
6473
  var PrimeInputFieldSchemaObject = PrimeValueFieldBase.extend({
6145
- type: z48.literal("input"),
6146
- nullable: z48.boolean().optional(),
6147
- value: z48.string().nullable().optional(),
6474
+ type: z50.literal("input"),
6475
+ nullable: z50.boolean().optional(),
6476
+ value: z50.string().nullable().optional(),
6148
6477
  placeholder: DynamicTextSchema.optional(),
6149
6478
  props: PrimeInputPropsSchema.optional()
6150
6479
  });
6151
6480
  var PrimeInputFieldSchema = PrimeInputFieldSchemaObject.superRefine(nullableValueRefine);
6152
6481
  var PrimeCheckboxFieldSchema = PrimeValueFieldBase.extend({
6153
- type: z48.literal("checkbox"),
6154
- value: z48.boolean().optional(),
6482
+ type: z50.literal("checkbox"),
6483
+ value: z50.boolean().optional(),
6155
6484
  placeholder: DynamicTextSchema.optional(),
6156
6485
  props: PrimeCheckboxPropsSchema.optional()
6157
6486
  });
6158
6487
  var PrimeRadioFieldSchemaObject = PrimeValueFieldBase.extend({
6159
- type: z48.literal("radio"),
6160
- nullable: z48.boolean().optional(),
6161
- value: z48.unknown().nullable().optional(),
6488
+ type: z50.literal("radio"),
6489
+ nullable: z50.boolean().optional(),
6490
+ value: z50.unknown().nullable().optional(),
6162
6491
  placeholder: DynamicTextSchema.optional(),
6163
6492
  options: FieldOptionsSchema,
6164
6493
  props: PrimeRadioPropsSchema.optional()
6165
6494
  });
6166
6495
  var PrimeRadioFieldSchema = PrimeRadioFieldSchemaObject.superRefine(nullableValueRefine);
6167
6496
  var PrimeSelectFieldSchemaObject = PrimeValueFieldBase.extend({
6168
- type: z48.literal("select"),
6169
- nullable: z48.boolean().optional(),
6170
- value: z48.unknown().nullable().optional(),
6497
+ type: z50.literal("select"),
6498
+ nullable: z50.boolean().optional(),
6499
+ value: z50.unknown().nullable().optional(),
6171
6500
  placeholder: DynamicTextSchema.optional(),
6172
6501
  options: FieldOptionsSchema,
6173
6502
  props: PrimeSelectPropsSchema.optional()
6174
6503
  });
6175
6504
  var PrimeSelectFieldSchema = PrimeSelectFieldSchemaObject.superRefine(nullableValueRefine);
6176
6505
  var PrimeMultiCheckboxFieldSchemaObject = PrimeValueFieldBase.extend({
6177
- type: z48.literal("multi-checkbox"),
6178
- nullable: z48.boolean().optional(),
6179
- value: z48.array(z48.unknown()).nullable().optional(),
6506
+ type: z50.literal("multi-checkbox"),
6507
+ nullable: z50.boolean().optional(),
6508
+ value: z50.array(z50.unknown()).nullable().optional(),
6180
6509
  placeholder: DynamicTextSchema.optional(),
6181
6510
  options: FieldOptionsSchema,
6182
6511
  props: PrimeMultiCheckboxPropsSchema.optional()
6183
6512
  });
6184
6513
  var PrimeMultiCheckboxFieldSchema = PrimeMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
6185
6514
  var PrimeDatepickerFieldSchemaObject = PrimeValueFieldBase.extend({
6186
- type: z48.literal("datepicker"),
6187
- nullable: z48.boolean().optional(),
6188
- value: z48.union([z48.string(), z48.null()]).optional(),
6189
- minDate: z48.union([z48.string(), z48.null()]).optional(),
6190
- maxDate: z48.union([z48.string(), z48.null()]).optional(),
6191
- startAt: z48.union([z48.string(), z48.null()]).optional(),
6515
+ type: z50.literal("datepicker"),
6516
+ nullable: z50.boolean().optional(),
6517
+ value: z50.union([z50.string(), z50.null()]).optional(),
6518
+ minDate: z50.union([z50.string(), z50.null()]).optional(),
6519
+ maxDate: z50.union([z50.string(), z50.null()]).optional(),
6520
+ startAt: z50.union([z50.string(), z50.null()]).optional(),
6192
6521
  placeholder: DynamicTextSchema.optional(),
6193
6522
  props: PrimeDatepickerPropsSchema.optional()
6194
6523
  });
6195
6524
  var PrimeDatepickerFieldSchema = PrimeDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
6196
6525
  var PrimeTextareaFieldSchemaObject = PrimeValueFieldBase.extend({
6197
- type: z48.literal("textarea"),
6198
- nullable: z48.boolean().optional(),
6199
- value: z48.string().nullable().optional(),
6526
+ type: z50.literal("textarea"),
6527
+ nullable: z50.boolean().optional(),
6528
+ value: z50.string().nullable().optional(),
6200
6529
  placeholder: DynamicTextSchema.optional(),
6201
6530
  props: PrimeTextareaPropsSchema.optional()
6202
6531
  });
6203
6532
  var PrimeTextareaFieldSchema = PrimeTextareaFieldSchemaObject.superRefine(nullableValueRefine);
6204
6533
  var PrimeSliderFieldSchemaObject = PrimeValueFieldBase.extend({
6205
- type: z48.literal("slider"),
6206
- nullable: z48.boolean().optional(),
6207
- value: z48.number().nullable().optional(),
6208
- minValue: z48.number().optional(),
6209
- maxValue: z48.number().optional(),
6210
- step: z48.number().positive().optional(),
6534
+ type: z50.literal("slider"),
6535
+ nullable: z50.boolean().optional(),
6536
+ value: z50.number().nullable().optional(),
6537
+ minValue: z50.number().optional(),
6538
+ maxValue: z50.number().optional(),
6539
+ step: z50.number().positive().optional(),
6211
6540
  placeholder: DynamicTextSchema.optional(),
6212
6541
  props: PrimeSliderPropsSchema.optional()
6213
6542
  });
6214
6543
  var PrimeSliderFieldSchema = PrimeSliderFieldSchemaObject.superRefine(nullableValueRefine);
6215
6544
  var PrimeToggleFieldSchema = PrimeValueFieldBase.extend({
6216
- type: z48.literal("toggle"),
6217
- value: z48.boolean().optional(),
6545
+ type: z50.literal("toggle"),
6546
+ value: z50.boolean().optional(),
6218
6547
  placeholder: DynamicTextSchema.optional(),
6219
6548
  props: PrimeTogglePropsSchema.optional()
6220
6549
  });
6221
6550
  var PrimeButtonFieldSchema = BaseFieldDefSchema.extend({
6222
- type: z48.literal("button"),
6223
- event: z48.string().optional(),
6224
- eventArgs: z48.array(z48.union([z48.string(), z48.number(), z48.boolean(), z48.null(), z48.undefined()])).optional(),
6551
+ type: z50.literal("button"),
6552
+ event: z50.string().optional(),
6553
+ eventArgs: z50.array(z50.union([z50.string(), z50.number(), z50.boolean(), z50.null(), z50.undefined()])).optional(),
6225
6554
  props: PrimeButtonPropsSchema.optional(),
6226
6555
  logic: LogicArraySchema.optional()
6227
6556
  });
6228
6557
  var PrimeSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
6229
- type: z48.literal("submit"),
6558
+ type: z50.literal("submit"),
6230
6559
  props: PrimeButtonPropsSchema.optional(),
6231
6560
  logic: LogicArraySchema.optional()
6232
6561
  });
6233
6562
  var PrimeNextButtonFieldSchema = BaseFieldDefSchema.extend({
6234
- type: z48.literal("next"),
6563
+ type: z50.literal("next"),
6235
6564
  props: PrimeButtonPropsSchema.optional(),
6236
6565
  logic: LogicArraySchema.optional()
6237
6566
  });
6238
6567
  var PrimePreviousButtonFieldSchema = BaseFieldDefSchema.extend({
6239
- type: z48.literal("previous"),
6568
+ type: z50.literal("previous"),
6240
6569
  props: PrimeButtonPropsSchema.optional()
6241
6570
  });
6242
6571
  var PrimeAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6243
- type: z48.literal("add-array-item"),
6244
- arrayKey: z48.string().optional(),
6572
+ /**
6573
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6574
+ * item, or a list of them for an object item.
6575
+ */
6576
+ template: ArrayItemTemplateSchema,
6577
+ type: z50.literal("add-array-item"),
6578
+ arrayKey: z50.string().optional(),
6245
6579
  props: PrimeButtonPropsSchema.optional()
6246
6580
  });
6247
6581
  var PrimeRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6248
- type: z48.literal("remove-array-item"),
6249
- arrayKey: z48.string().optional(),
6582
+ type: z50.literal("remove-array-item"),
6583
+ arrayKey: z50.string().optional(),
6250
6584
  props: PrimeButtonPropsSchema.optional()
6251
6585
  });
6252
6586
  var PrimePrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6253
- type: z48.literal("prepend-array-item"),
6254
- arrayKey: z48.string().optional(),
6587
+ /**
6588
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6589
+ * item, or a list of them for an object item.
6590
+ */
6591
+ template: ArrayItemTemplateSchema,
6592
+ type: z50.literal("prepend-array-item"),
6593
+ arrayKey: z50.string().optional(),
6255
6594
  props: PrimeButtonPropsSchema.optional()
6256
6595
  });
6257
6596
  var PrimeInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6258
- type: z48.literal("insert-array-item"),
6259
- arrayKey: z48.string().optional(),
6260
- index: z48.number(),
6597
+ /**
6598
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6599
+ * item, or a list of them for an object item.
6600
+ */
6601
+ template: ArrayItemTemplateSchema,
6602
+ type: z50.literal("insert-array-item"),
6603
+ arrayKey: z50.string().optional(),
6604
+ index: z50.number(),
6261
6605
  props: PrimeButtonPropsSchema.optional()
6262
6606
  });
6263
6607
  var PrimePopArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6264
- type: z48.literal("pop-array-item"),
6265
- arrayKey: z48.string(),
6608
+ type: z50.literal("pop-array-item"),
6609
+ arrayKey: z50.string(),
6266
6610
  props: PrimeButtonPropsSchema.optional()
6267
6611
  });
6268
6612
  var PrimeShiftArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6269
- type: z48.literal("shift-array-item"),
6270
- arrayKey: z48.string(),
6613
+ type: z50.literal("shift-array-item"),
6614
+ arrayKey: z50.string(),
6271
6615
  props: PrimeButtonPropsSchema.optional()
6272
6616
  });
6273
6617
 
6274
6618
  // internal/dynamic-forms-validation/primeng/src/prime-leaf-field.schema.ts
6275
- import { z as z49 } from "zod";
6276
- var PrimeLeafFieldSchema = z49.discriminatedUnion("type", [
6619
+ import { z as z51 } from "zod";
6620
+ var PrimeLeafFieldSchema = z51.discriminatedUnion("type", [
6277
6621
  TextFieldSchema,
6278
6622
  HiddenFieldSchema,
6279
6623
  PrimeInputFieldSchemaObject,
@@ -6298,7 +6642,7 @@ var PrimeLeafFieldSchema = z49.discriminatedUnion("type", [
6298
6642
  ]).superRefine(nullableValueRefine);
6299
6643
 
6300
6644
  // internal/dynamic-forms-validation/primeng/src/prime-form-config.schema.ts
6301
- import { z as z50 } from "zod";
6645
+ import { z as z52 } from "zod";
6302
6646
  var containerSchemas3 = createContainerSchemas({
6303
6647
  leafFieldSchema: PrimeLeafFieldSchema
6304
6648
  });
@@ -6307,252 +6651,267 @@ var PrimeRowFieldSchema = containerSchemas3.RowFieldSchema;
6307
6651
  var PrimeGroupFieldSchema = containerSchemas3.GroupFieldSchema;
6308
6652
  var PrimeArrayFieldSchema = containerSchemas3.ArrayFieldSchema;
6309
6653
  var PrimeFieldSchema = containerSchemas3.AllFieldsSchema;
6310
- var PrimeFormDefaultPropsSchema = z50.object({
6311
- styleClass: z50.string().optional()
6654
+ var PrimeFormDefaultPropsSchema = z52.object({
6655
+ styleClass: z52.string().optional()
6312
6656
  });
6313
6657
  var PrimeFormConfigSchema = createFormConfigSchema(PrimeFieldSchema, PrimeFormDefaultPropsSchema);
6314
6658
 
6315
6659
  // internal/dynamic-forms-validation/ionic/src/props/index.ts
6316
- import { z as z51 } from "zod";
6317
- var IonicColorSchema = z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", "dark"]);
6318
- var IonicLabelPlacementSchema = z51.enum(["start", "end", "fixed", "stacked", "floating"]);
6319
- var IonicJustifySchema = z51.enum(["start", "end", "space-between"]);
6320
- var IonicFillSchema = z51.enum(["solid", "outline", "clear", "default"]);
6321
- var IonicInputPropsSchema = z51.object({
6322
- fill: z51.enum(["solid", "outline"]).optional(),
6323
- shape: z51.literal("round").optional(),
6660
+ import { z as z53 } from "zod";
6661
+ var IonicColorSchema = z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", "dark"]);
6662
+ var IonicLabelPlacementSchema = z53.enum(["start", "end", "fixed", "stacked", "floating"]);
6663
+ var IonicJustifySchema = z53.enum(["start", "end", "space-between"]);
6664
+ var IonicFillSchema = z53.enum(["solid", "outline", "clear", "default"]);
6665
+ var IonicInputPropsSchema = z53.object({
6666
+ fill: z53.enum(["solid", "outline"]).optional(),
6667
+ shape: z53.literal("round").optional(),
6324
6668
  labelPlacement: IonicLabelPlacementSchema.optional(),
6325
6669
  color: IonicColorSchema.optional(),
6326
6670
  hint: DynamicTextSchema.optional(),
6327
6671
  errorText: DynamicTextSchema.optional(),
6328
- counter: z51.boolean().optional(),
6329
- clearInput: z51.boolean().optional(),
6330
- type: z51.enum(["text", "email", "password", "number", "tel", "url", "search"]).optional(),
6672
+ counter: z53.boolean().optional(),
6673
+ clearInput: z53.boolean().optional(),
6674
+ type: z53.enum(["text", "email", "password", "number", "tel", "url", "search"]).optional(),
6331
6675
  placeholder: DynamicTextSchema.optional()
6332
6676
  });
6333
- var IonicCheckboxPropsSchema = z51.object({
6334
- labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
6677
+ var IonicCheckboxPropsSchema = z53.object({
6678
+ labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6335
6679
  justify: IonicJustifySchema.optional(),
6336
- color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6337
- indeterminate: z51.boolean().optional(),
6680
+ color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6681
+ indeterminate: z53.boolean().optional(),
6338
6682
  hint: DynamicTextSchema.optional()
6339
6683
  });
6340
- var IonicRadioPropsSchema = z51.object({
6341
- labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
6684
+ var IonicRadioPropsSchema = z53.object({
6685
+ labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6342
6686
  justify: IonicJustifySchema.optional(),
6343
- color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6687
+ color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6344
6688
  hint: DynamicTextSchema.optional()
6345
6689
  });
6346
- var IonicTogglePropsSchema = z51.object({
6347
- labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
6690
+ var IonicTogglePropsSchema = z53.object({
6691
+ labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6348
6692
  justify: IonicJustifySchema.optional(),
6349
- color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6350
- enableOnOffLabels: z51.boolean().optional(),
6693
+ color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6694
+ enableOnOffLabels: z53.boolean().optional(),
6351
6695
  hint: DynamicTextSchema.optional()
6352
6696
  });
6353
- var IonicSliderPropsSchema = z51.object({
6354
- min: z51.number().optional(),
6355
- max: z51.number().optional(),
6356
- step: z51.number().positive().optional(),
6357
- dualKnobs: z51.boolean().optional(),
6358
- pin: z51.boolean().optional(),
6359
- ticks: z51.boolean().optional(),
6360
- snaps: z51.boolean().optional(),
6361
- color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6362
- labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
6697
+ var IonicSliderPropsSchema = z53.object({
6698
+ min: z53.number().optional(),
6699
+ max: z53.number().optional(),
6700
+ step: z53.number().positive().optional(),
6701
+ dualKnobs: z53.boolean().optional(),
6702
+ pin: z53.boolean().optional(),
6703
+ ticks: z53.boolean().optional(),
6704
+ snaps: z53.boolean().optional(),
6705
+ color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6706
+ labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6363
6707
  hint: DynamicTextSchema.optional()
6364
6708
  });
6365
- var IonicDatepickerPropsSchema = z51.object({
6366
- presentation: z51.enum(["date", "date-time", "time", "time-date", "month", "month-year", "year"]).optional(),
6367
- multiple: z51.boolean().optional(),
6368
- preferWheel: z51.boolean().optional(),
6369
- showDefaultButtons: z51.boolean().optional(),
6370
- showDefaultTitle: z51.boolean().optional(),
6371
- showDefaultTimeLabel: z51.boolean().optional(),
6372
- showClearButton: z51.boolean().optional(),
6373
- doneText: z51.string().optional(),
6374
- cancelText: z51.string().optional(),
6375
- size: z51.enum(["cover", "fixed"]).optional(),
6376
- color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6709
+ var IonicDatepickerPropsSchema = z53.object({
6710
+ presentation: z53.enum(["date", "date-time", "time", "time-date", "month", "month-year", "year"]).optional(),
6711
+ multiple: z53.boolean().optional(),
6712
+ preferWheel: z53.boolean().optional(),
6713
+ showDefaultButtons: z53.boolean().optional(),
6714
+ showDefaultTitle: z53.boolean().optional(),
6715
+ showDefaultTimeLabel: z53.boolean().optional(),
6716
+ showClearButton: z53.boolean().optional(),
6717
+ doneText: z53.string().optional(),
6718
+ cancelText: z53.string().optional(),
6719
+ size: z53.enum(["cover", "fixed"]).optional(),
6720
+ color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6377
6721
  hint: DynamicTextSchema.optional(),
6378
6722
  placeholder: DynamicTextSchema.optional()
6379
6723
  });
6380
- var IonicSelectPropsSchema = z51.object({
6381
- multiple: z51.boolean().optional(),
6382
- interface: z51.enum(["action-sheet", "popover", "alert"]).optional(),
6383
- cancelText: z51.string().optional(),
6384
- okText: z51.string().optional(),
6724
+ var IonicSelectPropsSchema = z53.object({
6725
+ multiple: z53.boolean().optional(),
6726
+ interface: z53.enum(["action-sheet", "popover", "alert"]).optional(),
6727
+ cancelText: z53.string().optional(),
6728
+ okText: z53.string().optional(),
6385
6729
  placeholder: DynamicTextSchema.optional(),
6386
- fill: z51.enum(["solid", "outline"]).optional(),
6387
- shape: z51.literal("round").optional(),
6730
+ fill: z53.enum(["solid", "outline"]).optional(),
6731
+ shape: z53.literal("round").optional(),
6388
6732
  labelPlacement: IonicLabelPlacementSchema.optional(),
6389
- color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6733
+ color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6390
6734
  hint: DynamicTextSchema.optional()
6391
6735
  });
6392
- var IonicTextareaPropsSchema = z51.object({
6393
- rows: z51.number().positive().optional(),
6394
- autoGrow: z51.boolean().optional(),
6395
- counter: z51.boolean().optional(),
6396
- fill: z51.enum(["solid", "outline"]).optional(),
6397
- shape: z51.literal("round").optional(),
6736
+ var IonicTextareaPropsSchema = z53.object({
6737
+ rows: z53.number().positive().optional(),
6738
+ autoGrow: z53.boolean().optional(),
6739
+ counter: z53.boolean().optional(),
6740
+ fill: z53.enum(["solid", "outline"]).optional(),
6741
+ shape: z53.literal("round").optional(),
6398
6742
  labelPlacement: IonicLabelPlacementSchema.optional(),
6399
6743
  hint: DynamicTextSchema.optional(),
6400
6744
  errorText: DynamicTextSchema.optional(),
6401
6745
  color: IonicColorSchema.optional(),
6402
6746
  placeholder: DynamicTextSchema.optional()
6403
6747
  });
6404
- var IonicMultiCheckboxPropsSchema = z51.object({
6405
- labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
6748
+ var IonicMultiCheckboxPropsSchema = z53.object({
6749
+ labelPlacement: z53.enum(["start", "end", "fixed", "stacked"]).optional(),
6406
6750
  justify: IonicJustifySchema.optional(),
6407
- color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6751
+ color: z53.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
6408
6752
  hint: DynamicTextSchema.optional()
6409
6753
  });
6410
- var IonicButtonPropsSchema = z51.object({
6411
- expand: z51.enum(["full", "block"]).optional(),
6754
+ var IonicButtonPropsSchema = z53.object({
6755
+ expand: z53.enum(["full", "block"]).optional(),
6412
6756
  fill: IonicFillSchema.optional(),
6413
- shape: z51.literal("round").optional(),
6414
- size: z51.enum(["small", "default", "large"]).optional(),
6757
+ shape: z53.literal("round").optional(),
6758
+ size: z53.enum(["small", "default", "large"]).optional(),
6415
6759
  color: IonicColorSchema.optional(),
6416
- strong: z51.boolean().optional(),
6417
- type: z51.enum(["button", "submit", "reset"]).optional()
6760
+ strong: z53.boolean().optional(),
6761
+ type: z53.enum(["button", "submit", "reset"]).optional()
6418
6762
  });
6419
6763
 
6420
6764
  // internal/dynamic-forms-validation/ionic/src/fields/index.ts
6421
- import { z as z52 } from "zod";
6765
+ import { z as z54 } from "zod";
6422
6766
  var IonicValueFieldBase = BaseFieldDefSchema.merge(FieldWithValidationSchema);
6423
6767
  var IonicInputFieldSchemaObject = IonicValueFieldBase.extend({
6424
- type: z52.literal("input"),
6425
- nullable: z52.boolean().optional(),
6426
- value: z52.string().nullable().optional(),
6768
+ type: z54.literal("input"),
6769
+ nullable: z54.boolean().optional(),
6770
+ value: z54.string().nullable().optional(),
6427
6771
  placeholder: DynamicTextSchema.optional(),
6428
6772
  props: IonicInputPropsSchema.optional()
6429
6773
  });
6430
6774
  var IonicInputFieldSchema = IonicInputFieldSchemaObject.superRefine(nullableValueRefine);
6431
6775
  var IonicCheckboxFieldSchema = IonicValueFieldBase.extend({
6432
- type: z52.literal("checkbox"),
6433
- value: z52.boolean().optional(),
6776
+ type: z54.literal("checkbox"),
6777
+ value: z54.boolean().optional(),
6434
6778
  placeholder: DynamicTextSchema.optional(),
6435
6779
  props: IonicCheckboxPropsSchema.optional()
6436
6780
  });
6437
6781
  var IonicRadioFieldSchemaObject = IonicValueFieldBase.extend({
6438
- type: z52.literal("radio"),
6439
- nullable: z52.boolean().optional(),
6440
- value: z52.unknown().nullable().optional(),
6782
+ type: z54.literal("radio"),
6783
+ nullable: z54.boolean().optional(),
6784
+ value: z54.unknown().nullable().optional(),
6441
6785
  placeholder: DynamicTextSchema.optional(),
6442
6786
  options: FieldOptionsSchema,
6443
6787
  props: IonicRadioPropsSchema.optional()
6444
6788
  });
6445
6789
  var IonicRadioFieldSchema = IonicRadioFieldSchemaObject.superRefine(nullableValueRefine);
6446
6790
  var IonicToggleFieldSchema = IonicValueFieldBase.extend({
6447
- type: z52.literal("toggle"),
6448
- value: z52.boolean().optional(),
6791
+ type: z54.literal("toggle"),
6792
+ value: z54.boolean().optional(),
6449
6793
  placeholder: DynamicTextSchema.optional(),
6450
6794
  props: IonicTogglePropsSchema.optional()
6451
6795
  });
6452
6796
  var IonicSliderFieldSchemaObject = IonicValueFieldBase.extend({
6453
- type: z52.literal("slider"),
6454
- nullable: z52.boolean().optional(),
6455
- value: z52.number().nullable().optional(),
6456
- minValue: z52.number().optional(),
6457
- maxValue: z52.number().optional(),
6458
- step: z52.number().positive().optional(),
6797
+ type: z54.literal("slider"),
6798
+ nullable: z54.boolean().optional(),
6799
+ value: z54.number().nullable().optional(),
6800
+ minValue: z54.number().optional(),
6801
+ maxValue: z54.number().optional(),
6802
+ step: z54.number().positive().optional(),
6459
6803
  placeholder: DynamicTextSchema.optional(),
6460
6804
  props: IonicSliderPropsSchema.optional()
6461
6805
  });
6462
6806
  var IonicSliderFieldSchema = IonicSliderFieldSchemaObject.superRefine(nullableValueRefine);
6463
6807
  var IonicDatepickerFieldSchemaObject = IonicValueFieldBase.extend({
6464
- type: z52.literal("datepicker"),
6465
- nullable: z52.boolean().optional(),
6466
- value: z52.union([z52.string(), z52.null()]).optional(),
6467
- minDate: z52.union([z52.string(), z52.null()]).optional(),
6468
- maxDate: z52.union([z52.string(), z52.null()]).optional(),
6469
- startAt: z52.union([z52.string(), z52.null()]).optional(),
6808
+ type: z54.literal("datepicker"),
6809
+ nullable: z54.boolean().optional(),
6810
+ value: z54.union([z54.string(), z54.null()]).optional(),
6811
+ minDate: z54.union([z54.string(), z54.null()]).optional(),
6812
+ maxDate: z54.union([z54.string(), z54.null()]).optional(),
6813
+ startAt: z54.union([z54.string(), z54.null()]).optional(),
6470
6814
  placeholder: DynamicTextSchema.optional(),
6471
6815
  props: IonicDatepickerPropsSchema.optional()
6472
6816
  });
6473
6817
  var IonicDatepickerFieldSchema = IonicDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
6474
6818
  var IonicSelectFieldSchemaObject = IonicValueFieldBase.extend({
6475
- type: z52.literal("select"),
6476
- nullable: z52.boolean().optional(),
6477
- value: z52.unknown().nullable().optional(),
6819
+ type: z54.literal("select"),
6820
+ nullable: z54.boolean().optional(),
6821
+ value: z54.unknown().nullable().optional(),
6478
6822
  placeholder: DynamicTextSchema.optional(),
6479
6823
  options: FieldOptionsSchema,
6480
6824
  props: IonicSelectPropsSchema.optional()
6481
6825
  });
6482
6826
  var IonicSelectFieldSchema = IonicSelectFieldSchemaObject.superRefine(nullableValueRefine);
6483
6827
  var IonicTextareaFieldSchemaObject = IonicValueFieldBase.extend({
6484
- type: z52.literal("textarea"),
6485
- nullable: z52.boolean().optional(),
6486
- value: z52.string().nullable().optional(),
6828
+ type: z54.literal("textarea"),
6829
+ nullable: z54.boolean().optional(),
6830
+ value: z54.string().nullable().optional(),
6487
6831
  placeholder: DynamicTextSchema.optional(),
6488
6832
  props: IonicTextareaPropsSchema.optional()
6489
6833
  });
6490
6834
  var IonicTextareaFieldSchema = IonicTextareaFieldSchemaObject.superRefine(nullableValueRefine);
6491
6835
  var IonicMultiCheckboxFieldSchemaObject = IonicValueFieldBase.extend({
6492
- type: z52.literal("multi-checkbox"),
6493
- nullable: z52.boolean().optional(),
6494
- value: z52.array(z52.unknown()).nullable().optional(),
6836
+ type: z54.literal("multi-checkbox"),
6837
+ nullable: z54.boolean().optional(),
6838
+ value: z54.array(z54.unknown()).nullable().optional(),
6495
6839
  placeholder: DynamicTextSchema.optional(),
6496
6840
  options: FieldOptionsSchema,
6497
6841
  props: IonicMultiCheckboxPropsSchema.optional()
6498
6842
  });
6499
6843
  var IonicMultiCheckboxFieldSchema = IonicMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
6500
6844
  var IonicButtonFieldSchema = BaseFieldDefSchema.extend({
6501
- type: z52.literal("button"),
6502
- event: z52.string().optional(),
6503
- eventArgs: z52.array(z52.union([z52.string(), z52.number(), z52.boolean(), z52.null(), z52.undefined()])).optional(),
6845
+ type: z54.literal("button"),
6846
+ event: z54.string().optional(),
6847
+ eventArgs: z54.array(z54.union([z54.string(), z54.number(), z54.boolean(), z54.null(), z54.undefined()])).optional(),
6504
6848
  props: IonicButtonPropsSchema.optional(),
6505
6849
  logic: LogicArraySchema.optional()
6506
6850
  });
6507
6851
  var IonicSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
6508
- type: z52.literal("submit"),
6852
+ type: z54.literal("submit"),
6509
6853
  props: IonicButtonPropsSchema.optional(),
6510
6854
  logic: LogicArraySchema.optional()
6511
6855
  });
6512
6856
  var IonicNextButtonFieldSchema = BaseFieldDefSchema.extend({
6513
- type: z52.literal("next"),
6857
+ type: z54.literal("next"),
6514
6858
  props: IonicButtonPropsSchema.optional(),
6515
6859
  logic: LogicArraySchema.optional()
6516
6860
  });
6517
6861
  var IonicPreviousButtonFieldSchema = BaseFieldDefSchema.extend({
6518
- type: z52.literal("previous"),
6862
+ type: z54.literal("previous"),
6519
6863
  props: IonicButtonPropsSchema.optional()
6520
6864
  });
6521
6865
  var IonicAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6522
- type: z52.literal("add-array-item"),
6523
- arrayKey: z52.string().optional(),
6866
+ /**
6867
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6868
+ * item, or a list of them for an object item.
6869
+ */
6870
+ template: ArrayItemTemplateSchema,
6871
+ type: z54.literal("add-array-item"),
6872
+ arrayKey: z54.string().optional(),
6524
6873
  props: IonicButtonPropsSchema.optional()
6525
6874
  });
6526
6875
  var IonicRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6527
- type: z52.literal("remove-array-item"),
6528
- arrayKey: z52.string().optional(),
6876
+ type: z54.literal("remove-array-item"),
6877
+ arrayKey: z54.string().optional(),
6529
6878
  props: IonicButtonPropsSchema.optional()
6530
6879
  });
6531
6880
  var IonicPrependArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6532
- type: z52.literal("prepend-array-item"),
6533
- arrayKey: z52.string().optional(),
6881
+ /**
6882
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6883
+ * item, or a list of them for an object item.
6884
+ */
6885
+ template: ArrayItemTemplateSchema,
6886
+ type: z54.literal("prepend-array-item"),
6887
+ arrayKey: z54.string().optional(),
6534
6888
  props: IonicButtonPropsSchema.optional()
6535
6889
  });
6536
6890
  var IonicInsertArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6537
- type: z52.literal("insert-array-item"),
6538
- arrayKey: z52.string().optional(),
6539
- index: z52.number(),
6891
+ /**
6892
+ * REQUIRED. What one new item looks like: a field definition for a primitive
6893
+ * item, or a list of them for an object item.
6894
+ */
6895
+ template: ArrayItemTemplateSchema,
6896
+ type: z54.literal("insert-array-item"),
6897
+ arrayKey: z54.string().optional(),
6898
+ index: z54.number(),
6540
6899
  props: IonicButtonPropsSchema.optional()
6541
6900
  });
6542
6901
  var IonicPopArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6543
- type: z52.literal("pop-array-item"),
6544
- arrayKey: z52.string(),
6902
+ type: z54.literal("pop-array-item"),
6903
+ arrayKey: z54.string(),
6545
6904
  props: IonicButtonPropsSchema.optional()
6546
6905
  });
6547
6906
  var IonicShiftArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
6548
- type: z52.literal("shift-array-item"),
6549
- arrayKey: z52.string(),
6907
+ type: z54.literal("shift-array-item"),
6908
+ arrayKey: z54.string(),
6550
6909
  props: IonicButtonPropsSchema.optional()
6551
6910
  });
6552
6911
 
6553
6912
  // internal/dynamic-forms-validation/ionic/src/ionic-leaf-field.schema.ts
6554
- import { z as z53 } from "zod";
6555
- var IonicLeafFieldSchema = z53.discriminatedUnion("type", [
6913
+ import { z as z55 } from "zod";
6914
+ var IonicLeafFieldSchema = z55.discriminatedUnion("type", [
6556
6915
  TextFieldSchema,
6557
6916
  HiddenFieldSchema,
6558
6917
  IonicInputFieldSchemaObject,
@@ -6577,7 +6936,7 @@ var IonicLeafFieldSchema = z53.discriminatedUnion("type", [
6577
6936
  ]).superRefine(nullableValueRefine);
6578
6937
 
6579
6938
  // internal/dynamic-forms-validation/ionic/src/ionic-form-config.schema.ts
6580
- import { z as z54 } from "zod";
6939
+ import { z as z56 } from "zod";
6581
6940
  var containerSchemas4 = createContainerSchemas({
6582
6941
  leafFieldSchema: IonicLeafFieldSchema
6583
6942
  });
@@ -6586,14 +6945,20 @@ var IonicRowFieldSchema = containerSchemas4.RowFieldSchema;
6586
6945
  var IonicGroupFieldSchema = containerSchemas4.GroupFieldSchema;
6587
6946
  var IonicArrayFieldSchema = containerSchemas4.ArrayFieldSchema;
6588
6947
  var IonicFieldSchema = containerSchemas4.AllFieldsSchema;
6589
- var IonicFormDefaultPropsSchema = z54.object({
6948
+ var IonicFormDefaultPropsSchema = z56.object({
6590
6949
  color: IonicColorSchema.optional(),
6591
6950
  labelPlacement: IonicLabelPlacementSchema.optional()
6592
6951
  });
6593
6952
  var IonicFormConfigSchema = createFormConfigSchema(IonicFieldSchema, IonicFormDefaultPropsSchema);
6594
6953
 
6954
+ // internal/dynamic-forms-validation/validate/src/json-schema/form-config-json-schema.ts
6955
+ function toJsonSchema(schema, name, basePath) {
6956
+ const jsonSchema = z57.toJSONSchema(schema, { target: "draft-7", io: "input", unrepresentable: "any" });
6957
+ jsonSchema["$id"] = basePath ? `${basePath.replace(/\/$/, "")}/${name}` : name;
6958
+ return jsonSchema;
6959
+ }
6960
+
6595
6961
  // internal/dynamic-forms-validation/validate/src/json-schema/field-type-json-schemas.ts
6596
- import zodToJsonSchema from "zod-to-json-schema";
6597
6962
  var fieldTypeSchemas = {
6598
6963
  material: {
6599
6964
  input: MatInputFieldSchema,
@@ -6682,41 +7047,34 @@ function getFieldTypeJsonSchema(uiIntegration, fieldType) {
6682
7047
  if (!schema) {
6683
7048
  throw new Error(`Unknown field type: ${fieldType}. Valid: ${getSupportedFieldTypes().join(", ")}`);
6684
7049
  }
6685
- const jsonSchema = zodToJsonSchema(schema, {
6686
- name: `${uiIntegration}${fieldType.charAt(0).toUpperCase() + fieldType.slice(1)}Field`,
6687
- $refStrategy: "none",
6688
- errorMessages: true
6689
- });
6690
- return jsonSchema;
7050
+ return toJsonSchema(schema, `${uiIntegration}${fieldType.charAt(0).toUpperCase() + fieldType.slice(1)}Field`);
6691
7051
  }
6692
7052
 
6693
7053
  // internal/dynamic-forms-validation/src/lib/schemas/field-type-names.ts
6694
- import { z as z55 } from "zod";
7054
+ import { z as z58 } from "zod";
6695
7055
  var MAX_DEPTH = 20;
6696
7056
  function collectDiscriminator(schema, into) {
6697
- if (schema instanceof z55.ZodLiteral) {
6698
- if (typeof schema.value === "string") into.add(schema.value);
7057
+ if (schema instanceof z58.ZodLiteral) {
7058
+ for (const value of schema.def.values) {
7059
+ if (typeof value === "string") into.add(value);
7060
+ }
6699
7061
  return;
6700
7062
  }
6701
- if (schema instanceof z55.ZodEnum) {
7063
+ if (schema instanceof z58.ZodEnum) {
6702
7064
  for (const value of schema.options) into.add(value);
6703
7065
  }
6704
7066
  }
6705
7067
  function visit(schema, into, depth) {
6706
7068
  if (depth > MAX_DEPTH) return;
6707
- if (schema instanceof z55.ZodLazy) {
6708
- visit(schema.schema, into, depth + 1);
7069
+ if (schema instanceof z58.ZodLazy) {
7070
+ visit(schema.unwrap(), into, depth + 1);
6709
7071
  return;
6710
7072
  }
6711
- if (schema instanceof z55.ZodEffects) {
6712
- visit(schema.innerType(), into, depth + 1);
6713
- return;
6714
- }
6715
- if (schema instanceof z55.ZodDiscriminatedUnion || schema instanceof z55.ZodUnion) {
7073
+ if (schema instanceof z58.ZodUnion) {
6716
7074
  for (const option of schema.options) visit(option, into, depth + 1);
6717
7075
  return;
6718
7076
  }
6719
- if (schema instanceof z55.ZodObject) {
7077
+ if (schema instanceof z58.ZodObject) {
6720
7078
  collectDiscriminator(schema.shape["type"], into);
6721
7079
  return;
6722
7080
  }
@@ -6789,14 +7147,14 @@ var DID_YOU_MEAN = {
6789
7147
  validation: "Did you mean to use validator shorthand (`required`, `email`, `min`, etc.) or `validators: [...]` array?"
6790
7148
  };
6791
7149
  function formatZodError(error, uiIntegration, config) {
6792
- const errors = error.errors.map((err) => {
7150
+ const errors = error.issues.map((err) => {
6793
7151
  const path = err.path.join(".") || "root";
6794
7152
  let message = err.message;
6795
7153
  let expected;
6796
7154
  let received;
6797
7155
  if ("expected" in err) expected = String(err.expected);
6798
7156
  if ("received" in err) received = String(err.received);
6799
- if (message === "Invalid input" || message === "Invalid union") {
7157
+ if (err.code === "invalid_union") {
6800
7158
  const fieldMatch = path.match(/fields\.(\d+)/);
6801
7159
  if (fieldMatch && config && typeof config === "object" && "fields" in config) {
6802
7160
  const fields = config.fields;
@@ -6927,121 +7285,31 @@ var FORBIDDEN_HIDDEN_PROPS = [
6927
7285
  "pattern",
6928
7286
  "placeholder"
6929
7287
  ];
6930
- var CONTAINER_FORBIDDEN_PROPS = ["validators", "required", "email", "min", "max", "minLength", "maxLength", "pattern", "value"];
7288
+ var CONTAINER_FORBIDDEN_PROPS = ["email", "min", "max", "pattern", "value"];
7289
+ var VALIDATING_CONTAINERS = ["group", "array"];
7290
+ var CONTAINER_VALIDATION_PROPS = ["validators", "required", "validationMessages"];
7291
+ var ARRAY_SIZE_PROPS = ["minLength", "maxLength"];
6931
7292
  var FIELDS_REQUIRING_OPTIONS = ["select", "radio", "multi-checkbox"];
7293
+ var CONTAINER_NESTING = {
7294
+ forbidden: ["page"],
7295
+ message: "Containers and rows cannot contain pages. ALL top-level fields must be pages if using multi-page mode."
7296
+ };
6932
7297
  var NESTING_RULES = {
6933
7298
  page: {
6934
- allowed: [
6935
- "row",
6936
- "group",
6937
- "array",
6938
- "input",
6939
- "textarea",
6940
- "select",
6941
- "checkbox",
6942
- "multi-checkbox",
6943
- "radio",
6944
- "datepicker",
6945
- "toggle",
6946
- "slider",
6947
- "hidden",
6948
- "text",
6949
- "button",
6950
- "submit",
6951
- "next",
6952
- "previous",
6953
- "add-array-item",
6954
- "prepend-array-item",
6955
- "insert-array-item",
6956
- "remove-array-item",
6957
- "pop-array-item",
6958
- "shift-array-item"
6959
- ],
6960
7299
  forbidden: ["page"],
6961
7300
  message: "Pages cannot be nested inside other containers. ALL top-level fields must be pages if using multi-page mode."
6962
7301
  },
6963
- row: {
6964
- allowed: [
6965
- "group",
6966
- "array",
6967
- "input",
6968
- "textarea",
6969
- "select",
6970
- "checkbox",
6971
- "multi-checkbox",
6972
- "radio",
6973
- "datepicker",
6974
- "toggle",
6975
- "slider",
6976
- "text",
6977
- "button",
6978
- "submit",
6979
- "next",
6980
- "previous",
6981
- "add-array-item",
6982
- "prepend-array-item",
6983
- "insert-array-item",
6984
- "remove-array-item",
6985
- "pop-array-item",
6986
- "shift-array-item"
6987
- ],
6988
- forbidden: ["page", "row", "hidden"],
6989
- message: "Rows cannot contain pages, other rows, or hidden fields. Hidden fields should be at page or form level."
6990
- },
7302
+ container: CONTAINER_NESTING,
7303
+ // A row resolves to a container at runtime, and the types say so outright:
7304
+ // `RowAllowedChildren` is an alias of `ContainerAllowedChildren`. Sharing the
7305
+ // entry keeps that an alias here too, rather than a fifth copy of the list
7306
+ // that can drift from the type it is derived from.
7307
+ row: CONTAINER_NESTING,
6991
7308
  group: {
6992
- allowed: [
6993
- "row",
6994
- "input",
6995
- "textarea",
6996
- "select",
6997
- "checkbox",
6998
- "multi-checkbox",
6999
- "radio",
7000
- "datepicker",
7001
- "toggle",
7002
- "slider",
7003
- "hidden",
7004
- "text",
7005
- "button",
7006
- "submit",
7007
- "next",
7008
- "previous",
7009
- "add-array-item",
7010
- "prepend-array-item",
7011
- "insert-array-item",
7012
- "remove-array-item",
7013
- "pop-array-item",
7014
- "shift-array-item"
7015
- ],
7016
7309
  forbidden: ["page", "group"],
7017
7310
  message: "Groups cannot contain pages or other groups (no nested groups)."
7018
7311
  },
7019
7312
  array: {
7020
- allowed: [
7021
- "row",
7022
- "group",
7023
- "input",
7024
- "textarea",
7025
- "select",
7026
- "checkbox",
7027
- "multi-checkbox",
7028
- "radio",
7029
- "datepicker",
7030
- "toggle",
7031
- "slider",
7032
- "hidden",
7033
- "text",
7034
- "button",
7035
- "submit",
7036
- "next",
7037
- "previous",
7038
- "add-array-item",
7039
- "prepend-array-item",
7040
- "insert-array-item",
7041
- "remove-array-item",
7042
- "pop-array-item",
7043
- "shift-array-item"
7044
- ],
7045
7313
  forbidden: ["page", "array"],
7046
7314
  message: "Arrays cannot contain pages or other arrays (no nested arrays)."
7047
7315
  }
@@ -7052,6 +7320,7 @@ var EXPECTED_STRUCTURE = {
7052
7320
  radio: `{ key: 'fieldKey', type: 'radio', label: 'Label', options: [{ label: 'Option', value: 'value' }] }`,
7053
7321
  "multi-checkbox": `{ key: 'fieldKey', type: 'multi-checkbox', label: 'Label', options: [{ label: 'Option', value: 'value' }] }`,
7054
7322
  slider: `{ key: 'fieldKey', type: 'slider', label: 'Label', minValue: 0, maxValue: 100, step: 1 }`,
7323
+ container: `{ key: 'containerKey', type: 'container', wrappers: [{ type: 'css', cssClasses: 'card' }], fields: [...childFields] }`,
7055
7324
  row: `{ key: 'rowKey', type: 'row', fields: [...childFields] }`,
7056
7325
  group: `{ key: 'groupKey', type: 'group', fields: [...childFields] }`,
7057
7326
  array: `Full API: { key: 'arrayKey', type: 'array', fields: [...itemDefs] } OR Simplified API: { key: 'arrayKey', type: 'array', template: { type: 'input', label: 'Item' }, value: [] }`,
@@ -7093,6 +7362,7 @@ function preValidateConfig(config) {
7093
7362
  if (prop in v) {
7094
7363
  errors.push({
7095
7364
  path: `${path}.validators[${vIdx}].${prop}`,
7365
+ ruleId: "core/validation-messages-location",
7096
7366
  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.`
7097
7367
  });
7098
7368
  }
@@ -7100,7 +7370,7 @@ function preValidateConfig(config) {
7100
7370
  }
7101
7371
  });
7102
7372
  }
7103
- if (["row", "group", "array"].includes(fieldType || "")) {
7373
+ if (["row", "group", "array", "container"].includes(fieldType || "")) {
7104
7374
  for (const prop of INVALID_CONTAINER_PROPS) {
7105
7375
  if (prop in f) {
7106
7376
  errors.push({
@@ -7117,10 +7387,30 @@ function preValidateConfig(config) {
7117
7387
  const expected = EXPECTED_STRUCTURE[fieldType || ""] || "";
7118
7388
  errors.push({
7119
7389
  path: `${path}.${prop}`,
7120
- message: `"${fieldType}" containers do NOT support "${prop}". Containers don't hold values or validate - they are purely for layout/grouping.${expected ? ` Expected structure: ${expected}` : ""}`
7390
+ message: `"${fieldType}" containers do NOT support "${prop}". Containers don't hold values - they are purely for layout/grouping.${expected ? ` Expected structure: ${expected}` : ""}`
7121
7391
  });
7122
7392
  }
7123
7393
  }
7394
+ if (!VALIDATING_CONTAINERS.includes(fieldType || "")) {
7395
+ for (const prop of CONTAINER_VALIDATION_PROPS) {
7396
+ if (prop in f) {
7397
+ errors.push({
7398
+ path: `${path}.${prop}`,
7399
+ 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.`
7400
+ });
7401
+ }
7402
+ }
7403
+ }
7404
+ if (fieldType !== "array") {
7405
+ for (const prop of ARRAY_SIZE_PROPS) {
7406
+ if (prop in f) {
7407
+ errors.push({
7408
+ path: `${path}.${prop}`,
7409
+ message: `"${fieldType}" containers do NOT support "${prop}". Array size constraints apply to "array" fields only.`
7410
+ });
7411
+ }
7412
+ }
7413
+ }
7124
7414
  if ("logic" in f && Array.isArray(f["logic"])) {
7125
7415
  const nonHiddenLogic = f["logic"].filter(
7126
7416
  (l) => l && typeof l === "object" && l["type"] !== "hidden"
@@ -7151,12 +7441,21 @@ function preValidateConfig(config) {
7151
7441
  });
7152
7442
  }
7153
7443
  }
7444
+ for (const prop of [...CONTAINER_VALIDATION_PROPS, ...ARRAY_SIZE_PROPS]) {
7445
+ if (prop in f) {
7446
+ errors.push({
7447
+ path: `${path}.${prop}`,
7448
+ message: `"page" containers do NOT support "${prop}". Pages flatten into the form and have no schema path of their own.`
7449
+ });
7450
+ }
7451
+ }
7154
7452
  }
7155
7453
  if (parentType && NESTING_RULES[parentType]) {
7156
7454
  const rules = NESTING_RULES[parentType];
7157
7455
  if (fieldType && rules.forbidden.includes(fieldType)) {
7158
7456
  errors.push({
7159
7457
  path,
7458
+ ruleId: "core/nesting",
7160
7459
  message: `"${fieldType}" is NOT allowed inside "${parentType}". ${rules.message}`
7161
7460
  });
7162
7461
  }
@@ -7205,6 +7504,7 @@ function preValidateConfig(config) {
7205
7504
  if (wrongProps.length > 0) {
7206
7505
  errors.push({
7207
7506
  path: `${path}.props`,
7507
+ ruleId: "core/slider-range-properties",
7208
7508
  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"]}`
7209
7509
  });
7210
7510
  }
@@ -7227,11 +7527,12 @@ function preValidateConfig(config) {
7227
7527
  const propList = foundForbidden.map((p) => `"${p}"`).join(", ");
7228
7528
  errors.push({
7229
7529
  path,
7530
+ ruleId: "core/hidden-minimal",
7230
7531
  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"]}`
7231
7532
  });
7232
7533
  }
7233
7534
  }
7234
- if (["row", "group", "page"].includes(fieldType || "")) {
7535
+ if (["row", "group", "page", "container"].includes(fieldType || "")) {
7235
7536
  if (!("fields" in f)) {
7236
7537
  errors.push({
7237
7538
  path: `${path}.fields`,
@@ -7244,6 +7545,19 @@ function preValidateConfig(config) {
7244
7545
  });
7245
7546
  }
7246
7547
  }
7548
+ if (fieldType === "container") {
7549
+ if (!("wrappers" in f)) {
7550
+ errors.push({
7551
+ path: `${path}.wrappers`,
7552
+ 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"]}`
7553
+ });
7554
+ } else if (!Array.isArray(f["wrappers"])) {
7555
+ errors.push({
7556
+ path: `${path}.wrappers`,
7557
+ message: `"container" container "${fieldKey || "unknown"}" has invalid "wrappers" - must be an array of wrapper objects, not ${typeof f["wrappers"]}.`
7558
+ });
7559
+ }
7560
+ }
7247
7561
  if (fieldType === "array") {
7248
7562
  const hasFields = "fields" in f;
7249
7563
  const hasTemplate = "template" in f;
@@ -7307,7 +7621,13 @@ function normalizeLegacyArrayActionTypes(value) {
7307
7621
  }
7308
7622
  return value;
7309
7623
  }
7310
- function validateFormConfig(uiIntegration, config) {
7624
+ function applyDisabledRules(errors, disabled) {
7625
+ if (disabled.size === 0) return errors;
7626
+ return errors.map(
7627
+ (error) => error.ruleId && disabled.has(error.ruleId) ? { ...error, severity: "warning" } : { ...error, severity: "error" }
7628
+ );
7629
+ }
7630
+ function validateFormConfig(uiIntegration, config, options) {
7311
7631
  const schema = formConfigSchemas[uiIntegration];
7312
7632
  if (!schema) {
7313
7633
  return {
@@ -7331,11 +7651,15 @@ function validateFormConfig(uiIntegration, config) {
7331
7651
  };
7332
7652
  }
7333
7653
  const zodErrors = result.success ? [] : formatZodError(result.error, uiIntegration, normalizedConfig);
7334
- const allErrors = [...preErrors, ...zodErrors];
7654
+ const allErrors = applyDisabledRules([...preErrors, ...zodErrors], options?.disabledRules ?? /* @__PURE__ */ new Set());
7655
+ const blocking = allErrors.filter((error) => error.severity !== "warning");
7656
+ if (blocking.length === 0) {
7657
+ return { valid: true, data: result.success ? result.data : void 0, errors: allErrors };
7658
+ }
7335
7659
  return {
7336
7660
  valid: false,
7337
7661
  errors: allErrors,
7338
- errorSummary: generateErrorSummary(allErrors)
7662
+ errorSummary: generateErrorSummary(blocking)
7339
7663
  };
7340
7664
  }
7341
7665
 
@@ -7714,7 +8038,7 @@ function extractNode(node, path, warnings, errors) {
7714
8038
 
7715
8039
  // internal/dynamic-forms-validation/discovery/validate-file.ts
7716
8040
  import { readFile } from "node:fs/promises";
7717
- function validateSource(source, filePath, uiIntegration) {
8041
+ function validateSource(source, filePath, uiIntegration, options) {
7718
8042
  const sourceFile = createSourceFile(source, filePath);
7719
8043
  const candidates = findFormConfigCandidates(sourceFile);
7720
8044
  const results = candidates.map((candidate) => {
@@ -7724,7 +8048,7 @@ function validateSource(source, filePath, uiIntegration) {
7724
8048
  line: candidate.startLine,
7725
8049
  matchReason: candidate.matchReason,
7726
8050
  extraction,
7727
- validation: validateFormConfig(uiIntegration, extraction.value)
8051
+ validation: validateFormConfig(uiIntegration, extraction.value, options)
7728
8052
  };
7729
8053
  });
7730
8054
  return {
@@ -7733,12 +8057,16 @@ function validateSource(source, filePath, uiIntegration) {
7733
8057
  results,
7734
8058
  noConfigsFound: results.length === 0,
7735
8059
  valid: results.every((r) => r.validation.valid),
7736
- errorCount: results.reduce((sum, r) => sum + (r.validation.errors?.length ?? 0), 0)
8060
+ // Errors only. A finding downgraded to a warning by a disabled rule does
8061
+ // not block, so counting it here reported "1 error" on a file the same run
8062
+ // called valid.
8063
+ errorCount: results.reduce((sum, r) => sum + (r.validation.errors ?? []).filter((e) => e.severity !== "warning").length, 0),
8064
+ warningCount: results.reduce((sum, r) => sum + (r.validation.errors ?? []).filter((e) => e.severity === "warning").length, 0)
7737
8065
  };
7738
8066
  }
7739
- async function validateFile(filePath, uiIntegration) {
8067
+ async function validateFile(filePath, uiIntegration, options) {
7740
8068
  const source = await readFile(filePath, "utf-8");
7741
- return validateSource(source, filePath, uiIntegration);
8069
+ return validateSource(source, filePath, uiIntegration, options);
7742
8070
  }
7743
8071
  function isFilePath(value) {
7744
8072
  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");
@@ -7815,6 +8143,21 @@ function pushErrors(lines, errors) {
7815
8143
  }
7816
8144
  }
7817
8145
  }
8146
+ function isWarning(error) {
8147
+ return error.severity === "warning";
8148
+ }
8149
+ function pushWarnings(lines, warnings) {
8150
+ if (warnings.length === 0) {
8151
+ return;
8152
+ }
8153
+ lines.push(`### ${warnings.length} Warning(s)`);
8154
+ lines.push("");
8155
+ for (const { name, error } of warnings) {
8156
+ const rule2 = error.ruleId ? ` (${error.ruleId}, disabled)` : "";
8157
+ lines.push(`- **${name}** \`${error.path}\`${rule2}: ${error.message}`);
8158
+ }
8159
+ lines.push("");
8160
+ }
7818
8161
  function pushRelatedDocs(lines, errors, options) {
7819
8162
  const hints = options?.relatedDocs?.(errors) ?? [];
7820
8163
  if (hints.length === 0) {
@@ -7862,30 +8205,35 @@ function formatFileReport(result, options) {
7862
8205
  }
7863
8206
  lines.push("");
7864
8207
  }
8208
+ const warnings = result.results.flatMap(
8209
+ (entry) => (entry.validation.errors ?? []).filter(isWarning).map((error) => ({ name: entry.name, error }))
8210
+ );
7865
8211
  if (result.valid) {
7866
8212
  lines.push("### All Configs Valid");
7867
8213
  lines.push("");
7868
8214
  for (const entry of result.results) {
7869
8215
  lines.push(`- **${entry.name}** (line ${entry.line}): Valid`);
7870
8216
  }
7871
- return lines.join("\n");
8217
+ lines.push("");
8218
+ pushWarnings(lines, warnings);
8219
+ return lines.join("\n").trimEnd();
7872
8220
  }
7873
8221
  lines.push(`### ${result.errorCount} Error(s) Found`);
7874
8222
  lines.push("");
7875
8223
  const allErrors = [];
7876
8224
  for (const entry of result.results) {
7877
- if (entry.validation.valid) {
8225
+ const blocking = (entry.validation.errors ?? []).filter((error) => !isWarning(error));
8226
+ if (blocking.length === 0) {
7878
8227
  lines.push(`#### ${entry.name} (line ${entry.line}): Valid`);
7879
8228
  } else {
7880
8229
  lines.push(`#### ${entry.name} (line ${entry.line}): Invalid`);
7881
8230
  lines.push("");
7882
- if (entry.validation.errors) {
7883
- pushErrors(lines, entry.validation.errors);
7884
- allErrors.push(...entry.validation.errors);
7885
- }
8231
+ pushErrors(lines, blocking);
8232
+ allErrors.push(...blocking);
7886
8233
  }
7887
8234
  lines.push("");
7888
8235
  }
8236
+ pushWarnings(lines, warnings);
7889
8237
  pushRelatedDocs(lines, allErrors, options);
7890
8238
  return lines.join("\n");
7891
8239
  }
@@ -7910,6 +8258,95 @@ function formatConfigReport(uiIntegration, validation, options) {
7910
8258
  return lines.join("\n");
7911
8259
  }
7912
8260
 
8261
+ // internal/dynamic-forms-validation/rules/catalogue.ts
8262
+ function rule(id, summary, why) {
8263
+ return { id, summary, why };
8264
+ }
8265
+ var RULES = Object.freeze(
8266
+ Object.fromEntries(
8267
+ [
8268
+ rule(
8269
+ "core/hidden-minimal",
8270
+ "Keep hidden fields to `key`, `type`, `value` and `className`",
8271
+ "Hidden fields render nothing, so labels, validation and layout properties on them have no effect and mislead the next reader."
8272
+ ),
8273
+ rule(
8274
+ "core/nesting",
8275
+ "Respect which field types may nest inside which",
8276
+ "A page inside a row, or an array inside an array, has no rendering path and fails at runtime rather than at build time."
8277
+ ),
8278
+ rule(
8279
+ "core/validation-messages-location",
8280
+ "Put error text in `validationMessages`, not on the validator",
8281
+ "A message on the validator object is dropped and the field falls back to the default text."
8282
+ ),
8283
+ rule(
8284
+ "core/slider-range-properties",
8285
+ "Use `minValue`, `maxValue` and `step` for a slider range",
8286
+ "`min` and `max` are validation shorthands. They typecheck and validate clean, and the slider still renders its default range, so nothing catches the mistake."
8287
+ )
8288
+ ].map((entry) => [entry.id, entry])
8289
+ )
8290
+ );
8291
+ var RULE_IDS = Object.freeze(Object.keys(RULES).sort());
8292
+ var UnknownRuleError = class extends Error {
8293
+ constructor(unknown) {
8294
+ super(
8295
+ `[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(", ")}.`
8296
+ );
8297
+ this.name = "UnknownRuleError";
8298
+ }
8299
+ };
8300
+ function resolveDisabledRules(disabled) {
8301
+ const unknown = disabled.filter((id) => !RULES[id]);
8302
+ if (unknown.length > 0) throw new UnknownRuleError(unknown);
8303
+ return new Set(disabled);
8304
+ }
8305
+
8306
+ // internal/dynamic-forms-validation/rules/project-rules.ts
8307
+ import { readFile as readFile2 } from "node:fs/promises";
8308
+ import { dirname, join } from "node:path";
8309
+ var RULES_FILE = join(".ng-forge", "rules.json");
8310
+ var RulesConfigError = class extends Error {
8311
+ constructor(path, detail) {
8312
+ super(`[Dynamic Forms] ${path}: ${detail}`);
8313
+ this.name = "RulesConfigError";
8314
+ }
8315
+ };
8316
+ function errorCode(cause) {
8317
+ return typeof cause === "object" && cause !== null && "code" in cause ? String(cause.code) : void 0;
8318
+ }
8319
+ async function loadProjectRules(packageJsonPath) {
8320
+ if (!packageJsonPath) return { disabled: /* @__PURE__ */ new Set() };
8321
+ const path = join(dirname(packageJsonPath), RULES_FILE);
8322
+ let raw;
8323
+ try {
8324
+ raw = await readFile2(path, "utf-8");
8325
+ } catch (cause) {
8326
+ const code = errorCode(cause);
8327
+ if (code === "ENOENT") return { disabled: /* @__PURE__ */ new Set() };
8328
+ throw new RulesConfigError(path, `cannot be read (${code ?? cause.message})`);
8329
+ }
8330
+ let parsed;
8331
+ try {
8332
+ parsed = JSON.parse(raw);
8333
+ } catch (cause) {
8334
+ throw new RulesConfigError(path, `not valid JSON (${cause.message})`);
8335
+ }
8336
+ if (parsed === null || typeof parsed !== "object") {
8337
+ throw new RulesConfigError(path, "must be a JSON object");
8338
+ }
8339
+ const disabled = parsed.disabled ?? [];
8340
+ if (!Array.isArray(disabled) || disabled.some((id) => typeof id !== "string")) {
8341
+ throw new RulesConfigError(path, '"disabled" must be an array of rule ids');
8342
+ }
8343
+ try {
8344
+ return { disabled: resolveDisabledRules(disabled), source: path };
8345
+ } catch (cause) {
8346
+ throw new RulesConfigError(path, cause.message.replace("[Dynamic Forms] ", ""));
8347
+ }
8348
+ }
8349
+
7913
8350
  // packages/dynamic-form-mcp/src/resources/schemas.resource.ts
7914
8351
  var UI_INTEGRATIONS = ["material", "bootstrap", "primeng", "ionic"];
7915
8352
  function registerSchemasResource(server) {
@@ -8078,7 +8515,7 @@ function registerResources(server) {
8078
8515
  }
8079
8516
 
8080
8517
  // packages/dynamic-form-mcp/src/tools/lookup.tool.ts
8081
- import { z as z56 } from "zod";
8518
+ import { z as z59 } from "zod";
8082
8519
 
8083
8520
  // packages/dynamic-form-mcp/src/tools/data/lookup-topics.ts
8084
8521
  var TOPICS = {
@@ -9813,25 +10250,42 @@ provideDynamicForm({
9813
10250
  | FieldContext | \`ctx.value()\` | \`ctx.valueOf('path' as never)\` | custom validators |`
9814
10251
  },
9815
10252
  containers: {
9816
- brief: `| Container | Label? | Logic? | Notes |
9817
- |-----------|--------|--------|-------|
9818
- | page | NO | hidden only | Nav buttons INSIDE |
9819
- | group | NO | hidden only | Creates nested object |
9820
- | array | NO | hidden only | Two APIs: \`template\`+\`value\` (simplified) or \`fields\` (full) |
9821
- | row | NO | hidden only | Layout only |`,
10253
+ brief: `| Container | Label? | Logic? | Value | Notes |
10254
+ |-----------|--------|--------|-------|-------|
10255
+ | page | NO | hidden only | flattened | Nav buttons INSIDE |
10256
+ | group | NO | hidden only | nested under its key | Creates nested object |
10257
+ | array | NO | hidden only | nested under its key | Two APIs: \`template\`+\`value\` (simplified) or \`fields\` (full) |
10258
+ | row | NO | hidden only | flattened | Layout only |
10259
+ | container | NO | hidden only | flattened | Layout + REQUIRED \`wrappers\` chain |`,
9822
10260
  full: `# Container Rules
9823
10261
 
9824
- | Container | Label? | Logic? | Allowed Children | Notes |
9825
- |-----------|--------|--------|------------------|-------|
9826
- | page | NO | YES (hidden only) | rows, groups, arrays, leaf fields, buttons | Nav buttons go INSIDE |
9827
- | group | NO | YES (hidden only) | rows, arrays, leaf fields (NOT pages, groups) | Creates nested object |
9828
- | array | NO | YES (hidden only) | rows, groups, leaf fields (NOT pages, arrays) | Two APIs: \`template\`+\`value\` (simplified) or \`fields\` (full) |
9829
- | row | NO | YES (hidden only) | groups, arrays, containers, nested rows, hidden fields, leaf fields (NOT pages) | Layout only |
10262
+ | Container | Label? | Logic? | Value Handling | Allowed Children | Notes |
10263
+ |-----------|--------|--------|----------------|------------------|-------|
10264
+ | page | NO | YES (hidden only) | flattened | rows, groups, arrays, containers, hidden, leaf fields, buttons (NOT pages) | Nav buttons go INSIDE |
10265
+ | group | NO | YES (hidden only) | nested under its key | rows, arrays, containers, hidden, leaf fields, buttons (NOT pages, groups) | Creates nested object |
10266
+ | 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) |
10267
+ | row | NO | YES (hidden only) | flattened | groups, arrays, containers, leaf fields, buttons (NOT pages, nested rows, hidden) | Layout only |
10268
+ | container | NO | YES (hidden only) | flattened | rows, groups, arrays, nested containers, hidden, leaf fields, buttons (NOT pages) | \`wrappers\` is REQUIRED (use [] for none) |
10269
+
10270
+ **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.
10271
+
10272
+ That difference is not cosmetic, so these are not interchangeable:
10273
+
10274
+ \`\`\`typescript
10275
+ // container \u2192 { street: '', city: '' } (chrome only, key not in the value)
10276
+ { key: 'billing', type: 'container', wrappers: [{ type: 'css', cssClasses: 'card' }], fields: [street, city] }
10277
+
10278
+ // group \u2192 { billing: { street: '', city: '' } } (adds a level to the value)
10279
+ { key: 'billing', type: 'group', fields: [street, city] }
10280
+ \`\`\`
10281
+
10282
+ 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.
9830
10283
 
9831
10284
  **CRITICAL:**
9832
- - All containers (page, group, row, array) support only the \`hidden\` logic type for conditional visibility.
10285
+ - All containers (page, group, row, array, container) support only the \`hidden\` logic type for conditional visibility.
9833
10286
  - For other logic types (disabled, required, readonly, derivation), apply them to child fields instead.
9834
- - Pages cannot be nested - ALL top-level fields must be pages if using multi-page mode.`
10287
+ - Pages cannot be nested - ALL top-level fields must be pages if using multi-page mode.
10288
+ - Rows reject nested rows and hidden fields; put hidden fields at page or form level.`
9835
10289
  },
9836
10290
  "field-placement": {
9837
10291
  brief: `**Multi-page:** ALL root fields must be pages. Hidden fields go INSIDE first page.
@@ -10625,7 +11079,8 @@ var TOPIC_DESCRIPTIONS = {
10625
11079
  "field-placement": "Which fields can go where \u2014 nesting and placement rules",
10626
11080
  "logic-matrix": "Which logic types are supported on which field types",
10627
11081
  "context-api": "FieldContext API \u2014 valueOf(), formValue, parent, arrayIndex",
10628
- containers: "Overview of all container types (group, row, array, page)",
11082
+ containers: "Overview of all container types (group, row, array, container, page) and what each may hold",
11083
+ container: "Wraps children in a wrapper chain; flattens their values into the parent like a row",
10629
11084
  "array-buttons": "Add/remove array item button configuration",
10630
11085
  "custom-validators": "Custom validator functions via validators array",
10631
11086
  conditions: "Condition operators and types for logic rules",
@@ -10885,7 +11340,7 @@ function formatTopicItem(key) {
10885
11340
  }
10886
11341
  function getTopicList() {
10887
11342
  const fieldTypes = ["input", "select", "slider", "radio", "checkbox", "textarea", "datepicker", "toggle", "text", "hidden"];
10888
- const containers = ["group", "row", "array", "simplified-array", "page"];
11343
+ const containers = [...getFieldTypesByCategory("container").map((f) => f.type), "simplified-array"];
10889
11344
  const wrappers = ["wrappers", ...getWrappers().map((w) => w.type)];
10890
11345
  const addons = ["addons", ...getAddonTypes().map((k) => k.type)];
10891
11346
  const concepts = [
@@ -10941,7 +11396,7 @@ ${patterns.map(formatTopicItem).join("\n")}
10941
11396
  }
10942
11397
  function formatFieldInfoFull(field, uiFieldType) {
10943
11398
  const lines = [];
10944
- const isContainer = ["row", "group", "array", "page"].includes(field.type);
11399
+ const isContainer = field.category === "container";
10945
11400
  const isHidden = field.type === "hidden";
10946
11401
  lines.push(`## ${field.type} field`);
10947
11402
  lines.push("");
@@ -11370,11 +11825,11 @@ Patterns: field-placement, logic-matrix, context-api, containers, multi-page-got
11370
11825
  Use topic="list" to see all available topics with descriptions.
11371
11826
  Use ngforge_search query="your question" to find topics by keyword.`,
11372
11827
  {
11373
- topic: z56.string().describe(
11374
- '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'
11828
+ topic: z59.string().describe(
11829
+ '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'
11375
11830
  ),
11376
- depth: z56.enum(["brief", "full", "schema"]).default("full").describe("brief=quick syntax (~20 lines), full=complete docs with examples, schema=include JSON schema"),
11377
- uiIntegration: z56.enum(UI_INTEGRATIONS2).optional().describe("Filter UI-specific info (only with depth=schema). material, bootstrap, primeng, ionic")
11831
+ depth: z59.enum(["brief", "full", "schema"]).default("full").describe("brief=quick syntax (~20 lines), full=complete docs with examples, schema=include JSON schema"),
11832
+ uiIntegration: z59.enum(UI_INTEGRATIONS2).optional().describe("Filter UI-specific info (only with depth=schema). material, bootstrap, primeng, ionic")
11378
11833
  },
11379
11834
  async ({ topic, depth, uiIntegration }) => {
11380
11835
  const normalizedTopic = topic.toLowerCase().trim();
@@ -11422,7 +11877,7 @@ ${nextSteps}`;
11422
11877
  }
11423
11878
 
11424
11879
  // packages/dynamic-form-mcp/src/tools/examples.tool.ts
11425
- import { z as z57 } from "zod";
11880
+ import { z as z60 } from "zod";
11426
11881
  var PATTERNS = {
11427
11882
  // ========== MINIMAL PATTERNS (NEW) ==========
11428
11883
  "minimal-multipage": {
@@ -13687,10 +14142,10 @@ Standard patterns: derivation, property-derivation, multi-page, conditional, val
13687
14142
  Use pattern="list" to see all available patterns.
13688
14143
  Use depth="minimal" for code-only output (no markdown).`,
13689
14144
  {
13690
- pattern: z57.string().optional().describe(
14145
+ pattern: z60.string().optional().describe(
13691
14146
  '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.'
13692
14147
  ),
13693
- depth: z57.enum(["minimal", "brief", "full", "explained"]).default("full").describe(
14148
+ depth: z60.enum(["minimal", "brief", "full", "explained"]).default("full").describe(
13694
14149
  "minimal=code only (~20-50 lines), brief=code+summary, full=code+comments (default), explained=code+detailed explanation"
13695
14150
  )
13696
14151
  },
@@ -13755,8 +14210,29 @@ function extractCode(markdown) {
13755
14210
  }
13756
14211
 
13757
14212
  // packages/dynamic-form-mcp/src/tools/validate.tool.ts
13758
- import { z as z58 } from "zod";
14213
+ import { access } from "node:fs/promises";
14214
+ import { dirname as dirname2, join as join2, parse, resolve } from "node:path";
14215
+ import { z as z61 } from "zod";
13759
14216
  var UI_INTEGRATIONS3 = ["material", "bootstrap", "primeng", "ionic"];
14217
+ async function projectDisabledRules(filePath) {
14218
+ return (await loadProjectRules(await nearestManifest(dirname2(filePath)))).disabled;
14219
+ }
14220
+ function countBySeverity(errors, severity) {
14221
+ return (errors ?? []).filter((error) => (error.severity ?? "error") === severity).length;
14222
+ }
14223
+ async function nearestManifest(start) {
14224
+ const from = resolve(start);
14225
+ const { root } = parse(from);
14226
+ for (let dir = from; ; dir = dirname2(dir)) {
14227
+ const candidate = join2(dir, "package.json");
14228
+ try {
14229
+ await access(candidate);
14230
+ return candidate;
14231
+ } catch {
14232
+ }
14233
+ if (dir === root) return void 0;
14234
+ }
14235
+ }
13760
14236
  var ERROR_TOPIC_HINTS = [
13761
14237
  { pattern: /options/i, hint: '`ngforge_lookup topic="options-format"` \u2014 correct options syntax' },
13762
14238
  { pattern: /hidden/i, hint: '`ngforge_lookup topic="hidden"` \u2014 hidden field rules' },
@@ -13808,16 +14284,17 @@ Example errors you'll see:
13808
14284
  - "options MUST be at FIELD level, NOT inside props"
13809
14285
  - "containers only support 'hidden' logic type"`,
13810
14286
  {
13811
- config: z58.union([z58.string(), z58.object({}).passthrough()]).describe(
14287
+ config: z61.union([z61.string(), z61.object({}).passthrough()]).describe(
13812
14288
  "File path (.ts/.js) OR JSON string OR JSON object. Auto-detects: paths ending in .ts/.js or starting with / are treated as files."
13813
14289
  ),
13814
- uiIntegration: z58.enum(UI_INTEGRATIONS3).default("material").describe("UI library to validate against (material, bootstrap, primeng, ionic). Defaults to material.")
14290
+ uiIntegration: z61.enum(UI_INTEGRATIONS3).default("material").describe("UI library to validate against (material, bootstrap, primeng, ionic). Defaults to material.")
13815
14291
  },
13816
14292
  async ({ config, uiIntegration }) => {
13817
14293
  try {
13818
14294
  const parsed = parseConfigInput(config);
13819
14295
  if (parsed.type === "file") {
13820
- const result2 = await validateFile(parsed.path, uiIntegration);
14296
+ const disabledRules = await projectDisabledRules(parsed.path);
14297
+ const result2 = await validateFile(parsed.path, uiIntegration, { disabledRules });
13821
14298
  const report2 = formatFileReport(result2, { relatedDocs: collectErrorTopicHints });
13822
14299
  const structured2 = {
13823
14300
  type: "file",
@@ -13825,11 +14302,14 @@ Example errors you'll see:
13825
14302
  uiIntegration,
13826
14303
  configsFound: result2.results.length,
13827
14304
  allValid: result2.valid,
14305
+ errorCount: result2.errorCount,
14306
+ warningCount: result2.warningCount,
13828
14307
  results: result2.results.map((r) => ({
13829
14308
  name: r.name,
13830
14309
  line: r.line,
13831
14310
  valid: r.validation.valid,
13832
- errorCount: r.validation.errors?.length || 0
14311
+ errorCount: countBySeverity(r.validation.errors, "error"),
14312
+ warningCount: countBySeverity(r.validation.errors, "warning")
13833
14313
  }))
13834
14314
  };
13835
14315
  return {
@@ -13846,7 +14326,8 @@ Example errors you'll see:
13846
14326
  type: parsed.type,
13847
14327
  uiIntegration,
13848
14328
  valid: result.valid,
13849
- errorCount: result.errors?.length || 0,
14329
+ errorCount: countBySeverity(result.errors, "error"),
14330
+ warningCount: countBySeverity(result.errors, "warning"),
13850
14331
  errors: result.errors
13851
14332
  };
13852
14333
  return {
@@ -13903,7 +14384,7 @@ If validating JSON, ensure:
13903
14384
  }
13904
14385
 
13905
14386
  // packages/dynamic-form-mcp/src/tools/scaffold.tool.ts
13906
- import { z as z59 } from "zod";
14387
+ import { z as z62 } from "zod";
13907
14388
  var UI_INTEGRATIONS4 = ["material", "bootstrap", "primeng", "ionic"];
13908
14389
  function parseFieldDefs(fields) {
13909
14390
  return fields.map((f) => {
@@ -14158,12 +14639,12 @@ Examples:
14158
14639
  - With groups: pages=0 groups=["address","billing"]
14159
14640
  - With hidden: hidden=["userId:abc123","source:web"]`,
14160
14641
  {
14161
- pages: z59.number().min(0).max(10).default(0).describe("Number of pages (0 = single-page form, 1-10 = multi-page wizard)"),
14162
- arrays: z59.array(z59.string()).optional().describe('Array field names for dynamic lists, e.g., ["contacts", "addresses"]'),
14163
- groups: z59.array(z59.string()).optional().describe('Group field names for nested objects, e.g., ["address", "billing"]'),
14164
- hidden: z59.array(z59.string()).optional().describe('Hidden fields as "name:value" pairs, e.g., ["userId:abc", "version:1"]'),
14165
- fields: z59.array(z59.string()).optional().describe('Basic fields as "name:type" pairs, e.g., ["email:input", "country:select", "age:slider"]'),
14166
- uiIntegration: z59.enum(UI_INTEGRATIONS4).default("material").describe("UI library (for future UI-specific props). Defaults to material.")
14642
+ pages: z62.number().min(0).max(10).default(0).describe("Number of pages (0 = single-page form, 1-10 = multi-page wizard)"),
14643
+ arrays: z62.array(z62.string()).optional().describe('Array field names for dynamic lists, e.g., ["contacts", "addresses"]'),
14644
+ groups: z62.array(z62.string()).optional().describe('Group field names for nested objects, e.g., ["address", "billing"]'),
14645
+ hidden: z62.array(z62.string()).optional().describe('Hidden fields as "name:value" pairs, e.g., ["userId:abc", "version:1"]'),
14646
+ fields: z62.array(z62.string()).optional().describe('Basic fields as "name:type" pairs, e.g., ["email:input", "country:select", "age:slider"]'),
14647
+ uiIntegration: z62.enum(UI_INTEGRATIONS4).default("material").describe("UI library (for future UI-specific props). Defaults to material.")
14167
14648
  },
14168
14649
  async ({ pages, arrays = [], groups = [], hidden = [], fields = [] }) => {
14169
14650
  const fieldDefs = parseFieldDefs(fields);
@@ -14205,11 +14686,11 @@ Examples:
14205
14686
  }
14206
14687
 
14207
14688
  // packages/dynamic-form-mcp/src/tools/search.tool.ts
14208
- import { z as z60 } from "zod";
14689
+ import { z as z63 } from "zod";
14209
14690
  var searchIndex = null;
14210
14691
  function getTopicSubcategory(key) {
14211
14692
  const fieldTypes = ["input", "select", "slider", "radio", "checkbox", "textarea", "datepicker", "toggle", "text", "hidden"];
14212
- const containers = ["group", "row", "array", "simplified-array", "page"];
14693
+ const containers = [...getFieldTypesByCategory("container").map((f) => f.type), "simplified-array"];
14213
14694
  const concepts = [
14214
14695
  "validation",
14215
14696
  "validation-messages",
@@ -14249,6 +14730,19 @@ function buildIndex() {
14249
14730
  toolCall: `ngforge_lookup topic="${key}"`
14250
14731
  });
14251
14732
  }
14733
+ for (const field of getFieldTypes()) {
14734
+ if (TOPICS[field.type]) continue;
14735
+ const description = TOPIC_DESCRIPTIONS[field.type] || field.description;
14736
+ entries.push({
14737
+ id: field.type,
14738
+ category: "topic",
14739
+ subcategory: getTopicSubcategory(field.type),
14740
+ description,
14741
+ aliases: aliasMap[field.type] || [],
14742
+ content: `${description} ${field.description}`.toLowerCase(),
14743
+ toolCall: `ngforge_lookup topic="${field.type}"`
14744
+ });
14745
+ }
14252
14746
  for (const [key, pattern] of Object.entries(PATTERNS)) {
14253
14747
  entries.push({
14254
14748
  id: key,
@@ -14353,7 +14847,7 @@ Use this when you don't know the exact topic name.
14353
14847
 
14354
14848
  New to ng-forge? Start with: ngforge_lookup topic="workflow"`,
14355
14849
  {
14356
- query: z60.string().describe("Natural language or keywords to search for")
14850
+ query: z63.string().describe("Natural language or keywords to search for")
14357
14851
  },
14358
14852
  async ({ query }) => {
14359
14853
  const index = buildIndex();