@kubuild/components 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/dist/blocks/forms.d.ts +6 -0
  2. package/dist/blocks/forms.d.ts.map +1 -0
  3. package/dist/blocks/index.cjs +1661 -0
  4. package/dist/blocks/index.cjs.map +1 -0
  5. package/dist/blocks/index.d.ts +11 -0
  6. package/dist/blocks/index.d.ts.map +1 -0
  7. package/dist/blocks/index.js +15 -0
  8. package/dist/blocks/index.js.map +1 -0
  9. package/dist/blocks/layout.d.ts +6 -0
  10. package/dist/blocks/layout.d.ts.map +1 -0
  11. package/dist/blocks/sections.d.ts +6 -0
  12. package/dist/blocks/sections.d.ts.map +1 -0
  13. package/dist/{blocks.d.ts → blocks/types.d.ts} +2 -5
  14. package/dist/blocks/types.d.ts.map +1 -0
  15. package/dist/chunk-JTQ35OQQ.js +1631 -0
  16. package/dist/chunk-JTQ35OQQ.js.map +1 -0
  17. package/dist/chunk-K6I6U7F3.js +2707 -0
  18. package/dist/chunk-K6I6U7F3.js.map +1 -0
  19. package/dist/chunk-OK53DS7G.js +911 -0
  20. package/dist/chunk-OK53DS7G.js.map +1 -0
  21. package/dist/definitions/constants.d.ts +10 -0
  22. package/dist/definitions/constants.d.ts.map +1 -0
  23. package/dist/definitions/data/collection.d.ts +3 -0
  24. package/dist/definitions/data/collection.d.ts.map +1 -0
  25. package/dist/definitions/data/index.d.ts +4 -0
  26. package/dist/definitions/data/index.d.ts.map +1 -0
  27. package/dist/definitions/data/list.d.ts +4 -0
  28. package/dist/definitions/data/list.d.ts.map +1 -0
  29. package/dist/definitions/data/table.d.ts +5 -0
  30. package/dist/definitions/data/table.d.ts.map +1 -0
  31. package/dist/definitions/form/button.d.ts +4 -0
  32. package/dist/definitions/form/button.d.ts.map +1 -0
  33. package/dist/definitions/form/checkbox.d.ts +3 -0
  34. package/dist/definitions/form/checkbox.d.ts.map +1 -0
  35. package/dist/definitions/form/file-upload.d.ts +3 -0
  36. package/dist/definitions/form/file-upload.d.ts.map +1 -0
  37. package/dist/definitions/form/form.d.ts +3 -0
  38. package/dist/definitions/form/form.d.ts.map +1 -0
  39. package/dist/definitions/form/index.d.ts +10 -0
  40. package/dist/definitions/form/index.d.ts.map +1 -0
  41. package/dist/definitions/form/input.d.ts +3 -0
  42. package/dist/definitions/form/input.d.ts.map +1 -0
  43. package/dist/definitions/form/radio.d.ts +5 -0
  44. package/dist/definitions/form/radio.d.ts.map +1 -0
  45. package/dist/definitions/form/select.d.ts +3 -0
  46. package/dist/definitions/form/select.d.ts.map +1 -0
  47. package/dist/definitions/form/switch.d.ts +3 -0
  48. package/dist/definitions/form/switch.d.ts.map +1 -0
  49. package/dist/definitions/form/textarea.d.ts +3 -0
  50. package/dist/definitions/form/textarea.d.ts.map +1 -0
  51. package/dist/definitions/index.cjs +3512 -0
  52. package/dist/definitions/index.cjs.map +1 -0
  53. package/dist/definitions/index.d.ts +12 -0
  54. package/dist/definitions/index.d.ts.map +1 -0
  55. package/dist/definitions/index.js +90 -0
  56. package/dist/definitions/index.js.map +1 -0
  57. package/dist/definitions/interactive/collapsible.d.ts +3 -0
  58. package/dist/definitions/interactive/collapsible.d.ts.map +1 -0
  59. package/dist/definitions/interactive/drawer.d.ts +3 -0
  60. package/dist/definitions/interactive/drawer.d.ts.map +1 -0
  61. package/dist/definitions/interactive/index.d.ts +4 -0
  62. package/dist/definitions/interactive/index.d.ts.map +1 -0
  63. package/dist/definitions/interactive/modal.d.ts +3 -0
  64. package/dist/definitions/interactive/modal.d.ts.map +1 -0
  65. package/dist/definitions/layout/columns.d.ts +3 -0
  66. package/dist/definitions/layout/columns.d.ts.map +1 -0
  67. package/dist/definitions/layout/container.d.ts +3 -0
  68. package/dist/definitions/layout/container.d.ts.map +1 -0
  69. package/dist/definitions/layout/flex.d.ts +7 -0
  70. package/dist/definitions/layout/flex.d.ts.map +1 -0
  71. package/dist/definitions/layout/grid.d.ts +7 -0
  72. package/dist/definitions/layout/grid.d.ts.map +1 -0
  73. package/dist/definitions/layout/index.d.ts +7 -0
  74. package/dist/definitions/layout/index.d.ts.map +1 -0
  75. package/dist/definitions/layout/page.d.ts +3 -0
  76. package/dist/definitions/layout/page.d.ts.map +1 -0
  77. package/dist/definitions/layout/section.d.ts +3 -0
  78. package/dist/definitions/layout/section.d.ts.map +1 -0
  79. package/dist/definitions/media/html-embed.d.ts +3 -0
  80. package/dist/definitions/media/html-embed.d.ts.map +1 -0
  81. package/dist/definitions/media/icon.d.ts +3 -0
  82. package/dist/definitions/media/icon.d.ts.map +1 -0
  83. package/dist/definitions/media/image.d.ts +3 -0
  84. package/dist/definitions/media/image.d.ts.map +1 -0
  85. package/dist/definitions/media/index.d.ts +5 -0
  86. package/dist/definitions/media/index.d.ts.map +1 -0
  87. package/dist/definitions/media/video.d.ts +3 -0
  88. package/dist/definitions/media/video.d.ts.map +1 -0
  89. package/dist/definitions/types.d.ts +5 -0
  90. package/dist/definitions/types.d.ts.map +1 -0
  91. package/dist/definitions/typography/badge.d.ts +3 -0
  92. package/dist/definitions/typography/badge.d.ts.map +1 -0
  93. package/dist/definitions/typography/blockquote.d.ts +3 -0
  94. package/dist/definitions/typography/blockquote.d.ts.map +1 -0
  95. package/dist/definitions/typography/code-block.d.ts +3 -0
  96. package/dist/definitions/typography/code-block.d.ts.map +1 -0
  97. package/dist/definitions/typography/heading.d.ts +3 -0
  98. package/dist/definitions/typography/heading.d.ts.map +1 -0
  99. package/dist/definitions/typography/index.d.ts +8 -0
  100. package/dist/definitions/typography/index.d.ts.map +1 -0
  101. package/dist/definitions/typography/link.d.ts +3 -0
  102. package/dist/definitions/typography/link.d.ts.map +1 -0
  103. package/dist/definitions/typography/paragraph.d.ts +3 -0
  104. package/dist/definitions/typography/paragraph.d.ts.map +1 -0
  105. package/dist/definitions/typography/text.d.ts +3 -0
  106. package/dist/definitions/typography/text.d.ts.map +1 -0
  107. package/dist/index.cjs +1568 -814
  108. package/dist/index.cjs.map +1 -1
  109. package/dist/index.js +120 -4332
  110. package/dist/index.js.map +1 -1
  111. package/dist/traits/common.d.ts +8 -0
  112. package/dist/traits/common.d.ts.map +1 -0
  113. package/dist/{traits.d.ts → traits/form.d.ts} +2 -109
  114. package/dist/traits/form.d.ts.map +1 -0
  115. package/dist/traits/index.cjs +998 -0
  116. package/dist/traits/index.cjs.map +1 -0
  117. package/dist/traits/index.d.ts +7 -0
  118. package/dist/traits/index.d.ts.map +1 -0
  119. package/dist/traits/index.js +129 -0
  120. package/dist/traits/index.js.map +1 -0
  121. package/dist/traits/link.d.ts +8 -0
  122. package/dist/traits/link.d.ts.map +1 -0
  123. package/dist/traits/media.d.ts +18 -0
  124. package/dist/traits/media.d.ts.map +1 -0
  125. package/dist/traits/structure.d.ts +10 -0
  126. package/dist/traits/structure.d.ts.map +1 -0
  127. package/dist/traits/types.d.ts +69 -0
  128. package/dist/traits/types.d.ts.map +1 -0
  129. package/package.json +20 -4
  130. package/dist/blocks.d.ts.map +0 -1
  131. package/dist/definitions.d.ts +0 -37
  132. package/dist/definitions.d.ts.map +0 -1
  133. package/dist/traits.d.ts.map +0 -1
package/dist/index.cjs CHANGED
@@ -18,12 +18,17 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
20
  // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ CONTENT_CHILD_TYPES: () => CONTENT_CHILD_TYPES,
23
24
  ComponentRegistry: () => ComponentRegistry,
25
+ FORM_STARTER_BLOCKS: () => FORM_STARTER_BLOCKS,
26
+ LAYOUT_PARENTS: () => LAYOUT_PARENTS,
27
+ LAYOUT_STARTER_BLOCKS: () => LAYOUT_STARTER_BLOCKS,
24
28
  STARTER_BLOCKS: () => STARTER_BLOCKS,
25
29
  TRAIT_GROUP_LABELS: () => TRAIT_GROUP_LABELS,
26
30
  TRAIT_GROUP_ORDER: () => TRAIT_GROUP_ORDER,
31
+ UI_STARTER_BLOCKS: () => UI_STARTER_BLOCKS,
27
32
  acceptTrait: () => acceptTrait,
28
33
  actionTrait: () => actionTrait,
29
34
  altTrait: () => altTrait,
