@tmorrow/cre8-wc 2.0.7 → 2.0.8

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 (319) hide show
  1. package/a2ui/catalog +5 -5
  2. package/a2ui/catalog-kg.json +156 -20
  3. package/a2ui/catalog.json +393 -34
  4. package/a2ui/catalog.svg +2445 -2445
  5. package/a2ui/examples/compound-families.json +298 -0
  6. package/a2ui/examples/llm-observability.json +678 -650
  7. package/a2ui/generate-catalog.mjs +116 -3
  8. package/a2ui/inert-props.json +32 -0
  9. package/a2ui/render-audit.mjs +294 -0
  10. package/a2ui/renderer.d.ts +2 -1
  11. package/a2ui/renderer.js +1 -1
  12. package/a2ui/renderer.ts +1 -1
  13. package/a2ui/smoke-test.mjs +3 -3
  14. package/a2ui/stream/diff-test.mjs +299 -0
  15. package/a2ui/stream/diff.d.ts +28 -0
  16. package/a2ui/stream/diff.js +130 -0
  17. package/a2ui/stream/diff.ts +145 -0
  18. package/a2ui/stream/index.d.ts +11 -0
  19. package/a2ui/stream/index.js +11 -0
  20. package/a2ui/stream/index.ts +43 -0
  21. package/a2ui/stream/model.d.ts +66 -0
  22. package/a2ui/stream/model.js +429 -0
  23. package/a2ui/stream/model.ts +472 -0
  24. package/a2ui/stream/pointer.d.ts +34 -0
  25. package/a2ui/stream/pointer.js +146 -0
  26. package/a2ui/stream/pointer.ts +147 -0
  27. package/a2ui/stream/renderer.d.ts +51 -0
  28. package/a2ui/stream/renderer.js +282 -0
  29. package/a2ui/stream/renderer.ts +291 -0
  30. package/a2ui/stream/stream-test.mjs +592 -0
  31. package/a2ui/stream/types.d.ts +173 -0
  32. package/a2ui/stream/types.js +17 -0
  33. package/a2ui/stream/types.ts +127 -0
  34. package/cdn/cre8-wc.esm.js +3527 -3226
  35. package/cdn/cre8-wc.esm.js.map +1 -1
  36. package/cdn/cre8-wc.min.js +289 -289
  37. package/cdn/cre8-wc.min.js.map +1 -1
  38. package/dist/assets/{Changelog-Documentation-BguNswiM.js → Changelog-Documentation-CeOetLxK.js} +1 -1
  39. package/dist/assets/{Code-Guidelines-BM3dZyzL.js → Code-Guidelines-BjdezAjj.js} +1 -1
  40. package/dist/assets/{Color-6AOWCN3U-C4AEGNk3.js → Color-6AOWCN3U-DPFGZitI.js} +1 -1
  41. package/dist/assets/{Contributing-Guidelines-DZURVehh.js → Contributing-Guidelines-B1M2V1hW.js} +1 -1
  42. package/dist/assets/{DocsRenderer-JROSPFPF-DeZmCI9u.js → DocsRenderer-JROSPFPF-BBy8KWNl.js} +1 -1
  43. package/dist/assets/{Tokens-Documentation-ZecGbtQg.js → Tokens-Documentation-CdTxFDLe.js} +1 -1
  44. package/dist/assets/{WithTooltip-7X4HQR7L-2Hfrkir-.js → WithTooltip-7X4HQR7L-DZzTNMQ7.js} +1 -1
  45. package/dist/assets/{accordion-item.stories-D-MjrX5G.js → accordion-item.stories-Bl26JlHp.js} +1 -9
  46. package/dist/assets/{accordion.stories-icgNa1dl.js → accordion.stories-DjoLApQw.js} +3 -11
  47. package/dist/assets/{alert.stories-BzDaXtj-.js → alert.stories-pO1y3YCQ.js} +15 -31
  48. package/dist/assets/{badge-C5wOWgyg.js → badge-BTxW3bN2.js} +3 -11
  49. package/dist/assets/{badge.stories-5GfB4jVI.js → badge.stories-vqh63RJ2.js} +1 -1
  50. package/dist/assets/{band.stories-DhXaP_kL.js → band.stories-CjKRppSb.js} +1 -9
  51. package/dist/assets/{blocks-DhUVut8Z.js → blocks-1be_-L6v.js} +5 -5
  52. package/dist/assets/{breadcrumbs.stories-CrPUBVk1.js → breadcrumbs.stories-Doyfy3V9.js} +2 -18
  53. package/dist/assets/{button-CJL8yzAT.js → button-CgaWukz0.js} +1 -9
  54. package/dist/assets/{button-group-BgwgtSFC.js → button-group-G7qN4MwM.js} +1 -9
  55. package/dist/assets/{button-group.stories-W-07gO63.js → button-group.stories-cL3Kay6M.js} +1 -1
  56. package/dist/assets/{button.stories-BPzJ-sCv.js → button.stories-C9HSpxWb.js} +6 -6
  57. package/dist/assets/{card.stories-mlFGY2Xn.js → card.stories-BbU8YymD.js} +3 -11
  58. package/dist/assets/{chart.stories-C8yuHHeK.js → chart.stories-BL4FxIA_.js} +1 -1
  59. package/dist/assets/{checkbox-field-item-iHcdmTNw.js → checkbox-field-item-DIMHcWM0.js} +1 -9
  60. package/dist/assets/{checkbox-field-item.stories-D1aVLDXn.js → checkbox-field-item.stories-XbB4x_lO.js} +1 -1
  61. package/dist/assets/{checkbox-field.stories-BoVB2jCx.js → checkbox-field.stories-YnqFUI4K.js} +2 -10
  62. package/dist/assets/{cre8-element-DfmMtHJO.js → cre8-element-B35i4Lyg.js} +1 -1
  63. package/dist/assets/{cre8-form-element-bQpK8UYN.js → cre8-form-element-Cfc5VeYV.js} +1 -1
  64. package/dist/assets/{danger-button.stories-Cb4ljnhQ.js → danger-button.stories-xh25hmfd.js} +1 -9
  65. package/dist/assets/{date-picker.stories-Cje3qk8D.js → date-picker.stories-DD_ctzEF.js} +1 -49
  66. package/dist/assets/{divider-B_PXBGWD.js → divider-xZ2KARHf.js} +2 -10
  67. package/dist/assets/{divider.stories-CtfeBqVV.js → divider.stories-Bk9oF-OV.js} +1 -1
  68. package/dist/assets/{dropdown-Cgwne34I.js → dropdown-BEP5x3CW.js} +6 -22
  69. package/dist/assets/{dropdown-item.stories-pXkDLRuv.js → dropdown-item.stories-Iaw_UrEP.js} +1 -1
  70. package/dist/assets/{dropdown.stories-DZnmHieY.js → dropdown.stories-B0OlKD7h.js} +1 -1
  71. package/dist/assets/{example-drug-card.stories-DTzLXTFx.js → example-drug-card.stories-Bp5JIeE_.js} +1 -1
  72. package/dist/assets/{f-po-C2WpbOFJ.js → f-po-BdPzDRD-.js} +1 -1
  73. package/dist/assets/{feature.stories-DffXdJch.js → feature.stories-DYE1Js70.js} +1 -9
  74. package/dist/assets/{field-DzYRqQb2.js → field-BpUYyRW1.js} +1 -9
  75. package/dist/assets/{field-note-DKXZiXLU.js → field-note-fccBckVl.js} +3 -11
  76. package/dist/assets/{field-note.stories-DS_0bQul.js → field-note.stories-BH9AZMbF.js} +1 -1
  77. package/dist/assets/{field.stories-BvXn0oG6.js → field.stories-BQPtmziK.js} +1 -1
  78. package/dist/assets/{footer.stories-C3ZibisU.js → footer.stories-DCWEciqD.js} +1 -9
  79. package/dist/assets/{form-example.stories-C-TuOeF2.js → form-example.stories-9IDC0AgX.js} +1 -1
  80. package/dist/assets/{formatter-L2YTDE3Q-CJVnxOUW.js → formatter-L2YTDE3Q-B9u1AOWn.js} +1 -1
  81. package/dist/assets/{global-nav-item-xQL7wVjY.js → global-nav-item-T4htN-yO.js} +6 -14
  82. package/dist/assets/{global-nav-item.stories-Dp9TE3aR.js → global-nav-item.stories-2dWRfCXv.js} +1 -1
  83. package/dist/assets/{global-nav.stories-B5Nk8JZ0.js → global-nav.stories-Fh1gScqg.js} +2 -10
  84. package/dist/assets/{grid-DYgnZBsd.js → grid-C5CKMXNe.js} +3 -19
  85. package/dist/assets/{grid.stories-BFiXTq2C.js → grid.stories-BLmCNdeA.js} +1 -1
  86. package/dist/assets/{header.stories-D1f7xhjV.js → header.stories-BkDrjJtj.js} +1 -9
  87. package/dist/assets/{heading-485Jz7JZ.js → heading-Dbka33DK.js} +2 -10
  88. package/dist/assets/{heading.stories-gPF_SmTc.js → heading.stories-Be40_bmG.js} +1 -1
  89. package/dist/assets/{hero.stories-BHlFNdvF.js → hero.stories-vRu7PZG9.js} +1 -9
  90. package/dist/assets/{icon-DeTLDzTS.js → icon-ChfRWXWy.js} +2 -10
  91. package/dist/assets/{icon-description-o-YaiEjK.js → icon-description-BBSwDykJ.js} +1 -1
  92. package/dist/assets/{icon-description.stories-BdPRvEwe.js → icon-description.stories-Cg6ekOme.js} +1 -1
  93. package/dist/assets/{icon.stories-BxWpqxT5.js → icon.stories-Cj4U7L5G.js} +1 -1
  94. package/dist/assets/if-defined-Bxnzk64Q.js +1 -0
  95. package/dist/assets/{iframe-dHvya7sk.js → iframe-BNJP6ovU.js} +35 -35
  96. package/dist/assets/{inline-alert.stories-FH0bQ0jh.js → inline-alert.stories-CygBYI02.js} +1 -9
  97. package/dist/assets/{layout-container.stories-D6Z6Kx78.js → layout-container.stories-TMyIJteJ.js} +2 -10
  98. package/dist/assets/{layout.stories-CNYuwC_r.js → layout.stories-ylRM-ANL.js} +7 -23
  99. package/dist/assets/{linelength-container.stories-pCRXZvxS.js → linelength-container.stories-Br2v8jXE.js} +1 -9
  100. package/dist/assets/{link-BpCiLxNW.js → link-CRE0Eqdo.js} +1 -9
  101. package/dist/assets/{link-list.stories-12vsAa1P.js → link-list.stories--y-urrVo.js} +7 -23
  102. package/dist/assets/{link.stories-DAoQtY4_.js → link.stories-C3WQOgkY.js} +2 -2
  103. package/dist/assets/{list.stories-D0N3yBIf.js → list.stories-Bd2bxkxn.js} +7 -23
  104. package/dist/assets/{loading-spinner-g6iJajXH.js → loading-spinner-C52KNq6y.js} +4 -12
  105. package/dist/assets/{loading-spinner.stories-B6_mgPxB.js → loading-spinner.stories-DPRGEeHT.js} +1 -1
  106. package/dist/assets/{logo.stories-BvMwN2qg.js → logo.stories-2LBqqraT.js} +1 -9
  107. package/dist/assets/{main.stories-pL4zefbs.js → main.stories-BQzD7iWD.js} +2 -10
  108. package/dist/assets/{medication-card.stories-DK1XGJic.js → medication-card.stories-Wc-hA0-s.js} +5 -5
  109. package/dist/assets/{medication-form.stories-Bj5dLp5S.js → medication-form.stories-DfFOCDaU.js} +1 -1
  110. package/dist/assets/{modal-CO0M4e_8.js → modal-CCfbY4fF.js} +1 -9
  111. package/dist/assets/{modal-BNu8xy08.js → modal-GglWRNJp.js} +1 -1
  112. package/dist/assets/{modal.stories-CHYBrq_E.js → modal.stories-CpybCs79.js} +1 -1
  113. package/dist/assets/{multi-select.stories-C9XXsWio.js → multi-select.stories-BhzEKRui.js} +1 -9
  114. package/dist/assets/{nav-container.stories-DU9fhvDu.js → nav-container.stories-Be1YlegP.js} +3 -11
  115. package/dist/assets/{page-header.stories-BrstKiEY.js → page-header.stories-BOVLQ0YF.js} +1 -9
  116. package/dist/assets/{pagination.stories-Bw2M2iOn.js → pagination.stories-D62sa_1K.js} +9 -25
  117. package/dist/assets/{percent-bar.stories-UQRXYUqd.js → percent-bar.stories-CYi4El7T.js} +1 -9
  118. package/dist/assets/{popover.stories-ZkwrRFpR.js → popover.stories-B9O8F4yv.js} +1 -9
  119. package/dist/assets/{primary-nav.stories-wqOKwgQn.js → primary-nav.stories-Bt-o7h45.js} +1 -17
  120. package/dist/assets/{progress-meter-TzASasu0.js → progress-meter-Dit59091.js} +1 -9
  121. package/dist/assets/{progress-meter.stories-qfJALZf8.js → progress-meter.stories-CYnOCmjo.js} +1 -1
  122. package/dist/assets/{progress-steps-item-KvW1d_7L.js → progress-steps-item-CWJsad0s.js} +1 -9
  123. package/dist/assets/{progress-steps-item.stories-uOn6tJ1W.js → progress-steps-item.stories-ePn_6bPn.js} +1 -1
  124. package/dist/assets/{progress-steps.stories-CKFPx8D0.js → progress-steps.stories-CblrEcXF.js} +1 -9
  125. package/dist/assets/{radio-field-item-CTaR50XR.js → radio-field-item-Bm-0RWPe.js} +5 -21
  126. package/dist/assets/{radio-field-item.stories-DQSLj8W1.js → radio-field-item.stories-y_TrTRIW.js} +1 -1
  127. package/dist/assets/{radio-field.stories-Btmc_Iep.js → radio-field.stories-CSWrbUrn.js} +1 -1
  128. package/dist/assets/{remove-tag-BSEZ7VT8.js → remove-tag-lCr57c5r.js} +1 -9
  129. package/dist/assets/{remove-tag.stories-diRKi7Ua.js → remove-tag.stories-CDfwCdvZ.js} +1 -1
  130. package/dist/assets/{request-prescription.stories-DQvra7ia.js → request-prescription.stories-O4zqokfb.js} +1 -1
  131. package/dist/assets/{sample-modal.stories-deE1EBfZ.js → sample-modal.stories-BZ4N2R2Z.js} +1 -1
  132. package/dist/assets/{section.stories-DF4mcy2O.js → section.stories-D_1InThX.js} +1 -9
  133. package/dist/assets/{select-tile-D-C8oSrm.js → select-tile-BqqB3ZtE.js} +2 -10
  134. package/dist/assets/{select-tile-list.stories-vsBQUIcl.js → select-tile-list.stories-Di4ILgV8.js} +1 -9
  135. package/dist/assets/{select-tile.stories-CqHzN5fc.js → select-tile.stories-D3h_6zlV.js} +6 -6
  136. package/dist/assets/{select.stories-8aOGxTtr.js → select.stories-BB2phP9A.js} +1 -9
  137. package/dist/assets/{skeleton-loader.stories-CwR2-aC5.js → skeleton-loader.stories-y4uml_kV.js} +5 -13
  138. package/dist/assets/{split-button.stories-CyfdrK4u.js → split-button.stories-C_82I4ME.js} +2 -10
  139. package/dist/assets/{spread-BPiNgQQF.js → spread-CnPic3C2.js} +1 -1
  140. package/dist/assets/state-DkQhleoO.js +1 -0
  141. package/dist/assets/{submenu.stories-CDhNzZzh.js → submenu.stories-UDtaREr1.js} +2 -18
  142. package/dist/assets/{syntaxhighlighter-T5IQBZDB-BzI6WxUR.js → syntaxhighlighter-T5IQBZDB-D-I_s_yD.js} +1 -1
  143. package/dist/assets/{table-header-CfcchoYz.js → table-header-2837i43H.js} +3 -51
  144. package/dist/assets/{table-object.stories-Bd5qdfMU.js → table-object.stories-D4KoI-wA.js} +1 -9
  145. package/dist/assets/{table.stories-DxuBe9dJ.js → table.stories-DUJDibEp.js} +1 -1
  146. package/dist/assets/{tabs.stories-Cpc3OHJx.js → tabs.stories-C06SngOF.js} +5 -29
  147. package/dist/assets/{tag-list.stories-BmyCmrTF.js → tag-list.stories-Du-IoYzu.js} +2 -10
  148. package/dist/assets/{tag-vQFuZneb.js → tag-oHGdclJl.js} +1 -9
  149. package/dist/assets/{tag.stories-DGzrNUbb.js → tag.stories-C5D5IbuK.js} +1 -1
  150. package/dist/assets/{tertiary-nav.stories-D4q5K-am.js → tertiary-nav.stories-B1GU8Zi4.js} +3 -19
  151. package/dist/assets/{text-link-4qLRIeJB.js → text-link-B3m3KEqY.js} +1 -9
  152. package/dist/assets/{text-link.stories-D6BRm2I5.js → text-link.stories-4O6qn82H.js} +1 -1
  153. package/dist/assets/{text-passage-DGaI5i2I.js → text-passage-xQVosjOr.js} +3 -19
  154. package/dist/assets/{text-passage.stories-DkmXVUhH.js → text-passage.stories-Da1nspwG.js} +1 -1
  155. package/dist/assets/{tooltip.stories-B7ADDq7o.js → tooltip.stories-DLKyyeKn.js} +6 -14
  156. package/dist/assets/{utility-nav.stories-ffXVvyLp.js → utility-nav.stories-B6xBFe7z.js} +5 -21
  157. package/dist/design-tokens/brands/cre8/css/tokens_brand.css +1 -1
  158. package/dist/design-tokens/core/scss/theming/component.css +1 -1
  159. package/dist/design-tokens/core/scss/theming/variables.css +1 -7
  160. package/dist/design-tokens/core/scss/theming/variables.scss +0 -11
  161. package/dist/icons/cre8-icons.svg +1 -1
  162. package/dist/iframe.html +1 -24
  163. package/dist/index.html +25 -77
  164. package/dist/project.json +1 -1
  165. package/lib/a2ui/renderer.d.ts +2 -1
  166. package/lib/a2ui/renderer.d.ts.map +1 -1
  167. package/lib/a2ui/renderer.js +1 -1
  168. package/lib/a2ui/renderer.js.map +1 -1
  169. package/lib/a2ui/stream/diff.d.ts +29 -0
  170. package/lib/a2ui/stream/diff.d.ts.map +1 -0
  171. package/lib/a2ui/stream/diff.js +131 -0
  172. package/lib/a2ui/stream/diff.js.map +1 -0
  173. package/lib/a2ui/stream/index.d.ts +12 -0
  174. package/lib/a2ui/stream/index.d.ts.map +1 -0
  175. package/lib/a2ui/stream/index.js +12 -0
  176. package/lib/a2ui/stream/index.js.map +1 -0
  177. package/lib/a2ui/stream/model.d.ts +67 -0
  178. package/lib/a2ui/stream/model.d.ts.map +1 -0
  179. package/lib/a2ui/stream/model.js +423 -0
  180. package/lib/a2ui/stream/model.js.map +1 -0
  181. package/lib/a2ui/stream/pointer.d.ts +35 -0
  182. package/lib/a2ui/stream/pointer.d.ts.map +1 -0
  183. package/lib/a2ui/stream/pointer.js +147 -0
  184. package/lib/a2ui/stream/pointer.js.map +1 -0
  185. package/lib/a2ui/stream/renderer.d.ts +52 -0
  186. package/lib/a2ui/stream/renderer.d.ts.map +1 -0
  187. package/lib/a2ui/stream/renderer.js +279 -0
  188. package/lib/a2ui/stream/renderer.js.map +1 -0
  189. package/lib/a2ui/stream/types.d.ts +174 -0
  190. package/lib/a2ui/stream/types.d.ts.map +1 -0
  191. package/lib/a2ui/stream/types.js +18 -0
  192. package/lib/a2ui/stream/types.js.map +1 -0
  193. package/lib/components/accordion/accordion.d.ts +15 -0
  194. package/lib/components/accordion/accordion.d.ts.map +1 -1
  195. package/lib/components/accordion/accordion.js +23 -0
  196. package/lib/components/accordion/accordion.js.map +1 -1
  197. package/lib/components/badge/badge.d.ts +4 -17
  198. package/lib/components/badge/badge.d.ts.map +1 -1
  199. package/lib/components/badge/badge.js +0 -15
  200. package/lib/components/badge/badge.js.map +1 -1
  201. package/lib/components/breadcrumbs/breadcrumbs.d.ts +14 -0
  202. package/lib/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
  203. package/lib/components/breadcrumbs/breadcrumbs.js +21 -0
  204. package/lib/components/breadcrumbs/breadcrumbs.js.map +1 -1
  205. package/lib/components/chart/chart.d.ts +3 -3
  206. package/lib/components/chart/chart.js +6 -6
  207. package/lib/components/chart/chart.js.map +1 -1
  208. package/lib/components/checkbox-field/checkbox-field.d.ts +19 -0
  209. package/lib/components/checkbox-field/checkbox-field.d.ts.map +1 -1
  210. package/lib/components/checkbox-field/checkbox-field.js +28 -0
  211. package/lib/components/checkbox-field/checkbox-field.js.map +1 -1
  212. package/lib/components/cre8-element.d.ts +19 -0
  213. package/lib/components/cre8-element.d.ts.map +1 -1
  214. package/lib/components/cre8-element.js +51 -2
  215. package/lib/components/cre8-element.js.map +1 -1
  216. package/lib/components/divider/divider.d.ts +1 -1
  217. package/lib/components/divider/divider.d.ts.map +1 -1
  218. package/lib/components/divider/divider.js.map +1 -1
  219. package/lib/components/dropdown/dropdown.d.ts +13 -0
  220. package/lib/components/dropdown/dropdown.d.ts.map +1 -1
  221. package/lib/components/dropdown/dropdown.js +19 -0
  222. package/lib/components/dropdown/dropdown.js.map +1 -1
  223. package/lib/components/dropdown-item/dropdown-item.d.ts +1 -1
  224. package/lib/components/dropdown-item/dropdown-item.js +2 -2
  225. package/lib/components/dropdown-item/dropdown-item.js.map +1 -1
  226. package/lib/components/heading/heading.d.ts +3 -5
  227. package/lib/components/heading/heading.d.ts.map +1 -1
  228. package/lib/components/heading/heading.js +2 -4
  229. package/lib/components/heading/heading.js.map +1 -1
  230. package/lib/components/link-list/link-list.d.ts +19 -0
  231. package/lib/components/link-list/link-list.d.ts.map +1 -1
  232. package/lib/components/link-list/link-list.js +19 -0
  233. package/lib/components/link-list/link-list.js.map +1 -1
  234. package/lib/components/list/list.d.ts +13 -0
  235. package/lib/components/list/list.d.ts.map +1 -1
  236. package/lib/components/list/list.js +15 -0
  237. package/lib/components/list/list.js.map +1 -1
  238. package/lib/components/modal/modal.d.ts +2 -2
  239. package/lib/components/modal/modal.js +2 -2
  240. package/lib/components/modal/modal.js.map +1 -1
  241. package/lib/components/multi-select/multi-select.d.ts +2 -2
  242. package/lib/components/multi-select/multi-select.js +5 -5
  243. package/lib/components/multi-select/multi-select.js.map +1 -1
  244. package/lib/components/pagination/pagination.d.ts +1 -1
  245. package/lib/components/pagination/pagination.js +2 -2
  246. package/lib/components/pagination/pagination.js.map +1 -1
  247. package/lib/components/percent-bar/percent-bar.d.ts +2 -0
  248. package/lib/components/percent-bar/percent-bar.d.ts.map +1 -1
  249. package/lib/components/percent-bar/percent-bar.js +3 -1
  250. package/lib/components/percent-bar/percent-bar.js.map +1 -1
  251. package/lib/components/popover/popover.d.ts +6 -7
  252. package/lib/components/popover/popover.d.ts.map +1 -1
  253. package/lib/components/popover/popover.js +4 -4
  254. package/lib/components/popover/popover.js.map +1 -1
  255. package/lib/components/progress-meter/progress-meter.d.ts +0 -8
  256. package/lib/components/progress-meter/progress-meter.d.ts.map +1 -1
  257. package/lib/components/progress-meter/progress-meter.js +0 -7
  258. package/lib/components/progress-meter/progress-meter.js.map +1 -1
  259. package/lib/components/progress-steps/progress-steps.d.ts +16 -0
  260. package/lib/components/progress-steps/progress-steps.d.ts.map +1 -1
  261. package/lib/components/progress-steps/progress-steps.js +25 -0
  262. package/lib/components/progress-steps/progress-steps.js.map +1 -1
  263. package/lib/components/progress-steps-item/progress-steps-item.d.ts +1 -3
  264. package/lib/components/progress-steps-item/progress-steps-item.d.ts.map +1 -1
  265. package/lib/components/progress-steps-item/progress-steps-item.js +0 -1
  266. package/lib/components/progress-steps-item/progress-steps-item.js.map +1 -1
  267. package/lib/components/radio-field/radio-field.d.ts +33 -0
  268. package/lib/components/radio-field/radio-field.d.ts.map +1 -1
  269. package/lib/components/radio-field/radio-field.js +62 -0
  270. package/lib/components/radio-field/radio-field.js.map +1 -1
  271. package/lib/components/remove-tag/remove-tag.d.ts +1 -1
  272. package/lib/components/remove-tag/remove-tag.js +3 -3
  273. package/lib/components/remove-tag/remove-tag.js.map +1 -1
  274. package/lib/components/split-button/split-button.d.ts +3 -0
  275. package/lib/components/split-button/split-button.d.ts.map +1 -1
  276. package/lib/components/split-button/split-button.js +5 -2
  277. package/lib/components/split-button/split-button.js.map +1 -1
  278. package/lib/components/tab/tab.d.ts +1 -1
  279. package/lib/components/tab/tab.js +3 -3
  280. package/lib/components/tab/tab.js.map +1 -1
  281. package/lib/components/table/table.d.ts +36 -0
  282. package/lib/components/table/table.d.ts.map +1 -1
  283. package/lib/components/table/table.js +55 -0
  284. package/lib/components/table/table.js.map +1 -1
  285. package/lib/components/tabs/tabs.d.ts +20 -3
  286. package/lib/components/tabs/tabs.d.ts.map +1 -1
  287. package/lib/components/tabs/tabs.js +33 -5
  288. package/lib/components/tabs/tabs.js.map +1 -1
  289. package/lib/components/tag-list/tag-list.d.ts +17 -0
  290. package/lib/components/tag-list/tag-list.d.ts.map +1 -1
  291. package/lib/components/tag-list/tag-list.js +25 -0
  292. package/lib/components/tag-list/tag-list.js.map +1 -1
  293. package/lib/components/tooltip/tooltip.d.ts +2 -2
  294. package/lib/components/tooltip/tooltip.js +4 -4
  295. package/lib/components/tooltip/tooltip.js.map +1 -1
  296. package/lib/components/utils/light-children.d.ts +40 -0
  297. package/lib/components/utils/light-children.d.ts.map +1 -0
  298. package/lib/components/utils/light-children.js +100 -0
  299. package/lib/components/utils/light-children.js.map +1 -0
  300. package/lib/directives/if-truthy.d.ts +1 -1
  301. package/lib/light-children-TlEXev5S.js +39 -0
  302. package/lib/scripts/generate-react-wrappers.d.ts +8 -1
  303. package/lib/scripts/generate-react-wrappers.d.ts.map +1 -1
  304. package/lib/scripts/generate-react-wrappers.js +45 -1
  305. package/lib/scripts/generate-react-wrappers.js.map +1 -1
  306. package/mcp-manifest.json +162 -52
  307. package/package.json +11 -4
  308. package/react-manifest.json +153 -47
  309. package/dist/assets/if-defined-HKKhGupN.js +0 -1
  310. package/dist/assets/iframe-CWwoGI65.css +0 -1
  311. package/dist/assets/state-CfuknrX8.js +0 -1
  312. package/dist/fonts/PlusJakartaSans-Bold.woff2 +0 -0
  313. package/dist/fonts/PlusJakartaSans-Medium.woff2 +0 -0
  314. package/dist/fonts/PlusJakartaSans-Regular.woff2 +0 -0
  315. package/dist/fonts/PlusJakartaSans-SemiBold.woff2 +0 -0
  316. package/dist/logo.svg +0 -1
  317. package/dist/sb-addons/storybook-4/manager-bundle.js +0 -8
  318. /package/dist/icons/{express-scripts copy.svg → pharmacy copy.svg} +0 -0
  319. /package/dist/icons/{express-scripts.svg → pharmacy.svg} +0 -0
