@mihcm/ai-ui 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/README.md +100 -0
  2. package/dist/coverage.d.ts +17 -0
  3. package/dist/coverage.d.ts.map +1 -0
  4. package/dist/coverage.js +320 -0
  5. package/dist/coverage.js.map +1 -0
  6. package/dist/index.d.ts +5 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +5 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/renderer.d.ts +36 -0
  11. package/dist/renderer.d.ts.map +1 -0
  12. package/dist/renderer.js +413 -0
  13. package/dist/renderer.js.map +1 -0
  14. package/dist/schemas/Accordion.d.ts +25 -0
  15. package/dist/schemas/Accordion.d.ts.map +1 -0
  16. package/dist/schemas/Accordion.js +26 -0
  17. package/dist/schemas/Accordion.js.map +1 -0
  18. package/dist/schemas/Alert.d.ts +24 -0
  19. package/dist/schemas/Alert.d.ts.map +1 -0
  20. package/dist/schemas/Alert.js +20 -0
  21. package/dist/schemas/Alert.js.map +1 -0
  22. package/dist/schemas/AlertDialog.d.ts +29 -0
  23. package/dist/schemas/AlertDialog.d.ts.map +1 -0
  24. package/dist/schemas/AlertDialog.js +22 -0
  25. package/dist/schemas/AlertDialog.js.map +1 -0
  26. package/dist/schemas/Avatar.d.ts +29 -0
  27. package/dist/schemas/Avatar.d.ts.map +1 -0
  28. package/dist/schemas/Avatar.js +21 -0
  29. package/dist/schemas/Avatar.js.map +1 -0
  30. package/dist/schemas/AvatarGroup.d.ts +22 -0
  31. package/dist/schemas/AvatarGroup.d.ts.map +1 -0
  32. package/dist/schemas/AvatarGroup.js +23 -0
  33. package/dist/schemas/AvatarGroup.js.map +1 -0
  34. package/dist/schemas/Badge.d.ts +23 -0
  35. package/dist/schemas/Badge.d.ts.map +1 -0
  36. package/dist/schemas/Badge.js +19 -0
  37. package/dist/schemas/Badge.js.map +1 -0
  38. package/dist/schemas/Banner.d.ts +23 -0
  39. package/dist/schemas/Banner.d.ts.map +1 -0
  40. package/dist/schemas/Banner.js +20 -0
  41. package/dist/schemas/Banner.js.map +1 -0
  42. package/dist/schemas/Breadcrumb.d.ts +20 -0
  43. package/dist/schemas/Breadcrumb.d.ts.map +1 -0
  44. package/dist/schemas/Breadcrumb.js +25 -0
  45. package/dist/schemas/Breadcrumb.js.map +1 -0
  46. package/dist/schemas/Button.d.ts +40 -0
  47. package/dist/schemas/Button.d.ts.map +1 -0
  48. package/dist/schemas/Button.js +26 -0
  49. package/dist/schemas/Button.js.map +1 -0
  50. package/dist/schemas/Card.d.ts +21 -0
  51. package/dist/schemas/Card.d.ts.map +1 -0
  52. package/dist/schemas/Card.js +22 -0
  53. package/dist/schemas/Card.js.map +1 -0
  54. package/dist/schemas/Checkbox.d.ts +18 -0
  55. package/dist/schemas/Checkbox.d.ts.map +1 -0
  56. package/dist/schemas/Checkbox.js +19 -0
  57. package/dist/schemas/Checkbox.js.map +1 -0
  58. package/dist/schemas/Dialog.d.ts +24 -0
  59. package/dist/schemas/Dialog.d.ts.map +1 -0
  60. package/dist/schemas/Dialog.js +20 -0
  61. package/dist/schemas/Dialog.js.map +1 -0
  62. package/dist/schemas/DropdownMenu.d.ts +25 -0
  63. package/dist/schemas/DropdownMenu.d.ts.map +1 -0
  64. package/dist/schemas/DropdownMenu.js +29 -0
  65. package/dist/schemas/DropdownMenu.js.map +1 -0
  66. package/dist/schemas/EmptyState.d.ts +16 -0
  67. package/dist/schemas/EmptyState.d.ts.map +1 -0
  68. package/dist/schemas/EmptyState.js +17 -0
  69. package/dist/schemas/EmptyState.js.map +1 -0
  70. package/dist/schemas/Input.d.ts +42 -0
  71. package/dist/schemas/Input.d.ts.map +1 -0
  72. package/dist/schemas/Input.js +31 -0
  73. package/dist/schemas/Input.js.map +1 -0
  74. package/dist/schemas/Label.d.ts +24 -0
  75. package/dist/schemas/Label.d.ts.map +1 -0
  76. package/dist/schemas/Label.js +21 -0
  77. package/dist/schemas/Label.js.map +1 -0
  78. package/dist/schemas/Link.d.ts +30 -0
  79. package/dist/schemas/Link.d.ts.map +1 -0
  80. package/dist/schemas/Link.js +22 -0
  81. package/dist/schemas/Link.js.map +1 -0
  82. package/dist/schemas/Pagination.d.ts +19 -0
  83. package/dist/schemas/Pagination.d.ts.map +1 -0
  84. package/dist/schemas/Pagination.js +20 -0
  85. package/dist/schemas/Pagination.js.map +1 -0
  86. package/dist/schemas/Progress.d.ts +27 -0
  87. package/dist/schemas/Progress.d.ts.map +1 -0
  88. package/dist/schemas/Progress.js +20 -0
  89. package/dist/schemas/Progress.js.map +1 -0
  90. package/dist/schemas/RadioGroup.d.ts +25 -0
  91. package/dist/schemas/RadioGroup.d.ts.map +1 -0
  92. package/dist/schemas/RadioGroup.js +26 -0
  93. package/dist/schemas/RadioGroup.js.map +1 -0
  94. package/dist/schemas/SectionHeader.d.ts +160 -0
  95. package/dist/schemas/SectionHeader.d.ts.map +1 -0
  96. package/dist/schemas/SectionHeader.js +52 -0
  97. package/dist/schemas/SectionHeader.js.map +1 -0
  98. package/dist/schemas/Select.d.ts +38 -0
  99. package/dist/schemas/Select.d.ts.map +1 -0
  100. package/dist/schemas/Select.js +36 -0
  101. package/dist/schemas/Select.js.map +1 -0
  102. package/dist/schemas/Separator.d.ts +16 -0
  103. package/dist/schemas/Separator.d.ts.map +1 -0
  104. package/dist/schemas/Separator.js +14 -0
  105. package/dist/schemas/Separator.js.map +1 -0
  106. package/dist/schemas/Sheet.d.ts +28 -0
  107. package/dist/schemas/Sheet.d.ts.map +1 -0
  108. package/dist/schemas/Sheet.js +20 -0
  109. package/dist/schemas/Sheet.js.map +1 -0
  110. package/dist/schemas/Stack.d.ts +58 -0
  111. package/dist/schemas/Stack.d.ts.map +1 -0
  112. package/dist/schemas/Stack.js +80 -0
  113. package/dist/schemas/Stack.js.map +1 -0
  114. package/dist/schemas/StatCard.d.ts +30 -0
  115. package/dist/schemas/StatCard.d.ts.map +1 -0
  116. package/dist/schemas/StatCard.js +26 -0
  117. package/dist/schemas/StatCard.js.map +1 -0
  118. package/dist/schemas/StatusBadge.d.ts +25 -0
  119. package/dist/schemas/StatusBadge.d.ts.map +1 -0
  120. package/dist/schemas/StatusBadge.js +20 -0
  121. package/dist/schemas/StatusBadge.js.map +1 -0
  122. package/dist/schemas/Switch.d.ts +23 -0
  123. package/dist/schemas/Switch.d.ts.map +1 -0
  124. package/dist/schemas/Switch.js +20 -0
  125. package/dist/schemas/Switch.js.map +1 -0
  126. package/dist/schemas/Table.d.ts +20 -0
  127. package/dist/schemas/Table.d.ts.map +1 -0
  128. package/dist/schemas/Table.js +24 -0
  129. package/dist/schemas/Table.js.map +1 -0
  130. package/dist/schemas/Tabs.d.ts +21 -0
  131. package/dist/schemas/Tabs.d.ts.map +1 -0
  132. package/dist/schemas/Tabs.js +25 -0
  133. package/dist/schemas/Tabs.js.map +1 -0
  134. package/dist/schemas/Tag.d.ts +29 -0
  135. package/dist/schemas/Tag.d.ts.map +1 -0
  136. package/dist/schemas/Tag.js +21 -0
  137. package/dist/schemas/Tag.js.map +1 -0
  138. package/dist/schemas/Text.d.ts +51 -0
  139. package/dist/schemas/Text.d.ts.map +1 -0
  140. package/dist/schemas/Text.js +21 -0
  141. package/dist/schemas/Text.js.map +1 -0
  142. package/dist/schemas/Textarea.d.ts +25 -0
  143. package/dist/schemas/Textarea.d.ts.map +1 -0
  144. package/dist/schemas/Textarea.js +24 -0
  145. package/dist/schemas/Textarea.js.map +1 -0
  146. package/dist/schemas/TitleBar.d.ts +18 -0
  147. package/dist/schemas/TitleBar.d.ts.map +1 -0
  148. package/dist/schemas/TitleBar.js +19 -0
  149. package/dist/schemas/TitleBar.js.map +1 -0
  150. package/dist/schemas/Toggle.d.ts +28 -0
  151. package/dist/schemas/Toggle.d.ts.map +1 -0
  152. package/dist/schemas/Toggle.js +22 -0
  153. package/dist/schemas/Toggle.js.map +1 -0
  154. package/dist/schemas/index.d.ts +694 -0
  155. package/dist/schemas/index.d.ts.map +1 -0
  156. package/dist/schemas/index.js +160 -0
  157. package/dist/schemas/index.js.map +1 -0
  158. package/dist/schemas/shared.d.ts +4 -0
  159. package/dist/schemas/shared.d.ts.map +1 -0
  160. package/dist/schemas/shared.js +23 -0
  161. package/dist/schemas/shared.js.map +1 -0
  162. package/dist/tools.d.ts +1293 -0
  163. package/dist/tools.d.ts.map +1 -0
  164. package/dist/tools.js +40 -0
  165. package/dist/tools.js.map +1 -0
  166. package/package.json +59 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/schemas/Select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;iBAyBjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the Select props an AI model is allowed to produce.
