@ng-forge/dynamic-form-mcp 0.6.1 → 0.8.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.js CHANGED
@@ -18,12 +18,6 @@ var FIELD_TYPES = [
18
18
  description: "HTML input type",
19
19
  required: false,
20
20
  default: "text"
21
- },
22
- placeholder: {
23
- name: "placeholder",
24
- type: "DynamicText",
25
- description: "Placeholder text displayed when field is empty",
26
- required: false
27
21
  }
28
22
  },
29
23
  validationSupported: true,
@@ -35,7 +29,8 @@ var FIELD_TYPES = [
35
29
  label: 'Email Address',
36
30
  required: true,
37
31
  email: true,
38
- props: { type: 'email', placeholder: 'user@example.com' }
32
+ placeholder: 'user@example.com',
33
+ props: { type: 'email' }
39
34
  }`,
40
35
  minimalExample: `{ key: 'name', type: 'input', label: 'Name' }`
41
36
  },
@@ -52,12 +47,6 @@ var FIELD_TYPES = [
52
47
  description: "Number of visible text lines",
53
48
  required: false,
54
49
  default: 3
55
- },
56
- placeholder: {
57
- name: "placeholder",
58
- type: "DynamicText",
59
- description: "Placeholder text displayed when field is empty",
60
- required: false
61
50
  }
62
51
  },
63
52
  validationSupported: true,
@@ -67,7 +56,8 @@ var FIELD_TYPES = [
67
56
  key: 'description',
68
57
  type: 'textarea',
69
58
  label: 'Description',
70
- props: { rows: 5, placeholder: 'Enter description...' }
59
+ placeholder: 'Enter description...',
60
+ props: { rows: 5 }
71
61
  }`,
72
62
  minimalExample: `{ key: 'bio', type: 'textarea', label: 'Bio' }`
73
63
  },
@@ -90,12 +80,6 @@ var FIELD_TYPES = [
90
80
  description: "Allow multiple selections",
91
81
  required: false,
92
82
  default: false
93
- },
94
- placeholder: {
95
- name: "placeholder",
96
- type: "DynamicText",
97
- description: "Placeholder text for empty selection",
98
- required: false
99
83
  }
100
84
  },
101
85
  validationSupported: true,
@@ -856,54 +840,6 @@ var VALIDATORS = [
856
840
  example: `{
857
841
  type: 'async',
858
842
  functionName: 'checkUsernameAvailability'
859
- }`
860
- },
861
- {
862
- type: "customAsync",
863
- category: "async",
864
- description: "DEPRECATED \u2014 use type: 'async' instead. Async validator using registered async function.",
865
- parameters: {
866
- functionName: {
867
- name: "functionName",
868
- type: "string",
869
- description: "Name of registered async validator function",
870
- required: true
871
- },
872
- params: {
873
- name: "params",
874
- type: "Record<string, unknown>",
875
- description: "Parameters to pass to validator function",
876
- required: false
877
- }
878
- },
879
- example: `// DEPRECATED \u2014 use type: 'async' instead
880
- {
881
- type: 'customAsync',
882
- functionName: 'checkUsernameAvailability'
883
- }`
884
- },
885
- {
886
- type: "customHttp",
887
- category: "http",
888
- description: "DEPRECATED \u2014 use type: 'http' with functionName instead. HTTP-based validator with automatic request cancellation.",
889
- parameters: {
890
- functionName: {
891
- name: "functionName",
892
- type: "string",
893
- description: "Name of registered HTTP validator configuration",
894
- required: true
895
- },
896
- params: {
897
- name: "params",
898
- type: "Record<string, unknown>",
899
- description: "Parameters to pass to HTTP validator",
900
- required: false
901
- }
902
- },
903
- example: `// DEPRECATED \u2014 use type: 'http' with functionName instead
904
- {
905
- type: 'customHttp',
906
- functionName: 'validateEmailExists'
907
843
  }`
908
844
  },
909
845
  {
@@ -1007,6 +943,20 @@ var UI_ADAPTERS = [
1007
943
  required: false,
1008
944
  default: "dynamic"
1009
945
  },
946
+ floatLabel: {
947
+ name: "floatLabel",
948
+ type: "'auto' | 'always' | 'never'",
949
+ description: "Label float behavior",
950
+ required: false,
951
+ default: "auto"
952
+ },
953
+ hideRequiredMarker: {
954
+ name: "hideRequiredMarker",
955
+ type: "boolean",
956
+ description: "Hide the required asterisk",
957
+ required: false,
958
+ default: false
959
+ },
1010
960
  hint: {
1011
961
  name: "hint",
1012
962
  type: "DynamicText",
@@ -1025,6 +975,26 @@ var UI_ADAPTERS = [
1025
975
  description: "Material form field appearance",
1026
976
  required: false,
1027
977
  default: "outline"
978
+ },
979
+ floatLabel: {
980
+ name: "floatLabel",
981
+ type: "'auto' | 'always' | 'never'",
982
+ description: "Label float behavior",
983
+ required: false,
984
+ default: "auto"
985
+ },
986
+ hideRequiredMarker: {
987
+ name: "hideRequiredMarker",
988
+ type: "boolean",
989
+ description: "Hide the required asterisk",
990
+ required: false,
991
+ default: false
992
+ },
993
+ hint: {
994
+ name: "hint",
995
+ type: "DynamicText",
996
+ description: "Hint text below the field",
997
+ required: false
1028
998
  }
1029
999
  }
1030
1000
  },
@@ -1045,12 +1015,118 @@ var UI_ADAPTERS = [
1045
1015
  type: "datepicker",
1046
1016
  componentName: "MatDatepickerFieldComponent",
1047
1017
  additionalProps: {
1018
+ appearance: {
1019
+ name: "appearance",
1020
+ type: "'fill' | 'outline'",
1021
+ description: "Material form field appearance",
1022
+ required: false,
1023
+ default: "outline"
1024
+ },
1025
+ subscriptSizing: {
1026
+ name: "subscriptSizing",
1027
+ type: "'fixed' | 'dynamic'",
1028
+ description: "Error/hint text sizing",
1029
+ required: false,
1030
+ default: "dynamic"
1031
+ },
1032
+ floatLabel: {
1033
+ name: "floatLabel",
1034
+ type: "'auto' | 'always' | 'never'",
1035
+ description: "Label float behavior",
1036
+ required: false,
1037
+ default: "auto"
1038
+ },
1039
+ hideRequiredMarker: {
1040
+ name: "hideRequiredMarker",
1041
+ type: "boolean",
1042
+ description: "Hide the required asterisk",
1043
+ required: false,
1044
+ default: false
1045
+ },
1048
1046
  startView: {
1049
1047
  name: "startView",
1050
1048
  type: "'month' | 'year' | 'multi-year'",
1051
1049
  description: "Initial calendar view",
1052
1050
  required: false,
1053
1051
  default: "month"
1052
+ },
1053
+ touchUi: {
1054
+ name: "touchUi",
1055
+ type: "boolean",
1056
+ description: "Use touch-friendly calendar UI",
1057
+ required: false,
1058
+ default: false
1059
+ },
1060
+ hint: {
1061
+ name: "hint",
1062
+ type: "DynamicText",
1063
+ description: "Hint text below the field",
1064
+ required: false
1065
+ }
1066
+ }
1067
+ },
1068
+ {
1069
+ type: "textarea",
1070
+ componentName: "MatTextareaFieldComponent",
1071
+ additionalProps: {
1072
+ appearance: {
1073
+ name: "appearance",
1074
+ type: "'fill' | 'outline'",
1075
+ description: "Material form field appearance",
1076
+ required: false,
1077
+ default: "outline"
1078
+ },
1079
+ subscriptSizing: {
1080
+ name: "subscriptSizing",
1081
+ type: "'fixed' | 'dynamic'",
1082
+ description: "Error/hint text sizing",
1083
+ required: false,
1084
+ default: "dynamic"
1085
+ },
1086
+ floatLabel: {
1087
+ name: "floatLabel",
1088
+ type: "'auto' | 'always' | 'never'",
1089
+ description: "Label float behavior",
1090
+ required: false,
1091
+ default: "auto"
1092
+ },
1093
+ hideRequiredMarker: {
1094
+ name: "hideRequiredMarker",
1095
+ type: "boolean",
1096
+ description: "Hide the required asterisk",
1097
+ required: false,
1098
+ default: false
1099
+ },
1100
+ hint: {
1101
+ name: "hint",
1102
+ type: "DynamicText",
1103
+ description: "Hint text below the field",
1104
+ required: false
1105
+ },
1106
+ rows: {
1107
+ name: "rows",
1108
+ type: "number",
1109
+ description: "Visible row count",
1110
+ required: false
1111
+ },
1112
+ cols: {
1113
+ name: "cols",
1114
+ type: "number",
1115
+ description: "Visible column count",
1116
+ required: false
1117
+ },
1118
+ resize: {
1119
+ name: "resize",
1120
+ type: "'none' | 'both' | 'horizontal' | 'vertical'",
1121
+ description: "Resize handle behavior",
1122
+ required: false,
1123
+ default: "vertical"
1124
+ },
1125
+ maxLength: {
1126
+ name: "maxLength",
1127
+ type: "number",
1128
+ description: "Maximum character length",
1129
+ required: false
1054
1130
  }
1055
1131
  }
1056
1132
  }
@@ -1325,6 +1401,160 @@ var DOCUMENTATION = [
1325
1401
  { id: "example-array", title: "Complete Array Form", category: "examples", url: `${BASE_URL}/examples/array-form` }
1326
1402
  ];
1327
1403
 
1404
+ // packages/dynamic-form-mcp/src/registry/wrappers.ts
1405
+ var WRAPPER_AUTHORING_CONTRACT = `All wrapper components MUST:
1406
+
1407
+ 1. Implement \`FieldWrapperContract\` from \`@ng-forge/dynamic-forms\`.
1408
+ 2. Expose \`readonly fieldComponent = viewChild.required('fieldComponent', { read: ViewContainerRef });\`
1409
+ \u2014 this is the slot where the inner wrapper (or the field) is rendered
1410
+ imperatively by the outlet.
1411
+ 3. Place the \`#fieldComponent\` template ref UNCONDITIONALLY. It cannot
1412
+ live inside \`@if\`, \`@defer\`, \`@for\`, \`@switch\`, \`<ng-template>\`,
1413
+ or any structural directive that delays view creation. The outlet reads
1414
+ the \`ViewContainerRef\` immediately after creation \u2014 if the slot isn't
1415
+ materialised yet, \`viewChild.required\` throws \`NG0951\`
1416
+ (REQUIRED_QUERY_NO_VALUE), the wrapper chain is torn down, and the field
1417
+ renders bare.
1418
+ 4. Declare every config key the wrapper consumes as an Angular \`input()\`.
1419
+ Unknown keys are silently dropped \u2014 the outlet probes
1420
+ \`reflectComponentType(...).inputs\` before calling \`setInput()\`.
1421
+ Runtime typos in config will NOT throw; rely on TypeScript (via
1422
+ \`FieldRegistryWrappers\` module augmentation) to catch them.
1423
+ 5. Optionally accept \`fieldInputs: input<WrapperFieldInputs>()\` to read
1424
+ the wrapped field's mapper outputs and read-only form state.`;
1425
+ var WRAPPERS = [
1426
+ {
1427
+ type: "css",
1428
+ category: "core",
1429
+ availability: "shipping",
1430
+ package: "@ng-forge/dynamic-forms",
1431
+ description: "Invisible wrapper that applies CSS classes to the host element via a `DynamicText` input. Useful for decorating any field (or container) with styling without authoring a custom wrapper. Resolves `Signal<string>` / `Observable<string>` / `string` uniformly.",
1432
+ props: {
1433
+ cssClasses: {
1434
+ name: "cssClasses",
1435
+ type: "DynamicText",
1436
+ description: "Space-separated CSS class names to apply to the wrapper host element. Accepts a literal string, a Signal<string>, or an Observable<string> \u2014 the wrapper subscribes and updates the host [class] binding reactively.",
1437
+ required: false
1438
+ }
1439
+ },
1440
+ autoAppliesTo: [],
1441
+ componentName: "CssWrapperComponent",
1442
+ contract: WRAPPER_AUTHORING_CONTRACT,
1443
+ example: `// Field-level CSS wrapper (scoped to a single field)
1444
+ {
1445
+ key: 'email',
1446
+ type: 'input',
1447
+ label: 'Email',
1448
+ wrappers: [{ type: 'css', cssClasses: 'field--highlight' }]
1449
+ }
1450
+
1451
+ // Dynamic classes via Signal<string>
1452
+ {
1453
+ key: 'amount',
1454
+ type: 'input',
1455
+ label: 'Amount',
1456
+ wrappers: [{ type: 'css', cssClasses: highlightClass }] // highlightClass: Signal<string>
1457
+ }
1458
+
1459
+ // Chained with other wrappers (outer-most first)
1460
+ {
1461
+ key: 'contact',
1462
+ type: 'group',
1463
+ wrappers: [
1464
+ { type: 'section', title: 'Contact' }, // outer
1465
+ { type: 'css', cssClasses: 'pad-lg' } // inner
1466
+ ],
1467
+ fields: [...]
1468
+ }`,
1469
+ minimalExample: `{ type: 'css', cssClasses: 'my-class' }`
1470
+ },
1471
+ {
1472
+ type: "arraySection",
1473
+ category: "demo",
1474
+ availability: "demo-only",
1475
+ package: "@internal/examples-shared-ui",
1476
+ description: 'Demo wrapper used by the docs sandbox. Wraps an array field in a titled card whose header contains an "Add" button \u2014 the wrapper owns the append behaviour, dispatching `arrayEvent(key).append(itemTemplate)` on click via the `EventBus`. Lets the consumer config drop the separate `addArrayItem` button field. NOT a shipping primitive; copy the component out of `internal/examples-shared-ui/src/lib/demo-wrappers/` or author your own if you want this pattern in production.',
1477
+ props: {
1478
+ title: {
1479
+ name: "title",
1480
+ type: "string",
1481
+ description: "Card header text rendered above the array.",
1482
+ required: false
1483
+ },
1484
+ addLabel: {
1485
+ name: "addLabel",
1486
+ type: "string",
1487
+ description: 'Text for the Add button in the header. Defaults to "Add" when omitted.',
1488
+ required: false
1489
+ },
1490
+ itemTemplate: {
1491
+ name: "itemTemplate",
1492
+ type: "FieldDef<unknown> | readonly FieldDef<unknown>[]",
1493
+ description: "Template passed to `arrayEvent(key).append(template)` when the Add button is clicked. Should match the array's `fields` shape.",
1494
+ required: true
1495
+ }
1496
+ },
1497
+ autoAppliesTo: [],
1498
+ componentName: "ArraySectionWrapperComponent",
1499
+ contract: WRAPPER_AUTHORING_CONTRACT,
1500
+ example: `// Array wrapped with arraySection \u2014 the wrapper owns the Add button
1501
+ import { arrayEvent } from '@ng-forge/dynamic-forms';
1502
+
1503
+ const tagItemTemplate = { key: 'tag', type: 'input', label: 'Tag' } as const satisfies FieldDef;
1504
+
1505
+ {
1506
+ key: 'tags',
1507
+ type: 'array',
1508
+ wrappers: [{
1509
+ type: 'arraySection',
1510
+ title: 'Tags',
1511
+ addLabel: 'Add tag',
1512
+ itemTemplate: tagItemTemplate,
1513
+ }],
1514
+ fields: [tagItemTemplate],
1515
+ }
1516
+ // Clicking the header button dispatches arrayEvent('tags').append(tagItemTemplate)`,
1517
+ minimalExample: `{ type: 'arraySection', title: 'Items', itemTemplate: { key: 'item', type: 'input', label: 'Item' } }`
1518
+ },
1519
+ {
1520
+ type: "section",
1521
+ category: "demo",
1522
+ availability: "demo-only",
1523
+ package: "@internal/examples-shared-ui",
1524
+ description: "Demo wrapper used by the docs sandbox. Renders a titled card around the wrapped content and is registered with every sandbox adapter so the Writing-a-Wrapper docs can demonstrate an end-to-end custom wrapper. NOT a shipping primitive \u2014 use as a pattern/template, not a dependency.",
1525
+ props: {
1526
+ title: {
1527
+ name: "title",
1528
+ type: "string",
1529
+ description: "Card header text. Omit to render a header-less card.",
1530
+ required: false
1531
+ }
1532
+ },
1533
+ autoAppliesTo: [],
1534
+ componentName: "SectionWrapperComponent",
1535
+ contract: WRAPPER_AUTHORING_CONTRACT,
1536
+ example: `// Section wrapper around a group
1537
+ {
1538
+ key: 'address',
1539
+ type: 'group',
1540
+ wrappers: [{ type: 'section', title: 'Shipping address' }],
1541
+ fields: [
1542
+ { key: 'street', type: 'input', label: 'Street' },
1543
+ { key: 'city', type: 'input', label: 'City' }
1544
+ ]
1545
+ }
1546
+
1547
+ // Header-less card (title omitted)
1548
+ {
1549
+ key: 'details',
1550
+ type: 'group',
1551
+ wrappers: [{ type: 'section' }],
1552
+ fields: [...]
1553
+ }`,
1554
+ minimalExample: `{ type: 'section', title: 'Section title' }`
1555
+ }
1556
+ ];
1557
+
1328
1558
  // packages/dynamic-form-mcp/src/registry/index.ts
