@mich8060/unified-design-system 0.2.13 → 0.2.15

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 (385) hide show
  1. package/dist/ai/discovery.json +41 -0
  2. package/dist/ai/examples/index.cjs +1 -0
  3. package/dist/ai/examples/index.js +1 -0
  4. package/dist/ai/examples/training.examples.cjs +1 -0
  5. package/dist/ai/examples/training.examples.js +1 -0
  6. package/dist/ai/figma-make.contract.json +178 -0
  7. package/dist/ai/figma-make.md +50 -0
  8. package/dist/ai/icons/catalog.json +76 -0
  9. package/dist/ai/index.cjs +1 -1
  10. package/dist/ai/index.js +1 -1
  11. package/dist/ai/manifest/components.manifest.cjs +1 -1
  12. package/dist/ai/manifest/components.manifest.js +1 -1
  13. package/dist/ai/manifest/composition.manifest.cjs +1 -0
  14. package/dist/ai/manifest/composition.manifest.js +1 -0
  15. package/dist/ai/manifest/governance.manifest.cjs +1 -1
  16. package/dist/ai/manifest/governance.manifest.js +1 -1
  17. package/dist/ai/manifest/index.cjs +1 -0
  18. package/dist/ai/manifest/index.js +1 -0
  19. package/dist/ai/manifest/intent-mappings.manifest.cjs +1 -0
  20. package/dist/ai/manifest/intent-mappings.manifest.js +1 -0
  21. package/dist/ai/manifest/layout.manifest.cjs +1 -1
  22. package/dist/ai/manifest/layout.manifest.js +1 -1
  23. package/dist/ai/manifest/prop-aliases.manifest.cjs +1 -0
  24. package/dist/ai/manifest/prop-aliases.manifest.js +1 -0
  25. package/dist/ai/manifest/system.manifest.cjs +1 -1
  26. package/dist/ai/manifest/system.manifest.js +1 -1
  27. package/dist/ai/manifest.json +3165 -0
  28. package/dist/ai/policies/policy.engine.cjs +1 -1
  29. package/dist/ai/policies/policy.engine.js +1 -1
  30. package/dist/ai/policies/rules/composition.rules.cjs +1 -1
  31. package/dist/ai/policies/rules/composition.rules.js +1 -1
  32. package/dist/ai/policies/rules/props.rules.cjs +1 -0
  33. package/dist/ai/policies/rules/props.rules.js +1 -0
  34. package/dist/ai/policies/rules/tailwind.rules.cjs +1 -0
  35. package/dist/ai/policies/rules/tailwind.rules.js +1 -0
  36. package/dist/ai/policies/rules/token-variable.rules.cjs +1 -0
  37. package/dist/ai/policies/rules/token-variable.rules.js +1 -0
  38. package/dist/ai/prompts/figma-make.prompt.md +48 -0
  39. package/dist/ai/schemas/ai-output.schema.json +71 -0
  40. package/dist/ai/sdk/index.cjs +1 -0
  41. package/dist/ai/sdk/index.js +1 -0
  42. package/dist/ai/sdk/runtime-sdk.cjs +2 -0
  43. package/dist/ai/sdk/runtime-sdk.js +2 -0
  44. package/dist/ai/templates/layouts.json +416 -0
  45. package/dist/ai/validation/deterministicFeedback.cjs +1 -0
  46. package/dist/ai/validation/deterministicFeedback.js +1 -0
  47. package/dist/ai/validation/driftDetection.cjs +1 -1
  48. package/dist/ai/validation/driftDetection.js +1 -1
  49. package/dist/ai/validation/index.cjs +1 -0
  50. package/dist/ai/validation/index.js +1 -0
  51. package/dist/ai/validation/validateAIOutput.cjs +1 -1
  52. package/dist/ai/validation/validateAIOutput.js +1 -1
  53. package/dist/app-shell/AppShell.d.ts +8 -0
  54. package/dist/charts/BizChartsAdapters.cjs +1 -0
  55. package/dist/charts/BizChartsAdapters.js +1 -0
  56. package/dist/charts-bizcharts/index.cjs +1 -0
  57. package/dist/charts-bizcharts/index.js +1 -0
  58. package/dist/components/Breadcrumb/Breadcrumb.cjs +1 -1
  59. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  60. package/dist/components/Button/Button.cjs +1 -1
  61. package/dist/components/Button/Button.js +1 -1
  62. package/dist/components/ButtonGroup/ButtonGroup.cjs +1 -0
  63. package/dist/components/ButtonGroup/ButtonGroup.js +1 -0
  64. package/dist/components/CheckboxGroup/CheckboxGroup.cjs +1 -0
  65. package/dist/components/CheckboxGroup/CheckboxGroup.js +1 -0
  66. package/dist/components/Checklist/Checklist.cjs +1 -0
  67. package/dist/components/Checklist/Checklist.js +1 -0
  68. package/dist/components/Chip/Chip.cjs +1 -1
  69. package/dist/components/Chip/Chip.js +1 -1
  70. package/dist/components/CurrencyInput/CurrencyInput.cjs +1 -0
  71. package/dist/components/CurrencyInput/CurrencyInput.js +1 -0
  72. package/dist/components/DateInput/DateInput.cjs +1 -0
  73. package/dist/components/DateInput/DateInput.js +1 -0
  74. package/dist/components/DateRangeInput/DateRangeInput.cjs +1 -0
  75. package/dist/components/DateRangeInput/DateRangeInput.js +1 -0
  76. package/dist/components/Dialog/Dialog.cjs +1 -1
  77. package/dist/components/Dialog/Dialog.js +1 -1
  78. package/dist/components/DotStatus/DotStatus.cjs +1 -1
  79. package/dist/components/DotStatus/DotStatus.js +1 -1
  80. package/dist/components/EmptyState/EmptyState.cjs +1 -1
  81. package/dist/components/EmptyState/EmptyState.js +1 -1
  82. package/dist/components/Field/Field.cjs +1 -1
  83. package/dist/components/Field/Field.js +1 -1
  84. package/dist/components/FileUpload/FileUpload.cjs +1 -1
  85. package/dist/components/FileUpload/FileUpload.js +1 -1
  86. package/dist/components/Icon/Icon.cjs +1 -1
  87. package/dist/components/Icon/Icon.js +1 -1
  88. package/dist/components/Menu/Menu.cjs +1 -1
  89. package/dist/components/Menu/Menu.js +1 -1
  90. package/dist/components/Modal/Modal.cjs +1 -1
  91. package/dist/components/Modal/Modal.js +1 -1
  92. package/dist/components/NumberInput/NumberInput.cjs +1 -0
  93. package/dist/components/NumberInput/NumberInput.js +1 -0
  94. package/dist/components/Pagination/Pagination.cjs +1 -1
  95. package/dist/components/Pagination/Pagination.js +1 -1
  96. package/dist/components/PasswordInput/PasswordInput.cjs +1 -0
  97. package/dist/components/PasswordInput/PasswordInput.js +1 -0
  98. package/dist/components/PhoneInput/PhoneInput.cjs +1 -0
  99. package/dist/components/PhoneInput/PhoneInput.js +1 -0
  100. package/dist/components/ProgressCircle/ProgressCircle.cjs +1 -1
  101. package/dist/components/ProgressCircle/ProgressCircle.js +1 -1
  102. package/dist/components/ProgressIndicator/ProgressIndicator.cjs +1 -1
  103. package/dist/components/ProgressIndicator/ProgressIndicator.js +1 -1
  104. package/dist/components/RadioGroup/RadioGroup.cjs +1 -0
  105. package/dist/components/RadioGroup/RadioGroup.js +1 -0
  106. package/dist/components/SearchInput/SearchInput.cjs +1 -0
  107. package/dist/components/SearchInput/SearchInput.js +1 -0
  108. package/dist/components/SectionHeader/SectionHeader.cjs +1 -0
  109. package/dist/components/SectionHeader/SectionHeader.js +1 -0
  110. package/dist/components/Statistics/Statistics.cjs +1 -0
  111. package/dist/components/Statistics/Statistics.js +1 -0
  112. package/dist/components/Status/Status.cjs +1 -1
  113. package/dist/components/Status/Status.js +1 -1
  114. package/dist/components/Steps/Steps.cjs +1 -1
  115. package/dist/components/Steps/Steps.js +1 -1
  116. package/dist/components/Table/Table.cjs +1 -1
  117. package/dist/components/Table/Table.js +1 -1
  118. package/dist/components/Tabs/Tabs.cjs +1 -1
  119. package/dist/components/Tabs/Tabs.js +1 -1
  120. package/dist/components/Text/Text.cjs +1 -1
  121. package/dist/components/Text/Text.js +1 -1
  122. package/dist/components/TimeInput/TimeInput.cjs +1 -0
  123. package/dist/components/TimeInput/TimeInput.js +1 -0
  124. package/dist/components/TokenInput/TokenInput.cjs +1 -0
  125. package/dist/components/TokenInput/TokenInput.js +1 -0
  126. package/dist/components/Toolbar/Toolbar.cjs +1 -0
  127. package/dist/components/Toolbar/Toolbar.js +1 -0
  128. package/dist/components/Tooltip/Tooltip.cjs +1 -1
  129. package/dist/components/Tooltip/Tooltip.js +1 -1
  130. package/dist/design-system/ai/audit/audit.types.d.ts +1 -0
  131. package/dist/design-system/ai/examples/index.d.ts +4 -0
  132. package/dist/design-system/ai/examples/training.examples.d.ts +22 -0
  133. package/dist/design-system/ai/index.d.ts +10 -3
  134. package/dist/design-system/ai/manifest/composition.manifest.d.ts +11 -0
  135. package/dist/design-system/ai/manifest/governance.manifest.d.ts +5 -0
  136. package/dist/design-system/ai/manifest/index.d.ts +10 -0
  137. package/dist/design-system/ai/manifest/intent-mappings.manifest.d.ts +63 -0
  138. package/dist/design-system/ai/manifest/prop-aliases.manifest.d.ts +10 -0
  139. package/dist/design-system/ai/manifest/system.manifest.d.ts +2 -0
  140. package/dist/design-system/ai/manifest/types.d.ts +11 -0
  141. package/dist/design-system/ai/policies/rules/props.rules.d.ts +2 -0
  142. package/dist/design-system/ai/policies/rules/tailwind.rules.d.ts +2 -0
  143. package/dist/design-system/ai/policies/rules/token-variable.rules.d.ts +2 -0
  144. package/dist/design-system/ai/sdk/index.d.ts +1 -0
  145. package/dist/design-system/ai/sdk/runtime-sdk.d.ts +21 -0
  146. package/dist/design-system/ai/validation/deterministicFeedback.d.ts +15 -0
  147. package/dist/design-system/ai/validation/index.d.ts +5 -0
  148. package/dist/design-system/ai/validation/validateAIOutput.d.ts +13 -0
  149. package/dist/design-system/charts/BizChartsAdapters.d.ts +40 -0
  150. package/dist/design-system/charts/index.d.ts +1 -0
  151. package/dist/design-system/components/Button/Button.d.ts +1 -1
  152. package/dist/design-system/components/Button/Button.types.d.ts +1 -0
  153. package/dist/design-system/components/ButtonGroup/ButtonGroup.d.ts +3 -0
  154. package/dist/design-system/components/ButtonGroup/ButtonGroup.types.d.ts +19 -0
  155. package/dist/design-system/components/ButtonGroup/index.d.ts +2 -0
  156. package/dist/design-system/components/CheckboxGroup/CheckboxGroup.d.ts +3 -0
  157. package/dist/design-system/components/CheckboxGroup/CheckboxGroup.types.d.ts +15 -0
  158. package/dist/design-system/components/CheckboxGroup/index.d.ts +2 -0
  159. package/dist/design-system/components/Checklist/Checklist.d.ts +3 -0
  160. package/dist/design-system/components/Checklist/Checklist.types.d.ts +13 -0
  161. package/dist/design-system/components/Checklist/index.d.ts +2 -0
  162. package/dist/design-system/components/Chip/Chip.d.ts +4 -3
  163. package/dist/design-system/components/Chip/Chip.types.d.ts +13 -9
  164. package/dist/design-system/components/CurrencyInput/CurrencyInput.d.ts +2 -0
  165. package/dist/design-system/components/CurrencyInput/CurrencyInput.types.d.ts +3 -0
  166. package/dist/design-system/components/CurrencyInput/index.d.ts +2 -0
  167. package/dist/design-system/components/DateInput/DateInput.d.ts +2 -0
  168. package/dist/design-system/components/DateInput/DateInput.types.d.ts +3 -0
  169. package/dist/design-system/components/DateInput/index.d.ts +2 -0
  170. package/dist/design-system/components/DateRangeInput/DateRangeInput.d.ts +3 -0
  171. package/dist/design-system/components/DateRangeInput/DateRangeInput.types.d.ts +15 -0
  172. package/dist/design-system/components/DateRangeInput/index.d.ts +2 -0
  173. package/dist/design-system/components/Dialog/Dialog.types.d.ts +9 -8
  174. package/dist/design-system/components/Field/Field.d.ts +1 -1
  175. package/dist/design-system/components/Field/Field.types.d.ts +11 -9
  176. package/dist/design-system/components/FileUpload/FileUpload.d.ts +1 -1
  177. package/dist/design-system/components/FileUpload/FileUpload.types.d.ts +2 -0
  178. package/dist/design-system/components/Menu/index.d.ts +3 -0
  179. package/dist/design-system/components/NumberInput/NumberInput.d.ts +3 -0
  180. package/dist/design-system/components/NumberInput/NumberInput.types.d.ts +2 -0
  181. package/dist/design-system/components/NumberInput/index.d.ts +2 -0
  182. package/dist/design-system/components/Pagination/Pagination.d.ts +5 -3
  183. package/dist/design-system/components/Pagination/Pagination.types.d.ts +4 -1
  184. package/dist/design-system/components/PasswordInput/PasswordInput.d.ts +2 -0
  185. package/dist/design-system/components/PasswordInput/PasswordInput.types.d.ts +5 -0
  186. package/dist/design-system/components/PasswordInput/index.d.ts +2 -0
  187. package/dist/design-system/components/PhoneInput/PhoneInput.d.ts +2 -0
  188. package/dist/design-system/components/PhoneInput/PhoneInput.types.d.ts +5 -0
  189. package/dist/design-system/components/PhoneInput/index.d.ts +2 -0
  190. package/dist/design-system/components/ProgressCircle/ProgressCircle.d.ts +3 -2
  191. package/dist/design-system/components/ProgressCircle/ProgressCircle.types.d.ts +7 -3
  192. package/dist/design-system/components/ProgressIndicator/ProgressIndicator.d.ts +2 -1
  193. package/dist/design-system/components/ProgressIndicator/ProgressIndicator.types.d.ts +8 -4
  194. package/dist/design-system/components/RadioGroup/RadioGroup.d.ts +3 -0
  195. package/dist/design-system/components/RadioGroup/RadioGroup.types.d.ts +16 -0
  196. package/dist/design-system/components/RadioGroup/index.d.ts +2 -0
  197. package/dist/design-system/components/SearchInput/SearchInput.d.ts +2 -0
  198. package/dist/design-system/components/SearchInput/SearchInput.types.d.ts +3 -0
  199. package/dist/design-system/components/SearchInput/index.d.ts +2 -0
  200. package/dist/design-system/components/SectionHeader/SectionHeader.d.ts +3 -0
  201. package/dist/design-system/components/SectionHeader/SectionHeader.types.d.ts +9 -0
  202. package/dist/design-system/components/SectionHeader/index.d.ts +2 -0
  203. package/dist/design-system/components/Statistics/Statistics.d.ts +3 -0
  204. package/dist/design-system/components/Statistics/Statistics.types.d.ts +18 -0
  205. package/dist/design-system/components/Statistics/index.d.ts +2 -0
  206. package/dist/design-system/components/Status/Status.types.d.ts +4 -2
  207. package/dist/design-system/components/Tabs/Tabs.d.ts +1 -1
  208. package/dist/design-system/components/Tabs/Tabs.types.d.ts +4 -1
  209. package/dist/design-system/components/TimeInput/TimeInput.d.ts +2 -0
  210. package/dist/design-system/components/TimeInput/TimeInput.types.d.ts +3 -0
  211. package/dist/design-system/components/TimeInput/index.d.ts +2 -0
  212. package/dist/design-system/components/Toggle/index.d.ts +2 -0
  213. package/dist/design-system/components/TokenInput/TokenInput.d.ts +4 -0
  214. package/dist/design-system/components/TokenInput/TokenInput.types.d.ts +17 -0
  215. package/dist/design-system/components/TokenInput/index.d.ts +3 -0
  216. package/dist/design-system/components/Toolbar/Toolbar.d.ts +3 -0
  217. package/dist/design-system/components/Toolbar/Toolbar.types.d.ts +8 -0
  218. package/dist/design-system/components/Toolbar/index.d.ts +2 -0
  219. package/dist/design-system/components/Tooltip/Tooltip.d.ts +1 -1
  220. package/dist/design-system/components/Tooltip/Tooltip.types.d.ts +1 -0
  221. package/dist/design-system/figma-make/index.d.ts +42 -0
  222. package/dist/design-system/generated/component-api.d.ts +2043 -0
  223. package/dist/design-system/index.d.ts +18 -2
  224. package/dist/figma-make/index.cjs +1 -0
  225. package/dist/figma-make/index.js +1 -0
  226. package/dist/generated/component-api.cjs +1 -0
  227. package/dist/generated/component-api.js +1 -0
  228. package/dist/index.cjs +1 -1
  229. package/dist/index.js +1 -1
  230. package/dist/src/app-shell/AppShell.cjs +1 -1
  231. package/dist/src/app-shell/AppShell.js +1 -1
  232. package/dist/style.css +1 -1
  233. package/package.json +70 -19
  234. package/dist/components/Accordion/Accordion.spec.cjs +0 -1
  235. package/dist/components/Accordion/Accordion.spec.js +0 -1
  236. package/dist/components/ActionMenu/ActionMenu.spec.cjs +0 -1
  237. package/dist/components/ActionMenu/ActionMenu.spec.js +0 -1
  238. package/dist/components/Avatar/Avatar.spec.cjs +0 -1
  239. package/dist/components/Avatar/Avatar.spec.js +0 -1
  240. package/dist/components/Badge/Badge.spec.cjs +0 -1
  241. package/dist/components/Badge/Badge.spec.js +0 -1
  242. package/dist/components/Branding/Branding.spec.cjs +0 -1
  243. package/dist/components/Branding/Branding.spec.js +0 -1
  244. package/dist/components/Breadcrumb/Breadcrumb.spec.cjs +0 -1
  245. package/dist/components/Breadcrumb/Breadcrumb.spec.js +0 -1
  246. package/dist/components/Button/Button.spec.cjs +0 -1
  247. package/dist/components/Button/Button.spec.js +0 -1
  248. package/dist/components/Calendar/Calendar.spec.cjs +0 -1
  249. package/dist/components/Calendar/Calendar.spec.js +0 -1
  250. package/dist/components/Card/Card.spec.cjs +0 -1
  251. package/dist/components/Card/Card.spec.js +0 -1
  252. package/dist/components/Checkbox/Checkbox.spec.cjs +0 -1
  253. package/dist/components/Checkbox/Checkbox.spec.js +0 -1
  254. package/dist/components/Chip/Chip.spec.cjs +0 -1
  255. package/dist/components/Chip/Chip.spec.js +0 -1
  256. package/dist/components/Code/Code.spec.cjs +0 -1
  257. package/dist/components/Code/Code.spec.js +0 -1
  258. package/dist/components/Container/Container.spec.cjs +0 -1
  259. package/dist/components/Container/Container.spec.js +0 -1
  260. package/dist/components/Datepicker/Datepicker.spec.cjs +0 -1
  261. package/dist/components/Datepicker/Datepicker.spec.js +0 -1
  262. package/dist/components/Dialog/Dialog.spec.cjs +0 -1
  263. package/dist/components/Dialog/Dialog.spec.js +0 -1
  264. package/dist/components/Divider/Divider.spec.cjs +0 -1
  265. package/dist/components/Divider/Divider.spec.js +0 -1
  266. package/dist/components/DotStatus/DotStatus.spec.cjs +0 -1
  267. package/dist/components/DotStatus/DotStatus.spec.js +0 -1
  268. package/dist/components/Dropdown/Dropdown.spec.cjs +0 -1
  269. package/dist/components/Dropdown/Dropdown.spec.js +0 -1
  270. package/dist/components/EmptyState/EmptyState.spec.cjs +0 -1
  271. package/dist/components/EmptyState/EmptyState.spec.js +0 -1
  272. package/dist/components/EventCard/EventCard.spec.cjs +0 -1
  273. package/dist/components/EventCard/EventCard.spec.js +0 -1
  274. package/dist/components/Field/Field.spec.cjs +0 -1
  275. package/dist/components/Field/Field.spec.js +0 -1
  276. package/dist/components/FileUpload/FileUpload.spec.cjs +0 -1
  277. package/dist/components/FileUpload/FileUpload.spec.js +0 -1
  278. package/dist/components/Flex/Flex.spec.cjs +0 -1
  279. package/dist/components/Flex/Flex.spec.js +0 -1
  280. package/dist/components/Icon/Icon.spec.cjs +0 -1
  281. package/dist/components/Icon/Icon.spec.js +0 -1
  282. package/dist/components/ImageAspect/ImageAspect.spec.cjs +0 -1
  283. package/dist/components/ImageAspect/ImageAspect.spec.js +0 -1
  284. package/dist/components/Key/Key.spec.cjs +0 -1
  285. package/dist/components/Key/Key.spec.js +0 -1
  286. package/dist/components/Menu/Menu.spec.cjs +0 -1
  287. package/dist/components/Menu/Menu.spec.js +0 -1
  288. package/dist/components/MicroCalendar/MicroCalendar.spec.cjs +0 -1
  289. package/dist/components/MicroCalendar/MicroCalendar.spec.js +0 -1
  290. package/dist/components/Modal/Modal.spec.cjs +0 -1
  291. package/dist/components/Modal/Modal.spec.js +0 -1
  292. package/dist/components/Pagination/Pagination.spec.cjs +0 -1
  293. package/dist/components/Pagination/Pagination.spec.js +0 -1
  294. package/dist/components/PillToggle/PillToggle.cjs +0 -1
  295. package/dist/components/PillToggle/PillToggle.js +0 -1
  296. package/dist/components/PillToggle/PillToggle.spec.cjs +0 -1
  297. package/dist/components/PillToggle/PillToggle.spec.js +0 -1
  298. package/dist/components/Playground/Playground.cjs +0 -9
  299. package/dist/components/Playground/Playground.js +0 -9
  300. package/dist/components/Playground/Playground.spec.cjs +0 -1
  301. package/dist/components/Playground/Playground.spec.js +0 -1
  302. package/dist/components/ProgressCircle/ProgressCircle.spec.cjs +0 -1
  303. package/dist/components/ProgressCircle/ProgressCircle.spec.js +0 -1
  304. package/dist/components/ProgressIndicator/ProgressIndicator.spec.cjs +0 -1
  305. package/dist/components/ProgressIndicator/ProgressIndicator.spec.js +0 -1
  306. package/dist/components/Radio/Radio.spec.cjs +0 -1
  307. package/dist/components/Radio/Radio.spec.js +0 -1
  308. package/dist/components/Slider/Slider.spec.cjs +0 -1
  309. package/dist/components/Slider/Slider.spec.js +0 -1
  310. package/dist/components/Status/Status.spec.cjs +0 -1
  311. package/dist/components/Status/Status.spec.js +0 -1
  312. package/dist/components/Steps/Steps.spec.cjs +0 -1
  313. package/dist/components/Steps/Steps.spec.js +0 -1
  314. package/dist/components/Table/Table.spec.cjs +0 -1
  315. package/dist/components/Table/Table.spec.js +0 -1
  316. package/dist/components/Tabs/Tabs.spec.cjs +0 -1
  317. package/dist/components/Tabs/Tabs.spec.js +0 -1
  318. package/dist/components/Tag/Tag.spec.cjs +0 -1
  319. package/dist/components/Tag/Tag.spec.js +0 -1
  320. package/dist/components/Text/Text.spec.cjs +0 -1
  321. package/dist/components/Text/Text.spec.js +0 -1
  322. package/dist/components/TextInput/TextInput.spec.cjs +0 -1
  323. package/dist/components/TextInput/TextInput.spec.js +0 -1
  324. package/dist/components/Textarea/Textarea.spec.cjs +0 -1
  325. package/dist/components/Textarea/Textarea.spec.js +0 -1
  326. package/dist/components/Toast/Toast.spec.cjs +0 -1
  327. package/dist/components/Toast/Toast.spec.js +0 -1
  328. package/dist/components/Toggle/Toggle.spec.cjs +0 -1
  329. package/dist/components/Toggle/Toggle.spec.js +0 -1
  330. package/dist/components/Tooltip/Tooltip.spec.cjs +0 -1
  331. package/dist/components/Tooltip/Tooltip.spec.js +0 -1
  332. package/dist/design-system/components/Accordion/Accordion.spec.d.ts +0 -4
  333. package/dist/design-system/components/ActionMenu/ActionMenu.spec.d.ts +0 -4
  334. package/dist/design-system/components/Avatar/Avatar.spec.d.ts +0 -6
  335. package/dist/design-system/components/Badge/Badge.spec.d.ts +0 -12
  336. package/dist/design-system/components/Branding/Branding.spec.d.ts +0 -6
  337. package/dist/design-system/components/Breadcrumb/Breadcrumb.spec.d.ts +0 -4
  338. package/dist/design-system/components/Button/Button.spec.d.ts +0 -12
  339. package/dist/design-system/components/Calendar/Calendar.spec.d.ts +0 -4
  340. package/dist/design-system/components/Card/Card.spec.d.ts +0 -4
  341. package/dist/design-system/components/Checkbox/Checkbox.spec.d.ts +0 -4
  342. package/dist/design-system/components/Chip/Chip.spec.d.ts +0 -13
  343. package/dist/design-system/components/Code/Code.spec.d.ts +0 -10
  344. package/dist/design-system/components/Container/Container.spec.d.ts +0 -2
  345. package/dist/design-system/components/Datepicker/Datepicker.spec.d.ts +0 -6
  346. package/dist/design-system/components/Dialog/Dialog.spec.d.ts +0 -8
  347. package/dist/design-system/components/Divider/Divider.spec.d.ts +0 -10
  348. package/dist/design-system/components/DotStatus/DotStatus.spec.d.ts +0 -10
  349. package/dist/design-system/components/Dropdown/Dropdown.spec.d.ts +0 -12
  350. package/dist/design-system/components/EmptyState/EmptyState.spec.d.ts +0 -2
  351. package/dist/design-system/components/EventCard/EventCard.spec.d.ts +0 -8
  352. package/dist/design-system/components/Field/Field.spec.d.ts +0 -4
  353. package/dist/design-system/components/FileUpload/FileUpload.spec.d.ts +0 -6
  354. package/dist/design-system/components/Flex/Flex.spec.d.ts +0 -2
  355. package/dist/design-system/components/Icon/Icon.spec.d.ts +0 -6
  356. package/dist/design-system/components/ImageAspect/ImageAspect.spec.d.ts +0 -8
  357. package/dist/design-system/components/Key/Key.spec.d.ts +0 -8
  358. package/dist/design-system/components/Menu/Menu.spec.d.ts +0 -6
  359. package/dist/design-system/components/MicroCalendar/MicroCalendar.spec.d.ts +0 -4
  360. package/dist/design-system/components/Modal/Modal.spec.d.ts +0 -8
  361. package/dist/design-system/components/Pagination/Pagination.spec.d.ts +0 -6
  362. package/dist/design-system/components/PillToggle/PillToggle.d.ts +0 -13
  363. package/dist/design-system/components/PillToggle/PillToggle.spec.d.ts +0 -6
  364. package/dist/design-system/components/PillToggle/PillToggle.types.d.ts +0 -9
  365. package/dist/design-system/components/PillToggle/index.d.ts +0 -3
  366. package/dist/design-system/components/Playground/Playground.d.ts +0 -12
  367. package/dist/design-system/components/Playground/Playground.spec.d.ts +0 -6
  368. package/dist/design-system/components/Playground/Playground.types.d.ts +0 -7
  369. package/dist/design-system/components/Playground/index.d.ts +0 -3
  370. package/dist/design-system/components/ProgressCircle/ProgressCircle.spec.d.ts +0 -10
  371. package/dist/design-system/components/ProgressIndicator/ProgressIndicator.spec.d.ts +0 -10
  372. package/dist/design-system/components/Radio/Radio.spec.d.ts +0 -4
  373. package/dist/design-system/components/Slider/Slider.spec.d.ts +0 -4
  374. package/dist/design-system/components/Status/Status.spec.d.ts +0 -11
  375. package/dist/design-system/components/Steps/Steps.spec.d.ts +0 -11
  376. package/dist/design-system/components/Table/Table.spec.d.ts +0 -4
  377. package/dist/design-system/components/Tabs/Tabs.spec.d.ts +0 -7
  378. package/dist/design-system/components/Tag/Tag.spec.d.ts +0 -13
  379. package/dist/design-system/components/Text/Text.spec.d.ts +0 -2
  380. package/dist/design-system/components/TextInput/TextInput.spec.d.ts +0 -12
  381. package/dist/design-system/components/Textarea/Textarea.spec.d.ts +0 -10
  382. package/dist/design-system/components/Toast/Toast.spec.d.ts +0 -8
  383. package/dist/design-system/components/Toggle/Toggle.spec.d.ts +0 -8
  384. package/dist/design-system/components/Tooltip/Tooltip.spec.d.ts +0 -8
  385. package/dist/design-system/specs/spec.types.d.ts +0 -18
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../manifest/governance.manifest.cjs"),o=require("./rules/composition.rules.cjs"),c=require("./rules/action.rules.cjs"),t=require("./rules/spacing.rules.cjs"),s=require("./rules/accessibility.rules.cjs"),u=[o.enforceCompositionRule,c.enforcePrimaryActionLimitRule,t.enforceSpacingTokenRule,s.enforceAccessibilityRule];function l(e,n=r.UDSGovernance){return u.flatMap(i=>i({tree:e,governanceConfig:n}))}exports.runPolicyEngine=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../manifest/governance.manifest.cjs"),o=require("./rules/composition.rules.cjs"),c=require("./rules/action.rules.cjs"),l=require("./rules/spacing.rules.cjs"),s=require("./rules/accessibility.rules.cjs"),u=require("./rules/props.rules.cjs"),t=require("./rules/token-variable.rules.cjs"),a=require("./rules/tailwind.rules.cjs"),f=[o.enforceCompositionRule,c.enforcePrimaryActionLimitRule,l.enforceSpacingTokenRule,t.enforceTokenVariableRule,a.enforceTailwindDisallowRule,s.enforceAccessibilityRule,u.enforceCanonicalPropsRule];function p(e,r=i.UDSGovernance){return f.flatMap(n=>n({tree:e,governanceConfig:r}))}exports.runPolicyEngine=p;
@@ -1 +1 @@
1
- import{UDSGovernance as i}from"../manifest/governance.manifest.js";import{enforceCompositionRule as n}from"./rules/composition.rules.js";import{enforcePrimaryActionLimitRule as t}from"./rules/action.rules.js";import{enforceSpacingTokenRule as m}from"./rules/spacing.rules.js";import{enforceAccessibilityRule as c}from"./rules/accessibility.rules.js";const f=[n,t,m,c];function s(o,r=i){return f.flatMap(e=>e({tree:o,governanceConfig:r}))}export{s as runPolicyEngine};
1
+ import{UDSGovernance as i}from"../manifest/governance.manifest.js";import{enforceCompositionRule as n}from"./rules/composition.rules.js";import{enforcePrimaryActionLimitRule as m}from"./rules/action.rules.js";import{enforceSpacingTokenRule as f}from"./rules/spacing.rules.js";import{enforceAccessibilityRule as t}from"./rules/accessibility.rules.js";import{enforceCanonicalPropsRule as c}from"./rules/props.rules.js";import{enforceTokenVariableRule as l}from"./rules/token-variable.rules.js";import{enforceTailwindDisallowRule as p}from"./rules/tailwind.rules.js";const a=[n,m,f,l,p,t,c];function T(o,r=i){return a.flatMap(e=>e({tree:o,governanceConfig:r}))}export{T as runPolicyEngine};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../../manifest/components.manifest.cjs"),m=new Set(["div","span","button","input","textarea","select","option","label","ul","li","section","article","header","footer","main","nav","form"]),u=({tree:i,governanceConfig:n})=>{const o=[],s=(e,t)=>{const l=!!p.ComponentRegistry[e.type],r=m.has(e.type);!l&&!n.enforcement.allowUnknownComponents&&o.push({severity:"error",code:"RULE_UNKNOWN_COMPONENT",message:`Unknown component "${e.type}" is not allowed in governed mode.`,path:t,component:e.type}),r&&!n.enforcement.allowAdHocValues&&o.push({severity:"error",code:"RULE_RAW_HTML_DISALLOWED",message:`Raw HTML tag "${e.type}" is disallowed unless policy allows ad-hoc values.`,path:t,component:e.type}),(e.children??[]).forEach((c,a)=>s(c,`${t}.children[${a}]`))};return s(i,"root"),o};exports.enforceCompositionRule=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../../manifest/components.manifest.cjs"),r=require("../../manifest/composition.manifest.cjs"),f=new Set(["div","span","button","input","textarea","select","option","label","ul","li","section","article","header","footer","main","nav","form"]),R=({tree:m,governanceConfig:c})=>{const n=[],y=(e,t)=>r.CompositionRules.disallowedPairs.some(o=>o.parent===e&&o.child===t),p=(e,t,o)=>{const u=!!w.ComponentRegistry[e.type],d=f.has(e.type);if(!u&&!c.enforcement.allowUnknownComponents&&n.push({severity:"error",code:"RULE_UNKNOWN_COMPONENT",message:`Unknown component "${e.type}" is not allowed in governed mode.`,path:t,component:e.type}),d&&!c.enforcement.allowAdHocValues&&n.push({severity:"error",code:"RULE_RAW_HTML_DISALLOWED",message:`Raw HTML tag "${e.type}" is disallowed unless policy allows ad-hoc values.`,path:t,component:e.type}),o){const s=r.CompositionRules.allowedParentsByChild[e.type];if(Array.isArray(s)&&!s.includes(o)&&n.push({severity:"error",code:"RULE_INVALID_PARENT_COMPOSITION",message:`${e.type} must be nested under one of: ${s.join(", ")}.`,path:t,component:e.type}),y(o,e.type)){const i=r.CompositionRules.disallowedPairs.find(l=>l.parent===o&&l.child===e.type);n.push({severity:"error",code:"RULE_DISALLOWED_NESTING",message:`${e.type} cannot be nested in ${o}.${i!=null&&i.reason?` ${i.reason}`:""}`,path:t,component:e.type})}}const a=r.CompositionRules.allowedChildrenByParent[e.type];(e.children??[]).forEach((s,i)=>{const l=`${t}.children[${i}]`;Array.isArray(a)&&!a.includes(s.type)&&n.push({severity:"error",code:"RULE_INVALID_COMPOSITION",message:`${s.type} is not an allowed child of ${e.type}. Allowed: ${a.join(", ")}.`,path:l,component:s.type}),p(s,l,e.type)})};return p(m,"root"),n};exports.enforceCompositionRule=R;
@@ -1 +1 @@
1
- import{ComponentRegistry as p}from"../../manifest/components.manifest.js";const m=new Set(["div","span","button","input","textarea","select","option","label","ul","li","section","article","header","footer","main","nav","form"]),u=({tree:l,governanceConfig:n})=>{const o=[],s=(e,t)=>{const r=!!p[e.type],i=m.has(e.type);!r&&!n.enforcement.allowUnknownComponents&&o.push({severity:"error",code:"RULE_UNKNOWN_COMPONENT",message:`Unknown component "${e.type}" is not allowed in governed mode.`,path:t,component:e.type}),i&&!n.enforcement.allowAdHocValues&&o.push({severity:"error",code:"RULE_RAW_HTML_DISALLOWED",message:`Raw HTML tag "${e.type}" is disallowed unless policy allows ad-hoc values.`,path:t,component:e.type}),(e.children??[]).forEach((a,c)=>s(a,`${t}.children[${c}]`))};return s(l,"root"),o};export{u as enforceCompositionRule};
1
+ import{ComponentRegistry as u}from"../../manifest/components.manifest.js";import{CompositionRules as l}from"../../manifest/composition.manifest.js";const f=new Set(["div","span","button","input","textarea","select","option","label","ul","li","section","article","header","footer","main","nav","form"]),_=({tree:y,governanceConfig:c})=>{const n=[],m=(e,t)=>l.disallowedPairs.some(o=>o.parent===e&&o.child===t),p=(e,t,o)=>{const d=!!u[e.type],w=f.has(e.type);if(!d&&!c.enforcement.allowUnknownComponents&&n.push({severity:"error",code:"RULE_UNKNOWN_COMPONENT",message:`Unknown component "${e.type}" is not allowed in governed mode.`,path:t,component:e.type}),w&&!c.enforcement.allowAdHocValues&&n.push({severity:"error",code:"RULE_RAW_HTML_DISALLOWED",message:`Raw HTML tag "${e.type}" is disallowed unless policy allows ad-hoc values.`,path:t,component:e.type}),o){const s=l.allowedParentsByChild[e.type];if(Array.isArray(s)&&!s.includes(o)&&n.push({severity:"error",code:"RULE_INVALID_PARENT_COMPOSITION",message:`${e.type} must be nested under one of: ${s.join(", ")}.`,path:t,component:e.type}),m(o,e.type)){const r=l.disallowedPairs.find(i=>i.parent===o&&i.child===e.type);n.push({severity:"error",code:"RULE_DISALLOWED_NESTING",message:`${e.type} cannot be nested in ${o}.${r!=null&&r.reason?` ${r.reason}`:""}`,path:t,component:e.type})}}const a=l.allowedChildrenByParent[e.type];(e.children??[]).forEach((s,r)=>{const i=`${t}.children[${r}]`;Array.isArray(a)&&!a.includes(s.type)&&n.push({severity:"error",code:"RULE_INVALID_COMPOSITION",message:`${s.type} is not an allowed child of ${e.type}. Allowed: ${a.join(", ")}.`,path:i,component:s.type}),p(s,i,e.type)})};return p(y,"root"),n};export{_ as enforceCompositionRule};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../manifest/prop-aliases.manifest.cjs"),l=r=>({...a.PropAliasRules.global??{},...a.PropAliasRules.byComponent[r]??{}}),u=({tree:r})=>{const n=[],t=(o,p)=>{const c=l(o.type),i=o.props??{};for(const e of Object.keys(i)){const s=c[e];s&&n.push({severity:"error",code:"RULE_AMBIGUOUS_PROP_ALIAS",message:`Prop "${e}" is ambiguous for ${o.type}. Use canonical prop "${s}".`,path:`${p}.props.${e}`,component:o.type})}(o.children??[]).forEach((e,s)=>t(e,`${p}.children[${s}]`))};return t(r,"root"),n};exports.enforceCanonicalPropsRule=u;
@@ -0,0 +1 @@
1
+ import{PropAliasRules as c}from"../../manifest/prop-aliases.manifest.js";const l=p=>({...c.global??{},...c.byComponent[p]??{}}),f=({tree:p})=>{const n=[],t=(o,e)=>{const a=l(o.type),i=o.props??{};for(const r of Object.keys(i)){const s=a[r];s&&n.push({severity:"error",code:"RULE_AMBIGUOUS_PROP_ALIAS",message:`Prop "${r}" is ambiguous for ${o.type}. Use canonical prop "${s}".`,path:`${e}.props.${r}`,component:o.type})}(o.children??[]).forEach((r,s)=>t(r,`${e}.children[${s}]`))};return t(p,"root"),n};export{f as enforceCanonicalPropsRule};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=new Set(["class","className","classes","tw","tailwind"]),f=[/^(?:sm|md|lg|xl|2xl):/,/^(?:hover|focus|active|disabled|dark|group-hover):/,/^(?:m|mx|my|mt|mr|mb|ml|p|px|py|pt|pr|pb|pl)-/,/^(?:w|h|min-w|min-h|max-w|max-h)-/,/^(?:bg|text|font|tracking|leading|rounded|shadow|border|ring)-/,/^(?:flex|grid|inline-flex|inline-grid|contents|block|inline-block|hidden)$/,/^(?:items|justify|content|self|place-items|place-content|place-self)-/,/^(?:gap|space-x|space-y|col-span|row-span|order)-/,/^tw-/],d=e=>{const t=e.trim();return t?f.some(n=>n.test(t)):!1},m=e=>e.split(/\s+/g).map(t=>t.trim()).filter(Boolean),l=(e,t,n,i)=>{if(typeof e=="string"){const s=m(e);for(const r of s)d(r)&&i.push({severity:"error",code:"RULE_TAILWIND_CLASS_DISALLOWED",message:`Tailwind utility token "${r}" is disallowed. Use UDS components and tokenized props.`,path:t,component:n,token:r});return}if(Array.isArray(e)){e.forEach((s,r)=>l(s,`${t}[${r}]`,n,i));return}typeof e!="object"||e===null||Object.entries(e).forEach(([s,r])=>{if(a.has(s)){l(r,`${t}.${s}`,n,i);return}l(r,`${t}.${s}`,n,i)})},p=({tree:e})=>{const t=[],n=(i,s)=>{const r=i.props??{};Object.entries(r).forEach(([o,c])=>{if(a.has(o)){l(c,`${s}.props.${o}`,i.type,t);return}typeof c=="string"&&/\b(?:className|tailwind|tw)\b/i.test(o)&&l(c,`${s}.props.${o}`,i.type,t)}),(i.children??[]).forEach((o,c)=>n(o,`${s}.children[${c}]`))};return n(e,"root"),t};exports.enforceTailwindDisallowRule=p;
@@ -0,0 +1 @@
1
+ const a=new Set(["class","className","classes","tw","tailwind"]),f=[/^(?:sm|md|lg|xl|2xl):/,/^(?:hover|focus|active|disabled|dark|group-hover):/,/^(?:m|mx|my|mt|mr|mb|ml|p|px|py|pt|pr|pb|pl)-/,/^(?:w|h|min-w|min-h|max-w|max-h)-/,/^(?:bg|text|font|tracking|leading|rounded|shadow|border|ring)-/,/^(?:flex|grid|inline-flex|inline-grid|contents|block|inline-block|hidden)$/,/^(?:items|justify|content|self|place-items|place-content|place-self)-/,/^(?:gap|space-x|space-y|col-span|row-span|order)-/,/^tw-/],d=e=>{const s=e.trim();return s?f.some(n=>n.test(s)):!1},p=e=>e.split(/\s+/g).map(s=>s.trim()).filter(Boolean),l=(e,s,n,i)=>{if(typeof e=="string"){const t=p(e);for(const r of t)d(r)&&i.push({severity:"error",code:"RULE_TAILWIND_CLASS_DISALLOWED",message:`Tailwind utility token "${r}" is disallowed. Use UDS components and tokenized props.`,path:s,component:n,token:r});return}if(Array.isArray(e)){e.forEach((t,r)=>l(t,`${s}[${r}]`,n,i));return}typeof e!="object"||e===null||Object.entries(e).forEach(([t,r])=>{if(a.has(t)){l(r,`${s}.${t}`,n,i);return}l(r,`${s}.${t}`,n,i)})},m=({tree:e})=>{const s=[],n=(i,t)=>{const r=i.props??{};Object.entries(r).forEach(([o,c])=>{if(a.has(o)){l(c,`${t}.props.${o}`,i.type,s);return}typeof c=="string"&&/\b(?:className|tailwind|tw)\b/i.test(o)&&l(c,`${t}.props.${o}`,i.type,s)}),(i.children??[]).forEach((o,c)=>n(o,`${t}.children[${c}]`))};return n(e,"root"),s};export{m as enforceTailwindDisallowRule};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=/--[a-zA-Z0-9_-]+/g,u=(e,s,i,t,r,o)=>{e.push({severity:"error",code:s,message:i,path:t,component:r,token:o})},a=(e,s,i,t)=>{if(typeof e=="string"){const r=e.match(f)??[];new Set(r).forEach(n=>{n.startsWith("--uds-")||u(t,"RULE_CUSTOM_CSS_VAR_DISALLOWED",`Custom CSS variable "${n}" is not allowed. Use --uds-* variables or hardcoded literals.`,s,i,n)});return}if(Array.isArray(e)){e.forEach((r,o)=>a(r,`${s}[${o}]`,i,t));return}typeof e!="object"||e===null||Object.entries(e).forEach(([r,o])=>{r.startsWith("--")&&u(t,"RULE_CSS_VAR_DEFINITION_DISALLOWED",`Defining CSS variable "${r}" is not allowed in generated output.`,`${s}.${r}`,i,r),a(o,`${s}.${r}`,i,t)})},S=({tree:e})=>{const s=[],i=(t,r)=>{const o=t.props??{};Object.entries(o).forEach(([n,c])=>{a(c,`${r}.props.${n}`,t.type,s)}),(t.children??[]).forEach((n,c)=>i(n,`${r}.children[${c}]`))};return i(e,"root"),s};exports.enforceTokenVariableRule=S;
@@ -0,0 +1 @@
1
+ const S=/--[a-zA-Z0-9_-]+/g,f=(t,e,i,s,r,o)=>{t.push({severity:"error",code:e,message:i,path:s,component:r,token:o})},a=(t,e,i,s)=>{if(typeof t=="string"){const r=t.match(S)??[];new Set(r).forEach(c=>{c.startsWith("--uds-")||f(s,"RULE_CUSTOM_CSS_VAR_DISALLOWED",`Custom CSS variable "${c}" is not allowed. Use --uds-* variables or hardcoded literals.`,e,i,c)});return}if(Array.isArray(t)){t.forEach((r,o)=>a(r,`${e}[${o}]`,i,s));return}typeof t!="object"||t===null||Object.entries(t).forEach(([r,o])=>{r.startsWith("--")&&f(s,"RULE_CSS_VAR_DEFINITION_DISALLOWED",`Defining CSS variable "${r}" is not allowed in generated output.`,`${e}.${r}`,i,r),a(o,`${e}.${r}`,i,s)})},u=({tree:t})=>{const e=[],i=(s,r)=>{const o=s.props??{};Object.entries(o).forEach(([c,n])=>{a(n,`${r}.props.${c}`,s.type,e)}),(s.children??[]).forEach((c,n)=>i(c,`${r}.children[${n}]`))};return i(t,"root"),e};export{u as enforceTokenVariableRule};
@@ -0,0 +1,48 @@
1
+ You are implementing UI from Figma Make using `@mich8060/unified-design-system`.
2
+
3
+ Hard requirements:
4
+ - Use only UDS components and UDS exports.
5
+ - Do not use Tailwind classes or utility CSS.
6
+ - Do not use ad-hoc `className` styling.
7
+ - Do not create custom CSS variables.
8
+ - Use only `--uds-*` variables or hardcoded literals.
9
+ - Return deterministic JSON only.
10
+
11
+ Preferred flow:
12
+ 1. Start from `@mich8060/unified-design-system/ai/templates`.
13
+ 2. Resolve remaining intent decisions using `@mich8060/unified-design-system/ai/manifest.json` -> `intentComponentMappings`.
14
+ 3. Fill template slots.
15
+ 4. Keep canonical prop names.
16
+ 5. Validate against `@mich8060/unified-design-system/ai/validation`.
17
+
18
+ Starter scaffold:
19
+ ```json
20
+ {
21
+ "manifestVersion": "1.0.0",
22
+ "governanceVersion": "1.0.0",
23
+ "policyVersion": "1.0.0",
24
+ "tree": {
25
+ "type": "Container",
26
+ "props": { "gap": "--uds-spacing-24" },
27
+ "children": [
28
+ {
29
+ "type": "Card",
30
+ "children": [
31
+ { "type": "Text", "props": { "variant": "heading-24", "text": "Title" } },
32
+ {
33
+ "type": "Flex",
34
+ "children": [
35
+ { "type": "Button", "props": { "appearance": "primary", "label": "Primary" } },
36
+ { "type": "Button", "props": { "appearance": "text", "label": "Secondary" } }
37
+ ]
38
+ }
39
+ ]
40
+ }
41
+ ]
42
+ },
43
+ "audit": {
44
+ "source": "figma-make",
45
+ "notes": "UDS-only generation"
46
+ }
47
+ }
48
+ ```
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "UDS AI Output",
4
+ "type": "object",
5
+ "required": [
6
+ "manifestVersion",
7
+ "governanceVersion",
8
+ "policyVersion",
9
+ "tree",
10
+ "audit"
11
+ ],
12
+ "properties": {
13
+ "manifestVersion": { "type": "string", "minLength": 1 },
14
+ "governanceVersion": { "type": "string", "minLength": 1 },
15
+ "policyVersion": { "type": "string", "minLength": 1 },
16
+ "tree": {
17
+ "type": "object",
18
+ "required": ["type"],
19
+ "properties": {
20
+ "type": { "type": "string", "minLength": 1 },
21
+ "props": { "type": "object" },
22
+ "children": {
23
+ "type": "array",
24
+ "items": { "$ref": "#/$defs/node" }
25
+ }
26
+ },
27
+ "additionalProperties": true
28
+ },
29
+ "audit": {
30
+ "type": "object",
31
+ "required": [
32
+ "timestamp",
33
+ "model",
34
+ "promptHash",
35
+ "udsVersion",
36
+ "manifestVersion",
37
+ "policyVersion",
38
+ "componentsUsed",
39
+ "tokensUsed",
40
+ "violationsCount",
41
+ "validationStatus"
42
+ ],
43
+ "properties": {
44
+ "timestamp": { "type": "string" },
45
+ "model": { "type": "string" },
46
+ "promptHash": { "type": "string" },
47
+ "udsVersion": { "type": "string" },
48
+ "manifestVersion": { "type": "string" },
49
+ "policyVersion": { "type": "string" },
50
+ "componentsUsed": { "type": "array", "items": { "type": "string" } },
51
+ "tokensUsed": { "type": "array", "items": { "type": "string" } },
52
+ "violationsCount": { "type": "number", "minimum": 0 },
53
+ "validationStatus": { "type": "string", "enum": ["pass", "fail"] }
54
+ },
55
+ "additionalProperties": true
56
+ }
57
+ },
58
+ "$defs": {
59
+ "node": {
60
+ "type": "object",
61
+ "required": ["type"],
62
+ "properties": {
63
+ "type": { "type": "string", "minLength": 1 },
64
+ "props": { "type": "object" },
65
+ "children": { "type": "array", "items": { "$ref": "#/$defs/node" } }
66
+ },
67
+ "additionalProperties": true
68
+ }
69
+ },
70
+ "additionalProperties": true
71
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./runtime-sdk.cjs");exports.createUDSRuntimeHelperSDK=e.createUDSRuntimeHelperSDK;
@@ -0,0 +1 @@
1
+ import{createUDSRuntimeHelperSDK as t}from"./runtime-sdk.js";export{t as createUDSRuntimeHelperSDK};
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../manifest/components.manifest.cjs"),u=require("../manifest/governance.manifest.cjs"),f=require("../manifest/system.manifest.cjs"),g=require("../manifest/prop-aliases.manifest.cjs"),l=require("../validation/validateAIOutput.cjs");function d(p={}){const s=p.governance??u.UDSGovernance;return{governance:s,getVersionLineage:()=>u.getVersionLineage(),getManifest:()=>f.UDSManifest,getComponent:e=>m.ComponentRegistry[e],canonicalizeProps(e,t){const i={},a={};for(const[n,o]of Object.entries(t)){const r=g.getCanonicalPropName(e,n);i[r]=o,r!==n&&(a[n]=r)}return{canonicalProps:i,aliasesApplied:a}},validate(e){return l.validateAIOutput(e,s)},validateOrThrow(e){var r,c;const t=l.validateAIOutput(e,s);if(t.status==="pass")return t;const i=`Validation failed with ${t.violations.length} error(s).`,a=((r=t.deterministicFeedback)==null?void 0:r.summary)??i,n=(c=t.deterministicFeedback)==null?void 0:c.fingerprint,o=[`[UDS AI SDK] ${a}`];throw n&&o.push(`Fingerprint: ${n}`),new Error(o.join(`
2
+ `))}}}exports.createUDSRuntimeHelperSDK=d;
@@ -0,0 +1,2 @@
1
+ import{ComponentRegistry as l}from"../manifest/components.manifest.js";import{UDSGovernance as f,getVersionLineage as g}from"../manifest/governance.manifest.js";import{UDSManifest as u}from"../manifest/system.manifest.js";import{getCanonicalPropName as d}from"../manifest/prop-aliases.manifest.js";import{validateAIOutput as m}from"../validation/validateAIOutput.js";function b(p={}){const s=p.governance??f;return{governance:s,getVersionLineage:()=>g(),getManifest:()=>u,getComponent:e=>l[e],canonicalizeProps(e,n){const i={},o={};for(const[t,a]of Object.entries(n)){const r=d(e,t);i[r]=a,r!==t&&(o[t]=r)}return{canonicalProps:i,aliasesApplied:o}},validate(e){return m(e,s)},validateOrThrow(e){var r,c;const n=m(e,s);if(n.status==="pass")return n;const i=`Validation failed with ${n.violations.length} error(s).`,o=((r=n.deterministicFeedback)==null?void 0:r.summary)??i,t=(c=n.deterministicFeedback)==null?void 0:c.fingerprint,a=[`[UDS AI SDK] ${o}`];throw t&&a.push(`Fingerprint: ${t}`),new Error(a.join(`
2
+ `))}}}export{b as createUDSRuntimeHelperSDK};
@@ -0,0 +1,416 @@
1
+ {
2
+ "contractName": "uds.ai.layout-templates",
3
+ "schemaVersion": "1.0.0",
4
+ "templates": [
5
+ {
6
+ "id": "auth-form-card",
7
+ "intent": "Authentication form with one primary action and optional secondary action.",
8
+ "tags": [
9
+ "form",
10
+ "auth",
11
+ "card"
12
+ ],
13
+ "slots": {
14
+ "title": "Sign in",
15
+ "subtitle": "Use your work account",
16
+ "primaryActionLabel": "Sign in",
17
+ "secondaryActionLabel": "Forgot password?"
18
+ },
19
+ "tree": {
20
+ "type": "Container",
21
+ "props": {
22
+ "gap": "--uds-spacing-24"
23
+ },
24
+ "children": [
25
+ {
26
+ "type": "Card",
27
+ "children": [
28
+ {
29
+ "type": "Text",
30
+ "props": {
31
+ "variant": "heading-24",
32
+ "text": "{{title}}"
33
+ }
34
+ },
35
+ {
36
+ "type": "Text",
37
+ "props": {
38
+ "variant": "body-16",
39
+ "text": "{{subtitle}}"
40
+ }
41
+ },
42
+ {
43
+ "type": "Field",
44
+ "children": [
45
+ {
46
+ "type": "TextInput",
47
+ "props": {
48
+ "type": "email"
49
+ }
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ "type": "Field",
55
+ "children": [
56
+ {
57
+ "type": "TextInput",
58
+ "props": {
59
+ "type": "password"
60
+ }
61
+ }
62
+ ]
63
+ },
64
+ {
65
+ "type": "Flex",
66
+ "children": [
67
+ {
68
+ "type": "Button",
69
+ "props": {
70
+ "appearance": "primary",
71
+ "label": "{{primaryActionLabel}}"
72
+ }
73
+ },
74
+ {
75
+ "type": "Button",
76
+ "props": {
77
+ "appearance": "text",
78
+ "label": "{{secondaryActionLabel}}"
79
+ }
80
+ }
81
+ ]
82
+ }
83
+ ]
84
+ }
85
+ ]
86
+ },
87
+ "constraints": [
88
+ "Keep max one primary Button in the section.",
89
+ "Wrap all form controls with Field."
90
+ ],
91
+ "priority": "first-choice",
92
+ "recommendedFor": [
93
+ "figma-make"
94
+ ]
95
+ },
96
+ {
97
+ "id": "dashboard-table-summary",
98
+ "intent": "Summary header with data table and row actions.",
99
+ "tags": [
100
+ "dashboard",
101
+ "table",
102
+ "summary"
103
+ ],
104
+ "slots": {
105
+ "heading": "Open Requests",
106
+ "primaryActionLabel": "Create request"
107
+ },
108
+ "tree": {
109
+ "type": "Container",
110
+ "props": {
111
+ "gap": "--uds-spacing-16"
112
+ },
113
+ "children": [
114
+ {
115
+ "type": "Flex",
116
+ "children": [
117
+ {
118
+ "type": "Text",
119
+ "props": {
120
+ "variant": "heading-24",
121
+ "text": "{{heading}}"
122
+ }
123
+ },
124
+ {
125
+ "type": "Button",
126
+ "props": {
127
+ "appearance": "primary",
128
+ "label": "{{primaryActionLabel}}"
129
+ }
130
+ }
131
+ ]
132
+ },
133
+ {
134
+ "type": "Table",
135
+ "children": [
136
+ {
137
+ "type": "Status",
138
+ "props": {
139
+ "variant": "success",
140
+ "text": "Ready"
141
+ }
142
+ },
143
+ {
144
+ "type": "Tag",
145
+ "props": {
146
+ "color": "blue",
147
+ "label": "Active"
148
+ }
149
+ },
150
+ {
151
+ "type": "ActionMenu",
152
+ "props": {
153
+ "triggerLabel": "Row actions"
154
+ }
155
+ }
156
+ ]
157
+ }
158
+ ]
159
+ },
160
+ "constraints": [
161
+ "Only use allowed Table children (Tag, Status, Avatar, Button, ActionMenu, ProgressIndicator, DotStatus)."
162
+ ],
163
+ "priority": "first-choice",
164
+ "recommendedFor": [
165
+ "figma-make"
166
+ ]
167
+ },
168
+ {
169
+ "id": "settings-two-column",
170
+ "intent": "Two-column settings page with form area and contextual summary card.",
171
+ "tags": [
172
+ "settings",
173
+ "form",
174
+ "two-column"
175
+ ],
176
+ "slots": {
177
+ "pageTitle": "Account Settings",
178
+ "saveLabel": "Save changes"
179
+ },
180
+ "tree": {
181
+ "type": "Container",
182
+ "props": {
183
+ "gap": "--uds-spacing-24"
184
+ },
185
+ "children": [
186
+ {
187
+ "type": "Text",
188
+ "props": {
189
+ "variant": "heading-24",
190
+ "text": "{{pageTitle}}"
191
+ }
192
+ },
193
+ {
194
+ "type": "Flex",
195
+ "props": {
196
+ "gap": "--uds-spacing-24"
197
+ },
198
+ "children": [
199
+ {
200
+ "type": "Card",
201
+ "children": [
202
+ {
203
+ "type": "Field",
204
+ "children": [
205
+ {
206
+ "type": "TextInput",
207
+ "props": {
208
+ "type": "text"
209
+ }
210
+ }
211
+ ]
212
+ },
213
+ {
214
+ "type": "Field",
215
+ "children": [
216
+ {
217
+ "type": "Dropdown"
218
+ }
219
+ ]
220
+ },
221
+ {
222
+ "type": "Button",
223
+ "props": {
224
+ "appearance": "primary",
225
+ "label": "{{saveLabel}}"
226
+ }
227
+ }
228
+ ]
229
+ },
230
+ {
231
+ "type": "Card",
232
+ "children": [
233
+ {
234
+ "type": "Text",
235
+ "props": {
236
+ "variant": "body-16",
237
+ "text": "Changes apply to your profile."
238
+ }
239
+ },
240
+ {
241
+ "type": "Tag",
242
+ "props": {
243
+ "color": "neutral",
244
+ "label": "Profile"
245
+ }
246
+ }
247
+ ]
248
+ }
249
+ ]
250
+ }
251
+ ]
252
+ },
253
+ "constraints": [
254
+ "Avoid multiple primary buttons in the same section.",
255
+ "Use spacing tokens from the governed spacing system."
256
+ ],
257
+ "priority": "first-choice",
258
+ "recommendedFor": [
259
+ "figma-make"
260
+ ]
261
+ },
262
+ {
263
+ "id": "modal-confirmation",
264
+ "intent": "Confirmation flow in modal with primary and dismissive actions.",
265
+ "tags": [
266
+ "modal",
267
+ "confirmation",
268
+ "destructive"
269
+ ],
270
+ "slots": {
271
+ "title": "Delete item?",
272
+ "body": "This action cannot be undone.",
273
+ "confirmLabel": "Delete",
274
+ "cancelLabel": "Cancel"
275
+ },
276
+ "tree": {
277
+ "type": "Modal",
278
+ "children": [
279
+ {
280
+ "type": "Text",
281
+ "props": {
282
+ "variant": "heading-24",
283
+ "text": "{{title}}"
284
+ }
285
+ },
286
+ {
287
+ "type": "Text",
288
+ "props": {
289
+ "variant": "body-16",
290
+ "text": "{{body}}"
291
+ }
292
+ },
293
+ {
294
+ "type": "Flex",
295
+ "children": [
296
+ {
297
+ "type": "Button",
298
+ "props": {
299
+ "appearance": "text",
300
+ "label": "{{cancelLabel}}"
301
+ }
302
+ },
303
+ {
304
+ "type": "Button",
305
+ "props": {
306
+ "appearance": "destructive",
307
+ "label": "{{confirmLabel}}"
308
+ }
309
+ }
310
+ ]
311
+ }
312
+ ]
313
+ },
314
+ "constraints": [
315
+ "Do not nest Modal inside Modal.",
316
+ "Keep one destructive primary-like action."
317
+ ],
318
+ "priority": "first-choice",
319
+ "recommendedFor": [
320
+ "figma-make"
321
+ ]
322
+ },
323
+ {
324
+ "id": "wizard-steps-form",
325
+ "intent": "Multi-step form shell with progress indicator and staged actions.",
326
+ "tags": [
327
+ "wizard",
328
+ "steps",
329
+ "form"
330
+ ],
331
+ "slots": {
332
+ "title": "Create Job Posting",
333
+ "nextLabel": "Next",
334
+ "backLabel": "Back"
335
+ },
336
+ "tree": {
337
+ "type": "Container",
338
+ "children": [
339
+ {
340
+ "type": "Text",
341
+ "props": {
342
+ "variant": "heading-24",
343
+ "text": "{{title}}"
344
+ }
345
+ },
346
+ {
347
+ "type": "Steps"
348
+ },
349
+ {
350
+ "type": "Card",
351
+ "children": [
352
+ {
353
+ "type": "Field",
354
+ "children": [
355
+ {
356
+ "type": "TextInput",
357
+ "props": {
358
+ "type": "text"
359
+ }
360
+ }
361
+ ]
362
+ },
363
+ {
364
+ "type": "Field",
365
+ "children": [
366
+ {
367
+ "type": "Textarea"
368
+ }
369
+ ]
370
+ },
371
+ {
372
+ "type": "Flex",
373
+ "children": [
374
+ {
375
+ "type": "Button",
376
+ "props": {
377
+ "appearance": "text",
378
+ "label": "{{backLabel}}"
379
+ }
380
+ },
381
+ {
382
+ "type": "Button",
383
+ "props": {
384
+ "appearance": "primary",
385
+ "label": "{{nextLabel}}"
386
+ }
387
+ }
388
+ ]
389
+ }
390
+ ]
391
+ }
392
+ ]
393
+ },
394
+ "constraints": [
395
+ "Fields must contain form controls.",
396
+ "Keep one primary action for each step section."
397
+ ],
398
+ "priority": "first-choice",
399
+ "recommendedFor": [
400
+ "figma-make"
401
+ ]
402
+ }
403
+ ],
404
+ "selectionPolicy": {
405
+ "mode": "template-first",
406
+ "recommendedFor": [
407
+ "figma-make"
408
+ ],
409
+ "fallback": "Only use freeform composition when no template intent matches.",
410
+ "guards": [
411
+ "Use UDS components only.",
412
+ "Do not use Tailwind utilities or className styling.",
413
+ "Use --uds-* tokens or hardcoded literals only."
414
+ ]
415
+ }
416
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I={SCHEMA_NODE_OBJECT:"Return each tree node as an object with type/props/children keys.",SCHEMA_NODE_TYPE:"Set node.type to a non-empty UDS component name.",SCHEMA_NODE_PROPS:"Provide node.props as a plain object.",SCHEMA_NODE_CHILDREN:"Provide node.children as an array of child nodes.",RULE_UNKNOWN_COMPONENT:"Replace unknown components with supported UDS components.",RULE_RAW_HTML_DISALLOWED:"Use UDS components instead of raw HTML tags.",RULE_INVALID_COMPOSITION:"Use only allowed child components for the parent component.",RULE_INVALID_PARENT_COMPOSITION:"Move the component under one of its allowed parent components.",RULE_DISALLOWED_NESTING:"Remove or refactor disallowed parent/child nesting.",RULE_MAX_PRIMARY_ACTIONS:"Keep at most one primary Button per section.",RULE_SPACING_TOKEN_ONLY:"Use --uds-spacing-* tokens for spacing-related props.",RULE_UNKNOWN_SPACING_TOKEN:"Replace unknown spacing token with an allowed spacing token.",RULE_CUSTOM_CSS_VAR_DISALLOWED:"Use only --uds-* CSS variables or hardcoded literals.",RULE_CSS_VAR_DEFINITION_DISALLOWED:"Do not define CSS custom properties in generated output.",RULE_TAILWIND_CLASS_DISALLOWED:"Remove Tailwind utilities and use UDS components/tokens instead.",RULE_AMBIGUOUS_PROP_ALIAS:"Replace ambiguous alias props with canonical prop names.",RULE_VERSION_MISMATCH_MANIFESTVERSION:"Set manifestVersion to the current manifest contract version.",RULE_VERSION_MISMATCH_GOVERNANCEVERSION:"Set governanceVersion to the current governance version.",RULE_VERSION_MISMATCH_POLICYVERSION:"Set policyVersion to the current policy version.",RULE_MAX_NESTING_DEPTH:"Reduce UI nesting depth to stay within governance limits.",RULE_INLINE_STYLE_DISALLOWED:"Remove inline styles and use tokenized component props.",DRIFT_UNKNOWN_COMPONENT:"Align with ComponentRegistry component names.",DRIFT_DISALLOWED_NESTING:"Align nesting with layout disallowed pair rules.",DRIFT_MARGIN_USAGE:"Replace margin usage with composition spacing tokens.",DRIFT_INLINE_STYLE:"Replace inline style usage with UDS tokenized styling.",DRIFT_UNKNOWN_TOKEN:"Use a known token from the published UDS token contract.",DRIFT_HARDCODED_COLOR:"Replace color literals with semantic UDS tokens."},r=(e,t)=>String(e??"").localeCompare(String(t??"")),c=e=>[e.severity,e.code,e.path,e.component??"",e.token??"",e.message].join("|"),E=e=>{let t=2166136261;for(let i=0;i<e.length;i+=1)t^=e.charCodeAt(i),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")};function N(e){const t=[...e].sort((n,o)=>{const s=r(n.severity,o.severity);if(s!==0)return s;const p=r(n.code,o.code);if(p!==0)return p;const _=r(n.path,o.path);if(_!==0)return _;const d=r(n.component,o.component);if(d!==0)return d;const S=r(n.token,o.token);return S!==0?S:r(n.message,o.message)}),i=[],a=new Set;for(const n of t){const o=c(n);a.has(o)||(a.add(o),i.push(n))}return i}function l(e){const t=N(e),i=t.map(c).join("||"),a=`fb-${E(i)}`,n=t.map(s=>({id:`${s.code}:${s.path}:${E(c(s))}`,code:s.code,path:s.path,message:s.message,fix:I[s.code]??"Apply governance-compliant correction for this violation.",severity:s.severity})),o=`${n.length} deterministic violation(s)`;return{fingerprint:a,summary:o,items:n}}exports.buildDeterministicFeedback=l;exports.sortAndDedupeViolations=N;
@@ -0,0 +1 @@
1
+ const N={SCHEMA_NODE_OBJECT:"Return each tree node as an object with type/props/children keys.",SCHEMA_NODE_TYPE:"Set node.type to a non-empty UDS component name.",SCHEMA_NODE_PROPS:"Provide node.props as a plain object.",SCHEMA_NODE_CHILDREN:"Provide node.children as an array of child nodes.",RULE_UNKNOWN_COMPONENT:"Replace unknown components with supported UDS components.",RULE_RAW_HTML_DISALLOWED:"Use UDS components instead of raw HTML tags.",RULE_INVALID_COMPOSITION:"Use only allowed child components for the parent component.",RULE_INVALID_PARENT_COMPOSITION:"Move the component under one of its allowed parent components.",RULE_DISALLOWED_NESTING:"Remove or refactor disallowed parent/child nesting.",RULE_MAX_PRIMARY_ACTIONS:"Keep at most one primary Button per section.",RULE_SPACING_TOKEN_ONLY:"Use --uds-spacing-* tokens for spacing-related props.",RULE_UNKNOWN_SPACING_TOKEN:"Replace unknown spacing token with an allowed spacing token.",RULE_CUSTOM_CSS_VAR_DISALLOWED:"Use only --uds-* CSS variables or hardcoded literals.",RULE_CSS_VAR_DEFINITION_DISALLOWED:"Do not define CSS custom properties in generated output.",RULE_TAILWIND_CLASS_DISALLOWED:"Remove Tailwind utilities and use UDS components/tokens instead.",RULE_AMBIGUOUS_PROP_ALIAS:"Replace ambiguous alias props with canonical prop names.",RULE_VERSION_MISMATCH_MANIFESTVERSION:"Set manifestVersion to the current manifest contract version.",RULE_VERSION_MISMATCH_GOVERNANCEVERSION:"Set governanceVersion to the current governance version.",RULE_VERSION_MISMATCH_POLICYVERSION:"Set policyVersion to the current policy version.",RULE_MAX_NESTING_DEPTH:"Reduce UI nesting depth to stay within governance limits.",RULE_INLINE_STYLE_DISALLOWED:"Remove inline styles and use tokenized component props.",DRIFT_UNKNOWN_COMPONENT:"Align with ComponentRegistry component names.",DRIFT_DISALLOWED_NESTING:"Align nesting with layout disallowed pair rules.",DRIFT_MARGIN_USAGE:"Replace margin usage with composition spacing tokens.",DRIFT_INLINE_STYLE:"Replace inline style usage with UDS tokenized styling.",DRIFT_UNKNOWN_TOKEN:"Use a known token from the published UDS token contract.",DRIFT_HARDCODED_COLOR:"Replace color literals with semantic UDS tokens."},i=(e,t)=>String(e??"").localeCompare(String(t??"")),c=e=>[e.severity,e.code,e.path,e.component??"",e.token??"",e.message].join("|"),E=e=>{let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")};function I(e){const t=[...e].sort((n,o)=>{const s=i(n.severity,o.severity);if(s!==0)return s;const p=i(n.code,o.code);if(p!==0)return p;const _=i(n.path,o.path);if(_!==0)return _;const S=i(n.component,o.component);if(S!==0)return S;const d=i(n.token,o.token);return d!==0?d:i(n.message,o.message)}),r=[],a=new Set;for(const n of t){const o=c(n);a.has(o)||(a.add(o),r.push(n))}return r}function R(e){const t=I(e),r=t.map(c).join("||"),a=`fb-${E(r)}`,n=t.map(s=>({id:`${s.code}:${s.path}:${E(c(s))}`,code:s.code,path:s.path,message:s.message,fix:N[s.code]??"Apply governance-compliant correction for this violation.",severity:s.severity})),o=`${n.length} deterministic violation(s)`;return{fingerprint:a,summary:o,items:n}}export{R as buildDeterministicFeedback,I as sortAndDedupeViolations};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../manifest/components.manifest.cjs"),p=require("../manifest/layout.manifest.cjs"),a=require("../manifest/tokens.intent.manifest.cjs"),f=/#(?:[a-fA-F0-9]{3,8})\b|rgb\(|rgba\(|hsl\(|hsla\(/,y=new Set([...p.LayoutRules.spacingSystem.allowedTokens,...Object.values(a.TokenIntentMap.surface),...Object.values(a.TokenIntentMap.action),...Object.values(a.TokenIntentMap.text),...Object.values(a.TokenIntentMap.border),...Object.values(a.TokenIntentMap.state),"--uds-radius-8","--uds-elevation-overlay"]),i=(l,n,c,t,o,r)=>{l.push({severity:"warning",code:n,message:c,path:t,component:o,token:r})};function T(l){const n=[],c=(t,o,r)=>{d.ComponentRegistry[t.type]||i(n,"DRIFT_UNKNOWN_COMPONENT",`Component "${t.type}" is not in ComponentRegistry.`,o,t.type),r&&p.LayoutRules.disallowedNesting.some(e=>e.parent===r.type&&e.child===t.type)&&i(n,"DRIFT_DISALLOWED_NESTING",`${t.type} nested inside ${r.type} violates layout rules.`,o,t.type);const u=t.props??{};Object.entries(u).forEach(([s,e])=>{s.toLowerCase().startsWith("margin")&&i(n,"DRIFT_MARGIN_USAGE","Margin usage detected. Prefer governed spacing composition tokens.",`${o}.${s}`,t.type),(s==="style"||s==="inlineStyle")&&i(n,"DRIFT_INLINE_STYLE","Inline CSS detected. Use tokenized props or class-based styling.",`${o}.${s}`,t.type),typeof e=="string"&&(e.startsWith("--uds-")&&!y.has(e)&&i(n,"DRIFT_UNKNOWN_TOKEN",`Unknown UDS token "${e}".`,`${o}.${s}`,t.type,e),f.test(e)&&i(n,"DRIFT_HARDCODED_COLOR","Hardcoded color literal detected. Use semantic UDS token values.",`${o}.${s}`,t.type))}),(t.children??[]).forEach((s,e)=>c(s,`${o}.children[${e}]`,t))};return c(l,"root"),n}exports.detectDrift=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../manifest/components.manifest.cjs"),p=require("../manifest/layout.manifest.cjs"),r=require("../manifest/tokens.intent.manifest.cjs"),f=new Set([...p.LayoutRules.spacingSystem.allowedTokens,...Object.values(r.TokenIntentMap.surface),...Object.values(r.TokenIntentMap.action),...Object.values(r.TokenIntentMap.text),...Object.values(r.TokenIntentMap.border),...Object.values(r.TokenIntentMap.state),"--uds-radius-8","--uds-elevation-overlay"]),a=(l,n,c,t,i,o)=>{l.push({severity:"warning",code:n,message:c,path:t,component:i,token:o})};function d(l){const n=[],c=(t,i,o)=>{y.ComponentRegistry[t.type]||a(n,"DRIFT_UNKNOWN_COMPONENT",`Component "${t.type}" is not in ComponentRegistry.`,i,t.type),o&&p.LayoutRules.disallowedNesting.some(e=>e.parent===o.type&&e.child===t.type)&&a(n,"DRIFT_DISALLOWED_NESTING",`${t.type} nested inside ${o.type} violates layout rules.`,i,t.type);const u=t.props??{};Object.entries(u).forEach(([s,e])=>{s.toLowerCase().startsWith("margin")&&a(n,"DRIFT_MARGIN_USAGE","Margin usage detected. Prefer governed spacing composition tokens.",`${i}.${s}`,t.type),(s==="style"||s==="inlineStyle")&&a(n,"DRIFT_INLINE_STYLE","Inline CSS detected. Use tokenized props or class-based styling.",`${i}.${s}`,t.type),typeof e=="string"&&e.startsWith("--uds-")&&!f.has(e)&&a(n,"DRIFT_UNKNOWN_TOKEN",`Unknown UDS token "${e}".`,`${i}.${s}`,t.type,e)}),(t.children??[]).forEach((s,e)=>c(s,`${i}.children[${e}]`,t))};return c(l,"root"),n}exports.detectDrift=d;