@@ -31,6 +31,112 @@ const SELECT_OPTION_GROUP_SCHEMA = {
31
31
  },
32
32
  };
33
33
 
34
+
35
+ /**
36
+ * Schemas for the flattened compound APIs.
37
+ *
38
+ * These are keyed by TypeScript type expression rather than by component, so a
39
+ * type used twice is described once — the same reason the select-option entry
40
+ * below is shaped this way. Without them the analyzer reports a bare interface
41
+ * name, `mapAttrPlain` falls back to `type: "string"`, and the catalog then
42
+ * *rejects* the very array the component is built to take.
43
+ */
44
+ const TABLE_COLUMN_SCHEMA = {
45
+ type: 'object',
46
+ properties: {
47
+ label: { type: 'string' },
48
+ key: { type: 'string' },
49
+ width: { type: 'string' },
50
+ },
51
+ required: ['label'],
52
+ additionalProperties: false,
53
+ };
54
+
55
+ const TABLE_ROW_SCHEMA = {
56
+ oneOf: [
57
+ { type: 'object', additionalProperties: { type: ['string', 'number'] } },
58
+ { type: 'array', items: { type: ['string', 'number'] } },
59
+ ],
60
+ };
61
+
62
+ /** `{ text }` and friends: one string field plus optional flags. */
63
+ const textItem = (extra = {}, required = ['text'], key = 'text') => ({
64
+ type: 'object',
65
+ properties: { [key]: { type: 'string' }, ...extra },
66
+ required,
67
+ additionalProperties: false,
68
+ });
69
+
70
+ const FLATTENED_ITEM_SCHEMAS = {
71
+ 'Cre8TableColumn[]': { type: 'array', items: TABLE_COLUMN_SCHEMA },
72
+ 'Cre8TableRowData[]': { type: 'array', items: TABLE_ROW_SCHEMA },
73
+ 'Cre8ListItemData[]': { type: 'array', items: textItem() },
74
+ 'Cre8DropdownItemData[]': { type: 'array', items: textItem({ ariaLabel: { type: 'string' } }) },
75
+ 'Cre8BreadcrumbData[]': { type: 'array', items: textItem({ href: { type: 'string' } }) },
76
+ 'Cre8LinkData[]': {
77
+ type: 'array',
78
+ items: textItem({ href: { type: 'string' }, isActive: { type: 'boolean' } }, ['text', 'href']),
79
+ },
80
+ 'Cre8TagData[]': {
81
+ type: 'array',
82
+ items: textItem({
83
+ variant: { type: 'string', enum: ['neutral', 'branded', 'neutral-hybrid'] },
84
+ shape: { type: 'string', enum: ['square', 'round'] },
85
+ type: { type: 'string', enum: ['checkbox', 'radio'] },
86
+ disabled: { type: 'boolean' },
87
+ }),
88
+ },
89
+ 'Cre8TabItemData[]': {
90
+ type: 'array',
91
+ items: textItem({ content: { type: 'string' } }, ['label'], 'label'),
92
+ },
93
+ 'Cre8AccordionItemData[]': {
94
+ type: 'array',
95
+ items: {
96
+ type: 'object',
97
+ properties: {
98
+ heading: { type: 'string' },
99
+ content: { type: 'string' },
100
+ isActive: { type: 'boolean' },
101
+ headingTagVariant: { type: 'string', enum: ['h1', 'h2', 'h3', 'h4'] },
102
+ },
103
+ required: ['heading', 'content'],
104
+ additionalProperties: false,
105
+ },
106
+ },
107
+ 'Cre8ProgressStepData[]': {
108
+ type: 'array',
109
+ items: {
110
+ type: 'object',
111
+ properties: {
112
+ name: { type: 'string' },
113
+ message: { type: 'string' },
114
+ state: { type: 'string', enum: ['error', 'warning', 'complete', 'current'] },
115
+ },
116
+ required: ['name'],
117
+ additionalProperties: false,
118
+ },
119
+ },
120
+ };
121
+
122
+ const choiceItem = {
123
+ type: 'array',
124
+ items: {
125
+ type: 'object',
126
+ properties: {
127
+ label: { type: 'string' },
128
+ value: { type: 'string' },
129
+ checked: { type: 'boolean' },
130
+ disabled: { type: 'boolean' },
131
+ required: { type: 'boolean' },
132
+ },
133
+ required: ['label'],
134
+ additionalProperties: false,
135
+ },
136
+ };
137
+ FLATTENED_ITEM_SCHEMAS['Cre8CheckboxItemData[]'] = choiceItem;
138
+ FLATTENED_ITEM_SCHEMAS['Cre8RadioItemData[]'] = choiceItem;
139
+
34
140
  const TS_TYPE_RESOLVERS = {
35
141
  Cre8ChartType: {
36
142
  type: 'string',
@@ -38,17 +144,24 @@ const TS_TYPE_RESOLVERS = {
38
144
  },
39
145
  Color: { type: 'string', enum: ['neutral', 'branded', 'neutral-hybrid'] },
40
146
  Shape: { type: 'string', enum: ['round', 'square'] },
41
- status: { type: 'string', enum: ['error', 'warning', 'success'] },
147
+ // No entry for the bare type name `status`: it existed only because
148
+ // `cre8-progress-meter` carried an `@attr {status}` JSDoc tag that overrode
149
+ // its literal union back to an unresolvable alias. The tag is gone and the
150
+ // union now flows through on its own.
42
151
  '(Cre8SelectOption | Cre8SelectOptionGroup)[]': {
43
152
  type: 'array',
44
153
  items: { oneOf: [SELECT_OPTION_SCHEMA, SELECT_OPTION_GROUP_SCHEMA] },
45
154
  },
155
+ ...FLATTENED_ITEM_SCHEMAS,
46
156
  };
47
157
 
48
158
  const PROP_OVERRIDES = {
49
159
  'cre8-chart.data': { type: 'object', description: 'Chart.js data object with labels and datasets arrays.' },
50
160
  'cre8-chart.options': { type: 'object', description: 'Chart.js options object.' },
51
- 'cre8-chart.colors': { type: 'array', items: { type: 'string' }, description: 'Dataset colors.' },
161
+ // No entry for `cre8-chart.colors`: the manifest type is plain `string[]`,
162
+ // which mapAttrPlain already resolves to the identical schema. Only add an
163
+ // override when the manifest type is unresolvable (an interface name, an
164
+ // imported alias, or a union TypeScript truncated with "... N more ...").
52
165
  'cre8-heading.type': {
53
166
  type: 'string',
54
167
  enum: [
@@ -62,7 +175,7 @@ const PROP_OVERRIDES = {
62
175
  'title-default',
63
176
  'title-small',
64
177
  'label-large',
65
- 'label',
178
+ 'label-default',
66
179
  'label-small',
67
180
  'meta-large',
68
181
  'meta-default',
@@ -0,0 +1,32 @@
1
+ {
2
+ "$comment": "Generated by a2ui/render-audit.mjs. Props that are declared in the catalog but never reach the DOM — confirmed twice, by rendering under jsdom and by reading the component source. Setting one validates cleanly and does nothing.",
3
+ "libraryVersion": "2.0.7",
4
+ "components": {
5
+ "cre8-link-list-item": {
6
+ "text": {
7
+ "reason": "Documented as \"The link text\"; render() never reads it. The label comes from the default slot."
8
+ }
9
+ },
10
+ "cre8-field": {
11
+ "errorText": {
12
+ "reason": "Declared with a default of \"Error\" and never read. The message that renders is `fieldNote`, shown in the error style by `isError`."
13
+ },
14
+ "successText": {
15
+ "reason": "Declared with a default of \"Success\" and never read. Use `fieldNote` with `isSuccess`."
16
+ }
17
+ },
18
+ "cre8-date-picker": {
19
+ "errorText": {
20
+ "reason": "Declared and never read. Use `fieldNote` with `isError`."
21
+ },
22
+ "successText": {
23
+ "reason": "Declared and never read. Use `fieldNote` with `isSuccess`."
24
+ }
25
+ },
26
+ "cre8-modal": {
27
+ "closeButtonText": {
28
+ "reason": "Declared and never read; the close control takes its label from elsewhere."
29
+ }
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,294 @@
1
+ /**
2
+ * Renders every catalog component and checks that its free-text props actually
3
+ * reach the DOM.
4
+ *
5
+ * node a2ui/render-audit.mjs # report
6
+ * node a2ui/render-audit.mjs --check # fail on anything not in KNOWN_INERT
7
+ *
8
+ * Why this exists: `validateSpec` answers "is this consistent with the
9
+ * catalog", which is not the same question as "will this render". The gap is
10
+ * not theoretical — `cre8-link-list-item` declares a `text` prop, documents it
11
+ * in its own JSDoc as "The link text", and never reads it, so a spec using
12
+ * `props.text` validates cleanly and produces an empty link. The same shape as
13
+ * the `cre8-heading.type` bug in docs/kb/04-a2ui.md.
14
+ *
15
+ * The method: give each free-text prop a sentinel value, upgrade the element
16
+ * with the real CDN bundle under jsdom, and look for the sentinel anywhere in
17
+ * the resulting shadow tree. A prop that drives styling shows up as a class; a
18
+ * prop that is reflected shows up as an attribute; a prop that is rendered shows
19
+ * up as text. A prop that appears nowhere is inert.
20
+ *
21
+ * What it cannot see: layout, colour, and anything that needs a real engine.
22
+ * jsdom upgrades components and runs their templates; it does not lay them out.
23
+ */
24
+
25
+ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
26
+ import { dirname, resolve } from 'node:path';
27
+ import { fileURLToPath } from 'node:url';
28
+ import { JSDOM } from 'jsdom';
29
+
30
+ const HERE = dirname(fileURLToPath(import.meta.url));
31
+ const WC = resolve(HERE, '..');
32
+ const SENTINEL = 'Zq7Wx';
33
+
34
+ /**
35
+ * Props known to be inert, with the reason. A prop listed here is asserted to
36
+ * still be broken — same inversion as the KB's drift ledger, so fixing one makes
37
+ * this file fail and prompts the entry to be removed.
38
+ */
39
+ const KNOWN_INERT = {
40
+ 'cre8-link-list-item': {
41
+ text: 'Documented as "The link text"; render() never reads it. The label comes from the default slot.',
42
+ },
43
+ 'cre8-field': {
44
+ errorText: 'Declared with a default of "Error" and never read. The message that renders is `fieldNote`, shown in the error style by `isError`.',
45
+ successText: 'Declared with a default of "Success" and never read. Use `fieldNote` with `isSuccess`.',
46
+ },
47
+ 'cre8-date-picker': {
48
+ errorText: 'Declared and never read. Use `fieldNote` with `isError`.',
49
+ successText: 'Declared and never read. Use `fieldNote` with `isSuccess`.',
50
+ },
51
+ 'cre8-modal': {
52
+ closeButtonText: 'Declared and never read; the close control takes its label from elsewhere.',
53
+ },
54
+ };
55
+
56
+ // ─── jsdom, wired up enough for Lit ─────────────────────────────────────────
57
+
58
+ const dom = new JSDOM('<!doctype html><html><body></body></html>', {
59
+ pretendToBeVisual: true,
60
+ url: 'http://localhost/',
61
+ });
62
+ const win = dom.window;
63
+
64
+ for (const key of Object.getOwnPropertyNames(win)) {
65
+ if (key === 'undefined' || key in globalThis) continue;
66
+ try {
67
+ globalThis[key] = win[key];
68
+ } catch {
69
+ /* read-only global; jsdom's copy is not needed */
70
+ }
71
+ }
72
+ // Node defines these too, and a component that constructs one with Node's class
73
+ // cannot dispatch it on a jsdom EventTarget — @lit/context does exactly that.
74
+ for (const key of ['Event', 'CustomEvent', 'EventTarget', 'MessageEvent', 'MutationObserver']) {
75
+ if (win[key]) {
76
+ try {
77
+ globalThis[key] = win[key];
78
+ } catch {
79
+ /* ignore */
80
+ }
81
+ }
82
+ }
83
+ globalThis.window = win;
84
+ globalThis.document = win.document;
85
+
86
+ const catalog = JSON.parse(readFileSync(resolve(WC, 'a2ui/catalog.json'), 'utf8'));
87
+ const defs = catalog.$defs?.components ?? {};
88
+
89
+ // Importing the bundle registers all 85 elements.
90
+ await import(resolve(WC, 'cdn/cre8-wc.esm.js'));
91
+
92
+ // ─── the audit ──────────────────────────────────────────────────────────────
93
+
94
+ /**
95
+ * Only props whose *own documentation* says they are rendered text.
96
+ *
97
+ * A wider net does not work, and the reason is worth recording: sweeping every
98
+ * free-text prop flags 69 of them, and almost all are artefacts rather than
99
+ * bugs — form values consumed by ElementInternals (which jsdom does not
100
+ * implement), icon and style values that need a well-formed input before
101
+ * anything appears, and text that only renders once the component is open. A
102
+ * check with that signal-to-noise trains people to ignore it.
103
+ */
104
+ const RENDERED_TEXT = /\b(text|label|heading|message|caption)\b/i;
105
+
106
+ function renderedTextProps(def) {
107
+ const props = def.properties?.props?.properties ?? {};
108
+ return Object.entries(props)
109
+ .filter(([name, schema]) => {
110
+ const types = Array.isArray(schema.type) ? schema.type : [schema.type];
111
+ if (!types.includes('string') || schema.enum || schema.const !== undefined) return false;
112
+ if (/icon|svg|href|src|id|name|value|class|style|aria|width|height|colou?r|max|min|^type$/i.test(name)) {
113
+ return false;
114
+ }
115
+ return RENDERED_TEXT.test(name) || RENDERED_TEXT.test(String(schema.description ?? ''));
116
+ })
117
+ .map(([name]) => name);
118
+ }
119
+
120
+ /** Every boolean prop, so a second pass can switch the component's states on. */
121
+ function booleanProps(def) {
122
+ return Object.entries(def.properties?.props?.properties ?? {})
123
+ .filter(([, schema]) => {
124
+ const types = Array.isArray(schema.type) ? schema.type : [schema.type];
125
+ return types.includes('boolean');
126
+ })
127
+ .map(([name]) => name);
128
+ }
129
+
130
+ function contentRoute(def) {
131
+ if (def.properties?.children !== undefined) return 'children';
132
+ if (def.properties?.slots?.properties) {
133
+ const slots = Object.keys(def.properties.slots.properties);
134
+ return slots.includes('default') ? 'default' : (slots[0] ?? null);
135
+ }
136
+ return null;
137
+ }
138
+
139
+ /**
140
+ * Second, independent check: does the component's own source ever read the
141
+ * property back? Rendering alone cannot tell an inert prop from one that needs
142
+ * a state this audit did not reach, and static reading alone cannot tell a
143
+ * rendered prop from one consumed by CSS. Where both agree, the prop is inert;
144
+ * where they disagree, it is state-dependent and reported as unverified.
145
+ */
146
+ function readsPropInSource(tag, prop) {
147
+ const dir = tag.replace(/^cre8-/, '');
148
+ const file = resolve(WC, 'components', dir, `${dir}.ts`);
149
+ if (!existsSync(file)) return null;
150
+ return new RegExp(`this\\.${prop}\\b`).test(readFileSync(file, 'utf8'));
151
+ }
152
+
153
+ const results = [];
154
+ const errored = [];
155
+ let rendered = 0;
156
+ let skipped = 0;
157
+
158
+ // Some components throw when rendered bare — cre8-popover reaches into a
159
+ // trigger it expects to have been slotted. That is worth reporting, but it must
160
+ // not end the audit, and Lit surfaces it from a microtask where a try/catch
161
+ // around appendChild cannot see it.
162
+ let current = null;
163
+ process.on('uncaughtException', (error) => {
164
+ errored.push({ tag: current ?? '(unknown)', message: error.message.split('\n')[0].slice(0, 120) });
165
+ });
166
+
167
+ for (const [tag, def] of Object.entries(defs)) {
168
+ if (!win.customElements.get(tag)) {
169
+ skipped += 1;
170
+ continue;
171
+ }
172
+
173
+ const props = renderedTextProps(def);
174
+ if (!props.length) continue;
175
+
176
+ current = tag;
177
+
178
+ // Two passes. Most "missing" text is not missing, it is switched off:
179
+ // errorText renders only under isError, a modal's close button only when it
180
+ // is open. So render once bare, then again with every boolean prop true, and
181
+ // only report a prop that never appeared in either.
182
+ const renderOnce = async (withStates) => {
183
+ const el = win.document.createElement(tag);
184
+ for (const prop of props) el.setAttribute(prop, `${SENTINEL}${prop}`);
185
+ if (withStates) for (const flag of booleanProps(def)) el.setAttribute(flag, '');
186
+
187
+ const route = contentRoute(def);
188
+ if (route === 'children') {
189
+ el.appendChild(win.document.createTextNode('content'));
190
+ } else if (route) {
191
+ const child = win.document.createElement('span');
192
+ if (route !== 'default') child.setAttribute('slot', route);
193
+ child.textContent = 'content';
194
+ el.appendChild(child);
195
+ }
196
+
197
+ try {
198
+ win.document.body.appendChild(el);
199
+ await new Promise((r) => setTimeout(r, 0));
200
+ if (el.updateComplete) await el.updateComplete.catch(() => {});
201
+ } catch (error) {
202
+ errored.push({ tag, message: String(error?.message ?? error).split('\n')[0].slice(0, 120) });
203
+ }
204
+
205
+ // Light DOM too: a parent may stamp a prop onto its slotted children.
206
+ const html = `${el.shadowRoot?.innerHTML ?? ''}${el.innerHTML}`;
207
+ const upgraded = Boolean(el.shadowRoot);
208
+ el.remove();
209
+ return { html, upgraded };
210
+ };
211
+
212
+ const bare = await renderOnce(false);
213
+ const active = await renderOnce(true);
214
+
215
+ if (!bare.upgraded && !active.upgraded) {
216
+ results.push({ tag, prop: '(no shadow root)', kind: 'unrendered' });
217
+ } else {
218
+ rendered += 1;
219
+ for (const prop of props) {
220
+ const token = `${SENTINEL}${prop}`;
221
+ if (!bare.html.includes(token) && !active.html.includes(token)) {
222
+ results.push({ tag, prop, kind: 'inert' });
223
+ }
224
+ }
225
+ }
226
+ }
227
+
228
+ // ─── report ─────────────────────────────────────────────────────────────────
229
+
230
+ const known = (tag, prop) => KNOWN_INERT[tag]?.[prop];
231
+ for (const r of results) r.readInSource = readsPropInSource(r.tag, r.prop);
232
+
233
+ // Confirmed = never rendered AND never read back in source.
234
+ const confirmed = results.filter((r) => r.readInSource === false);
235
+ const unverified = results.filter((r) => r.readInSource !== false);
236
+ const fresh = confirmed.filter((r) => !known(r.tag, r.prop));
237
+ const expected = Object.entries(KNOWN_INERT).flatMap(([tag, props]) =>
238
+ Object.keys(props).map((prop) => ({ tag, prop }))
239
+ );
240
+ const stillBroken = expected.filter((e) => results.some((r) => r.tag === e.tag && r.prop === e.prop));
241
+ const nowFixed = expected.filter((e) => !stillBroken.some((s) => s.tag === e.tag && s.prop === e.prop));
242
+
243
+ console.log(`rendered ${rendered} components (${skipped} not registered by the bundle)`);
244
+ if (errored.length) {
245
+ console.log(`${errored.length} threw while rendering bare:`);
246
+ for (const e of errored) console.log(` ${e.tag}: ${e.message}`);
247
+ console.log('');
248
+ }
249
+ console.log(
250
+ `${results.length} prop(s) never reached the DOM: ${confirmed.length} confirmed inert by source too, ` +
251
+ `${unverified.length} state-dependent and unverified\n`
252
+ );
253
+
254
+ for (const r of fresh) {
255
+ console.log(` ${r.tag}.${r.prop} — never rendered, and never read in ${r.tag.replace(/^cre8-/, '')}.ts`);
256
+ }
257
+ if (unverified.length) {
258
+ console.log('\n unverified (the source reads them; a state this audit did not reach must show them):');
259
+ for (const r of unverified) console.log(` ${r.tag}.${r.prop}`);
260
+ }
261
+ for (const e of stillBroken) {
262
+ console.log(` (known) ${e.tag}.${e.prop} — ${KNOWN_INERT[e.tag][e.prop]}`);
263
+ }
264
+ for (const e of nowFixed) {
265
+ console.log(` FIXED: ${e.tag}.${e.prop} now reaches the DOM — remove it from KNOWN_INERT`);
266
+ }
267
+
268
+ // Ship the confirmed list so the MCP connector can warn an agent before it
269
+ // sets a prop that will silently do nothing.
270
+ const inertFile = resolve(WC, 'a2ui/inert-props.json');
271
+ const payload = {
272
+ $comment:
273
+ 'Generated by a2ui/render-audit.mjs. Props that are declared in the catalog but never reach ' +
274
+ 'the DOM — confirmed twice, by rendering under jsdom and by reading the component source. ' +
275
+ 'Setting one validates cleanly and does nothing.',
276
+ libraryVersion: catalog['x-a2ui']?.libraryVersion,
277
+ components: Object.fromEntries(
278
+ Object.entries(KNOWN_INERT).map(([tag, props]) => [
279
+ tag,
280
+ Object.fromEntries(Object.entries(props).map(([prop, reason]) => [prop, { reason }])),
281
+ ])
282
+ ),
283
+ };
284
+ writeFileSync(inertFile, `${JSON.stringify(payload, null, 2)}\n`);
285
+
286
+ const check = process.argv.includes('--check');
287
+ if (check && (fresh.length || nowFixed.length)) {
288
+ console.error(
289
+ `\nrender audit failed: ${fresh.length} new inert prop(s), ${nowFixed.length} fixed but still listed`
290
+ );
291
+ process.exit(1);
292
+ }
293
+ if (check) console.log('\nok — every free-text prop reaches the DOM, except the ones documented as inert');
294
+ process.exit(0);
@@ -1,7 +1,8 @@
1
- import type { ComponentSpec, EmittedEvent, RegisteredCatalog } from './types.js';
1
+ import type { ComponentSpec, EmittedEvent, PropSchema, RegisteredCatalog } from './types.js';
2
2
  export interface RenderOptions {
3
3
  root?: HTMLElement;
4
4
  doc?: Document;
5
5
  onEvent?: (evt: EmittedEvent) => void;
6
6
  }
7
7
  export declare function render(spec: ComponentSpec, catalog: RegisteredCatalog, options?: RenderOptions): HTMLElement;
8
+ export declare function applyProp(el: HTMLElement, key: string, value: unknown, schema: PropSchema | undefined): void;
package/a2ui/renderer.js CHANGED
@@ -76,7 +76,7 @@ function attachEvent(el, component, path, eventName, binding, onEvent) {
76
76
  });
77
77
  });
78
78
  }
79
- function applyProp(el, key, value, schema) {
79
+ export function applyProp(el, key, value, schema) {
80
80
  if (value === undefined || value === null)
81
81
  return;
82
82
  if (schema?.['x-kind'] === 'property') {
package/a2ui/renderer.ts CHANGED
@@ -117,7 +117,7 @@ function attachEvent(
117
117
  });
118
118
  }
119
119
 
120
- function applyProp(
120
+ export function applyProp(
121
121
  el: HTMLElement,
122
122
  key: string,
123
123
  value: unknown,
@@ -19,7 +19,7 @@ const spec = {
19
19
  component: 'cre8-card',
20
20
  slots: {
21
21
  header: [{ component: 'cre8-button', props: { text: 'Close', variant: 'tertiary' } }],
22
- body: [
22
+ default: [
23
23
  { component: 'cre8-alert', props: { status: 'info' } },
24
24
  {
25
25
  component: 'cre8-button-group',
@@ -78,7 +78,7 @@ const eventSpec = {
78
78
  props: { text: 'Save', variant: 'primary' },
79
79
  events: {
80
80
  click: { handler: 'save-record', stopPropagation: true },
81
- 'text-click': 'emit-telemetry',
81
+ 'split-button-text-click': 'emit-telemetry',
82
82
  },
83
83
  };
84
84
 
@@ -86,7 +86,7 @@ const emitted = [];
86
86
  const eventEl = render(eventSpec, cat, { onEvent: (e) => emitted.push(e) });
87
87
 
88
88
  eventEl.dispatchEvent(new dom.window.Event('click', { bubbles: true }));
89
- eventEl.dispatchEvent(new dom.window.CustomEvent('text-click', { detail: { source: 'kbd' } }));
89
+ eventEl.dispatchEvent(new dom.window.CustomEvent('split-button-text-click', { detail: { source: 'kbd' } }));
90
90
 
91
91
  if (emitted.length !== 2) {
92
92
  console.error('FAIL: expected 2 emitted events, got', emitted.length);