1329
1559
  function getFieldTypes() {
1330
1560
  return FIELD_TYPES;
@@ -1354,6 +1584,15 @@ function getUIAdapterFieldType(library, fieldType) {
1354
1584
  const adapter = getUIAdapter(library);
1355
1585
  return adapter?.fieldTypes.find((ft) => ft.type === fieldType);
1356
1586
  }
1587
+ function getWrappers() {
1588
+ return WRAPPERS;
1589
+ }
1590
+ function getWrapper(type) {
1591
+ return WRAPPERS.find((w) => w.type === type);
1592
+ }
1593
+ function getWrappersByCategory(category) {
1594
+ return WRAPPERS.filter((w) => w.category === category);
1595
+ }
1357
1596
  function getDocPages() {
1358
1597
  return DOCUMENTATION;
1359
1598
  }
@@ -1924,13 +2163,13 @@ For fields that collect user input (\`input\`, \`textarea\`, \`select\`, \`check
1924
2163
  label: 'Email Address',
1925
2164
  required: true, // Shorthand validator
1926
2165
  email: true, // Shorthand validator
2166
+ placeholder: 'user@example.com', // Field-level, not inside props
1927
2167
  validationMessages: { // Always provide clear messages
1928
2168
  required: 'Email is required',
1929
2169
  email: 'Please enter a valid email'
1930
2170
  },
1931
2171
  props: {
1932
2172
  type: 'email', // HTML input type
1933
- placeholder: 'user@example.com',
1934
2173
  hint: 'We will never share your email' // UI library specific
1935
2174
  }
1936
2175
  }
@@ -1946,11 +2185,11 @@ MUST include \`options\` array:
1946
2185
  type: 'select',
1947
2186
  label: 'Country',
1948
2187
  required: true,
2188
+ placeholder: 'Select a country',
1949
2189
  options: [
1950
2190
  { value: 'us', label: 'United States' },
1951
2191
  { value: 'uk', label: 'United Kingdom' }
1952
- ],
1953
- props: { placeholder: 'Select a country' }
2192
+ ]
1954
2193
  }
1955
2194
  \`\`\`
1956
2195
 
@@ -2064,6 +2303,27 @@ Use shorthand properties directly on field definitions:
2064
2303
 
2065
2304
  Available shorthands: \`required\`, \`email\`, \`min\`, \`max\`, \`minLength\`, \`maxLength\`, \`pattern\`
2066
2305
 
2306
+ ### Nullable Values
2307
+
2308
+ Value fields accept a \`nullable?: boolean\` flag. When \`true\`:
2309
+
2310
+ - \`value\` accepts \`null\` in addition to the field's normal value type.
2311
+ - An omitted \`value\` resolves to \`null\` (instead of the type-specific empty default like \`''\`, \`NaN\`, or \`[]\`).
2312
+ - Orthogonal to \`required\`. \`nullable\` declares that the **model** accepts \`null\`; \`required\` is a **validation** constraint. Angular's \`Validators.required\` treats \`null\` as invalid, so a field that is both \`nullable\` and \`required\` will fail required-validation when the value is \`null\` \u2014 the two flags describe different layers (data shape vs. validation), not conflicting semantics.
2313
+ - Map OpenAPI \`nullable: true\` (3.0) or \`type: [T, null]\` (3.1) to this flag.
2314
+
2315
+ \`\`\`typescript
2316
+ {
2317
+ key: 'middleName',
2318
+ type: 'input',
2319
+ label: 'Middle Name',
2320
+ nullable: true,
2321
+ value: null, // valid; default-resolves to null
2322
+ }
2323
+ \`\`\`
2324
+
2325
+ Read-side caveat: a user clearing a text input reads back as \`""\`, not \`null\` \u2014 this is a DOM/Web IDL contract, identical to classic Reactive Forms. \`nullable\` is a contract for accepted values, not a guarantee of emitted ones.
2326
+
2067
2327
  ### Validation Messages
2068
2328
 
2069
2329
  ALWAYS provide validation messages. Use template variables:
@@ -2278,7 +2538,8 @@ Different UI libraries support different properties. Always validate against the
2278
2538
  |----------|----------|-----------|---------|-------|
2279
2539
  | \`appearance\` | \u2713 (fill, outline) | \u2717 | \u2717 | \u2713 (fill, outline) |
2280
2540
  | \`subscriptSizing\` | \u2713 | \u2717 | \u2717 | \u2717 |
2281
- | \`floatLabel\` | \u2713 | \u2717 | \u2713 | \u2717 |
2541
+ | \`floatLabel\` | \u2713 (auto, always, never) | \u2717 | \u2717 | \u2717 |
2542
+ | \`hideRequiredMarker\` | \u2713 | \u2717 | \u2717 | \u2717 |
2282
2543
  | \`hint\` | \u2713 | \u2713 (as \`helpText\`) | \u2713 | \u2713 |
2283
2544
 
2284
2545
  ### Container Fields
@@ -2365,7 +2626,9 @@ var examples_default = [
2365
2626
  key: "title",
2366
2627
  type: "text",
2367
2628
  label: "Sign In",
2368
- props: { elementType: "h2" }
2629
+ props: {
2630
+ elementType: "h2"
2631
+ }
2369
2632
  },
2370
2633
  {
2371
2634
  key: "email",
@@ -2373,8 +2636,13 @@ var examples_default = [
2373
2636
  label: "Email Address",
2374
2637
  required: true,
2375
2638
  email: true,
2376
- validationMessages: { email: "Please enter a valid email address" },
2377
- props: { type: "email", placeholder: "your@email.com" }
2639
+ validationMessages: {
2640
+ email: "Please enter a valid email address"
2641
+ },
2642
+ props: {
2643
+ type: "email"
2644
+ },
2645
+ placeholder: "your@email.com"
2378
2646
  },
2379
2647
  {
2380
2648
  key: "password",
@@ -2382,7 +2650,10 @@ var examples_default = [
2382
2650
  label: "Password",
2383
2651
  required: true,
2384
2652
  minLength: 8,
2385
- props: { type: "password", placeholder: "Enter your password" }
2653
+ props: {
2654
+ type: "password"
2655
+ },
2656
+ placeholder: "Enter your password"
2386
2657
  },
2387
2658
  {
2388
2659
  key: "remember",
@@ -2393,7 +2664,9 @@ var examples_default = [
2393
2664
  key: "submit",
2394
2665
  type: "submit",
2395
2666
  label: "Sign In",
2396
- props: { color: "primary" }
2667
+ props: {
2668
+ color: "primary"
2669
+ }
2397
2670
  }
2398
2671
  ]
2399
2672
  }
@@ -2415,7 +2688,7 @@ var examples_default = [
2415
2688
  required: "First name is required",
2416
2689
  minLength: "Must be at least {{requiredLength}} characters"
2417
2690
  },
2418
- props: { placeholder: "Enter your first name" }
2691
+ placeholder: "Enter your first name"
2419
2692
  },
2420
2693
  {
2421
2694
  key: "lastName",
@@ -2427,7 +2700,7 @@ var examples_default = [
2427
2700
  required: "Last name is required",
2428
2701
  minLength: "Must be at least {{requiredLength}} characters"
2429
2702
  },
2430
- props: { placeholder: "Enter your last name" }
2703
+ placeholder: "Enter your last name"
2431
2704
  },
2432
2705
  {
2433
2706
  key: "email",
@@ -2439,7 +2712,10 @@ var examples_default = [
2439
2712
  required: "Email is required",
2440
2713
  email: "Please enter a valid email address"
2441
2714
  },
2442
- props: { type: "email", placeholder: "user@example.com" }
2715
+ props: {
2716
+ type: "email"
2717
+ },
2718
+ placeholder: "user@example.com"
2443
2719
  },
2444
2720
  {
2445
2721
  key: "age",
@@ -2453,22 +2729,42 @@ var examples_default = [
2453
2729
  min: "Must be at least {{min}}",
2454
2730
  max: "Must not exceed {{max}}"
2455
2731
  },
2456
- props: { type: "number", placeholder: "18" }
2732
+ props: {
2733
+ type: "number"
2734
+ },
2735
+ placeholder: "18"
2457
2736
  },
2458
2737
  {
2459
2738
  key: "country",
2460
2739
  type: "select",
2461
2740
  label: "Country",
2462
2741
  required: true,
2463
- validationMessages: { required: "Please select a country" },
2742
+ validationMessages: {
2743
+ required: "Please select a country"
2744
+ },
2464
2745
  options: [
2465
- { value: "us", label: "United States" },
2466
- { value: "uk", label: "United Kingdom" },
2467
- { value: "ca", label: "Canada" },
2468
- { value: "au", label: "Australia" },
2469
- { value: "de", label: "Germany" }
2746
+ {
2747
+ value: "us",
2748
+ label: "United States"
2749
+ },
2750
+ {
2751
+ value: "uk",
2752
+ label: "United Kingdom"
2753
+ },
2754
+ {
2755
+ value: "ca",
2756
+ label: "Canada"
2757
+ },
2758
+ {
2759
+ value: "au",
2760
+ label: "Australia"
2761
+ },
2762
+ {
2763
+ value: "de",
2764
+ label: "Germany"
2765
+ }
2470
2766
  ],
2471
- props: { placeholder: "Select your country" }
2767
+ placeholder: "Select your country"
2472
2768
  },
2473
2769
  {
2474
2770
  key: "newsletter",
@@ -2480,13 +2776,17 @@ var examples_default = [
2480
2776
  type: "checkbox",
2481
2777
  label: "I agree to the terms and conditions",
2482
2778
  required: true,
2483
- validationMessages: { required: "You must accept the terms" }
2779
+ validationMessages: {
2780
+ required: "You must accept the terms"
2781
+ }
2484
2782
  },
2485
2783
  {
2486
2784
  key: "submit",
2487
2785
  type: "submit",
2488
2786
  label: "Create Account",
2489
- props: { color: "primary" }
2787
+ props: {
2788
+ color: "primary"
2789
+ }
2490
2790
  }
2491
2791
  ]
2492
2792
  }
@@ -2511,7 +2811,7 @@ var examples_default = [
2511
2811
  label: "First Name",
2512
2812
  required: true,
2513
2813
  col: 6,
2514
- props: { placeholder: "Your first name" }
2814
+ placeholder: "Your first name"
2515
2815
  },
2516
2816
  {
2517
2817
  key: "lastName",
@@ -2519,7 +2819,7 @@ var examples_default = [
2519
2819
  label: "Last Name",
2520
2820
  required: true,
2521
2821
  col: 6,
2522
- props: { placeholder: "Your last name" }
2822
+ placeholder: "Your last name"
2523
2823
  }
2524
2824
  ]
2525
2825
  },
@@ -2529,8 +2829,13 @@ var examples_default = [
2529
2829
  label: "Email Address",
2530
2830
  required: true,
2531
2831
  email: true,
2532
- validationMessages: { email: "Please enter a valid email" },
2533
- props: { type: "email", placeholder: "email@example.com" }
2832
+ validationMessages: {
2833
+ email: "Please enter a valid email"
2834
+ },
2835
+ props: {
2836
+ type: "email"
2837
+ },
2838
+ placeholder: "email@example.com"
2534
2839
  },
2535
2840
  {
2536
2841
  key: "subject",
@@ -2538,12 +2843,24 @@ var examples_default = [
2538
2843
  label: "Subject",
2539
2844
  required: true,
2540
2845
  options: [
2541
- { value: "general", label: "General Inquiry" },
2542
- { value: "support", label: "Technical Support" },
2543
- { value: "billing", label: "Billing Question" },
2544
- { value: "feedback", label: "Feedback" }
2846
+ {
2847
+ value: "general",
2848
+ label: "General Inquiry"
2849
+ },
2850
+ {
2851
+ value: "support",
2852
+ label: "Technical Support"
2853
+ },
2854
+ {
2855
+ value: "billing",
2856
+ label: "Billing Question"
2857
+ },
2858
+ {
2859
+ value: "feedback",
2860
+ label: "Feedback"
2861
+ }
2545
2862
  ],
2546
- props: { placeholder: "Select a subject" }
2863
+ placeholder: "Select a subject"
2547
2864
  },
2548
2865
  {
2549
2866
  key: "message",
@@ -2556,13 +2873,18 @@ var examples_default = [
2556
2873
  minLength: "Message must be at least {{requiredLength}} characters",
2557
2874
  maxLength: "Message cannot exceed {{requiredLength}} characters"
2558
2875
  },
2559
- props: { rows: 5, placeholder: "How can we help you?" }
2876
+ props: {
2877
+ rows: 5
2878
+ },
2879
+ placeholder: "How can we help you?"
2560
2880
  },
2561
2881
  {
2562
2882
  key: "submit",
2563
2883
  type: "submit",
2564
2884
  label: "Send Message",
2565
- props: { color: "primary" }
2885
+ props: {
2886
+ color: "primary"
2887
+ }
2566
2888
  }
2567
2889
  ]
2568
2890
  }
@@ -2589,13 +2911,17 @@ var examples_default = [
2589
2911
  label: "Email",
2590
2912
  required: true,
2591
2913
  email: true,
2592
- props: { type: "email" }
2914
+ props: {
2915
+ type: "email"
2916
+ }
2593
2917
  },
2594
2918
  {
2595
2919
  key: "addressTitle",
2596
2920
  type: "text",
2597
2921
  label: "Shipping Address",
2598
- props: { elementType: "h4" }
2922
+ props: {
2923
+ elementType: "h4"
2924
+ }
2599
2925
  },
2600
2926
  {
2601
2927
  key: "address",
@@ -2611,8 +2937,20 @@ var examples_default = [
2611
2937
  key: "cityStateRow",
2612
2938
  type: "row",
2613
2939
  fields: [
2614
- { key: "city", type: "input", label: "City", required: true, col: 6 },
2615
- { key: "state", type: "input", label: "State", required: true, col: 3 },
2940
+ {
2941
+ key: "city",
2942
+ type: "input",
2943
+ label: "City",
2944
+ required: true,
2945
+ col: 6
2946
+ },
2947
+ {
2948
+ key: "state",
2949
+ type: "input",
2950
+ label: "State",
2951
+ required: true,
2952
+ col: 3
2953
+ },
2616
2954
  {
2617
2955
  key: "zip",
2618
2956
  type: "input",
@@ -2620,7 +2958,9 @@ var examples_default = [
2620
2958
  required: true,
2621
2959
  col: 3,
2622
2960
  pattern: "^\\d{5}$",
2623
- validationMessages: { pattern: "ZIP must be 5 digits" }
2961
+ validationMessages: {
2962
+ pattern: "ZIP must be 5 digits"
2963
+ }
2624
2964
  }
2625
2965
  ]
2626
2966
  },
@@ -2630,8 +2970,14 @@ var examples_default = [
2630
2970
  label: "Country",
2631
2971
  required: true,
2632
2972
  options: [
2633
- { value: "us", label: "United States" },
2634
- { value: "ca", label: "Canada" }
2973
+ {
2974
+ value: "us",
2975
+ label: "United States"
2976
+ },
2977
+ {
2978
+ value: "ca",
2979
+ label: "Canada"
2980
+ }
2635
2981
  ]
2636
2982
  }
2637
2983
  ]
@@ -2662,12 +3008,37 @@ var examples_default = [
2662
3008
  key: "stepTitle1",
2663
3009
  type: "text",
2664
3010
  label: "Step 1: Personal Information",
2665
- props: { elementType: "h3" }
3011
+ props: {
3012
+ elementType: "h3"
3013
+ }
3014
+ },
3015
+ {
3016
+ key: "firstName",
3017
+ type: "input",
3018
+ label: "First Name",
3019
+ required: true
3020
+ },
3021
+ {
3022
+ key: "lastName",
3023
+ type: "input",
3024
+ label: "Last Name",
3025
+ required: true
3026
+ },
3027
+ {
3028
+ key: "email",
3029
+ type: "input",
3030
+ label: "Email",
3031
+ required: true,
3032
+ email: true,
3033
+ props: {
3034
+ type: "email"
3035
+ }
2666
3036
  },
2667
- { key: "firstName", type: "input", label: "First Name", required: true },
2668
- { key: "lastName", type: "input", label: "Last Name", required: true },
2669
- { key: "email", type: "input", label: "Email", required: true, email: true, props: { type: "email" } },
2670
- { key: "next1", type: "next", label: "Continue" }
3037
+ {
3038
+ key: "next1",
3039
+ type: "next",
3040
+ label: "Continue"
3041
+ }
2671
3042
  ]
2672
3043
  },
2673
3044
  {
@@ -2678,17 +3049,44 @@ var examples_default = [
2678
3049
  key: "stepTitle2",
2679
3050
  type: "text",
2680
3051
  label: "Step 2: Address",
2681
- props: { elementType: "h3" }
3052
+ props: {
3053
+ elementType: "h3"
3054
+ }
3055
+ },
3056
+ {
3057
+ key: "street",
3058
+ type: "input",
3059
+ label: "Street Address",
3060
+ required: true
3061
+ },
3062
+ {
3063
+ key: "city",
3064
+ type: "input",
3065
+ label: "City",
3066
+ required: true
3067
+ },
3068
+ {
3069
+ key: "state",
3070
+ type: "input",
3071
+ label: "State",
3072
+ required: true
2682
3073
  },
2683
- { key: "street", type: "input", label: "Street Address", required: true },
2684
- { key: "city", type: "input", label: "City", required: true },
2685
- { key: "state", type: "input", label: "State", required: true },
2686
3074
  {
2687
3075
  key: "navRow2",
2688
3076
  type: "row",
2689
3077
  fields: [
2690
- { key: "prev2", type: "previous", label: "Back", col: 6 },
2691
- { key: "next2", type: "next", label: "Continue", col: 6 }
3078
+ {
3079
+ key: "prev2",
3080
+ type: "previous",
3081
+ label: "Back",
3082
+ col: 6
3083
+ },
3084
+ {
3085
+ key: "next2",
3086
+ type: "next",
3087
+ label: "Continue",
3088
+ col: 6
3089
+ }
2692
3090
  ]
2693
3091
  }
2694
3092
  ]
@@ -2701,21 +3099,35 @@ var examples_default = [
2701
3099
  key: "stepTitle3",
2702
3100
  type: "text",
2703
3101
  label: "Step 3: Review & Submit",
2704
- props: { elementType: "h3" }
3102
+ props: {
3103
+ elementType: "h3"
3104
+ }
2705
3105
  },
2706
3106
  {
2707
3107
  key: "confirm",
2708
3108
  type: "checkbox",
2709
3109
  label: "I confirm all information is correct",
2710
3110
  required: true,
2711
- validationMessages: { required: "Please confirm before submitting" }
3111
+ validationMessages: {
3112
+ required: "Please confirm before submitting"
3113
+ }
2712
3114
  },
2713
3115
  {
2714
3116
  key: "navRow3",
2715
3117
  type: "row",
2716
3118
  fields: [
2717
- { key: "prev3", type: "previous", label: "Back", col: 6 },
2718
- { key: "submit", type: "submit", label: "Submit", col: 6 }
3119
+ {
3120
+ key: "prev3",
3121
+ type: "previous",
3122
+ label: "Back",
3123
+ col: 6
3124
+ },
3125
+ {
3126
+ key: "submit",
3127
+ type: "submit",
3128
+ label: "Submit",
3129
+ col: 6
3130
+ }
2719
3131
  ]
2720
3132
  }
2721
3133
  ]
@@ -2736,8 +3148,14 @@ var examples_default = [
2736
3148
  label: "Account Type",
2737
3149
  required: true,
2738
3150
  options: [
2739
- { value: "personal", label: "Personal" },
2740
- { value: "business", label: "Business" }
3151
+ {
3152
+ value: "personal",
3153
+ label: "Personal"
3154
+ },
3155
+ {
3156
+ value: "business",
3157
+ label: "Business"
3158
+ }
2741
3159
  ]
2742
3160
  },
2743
3161
  {
@@ -2764,7 +3182,9 @@ var examples_default = [
2764
3182
  }
2765
3183
  }
2766
3184
  ],
2767
- validationMessages: { required: "Business name is required" }
3185
+ validationMessages: {
3186
+ required: "Business name is required"
3187
+ }
2768
3188
  },
2769
3189
  {
2770
3190
  key: "taxId",
@@ -2781,7 +3201,7 @@ var examples_default = [
2781
3201
  }
2782
3202
  }
2783
3203
  ],
2784
- props: { placeholder: "XX-XXXXXXX" }
3204
+ placeholder: "XX-XXXXXXX"
2785
3205
  },
2786
3206
  {
2787
3207
  key: "newsletter",
@@ -2793,9 +3213,18 @@ var examples_default = [
2793
3213
  type: "select",
2794
3214
  label: "Email Frequency",
2795
3215
  options: [
2796
- { value: "daily", label: "Daily" },
2797
- { value: "weekly", label: "Weekly" },
2798
- { value: "monthly", label: "Monthly" }
3216
+ {
3217
+ value: "daily",
3218
+ label: "Daily"
3219
+ },
3220
+ {
3221
+ value: "weekly",
3222
+ label: "Weekly"
3223
+ },
3224
+ {
3225
+ value: "monthly",
3226
+ label: "Monthly"
3227
+ }
2799
3228
  ],
2800
3229
  logic: [
2801
3230
  {
@@ -2837,7 +3266,9 @@ var examples_default = [
2837
3266
  key: "contactsTitle",
2838
3267
  type: "text",
2839
3268
  label: "Emergency Contacts",
2840
- props: { elementType: "h4" }
3269
+ props: {
3270
+ elementType: "h4"
3271
+ }
2841
3272
  },
2842
3273
  {
2843
3274
  key: "contacts",
@@ -2852,19 +3283,49 @@ var examples_default = [
2852
3283
  key: "contactRow",
2853
3284
  type: "row",
2854
3285
  fields: [
2855
- { key: "name", type: "input", label: "Contact Name", required: true, col: 4 },
2856
- { key: "phone", type: "input", label: "Phone", required: true, col: 4, props: { type: "tel" } },
3286
+ {
3287
+ key: "name",
3288
+ type: "input",
3289
+ label: "Contact Name",
3290
+ required: true,
3291
+ col: 4
3292
+ },
3293
+ {
3294
+ key: "phone",
3295
+ type: "input",
3296
+ label: "Phone",
3297
+ required: true,
3298
+ col: 4,
3299
+ props: {
3300
+ type: "tel"
3301
+ }
3302
+ },
2857
3303
  {
2858
3304
  key: "relationship",
2859
3305
  type: "select",
2860
3306
  label: "Relationship",
2861
3307
  col: 4,
2862
3308
  options: [
2863
- { value: "spouse", label: "Spouse" },
2864
- { value: "parent", label: "Parent" },
2865
- { value: "sibling", label: "Sibling" },
2866
- { value: "friend", label: "Friend" },
2867
- { value: "other", label: "Other" }
3309
+ {
3310
+ value: "spouse",
3311
+ label: "Spouse"
3312
+ },
3313
+ {
3314
+ value: "parent",
3315
+ label: "Parent"
3316
+ },
3317
+ {
3318
+ value: "sibling",
3319
+ label: "Sibling"
3320
+ },
3321
+ {
3322
+ value: "friend",
3323
+ label: "Friend"
3324
+ },
3325
+ {
3326
+ value: "other",
3327
+ label: "Other"
3328
+ }
2868
3329
  ]
2869
3330
  }
2870
3331
  ]
@@ -2892,15 +3353,23 @@ var examples_default = [
2892
3353
  key: "title",
2893
3354
  type: "text",
2894
3355
  label: "Customer Feedback",
2895
- props: { elementType: "h2" }
3356
+ props: {
3357
+ elementType: "h2"
3358
+ }
2896
3359
  },
2897
3360
  {
2898
3361
  key: "satisfaction",
2899
3362
  type: "slider",
2900
3363
  label: "Overall Satisfaction (1-10)",
2901
3364
  required: true,
2902
- props: { min: 1, max: 10, step: 1 },
2903
- validationMessages: { required: "Please rate your satisfaction" }
3365
+ props: {
3366
+ min: 1,
3367
+ max: 10,
3368
+ step: 1
3369
+ },
3370
+ validationMessages: {
3371
+ required: "Please rate your satisfaction"
3372
+ }
2904
3373
  },
2905
3374
  {
2906
3375
  key: "recommend",
@@ -2908,30 +3377,62 @@ var examples_default = [
2908
3377
  label: "Would you recommend us?",
2909
3378
  required: true,
2910
3379
  options: [
2911
- { value: "yes", label: "Yes, definitely" },
2912
- { value: "maybe", label: "Maybe" },
2913
- { value: "no", label: "No" }
3380
+ {
3381
+ value: "yes",
3382
+ label: "Yes, definitely"
3383
+ },
3384
+ {
3385
+ value: "maybe",
3386
+ label: "Maybe"
3387
+ },
3388
+ {
3389
+ value: "no",
3390
+ label: "No"
3391
+ }
2914
3392
  ],
2915
- validationMessages: { required: "Please select an option" }
3393
+ validationMessages: {
3394
+ required: "Please select an option"
3395
+ }
2916
3396
  },
2917
3397
  {
2918
3398
  key: "improvements",
2919
3399
  type: "select",
2920
3400
  label: "What could we improve?",
2921
- props: { multiple: true, placeholder: "Select all that apply" },
3401
+ props: {
3402
+ multiple: true
3403
+ },
2922
3404
  options: [
2923
- { value: "speed", label: "Response Time" },
2924
- { value: "quality", label: "Product Quality" },
2925
- { value: "price", label: "Pricing" },
2926
- { value: "support", label: "Customer Support" },
2927
- { value: "ui", label: "User Interface" }
2928
- ]
3405
+ {
3406
+ value: "speed",
3407
+ label: "Response Time"
3408
+ },
3409
+ {
3410
+ value: "quality",
3411
+ label: "Product Quality"
3412
+ },
3413
+ {
3414
+ value: "price",
3415
+ label: "Pricing"
3416
+ },
3417
+ {
3418
+ value: "support",
3419
+ label: "Customer Support"
3420
+ },
3421
+ {
3422
+ value: "ui",
3423
+ label: "User Interface"
3424
+ }
3425
+ ],
3426
+ placeholder: "Select all that apply"
2929
3427
  },
2930
3428
  {
2931
3429
  key: "comments",
2932
3430
  type: "textarea",
2933
3431
  label: "Additional Comments",
2934
- props: { rows: 4, placeholder: "Share any additional feedback..." }
3432
+ props: {
3433
+ rows: 4
3434
+ },
3435
+ placeholder: "Share any additional feedback..."
2935
3436
  },
2936
3437
  {
2937
3438
  key: "followUp",
@@ -2943,7 +3444,9 @@ var examples_default = [
2943
3444
  type: "input",
2944
3445
  label: "Email Address",
2945
3446
  email: true,
2946
- props: { type: "email", placeholder: "your@email.com" },
3447
+ props: {
3448
+ type: "email"
3449
+ },
2947
3450
  logic: [
2948
3451
  {
2949
3452
  type: "hidden",
@@ -2967,7 +3470,8 @@ var examples_default = [
2967
3470
  validationMessages: {
2968
3471
  required: "Email required for follow-up",
2969
3472
  email: "Please enter a valid email"
2970
- }
3473
+ },
3474
+ placeholder: "your@email.com"
2971
3475
  },
2972
3476
  {
2973
3477
  key: "submit",
@@ -3419,7 +3923,7 @@ var MatButtonPropsSchema = z12.object({
3419
3923
  });
3420
3924
 
3421
3925
  // internal/dynamic-forms-zod/material/src/fields/mat-input-field.schema.ts
3422
- import { z as z22 } from "zod";
3926
+ import { z as z23 } from "zod";
3423
3927
 
3424
3928
  // internal/dynamic-forms-zod/src/lib/schemas/field/field-def.schema.ts
3425
3929
  import { z as z14 } from "zod";
@@ -3522,16 +4026,12 @@ var FieldValueConditionSchema = BaseComparisonConditionSchema.extend({
3522
4026
  */
3523
4027
  fieldPath: z15.string()
3524
4028
  });
3525
- var FormValueConditionSchema = BaseComparisonConditionSchema.extend({
3526
- type: z15.literal("formValue")
3527
- });
3528
4029
  var CustomConditionSchema = z15.object({
3529
4030
  type: z15.literal("custom"),
3530
4031
  /**
3531
- * JavaScript expression to evaluate.
3532
- * Has access to: fieldValue, formValue, fieldPath
4032
+ * Name of a registered custom function to invoke.
3533
4033
  */
3534
- expression: z15.string()
4034
+ functionName: z15.string()
3535
4035
  });
3536
4036
  var JavaScriptConditionSchema = z15.object({
3537
4037
  type: z15.literal("javascript"),
@@ -3544,7 +4044,6 @@ var JavaScriptConditionSchema = z15.object({
3544
4044
  var ConditionalExpressionSchema = z15.lazy(
3545
4045
  () => z15.discriminatedUnion("type", [
3546
4046
  FieldValueConditionSchema,
3547
- FormValueConditionSchema,
3548
4047
  CustomConditionSchema,
3549
4048
  JavaScriptConditionSchema,
3550
4049
  AndConditionSchema,
@@ -3633,7 +4132,7 @@ var ValidatorConfigSchema = z16.discriminatedUnion("type", [
3633
4132
  }),
3634
4133
  // Async validators
3635
4134
  BaseValidatorSchema.extend({
3636
- type: z16.literal("customAsync"),
4135
+ type: z16.literal("async"),
3637
4136
  /**
3638
4137
  * Name of a registered async validator function. Required.
3639
4138
  */
@@ -3645,7 +4144,7 @@ var ValidatorConfigSchema = z16.discriminatedUnion("type", [
3645
4144
  }),
3646
4145
  // HTTP validators
3647
4146
  BaseValidatorSchema.extend({
3648
- type: z16.literal("customHttp"),
4147
+ type: z16.literal("http"),
3649
4148
  /**
3650
4149
  * Name of a registered HTTP validator config function. Required.
3651
4150
  */
@@ -3886,16 +4385,31 @@ var FieldWithValidationSchema = z21.object({
3886
4385
  schemas: z21.array(SchemaApplicationConfigSchema).optional()
3887
4386
  });
3888
4387
 
4388
+ // internal/dynamic-forms-zod/src/lib/schemas/field/nullable-value.refinement.ts
4389
+ import { z as z22 } from "zod";
4390
+ var nullableValueRefine = (data, ctx) => {
4391
+ if (!data || typeof data !== "object") return;
4392
+ const field = data;
4393
+ if (field.value === null && field.nullable !== true) {
4394
+ ctx.addIssue({
4395
+ code: z22.ZodIssueCode.custom,
4396
+ path: ["value"],
4397
+ message: "value: null is only allowed when nullable is true. Add `nullable: true` or remove the null value."
4398
+ });
4399
+ }
4400
+ };
4401
+
3889
4402
  // internal/dynamic-forms-zod/material/src/fields/mat-input-field.schema.ts
3890
- var MatInputFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
4403
+ var MatInputFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
3891
4404
  /**
3892
4405
  * Field type discriminant.
3893
4406
  */
3894
- type: z22.literal("input"),
4407
+ type: z23.literal("input"),
4408
+ nullable: z23.boolean().optional(),
3895
4409
  /**
3896
4410
  * Initial value for the input.
3897
4411
  */
3898
- value: z22.string().optional(),
4412
+ value: z23.string().nullable().optional(),
3899
4413
  /**
3900
4414
  * Placeholder text (can also be in props).
3901
4415
  */
@@ -3905,18 +4419,20 @@ var MatInputFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).ex
3905
4419
  */
3906
4420
  props: MatInputPropsSchema.optional()
3907
4421
  });
4422
+ var MatInputFieldSchema = MatInputFieldSchemaObject.superRefine(nullableValueRefine);
3908
4423
 
3909
4424
  // internal/dynamic-forms-zod/material/src/fields/mat-textarea-field.schema.ts
3910
- import { z as z23 } from "zod";
3911
- var MatTextareaFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
4425
+ import { z as z24 } from "zod";
4426
+ var MatTextareaFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
3912
4427
  /**
3913
4428
  * Field type discriminant.
3914
4429
  */
3915
- type: z23.literal("textarea"),
4430
+ type: z24.literal("textarea"),
4431
+ nullable: z24.boolean().optional(),
3916
4432
  /**
3917
4433
  * Initial value for the textarea.
3918
4434
  */
3919
- value: z23.string().optional(),
4435
+ value: z24.string().nullable().optional(),
3920
4436
  /**
3921
4437
  * Placeholder text (can also be in props).
3922
4438
  */
@@ -3926,13 +4442,14 @@ var MatTextareaFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema)
3926
4442
  */
3927
4443
  props: MatTextareaPropsSchema.optional()
3928
4444
  });
4445
+ var MatTextareaFieldSchema = MatTextareaFieldSchemaObject.superRefine(nullableValueRefine);
3929
4446
 
3930
4447
  // internal/dynamic-forms-zod/material/src/fields/mat-select-field.schema.ts
3931
- import { z as z25 } from "zod";
4448
+ import { z as z26 } from "zod";
3932
4449
 
3933
4450
  // internal/dynamic-forms-zod/src/lib/schemas/common/field-option.schema.ts
3934
- import { z as z24 } from "zod";
3935
- var FieldOptionSchema = z24.object({
4451
+ import { z as z25 } from "zod";
4452
+ var FieldOptionSchema = z25.object({
3936
4453
  /**
3937
4454
  * Display text for the option.
3938
4455
  */
@@ -3941,25 +4458,26 @@ var FieldOptionSchema = z24.object({
3941
4458
  * The actual value stored when this option is selected.
3942
4459
  * Can be any JSON-serializable value.
3943
4460
  */
3944
- value: z24.unknown(),
4461
+ value: z25.unknown(),
3945
4462
  /**
3946
4463
  * Whether this option is disabled and cannot be selected.
3947
4464
  */
3948
- disabled: z24.boolean().optional()
4465
+ disabled: z25.boolean().optional()
3949
4466
  }).passthrough();
3950
- var FieldOptionsSchema = z24.array(FieldOptionSchema);
4467
+ var FieldOptionsSchema = z25.array(FieldOptionSchema);
3951
4468
 
3952
4469
  // internal/dynamic-forms-zod/material/src/fields/mat-select-field.schema.ts
3953
- var MatSelectFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
4470
+ var MatSelectFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
3954
4471
  /**
3955
4472
  * Field type discriminant.
3956
4473
  */
3957
- type: z25.literal("select"),
4474
+ type: z26.literal("select"),
4475
+ nullable: z26.boolean().optional(),
3958
4476
  /**
3959
4477
  * Initial value for the select.
3960
4478
  * Can be single value or array if multiple is enabled.
3961
4479
  */
3962
- value: z25.unknown().optional(),
4480
+ value: z26.unknown().nullable().optional(),
3963
4481
  /**
3964
4482
  * Placeholder text (can also be in props).
3965
4483
  */
@@ -3973,18 +4491,19 @@ var MatSelectFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).e
3973
4491
  */
3974
4492
  props: MatSelectPropsSchema.optional()
3975
4493
  });
4494
+ var MatSelectFieldSchema = MatSelectFieldSchemaObject.superRefine(nullableValueRefine);
3976
4495
 
3977
4496
  // internal/dynamic-forms-zod/material/src/fields/mat-checkbox-field.schema.ts
3978
- import { z as z26 } from "zod";
4497
+ import { z as z27 } from "zod";
3979
4498
  var MatCheckboxFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
3980
4499
  /**
3981
4500
  * Field type discriminant.
3982
4501
  */
3983
- type: z26.literal("checkbox"),
4502
+ type: z27.literal("checkbox"),
3984
4503
  /**
3985
4504
  * Initial checked state.
3986
4505
  */
3987
- value: z26.boolean().optional(),
4506
+ value: z27.boolean().optional(),
3988
4507
  /**
3989
4508
  * Placeholder/helper text.
3990
4509
  */
@@ -3996,16 +4515,17 @@ var MatCheckboxFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema)
3996
4515
  });
3997
4516
 
3998
4517
  // internal/dynamic-forms-zod/material/src/fields/mat-radio-field.schema.ts
3999
- import { z as z27 } from "zod";
4000
- var MatRadioFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
4518
+ import { z as z28 } from "zod";
4519
+ var MatRadioFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
4001
4520
  /**
4002
4521
  * Field type discriminant.
4003
4522
  */
4004
- type: z27.literal("radio"),
4523
+ type: z28.literal("radio"),
4524
+ nullable: z28.boolean().optional(),
4005
4525
  /**
4006
4526
  * Initial selected value.
4007
4527
  */
4008
- value: z27.unknown().optional(),
4528
+ value: z28.unknown().nullable().optional(),
4009
4529
  /**
4010
4530
  * Placeholder/helper text.
4011
4531
  */
@@ -4019,18 +4539,20 @@ var MatRadioFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).ex
4019
4539
  */
4020
4540
  props: MatRadioPropsSchema.optional()
4021
4541
  });
4542
+ var MatRadioFieldSchema = MatRadioFieldSchemaObject.superRefine(nullableValueRefine);
4022
4543
 
4023
4544
  // internal/dynamic-forms-zod/material/src/fields/mat-multi-checkbox-field.schema.ts
4024
- import { z as z28 } from "zod";
4025
- var MatMultiCheckboxFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
4545
+ import { z as z29 } from "zod";
4546
+ var MatMultiCheckboxFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
4026
4547
  /**
4027
4548
  * Field type discriminant.
4028
4549
  */
4029
- type: z28.literal("multi-checkbox"),
4550
+ type: z29.literal("multi-checkbox"),
4551
+ nullable: z29.boolean().optional(),
4030
4552
  /**
4031
4553
  * Initial selected values (array).
4032
4554
  */
4033
- value: z28.array(z28.unknown()).optional(),
4555
+ value: z29.array(z29.unknown()).nullable().optional(),
4034
4556
  /**
4035
4557
  * Placeholder/helper text.
4036
4558
  */
@@ -4044,18 +4566,19 @@ var MatMultiCheckboxFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSc
4044
4566
  */
4045
4567
  props: MatMultiCheckboxPropsSchema.optional()
4046
4568
  });
4569
+ var MatMultiCheckboxFieldSchema = MatMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
4047
4570
 
4048
4571
  // internal/dynamic-forms-zod/material/src/fields/mat-toggle-field.schema.ts
4049
- import { z as z29 } from "zod";
4572
+ import { z as z30 } from "zod";
4050
4573
  var MatToggleFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
4051
4574
  /**
4052
4575
  * Field type discriminant.
4053
4576
  */
4054
- type: z29.literal("toggle"),
4577
+ type: z30.literal("toggle"),
4055
4578
  /**
4056
4579
  * Initial toggle state.
4057
4580
  */
4058
- value: z29.boolean().optional(),
4581
+ value: z30.boolean().optional(),
4059
4582
  /**
4060
4583
  * Placeholder/helper text.
4061
4584
  */
@@ -4067,28 +4590,29 @@ var MatToggleFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).e
4067
4590
  });
4068
4591
 
4069
4592
  // internal/dynamic-forms-zod/material/src/fields/mat-slider-field.schema.ts
4070
- import { z as z30 } from "zod";
4071
- var MatSliderFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
4593
+ import { z as z31 } from "zod";
4594
+ var MatSliderFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
4072
4595
  /**
4073
4596
  * Field type discriminant.
4074
4597
  */
4075
- type: z30.literal("slider"),
4598
+ type: z31.literal("slider"),
4599
+ nullable: z31.boolean().optional(),
4076
4600
  /**
4077
4601
  * Initial slider value.
4078
4602
  */
4079
- value: z30.number().optional(),
4603
+ value: z31.number().nullable().optional(),
4080
4604
  /**
4081
4605
  * Minimum slider value.
4082
4606
  */
4083
- minValue: z30.number().optional(),
4607
+ minValue: z31.number().optional(),
4084
4608
  /**
4085
4609
  * Maximum slider value.
4086
4610
  */
4087
- maxValue: z30.number().optional(),
4611
+ maxValue: z31.number().optional(),
4088
4612
  /**
4089
4613
  * Step increment.
4090
4614
  */
4091
- step: z30.number().positive().optional(),
4615
+ step: z31.number().positive().optional(),
4092
4616
  /**
4093
4617
  * Placeholder/helper text.
4094
4618
  */
@@ -4098,19 +4622,21 @@ var MatSliderFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).e
4098
4622
  */
4099
4623
  props: MatSliderPropsSchema.optional()
4100
4624
  });
4625
+ var MatSliderFieldSchema = MatSliderFieldSchemaObject.superRefine(nullableValueRefine);
4101
4626
 
4102
4627
  // internal/dynamic-forms-zod/material/src/fields/mat-datepicker-field.schema.ts
4103
- import { z as z31 } from "zod";
4104
- var DateValueSchema = z31.union([z31.string(), z31.null()]);
4105
- var MatDatepickerFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
4628
+ import { z as z32 } from "zod";
4629
+ var DateValueSchema = z32.union([z32.string(), z32.null()]);
4630
+ var MatDatepickerFieldSchemaObject = BaseFieldDefSchema.merge(FieldWithValidationSchema).extend({
4106
4631
  /**
4107
4632
  * Field type discriminant.
4108
4633
  */
4109
- type: z31.literal("datepicker"),
4634
+ type: z32.literal("datepicker"),
4635
+ nullable: z32.boolean().optional(),
4110
4636
  /**
4111
4637
  * Initial date value (ISO string in JSON configs).
4112
4638
  */
4113
- value: DateValueSchema.optional(),
4639
+ value: DateValueSchema.nullable().optional(),
4114
4640
  /**
4115
4641
  * Minimum selectable date.
4116
4642
  */
@@ -4132,24 +4658,25 @@ var MatDatepickerFieldSchema = BaseFieldDefSchema.merge(FieldWithValidationSchem
4132
4658
  */
4133
4659
  props: MatDatepickerPropsSchema.optional()
4134
4660
  });
4661
+ var MatDatepickerFieldSchema = MatDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
4135
4662
 
4136
4663
  // internal/dynamic-forms-zod/material/src/fields/mat-button-field.schema.ts
4137
- import { z as z32 } from "zod";
4138
- var EventArgSchema = z32.union([z32.string(), z32.number(), z32.boolean(), z32.null(), z32.undefined()]);
4664
+ import { z as z33 } from "zod";
4665
+ var EventArgSchema = z33.union([z33.string(), z33.number(), z33.boolean(), z33.null(), z33.undefined()]);
4139
4666
  var MatButtonFieldSchema = BaseFieldDefSchema.extend({
4140
4667
  /**
4141
4668
  * Field type discriminant.
4142
4669
  */
4143
- type: z32.literal("button"),
4670
+ type: z33.literal("button"),
4144
4671
  /**
4145
4672
  * Event type name (string reference to registered event).
4146
4673
  * Note: Full event configuration requires runtime setup.
4147
4674
  */
4148
- event: z32.string().optional(),
4675
+ event: z33.string().optional(),
4149
4676
  /**
4150
4677
  * Arguments passed to the event constructor.
4151
4678
  */
4152
- eventArgs: z32.array(EventArgSchema).optional(),
4679
+ eventArgs: z33.array(EventArgSchema).optional(),
4153
4680
  /**
4154
4681
  * Material-specific button properties.
4155
4682
  */
@@ -4160,45 +4687,45 @@ var MatButtonFieldSchema = BaseFieldDefSchema.extend({
4160
4687
  logic: LogicArraySchema.optional()
4161
4688
  });
4162
4689
  var MatSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
4163
- type: z32.literal("submit"),
4690
+ type: z33.literal("submit"),
4164
4691
  props: MatButtonPropsSchema.optional(),
4165
4692
  logic: LogicArraySchema.optional()
4166
4693
  });
4167
4694
  var MatNextButtonFieldSchema = BaseFieldDefSchema.extend({
4168
- type: z32.literal("next"),
4695
+ type: z33.literal("next"),
4169
4696
  props: MatButtonPropsSchema.optional(),
4170
4697
  logic: LogicArraySchema.optional()
4171
4698
  });
4172
4699
  var MatPreviousButtonFieldSchema = BaseFieldDefSchema.extend({
4173
- type: z32.literal("previous"),
4700
+ type: z33.literal("previous"),
4174
4701
  props: MatButtonPropsSchema.optional()
4175
4702
  });
4176
4703
  var MatAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
4177
- type: z32.literal("addArrayItem"),
4704
+ type: z33.literal("addArrayItem"),
4178
4705
  /**
4179
4706
  * Key of the array field to add items to.
4180
4707
  * If omitted, uses the parent array context.
4181
4708
  */
4182
- arrayKey: z32.string().optional(),
4709
+ arrayKey: z33.string().optional(),
4183
4710
  props: MatButtonPropsSchema.optional()
4184
4711
  });
4185
4712
  var MatRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
4186
- type: z32.literal("removeArrayItem"),
4713
+ type: z33.literal("removeArrayItem"),
4187
4714
  /**
4188
4715
  * Key of the array field to remove items from.
4189
4716
  * If omitted, uses the parent array context.
4190
4717
  */
4191
- arrayKey: z32.string().optional(),
4718
+ arrayKey: z33.string().optional(),
4192
4719
  props: MatButtonPropsSchema.optional()
4193
4720
  });
4194
4721
 
4195
4722
  // internal/dynamic-forms-zod/material/src/mat-leaf-field.schema.ts
4196
- import { z as z35 } from "zod";
4723
+ import { z as z36 } from "zod";
4197
4724
 
4198
4725
  // internal/dynamic-forms-zod/src/lib/schemas/leaves/text-field.schema.ts
4199
- import { z as z33 } from "zod";
4200
- var TextElementTypeSchema = z33.enum(["p", "h1", "h2", "h3", "h4", "h5", "h6", "span"]);
4201
- var TextPropsSchema = z33.object({
4726
+ import { z as z34 } from "zod";
4727
+ var TextElementTypeSchema = z34.enum(["p", "h1", "h2", "h3", "h4", "h5", "h6", "span"]);
4728
+ var TextPropsSchema = z34.object({
4202
4729
  /**
4203
4730
  * HTML element type to render the text.
4204
4731
  */
@@ -4208,7 +4735,7 @@ var TextFieldSchema = BaseFieldDefSchema.extend({
4208
4735
  /**
4209
4736
  * Field type discriminant.
4210
4737
  */
4211
- type: z33.literal("text"),
4738
+ type: z34.literal("text"),
4212
4739
  /**
4213
4740
  * Text-specific properties.
4214
4741
  */
@@ -4220,9 +4747,9 @@ var TextFieldSchema = BaseFieldDefSchema.extend({
4220
4747
  });
4221
4748
 
4222
4749
  // internal/dynamic-forms-zod/src/lib/schemas/leaves/hidden-field.schema.ts
4223
- import { z as z34 } from "zod";
4224
- var HiddenScalarSchema = z34.union([z34.string(), z34.number(), z34.boolean()]);
4225
- var HiddenValueSchema = z34.union([HiddenScalarSchema, z34.array(HiddenScalarSchema)]);
4750
+ import { z as z35 } from "zod";
4751
+ var HiddenScalarSchema = z35.union([z35.string(), z35.number(), z35.boolean()]);
4752
+ var HiddenValueSchema = z35.union([HiddenScalarSchema, z35.array(HiddenScalarSchema)]);
4226
4753
  var HiddenFieldSchema = BaseFieldDefSchema.omit({
4227
4754
  label: true,
4228
4755
  meta: true,
@@ -4238,7 +4765,7 @@ var HiddenFieldSchema = BaseFieldDefSchema.omit({
4238
4765
  /**
4239
4766
  * Field type discriminant.
4240
4767
  */
4241
- type: z34.literal("hidden"),
4768
+ type: z35.literal("hidden"),
4242
4769
  /**
4243
4770
  * The value to store. Required for hidden fields.
4244
4771
  */
@@ -4246,20 +4773,20 @@ var HiddenFieldSchema = BaseFieldDefSchema.omit({
4246
4773
  });
4247
4774
 
4248
4775
  // internal/dynamic-forms-zod/material/src/mat-leaf-field.schema.ts
4249
- var MatLeafFieldSchema = z35.discriminatedUnion("type", [
4776
+ var MatLeafFieldSchema = z36.discriminatedUnion("type", [
4250
4777
  // Default fields
4251
4778
  TextFieldSchema,
4252
4779
  HiddenFieldSchema,
4253
4780
  // Material value fields
4254
- MatInputFieldSchema,
4255
- MatTextareaFieldSchema,
4256
- MatSelectFieldSchema,
4781
+ MatInputFieldSchemaObject,
4782
+ MatTextareaFieldSchemaObject,
4783
+ MatSelectFieldSchemaObject,
4257
4784
  MatCheckboxFieldSchema,
4258
- MatRadioFieldSchema,
4259
- MatMultiCheckboxFieldSchema,
4785
+ MatRadioFieldSchemaObject,
4786
+ MatMultiCheckboxFieldSchemaObject,
4260
4787
  MatToggleFieldSchema,
4261
- MatSliderFieldSchema,
4262
- MatDatepickerFieldSchema,
4788
+ MatSliderFieldSchemaObject,
4789
+ MatDatepickerFieldSchemaObject,
4263
4790
  // Material button fields
4264
4791
  MatButtonFieldSchema,
4265
4792
  MatSubmitButtonFieldSchema,
@@ -4267,18 +4794,18 @@ var MatLeafFieldSchema = z35.discriminatedUnion("type", [
4267
4794
  MatPreviousButtonFieldSchema,
4268
4795
  MatAddArrayItemButtonFieldSchema,
4269
4796
  MatRemoveArrayItemButtonFieldSchema
4270
- ]);
4797
+ ]).superRefine(nullableValueRefine);
4271
4798
 
4272
4799
  // internal/dynamic-forms-zod/src/lib/schemas/containers/factories.ts
4273
- import { z as z36 } from "zod";
4274
- var ContainerLogicSchema = z36.object({
4275
- type: z36.literal("hidden"),
4276
- condition: z36.union([ConditionalExpressionSchema, z36.boolean()])
4800
+ import { z as z37 } from "zod";
4801
+ var ContainerLogicSchema = z37.object({
4802
+ type: z37.literal("hidden"),
4803
+ condition: z37.union([ConditionalExpressionSchema, z37.boolean()])
4277
4804
  });
4278
4805
  function createContainerSchemas(options) {
4279
4806
  const { leafFieldSchema } = options;
4280
- const AnyFieldSchema = z36.lazy(
4281
- () => z36.union([
4807
+ const AnyFieldSchema = z37.lazy(
4808
+ () => z37.union([
4282
4809
  leafFieldSchema,
4283
4810
  PageFieldSchema,
4284
4811
  RowFieldSchema,
@@ -4292,67 +4819,67 @@ function createContainerSchemas(options) {
4292
4819
  }).extend({
4293
4820
  // Explicitly forbid label on container fields
4294
4821
  // This makes Zod reject any value for these properties
4295
- label: z36.never().optional(),
4296
- meta: z36.never().optional()
4822
+ label: z37.never().optional(),
4823
+ meta: z37.never().optional()
4297
4824
  });
4298
4825
  const PageFieldSchema = ContainerBaseSchema.extend({
4299
- type: z36.literal("page"),
4300
- fields: z36.array(AnyFieldSchema),
4301
- logic: z36.array(ContainerLogicSchema).optional(),
4826
+ type: z37.literal("page"),
4827
+ fields: z37.array(AnyFieldSchema),
4828
+ logic: z37.array(ContainerLogicSchema).optional(),
4302
4829
  // Also forbid title (common mistake)
4303
- title: z36.never().optional()
4830
+ title: z37.never().optional()
4304
4831
  });
4305
4832
  const RowFieldSchema = ContainerBaseSchema.extend({
4306
- type: z36.literal("row"),
4307
- fields: z36.array(AnyFieldSchema),
4833
+ type: z37.literal("row"),
4834
+ fields: z37.array(AnyFieldSchema),
4308
4835
  // Container logic - only 'hidden' type allowed (same as pages)
4309
- logic: z36.array(ContainerLogicSchema).optional()
4836
+ logic: z37.array(ContainerLogicSchema).optional()
4310
4837
  });
4311
4838
  const GroupFieldSchema = ContainerBaseSchema.extend({
4312
- type: z36.literal("group"),
4313
- fields: z36.array(AnyFieldSchema),
4839
+ type: z37.literal("group"),
4840
+ fields: z37.array(AnyFieldSchema),
4314
4841
  // Container logic - only 'hidden' type allowed (same as pages)
4315
- logic: z36.array(ContainerLogicSchema).optional()
4842
+ logic: z37.array(ContainerLogicSchema).optional()
4316
4843
  });
4317
- const ArrayButtonConfigSchema = z36.object({
4318
- label: z36.string().optional(),
4319
- props: z36.record(z36.unknown()).optional()
4844
+ const ArrayButtonConfigSchema = z37.object({
4845
+ label: z37.string().optional(),
4846
+ props: z37.record(z37.unknown()).optional()
4320
4847
  });
4321
4848
  const FullArrayFieldSchema = ContainerBaseSchema.extend({
4322
- type: z36.literal("array"),
4323
- fields: z36.array(AnyFieldSchema),
4324
- logic: z36.array(ContainerLogicSchema).optional(),
4849
+ type: z37.literal("array"),
4850
+ fields: z37.array(AnyFieldSchema),
4851
+ logic: z37.array(ContainerLogicSchema).optional(),
4325
4852
  // Full API does not use template
4326
- template: z36.never().optional(),
4853
+ template: z37.never().optional(),
4327
4854
  // Array length validation
4328
- minLength: z36.number().int().min(0).optional(),
4329
- maxLength: z36.number().int().min(0).optional()
4855
+ minLength: z37.number().int().min(0).optional(),
4856
+ maxLength: z37.number().int().min(0).optional()
4330
4857
  });
4331
- const ArrayAllowedChildSchema = z36.lazy(
4858
+ const ArrayAllowedChildSchema = z37.lazy(
4332
4859
  () => AnyFieldSchema.refine((field) => field.type !== "page" && field.type !== "array", {
4333
4860
  message: "Array templates cannot contain page or array fields. Only leaf fields, rows, and groups are allowed."
4334
4861
  })
4335
4862
  );
4336
4863
  const SimplifiedArrayFieldSchema = ContainerBaseSchema.extend({
4337
- type: z36.literal("array"),
4864
+ type: z37.literal("array"),
4338
4865
  // Template: single field (primitive array) or array of fields (object array)
4339
4866
  // Only ArrayAllowedChildren (leaf fields, rows, groups) are valid — no pages or nested arrays.
4340
- template: z36.union([ArrayAllowedChildSchema, z36.array(ArrayAllowedChildSchema)]),
4867
+ template: z37.union([ArrayAllowedChildSchema, z37.array(ArrayAllowedChildSchema)]),
4341
4868
  // Initial values for the array
4342
- value: z36.array(z36.unknown()).optional(),
4869
+ value: z37.array(z37.unknown()).optional(),
4343
4870
  // Button customization or opt-out (false to disable)
4344
- addButton: z36.union([ArrayButtonConfigSchema, z36.literal(false)]).optional(),
4345
- removeButton: z36.union([ArrayButtonConfigSchema, z36.literal(false)]).optional(),
4346
- logic: z36.array(ContainerLogicSchema).optional(),
4871
+ addButton: z37.union([ArrayButtonConfigSchema, z37.literal(false)]).optional(),
4872
+ removeButton: z37.union([ArrayButtonConfigSchema, z37.literal(false)]).optional(),
4873
+ logic: z37.array(ContainerLogicSchema).optional(),
4347
4874
  // Array length validation
4348
- minLength: z36.number().int().min(0).optional(),
4349
- maxLength: z36.number().int().min(0).optional(),
4875
+ minLength: z37.number().int().min(0).optional(),
4876
+ maxLength: z37.number().int().min(0).optional(),
4350
4877
  // Simplified API does not use fields
4351
- fields: z36.never().optional(),
4352
- minItems: z36.never().optional(),
4353
- maxItems: z36.never().optional()
4878
+ fields: z37.never().optional(),
4879
+ minItems: z37.never().optional(),
4880
+ maxItems: z37.never().optional()
4354
4881
  });
4355
- const ArrayFieldSchema = z36.union([FullArrayFieldSchema, SimplifiedArrayFieldSchema]);
4882
+ const ArrayFieldSchema = z37.union([FullArrayFieldSchema, SimplifiedArrayFieldSchema]);
4356
4883
  const AllFieldsSchema = AnyFieldSchema;
4357
4884
  return {
4358
4885
  PageFieldSchema,
@@ -4374,48 +4901,48 @@ var MatArrayFieldSchema = containerSchemas.ArrayFieldSchema;
4374
4901
  var MatFieldSchema = containerSchemas.AllFieldsSchema;
4375
4902
 
4376
4903
  // internal/dynamic-forms-zod/material/src/mat-form-config.schema.ts
4377
- import { z as z40 } from "zod";
4904
+ import { z as z41 } from "zod";
4378
4905
 
4379
4906
  // internal/dynamic-forms-zod/src/lib/schemas/form/form-config.schema.ts
4380
- import { z as z39 } from "zod";
4907
+ import { z as z40 } from "zod";
4381
4908
 
4382
4909
  // internal/dynamic-forms-zod/src/lib/schemas/form/form-options.schema.ts
4383
- import { z as z37 } from "zod";
4384
- var SubmitButtonOptionsSchema = z37.object({
4910
+ import { z as z38 } from "zod";
4911
+ var SubmitButtonOptionsSchema = z38.object({
4385
4912
  /**
4386
4913
  * Whether to disable the submit button when the form is invalid.
4387
4914
  * Defaults to true.
4388
4915
  */
4389
- disableWhenInvalid: z37.boolean().optional(),
4916
+ disableWhenInvalid: z38.boolean().optional(),
4390
4917
  /**
4391
4918
  * Whether to disable the submit button while the form is submitting.
4392
4919
  * Defaults to true.
4393
4920
  */
4394
- disableWhileSubmitting: z37.boolean().optional()
4921
+ disableWhileSubmitting: z38.boolean().optional()
4395
4922
  });
4396
- var NextButtonOptionsSchema = z37.object({
4923
+ var NextButtonOptionsSchema = z38.object({
4397
4924
  /**
4398
4925
  * Whether to disable the next button when the current page is invalid.
4399
4926
  * Defaults to true.
4400
4927
  */
4401
- disableWhenPageInvalid: z37.boolean().optional(),
4928
+ disableWhenPageInvalid: z38.boolean().optional(),
4402
4929
  /**
4403
4930
  * Whether to disable the next button while the form is submitting.
4404
4931
  * Defaults to true.
4405
4932
  */
4406
- disableWhileSubmitting: z37.boolean().optional()
4933
+ disableWhileSubmitting: z38.boolean().optional()
4407
4934
  });
4408
- var FormOptionsSchema = z37.object({
4935
+ var FormOptionsSchema = z38.object({
4409
4936
  /**
4410
4937
  * Whether the entire form is disabled.
4411
4938
  */
4412
- disabled: z37.boolean().optional(),
4939
+ disabled: z38.boolean().optional(),
4413
4940
  /**
4414
4941
  * Maximum number of derivation iterations before stopping.
4415
4942
  * Prevents infinite loops in circular derivations.
4416
4943
  * Defaults to 10.
4417
4944
  */
4418
- maxDerivationIterations: z37.number().positive().optional(),
4945
+ maxDerivationIterations: z38.number().positive().optional(),
4419
4946
  /**
4420
4947
  * Options for the submit button behavior.
4421
4948
  */
@@ -4428,36 +4955,36 @@ var FormOptionsSchema = z37.object({
4428
4955
  * Whether to exclude values of hidden fields from submission output.
4429
4956
  * Overrides the global withValueExclusionDefaults() setting for this form.
4430
4957
  */
4431
- excludeValueIfHidden: z37.boolean().optional(),
4958
+ excludeValueIfHidden: z38.boolean().optional(),
4432
4959
  /**
4433
4960
  * Whether to exclude values of disabled fields from submission output.
4434
4961
  * Overrides the global withValueExclusionDefaults() setting for this form.
4435
4962
  */
4436
- excludeValueIfDisabled: z37.boolean().optional(),
4963
+ excludeValueIfDisabled: z38.boolean().optional(),
4437
4964
  /**
4438
4965
  * Whether to exclude values of readonly fields from submission output.
4439
4966
  * Overrides the global withValueExclusionDefaults() setting for this form.
4440
4967
  */
4441
- excludeValueIfReadonly: z37.boolean().optional()
4968
+ excludeValueIfReadonly: z38.boolean().optional()
4442
4969
  });
4443
4970
 
4444
4971
  // internal/dynamic-forms-zod/src/lib/schemas/form/schema-definition.schema.ts
4445
- import { z as z38 } from "zod";
4446
- var SchemaDefinitionSchema = z38.object({
4972
+ import { z as z39 } from "zod";
4973
+ var SchemaDefinitionSchema = z39.object({
4447
4974
  /**
4448
4975
  * Unique identifier for the schema.
4449
4976
  * Used to reference the schema in SchemaApplicationConfig.
4450
4977
  */
4451
- name: z38.string(),
4978
+ name: z39.string(),
4452
4979
  /**
4453
4980
  * Human-readable description of what this schema validates.
4454
4981
  */
4455
- description: z38.string().optional(),
4982
+ description: z39.string().optional(),
4456
4983
  /**
4457
4984
  * Field path pattern for automatic schema application.
4458
4985
  * Supports glob-like patterns.
4459
4986
  */
4460
- pathPattern: z38.string().optional(),
4987
+ pathPattern: z39.string().optional(),
4461
4988
  /**
4462
4989
  * Validators to apply to fields using this schema.
4463
4990
  */
@@ -4469,17 +4996,17 @@ var SchemaDefinitionSchema = z38.object({
4469
4996
  /**
4470
4997
  * Nested schema applications for composing schemas.
4471
4998
  */
4472
- subSchemas: z38.array(SchemaApplicationConfigSchema).optional()
4999
+ subSchemas: z39.array(SchemaApplicationConfigSchema).optional()
4473
5000
  });
4474
- var SchemaDefinitionsArraySchema = z38.array(SchemaDefinitionSchema);
5001
+ var SchemaDefinitionsArraySchema = z39.array(SchemaDefinitionSchema);
4475
5002
 
4476
5003
  // internal/dynamic-forms-zod/src/lib/schemas/form/form-config.schema.ts
4477
5004
  function createFormConfigSchema(fieldSchema, propsSchema) {
4478
- const baseSchema = z39.object({
5005
+ const baseSchema = z40.object({
4479
5006
  /**
4480
5007
  * Array of field definitions that make up the form.
4481
5008
  */
4482
- fields: z39.array(fieldSchema),
5009
+ fields: z40.array(fieldSchema),
4483
5010
  /**
4484
5011
  * Form-level options controlling behavior.
4485
5012
  */
@@ -4519,15 +5046,15 @@ function createFormConfigSchema(fieldSchema, propsSchema) {
4519
5046
  }
4520
5047
  return baseSchema;
4521
5048
  }
4522
- var BaseFormConfigSchema = z39.object({
4523
- fields: z39.array(z39.any()),
5049
+ var BaseFormConfigSchema = z40.object({
5050
+ fields: z40.array(z40.any()),
4524
5051
  options: FormOptionsSchema.optional(),
4525
5052
  schemas: SchemaDefinitionsArraySchema.optional(),
4526
5053
  defaultValidationMessages: ValidationMessagesSchema.optional()
4527
5054
  });
4528
5055
 
4529
5056
  // internal/dynamic-forms-zod/material/src/mat-form-config.schema.ts
4530
- var MatFormDefaultPropsSchema = z40.object({
5057
+ var MatFormDefaultPropsSchema = z41.object({
4531
5058
  /**
4532
5059
  * Default form field appearance for all fields.
4533
5060
  */
@@ -4544,15 +5071,15 @@ var MatFormDefaultPropsSchema = z40.object({
4544
5071
  var MatFormConfigSchema = createFormConfigSchema(MatFieldSchema, MatFormDefaultPropsSchema);
4545
5072
 
4546
5073
  // internal/dynamic-forms-zod/bootstrap/src/props/index.ts
4547
- import { z as z42 } from "zod";
5074
+ import { z as z43 } from "zod";
4548
5075
 
4549
5076
  // internal/dynamic-forms-zod/bootstrap/src/props/bs-common-props.schema.ts
4550
- import { z as z41 } from "zod";
4551
- var BsSizeSchema = z41.enum(["sm", "lg"]);
4552
- var BsButtonVariantSchema = z41.enum(["primary", "secondary", "success", "danger", "warning", "info", "light", "dark", "link"]);
4553
- var BsFormFieldPropsSchema = z41.object({
5077
+ import { z as z42 } from "zod";
5078
+ var BsSizeSchema = z42.enum(["sm", "lg"]);
5079
+ var BsButtonVariantSchema = z42.enum(["primary", "secondary", "success", "danger", "warning", "info", "light", "dark", "link"]);
5080
+ var BsFormFieldPropsSchema = z42.object({
4554
5081
  size: BsSizeSchema.optional(),
4555
- floatingLabel: z41.boolean().optional(),
5082
+ floatingLabel: z42.boolean().optional(),
4556
5083
  hint: DynamicTextSchema.optional(),
4557
5084
  validFeedback: DynamicTextSchema.optional(),
4558
5085
  invalidFeedback: DynamicTextSchema.optional()
@@ -4560,194 +5087,208 @@ var BsFormFieldPropsSchema = z41.object({
4560
5087
 
4561
5088
  // internal/dynamic-forms-zod/bootstrap/src/props/index.ts
4562
5089
  var BsInputPropsSchema = BsFormFieldPropsSchema.extend({
4563
- type: z42.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
5090
+ type: z43.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
4564
5091
  placeholder: DynamicTextSchema.optional(),
4565
- plaintext: z42.boolean().optional()
5092
+ plaintext: z43.boolean().optional()
4566
5093
  });
4567
5094
  var BsTextareaPropsSchema = BsFormFieldPropsSchema.extend({
4568
- rows: z42.number().positive().optional(),
5095
+ rows: z43.number().positive().optional(),
4569
5096
  placeholder: DynamicTextSchema.optional()
4570
5097
  });
4571
5098
  var BsSelectPropsSchema = BsFormFieldPropsSchema.extend({
4572
- multiple: z42.boolean().optional(),
4573
- htmlSize: z42.number().positive().optional(),
5099
+ multiple: z43.boolean().optional(),
5100
+ htmlSize: z43.number().positive().optional(),
4574
5101
  placeholder: DynamicTextSchema.optional()
4575
5102
  });
4576
- var BsCheckboxPropsSchema = z42.object({
4577
- switch: z42.boolean().optional(),
4578
- inline: z42.boolean().optional(),
4579
- reverse: z42.boolean().optional(),
4580
- indeterminate: z42.boolean().optional(),
5103
+ var BsCheckboxPropsSchema = z43.object({
5104
+ switch: z43.boolean().optional(),
5105
+ inline: z43.boolean().optional(),
5106
+ reverse: z43.boolean().optional(),
5107
+ indeterminate: z43.boolean().optional(),
4581
5108
  hint: DynamicTextSchema.optional()
4582
5109
  });
4583
- var BsRadioPropsSchema = z42.object({
4584
- inline: z42.boolean().optional(),
4585
- reverse: z42.boolean().optional(),
4586
- buttonGroup: z42.boolean().optional(),
5110
+ var BsRadioPropsSchema = z43.object({
5111
+ inline: z43.boolean().optional(),
5112
+ reverse: z43.boolean().optional(),
5113
+ buttonGroup: z43.boolean().optional(),
4587
5114
  buttonSize: BsSizeSchema.optional(),
4588
5115
  hint: DynamicTextSchema.optional()
4589
5116
  });
4590
- var BsMultiCheckboxPropsSchema = z42.object({
4591
- switch: z42.boolean().optional(),
4592
- inline: z42.boolean().optional(),
4593
- reverse: z42.boolean().optional(),
5117
+ var BsMultiCheckboxPropsSchema = z43.object({
5118
+ switch: z43.boolean().optional(),
5119
+ inline: z43.boolean().optional(),
5120
+ reverse: z43.boolean().optional(),
4594
5121
  hint: DynamicTextSchema.optional()
4595
5122
  });
4596
- var BsTogglePropsSchema = z42.object({
5123
+ var BsTogglePropsSchema = z43.object({
4597
5124
  size: BsSizeSchema.optional(),
4598
- reverse: z42.boolean().optional(),
4599
- inline: z42.boolean().optional(),
5125
+ reverse: z43.boolean().optional(),
5126
+ inline: z43.boolean().optional(),
4600
5127
  hint: DynamicTextSchema.optional()
4601
5128
  });
4602
5129
  var BsDatepickerPropsSchema = BsFormFieldPropsSchema.extend({
4603
- useNgBootstrap: z42.boolean().optional(),
4604
- displayMonths: z42.number().positive().optional(),
4605
- navigation: z42.enum(["select", "arrows", "none"]).optional(),
4606
- outsideDays: z42.enum(["visible", "collapsed", "hidden"]).optional(),
4607
- showWeekNumbers: z42.boolean().optional(),
5130
+ useNgBootstrap: z43.boolean().optional(),
5131
+ displayMonths: z43.number().positive().optional(),
5132
+ navigation: z43.enum(["select", "arrows", "none"]).optional(),
5133
+ outsideDays: z43.enum(["visible", "collapsed", "hidden"]).optional(),
5134
+ showWeekNumbers: z43.boolean().optional(),
4608
5135
  placeholder: DynamicTextSchema.optional()
4609
5136
  });
4610
- var BsSliderPropsSchema = z42.object({
4611
- showValue: z42.boolean().optional(),
4612
- valuePrefix: z42.string().optional(),
4613
- valueSuffix: z42.string().optional(),
5137
+ var BsSliderPropsSchema = z43.object({
5138
+ showValue: z43.boolean().optional(),
5139
+ valuePrefix: z43.string().optional(),
5140
+ valueSuffix: z43.string().optional(),
4614
5141
  hint: DynamicTextSchema.optional(),
4615
- min: z42.number().optional(),
4616
- max: z42.number().optional(),
4617
- step: z42.number().positive().optional()
5142
+ min: z43.number().optional(),
5143
+ max: z43.number().optional(),
5144
+ step: z43.number().positive().optional()
4618
5145
  });
4619
- var BsButtonPropsSchema = z42.object({
5146
+ var BsButtonPropsSchema = z43.object({
4620
5147
  variant: BsButtonVariantSchema.optional(),
4621
- outline: z42.boolean().optional(),
5148
+ outline: z43.boolean().optional(),
4622
5149
  size: BsSizeSchema.optional(),
4623
- block: z42.boolean().optional(),
4624
- active: z42.boolean().optional(),
4625
- type: z42.enum(["button", "submit", "reset"]).optional()
5150
+ block: z43.boolean().optional(),
5151
+ active: z43.boolean().optional(),
5152
+ type: z43.enum(["button", "submit", "reset"]).optional()
4626
5153
  });
4627
5154
 
4628
5155
  // internal/dynamic-forms-zod/bootstrap/src/fields/index.ts
4629
- import { z as z43 } from "zod";
5156
+ import { z as z44 } from "zod";
4630
5157
  var BsValueFieldBase = BaseFieldDefSchema.merge(FieldWithValidationSchema);
4631
- var BsInputFieldSchema = BsValueFieldBase.extend({
4632
- type: z43.literal("input"),
4633
- value: z43.string().optional(),
5158
+ var BsInputFieldSchemaObject = BsValueFieldBase.extend({
5159
+ type: z44.literal("input"),
5160
+ nullable: z44.boolean().optional(),
5161
+ value: z44.string().nullable().optional(),
4634
5162
  placeholder: DynamicTextSchema.optional(),
4635
5163
  props: BsInputPropsSchema.optional()
4636
5164
  });
4637
- var BsTextareaFieldSchema = BsValueFieldBase.extend({
4638
- type: z43.literal("textarea"),
4639
- value: z43.string().optional(),
5165
+ var BsInputFieldSchema = BsInputFieldSchemaObject.superRefine(nullableValueRefine);
5166
+ var BsTextareaFieldSchemaObject = BsValueFieldBase.extend({
5167
+ type: z44.literal("textarea"),
5168
+ nullable: z44.boolean().optional(),
5169
+ value: z44.string().nullable().optional(),
4640
5170
  placeholder: DynamicTextSchema.optional(),
4641
5171
  props: BsTextareaPropsSchema.optional()
4642
5172
  });
4643
- var BsSelectFieldSchema = BsValueFieldBase.extend({
4644
- type: z43.literal("select"),
4645
- value: z43.string().optional(),
5173
+ var BsTextareaFieldSchema = BsTextareaFieldSchemaObject.superRefine(nullableValueRefine);
5174
+ var BsSelectFieldSchemaObject = BsValueFieldBase.extend({
5175
+ type: z44.literal("select"),
5176
+ nullable: z44.boolean().optional(),
5177
+ value: z44.string().nullable().optional(),
4646
5178
  // Bootstrap select only supports strings
4647
5179
  placeholder: DynamicTextSchema.optional(),
4648
5180
  options: FieldOptionsSchema,
4649
5181
  props: BsSelectPropsSchema.optional()
4650
5182
  });
5183
+ var BsSelectFieldSchema = BsSelectFieldSchemaObject.superRefine(nullableValueRefine);
4651
5184
  var BsCheckboxFieldSchema = BsValueFieldBase.extend({
4652
- type: z43.literal("checkbox"),
4653
- value: z43.boolean().optional(),
5185
+ type: z44.literal("checkbox"),
5186
+ value: z44.boolean().optional(),
4654
5187
  placeholder: DynamicTextSchema.optional(),
4655
5188
  props: BsCheckboxPropsSchema.optional()
4656
5189
  });
4657
- var BsRadioFieldSchema = BsValueFieldBase.extend({
4658
- type: z43.literal("radio"),
4659
- value: z43.unknown().optional(),
5190
+ var BsRadioFieldSchemaObject = BsValueFieldBase.extend({
5191
+ type: z44.literal("radio"),
5192
+ nullable: z44.boolean().optional(),
5193
+ value: z44.unknown().nullable().optional(),
4660
5194
  placeholder: DynamicTextSchema.optional(),
4661
5195
  options: FieldOptionsSchema,
4662
5196
  props: BsRadioPropsSchema.optional()
4663
5197
  });
4664
- var BsMultiCheckboxFieldSchema = BsValueFieldBase.extend({
4665
- type: z43.literal("multi-checkbox"),
4666
- value: z43.array(z43.unknown()).optional(),
5198
+ var BsRadioFieldSchema = BsRadioFieldSchemaObject.superRefine(nullableValueRefine);
5199
+ var BsMultiCheckboxFieldSchemaObject = BsValueFieldBase.extend({
5200
+ type: z44.literal("multi-checkbox"),
5201
+ nullable: z44.boolean().optional(),
5202
+ value: z44.array(z44.unknown()).nullable().optional(),
4667
5203
  placeholder: DynamicTextSchema.optional(),
4668
5204
  options: FieldOptionsSchema,
4669
5205
  props: BsMultiCheckboxPropsSchema.optional()
4670
5206
  });
5207
+ var BsMultiCheckboxFieldSchema = BsMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
4671
5208
  var BsToggleFieldSchema = BsValueFieldBase.extend({
4672
- type: z43.literal("toggle"),
4673
- value: z43.boolean().optional(),
5209
+ type: z44.literal("toggle"),
5210
+ value: z44.boolean().optional(),
4674
5211
  placeholder: DynamicTextSchema.optional(),
4675
5212
  props: BsTogglePropsSchema.optional()
4676
5213
  });
4677
- var BsDatepickerFieldSchema = BsValueFieldBase.extend({
4678
- type: z43.literal("datepicker"),
4679
- value: z43.union([z43.string(), z43.null()]).optional(),
4680
- minDate: z43.union([z43.string(), z43.null()]).optional(),
4681
- maxDate: z43.union([z43.string(), z43.null()]).optional(),
4682
- startAt: z43.union([z43.string(), z43.null()]).optional(),
5214
+ var BsDatepickerFieldSchemaObject = BsValueFieldBase.extend({
5215
+ type: z44.literal("datepicker"),
5216
+ nullable: z44.boolean().optional(),
5217
+ value: z44.union([z44.string(), z44.null()]).optional(),
5218
+ minDate: z44.union([z44.string(), z44.null()]).optional(),
5219
+ maxDate: z44.union([z44.string(), z44.null()]).optional(),
5220
+ startAt: z44.union([z44.string(), z44.null()]).optional(),
4683
5221
  placeholder: DynamicTextSchema.optional(),
4684
5222
  props: BsDatepickerPropsSchema.optional()
4685
5223
  });
4686
- var BsSliderFieldSchema = BsValueFieldBase.extend({
4687
- type: z43.literal("slider"),
4688
- value: z43.number().optional(),
4689
- minValue: z43.number().optional(),
4690
- maxValue: z43.number().optional(),
4691
- step: z43.number().positive().optional(),
5224
+ var BsDatepickerFieldSchema = BsDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
5225
+ var BsSliderFieldSchemaObject = BsValueFieldBase.extend({
5226
+ type: z44.literal("slider"),
5227
+ nullable: z44.boolean().optional(),
5228
+ value: z44.number().nullable().optional(),
5229
+ minValue: z44.number().optional(),
5230
+ maxValue: z44.number().optional(),
5231
+ step: z44.number().positive().optional(),
4692
5232
  placeholder: DynamicTextSchema.optional(),
4693
5233
  props: BsSliderPropsSchema.optional()
4694
5234
  });
5235
+ var BsSliderFieldSchema = BsSliderFieldSchemaObject.superRefine(nullableValueRefine);
4695
5236
  var BsButtonFieldSchema = BaseFieldDefSchema.extend({
4696
- type: z43.literal("button"),
4697
- event: z43.string().optional(),
4698
- eventArgs: z43.array(z43.union([z43.string(), z43.number(), z43.boolean(), z43.null(), z43.undefined()])).optional(),
5237
+ type: z44.literal("button"),
5238
+ event: z44.string().optional(),
5239
+ eventArgs: z44.array(z44.union([z44.string(), z44.number(), z44.boolean(), z44.null(), z44.undefined()])).optional(),
4699
5240
  props: BsButtonPropsSchema.optional(),
4700
5241
  logic: LogicArraySchema.optional()
4701
5242
  });
4702
5243
  var BsSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
4703
- type: z43.literal("submit"),
5244
+ type: z44.literal("submit"),
4704
5245
  props: BsButtonPropsSchema.optional(),
4705
5246
  logic: LogicArraySchema.optional()
4706
5247
  });
4707
5248
  var BsNextButtonFieldSchema = BaseFieldDefSchema.extend({
4708
- type: z43.literal("next"),
5249
+ type: z44.literal("next"),
4709
5250
  props: BsButtonPropsSchema.optional(),
4710
5251
  logic: LogicArraySchema.optional()
4711
5252
  });
4712
5253
  var BsPreviousButtonFieldSchema = BaseFieldDefSchema.extend({
4713
- type: z43.literal("previous"),
5254
+ type: z44.literal("previous"),
4714
5255
  props: BsButtonPropsSchema.optional()
4715
5256
  });
4716
5257
  var BsAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
4717
- type: z43.literal("addArrayItem"),
4718
- arrayKey: z43.string().optional(),
5258
+ type: z44.literal("addArrayItem"),
5259
+ arrayKey: z44.string().optional(),
4719
5260
  props: BsButtonPropsSchema.optional()
4720
5261
  });
4721
5262
  var BsRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
4722
- type: z43.literal("removeArrayItem"),
4723
- arrayKey: z43.string().optional(),
5263
+ type: z44.literal("removeArrayItem"),
5264
+ arrayKey: z44.string().optional(),
4724
5265
  props: BsButtonPropsSchema.optional()
4725
5266
  });
4726
5267
 
4727
5268
  // internal/dynamic-forms-zod/bootstrap/src/bs-leaf-field.schema.ts
4728
- import { z as z44 } from "zod";
4729
- var BsLeafFieldSchema = z44.discriminatedUnion("type", [
5269
+ import { z as z45 } from "zod";
5270
+ var BsLeafFieldSchema = z45.discriminatedUnion("type", [
4730
5271
  TextFieldSchema,
4731
5272
  HiddenFieldSchema,
4732
- BsInputFieldSchema,
4733
- BsTextareaFieldSchema,
4734
- BsSelectFieldSchema,
5273
+ BsInputFieldSchemaObject,
5274
+ BsTextareaFieldSchemaObject,
5275
+ BsSelectFieldSchemaObject,
4735
5276
  BsCheckboxFieldSchema,
4736
- BsRadioFieldSchema,
4737
- BsMultiCheckboxFieldSchema,
5277
+ BsRadioFieldSchemaObject,
5278
+ BsMultiCheckboxFieldSchemaObject,
4738
5279
  BsToggleFieldSchema,
4739
- BsDatepickerFieldSchema,
4740
- BsSliderFieldSchema,
5280
+ BsDatepickerFieldSchemaObject,
5281
+ BsSliderFieldSchemaObject,
4741
5282
  BsButtonFieldSchema,
4742
5283
  BsSubmitButtonFieldSchema,
4743
5284
  BsNextButtonFieldSchema,
4744
5285
  BsPreviousButtonFieldSchema,
4745
5286
  BsAddArrayItemButtonFieldSchema,
4746
5287
  BsRemoveArrayItemButtonFieldSchema
4747
- ]);
5288
+ ]).superRefine(nullableValueRefine);
4748
5289
 
4749
5290
  // internal/dynamic-forms-zod/bootstrap/src/bs-form-config.schema.ts
4750
- import { z as z45 } from "zod";
5291
+ import { z as z46 } from "zod";
4751
5292
  var containerSchemas2 = createContainerSchemas({
4752
5293
  leafFieldSchema: BsLeafFieldSchema
4753
5294
  });
@@ -4756,186 +5297,200 @@ var BsRowFieldSchema = containerSchemas2.RowFieldSchema;
4756
5297
  var BsGroupFieldSchema = containerSchemas2.GroupFieldSchema;
4757
5298
  var BsArrayFieldSchema = containerSchemas2.ArrayFieldSchema;
4758
5299
  var BsFieldSchema = containerSchemas2.AllFieldsSchema;
4759
- var BsFormDefaultPropsSchema = z45.object({
5300
+ var BsFormDefaultPropsSchema = z46.object({
4760
5301
  size: BsSizeSchema.optional(),
4761
- floatingLabel: z45.boolean().optional()
5302
+ floatingLabel: z46.boolean().optional()
4762
5303
  });
4763
5304
  var BsFormConfigSchema = createFormConfigSchema(BsFieldSchema, BsFormDefaultPropsSchema);
4764
5305
 
4765
5306
  // internal/dynamic-forms-zod/primeng/src/props/index.ts
4766
- import { z as z46 } from "zod";
4767
- var PrimeSeveritySchema = z46.enum(["primary", "secondary", "success", "info", "warn", "danger", "help", "contrast"]);
4768
- var PrimeCommonPropsSchema = z46.object({
4769
- styleClass: z46.string().optional(),
5307
+ import { z as z47 } from "zod";
5308
+ var PrimeSeveritySchema = z47.enum(["primary", "secondary", "success", "info", "warn", "danger", "help", "contrast"]);
5309
+ var PrimeCommonPropsSchema = z47.object({
5310
+ styleClass: z47.string().optional(),
4770
5311
  hint: DynamicTextSchema.optional()
4771
5312
  });
4772
5313
  var PrimeInputPropsSchema = PrimeCommonPropsSchema.extend({
4773
- type: z46.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
5314
+ type: z47.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
4774
5315
  placeholder: DynamicTextSchema.optional(),
4775
- size: z46.enum(["small", "large"]).optional(),
4776
- variant: z46.enum(["outlined", "filled"]).optional()
5316
+ size: z47.enum(["small", "large"]).optional(),
5317
+ variant: z47.enum(["outlined", "filled"]).optional()
4777
5318
  });
4778
5319
  var PrimeCheckboxPropsSchema = PrimeCommonPropsSchema.extend({
4779
- binary: z46.boolean().optional(),
4780
- trueValue: z46.unknown().optional(),
4781
- falseValue: z46.unknown().optional()
5320
+ binary: z47.boolean().optional(),
5321
+ trueValue: z47.unknown().optional(),
5322
+ falseValue: z47.unknown().optional()
4782
5323
  });
4783
5324
  var PrimeRadioPropsSchema = PrimeCommonPropsSchema.extend({
4784
- name: z46.string().optional()
5325
+ name: z47.string().optional()
4785
5326
  });
4786
5327
  var PrimeSelectPropsSchema = PrimeCommonPropsSchema.extend({
4787
- multiple: z46.boolean().optional(),
4788
- filter: z46.boolean().optional(),
5328
+ multiple: z47.boolean().optional(),
5329
+ filter: z47.boolean().optional(),
4789
5330
  placeholder: DynamicTextSchema.optional(),
4790
- showClear: z46.boolean().optional()
5331
+ showClear: z47.boolean().optional()
4791
5332
  });
4792
5333
  var PrimeMultiCheckboxPropsSchema = PrimeCommonPropsSchema;
4793
5334
  var PrimeDatepickerPropsSchema = PrimeCommonPropsSchema.extend({
4794
- dateFormat: z46.string().optional(),
4795
- inline: z46.boolean().optional(),
4796
- showIcon: z46.boolean().optional(),
4797
- showButtonBar: z46.boolean().optional(),
4798
- selectionMode: z46.enum(["single", "multiple", "range"]).optional(),
4799
- touchUI: z46.boolean().optional(),
4800
- view: z46.enum(["date", "month", "year"]).optional(),
5335
+ dateFormat: z47.string().optional(),
5336
+ inline: z47.boolean().optional(),
5337
+ showIcon: z47.boolean().optional(),
5338
+ showButtonBar: z47.boolean().optional(),
5339
+ selectionMode: z47.enum(["single", "multiple", "range"]).optional(),
5340
+ touchUI: z47.boolean().optional(),
5341
+ view: z47.enum(["date", "month", "year"]).optional(),
4801
5342
  placeholder: DynamicTextSchema.optional()
4802
5343
  });
4803
5344
  var PrimeTextareaPropsSchema = PrimeCommonPropsSchema.extend({
4804
- rows: z46.number().positive().optional(),
4805
- autoResize: z46.boolean().optional(),
4806
- maxlength: z46.number().positive().optional(),
5345
+ rows: z47.number().positive().optional(),
5346
+ autoResize: z47.boolean().optional(),
5347
+ maxlength: z47.number().positive().optional(),
4807
5348
  placeholder: DynamicTextSchema.optional()
4808
5349
  });
4809
5350
  var PrimeSliderPropsSchema = PrimeCommonPropsSchema.extend({
4810
- min: z46.number().optional(),
4811
- max: z46.number().optional(),
4812
- step: z46.number().positive().optional(),
4813
- range: z46.boolean().optional(),
4814
- orientation: z46.enum(["horizontal", "vertical"]).optional()
5351
+ min: z47.number().optional(),
5352
+ max: z47.number().optional(),
5353
+ step: z47.number().positive().optional(),
5354
+ range: z47.boolean().optional(),
5355
+ orientation: z47.enum(["horizontal", "vertical"]).optional()
4815
5356
  });
4816
5357
  var PrimeTogglePropsSchema = PrimeCommonPropsSchema;
4817
- var PrimeButtonPropsSchema = z46.object({
5358
+ var PrimeButtonPropsSchema = z47.object({
4818
5359
  severity: PrimeSeveritySchema.optional(),
4819
- text: z46.boolean().optional(),
4820
- outlined: z46.boolean().optional(),
4821
- raised: z46.boolean().optional(),
4822
- rounded: z46.boolean().optional(),
4823
- icon: z46.string().optional(),
4824
- iconPos: z46.enum(["left", "right", "top", "bottom"]).optional(),
4825
- type: z46.enum(["button", "submit", "reset"]).optional()
5360
+ text: z47.boolean().optional(),
5361
+ outlined: z47.boolean().optional(),
5362
+ raised: z47.boolean().optional(),
5363
+ rounded: z47.boolean().optional(),
5364
+ icon: z47.string().optional(),
5365
+ iconPos: z47.enum(["left", "right", "top", "bottom"]).optional(),
5366
+ type: z47.enum(["button", "submit", "reset"]).optional()
4826
5367
  });
4827
5368
 
4828
5369
  // internal/dynamic-forms-zod/primeng/src/fields/index.ts
4829
- import { z as z47 } from "zod";
5370
+ import { z as z48 } from "zod";
4830
5371
  var PrimeValueFieldBase = BaseFieldDefSchema.merge(FieldWithValidationSchema);
4831
- var PrimeInputFieldSchema = PrimeValueFieldBase.extend({
4832
- type: z47.literal("input"),
4833
- value: z47.string().optional(),
5372
+ var PrimeInputFieldSchemaObject = PrimeValueFieldBase.extend({
5373
+ type: z48.literal("input"),
5374
+ nullable: z48.boolean().optional(),
5375
+ value: z48.string().nullable().optional(),
4834
5376
  placeholder: DynamicTextSchema.optional(),
4835
5377
  props: PrimeInputPropsSchema.optional()
4836
5378
  });
5379
+ var PrimeInputFieldSchema = PrimeInputFieldSchemaObject.superRefine(nullableValueRefine);
4837
5380
  var PrimeCheckboxFieldSchema = PrimeValueFieldBase.extend({
4838
- type: z47.literal("checkbox"),
4839
- value: z47.boolean().optional(),
5381
+ type: z48.literal("checkbox"),
5382
+ value: z48.boolean().optional(),
4840
5383
  placeholder: DynamicTextSchema.optional(),
4841
5384
  props: PrimeCheckboxPropsSchema.optional()
4842
5385
  });
4843
- var PrimeRadioFieldSchema = PrimeValueFieldBase.extend({
4844
- type: z47.literal("radio"),
4845
- value: z47.unknown().optional(),
5386
+ var PrimeRadioFieldSchemaObject = PrimeValueFieldBase.extend({
5387
+ type: z48.literal("radio"),
5388
+ nullable: z48.boolean().optional(),
5389
+ value: z48.unknown().nullable().optional(),
4846
5390
  placeholder: DynamicTextSchema.optional(),
4847
5391
  options: FieldOptionsSchema,
4848
5392
  props: PrimeRadioPropsSchema.optional()
4849
5393
  });
4850
- var PrimeSelectFieldSchema = PrimeValueFieldBase.extend({
4851
- type: z47.literal("select"),
4852
- value: z47.unknown().optional(),
5394
+ var PrimeRadioFieldSchema = PrimeRadioFieldSchemaObject.superRefine(nullableValueRefine);
5395
+ var PrimeSelectFieldSchemaObject = PrimeValueFieldBase.extend({
5396
+ type: z48.literal("select"),
5397
+ nullable: z48.boolean().optional(),
5398
+ value: z48.unknown().nullable().optional(),
4853
5399
  placeholder: DynamicTextSchema.optional(),
4854
5400
  options: FieldOptionsSchema,
4855
5401
  props: PrimeSelectPropsSchema.optional()
4856
5402
  });
4857
- var PrimeMultiCheckboxFieldSchema = PrimeValueFieldBase.extend({
4858
- type: z47.literal("multi-checkbox"),
4859
- value: z47.array(z47.unknown()).optional(),
5403
+ var PrimeSelectFieldSchema = PrimeSelectFieldSchemaObject.superRefine(nullableValueRefine);
5404
+ var PrimeMultiCheckboxFieldSchemaObject = PrimeValueFieldBase.extend({
5405
+ type: z48.literal("multi-checkbox"),
5406
+ nullable: z48.boolean().optional(),
5407
+ value: z48.array(z48.unknown()).nullable().optional(),
4860
5408
  placeholder: DynamicTextSchema.optional(),
4861
5409
  options: FieldOptionsSchema,
4862
5410
  props: PrimeMultiCheckboxPropsSchema.optional()
4863
5411
  });
4864
- var PrimeDatepickerFieldSchema = PrimeValueFieldBase.extend({
4865
- type: z47.literal("datepicker"),
4866
- value: z47.union([z47.string(), z47.null()]).optional(),
4867
- minDate: z47.union([z47.string(), z47.null()]).optional(),
4868
- maxDate: z47.union([z47.string(), z47.null()]).optional(),
4869
- startAt: z47.union([z47.string(), z47.null()]).optional(),
5412
+ var PrimeMultiCheckboxFieldSchema = PrimeMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
5413
+ var PrimeDatepickerFieldSchemaObject = PrimeValueFieldBase.extend({
5414
+ type: z48.literal("datepicker"),
5415
+ nullable: z48.boolean().optional(),
5416
+ value: z48.union([z48.string(), z48.null()]).optional(),
5417
+ minDate: z48.union([z48.string(), z48.null()]).optional(),
5418
+ maxDate: z48.union([z48.string(), z48.null()]).optional(),
5419
+ startAt: z48.union([z48.string(), z48.null()]).optional(),
4870
5420
  placeholder: DynamicTextSchema.optional(),
4871
5421
  props: PrimeDatepickerPropsSchema.optional()
4872
5422
  });
4873
- var PrimeTextareaFieldSchema = PrimeValueFieldBase.extend({
4874
- type: z47.literal("textarea"),
4875
- value: z47.string().optional(),
5423
+ var PrimeDatepickerFieldSchema = PrimeDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
5424
+ var PrimeTextareaFieldSchemaObject = PrimeValueFieldBase.extend({
5425
+ type: z48.literal("textarea"),
5426
+ nullable: z48.boolean().optional(),
5427
+ value: z48.string().nullable().optional(),
4876
5428
  placeholder: DynamicTextSchema.optional(),
4877
5429
  props: PrimeTextareaPropsSchema.optional()
4878
5430
  });
4879
- var PrimeSliderFieldSchema = PrimeValueFieldBase.extend({
4880
- type: z47.literal("slider"),
4881
- value: z47.number().optional(),
4882
- minValue: z47.number().optional(),
4883
- maxValue: z47.number().optional(),
4884
- step: z47.number().positive().optional(),
5431
+ var PrimeTextareaFieldSchema = PrimeTextareaFieldSchemaObject.superRefine(nullableValueRefine);
5432
+ var PrimeSliderFieldSchemaObject = PrimeValueFieldBase.extend({
5433
+ type: z48.literal("slider"),
5434
+ nullable: z48.boolean().optional(),
5435
+ value: z48.number().nullable().optional(),
5436
+ minValue: z48.number().optional(),
5437
+ maxValue: z48.number().optional(),
5438
+ step: z48.number().positive().optional(),
4885
5439
  placeholder: DynamicTextSchema.optional(),
4886
5440
  props: PrimeSliderPropsSchema.optional()
4887
5441
  });
5442
+ var PrimeSliderFieldSchema = PrimeSliderFieldSchemaObject.superRefine(nullableValueRefine);
4888
5443
  var PrimeToggleFieldSchema = PrimeValueFieldBase.extend({
4889
- type: z47.literal("toggle"),
4890
- value: z47.boolean().optional(),
5444
+ type: z48.literal("toggle"),
5445
+ value: z48.boolean().optional(),
4891
5446
  placeholder: DynamicTextSchema.optional(),
4892
5447
  props: PrimeTogglePropsSchema.optional()
4893
5448
  });
4894
5449
  var PrimeButtonFieldSchema = BaseFieldDefSchema.extend({
4895
- type: z47.literal("button"),
4896
- event: z47.string().optional(),
4897
- eventArgs: z47.array(z47.union([z47.string(), z47.number(), z47.boolean(), z47.null(), z47.undefined()])).optional(),
5450
+ type: z48.literal("button"),
5451
+ event: z48.string().optional(),
5452
+ eventArgs: z48.array(z48.union([z48.string(), z48.number(), z48.boolean(), z48.null(), z48.undefined()])).optional(),
4898
5453
  props: PrimeButtonPropsSchema.optional(),
4899
5454
  logic: LogicArraySchema.optional()
4900
5455
  });
4901
5456
  var PrimeSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
4902
- type: z47.literal("submit"),
5457
+ type: z48.literal("submit"),
4903
5458
  props: PrimeButtonPropsSchema.optional(),
4904
5459
  logic: LogicArraySchema.optional()
4905
5460
  });
4906
5461
  var PrimeNextButtonFieldSchema = BaseFieldDefSchema.extend({
4907
- type: z47.literal("next"),
5462
+ type: z48.literal("next"),
4908
5463
  props: PrimeButtonPropsSchema.optional(),
4909
5464
  logic: LogicArraySchema.optional()
4910
5465
  });
4911
5466
  var PrimePreviousButtonFieldSchema = BaseFieldDefSchema.extend({
4912
- type: z47.literal("previous"),
5467
+ type: z48.literal("previous"),
4913
5468
  props: PrimeButtonPropsSchema.optional()
4914
5469
  });
4915
5470
  var PrimeAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
4916
- type: z47.literal("addArrayItem"),
4917
- arrayKey: z47.string().optional(),
5471
+ type: z48.literal("addArrayItem"),
5472
+ arrayKey: z48.string().optional(),
4918
5473
  props: PrimeButtonPropsSchema.optional()
4919
5474
  });
4920
5475
  var PrimeRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
4921
- type: z47.literal("removeArrayItem"),
4922
- arrayKey: z47.string().optional(),
5476
+ type: z48.literal("removeArrayItem"),
5477
+ arrayKey: z48.string().optional(),
4923
5478
  props: PrimeButtonPropsSchema.optional()
4924
5479
  });
4925
5480
 
4926
5481
  // internal/dynamic-forms-zod/primeng/src/prime-leaf-field.schema.ts
4927
- import { z as z48 } from "zod";
4928
- var PrimeLeafFieldSchema = z48.discriminatedUnion("type", [
5482
+ import { z as z49 } from "zod";
5483
+ var PrimeLeafFieldSchema = z49.discriminatedUnion("type", [
4929
5484
  TextFieldSchema,
4930
5485
  HiddenFieldSchema,
4931
- PrimeInputFieldSchema,
5486
+ PrimeInputFieldSchemaObject,
4932
5487
  PrimeCheckboxFieldSchema,
4933
- PrimeRadioFieldSchema,
4934
- PrimeSelectFieldSchema,
4935
- PrimeMultiCheckboxFieldSchema,
4936
- PrimeDatepickerFieldSchema,
4937
- PrimeTextareaFieldSchema,
4938
- PrimeSliderFieldSchema,
5488
+ PrimeRadioFieldSchemaObject,
5489
+ PrimeSelectFieldSchemaObject,
5490
+ PrimeMultiCheckboxFieldSchemaObject,
5491
+ PrimeDatepickerFieldSchemaObject,
5492
+ PrimeTextareaFieldSchemaObject,
5493
+ PrimeSliderFieldSchemaObject,
4939
5494
  PrimeToggleFieldSchema,
4940
5495
  PrimeButtonFieldSchema,
4941
5496
  PrimeSubmitButtonFieldSchema,
@@ -4943,10 +5498,10 @@ var PrimeLeafFieldSchema = z48.discriminatedUnion("type", [
4943
5498
  PrimePreviousButtonFieldSchema,
4944
5499
  PrimeAddArrayItemButtonFieldSchema,
4945
5500
  PrimeRemoveArrayItemButtonFieldSchema
4946
- ]);
5501
+ ]).superRefine(nullableValueRefine);
4947
5502
 
4948
5503
  // internal/dynamic-forms-zod/primeng/src/prime-form-config.schema.ts
4949
- import { z as z49 } from "zod";
5504
+ import { z as z50 } from "zod";
4950
5505
  var containerSchemas3 = createContainerSchemas({
4951
5506
  leafFieldSchema: PrimeLeafFieldSchema
4952
5507
  });
@@ -4955,240 +5510,254 @@ var PrimeRowFieldSchema = containerSchemas3.RowFieldSchema;
4955
5510
  var PrimeGroupFieldSchema = containerSchemas3.GroupFieldSchema;
4956
5511
  var PrimeArrayFieldSchema = containerSchemas3.ArrayFieldSchema;
4957
5512
  var PrimeFieldSchema = containerSchemas3.AllFieldsSchema;
4958
- var PrimeFormDefaultPropsSchema = z49.object({
4959
- styleClass: z49.string().optional()
5513
+ var PrimeFormDefaultPropsSchema = z50.object({
5514
+ styleClass: z50.string().optional()
4960
5515
  });
4961
5516
  var PrimeFormConfigSchema = createFormConfigSchema(PrimeFieldSchema, PrimeFormDefaultPropsSchema);
4962
5517
 
4963
5518
  // internal/dynamic-forms-zod/ionic/src/props/index.ts
4964
- import { z as z50 } from "zod";
4965
- var IonicColorSchema = z50.enum(["primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", "dark"]);
4966
- var IonicLabelPlacementSchema = z50.enum(["start", "end", "fixed", "stacked", "floating"]);
4967
- var IonicJustifySchema = z50.enum(["start", "end", "space-between"]);
4968
- var IonicFillSchema = z50.enum(["solid", "outline", "clear", "default"]);
4969
- var IonicInputPropsSchema = z50.object({
4970
- fill: z50.enum(["solid", "outline"]).optional(),
4971
- shape: z50.literal("round").optional(),
5519
+ import { z as z51 } from "zod";
5520
+ var IonicColorSchema = z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", "dark"]);
5521
+ var IonicLabelPlacementSchema = z51.enum(["start", "end", "fixed", "stacked", "floating"]);
5522
+ var IonicJustifySchema = z51.enum(["start", "end", "space-between"]);
5523
+ var IonicFillSchema = z51.enum(["solid", "outline", "clear", "default"]);
5524
+ var IonicInputPropsSchema = z51.object({
5525
+ fill: z51.enum(["solid", "outline"]).optional(),
5526
+ shape: z51.literal("round").optional(),
4972
5527
  labelPlacement: IonicLabelPlacementSchema.optional(),
4973
5528
  color: IonicColorSchema.optional(),
4974
5529
  hint: DynamicTextSchema.optional(),
4975
5530
  errorText: DynamicTextSchema.optional(),
4976
- counter: z50.boolean().optional(),
4977
- maxlength: z50.number().positive().optional(),
4978
- clearInput: z50.boolean().optional(),
4979
- type: z50.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
5531
+ counter: z51.boolean().optional(),
5532
+ maxlength: z51.number().positive().optional(),
5533
+ clearInput: z51.boolean().optional(),
5534
+ type: z51.enum(["text", "email", "password", "number", "tel", "url"]).optional(),
4980
5535
  placeholder: DynamicTextSchema.optional()
4981
5536
  });
4982
- var IonicCheckboxPropsSchema = z50.object({
4983
- labelPlacement: z50.enum(["start", "end", "fixed", "stacked"]).optional(),
5537
+ var IonicCheckboxPropsSchema = z51.object({
5538
+ labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
4984
5539
  justify: IonicJustifySchema.optional(),
4985
- color: z50.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
4986
- indeterminate: z50.boolean().optional(),
5540
+ color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
5541
+ indeterminate: z51.boolean().optional(),
4987
5542
  hint: DynamicTextSchema.optional()
4988
5543
  });
4989
- var IonicRadioPropsSchema = z50.object({
4990
- labelPlacement: z50.enum(["start", "end", "fixed", "stacked"]).optional(),
5544
+ var IonicRadioPropsSchema = z51.object({
5545
+ labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
4991
5546
  justify: IonicJustifySchema.optional(),
4992
- color: z50.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
5547
+ color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
4993
5548
  hint: DynamicTextSchema.optional()
4994
5549
  });
4995
- var IonicTogglePropsSchema = z50.object({
4996
- labelPlacement: z50.enum(["start", "end", "fixed", "stacked"]).optional(),
5550
+ var IonicTogglePropsSchema = z51.object({
5551
+ labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
4997
5552
  justify: IonicJustifySchema.optional(),
4998
- color: z50.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
4999
- enableOnOffLabels: z50.boolean().optional(),
5553
+ color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
5554
+ enableOnOffLabels: z51.boolean().optional(),
5000
5555
  hint: DynamicTextSchema.optional()
5001
5556
  });
5002
- var IonicSliderPropsSchema = z50.object({
5003
- min: z50.number().optional(),
5004
- max: z50.number().optional(),
5005
- step: z50.number().positive().optional(),
5006
- dualKnobs: z50.boolean().optional(),
5007
- pin: z50.boolean().optional(),
5008
- ticks: z50.boolean().optional(),
5009
- snaps: z50.boolean().optional(),
5010
- color: z50.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
5011
- labelPlacement: z50.enum(["start", "end", "fixed", "stacked"]).optional(),
5557
+ var IonicSliderPropsSchema = z51.object({
5558
+ min: z51.number().optional(),
5559
+ max: z51.number().optional(),
5560
+ step: z51.number().positive().optional(),
5561
+ dualKnobs: z51.boolean().optional(),
5562
+ pin: z51.boolean().optional(),
5563
+ ticks: z51.boolean().optional(),
5564
+ snaps: z51.boolean().optional(),
5565
+ color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
5566
+ labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
5012
5567
  hint: DynamicTextSchema.optional()
5013
5568
  });
5014
- var IonicDatepickerPropsSchema = z50.object({
5015
- presentation: z50.enum(["date", "date-time", "time", "time-date", "month", "month-year", "year"]).optional(),
5016
- multiple: z50.boolean().optional(),
5017
- preferWheel: z50.boolean().optional(),
5018
- showDefaultButtons: z50.boolean().optional(),
5019
- showDefaultTitle: z50.boolean().optional(),
5020
- showDefaultTimeLabel: z50.boolean().optional(),
5021
- showClearButton: z50.boolean().optional(),
5022
- doneText: z50.string().optional(),
5023
- cancelText: z50.string().optional(),
5024
- size: z50.enum(["cover", "fixed"]).optional(),
5025
- color: z50.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
5569
+ var IonicDatepickerPropsSchema = z51.object({
5570
+ presentation: z51.enum(["date", "date-time", "time", "time-date", "month", "month-year", "year"]).optional(),
5571
+ multiple: z51.boolean().optional(),
5572
+ preferWheel: z51.boolean().optional(),
5573
+ showDefaultButtons: z51.boolean().optional(),
5574
+ showDefaultTitle: z51.boolean().optional(),
5575
+ showDefaultTimeLabel: z51.boolean().optional(),
5576
+ showClearButton: z51.boolean().optional(),
5577
+ doneText: z51.string().optional(),
5578
+ cancelText: z51.string().optional(),
5579
+ size: z51.enum(["cover", "fixed"]).optional(),
5580
+ color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
5026
5581
  hint: DynamicTextSchema.optional(),
5027
5582
  placeholder: DynamicTextSchema.optional()
5028
5583
  });
5029
- var IonicSelectPropsSchema = z50.object({
5030
- multiple: z50.boolean().optional(),
5031
- interface: z50.enum(["action-sheet", "popover", "alert"]).optional(),
5032
- cancelText: z50.string().optional(),
5033
- okText: z50.string().optional(),
5584
+ var IonicSelectPropsSchema = z51.object({
5585
+ multiple: z51.boolean().optional(),
5586
+ interface: z51.enum(["action-sheet", "popover", "alert"]).optional(),
5587
+ cancelText: z51.string().optional(),
5588
+ okText: z51.string().optional(),
5034
5589
  placeholder: DynamicTextSchema.optional(),
5035
- fill: z50.enum(["solid", "outline"]).optional(),
5036
- shape: z50.literal("round").optional(),
5590
+ fill: z51.enum(["solid", "outline"]).optional(),
5591
+ shape: z51.literal("round").optional(),
5037
5592
  labelPlacement: IonicLabelPlacementSchema.optional(),
5038
- color: z50.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
5593
+ color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
5039
5594
  hint: DynamicTextSchema.optional()
5040
5595
  });
5041
- var IonicTextareaPropsSchema = z50.object({
5042
- rows: z50.number().positive().optional(),
5043
- autoGrow: z50.boolean().optional(),
5044
- maxlength: z50.number().positive().optional(),
5045
- counter: z50.boolean().optional(),
5046
- fill: z50.enum(["solid", "outline"]).optional(),
5047
- shape: z50.literal("round").optional(),
5596
+ var IonicTextareaPropsSchema = z51.object({
5597
+ rows: z51.number().positive().optional(),
5598
+ autoGrow: z51.boolean().optional(),
5599
+ maxlength: z51.number().positive().optional(),
5600
+ counter: z51.boolean().optional(),
5601
+ fill: z51.enum(["solid", "outline"]).optional(),
5602
+ shape: z51.literal("round").optional(),
5048
5603
  labelPlacement: IonicLabelPlacementSchema.optional(),
5049
5604
  hint: DynamicTextSchema.optional(),
5050
5605
  errorText: DynamicTextSchema.optional(),
5051
5606
  color: IonicColorSchema.optional(),
5052
5607
  placeholder: DynamicTextSchema.optional()
5053
5608
  });
5054
- var IonicMultiCheckboxPropsSchema = z50.object({
5055
- labelPlacement: z50.enum(["start", "end", "fixed", "stacked"]).optional(),
5609
+ var IonicMultiCheckboxPropsSchema = z51.object({
5610
+ labelPlacement: z51.enum(["start", "end", "fixed", "stacked"]).optional(),
5056
5611
  justify: IonicJustifySchema.optional(),
5057
- color: z50.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
5612
+ color: z51.enum(["primary", "secondary", "tertiary", "success", "warning", "danger"]).optional(),
5058
5613
  hint: DynamicTextSchema.optional()
5059
5614
  });
5060
- var IonicButtonPropsSchema = z50.object({
5061
- expand: z50.enum(["full", "block"]).optional(),
5615
+ var IonicButtonPropsSchema = z51.object({
5616
+ expand: z51.enum(["full", "block"]).optional(),
5062
5617
  fill: IonicFillSchema.optional(),
5063
- shape: z50.literal("round").optional(),
5064
- size: z50.enum(["small", "default", "large"]).optional(),
5618
+ shape: z51.literal("round").optional(),
5619
+ size: z51.enum(["small", "default", "large"]).optional(),
5065
5620
  color: IonicColorSchema.optional(),
5066
- strong: z50.boolean().optional(),
5067
- type: z50.enum(["button", "submit", "reset"]).optional()
5621
+ strong: z51.boolean().optional(),
5622
+ type: z51.enum(["button", "submit", "reset"]).optional()
5068
5623
  });
5069
5624
 
5070
5625
  // internal/dynamic-forms-zod/ionic/src/fields/index.ts
5071
- import { z as z51 } from "zod";
5626
+ import { z as z52 } from "zod";
5072
5627
  var IonicValueFieldBase = BaseFieldDefSchema.merge(FieldWithValidationSchema);
5073
- var IonicInputFieldSchema = IonicValueFieldBase.extend({
5074
- type: z51.literal("input"),
5075
- value: z51.string().optional(),
5628
+ var IonicInputFieldSchemaObject = IonicValueFieldBase.extend({
5629
+ type: z52.literal("input"),
5630
+ nullable: z52.boolean().optional(),
5631
+ value: z52.string().nullable().optional(),
5076
5632
  placeholder: DynamicTextSchema.optional(),
5077
5633
  props: IonicInputPropsSchema.optional()
5078
5634
  });
5635
+ var IonicInputFieldSchema = IonicInputFieldSchemaObject.superRefine(nullableValueRefine);
5079
5636
  var IonicCheckboxFieldSchema = IonicValueFieldBase.extend({
5080
- type: z51.literal("checkbox"),
5081
- value: z51.boolean().optional(),
5637
+ type: z52.literal("checkbox"),
5638
+ value: z52.boolean().optional(),
5082
5639
  placeholder: DynamicTextSchema.optional(),
5083
5640
  props: IonicCheckboxPropsSchema.optional()
5084
5641
  });
5085
- var IonicRadioFieldSchema = IonicValueFieldBase.extend({
5086
- type: z51.literal("radio"),
5087
- value: z51.unknown().optional(),
5642
+ var IonicRadioFieldSchemaObject = IonicValueFieldBase.extend({
5643
+ type: z52.literal("radio"),
5644
+ nullable: z52.boolean().optional(),
5645
+ value: z52.unknown().nullable().optional(),
5088
5646
  placeholder: DynamicTextSchema.optional(),
5089
5647
  options: FieldOptionsSchema,
5090
5648
  props: IonicRadioPropsSchema.optional()
5091
5649
  });
5650
+ var IonicRadioFieldSchema = IonicRadioFieldSchemaObject.superRefine(nullableValueRefine);
5092
5651
  var IonicToggleFieldSchema = IonicValueFieldBase.extend({
5093
- type: z51.literal("toggle"),
5094
- value: z51.boolean().optional(),
5652
+ type: z52.literal("toggle"),
5653
+ value: z52.boolean().optional(),
5095
5654
  placeholder: DynamicTextSchema.optional(),
5096
5655
  props: IonicTogglePropsSchema.optional()
5097
5656
  });
5098
- var IonicSliderFieldSchema = IonicValueFieldBase.extend({
5099
- type: z51.literal("slider"),
5100
- value: z51.number().optional(),
5101
- minValue: z51.number().optional(),
5102
- maxValue: z51.number().optional(),
5103
- step: z51.number().positive().optional(),
5657
+ var IonicSliderFieldSchemaObject = IonicValueFieldBase.extend({
5658
+ type: z52.literal("slider"),
5659
+ nullable: z52.boolean().optional(),
5660
+ value: z52.number().nullable().optional(),
5661
+ minValue: z52.number().optional(),
5662
+ maxValue: z52.number().optional(),
5663
+ step: z52.number().positive().optional(),
5104
5664
  placeholder: DynamicTextSchema.optional(),
5105
5665
  props: IonicSliderPropsSchema.optional()
5106
5666
  });
5107
- var IonicDatepickerFieldSchema = IonicValueFieldBase.extend({
5108
- type: z51.literal("datepicker"),
5109
- value: z51.union([z51.string(), z51.null()]).optional(),
5110
- minDate: z51.union([z51.string(), z51.null()]).optional(),
5111
- maxDate: z51.union([z51.string(), z51.null()]).optional(),
5112
- startAt: z51.union([z51.string(), z51.null()]).optional(),
5667
+ var IonicSliderFieldSchema = IonicSliderFieldSchemaObject.superRefine(nullableValueRefine);
5668
+ var IonicDatepickerFieldSchemaObject = IonicValueFieldBase.extend({
5669
+ type: z52.literal("datepicker"),
5670
+ nullable: z52.boolean().optional(),
5671
+ value: z52.union([z52.string(), z52.null()]).optional(),
5672
+ minDate: z52.union([z52.string(), z52.null()]).optional(),
5673
+ maxDate: z52.union([z52.string(), z52.null()]).optional(),
5674
+ startAt: z52.union([z52.string(), z52.null()]).optional(),
5113
5675
  placeholder: DynamicTextSchema.optional(),
5114
5676
  props: IonicDatepickerPropsSchema.optional()
5115
5677
  });
5116
- var IonicSelectFieldSchema = IonicValueFieldBase.extend({
5117
- type: z51.literal("select"),
5118
- value: z51.unknown().optional(),
5678
+ var IonicDatepickerFieldSchema = IonicDatepickerFieldSchemaObject.superRefine(nullableValueRefine);
5679
+ var IonicSelectFieldSchemaObject = IonicValueFieldBase.extend({
5680
+ type: z52.literal("select"),
5681
+ nullable: z52.boolean().optional(),
5682
+ value: z52.unknown().nullable().optional(),
5119
5683
  placeholder: DynamicTextSchema.optional(),
5120
5684
  options: FieldOptionsSchema,
5121
5685
  props: IonicSelectPropsSchema.optional()
5122
5686
  });
5123
- var IonicTextareaFieldSchema = IonicValueFieldBase.extend({
5124
- type: z51.literal("textarea"),
5125
- value: z51.string().optional(),
5687
+ var IonicSelectFieldSchema = IonicSelectFieldSchemaObject.superRefine(nullableValueRefine);
5688
+ var IonicTextareaFieldSchemaObject = IonicValueFieldBase.extend({
5689
+ type: z52.literal("textarea"),
5690
+ nullable: z52.boolean().optional(),
5691
+ value: z52.string().nullable().optional(),
5126
5692
  placeholder: DynamicTextSchema.optional(),
5127
5693
  props: IonicTextareaPropsSchema.optional()
5128
5694
  });
5129
- var IonicMultiCheckboxFieldSchema = IonicValueFieldBase.extend({
5130
- type: z51.literal("multi-checkbox"),
5131
- value: z51.array(z51.unknown()).optional(),
5695
+ var IonicTextareaFieldSchema = IonicTextareaFieldSchemaObject.superRefine(nullableValueRefine);
5696
+ var IonicMultiCheckboxFieldSchemaObject = IonicValueFieldBase.extend({
5697
+ type: z52.literal("multi-checkbox"),
5698
+ nullable: z52.boolean().optional(),
5699
+ value: z52.array(z52.unknown()).nullable().optional(),
5132
5700
  placeholder: DynamicTextSchema.optional(),
5133
5701
  options: FieldOptionsSchema,
5134
5702
  props: IonicMultiCheckboxPropsSchema.optional()
5135
5703
  });
5704
+ var IonicMultiCheckboxFieldSchema = IonicMultiCheckboxFieldSchemaObject.superRefine(nullableValueRefine);
5136
5705
  var IonicButtonFieldSchema = BaseFieldDefSchema.extend({
5137
- type: z51.literal("button"),
5138
- event: z51.string().optional(),
5139
- eventArgs: z51.array(z51.union([z51.string(), z51.number(), z51.boolean(), z51.null(), z51.undefined()])).optional(),
5706
+ type: z52.literal("button"),
5707
+ event: z52.string().optional(),
5708
+ eventArgs: z52.array(z52.union([z52.string(), z52.number(), z52.boolean(), z52.null(), z52.undefined()])).optional(),
5140
5709
  props: IonicButtonPropsSchema.optional(),
5141
5710
  logic: LogicArraySchema.optional()
5142
5711
  });
5143
5712
  var IonicSubmitButtonFieldSchema = BaseFieldDefSchema.extend({
5144
- type: z51.literal("submit"),
5713
+ type: z52.literal("submit"),
5145
5714
  props: IonicButtonPropsSchema.optional(),
5146
5715
  logic: LogicArraySchema.optional()
5147
5716
  });
5148
5717
  var IonicNextButtonFieldSchema = BaseFieldDefSchema.extend({
5149
- type: z51.literal("next"),
5718
+ type: z52.literal("next"),
5150
5719
  props: IonicButtonPropsSchema.optional(),
5151
5720
  logic: LogicArraySchema.optional()
5152
5721
  });
5153
5722
  var IonicPreviousButtonFieldSchema = BaseFieldDefSchema.extend({
5154
- type: z51.literal("previous"),
5723
+ type: z52.literal("previous"),
5155
5724
  props: IonicButtonPropsSchema.optional()
5156
5725
  });
5157
5726
  var IonicAddArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
5158
- type: z51.literal("addArrayItem"),
5159
- arrayKey: z51.string().optional(),
5727
+ type: z52.literal("addArrayItem"),
5728
+ arrayKey: z52.string().optional(),
5160
5729
  props: IonicButtonPropsSchema.optional()
5161
5730
  });
5162
5731
  var IonicRemoveArrayItemButtonFieldSchema = BaseFieldDefSchema.extend({
5163
- type: z51.literal("removeArrayItem"),
5164
- arrayKey: z51.string().optional(),
5732
+ type: z52.literal("removeArrayItem"),
5733
+ arrayKey: z52.string().optional(),
5165
5734
  props: IonicButtonPropsSchema.optional()
5166
5735
  });
5167
5736
 
5168
5737
  // internal/dynamic-forms-zod/ionic/src/ionic-leaf-field.schema.ts
5169
- import { z as z52 } from "zod";
5170
- var IonicLeafFieldSchema = z52.discriminatedUnion("type", [
5738
+ import { z as z53 } from "zod";
5739
+ var IonicLeafFieldSchema = z53.discriminatedUnion("type", [
5171
5740
  TextFieldSchema,
5172
5741
  HiddenFieldSchema,
5173
- IonicInputFieldSchema,
5742
+ IonicInputFieldSchemaObject,
5174
5743
  IonicCheckboxFieldSchema,
5175
- IonicRadioFieldSchema,
5744
+ IonicRadioFieldSchemaObject,
5176
5745
  IonicToggleFieldSchema,
5177
- IonicSliderFieldSchema,
5178
- IonicDatepickerFieldSchema,
5179
- IonicSelectFieldSchema,
5180
- IonicTextareaFieldSchema,
5181
- IonicMultiCheckboxFieldSchema,
5746
+ IonicSliderFieldSchemaObject,
5747
+ IonicDatepickerFieldSchemaObject,
5748
+ IonicSelectFieldSchemaObject,
5749
+ IonicTextareaFieldSchemaObject,
5750
+ IonicMultiCheckboxFieldSchemaObject,
5182
5751
  IonicButtonFieldSchema,
5183
5752
  IonicSubmitButtonFieldSchema,
5184
5753
  IonicNextButtonFieldSchema,
5185
5754
  IonicPreviousButtonFieldSchema,
5186
5755
  IonicAddArrayItemButtonFieldSchema,
5187
5756
  IonicRemoveArrayItemButtonFieldSchema
5188
- ]);
5757
+ ]).superRefine(nullableValueRefine);
5189
5758
 
5190
5759
  // internal/dynamic-forms-zod/ionic/src/ionic-form-config.schema.ts
5191
- import { z as z53 } from "zod";
5760
+ import { z as z54 } from "zod";
5192
5761
  var containerSchemas4 = createContainerSchemas({
5193
5762
  leafFieldSchema: IonicLeafFieldSchema
5194
5763
  });
@@ -5197,7 +5766,7 @@ var IonicRowFieldSchema = containerSchemas4.RowFieldSchema;
5197
5766
  var IonicGroupFieldSchema = containerSchemas4.GroupFieldSchema;
5198
5767
  var IonicArrayFieldSchema = containerSchemas4.ArrayFieldSchema;
5199
5768
  var IonicFieldSchema = containerSchemas4.AllFieldsSchema;
5200
- var IonicFormDefaultPropsSchema = z53.object({
5769
+ var IonicFormDefaultPropsSchema = z54.object({
5201
5770
  color: IonicColorSchema.optional(),
5202
5771
  labelPlacement: IonicLabelPlacementSchema.optional()
5203
5772
  });
@@ -5972,6 +6541,110 @@ ${fieldTypes.map((ft) => `- ${ft}`).join("\n")}
5972
6541
  });
5973
6542
  }
5974
6543
 
6544
+ // packages/dynamic-form-mcp/src/resources/wrappers.resource.ts
6545
+ function registerWrappersResource(server) {
6546
+ server.resource("ng-forge Wrappers", "ng-forge://wrappers", async () => {
6547
+ const wrappers = getWrappers();
6548
+ return {
6549
+ contents: [
6550
+ {
6551
+ uri: "ng-forge://wrappers",
6552
+ mimeType: "application/json",
6553
+ text: JSON.stringify(
6554
+ {
6555
+ description: 'Available ng-forge field wrappers. Wrappers decorate the rendered output of a field or container without changing form data. Compose via `wrappers: [{ type: "...", ...props }]`.',
6556
+ categories: {
6557
+ core: "Ships from @ng-forge/dynamic-forms \u2014 always importable.",
6558
+ demo: "Ships from @internal/examples-shared-ui for the docs sandbox \u2014 NOT a library primitive.",
6559
+ adapter: "Ships from a UI adapter library (reserved)."
6560
+ },
6561
+ authoringContract: WRAPPER_AUTHORING_CONTRACT,
6562
+ wrappers: wrappers.map((w) => ({
6563
+ type: w.type,
6564
+ category: w.category,
6565
+ availability: w.availability,
6566
+ package: w.package,
6567
+ description: w.description,
6568
+ autoAppliesTo: w.autoAppliesTo
6569
+ }))
6570
+ },
6571
+ null,
6572
+ 2
6573
+ )
6574
+ }
6575
+ ]
6576
+ };
6577
+ });
6578
+ server.resource("Wrapper Details", "ng-forge://wrappers/{type}", async (uri) => {
6579
+ const match = uri.href.match(/ng-forge:\/\/wrappers\/(.+)/);
6580
+ const typeName = match?.[1];
6581
+ if (!typeName) {
6582
+ return {
6583
+ contents: [
6584
+ {
6585
+ uri: uri.href,
6586
+ mimeType: "text/plain",
6587
+ text: "Wrapper type not specified in URI"
6588
+ }
6589
+ ]
6590
+ };
6591
+ }
6592
+ const wrapper = getWrapper(typeName);
6593
+ if (!wrapper) {
6594
+ return {
6595
+ contents: [
6596
+ {
6597
+ uri: uri.href,
6598
+ mimeType: "text/plain",
6599
+ text: `Wrapper type '${typeName}' not found. Available types: ${getWrappers().map((w) => w.type).join(", ")}`
6600
+ }
6601
+ ]
6602
+ };
6603
+ }
6604
+ return {
6605
+ contents: [
6606
+ {
6607
+ uri: uri.href,
6608
+ mimeType: "application/json",
6609
+ text: JSON.stringify(wrapper, null, 2)
6610
+ }
6611
+ ]
6612
+ };
6613
+ });
6614
+ server.resource("Wrappers by Category", "ng-forge://wrappers/category/{category}", async (uri) => {
6615
+ const match = uri.href.match(/ng-forge:\/\/wrappers\/category\/(.+)/);
6616
+ const category = match?.[1];
6617
+ if (!category || !["core", "demo", "adapter"].includes(category)) {
6618
+ return {
6619
+ contents: [
6620
+ {
6621
+ uri: uri.href,
6622
+ mimeType: "text/plain",
6623
+ text: "Valid categories: core, demo, adapter"
6624
+ }
6625
+ ]
6626
+ };
6627
+ }
6628
+ const wrappers = getWrappersByCategory(category);
6629
+ return {
6630
+ contents: [
6631
+ {
6632
+ uri: uri.href,
6633
+ mimeType: "application/json",
6634
+ text: JSON.stringify(
6635
+ {
6636
+ category,
6637
+ wrappers
6638
+ },
6639
+ null,
6640
+ 2
6641
+ )
6642
+ }
6643
+ ]
6644
+ };
6645
+ });
6646
+ }
6647
+
5975
6648
  // packages/dynamic-form-mcp/src/resources/index.ts
5976
6649
  function registerResources(server) {
5977
6650
  registerInstructionsResource(server);
@@ -5979,22 +6652,24 @@ function registerResources(server) {
5979
6652
  registerFieldTypesResource(server);
5980
6653
  registerValidatorsResource(server);
5981
6654
  registerUIAdaptersResource(server);
6655
+ registerWrappersResource(server);
5982
6656
  registerDocumentationResource(server);
5983
6657
  registerSchemasResource(server);
5984
6658
  }
5985
6659
 
5986
6660
  // packages/dynamic-form-mcp/src/tools/lookup.tool.ts
5987
- import { z as z54 } from "zod";
6661
+ import { z as z55 } from "zod";
5988
6662
 
5989
6663
  // packages/dynamic-form-mcp/src/tools/data/lookup-topics.ts
5990
6664
  var TOPICS = {
5991
6665
  // ========== FIELD TYPES ==========
5992
6666
  input: {
5993
6667
  brief: `\`\`\`typescript
5994
- { key: 'email', type: 'input', label: 'Email', required: true, email: true, props: { type: 'email', placeholder: 'you@example.com' } }
6668
+ { key: 'email', type: 'input', label: 'Email', required: true, email: true, placeholder: 'you@example.com', props: { type: 'email' } }
5995
6669
  \`\`\`
5996
6670
  **Shorthand:** required, email, min, max, minLength, maxLength, pattern
5997
- **Props:** type (text|email|password|number|tel|url), placeholder, appearance (Material)`,
6671
+ **Field-level:** placeholder
6672
+ **Props:** type (text|email|password|number|tel|url), appearance (Material)`,
5998
6673
  full: `# Input Field
5999
6674
 
6000
6675
  \`\`\`typescript
@@ -6004,9 +6679,9 @@ var TOPICS = {
6004
6679
  label: 'Email',
6005
6680
  required: true,
6006
6681
  email: true,
6682
+ placeholder: 'you@example.com',
6007
6683
  props: {
6008
6684
  type: 'email', // 'text' | 'email' | 'password' | 'number' | 'tel' | 'url'
6009
- placeholder: 'you@example.com',
6010
6685
  appearance: 'outline' // Material: 'outline' | 'fill'
6011
6686
  }
6012
6687
  }
@@ -6014,7 +6689,8 @@ var TOPICS = {
6014
6689
 
6015
6690
  **Validation shorthand:** \`required\`, \`email\`, \`min\`, \`max\`, \`minLength\`, \`maxLength\`, \`pattern\`
6016
6691
 
6017
- **Props:** \`type\`, \`placeholder\`, \`appearance\` (Material), \`hint\` (Material)
6692
+ **Field-level:** \`placeholder\`
6693
+ **Props:** \`type\`, \`appearance\` (Material), \`hint\` (Material)
6018
6694
 
6019
6695
  **Value Type:** \`string | number\`
6020
6696
 
@@ -6022,7 +6698,7 @@ var TOPICS = {
6022
6698
  },
6023
6699
  select: {
6024
6700
  brief: `\`\`\`typescript
6025
- { key: 'country', type: 'select', label: 'Country', options: [{ label: 'USA', value: 'us' }], props: { placeholder: 'Choose...' } }
6701
+ { key: 'country', type: 'select', label: 'Country', placeholder: 'Choose...', options: [{ label: 'USA', value: 'us' }] }
6026
6702
  \`\`\`
6027
6703
  \u26A0\uFE0F **options at FIELD level, NOT in props!**`,
6028
6704
  full: `# Select Field
@@ -6037,8 +6713,8 @@ var TOPICS = {
6037
6713
  { label: 'USA', value: 'us' },
6038
6714
  { label: 'Canada', value: 'ca' }
6039
6715
  ],
6716
+ placeholder: 'Choose...',
6040
6717
  props: {
6041
- placeholder: 'Choose...',
6042
6718
  multiple: false // Allow multiple selection
6043
6719
  }
6044
6720
  }
@@ -6131,7 +6807,7 @@ For multiple selections, use **multi-checkbox** type.`,
6131
6807
  },
6132
6808
  textarea: {
6133
6809
  brief: `\`\`\`typescript
6134
- { key: 'bio', type: 'textarea', label: 'Bio', maxLength: 500, props: { rows: 4, placeholder: 'Tell us about yourself...' } }
6810
+ { key: 'bio', type: 'textarea', label: 'Bio', maxLength: 500, placeholder: 'Tell us about yourself...', props: { rows: 4 } }
6135
6811
  \`\`\``,
6136
6812
  full: `# Textarea Field
6137
6813
 
@@ -6141,9 +6817,9 @@ For multiple selections, use **multi-checkbox** type.`,
6141
6817
  type: 'textarea',
6142
6818
  label: 'Biography',
6143
6819
  maxLength: 500,
6820
+ placeholder: 'Tell us about yourself...',
6144
6821
  props: {
6145
6822
  rows: 4,
6146
- placeholder: 'Tell us about yourself...'
6147
6823
  }
6148
6824
  }
6149
6825
  \`\`\`
@@ -8051,18 +8727,33 @@ logic: [{ type: 'disabled', condition: 'formSubmitting' }]
8051
8727
  Copy-paste ready expressions for derivations and conditions.
8052
8728
 
8053
8729
  ## Age from Birthdate
8730
+ Complex calculations like age should use a custom function, not an expression:
8054
8731
  \`\`\`typescript
8055
- expression: \`(() => {
8056
- if (!formValue.birthDate) return '';
8057
- const birth = new Date(formValue.birthDate);
8058
- const today = new Date();
8059
- let age = today.getFullYear() - birth.getFullYear();
8060
- const monthDiff = today.getMonth() - birth.getMonth();
8061
- if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birth.getDate())) {
8062
- age--;
8063
- }
8064
- return age;
8065
- })()\`
8732
+ // In your FormConfig:
8733
+ {
8734
+ key: 'age',
8735
+ type: 'input',
8736
+ derivation: {
8737
+ type: 'custom',
8738
+ functionName: 'calculateAge',
8739
+ },
8740
+ }
8741
+
8742
+ // In customFnConfig:
8743
+ customFnConfig: {
8744
+ derivations: {
8745
+ calculateAge: (ctx) => {
8746
+ const birthDate = ctx.formValue().birthDate;
8747
+ if (!birthDate) return '';
8748
+ const birth = new Date(birthDate);
8749
+ const today = new Date();
8750
+ let age = today.getFullYear() - birth.getFullYear();
8751
+ const m = today.getMonth() - birth.getMonth();
8752
+ if (m < 0 || (m === 0 && today.getDate() < birth.getDate())) age--;
8753
+ return age;
8754
+ },
8755
+ },
8756
+ }
8066
8757
  \`\`\`
8067
8758
 
8068
8759
  ## Array Count / Length
@@ -8391,7 +9082,13 @@ var TOPIC_DESCRIPTIONS = {
8391
9082
  conditions: "Condition operators and types for logic rules",
8392
9083
  "common-expressions": "Frequently used derivation expressions (age, math, concatenation)",
8393
9084
  "type-narrowing": "TypeScript type safety with as const satisfies FormConfig",
8394
- workflow: "Recommended tool usage guide \u2014 start here"
9085
+ workflow: "Recommended tool usage guide \u2014 start here",
9086
+ // Wrappers
9087
+ wrappers: "Overview of the wrapper chain: how to apply, compose, and author wrappers",
9088
+ wrapper: "Overview of the wrapper chain (alias of `wrappers`)",
9089
+ css: "Built-in CSS wrapper \u2014 applies DynamicText class names to the host element",
9090
+ arraySection: "Demo wrapper \u2014 array card whose header owns the Add button (examples-shared-ui)",
9091
+ section: "Demo wrapper \u2014 titled card around any field or container (examples-shared-ui)"
8395
9092
  };
8396
9093
  var TOPIC_ALIASES = {
8397
9094
  // Field type aliases
@@ -8518,7 +9215,21 @@ var TOPIC_ALIASES = {
8518
9215
  // Workflow aliases
8519
9216
  "how-to": "workflow",
8520
9217
  guide: "workflow",
8521
- "getting-started": "workflow"
9218
+ "getting-started": "workflow",
9219
+ // Wrapper aliases
9220
+ wrapper: "wrappers",
9221
+ "field-wrapper": "wrappers",
9222
+ "field-wrappers": "wrappers",
9223
+ decorator: "wrappers",
9224
+ decorators: "wrappers",
9225
+ "wrapper-chain": "wrappers",
9226
+ "css-wrapper": "css",
9227
+ csswrapper: "css",
9228
+ cssclasses: "css",
9229
+ "array-section": "arraySection",
9230
+ arraysection: "arraySection",
9231
+ "section-wrapper": "section",
9232
+ sectionwrapper: "section"
8522
9233
  };
8523
9234
 
8524
9235
  // packages/dynamic-form-mcp/src/services/topic-mapper.ts
@@ -8615,6 +9326,7 @@ function formatTopicItem(key) {
8615
9326
  function getTopicList() {
8616
9327
  const fieldTypes = ["input", "select", "slider", "radio", "checkbox", "textarea", "datepicker", "toggle", "text", "hidden"];
8617
9328
  const containers = ["group", "row", "array", "simplified-array", "page"];
9329
+ const wrappers = ["wrappers", ...getWrappers().map((w) => w.type)];
8618
9330
  const concepts = [
8619
9331
  "validation",
8620
9332
  "validation-messages",
@@ -8650,6 +9362,9 @@ ${fieldTypes.map(formatTopicItem).join("\n")}
8650
9362
  ## Containers
8651
9363
  ${containers.map(formatTopicItem).join("\n")}
8652
9364
 
9365
+ ## Wrappers
9366
+ ${wrappers.map(formatTopicItem).join("\n")}
9367
+
8653
9368
  ## Concepts
8654
9369
  ${concepts.map(formatTopicItem).join("\n")}
8655
9370
 
@@ -8716,7 +9431,144 @@ function formatFieldInfoFull(field, uiFieldType) {
8716
9431
  lines.push("```");
8717
9432
  return lines.join("\n");
8718
9433
  }
