@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
@@ -0,0 +1,66 @@
1
+ /**
2
+ * SurfaceModel — the authoritative, DOM-free state of a streaming surface.
3
+ *
4
+ * The model runs identically in Node and in the browser. That is the point: the
5
+ * MCP server applies a patch to reject it at the tool boundary and to keep a
6
+ * canonical snapshot for late joiners, and the browser applies the same patch to
7
+ * move real DOM. One set of apply-semantics, two hosts.
8
+ *
9
+ * Every message is applied atomically to a draft. If any op fails validation,
10
+ * the draft is discarded and the surface is left exactly as it was — a rejected
11
+ * patch never half-lands.
12
+ */
13
+ import type { ComponentSpec, RegisteredCatalog, SpecChild } from '../types.js';
14
+ import { childPath } from './pointer.js';
15
+ import { type SurfaceChange, type SurfaceMessage, type SurfaceState } from './types.js';
16
+ export interface SurfaceModelOptions {
17
+ surfaceId?: string;
18
+ title?: string;
19
+ data?: Record<string, unknown>;
20
+ /**
21
+ * Reject a message whose `seq` is not exactly one past the last applied one.
22
+ * On by default — a silent gap is how a streamed UI ends up subtly wrong.
23
+ * Messages with no `seq` are always accepted (local, in-process use).
24
+ */
25
+ strictSeq?: boolean;
26
+ }
27
+ export interface ApplyResult {
28
+ changes: SurfaceChange[];
29
+ seq: number;
30
+ }
31
+ export declare class SurfaceSeqGapError extends Error {
32
+ readonly expected: number;
33
+ readonly received: number;
34
+ constructor(expected: number, received: number);
35
+ }
36
+ /**
37
+ * Deep-copy a node with `{ $bind }` prop values replaced by their data-model
38
+ * values. An unresolvable binding with no `default` drops the prop entirely
39
+ * rather than passing `undefined` through — a prop that is absent is a prop the
40
+ * validator and the renderer both handle correctly.
41
+ */
42
+ export declare function resolveNode(node: SpecChild, data: Record<string, unknown>): SpecChild;
43
+ export declare class SurfaceModel {
44
+ readonly catalog: RegisteredCatalog;
45
+ surfaceId: string;
46
+ title: string | undefined;
47
+ state: SurfaceState;
48
+ seq: number;
49
+ data: Record<string, unknown>;
50
+ private readonly strictSeq;
51
+ private _root;
52
+ constructor(catalog: RegisteredCatalog, options?: SurfaceModelOptions);
53
+ get root(): ComponentSpec | null;
54
+ /** The tree with every binding resolved — what a renderer or snapshot sees. */
55
+ snapshot(): ComponentSpec | null;
56
+ /** The raw (unresolved) node at `path`. Throws if nothing is there. */
57
+ nodeAt(path: string): SpecChild;
58
+ /** The resolved node at `path` — bindings substituted. */
59
+ resolvedAt(path: string): SpecChild;
60
+ apply(message: SurfaceMessage): ApplyResult;
61
+ private applyCreate;
62
+ private applyData;
63
+ private applyOps;
64
+ private applyOp;
65
+ }
66
+ export { childPath };
@@ -0,0 +1,429 @@
1
+ /**
2
+ * SurfaceModel — the authoritative, DOM-free state of a streaming surface.
3
+ *
4
+ * The model runs identically in Node and in the browser. That is the point: the
5
+ * MCP server applies a patch to reject it at the tool boundary and to keep a
6
+ * canonical snapshot for late joiners, and the browser applies the same patch to
7
+ * move real DOM. One set of apply-semantics, two hosts.
8
+ *
9
+ * Every message is applied atomically to a draft. If any op fails validation,
10
+ * the draft is discarded and the surface is left exactly as it was — a rejected
11
+ * patch never half-lands.
12
+ */
13
+ import { validateSpec } from '../registry.js';
14
+ import { childPath, parsePath, pointerGet, pointerRemove, pointerSet } from './pointer.js';
15
+ import { A2UI_STREAM_VERSION, isBindingRef, } from './types.js';
16
+ export class SurfaceSeqGapError extends Error {
17
+ expected;
18
+ received;
19
+ constructor(expected, received) {
20
+ super(`surface message out of order: expected seq ${expected}, received ${received}`);
21
+ this.expected = expected;
22
+ this.received = received;
23
+ this.name = 'SurfaceSeqGapError';
24
+ }
25
+ }
26
+ function clone(value) {
27
+ if (value === undefined || value === null)
28
+ return value;
29
+ const sc = globalThis.structuredClone;
30
+ return sc ? sc(value) : JSON.parse(JSON.stringify(value));
31
+ }
32
+ /**
33
+ * Deep-copy a node with `{ $bind }` prop values replaced by their data-model
34
+ * values. An unresolvable binding with no `default` drops the prop entirely
35
+ * rather than passing `undefined` through — a prop that is absent is a prop the
36
+ * validator and the renderer both handle correctly.
37
+ */
38
+ export function resolveNode(node, data) {
39
+ if (typeof node === 'string')
40
+ return node;
41
+ const out = { component: node.component };
42
+ if (node.props) {
43
+ const props = {};
44
+ for (const [key, value] of Object.entries(node.props)) {
45
+ if (isBindingRef(value)) {
46
+ const resolved = pointerGet(data, value.$bind);
47
+ const effective = resolved === undefined ? value.default : resolved;
48
+ if (effective !== undefined)
49
+ props[key] = clone(effective);
50
+ }
51
+ else {
52
+ props[key] = clone(value);
53
+ }
54
+ }
55
+ out.props = props;
56
+ }
57
+ if (node.events)
58
+ out.events = clone(node.events);
59
+ if (node.children)
60
+ out.children = node.children.map((c) => resolveNode(c, data));
61
+ if (node.slots) {
62
+ const slots = {};
63
+ for (const [name, arr] of Object.entries(node.slots)) {
64
+ slots[name] = arr.map((c) => resolveNode(c, data));
65
+ }
66
+ out.slots = slots;
67
+ }
68
+ return out;
69
+ }
70
+ export class SurfaceModel {
71
+ catalog;
72
+ surfaceId;
73
+ title;
74
+ state = 'idle';
75
+ seq = 0;
76
+ data;
77
+ strictSeq;
78
+ _root = null;
79
+ constructor(catalog, options = {}) {
80
+ this.catalog = catalog;
81
+ this.surfaceId = options.surfaceId ?? 'surface';
82
+ this.title = options.title;
83
+ this.data = options.data ? clone(options.data) : {};
84
+ this.strictSeq = options.strictSeq !== false;
85
+ }
86
+ get root() {
87
+ return this._root;
88
+ }
89
+ /** The tree with every binding resolved — what a renderer or snapshot sees. */
90
+ snapshot() {
91
+ return this._root ? resolveNode(this._root, this.data) : null;
92
+ }
93
+ /** The raw (unresolved) node at `path`. Throws if nothing is there. */
94
+ nodeAt(path) {
95
+ return nodeAtIn(this._root, path);
96
+ }
97
+ /** The resolved node at `path` — bindings substituted. */
98
+ resolvedAt(path) {
99
+ return resolveNode(this.nodeAt(path), this.data);
100
+ }
101
+ apply(message) {
102
+ const version = message.v;
103
+ if (version !== undefined && version !== A2UI_STREAM_VERSION) {
104
+ throw new Error(`unsupported surface protocol version ${String(version)}`);
105
+ }
106
+ if (this.strictSeq && typeof message.seq === 'number' && message.type !== 'surface.create') {
107
+ const expected = this.seq + 1;
108
+ if (message.seq !== expected)
109
+ throw new SurfaceSeqGapError(expected, message.seq);
110
+ }
111
+ let changes;
112
+ switch (message.type) {
113
+ case 'surface.create':
114
+ changes = this.applyCreate(message);
115
+ break;
116
+ case 'surface.patch':
117
+ changes = this.applyOps(message.ops);
118
+ break;
119
+ case 'surface.data':
120
+ changes = this.applyData(message.patches);
121
+ break;
122
+ case 'surface.status':
123
+ this.state = message.state;
124
+ changes = [];
125
+ break;
126
+ case 'surface.delete':
127
+ this._root = null;
128
+ this.state = 'done';
129
+ changes = [{ kind: 'root' }];
130
+ break;
131
+ default: {
132
+ const bad = message;
133
+ throw new Error(`unknown surface message type ${JSON.stringify(bad.type)}`);
134
+ }
135
+ }
136
+ if (typeof message.seq === 'number')
137
+ this.seq = message.seq;
138
+ else
139
+ this.seq += 1;
140
+ return { changes, seq: this.seq };
141
+ }
142
+ applyCreate(message) {
143
+ if (message.catalogId && message.catalogId !== this.catalog.id) {
144
+ throw new Error(`surface.create: catalogId "${message.catalogId}" does not match registered catalog "${this.catalog.id}"`);
145
+ }
146
+ this.surfaceId = message.surfaceId ?? this.surfaceId;
147
+ if (message.title !== undefined)
148
+ this.title = message.title;
149
+ this.data = message.data ? clone(message.data) : {};
150
+ if (message.root) {
151
+ const draft = clone(message.root);
152
+ validateSpec(resolveNode(draft, this.data), this.catalog, '$');
153
+ this._root = draft;
154
+ }
155
+ else {
156
+ this._root = null;
157
+ }
158
+ this.state = 'streaming';
159
+ return [{ kind: 'root' }];
160
+ }
161
+ applyData(patches) {
162
+ if (!Array.isArray(patches))
163
+ throw new Error('surface.data: patches must be an array');
164
+ const draft = clone(this.data);
165
+ let next = draft;
166
+ for (const patch of patches) {
167
+ if (!patch || typeof patch.pointer !== 'string') {
168
+ throw new Error('surface.data: each patch needs a string "pointer"');
169
+ }
170
+ if (patch.op === 'remove')
171
+ pointerRemove(next, patch.pointer);
172
+ else
173
+ next = pointerSet(next, patch.pointer, patch.value);
174
+ }
175
+ // A binding can feed a validated enum prop, so data changes are validated too.
176
+ if (this._root)
177
+ validateSpec(resolveNode(this._root, next), this.catalog, '$');
178
+ this.data = next;
179
+ return [{ kind: 'data' }];
180
+ }
181
+ applyOps(ops) {
182
+ if (!Array.isArray(ops))
183
+ throw new Error('surface.patch: ops must be an array');
184
+ // Ops mutate the live tree in place, because node object identity is how a
185
+ // renderer keeps an element (and its focus and state) across a patch. The
186
+ // backup buys back atomicity: if any op in the message fails, the surface is
187
+ // restored whole and the error is marked `rolledBack` so a renderer knows
188
+ // its identity map is now stale and it must remount.
189
+ const backup = clone(this._root);
190
+ const draft = { root: this._root };
191
+ const changes = [];
192
+ // Paths whose subtree must revalidate. Validating a container covers the
193
+ // nodes inserted into it, because validateSpec recurses.
194
+ const toValidate = new Set();
195
+ try {
196
+ for (const op of ops) {
197
+ changes.push(...this.applyOp(draft, op, toValidate));
198
+ }
199
+ for (const path of toValidate) {
200
+ if (path === '$') {
201
+ if (draft.root)
202
+ validateSpec(resolveNode(draft.root, this.data), this.catalog, '$');
203
+ continue;
204
+ }
205
+ const node = nodeAtIn(draft.root, path);
206
+ if (typeof node === 'string')
207
+ continue;
208
+ validateSpec(resolveNode(node, this.data), this.catalog, path);
209
+ }
210
+ }
211
+ catch (error) {
212
+ this._root = backup;
213
+ if (error instanceof Error)
214
+ error.rolledBack = true;
215
+ throw error;
216
+ }
217
+ this._root = draft.root;
218
+ return changes;
219
+ }
220
+ applyOp(draft, op, toValidate) {
221
+ if (!op || typeof op.op !== 'string') {
222
+ throw new Error('surface.patch: each op needs a string "op"');
223
+ }
224
+ if (typeof op.path !== 'string') {
225
+ throw new Error(`surface.patch: op "${op.op}" needs a string "path"`);
226
+ }
227
+ // Root-level structural ops are their own case: there is no parent to splice.
228
+ if (op.path === '$' && (op.op === 'replace' || op.op === 'remove')) {
229
+ if (op.op === 'remove') {
230
+ draft.root = null;
231
+ return [{ kind: 'root' }];
232
+ }
233
+ if (typeof op.node === 'string') {
234
+ throw new Error('$: the surface root must be a component, not a text node');
235
+ }
236
+ draft.root = clone(op.node);
237
+ toValidate.add('$');
238
+ return [{ kind: 'root' }];
239
+ }
240
+ if (op.op === 'replace' || op.op === 'remove') {
241
+ const { parent, list, index, slot, parentPath } = locateChild(draft.root, op.path);
242
+ if (op.op === 'remove') {
243
+ list.splice(index, 1);
244
+ pruneEmpty(parent, slot, list);
245
+ }
246
+ else {
247
+ list[index] = clone(op.node);
248
+ }
249
+ toValidate.add(parentPath);
250
+ return [{ kind: 'content', path: parentPath, slot }];
251
+ }
252
+ const target = requireComponent(draft.root, op.path);
253
+ switch (op.op) {
254
+ case 'setProps': {
255
+ if (!op.props || typeof op.props !== 'object' || Array.isArray(op.props)) {
256
+ throw new Error(`${op.path}: setProps needs a "props" object`);
257
+ }
258
+ const props = { ...(target.props ?? {}) };
259
+ for (const [key, value] of Object.entries(op.props)) {
260
+ if (value === null)
261
+ delete props[key];
262
+ else
263
+ props[key] = clone(value);
264
+ }
265
+ if (Object.keys(props).length)
266
+ target.props = props;
267
+ else
268
+ delete target.props;
269
+ toValidate.add(op.path);
270
+ return [{ kind: 'props', path: op.path }];
271
+ }
272
+ case 'setEvents': {
273
+ if (!op.events || typeof op.events !== 'object' || Array.isArray(op.events)) {
274
+ throw new Error(`${op.path}: setEvents needs an "events" object`);
275
+ }
276
+ const events = { ...(target.events ?? {}) };
277
+ for (const [key, value] of Object.entries(op.events)) {
278
+ if (value === null)
279
+ delete events[key];
280
+ else
281
+ events[key] = clone(value);
282
+ }
283
+ if (Object.keys(events).length)
284
+ target.events = events;
285
+ else
286
+ delete target.events;
287
+ toValidate.add(op.path);
288
+ return [{ kind: 'events', path: op.path }];
289
+ }
290
+ case 'append':
291
+ case 'insert': {
292
+ const nodes = op.nodes;
293
+ if (!Array.isArray(nodes))
294
+ throw new Error(`${op.path}: ${op.op} needs a "nodes" array`);
295
+ const slot = normalizeSlot(op.slot);
296
+ const list = contentList(target, slot);
297
+ const at = op.op === 'append' ? list.length : clampIndex(op.index, list.length, op.path);
298
+ list.splice(at, 0, ...nodes.map((n) => clone(n)));
299
+ toValidate.add(op.path);
300
+ return [{ kind: 'content', path: op.path, slot }];
301
+ }
302
+ case 'clear': {
303
+ const slot = normalizeSlot(op.slot);
304
+ const list = contentList(target, slot);
305
+ list.length = 0;
306
+ pruneEmpty(target, slot, list);
307
+ toValidate.add(op.path);
308
+ return [{ kind: 'content', path: op.path, slot }];
309
+ }
310
+ case 'setText': {
311
+ if (typeof op.text !== 'string')
312
+ throw new Error(`${op.path}: setText needs a "text" string`);
313
+ const slot = normalizeSlot(op.slot);
314
+ const list = contentList(target, slot);
315
+ list.length = 0;
316
+ list.push(op.text);
317
+ toValidate.add(op.path);
318
+ return [{ kind: 'content', path: op.path, slot }];
319
+ }
320
+ case 'appendText': {
321
+ if (typeof op.text !== 'string') {
322
+ throw new Error(`${op.path}: appendText needs a "text" string`);
323
+ }
324
+ const slot = normalizeSlot(op.slot);
325
+ const list = contentList(target, slot);
326
+ const last = list[list.length - 1];
327
+ if (typeof last === 'string') {
328
+ list[list.length - 1] = last + op.text;
329
+ toValidate.add(op.path);
330
+ return [{ kind: 'text', path: op.path, slot }];
331
+ }
332
+ list.push(op.text);
333
+ toValidate.add(op.path);
334
+ return [{ kind: 'content', path: op.path, slot }];
335
+ }
336
+ default: {
337
+ const bad = op;
338
+ throw new Error(`unknown patch op ${JSON.stringify(bad.op)}`);
339
+ }
340
+ }
341
+ }
342
+ }
343
+ // ─── helpers ────────────────────────────────────────────────────────────────
344
+ function normalizeSlot(slot) {
345
+ return slot === undefined ? null : slot;
346
+ }
347
+ function clampIndex(index, length, path) {
348
+ if (!Number.isInteger(index))
349
+ throw new Error(`${path}: insert needs an integer "index"`);
350
+ const i = index;
351
+ if (i < 0 || i > length) {
352
+ throw new Error(`${path}: insert index ${i} out of range 0..${length}`);
353
+ }
354
+ return i;
355
+ }
356
+ function contentList(spec, slot) {
357
+ if (slot === null) {
358
+ if (!spec.children)
359
+ spec.children = [];
360
+ return spec.children;
361
+ }
362
+ if (!spec.slots)
363
+ spec.slots = {};
364
+ if (!spec.slots[slot])
365
+ spec.slots[slot] = [];
366
+ return spec.slots[slot];
367
+ }
368
+ /**
369
+ * Drop an emptied `children`/`slots` container. Leaving `children: []` behind on
370
+ * a slot-only component would turn a legal spec into a validation error the next
371
+ * time anything touched it.
372
+ */
373
+ function pruneEmpty(spec, slot, list) {
374
+ if (list.length > 0)
375
+ return;
376
+ if (slot === null) {
377
+ delete spec.children;
378
+ return;
379
+ }
380
+ if (spec.slots) {
381
+ delete spec.slots[slot];
382
+ if (Object.keys(spec.slots).length === 0)
383
+ delete spec.slots;
384
+ }
385
+ }
386
+ function nodeAtIn(root, path) {
387
+ if (!root)
388
+ throw new Error(`${path}: surface has no root`);
389
+ let cur = root;
390
+ for (const seg of parsePath(path)) {
391
+ if (typeof cur === 'string')
392
+ throw new Error(`${path}: cannot descend into a text node`);
393
+ const list = seg.kind === 'children' ? cur.children : cur.slots?.[seg.name];
394
+ const next = list?.[seg.index];
395
+ if (next === undefined)
396
+ throw new Error(`${path}: no node at this path`);
397
+ cur = next;
398
+ }
399
+ return cur;
400
+ }
401
+ function requireComponent(root, path) {
402
+ const node = nodeAtIn(root, path);
403
+ if (typeof node === 'string') {
404
+ throw new Error(`${path}: expected a component node, found a text node`);
405
+ }
406
+ return node;
407
+ }
408
+ /** Resolve a child path to its parent, the list holding it, and its index. */
409
+ function locateChild(root, path) {
410
+ const segments = parsePath(path);
411
+ if (segments.length === 0)
412
+ throw new Error('$: has no parent');
413
+ const last = segments[segments.length - 1];
414
+ const parentPath = segments.length === 1 ? '$' : pathOf(segments.slice(0, -1));
415
+ const parent = requireComponent(root, parentPath);
416
+ const slot = last.kind === 'children' ? null : last.name;
417
+ const list = last.kind === 'children' ? parent.children : parent.slots?.[last.name];
418
+ if (!list || list[last.index] === undefined)
419
+ throw new Error(`${path}: no node at this path`);
420
+ return { parent, parentPath, list, index: last.index, slot };
421
+ }
422
+ function pathOf(segments) {
423
+ let out = '$';
424
+ for (const seg of segments) {
425
+ out += seg.kind === 'children' ? `.children[${seg.index}]` : `.slots.${seg.name}[${seg.index}]`;
426
+ }
427
+ return out;
428
+ }
429
+ export { childPath };