4
+ * MUST stay in sync with `@mihcm/ui/Select`.
5
+ *
6
+ * Notes:
7
+ * - The model cannot supply value/onChange — those are wired by the host
8
+ * via a stable `name` token.
9
+ * - `options` is the flat list an AI model provides; the host renders them
10
+ * as SelectItem (and groups them via the optional `group` field).
11
+ */
12
+ export const selectDescriptorSchema = z.object({
13
+ component: z.literal('Select'),
14
+ props: z
15
+ .object({
16
+ /** Stable token the host uses to wire `value`/`onValueChange`. Required. */
17
+ name: z.string().min(1).max(64),
18
+ placeholder: z.string().max(200).optional(),
19
+ options: z
20
+ .array(z.object({
21
+ value: z.string().min(1).max(64),
22
+ label: z.string().min(1).max(200),
23
+ group: z.string().max(64).optional(),
24
+ }))
25
+ .min(1)
26
+ .max(100),
27
+ defaultValue: z.string().min(1).max(64).optional(),
28
+ variant: z.enum(['default', 'destructive']).optional(),
29
+ size: z.enum(['sm', 'md', 'lg']).optional(),
30
+ disabled: z.boolean().optional(),
31
+ required: z.boolean().optional(),
32
+ accessibilityLabel: z.string().min(1).max(120).optional(),
33
+ })
34
+ .strict(),
35
+ });
36
+ //# sourceMappingURL=Select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.js","sourceRoot":"","sources":["../../src/schemas/Select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC9B,KAAK,EAAE,CAAC;SACL,MAAM,CAAC;QACN,4EAA4E;QAC5E,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;QAC3C,OAAO,EAAE,CAAC;aACP,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;YACP,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;YACjC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;SACrC,CAAC,CACH;aACA,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;QACX,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;QAClD,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,EAAE;QACtD,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC3C,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAChC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAChC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;KAC1D,CAAC;SACD,MAAM,EAAE;CACZ,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the Separator props an AI model is allowed to
4
+ * produce. MUST stay in sync with `@mihcm/ui/Separator`.
5
+ */
6
+ export declare const separatorDescriptorSchema: z.ZodObject<{
7
+ component: z.ZodLiteral<"Separator">;
8
+ props: z.ZodObject<{
9
+ orientation: z.ZodOptional<z.ZodEnum<{
10
+ horizontal: "horizontal";
11
+ vertical: "vertical";
12
+ }>>;
13
+ }, z.core.$strict>;
14
+ }, z.core.$strip>;
15
+ export type SeparatorDescriptor = z.infer<typeof separatorDescriptorSchema>;
16
+ //# sourceMappingURL=Separator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../src/schemas/Separator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;iBAOpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the Separator props an AI model is allowed to
4
+ * produce. MUST stay in sync with `@mihcm/ui/Separator`.
5
+ */
6
+ export const separatorDescriptorSchema = z.object({
7
+ component: z.literal('Separator'),
8
+ props: z
9
+ .object({
10
+ orientation: z.enum(['horizontal', 'vertical']).optional(),
11
+ })
12
+ .strict(),
13
+ });
14
+ //# sourceMappingURL=Separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Separator.js","sourceRoot":"","sources":["../../src/schemas/Separator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IACjC,KAAK,EAAE,CAAC;SACL,MAAM,CAAC;QACN,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;KAC3D,CAAC;SACD,MAAM,EAAE;CACZ,CAAC,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the Sheet props an AI model is allowed to
4
+ * produce. MUST stay in sync with `@mihcm/ui/Sheet`.
5
+ *
6
+ * The model supplies title, optional description, side, and size.
7
+ * The host manages open/close state.
8
+ */
9
+ export declare const sheetDescriptorSchema: z.ZodObject<{
10
+ component: z.ZodLiteral<"Sheet">;
11
+ props: z.ZodObject<{
12
+ title: z.ZodString;
13
+ description: z.ZodOptional<z.ZodString>;
14
+ side: z.ZodOptional<z.ZodEnum<{
15
+ top: "top";
16
+ bottom: "bottom";
17
+ left: "left";
18
+ right: "right";
19
+ }>>;
20
+ size: z.ZodOptional<z.ZodEnum<{
21
+ sm: "sm";
22
+ md: "md";
23
+ lg: "lg";
24
+ }>>;
25
+ }, z.core.$strict>;
26
+ }, z.core.$strip>;
27
+ export type SheetDescriptor = z.infer<typeof sheetDescriptorSchema>;
28
+ //# sourceMappingURL=Sheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../src/schemas/Sheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;iBAUhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the Sheet props an AI model is allowed to
4
+ * produce. MUST stay in sync with `@mihcm/ui/Sheet`.
5
+ *
6
+ * The model supplies title, optional description, side, and size.
7
+ * The host manages open/close state.
8
+ */
9
+ export const sheetDescriptorSchema = z.object({
10
+ component: z.literal('Sheet'),
11
+ props: z
12
+ .object({
13
+ title: z.string().min(1).max(120),
14
+ description: z.string().max(500).optional(),
15
+ side: z.enum(['left', 'right', 'bottom', 'top']).optional(),
16
+ size: z.enum(['sm', 'md', 'lg']).optional(),
17
+ })
18
+ .strict(),
19
+ });
20
+ //# sourceMappingURL=Sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sheet.js","sourceRoot":"","sources":["../../src/schemas/Sheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IAC7B,KAAK,EAAE,CAAC;SACL,MAAM,CAAC;QACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;QACjC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;QAC3C,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC3D,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE;KAC5C,CAAC;SACD,MAAM,EAAE;CACZ,CAAC,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { z } from 'zod';
2
+ import { type AccordionDescriptor } from './Accordion.js';
3
+ import { type AlertDescriptor } from './Alert.js';
4
+ import { type AlertDialogDescriptor } from './AlertDialog.js';
5
+ import { type AvatarDescriptor } from './Avatar.js';
6
+ import { type AvatarGroupDescriptor } from './AvatarGroup.js';
7
+ import { type BadgeDescriptor } from './Badge.js';
8
+ import { type BannerDescriptor } from './Banner.js';
9
+ import { type BreadcrumbDescriptor } from './Breadcrumb.js';
10
+ import { type ButtonDescriptor } from './Button.js';
11
+ import { type CardDescriptor } from './Card.js';
12
+ import { type CheckboxDescriptor } from './Checkbox.js';
13
+ import { type DialogDescriptor } from './Dialog.js';
14
+ import { type DropdownMenuDescriptor } from './DropdownMenu.js';
15
+ import { type EmptyStateDescriptor } from './EmptyState.js';
16
+ import { type InputDescriptor } from './Input.js';
17
+ import { type LabelDescriptor } from './Label.js';
18
+ import { type PaginationDescriptor } from './Pagination.js';
19
+ import { type ProgressDescriptor } from './Progress.js';
20
+ import { type RadioGroupDescriptor } from './RadioGroup.js';
21
+ import { type SectionHeaderDescriptor } from './SectionHeader.js';
22
+ import { type SelectDescriptor } from './Select.js';
23
+ import { type SeparatorDescriptor } from './Separator.js';
24
+ import { type SheetDescriptor } from './Sheet.js';
25
+ import { type StatCardDescriptor } from './StatCard.js';
26
+ import { type StatusBadgeDescriptor } from './StatusBadge.js';
27
+ import { type SwitchDescriptor } from './Switch.js';
28
+ import { type TableDescriptor } from './Table.js';
29
+ import { type TagDescriptor } from './Tag.js';
30
+ import { type TabsDescriptor } from './Tabs.js';
31
+ import { type TextDescriptor } from './Text.js';
32
+ import { type TextareaDescriptor } from './Textarea.js';
33
+ import { type TitleBarDescriptor } from './TitleBar.js';
34
+ import { type ToggleDescriptor } from './Toggle.js';
35
+ /**
36
+ * Stack — vertical or horizontal container that can hold child descriptors.
37
+ * Children are descriptor unions (recursive), not raw nodes.
38
+ *
39
+ * Recursion uses z.lazy. The renderer additionally enforces a depth cap of 5
40
+ * to prevent prompt-injected explosions (AI-UI-05).
41
+ *
42
+ * Every non-Stack leaf descriptor is imported here so a Stack can contain
43
+ * any allowlisted component, not just Button + Text. Adding a new primitive?
44
+ * Import its schema here too.
45
+ */
46
+ /** Union of every non-Stack leaf descriptor. */
47
+ type LeafDescriptor = AccordionDescriptor | AlertDescriptor | AlertDialogDescriptor | AvatarDescriptor | AvatarGroupDescriptor | BadgeDescriptor | BannerDescriptor | BreadcrumbDescriptor | ButtonDescriptor | CardDescriptor | CheckboxDescriptor | DialogDescriptor | DropdownMenuDescriptor | EmptyStateDescriptor | InputDescriptor | LabelDescriptor | PaginationDescriptor | ProgressDescriptor | RadioGroupDescriptor | SectionHeaderDescriptor | SelectDescriptor | SeparatorDescriptor | SheetDescriptor | StatCardDescriptor | StatusBadgeDescriptor | SwitchDescriptor | TableDescriptor | TagDescriptor | TabsDescriptor | TextDescriptor | TextareaDescriptor | TitleBarDescriptor | ToggleDescriptor;
48
+ export type StackDescriptor = {
49
+ component: 'Stack';
50
+ props: {
51
+ direction?: 'row' | 'column' | undefined;
52
+ gap?: 'sm' | 'md' | 'lg' | undefined;
53
+ children: Array<LeafDescriptor | StackDescriptor>;
54
+ };
55
+ };
56
+ export declare const stackDescriptorSchema: z.ZodType<StackDescriptor>;
57
+ export {};
58
+ //# sourceMappingURL=Stack.d.ts.map
@@ -0,0 +1 @@
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e,GACf,aAAa,GACb,cAAc,GACd,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,gBAAgB,CAAC;AAErB,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE;QACL,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;QACzC,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;QACrC,QAAQ,EAAE,KAAK,CAAC,cAAc,GAAG,eAAe,CAAC,CAAC;KACnD,CAAC;CACH,CAAC;AAsCF,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAW5D,CAAC"}
@@ -0,0 +1,80 @@
1
+ import { z } from 'zod';
2
+ import { accordionDescriptorSchema } from './Accordion.js';
3
+ import { alertDescriptorSchema } from './Alert.js';
4
+ import { alertDialogDescriptorSchema, } from './AlertDialog.js';
5
+ import { avatarDescriptorSchema } from './Avatar.js';
6
+ import { avatarGroupDescriptorSchema } from './AvatarGroup.js';
7
+ import { badgeDescriptorSchema } from './Badge.js';
8
+ import { bannerDescriptorSchema } from './Banner.js';
9
+ import { breadcrumbDescriptorSchema, } from './Breadcrumb.js';
10
+ import { buttonDescriptorSchema } from './Button.js';
11
+ import { cardDescriptorSchema } from './Card.js';
12
+ import { checkboxDescriptorSchema } from './Checkbox.js';
13
+ import { dialogDescriptorSchema } from './Dialog.js';
14
+ import { dropdownMenuDescriptorSchema, } from './DropdownMenu.js';
15
+ import { emptyStateDescriptorSchema } from './EmptyState.js';
16
+ import { inputDescriptorSchema } from './Input.js';
17
+ import { labelDescriptorSchema } from './Label.js';
18
+ import { paginationDescriptorSchema } from './Pagination.js';
19
+ import { progressDescriptorSchema } from './Progress.js';
20
+ import { radioGroupDescriptorSchema, } from './RadioGroup.js';
21
+ import { sectionHeaderDescriptorSchema, } from './SectionHeader.js';
22
+ import { selectDescriptorSchema } from './Select.js';
23
+ import { separatorDescriptorSchema } from './Separator.js';
24
+ import { sheetDescriptorSchema } from './Sheet.js';
25
+ import { statCardDescriptorSchema } from './StatCard.js';
26
+ import { statusBadgeDescriptorSchema, } from './StatusBadge.js';
27
+ import { switchDescriptorSchema } from './Switch.js';
28
+ import { tableDescriptorSchema } from './Table.js';
29
+ import { tagDescriptorSchema } from './Tag.js';
30
+ import { tabsDescriptorSchema } from './Tabs.js';
31
+ import { textDescriptorSchema } from './Text.js';
32
+ import { textareaDescriptorSchema } from './Textarea.js';
33
+ import { titleBarDescriptorSchema } from './TitleBar.js';
34
+ import { toggleDescriptorSchema } from './Toggle.js';
35
+ const leafChild = z.union([
36
+ accordionDescriptorSchema,
37
+ alertDescriptorSchema,
38
+ alertDialogDescriptorSchema,
39
+ avatarDescriptorSchema,
40
+ avatarGroupDescriptorSchema,
41
+ badgeDescriptorSchema,
42
+ bannerDescriptorSchema,
43
+ breadcrumbDescriptorSchema,
44
+ buttonDescriptorSchema,
45
+ cardDescriptorSchema,
46
+ checkboxDescriptorSchema,
47
+ dialogDescriptorSchema,
48
+ dropdownMenuDescriptorSchema,
49
+ emptyStateDescriptorSchema,
50
+ inputDescriptorSchema,
51
+ labelDescriptorSchema,
52
+ paginationDescriptorSchema,
53
+ progressDescriptorSchema,
54
+ radioGroupDescriptorSchema,
55
+ sectionHeaderDescriptorSchema,
56
+ selectDescriptorSchema,
57
+ separatorDescriptorSchema,
58
+ sheetDescriptorSchema,
59
+ statCardDescriptorSchema,
60
+ statusBadgeDescriptorSchema,
61
+ switchDescriptorSchema,
62
+ tableDescriptorSchema,
63
+ tagDescriptorSchema,
64
+ tabsDescriptorSchema,
65
+ textDescriptorSchema,
66
+ textareaDescriptorSchema,
67
+ titleBarDescriptorSchema,
68
+ toggleDescriptorSchema,
69
+ ]);
70
+ export const stackDescriptorSchema = z.lazy(() => z.object({
71
+ component: z.literal('Stack'),
72
+ props: z
73
+ .object({
74
+ direction: z.enum(['row', 'column']).optional(),
75
+ gap: z.enum(['sm', 'md', 'lg']).optional(),
76
+ children: z.array(z.union([leafChild, stackDescriptorSchema])).max(50),
77
+ })
78
+ .strict(),
79
+ }));
80
+ //# sourceMappingURL=Stack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stack.js","sourceRoot":"","sources":["../../src/schemas/Stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAA4B,MAAM,gBAAgB,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAwB,MAAM,YAAY,CAAC;AACzE,OAAO,EACL,2BAA2B,GAE5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAyB,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAA8B,MAAM,kBAAkB,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAwB,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAyB,MAAM,aAAa,CAAC;AAC5E,OAAO,EACL,0BAA0B,GAE3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAyB,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAuB,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAA2B,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAyB,MAAM,aAAa,CAAC;AAC5E,OAAO,EACL,4BAA4B,GAE7B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,0BAA0B,EAA6B,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAwB,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAwB,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAA6B,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAA2B,MAAM,eAAe,CAAC;AAClF,OAAO,EAC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AAmB;IACnB,oBAAoB;IACpB,oBAAoB;IACpB,wBAAwB;IACxB,wBAAwB;IACxB,sBAAsB;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAA+B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC3E,CAAC,CAAC,MAAM,CAAC;IACP,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IAC7B,KAAK,EAAE,CAAC;SACL,MAAM,CAAC;QACN,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC/C,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC1C,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;KACvE,CAAC;SACD,MAAM,EAAE;CACZ,CAAC,CACH,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the StatCard props an AI model is allowed to
4
+ * produce. MUST stay in sync with `@mihcm/ui/StatCard`.
5
+ *
6
+ * The icon slot is omitted from the descriptor — see StatusBadge.ts for
7
+ * the rationale (no raw SVG injection from the model). The host pairs
8
+ * the rendered card with a known icon based on the tone or label if it
9
+ * wants visual reinforcement.
10
+ *
11
+ * `value` is constrained to a string here — the universal component
12
+ * accepts `ReactNode`, but for AI generation we only allow plain text.
13
+ */
14
+ export declare const statCardDescriptorSchema: z.ZodObject<{
15
+ component: z.ZodLiteral<"StatCard">;
16
+ props: z.ZodObject<{
17
+ value: z.ZodString;
18
+ label: z.ZodString;
19
+ tone: z.ZodOptional<z.ZodEnum<{
20
+ success: "success";
21
+ warning: "warning";
22
+ accent: "accent";
23
+ primary: "primary";
24
+ danger: "danger";
25
+ neutral: "neutral";
26
+ }>>;
27
+ }, z.core.$strict>;
28
+ }, z.core.$strip>;
29
+ export type StatCardDescriptor = z.infer<typeof statCardDescriptorSchema>;
30
+ //# sourceMappingURL=StatCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatCard.d.ts","sourceRoot":"","sources":["../../src/schemas/StatCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;iBAWnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the StatCard props an AI model is allowed to
4
+ * produce. MUST stay in sync with `@mihcm/ui/StatCard`.
5
+ *
6
+ * The icon slot is omitted from the descriptor — see StatusBadge.ts for
7
+ * the rationale (no raw SVG injection from the model). The host pairs
8
+ * the rendered card with a known icon based on the tone or label if it
9
+ * wants visual reinforcement.
10
+ *
11
+ * `value` is constrained to a string here — the universal component
12
+ * accepts `ReactNode`, but for AI generation we only allow plain text.
13
+ */
14
+ export const statCardDescriptorSchema = z.object({
15
+ component: z.literal('StatCard'),
16
+ props: z
17
+ .object({
18
+ value: z.string().min(1).max(40),
19
+ label: z.string().min(1).max(60),
20
+ tone: z
21
+ .enum(['primary', 'accent', 'success', 'warning', 'danger', 'neutral'])
22
+ .optional(),
23
+ })
24
+ .strict(),
25
+ });
26
+ //# sourceMappingURL=StatCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatCard.js","sourceRoot":"","sources":["../../src/schemas/StatCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAChC,KAAK,EAAE,CAAC;SACL,MAAM,CAAC;QACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;QAChC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;QAChC,IAAI,EAAE,CAAC;aACJ,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;aACtE,QAAQ,EAAE;KACd,CAAC;SACD,MAAM,EAAE;CACZ,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the StatusBadge props an AI model is allowed to
4
+ * produce. MUST stay in sync with `@mihcm/ui/StatusBadge`.
5
+ *
6
+ * The icon slot is intentionally **not** exposed to the model — every
7
+ * StatusBadge that needs an icon is paired by the host with a known
8
+ * icon based on the tone. Exposing `icon` would let the model inject
9
+ * arbitrary SVG, which violates AI-UI-04 (no raw HTML injection).
10
+ */
11
+ export declare const statusBadgeDescriptorSchema: z.ZodObject<{
12
+ component: z.ZodLiteral<"StatusBadge">;
13
+ props: z.ZodObject<{
14
+ children: z.ZodString;
15
+ tone: z.ZodOptional<z.ZodEnum<{
16
+ success: "success";
17
+ warning: "warning";
18
+ info: "info";
19
+ danger: "danger";
20
+ neutral: "neutral";
21
+ }>>;
22
+ }, z.core.$strict>;
23
+ }, z.core.$strip>;
24
+ export type StatusBadgeDescriptor = z.infer<typeof statusBadgeDescriptorSchema>;
25
+ //# sourceMappingURL=StatusBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../../src/schemas/StatusBadge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;iBAQtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the StatusBadge props an AI model is allowed to
4
+ * produce. MUST stay in sync with `@mihcm/ui/StatusBadge`.
5
+ *
6
+ * The icon slot is intentionally **not** exposed to the model — every
7
+ * StatusBadge that needs an icon is paired by the host with a known
8
+ * icon based on the tone. Exposing `icon` would let the model inject
9
+ * arbitrary SVG, which violates AI-UI-04 (no raw HTML injection).
10
+ */
11
+ export const statusBadgeDescriptorSchema = z.object({
12
+ component: z.literal('StatusBadge'),
13
+ props: z
14
+ .object({
15
+ children: z.string().min(1).max(40),
16
+ tone: z.enum(['success', 'warning', 'danger', 'info', 'neutral']).optional(),
17
+ })
18
+ .strict(),
19
+ });
20
+ //# sourceMappingURL=StatusBadge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusBadge.js","sourceRoot":"","sources":["../../src/schemas/StatusBadge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IACnC,KAAK,EAAE,CAAC;SACL,MAAM,CAAC;QACN,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;QACnC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;KAC7E,CAAC;SACD,MAAM,EAAE;CACZ,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the Switch props an AI model is allowed to
4
+ * produce. MUST stay in sync with `@mihcm/ui/Switch`.
5
+ *
6
+ * The model supplies a label and initial state. The host wires up
7
+ * the actual state management — the descriptor only captures intent.
8
+ */
9
+ export declare const switchDescriptorSchema: z.ZodObject<{
10
+ component: z.ZodLiteral<"Switch">;
11
+ props: z.ZodObject<{
12
+ label: z.ZodString;
13
+ defaultChecked: z.ZodOptional<z.ZodBoolean>;
14
+ size: z.ZodOptional<z.ZodEnum<{
15
+ sm: "sm";
16
+ md: "md";
17
+ lg: "lg";
18
+ }>>;
19
+ disabled: z.ZodOptional<z.ZodBoolean>;
20
+ }, z.core.$strict>;
21
+ }, z.core.$strip>;
22
+ export type SwitchDescriptor = z.infer<typeof switchDescriptorSchema>;
23
+ //# sourceMappingURL=Switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../src/schemas/Switch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;iBAUjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the Switch props an AI model is allowed to
4
+ * produce. MUST stay in sync with `@mihcm/ui/Switch`.
5
+ *
6
+ * The model supplies a label and initial state. The host wires up
7
+ * the actual state management — the descriptor only captures intent.
8
+ */
9
+ export const switchDescriptorSchema = z.object({
10
+ component: z.literal('Switch'),
11
+ props: z
12
+ .object({
13
+ label: z.string().min(1).max(100),
14
+ defaultChecked: z.boolean().optional(),
15
+ size: z.enum(['sm', 'md', 'lg']).optional(),
16
+ disabled: z.boolean().optional(),
17
+ })
18
+ .strict(),
19
+ });
20
+ //# sourceMappingURL=Switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../src/schemas/Switch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC9B,KAAK,EAAE,CAAC;SACL,MAAM,CAAC;QACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;QACjC,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QACtC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC3C,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KACjC,CAAC;SACD,MAAM,EAAE;CACZ,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the Table props an AI model is allowed to
4
+ * produce. Maps columns + rows into the composable Table sub-components
5
+ * at render time. MUST stay in sync with `@mihcm/ui/Table`.
6
+ */
7
+ export declare const tableDescriptorSchema: z.ZodObject<{
8
+ component: z.ZodLiteral<"Table">;
9
+ props: z.ZodObject<{
10
+ columns: z.ZodArray<z.ZodObject<{
11
+ key: z.ZodString;
12
+ header: z.ZodString;
13
+ }, z.core.$strip>>;
14
+ rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>;
15
+ caption: z.ZodOptional<z.ZodString>;
16
+ striped: z.ZodOptional<z.ZodBoolean>;
17
+ }, z.core.$strict>;
18
+ }, z.core.$strip>;
19
+ export type TableDescriptor = z.infer<typeof tableDescriptorSchema>;
20
+ //# sourceMappingURL=Table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../src/schemas/Table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;iBAgBhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the Table props an AI model is allowed to
4
+ * produce. Maps columns + rows into the composable Table sub-components
5
+ * at render time. MUST stay in sync with `@mihcm/ui/Table`.
6
+ */
7
+ export const tableDescriptorSchema = z.object({
8
+ component: z.literal('Table'),
9
+ props: z
10
+ .object({
11
+ columns: z
12
+ .array(z.object({ key: z.string(), header: z.string() }))
13
+ .min(1)
14
+ .max(20),
15
+ rows: z
16
+ .array(z.record(z.string(), z.string()))
17
+ .min(1)
18
+ .max(100),
19
+ caption: z.string().max(200).optional(),
20
+ striped: z.boolean().optional(),
21
+ })
22
+ .strict(),
23
+ });
24
+ //# sourceMappingURL=Table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.js","sourceRoot":"","sources":["../../src/schemas/Table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IAC7B,KAAK,EAAE,CAAC;SACL,MAAM,CAAC;QACN,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;aACxD,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,EAAE,CAAC;QACV,IAAI,EAAE,CAAC;aACJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;aACvC,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;QACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;QACvC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KAChC,CAAC;SACD,MAAM,EAAE;CACZ,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the Tabs props an AI model is allowed to
4
+ * produce. MUST stay in sync with `@mihcm/ui/Tabs`.
5
+ *
6
+ * The model supplies tab labels and content. The host wires up
7
+ * the active tab state.
8
+ */
9
+ export declare const tabsDescriptorSchema: z.ZodObject<{
10
+ component: z.ZodLiteral<"Tabs">;
11
+ props: z.ZodObject<{
12
+ defaultValue: z.ZodString;
13
+ tabs: z.ZodArray<z.ZodObject<{
14
+ value: z.ZodString;
15
+ label: z.ZodString;
16
+ content: z.ZodString;
17
+ }, z.core.$strip>>;
18
+ }, z.core.$strict>;
19
+ }, z.core.$strip>;
20
+ export type TabsDescriptor = z.infer<typeof tabsDescriptorSchema>;
21
+ //# sourceMappingURL=Tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../src/schemas/Tabs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;iBAiB/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the Tabs props an AI model is allowed to
4
+ * produce. MUST stay in sync with `@mihcm/ui/Tabs`.
5
+ *
6
+ * The model supplies tab labels and content. The host wires up
7
+ * the active tab state.
8
+ */
9
+ export const tabsDescriptorSchema = z.object({
10
+ component: z.literal('Tabs'),
11
+ props: z
12
+ .object({
13
+ defaultValue: z.string().min(1).max(40),
14
+ tabs: z
15
+ .array(z.object({
16
+ value: z.string().min(1).max(40),
17
+ label: z.string().min(1).max(60),
18
+ content: z.string().min(1).max(2000),
19
+ }))
20
+ .min(1)
21
+ .max(8),
22
+ })
23
+ .strict(),
24
+ });
25
+ //# sourceMappingURL=Tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../src/schemas/Tabs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IAC5B,KAAK,EAAE,CAAC;SACL,MAAM,CAAC;QACN,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;QACvC,IAAI,EAAE,CAAC;aACJ,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;YACP,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;SACrC,CAAC,CACH;aACA,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,CAAC,CAAC;KACV,CAAC;SACD,MAAM,EAAE;CACZ,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema describing the Tag props an AI model is allowed to
4
+ * produce. MUST stay in sync with `@mihcm/ui/Tag`.
5
+ *
6
+ * Label is a short string — tags are chips, not paragraphs.
7
+ */
8
+ export declare const tagDescriptorSchema: z.ZodObject<{
9
+ component: z.ZodLiteral<"Tag">;
10
+ props: z.ZodObject<{
11
+ label: z.ZodString;
12
+ variant: z.ZodOptional<z.ZodEnum<{
13
+ success: "success";
14
+ default: "default";
15
+ destructive: "destructive";
16
+ warning: "warning";
17
+ accent: "accent";
18
+ primary: "primary";
19
+ }>>;
20
+ size: z.ZodOptional<z.ZodEnum<{
21
+ sm: "sm";
22
+ md: "md";
23
+ lg: "lg";
24
+ }>>;
25
+ removable: z.ZodOptional<z.ZodBoolean>;
26
+ }, z.core.$strict>;
27
+ }, z.core.$strip>;
28
+ export type TagDescriptor = z.infer<typeof tagDescriptorSchema>;
29
+ //# sourceMappingURL=Tag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../src/schemas/Tag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;iBAY9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}