@@ -41,6 +46,7 @@ __export(index_exports, {
41
46
  citeTrait: () => citeTrait,
42
47
  codeBlockDefinition: () => codeBlockDefinition,
43
48
  colSpanTrait: () => colSpanTrait,
49
+ collapsibleDefinition: () => collapsibleDefinition,
44
50
  collectTraitNames: () => collectTraitNames,
45
51
  collectionDefinition: () => collectionDefinition,
46
52
  columnsDefinition: () => columnsDefinition,
@@ -49,13 +55,17 @@ __export(index_exports, {
49
55
  coreComponentDefinitions: () => coreComponentDefinitions,
50
56
  createDefaultComponentRegistry: () => createDefaultComponentRegistry,
51
57
  defaultCheckedTrait: () => defaultCheckedTrait,
58
+ defaultGenId: () => defaultGenId,
52
59
  defaultSelectedTrait: () => defaultSelectedTrait,
53
60
  defaultValueTrait: () => defaultValueTrait,
54
61
  disabledTrait: () => disabledTrait,
62
+ drawerDefinition: () => drawerDefinition,
55
63
  extractComponentRequirements: () => extractComponentRequirements,
56
64
  fieldNameTrait: () => fieldNameTrait,
57
65
  fileUploadDefinition: () => fileUploadDefinition,
66
+ flexDefinition: () => flexDefinition,
58
67
  formDefinition: () => formDefinition,
68
+ gridDefinition: () => gridDefinition,
59
69
  headingDefinition: () => headingDefinition,
60
70
  helperTextTrait: () => helperTextTrait,
61
71
  hrefTrait: () => hrefTrait,
@@ -79,6 +89,7 @@ __export(index_exports, {
79
89
  maxLengthTrait: () => maxLengthTrait,
80
90
  methodTrait: () => methodTrait,
81
91
  minLengthTrait: () => minLengthTrait,
92
+ modalDefinition: () => modalDefinition,
82
93
  multipleTrait: () => multipleTrait,
83
94
  mutedTrait: () => mutedTrait,
84
95
  optionsListTrait: () => optionsListTrait,
@@ -120,9 +131,10 @@ __export(index_exports, {
120
131
  textareaDefinition: () => textareaDefinition,
121
132
  titleTrait: () => titleTrait,
122
133
  valueTrait: () => valueTrait,
123
- videoDefinition: () => videoDefinition
134
+ videoDefinition: () => videoDefinition,
135
+ withOverrides: () => withOverrides
124
136
  });
125
- module.exports = __toCommonJS(index_exports);
137
+ module.exports = __toCommonJS(src_exports);
126
138
 
127
139
  // src/registry.ts
128
140
  var ComponentRegistry = class {
@@ -215,10 +227,7 @@ var ComponentRegistry = class {
215
227
  }
216
228
  };
217
229
 
218
- // src/definitions.ts
219
- var import_schema = require("@kubuild/schema");
220
-
221
- // src/traits.ts
230
+ // src/traits/types.ts
222
231
  var TRAIT_GROUP_ORDER = [
223
232
  "identity",
224
233
  "link",
@@ -240,64 +249,34 @@ var TRAIT_GROUP_LABELS = {
240
249
  function withOverrides(base, overrides) {
241
250
  return overrides ? { ...base, ...overrides } : base;
242
251
  }
243
- function hrefTrait(overrides) {
244
- return withOverrides(
245
- {
246
- name: "href",
247
- label: "Link URL",
248
- type: "string",
249
- defaultValue: "#",
250
- attribute: "href",
251
- group: "link",
252
- description: "The destination URL the element navigates to when activated."
253
- },
254
- overrides
255
- );
256
- }
257
- function targetTrait(overrides) {
258
- return withOverrides(
259
- {
260
- name: "target",
261
- label: "Open In",
262
- type: "select",
263
- defaultValue: "_self",
264
- attribute: "target",
265
- group: "link",
266
- options: [
267
- { label: "Same tab (_self)", value: "_self" },
268
- { label: "New tab (_blank)", value: "_blank" },
269
- { label: "Parent frame (_parent)", value: "_parent" },
270
- { label: "Top frame (_top)", value: "_top" }
271
- ],
272
- description: "Where the linked resource should open."
273
- },
274
- overrides
275
- );
252
+ function sortTraits(traits) {
253
+ const groupRank = (group) => {
254
+ if (!group) return Number.MAX_SAFE_INTEGER;
255
+ const idx = TRAIT_GROUP_ORDER.indexOf(group);
256
+ return idx === -1 ? Number.MAX_SAFE_INTEGER : idx;
257
+ };
258
+ return [...traits].sort((a, b) => groupRank(a.group) - groupRank(b.group));
276
259
  }
277
- function relTrait(overrides) {
278
- return withOverrides(
279
- {
280
- name: "rel",
281
- label: "Relationship (rel)",
282
- type: "string",
283
- defaultValue: "",
284
- attribute: "rel",
285
- group: "link",
286
- description: 'Space-separated relationship tokens (e.g. "noopener noreferrer").'
287
- },
288
- overrides
289
- );
260
+ function collectTraitNames(traitsList) {
261
+ const names = /* @__PURE__ */ new Set();
262
+ for (const traits of traitsList) {
263
+ for (const trait of traits) {
264
+ names.add(trait.name);
265
+ }
266
+ }
267
+ return Array.from(names);
290
268
  }
291
- function altTrait(overrides) {
269
+
270
+ // src/traits/common.ts
271
+ function idTrait(overrides) {
292
272
  return withOverrides(
293
273
  {
294
- name: "alt",
295
- label: "Alt Text",
274
+ name: "id",
275
+ label: "Element ID",
296
276
  type: "string",
297
- attribute: "alt",
298
- group: "accessibility",
299
- required: true,
300
- description: "Alternative text describing the media for screen readers and fallback."
277
+ attribute: "id",
278
+ group: "identity",
279
+ description: "A custom, document-unique identifier used for anchors, CSS, and scripting."
301
280
  },
302
281
  overrides
303
282
  );
@@ -315,19 +294,6 @@ function titleTrait(overrides) {
315
294
  overrides
316
295
  );
317
296
  }
318
- function placeholderTrait(overrides) {
319
- return withOverrides(
320
- {
321
- name: "placeholder",
322
- label: "Placeholder",
323
- type: "string",
324
- attribute: "placeholder",
325
- group: "form",
326
- description: "Hint text shown inside the control when it is empty."
327
- },
328
- overrides
329
- );
330
- }
331
297
  function ariaLabelTrait(overrides) {
332
298
  return withOverrides(
333
299
  {
@@ -341,75 +307,58 @@ function ariaLabelTrait(overrides) {
341
307
  overrides
342
308
  );
343
309
  }
344
- function idTrait(overrides) {
345
- return withOverrides(
346
- {
347
- name: "id",
348
- label: "Element ID",
349
- type: "string",
350
- attribute: "id",
351
- group: "identity",
352
- description: "A custom, document-unique identifier used for anchors, CSS, and scripting."
353
- },
354
- overrides
355
- );
356
- }
357
- function fieldNameTrait(overrides) {
310
+
311
+ // src/traits/link.ts
312
+ function hrefTrait(overrides) {
358
313
  return withOverrides(
359
314
  {
360
- name: "name",
361
- label: "Field Name",
315
+ name: "href",
316
+ label: "Link URL",
362
317
  type: "string",
363
- attribute: "name",
364
- group: "form",
365
- required: true,
366
- description: "The name submitted with the form data for this field."
367
- },
368
- overrides
369
- );
370
- }
371
- function requiredTrait(overrides) {
372
- return withOverrides(
373
- {
374
- name: "required",
375
- label: "Required",
376
- type: "boolean",
377
- defaultValue: false,
378
- attribute: "required",
379
- group: "form",
380
- description: "Whether the field must be filled before the form can be submitted."
318
+ defaultValue: "#",
319
+ attribute: "href",
320
+ group: "link",
321
+ description: "The destination URL the element navigates to when activated."
381
322
  },
382
323
  overrides
383
324
  );
384
325
  }
385
- function disabledTrait(overrides) {
326
+ function targetTrait(overrides) {
386
327
  return withOverrides(
387
328
  {
388
- name: "disabled",
389
- label: "Disabled",
390
- type: "boolean",
391
- defaultValue: false,
392
- attribute: "disabled",
393
- group: "behavior",
394
- description: "Disables the control so it cannot be focused or activated."
329
+ name: "target",
330
+ label: "Open In",
331
+ type: "select",
332
+ defaultValue: "_self",
333
+ attribute: "target",
334
+ group: "link",
335
+ options: [
336
+ { label: "Same tab (_self)", value: "_self" },
337
+ { label: "New tab (_blank)", value: "_blank" },
338
+ { label: "Parent frame (_parent)", value: "_parent" },
339
+ { label: "Top frame (_top)", value: "_top" }
340
+ ],
341
+ description: "Where the linked resource should open."
395
342
  },
396
343
  overrides
397
344
  );
398
345
  }
399
- function readOnlyTrait(overrides) {
346
+ function relTrait(overrides) {
400
347
  return withOverrides(
401
348
  {
402
- name: "readOnly",
403
- label: "Read Only",
404
- type: "boolean",
405
- defaultValue: false,
406
- attribute: "readonly",
407
- group: "behavior",
408
- description: "Prevents the user from modifying the control value."
349
+ name: "rel",
350
+ label: "Relationship (rel)",
351
+ type: "string",
352
+ defaultValue: "",
353
+ attribute: "rel",
354
+ group: "link",
355
+ description: 'Space-separated relationship tokens (e.g. "noopener noreferrer").'
409
356
  },
410
357
  overrides
411
358
  );
412
359
  }
360
+
361
+ // src/traits/media.ts
413
362
  function srcTrait(overrides) {
414
363
  return withOverrides(
415
364
  {
@@ -424,6 +373,20 @@ function srcTrait(overrides) {
424
373
  overrides
425
374
  );
426
375
  }
376
+ function altTrait(overrides) {
377
+ return withOverrides(
378
+ {
379
+ name: "alt",
380
+ label: "Alt Text",
381
+ type: "string",
382
+ attribute: "alt",
383
+ group: "accessibility",
384
+ required: true,
385
+ description: "Alternative text describing the media for screen readers and fallback."
386
+ },
387
+ overrides
388
+ );
389
+ }
427
390
  function posterTrait(overrides) {
428
391
  return withOverrides(
429
392
  {
@@ -493,19 +456,6 @@ function mutedTrait(overrides) {
493
456
  overrides
494
457
  );
495
458
  }
496
- function citeTrait(overrides) {
497
- return withOverrides(
498
- {
499
- name: "cite",
500
- label: "Citation URL (cite)",
501
- type: "string",
502
- attribute: "cite",
503
- group: "semantic",
504
- description: "The URL of the source document the quote is taken from."
505
- },
506
- overrides
507
- );
508
- }
509
459
  function loadingTrait(overrides) {
510
460
  return withOverrides(
511
461
  {
@@ -524,61 +474,188 @@ function loadingTrait(overrides) {
524
474
  overrides
525
475
  );
526
476
  }
527
- function actionTrait(overrides) {
477
+
478
+ // src/traits/structure.ts
479
+ function citeTrait(overrides) {
528
480
  return withOverrides(
529
481
  {
530
- name: "action",
531
- label: "Action URL",
482
+ name: "cite",
483
+ label: "Citation URL (cite)",
532
484
  type: "string",
533
- attribute: "action",
534
- group: "form",
535
- description: "The URL the form data is submitted to."
485
+ attribute: "cite",
486
+ group: "semantic",
487
+ description: "The URL of the source document the quote is taken from."
536
488
  },
537
489
  overrides
538
490
  );
539
491
  }
540
- function methodTrait(overrides) {
492
+ function colSpanTrait(overrides) {
541
493
  return withOverrides(
542
494
  {
543
- name: "method",
544
- label: "Method",
545
- type: "select",
546
- defaultValue: "POST",
547
- attribute: "method",
548
- group: "form",
549
- options: [
550
- { label: "POST", value: "POST" },
551
- { label: "GET", value: "GET" }
552
- ],
553
- description: "The HTTP method used to submit the form."
495
+ name: "colSpan",
496
+ label: "Column Span (colSpan)",
497
+ type: "number",
498
+ defaultValue: 1,
499
+ attribute: "colspan",
500
+ group: "semantic",
501
+ description: "The number of columns the cell spans."
554
502
  },
555
503
  overrides
556
504
  );
557
505
  }
558
- function autoCompleteTrait(overrides) {
506
+ function rowSpanTrait(overrides) {
559
507
  return withOverrides(
560
508
  {
561
- name: "autoComplete",
562
- label: "Auto Complete",
563
- type: "select",
564
- defaultValue: "on",
565
- attribute: "autocomplete",
566
- group: "form",
567
- options: [
568
- { label: "On", value: "on" },
569
- { label: "Off", value: "off" }
570
- ],
571
- description: "Whether the browser may autofill values for this form."
509
+ name: "rowSpan",
510
+ label: "Row Span (rowSpan)",
511
+ type: "number",
512
+ defaultValue: 1,
513
+ attribute: "rowspan",
514
+ group: "semantic",
515
+ description: "The number of rows the cell spans."
572
516
  },
573
517
  overrides
574
518
  );
575
519
  }
576
- function valueTrait(overrides) {
520
+ function tagTrait(overrides) {
577
521
  return withOverrides(
578
522
  {
579
- name: "value",
580
- label: "Value",
581
- type: "string",
523
+ name: "tag",
524
+ label: "HTML Tag",
525
+ type: "select",
526
+ attribute: "tag",
527
+ group: "semantic",
528
+ description: "The semantic HTML tag the component renders as."
529
+ },
530
+ overrides
531
+ );
532
+ }
533
+
534
+ // src/traits/form.ts
535
+ function placeholderTrait(overrides) {
536
+ return withOverrides(
537
+ {
538
+ name: "placeholder",
539
+ label: "Placeholder",
540
+ type: "string",
541
+ attribute: "placeholder",
542
+ group: "form",
543
+ description: "Hint text shown inside the control when it is empty."
544
+ },
545
+ overrides
546
+ );
547
+ }
548
+ function fieldNameTrait(overrides) {
549
+ return withOverrides(
550
+ {
551
+ name: "name",
552
+ label: "Field Name",
553
+ type: "string",
554
+ attribute: "name",
555
+ group: "form",
556
+ required: true,
557
+ description: "The name submitted with the form data for this field."
558
+ },
559
+ overrides
560
+ );
561
+ }
562
+ function requiredTrait(overrides) {
563
+ return withOverrides(
564
+ {
565
+ name: "required",
566
+ label: "Required",
567
+ type: "boolean",
568
+ defaultValue: false,
569
+ attribute: "required",
570
+ group: "form",
571
+ description: "Whether the field must be filled before the form can be submitted."
572
+ },
573
+ overrides
574
+ );
575
+ }
576
+ function disabledTrait(overrides) {
577
+ return withOverrides(
578
+ {
579
+ name: "disabled",
580
+ label: "Disabled",
581
+ type: "boolean",
582
+ defaultValue: false,
583
+ attribute: "disabled",
584
+ group: "behavior",
585
+ description: "Disables the control so it cannot be focused or activated."
586
+ },
587
+ overrides
588
+ );
589
+ }
590
+ function readOnlyTrait(overrides) {
591
+ return withOverrides(
592
+ {
593
+ name: "readOnly",
594
+ label: "Read Only",
595
+ type: "boolean",
596
+ defaultValue: false,
597
+ attribute: "readonly",
598
+ group: "behavior",
599
+ description: "Prevents the user from modifying the control value."
600
+ },
601
+ overrides
602
+ );
603
+ }
604
+ function actionTrait(overrides) {
605
+ return withOverrides(
606
+ {
607
+ name: "action",
608
+ label: "Action URL",
609
+ type: "string",
610
+ attribute: "action",
611
+ group: "form",
612
+ description: "The URL the form data is submitted to."
613
+ },
614
+ overrides
615
+ );
616
+ }
617
+ function methodTrait(overrides) {
618
+ return withOverrides(
619
+ {
620
+ name: "method",
621
+ label: "Method",
622
+ type: "select",
623
+ defaultValue: "POST",
624
+ attribute: "method",
625
+ group: "form",
626
+ options: [
627
+ { label: "POST", value: "POST" },
628
+ { label: "GET", value: "GET" }
629
+ ],
630
+ description: "The HTTP method used to submit the form."
631
+ },
632
+ overrides
633
+ );
634
+ }
635
+ function autoCompleteTrait(overrides) {
636
+ return withOverrides(
637
+ {
638
+ name: "autoComplete",
639
+ label: "Auto Complete",
640
+ type: "select",
641
+ defaultValue: "on",
642
+ attribute: "autocomplete",
643
+ group: "form",
644
+ options: [
645
+ { label: "On", value: "on" },
646
+ { label: "Off", value: "off" }
647
+ ],
648
+ description: "Whether the browser may autofill values for this form."
649
+ },
650
+ overrides
651
+ );
652
+ }
653
+ function valueTrait(overrides) {
654
+ return withOverrides(
655
+ {
656
+ name: "value",
657
+ label: "Value",
658
+ type: "string",
582
659
  attribute: "value",
583
660
  group: "form",
584
661
  description: "The value submitted with the form data when the control is selected."
@@ -627,47 +704,6 @@ function rowsTrait(overrides) {
627
704
  overrides
628
705
  );
629
706
  }
630
- function colSpanTrait(overrides) {
631
- return withOverrides(
632
- {
633
- name: "colSpan",
634
- label: "Column Span (colSpan)",
635
- type: "number",
636
- defaultValue: 1,
637
- attribute: "colspan",
638
- group: "semantic",
639
- description: "The number of columns the cell spans."
640
- },
641
- overrides
642
- );
643
- }
644
- function rowSpanTrait(overrides) {
645
- return withOverrides(
646
- {
647
- name: "rowSpan",
648
- label: "Row Span (rowSpan)",
649
- type: "number",
650
- defaultValue: 1,
651
- attribute: "rowspan",
652
- group: "semantic",
653
- description: "The number of rows the cell spans."
654
- },
655
- overrides
656
- );
657
- }
658
- function tagTrait(overrides) {
659
- return withOverrides(
660
- {
661
- name: "tag",
662
- label: "HTML Tag",
663
- type: "select",
664
- attribute: "tag",
665
- group: "semantic",
666
- description: "The semantic HTML tag the component renders as."
667
- },
668
- overrides
669
- );
670
- }
671
707
  function inputTypeTrait(overrides) {
672
708
  return withOverrides(
673
709
  {
@@ -1036,26 +1072,9 @@ function autoDisableOnSubmitTrait(overrides) {
1036
1072
  overrides
1037
1073
  );
1038
1074
  }
1039
- function sortTraits(traits) {
1040
- const groupRank = (group) => {
1041
- if (!group) return Number.MAX_SAFE_INTEGER;
1042
- const idx = TRAIT_GROUP_ORDER.indexOf(group);
1043
- return idx === -1 ? Number.MAX_SAFE_INTEGER : idx;
1044
- };
1045
- return [...traits].sort((a, b) => groupRank(a.group) - groupRank(b.group));
1046
- }
1047
- function collectTraitNames(traitsList) {
1048
- const names = /* @__PURE__ */ new Set();
1049
- for (const traits of traitsList) {
1050
- for (const trait of traits) {
1051
- names.add(trait.name);
1052
- }
1053
- }
1054
- return Array.from(names);
1055
- }
1056
1075
 
1057
- // src/definitions.ts
1058
- var LAYOUT_PARENTS = ["page", "section", "container", "columns"];
1076
+ // src/definitions/constants.ts
1077
+ var LAYOUT_PARENTS = ["page", "section", "container", "columns", "flex", "grid", "modal", "drawer", "collapsible"];
1059
1078
  var CONTENT_CHILD_TYPES = [
1060
1079
  "heading",
1061
1080
  "text",
@@ -1083,8 +1102,13 @@ var CONTENT_CHILD_TYPES = [
1083
1102
  "list",
1084
1103
  "table",
1085
1104
  "collection",
1086
- "custom"
1105
+ "custom",
1106
+ "modal",
1107
+ "drawer",
1108
+ "collapsible"
1087
1109
  ];
1110
+
1111
+ // src/definitions/layout/page.ts
1088
1112
  var pageDefinition = {
1089
1113
  type: "page",
1090
1114
  label: "Page",
@@ -1100,13 +1124,15 @@ var pageDefinition = {
1100
1124
  ],
1101
1125
  defaultStyles: { base: { minHeight: "100vh", backgroundColor: "#ffffff" } }
1102
1126
  };
1127
+
1128
+ // src/definitions/layout/section.ts
1103
1129
  var sectionDefinition = {
1104
1130
  type: "section",
1105
1131
  label: "Section",
1106
1132
  category: "layout",
1107
1133
  icon: "rows",
1108
1134
  acceptsChildren: true,
1109
- allowedChildren: ["container", "columns", ...CONTENT_CHILD_TYPES],
1135
+ allowedChildren: ["container", "columns", "flex", "grid", ...CONTENT_CHILD_TYPES],
1110
1136
  defaultProps: {},
1111
1137
  traits: [
1112
1138
  idTrait(),
@@ -1131,13 +1157,15 @@ var sectionDefinition = {
1131
1157
  }
1132
1158
  }
1133
1159
  };
1160
+
1161
+ // src/definitions/layout/container.ts
1134
1162
  var containerDefinition = {
1135
1163
  type: "container",
1136
1164
  label: "Container",
1137
1165
  category: "layout",
1138
1166
  icon: "box",
1139
1167
  acceptsChildren: true,
1140
- allowedChildren: ["columns", ...CONTENT_CHILD_TYPES],
1168
+ allowedChildren: ["columns", "flex", "grid", ...CONTENT_CHILD_TYPES],
1141
1169
  defaultProps: { maxWidth: "1200px" },
1142
1170
  traits: [
1143
1171
  idTrait()
@@ -1158,13 +1186,15 @@ var containerDefinition = {
1158
1186
  }
1159
1187
  }
1160
1188
  };
1189
+
1190
+ // src/definitions/layout/columns.ts
1161
1191
  var columnsDefinition = {
1162
1192
  type: "columns",
1163
1193
  label: "Columns",
1164
1194
  category: "layout",
1165
1195
  icon: "columns",
1166
1196
  acceptsChildren: true,
1167
- allowedChildren: ["container", ...CONTENT_CHILD_TYPES],
1197
+ allowedChildren: ["container", "flex", "grid", ...CONTENT_CHILD_TYPES],
1168
1198
  defaultProps: { columns: 2, gap: "16px" },
1169
1199
  traits: [
1170
1200
  idTrait()
@@ -1185,6 +1215,66 @@ var columnsDefinition = {
1185
1215
  }
1186
1216
  }
1187
1217
  };
1218
+
1219
+ // src/definitions/layout/flex.ts
1220
+ var flexDefinition = {
1221
+ type: "flex",
1222
+ label: "Flex",
1223
+ category: "layout",
1224
+ icon: "flex",
1225
+ acceptsChildren: true,
1226
+ allowedChildren: ["*"],
1227
+ disallowedParents: ["page"],
1228
+ defaultProps: {},
1229
+ traits: [
1230
+ idTrait(),
1231
+ ariaLabelTrait({ description: "Accessible name for the flex container." })
1232
+ ],
1233
+ defaultStyles: {
1234
+ base: {
1235
+ display: "flex",
1236
+ flexDirection: "column",
1237
+ gap: "16px"
1238
+ }
1239
+ }
1240
+ };
1241
+
1242
+ // src/definitions/layout/grid.ts
1243
+ var gridDefinition = {
1244
+ type: "grid",
1245
+ label: "Grid",
1246
+ category: "layout",
1247
+ icon: "grid",
1248
+ acceptsChildren: true,
1249
+ allowedChildren: ["*"],
1250
+ disallowedParents: ["page"],
1251
+ defaultProps: {
1252
+ columns: 3,
1253
+ gap: "16px"
1254
+ },
1255
+ traits: [
1256
+ idTrait(),
1257
+ ariaLabelTrait({ description: "Accessible name for the grid container." })
1258
+ ],
1259
+ defaultStyles: {
1260
+ base: {
1261
+ display: "grid",
1262
+ gridTemplateColumns: "repeat(3, minmax(0, 1fr))",
1263
+ gap: "16px"
1264
+ },
1265
+ tablet: {
1266
+ gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
1267
+ gap: "16px"
1268
+ },
1269
+ mobile: {
1270
+ gridTemplateColumns: "repeat(1, minmax(0, 1fr))",
1271
+ gap: "16px"
1272
+ }
1273
+ }
1274
+ };
1275
+
1276
+ // src/definitions/typography/heading.ts
1277
+ var import_schema = require("@kubuild/schema");
1188
1278
  var headingDefinition = {
1189
1279
  type: "heading",
1190
1280
  label: "Heading",
@@ -1226,6 +1316,9 @@ var headingDefinition = {
1226
1316
  }
1227
1317
  }
1228
1318
  };
1319
+
1320
+ // src/definitions/typography/text.ts
1321
+ var import_schema2 = require("@kubuild/schema");
1229
1322
  var textDefinition = {
1230
1323
  type: "text",
1231
1324
  label: "Text",
@@ -1242,7 +1335,7 @@ var textDefinition = {
1242
1335
  ariaLabelTrait()
1243
1336
  ],
1244
1337
  validateProps: (props) => {
1245
- if (!(0, import_schema.isVariableBinding)(props.content) && (typeof props.content !== "string" || props.content.trim().length === 0)) {
1338
+ if (!(0, import_schema2.isVariableBinding)(props.content) && (typeof props.content !== "string" || props.content.trim().length === 0)) {
1246
1339
  return ['Text requires a non-empty "content".'];
1247
1340
  }
1248
1341
  return true;
@@ -1255,453 +1348,189 @@ var textDefinition = {
1255
1348
  }
1256
1349
  }
1257
1350
  };
1258
- var imageDefinition = {
1259
- type: "image",
1260
- label: "Image",
1261
- category: "media",
1262
- icon: "image",
1351
+
1352
+ // src/definitions/typography/paragraph.ts
1353
+ var import_schema3 = require("@kubuild/schema");
1354
+ var paragraphDefinition = {
1355
+ type: "paragraph",
1356
+ label: "Paragraph",
1357
+ category: "typography",
1358
+ icon: "paragraph",
1263
1359
  acceptsChildren: false,
1264
- capabilities: ["assetProvider"],
1265
1360
  defaultProps: {
1266
- src: "https://images.unsplash.com/photo-1579546929518-9e396f3cc809?w=800&auto=format&fit=crop&q=80",
1267
- alt: "Default image",
1268
- width: 600,
1269
- height: 400
1361
+ text: "A paragraph of text with clean semantic typography."
1270
1362
  },
1271
1363
  propFields: [
1272
- { name: "src", label: "Image URL", type: "string" },
1273
- { name: "asset", label: "Asset Reference", type: "json" },
1274
- { name: "alt", label: "Alt Text", type: "string", defaultValue: "Default image" },
1275
- { name: "width", label: "Width", type: "number" },
1276
- { name: "height", label: "Height", type: "number" }
1364
+ {
1365
+ name: "text",
1366
+ label: "Text",
1367
+ type: "string",
1368
+ defaultValue: "A paragraph of text with clean semantic typography."
1369
+ }
1277
1370
  ],
1278
1371
  traits: [
1279
- srcTrait(),
1280
- altTrait({ defaultValue: "Default image" }),
1281
- loadingTrait(),
1282
1372
  idTrait(),
1283
1373
  titleTrait(),
1284
- ariaLabelTrait({ description: "Override the alt text for assistive technology (rarely needed)." })
1374
+ ariaLabelTrait()
1285
1375
  ],
1286
1376
  validateProps: (props) => {
1287
1377
  const errors = [];
1288
- const hasSrc = typeof props.src === "string" && props.src.trim().length > 0 || (0, import_schema.isVariableBinding)(props.src);
1289
- const hasAsset = (0, import_schema.isAssetReference)(props.asset);
1290
- if (!hasSrc && !hasAsset) {
1291
- errors.push('Image requires either a non-empty "src" URL or a valid "asset" reference.');
1292
- }
1293
- const hasAlt = typeof props.alt === "string" && props.alt.trim().length > 0 || (0, import_schema.isVariableBinding)(props.alt);
1294
- if (!hasAlt) {
1295
- errors.push('Image requires non-empty "alt" text.');
1378
+ const textVal = props.text ?? props.content;
1379
+ if (textVal !== void 0 && !(0, import_schema3.isVariableBinding)(textVal) && (typeof textVal !== "string" || textVal.trim().length === 0)) {
1380
+ errors.push('Paragraph requires a non-empty "text".');
1296
1381
  }
1297
1382
  return errors.length > 0 ? errors : true;
1298
1383
  },
1299
1384
  defaultStyles: {
1300
1385
  base: {
1301
- maxWidth: "100%",
1302
- height: "auto",
1303
- borderRadius: "8px"
1386
+ fontSize: "16px",
1387
+ color: "#4b5563",
1388
+ lineHeight: "1.6",
1389
+ margin: "0 0 16px 0"
1304
1390
  }
1305
1391
  }
1306
1392
  };
1307
- var buttonDefinition = {
1308
- type: "button",
1309
- label: "Button",
1310
- category: "interactive",
1311
- icon: "mouse-pointer",
1393
+
1394
+ // src/definitions/typography/link.ts
1395
+ var import_schema4 = require("@kubuild/schema");
1396
+ var linkDefinition = {
1397
+ type: "link",
1398
+ label: "Link",
1399
+ category: "typography",
1400
+ icon: "link",
1312
1401
  acceptsChildren: false,
1313
- capabilities: ["actionRegistry"],
1314
1402
  defaultProps: {
1315
- label: "Click Me",
1316
- variant: "primary"
1403
+ text: "Click here",
1404
+ href: "#",
1405
+ target: "_self",
1406
+ rel: ""
1317
1407
  },
1318
1408
  propFields: [
1319
- { name: "label", label: "Label", type: "string", defaultValue: "Click Me" },
1320
- { name: "href", label: "Link URL", type: "string" },
1321
- { name: "action", label: "Action", type: "action" },
1322
- { name: "disabled", label: "Disabled", type: "boolean", defaultValue: false },
1409
+ { name: "text", label: "Link Text", type: "string", defaultValue: "Click here" },
1410
+ { name: "href", label: "URL (href)", type: "string", defaultValue: "#" },
1323
1411
  {
1324
- name: "buttonType",
1325
- label: "Button Type",
1412
+ name: "target",
1413
+ label: "Target",
1326
1414
  type: "select",
1327
- defaultValue: "button",
1415
+ defaultValue: "_self",
1328
1416
  options: [
1329
- { label: "Button", value: "button" },
1330
- { label: "Submit Form (submit)", value: "submit" },
1331
- { label: "Reset Form (reset)", value: "reset" }
1417
+ { label: "Same tab (_self)", value: "_self" },
1418
+ { label: "New tab (_blank)", value: "_blank" },
1419
+ { label: "Parent (_parent)", value: "_parent" },
1420
+ { label: "Top (_top)", value: "_top" }
1332
1421
  ]
1333
1422
  },
1334
- {
1335
- name: "variant",
1336
- label: "Variant",
1337
- type: "select",
1338
- defaultValue: "primary",
1339
- options: [
1340
- { label: "Primary", value: "primary" },
1341
- { label: "Secondary", value: "secondary" }
1342
- ]
1343
- }
1423
+ { name: "rel", label: "Relationship (rel)", type: "string", defaultValue: "" }
1344
1424
  ],
1345
1425
  traits: [
1346
- buttonTypeTrait(),
1347
- disabledTrait(),
1348
- hrefTrait({ description: "Optional URL \u2014 when set, the button renders as an anchor styled like a button." }),
1349
- targetTrait({ description: "Where to open the href URL (only used when href is set)." }),
1350
- relTrait({ description: "Relationship tokens (only used when href is set)." }),
1426
+ hrefTrait(),
1427
+ targetTrait(),
1428
+ relTrait(),
1351
1429
  idTrait(),
1352
- titleTrait(),
1430
+ titleTrait({ description: "Advisory title shown when hovering the link." }),
1353
1431
  ariaLabelTrait()
1354
1432
  ],
1355
1433
  validateProps: (props) => {
1356
1434
  const errors = [];
1357
- const hasLabel = typeof props.label === "string" && props.label.trim().length > 0 || (0, import_schema.isVariableBinding)(props.label);
1358
- if (!hasLabel) {
1359
- errors.push('Button requires a non-empty "label".');
1435
+ if (props.text !== void 0 && !(0, import_schema4.isVariableBinding)(props.text) && (typeof props.text !== "string" || props.text.trim().length === 0)) {
1436
+ errors.push('Link requires a non-empty "text".');
1360
1437
  }
1361
- if (props.href !== void 0 && typeof props.href !== "string" && !(0, import_schema.isVariableBinding)(props.href)) {
1362
- errors.push('Button "href" must be a string when provided.');
1438
+ if (props.href !== void 0 && typeof props.href !== "string" && !(0, import_schema4.isVariableBinding)(props.href)) {
1439
+ errors.push('Link "href" must be a string when provided.');
1363
1440
  }
1364
- if (props.buttonType !== void 0 && !(0, import_schema.isVariableBinding)(props.buttonType)) {
1365
- if (!["button", "submit", "reset"].includes(props.buttonType)) {
1366
- errors.push('Button "buttonType" must be one of: "button", "submit", "reset".');
1441
+ if (props.target !== void 0 && !(0, import_schema4.isVariableBinding)(props.target)) {
1442
+ const allowedTargets = ["_self", "_blank", "_parent", "_top"];
1443
+ if (typeof props.target !== "string" || !allowedTargets.includes(props.target)) {
1444
+ errors.push(`Link "target" must be one of: ${allowedTargets.join(", ")}.`);
1367
1445
  }
1368
1446
  }
1369
- if (props.action !== void 0 && !(0, import_schema.isActionBinding)(props.action)) {
1370
- errors.push('Button "action" must be a valid action binding when provided.');
1371
- }
1372
- if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema.isVariableBinding)(props.disabled)) {
1373
- errors.push('Button "disabled" must be a boolean when provided.');
1447
+ if (props.rel !== void 0 && typeof props.rel !== "string" && !(0, import_schema4.isVariableBinding)(props.rel)) {
1448
+ errors.push('Link "rel" must be a string when provided.');
1374
1449
  }
1375
1450
  return errors.length > 0 ? errors : true;
1376
1451
  },
1377
1452
  defaultStyles: {
1378
1453
  base: {
1379
- backgroundColor: "#2563eb",
1380
- color: "#ffffff",
1381
- paddingTop: "10px",
1382
- paddingBottom: "10px",
1383
- paddingLeft: "20px",
1384
- paddingRight: "20px",
1385
- borderRadius: "6px",
1386
- fontWeight: "500",
1387
- fontSize: "15px",
1388
- border: "none",
1454
+ color: "#2563eb",
1455
+ textDecoration: "underline",
1389
1456
  cursor: "pointer"
1390
1457
  }
1391
1458
  }
1392
1459
  };
1393
- var collectionDefinition = {
1394
- type: "collection",
1395
- label: "Collection",
1396
- category: "data",
1397
- icon: "database",
1398
- acceptsChildren: true,
1399
- defaultProps: {
1400
- sourceKey: "items",
1401
- itemAlias: "item"
1402
- },
1403
- propFields: [
1404
- { name: "sourceKey", label: "Source Variable", type: "string", defaultValue: "items" },
1405
- { name: "itemAlias", label: "Item Alias", type: "string", defaultValue: "item" }
1406
- ],
1407
- traits: [
1408
- idTrait(),
1409
- ariaLabelTrait({ description: 'Accessible name summarizing the repeated collection (e.g. "Product list").' })
1410
- ]
1411
- };
1412
- var listDefinition = {
1413
- type: "list",
1414
- label: "List",
1415
- category: "typography",
1416
- icon: "list",
1417
- acceptsChildren: true,
1418
- allowedChildren: ["list-item"],
1419
- defaultProps: {
1420
- tag: "ul",
1421
- listStyleType: "disc"
1422
- },
1423
- defaultChildren: [
1424
- { type: "list-item", props: { text: "List item 1" } },
1425
- { type: "list-item", props: { text: "List item 2" } },
1426
- { type: "list-item", props: { text: "List item 3" } }
1427
- ],
1428
- propFields: [
1429
- {
1430
- name: "tag",
1431
- label: "Tag",
1432
- type: "select",
1433
- defaultValue: "ul",
1434
- options: [
1435
- { label: "Unordered (ul)", value: "ul" },
1436
- { label: "Ordered (ol)", value: "ol" }
1437
- ]
1438
- },
1439
- {
1440
- name: "listStyleType",
1441
- label: "List Style Type",
1442
- type: "select",
1443
- defaultValue: "disc",
1444
- options: [
1445
- { label: "Disc", value: "disc" },
1446
- { label: "Circle", value: "circle" },
1447
- { label: "Square", value: "square" },
1448
- { label: "Decimal", value: "decimal" },
1449
- { label: "None", value: "none" },
1450
- { label: "Custom Icon", value: "custom-icon" }
1451
- ]
1452
- }
1453
- ],
1454
- traits: [
1455
- idTrait(),
1456
- ariaLabelTrait({ description: 'Accessible name for the list (e.g. "Navigation menu", "Features").' })
1457
- ],
1458
- validateProps: (props) => {
1459
- const errors = [];
1460
- if (props.tag !== void 0 && !(0, import_schema.isVariableBinding)(props.tag)) {
1461
- if (props.tag !== "ul" && props.tag !== "ol") {
1462
- errors.push('List "tag" must be either "ul" or "ol".');
1463
- }
1464
- }
1465
- if (props.listStyleType !== void 0 && !(0, import_schema.isVariableBinding)(props.listStyleType)) {
1466
- const allowed = ["disc", "circle", "square", "decimal", "none", "custom-icon"];
1467
- if (typeof props.listStyleType !== "string" || !allowed.includes(props.listStyleType)) {
1468
- errors.push(`List "listStyleType" must be one of: ${allowed.join(", ")}.`);
1469
- }
1470
- }
1471
- return errors.length > 0 ? errors : true;
1472
- },
1473
- defaultStyles: {
1474
- base: {
1475
- margin: "0 0 16px 0",
1476
- paddingLeft: "24px"
1477
- }
1478
- }
1479
- };
1480
- var listItemDefinition = {
1481
- type: "list-item",
1482
- label: "List Item",
1460
+
1461
+ // src/definitions/typography/blockquote.ts
1462
+ var import_schema5 = require("@kubuild/schema");
1463
+ var blockquoteDefinition = {
1464
+ type: "blockquote",
1465
+ label: "Blockquote",
1483
1466
  category: "typography",
1484
- icon: "list-item",
1467
+ icon: "blockquote",
1485
1468
  acceptsChildren: true,
1486
1469
  allowedChildren: [
1487
- "heading",
1488
- "text",
1489
1470
  "paragraph",
1471
+ "text",
1472
+ "heading",
1490
1473
  "link",
1491
- "blockquote",
1492
1474
  "badge",
1493
1475
  "code-block",
1494
1476
  "image",
1495
1477
  "video",
1496
1478
  "icon",
1497
1479
  "html-embed",
1498
- "button",
1499
- "list",
1500
1480
  "custom"
1501
1481
  ],
1502
1482
  defaultProps: {
1503
- text: "List item"
1483
+ text: "\u201CSimplicity is the soul of efficiency.\u201D"
1504
1484
  },
1505
1485
  propFields: [
1506
1486
  {
1507
1487
  name: "text",
1508
- label: "Text",
1488
+ label: "Quote Text",
1509
1489
  type: "string",
1510
- defaultValue: "List item"
1511
- }
1490
+ defaultValue: "\u201CSimplicity is the soul of efficiency.\u201D"
1491
+ },
1492
+ { name: "cite", label: "Citation URL (cite)", type: "string" }
1512
1493
  ],
1513
1494
  traits: [
1495
+ citeTrait(),
1514
1496
  idTrait(),
1515
1497
  titleTrait(),
1516
1498
  ariaLabelTrait()
1517
1499
  ],
1518
1500
  validateProps: (props) => {
1519
1501
  const errors = [];
1520
- if (props.text !== void 0 && typeof props.text !== "string" && !(0, import_schema.isVariableBinding)(props.text)) {
1521
- errors.push('List Item "text" must be a string when provided.');
1502
+ if (props.text !== void 0 && typeof props.text !== "string" && !(0, import_schema5.isVariableBinding)(props.text)) {
1503
+ errors.push('Blockquote "text" must be a string when provided.');
1504
+ }
1505
+ if (props.cite !== void 0 && typeof props.cite !== "string" && !(0, import_schema5.isVariableBinding)(props.cite)) {
1506
+ errors.push('Blockquote "cite" must be a string when provided.');
1522
1507
  }
1523
1508
  return errors.length > 0 ? errors : true;
1524
1509
  },
1525
1510
  defaultStyles: {
1526
1511
  base: {
1527
- margin: "4px 0",
1528
- fontSize: "16px",
1529
- color: "#374151",
1530
- lineHeight: "1.5"
1512
+ borderLeftWidth: "4px",
1513
+ borderLeftColor: "#3b82f6",
1514
+ borderLeftStyle: "solid",
1515
+ paddingTop: "8px",
1516
+ paddingBottom: "8px",
1517
+ paddingLeft: "16px",
1518
+ paddingRight: "12px",
1519
+ margin: "0 0 16px 0",
1520
+ fontStyle: "italic",
1521
+ color: "#4b5563",
1522
+ backgroundColor: "#f8fafc"
1531
1523
  }
1532
1524
  }
1533
1525
  };
1534
- var paragraphDefinition = {
1535
- type: "paragraph",
1536
- label: "Paragraph",
1526
+
1527
+ // src/definitions/typography/badge.ts
1528
+ var import_schema6 = require("@kubuild/schema");
1529
+ var badgeDefinition = {
1530
+ type: "badge",
1531
+ label: "Badge",
1537
1532
  category: "typography",
1538
- icon: "paragraph",
1539
- acceptsChildren: false,
1540
- defaultProps: {
1541
- text: "A paragraph of text with clean semantic typography."
1542
- },
1543
- propFields: [
1544
- {
1545
- name: "text",
1546
- label: "Text",
1547
- type: "string",
1548
- defaultValue: "A paragraph of text with clean semantic typography."
1549
- }
1550
- ],
1551
- traits: [
1552
- idTrait(),
1553
- titleTrait(),
1554
- ariaLabelTrait()
1555
- ],
1556
- validateProps: (props) => {
1557
- const errors = [];
1558
- const textVal = props.text ?? props.content;
1559
- if (textVal !== void 0 && !(0, import_schema.isVariableBinding)(textVal) && (typeof textVal !== "string" || textVal.trim().length === 0)) {
1560
- errors.push('Paragraph requires a non-empty "text".');
1561
- }
1562
- return errors.length > 0 ? errors : true;
1563
- },
1564
- defaultStyles: {
1565
- base: {
1566
- fontSize: "16px",
1567
- color: "#4b5563",
1568
- lineHeight: "1.6",
1569
- margin: "0 0 16px 0"
1570
- }
1571
- }
1572
- };
1573
- var linkDefinition = {
1574
- type: "link",
1575
- label: "Link",
1576
- category: "typography",
1577
- icon: "link",
1578
- acceptsChildren: false,
1579
- defaultProps: {
1580
- text: "Click here",
1581
- href: "#",
1582
- target: "_self",
1583
- rel: ""
1584
- },
1585
- propFields: [
1586
- { name: "text", label: "Link Text", type: "string", defaultValue: "Click here" },
1587
- { name: "href", label: "URL (href)", type: "string", defaultValue: "#" },
1588
- {
1589
- name: "target",
1590
- label: "Target",
1591
- type: "select",
1592
- defaultValue: "_self",
1593
- options: [
1594
- { label: "Same tab (_self)", value: "_self" },
1595
- { label: "New tab (_blank)", value: "_blank" },
1596
- { label: "Parent (_parent)", value: "_parent" },
1597
- { label: "Top (_top)", value: "_top" }
1598
- ]
1599
- },
1600
- { name: "rel", label: "Relationship (rel)", type: "string", defaultValue: "" }
1601
- ],
1602
- traits: [
1603
- hrefTrait(),
1604
- targetTrait(),
1605
- relTrait(),
1606
- idTrait(),
1607
- titleTrait({ description: "Advisory title shown when hovering the link." }),
1608
- ariaLabelTrait()
1609
- ],
1610
- validateProps: (props) => {
1611
- const errors = [];
1612
- if (props.text !== void 0 && !(0, import_schema.isVariableBinding)(props.text) && (typeof props.text !== "string" || props.text.trim().length === 0)) {
1613
- errors.push('Link requires a non-empty "text".');
1614
- }
1615
- if (props.href !== void 0 && typeof props.href !== "string" && !(0, import_schema.isVariableBinding)(props.href)) {
1616
- errors.push('Link "href" must be a string when provided.');
1617
- }
1618
- if (props.target !== void 0 && !(0, import_schema.isVariableBinding)(props.target)) {
1619
- const allowedTargets = ["_self", "_blank", "_parent", "_top"];
1620
- if (typeof props.target !== "string" || !allowedTargets.includes(props.target)) {
1621
- errors.push(`Link "target" must be one of: ${allowedTargets.join(", ")}.`);
1622
- }
1623
- }
1624
- if (props.rel !== void 0 && typeof props.rel !== "string" && !(0, import_schema.isVariableBinding)(props.rel)) {
1625
- errors.push('Link "rel" must be a string when provided.');
1626
- }
1627
- return errors.length > 0 ? errors : true;
1628
- },
1629
- defaultStyles: {
1630
- base: {
1631
- color: "#2563eb",
1632
- textDecoration: "underline",
1633
- cursor: "pointer"
1634
- }
1635
- }
1636
- };
1637
- var blockquoteDefinition = {
1638
- type: "blockquote",
1639
- label: "Blockquote",
1640
- category: "typography",
1641
- icon: "blockquote",
1642
- acceptsChildren: true,
1643
- allowedChildren: [
1644
- "paragraph",
1645
- "text",
1646
- "heading",
1647
- "link",
1648
- "badge",
1649
- "code-block",
1650
- "image",
1651
- "video",
1652
- "icon",
1653
- "html-embed",
1654
- "custom"
1655
- ],
1656
- defaultProps: {
1657
- text: "\u201CSimplicity is the soul of efficiency.\u201D"
1658
- },
1659
- propFields: [
1660
- {
1661
- name: "text",
1662
- label: "Quote Text",
1663
- type: "string",
1664
- defaultValue: "\u201CSimplicity is the soul of efficiency.\u201D"
1665
- },
1666
- { name: "cite", label: "Citation URL (cite)", type: "string" }
1667
- ],
1668
- traits: [
1669
- citeTrait(),
1670
- idTrait(),
1671
- titleTrait(),
1672
- ariaLabelTrait()
1673
- ],
1674
- validateProps: (props) => {
1675
- const errors = [];
1676
- if (props.text !== void 0 && typeof props.text !== "string" && !(0, import_schema.isVariableBinding)(props.text)) {
1677
- errors.push('Blockquote "text" must be a string when provided.');
1678
- }
1679
- if (props.cite !== void 0 && typeof props.cite !== "string" && !(0, import_schema.isVariableBinding)(props.cite)) {
1680
- errors.push('Blockquote "cite" must be a string when provided.');
1681
- }
1682
- return errors.length > 0 ? errors : true;
1683
- },
1684
- defaultStyles: {
1685
- base: {
1686
- borderLeftWidth: "4px",
1687
- borderLeftColor: "#3b82f6",
1688
- borderLeftStyle: "solid",
1689
- paddingTop: "8px",
1690
- paddingBottom: "8px",
1691
- paddingLeft: "16px",
1692
- paddingRight: "12px",
1693
- margin: "0 0 16px 0",
1694
- fontStyle: "italic",
1695
- color: "#4b5563",
1696
- backgroundColor: "#f8fafc"
1697
- }
1698
- }
1699
- };
1700
- var badgeDefinition = {
1701
- type: "badge",
1702
- label: "Badge",
1703
- category: "typography",
1704
- icon: "badge",
1533
+ icon: "badge",
1705
1534
  acceptsChildren: false,
1706
1535
  defaultProps: {
1707
1536
  text: "Badge",
@@ -1730,10 +1559,10 @@ var badgeDefinition = {
1730
1559
  ],
1731
1560
  validateProps: (props) => {
1732
1561
  const errors = [];
1733
- if (props.text !== void 0 && !(0, import_schema.isVariableBinding)(props.text) && (typeof props.text !== "string" || props.text.trim().length === 0)) {
1562
+ if (props.text !== void 0 && !(0, import_schema6.isVariableBinding)(props.text) && (typeof props.text !== "string" || props.text.trim().length === 0)) {
1734
1563
  errors.push('Badge requires a non-empty "text".');
1735
1564
  }
1736
- if (props.variant !== void 0 && typeof props.variant !== "string" && !(0, import_schema.isVariableBinding)(props.variant)) {
1565
+ if (props.variant !== void 0 && typeof props.variant !== "string" && !(0, import_schema6.isVariableBinding)(props.variant)) {
1737
1566
  errors.push('Badge "variant" must be a string.');
1738
1567
  }
1739
1568
  return errors.length > 0 ? errors : true;
@@ -1755,6 +1584,9 @@ var badgeDefinition = {
1755
1584
  }
1756
1585
  }
1757
1586
  };
1587
+
1588
+ // src/definitions/typography/code-block.ts
1589
+ var import_schema7 = require("@kubuild/schema");
1758
1590
  var codeBlockDefinition = {
1759
1591
  type: "code-block",
1760
1592
  label: "Code Block",
@@ -1786,10 +1618,10 @@ var codeBlockDefinition = {
1786
1618
  ],
1787
1619
  validateProps: (props) => {
1788
1620
  const errors = [];
1789
- if (props.code !== void 0 && typeof props.code !== "string" && !(0, import_schema.isVariableBinding)(props.code)) {
1621
+ if (props.code !== void 0 && typeof props.code !== "string" && !(0, import_schema7.isVariableBinding)(props.code)) {
1790
1622
  errors.push('Code Block "code" must be a string when provided.');
1791
1623
  }
1792
- if (props.language !== void 0 && typeof props.language !== "string" && !(0, import_schema.isVariableBinding)(props.language)) {
1624
+ if (props.language !== void 0 && typeof props.language !== "string" && !(0, import_schema7.isVariableBinding)(props.language)) {
1793
1625
  errors.push('Code Block "language" must be a string when provided.');
1794
1626
  }
1795
1627
  return errors.length > 0 ? errors : true;
@@ -1809,6 +1641,61 @@ var codeBlockDefinition = {
1809
1641
  }
1810
1642
  }
1811
1643
  };
1644
+
1645
+ // src/definitions/media/image.ts
1646
+ var import_schema8 = require("@kubuild/schema");
1647
+ var imageDefinition = {
1648
+ type: "image",
1649
+ label: "Image",
1650
+ category: "media",
1651
+ icon: "image",
1652
+ acceptsChildren: false,
1653
+ capabilities: ["assetProvider"],
1654
+ defaultProps: {
1655
+ src: "https://images.unsplash.com/photo-1579546929518-9e396f3cc809?w=800&auto=format&fit=crop&q=80",
1656
+ alt: "Default image",
1657
+ width: 600,
1658
+ height: 400
1659
+ },
1660
+ propFields: [
1661
+ { name: "src", label: "Image URL", type: "string" },
1662
+ { name: "asset", label: "Asset Reference", type: "json" },
1663
+ { name: "alt", label: "Alt Text", type: "string", defaultValue: "Default image" },
1664
+ { name: "width", label: "Width", type: "number" },
1665
+ { name: "height", label: "Height", type: "number" }
1666
+ ],
1667
+ traits: [
1668
+ srcTrait(),
1669
+ altTrait({ defaultValue: "Default image" }),
1670
+ loadingTrait(),
1671
+ idTrait(),
1672
+ titleTrait(),
1673
+ ariaLabelTrait({ description: "Override the alt text for assistive technology (rarely needed)." })
1674
+ ],
1675
+ validateProps: (props) => {
1676
+ const errors = [];
1677
+ const hasSrc = typeof props.src === "string" && props.src.trim().length > 0 || (0, import_schema8.isVariableBinding)(props.src);
1678
+ const hasAsset = (0, import_schema8.isAssetReference)(props.asset);
1679
+ if (!hasSrc && !hasAsset) {
1680
+ errors.push('Image requires either a non-empty "src" URL or a valid "asset" reference.');
1681
+ }
1682
+ const hasAlt = typeof props.alt === "string" && props.alt.trim().length > 0 || (0, import_schema8.isVariableBinding)(props.alt);
1683
+ if (!hasAlt) {
1684
+ errors.push('Image requires non-empty "alt" text.');
1685
+ }
1686
+ return errors.length > 0 ? errors : true;
1687
+ },
1688
+ defaultStyles: {
1689
+ base: {
1690
+ maxWidth: "100%",
1691
+ height: "auto",
1692
+ borderRadius: "8px"
1693
+ }
1694
+ }
1695
+ };
1696
+
1697
+ // src/definitions/media/video.ts
1698
+ var import_schema9 = require("@kubuild/schema");
1812
1699
  var videoDefinition = {
1813
1700
  type: "video",
1814
1701
  label: "Video",
@@ -1876,25 +1763,25 @@ var videoDefinition = {
1876
1763
  ],
1877
1764
  validateProps: (props) => {
1878
1765
  const errors = [];
1879
- if (props.src !== void 0 && typeof props.src !== "string" && !(0, import_schema.isVariableBinding)(props.src)) {
1766
+ if (props.src !== void 0 && typeof props.src !== "string" && !(0, import_schema9.isVariableBinding)(props.src)) {
1880
1767
  errors.push('Video "src" must be a string when provided.');
1881
1768
  }
1882
- if (props.provider !== void 0 && !(0, import_schema.isVariableBinding)(props.provider)) {
1769
+ if (props.provider !== void 0 && !(0, import_schema9.isVariableBinding)(props.provider)) {
1883
1770
  const allowed = ["auto", "html5", "youtube", "vimeo"];
1884
1771
  if (typeof props.provider !== "string" || !allowed.includes(props.provider)) {
1885
1772
  errors.push(`Video "provider" must be one of: ${allowed.join(", ")}.`);
1886
1773
  }
1887
1774
  }
1888
- if (props.controls !== void 0 && typeof props.controls !== "boolean" && !(0, import_schema.isVariableBinding)(props.controls)) {
1775
+ if (props.controls !== void 0 && typeof props.controls !== "boolean" && !(0, import_schema9.isVariableBinding)(props.controls)) {
1889
1776
  errors.push('Video "controls" must be a boolean.');
1890
1777
  }
1891
- if (props.autoplay !== void 0 && typeof props.autoplay !== "boolean" && !(0, import_schema.isVariableBinding)(props.autoplay)) {
1778
+ if (props.autoplay !== void 0 && typeof props.autoplay !== "boolean" && !(0, import_schema9.isVariableBinding)(props.autoplay)) {
1892
1779
  errors.push('Video "autoplay" must be a boolean.');
1893
1780
  }
1894
- if (props.loop !== void 0 && typeof props.loop !== "boolean" && !(0, import_schema.isVariableBinding)(props.loop)) {
1781
+ if (props.loop !== void 0 && typeof props.loop !== "boolean" && !(0, import_schema9.isVariableBinding)(props.loop)) {
1895
1782
  errors.push('Video "loop" must be a boolean.');
1896
1783
  }
1897
- if (props.muted !== void 0 && typeof props.muted !== "boolean" && !(0, import_schema.isVariableBinding)(props.muted)) {
1784
+ if (props.muted !== void 0 && typeof props.muted !== "boolean" && !(0, import_schema9.isVariableBinding)(props.muted)) {
1898
1785
  errors.push('Video "muted" must be a boolean.');
1899
1786
  }
1900
1787
  return errors.length > 0 ? errors : true;
@@ -1910,6 +1797,9 @@ var videoDefinition = {
1910
1797
  }
1911
1798
  }
1912
1799
  };
1800
+
1801
+ // src/definitions/media/icon.ts
1802
+ var import_schema10 = require("@kubuild/schema");
1913
1803
  var iconDefinition = {
1914
1804
  type: "icon",
1915
1805
  label: "Icon",
@@ -1935,15 +1825,15 @@ var iconDefinition = {
1935
1825
  ],
1936
1826
  validateProps: (props) => {
1937
1827
  const errors = [];
1938
- if (props.name !== void 0 && !(0, import_schema.isVariableBinding)(props.name) && (typeof props.name !== "string" || props.name.trim().length === 0)) {
1828
+ if (props.name !== void 0 && !(0, import_schema10.isVariableBinding)(props.name) && (typeof props.name !== "string" || props.name.trim().length === 0)) {
1939
1829
  errors.push('Icon requires a non-empty "name".');
1940
1830
  }
1941
- if (props.size !== void 0 && !(0, import_schema.isVariableBinding)(props.size)) {
1831
+ if (props.size !== void 0 && !(0, import_schema10.isVariableBinding)(props.size)) {
1942
1832
  if (typeof props.size !== "number" || props.size < 0) {
1943
1833
  errors.push('Icon "size" must be a non-negative number.');
1944
1834
  }
1945
1835
  }
1946
- if (props.strokeWidth !== void 0 && !(0, import_schema.isVariableBinding)(props.strokeWidth)) {
1836
+ if (props.strokeWidth !== void 0 && !(0, import_schema10.isVariableBinding)(props.strokeWidth)) {
1947
1837
  if (typeof props.strokeWidth !== "number" || props.strokeWidth < 0) {
1948
1838
  errors.push('Icon "strokeWidth" must be a non-negative number.');
1949
1839
  }
@@ -1958,6 +1848,9 @@ var iconDefinition = {
1958
1848
  }
1959
1849
  }
1960
1850
  };
1851
+
1852
+ // src/definitions/media/html-embed.ts
1853
+ var import_schema11 = require("@kubuild/schema");
1961
1854
  var htmlEmbedDefinition = {
1962
1855
  type: "html-embed",
1963
1856
  label: "HTML Embed",
@@ -1981,7 +1874,7 @@ var htmlEmbedDefinition = {
1981
1874
  ],
1982
1875
  validateProps: (props) => {
1983
1876
  const errors = [];
1984
- if (props.html !== void 0 && typeof props.html !== "string" && !(0, import_schema.isVariableBinding)(props.html)) {
1877
+ if (props.html !== void 0 && typeof props.html !== "string" && !(0, import_schema11.isVariableBinding)(props.html)) {
1985
1878
  errors.push('HTML Embed "html" must be a string.');
1986
1879
  }
1987
1880
  return errors.length > 0 ? errors : true;
@@ -1993,6 +1886,9 @@ var htmlEmbedDefinition = {
1993
1886
  }
1994
1887
  }
1995
1888
  };
1889
+
1890
+ // src/definitions/data/table.ts
1891
+ var import_schema12 = require("@kubuild/schema");
1996
1892
  var tableDefinition = {
1997
1893
  type: "table",
1998
1894
  label: "Table",
@@ -2032,13 +1928,13 @@ var tableDefinition = {
2032
1928
  ],
2033
1929
  validateProps: (props) => {
2034
1930
  const errors = [];
2035
- if (props.striped !== void 0 && typeof props.striped !== "boolean" && !(0, import_schema.isVariableBinding)(props.striped)) {
1931
+ if (props.striped !== void 0 && typeof props.striped !== "boolean" && !(0, import_schema12.isVariableBinding)(props.striped)) {
2036
1932
  errors.push('Table "striped" must be a boolean.');
2037
1933
  }
2038
- if (props.bordered !== void 0 && typeof props.bordered !== "boolean" && !(0, import_schema.isVariableBinding)(props.bordered)) {
1934
+ if (props.bordered !== void 0 && typeof props.bordered !== "boolean" && !(0, import_schema12.isVariableBinding)(props.bordered)) {
2039
1935
  errors.push('Table "bordered" must be a boolean.');
2040
1936
  }
2041
- if (props.compact !== void 0 && typeof props.compact !== "boolean" && !(0, import_schema.isVariableBinding)(props.compact)) {
1937
+ if (props.compact !== void 0 && typeof props.compact !== "boolean" && !(0, import_schema12.isVariableBinding)(props.compact)) {
2042
1938
  errors.push('Table "compact" must be a boolean.');
2043
1939
  }
2044
1940
  return errors.length > 0 ? errors : true;
@@ -2095,64 +1991,412 @@ var tableCellDefinition = {
2095
1991
  ],
2096
1992
  disallowedParents: ["page"],
2097
1993
  defaultProps: {
2098
- tag: "td",
2099
- text: "Cell",
2100
- colSpan: 1,
2101
- rowSpan: 1
1994
+ tag: "td",
1995
+ text: "Cell",
1996
+ colSpan: 1,
1997
+ rowSpan: 1
1998
+ },
1999
+ propFields: [
2000
+ {
2001
+ name: "tag",
2002
+ label: "Cell Type",
2003
+ type: "select",
2004
+ defaultValue: "td",
2005
+ options: [
2006
+ { label: "Data Cell (td)", value: "td" },
2007
+ { label: "Header Cell (th)", value: "th" }
2008
+ ]
2009
+ },
2010
+ { name: "text", label: "Text", type: "string", defaultValue: "Cell" },
2011
+ { name: "colSpan", label: "Column Span (colSpan)", type: "number", defaultValue: 1 },
2012
+ { name: "rowSpan", label: "Row Span (rowSpan)", type: "number", defaultValue: 1 }
2013
+ ],
2014
+ traits: [
2015
+ colSpanTrait(),
2016
+ rowSpanTrait(),
2017
+ idTrait(),
2018
+ ariaLabelTrait()
2019
+ ],
2020
+ validateProps: (props) => {
2021
+ const errors = [];
2022
+ if (props.tag !== void 0 && !(0, import_schema12.isVariableBinding)(props.tag)) {
2023
+ if (props.tag !== "td" && props.tag !== "th") {
2024
+ errors.push('Table Cell "tag" must be either "td" or "th".');
2025
+ }
2026
+ }
2027
+ if (props.colSpan !== void 0 && !(0, import_schema12.isVariableBinding)(props.colSpan)) {
2028
+ if (typeof props.colSpan !== "number" || props.colSpan < 1 || !Number.isInteger(props.colSpan)) {
2029
+ errors.push('Table Cell "colSpan" must be a positive integer (>= 1).');
2030
+ }
2031
+ }
2032
+ if (props.rowSpan !== void 0 && !(0, import_schema12.isVariableBinding)(props.rowSpan)) {
2033
+ if (typeof props.rowSpan !== "number" || props.rowSpan < 1 || !Number.isInteger(props.rowSpan)) {
2034
+ errors.push('Table Cell "rowSpan" must be a positive integer (>= 1).');
2035
+ }
2036
+ }
2037
+ if (props.text !== void 0 && typeof props.text !== "string" && !(0, import_schema12.isVariableBinding)(props.text)) {
2038
+ errors.push('Table Cell "text" must be a string when provided.');
2039
+ }
2040
+ return errors.length > 0 ? errors : true;
2041
+ },
2042
+ defaultStyles: {
2043
+ base: {
2044
+ padding: "8px 12px",
2045
+ borderWidth: "1px",
2046
+ borderColor: "#e2e8f0",
2047
+ borderStyle: "solid",
2048
+ textAlign: "left"
2049
+ }
2050
+ }
2051
+ };
2052
+
2053
+ // src/definitions/data/list.ts
2054
+ var import_schema13 = require("@kubuild/schema");
2055
+ var listDefinition = {
2056
+ type: "list",
2057
+ label: "List",
2058
+ category: "typography",
2059
+ icon: "list",
2060
+ acceptsChildren: true,
2061
+ allowedChildren: ["list-item"],
2062
+ defaultProps: {
2063
+ tag: "ul",
2064
+ listStyleType: "disc"
2065
+ },
2066
+ defaultChildren: [
2067
+ { type: "list-item", props: { text: "List item 1" } },
2068
+ { type: "list-item", props: { text: "List item 2" } },
2069
+ { type: "list-item", props: { text: "List item 3" } }
2070
+ ],
2071
+ propFields: [
2072
+ {
2073
+ name: "tag",
2074
+ label: "Tag",
2075
+ type: "select",
2076
+ defaultValue: "ul",
2077
+ options: [
2078
+ { label: "Unordered (ul)", value: "ul" },
2079
+ { label: "Ordered (ol)", value: "ol" }
2080
+ ]
2081
+ },
2082
+ {
2083
+ name: "listStyleType",
2084
+ label: "List Style Type",
2085
+ type: "select",
2086
+ defaultValue: "disc",
2087
+ options: [
2088
+ { label: "Disc", value: "disc" },
2089
+ { label: "Circle", value: "circle" },
2090
+ { label: "Square", value: "square" },
2091
+ { label: "Decimal", value: "decimal" },
2092
+ { label: "None", value: "none" },
2093
+ { label: "Custom Icon", value: "custom-icon" }
2094
+ ]
2095
+ }
2096
+ ],
2097
+ traits: [
2098
+ idTrait(),
2099
+ ariaLabelTrait({ description: 'Accessible name for the list (e.g. "Navigation menu", "Features").' })
2100
+ ],
2101
+ validateProps: (props) => {
2102
+ const errors = [];
2103
+ if (props.tag !== void 0 && !(0, import_schema13.isVariableBinding)(props.tag)) {
2104
+ if (props.tag !== "ul" && props.tag !== "ol") {
2105
+ errors.push('List "tag" must be either "ul" or "ol".');
2106
+ }
2107
+ }
2108
+ if (props.listStyleType !== void 0 && !(0, import_schema13.isVariableBinding)(props.listStyleType)) {
2109
+ const allowed = ["disc", "circle", "square", "decimal", "none", "custom-icon"];
2110
+ if (typeof props.listStyleType !== "string" || !allowed.includes(props.listStyleType)) {
2111
+ errors.push(`List "listStyleType" must be one of: ${allowed.join(", ")}.`);
2112
+ }
2113
+ }
2114
+ return errors.length > 0 ? errors : true;
2115
+ },
2116
+ defaultStyles: {
2117
+ base: {
2118
+ margin: "0 0 16px 0",
2119
+ paddingLeft: "24px"
2120
+ }
2121
+ }
2122
+ };
2123
+ var listItemDefinition = {
2124
+ type: "list-item",
2125
+ label: "List Item",
2126
+ category: "typography",
2127
+ icon: "list-item",
2128
+ acceptsChildren: true,
2129
+ allowedChildren: [
2130
+ "heading",
2131
+ "text",
2132
+ "paragraph",
2133
+ "link",
2134
+ "blockquote",
2135
+ "badge",
2136
+ "code-block",
2137
+ "image",
2138
+ "video",
2139
+ "icon",
2140
+ "html-embed",
2141
+ "button",
2142
+ "list",
2143
+ "custom"
2144
+ ],
2145
+ defaultProps: {
2146
+ text: "List item"
2147
+ },
2148
+ propFields: [
2149
+ {
2150
+ name: "text",
2151
+ label: "Text",
2152
+ type: "string",
2153
+ defaultValue: "List item"
2154
+ }
2155
+ ],
2156
+ traits: [
2157
+ idTrait(),
2158
+ titleTrait(),
2159
+ ariaLabelTrait()
2160
+ ],
2161
+ validateProps: (props) => {
2162
+ const errors = [];
2163
+ if (props.text !== void 0 && typeof props.text !== "string" && !(0, import_schema13.isVariableBinding)(props.text)) {
2164
+ errors.push('List Item "text" must be a string when provided.');
2165
+ }
2166
+ return errors.length > 0 ? errors : true;
2167
+ },
2168
+ defaultStyles: {
2169
+ base: {
2170
+ margin: "4px 0",
2171
+ fontSize: "16px",
2172
+ color: "#374151",
2173
+ lineHeight: "1.5"
2174
+ }
2175
+ }
2176
+ };
2177
+
2178
+ // src/definitions/data/collection.ts
2179
+ var collectionDefinition = {
2180
+ type: "collection",
2181
+ label: "Collection",
2182
+ category: "data",
2183
+ icon: "database",
2184
+ acceptsChildren: true,
2185
+ defaultProps: {
2186
+ sourceKey: "items",
2187
+ itemAlias: "item"
2188
+ },
2189
+ propFields: [
2190
+ { name: "sourceKey", label: "Source Variable", type: "string", defaultValue: "items" },
2191
+ { name: "itemAlias", label: "Item Alias", type: "string", defaultValue: "item" }
2192
+ ],
2193
+ traits: [
2194
+ idTrait(),
2195
+ ariaLabelTrait({ description: 'Accessible name summarizing the repeated collection (e.g. "Product list").' })
2196
+ ]
2197
+ };
2198
+
2199
+ // src/definitions/form/button.ts
2200
+ var import_schema14 = require("@kubuild/schema");
2201
+ var buttonDefinition = {
2202
+ type: "button",
2203
+ label: "Button",
2204
+ category: "interactive",
2205
+ icon: "mouse-pointer",
2206
+ acceptsChildren: false,
2207
+ capabilities: ["actionRegistry"],
2208
+ defaultProps: {
2209
+ label: "Click Me",
2210
+ variant: "primary"
2211
+ },
2212
+ propFields: [
2213
+ { name: "label", label: "Label", type: "string", defaultValue: "Click Me" },
2214
+ { name: "href", label: "Link URL", type: "string" },
2215
+ { name: "action", label: "Action", type: "action" },
2216
+ { name: "disabled", label: "Disabled", type: "boolean", defaultValue: false },
2217
+ {
2218
+ name: "buttonType",
2219
+ label: "Button Type",
2220
+ type: "select",
2221
+ defaultValue: "button",
2222
+ options: [
2223
+ { label: "Button", value: "button" },
2224
+ { label: "Submit Form (submit)", value: "submit" },
2225
+ { label: "Reset Form (reset)", value: "reset" }
2226
+ ]
2227
+ },
2228
+ {
2229
+ name: "variant",
2230
+ label: "Variant",
2231
+ type: "select",
2232
+ defaultValue: "primary",
2233
+ options: [
2234
+ { label: "Primary", value: "primary" },
2235
+ { label: "Secondary", value: "secondary" }
2236
+ ]
2237
+ }
2238
+ ],
2239
+ traits: [
2240
+ buttonTypeTrait(),
2241
+ disabledTrait(),
2242
+ hrefTrait({ description: "Optional URL \u2014 when set, the button renders as an anchor styled like a button." }),
2243
+ targetTrait({ description: "Where to open the href URL (only used when href is set)." }),
2244
+ relTrait({ description: "Relationship tokens (only used when href is set)." }),
2245
+ idTrait(),
2246
+ titleTrait(),
2247
+ ariaLabelTrait()
2248
+ ],
2249
+ validateProps: (props) => {
2250
+ const errors = [];
2251
+ const hasLabel = typeof props.label === "string" && props.label.trim().length > 0 || (0, import_schema14.isVariableBinding)(props.label);
2252
+ if (!hasLabel) {
2253
+ errors.push('Button requires a non-empty "label".');
2254
+ }
2255
+ if (props.href !== void 0 && typeof props.href !== "string" && !(0, import_schema14.isVariableBinding)(props.href)) {
2256
+ errors.push('Button "href" must be a string when provided.');
2257
+ }
2258
+ if (props.buttonType !== void 0 && !(0, import_schema14.isVariableBinding)(props.buttonType)) {
2259
+ if (!["button", "submit", "reset"].includes(props.buttonType)) {
2260
+ errors.push('Button "buttonType" must be one of: "button", "submit", "reset".');
2261
+ }
2262
+ }
2263
+ if (props.action !== void 0 && !(0, import_schema14.isActionBinding)(props.action)) {
2264
+ errors.push('Button "action" must be a valid action binding when provided.');
2265
+ }
2266
+ if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema14.isVariableBinding)(props.disabled)) {
2267
+ errors.push('Button "disabled" must be a boolean when provided.');
2268
+ }
2269
+ return errors.length > 0 ? errors : true;
2270
+ },
2271
+ defaultStyles: {
2272
+ base: {
2273
+ backgroundColor: "#2563eb",
2274
+ color: "#ffffff",
2275
+ paddingTop: "10px",
2276
+ paddingBottom: "10px",
2277
+ paddingLeft: "20px",
2278
+ paddingRight: "20px",
2279
+ borderRadius: "6px",
2280
+ fontWeight: "500",
2281
+ fontSize: "15px",
2282
+ border: "none",
2283
+ cursor: "pointer"
2284
+ }
2285
+ }
2286
+ };
2287
+ var buttonSubmitDefinition = {
2288
+ type: "button-submit",
2289
+ label: "Submit Button",
2290
+ category: "form",
2291
+ icon: "send",
2292
+ acceptsChildren: false,
2293
+ capabilities: ["actionRegistry"],
2294
+ disallowedParents: ["page"],
2295
+ defaultProps: {
2296
+ label: "Submit",
2297
+ loadingText: "Submitting...",
2298
+ showSpinner: true,
2299
+ autoDisableOnSubmit: true,
2300
+ variant: "primary",
2301
+ disabled: false,
2302
+ buttonType: "submit"
2102
2303
  },
2103
2304
  propFields: [
2305
+ { name: "label", label: "Label", type: "string", defaultValue: "Submit" },
2306
+ { name: "loadingText", label: "Loading Text", type: "string", defaultValue: "Submitting..." },
2307
+ { name: "showSpinner", label: "Show Loading Spinner", type: "boolean", defaultValue: true },
2308
+ { name: "autoDisableOnSubmit", label: "Auto Disable on Submit", type: "boolean", defaultValue: true },
2104
2309
  {
2105
- name: "tag",
2106
- label: "Cell Type",
2310
+ name: "buttonType",
2311
+ label: "Button Type",
2107
2312
  type: "select",
2108
- defaultValue: "td",
2313
+ defaultValue: "submit",
2109
2314
  options: [
2110
- { label: "Data Cell (td)", value: "td" },
2111
- { label: "Header Cell (th)", value: "th" }
2315
+ { label: "Submit Form (submit)", value: "submit" },
2316
+ { label: "Reset Form (reset)", value: "reset" }
2112
2317
  ]
2113
2318
  },
2114
- { name: "text", label: "Text", type: "string", defaultValue: "Cell" },
2115
- { name: "colSpan", label: "Column Span (colSpan)", type: "number", defaultValue: 1 },
2116
- { name: "rowSpan", label: "Row Span (rowSpan)", type: "number", defaultValue: 1 }
2319
+ {
2320
+ name: "variant",
2321
+ label: "Variant",
2322
+ type: "select",
2323
+ defaultValue: "primary",
2324
+ options: [
2325
+ { label: "Primary", value: "primary" },
2326
+ { label: "Secondary", value: "secondary" }
2327
+ ]
2328
+ },
2329
+ { name: "disabled", label: "Disabled", type: "boolean", defaultValue: false },
2330
+ { name: "prefixIcon", label: "Prefix Icon", type: "string" },
2331
+ { name: "suffixIcon", label: "Suffix Icon", type: "string" }
2117
2332
  ],
2118
2333
  traits: [
2119
- colSpanTrait(),
2120
- rowSpanTrait(),
2334
+ buttonTypeTrait({
2335
+ defaultValue: "submit",
2336
+ options: [
2337
+ { label: "Submit Form (submit)", value: "submit" },
2338
+ { label: "Reset Form (reset)", value: "reset" }
2339
+ ]
2340
+ }),
2341
+ labelTextTrait({ defaultValue: "Submit", label: "Label" }),
2342
+ loadingTextTrait(),
2343
+ showSpinnerTrait(),
2344
+ autoDisableOnSubmitTrait(),
2345
+ disabledTrait(),
2346
+ prefixIconTrait(),
2347
+ suffixIconTrait(),
2121
2348
  idTrait(),
2349
+ titleTrait(),
2122
2350
  ariaLabelTrait()
2123
2351
  ],
2124
2352
  validateProps: (props) => {
2125
2353
  const errors = [];
2126
- if (props.tag !== void 0 && !(0, import_schema.isVariableBinding)(props.tag)) {
2127
- if (props.tag !== "td" && props.tag !== "th") {
2128
- errors.push('Table Cell "tag" must be either "td" or "th".');
2129
- }
2354
+ const hasLabel = typeof props.label === "string" && props.label.trim().length > 0 || (0, import_schema14.isVariableBinding)(props.label);
2355
+ if (!hasLabel) {
2356
+ errors.push('Submit Button requires a non-empty "label".');
2130
2357
  }
2131
- if (props.colSpan !== void 0 && !(0, import_schema.isVariableBinding)(props.colSpan)) {
2132
- if (typeof props.colSpan !== "number" || props.colSpan < 1 || !Number.isInteger(props.colSpan)) {
2133
- errors.push('Table Cell "colSpan" must be a positive integer (>= 1).');
2134
- }
2358
+ if (props.loadingText !== void 0 && typeof props.loadingText !== "string" && !(0, import_schema14.isVariableBinding)(props.loadingText)) {
2359
+ errors.push('Submit Button "loadingText" must be a string when provided.');
2135
2360
  }
2136
- if (props.rowSpan !== void 0 && !(0, import_schema.isVariableBinding)(props.rowSpan)) {
2137
- if (typeof props.rowSpan !== "number" || props.rowSpan < 1 || !Number.isInteger(props.rowSpan)) {
2138
- errors.push('Table Cell "rowSpan" must be a positive integer (>= 1).');
2361
+ if (props.showSpinner !== void 0 && typeof props.showSpinner !== "boolean" && !(0, import_schema14.isVariableBinding)(props.showSpinner)) {
2362
+ errors.push('Submit Button "showSpinner" must be a boolean when provided.');
2363
+ }
2364
+ if (props.autoDisableOnSubmit !== void 0 && typeof props.autoDisableOnSubmit !== "boolean" && !(0, import_schema14.isVariableBinding)(props.autoDisableOnSubmit)) {
2365
+ errors.push('Submit Button "autoDisableOnSubmit" must be a boolean when provided.');
2366
+ }
2367
+ if (props.buttonType !== void 0 && !(0, import_schema14.isVariableBinding)(props.buttonType)) {
2368
+ if (!["submit", "reset", "button"].includes(props.buttonType)) {
2369
+ errors.push('Submit Button "buttonType" must be one of: "submit", "reset", "button".');
2139
2370
  }
2140
2371
  }
2141
- if (props.text !== void 0 && typeof props.text !== "string" && !(0, import_schema.isVariableBinding)(props.text)) {
2142
- errors.push('Table Cell "text" must be a string when provided.');
2372
+ if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema14.isVariableBinding)(props.disabled)) {
2373
+ errors.push('Submit Button "disabled" must be a boolean when provided.');
2143
2374
  }
2144
2375
  return errors.length > 0 ? errors : true;
2145
2376
  },
2146
2377
  defaultStyles: {
2147
2378
  base: {
2148
- padding: "8px 12px",
2149
- borderWidth: "1px",
2150
- borderColor: "#e2e8f0",
2151
- borderStyle: "solid",
2152
- textAlign: "left"
2379
+ backgroundColor: "#2563eb",
2380
+ color: "#ffffff",
2381
+ paddingTop: "10px",
2382
+ paddingBottom: "10px",
2383
+ paddingLeft: "20px",
2384
+ paddingRight: "20px",
2385
+ borderRadius: "6px",
2386
+ fontWeight: "500",
2387
+ fontSize: "15px",
2388
+ border: "none",
2389
+ cursor: "pointer",
2390
+ display: "inline-flex",
2391
+ alignItems: "center",
2392
+ justifyContent: "center",
2393
+ gap: "8px"
2153
2394
  }
2154
2395
  }
2155
2396
  };
2397
+
2398
+ // src/definitions/form/form.ts
2399
+ var import_schema15 = require("@kubuild/schema");
2156
2400
  var formDefinition = {
2157
2401
  type: "form",
2158
2402
  label: "Form",
@@ -2239,34 +2483,34 @@ var formDefinition = {
2239
2483
  ],
2240
2484
  validateProps: (props) => {
2241
2485
  const errors = [];
2242
- if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema.isVariableBinding)(props.name)) {
2486
+ if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema15.isVariableBinding)(props.name)) {
2243
2487
  errors.push('Form "name" must be a string when provided.');
2244
2488
  }
2245
- if (props.action !== void 0 && typeof props.action !== "string" && !(0, import_schema.isVariableBinding)(props.action)) {
2489
+ if (props.action !== void 0 && typeof props.action !== "string" && !(0, import_schema15.isVariableBinding)(props.action)) {
2246
2490
  errors.push('Form "action" must be a string when provided.');
2247
2491
  }
2248
- if (props.method !== void 0 && !(0, import_schema.isVariableBinding)(props.method)) {
2492
+ if (props.method !== void 0 && !(0, import_schema15.isVariableBinding)(props.method)) {
2249
2493
  if (!["GET", "POST", "get", "post"].includes(props.method)) {
2250
2494
  errors.push('Form "method" must be either "GET" or "POST".');
2251
2495
  }
2252
2496
  }
2253
- if (props.target !== void 0 && !(0, import_schema.isVariableBinding)(props.target)) {
2497
+ if (props.target !== void 0 && !(0, import_schema15.isVariableBinding)(props.target)) {
2254
2498
  if (!["_self", "_blank", "_parent", "_top"].includes(props.target)) {
2255
2499
  errors.push('Form "target" must be one of: "_self", "_blank", "_parent", "_top".');
2256
2500
  }
2257
2501
  }
2258
- if (props.autoComplete !== void 0 && !(0, import_schema.isVariableBinding)(props.autoComplete)) {
2502
+ if (props.autoComplete !== void 0 && !(0, import_schema15.isVariableBinding)(props.autoComplete)) {
2259
2503
  if (!["on", "off"].includes(props.autoComplete)) {
2260
2504
  errors.push('Form "autoComplete" must be either "on" or "off".');
2261
2505
  }
2262
2506
  }
2263
- if (props.preventDefault !== void 0 && typeof props.preventDefault !== "boolean" && !(0, import_schema.isVariableBinding)(props.preventDefault)) {
2507
+ if (props.preventDefault !== void 0 && typeof props.preventDefault !== "boolean" && !(0, import_schema15.isVariableBinding)(props.preventDefault)) {
2264
2508
  errors.push('Form "preventDefault" must be a boolean when provided.');
2265
2509
  }
2266
- if (props.scrollToFirstError !== void 0 && typeof props.scrollToFirstError !== "boolean" && !(0, import_schema.isVariableBinding)(props.scrollToFirstError)) {
2510
+ if (props.scrollToFirstError !== void 0 && typeof props.scrollToFirstError !== "boolean" && !(0, import_schema15.isVariableBinding)(props.scrollToFirstError)) {
2267
2511
  errors.push('Form "scrollToFirstError" must be a boolean when provided.');
2268
2512
  }
2269
- if (props.resetOnSubmit !== void 0 && typeof props.resetOnSubmit !== "boolean" && !(0, import_schema.isVariableBinding)(props.resetOnSubmit)) {
2513
+ if (props.resetOnSubmit !== void 0 && typeof props.resetOnSubmit !== "boolean" && !(0, import_schema15.isVariableBinding)(props.resetOnSubmit)) {
2270
2514
  errors.push('Form "resetOnSubmit" must be a boolean when provided.');
2271
2515
  }
2272
2516
  return errors.length > 0 ? errors : true;
@@ -2280,6 +2524,9 @@ var formDefinition = {
2280
2524
  }
2281
2525
  }
2282
2526
  };
2527
+
2528
+ // src/definitions/form/input.ts
2529
+ var import_schema16 = require("@kubuild/schema");
2283
2530
  var inputDefinition = {
2284
2531
  type: "input",
2285
2532
  label: "Input",
@@ -2361,47 +2608,47 @@ var inputDefinition = {
2361
2608
  ],
2362
2609
  validateProps: (props) => {
2363
2610
  const errors = [];
2364
- if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema.isVariableBinding)(props.name)) {
2611
+ if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema16.isVariableBinding)(props.name)) {
2365
2612
  errors.push('Input "name" must be a string when provided.');
2366
2613
  }
2367
- if (props.type !== void 0 && !(0, import_schema.isVariableBinding)(props.type)) {
2614
+ if (props.type !== void 0 && !(0, import_schema16.isVariableBinding)(props.type)) {
2368
2615
  const validTypes = ["text", "email", "number", "password", "tel", "url", "search", "date", "hidden"];
2369
2616
  if (!validTypes.includes(props.type)) {
2370
2617
  errors.push(`Input "type" must be one of: ${validTypes.join(", ")}.`);
2371
2618
  }
2372
2619
  }
2373
- if (props.placeholder !== void 0 && typeof props.placeholder !== "string" && !(0, import_schema.isVariableBinding)(props.placeholder)) {
2620
+ if (props.placeholder !== void 0 && typeof props.placeholder !== "string" && !(0, import_schema16.isVariableBinding)(props.placeholder)) {
2374
2621
  errors.push('Input "placeholder" must be a string when provided.');
2375
2622
  }
2376
- if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema.isVariableBinding)(props.required)) {
2623
+ if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema16.isVariableBinding)(props.required)) {
2377
2624
  errors.push('Input "required" must be a boolean when provided.');
2378
2625
  }
2379
- if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema.isVariableBinding)(props.disabled)) {
2626
+ if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema16.isVariableBinding)(props.disabled)) {
2380
2627
  errors.push('Input "disabled" must be a boolean when provided.');
2381
2628
  }
2382
- if (props.readOnly !== void 0 && typeof props.readOnly !== "boolean" && !(0, import_schema.isVariableBinding)(props.readOnly)) {
2629
+ if (props.readOnly !== void 0 && typeof props.readOnly !== "boolean" && !(0, import_schema16.isVariableBinding)(props.readOnly)) {
2383
2630
  errors.push('Input "readOnly" must be a boolean when provided.');
2384
2631
  }
2385
- if (props.pattern !== void 0 && typeof props.pattern !== "string" && !(0, import_schema.isVariableBinding)(props.pattern)) {
2632
+ if (props.pattern !== void 0 && typeof props.pattern !== "string" && !(0, import_schema16.isVariableBinding)(props.pattern)) {
2386
2633
  errors.push('Input "pattern" must be a string when provided.');
2387
2634
  }
2388
- if (props.minLength !== void 0 && !(0, import_schema.isVariableBinding)(props.minLength)) {
2635
+ if (props.minLength !== void 0 && !(0, import_schema16.isVariableBinding)(props.minLength)) {
2389
2636
  if (typeof props.minLength !== "number" || props.minLength < 0 || !Number.isInteger(props.minLength)) {
2390
2637
  errors.push('Input "minLength" must be a non-negative integer when provided.');
2391
2638
  }
2392
2639
  }
2393
- if (props.maxLength !== void 0 && !(0, import_schema.isVariableBinding)(props.maxLength)) {
2640
+ if (props.maxLength !== void 0 && !(0, import_schema16.isVariableBinding)(props.maxLength)) {
2394
2641
  if (typeof props.maxLength !== "number" || props.maxLength < 0 || !Number.isInteger(props.maxLength)) {
2395
2642
  errors.push('Input "maxLength" must be a non-negative integer when provided.');
2396
2643
  }
2397
2644
  }
2398
- if (props.prefixIcon !== void 0 && typeof props.prefixIcon !== "string" && !(0, import_schema.isVariableBinding)(props.prefixIcon)) {
2645
+ if (props.prefixIcon !== void 0 && typeof props.prefixIcon !== "string" && !(0, import_schema16.isVariableBinding)(props.prefixIcon)) {
2399
2646
  errors.push('Input "prefixIcon" must be a string when provided.');
2400
2647
  }
2401
- if (props.suffixIcon !== void 0 && typeof props.suffixIcon !== "string" && !(0, import_schema.isVariableBinding)(props.suffixIcon)) {
2648
+ if (props.suffixIcon !== void 0 && typeof props.suffixIcon !== "string" && !(0, import_schema16.isVariableBinding)(props.suffixIcon)) {
2402
2649
  errors.push('Input "suffixIcon" must be a string when provided.');
2403
2650
  }
2404
- if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema.isVariableBinding)(props.helperText)) {
2651
+ if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema16.isVariableBinding)(props.helperText)) {
2405
2652
  errors.push('Input "helperText" must be a string when provided.');
2406
2653
  }
2407
2654
  return errors.length > 0 ? errors : true;
@@ -2424,6 +2671,9 @@ var inputDefinition = {
2424
2671
  }
2425
2672
  }
2426
2673
  };
2674
+
2675
+ // src/definitions/form/textarea.ts
2676
+ var import_schema17 = require("@kubuild/schema");
2427
2677
  var textareaDefinition = {
2428
2678
  type: "textarea",
2429
2679
  label: "Textarea",
@@ -2485,41 +2735,41 @@ var textareaDefinition = {
2485
2735
  ],
2486
2736
  validateProps: (props) => {
2487
2737
  const errors = [];
2488
- if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema.isVariableBinding)(props.name)) {
2738
+ if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema17.isVariableBinding)(props.name)) {
2489
2739
  errors.push('Textarea "name" must be a string when provided.');
2490
2740
  }
2491
- if (props.rows !== void 0 && !(0, import_schema.isVariableBinding)(props.rows)) {
2741
+ if (props.rows !== void 0 && !(0, import_schema17.isVariableBinding)(props.rows)) {
2492
2742
  if (typeof props.rows !== "number" || props.rows < 1 || !Number.isInteger(props.rows)) {
2493
2743
  errors.push('Textarea "rows" must be a positive integer (>= 1).');
2494
2744
  }
2495
2745
  }
2496
- if (props.placeholder !== void 0 && typeof props.placeholder !== "string" && !(0, import_schema.isVariableBinding)(props.placeholder)) {
2746
+ if (props.placeholder !== void 0 && typeof props.placeholder !== "string" && !(0, import_schema17.isVariableBinding)(props.placeholder)) {
2497
2747
  errors.push('Textarea "placeholder" must be a string when provided.');
2498
2748
  }
2499
- if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema.isVariableBinding)(props.required)) {
2749
+ if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema17.isVariableBinding)(props.required)) {
2500
2750
  errors.push('Textarea "required" must be a boolean when provided.');
2501
2751
  }
2502
- if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema.isVariableBinding)(props.disabled)) {
2752
+ if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema17.isVariableBinding)(props.disabled)) {
2503
2753
  errors.push('Textarea "disabled" must be a boolean when provided.');
2504
2754
  }
2505
- if (props.readOnly !== void 0 && typeof props.readOnly !== "boolean" && !(0, import_schema.isVariableBinding)(props.readOnly)) {
2755
+ if (props.readOnly !== void 0 && typeof props.readOnly !== "boolean" && !(0, import_schema17.isVariableBinding)(props.readOnly)) {
2506
2756
  errors.push('Textarea "readOnly" must be a boolean when provided.');
2507
2757
  }
2508
- if (props.resize !== void 0 && !(0, import_schema.isVariableBinding)(props.resize)) {
2758
+ if (props.resize !== void 0 && !(0, import_schema17.isVariableBinding)(props.resize)) {
2509
2759
  const allowedResize = ["vertical", "horizontal", "both", "none"];
2510
2760
  if (typeof props.resize !== "string" || !allowedResize.includes(props.resize)) {
2511
2761
  errors.push(`Textarea "resize" must be one of: ${allowedResize.join(", ")}.`);
2512
2762
  }
2513
2763
  }
2514
- if (props.autoGrow !== void 0 && typeof props.autoGrow !== "boolean" && !(0, import_schema.isVariableBinding)(props.autoGrow)) {
2764
+ if (props.autoGrow !== void 0 && typeof props.autoGrow !== "boolean" && !(0, import_schema17.isVariableBinding)(props.autoGrow)) {
2515
2765
  errors.push('Textarea "autoGrow" must be a boolean when provided.');
2516
2766
  }
2517
- if (props.maxCharCount !== void 0 && !(0, import_schema.isVariableBinding)(props.maxCharCount)) {
2767
+ if (props.maxCharCount !== void 0 && !(0, import_schema17.isVariableBinding)(props.maxCharCount)) {
2518
2768
  if (typeof props.maxCharCount !== "number" || props.maxCharCount < 1 || !Number.isInteger(props.maxCharCount)) {
2519
2769
  errors.push('Textarea "maxCharCount" must be a positive integer (>= 1) when provided.');
2520
2770
  }
2521
2771
  }
2522
- if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema.isVariableBinding)(props.helperText)) {
2772
+ if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema17.isVariableBinding)(props.helperText)) {
2523
2773
  errors.push('Textarea "helperText" must be a string when provided.');
2524
2774
  }
2525
2775
  return errors.length > 0 ? errors : true;
@@ -2542,6 +2792,9 @@ var textareaDefinition = {
2542
2792
  }
2543
2793
  }
2544
2794
  };
2795
+
2796
+ // src/definitions/form/select.ts
2797
+ var import_schema18 = require("@kubuild/schema");
2545
2798
  var selectDefinition = {
2546
2799
  type: "select",
2547
2800
  label: "Select",
@@ -2593,21 +2846,21 @@ var selectDefinition = {
2593
2846
  ],
2594
2847
  validateProps: (props) => {
2595
2848
  const errors = [];
2596
- if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema.isVariableBinding)(props.name)) {
2849
+ if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema18.isVariableBinding)(props.name)) {
2597
2850
  errors.push('Select "name" must be a string when provided.');
2598
2851
  }
2599
- if (props.options !== void 0 && !(0, import_schema.isVariableBinding)(props.options)) {
2852
+ if (props.options !== void 0 && !(0, import_schema18.isVariableBinding)(props.options)) {
2600
2853
  if (!Array.isArray(props.options) && typeof props.options !== "string") {
2601
2854
  errors.push('Select "options" must be an array of option objects or a JSON string.');
2602
2855
  }
2603
2856
  }
2604
- if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema.isVariableBinding)(props.required)) {
2857
+ if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema18.isVariableBinding)(props.required)) {
2605
2858
  errors.push('Select "required" must be a boolean when provided.');
2606
2859
  }
2607
- if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema.isVariableBinding)(props.disabled)) {
2860
+ if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema18.isVariableBinding)(props.disabled)) {
2608
2861
  errors.push('Select "disabled" must be a boolean when provided.');
2609
2862
  }
2610
- if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema.isVariableBinding)(props.helperText)) {
2863
+ if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema18.isVariableBinding)(props.helperText)) {
2611
2864
  errors.push('Select "helperText" must be a string when provided.');
2612
2865
  }
2613
2866
  return errors.length > 0 ? errors : true;
@@ -2630,6 +2883,9 @@ var selectDefinition = {
2630
2883
  }
2631
2884
  }
2632
2885
  };
2886
+
2887
+ // src/definitions/form/checkbox.ts
2888
+ var import_schema19 = require("@kubuild/schema");
2633
2889
  var checkboxDefinition = {
2634
2890
  type: "checkbox",
2635
2891
  label: "Checkbox",
@@ -2671,28 +2927,28 @@ var checkboxDefinition = {
2671
2927
  ],
2672
2928
  validateProps: (props) => {
2673
2929
  const errors = [];
2674
- if (props.label !== void 0 && typeof props.label !== "string" && !(0, import_schema.isVariableBinding)(props.label)) {
2930
+ if (props.label !== void 0 && typeof props.label !== "string" && !(0, import_schema19.isVariableBinding)(props.label)) {
2675
2931
  errors.push('Checkbox "label" must be a string when provided.');
2676
2932
  }
2677
- if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema.isVariableBinding)(props.name)) {
2933
+ if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema19.isVariableBinding)(props.name)) {
2678
2934
  errors.push('Checkbox "name" must be a string when provided.');
2679
2935
  }
2680
- if (props.value !== void 0 && typeof props.value !== "string" && !(0, import_schema.isVariableBinding)(props.value)) {
2936
+ if (props.value !== void 0 && typeof props.value !== "string" && !(0, import_schema19.isVariableBinding)(props.value)) {
2681
2937
  errors.push('Checkbox "value" must be a string when provided.');
2682
2938
  }
2683
- if (props.defaultChecked !== void 0 && typeof props.defaultChecked !== "boolean" && !(0, import_schema.isVariableBinding)(props.defaultChecked)) {
2939
+ if (props.defaultChecked !== void 0 && typeof props.defaultChecked !== "boolean" && !(0, import_schema19.isVariableBinding)(props.defaultChecked)) {
2684
2940
  errors.push('Checkbox "defaultChecked" must be a boolean when provided.');
2685
2941
  }
2686
- if (props.indeterminate !== void 0 && typeof props.indeterminate !== "boolean" && !(0, import_schema.isVariableBinding)(props.indeterminate)) {
2942
+ if (props.indeterminate !== void 0 && typeof props.indeterminate !== "boolean" && !(0, import_schema19.isVariableBinding)(props.indeterminate)) {
2687
2943
  errors.push('Checkbox "indeterminate" must be a boolean when provided.');
2688
2944
  }
2689
- if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema.isVariableBinding)(props.required)) {
2945
+ if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema19.isVariableBinding)(props.required)) {
2690
2946
  errors.push('Checkbox "required" must be a boolean when provided.');
2691
2947
  }
2692
- if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema.isVariableBinding)(props.disabled)) {
2948
+ if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema19.isVariableBinding)(props.disabled)) {
2693
2949
  errors.push('Checkbox "disabled" must be a boolean when provided.');
2694
2950
  }
2695
- if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema.isVariableBinding)(props.helperText)) {
2951
+ if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema19.isVariableBinding)(props.helperText)) {
2696
2952
  errors.push('Checkbox "helperText" must be a string when provided.');
2697
2953
  }
2698
2954
  return errors.length > 0 ? errors : true;
@@ -2709,6 +2965,9 @@ var checkboxDefinition = {
2709
2965
  }
2710
2966
  }
2711
2967
  };
2968
+
2969
+ // src/definitions/form/switch.ts
2970
+ var import_schema20 = require("@kubuild/schema");
2712
2971
  var switchDefinition = {
2713
2972
  type: "switch",
2714
2973
  label: "Switch",
@@ -2760,31 +3019,31 @@ var switchDefinition = {
2760
3019
  ],
2761
3020
  validateProps: (props) => {
2762
3021
  const errors = [];
2763
- if (props.label !== void 0 && typeof props.label !== "string" && !(0, import_schema.isVariableBinding)(props.label)) {
3022
+ if (props.label !== void 0 && typeof props.label !== "string" && !(0, import_schema20.isVariableBinding)(props.label)) {
2764
3023
  errors.push('Switch "label" must be a string when provided.');
2765
3024
  }
2766
- if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema.isVariableBinding)(props.name)) {
3025
+ if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema20.isVariableBinding)(props.name)) {
2767
3026
  errors.push('Switch "name" must be a string when provided.');
2768
3027
  }
2769
- if (props.value !== void 0 && typeof props.value !== "string" && !(0, import_schema.isVariableBinding)(props.value)) {
3028
+ if (props.value !== void 0 && typeof props.value !== "string" && !(0, import_schema20.isVariableBinding)(props.value)) {
2770
3029
  errors.push('Switch "value" must be a string when provided.');
2771
3030
  }
2772
- if (props.defaultChecked !== void 0 && typeof props.defaultChecked !== "boolean" && !(0, import_schema.isVariableBinding)(props.defaultChecked)) {
3031
+ if (props.defaultChecked !== void 0 && typeof props.defaultChecked !== "boolean" && !(0, import_schema20.isVariableBinding)(props.defaultChecked)) {
2773
3032
  errors.push('Switch "defaultChecked" must be a boolean when provided.');
2774
3033
  }
2775
- if (props.switchSize !== void 0 && !(0, import_schema.isVariableBinding)(props.switchSize)) {
3034
+ if (props.switchSize !== void 0 && !(0, import_schema20.isVariableBinding)(props.switchSize)) {
2776
3035
  const allowedSizes = ["sm", "md", "lg"];
2777
3036
  if (typeof props.switchSize !== "string" || !allowedSizes.includes(props.switchSize)) {
2778
3037
  errors.push(`Switch "switchSize" must be one of: ${allowedSizes.join(", ")}.`);
2779
3038
  }
2780
3039
  }
2781
- if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema.isVariableBinding)(props.required)) {
3040
+ if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema20.isVariableBinding)(props.required)) {
2782
3041
  errors.push('Switch "required" must be a boolean when provided.');
2783
3042
  }
2784
- if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema.isVariableBinding)(props.disabled)) {
3043
+ if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema20.isVariableBinding)(props.disabled)) {
2785
3044
  errors.push('Switch "disabled" must be a boolean when provided.');
2786
3045
  }
2787
- if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema.isVariableBinding)(props.helperText)) {
3046
+ if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema20.isVariableBinding)(props.helperText)) {
2788
3047
  errors.push('Switch "helperText" must be a string when provided.');
2789
3048
  }
2790
3049
  return errors.length > 0 ? errors : true;
@@ -2801,6 +3060,9 @@ var switchDefinition = {
2801
3060
  }
2802
3061
  }
2803
3062
  };
3063
+
3064
+ // src/definitions/form/radio.ts
3065
+ var import_schema21 = require("@kubuild/schema");
2804
3066
  var radioGroupDefinition = {
2805
3067
  type: "radio-group",
2806
3068
  label: "Radio Group",
@@ -2851,25 +3113,25 @@ var radioGroupDefinition = {
2851
3113
  ],
2852
3114
  validateProps: (props) => {
2853
3115
  const errors = [];
2854
- if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema.isVariableBinding)(props.name)) {
3116
+ if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema21.isVariableBinding)(props.name)) {
2855
3117
  errors.push('RadioGroup "name" must be a string when provided.');
2856
3118
  }
2857
- if (props.defaultSelected !== void 0 && typeof props.defaultSelected !== "string" && !(0, import_schema.isVariableBinding)(props.defaultSelected)) {
3119
+ if (props.defaultSelected !== void 0 && typeof props.defaultSelected !== "string" && !(0, import_schema21.isVariableBinding)(props.defaultSelected)) {
2858
3120
  errors.push('RadioGroup "defaultSelected" must be a string when provided.');
2859
3121
  }
2860
- if (props.orientation !== void 0 && !(0, import_schema.isVariableBinding)(props.orientation)) {
3122
+ if (props.orientation !== void 0 && !(0, import_schema21.isVariableBinding)(props.orientation)) {
2861
3123
  const allowedOrientations = ["vertical", "horizontal"];
2862
3124
  if (typeof props.orientation !== "string" || !allowedOrientations.includes(props.orientation)) {
2863
3125
  errors.push(`RadioGroup "orientation" must be one of: ${allowedOrientations.join(", ")}.`);
2864
3126
  }
2865
3127
  }
2866
- if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema.isVariableBinding)(props.required)) {
3128
+ if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema21.isVariableBinding)(props.required)) {
2867
3129
  errors.push('RadioGroup "required" must be a boolean when provided.');
2868
3130
  }
2869
- if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema.isVariableBinding)(props.disabled)) {
3131
+ if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema21.isVariableBinding)(props.disabled)) {
2870
3132
  errors.push('RadioGroup "disabled" must be a boolean when provided.');
2871
3133
  }
2872
- if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema.isVariableBinding)(props.helperText)) {
3134
+ if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema21.isVariableBinding)(props.helperText)) {
2873
3135
  errors.push('RadioGroup "helperText" must be a string when provided.');
2874
3136
  }
2875
3137
  return errors.length > 0 ? errors : true;
@@ -2920,25 +3182,25 @@ var radioDefinition = {
2920
3182
  ],
2921
3183
  validateProps: (props) => {
2922
3184
  const errors = [];
2923
- if (props.label !== void 0 && typeof props.label !== "string" && !(0, import_schema.isVariableBinding)(props.label)) {
3185
+ if (props.label !== void 0 && typeof props.label !== "string" && !(0, import_schema21.isVariableBinding)(props.label)) {
2924
3186
  errors.push('Radio "label" must be a string when provided.');
2925
3187
  }
2926
- if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema.isVariableBinding)(props.name)) {
3188
+ if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema21.isVariableBinding)(props.name)) {
2927
3189
  errors.push('Radio "name" must be a string when provided.');
2928
3190
  }
2929
- if (props.value !== void 0 && typeof props.value !== "string" && !(0, import_schema.isVariableBinding)(props.value)) {
3191
+ if (props.value !== void 0 && typeof props.value !== "string" && !(0, import_schema21.isVariableBinding)(props.value)) {
2930
3192
  errors.push('Radio "value" must be a string when provided.');
2931
3193
  }
2932
- if (props.defaultChecked !== void 0 && typeof props.defaultChecked !== "boolean" && !(0, import_schema.isVariableBinding)(props.defaultChecked)) {
3194
+ if (props.defaultChecked !== void 0 && typeof props.defaultChecked !== "boolean" && !(0, import_schema21.isVariableBinding)(props.defaultChecked)) {
2933
3195
  errors.push('Radio "defaultChecked" must be a boolean when provided.');
2934
3196
  }
2935
- if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema.isVariableBinding)(props.required)) {
3197
+ if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema21.isVariableBinding)(props.required)) {
2936
3198
  errors.push('Radio "required" must be a boolean when provided.');
2937
3199
  }
2938
- if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema.isVariableBinding)(props.disabled)) {
3200
+ if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema21.isVariableBinding)(props.disabled)) {
2939
3201
  errors.push('Radio "disabled" must be a boolean when provided.');
2940
3202
  }
2941
- if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema.isVariableBinding)(props.helperText)) {
3203
+ if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema21.isVariableBinding)(props.helperText)) {
2942
3204
  errors.push('Radio "helperText" must be a string when provided.');
2943
3205
  }
2944
3206
  return errors.length > 0 ? errors : true;
@@ -2960,6 +3222,9 @@ var radioItemDefinition = {
2960
3222
  type: "radio-item",
2961
3223
  label: "Radio Item"
2962
3224
  };
3225
+
3226
+ // src/definitions/form/file-upload.ts
3227
+ var import_schema22 = require("@kubuild/schema");
2963
3228
  var fileUploadDefinition = {
2964
3229
  type: "file-upload",
2965
3230
  label: "File Upload",
@@ -3004,33 +3269,33 @@ var fileUploadDefinition = {
3004
3269
  ],
3005
3270
  validateProps: (props) => {
3006
3271
  const errors = [];
3007
- if (props.label !== void 0 && typeof props.label !== "string" && !(0, import_schema.isVariableBinding)(props.label)) {
3272
+ if (props.label !== void 0 && typeof props.label !== "string" && !(0, import_schema22.isVariableBinding)(props.label)) {
3008
3273
  errors.push('FileUpload "label" must be a string when provided.');
3009
3274
  }
3010
- if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema.isVariableBinding)(props.name)) {
3275
+ if (props.name !== void 0 && typeof props.name !== "string" && !(0, import_schema22.isVariableBinding)(props.name)) {
3011
3276
  errors.push('FileUpload "name" must be a string when provided.');
3012
3277
  }
3013
- if (props.accept !== void 0 && typeof props.accept !== "string" && !(0, import_schema.isVariableBinding)(props.accept)) {
3278
+ if (props.accept !== void 0 && typeof props.accept !== "string" && !(0, import_schema22.isVariableBinding)(props.accept)) {
3014
3279
  errors.push('FileUpload "accept" must be a string when provided.');
3015
3280
  }
3016
- if (props.maxFileSize !== void 0 && !(0, import_schema.isVariableBinding)(props.maxFileSize)) {
3281
+ if (props.maxFileSize !== void 0 && !(0, import_schema22.isVariableBinding)(props.maxFileSize)) {
3017
3282
  if (typeof props.maxFileSize !== "number" || props.maxFileSize <= 0) {
3018
3283
  errors.push('FileUpload "maxFileSize" must be a positive number when provided.');
3019
3284
  }
3020
3285
  }
3021
- if (props.multiple !== void 0 && typeof props.multiple !== "boolean" && !(0, import_schema.isVariableBinding)(props.multiple)) {
3286
+ if (props.multiple !== void 0 && typeof props.multiple !== "boolean" && !(0, import_schema22.isVariableBinding)(props.multiple)) {
3022
3287
  errors.push('FileUpload "multiple" must be a boolean when provided.');
3023
3288
  }
3024
- if (props.showPreview !== void 0 && typeof props.showPreview !== "boolean" && !(0, import_schema.isVariableBinding)(props.showPreview)) {
3289
+ if (props.showPreview !== void 0 && typeof props.showPreview !== "boolean" && !(0, import_schema22.isVariableBinding)(props.showPreview)) {
3025
3290
  errors.push('FileUpload "showPreview" must be a boolean when provided.');
3026
3291
  }
3027
- if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema.isVariableBinding)(props.required)) {
3292
+ if (props.required !== void 0 && typeof props.required !== "boolean" && !(0, import_schema22.isVariableBinding)(props.required)) {
3028
3293
  errors.push('FileUpload "required" must be a boolean when provided.');
3029
3294
  }
3030
- if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema.isVariableBinding)(props.disabled)) {
3295
+ if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema22.isVariableBinding)(props.disabled)) {
3031
3296
  errors.push('FileUpload "disabled" must be a boolean when provided.');
3032
3297
  }
3033
- if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema.isVariableBinding)(props.helperText)) {
3298
+ if (props.helperText !== void 0 && typeof props.helperText !== "string" && !(0, import_schema22.isVariableBinding)(props.helperText)) {
3034
3299
  errors.push('FileUpload "helperText" must be a string when provided.');
3035
3300
  }
3036
3301
  return errors.length > 0 ? errors : true;
@@ -3045,121 +3310,239 @@ var fileUploadDefinition = {
3045
3310
  }
3046
3311
  }
3047
3312
  };
3048
- var buttonSubmitDefinition = {
3049
- type: "button-submit",
3050
- label: "Submit Button",
3051
- category: "form",
3052
- icon: "send",
3053
- acceptsChildren: false,
3054
- capabilities: ["actionRegistry"],
3055
- disallowedParents: ["page"],
3313
+
3314
+ // src/definitions/interactive/modal.ts
3315
+ var modalDefinition = {
3316
+ type: "modal",
3317
+ label: "Modal",
3318
+ category: "interactive",
3319
+ icon: "layout",
3320
+ description: "Pop-up overlay dialog container with backdrop and close controls.",
3321
+ acceptsChildren: true,
3322
+ allowedChildren: ["*"],
3056
3323
  defaultProps: {
3057
- label: "Submit",
3058
- loadingText: "Submitting...",
3059
- showSpinner: true,
3060
- autoDisableOnSubmit: true,
3061
- variant: "primary",
3062
- disabled: false,
3063
- buttonType: "submit"
3324
+ modalId: "modal-dialog",
3325
+ title: "Modal Title",
3326
+ backdrop: true,
3327
+ closeOnBackdrop: true,
3328
+ closeOnEscape: true,
3329
+ size: "md",
3330
+ showCloseButton: true
3064
3331
  },
3065
3332
  propFields: [
3066
- { name: "label", label: "Label", type: "string", defaultValue: "Submit" },
3067
- { name: "loadingText", label: "Loading Text", type: "string", defaultValue: "Submitting..." },
3068
- { name: "showSpinner", label: "Show Loading Spinner", type: "boolean", defaultValue: true },
3069
- { name: "autoDisableOnSubmit", label: "Auto Disable on Submit", type: "boolean", defaultValue: true },
3070
3333
  {
3071
- name: "buttonType",
3072
- label: "Button Type",
3334
+ name: "modalId",
3335
+ label: "Modal Target ID",
3336
+ type: "string",
3337
+ defaultValue: "modal-dialog",
3338
+ description: "Unique identifier targeted by open_modal and close_modal actions."
3339
+ },
3340
+ {
3341
+ name: "title",
3342
+ label: "Modal Title",
3343
+ type: "string",
3344
+ defaultValue: "Modal Title",
3345
+ description: "Header title text displayed at the top of the dialog."
3346
+ },
3347
+ {
3348
+ name: "size",
3349
+ label: "Size",
3073
3350
  type: "select",
3074
- defaultValue: "submit",
3351
+ defaultValue: "md",
3075
3352
  options: [
3076
- { label: "Submit Form (submit)", value: "submit" },
3077
- { label: "Reset Form (reset)", value: "reset" }
3353
+ { label: "Small (400px)", value: "sm" },
3354
+ { label: "Medium (560px)", value: "md" },
3355
+ { label: "Large (768px)", value: "lg" },
3356
+ { label: "Full Screen", value: "fullscreen" }
3078
3357
  ]
3079
3358
  },
3080
3359
  {
3081
- name: "variant",
3082
- label: "Variant",
3360
+ name: "backdrop",
3361
+ label: "Show Backdrop",
3362
+ type: "boolean",
3363
+ defaultValue: true
3364
+ },
3365
+ {
3366
+ name: "closeOnBackdrop",
3367
+ label: "Close on Backdrop Click",
3368
+ type: "boolean",
3369
+ defaultValue: true
3370
+ },
3371
+ {
3372
+ name: "closeOnEscape",
3373
+ label: "Close on Escape Key",
3374
+ type: "boolean",
3375
+ defaultValue: true
3376
+ },
3377
+ {
3378
+ name: "showCloseButton",
3379
+ label: "Show Close Button",
3380
+ type: "boolean",
3381
+ defaultValue: true
3382
+ }
3383
+ ],
3384
+ traits: [
3385
+ idTrait(),
3386
+ titleTrait(),
3387
+ ariaLabelTrait({ description: "Accessible name for the modal dialog." })
3388
+ ],
3389
+ defaultStyles: {
3390
+ base: {
3391
+ backgroundColor: "#ffffff",
3392
+ borderRadius: "12px",
3393
+ boxShadow: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
3394
+ padding: "24px",
3395
+ maxWidth: "560px",
3396
+ width: "100%"
3397
+ }
3398
+ }
3399
+ };
3400
+
3401
+ // src/definitions/interactive/drawer.ts
3402
+ var drawerDefinition = {
3403
+ type: "drawer",
3404
+ label: "Drawer",
3405
+ category: "interactive",
3406
+ icon: "sidebar",
3407
+ description: "Off-canvas slide-over panel container, ideal for mobile navigation and side sheets.",
3408
+ acceptsChildren: true,
3409
+ allowedChildren: ["*"],
3410
+ defaultProps: {
3411
+ modalId: "mobile-drawer",
3412
+ title: "Navigation Menu",
3413
+ placement: "right",
3414
+ backdrop: true,
3415
+ closeOnBackdrop: true,
3416
+ closeOnEscape: true,
3417
+ showCloseButton: true
3418
+ },
3419
+ propFields: [
3420
+ {
3421
+ name: "modalId",
3422
+ label: "Drawer Target ID",
3423
+ type: "string",
3424
+ defaultValue: "mobile-drawer",
3425
+ description: "Unique identifier targeted by open_modal and close_modal actions."
3426
+ },
3427
+ {
3428
+ name: "placement",
3429
+ label: "Placement",
3083
3430
  type: "select",
3084
- defaultValue: "primary",
3431
+ defaultValue: "right",
3085
3432
  options: [
3086
- { label: "Primary", value: "primary" },
3087
- { label: "Secondary", value: "secondary" }
3433
+ { label: "Slide from Right", value: "right" },
3434
+ { label: "Slide from Left", value: "left" },
3435
+ { label: "Slide from Top (Dropdown)", value: "top" },
3436
+ { label: "Slide from Bottom", value: "bottom" }
3088
3437
  ]
3089
3438
  },
3090
- { name: "disabled", label: "Disabled", type: "boolean", defaultValue: false },
3091
- { name: "prefixIcon", label: "Prefix Icon", type: "string" },
3092
- { name: "suffixIcon", label: "Suffix Icon", type: "string" }
3439
+ {
3440
+ name: "title",
3441
+ label: "Drawer Title",
3442
+ type: "string",
3443
+ defaultValue: "Navigation Menu",
3444
+ description: "Header title text displayed at the top of the drawer."
3445
+ },
3446
+ {
3447
+ name: "backdrop",
3448
+ label: "Show Backdrop",
3449
+ type: "boolean",
3450
+ defaultValue: true
3451
+ },
3452
+ {
3453
+ name: "closeOnBackdrop",
3454
+ label: "Close on Backdrop Click",
3455
+ type: "boolean",
3456
+ defaultValue: true
3457
+ },
3458
+ {
3459
+ name: "closeOnEscape",
3460
+ label: "Close on Escape Key",
3461
+ type: "boolean",
3462
+ defaultValue: true
3463
+ },
3464
+ {
3465
+ name: "showCloseButton",
3466
+ label: "Show Close Button",
3467
+ type: "boolean",
3468
+ defaultValue: true
3469
+ }
3093
3470
  ],
3094
3471
  traits: [
3095
- buttonTypeTrait({
3096
- defaultValue: "submit",
3097
- options: [
3098
- { label: "Submit Form (submit)", value: "submit" },
3099
- { label: "Reset Form (reset)", value: "reset" }
3100
- ]
3101
- }),
3102
- labelTextTrait({ defaultValue: "Submit", label: "Label" }),
3103
- loadingTextTrait(),
3104
- showSpinnerTrait(),
3105
- autoDisableOnSubmitTrait(),
3106
- disabledTrait(),
3107
- prefixIconTrait(),
3108
- suffixIconTrait(),
3109
3472
  idTrait(),
3110
3473
  titleTrait(),
3111
- ariaLabelTrait()
3474
+ ariaLabelTrait({ description: "Accessible name for the off-canvas drawer." })
3112
3475
  ],
3113
- validateProps: (props) => {
3114
- const errors = [];
3115
- const hasLabel = typeof props.label === "string" && props.label.trim().length > 0 || (0, import_schema.isVariableBinding)(props.label);
3116
- if (!hasLabel) {
3117
- errors.push('Submit Button requires a non-empty "label".');
3118
- }
3119
- if (props.loadingText !== void 0 && typeof props.loadingText !== "string" && !(0, import_schema.isVariableBinding)(props.loadingText)) {
3120
- errors.push('Submit Button "loadingText" must be a string when provided.');
3121
- }
3122
- if (props.showSpinner !== void 0 && typeof props.showSpinner !== "boolean" && !(0, import_schema.isVariableBinding)(props.showSpinner)) {
3123
- errors.push('Submit Button "showSpinner" must be a boolean when provided.');
3124
- }
3125
- if (props.autoDisableOnSubmit !== void 0 && typeof props.autoDisableOnSubmit !== "boolean" && !(0, import_schema.isVariableBinding)(props.autoDisableOnSubmit)) {
3126
- errors.push('Submit Button "autoDisableOnSubmit" must be a boolean when provided.');
3127
- }
3128
- if (props.buttonType !== void 0 && !(0, import_schema.isVariableBinding)(props.buttonType)) {
3129
- if (!["submit", "reset", "button"].includes(props.buttonType)) {
3130
- errors.push('Submit Button "buttonType" must be one of: "submit", "reset", "button".');
3131
- }
3132
- }
3133
- if (props.disabled !== void 0 && typeof props.disabled !== "boolean" && !(0, import_schema.isVariableBinding)(props.disabled)) {
3134
- errors.push('Submit Button "disabled" must be a boolean when provided.');
3476
+ defaultStyles: {
3477
+ base: {
3478
+ backgroundColor: "#ffffff",
3479
+ boxShadow: "-4px 0 24px rgba(0, 0, 0, 0.15)",
3480
+ padding: "24px",
3481
+ width: "320px",
3482
+ maxWidth: "100%"
3483
+ },
3484
+ mobile: {
3485
+ width: "100%"
3135
3486
  }
3136
- return errors.length > 0 ? errors : true;
3487
+ }
3488
+ };
3489
+
3490
+ // src/definitions/interactive/collapsible.ts
3491
+ var collapsibleDefinition = {
3492
+ type: "collapsible",
3493
+ label: "Collapsible",
3494
+ category: "interactive",
3495
+ icon: "chevron-down",
3496
+ description: "In-flow expandable container that toggles visibility without a fullscreen overlay.",
3497
+ acceptsChildren: true,
3498
+ allowedChildren: ["*"],
3499
+ defaultProps: {
3500
+ modalId: "collapsible-content",
3501
+ defaultOpen: false,
3502
+ animated: true
3137
3503
  },
3504
+ propFields: [
3505
+ {
3506
+ name: "modalId",
3507
+ label: "Target ID",
3508
+ type: "string",
3509
+ defaultValue: "collapsible-content",
3510
+ description: 'Identifier targeted by Open Modal (with "Toggle" enabled) or Close Modal actions.'
3511
+ },
3512
+ {
3513
+ name: "defaultOpen",
3514
+ label: "Default Open",
3515
+ type: "boolean",
3516
+ defaultValue: false,
3517
+ description: "Whether the collapsible container starts expanded on initial render."
3518
+ },
3519
+ {
3520
+ name: "animated",
3521
+ label: "Smooth Transition",
3522
+ type: "boolean",
3523
+ defaultValue: true
3524
+ }
3525
+ ],
3526
+ traits: [
3527
+ idTrait(),
3528
+ ariaLabelTrait({ description: "Accessible name for the collapsible container." })
3529
+ ],
3138
3530
  defaultStyles: {
3139
3531
  base: {
3140
- backgroundColor: "#2563eb",
3141
- color: "#ffffff",
3142
- paddingTop: "10px",
3143
- paddingBottom: "10px",
3144
- paddingLeft: "20px",
3145
- paddingRight: "20px",
3146
- borderRadius: "6px",
3147
- fontWeight: "500",
3148
- fontSize: "15px",
3149
- border: "none",
3150
- cursor: "pointer",
3151
- display: "inline-flex",
3152
- alignItems: "center",
3153
- justifyContent: "center",
3154
- gap: "8px"
3532
+ width: "100%",
3533
+ overflow: "hidden"
3155
3534
  }
3156
3535
  }
3157
3536
  };
3537
+
3538
+ // src/definitions/index.ts
3158
3539
  var coreComponentDefinitions = [
3159
3540
  pageDefinition,
3160
3541
  sectionDefinition,
3161
3542
  containerDefinition,
3162
3543
  columnsDefinition,
3544
+ flexDefinition,
3545
+ gridDefinition,
3163
3546
  headingDefinition,
3164
3547
  textDefinition,
3165
3548
  paragraphDefinition,
@@ -3188,7 +3571,10 @@ var coreComponentDefinitions = [
3188
3571
  listItemDefinition,
3189
3572
  tableDefinition,
3190
3573
  tableRowDefinition,
3191
- tableCellDefinition
3574
+ tableCellDefinition,
3575
+ modalDefinition,
3576
+ drawerDefinition,
3577
+ collapsibleDefinition
3192
3578
  ];
3193
3579
  function createDefaultComponentRegistry() {
3194
3580
  const registry = new ComponentRegistry();
@@ -3238,13 +3624,14 @@ function isBindableField(field) {
3238
3624
  return primitiveTypeForField(field) !== void 0;
3239
3625
  }
3240
3626
 
3241
- // src/blocks.ts
3627
+ // src/blocks/types.ts
3242
3628
  var nextId = 1;
3243
3629
  function defaultGenId(prefix = "node") {
3244
3630
  return `${prefix}-${Date.now().toString(36)}-${(nextId++).toString(36)}`;
3245
3631
  }
3246
- var STARTER_BLOCKS = [
3247
- // --- Layout Blocks (STORA-241) ---
3632
+
3633
+ // src/blocks/layout.ts
3634
+ var LAYOUT_STARTER_BLOCKS = [
3248
3635
  {
3249
3636
  id: "layout-1-col",
3250
3637
  name: "1 Column",
@@ -3435,8 +3822,353 @@ var STARTER_BLOCKS = [
3435
3822
  }
3436
3823
  ]
3437
3824
  })
3825
+ }
3826
+ ];
3827
+
3828
+ // src/blocks/sections.ts
3829
+ var UI_STARTER_BLOCKS = [
3830
+ {
3831
+ id: "navbar",
3832
+ name: "Navbar",
3833
+ category: "sections",
3834
+ categoryLabel: "Navigation & Headers",
3835
+ description: "Responsive top navigation bar with brand logo, nav links, CTA button, and mobile hamburger menu",
3836
+ icon: "layout",
3837
+ createNodeTree: (gen = defaultGenId) => ({
3838
+ id: gen("section"),
3839
+ type: "section",
3840
+ styles: {
3841
+ base: {
3842
+ paddingTop: "16px",
3843
+ paddingBottom: "16px",
3844
+ paddingLeft: "24px",
3845
+ paddingRight: "24px",
3846
+ backgroundColor: "#ffffff",
3847
+ borderBottom: "1px solid #e2e8f0",
3848
+ width: "100%"
3849
+ },
3850
+ mobile: {
3851
+ paddingLeft: "16px",
3852
+ paddingRight: "16px",
3853
+ paddingTop: "12px",
3854
+ paddingBottom: "12px"
3855
+ }
3856
+ },
3857
+ children: [
3858
+ {
3859
+ id: gen("container"),
3860
+ type: "container",
3861
+ props: { tag: "div" },
3862
+ styles: {
3863
+ base: {
3864
+ maxWidth: "1200px",
3865
+ margin: "0 auto",
3866
+ display: "flex",
3867
+ alignItems: "center",
3868
+ justifyContent: "space-between",
3869
+ width: "100%",
3870
+ flexWrap: "wrap"
3871
+ }
3872
+ },
3873
+ children: [
3874
+ // 1. Brand Logo
3875
+ {
3876
+ id: gen("heading"),
3877
+ type: "heading",
3878
+ props: { text: "Brand", level: 3 },
3879
+ styles: {
3880
+ base: {
3881
+ fontSize: "20px",
3882
+ fontWeight: "800",
3883
+ color: "#0f172a",
3884
+ margin: "0"
3885
+ }
3886
+ }
3887
+ },
3888
+ // 2. Desktop Navigation Links (hidden on mobile)
3889
+ {
3890
+ id: gen("flex"),
3891
+ type: "flex",
3892
+ styles: {
3893
+ base: {
3894
+ display: "flex",
3895
+ flexDirection: "row",
3896
+ alignItems: "center",
3897
+ gap: "24px"
3898
+ },
3899
+ mobile: {
3900
+ display: "none"
3901
+ }
3902
+ },
3903
+ children: [
3904
+ {
3905
+ id: gen("link"),
3906
+ type: "link",
3907
+ props: { text: "Home", href: "#home" },
3908
+ styles: {
3909
+ base: {
3910
+ fontSize: "14px",
3911
+ fontWeight: "500",
3912
+ color: "#0f172a",
3913
+ textDecoration: "none"
3914
+ }
3915
+ }
3916
+ },
3917
+ {
3918
+ id: gen("link"),
3919
+ type: "link",
3920
+ props: { text: "Features", href: "#features" },
3921
+ styles: {
3922
+ base: {
3923
+ fontSize: "14px",
3924
+ fontWeight: "500",
3925
+ color: "#64748b",
3926
+ textDecoration: "none"
3927
+ }
3928
+ }
3929
+ },
3930
+ {
3931
+ id: gen("link"),
3932
+ type: "link",
3933
+ props: { text: "Pricing", href: "#pricing" },
3934
+ styles: {
3935
+ base: {
3936
+ fontSize: "14px",
3937
+ fontWeight: "500",
3938
+ color: "#64748b",
3939
+ textDecoration: "none"
3940
+ }
3941
+ }
3942
+ },
3943
+ {
3944
+ id: gen("link"),
3945
+ type: "link",
3946
+ props: { text: "About", href: "#about" },
3947
+ styles: {
3948
+ base: {
3949
+ fontSize: "14px",
3950
+ fontWeight: "500",
3951
+ color: "#64748b",
3952
+ textDecoration: "none"
3953
+ }
3954
+ }
3955
+ }
3956
+ ]
3957
+ },
3958
+ // 3. Desktop CTA Buttons (hidden on mobile)
3959
+ {
3960
+ id: gen("flex"),
3961
+ type: "flex",
3962
+ styles: {
3963
+ base: {
3964
+ display: "flex",
3965
+ flexDirection: "row",
3966
+ alignItems: "center",
3967
+ gap: "12px"
3968
+ },
3969
+ mobile: {
3970
+ display: "none"
3971
+ }
3972
+ },
3973
+ children: [
3974
+ {
3975
+ id: gen("link"),
3976
+ type: "link",
3977
+ props: { text: "Sign In", href: "#signin" },
3978
+ styles: {
3979
+ base: {
3980
+ fontSize: "14px",
3981
+ fontWeight: "500",
3982
+ color: "#475569",
3983
+ textDecoration: "none",
3984
+ padding: "8px 12px"
3985
+ }
3986
+ }
3987
+ },
3988
+ {
3989
+ id: gen("button"),
3990
+ type: "button",
3991
+ props: { label: "Get Started", href: "#signup" },
3992
+ styles: {
3993
+ base: {
3994
+ backgroundColor: "#2563eb",
3995
+ color: "#ffffff",
3996
+ padding: "8px 18px",
3997
+ borderRadius: "8px",
3998
+ fontSize: "14px",
3999
+ fontWeight: "600",
4000
+ display: "inline-block"
4001
+ },
4002
+ states: {
4003
+ ":hover": { backgroundColor: "#1d4ed8" }
4004
+ }
4005
+ }
4006
+ }
4007
+ ]
4008
+ },
4009
+ // 4. Mobile Hamburger Button (hidden on desktop, visible on mobile)
4010
+ {
4011
+ id: gen("button"),
4012
+ type: "button",
4013
+ props: {
4014
+ label: "\u2630",
4015
+ activeLabel: "\u2715",
4016
+ isEditable: false,
4017
+ modalId: "mobile-nav-drawer",
4018
+ ariaLabel: "Toggle navigation menu",
4019
+ variant: "secondary"
4020
+ },
4021
+ styles: {
4022
+ base: {
4023
+ display: "none"
4024
+ },
4025
+ mobile: {
4026
+ display: "inline-flex",
4027
+ alignItems: "center",
4028
+ justifyContent: "center",
4029
+ padding: "6px 12px",
4030
+ fontSize: "18px",
4031
+ backgroundColor: "#f8fafc",
4032
+ border: "1px solid #e2e8f0",
4033
+ borderRadius: "6px",
4034
+ color: "#0f172a",
4035
+ cursor: "pointer"
4036
+ }
4037
+ },
4038
+ actions: [
4039
+ {
4040
+ id: gen("pipeline"),
4041
+ trigger: "click",
4042
+ label: "Toggle Mobile Menu",
4043
+ enabled: true,
4044
+ steps: [
4045
+ {
4046
+ id: gen("step"),
4047
+ type: "open_modal",
4048
+ label: "Toggle Navigation Drawer",
4049
+ payload: {
4050
+ modalId: "mobile-nav-drawer",
4051
+ toggle: true
4052
+ }
4053
+ }
4054
+ ]
4055
+ }
4056
+ ]
4057
+ },
4058
+ // 5. Mobile Navigation Dropdown (hidden on desktop, stacked on mobile)
4059
+ // A `collapsible`, not a plain flex: this is an in-flow disclosure that expands
4060
+ // inside the navbar (its width/border styles depend on staying there), so it must
4061
+ // not be treated as a floating overlay. The dedicated renderer also keeps it
4062
+ // visible while editing, so the menu's links stay reachable on the canvas, and
4063
+ // only honours the open/closed state at runtime.
4064
+ {
4065
+ id: gen("collapsible"),
4066
+ type: "collapsible",
4067
+ props: {
4068
+ modalId: "mobile-nav-drawer",
4069
+ ariaLabel: "Mobile navigation menu",
4070
+ defaultOpen: false,
4071
+ animated: true
4072
+ },
4073
+ styles: {
4074
+ base: {
4075
+ display: "none"
4076
+ },
4077
+ mobile: {
4078
+ display: "flex",
4079
+ flexDirection: "column",
4080
+ width: "100%",
4081
+ gap: "8px",
4082
+ paddingTop: "16px",
4083
+ marginTop: "12px",
4084
+ borderTop: "1px solid #f1f5f9"
4085
+ }
4086
+ },
4087
+ children: [
4088
+ {
4089
+ id: gen("link"),
4090
+ type: "link",
4091
+ props: { text: "Home", href: "#home" },
4092
+ styles: {
4093
+ base: {
4094
+ fontSize: "14px",
4095
+ fontWeight: "500",
4096
+ color: "#0f172a",
4097
+ textDecoration: "none",
4098
+ padding: "6px 0"
4099
+ }
4100
+ }
4101
+ },
4102
+ {
4103
+ id: gen("link"),
4104
+ type: "link",
4105
+ props: { text: "Features", href: "#features" },
4106
+ styles: {
4107
+ base: {
4108
+ fontSize: "14px",
4109
+ fontWeight: "500",
4110
+ color: "#64748b",
4111
+ textDecoration: "none",
4112
+ padding: "6px 0"
4113
+ }
4114
+ }
4115
+ },
4116
+ {
4117
+ id: gen("link"),
4118
+ type: "link",
4119
+ props: { text: "Pricing", href: "#pricing" },
4120
+ styles: {
4121
+ base: {
4122
+ fontSize: "14px",
4123
+ fontWeight: "500",
4124
+ color: "#64748b",
4125
+ textDecoration: "none",
4126
+ padding: "6px 0"
4127
+ }
4128
+ }
4129
+ },
4130
+ {
4131
+ id: gen("link"),
4132
+ type: "link",
4133
+ props: { text: "About", href: "#about" },
4134
+ styles: {
4135
+ base: {
4136
+ fontSize: "14px",
4137
+ fontWeight: "500",
4138
+ color: "#64748b",
4139
+ textDecoration: "none",
4140
+ padding: "6px 0"
4141
+ }
4142
+ }
4143
+ },
4144
+ {
4145
+ id: gen("button"),
4146
+ type: "button",
4147
+ props: { label: "Get Started", href: "#signup" },
4148
+ styles: {
4149
+ base: {
4150
+ backgroundColor: "#2563eb",
4151
+ color: "#ffffff",
4152
+ padding: "10px 16px",
4153
+ borderRadius: "8px",
4154
+ fontSize: "14px",
4155
+ fontWeight: "600",
4156
+ textAlign: "center",
4157
+ display: "block",
4158
+ marginTop: "8px"
4159
+ },
4160
+ states: {
4161
+ ":hover": { backgroundColor: "#1d4ed8" }
4162
+ }
4163
+ }
4164
+ }
4165
+ ]
4166
+ }
4167
+ ]
4168
+ }
4169
+ ]
4170
+ })
3438
4171
  },
3439
- // --- Pre-composed UI Blocks (STORA-242) ---
3440
4172
  {
3441
4173
  id: "hero-section",
3442
4174
  name: "Hero Section",
@@ -3753,8 +4485,11 @@ var STARTER_BLOCKS = [
3753
4485
  }
3754
4486
  ]
3755
4487
  })
3756
- },
3757
- // --- Starter Form Templates (STORA-350) ---
4488
+ }
4489
+ ];
4490
+
4491
+ // src/blocks/forms.ts
4492
+ var FORM_STARTER_BLOCKS = [
3758
4493
  {
3759
4494
  id: "form-contact-us",
3760
4495
  name: "Contact Us Form",
@@ -4504,12 +5239,24 @@ var STARTER_BLOCKS = [
4504
5239
  })
4505
5240
  }
4506
5241
  ];
5242
+
5243
+ // src/blocks/index.ts
5244
+ var STARTER_BLOCKS = [
5245
+ ...LAYOUT_STARTER_BLOCKS,
5246
+ ...UI_STARTER_BLOCKS,
5247
+ ...FORM_STARTER_BLOCKS
5248
+ ];
4507
5249
  // Annotate the CommonJS export names for ESM import in node:
4508
5250
  0 && (module.exports = {
5251
+ CONTENT_CHILD_TYPES,
4509
5252
  ComponentRegistry,
5253
+ FORM_STARTER_BLOCKS,
5254
+ LAYOUT_PARENTS,
5255
+ LAYOUT_STARTER_BLOCKS,
4510
5256
  STARTER_BLOCKS,
4511
5257
  TRAIT_GROUP_LABELS,
4512
5258
  TRAIT_GROUP_ORDER,
5259
+ UI_STARTER_BLOCKS,
4513
5260
  acceptTrait,
4514
5261
  actionTrait,
4515
5262
  altTrait,
@@ -4527,6 +5274,7 @@ var STARTER_BLOCKS = [
4527
5274
  citeTrait,
4528
5275
  codeBlockDefinition,
4529
5276
  colSpanTrait,
5277
+ collapsibleDefinition,
4530
5278
  collectTraitNames,
4531
5279
  collectionDefinition,
4532
5280
  columnsDefinition,
@@ -4535,13 +5283,17 @@ var STARTER_BLOCKS = [
4535
5283
  coreComponentDefinitions,
4536
5284
  createDefaultComponentRegistry,
4537
5285
  defaultCheckedTrait,
5286
+ defaultGenId,
4538
5287
  defaultSelectedTrait,
4539
5288
  defaultValueTrait,
4540
5289
  disabledTrait,
5290
+ drawerDefinition,
4541
5291
  extractComponentRequirements,
4542
5292
  fieldNameTrait,
4543
5293
  fileUploadDefinition,
5294
+ flexDefinition,
4544
5295
  formDefinition,
5296
+ gridDefinition,
4545
5297
  headingDefinition,
4546
5298
  helperTextTrait,
4547
5299
  hrefTrait,
@@ -4565,6 +5317,7 @@ var STARTER_BLOCKS = [
4565
5317
  maxLengthTrait,
4566
5318
  methodTrait,
4567
5319
  minLengthTrait,
5320
+ modalDefinition,
4568
5321
  multipleTrait,
4569
5322
  mutedTrait,
4570
5323
  optionsListTrait,
@@ -4606,6 +5359,7 @@ var STARTER_BLOCKS = [
4606
5359
  textareaDefinition,
4607
5360
  titleTrait,
4608
5361
  valueTrait,
4609
- videoDefinition
5362
+ videoDefinition,
5363
+ withOverrides
4610
5364
  });
4611
5365
  //# sourceMappingURL=index.cjs.map