9434
+ function formatWrapperInfo(wrapper) {
9435
+ const lines = [];
9436
+ lines.push(`# ${wrapper.type} wrapper`);
9437
+ lines.push("");
9438
+ lines.push(`**Category:** ${wrapper.category}`);
9439
+ lines.push(`**Availability:** ${wrapper.availability}`);
9440
+ lines.push(`**Package:** \`${wrapper.package}\``);
9441
+ lines.push(`**Component:** \`${wrapper.componentName}\``);
9442
+ lines.push(`**Description:** ${wrapper.description}`);
9443
+ if (wrapper.availability === "demo-only") {
9444
+ lines.push("");
9445
+ lines.push(
9446
+ "> **Note:** This is a demo wrapper that ships with the docs sandbox, not a library primitive. Use it as a pattern/template and author your own wrapper (or copy the component out of `internal/examples-shared-ui/src/lib/demo-wrappers/`) when adopting the idea in production."
9447
+ );
9448
+ }
9449
+ if (wrapper.autoAppliesTo.length > 0) {
9450
+ lines.push("");
9451
+ lines.push(`**Auto-applies to:** ${wrapper.autoAppliesTo.join(", ")}`);
9452
+ lines.push(
9453
+ "_(Injected automatically into these field types. Can be overridden via `FormConfig.defaultWrappers` or per-field `wrappers: [...]`; clear entirely with `wrappers: null`.)_"
9454
+ );
9455
+ } else {
9456
+ lines.push("");
9457
+ lines.push("**Auto-applies to:** _(none \u2014 opt-in via the field's `wrappers` array)_");
9458
+ }
9459
+ if (Object.keys(wrapper.props).length > 0) {
9460
+ lines.push("");
9461
+ lines.push("### Config Props");
9462
+ for (const prop of Object.values(wrapper.props)) {
9463
+ const req = prop.required ? " **(required)**" : "";
9464
+ const def = prop.default !== void 0 ? ` (default: ${JSON.stringify(prop.default)})` : "";
9465
+ lines.push(`- \`${prop.name}\`: ${prop.type}${req}${def} \u2014 ${prop.description}`);
9466
+ }
9467
+ } else {
9468
+ lines.push("");
9469
+ lines.push("### Config Props");
9470
+ lines.push("_(none \u2014 no configurable inputs on this wrapper)_");
9471
+ }
9472
+ if (wrapper.minimalExample) {
9473
+ lines.push("");
9474
+ lines.push("### Minimal Config");
9475
+ lines.push("```typescript");
9476
+ lines.push(wrapper.minimalExample);
9477
+ lines.push("```");
9478
+ }
9479
+ lines.push("");
9480
+ lines.push("### Full Example");
9481
+ lines.push("```typescript");
9482
+ lines.push(wrapper.example);
9483
+ lines.push("```");
9484
+ lines.push("");
9485
+ lines.push("### Authoring Contract");
9486
+ lines.push(wrapper.contract);
9487
+ return lines.join("\n");
9488
+ }
9489
+ function formatWrappersOverview() {
9490
+ const wrappers = getWrappers();
9491
+ const lines = [];
9492
+ lines.push("# Wrappers");
9493
+ lines.push("");
9494
+ lines.push(
9495
+ "Wrappers decorate the rendered output of a field (or container) without changing the form data structure. They are composed as a chain: each wrapper exposes a `#fieldComponent` `ViewContainerRef` slot where the next wrapper \u2014 or the field itself \u2014 is rendered."
9496
+ );
9497
+ lines.push("");
9498
+ lines.push("## Applying a wrapper");
9499
+ lines.push("");
9500
+ lines.push("```typescript");
9501
+ lines.push(`// Per-field wrapper chain (outer-most first)
9502
+ {
9503
+ key: 'email',
9504
+ type: 'input',
9505
+ label: 'Email',
9506
+ wrappers: [
9507
+ { type: 'section', title: 'Account' }, // outer
9508
+ { type: 'css', cssClasses: 'pad-lg' } // inner
9509
+ ]
9510
+ }
9511
+
9512
+ // Form-level defaults applied to every field
9513
+ const config = {
9514
+ defaultWrappers: [{ type: 'css', cssClasses: 'field-default' }],
9515
+ fields: [...]
9516
+ } as const satisfies FormConfig;
9517
+
9518
+ // Clear all wrappers on a specific field (overrides defaults + auto)
9519
+ { key: 'id', type: 'hidden', value: 'abc', wrappers: null }`);
9520
+ lines.push("```");
9521
+ lines.push("");
9522
+ lines.push("## Registered Wrappers");
9523
+ lines.push("");
9524
+ for (const w of wrappers) {
9525
+ const flag = w.availability === "demo-only" ? " _(demo-only)_" : "";
9526
+ lines.push(`- **${w.type}** (${w.category}, \`${w.package}\`)${flag} \u2014 ${w.description.split(".")[0]}.`);
9527
+ }
9528
+ lines.push("");
9529
+ lines.push('Use `ngforge_lookup topic="<name>"` for full details on any individual wrapper.');
9530
+ lines.push("");
9531
+ lines.push("## Authoring Contract");
9532
+ lines.push("");
9533
+ lines.push(wrappers[0]?.contract ?? "");
9534
+ return lines.join("\n");
9535
+ }
8719
9536
  async function resolveTopicContent(resolvedTopic, depth, uiIntegration) {
9537
+ if (resolvedTopic === "wrappers" || resolvedTopic === "wrapper") {
9538
+ if (depth === "brief") {
9539
+ const wrappers = getWrappers();
9540
+ return [
9541
+ "**Wrappers** decorate a field's rendered output without changing form data.",
9542
+ "",
9543
+ "Registered:",
9544
+ ...wrappers.map((w) => `- \`${w.type}\` (${w.category}${w.availability === "demo-only" ? ", demo-only" : ""})`),
9545
+ "",
9546
+ 'Use `wrappers: [{ type: "css", cssClasses: "..." }]` on any field. See `ngforge_lookup topic="wrappers"` for the full overview.'
9547
+ ].join("\n");
9548
+ }
9549
+ return formatWrappersOverview();
9550
+ }
9551
+ const wrapperInfo = getWrapper(resolvedTopic);
9552
+ if (wrapperInfo) {
9553
+ const formatted = formatWrapperInfo(wrapperInfo);
9554
+ if (depth === "brief") {
9555
+ const lines = [
9556
+ `# ${wrapperInfo.type} wrapper`,
9557
+ "",
9558
+ `${wrapperInfo.description.split(".")[0]}.`,
9559
+ "",
9560
+ "```typescript",
9561
+ wrapperInfo.minimalExample ?? `{ type: '${wrapperInfo.type}' }`,
9562
+ "```"
9563
+ ];
9564
+ if (wrapperInfo.availability === "demo-only") {
9565
+ lines.push("");
9566
+ lines.push(`**Demo-only** \u2014 ships from \`${wrapperInfo.package}\`, not \`@ng-forge/dynamic-forms\`.`);
9567
+ }
9568
+ return lines.join("\n");
9569
+ }
9570
+ return formatted;
9571
+ }
8720
9572
  if (depth === "brief") {
8721
9573
  const topicContent2 = TOPICS[resolvedTopic];
8722
9574
  if (topicContent2) {
@@ -8804,7 +9656,12 @@ var NEXT_STEPS = {
8804
9656
  "logic-matrix": '**Next:** `ngforge_lookup topic="conditional"` for condition syntax \xB7 `ngforge_lookup topic="derivation"` for derivation syntax',
8805
9657
  "field-placement": '**Next:** `ngforge_lookup topic="containers"` for container overview',
8806
9658
  conditions: '**Next:** `ngforge_lookup topic="conditional"` for full conditional logic docs \xB7 `ngforge_examples pattern="minimal-conditional"` for working example',
8807
- workflow: '**Next:** `ngforge_lookup topic="golden-path"` for form structure templates \xB7 `ngforge_examples pattern="complete"` for a full working example'
9659
+ workflow: '**Next:** `ngforge_lookup topic="golden-path"` for form structure templates \xB7 `ngforge_examples pattern="complete"` for a full working example',
9660
+ // Wrappers
9661
+ wrappers: '**Next:** `ngforge_lookup topic="css"` for the shipping CSS wrapper \xB7 `ngforge_lookup topic="section"` or `ngforge_lookup topic="arraySection"` for demo wrappers \xB7 `ngforge_examples pattern="wrapper-array-actions"` for a working array-section example',
9662
+ css: '**Next:** `ngforge_lookup topic="wrappers"` for the full wrapper overview \xB7 `ngforge_lookup topic="field-placement"` for where wrappers can apply',
9663
+ arraySection: '**Next:** `ngforge_lookup topic="wrappers"` for the wrapper overview \xB7 `ngforge_lookup topic="array"` for array field docs \xB7 `ngforge_lookup topic="array-buttons"` for the button-field alternative',
9664
+ section: '**Next:** `ngforge_lookup topic="wrappers"` for the wrapper overview \xB7 `ngforge_lookup topic="css"` for the shipping CSS wrapper'
8808
9665
  };
8809
9666
  function getNextSteps(topic) {
8810
9667
  return NEXT_STEPS[topic];
@@ -8825,6 +9682,8 @@ Field types: input, select, slider, radio, checkbox, textarea, datepicker, toggl
8825
9682
 
8826
9683
  Containers: group, row, array, simplified-array, page
8827
9684
 
9685
+ Wrappers: wrappers (overview), css (shipping), section, arraySection (demo-only)
9686
+
8828
9687
  Concepts: validation, conditional, derivation, property-derivation, options-format, expression-variables, async-validators
8829
9688
 
8830
9689
  Patterns: field-placement, logic-matrix, context-api, containers, multi-page-gotchas
@@ -8832,11 +9691,11 @@ Patterns: field-placement, logic-matrix, context-api, containers, multi-page-got
8832
9691
  Use topic="list" to see all available topics with descriptions.
8833
9692
  Use ngforge_search query="your question" to find topics by keyword.`,
8834
9693
  {
8835
- topic: z54.string().describe(
8836
- 'Topic to look up: field types (input, select, hidden, group, row, array, page), concepts (validation, conditional, derivation, property-derivation, options-format), patterns (golden-path, pitfalls, multi-page-gotchas), or "list" to see all topics'
9694
+ topic: z55.string().describe(
9695
+ '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'
8837
9696
  ),
8838
- depth: z54.enum(["brief", "full", "schema"]).default("full").describe("brief=quick syntax (~20 lines), full=complete docs with examples, schema=include JSON schema"),
8839
- uiIntegration: z54.enum(UI_INTEGRATIONS2).optional().describe("Filter UI-specific info (only with depth=schema). material, bootstrap, primeng, ionic")
9697
+ depth: z55.enum(["brief", "full", "schema"]).default("full").describe("brief=quick syntax (~20 lines), full=complete docs with examples, schema=include JSON schema"),
9698
+ uiIntegration: z55.enum(UI_INTEGRATIONS2).optional().describe("Filter UI-specific info (only with depth=schema). material, bootstrap, primeng, ionic")
8840
9699
  },
8841
9700
  async ({ topic, depth, uiIntegration }) => {
8842
9701
  const normalizedTopic = topic.toLowerCase().trim();
@@ -8884,7 +9743,7 @@ ${nextSteps}`;
8884
9743
  }
8885
9744
 
8886
9745
  // packages/dynamic-form-mcp/src/tools/examples.tool.ts
8887
- import { z as z55 } from "zod";
9746
+ import { z as z56 } from "zod";
8888
9747
  var PATTERNS = {
8889
9748
  // ========== MINIMAL PATTERNS (NEW) ==========
8890
9749
  "minimal-multipage": {
@@ -10867,7 +11726,7 @@ const megaFormConfig = {
10867
11726
  { key: 'pageHeader', type: 'text', label: 'All Field Types Demo', props: { elementType: 'h1' } },
10868
11727
 
10869
11728
  // TEXT INPUTS
10870
- { key: 'textInput', type: 'input', label: 'Text Input', props: { placeholder: 'Type here' } },
11729
+ { key: 'textInput', type: 'input', label: 'Text Input', placeholder: 'Type here' },
10871
11730
  { key: 'emailInput', type: 'input', label: 'Email', email: true, props: { type: 'email' } },
10872
11731
  { key: 'passwordInput', type: 'input', label: 'Password', minLength: 8, props: { type: 'password' } },
10873
11732
  { key: 'numberInput', type: 'input', label: 'Number', min: 0, max: 100, props: { type: 'number' } },
@@ -11110,10 +11969,10 @@ Standard patterns: derivation, property-derivation, multi-page, conditional, val
11110
11969
  Use pattern="list" to see all available patterns.
11111
11970
  Use depth="minimal" for code-only output (no markdown).`,
11112
11971
  {
11113
- pattern: z55.string().optional().describe(
11972
+ pattern: z56.string().optional().describe(
11114
11973
  '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.'
11115
11974
  ),
11116
- depth: z55.enum(["minimal", "brief", "full", "explained"]).default("full").describe(
11975
+ depth: z56.enum(["minimal", "brief", "full", "explained"]).default("full").describe(
11117
11976
  "minimal=code only (~20-50 lines), brief=code+summary, full=code+comments (default), explained=code+detailed explanation"
11118
11977
  )
11119
11978
  },
@@ -11190,7 +12049,7 @@ function extractCode(markdown) {
11190
12049
  }
11191
12050
 
11192
12051
  // packages/dynamic-form-mcp/src/tools/validate.tool.ts
11193
- import { z as z56 } from "zod";
12052
+ import { z as z57 } from "zod";
11194
12053
  import { readFile } from "fs/promises";
11195
12054
 
11196
12055
  // packages/dynamic-form-mcp/src/utils/ast-extractor.ts
@@ -11804,10 +12663,10 @@ Example errors you'll see:
11804
12663
  - "options MUST be at FIELD level, NOT inside props"
11805
12664
  - "containers only support 'hidden' logic type"`,
11806
12665
  {
11807
- config: z56.union([z56.string(), z56.object({}).passthrough()]).describe(
12666
+ config: z57.union([z57.string(), z57.object({}).passthrough()]).describe(
11808
12667
  "File path (.ts/.js) OR JSON string OR JSON object. Auto-detects: paths ending in .ts/.js or starting with / are treated as files."
11809
12668
  ),
11810
- uiIntegration: z56.enum(UI_INTEGRATIONS3).default("material").describe("UI library to validate against (material, bootstrap, primeng, ionic). Defaults to material.")
12669
+ uiIntegration: z57.enum(UI_INTEGRATIONS3).default("material").describe("UI library to validate against (material, bootstrap, primeng, ionic). Defaults to material.")
11811
12670
  },
11812
12671
  async ({ config, uiIntegration }) => {
11813
12672
  try {
@@ -11913,7 +12772,7 @@ If validating JSON, ensure:
11913
12772
  }
11914
12773
 
11915
12774
  // packages/dynamic-form-mcp/src/tools/scaffold.tool.ts
11916
- import { z as z57 } from "zod";
12775
+ import { z as z58 } from "zod";
11917
12776
  var UI_INTEGRATIONS4 = ["material", "bootstrap", "primeng", "ionic"];
11918
12777
  function parseFieldDefs(fields) {
11919
12778
  return fields.map((f) => {
@@ -12168,12 +13027,12 @@ Examples:
12168
13027
  - With groups: pages=0 groups=["address","billing"]
12169
13028
  - With hidden: hidden=["userId:abc123","source:web"]`,
12170
13029
  {
12171
- pages: z57.number().min(0).max(10).default(0).describe("Number of pages (0 = single-page form, 1-10 = multi-page wizard)"),
12172
- arrays: z57.array(z57.string()).optional().describe('Array field names for dynamic lists, e.g., ["contacts", "addresses"]'),
12173
- groups: z57.array(z57.string()).optional().describe('Group field names for nested objects, e.g., ["address", "billing"]'),
12174
- hidden: z57.array(z57.string()).optional().describe('Hidden fields as "name:value" pairs, e.g., ["userId:abc", "version:1"]'),
12175
- fields: z57.array(z57.string()).optional().describe('Basic fields as "name:type" pairs, e.g., ["email:input", "country:select", "age:slider"]'),
12176
- uiIntegration: z57.enum(UI_INTEGRATIONS4).default("material").describe("UI library (for future UI-specific props). Defaults to material.")
13030
+ pages: z58.number().min(0).max(10).default(0).describe("Number of pages (0 = single-page form, 1-10 = multi-page wizard)"),
13031
+ arrays: z58.array(z58.string()).optional().describe('Array field names for dynamic lists, e.g., ["contacts", "addresses"]'),
13032
+ groups: z58.array(z58.string()).optional().describe('Group field names for nested objects, e.g., ["address", "billing"]'),
13033
+ hidden: z58.array(z58.string()).optional().describe('Hidden fields as "name:value" pairs, e.g., ["userId:abc", "version:1"]'),
13034
+ fields: z58.array(z58.string()).optional().describe('Basic fields as "name:type" pairs, e.g., ["email:input", "country:select", "age:slider"]'),
13035
+ uiIntegration: z58.enum(UI_INTEGRATIONS4).default("material").describe("UI library (for future UI-specific props). Defaults to material.")
12177
13036
  },
12178
13037
  async ({ pages, arrays = [], groups = [], hidden = [], fields = [] }) => {
12179
13038
  const fieldDefs = parseFieldDefs(fields);
@@ -12215,7 +13074,7 @@ Examples:
12215
13074
  }
12216
13075
 
12217
13076
  // packages/dynamic-form-mcp/src/tools/search.tool.ts
12218
- import { z as z58 } from "zod";
13077
+ import { z as z59 } from "zod";
12219
13078
  var searchIndex = null;
12220
13079
  function getTopicSubcategory(key) {
12221
13080
  const fieldTypes = ["input", "select", "slider", "radio", "checkbox", "textarea", "datepicker", "toggle", "text", "hidden"];
@@ -12270,6 +13129,18 @@ function buildIndex() {
12270
13129
  toolCall: `ngforge_examples pattern="${key}"`
12271
13130
  });
12272
13131
  }
13132
+ for (const wrapper of getWrappers()) {
13133
+ const subcategory = wrapper.availability === "demo-only" ? `Wrapper (demo, ${wrapper.category})` : `Wrapper (${wrapper.category})`;
13134
+ entries.push({
13135
+ id: wrapper.type,
13136
+ category: "wrapper",
13137
+ subcategory,
13138
+ description: wrapper.description,
13139
+ aliases: [],
13140
+ content: `${wrapper.type} wrapper ${wrapper.description} ${wrapper.package}`.toLowerCase(),
13141
+ toolCall: `ngforge_lookup topic="${wrapper.type}"`
13142
+ });
13143
+ }
12273
13144
  searchIndex = entries;
12274
13145
  return entries;
12275
13146
  }
@@ -12312,7 +13183,7 @@ Try broader terms or check available topics:
12312
13183
  const lines = ["# Search Results", ""];
12313
13184
  for (let i = 0; i < results.length; i++) {
12314
13185
  const { entry } = results[i];
12315
- const categoryLabel = entry.category === "topic" ? `Topic \xB7 ${entry.subcategory}` : `Example \xB7 ${entry.subcategory}`;
13186
+ const categoryLabel = entry.category === "topic" ? `Topic \xB7 ${entry.subcategory}` : entry.category === "wrapper" ? entry.subcategory : `Example \xB7 ${entry.subcategory}`;
12316
13187
  lines.push(`${i + 1}. **${entry.id}** (${categoryLabel})`);
12317
13188
  lines.push(` ${entry.description}`);
12318
13189
  lines.push(` \u2192 \`${entry.toolCall}\``);
@@ -12339,7 +13210,7 @@ Use this when you don't know the exact topic name.
12339
13210
 
12340
13211
  New to ng-forge? Start with: ngforge_lookup topic="workflow"`,
12341
13212
  {
12342
- query: z58.string().describe("Natural language or keywords to search for")
13213
+ query: z59.string().describe("Natural language or keywords to search for")
12343
13214
  },
12344
13215
  async ({ query }) => {
12345
13216
  const index = buildIndex();