@copilotkit/a2ui-renderer 1.55.0-next.9 → 1.55.1-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. package/dist/a2ui-types.cjs +2 -3
  2. package/dist/a2ui-types.cjs.map +1 -1
  3. package/dist/a2ui-types.d.cts +21 -5
  4. package/dist/a2ui-types.d.cts.map +1 -1
  5. package/dist/a2ui-types.d.mts +21 -5
  6. package/dist/a2ui-types.d.mts.map +1 -1
  7. package/dist/a2ui-types.mjs +2 -3
  8. package/dist/a2ui-types.mjs.map +1 -1
  9. package/dist/index.cjs +40 -61
  10. package/dist/index.cjs.map +1 -0
  11. package/dist/index.d.cts +10 -39
  12. package/dist/index.d.cts.map +1 -1
  13. package/dist/index.d.mts +10 -39
  14. package/dist/index.d.mts.map +1 -1
  15. package/dist/index.mjs +12 -29
  16. package/dist/index.mjs.map +1 -0
  17. package/dist/index.umd.js +1743 -2783
  18. package/dist/index.umd.js.map +1 -1
  19. package/dist/react-renderer/a2ui-react/A2uiSurface.cjs +110 -0
  20. package/dist/react-renderer/a2ui-react/A2uiSurface.cjs.map +1 -0
  21. package/dist/react-renderer/a2ui-react/A2uiSurface.d.cts +2 -0
  22. package/dist/react-renderer/a2ui-react/A2uiSurface.d.mts +3 -0
  23. package/dist/react-renderer/a2ui-react/A2uiSurface.mjs +107 -0
  24. package/dist/react-renderer/a2ui-react/A2uiSurface.mjs.map +1 -0
  25. package/dist/react-renderer/a2ui-react/adapter.cjs +63 -0
  26. package/dist/react-renderer/a2ui-react/adapter.cjs.map +1 -0
  27. package/dist/react-renderer/a2ui-react/adapter.d.cts +23 -0
  28. package/dist/react-renderer/a2ui-react/adapter.d.cts.map +1 -0
  29. package/dist/react-renderer/a2ui-react/adapter.d.mts +23 -0
  30. package/dist/react-renderer/a2ui-react/adapter.d.mts.map +1 -0
  31. package/dist/react-renderer/a2ui-react/adapter.mjs +61 -0
  32. package/dist/react-renderer/a2ui-react/adapter.mjs.map +1 -0
  33. package/dist/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.cjs +53 -0
  34. package/dist/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.cjs.map +1 -0
  35. package/dist/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.d.cts +1 -0
  36. package/dist/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.d.mts +1 -0
  37. package/dist/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.mjs +36 -0
  38. package/dist/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.mjs.map +1 -0
  39. package/dist/react-renderer/a2ui-react/catalog/basic/components/Button.cjs +48 -0
  40. package/dist/react-renderer/a2ui-react/catalog/basic/components/Button.cjs.map +1 -0
  41. package/dist/react-renderer/a2ui-react/catalog/basic/components/Button.d.cts +1 -0
  42. package/dist/react-renderer/a2ui-react/catalog/basic/components/Button.d.mts +1 -0
  43. package/dist/react-renderer/a2ui-react/catalog/basic/components/Button.mjs +31 -0
  44. package/dist/react-renderer/a2ui-react/catalog/basic/components/Button.mjs.map +1 -0
  45. package/dist/react-renderer/a2ui-react/catalog/basic/components/Card.cjs +39 -0
  46. package/dist/react-renderer/a2ui-react/catalog/basic/components/Card.cjs.map +1 -0
  47. package/dist/react-renderer/a2ui-react/catalog/basic/components/Card.d.cts +1 -0
  48. package/dist/react-renderer/a2ui-react/catalog/basic/components/Card.d.mts +1 -0
  49. package/dist/react-renderer/a2ui-react/catalog/basic/components/Card.mjs +22 -0
  50. package/dist/react-renderer/a2ui-react/catalog/basic/components/Card.mjs.map +1 -0
  51. package/dist/react-renderer/a2ui-react/catalog/basic/components/CheckBox.cjs +73 -0
  52. package/dist/react-renderer/a2ui-react/catalog/basic/components/CheckBox.cjs.map +1 -0
  53. package/dist/react-renderer/a2ui-react/catalog/basic/components/CheckBox.d.cts +1 -0
  54. package/dist/react-renderer/a2ui-react/catalog/basic/components/CheckBox.d.mts +1 -0
  55. package/dist/react-renderer/a2ui-react/catalog/basic/components/CheckBox.mjs +71 -0
  56. package/dist/react-renderer/a2ui-react/catalog/basic/components/CheckBox.mjs.map +1 -0
  57. package/dist/react-renderer/a2ui-react/catalog/basic/components/ChildList.cjs +36 -0
  58. package/dist/react-renderer/a2ui-react/catalog/basic/components/ChildList.cjs.map +1 -0
  59. package/dist/react-renderer/a2ui-react/catalog/basic/components/ChildList.mjs +34 -0
  60. package/dist/react-renderer/a2ui-react/catalog/basic/components/ChildList.mjs.map +1 -0
  61. package/dist/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.cjs +110 -0
  62. package/dist/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.cjs.map +1 -0
  63. package/dist/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.d.cts +1 -0
  64. package/dist/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.d.mts +1 -0
  65. package/dist/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.mjs +108 -0
  66. package/dist/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.mjs.map +1 -0
  67. package/dist/react-renderer/a2ui-react/catalog/basic/components/Column.cjs +45 -0
  68. package/dist/react-renderer/a2ui-react/catalog/basic/components/Column.cjs.map +1 -0
  69. package/dist/react-renderer/a2ui-react/catalog/basic/components/Column.d.cts +1 -0
  70. package/dist/react-renderer/a2ui-react/catalog/basic/components/Column.d.mts +1 -0
  71. package/dist/react-renderer/a2ui-react/catalog/basic/components/Column.mjs +44 -0
  72. package/dist/react-renderer/a2ui-react/catalog/basic/components/Column.mjs.map +1 -0
  73. package/dist/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.cjs +69 -0
  74. package/dist/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.cjs.map +1 -0
  75. package/dist/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.d.cts +1 -0
  76. package/dist/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.d.mts +1 -0
  77. package/dist/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.mjs +67 -0
  78. package/dist/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.mjs.map +1 -0
  79. package/dist/react-renderer/a2ui-react/catalog/basic/components/Divider.cjs +44 -0
  80. package/dist/react-renderer/a2ui-react/catalog/basic/components/Divider.cjs.map +1 -0
  81. package/dist/react-renderer/a2ui-react/catalog/basic/components/Divider.d.cts +1 -0
  82. package/dist/react-renderer/a2ui-react/catalog/basic/components/Divider.d.mts +1 -0
  83. package/dist/react-renderer/a2ui-react/catalog/basic/components/Divider.mjs +27 -0
  84. package/dist/react-renderer/a2ui-react/catalog/basic/components/Divider.mjs.map +1 -0
  85. package/dist/react-renderer/a2ui-react/catalog/basic/components/Icon.cjs +44 -0
  86. package/dist/react-renderer/a2ui-react/catalog/basic/components/Icon.cjs.map +1 -0
  87. package/dist/react-renderer/a2ui-react/catalog/basic/components/Icon.d.cts +1 -0
  88. package/dist/react-renderer/a2ui-react/catalog/basic/components/Icon.d.mts +1 -0
  89. package/dist/react-renderer/a2ui-react/catalog/basic/components/Icon.mjs +27 -0
  90. package/dist/react-renderer/a2ui-react/catalog/basic/components/Icon.mjs.map +1 -0
  91. package/dist/react-renderer/a2ui-react/catalog/basic/components/Image.cjs +59 -0
  92. package/dist/react-renderer/a2ui-react/catalog/basic/components/Image.cjs.map +1 -0
  93. package/dist/react-renderer/a2ui-react/catalog/basic/components/Image.d.cts +1 -0
  94. package/dist/react-renderer/a2ui-react/catalog/basic/components/Image.d.mts +1 -0
  95. package/dist/react-renderer/a2ui-react/catalog/basic/components/Image.mjs +42 -0
  96. package/dist/react-renderer/a2ui-react/catalog/basic/components/Image.mjs.map +1 -0
  97. package/dist/react-renderer/a2ui-react/catalog/basic/components/List.cjs +49 -0
  98. package/dist/react-renderer/a2ui-react/catalog/basic/components/List.cjs.map +1 -0
  99. package/dist/react-renderer/a2ui-react/catalog/basic/components/List.d.cts +1 -0
  100. package/dist/react-renderer/a2ui-react/catalog/basic/components/List.d.mts +1 -0
  101. package/dist/react-renderer/a2ui-react/catalog/basic/components/List.mjs +32 -0
  102. package/dist/react-renderer/a2ui-react/catalog/basic/components/List.mjs.map +1 -0
  103. package/dist/react-renderer/a2ui-react/catalog/basic/components/Modal.cjs +81 -0
  104. package/dist/react-renderer/a2ui-react/catalog/basic/components/Modal.cjs.map +1 -0
  105. package/dist/react-renderer/a2ui-react/catalog/basic/components/Modal.d.cts +1 -0
  106. package/dist/react-renderer/a2ui-react/catalog/basic/components/Modal.d.mts +1 -0
  107. package/dist/react-renderer/a2ui-react/catalog/basic/components/Modal.mjs +80 -0
  108. package/dist/react-renderer/a2ui-react/catalog/basic/components/Modal.mjs.map +1 -0
  109. package/dist/react-renderer/a2ui-react/catalog/basic/components/Row.cjs +45 -0
  110. package/dist/react-renderer/a2ui-react/catalog/basic/components/Row.cjs.map +1 -0
  111. package/dist/react-renderer/a2ui-react/catalog/basic/components/Row.d.cts +1 -0
  112. package/dist/react-renderer/a2ui-react/catalog/basic/components/Row.d.mts +1 -0
  113. package/dist/react-renderer/a2ui-react/catalog/basic/components/Row.mjs +44 -0
  114. package/dist/react-renderer/a2ui-react/catalog/basic/components/Row.mjs.map +1 -0
  115. package/dist/react-renderer/a2ui-react/catalog/basic/components/Slider.cjs +74 -0
  116. package/dist/react-renderer/a2ui-react/catalog/basic/components/Slider.cjs.map +1 -0
  117. package/dist/react-renderer/a2ui-react/catalog/basic/components/Slider.d.cts +1 -0
  118. package/dist/react-renderer/a2ui-react/catalog/basic/components/Slider.d.mts +1 -0
  119. package/dist/react-renderer/a2ui-react/catalog/basic/components/Slider.mjs +72 -0
  120. package/dist/react-renderer/a2ui-react/catalog/basic/components/Slider.mjs.map +1 -0
  121. package/dist/react-renderer/a2ui-react/catalog/basic/components/Tabs.cjs +63 -0
  122. package/dist/react-renderer/a2ui-react/catalog/basic/components/Tabs.cjs.map +1 -0
  123. package/dist/react-renderer/a2ui-react/catalog/basic/components/Tabs.d.cts +1 -0
  124. package/dist/react-renderer/a2ui-react/catalog/basic/components/Tabs.d.mts +1 -0
  125. package/dist/react-renderer/a2ui-react/catalog/basic/components/Tabs.mjs +62 -0
  126. package/dist/react-renderer/a2ui-react/catalog/basic/components/Tabs.mjs.map +1 -0
  127. package/dist/react-renderer/a2ui-react/catalog/basic/components/Text.cjs +69 -0
  128. package/dist/react-renderer/a2ui-react/catalog/basic/components/Text.cjs.map +1 -0
  129. package/dist/react-renderer/a2ui-react/catalog/basic/components/Text.d.cts +1 -0
  130. package/dist/react-renderer/a2ui-react/catalog/basic/components/Text.d.mts +1 -0
  131. package/dist/react-renderer/a2ui-react/catalog/basic/components/Text.mjs +52 -0
  132. package/dist/react-renderer/a2ui-react/catalog/basic/components/Text.mjs.map +1 -0
  133. package/dist/react-renderer/a2ui-react/catalog/basic/components/TextField.cjs +88 -0
  134. package/dist/react-renderer/a2ui-react/catalog/basic/components/TextField.cjs.map +1 -0
  135. package/dist/react-renderer/a2ui-react/catalog/basic/components/TextField.d.cts +1 -0
  136. package/dist/react-renderer/a2ui-react/catalog/basic/components/TextField.d.mts +1 -0
  137. package/dist/react-renderer/a2ui-react/catalog/basic/components/TextField.mjs +86 -0
  138. package/dist/react-renderer/a2ui-react/catalog/basic/components/TextField.mjs.map +1 -0
  139. package/dist/react-renderer/a2ui-react/catalog/basic/components/Video.cjs +40 -0
  140. package/dist/react-renderer/a2ui-react/catalog/basic/components/Video.cjs.map +1 -0
  141. package/dist/react-renderer/a2ui-react/catalog/basic/components/Video.d.cts +1 -0
  142. package/dist/react-renderer/a2ui-react/catalog/basic/components/Video.d.mts +1 -0
  143. package/dist/react-renderer/a2ui-react/catalog/basic/components/Video.mjs +23 -0
  144. package/dist/react-renderer/a2ui-react/catalog/basic/components/Video.mjs.map +1 -0
  145. package/dist/react-renderer/a2ui-react/catalog/basic/index.cjs +63 -0
  146. package/dist/react-renderer/a2ui-react/catalog/basic/index.cjs.map +1 -0
  147. package/dist/react-renderer/a2ui-react/catalog/basic/index.d.cts +26 -0
  148. package/dist/react-renderer/a2ui-react/catalog/basic/index.d.cts.map +1 -0
  149. package/dist/react-renderer/a2ui-react/catalog/basic/index.d.mts +26 -0
  150. package/dist/react-renderer/a2ui-react/catalog/basic/index.d.mts.map +1 -0
  151. package/dist/react-renderer/a2ui-react/catalog/basic/index.mjs +62 -0
  152. package/dist/react-renderer/a2ui-react/catalog/basic/index.mjs.map +1 -0
  153. package/dist/react-renderer/a2ui-react/catalog/basic/utils.cjs +52 -0
  154. package/dist/react-renderer/a2ui-react/catalog/basic/utils.cjs.map +1 -0
  155. package/dist/react-renderer/a2ui-react/catalog/basic/utils.mjs +45 -0
  156. package/dist/react-renderer/a2ui-react/catalog/basic/utils.mjs.map +1 -0
  157. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Button.cjs +51 -0
  158. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Button.cjs.map +1 -0
  159. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Button.d.cts +2 -0
  160. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Button.d.mts +2 -0
  161. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Button.mjs +34 -0
  162. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Button.mjs.map +1 -0
  163. package/dist/react-renderer/a2ui-react/catalog/minimal/components/ChildList.cjs +36 -0
  164. package/dist/react-renderer/a2ui-react/catalog/minimal/components/ChildList.cjs.map +1 -0
  165. package/dist/react-renderer/a2ui-react/catalog/minimal/components/ChildList.mjs +34 -0
  166. package/dist/react-renderer/a2ui-react/catalog/minimal/components/ChildList.mjs.map +1 -0
  167. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Column.cjs +85 -0
  168. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Column.cjs.map +1 -0
  169. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Column.d.cts +2 -0
  170. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Column.d.mts +2 -0
  171. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Column.mjs +84 -0
  172. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Column.mjs.map +1 -0
  173. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Row.cjs +84 -0
  174. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Row.cjs.map +1 -0
  175. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Row.d.cts +2 -0
  176. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Row.d.mts +2 -0
  177. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Row.mjs +83 -0
  178. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Row.mjs.map +1 -0
  179. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Text.cjs +54 -0
  180. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Text.cjs.map +1 -0
  181. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Text.d.cts +2 -0
  182. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Text.d.mts +2 -0
  183. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Text.mjs +53 -0
  184. package/dist/react-renderer/a2ui-react/catalog/minimal/components/Text.mjs.map +1 -0
  185. package/dist/react-renderer/a2ui-react/catalog/minimal/components/TextField.cjs +85 -0
  186. package/dist/react-renderer/a2ui-react/catalog/minimal/components/TextField.cjs.map +1 -0
  187. package/dist/react-renderer/a2ui-react/catalog/minimal/components/TextField.d.cts +2 -0
  188. package/dist/react-renderer/a2ui-react/catalog/minimal/components/TextField.d.mts +2 -0
  189. package/dist/react-renderer/a2ui-react/catalog/minimal/components/TextField.mjs +68 -0
  190. package/dist/react-renderer/a2ui-react/catalog/minimal/components/TextField.mjs.map +1 -0
  191. package/dist/react-renderer/a2ui-react/catalog/minimal/index.cjs +44 -0
  192. package/dist/react-renderer/a2ui-react/catalog/minimal/index.cjs.map +1 -0
  193. package/dist/react-renderer/a2ui-react/catalog/minimal/index.d.cts +7 -0
  194. package/dist/react-renderer/a2ui-react/catalog/minimal/index.d.mts +7 -0
  195. package/dist/react-renderer/a2ui-react/catalog/minimal/index.mjs +44 -0
  196. package/dist/react-renderer/a2ui-react/catalog/minimal/index.mjs.map +1 -0
  197. package/dist/react-renderer/a2ui-react/index.cjs +22 -0
  198. package/dist/react-renderer/a2ui-react/index.d.cts +4 -0
  199. package/dist/react-renderer/a2ui-react/index.d.mts +4 -0
  200. package/dist/react-renderer/a2ui-react/index.mjs +24 -0
  201. package/dist/react-renderer/catalog-utils.cjs +84 -0
  202. package/dist/react-renderer/catalog-utils.cjs.map +1 -0
  203. package/dist/react-renderer/catalog-utils.d.cts +39 -0
  204. package/dist/react-renderer/catalog-utils.d.cts.map +1 -0
  205. package/dist/react-renderer/catalog-utils.d.mts +39 -0
  206. package/dist/react-renderer/catalog-utils.d.mts.map +1 -0
  207. package/dist/react-renderer/catalog-utils.mjs +79 -0
  208. package/dist/react-renderer/catalog-utils.mjs.map +1 -0
  209. package/dist/react-renderer/core/A2UIProvider.cjs +48 -70
  210. package/dist/react-renderer/core/A2UIProvider.cjs.map +1 -1
  211. package/dist/react-renderer/core/A2UIProvider.d.cts +13 -47
  212. package/dist/react-renderer/core/A2UIProvider.d.cts.map +1 -1
  213. package/dist/react-renderer/core/A2UIProvider.d.mts +13 -47
  214. package/dist/react-renderer/core/A2UIProvider.d.mts.map +1 -1
  215. package/dist/react-renderer/core/A2UIProvider.mjs +48 -71
  216. package/dist/react-renderer/core/A2UIProvider.mjs.map +1 -1
  217. package/dist/react-renderer/core/A2UIRenderer.cjs +8 -56
  218. package/dist/react-renderer/core/A2UIRenderer.cjs.map +1 -1
  219. package/dist/react-renderer/core/A2UIRenderer.d.cts +5 -19
  220. package/dist/react-renderer/core/A2UIRenderer.d.cts.map +1 -1
  221. package/dist/react-renderer/core/A2UIRenderer.d.mts +5 -19
  222. package/dist/react-renderer/core/A2UIRenderer.d.mts.map +1 -1
  223. package/dist/react-renderer/core/A2UIRenderer.mjs +9 -57
  224. package/dist/react-renderer/core/A2UIRenderer.mjs.map +1 -1
  225. package/dist/react-renderer/core/store.d.cts +6 -17
  226. package/dist/react-renderer/core/store.d.cts.map +1 -1
  227. package/dist/react-renderer/core/store.d.mts +6 -17
  228. package/dist/react-renderer/core/store.d.mts.map +1 -1
  229. package/dist/react-renderer/create-catalog.cjs +115 -0
  230. package/dist/react-renderer/create-catalog.cjs.map +1 -0
  231. package/dist/react-renderer/create-catalog.d.cts +107 -0
  232. package/dist/react-renderer/create-catalog.d.cts.map +1 -0
  233. package/dist/react-renderer/create-catalog.d.mts +107 -0
  234. package/dist/react-renderer/create-catalog.d.mts.map +1 -0
  235. package/dist/react-renderer/create-catalog.mjs +111 -0
  236. package/dist/react-renderer/create-catalog.mjs.map +1 -0
  237. package/dist/react-renderer/hooks/useA2UI.cjs +1 -26
  238. package/dist/react-renderer/hooks/useA2UI.cjs.map +1 -1
  239. package/dist/react-renderer/hooks/useA2UI.d.cts +5 -33
  240. package/dist/react-renderer/hooks/useA2UI.d.cts.map +1 -1
  241. package/dist/react-renderer/hooks/useA2UI.d.mts +5 -33
  242. package/dist/react-renderer/hooks/useA2UI.d.mts.map +1 -1
  243. package/dist/react-renderer/hooks/useA2UI.mjs +1 -26
  244. package/dist/react-renderer/hooks/useA2UI.mjs.map +1 -1
  245. package/dist/react-renderer/index.cjs +21 -27
  246. package/dist/react-renderer/index.cjs.map +1 -0
  247. package/dist/react-renderer/index.d.cts +17 -27
  248. package/dist/react-renderer/index.d.cts.map +1 -0
  249. package/dist/react-renderer/index.d.mts +17 -27
  250. package/dist/react-renderer/index.d.mts.map +1 -0
  251. package/dist/react-renderer/index.mjs +15 -27
  252. package/dist/react-renderer/index.mjs.map +1 -0
  253. package/dist/react-renderer/lib/utils.cjs +0 -25
  254. package/dist/react-renderer/lib/utils.cjs.map +1 -1
  255. package/dist/react-renderer/lib/utils.d.cts +0 -8
  256. package/dist/react-renderer/lib/utils.d.cts.map +1 -1
  257. package/dist/react-renderer/lib/utils.d.mts +0 -8
  258. package/dist/react-renderer/lib/utils.d.mts.map +1 -1
  259. package/dist/react-renderer/lib/utils.mjs +1 -25
  260. package/dist/react-renderer/lib/utils.mjs.map +1 -1
  261. package/dist/react-renderer/styles/index.cjs +4 -459
  262. package/dist/react-renderer/styles/index.cjs.map +1 -1
  263. package/dist/react-renderer/styles/index.d.mts +2 -18
  264. package/dist/react-renderer/styles/index.d.mts.map +1 -1
  265. package/dist/react-renderer/styles/index.mjs +4 -459
  266. package/dist/react-renderer/styles/index.mjs.map +1 -1
  267. package/dist/react-renderer/theme/ThemeContext.cjs +2 -19
  268. package/dist/react-renderer/theme/ThemeContext.cjs.map +1 -1
  269. package/dist/react-renderer/theme/ThemeContext.d.cts +4 -23
  270. package/dist/react-renderer/theme/ThemeContext.d.cts.map +1 -1
  271. package/dist/react-renderer/theme/ThemeContext.d.mts +4 -23
  272. package/dist/react-renderer/theme/ThemeContext.d.mts.map +1 -1
  273. package/dist/react-renderer/theme/ThemeContext.mjs +2 -19
  274. package/dist/react-renderer/theme/ThemeContext.mjs.map +1 -1
  275. package/dist/react-renderer/types.d.cts +24 -29
  276. package/dist/react-renderer/types.d.cts.map +1 -1
  277. package/dist/react-renderer/types.d.mts +24 -29
  278. package/dist/react-renderer/types.d.mts.map +1 -1
  279. package/package.json +29 -29
  280. package/dist/A2UIViewer.cjs +0 -154
  281. package/dist/A2UIViewer.cjs.map +0 -1
  282. package/dist/A2UIViewer.d.cts +0 -39
  283. package/dist/A2UIViewer.d.cts.map +0 -1
  284. package/dist/A2UIViewer.d.mts +0 -39
  285. package/dist/A2UIViewer.d.mts.map +0 -1
  286. package/dist/A2UIViewer.mjs +0 -152
  287. package/dist/A2UIViewer.mjs.map +0 -1
  288. package/dist/react-renderer/components/content/AudioPlayer.cjs +0 -34
  289. package/dist/react-renderer/components/content/AudioPlayer.cjs.map +0 -1
  290. package/dist/react-renderer/components/content/AudioPlayer.d.cts +0 -12
  291. package/dist/react-renderer/components/content/AudioPlayer.d.cts.map +0 -1
  292. package/dist/react-renderer/components/content/AudioPlayer.d.mts +0 -12
  293. package/dist/react-renderer/components/content/AudioPlayer.d.mts.map +0 -1
  294. package/dist/react-renderer/components/content/AudioPlayer.mjs +0 -33
  295. package/dist/react-renderer/components/content/AudioPlayer.mjs.map +0 -1
  296. package/dist/react-renderer/components/content/Divider.cjs +0 -31
  297. package/dist/react-renderer/components/content/Divider.cjs.map +0 -1
  298. package/dist/react-renderer/components/content/Divider.d.cts +0 -17
  299. package/dist/react-renderer/components/content/Divider.d.cts.map +0 -1
  300. package/dist/react-renderer/components/content/Divider.d.mts +0 -17
  301. package/dist/react-renderer/components/content/Divider.d.mts.map +0 -1
  302. package/dist/react-renderer/components/content/Divider.mjs +0 -30
  303. package/dist/react-renderer/components/content/Divider.mjs.map +0 -1
  304. package/dist/react-renderer/components/content/Icon.cjs +0 -50
  305. package/dist/react-renderer/components/content/Icon.cjs.map +0 -1
  306. package/dist/react-renderer/components/content/Icon.d.cts +0 -20
  307. package/dist/react-renderer/components/content/Icon.d.cts.map +0 -1
  308. package/dist/react-renderer/components/content/Icon.d.mts +0 -20
  309. package/dist/react-renderer/components/content/Icon.d.mts.map +0 -1
  310. package/dist/react-renderer/components/content/Icon.mjs +0 -49
  311. package/dist/react-renderer/components/content/Icon.mjs.map +0 -1
  312. package/dist/react-renderer/components/content/Image.cjs +0 -43
  313. package/dist/react-renderer/components/content/Image.cjs.map +0 -1
  314. package/dist/react-renderer/components/content/Image.d.cts +0 -15
  315. package/dist/react-renderer/components/content/Image.d.cts.map +0 -1
  316. package/dist/react-renderer/components/content/Image.d.mts +0 -15
  317. package/dist/react-renderer/components/content/Image.d.mts.map +0 -1
  318. package/dist/react-renderer/components/content/Image.mjs +0 -42
  319. package/dist/react-renderer/components/content/Image.mjs.map +0 -1
  320. package/dist/react-renderer/components/content/Text.cjs +0 -131
  321. package/dist/react-renderer/components/content/Text.cjs.map +0 -1
  322. package/dist/react-renderer/components/content/Text.d.cts +0 -32
  323. package/dist/react-renderer/components/content/Text.d.cts.map +0 -1
  324. package/dist/react-renderer/components/content/Text.d.mts +0 -32
  325. package/dist/react-renderer/components/content/Text.d.mts.map +0 -1
  326. package/dist/react-renderer/components/content/Text.mjs +0 -129
  327. package/dist/react-renderer/components/content/Text.mjs.map +0 -1
  328. package/dist/react-renderer/components/content/Video.cjs +0 -56
  329. package/dist/react-renderer/components/content/Video.cjs.map +0 -1
  330. package/dist/react-renderer/components/content/Video.d.cts +0 -14
  331. package/dist/react-renderer/components/content/Video.d.cts.map +0 -1
  332. package/dist/react-renderer/components/content/Video.d.mts +0 -14
  333. package/dist/react-renderer/components/content/Video.d.mts.map +0 -1
  334. package/dist/react-renderer/components/content/Video.mjs +0 -55
  335. package/dist/react-renderer/components/content/Video.mjs.map +0 -1
  336. package/dist/react-renderer/components/interactive/Button.cjs +0 -39
  337. package/dist/react-renderer/components/interactive/Button.cjs.map +0 -1
  338. package/dist/react-renderer/components/interactive/Button.d.cts +0 -15
  339. package/dist/react-renderer/components/interactive/Button.d.cts.map +0 -1
  340. package/dist/react-renderer/components/interactive/Button.d.mts +0 -15
  341. package/dist/react-renderer/components/interactive/Button.d.mts.map +0 -1
  342. package/dist/react-renderer/components/interactive/Button.mjs +0 -38
  343. package/dist/react-renderer/components/interactive/Button.mjs.map +0 -1
  344. package/dist/react-renderer/components/interactive/CheckBox.cjs +0 -58
  345. package/dist/react-renderer/components/interactive/CheckBox.cjs.map +0 -1
  346. package/dist/react-renderer/components/interactive/CheckBox.d.cts +0 -14
  347. package/dist/react-renderer/components/interactive/CheckBox.d.cts.map +0 -1
  348. package/dist/react-renderer/components/interactive/CheckBox.d.mts +0 -14
  349. package/dist/react-renderer/components/interactive/CheckBox.d.mts.map +0 -1
  350. package/dist/react-renderer/components/interactive/CheckBox.mjs +0 -57
  351. package/dist/react-renderer/components/interactive/CheckBox.mjs.map +0 -1
  352. package/dist/react-renderer/components/interactive/DateTimeInput.cjs +0 -65
  353. package/dist/react-renderer/components/interactive/DateTimeInput.cjs.map +0 -1
  354. package/dist/react-renderer/components/interactive/DateTimeInput.d.cts +0 -14
  355. package/dist/react-renderer/components/interactive/DateTimeInput.d.cts.map +0 -1
  356. package/dist/react-renderer/components/interactive/DateTimeInput.d.mts +0 -14
  357. package/dist/react-renderer/components/interactive/DateTimeInput.d.mts.map +0 -1
  358. package/dist/react-renderer/components/interactive/DateTimeInput.mjs +0 -64
  359. package/dist/react-renderer/components/interactive/DateTimeInput.mjs.map +0 -1
  360. package/dist/react-renderer/components/interactive/MultipleChoice.cjs +0 -54
  361. package/dist/react-renderer/components/interactive/MultipleChoice.cjs.map +0 -1
  362. package/dist/react-renderer/components/interactive/MultipleChoice.d.cts +0 -15
  363. package/dist/react-renderer/components/interactive/MultipleChoice.d.cts.map +0 -1
  364. package/dist/react-renderer/components/interactive/MultipleChoice.d.mts +0 -15
  365. package/dist/react-renderer/components/interactive/MultipleChoice.d.mts.map +0 -1
  366. package/dist/react-renderer/components/interactive/MultipleChoice.mjs +0 -53
  367. package/dist/react-renderer/components/interactive/MultipleChoice.mjs.map +0 -1
  368. package/dist/react-renderer/components/interactive/Slider.cjs +0 -72
  369. package/dist/react-renderer/components/interactive/Slider.cjs.map +0 -1
  370. package/dist/react-renderer/components/interactive/Slider.d.cts +0 -14
  371. package/dist/react-renderer/components/interactive/Slider.d.cts.map +0 -1
  372. package/dist/react-renderer/components/interactive/Slider.d.mts +0 -14
  373. package/dist/react-renderer/components/interactive/Slider.d.mts.map +0 -1
  374. package/dist/react-renderer/components/interactive/Slider.mjs +0 -71
  375. package/dist/react-renderer/components/interactive/Slider.mjs.map +0 -1
  376. package/dist/react-renderer/components/interactive/TextField.cjs +0 -74
  377. package/dist/react-renderer/components/interactive/TextField.cjs.map +0 -1
  378. package/dist/react-renderer/components/interactive/TextField.d.cts +0 -14
  379. package/dist/react-renderer/components/interactive/TextField.d.cts.map +0 -1
  380. package/dist/react-renderer/components/interactive/TextField.d.mts +0 -14
  381. package/dist/react-renderer/components/interactive/TextField.d.mts.map +0 -1
  382. package/dist/react-renderer/components/interactive/TextField.mjs +0 -73
  383. package/dist/react-renderer/components/interactive/TextField.mjs.map +0 -1
  384. package/dist/react-renderer/components/layout/Card.cjs +0 -46
  385. package/dist/react-renderer/components/layout/Card.cjs.map +0 -1
  386. package/dist/react-renderer/components/layout/Card.d.cts +0 -21
  387. package/dist/react-renderer/components/layout/Card.d.cts.map +0 -1
  388. package/dist/react-renderer/components/layout/Card.d.mts +0 -21
  389. package/dist/react-renderer/components/layout/Card.d.mts.map +0 -1
  390. package/dist/react-renderer/components/layout/Card.mjs +0 -45
  391. package/dist/react-renderer/components/layout/Card.mjs.map +0 -1
  392. package/dist/react-renderer/components/layout/Column.cjs +0 -43
  393. package/dist/react-renderer/components/layout/Column.cjs.map +0 -1
  394. package/dist/react-renderer/components/layout/Column.d.cts +0 -14
  395. package/dist/react-renderer/components/layout/Column.d.cts.map +0 -1
  396. package/dist/react-renderer/components/layout/Column.d.mts +0 -14
  397. package/dist/react-renderer/components/layout/Column.d.mts.map +0 -1
  398. package/dist/react-renderer/components/layout/Column.mjs +0 -42
  399. package/dist/react-renderer/components/layout/Column.mjs.map +0 -1
  400. package/dist/react-renderer/components/layout/List.cjs +0 -41
  401. package/dist/react-renderer/components/layout/List.cjs.map +0 -1
  402. package/dist/react-renderer/components/layout/List.d.cts +0 -14
  403. package/dist/react-renderer/components/layout/List.d.cts.map +0 -1
  404. package/dist/react-renderer/components/layout/List.d.mts +0 -14
  405. package/dist/react-renderer/components/layout/List.d.mts.map +0 -1
  406. package/dist/react-renderer/components/layout/List.mjs +0 -40
  407. package/dist/react-renderer/components/layout/List.mjs.map +0 -1
  408. package/dist/react-renderer/components/layout/Modal.cjs +0 -92
  409. package/dist/react-renderer/components/layout/Modal.cjs.map +0 -1
  410. package/dist/react-renderer/components/layout/Modal.d.cts +0 -19
  411. package/dist/react-renderer/components/layout/Modal.d.cts.map +0 -1
  412. package/dist/react-renderer/components/layout/Modal.d.mts +0 -19
  413. package/dist/react-renderer/components/layout/Modal.d.mts.map +0 -1
  414. package/dist/react-renderer/components/layout/Modal.mjs +0 -91
  415. package/dist/react-renderer/components/layout/Modal.mjs.map +0 -1
  416. package/dist/react-renderer/components/layout/Row.cjs +0 -43
  417. package/dist/react-renderer/components/layout/Row.cjs.map +0 -1
  418. package/dist/react-renderer/components/layout/Row.d.cts +0 -14
  419. package/dist/react-renderer/components/layout/Row.d.cts.map +0 -1
  420. package/dist/react-renderer/components/layout/Row.d.mts +0 -14
  421. package/dist/react-renderer/components/layout/Row.d.mts.map +0 -1
  422. package/dist/react-renderer/components/layout/Row.mjs +0 -42
  423. package/dist/react-renderer/components/layout/Row.mjs.map +0 -1
  424. package/dist/react-renderer/components/layout/Tabs.cjs +0 -47
  425. package/dist/react-renderer/components/layout/Tabs.cjs.map +0 -1
  426. package/dist/react-renderer/components/layout/Tabs.d.cts +0 -12
  427. package/dist/react-renderer/components/layout/Tabs.d.cts.map +0 -1
  428. package/dist/react-renderer/components/layout/Tabs.d.mts +0 -12
  429. package/dist/react-renderer/components/layout/Tabs.d.mts.map +0 -1
  430. package/dist/react-renderer/components/layout/Tabs.mjs +0 -46
  431. package/dist/react-renderer/components/layout/Tabs.mjs.map +0 -1
  432. package/dist/react-renderer/core/A2UIViewer.cjs +0 -11
  433. package/dist/react-renderer/core/A2UIViewer.d.cts +0 -16
  434. package/dist/react-renderer/core/A2UIViewer.d.cts.map +0 -1
  435. package/dist/react-renderer/core/A2UIViewer.d.mts +0 -16
  436. package/dist/react-renderer/core/A2UIViewer.d.mts.map +0 -1
  437. package/dist/react-renderer/core/A2UIViewer.mjs +0 -11
  438. package/dist/react-renderer/core/ComponentNode.cjs +0 -53
  439. package/dist/react-renderer/core/ComponentNode.cjs.map +0 -1
  440. package/dist/react-renderer/core/ComponentNode.d.cts +0 -29
  441. package/dist/react-renderer/core/ComponentNode.d.cts.map +0 -1
  442. package/dist/react-renderer/core/ComponentNode.d.mts +0 -29
  443. package/dist/react-renderer/core/ComponentNode.d.mts.map +0 -1
  444. package/dist/react-renderer/core/ComponentNode.mjs +0 -52
  445. package/dist/react-renderer/core/ComponentNode.mjs.map +0 -1
  446. package/dist/react-renderer/hooks/useA2UIComponent.cjs +0 -173
  447. package/dist/react-renderer/hooks/useA2UIComponent.cjs.map +0 -1
  448. package/dist/react-renderer/hooks/useA2UIComponent.d.cts +0 -56
  449. package/dist/react-renderer/hooks/useA2UIComponent.d.cts.map +0 -1
  450. package/dist/react-renderer/hooks/useA2UIComponent.d.mts +0 -56
  451. package/dist/react-renderer/hooks/useA2UIComponent.d.mts.map +0 -1
  452. package/dist/react-renderer/hooks/useA2UIComponent.mjs +0 -172
  453. package/dist/react-renderer/hooks/useA2UIComponent.mjs.map +0 -1
  454. package/dist/react-renderer/registry/ComponentRegistry.cjs +0 -114
  455. package/dist/react-renderer/registry/ComponentRegistry.cjs.map +0 -1
  456. package/dist/react-renderer/registry/ComponentRegistry.d.cts +0 -82
  457. package/dist/react-renderer/registry/ComponentRegistry.d.cts.map +0 -1
  458. package/dist/react-renderer/registry/ComponentRegistry.d.mts +0 -82
  459. package/dist/react-renderer/registry/ComponentRegistry.d.mts.map +0 -1
  460. package/dist/react-renderer/registry/ComponentRegistry.mjs +0 -113
  461. package/dist/react-renderer/registry/ComponentRegistry.mjs.map +0 -1
  462. package/dist/react-renderer/registry/defaultCatalog.cjs +0 -58
  463. package/dist/react-renderer/registry/defaultCatalog.cjs.map +0 -1
  464. package/dist/react-renderer/registry/defaultCatalog.d.cts +0 -17
  465. package/dist/react-renderer/registry/defaultCatalog.d.cts.map +0 -1
  466. package/dist/react-renderer/registry/defaultCatalog.d.mts +0 -17
  467. package/dist/react-renderer/registry/defaultCatalog.d.mts.map +0 -1
  468. package/dist/react-renderer/registry/defaultCatalog.mjs +0 -57
  469. package/dist/react-renderer/registry/defaultCatalog.mjs.map +0 -1
  470. package/dist/react-renderer/styles/reset.cjs +0 -29
  471. package/dist/react-renderer/styles/reset.cjs.map +0 -1
  472. package/dist/react-renderer/styles/reset.mjs +0 -28
  473. package/dist/react-renderer/styles/reset.mjs.map +0 -1
  474. package/dist/react-renderer/theme/litTheme.cjs +0 -386
  475. package/dist/react-renderer/theme/litTheme.cjs.map +0 -1
  476. package/dist/react-renderer/theme/litTheme.d.cts +0 -12
  477. package/dist/react-renderer/theme/litTheme.d.cts.map +0 -1
  478. package/dist/react-renderer/theme/litTheme.d.mts +0 -12
  479. package/dist/react-renderer/theme/litTheme.d.mts.map +0 -1
  480. package/dist/react-renderer/theme/litTheme.mjs +0 -384
  481. package/dist/react-renderer/theme/litTheme.mjs.map +0 -1
  482. package/dist/react-renderer/theme/utils.cjs +0 -41
  483. package/dist/react-renderer/theme/utils.cjs.map +0 -1
  484. package/dist/react-renderer/theme/utils.d.cts +0 -26
  485. package/dist/react-renderer/theme/utils.d.cts.map +0 -1
  486. package/dist/react-renderer/theme/utils.d.mts +0 -26
  487. package/dist/react-renderer/theme/utils.d.mts.map +0 -1
  488. package/dist/react-renderer/theme/utils.mjs +0 -39
  489. package/dist/react-renderer/theme/utils.mjs.map +0 -1
  490. package/dist/theme/viewer-theme.cjs +0 -395
  491. package/dist/theme/viewer-theme.cjs.map +0 -1
  492. package/dist/theme/viewer-theme.d.cts +0 -7
  493. package/dist/theme/viewer-theme.d.cts.map +0 -1
  494. package/dist/theme/viewer-theme.d.mts +0 -7
  495. package/dist/theme/viewer-theme.d.mts.map +0 -1
  496. package/dist/theme/viewer-theme.mjs +0 -394
  497. package/dist/theme/viewer-theme.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","names":["Data","Suspense","Styles","Suspense","MarkdownIt","Styles","v0_8","viewerTheme","v0_8"],"sources":["../src/react-renderer/theme/litTheme.ts","../src/react-renderer/theme/ThemeContext.tsx","../src/react-renderer/core/A2UIProvider.tsx","../src/react-renderer/hooks/useA2UI.ts","../src/react-renderer/registry/ComponentRegistry.ts","../src/react-renderer/core/ComponentNode.tsx","../src/react-renderer/theme/utils.ts","../src/react-renderer/lib/utils.ts","../src/react-renderer/core/A2UIRenderer.tsx","../src/react-renderer/hooks/useA2UIComponent.ts","../src/react-renderer/components/content/Text.tsx","../src/react-renderer/components/content/Image.tsx","../src/react-renderer/components/content/Icon.tsx","../src/react-renderer/components/content/Divider.tsx","../src/react-renderer/components/content/Video.tsx","../src/react-renderer/components/content/AudioPlayer.tsx","../src/react-renderer/components/layout/Row.tsx","../src/react-renderer/components/layout/Column.tsx","../src/react-renderer/components/layout/List.tsx","../src/react-renderer/components/layout/Card.tsx","../src/react-renderer/components/layout/Tabs.tsx","../src/react-renderer/components/layout/Modal.tsx","../src/react-renderer/components/interactive/Button.tsx","../src/react-renderer/components/interactive/TextField.tsx","../src/react-renderer/components/interactive/CheckBox.tsx","../src/react-renderer/components/interactive/Slider.tsx","../src/react-renderer/components/interactive/DateTimeInput.tsx","../src/react-renderer/components/interactive/MultipleChoice.tsx","../src/react-renderer/registry/defaultCatalog.ts","../src/react-renderer/styles/reset.ts","../src/react-renderer/styles/index.ts","../src/theme/viewer-theme.ts","../src/A2UIViewer.tsx","../src/a2ui-types.ts"],"sourcesContent":["import type { Types } from \"@a2ui/lit/0.8\";\n\n/**\n * Default theme for A2UI React components.\n *\n * This theme uses the same CSS class conventions as the Lit renderer,\n * ensuring visual consistency between React and Lit implementations.\n *\n * IMPORTANT: This theme must be kept in sync with the Lit renderer's internal\n * styling. If Lit components change their class maps, this file must be updated\n * to match. Ideally, Lit would export its default theme for direct import.\n *\n * Requires the structural styles to be injected:\n * @example\n * ```tsx\n * import { A2UIProvider } from '@a2ui/react';\n * import { injectStyles } from '@a2ui/react/styles';\n *\n * // Inject structural CSS at app startup\n * injectStyles();\n *\n * function App() {\n * return (\n * <A2UIProvider>\n * <A2UIRenderer surfaceId=\"main\" />\n * </A2UIProvider>\n * );\n * }\n * ```\n */\n\n// =============================================================================\n// Element Styles (used for markdown rendering and form elements)\n// =============================================================================\n\nconst elementA = {\n \"typography-f-sf\": true,\n \"typography-fs-n\": true,\n \"typography-w-500\": true,\n \"layout-as-n\": true,\n \"layout-dis-iflx\": true,\n \"layout-al-c\": true,\n \"typography-td-none\": true,\n \"color-c-p40\": true,\n};\n\nconst elementAudio = {\n \"layout-w-100\": true,\n};\n\nconst elementBody = {\n \"typography-f-s\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-mt-0\": true,\n \"layout-mb-2\": true,\n \"typography-sz-bm\": true,\n \"color-c-n10\": true,\n};\n\nconst elementButton = {\n \"typography-f-sf\": true,\n \"typography-fs-n\": true,\n \"typography-w-500\": true,\n \"layout-pt-3\": true,\n \"layout-pb-3\": true,\n \"layout-pl-5\": true,\n \"layout-pr-5\": true,\n \"layout-mb-1\": true,\n \"border-br-16\": true,\n \"border-bw-0\": true,\n \"border-c-n70\": true,\n \"border-bs-s\": true,\n \"color-bgc-s30\": true,\n \"behavior-ho-80\": true,\n};\n\nconst elementHeading = {\n \"typography-f-sf\": true,\n \"typography-fs-n\": true,\n \"typography-w-500\": true,\n \"layout-mt-0\": true,\n \"layout-mb-2\": true,\n};\n\nconst elementIframe = {\n \"behavior-sw-n\": true,\n};\n\nconst elementInput = {\n \"typography-f-sf\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-pl-4\": true,\n \"layout-pr-4\": true,\n \"layout-pt-2\": true,\n \"layout-pb-2\": true,\n \"border-br-6\": true,\n \"border-bw-1\": true,\n \"color-bc-s70\": true,\n \"border-bs-s\": true,\n \"layout-as-n\": true,\n \"color-c-n10\": true,\n};\n\nconst elementP = {\n \"typography-f-s\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"typography-sz-bm\": true,\n \"layout-as-n\": true,\n \"color-c-n10\": true,\n};\n\nconst elementList = {\n \"typography-f-s\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"typography-sz-bm\": true,\n \"layout-as-n\": true,\n \"color-c-n10\": true,\n};\n\nconst elementPre = {\n \"typography-f-c\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"typography-sz-bm\": true,\n \"typography-ws-p\": true,\n \"layout-as-n\": true,\n};\n\nconst elementTextarea = {\n ...elementInput,\n \"layout-r-none\": true,\n \"layout-fs-c\": true,\n};\n\nconst elementVideo = {\n \"layout-el-cv\": true,\n};\n\n// =============================================================================\n// Theme Export\n// =============================================================================\n\nexport const litTheme: Types.Theme = {\n // ===========================================================================\n // Additional Styles — map to CopilotKit CSS variables\n // ===========================================================================\n\n additionalStyles: {\n Button: {\n background: \"var(--primary, oklch(0.205 0 0))\",\n color: \"var(--primary-foreground, oklch(0.985 0 0))\",\n \"border-radius\": \"calc(var(--radius, 0.625rem) - 2px)\",\n cursor: \"pointer\",\n width: \"100%\",\n \"--n-10\": \"var(--primary-foreground, oklch(0.985 0 0))\",\n \"--n-35\": \"var(--primary-foreground, oklch(0.985 0 0))\",\n \"--n-60\": \"var(--primary-foreground, oklch(0.985 0 0))\",\n },\n Card: {\n background: \"var(--card, oklch(1 0 0))\",\n border: \"1px solid var(--border, oklch(0.922 0 0))\",\n \"border-radius\": \"var(--radius, 0.625rem)\",\n },\n // Applied directly to <input>/<textarea>\n TextField: {\n \"background-color\": \"var(--background, oklch(1 0 0))\",\n \"border-color\": \"var(--input, oklch(0.922 0 0))\",\n color: \"var(--foreground, oklch(0.145 0 0))\",\n \"border-radius\": \"var(--radius, 0.625rem)\",\n },\n // Applied to <section> container — palette vars cascade to <input type=\"checkbox\"> inside\n CheckBox: {\n \"--p-100\": \"var(--background, oklch(1 0 0))\",\n \"--p-60\": \"var(--input, oklch(0.922 0 0))\",\n \"--n-30\": \"var(--foreground, oklch(0.145 0 0))\",\n },\n // Applied directly to <input>\n DateTimeInput: {\n \"background-color\": \"var(--background, oklch(1 0 0))\",\n \"border-color\": \"var(--input, oklch(0.922 0 0))\",\n color: \"var(--foreground, oklch(0.145 0 0))\",\n \"border-radius\": \"var(--radius, 0.625rem)\",\n },\n Modal: {\n \"--p-100\": \"var(--card, oklch(1 0 0))\",\n \"--p-80\": \"var(--border, oklch(0.922 0 0))\",\n \"border-radius\": \"var(--radius, 0.625rem)\",\n },\n // Applied to <section> wrapping markdown content\n Text: {\n color: \"var(--foreground, oklch(0.145 0 0))\",\n },\n },\n\n components: {\n // =========================================================================\n // Content Components\n // =========================================================================\n\n AudioPlayer: {},\n\n Divider: {},\n\n Icon: {},\n\n Image: {\n all: {\n \"border-br-5\": true,\n \"layout-el-cv\": true,\n \"layout-w-100\": true,\n \"layout-h-100\": true,\n },\n avatar: { \"is-avatar\": true },\n header: {},\n icon: {},\n largeFeature: {},\n mediumFeature: {},\n smallFeature: {},\n },\n\n Text: {\n all: {\n \"layout-w-100\": true,\n \"layout-g-2\": true,\n },\n h1: {\n \"typography-f-sf\": true,\n \"typography-v-r\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"layout-p-0\": true,\n \"typography-sz-hs\": true,\n },\n h2: {\n \"typography-f-sf\": true,\n \"typography-v-r\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"layout-p-0\": true,\n \"typography-sz-tl\": true,\n },\n h3: {\n \"typography-f-sf\": true,\n \"typography-v-r\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"layout-p-0\": true,\n \"typography-sz-tl\": true,\n },\n h4: {\n \"typography-f-sf\": true,\n \"typography-v-r\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"layout-p-0\": true,\n \"typography-sz-bl\": true,\n },\n h5: {\n \"typography-f-sf\": true,\n \"typography-v-r\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"layout-p-0\": true,\n \"typography-sz-bm\": true,\n },\n body: {},\n caption: {},\n },\n\n Video: {\n \"border-br-5\": true,\n \"layout-el-cv\": true,\n },\n\n // =========================================================================\n // Layout Components\n // =========================================================================\n\n Card: {\n \"border-br-9\": true,\n \"layout-p-4\": true,\n \"color-bgc-n100\": true,\n },\n\n Column: {\n \"layout-g-2\": true,\n },\n\n List: {\n \"layout-g-4\": true,\n \"layout-p-2\": true,\n },\n\n Modal: {\n backdrop: {\n \"color-bbgc-p60_20\": true,\n },\n element: {\n \"border-br-2\": true,\n \"color-bgc-p100\": true,\n \"layout-p-4\": true,\n \"border-bw-1\": true,\n \"border-bs-s\": true,\n \"color-bc-p80\": true,\n },\n },\n\n Row: {\n \"layout-g-4\": true,\n },\n\n Tabs: {\n container: {},\n controls: {\n all: {},\n selected: {},\n },\n element: {},\n },\n\n // =========================================================================\n // Interactive Components\n // =========================================================================\n\n Button: {\n \"layout-pt-2\": true,\n \"layout-pb-2\": true,\n \"layout-pl-3\": true,\n \"layout-pr-3\": true,\n \"border-bw-0\": true,\n \"border-bs-s\": true,\n \"typography-w-400\": true,\n },\n\n CheckBox: {\n container: {\n \"layout-dsp-iflex\": true,\n \"layout-al-c\": true,\n },\n element: {\n \"layout-m-0\": true,\n \"layout-mr-2\": true,\n \"layout-p-2\": true,\n \"border-br-2\": true,\n \"border-bw-1\": true,\n \"border-bs-s\": true,\n \"color-bgc-p100\": true,\n \"color-bc-p60\": true,\n \"color-c-n30\": true,\n },\n label: {\n \"typography-f-sf\": true,\n \"typography-v-r\": true,\n \"typography-w-400\": true,\n \"layout-flx-1\": true,\n \"typography-sz-ll\": true,\n },\n },\n\n DateTimeInput: {\n container: {\n \"typography-sz-bm\": true,\n \"layout-w-100\": true,\n \"layout-g-2\": true,\n \"layout-dsp-flexvert\": true,\n },\n label: {\n \"color-c-p30\": true,\n \"typography-sz-bm\": true,\n },\n element: {\n \"layout-pt-2\": true,\n \"layout-pb-2\": true,\n \"layout-pl-3\": true,\n \"layout-pr-3\": true,\n \"border-bw-1\": true,\n \"border-bs-s\": true,\n },\n },\n\n MultipleChoice: {\n container: {},\n label: {},\n element: {},\n },\n\n Slider: {\n container: {},\n label: {},\n element: {},\n },\n\n TextField: {\n container: {\n \"typography-sz-bm\": true,\n \"layout-w-100\": true,\n \"layout-g-2\": true,\n \"layout-dsp-flexvert\": true,\n },\n label: {\n \"layout-flx-0\": true,\n },\n element: {\n \"typography-sz-bm\": true,\n \"layout-pt-2\": true,\n \"layout-pb-2\": true,\n \"layout-pl-3\": true,\n \"layout-pr-3\": true,\n \"border-bw-1\": true,\n \"border-bs-s\": true,\n },\n },\n },\n\n // ===========================================================================\n // HTML Elements (used for markdown rendering and raw HTML)\n // ===========================================================================\n\n elements: {\n a: elementA,\n audio: elementAudio,\n body: elementBody,\n button: elementButton,\n h1: elementHeading,\n h2: elementHeading,\n h3: elementHeading,\n h4: elementHeading,\n h5: elementHeading,\n iframe: elementIframe,\n input: elementInput,\n p: elementP,\n pre: elementPre,\n textarea: elementTextarea,\n video: elementVideo,\n },\n\n // ===========================================================================\n // Markdown (class arrays for markdown-it renderer)\n // ===========================================================================\n\n markdown: {\n p: Object.keys(elementP),\n h1: Object.keys(elementHeading),\n h2: Object.keys(elementHeading),\n h3: Object.keys(elementHeading),\n h4: Object.keys(elementHeading),\n h5: Object.keys(elementHeading),\n ul: Object.keys(elementList),\n ol: Object.keys(elementList),\n li: Object.keys(elementList),\n a: Object.keys(elementA),\n strong: [],\n em: [\"typography-fs-n\"],\n },\n};\n\n/**\n * Alias for litTheme - the default theme for A2UI React components.\n * @see litTheme\n */\nexport const defaultTheme = litTheme;\n","import { createContext, useContext, type ReactNode } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport { defaultTheme } from \"./litTheme\";\n\n/**\n * React context for the A2UI theme.\n */\nconst ThemeContext = createContext<Types.Theme | undefined>(undefined);\n\n/**\n * Props for the ThemeProvider component.\n */\nexport interface ThemeProviderProps {\n /** The theme to provide. Falls back to defaultTheme if not specified. */\n theme?: Types.Theme;\n /** Child components that will have access to the theme */\n children: ReactNode;\n}\n\n/**\n * Provider component that makes the A2UI theme available to descendant components.\n */\nexport function ThemeProvider({ theme, children }: ThemeProviderProps) {\n return (\n <ThemeContext.Provider value={theme ?? defaultTheme}>\n {children}\n </ThemeContext.Provider>\n );\n}\n\n/**\n * Hook to access the current A2UI theme.\n *\n * @returns The current theme\n * @throws If used outside of a ThemeProvider\n */\nexport function useTheme(): Types.Theme {\n const theme = useContext(ThemeContext);\n if (!theme) {\n throw new Error(\n \"useTheme must be used within a ThemeProvider or A2UIProvider\",\n );\n }\n return theme;\n}\n\n/**\n * Hook to optionally access the current A2UI theme.\n *\n * @returns The current theme, or undefined if not within a provider\n */\nexport function useThemeOptional(): Types.Theme | undefined {\n return useContext(ThemeContext);\n}\n","import {\n createContext,\n useContext,\n useRef,\n useState,\n useMemo,\n type ReactNode,\n} from \"react\";\nimport { Data, type Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIContextValue, A2UIActions } from \"./store\";\nimport { ThemeProvider } from \"../theme/ThemeContext\";\nimport type { OnActionCallback } from \"../types\";\n\n/**\n * Context for stable actions (never changes reference, prevents re-renders).\n * Components that only need to dispatch actions or read data won't re-render.\n */\nconst A2UIActionsContext = createContext<A2UIActions | null>(null);\n\n/**\n * Context for reactive state (changes trigger re-renders).\n * Only components that need to react to state changes subscribe to this.\n */\nconst A2UIStateContext = createContext<{ version: number } | null>(null);\n\n/**\n * Props for the A2UIProvider component.\n */\nexport interface A2UIProviderProps {\n /** Callback invoked when a user action is dispatched (button click, etc.) */\n onAction?: OnActionCallback;\n /** Theme configuration. Falls back to default theme if not provided. */\n theme?: Types.Theme;\n /** Child components */\n children: ReactNode;\n}\n\n/**\n * Provider component that sets up the A2UI context for descendant components.\n *\n * This provider uses a two-context architecture for performance:\n * - A2UIActionsContext: Stable actions that never change (no re-renders)\n * - A2UIStateContext: Reactive state that triggers re-renders when needed\n *\n * @example\n * ```tsx\n * function App() {\n * const handleAction = async (message) => {\n * const response = await fetch('/api/a2ui', {\n * method: 'POST',\n * body: JSON.stringify(message)\n * });\n * const newMessages = await response.json();\n * };\n *\n * return (\n * <A2UIProvider onAction={handleAction}>\n * <A2UIRenderer surfaceId=\"main\" />\n * </A2UIProvider>\n * );\n * }\n * ```\n */\nexport function A2UIProvider({ onAction, theme, children }: A2UIProviderProps) {\n // Create message processor only once using ref\n const processorRef = useRef<Types.MessageProcessor | null>(null);\n if (!processorRef.current) {\n processorRef.current = Data.createSignalA2uiMessageProcessor();\n }\n const processor = processorRef.current;\n\n // Version counter for triggering re-renders\n const [version, setVersion] = useState(0);\n\n // Store onAction in a ref so callbacks always have the latest value\n const onActionRef = useRef<OnActionCallback | null>(onAction ?? null);\n onActionRef.current = onAction ?? null;\n\n // Create stable actions object once - stored in ref, never changes\n const actionsRef = useRef<A2UIActions | null>(null);\n if (!actionsRef.current) {\n actionsRef.current = {\n processMessages: (messages: Types.ServerToClientMessage[]) => {\n processor.processMessages(messages);\n setVersion((v) => v + 1);\n },\n\n setData: (\n node: Types.AnyComponentNode | null,\n path: string,\n value: Types.DataValue,\n surfaceId: string,\n ) => {\n processor.setData(node, path, value, surfaceId);\n setVersion((v) => v + 1);\n },\n\n dispatch: (message: Types.A2UIClientEventMessage) => {\n if (onActionRef.current) {\n onActionRef.current(message);\n }\n },\n\n clearSurfaces: () => {\n processor.clearSurfaces();\n setVersion((v) => v + 1);\n },\n\n getSurface: (surfaceId: string) => {\n return processor.getSurfaces().get(surfaceId);\n },\n\n getSurfaces: () => {\n return processor.getSurfaces();\n },\n\n getData: (\n node: Types.AnyComponentNode,\n path: string,\n surfaceId: string,\n ) => {\n return processor.getData(node, path, surfaceId);\n },\n\n resolvePath: (path: string, dataContextPath?: string) => {\n return processor.resolvePath(path, dataContextPath);\n },\n };\n }\n const actions = actionsRef.current;\n\n // State context value - only changes when version changes\n const stateValue = useMemo(() => ({ version }), [version]);\n\n return (\n <A2UIActionsContext.Provider value={actions}>\n <A2UIStateContext.Provider value={stateValue}>\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </A2UIStateContext.Provider>\n </A2UIActionsContext.Provider>\n );\n}\n\n/**\n * Hook to access stable A2UI actions (won't cause re-renders).\n * Use this when you only need to dispatch actions or read data.\n *\n * @returns Stable actions object\n * @throws If used outside of an A2UIProvider\n */\nexport function useA2UIActions(): A2UIActions {\n const actions = useContext(A2UIActionsContext);\n if (!actions) {\n throw new Error(\"useA2UIActions must be used within an A2UIProvider\");\n }\n return actions;\n}\n\n/**\n * Hook to subscribe to A2UI state changes.\n * Components using this will re-render when state changes.\n *\n * @returns Current version number\n * @throws If used outside of an A2UIProvider\n */\nexport function useA2UIState(): { version: number } {\n const state = useContext(A2UIStateContext);\n if (!state) {\n throw new Error(\"useA2UIState must be used within an A2UIProvider\");\n }\n return state;\n}\n\n/**\n * Hook to access the full A2UI context (actions + state).\n * Components using this will re-render when state changes.\n *\n * @returns The A2UI context value\n * @throws If used outside of an A2UIProvider\n */\nexport function useA2UIContext(): A2UIContextValue {\n const actions = useA2UIActions();\n const state = useA2UIState();\n\n // Memoize combined value - only changes when state changes\n // Actions are stable, so this only re-creates when version changes\n return useMemo(\n () => ({\n ...actions,\n processor: null as unknown as Types.MessageProcessor, // Not exposed directly\n version: state.version,\n onAction: null, // Use dispatch instead\n }),\n [actions, state.version],\n );\n}\n\n/**\n * @deprecated Use useA2UIContext instead. This alias exists for backward compatibility only.\n */\nexport const useA2UIStore = useA2UIContext;\n\n/**\n * @deprecated This selector pattern does not provide performance benefits with React Context.\n * Components will re-render on any context change regardless of what you select.\n * Use useA2UIContext() or useA2UI() directly instead.\n *\n * @param selector - Function to select a slice of state\n * @returns The selected state\n */\nexport function useA2UIStoreSelector<T>(\n selector: (state: A2UIContextValue) => T,\n): T {\n const context = useA2UIContext();\n return selector(context);\n}\n","import type { Types } from \"@a2ui/lit/0.8\";\nimport { useA2UIActions, useA2UIState } from \"../core/A2UIProvider\";\n\n/**\n * Result returned by the useA2UI hook.\n */\nexport interface UseA2UIResult {\n /** Process incoming server messages */\n processMessages: (messages: Types.ServerToClientMessage[]) => void;\n\n /** Get a surface by ID */\n getSurface: (surfaceId: string) => Types.Surface | undefined;\n\n /** Get all surfaces */\n getSurfaces: () => ReadonlyMap<string, Types.Surface>;\n\n /** Clear all surfaces */\n clearSurfaces: () => void;\n\n /** The current version number (increments on state changes) */\n version: number;\n}\n\n/**\n * Main API hook for A2UI. Provides methods to process messages\n * and access surface state.\n *\n * Note: This hook subscribes to state changes. Components using this\n * will re-render when the A2UI state changes. For action-only usage\n * (no re-renders), use useA2UIActions() instead.\n *\n * @returns Object with message processing and surface access methods\n *\n * @example\n * ```tsx\n * function ChatApp() {\n * const { processMessages, getSurface } = useA2UI();\n *\n * useEffect(() => {\n * const ws = new WebSocket('wss://agent.example.com');\n * ws.onmessage = (event) => {\n * const messages = JSON.parse(event.data);\n * processMessages(messages);\n * };\n * return () => ws.close();\n * }, [processMessages]);\n *\n * return <A2UIRenderer surfaceId=\"main\" />;\n * }\n * ```\n */\nexport function useA2UI(): UseA2UIResult {\n const actions = useA2UIActions();\n const state = useA2UIState();\n\n return {\n processMessages: actions.processMessages,\n getSurface: actions.getSurface,\n getSurfaces: actions.getSurfaces,\n clearSurfaces: actions.clearSurfaces,\n version: state.version,\n };\n}\n","import { lazy, type ComponentType } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type {\n A2UIComponentProps,\n ComponentLoader,\n ComponentRegistration,\n} from \"../types\";\n\n/**\n * Registry for A2UI components. Allows registration of custom components\n * and supports lazy loading for code splitting.\n *\n * @example\n * ```tsx\n * const registry = new ComponentRegistry();\n *\n * // Register a component directly\n * registry.register('Text', { component: Text });\n *\n * // Register with lazy loading\n * registry.register('Modal', {\n * component: () => import('./components/Modal'),\n * lazy: true\n * });\n *\n * // Use with A2UIRenderer\n * <A2UIRenderer surfaceId=\"main\" registry={registry} />\n * ```\n */\nexport class ComponentRegistry {\n private static _instance: ComponentRegistry | null = null;\n private registry = new Map<string, ComponentRegistration>();\n private lazyCache = new Map<string, ComponentType<A2UIComponentProps>>();\n\n /**\n * Get the singleton instance of the registry.\n * Use this for the default global registry.\n */\n static getInstance(): ComponentRegistry {\n if (!ComponentRegistry._instance) {\n ComponentRegistry._instance = new ComponentRegistry();\n }\n return ComponentRegistry._instance;\n }\n\n /**\n * Reset the singleton instance.\n * Useful for testing.\n */\n static resetInstance(): void {\n ComponentRegistry._instance = null;\n }\n\n /**\n * Register a component type.\n *\n * @param type - The A2UI component type name (e.g., 'Text', 'Button')\n * @param registration - The component registration\n */\n register<T extends Types.AnyComponentNode>(\n type: string,\n registration: ComponentRegistration<T>,\n ): void {\n this.registry.set(type, registration as unknown as ComponentRegistration);\n }\n\n /**\n * Unregister a component type.\n *\n * @param type - The component type to unregister\n */\n unregister(type: string): void {\n this.registry.delete(type);\n this.lazyCache.delete(type);\n }\n\n /**\n * Check if a component type is registered.\n *\n * @param type - The component type to check\n * @returns True if the component is registered\n */\n has(type: string): boolean {\n return this.registry.has(type);\n }\n\n /**\n * Get a component by type. If the component is registered with lazy loading,\n * returns a React.lazy wrapped component.\n *\n * @param type - The component type to get\n * @returns The React component, or null if not found\n */\n get(type: string): ComponentType<A2UIComponentProps> | null {\n const registration = this.registry.get(type);\n if (!registration) return null;\n\n // If lazy loading is enabled and the component is a loader function\n if (registration.lazy && typeof registration.component === \"function\") {\n // Check cache first\n const cached = this.lazyCache.get(type);\n if (cached) return cached;\n\n // Create lazy component and cache it\n const lazyComponent = lazy(registration.component as ComponentLoader);\n this.lazyCache.set(type, lazyComponent);\n return lazyComponent;\n }\n\n return registration.component as ComponentType<A2UIComponentProps>;\n }\n\n /**\n * Get all registered component types.\n *\n * @returns Array of registered type names\n */\n getRegisteredTypes(): string[] {\n return Array.from(this.registry.keys());\n }\n\n /**\n * Clear all registrations.\n */\n clear(): void {\n this.registry.clear();\n this.lazyCache.clear();\n }\n}\n","import { Suspense, useMemo, memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport { ComponentRegistry } from \"../registry/ComponentRegistry\";\n\n/** Memoized loading fallback to avoid recreating on each render */\nconst LoadingFallback = memo(function LoadingFallback() {\n return (\n <div className=\"a2ui-loading\" style={{ padding: \"8px\", opacity: 0.5 }}>\n Loading...\n </div>\n );\n});\n\ninterface ComponentNodeProps {\n /** The component node to render (can be null/undefined for safety) */\n node: Types.AnyComponentNode | null | undefined;\n /** The surface ID this component belongs to */\n surfaceId: string;\n /** Optional custom registry. Falls back to singleton. */\n registry?: ComponentRegistry;\n}\n\n/**\n * ComponentNode - dynamically renders an A2UI component based on its type.\n *\n * Looks up the component in the registry and renders it with the appropriate props.\n * Supports lazy-loaded components via React.Suspense.\n *\n * No wrapper div is rendered - the component's root div (e.g., .a2ui-image) is the\n * direct flex child, exactly matching Lit's structure where the :host element IS\n * the flex item. Each component handles --weight CSS variable on its root div.\n *\n * Memoized to prevent unnecessary re-renders when parent updates but node hasn't changed.\n */\nexport const ComponentNode = memo(function ComponentNode({\n node,\n surfaceId,\n registry,\n}: ComponentNodeProps) {\n const actualRegistry = registry ?? ComponentRegistry.getInstance();\n\n // useMemo must be called unconditionally (Rules of Hooks)\n // We handle invalid nodes by returning null component type\n const nodeType =\n node && typeof node === \"object\" && \"type\" in node ? node.type : null;\n\n const Component = useMemo(\n () => (nodeType ? actualRegistry.get(nodeType) : null),\n [actualRegistry, nodeType],\n );\n\n // Handle null/undefined/invalid nodes gracefully\n if (!nodeType) {\n if (node) {\n console.warn(\"[A2UI] Invalid component node (not resolved?):\", node);\n }\n return null;\n }\n\n if (!Component) {\n console.warn(`[A2UI] Unknown component type: ${nodeType}`);\n return null;\n }\n\n // No wrapper div - component's root div is the :host equivalent\n // Suspense doesn't add DOM elements, preserving the correct hierarchy\n // Type assertion is safe: we've already validated node is valid (nodeType check above)\n return (\n <Suspense fallback={<LoadingFallback />}>\n <Component node={node as Types.AnyComponentNode} surfaceId={surfaceId} />\n </Suspense>\n );\n});\n\nexport default ComponentNode;\n","/**\n * Converts a theme class map (Record<string, boolean>) to a className string.\n *\n * @param classMap - An object where keys are class names and values are booleans\n * @returns A space-separated string of class names where the value is true\n *\n * @example\n * classMapToString({ 'a2ui-button': true, 'a2ui-button--primary': true, 'disabled': false })\n * // Returns: 'a2ui-button a2ui-button--primary'\n */\nexport function classMapToString(\n classMap: Record<string, boolean> | undefined,\n): string {\n if (!classMap) return \"\";\n return Object.entries(classMap)\n .filter(([, enabled]) => enabled)\n .map(([className]) => className)\n .join(\" \");\n}\n\n/**\n * Converts an additional styles object (Record<string, string>) to a React style object.\n *\n * @param styles - An object with CSS property names as keys and values as strings\n * @returns A React-compatible style object, or undefined if no styles\n *\n * @example\n * stylesToObject({ 'background-color': 'red', 'font-size': '16px', '--custom-var': 'blue' })\n * // Returns: { backgroundColor: 'red', fontSize: '16px', '--custom-var': 'blue' }\n */\nexport function stylesToObject(\n styles: Record<string, string> | undefined,\n): React.CSSProperties | undefined {\n if (!styles || Object.keys(styles).length === 0) return undefined;\n\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(styles)) {\n // Preserve CSS custom properties (--var-name) as-is\n if (key.startsWith(\"--\")) {\n result[key] = value;\n } else {\n // Convert kebab-case to camelCase for React\n const camelKey = key.replace(/-([a-z])/g, (_, letter) =>\n letter.toUpperCase(),\n );\n result[camelKey] = value;\n }\n }\n return result as React.CSSProperties;\n}\n","import { clsx, type ClassValue } from \"clsx\";\nimport { Styles } from \"@a2ui/lit/0.8\";\n\n/**\n * Utility function to merge class names.\n * Combines clsx for conditional classes.\n *\n * @param inputs - Class values to merge\n * @returns Merged class name string\n *\n * @example\n * cn('base-class', condition && 'conditional-class', { 'object-class': true })\n */\nexport function cn(...inputs: ClassValue[]): string {\n return clsx(inputs);\n}\n\n/**\n * Converts a theme class map (Record<string, boolean>) to a className string.\n * Re-exported from theme/utils for convenience.\n *\n * @param classMap - An object where keys are class names and values are booleans\n * @returns A space-separated string of class names where the value is true\n */\nexport { classMapToString, stylesToObject } from \"../theme/utils\";\n\n/**\n * Merges multiple class maps into a single class map.\n * Uses Lit's Styles.merge() function directly for consistency.\n *\n * Lit's merge handles prefix conflicts: if you have 'layout-p-2' and 'layout-p-4',\n * only the latter is kept (same prefix 'layout-p-' means they conflict).\n *\n * @param maps - Class maps to merge\n * @returns A merged class map\n */\nexport function mergeClassMaps(\n ...maps: (Record<string, boolean> | undefined)[]\n): Record<string, boolean> {\n // Filter out undefined maps and use Lit's merge function\n const validMaps = maps.filter(\n (m): m is Record<string, boolean> => m !== undefined,\n );\n if (validMaps.length === 0) return {};\n return Styles.merge(...validMaps);\n}\n","import { Suspense, useMemo, memo, type ReactNode } from \"react\";\nimport { useA2UI } from \"../hooks/useA2UI\";\nimport { ComponentNode } from \"./ComponentNode\";\nimport { type ComponentRegistry } from \"../registry/ComponentRegistry\";\nimport { cn } from \"../lib/utils\";\n\n/** Default loading fallback - memoized to prevent recreation */\nconst DefaultLoadingFallback = memo(function DefaultLoadingFallback() {\n return (\n <div className=\"a2ui-loading\" style={{ padding: \"16px\", opacity: 0.5 }}>\n Loading...\n </div>\n );\n});\n\nexport interface A2UIRendererProps {\n /** The surface ID to render */\n surfaceId: string;\n /** Additional CSS classes for the surface container */\n className?: string;\n /** Fallback content when surface is not yet available */\n fallback?: ReactNode;\n /** Loading fallback for lazy-loaded components */\n loadingFallback?: ReactNode;\n /** Optional custom component registry */\n registry?: ComponentRegistry;\n}\n\n/**\n * A2UIRenderer - renders an A2UI surface.\n *\n * This is the main entry point for rendering A2UI content in your React app.\n * It reads the surface state from the A2UI store and renders the component tree.\n *\n * Memoized to prevent unnecessary re-renders when props haven't changed.\n *\n * @example\n * ```tsx\n * function App() {\n * return (\n * <A2UIProvider onAction={handleAction}>\n * <A2UIRenderer surfaceId=\"main\" />\n * </A2UIProvider>\n * );\n * }\n * ```\n */\nexport const A2UIRenderer = memo(function A2UIRenderer({\n surfaceId,\n className,\n fallback = null,\n loadingFallback,\n registry,\n}: A2UIRendererProps) {\n const { getSurface, version } = useA2UI();\n\n // Get surface - this will re-render when version changes\n const surface = getSurface(surfaceId);\n\n // Memoize surface styles to prevent object recreation\n // Matches Lit renderer's transformation logic in surface.ts\n const surfaceStyles = useMemo<React.CSSProperties>(() => {\n if (!surface?.styles) return {};\n\n const styles: React.CSSProperties & Record<string, string> = {};\n\n for (const [key, value] of Object.entries(surface.styles)) {\n switch (key) {\n // Generate a color palette from the primary color.\n // Values range from 0-100 where 0=black, 100=white, 50=primary color.\n // Uses color-mix to create intermediate values.\n case \"primaryColor\": {\n styles[\"--p-100\"] = \"#ffffff\";\n styles[\"--p-99\"] = `color-mix(in srgb, ${value} 2%, white 98%)`;\n styles[\"--p-98\"] = `color-mix(in srgb, ${value} 4%, white 96%)`;\n styles[\"--p-95\"] = `color-mix(in srgb, ${value} 10%, white 90%)`;\n styles[\"--p-90\"] = `color-mix(in srgb, ${value} 20%, white 80%)`;\n styles[\"--p-80\"] = `color-mix(in srgb, ${value} 40%, white 60%)`;\n styles[\"--p-70\"] = `color-mix(in srgb, ${value} 60%, white 40%)`;\n styles[\"--p-60\"] = `color-mix(in srgb, ${value} 80%, white 20%)`;\n styles[\"--p-50\"] = String(value);\n styles[\"--p-40\"] = `color-mix(in srgb, ${value} 80%, black 20%)`;\n styles[\"--p-35\"] = `color-mix(in srgb, ${value} 70%, black 30%)`;\n styles[\"--p-30\"] = `color-mix(in srgb, ${value} 60%, black 40%)`;\n styles[\"--p-25\"] = `color-mix(in srgb, ${value} 50%, black 50%)`;\n styles[\"--p-20\"] = `color-mix(in srgb, ${value} 40%, black 60%)`;\n styles[\"--p-15\"] = `color-mix(in srgb, ${value} 30%, black 70%)`;\n styles[\"--p-10\"] = `color-mix(in srgb, ${value} 20%, black 80%)`;\n styles[\"--p-5\"] = `color-mix(in srgb, ${value} 10%, black 90%)`;\n styles[\"--p-0\"] = \"#000000\";\n break;\n }\n\n case \"font\": {\n styles[\"--font-family\"] = String(value);\n styles[\"--font-family-flex\"] = String(value);\n break;\n }\n }\n }\n return styles;\n }, [surface?.styles]);\n\n // No surface yet\n if (!surface || !surface.componentTree) {\n return <>{fallback}</>;\n }\n\n // Use provided fallback or default memoized component\n const actualLoadingFallback = loadingFallback ?? <DefaultLoadingFallback />;\n\n return (\n <div\n className={cn(\"a2ui-surface\", className)}\n style={surfaceStyles}\n data-surface-id={surfaceId}\n data-version={version}\n >\n <Suspense fallback={actualLoadingFallback}>\n <ComponentNode\n node={surface.componentTree}\n surfaceId={surfaceId}\n registry={registry}\n />\n </Suspense>\n </div>\n );\n});\n\nexport default A2UIRenderer;\n","import { useCallback, useId, useMemo } from \"react\";\nimport type { Types, Primitives } from \"@a2ui/lit/0.8\";\nimport { useA2UIActions, useA2UIState } from \"../core/A2UIProvider\";\nimport { useTheme } from \"../theme/ThemeContext\";\n\n/**\n * Result returned by the useA2UIComponent hook.\n */\nexport interface UseA2UIComponentResult {\n /** The current theme */\n theme: Types.Theme;\n\n /** Resolve a StringValue to its actual string value */\n resolveString: (\n value: Primitives.StringValue | null | undefined,\n ) => string | null;\n\n /** Resolve a NumberValue to its actual number value */\n resolveNumber: (\n value: Primitives.NumberValue | null | undefined,\n ) => number | null;\n\n /** Resolve a BooleanValue to its actual boolean value */\n resolveBoolean: (\n value: Primitives.BooleanValue | null | undefined,\n ) => boolean | null;\n\n /** Set a value in the data model (for two-way binding) */\n setValue: (path: string, value: Types.DataValue) => void;\n\n /** Get a value from the data model */\n getValue: (path: string) => Types.DataValue | null;\n\n /** Dispatch a user action */\n sendAction: (action: Types.Action) => void;\n\n /** Generate a unique ID for accessibility */\n getUniqueId: (prefix: string) => string;\n}\n\n/**\n * Base hook for A2UI components. Provides data binding, theme access,\n * and action dispatching.\n *\n * @param node - The component node from the A2UI message processor\n * @param surfaceId - The surface ID this component belongs to\n * @returns Object with theme, data binding helpers, and action dispatcher\n *\n * @example\n * ```tsx\n * function TextField({ node, surfaceId }: A2UIComponentProps<Types.TextFieldNode>) {\n * const { theme, resolveString, setValue } = useA2UIComponent(node, surfaceId);\n *\n * const label = resolveString(node.properties.label);\n * const value = resolveString(node.properties.text) ?? '';\n *\n * return (\n * <div className={classMapToString(theme.components.TextField.container)}>\n * <label>{label}</label>\n * <input\n * value={value}\n * onChange={(e) => setValue(node.properties.text?.path!, e.target.value)}\n * />\n * </div>\n * );\n * }\n * ```\n */\nexport function useA2UIComponent<T extends Types.AnyComponentNode>(\n node: T,\n surfaceId: string,\n): UseA2UIComponentResult {\n // Use stable actions - won't cause re-renders when version changes\n const actions = useA2UIActions();\n const theme = useTheme();\n const baseId = useId();\n\n // Subscribe to data model version - triggers re-render when data changes via setData.\n // This ensures components with path bindings see updated values.\n // memo() doesn't block context-triggered re-renders.\n useA2UIState();\n\n /**\n * Resolve a StringValue to its actual string value.\n * Checks literalString, literal, then path in that order.\n * Note: This reads from data model via stable actions reference.\n */\n const resolveString = useCallback(\n (value: Primitives.StringValue | null | undefined): string | null => {\n if (!value) return null;\n if (typeof value !== \"object\") return null;\n\n if (value.literalString !== undefined) {\n return value.literalString;\n }\n if (value.literal !== undefined) {\n return String(value.literal);\n }\n if (value.path) {\n const data = actions.getData(node, value.path, surfaceId);\n return data !== null ? String(data) : null;\n }\n return null;\n },\n [actions, node, surfaceId],\n );\n\n /**\n * Resolve a NumberValue to its actual number value.\n */\n const resolveNumber = useCallback(\n (value: Primitives.NumberValue | null | undefined): number | null => {\n if (!value) return null;\n if (typeof value !== \"object\") return null;\n\n if (value.literalNumber !== undefined) {\n return value.literalNumber;\n }\n if (value.literal !== undefined) {\n return Number(value.literal);\n }\n if (value.path) {\n const data = actions.getData(node, value.path, surfaceId);\n return data !== null ? Number(data) : null;\n }\n return null;\n },\n [actions, node, surfaceId],\n );\n\n /**\n * Resolve a BooleanValue to its actual boolean value.\n */\n const resolveBoolean = useCallback(\n (value: Primitives.BooleanValue | null | undefined): boolean | null => {\n if (!value) return null;\n if (typeof value !== \"object\") return null;\n\n if (value.literalBoolean !== undefined) {\n return value.literalBoolean;\n }\n if (value.literal !== undefined) {\n return Boolean(value.literal);\n }\n if (value.path) {\n const data = actions.getData(node, value.path, surfaceId);\n return data !== null ? Boolean(data) : null;\n }\n return null;\n },\n [actions, node, surfaceId],\n );\n\n /**\n * Set a value in the data model for two-way binding.\n */\n const setValue = useCallback(\n (path: string, value: Types.DataValue) => {\n actions.setData(node, path, value, surfaceId);\n },\n [actions, node, surfaceId],\n );\n\n /**\n * Get a value from the data model.\n */\n const getValue = useCallback(\n (path: string): Types.DataValue | null => {\n return actions.getData(node, path, surfaceId);\n },\n [actions, node, surfaceId],\n );\n\n /**\n * Dispatch a user action to the server.\n * Resolves all context bindings before dispatching.\n */\n const sendAction = useCallback(\n (action: Types.Action) => {\n const actionContext: Record<string, unknown> = {};\n\n if (action.context) {\n for (const item of action.context) {\n if (item.value.literalString !== undefined) {\n actionContext[item.key] = item.value.literalString;\n } else if (item.value.literalNumber !== undefined) {\n actionContext[item.key] = item.value.literalNumber;\n } else if (item.value.literalBoolean !== undefined) {\n actionContext[item.key] = item.value.literalBoolean;\n } else if (item.value.path) {\n const resolvedPath = actions.resolvePath(\n item.value.path,\n node.dataContextPath,\n );\n actionContext[item.key] = actions.getData(\n node,\n resolvedPath,\n surfaceId,\n );\n }\n }\n }\n\n actions.dispatch({\n userAction: {\n name: action.name,\n sourceComponentId: node.id,\n surfaceId,\n timestamp: new Date().toISOString(),\n context: actionContext,\n },\n });\n },\n [actions, node, surfaceId],\n );\n\n /**\n * Generate a unique ID for accessibility purposes.\n * Uses React's useId() for SSR and Concurrent Mode compatibility.\n */\n const getUniqueId = useCallback(\n (prefix: string) => {\n return `${prefix}${baseId}`;\n },\n [baseId],\n );\n\n return useMemo(\n () => ({\n theme,\n resolveString,\n resolveNumber,\n resolveBoolean,\n setValue,\n getValue,\n sendAction,\n getUniqueId,\n }),\n [\n theme,\n resolveString,\n resolveNumber,\n resolveBoolean,\n setValue,\n getValue,\n sendAction,\n getUniqueId,\n ],\n );\n}\n","import { useMemo, memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport {\n classMapToString,\n stylesToObject,\n mergeClassMaps,\n} from \"../../lib/utils\";\nimport MarkdownIt from \"markdown-it\";\n\ntype UsageHint = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"caption\" | \"body\";\n\ninterface HintedStyles {\n h1: Record<string, string>;\n h2: Record<string, string>;\n h3: Record<string, string>;\n h4: Record<string, string>;\n h5: Record<string, string>;\n body: Record<string, string>;\n caption: Record<string, string>;\n}\n\nfunction isHintedStyles(styles: unknown): styles is HintedStyles {\n if (typeof styles !== \"object\" || !styles || Array.isArray(styles))\n return false;\n const expected = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"caption\", \"body\"];\n return expected.some((v) => v in styles);\n}\n\n/**\n * Markdown-it instance for rendering markdown text.\n * Uses synchronous import to ensure availability at first render (matches Lit renderer).\n *\n * Configuration matches Lit's markdown directive (uses MarkdownIt defaults):\n * - html: false (default) - Security: disable raw HTML\n * - linkify: false (default) - Don't auto-convert URLs/emails to links\n * - breaks: false (default) - Don't convert \\n to <br>\n * - typographer: false (default) - Don't use smart quotes/dashes\n */\nconst markdownRenderer = new MarkdownIt();\n\n/**\n * Apply theme classes to markdown HTML elements.\n * Replaces default element tags with themed versions.\n */\nfunction applyMarkdownTheme(\n html: string,\n markdownTheme: Types.Theme[\"markdown\"],\n): string {\n if (!markdownTheme) return html;\n\n // Map of element -> classes\n const replacements: Array<[RegExp, string]> = [];\n\n for (const [element, classes] of Object.entries(markdownTheme)) {\n if (!classes || (Array.isArray(classes) && classes.length === 0)) continue;\n\n const classString = Array.isArray(classes)\n ? classes.join(\" \")\n : classMapToString(classes);\n if (!classString) continue;\n\n // Create regex to match opening tags (handles self-closing and regular)\n const tagRegex = new RegExp(`<${element}(?=\\\\s|>|/>)`, \"gi\");\n replacements.push([tagRegex, `<${element} class=\"${classString}\"`]);\n }\n\n let result = html;\n for (const [regex, replacement] of replacements) {\n result = result.replace(regex, replacement);\n }\n\n return result;\n}\n\n/**\n * Text component - renders text content with markdown support.\n *\n * Structure mirrors Lit's Text component:\n * <div class=\"a2ui-text\"> ← :host equivalent\n * <section class=\"...\"> ← theme classes\n * <h2>...</h2> ← rendered markdown content\n * </section>\n * </div>\n *\n * Text is parsed as markdown and rendered as HTML (matches Lit renderer behavior).\n * Supports usageHint values: h1, h2, h3, h4, h5, caption, body\n *\n * Markdown features supported:\n * - **Bold** and *italic* text\n * - Lists (ordered and unordered)\n * - `inline code` and code blocks\n * - [Links](url) (auto-linkified URLs too)\n * - Blockquotes\n * - Horizontal rules\n *\n * Note: Raw HTML is disabled for security.\n */\nexport const Text = memo(function Text({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.TextNode>) {\n const { theme, resolveString } = useA2UIComponent(node, surfaceId);\n const props = node.properties;\n\n const textValue = resolveString(props.text);\n const usageHint = props.usageHint as UsageHint | undefined;\n\n // Get merged classes (matches Lit's Styles.merge)\n const classes = mergeClassMaps(\n theme.components.Text.all,\n usageHint ? theme.components.Text[usageHint] : {},\n );\n\n // Get additional styles based on usage hint\n const additionalStyles = useMemo(() => {\n const textStyles = theme.additionalStyles?.Text;\n if (!textStyles) return undefined;\n\n if (isHintedStyles(textStyles)) {\n const hint = usageHint ?? \"body\";\n return stylesToObject(textStyles[hint]);\n }\n return stylesToObject(textStyles as Record<string, string>);\n }, [theme.additionalStyles?.Text, usageHint]);\n\n // Render markdown content (matches Lit behavior - always uses markdown)\n const renderedContent = useMemo(() => {\n if (textValue === null || textValue === undefined) {\n return null;\n }\n\n // Add markdown prefix based on usageHint (matches Lit behavior)\n let markdownText = textValue;\n switch (usageHint) {\n case \"h1\":\n markdownText = `# ${markdownText}`;\n break;\n case \"h2\":\n markdownText = `## ${markdownText}`;\n break;\n case \"h3\":\n markdownText = `### ${markdownText}`;\n break;\n case \"h4\":\n markdownText = `#### ${markdownText}`;\n break;\n case \"h5\":\n markdownText = `##### ${markdownText}`;\n break;\n case \"caption\":\n markdownText = `*${markdownText}*`;\n break;\n default:\n break; // Body - no prefix\n }\n\n const rawHtml = markdownRenderer.render(markdownText);\n const themedHtml = applyMarkdownTheme(rawHtml, theme.markdown);\n return { __html: themedHtml };\n }, [textValue, theme.markdown, usageHint]);\n\n if (!renderedContent) {\n return null;\n }\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div className=\"a2ui-text\" style={hostStyle}>\n <section\n className={classMapToString(classes)}\n style={additionalStyles}\n dangerouslySetInnerHTML={renderedContent}\n />\n </div>\n );\n});\n\nexport default Text;\n","import { memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport {\n classMapToString,\n stylesToObject,\n mergeClassMaps,\n} from \"../../lib/utils\";\n\ntype UsageHint =\n | \"icon\"\n | \"avatar\"\n | \"smallFeature\"\n | \"mediumFeature\"\n | \"largeFeature\"\n | \"header\";\ntype FitMode = \"contain\" | \"cover\" | \"fill\" | \"none\" | \"scale-down\";\n\n/**\n * Image component - renders an image from a URL with optional sizing and fit modes.\n *\n * Supports usageHint values: icon, avatar, smallFeature, mediumFeature, largeFeature, header\n * Supports fit values: contain, cover, fill, none, scale-down (maps to object-fit via CSS variable)\n */\nexport const Image = memo(function Image({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.ImageNode>) {\n const { theme, resolveString } = useA2UIComponent(node, surfaceId);\n const props = node.properties;\n\n const rawUrl = resolveString(props.url);\n // Rewrite known-dead placeholder services to working alternatives\n const url = rawUrl?.replace(\"//via.placeholder.com/\", \"//placehold.co/\");\n const usageHint = props.usageHint as UsageHint | undefined;\n const fit = (props.fit as FitMode) ?? \"fill\";\n\n // Get merged classes for section (matches Lit's Styles.merge)\n const classes = mergeClassMaps(\n theme.components.Image.all,\n usageHint ? theme.components.Image[usageHint] : {},\n );\n\n // Build style object with object-fit as CSS variable (matches Lit)\n const style: React.CSSProperties = {\n ...stylesToObject(theme.additionalStyles?.Image),\n \"--object-fit\": fit,\n } as React.CSSProperties;\n\n if (!url) {\n return null;\n }\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div className=\"a2ui-image\" style={hostStyle}>\n <section className={classMapToString(classes)} style={style}>\n <img src={url} alt=\"\" />\n </section>\n </div>\n );\n});\n\nexport default Image;\n","import { memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\n\n/**\n * Convert camelCase to snake_case for Material Symbols font.\n * e.g., \"shoppingCart\" -> \"shopping_cart\"\n * This matches the Lit renderer's approach.\n */\nfunction toSnakeCase(str: string): string {\n return str.replace(/([A-Z])/g, \"_$1\").toLowerCase();\n}\n\n/**\n * Icon component - renders an icon using Material Symbols Outlined font.\n *\n * This matches the Lit renderer's approach using the g-icon class with\n * Material Symbols Outlined font.\n *\n * @example Add Material Symbols font to your HTML:\n * ```html\n * <link href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined\" rel=\"stylesheet\">\n * ```\n */\nexport const Icon = memo(function Icon({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.IconNode>) {\n const { theme, resolveString } = useA2UIComponent(node, surfaceId);\n const props = node.properties;\n\n const iconName = resolveString(props.name);\n\n if (!iconName) {\n return null;\n }\n\n // Convert camelCase to snake_case for Material Symbols\n const snakeCaseName = toSnakeCase(iconName);\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div className=\"a2ui-icon\" style={hostStyle}>\n <section\n className={classMapToString(theme.components.Icon)}\n style={stylesToObject(theme.additionalStyles?.Icon)}\n >\n <span className=\"g-icon\">{snakeCaseName}</span>\n </section>\n </div>\n );\n});\n\nexport default Icon;\n","import { memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\n\n/**\n * Divider component - renders a visual separator line.\n *\n * Structure mirrors Lit's Divider component:\n * <div class=\"a2ui-divider\"> ← :host equivalent\n * <hr class=\"...\"> ← internal element\n * </div>\n */\nexport const Divider = memo(function Divider({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.DividerNode>) {\n const { theme } = useA2UIComponent(node, surfaceId);\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div className=\"a2ui-divider\" style={hostStyle}>\n <hr\n className={classMapToString(theme.components.Divider)}\n style={stylesToObject(theme.additionalStyles?.Divider)}\n />\n </div>\n );\n});\n\nexport default Divider;\n","import { memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\n\n/**\n * Check if a URL is a YouTube URL and extract the video ID.\n */\nfunction getYouTubeVideoId(url: string): string | null {\n const patterns = [\n /(?:youtube\\.com\\/watch\\?v=|youtu\\.be\\/|youtube\\.com\\/embed\\/)([^&\\s?]+)/,\n ];\n for (const pattern of patterns) {\n const match = url.match(pattern);\n if (match && match.length > 1) {\n // Non-null assertion is safe here since we checked match.length > 1\n\n return match[1]!;\n }\n }\n return null;\n}\n\n/**\n * Video component - renders a video player.\n *\n * Supports regular video URLs and YouTube URLs (renders as embedded iframe).\n */\nexport const Video = memo(function Video({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.VideoNode>) {\n const { theme, resolveString } = useA2UIComponent(node, surfaceId);\n const props = node.properties;\n\n const url = resolveString(props.url);\n\n if (!url) {\n return null;\n }\n\n const youtubeId = getYouTubeVideoId(url);\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div className=\"a2ui-video\" style={hostStyle}>\n <section\n className={classMapToString(theme.components.Video)}\n style={stylesToObject(theme.additionalStyles?.Video)}\n >\n {youtubeId ? (\n <iframe\n src={`https://www.youtube.com/embed/${youtubeId}`}\n title=\"YouTube video player\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n allowFullScreen\n style={{ border: \"none\", width: \"100%\", aspectRatio: \"16/9\" }}\n />\n ) : (\n <video src={url} controls />\n )}\n </section>\n </div>\n );\n});\n\nexport default Video;\n","import { memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\n\n/**\n * AudioPlayer component - renders an audio player with optional description.\n */\nexport const AudioPlayer = memo(function AudioPlayer({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.AudioPlayerNode>) {\n const { theme, resolveString } = useA2UIComponent(node, surfaceId);\n const props = node.properties;\n\n const url = resolveString(props.url);\n const description = resolveString(props.description ?? null);\n\n if (!url) {\n return null;\n }\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div className=\"a2ui-audio\" style={hostStyle}>\n <section\n className={classMapToString(theme.components.AudioPlayer)}\n style={stylesToObject(theme.additionalStyles?.AudioPlayer)}\n >\n {description && <p>{description}</p>}\n <audio src={url} controls />\n </section>\n </div>\n );\n});\n\nexport default AudioPlayer;\n","import { memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\nimport { ComponentNode } from \"../../core/ComponentNode\";\n\n/**\n * Row component - arranges children horizontally using flexbox.\n *\n * Supports distribution (justify-content) and alignment (align-items) properties.\n */\nexport const Row = memo(function Row({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.RowNode>) {\n const { theme } = useA2UIComponent(node, surfaceId);\n const props = node.properties;\n\n // Match Lit's default values\n const alignment = props.alignment ?? \"stretch\";\n const distribution = props.distribution ?? \"start\";\n\n const children = Array.isArray(props.children) ? props.children : [];\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div\n className=\"a2ui-row\"\n data-alignment={alignment}\n data-distribution={distribution}\n style={hostStyle}\n >\n <section\n className={classMapToString(theme.components.Row)}\n style={stylesToObject(theme.additionalStyles?.Row)}\n >\n {children.map((child, index) => {\n const childId =\n typeof child === \"object\" && child !== null && \"id\" in child\n ? (child as Types.AnyComponentNode).id\n : `child-${index}`;\n const childNode =\n typeof child === \"object\" && child !== null && \"type\" in child\n ? (child as Types.AnyComponentNode)\n : null;\n return (\n <ComponentNode\n key={childId}\n node={childNode}\n surfaceId={surfaceId}\n />\n );\n })}\n </section>\n </div>\n );\n});\n\nexport default Row;\n","import { memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\nimport { ComponentNode } from \"../../core/ComponentNode\";\n\n/**\n * Column component - arranges children vertically using flexbox.\n *\n * Supports distribution (justify-content) and alignment (align-items) properties.\n */\nexport const Column = memo(function Column({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.ColumnNode>) {\n const { theme } = useA2UIComponent(node, surfaceId);\n const props = node.properties;\n\n // Match Lit's default values\n const alignment = props.alignment ?? \"stretch\";\n const distribution = props.distribution ?? \"start\";\n\n const children = Array.isArray(props.children) ? props.children : [];\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div\n className=\"a2ui-column\"\n data-alignment={alignment}\n data-distribution={distribution}\n style={hostStyle}\n >\n <section\n className={classMapToString(theme.components.Column)}\n style={stylesToObject(theme.additionalStyles?.Column)}\n >\n {children.map((child, index) => {\n const childId =\n typeof child === \"object\" && child !== null && \"id\" in child\n ? (child as Types.AnyComponentNode).id\n : `child-${index}`;\n const childNode =\n typeof child === \"object\" && child !== null && \"type\" in child\n ? (child as Types.AnyComponentNode)\n : null;\n return (\n <ComponentNode\n key={childId}\n node={childNode}\n surfaceId={surfaceId}\n />\n );\n })}\n </section>\n </div>\n );\n});\n\nexport default Column;\n","import { memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\nimport { ComponentNode } from \"../../core/ComponentNode\";\n\n/**\n * List component - renders a scrollable list of items.\n *\n * Supports direction (vertical/horizontal) properties.\n */\nexport const List = memo(function List({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.ListNode>) {\n const { theme } = useA2UIComponent(node, surfaceId);\n const props = node.properties;\n\n // Match Lit's default value\n const direction = props.direction ?? \"vertical\";\n\n const children = Array.isArray(props.children) ? props.children : [];\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div className=\"a2ui-list\" data-direction={direction} style={hostStyle}>\n <section\n className={classMapToString(theme.components.List)}\n style={stylesToObject(theme.additionalStyles?.List)}\n >\n {children.map((child, index) => {\n const childId =\n typeof child === \"object\" && child !== null && \"id\" in child\n ? (child as Types.AnyComponentNode).id\n : `child-${index}`;\n const childNode =\n typeof child === \"object\" && child !== null && \"type\" in child\n ? (child as Types.AnyComponentNode)\n : null;\n return (\n <ComponentNode\n key={childId}\n node={childNode}\n surfaceId={surfaceId}\n />\n );\n })}\n </section>\n </div>\n );\n});\n\nexport default List;\n","import { memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\nimport { ComponentNode } from \"../../core/ComponentNode\";\n\n/**\n * Card component - a container that visually groups content.\n *\n * Structure mirrors Lit's Card component:\n * <div class=\"a2ui-card\"> ← :host equivalent\n * <section class=\"...\"> ← theme classes (border, padding, background)\n * {children} ← ::slotted(*) equivalent\n * </section>\n * </div>\n *\n * All styles come from componentSpecificStyles CSS, no inline styles needed.\n */\nexport const Card = memo(function Card({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.CardNode>) {\n const { theme } = useA2UIComponent(node, surfaceId);\n const props = node.properties;\n\n // Card can have either a single child or multiple children\n const rawChildren = props.children ?? (props.child ? [props.child] : []);\n const children = Array.isArray(rawChildren) ? rawChildren : [];\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div className=\"a2ui-card\" style={hostStyle}>\n <section\n className={classMapToString(theme.components.Card)}\n style={stylesToObject(theme.additionalStyles?.Card)}\n >\n {children.map((child, index) => {\n const childId =\n typeof child === \"object\" && child !== null && \"id\" in child\n ? (child as Types.AnyComponentNode).id\n : `child-${index}`;\n const childNode =\n typeof child === \"object\" && child !== null && \"type\" in child\n ? (child as Types.AnyComponentNode)\n : null;\n return (\n <ComponentNode\n key={childId}\n node={childNode}\n surfaceId={surfaceId}\n />\n );\n })}\n </section>\n </div>\n );\n});\n\nexport default Card;\n","import { useState, memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport {\n classMapToString,\n stylesToObject,\n mergeClassMaps,\n} from \"../../lib/utils\";\nimport { ComponentNode } from \"../../core/ComponentNode\";\n\n/**\n * Tabs component - displays content in switchable tabs.\n */\nexport const Tabs = memo(function Tabs({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.TabsNode>) {\n const { theme, resolveString } = useA2UIComponent(node, surfaceId);\n const props = node.properties;\n\n const [selectedIndex, setSelectedIndex] = useState(0);\n\n const tabItems = props.tabItems ?? [];\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div className=\"a2ui-tabs\" style={hostStyle}>\n <section\n className={classMapToString(theme.components.Tabs.container)}\n style={stylesToObject(theme.additionalStyles?.Tabs)}\n >\n {/* Tab buttons - uses Tabs.element for the container */}\n <div\n id=\"buttons\"\n className={classMapToString(theme.components.Tabs.element)}\n >\n {tabItems.map((tab, index) => {\n const title = resolveString(tab.title);\n const isSelected = index === selectedIndex;\n\n // Lit merges all + selected classes when selected\n const classes = isSelected\n ? mergeClassMaps(\n theme.components.Tabs.controls.all,\n theme.components.Tabs.controls.selected,\n )\n : theme.components.Tabs.controls.all;\n\n return (\n <button\n key={index}\n disabled={isSelected}\n className={classMapToString(classes)}\n onClick={() => setSelectedIndex(index)}\n >\n {title}\n </button>\n );\n })}\n </div>\n\n {/* Tab content */}\n {tabItems[selectedIndex] && (\n <ComponentNode\n node={tabItems[selectedIndex].child}\n surfaceId={surfaceId}\n />\n )}\n </section>\n </div>\n );\n});\n\nexport default Tabs;\n","import { useState, useCallback, useRef, useEffect, memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\nimport { ComponentNode } from \"../../core/ComponentNode\";\n\n/**\n * Modal component - displays content in a dialog overlay.\n *\n * Matches Lit's rendering approach:\n * - When closed: renders section with entry point child\n * - When open: renders dialog with content child (entry point is replaced)\n *\n * The dialog is rendered in place (no portal) so it stays inside .a2ui-surface\n * and CSS selectors work correctly. showModal() handles the top-layer overlay.\n */\nexport const Modal = memo(function Modal({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.ModalNode>) {\n const { theme } = useA2UIComponent(node, surfaceId);\n const props = node.properties;\n\n const [isOpen, setIsOpen] = useState(false);\n const dialogRef = useRef<HTMLDialogElement>(null);\n\n const openModal = useCallback(() => {\n setIsOpen(true);\n }, []);\n\n const closeModal = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n // Show dialog when isOpen becomes true, and sync state when dialog closes (e.g., via Escape)\n useEffect(() => {\n const dialog = dialogRef.current;\n if (!dialog) return;\n\n if (isOpen && !dialog.open) {\n dialog.showModal();\n }\n\n // Listen for native close event (triggered by Escape key)\n const handleClose = () => {\n setIsOpen(false);\n };\n dialog.addEventListener(\"close\", handleClose);\n return () => dialog.removeEventListener(\"close\", handleClose);\n }, [isOpen]);\n\n // Handle backdrop clicks (only close if clicking directly on dialog, not its content)\n const handleBackdropClick = useCallback(\n (e: React.MouseEvent<HTMLDialogElement>) => {\n if (e.target === e.currentTarget) {\n closeModal();\n }\n },\n [closeModal],\n );\n\n // Handle Escape key (for jsdom test compatibility - real browsers use native dialog behavior)\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLDialogElement>) => {\n if (e.key === \"Escape\") {\n closeModal();\n }\n },\n [closeModal],\n );\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n // Match Lit's render approach: closed shows section with entry, open shows dialog\n if (!isOpen) {\n return (\n <div className=\"a2ui-modal\" style={hostStyle}>\n <section onClick={openModal} style={{ cursor: \"pointer\" }}>\n <ComponentNode node={props.entryPointChild} surfaceId={surfaceId} />\n </section>\n </div>\n );\n }\n\n return (\n <div className=\"a2ui-modal\" style={hostStyle}>\n <dialog\n ref={dialogRef}\n className={classMapToString(theme.components.Modal.backdrop)}\n onClick={handleBackdropClick}\n onKeyDown={handleKeyDown}\n >\n <section\n className={classMapToString(theme.components.Modal.element)}\n style={stylesToObject(theme.additionalStyles?.Modal)}\n >\n <div id=\"controls\">\n <button onClick={closeModal} aria-label=\"Close modal\">\n <span className=\"g-icon\">close</span>\n </button>\n </div>\n <ComponentNode node={props.contentChild} surfaceId={surfaceId} />\n </section>\n </dialog>\n </div>\n );\n});\n\nexport default Modal;\n","import { useCallback, memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\nimport { ComponentNode } from \"../../core/ComponentNode\";\n\n/**\n * Button component - a clickable element that triggers an action.\n *\n * Contains a child component (usually Text or Icon) and dispatches\n * a user action when clicked.\n */\nexport const Button = memo(function Button({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.ButtonNode>) {\n const { theme, sendAction } = useA2UIComponent(node, surfaceId);\n const props = node.properties;\n\n const handleClick = useCallback(() => {\n if (props.action) {\n sendAction(props.action);\n }\n }, [props.action, sendAction]);\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div className=\"a2ui-button\" style={hostStyle}>\n <button\n className={classMapToString(theme.components.Button)}\n style={stylesToObject(theme.additionalStyles?.Button)}\n onClick={handleClick}\n >\n <ComponentNode node={props.child} surfaceId={surfaceId} />\n </button>\n </div>\n );\n});\n\nexport default Button;\n","import { useState, useCallback, useEffect, useId, memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\n\ntype TextFieldType = \"shortText\" | \"longText\" | \"number\" | \"date\";\n\n/**\n * TextField component - an input field for text entry.\n *\n * Supports various input types and two-way data binding.\n */\nexport const TextField = memo(function TextField({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.TextFieldNode>) {\n const { theme, resolveString, setValue, getValue } = useA2UIComponent(\n node,\n surfaceId,\n );\n const props = node.properties;\n const id = useId();\n\n const label = resolveString(props.label);\n const textPath = props.text?.path;\n const initialValue = resolveString(props.text) ?? \"\";\n const fieldType = props.type as TextFieldType | undefined;\n const validationRegexp = props.validationRegexp;\n\n const [value, setLocalValue] = useState(initialValue);\n // Validation state tracked for potential future use (e.g., error styling)\n const [_isValid, setIsValid] = useState(true);\n\n // Sync with external data model changes\n useEffect(() => {\n if (textPath) {\n const externalValue = getValue(textPath);\n if (externalValue !== null && String(externalValue) !== value) {\n setLocalValue(String(externalValue));\n }\n }\n }, [textPath, getValue]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n const newValue = e.target.value;\n setLocalValue(newValue);\n\n // Validate if pattern provided\n if (validationRegexp) {\n setIsValid(new RegExp(validationRegexp).test(newValue));\n }\n\n // Two-way binding: update data model\n if (textPath) {\n setValue(textPath, newValue);\n }\n },\n [validationRegexp, textPath, setValue],\n );\n\n const inputType =\n fieldType === \"number\" ? \"number\" : fieldType === \"date\" ? \"date\" : \"text\";\n const isTextArea = fieldType === \"longText\";\n\n // Structure mirrors Lit's TextField component:\n // <div class=\"a2ui-textfield\"> ← :host equivalent\n // <section class=\"...\"> ← container with theme classes\n // <label>...</label>\n // <input>...</input>\n // </section>\n // </div>\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div className=\"a2ui-textfield\" style={hostStyle}>\n <section\n className={classMapToString(theme.components.TextField.container)}\n >\n {label && (\n <label\n htmlFor={id}\n className={classMapToString(theme.components.TextField.label)}\n >\n {label}\n </label>\n )}\n {isTextArea ? (\n <textarea\n id={id}\n value={value}\n onChange={handleChange}\n placeholder=\"Please enter a value\"\n className={classMapToString(theme.components.TextField.element)}\n style={stylesToObject(theme.additionalStyles?.TextField)}\n />\n ) : (\n <input\n type={inputType}\n id={id}\n value={value}\n onChange={handleChange}\n placeholder=\"Please enter a value\"\n className={classMapToString(theme.components.TextField.element)}\n style={stylesToObject(theme.additionalStyles?.TextField)}\n />\n )}\n </section>\n </div>\n );\n});\n\nexport default TextField;\n","import { useState, useCallback, useEffect, useId, memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\n\n/**\n * CheckBox component - a boolean toggle with a label.\n *\n * Supports two-way data binding for the checked state.\n */\nexport const CheckBox = memo(function CheckBox({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.CheckboxNode>) {\n const { theme, resolveString, resolveBoolean, setValue, getValue } =\n useA2UIComponent(node, surfaceId);\n const props = node.properties;\n const id = useId();\n\n const label = resolveString(props.label);\n const valuePath = props.value?.path;\n const initialChecked = resolveBoolean(props.value) ?? false;\n\n const [checked, setChecked] = useState(initialChecked);\n\n // Sync with external data model changes (path binding)\n useEffect(() => {\n if (valuePath) {\n const externalValue = getValue(valuePath);\n if (externalValue !== null && Boolean(externalValue) !== checked) {\n setChecked(Boolean(externalValue));\n }\n }\n }, [valuePath, getValue]); // eslint-disable-line react-hooks/exhaustive-deps\n\n // Sync when literal value changes from props (server-driven updates via surfaceUpdate)\n useEffect(() => {\n if (props.value?.literalBoolean !== undefined) {\n setChecked(props.value.literalBoolean);\n }\n }, [props.value?.literalBoolean]);\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.checked;\n setChecked(newValue);\n\n // Two-way binding: update data model\n if (valuePath) {\n setValue(valuePath, newValue);\n }\n },\n [valuePath, setValue],\n );\n\n // Structure mirrors Lit's CheckBox component:\n // <div class=\"a2ui-checkbox\"> ← :host equivalent\n // <section class=\"...\"> ← internal element\n // <input>...</input>\n // <label>...</label>\n // </section>\n // </div>\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div className=\"a2ui-checkbox\" style={hostStyle}>\n <section\n className={classMapToString(theme.components.CheckBox.container)}\n style={stylesToObject(theme.additionalStyles?.CheckBox)}\n >\n <input\n type=\"checkbox\"\n id={id}\n checked={checked}\n onChange={handleChange}\n className={classMapToString(theme.components.CheckBox.element)}\n />\n {label && (\n <label\n htmlFor={id}\n className={classMapToString(theme.components.CheckBox.label)}\n >\n {label}\n </label>\n )}\n </section>\n </div>\n );\n});\n\nexport default CheckBox;\n","import { useState, useCallback, useEffect, useId, memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\n\n/**\n * Slider component - a numeric value selector with a range.\n *\n * Supports two-way data binding for the value.\n */\nexport const Slider = memo(function Slider({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.SliderNode>) {\n const { theme, resolveNumber, resolveString, setValue, getValue } =\n useA2UIComponent(node, surfaceId);\n const props = node.properties;\n const id = useId();\n\n const valuePath = props.value?.path;\n const initialValue = resolveNumber(props.value) ?? 0;\n // Match Lit's default values (minValue=0, maxValue=0)\n const minValue = props.minValue ?? 0;\n const maxValue = props.maxValue ?? 0;\n\n const [value, setLocalValue] = useState(initialValue);\n\n // Sync with external data model changes (path binding)\n useEffect(() => {\n if (valuePath) {\n const externalValue = getValue(valuePath);\n if (externalValue !== null && Number(externalValue) !== value) {\n setLocalValue(Number(externalValue));\n }\n }\n }, [valuePath, getValue]); // eslint-disable-line react-hooks/exhaustive-deps\n\n // Sync when literal value changes from props (server-driven updates via surfaceUpdate)\n useEffect(() => {\n if (props.value?.literalNumber !== undefined) {\n setLocalValue(props.value.literalNumber);\n }\n }, [props.value?.literalNumber]);\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = Number(e.target.value);\n setLocalValue(newValue);\n\n // Two-way binding: update data model\n if (valuePath) {\n setValue(valuePath, newValue);\n }\n },\n [valuePath, setValue],\n );\n\n // Access label from props if it exists (Lit component supports it but type doesn't define it)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const labelValue = (props as any).label;\n const label = labelValue ? resolveString(labelValue) : \"\";\n\n // Structure mirrors Lit's Slider component:\n // <div class=\"a2ui-slider\"> ← :host equivalent\n // <section class=\"...\"> ← internal element\n // <label>...</label>\n // <input>...</input>\n // <span>value</span>\n // </section>\n // </div>\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div className=\"a2ui-slider\" style={hostStyle}>\n <section className={classMapToString(theme.components.Slider.container)}>\n <label\n htmlFor={id}\n className={classMapToString(theme.components.Slider.label)}\n >\n {label}\n </label>\n <input\n type=\"range\"\n id={id}\n name=\"data\"\n value={value}\n min={minValue}\n max={maxValue}\n onChange={handleChange}\n className={classMapToString(theme.components.Slider.element)}\n style={stylesToObject(theme.additionalStyles?.Slider)}\n />\n <span className={classMapToString(theme.components.Slider.label)}>\n {value}\n </span>\n </section>\n </div>\n );\n});\n\nexport default Slider;\n","import { useState, useCallback, useEffect, useId, memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\n\n/**\n * DateTimeInput component - a date and/or time picker.\n *\n * Supports enabling date, time, or both. Uses native HTML5 date/time inputs.\n */\nexport const DateTimeInput = memo(function DateTimeInput({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.DateTimeInputNode>) {\n const { theme, resolveString, setValue, getValue } = useA2UIComponent(\n node,\n surfaceId,\n );\n const props = node.properties;\n const id = useId();\n\n const valuePath = props.value?.path;\n const initialValue = resolveString(props.value) ?? \"\";\n const enableDate = props.enableDate ?? true;\n const enableTime = props.enableTime ?? false;\n\n const [value, setLocalValue] = useState(initialValue);\n\n // Sync with external data model changes\n useEffect(() => {\n if (valuePath) {\n const externalValue = getValue(valuePath);\n if (externalValue !== null && String(externalValue) !== value) {\n setLocalValue(String(externalValue));\n }\n }\n }, [valuePath, getValue]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n setLocalValue(newValue);\n\n // Two-way binding: update data model\n if (valuePath) {\n setValue(valuePath, newValue);\n }\n },\n [valuePath, setValue],\n );\n\n // Determine input type based on enableDate and enableTime\n let inputType: \"date\" | \"time\" | \"datetime-local\" = \"date\";\n if (enableDate && enableTime) {\n inputType = \"datetime-local\";\n } else if (enableTime && !enableDate) {\n inputType = \"time\";\n }\n\n // Get placeholder text to match Lit renderer\n const getPlaceholderText = () => {\n if (enableDate && enableTime) {\n return \"Date & Time\";\n } else if (enableTime) {\n return \"Time\";\n }\n return \"Date\";\n };\n\n // Structure mirrors Lit's DateTimeInput component:\n // <div class=\"a2ui-datetime-input\"> ← :host equivalent\n // <section class=\"...\"> ← container theme classes\n // <label> ← label\n // <input> ← input element\n // </section>\n // </div>\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n return (\n <div className=\"a2ui-datetime-input\" style={hostStyle}>\n <section\n className={classMapToString(theme.components.DateTimeInput.container)}\n >\n <label\n htmlFor={id}\n className={classMapToString(theme.components.DateTimeInput.label)}\n >\n {getPlaceholderText()}\n </label>\n <input\n type={inputType}\n id={id}\n value={value}\n onChange={handleChange}\n className={classMapToString(theme.components.DateTimeInput.element)}\n style={stylesToObject(theme.additionalStyles?.DateTimeInput)}\n />\n </section>\n </div>\n );\n});\n\nexport default DateTimeInput;\n","import { useCallback, useId, memo } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport type { A2UIComponentProps } from \"../../types\";\nimport { useA2UIComponent } from \"../../hooks/useA2UIComponent\";\nimport { classMapToString, stylesToObject } from \"../../lib/utils\";\n\n/**\n * MultipleChoice component - a selection component using a dropdown.\n *\n * Renders a <select> element with options, matching the Lit renderer's behavior.\n * Supports two-way data binding for the selected value.\n */\nexport const MultipleChoice = memo(function MultipleChoice({\n node,\n surfaceId,\n}: A2UIComponentProps<Types.MultipleChoiceNode>) {\n const { theme, resolveString, setValue } = useA2UIComponent(node, surfaceId);\n const props = node.properties;\n const id = useId();\n\n const options =\n (props.options as {\n label: { literalString?: string; path?: string };\n value: string;\n }[]) ?? [];\n const selectionsPath = props.selections?.path;\n\n // Access description from props (Lit component supports it)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const description =\n resolveString((props as any).description) ?? \"Select an item\";\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLSelectElement>) => {\n // Two-way binding: update data model with array (matches Lit behavior)\n if (selectionsPath) {\n setValue(selectionsPath, [e.target.value]);\n }\n },\n [selectionsPath, setValue],\n );\n\n // Apply --weight CSS variable on root div (:host equivalent) for flex layouts\n const hostStyle: React.CSSProperties =\n node.weight !== undefined\n ? ({ \"--weight\": node.weight } as React.CSSProperties)\n : {};\n\n // Structure mirrors Lit's MultipleChoice component:\n // <div class=\"a2ui-multiplechoice\"> ← :host equivalent\n // <section class=\"...\"> ← container theme classes\n // <label>...</label> ← description label\n // <select>...</select> ← dropdown element\n // </section>\n // </div>\n return (\n <div className=\"a2ui-multiplechoice\" style={hostStyle}>\n <section\n className={classMapToString(theme.components.MultipleChoice.container)}\n >\n <label\n htmlFor={id}\n className={classMapToString(theme.components.MultipleChoice.label)}\n >\n {description}\n </label>\n <select\n name=\"data\"\n id={id}\n className={classMapToString(theme.components.MultipleChoice.element)}\n style={stylesToObject(theme.additionalStyles?.MultipleChoice)}\n onChange={handleChange}\n >\n {options.map((option) => {\n const label = resolveString(option.label);\n return (\n <option key={option.value} value={option.value}>\n {label}\n </option>\n );\n })}\n </select>\n </section>\n </div>\n );\n});\n\nexport default MultipleChoice;\n","import { ComponentRegistry } from \"./ComponentRegistry\";\n\n// Content components\nimport { Text } from \"../components/content/Text\";\nimport { Image } from \"../components/content/Image\";\nimport { Icon } from \"../components/content/Icon\";\nimport { Divider } from \"../components/content/Divider\";\nimport { Video } from \"../components/content/Video\";\nimport { AudioPlayer } from \"../components/content/AudioPlayer\";\n\n// Layout components\nimport { Row } from \"../components/layout/Row\";\nimport { Column } from \"../components/layout/Column\";\nimport { List } from \"../components/layout/List\";\nimport { Card } from \"../components/layout/Card\";\nimport { Tabs } from \"../components/layout/Tabs\";\nimport { Modal } from \"../components/layout/Modal\";\n\n// Interactive components\nimport { Button } from \"../components/interactive/Button\";\nimport { TextField } from \"../components/interactive/TextField\";\nimport { CheckBox } from \"../components/interactive/CheckBox\";\nimport { Slider } from \"../components/interactive/Slider\";\nimport { DateTimeInput } from \"../components/interactive/DateTimeInput\";\nimport { MultipleChoice } from \"../components/interactive/MultipleChoice\";\n\n/**\n * Registers all standard A2UI components in the registry.\n *\n * @param registry - The component registry to populate\n */\nexport function registerDefaultCatalog(registry: ComponentRegistry): void {\n // Content components (small, load immediately)\n registry.register(\"Text\", { component: Text });\n registry.register(\"Image\", { component: Image });\n registry.register(\"Icon\", { component: Icon });\n registry.register(\"Divider\", { component: Divider });\n registry.register(\"Video\", { component: Video });\n registry.register(\"AudioPlayer\", { component: AudioPlayer });\n\n // Layout components\n registry.register(\"Row\", { component: Row });\n registry.register(\"Column\", { component: Column });\n registry.register(\"List\", { component: List });\n registry.register(\"Card\", { component: Card });\n\n // Additional layout components\n registry.register(\"Tabs\", { component: Tabs });\n registry.register(\"Modal\", { component: Modal });\n\n // Interactive components\n registry.register(\"Button\", { component: Button });\n registry.register(\"TextField\", { component: TextField });\n registry.register(\"CheckBox\", { component: CheckBox });\n registry.register(\"Slider\", { component: Slider });\n registry.register(\"DateTimeInput\", { component: DateTimeInput });\n registry.register(\"MultipleChoice\", { component: MultipleChoice });\n}\n\n/**\n * Initialize the default catalog in the singleton registry.\n * Call this once at app startup.\n */\nexport function initializeDefaultCatalog(): void {\n registerDefaultCatalog(ComponentRegistry.getInstance());\n}\n","/**\n * Browser default reset for A2UI surfaces.\n *\n * The React renderer uses Light DOM, which means host-app CSS resets\n * (e.g. Tailwind preflight, normalize.css) can strip browser defaults\n * like heading margins, list styles, and form element appearance from\n * elements inside the renderer.\n *\n * The Lit renderer avoids this because Shadow DOM isolates its elements\n * from external stylesheets.\n *\n * This reset restores browser defaults inside `.a2ui-surface` by using\n * `all: revert` in a CSS @layer. Layered styles have the lowest author\n * priority, so every other A2UI style (utility classes, component styles,\n * theme classes, inline styles) automatically overrides the reset.\n */\nexport const resetStyles: string = `\n@layer a2ui-reset {\n :where(.a2ui-surface) :where(*) {\n all: revert;\n }\n}\n`;\n","import { Styles } from \"@a2ui/lit/0.8\";\nimport { resetStyles } from \"./reset\";\n\n/**\n * Structural CSS styles from the Lit renderer, converted for global DOM use.\n * These styles define all the utility classes (layout-*, typography-*, color-*, etc.)\n * Converts :host selectors to .a2ui-surface for scoped use outside Shadow DOM.\n */\nexport const structuralStyles: string = Styles.structuralStyles.replace(\n /:host\\s*\\{/g,\n \".a2ui-surface {\",\n);\n\n/**\n * Component-specific styles that replicate Lit's Shadow DOM scoped CSS.\n *\n * Each Lit component has `static styles` with :host, element selectors, and ::slotted().\n * Since React uses Light DOM, we transform these to global CSS scoped under .a2ui-surface.\n *\n * Transformation rules:\n * :host → .a2ui-surface .a2ui-{component}\n * section → .a2ui-surface .a2ui-{component} section\n * ::slotted(*) → .a2ui-surface .a2ui-{component} section > *\n */\nexport const componentSpecificStyles: string = `\n/* =========================================================================\n * Card (from Lit card.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; flex: var(--weight); min-height: 0; overflow: auto; } */\n.a2ui-surface .a2ui-card {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n}\n\n/* section { height: 100%; width: 100%; min-height: 0; overflow: auto; } */\n/* Use > to target only Card's direct section, not nested sections (e.g., TextField's section) */\n.a2ui-surface .a2ui-card > section {\n height: 100%;\n width: 100%;\n min-height: 0;\n overflow: auto;\n}\n\n/* section ::slotted(*) { height: 100%; width: 100%; } */\n/* Use > section > to only target Card's slotted children, not deeply nested elements */\n.a2ui-surface .a2ui-card > section > * {\n height: 100%;\n width: 100%;\n}\n\n/* =========================================================================\n * Divider (from Lit divider.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; min-height: 0; overflow: auto; } */\n.a2ui-surface .a2ui-divider {\n display: block;\n min-height: 0;\n overflow: auto;\n}\n\n/* hr { height: 1px; background: #ccc; border: none; } */\n/* Use :where() for low specificity (0,0,1) so theme utility classes can override */\n/* Browser default margins apply (margin-block: 0.5em, margin-inline: auto) */\n:where(.a2ui-surface .a2ui-divider) hr {\n height: 1px;\n background: #ccc;\n border: none;\n}\n\n/* =========================================================================\n * Text (from Lit text.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; flex: var(--weight); } */\n.a2ui-surface .a2ui-text {\n display: block;\n flex: var(--weight);\n}\n\n/* h1, h2, h3, h4, h5 { line-height: inherit; font: inherit; } */\n/* Use :where() to match Lit's low specificity (0,0,0,1 - just element) */\n:where(.a2ui-surface .a2ui-text) h1,\n:where(.a2ui-surface .a2ui-text) h2,\n:where(.a2ui-surface .a2ui-text) h3,\n:where(.a2ui-surface .a2ui-text) h4,\n:where(.a2ui-surface .a2ui-text) h5 {\n line-height: inherit;\n font: inherit;\n}\n\n/* Ensure markdown paragraph margins are reset */\n.a2ui-surface .a2ui-text p {\n margin: 0;\n}\n\n/* =========================================================================\n * TextField (from Lit text-field.ts static styles)\n * ========================================================================= */\n\n/* :host { display: flex; flex: var(--weight); } */\n.a2ui-surface .a2ui-textfield {\n display: flex;\n flex: var(--weight);\n}\n\n/* input { display: block; width: 100%; } */\n:where(.a2ui-surface .a2ui-textfield) input {\n display: block;\n width: 100%;\n}\n\n/* label { display: block; margin-bottom: 4px; } */\n:where(.a2ui-surface .a2ui-textfield) label {\n display: block;\n margin-bottom: 4px;\n}\n\n/* textarea - same styling as input for multiline text fields */\n:where(.a2ui-surface .a2ui-textfield) textarea {\n display: block;\n width: 100%;\n}\n\n/* =========================================================================\n * CheckBox (from Lit checkbox.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; flex: var(--weight); min-height: 0; overflow: auto; } */\n.a2ui-surface .a2ui-checkbox {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n}\n\n/* input { display: block; width: 100%; } */\n:where(.a2ui-surface .a2ui-checkbox) input {\n display: block;\n width: 100%;\n}\n\n/* =========================================================================\n * Slider (from Lit slider.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; flex: var(--weight); } */\n.a2ui-surface .a2ui-slider {\n display: block;\n flex: var(--weight);\n}\n\n/* input { display: block; width: 100%; } */\n:where(.a2ui-surface .a2ui-slider) input {\n display: block;\n width: 100%;\n}\n\n/* =========================================================================\n * Button (from Lit button.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; flex: var(--weight); min-height: 0; } */\n.a2ui-surface .a2ui-button {\n display: block;\n flex: var(--weight);\n min-height: 0;\n}\n\n/* =========================================================================\n * Icon (from Lit icon.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; flex: var(--weight); min-height: 0; overflow: auto; } */\n.a2ui-surface .a2ui-icon {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n}\n\n/* =========================================================================\n * Tabs (from Lit tabs.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; flex: var(--weight); } */\n.a2ui-surface .a2ui-tabs {\n display: block;\n flex: var(--weight);\n}\n\n/* =========================================================================\n * Modal (from Lit modal.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; flex: var(--weight); } */\n.a2ui-surface .a2ui-modal {\n display: block;\n flex: var(--weight);\n}\n\n/* dialog { padding: 0; border: none; background: none; } */\n:where(.a2ui-surface .a2ui-modal) dialog {\n padding: 0;\n border: none;\n background: none;\n}\n\n/* dialog section #controls { display: flex; justify-content: end; margin-bottom: 4px; } */\n.a2ui-surface .a2ui-modal dialog section #controls {\n display: flex;\n justify-content: end;\n margin-bottom: 4px;\n}\n\n/* dialog section #controls button { padding: 0; background: none; ... } */\n.a2ui-surface .a2ui-modal dialog section #controls button {\n padding: 0;\n background: none;\n width: 20px;\n height: 20px;\n cursor: pointer;\n border: none;\n}\n\n/* =========================================================================\n * Image (from Lit image.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; flex: var(--weight); min-height: 0; overflow: auto; } */\n.a2ui-surface .a2ui-image {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n}\n\n/* img { display: block; width: 100%; height: 100%; object-fit: var(--object-fit, fill); } */\n:where(.a2ui-surface .a2ui-image) img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: var(--object-fit, fill);\n}\n\n/* =========================================================================\n * Video (from Lit video.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; flex: var(--weight); min-height: 0; overflow: auto; } */\n.a2ui-surface .a2ui-video {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n}\n\n/* video { display: block; width: 100%; } */\n:where(.a2ui-surface .a2ui-video) video {\n display: block;\n width: 100%;\n}\n\n/* =========================================================================\n * AudioPlayer (from Lit audio.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; flex: var(--weight); min-height: 0; overflow: auto; } */\n.a2ui-surface .a2ui-audio {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n}\n\n/* audio { display: block; width: 100%; } */\n:where(.a2ui-surface .a2ui-audio) audio {\n display: block;\n width: 100%;\n}\n\n/* =========================================================================\n * MultipleChoice (from Lit multiple-choice.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; flex: var(--weight); min-height: 0; overflow: auto; } */\n.a2ui-surface .a2ui-multiplechoice {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n}\n\n/* select { width: 100%; } */\n:where(.a2ui-surface .a2ui-multiplechoice) select {\n width: 100%;\n}\n\n/* =========================================================================\n * Column (from Lit column.ts static styles)\n * ========================================================================= */\n\n/* :host { display: flex; flex: var(--weight); } */\n.a2ui-surface .a2ui-column {\n display: flex;\n flex: var(--weight);\n}\n\n/* section { display: flex; flex-direction: column; min-width: 100%; height: 100%; } */\n.a2ui-surface .a2ui-column > section {\n display: flex;\n flex-direction: column;\n min-width: 100%;\n height: 100%;\n}\n\n/* :host([alignment=\"...\"]) section { align-items: ...; } */\n/* Use > section to only target Column's direct section, not nested sections (e.g., CheckBox's section) */\n.a2ui-surface .a2ui-column[data-alignment=\"start\"] > section { align-items: start; }\n.a2ui-surface .a2ui-column[data-alignment=\"center\"] > section { align-items: center; }\n.a2ui-surface .a2ui-column[data-alignment=\"end\"] > section { align-items: end; }\n.a2ui-surface .a2ui-column[data-alignment=\"stretch\"] > section { align-items: stretch; }\n\n/* :host([distribution=\"...\"]) section { justify-content: ...; } */\n.a2ui-surface .a2ui-column[data-distribution=\"start\"] > section { justify-content: start; }\n.a2ui-surface .a2ui-column[data-distribution=\"center\"] > section { justify-content: center; }\n.a2ui-surface .a2ui-column[data-distribution=\"end\"] > section { justify-content: end; }\n.a2ui-surface .a2ui-column[data-distribution=\"spaceBetween\"] > section { justify-content: space-between; }\n.a2ui-surface .a2ui-column[data-distribution=\"spaceAround\"] > section { justify-content: space-around; }\n.a2ui-surface .a2ui-column[data-distribution=\"spaceEvenly\"] > section { justify-content: space-evenly; }\n\n/* =========================================================================\n * Row (from Lit row.ts static styles)\n * ========================================================================= */\n\n/* :host { display: flex; flex: var(--weight); } */\n.a2ui-surface .a2ui-row {\n display: flex;\n flex: var(--weight);\n}\n\n/* section { display: flex; flex-direction: row; width: 100%; min-height: 100%; } */\n.a2ui-surface .a2ui-row > section {\n display: flex;\n flex-direction: row;\n width: 100%;\n min-height: 100%;\n}\n\n/* :host([alignment=\"...\"]) section { align-items: ...; } */\n/* Use > section to only target Row's direct section, not nested sections */\n.a2ui-surface .a2ui-row[data-alignment=\"start\"] > section { align-items: start; }\n.a2ui-surface .a2ui-row[data-alignment=\"center\"] > section { align-items: center; }\n.a2ui-surface .a2ui-row[data-alignment=\"end\"] > section { align-items: end; }\n.a2ui-surface .a2ui-row[data-alignment=\"stretch\"] > section { align-items: stretch; }\n\n/* :host([distribution=\"...\"]) section { justify-content: ...; } */\n.a2ui-surface .a2ui-row[data-distribution=\"start\"] > section { justify-content: start; }\n.a2ui-surface .a2ui-row[data-distribution=\"center\"] > section { justify-content: center; }\n.a2ui-surface .a2ui-row[data-distribution=\"end\"] > section { justify-content: end; }\n.a2ui-surface .a2ui-row[data-distribution=\"spaceBetween\"] > section { justify-content: space-between; }\n.a2ui-surface .a2ui-row[data-distribution=\"spaceAround\"] > section { justify-content: space-around; }\n.a2ui-surface .a2ui-row[data-distribution=\"spaceEvenly\"] > section { justify-content: space-evenly; }\n\n/* =========================================================================\n * List (from Lit list.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; flex: var(--weight); min-height: 0; overflow: auto; } */\n.a2ui-surface .a2ui-list {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n}\n\n/* :host([direction=\"vertical\"]) section { display: grid; } */\n.a2ui-surface .a2ui-list[data-direction=\"vertical\"] > section {\n display: grid;\n}\n\n/* :host([direction=\"horizontal\"]) section { display: flex; max-width: 100%; overflow-x: scroll; ... } */\n.a2ui-surface .a2ui-list[data-direction=\"horizontal\"] > section {\n display: flex;\n max-width: 100%;\n overflow-x: scroll;\n overflow-y: hidden;\n scrollbar-width: none;\n}\n\n/* :host([direction=\"horizontal\"]) section > ::slotted(*) { flex: 1 0 fit-content; ... } */\n.a2ui-surface .a2ui-list[data-direction=\"horizontal\"] > section > * {\n flex: 1 0 fit-content;\n max-width: min(80%, 400px);\n}\n\n/* =========================================================================\n * DateTimeInput (from Lit datetime-input.ts static styles)\n * ========================================================================= */\n\n/* :host { display: block; flex: var(--weight); min-height: 0; overflow: auto; } */\n.a2ui-surface .a2ui-datetime-input {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n}\n\n/* input { display: block; border-radius: 8px; padding: 8px; border: 1px solid #ccc; width: 100%; } */\n/* Use :where() to match Lit's low specificity (0,0,0,1) so theme utility classes can override */\n:where(.a2ui-surface .a2ui-datetime-input) input {\n display: block;\n border-radius: 8px;\n padding: 8px;\n border: 1px solid #ccc;\n width: 100%;\n}\n\n/* =========================================================================\n * Global box-sizing (matches Lit's * { box-sizing: border-box; } in components)\n * ========================================================================= */\n\n.a2ui-surface *,\n.a2ui-surface *::before,\n.a2ui-surface *::after {\n box-sizing: border-box;\n}\n`;\n\n/**\n * Injects A2UI structural styles into the document head.\n * Includes utility classes (layout-*, typography-*, color-*, etc.) and React-specific overrides.\n * Call this once at application startup.\n *\n * NOTE: CSS variables (--n-*, --p-*, etc.) must be defined by the host application on :root,\n * just like in the Lit renderer. This allows full customization of the color palette.\n *\n * @example\n * ```tsx\n * import { injectStyles } from '@a2ui/react/styles';\n *\n * // In your app entry point:\n * injectStyles();\n * ```\n */\nexport function injectStyles(): void {\n if (typeof document === \"undefined\") {\n return; // SSR safety\n }\n\n const styleId = \"a2ui-structural-styles\";\n\n // Avoid duplicate injection\n if (document.getElementById(styleId)) {\n return;\n }\n\n const styleElement = document.createElement(\"style\");\n styleElement.id = styleId;\n // Include structural (utility classes) and component-specific styles\n // Note: CSS variables (palette) must be defined by the host application on :root,\n // just like in the Lit renderer. This allows full customization.\n styleElement.textContent =\n resetStyles + \"\\n\" + structuralStyles + \"\\n\" + componentSpecificStyles;\n document.head.appendChild(styleElement);\n}\n\n/**\n * Removes injected A2UI styles from the document.\n * Useful for cleanup in tests or when unmounting.\n */\nexport function removeStyles(): void {\n if (typeof document === \"undefined\") {\n return;\n }\n\n const styleElement = document.getElementById(\"a2ui-structural-styles\");\n if (styleElement) {\n styleElement.remove();\n }\n}\n","/*\n Copyright 2025 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\nimport { v0_8 } from \"@a2ui/lit\";\n\n/** Elements */\n\nconst a = {\n \"typography-f-sf\": true,\n \"typography-fs-n\": true,\n \"typography-w-500\": true,\n \"layout-as-n\": true,\n \"layout-dis-iflx\": true,\n \"layout-al-c\": true,\n};\n\nconst audio = {\n \"layout-w-100\": true,\n};\n\nconst body = {\n \"typography-f-s\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-mt-0\": true,\n \"layout-mb-2\": true,\n \"typography-sz-bm\": true,\n \"color-c-n10\": true,\n};\n\nconst button = {\n \"typography-f-sf\": true,\n \"typography-fs-n\": true,\n \"typography-w-500\": true,\n \"layout-pt-3\": true,\n \"layout-pb-3\": true,\n \"layout-pl-5\": true,\n \"layout-pr-5\": true,\n \"layout-mb-1\": true,\n \"border-br-16\": true,\n \"border-bw-0\": true,\n \"border-c-n70\": true,\n \"border-bs-s\": true,\n \"color-bgc-s30\": true,\n \"color-c-n100\": true,\n \"behavior-ho-80\": true,\n};\n\nconst heading = {\n \"typography-f-sf\": true,\n \"typography-fs-n\": true,\n \"typography-w-500\": true,\n \"layout-mt-0\": true,\n \"layout-mb-2\": true,\n \"color-c-n10\": true,\n};\n\nconst h1 = {\n ...heading,\n \"typography-sz-tl\": true,\n};\n\nconst h2 = {\n ...heading,\n \"typography-sz-tm\": true,\n};\n\nconst h3 = {\n ...heading,\n \"typography-sz-ts\": true,\n};\n\nconst iframe = {\n \"behavior-sw-n\": true,\n};\n\nconst input = {\n \"typography-f-sf\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-pl-4\": true,\n \"layout-pr-4\": true,\n \"layout-pt-2\": true,\n \"layout-pb-2\": true,\n \"border-br-6\": true,\n \"border-bw-1\": true,\n \"color-bc-s70\": true,\n \"border-bs-s\": true,\n \"layout-as-n\": true,\n \"color-c-n10\": true,\n};\n\nconst p = {\n \"typography-f-s\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"typography-sz-bm\": true,\n \"layout-as-n\": true,\n \"color-c-n10\": true,\n};\n\nconst orderedList = {\n \"typography-f-s\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"typography-sz-bm\": true,\n \"layout-as-n\": true,\n};\n\nconst unorderedList = {\n \"typography-f-s\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"typography-sz-bm\": true,\n \"layout-as-n\": true,\n};\n\nconst listItem = {\n \"typography-f-s\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"typography-sz-bm\": true,\n \"layout-as-n\": true,\n};\n\nconst pre = {\n \"typography-f-c\": true,\n \"typography-fs-n\": true,\n \"typography-w-400\": true,\n \"typography-sz-bm\": true,\n \"typography-ws-p\": true,\n \"layout-as-n\": true,\n};\n\nconst textarea = {\n ...input,\n \"layout-r-none\": true,\n \"layout-fs-c\": true,\n};\n\nconst video = {\n \"layout-el-cv\": true,\n};\n\nconst aLight = v0_8.Styles.merge(a, { \"color-c-n5\": true });\nconst inputLight = v0_8.Styles.merge(input, { \"color-c-n5\": true });\nconst textareaLight = v0_8.Styles.merge(textarea, { \"color-c-n5\": true });\nconst buttonLight = v0_8.Styles.merge(button, { \"color-c-n100\": true });\nconst h1Light = v0_8.Styles.merge(h1, { \"color-c-n5\": true });\nconst h2Light = v0_8.Styles.merge(h2, { \"color-c-n5\": true });\nconst h3Light = v0_8.Styles.merge(h3, { \"color-c-n5\": true });\nconst bodyLight = v0_8.Styles.merge(body, { \"color-c-n5\": true });\nconst pLight = v0_8.Styles.merge(p, { \"color-c-n35\": true });\nconst preLight = v0_8.Styles.merge(pre, { \"color-c-n35\": true });\nconst orderedListLight = v0_8.Styles.merge(orderedList, {\n \"color-c-n35\": true,\n});\nconst unorderedListLight = v0_8.Styles.merge(unorderedList, {\n \"color-c-n35\": true,\n});\nconst listItemLight = v0_8.Styles.merge(listItem, {\n \"color-c-n35\": true,\n});\n\nexport const theme: v0_8.Types.Theme = {\n additionalStyles: {\n Button: {\n background: \"var(--primary, oklch(0.205 0 0))\",\n color: \"var(--primary-foreground, oklch(0.985 0 0))\",\n \"border-radius\": \"calc(var(--radius, 0.625rem) - 2px)\",\n cursor: \"pointer\",\n width: \"100%\",\n \"--n-10\": \"var(--primary-foreground, oklch(0.985 0 0))\",\n \"--n-35\": \"var(--primary-foreground, oklch(0.985 0 0))\",\n \"--n-60\": \"var(--primary-foreground, oklch(0.985 0 0))\",\n },\n Card: {\n background: \"var(--card, oklch(1 0 0))\",\n border: \"1px solid var(--border, oklch(0.922 0 0))\",\n \"border-radius\": \"var(--radius, 0.625rem)\",\n padding: \"16px\",\n },\n // Applied directly to <input>/<textarea> — direct CSS wins over class-based palette tokens\n TextField: {\n \"background-color\": \"var(--background, oklch(1 0 0))\",\n \"border-color\": \"var(--input, oklch(0.922 0 0))\",\n color: \"var(--foreground, oklch(0.145 0 0))\",\n \"border-radius\": \"var(--radius, 0.625rem)\",\n },\n // Applied to <section> container — palette vars cascade to the <input type=\"checkbox\"> inside\n // TextField.element uses --n-* palette tokens, so we override those\n CheckBox: {\n \"--n-100\": \"var(--background, oklch(1 0 0))\",\n \"--n-70\": \"var(--border, oklch(0.922 0 0))\",\n \"--n-30\": \"var(--foreground, oklch(0.145 0 0))\",\n },\n // Applied directly to <input> — direct CSS wins over class-based palette tokens\n DateTimeInput: {\n \"background-color\": \"var(--background, oklch(1 0 0))\",\n \"border-color\": \"var(--input, oklch(0.922 0 0))\",\n color: \"var(--foreground, oklch(0.145 0 0))\",\n \"border-radius\": \"var(--radius, 0.625rem)\",\n },\n Modal: {\n \"--p-100\": \"var(--card, oklch(1 0 0))\",\n \"--p-80\": \"var(--border, oklch(0.922 0 0))\",\n \"border-radius\": \"var(--radius, 0.625rem)\",\n },\n // Applied to <section> wrapping markdown — ensures text inherits CPK foreground\n Text: {\n color: \"var(--foreground, oklch(0.145 0 0))\",\n },\n },\n components: {\n AudioPlayer: {},\n Button: {\n \"layout-pt-2\": true,\n \"layout-pb-2\": true,\n \"layout-pl-3\": true,\n \"layout-pr-3\": true,\n \"border-bw-0\": true,\n \"border-bs-s\": true,\n },\n Card: { \"border-br-9\": true, \"color-bgc-n100\": true },\n CheckBox: {\n element: {\n \"layout-m-0\": true,\n \"layout-mr-2\": true,\n \"layout-p-2\": true,\n \"border-br-2\": true,\n \"border-bw-1\": true,\n \"border-bs-s\": true,\n \"color-bgc-n100\": true,\n \"color-bc-n70\": true,\n \"color-c-n30\": true,\n },\n label: {\n \"typography-f-sf\": true,\n \"typography-v-r\": true,\n \"typography-w-400\": true,\n \"layout-flx-1\": true,\n \"typography-sz-ll\": true,\n },\n container: {\n \"layout-dsp-iflex\": true,\n \"layout-al-c\": true,\n },\n },\n Column: {\n \"layout-g-2\": true,\n },\n DateTimeInput: {\n container: {},\n label: {},\n element: {\n \"layout-pt-2\": true,\n \"layout-pb-2\": true,\n \"layout-pl-3\": true,\n \"layout-pr-3\": true,\n \"border-br-2\": true,\n \"border-bw-1\": true,\n \"border-bs-s\": true,\n \"color-bgc-n100\": true,\n \"color-bc-n70\": true,\n \"color-c-n30\": true,\n },\n },\n Divider: {},\n Image: {\n all: {\n \"border-br-5\": true,\n \"layout-el-cv\": true,\n \"layout-w-100\": true,\n \"layout-h-100\": true,\n },\n avatar: { \"is-avatar\": true },\n header: {},\n icon: {},\n largeFeature: {},\n mediumFeature: {},\n smallFeature: {},\n },\n Icon: {},\n List: {\n \"layout-g-4\": true,\n \"layout-p-2\": true,\n },\n Modal: {\n backdrop: { \"color-bbgc-n10_20\": true },\n element: {\n \"border-br-2\": true,\n \"color-bgc-n100\": true,\n \"layout-p-4\": true,\n \"border-bw-1\": true,\n \"border-bs-s\": true,\n \"color-bc-n80\": true,\n },\n },\n MultipleChoice: {\n container: {},\n label: {},\n element: {},\n },\n Row: {\n \"layout-g-4\": true,\n },\n Slider: {\n container: {},\n label: {},\n element: {},\n },\n Tabs: {\n container: {},\n controls: { all: {}, selected: {} },\n element: {},\n },\n Text: {\n all: {\n \"layout-w-100\": true,\n \"layout-g-2\": true,\n },\n h1: {\n \"typography-f-sf\": true,\n \"typography-v-r\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"layout-p-0\": true,\n \"typography-sz-tl\": true,\n },\n h2: {\n \"typography-f-sf\": true,\n \"typography-v-r\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"layout-p-0\": true,\n \"typography-sz-tm\": true,\n },\n h3: {\n \"typography-f-sf\": true,\n \"typography-v-r\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"layout-p-0\": true,\n \"typography-sz-ts\": true,\n },\n h4: {\n \"typography-f-sf\": true,\n \"typography-v-r\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"layout-p-0\": true,\n \"typography-sz-bl\": true,\n },\n h5: {\n \"typography-f-sf\": true,\n \"typography-v-r\": true,\n \"typography-w-400\": true,\n \"layout-m-0\": true,\n \"layout-p-0\": true,\n \"typography-sz-bm\": true,\n },\n body: {},\n caption: {},\n },\n TextField: {\n container: {\n \"typography-sz-bm\": true,\n \"layout-w-100\": true,\n \"layout-g-2\": true,\n \"layout-dsp-flexvert\": true,\n },\n label: {\n \"layout-flx-0\": true,\n },\n element: {\n \"typography-sz-bm\": true,\n \"layout-pt-2\": true,\n \"layout-pb-2\": true,\n \"layout-pl-3\": true,\n \"layout-pr-3\": true,\n \"border-br-2\": true,\n \"border-bw-1\": true,\n \"border-bs-s\": true,\n \"color-bgc-n100\": true,\n \"color-bc-n70\": true,\n \"color-c-n30\": true,\n },\n },\n Video: {\n \"border-br-5\": true,\n \"layout-el-cv\": true,\n },\n },\n elements: {\n a: aLight,\n audio,\n body: bodyLight,\n button: buttonLight,\n em: { \"typography-fs-n\": true },\n h1: h1Light,\n h2: h2Light,\n h3: h3Light,\n h4: {},\n h5: {},\n iframe,\n input: inputLight,\n p: pLight,\n pre: preLight,\n textarea: textareaLight,\n video,\n },\n markdown: {\n p: [...Object.keys(pLight)],\n h1: [...Object.keys(h1Light)],\n h2: [...Object.keys(h2Light)],\n h3: [...Object.keys(h3Light)],\n h4: [],\n h5: [],\n ul: [...Object.keys(unorderedListLight)],\n ol: [...Object.keys(orderedListLight)],\n li: [...Object.keys(listItemLight)],\n a: [...Object.keys(aLight)],\n strong: [],\n em: [\"typography-fs-n\"],\n },\n};\n","\"use client\";\n\nimport React, { useId, useMemo, useEffect, useRef } from \"react\";\nimport type { Types } from \"@a2ui/lit/0.8\";\nimport { v0_8 } from \"@a2ui/lit\";\nimport {\n A2UIProvider,\n useA2UIActions,\n} from \"./react-renderer/core/A2UIProvider\";\nimport { A2UIRenderer } from \"./react-renderer/core/A2UIRenderer\";\nimport { initializeDefaultCatalog } from \"./react-renderer/registry/defaultCatalog\";\nimport { litTheme } from \"./react-renderer/theme/litTheme\";\nimport { injectStyles } from \"./react-renderer/styles\";\nimport { theme as viewerTheme } from \"./theme/viewer-theme.js\";\n\n// Re-export types that consumers may need\nexport interface ComponentInstance {\n id: string;\n component: Record<string, unknown>;\n}\n\nexport interface A2UIActionEvent {\n actionName: string;\n sourceComponentId: string;\n timestamp: string;\n context: Record<string, unknown>;\n}\n\nexport interface A2UIViewerProps {\n /** ID of the root component to render */\n root: string;\n /** Component definitions - array of ComponentInstance */\n components: v0_8.Types.ComponentInstance[];\n /** Data model - nested object, e.g. { user: { name: \"John\" }, items: [\"a\", \"b\"] } */\n data?: Record<string, unknown>;\n /** Called when user triggers an action (button click, etc.) */\n onAction?: (action: A2UIActionEvent) => void;\n /** Surface styles (primaryColor, font, logoUrl) */\n styles?: Record<string, string>;\n /** Optional className for the container */\n className?: string;\n}\n\n// Initialize the React renderer's component catalog and styles once\nlet initialized = false;\nfunction ensureInitialized() {\n if (!initialized) {\n initializeDefaultCatalog();\n injectStyles();\n initialized = true;\n }\n}\n\n/**\n * A2UIViewer renders an A2UI component tree from a JSON definition and data.\n * It re-renders cleanly when props change, discarding previous state.\n */\nexport function A2UIViewer({\n root,\n components,\n data,\n onAction,\n styles,\n className,\n}: A2UIViewerProps): React.JSX.Element {\n ensureInitialized();\n\n // Use React's useId for SSR-safe base ID\n const baseId = useId();\n\n // Generate a stable surfaceId that changes when definition changes\n const surfaceId = useMemo(() => {\n const definitionKey = `${root}-${JSON.stringify(components)}`;\n let hash = 0;\n for (let i = 0; i < definitionKey.length; i++) {\n const char = definitionKey.charCodeAt(i);\n hash = (hash << 5) - hash + char;\n hash = hash & hash;\n }\n return `surface${baseId.replace(/:/g, \"-\")}${hash}`;\n }, [baseId, root, components]);\n\n // Convert onAction callback to internal format\n const handleAction = useMemo(() => {\n if (!onAction) return undefined;\n\n return (message: Types.A2UIClientEventMessage) => {\n const userAction = message.userAction;\n if (userAction) {\n onAction({\n actionName: userAction.name,\n sourceComponentId: userAction.sourceComponentId,\n timestamp: userAction.timestamp,\n context: userAction.context ?? {},\n });\n }\n };\n }, [onAction]);\n\n // Show placeholder if no components provided\n if (!components || components.length === 0) {\n return (\n <div\n className={className}\n style={{ padding: 16, color: \"#666\", fontFamily: \"system-ui\" }}\n >\n No content to display\n </div>\n );\n }\n\n return (\n <A2UIProvider onAction={handleAction} theme={viewerTheme}>\n <A2UIViewerInner\n surfaceId={surfaceId}\n root={root}\n components={components}\n data={data ?? {}}\n styles={styles}\n className={className}\n />\n </A2UIProvider>\n );\n}\n\n/**\n * Inner component that processes messages within the provider context.\n */\nfunction A2UIViewerInner({\n surfaceId,\n root,\n components,\n data,\n styles,\n className,\n}: {\n surfaceId: string;\n root: string;\n components: v0_8.Types.ComponentInstance[];\n data: Record<string, unknown>;\n styles?: Record<string, string>;\n className?: string;\n}) {\n const { processMessages } = useA2UIActions();\n const lastProcessedRef = useRef<string>(\"\");\n\n // Process messages when props change\n useEffect(() => {\n const key = `${surfaceId}-${JSON.stringify(components)}-${JSON.stringify(data)}`;\n if (key === lastProcessedRef.current) return;\n lastProcessedRef.current = key;\n\n const messages: Types.ServerToClientMessage[] = [\n { beginRendering: { surfaceId, root, styles: styles ?? {} } },\n { surfaceUpdate: { surfaceId, components } },\n ];\n\n // Add data model updates\n if (data && Object.keys(data).length > 0) {\n const contents = objectToValueMaps(data);\n if (contents.length > 0) {\n messages.push({\n dataModelUpdate: { surfaceId, path: \"/\", contents },\n });\n }\n }\n\n processMessages(messages);\n }, [processMessages, surfaceId, root, components, data, styles]);\n\n return (\n <div className={className}>\n <A2UIRenderer surfaceId={surfaceId} />\n </div>\n );\n}\n\n/**\n * Converts a nested JavaScript object to the ValueMap[] format\n * expected by A2UI's dataModelUpdate message.\n */\nfunction objectToValueMaps(obj: Record<string, unknown>): Types.ValueMap[] {\n return Object.entries(obj).map(([key, value]) => valueToValueMap(key, value));\n}\n\n/**\n * Converts a single key-value pair to a ValueMap.\n */\nfunction valueToValueMap(key: string, value: unknown): Types.ValueMap {\n if (typeof value === \"string\") {\n return { key, valueString: value };\n }\n if (typeof value === \"number\") {\n return { key, valueNumber: value };\n }\n if (typeof value === \"boolean\") {\n return { key, valueBoolean: value };\n }\n if (value === null || value === undefined) {\n return { key };\n }\n if (Array.isArray(value)) {\n const valueMap = value.map((item, index) =>\n valueToValueMap(String(index), item),\n );\n return { key, valueMap };\n }\n if (typeof value === \"object\") {\n const valueMap = objectToValueMaps(value as Record<string, unknown>);\n return { key, valueMap };\n }\n return { key };\n}\n","import { v0_8 } from \"@a2ui/lit\";\n\nexport type Theme = v0_8.Types.Theme;\nexport type A2UIClientEventMessage = v0_8.Types.A2UIClientEventMessage;\nexport const DEFAULT_SURFACE_ID =\n v0_8.Data.A2uiMessageProcessor.DEFAULT_SURFACE_ID;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCA,MAAM,WAAW;EACf,mBAAmB;EACnB,mBAAmB;EACnB,oBAAoB;EACpB,eAAe;EACf,mBAAmB;EACnB,eAAe;EACf,sBAAsB;EACtB,eAAe;EAChB;CAED,MAAM,eAAe,EACnB,gBAAgB,MACjB;CAED,MAAM,cAAc;EAClB,kBAAkB;EAClB,mBAAmB;EACnB,oBAAoB;EACpB,eAAe;EACf,eAAe;EACf,oBAAoB;EACpB,eAAe;EAChB;CAED,MAAM,gBAAgB;EACpB,mBAAmB;EACnB,mBAAmB;EACnB,oBAAoB;EACpB,eAAe;EACf,eAAe;EACf,eAAe;EACf,eAAe;EACf,eAAe;EACf,gBAAgB;EAChB,eAAe;EACf,gBAAgB;EAChB,eAAe;EACf,iBAAiB;EACjB,kBAAkB;EACnB;CAED,MAAM,iBAAiB;EACrB,mBAAmB;EAC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IAAM,QAAQ,gDAAU,EAAE;IAAE,EAAE,EAC7D,EAAE,eAAe;IAAE;IAAW;IAAY,EAAE,CAC7C;AAGD,OAAI,QAAQ,OAAO,KAAK,KAAK,CAAC,SAAS,GAAG;IACxC,MAAM,WAAW,kBAAkB,KAAK;AACxC,QAAI,SAAS,SAAS,EACpB,UAAS,KAAK,EACZ,iBAAiB;KAAE;KAAW,MAAM;KAAK;KAAU,EACpD,CAAC;;AAIN,mBAAgB,SAAS;KACxB;GAAC;GAAiB;GAAW;GAAM;GAAY;GAAM;GAAO,CAAC;AAEhE,SACE,2CAAC;GAAe;aACd,2CAAC,gBAAwB,YAAa;IAClC;;;;;;CAQV,SAAS,kBAAkB,KAAgD;AACzE,SAAO,OAAO,QAAQ,IAAI,CAAC,KAAK,CAAC,KAAK,WAAW,gBAAgB,KAAK,MAAM,CAAC;;;;;CAM/E,SAAS,gBAAgB,KAAa,OAAgC;AACpE,MAAI,OAAO,UAAU,SACnB,QAAO;GAAE;GAAK,aAAa;GAAO;AAEpC,MAAI,OAAO,UAAU,SACnB,QAAO;GAAE;GAAK,aAAa;GAAO;AAEpC,MAAI,OAAO,UAAU,UACnB,QAAO;GAAE;GAAK,cAAc;GAAO;AAErC,MAAI,UAAU,QAAQ,UAAU,OAC9B,QAAO,EAAE,KAAK;AAEhB,MAAI,MAAM,QAAQ,MAAM,CAItB,QAAO;GAAE;GAAK,UAHG,MAAM,KAAK,MAAM,UAChC,gBAAgB,OAAO,MAAM,EAAE,KAAK,CACrC;GACuB;AAE1B,MAAI,OAAO,UAAU,SAEnB,QAAO;GAAE;GAAK,UADG,kBAAkB,MAAiC;GAC5C;AAE1B,SAAO,EAAE,KAAK;;;;;CC/MhB,MAAa,qBACXC,eAAK,KAAK,qBAAqB"}
1
+ {"version":3,"file":"index.umd.js","names":["ComponentContext","GenericBinder","mapJustify","mapAlign","Text","TextApi","ImageApi","IconApi","VideoApi","AudioPlayerApi","ChildList","React","Row","RowApi","mapJustify","mapAlign","ChildList","Column","ColumnApi","mapJustify","mapAlign","ChildList","ListApi","mapAlign","ChildList","CardApi","TabsApi","DividerApi","ModalApi","Button","ButtonApi","TextField","TextFieldApi","React","CheckBoxApi","React","ChoicePickerApi","SliderApi","React","DateTimeInputApi","React","Text","Row","Column","Button","TextField","Catalog","BASIC_FUNCTIONS","z","CommonSchemas","z","CommonSchemas","React","z","CommonSchemas","mapJustify","mapAlign","z","CommonSchemas","z","CommonSchemas","Catalog","z","MessageProcessor","Suspense","Catalog"],"sources":["../src/react-renderer/a2ui-react/A2uiSurface.tsx","../src/react-renderer/a2ui-react/adapter.tsx","../src/react-renderer/a2ui-react/catalog/basic/utils.ts","../src/react-renderer/a2ui-react/catalog/basic/components/Text.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/Image.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/Icon.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/Video.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/ChildList.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/Row.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/Column.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/List.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/Card.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/Tabs.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/Divider.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/Modal.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/Button.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/TextField.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/CheckBox.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/Slider.tsx","../src/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.tsx","../src/react-renderer/a2ui-react/catalog/basic/index.ts","../src/react-renderer/a2ui-react/catalog/minimal/components/Text.tsx","../src/react-renderer/a2ui-react/catalog/minimal/components/Button.tsx","../src/react-renderer/a2ui-react/catalog/minimal/components/ChildList.tsx","../src/react-renderer/a2ui-react/catalog/minimal/components/Row.tsx","../src/react-renderer/a2ui-react/catalog/minimal/components/Column.tsx","../src/react-renderer/a2ui-react/catalog/minimal/components/TextField.tsx","../src/react-renderer/a2ui-react/catalog/minimal/index.ts","../src/react-renderer/theme/ThemeContext.tsx","../src/react-renderer/core/A2UIProvider.tsx","../src/react-renderer/hooks/useA2UI.ts","../src/react-renderer/lib/utils.ts","../src/react-renderer/core/A2UIRenderer.tsx","../src/react-renderer/catalog-utils.ts","../src/react-renderer/create-catalog.tsx","../src/react-renderer/styles/index.ts","../src/react-renderer/index.ts","../src/a2ui-types.ts","../src/index.ts"],"sourcesContent":["/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useSyncExternalStore, memo, useMemo, useCallback } from \"react\";\nimport {\n type SurfaceModel,\n ComponentContext,\n type ComponentModel,\n} from \"@a2ui/web_core/v0_9\";\nimport type { ReactComponentImplementation } from \"./adapter\";\n\nconst ResolvedChild = memo(\n ({\n surface,\n id,\n basePath,\n compImpl,\n componentModel,\n }: {\n surface: SurfaceModel<ReactComponentImplementation>;\n id: string;\n basePath: string;\n componentModel: ComponentModel;\n compImpl: ReactComponentImplementation;\n }) => {\n const ComponentToRender = compImpl.render;\n\n // Create context. Recreate if the componentModel instance changes (e.g. type change recreation).\n const context = useMemo(\n () => new ComponentContext(surface, id, basePath),\n // componentModel is used as a trigger for recreation even if not in the body\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [surface, id, basePath, componentModel],\n );\n\n const buildChild = useCallback(\n (childId: string, specificPath?: string) => {\n const path = specificPath || context.dataContext.path;\n return (\n <DeferredChild\n key={`${childId}-${path}`}\n surface={surface}\n id={childId}\n basePath={path}\n />\n );\n },\n [surface, context.dataContext.path],\n );\n\n return <ComponentToRender context={context} buildChild={buildChild} />;\n },\n);\nResolvedChild.displayName = \"ResolvedChild\";\n\nexport const DeferredChild: React.FC<{\n surface: SurfaceModel<ReactComponentImplementation>;\n id: string;\n basePath: string;\n}> = memo(({ surface, id, basePath }) => {\n // 1. Subscribe specifically to this component's existence\n const store = useMemo(() => {\n let version = 0;\n return {\n subscribe: (cb: () => void) => {\n const unsub1 = surface.componentsModel.onCreated.subscribe((comp) => {\n if (comp.id === id) {\n version++;\n cb();\n }\n });\n const unsub2 = surface.componentsModel.onDeleted.subscribe((delId) => {\n if (delId === id) {\n version++;\n cb();\n }\n });\n return () => {\n unsub1.unsubscribe();\n unsub2.unsubscribe();\n };\n },\n getSnapshot: () => {\n const comp = surface.componentsModel.get(id);\n // We use instance identity + version as the snapshot to ensure\n // type replacements (e.g. Button -> Text) trigger a re-render.\n return comp ? `${comp.type}-${version}` : `missing-${version}`;\n },\n };\n }, [surface, id]);\n\n useSyncExternalStore(store.subscribe, store.getSnapshot);\n\n const componentModel = surface.componentsModel.get(id);\n\n if (!componentModel) {\n return (\n <div\n style={{\n padding: \"12px 16px\",\n borderRadius: \"8px\",\n background:\n \"linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%)\",\n backgroundSize: \"200% 100%\",\n animation: \"a2ui-shimmer 1.5s ease-in-out infinite\",\n minHeight: \"2rem\",\n }}\n >\n <style>{`@keyframes a2ui-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }`}</style>\n </div>\n );\n }\n\n const compImpl = surface.catalog.components.get(componentModel.type);\n\n if (!compImpl) {\n return (\n <div style={{ color: \"red\" }}>\n Unknown component: {componentModel.type}\n </div>\n );\n }\n\n return (\n <ResolvedChild\n surface={surface}\n id={id}\n basePath={basePath}\n componentModel={componentModel}\n compImpl={compImpl}\n />\n );\n});\nDeferredChild.displayName = \"DeferredChild\";\n\nexport const A2uiSurface: React.FC<{\n surface: SurfaceModel<ReactComponentImplementation>;\n}> = ({ surface }) => {\n // The root component always has ID 'root' and base path '/'\n return <DeferredChild surface={surface} id=\"root\" basePath=\"/\" />;\n};\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n useRef,\n useSyncExternalStore,\n useCallback,\n memo,\n useEffect,\n} from \"react\";\nimport { type ComponentContext, GenericBinder } from \"@a2ui/web_core/v0_9\";\nimport type {\n ComponentApi,\n InferredComponentApiSchemaType,\n ResolveA2uiProps,\n} from \"@a2ui/web_core/v0_9\";\n\nexport interface ReactComponentImplementation extends ComponentApi {\n /** The framework-specific rendering wrapper. */\n render: React.FC<{\n context: ComponentContext;\n buildChild: (id: string, basePath?: string) => React.ReactNode;\n }>;\n}\n\nexport type ReactA2uiComponentProps<T> = {\n props: T;\n buildChild: (id: string, basePath?: string) => React.ReactNode;\n context: ComponentContext;\n};\n\n// --- Component Factories ---\n\n/**\n * Creates a React component implementation using the deep generic binder.\n */\nexport function createReactComponent<Api extends ComponentApi>(\n api: Api,\n RenderComponent: React.FC<\n ReactA2uiComponentProps<\n ResolveA2uiProps<InferredComponentApiSchemaType<Api>>\n >\n >,\n): ReactComponentImplementation {\n type Props = ResolveA2uiProps<InferredComponentApiSchemaType<Api>>;\n\n const MemoizedRender = memo(RenderComponent, (prev, next) => {\n if (prev.props !== next.props) return false;\n if (prev.context.componentModel.id !== next.context.componentModel.id)\n return false;\n if (prev.context.dataContext.path !== next.context.dataContext.path)\n return false;\n return true;\n });\n\n const ReactWrapper: React.FC<{\n context: ComponentContext;\n buildChild: (id: string, basePath?: string) => React.ReactNode;\n }> = ({ context, buildChild }) => {\n const bindingRef = useRef<GenericBinder<Props> | null>(null);\n\n // Create or recreate the binder if the context object changes.\n // DeferredChild memoizes `context`, so reference changes strictly correspond\n // to ComponentModel updates (like type changes) or Base Path adjustments.\n if (!bindingRef.current) {\n bindingRef.current = new GenericBinder<Props>(context, api.schema);\n } else if (\n (bindingRef.current as unknown as { context: ComponentContext })\n .context !== context\n ) {\n bindingRef.current.dispose();\n bindingRef.current = new GenericBinder<Props>(context, api.schema);\n }\n const binding = bindingRef.current;\n\n const subscribe = useCallback(\n (callback: () => void) => {\n const sub = binding.subscribe(callback);\n return () => sub.unsubscribe();\n },\n [binding],\n );\n\n const getSnapshot = useCallback(() => binding.snapshot, [binding]);\n const props = useSyncExternalStore(subscribe, getSnapshot);\n\n // Prevent DataModel subscription leaks on unmount\n useEffect(() => {\n return () => binding.dispose();\n }, [binding]);\n\n return (\n <MemoizedRender\n props={props || ({} as Props)}\n buildChild={buildChild}\n context={context}\n />\n );\n };\n\n return {\n name: api.name,\n schema: api.schema,\n render: ReactWrapper,\n };\n}\n\n/**\n * Creates a React component implementation that manages its own context bindings (no generic binder).\n */\nexport function createBinderlessComponent(\n api: ComponentApi,\n RenderComponent: React.FC<{\n context: ComponentContext;\n buildChild: (id: string, basePath?: string) => React.ReactNode;\n }>,\n): ReactComponentImplementation {\n return {\n name: api.name,\n schema: api.schema,\n render: RenderComponent,\n };\n}\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type React from \"react\";\n\n/** Standard leaf margin from the implementation guide. */\nexport const LEAF_MARGIN = \"8px\";\n\n/** Standard internal padding for visually bounded containers. */\nexport const CONTAINER_PADDING = \"16px\";\n\n/** Standard border for cards and inputs. */\nexport const STANDARD_BORDER = \"1px solid #ccc\";\n\n/** Standard border radius. */\nexport const STANDARD_RADIUS = \"8px\";\n\nexport const mapJustify = (j?: string) => {\n switch (j) {\n case \"center\":\n return \"center\";\n case \"end\":\n return \"flex-end\";\n case \"spaceAround\":\n return \"space-around\";\n case \"spaceBetween\":\n return \"space-between\";\n case \"spaceEvenly\":\n return \"space-evenly\";\n case \"start\":\n return \"flex-start\";\n case \"stretch\":\n return \"stretch\";\n default:\n return \"flex-start\";\n }\n};\n\nexport const mapAlign = (a?: string) => {\n switch (a) {\n case \"start\":\n return \"flex-start\";\n case \"center\":\n return \"center\";\n case \"end\":\n return \"flex-end\";\n case \"stretch\":\n return \"stretch\";\n default:\n return \"stretch\";\n }\n};\n\nexport const getBaseLeafStyle = (): React.CSSProperties => ({\n margin: LEAF_MARGIN,\n boxSizing: \"border-box\",\n});\n\nexport const getBaseContainerStyle = (): React.CSSProperties => ({\n margin: LEAF_MARGIN,\n padding: CONTAINER_PADDING,\n border: STANDARD_BORDER,\n borderRadius: STANDARD_RADIUS,\n boxSizing: \"border-box\",\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { TextApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { getBaseLeafStyle } from \"../utils\";\n\nexport const Text = createReactComponent(TextApi, ({ props }) => {\n const text = props.text ?? \"\";\n const style: React.CSSProperties = {\n ...getBaseLeafStyle(),\n display: \"inline-block\",\n };\n\n switch (props.variant) {\n case \"h1\":\n return <h1 style={style}>{text}</h1>;\n case \"h2\":\n return <h2 style={style}>{text}</h2>;\n case \"h3\":\n return <h3 style={style}>{text}</h3>;\n case \"h4\":\n return <h4 style={style}>{text}</h4>;\n case \"h5\":\n return <h5 style={style}>{text}</h5>;\n case \"caption\":\n return (\n <small style={{ ...style, color: \"#666\", textAlign: \"left\" }}>\n {text}\n </small>\n );\n case \"body\":\n default:\n return <span style={style}>{text}</span>;\n }\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { ImageApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { getBaseLeafStyle } from \"../utils\";\n\nexport const Image = createReactComponent(ImageApi, ({ props }) => {\n const mapFit = (fit?: string): React.CSSProperties[\"objectFit\"] => {\n if (fit === \"scaleDown\") return \"scale-down\";\n return (fit as React.CSSProperties[\"objectFit\"]) || \"fill\";\n };\n\n const style: React.CSSProperties = {\n ...getBaseLeafStyle(),\n objectFit: mapFit(props.fit),\n width: \"100%\",\n height: \"auto\",\n display: \"block\",\n };\n\n if (props.variant === \"icon\") {\n style.width = \"24px\";\n style.height = \"24px\";\n } else if (props.variant === \"avatar\") {\n style.width = \"40px\";\n style.height = \"40px\";\n style.borderRadius = \"50%\";\n } else if (props.variant === \"smallFeature\") {\n style.maxWidth = \"100px\";\n } else if (props.variant === \"largeFeature\") {\n style.maxHeight = \"400px\";\n } else if (props.variant === \"header\") {\n style.height = \"200px\";\n style.objectFit = \"cover\";\n }\n\n return <img src={props.url} alt={props.description || \"\"} style={style} />;\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { IconApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { getBaseLeafStyle } from \"../utils\";\n\nexport const Icon = createReactComponent(IconApi, ({ props }) => {\n const iconName =\n typeof props.name === \"string\"\n ? props.name\n : (props.name as { path?: string })?.path;\n const style: React.CSSProperties = {\n ...getBaseLeafStyle(),\n fontSize: \"24px\",\n width: \"24px\",\n height: \"24px\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n return (\n <span className=\"material-symbols-outlined\" style={style}>\n {iconName}\n </span>\n );\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { VideoApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { getBaseLeafStyle } from \"../utils\";\n\nexport const Video = createReactComponent(VideoApi, ({ props }) => {\n const style: React.CSSProperties = {\n ...getBaseLeafStyle(),\n width: \"100%\",\n aspectRatio: \"16/9\",\n };\n\n return <video src={props.url} controls style={style} />;\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { AudioPlayerApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { getBaseLeafStyle } from \"../utils\";\n\nexport const AudioPlayer = createReactComponent(AudioPlayerApi, ({ props }) => {\n const style: React.CSSProperties = {\n ...getBaseLeafStyle(),\n width: \"100%\",\n };\n\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"4px\",\n width: \"100%\",\n }}\n >\n {props.description && (\n <span style={{ fontSize: \"12px\", color: \"#666\" }}>\n {props.description}\n </span>\n )}\n <audio src={props.url} controls style={style} />\n </div>\n );\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { type ComponentContext } from \"@a2ui/web_core/v0_9\";\n\nexport const ChildList: React.FC<{\n childList: unknown;\n context: ComponentContext;\n buildChild: (id: string, basePath?: string) => React.ReactNode;\n}> = ({ childList, buildChild }) => {\n if (Array.isArray(childList)) {\n return (\n <>\n {childList.map((item: unknown, i: number) => {\n // The new binder outputs objects like { id: string, basePath: string } for arrays of structural nodes\n if (item && typeof item === \"object\" && \"id\" in item) {\n const node = item as { id: string; basePath?: string };\n return (\n <React.Fragment key={`${node.id}-${i}`}>\n {buildChild(node.id, node.basePath)}\n </React.Fragment>\n );\n }\n // Fallback for static string lists\n if (typeof item === \"string\") {\n return (\n <React.Fragment key={`${item}-${i}`}>\n {buildChild(item)}\n </React.Fragment>\n );\n }\n return null;\n })}\n </>\n );\n }\n\n return null;\n};\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createReactComponent } from \"../../../adapter\";\nimport { RowApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { ChildList } from \"./ChildList\";\nimport { mapJustify, mapAlign } from \"../utils\";\n\nexport const Row = createReactComponent(\n RowApi,\n ({ props, buildChild, context }) => {\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: mapJustify(props.justify),\n alignItems: mapAlign(props.align),\n width: \"100%\",\n margin: 0,\n padding: 0,\n }}\n >\n <ChildList\n childList={props.children}\n buildChild={buildChild}\n context={context}\n />\n </div>\n );\n },\n);\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createReactComponent } from \"../../../adapter\";\nimport { ColumnApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { ChildList } from \"./ChildList\";\nimport { mapJustify, mapAlign } from \"../utils\";\n\nexport const Column = createReactComponent(\n ColumnApi,\n ({ props, buildChild, context }) => {\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: mapJustify(props.justify),\n alignItems: mapAlign(props.align),\n width: \"100%\",\n margin: 0,\n padding: 0,\n }}\n >\n <ChildList\n childList={props.children}\n buildChild={buildChild}\n context={context}\n />\n </div>\n );\n },\n);\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { ListApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { ChildList } from \"./ChildList\";\nimport { mapAlign } from \"../utils\";\n\nexport const List = createReactComponent(\n ListApi,\n ({ props, buildChild, context }) => {\n const isHorizontal = props.direction === \"horizontal\";\n const style: React.CSSProperties = {\n display: \"flex\",\n flexDirection: isHorizontal ? \"row\" : \"column\",\n alignItems: mapAlign(props.align),\n overflowX: isHorizontal ? \"auto\" : \"hidden\",\n overflowY: isHorizontal ? \"hidden\" : \"auto\",\n width: \"100%\",\n margin: 0,\n padding: 0,\n };\n\n return (\n <div style={style}>\n <ChildList\n childList={props.children}\n buildChild={buildChild}\n context={context}\n />\n </div>\n );\n },\n);\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { CardApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { getBaseContainerStyle } from \"../utils\";\n\nexport const Card = createReactComponent(CardApi, ({ props, buildChild }) => {\n const style: React.CSSProperties = {\n ...getBaseContainerStyle(),\n backgroundColor: \"#fff\",\n boxShadow: \"0 2px 4px rgba(0,0,0,0.1)\",\n width: \"100%\",\n };\n\n return (\n <div style={style}>{props.child ? buildChild(props.child) : null}</div>\n );\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useState } from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { TabsApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { LEAF_MARGIN } from \"../utils\";\n\n// The type of a tab is deeply nested into the TabsApi schema, and\n// it seems z.infer is not inferring it correctly (?). We use `any` for now.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype _Tab = any;\n\nexport const Tabs = createReactComponent(TabsApi, ({ props, buildChild }) => {\n const [selectedIndex, setSelectedIndex] = useState(0);\n\n const tabs = props.tabs || [];\n const activeTab = tabs[selectedIndex];\n\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n width: \"100%\",\n margin: LEAF_MARGIN,\n }}\n >\n <div\n style={{\n display: \"flex\",\n borderBottom: \"1px solid #ccc\",\n marginBottom: \"8px\",\n }}\n >\n {tabs.map((tab: _Tab, i: number) => (\n <button\n key={i}\n onClick={() => setSelectedIndex(i)}\n style={{\n padding: \"8px 16px\",\n border: \"none\",\n background: \"none\",\n borderBottom:\n selectedIndex === i\n ? \"2px solid var(--a2ui-primary-color, #007bff)\"\n : \"none\",\n fontWeight: selectedIndex === i ? \"bold\" : \"normal\",\n cursor: \"pointer\",\n color:\n selectedIndex === i\n ? \"var(--a2ui-primary-color, #007bff)\"\n : \"inherit\",\n }}\n >\n {tab.title}\n </button>\n ))}\n </div>\n <div style={{ flex: 1 }}>\n {activeTab ? buildChild(activeTab.child) : null}\n </div>\n </div>\n );\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { DividerApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { LEAF_MARGIN } from \"../utils\";\n\nexport const Divider = createReactComponent(DividerApi, ({ props }) => {\n const isVertical = props.axis === \"vertical\";\n const style: React.CSSProperties = {\n margin: LEAF_MARGIN,\n border: \"none\",\n backgroundColor: \"#ccc\",\n };\n\n if (isVertical) {\n style.width = \"1px\";\n style.height = \"100%\";\n } else {\n style.width = \"100%\";\n style.height = \"1px\";\n }\n\n return <div style={style} />;\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useState } from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { ModalApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\n\nexport const Modal = createReactComponent(ModalApi, ({ props, buildChild }) => {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <div onClick={() => setIsOpen(true)} style={{ display: \"inline-block\" }}>\n {props.trigger ? buildChild(props.trigger) : null}\n </div>\n {isOpen && (\n <div\n style={{\n position: \"fixed\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: \"rgba(0,0,0,0.5)\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n zIndex: 1000,\n }}\n onClick={() => setIsOpen(false)}\n >\n <div\n style={{\n backgroundColor: \"#fff\",\n padding: \"24px\",\n borderRadius: \"8px\",\n maxWidth: \"90%\",\n maxHeight: \"90%\",\n overflow: \"auto\",\n display: \"flex\",\n flexDirection: \"column\",\n }}\n onClick={(e) => e.stopPropagation()}\n >\n <div style={{ display: \"flex\", justifyContent: \"flex-end\" }}>\n <button\n onClick={() => setIsOpen(false)}\n style={{\n border: \"none\",\n background: \"none\",\n fontSize: \"20px\",\n cursor: \"pointer\",\n padding: \"4px\",\n }}\n >\n &times;\n </button>\n </div>\n <div style={{ flex: 1 }}>\n {props.content ? buildChild(props.content) : null}\n </div>\n </div>\n </div>\n )}\n </>\n );\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { ButtonApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { LEAF_MARGIN } from \"../utils\";\n\nexport const Button = createReactComponent(\n ButtonApi,\n ({ props, buildChild }) => {\n const style: React.CSSProperties = {\n margin: LEAF_MARGIN,\n padding: \"8px 16px\",\n cursor: \"pointer\",\n border: props.variant === \"borderless\" ? \"none\" : \"1px solid #ccc\",\n backgroundColor:\n props.variant === \"primary\"\n ? \"var(--a2ui-primary-color, #007bff)\"\n : props.variant === \"borderless\"\n ? \"transparent\"\n : \"#fff\",\n color: props.variant === \"primary\" ? \"#fff\" : \"inherit\",\n borderRadius: \"4px\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n boxSizing: \"border-box\",\n };\n\n return (\n <button\n style={style}\n onClick={props.action}\n disabled={props.isValid === false}\n >\n {props.child ? buildChild(props.child) : null}\n </button>\n );\n },\n);\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { TextFieldApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { LEAF_MARGIN, STANDARD_BORDER, STANDARD_RADIUS } from \"../utils\";\n\nexport const TextField = createReactComponent(TextFieldApi, ({ props }) => {\n const onChange = (\n e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,\n ) => {\n props.setValue(e.target.value);\n };\n\n const isLong = props.variant === \"longText\";\n const type =\n props.variant === \"number\"\n ? \"number\"\n : props.variant === \"obscured\"\n ? \"password\"\n : \"text\";\n\n const style: React.CSSProperties = {\n padding: \"8px\",\n width: \"100%\",\n border: STANDARD_BORDER,\n borderRadius: STANDARD_RADIUS,\n boxSizing: \"border-box\",\n };\n\n // Note: To have a unique id without passing context we can use a random or provided id,\n // but the simplest is just relying on React's useId if we really need it.\n // For now, we'll omit the `id` from the label connection since we removed context.\n const uniqueId = React.useId();\n\n const hasError = props.validationErrors && props.validationErrors.length > 0;\n\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"4px\",\n width: \"100%\",\n margin: LEAF_MARGIN,\n }}\n >\n {props.label && (\n <label\n htmlFor={uniqueId}\n style={{ fontSize: \"14px\", fontWeight: \"bold\" }}\n >\n {props.label}\n </label>\n )}\n {isLong ? (\n <textarea\n id={uniqueId}\n style={{\n ...style,\n border: hasError ? \"1px solid red\" : STANDARD_BORDER,\n }}\n value={props.value || \"\"}\n onChange={onChange}\n />\n ) : (\n <input\n id={uniqueId}\n type={type}\n style={{\n ...style,\n border: hasError ? \"1px solid red\" : STANDARD_BORDER,\n }}\n value={props.value || \"\"}\n onChange={onChange}\n />\n )}\n {hasError && (\n <span style={{ fontSize: \"12px\", color: \"red\" }}>\n {props.validationErrors![0]}\n </span>\n )}\n </div>\n );\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { CheckBoxApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { LEAF_MARGIN } from \"../utils\";\n\nexport const CheckBox = createReactComponent(CheckBoxApi, ({ props }) => {\n const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n props.setValue(e.target.checked);\n };\n\n const uniqueId = React.useId();\n\n const hasError = props.validationErrors && props.validationErrors.length > 0;\n\n return (\n <div\n style={{ display: \"flex\", flexDirection: \"column\", margin: LEAF_MARGIN }}\n >\n <div style={{ display: \"flex\", alignItems: \"center\", gap: \"8px\" }}>\n <input\n id={uniqueId}\n type=\"checkbox\"\n checked={!!props.value}\n onChange={onChange}\n style={{\n cursor: \"pointer\",\n outline: hasError ? \"1px solid red\" : \"none\",\n }}\n />\n {props.label && (\n <label\n htmlFor={uniqueId}\n style={{ cursor: \"pointer\", color: hasError ? \"red\" : \"inherit\" }}\n >\n {props.label}\n </label>\n )}\n </div>\n {hasError && (\n <span style={{ fontSize: \"12px\", color: \"red\", marginTop: \"4px\" }}>\n {props.validationErrors?.[0]}\n </span>\n )}\n </div>\n );\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useState } from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { ChoicePickerApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { LEAF_MARGIN, STANDARD_BORDER, STANDARD_RADIUS } from \"../utils\";\n\n// The type of an option is deeply nested into the ChoicePickerApi schema, and\n// it seems z.infer is not inferring it correctly (?). We use `any` for now.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype _Option = any;\n\nexport const ChoicePicker = createReactComponent(\n ChoicePickerApi,\n ({ props, context }) => {\n const [filter, setFilter] = useState(\"\");\n\n const values = Array.isArray(props.value) ? props.value : [];\n const isMutuallyExclusive = props.variant === \"mutuallyExclusive\";\n\n const onToggle = (val: string) => {\n if (isMutuallyExclusive) {\n props.setValue([val]);\n } else {\n const newValues = values.includes(val)\n ? values.filter((v: string) => v !== val)\n : [...values, val];\n props.setValue(newValues);\n }\n };\n\n const options = (props.options || []).filter(\n (opt: _Option) =>\n !props.filterable ||\n filter === \"\" ||\n String(opt.label).toLowerCase().includes(filter.toLowerCase()),\n );\n\n const containerStyle: React.CSSProperties = {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"8px\",\n margin: LEAF_MARGIN,\n width: \"100%\",\n };\n\n const listStyle: React.CSSProperties = {\n display: \"flex\",\n flexDirection: props.displayStyle === \"chips\" ? \"row\" : \"column\",\n flexWrap: props.displayStyle === \"chips\" ? \"wrap\" : \"nowrap\",\n gap: \"8px\",\n };\n\n return (\n <div style={containerStyle}>\n {props.label && (\n <strong style={{ fontSize: \"14px\" }}>{props.label}</strong>\n )}\n {props.filterable && (\n <input\n type=\"text\"\n placeholder=\"Filter options...\"\n value={filter}\n onChange={(e) => setFilter(e.target.value)}\n style={{\n padding: \"4px 8px\",\n border: STANDARD_BORDER,\n borderRadius: STANDARD_RADIUS,\n }}\n />\n )}\n <div style={listStyle}>\n {options.map((opt: _Option, i: number) => {\n const isSelected = values.includes(opt.value);\n if (props.displayStyle === \"chips\") {\n return (\n <button\n key={i}\n onClick={() => onToggle(opt.value)}\n style={{\n padding: \"4px 12px\",\n borderRadius: \"16px\",\n border: isSelected\n ? \"1px solid var(--a2ui-primary-color, #007bff)\"\n : STANDARD_BORDER,\n backgroundColor: isSelected\n ? \"var(--a2ui-primary-color, #007bff)\"\n : \"#fff\",\n color: isSelected ? \"#fff\" : \"inherit\",\n cursor: \"pointer\",\n fontSize: \"12px\",\n }}\n >\n {opt.label}\n </button>\n );\n }\n return (\n <label\n key={i}\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n cursor: \"pointer\",\n }}\n >\n <input\n type={isMutuallyExclusive ? \"radio\" : \"checkbox\"}\n checked={isSelected}\n onChange={() => onToggle(opt.value)}\n name={\n isMutuallyExclusive\n ? `choice-${context.componentModel.id}`\n : undefined\n }\n />\n <span style={{ fontSize: \"14px\" }}>{opt.label}</span>\n </label>\n );\n })}\n </div>\n </div>\n );\n },\n);\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { SliderApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { LEAF_MARGIN } from \"../utils\";\n\nexport const Slider = createReactComponent(SliderApi, ({ props }) => {\n const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n props.setValue(Number(e.target.value));\n };\n\n const uniqueId = React.useId();\n\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"4px\",\n margin: LEAF_MARGIN,\n width: \"100%\",\n }}\n >\n <div style={{ display: \"flex\", justifyContent: \"space-between\" }}>\n {props.label && (\n <label\n htmlFor={uniqueId}\n style={{ fontSize: \"14px\", fontWeight: \"bold\" }}\n >\n {props.label}\n </label>\n )}\n <span style={{ fontSize: \"12px\", color: \"#666\" }}>{props.value}</span>\n </div>\n <input\n id={uniqueId}\n type=\"range\"\n min={props.min ?? 0}\n max={props.max}\n value={props.value ?? 0}\n onChange={onChange}\n style={{ width: \"100%\", cursor: \"pointer\" }}\n />\n </div>\n );\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { DateTimeInputApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { LEAF_MARGIN, STANDARD_BORDER, STANDARD_RADIUS } from \"../utils\";\n\nexport const DateTimeInput = createReactComponent(\n DateTimeInputApi,\n ({ props }) => {\n const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n props.setValue(e.target.value);\n };\n\n const uniqueId = React.useId();\n\n // Map enableDate/enableTime to input type\n let type = \"datetime-local\";\n if (props.enableDate && !props.enableTime) type = \"date\";\n if (!props.enableDate && props.enableTime) type = \"time\";\n\n const style: React.CSSProperties = {\n padding: \"8px\",\n width: \"100%\",\n border: STANDARD_BORDER,\n borderRadius: STANDARD_RADIUS,\n boxSizing: \"border-box\",\n };\n\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"4px\",\n width: \"100%\",\n margin: LEAF_MARGIN,\n }}\n >\n {props.label && (\n <label\n htmlFor={uniqueId}\n style={{ fontSize: \"14px\", fontWeight: \"bold\" }}\n >\n {props.label}\n </label>\n )}\n <input\n id={uniqueId}\n type={type}\n style={style}\n value={props.value || \"\"}\n onChange={onChange}\n min={typeof props.min === \"string\" ? props.min : undefined}\n max={typeof props.max === \"string\" ? props.max : undefined}\n />\n </div>\n );\n },\n);\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Catalog } from \"@a2ui/web_core/v0_9\";\nimport { BASIC_FUNCTIONS } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport type { ReactComponentImplementation } from \"../../adapter\";\n\nimport { Text } from \"./components/Text\";\nimport { Image } from \"./components/Image\";\nimport { Icon } from \"./components/Icon\";\nimport { Video } from \"./components/Video\";\nimport { AudioPlayer } from \"./components/AudioPlayer\";\nimport { Row } from \"./components/Row\";\nimport { Column } from \"./components/Column\";\nimport { List } from \"./components/List\";\nimport { Card } from \"./components/Card\";\nimport { Tabs } from \"./components/Tabs\";\nimport { Divider } from \"./components/Divider\";\nimport { Modal } from \"./components/Modal\";\nimport { Button } from \"./components/Button\";\nimport { TextField } from \"./components/TextField\";\nimport { CheckBox } from \"./components/CheckBox\";\nimport { ChoicePicker } from \"./components/ChoicePicker\";\nimport { Slider } from \"./components/Slider\";\nimport { DateTimeInput } from \"./components/DateTimeInput\";\n\nconst basicComponents: ReactComponentImplementation[] = [\n Text,\n Image,\n Icon,\n Video,\n AudioPlayer,\n Row,\n Column,\n List,\n Card,\n Tabs,\n Divider,\n Modal,\n Button,\n TextField,\n CheckBox,\n ChoicePicker,\n Slider,\n DateTimeInput,\n];\n\nexport const basicCatalog = new Catalog<ReactComponentImplementation>(\n \"https://a2ui.org/specification/v0_9/basic_catalog.json\",\n basicComponents,\n BASIC_FUNCTIONS,\n);\n\nexport {\n Text,\n Image,\n Icon,\n Video,\n AudioPlayer,\n Row,\n Column,\n List,\n Card,\n Tabs,\n Divider,\n Modal,\n Button,\n TextField,\n CheckBox,\n ChoicePicker,\n Slider,\n DateTimeInput,\n};\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createReactComponent } from \"../../../adapter\";\nimport { z } from \"zod\";\nimport { CommonSchemas } from \"@a2ui/web_core/v0_9\";\n\nexport const TextSchema = z.object({\n text: CommonSchemas.DynamicString,\n variant: z.enum([\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"caption\", \"body\"]).optional(),\n});\n\nexport const TextApiDef = {\n name: \"Text\",\n schema: TextSchema,\n};\n\nexport const Text = createReactComponent(TextApiDef, ({ props }) => {\n const text = props.text ?? \"\";\n switch (props.variant) {\n case \"h1\":\n return <h1>{text}</h1>;\n case \"h2\":\n return <h2>{text}</h2>;\n case \"h3\":\n return <h3>{text}</h3>;\n case \"h4\":\n return <h4>{text}</h4>;\n case \"h5\":\n return <h5>{text}</h5>;\n case \"caption\":\n return <small>{text}</small>;\n case \"body\":\n default:\n return <span>{text}</span>;\n }\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { z } from \"zod\";\nimport { CommonSchemas } from \"@a2ui/web_core/v0_9\";\n\nexport const ButtonSchema = z.object({\n child: CommonSchemas.ComponentId,\n action: CommonSchemas.Action,\n variant: z.enum([\"primary\", \"borderless\"]).optional(),\n});\n\nexport const ButtonApiDef = {\n name: \"Button\",\n schema: ButtonSchema,\n};\n\nexport const Button = createReactComponent(\n ButtonApiDef,\n ({ props, buildChild }) => {\n const style: React.CSSProperties = {\n padding: \"8px 16px\",\n cursor: \"pointer\",\n border: props.variant === \"borderless\" ? \"none\" : \"1px solid #ccc\",\n backgroundColor: props.variant === \"primary\" ? \"#007bff\" : \"transparent\",\n color: props.variant === \"primary\" ? \"#fff\" : \"inherit\",\n borderRadius: \"4px\",\n };\n\n return (\n <button style={style} onClick={props.action}>\n {props.child ? buildChild(props.child) : null}\n </button>\n );\n },\n);\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\nexport const ChildList: React.FC<{\n childList: unknown;\n buildChild: (id: string, basePath?: string) => React.ReactNode;\n}> = ({ childList, buildChild }) => {\n if (Array.isArray(childList)) {\n return (\n <>\n {childList.map((item: unknown, i: number) => {\n // The new binder outputs objects like { id: string, basePath: string } for arrays of structural nodes\n if (item && typeof item === \"object\" && \"id\" in item) {\n const node = item as { id: string; basePath?: string };\n return (\n <React.Fragment key={`${node.id}-${i}`}>\n {buildChild(node.id, node.basePath)}\n </React.Fragment>\n );\n }\n // Fallback for static string lists\n if (typeof item === \"string\") {\n return (\n <React.Fragment key={`${item}-${i}`}>\n {buildChild(item)}\n </React.Fragment>\n );\n }\n return null;\n })}\n </>\n );\n }\n\n return null;\n};\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createReactComponent } from \"../../../adapter\";\nimport { z } from \"zod\";\nimport { CommonSchemas } from \"@a2ui/web_core/v0_9\";\nimport { ChildList } from \"./ChildList\";\n\nexport const RowSchema = z.object({\n children: CommonSchemas.ChildList,\n justify: z\n .enum([\n \"center\",\n \"end\",\n \"spaceAround\",\n \"spaceBetween\",\n \"spaceEvenly\",\n \"start\",\n \"stretch\",\n ])\n .optional(),\n align: z.enum([\"start\", \"center\", \"end\", \"stretch\"]).optional(),\n});\n\nconst mapJustify = (j?: string) => {\n switch (j) {\n case \"center\":\n return \"center\";\n case \"end\":\n return \"flex-end\";\n case \"spaceAround\":\n return \"space-around\";\n case \"spaceBetween\":\n return \"space-between\";\n case \"spaceEvenly\":\n return \"space-evenly\";\n case \"start\":\n return \"flex-start\";\n case \"stretch\":\n return \"stretch\";\n default:\n return \"flex-start\";\n }\n};\n\nconst mapAlign = (a?: string) => {\n switch (a) {\n case \"start\":\n return \"flex-start\";\n case \"center\":\n return \"center\";\n case \"end\":\n return \"flex-end\";\n case \"stretch\":\n return \"stretch\";\n default:\n return \"stretch\";\n }\n};\n\nexport const RowApiDef = {\n name: \"Row\",\n schema: RowSchema,\n};\n\nexport const Row = createReactComponent(RowApiDef, ({ props, buildChild }) => {\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: mapJustify(props.justify),\n alignItems: mapAlign(props.align),\n }}\n >\n <ChildList childList={props.children} buildChild={buildChild} />\n </div>\n );\n});\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createReactComponent } from \"../../../adapter\";\nimport { z } from \"zod\";\nimport { CommonSchemas } from \"@a2ui/web_core/v0_9\";\nimport { ChildList } from \"./ChildList\";\n\nexport const ColumnSchema = z.object({\n children: CommonSchemas.ChildList,\n justify: z\n .enum([\n \"start\",\n \"center\",\n \"end\",\n \"spaceBetween\",\n \"spaceAround\",\n \"spaceEvenly\",\n \"stretch\",\n ])\n .optional(),\n align: z.enum([\"center\", \"end\", \"start\", \"stretch\"]).optional(),\n});\n\nconst mapJustify = (j?: string) => {\n switch (j) {\n case \"center\":\n return \"center\";\n case \"end\":\n return \"flex-end\";\n case \"spaceAround\":\n return \"space-around\";\n case \"spaceBetween\":\n return \"space-between\";\n case \"spaceEvenly\":\n return \"space-evenly\";\n case \"start\":\n return \"flex-start\";\n case \"stretch\":\n return \"stretch\";\n default:\n return \"flex-start\";\n }\n};\n\nconst mapAlign = (a?: string) => {\n switch (a) {\n case \"start\":\n return \"flex-start\";\n case \"center\":\n return \"center\";\n case \"end\":\n return \"flex-end\";\n case \"stretch\":\n return \"stretch\";\n default:\n return \"stretch\";\n }\n};\n\nexport const ColumnApiDef = {\n name: \"Column\",\n schema: ColumnSchema,\n};\n\nexport const Column = createReactComponent(\n ColumnApiDef,\n ({ props, buildChild }) => {\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: mapJustify(props.justify),\n alignItems: mapAlign(props.align),\n gap: \"8px\",\n }}\n >\n <ChildList childList={props.children} buildChild={buildChild} />\n </div>\n );\n },\n);\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { z } from \"zod\";\nimport { CommonSchemas } from \"@a2ui/web_core/v0_9\";\n\nexport const TextFieldSchema = z.object({\n label: CommonSchemas.DynamicString,\n value: CommonSchemas.DynamicString,\n variant: z.enum([\"longText\", \"number\", \"shortText\", \"obscured\"]).optional(),\n validationRegexp: z.string().optional(),\n});\n\nexport const TextFieldApiDef = {\n name: \"TextField\",\n schema: TextFieldSchema,\n};\n\nexport const TextField = createReactComponent(\n TextFieldApiDef,\n ({ props, context }) => {\n const onChange = (\n e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,\n ) => {\n if (props.setValue) {\n props.setValue(e.target.value);\n }\n };\n\n const isLong = props.variant === \"longText\";\n const type =\n props.variant === \"number\"\n ? \"number\"\n : props.variant === \"obscured\"\n ? \"password\"\n : \"text\";\n\n const style: React.CSSProperties = {\n padding: \"8px\",\n width: \"100%\",\n border: \"1px solid #ccc\",\n borderRadius: \"4px\",\n boxSizing: \"border-box\",\n };\n\n const id = `textfield-${context.componentModel.id}`;\n\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"4px\",\n width: \"100%\",\n }}\n >\n {props.label && (\n <label htmlFor={id} style={{ fontSize: \"14px\", fontWeight: \"bold\" }}>\n {props.label}\n </label>\n )}\n {isLong ? (\n <textarea\n id={id}\n style={style}\n value={props.value || \"\"}\n onChange={onChange}\n />\n ) : (\n <input\n id={id}\n type={type}\n style={style}\n value={props.value || \"\"}\n onChange={onChange}\n />\n )}\n </div>\n );\n },\n);\n","/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Catalog, createFunctionImplementation } from \"@a2ui/web_core/v0_9\";\nimport { Text } from \"./components/Text\";\nimport { Button } from \"./components/Button\";\nimport { Row } from \"./components/Row\";\nimport { Column } from \"./components/Column\";\nimport { TextField } from \"./components/TextField\";\nimport type { ReactComponentImplementation } from \"../../adapter\";\nimport { z } from \"zod\";\n\nconst minimalComponents: ReactComponentImplementation[] = [\n Text,\n Button,\n Row,\n Column,\n TextField,\n];\n\nexport const minimalCatalog = new Catalog<ReactComponentImplementation>(\n \"https://a2ui.org/specification/v0_9/catalogs/minimal/minimal_catalog.json\",\n minimalComponents,\n [\n createFunctionImplementation(\n {\n name: \"capitalize\",\n returnType: \"string\",\n schema: z.object({\n value: z.unknown(),\n }),\n },\n (args) => {\n const val = args.value;\n if (typeof val === \"string\") {\n return val.toUpperCase();\n }\n return val as string;\n },\n ),\n ],\n);\n\nexport { Text, Button, Row, Column, TextField };\n","import { createContext, useContext, type ReactNode } from \"react\";\n\ntype ThemeType = Record<string, unknown>;\n\n/** React context for the A2UI theme. */\nconst ThemeContext = createContext<ThemeType | undefined>(undefined);\n\nexport interface ThemeProviderProps {\n theme?: ThemeType;\n children: ReactNode;\n}\n\nexport function ThemeProvider({ theme, children }: ThemeProviderProps) {\n return (\n <ThemeContext.Provider value={theme ?? {}}>\n {children}\n </ThemeContext.Provider>\n );\n}\n\nexport function useTheme(): ThemeType {\n const theme = useContext(ThemeContext);\n if (!theme) {\n throw new Error(\n \"useTheme must be used within a ThemeProvider or A2UIProvider\",\n );\n }\n return theme;\n}\n\nexport function useThemeOptional(): ThemeType | undefined {\n return useContext(ThemeContext);\n}\n","import {\n createContext,\n useContext,\n useRef,\n useState,\n useMemo,\n type ReactNode,\n} from \"react\";\nimport { MessageProcessor } from \"@a2ui/web_core/v0_9\";\nimport { basicCatalog } from \"../a2ui-react\";\nimport type { A2UIContextValue, A2UIActions } from \"./store\";\nimport { ThemeProvider } from \"../theme/ThemeContext\";\nimport type { OnActionCallback } from \"../types\";\nimport type { A2UIClientEventMessage, Theme } from \"../../a2ui-types\";\n\n/**\n * Context for stable actions (never changes reference, prevents re-renders).\n */\nconst A2UIActionsContext = createContext<A2UIActions | null>(null);\n\n/**\n * Context for reactive state (changes trigger re-renders).\n */\nconst A2UIStateContext = createContext<{\n version: number;\n error: string | null;\n} | null>(null);\n\n/**\n * Props for the A2UIProvider component.\n */\nexport interface A2UIProviderProps {\n /** Callback invoked when a user action is dispatched (button click, etc.) */\n onAction?: OnActionCallback;\n /** Theme configuration */\n theme?: Theme;\n /** Optional component catalog to use instead of the default basicCatalog */\n catalog?: any;\n /** Child components */\n children: ReactNode;\n}\n\n/**\n * Provider component that sets up the A2UI v0.9 context for descendant components.\n * Uses a two-context architecture for performance:\n * - A2UIActionsContext: Stable actions that never change (no re-renders)\n * - A2UIStateContext: Reactive state that triggers re-renders when needed\n */\nexport function A2UIProvider({\n onAction,\n theme,\n catalog,\n children,\n}: A2UIProviderProps) {\n // Store onAction in a ref so callbacks always have the latest value\n const onActionRef = useRef<OnActionCallback | null>(onAction ?? null);\n onActionRef.current = onAction ?? null;\n\n // Create v0.9 MessageProcessor only once using ref\n const processorRef = useRef<MessageProcessor<any> | null>(null);\n if (!processorRef.current) {\n processorRef.current = new MessageProcessor(\n [catalog ?? basicCatalog],\n // Action handler: convert v0.9 Action to A2UIClientEventMessage format\n (action: any) => {\n if (onActionRef.current) {\n const message: A2UIClientEventMessage = {\n userAction: {\n name: action?.name ?? \"unknown\",\n surfaceId: action?.surfaceId ?? \"default\",\n sourceComponentId: action?.sourceComponentId,\n context: action?.context,\n timestamp: action?.timestamp ?? new Date().toISOString(),\n },\n };\n onActionRef.current(message);\n }\n },\n );\n }\n const processor = processorRef.current;\n\n // Version counter for triggering re-renders\n const [version, setVersion] = useState(0);\n\n // Error state for graceful error handling\n const [error, setError] = useState<string | null>(null);\n\n // Create stable actions object once - stored in ref, never changes\n const actionsRef = useRef<A2UIActions | null>(null);\n if (!actionsRef.current) {\n actionsRef.current = {\n processMessages: (messages: Array<Record<string, unknown>>) => {\n try {\n processor.processMessages(messages as any[]);\n } catch (err) {\n console.warn(\"[A2UI] processMessages error:\", err);\n setError(err instanceof Error ? err.message : String(err));\n return;\n }\n setError(null);\n setVersion((v) => v + 1);\n },\n\n dispatch: (message: any) => {\n if (onActionRef.current) {\n onActionRef.current(message);\n }\n },\n\n getSurface: (surfaceId: string) => {\n return processor.model.getSurface(surfaceId);\n },\n\n clearSurfaces: () => {\n // Process a deleteSurface for all known surfaces\n const surfaces = processor.model.surfacesMap;\n for (const [id] of surfaces) {\n processor.processMessages([\n { version: \"v0.9\", deleteSurface: { surfaceId: id } } as any,\n ]);\n }\n setVersion((v) => v + 1);\n },\n };\n }\n const actions = actionsRef.current;\n\n // State context value - changes when version or error changes\n const stateValue = useMemo(() => ({ version, error }), [version, error]);\n\n return (\n <A2UIActionsContext.Provider value={actions}>\n <A2UIStateContext.Provider value={stateValue}>\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </A2UIStateContext.Provider>\n </A2UIActionsContext.Provider>\n );\n}\n\n/**\n * Hook to access stable A2UI actions (won't cause re-renders).\n */\nexport function useA2UIActions(): A2UIActions {\n const actions = useContext(A2UIActionsContext);\n if (!actions) {\n throw new Error(\"useA2UIActions must be used within an A2UIProvider\");\n }\n return actions;\n}\n\n/**\n * Hook to subscribe to A2UI state changes.\n */\nexport function useA2UIState(): { version: number } {\n const state = useContext(A2UIStateContext);\n if (!state) {\n throw new Error(\"useA2UIState must be used within an A2UIProvider\");\n }\n return state;\n}\n\n/**\n * Hook to access the full A2UI context (actions + state).\n */\nexport function useA2UIContext(): A2UIContextValue {\n const actions = useA2UIActions();\n const state = useA2UIState();\n\n return useMemo(\n () => ({\n ...actions,\n version: state.version,\n onAction: null,\n }),\n [actions, state.version],\n );\n}\n\n/** @deprecated Use useA2UIContext instead. */\nexport const useA2UIStore = useA2UIContext;\n\n/**\n * Hook to access the current A2UI error state.\n */\nexport function useA2UIError(): string | null {\n const state = useContext(A2UIStateContext);\n return state?.error ?? null;\n}\n\n/** @deprecated Use useA2UIContext() or useA2UI() directly instead. */\nexport function useA2UIStoreSelector<T>(\n selector: (state: A2UIContextValue) => T,\n): T {\n const context = useA2UIContext();\n return selector(context);\n}\n","import { useA2UIActions, useA2UIState } from \"../core/A2UIProvider\";\n\n/**\n * Result returned by the useA2UI hook.\n */\nexport interface UseA2UIResult {\n /** Process incoming v0.9 A2UI messages */\n processMessages: (messages: Array<Record<string, unknown>>) => void;\n\n /** Get a surface model by ID */\n getSurface: (surfaceId: string) => any | undefined;\n\n /** Clear all surfaces */\n clearSurfaces: () => void;\n\n /** The current version number (increments on state changes) */\n version: number;\n}\n\n/**\n * Main API hook for A2UI v0.9. Provides methods to process messages\n * and access surface state.\n */\nexport function useA2UI(): UseA2UIResult {\n const actions = useA2UIActions();\n const state = useA2UIState();\n\n return {\n processMessages: actions.processMessages,\n getSurface: actions.getSurface,\n clearSurfaces: actions.clearSurfaces,\n version: state.version,\n };\n}\n","import { clsx, type ClassValue } from \"clsx\";\n\n/**\n * Utility function to merge class names.\n */\nexport function cn(...inputs: ClassValue[]): string {\n return clsx(inputs);\n}\n","import { Suspense, memo, type ReactNode } from \"react\";\nimport { useA2UI } from \"../hooks/useA2UI\";\nimport { A2uiSurface } from \"../a2ui-react\";\nimport { cn } from \"../lib/utils\";\n\n/** Default loading fallback - memoized to prevent recreation */\nconst DefaultLoadingFallback = memo(function DefaultLoadingFallback() {\n return (\n <div className=\"a2ui-loading\" style={{ padding: \"16px\", opacity: 0.5 }}>\n Loading...\n </div>\n );\n});\n\nexport interface A2UIRendererProps {\n /** The surface ID to render */\n surfaceId: string;\n /** Additional CSS classes for the surface container */\n className?: string;\n /** Fallback content when surface is not yet available */\n fallback?: ReactNode;\n /** Loading fallback for lazy-loaded components */\n loadingFallback?: ReactNode;\n /** @deprecated - No longer needed in v0.9, components come from catalog */\n registry?: any;\n}\n\n/**\n * A2UIRenderer - renders an A2UI surface using the v0.9 renderer.\n *\n * Uses A2uiSurface from a2ui-react which handles all component\n * rendering internally via the catalog system.\n */\nexport const A2UIRenderer = memo(function A2UIRenderer({\n surfaceId,\n className,\n fallback = null,\n loadingFallback,\n}: A2UIRendererProps) {\n const { getSurface, version } = useA2UI();\n\n // Get v0.9 SurfaceModel - this will re-render when version changes\n const surface = getSurface(surfaceId);\n\n // No surface yet\n if (!surface) {\n return <>{fallback}</>;\n }\n\n // Use provided fallback or default memoized component\n const actualLoadingFallback = loadingFallback ?? <DefaultLoadingFallback />;\n\n return (\n <div\n className={cn(\"a2ui-surface\", className)}\n data-surface-id={surfaceId}\n data-version={version}\n >\n <Suspense fallback={actualLoadingFallback}>\n <A2uiSurface surface={surface} />\n </Suspense>\n </div>\n );\n});\n\nexport default A2UIRenderer;\n","import { basicCatalog } from \"./a2ui-react\";\nimport type { ComponentApi, Catalog } from \"@a2ui/web_core/v0_9\";\nimport { zodToJsonSchema } from \"zod-to-json-schema\";\n\nconst BASIC_CATALOG_ID =\n \"https://a2ui.org/specification/v0_9/basic_catalog.json\";\n\n/**\n * Context description used to identify the A2UI component schema in RunAgentInput.context.\n * Must match the constant in @ag-ui/a2ui-middleware so the middleware can overwrite\n * a frontend-provided schema with a server-side one.\n */\nexport const A2UI_SCHEMA_CONTEXT_DESCRIPTION =\n \"A2UI Component Schema — available components for generating UI surfaces. Use these component names and props when creating A2UI operations.\";\n\n/**\n * Check whether a catalog is a superset of the basic catalog\n * (i.e., it contains all basic components by name).\n */\nexport function extendsBasicCatalog(catalog: Catalog<ComponentApi>): boolean {\n for (const name of basicCatalog.components.keys()) {\n if (!catalog.components.has(name)) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Return the names of components in a catalog that are not in the basic catalog.\n */\nexport function getCustomComponentNames(\n catalog: Catalog<ComponentApi>,\n): string[] {\n const custom: string[] = [];\n for (const name of catalog.components.keys()) {\n if (!basicCatalog.components.has(name)) {\n custom.push(name);\n }\n }\n return custom;\n}\n\n/**\n * Build a context string describing the available A2UI catalog and custom components.\n * Custom components (those not in the basic catalog) are described using their\n * JSON Schema representation, matching the canonical A2UI catalog format.\n */\nexport function buildCatalogContextValue(\n catalog?: Catalog<ComponentApi>,\n): string {\n const resolved = catalog ?? basicCatalog;\n const lines: string[] = [];\n lines.push(\"Available A2UI catalog:\");\n\n if (resolved.id === BASIC_CATALOG_ID) {\n lines.push(`- ${resolved.id} (basic catalog)`);\n return lines.join(\"\\n\");\n }\n\n const isSuperset = extendsBasicCatalog(resolved);\n const customNames = getCustomComponentNames(resolved);\n\n lines.push(`- ${resolved.id}`);\n if (isSuperset) {\n lines.push(\n \" Extends the basic catalog with all standard components plus:\",\n );\n } else {\n lines.push(\" Custom catalog (does NOT include all basic components).\");\n lines.push(\" Custom components:\");\n }\n\n for (const name of customNames) {\n const comp = resolved.components.get(name);\n if (!comp) continue;\n const jsonSchema = zodToJsonSchema(comp.schema);\n lines.push(` - ${name}:`);\n lines.push(\n ` ${JSON.stringify(jsonSchema, null, 2).split(\"\\n\").join(\"\\n \")}`,\n );\n }\n\n return lines.join(\"\\n\");\n}\n\n/**\n * Extract component schemas from a catalog in the same format used by\n * the A2UI middleware (`A2UIComponentSchema[]`). Each component's Zod\n * schema is converted to JSON Schema via zod-to-json-schema.\n *\n * When sent via `useAgentContext` with `A2UI_SCHEMA_CONTEXT_DESCRIPTION`,\n * the middleware can optionally overwrite it with a server-side schema.\n */\nexport function extractCatalogComponentSchemas(\n catalog?: Catalog<ComponentApi>,\n): Array<{ name: string; props: Record<string, unknown> }> {\n const resolved = catalog ?? basicCatalog;\n const schemas: Array<{ name: string; props: Record<string, unknown> }> = [];\n\n for (const [name, comp] of resolved.components) {\n schemas.push({\n name,\n props: zodToJsonSchema(comp.schema, { target: \"openApi3\" }) as Record<\n string,\n unknown\n >,\n });\n }\n\n return schemas;\n}\n","import { z, type ZodObject, type ZodRawShape } from \"zod\";\nimport { Catalog } from \"@a2ui/web_core/v0_9\";\nimport { BASIC_FUNCTIONS } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { basicCatalog, createReactComponent } from \"./a2ui-react\";\nimport type { ReactComponentImplementation } from \"./a2ui-react\";\nimport type { ComponentApi } from \"@a2ui/web_core/v0_9\";\n\n// ─── Catalog Definitions (platform-agnostic) ─────────────────────────\n\n/**\n * A single component definition — Zod props schema + optional description.\n * Platform-agnostic: no React or rendering details.\n */\nexport interface CatalogComponentDefinition<\n T extends ZodRawShape = ZodRawShape,\n> {\n /** Zod schema for component props */\n props: ZodObject<T>;\n /** Description for the AI agent */\n description?: string;\n}\n\n/**\n * A record mapping component names to their definitions.\n * This is the platform-agnostic \"contract\" that agents use.\n */\nexport type CatalogDefinitions = Record<\n string,\n CatalogComponentDefinition<any>\n>;\n\n/**\n * Infer the props type for a specific component in the definitions.\n */\nexport type PropsOf<D extends CatalogDefinitions, K extends keyof D> = z.infer<\n D[K][\"props\"]\n>;\n\n// ─── Catalog Renderers (platform-specific) ───────────────────────────\n\n/**\n * Props passed to a renderer function.\n */\nexport interface RendererProps<T = Record<string, unknown>> {\n /** Resolved prop values from the A2UI data model */\n props: T;\n /** Render a child component by ID */\n children: (id: string) => React.ReactNode;\n /** Dispatch an A2UI action from this component (e.g., on button click) */\n dispatch?: (action: any) => void;\n}\n\n/**\n * A renderer function for a component.\n */\nexport type ComponentRenderer<T = Record<string, unknown>> = React.FC<\n RendererProps<T>\n>;\n\n/**\n * A record mapping component names to React renderer functions.\n * Type-checked against the catalog definitions.\n */\nexport type CatalogRenderers<D extends CatalogDefinitions> = {\n [K in keyof D]: ComponentRenderer<z.infer<D[K][\"props\"]>>;\n};\n\n// ─── Create Catalog ──────────────────────────────────────────────────\n\n/**\n * Create an A2UI catalog from definitions and renderers.\n *\n * Definitions are platform-agnostic (Zod schemas + descriptions).\n * Renderers are platform-specific (React components).\n * TypeScript enforces that renderers match definitions exactly.\n *\n * @example\n * ```tsx\n * // schema.ts (platform-agnostic)\n * export const demoCatalogDefinitions = {\n * Card: {\n * description: \"A card container\",\n * props: z.object({ title: z.string(), child: z.string().optional() }),\n * },\n * } satisfies CatalogDefinitions;\n *\n * // catalog.tsx (React renderers)\n * export const demoCatalog = createCatalog(demoCatalogDefinitions, {\n * Card: ({ props, children }) => (\n * <div>{props.title}{props.child && children(props.child)}</div>\n * ),\n * });\n * ```\n */\nexport function createCatalog<D extends CatalogDefinitions>(\n definitions: D,\n renderers: CatalogRenderers<D>,\n options?: {\n /** Catalog ID. Defaults to a generated URI. */\n catalogId?: string;\n /** If true, merge the built-in basic catalog components (Text, Button, Row, etc.) into this catalog. Default: false */\n includeBasicCatalog?: boolean;\n },\n): Catalog<ReactComponentImplementation> {\n const catalogId = options?.catalogId ?? \"copilotkit://custom-catalog\";\n const includeBasic = options?.includeBasicCatalog === true;\n\n const customComponents: ReactComponentImplementation[] = [];\n\n for (const [name, def] of Object.entries(definitions)) {\n const api: ComponentApi = {\n name,\n schema: def.props,\n };\n\n const renderer = (renderers as Record<string, ComponentRenderer<any>>)[\n name\n ];\n const wrapped = createReactComponent(\n api,\n ({ props, buildChild, context }) => {\n const Render = renderer;\n const dispatch = (action: any) => context.dispatchAction(action);\n return (\n <Render props={props} children={buildChild} dispatch={dispatch} />\n );\n },\n );\n\n customComponents.push(wrapped);\n }\n\n const allComponents = includeBasic\n ? [...Array.from(basicCatalog.components.values()), ...customComponents]\n : customComponents;\n\n const functions = includeBasic\n ? Array.from(basicCatalog.functions.values())\n : [];\n\n return new Catalog<ReactComponentImplementation>(\n catalogId,\n allComponents,\n functions,\n );\n}\n\n// ─── Extract Schema (for runtime) ────────────────────────────────────\n\n/**\n * Extract a JSON-serializable schema from catalog definitions.\n * Suitable for passing to the runtime's `a2ui.schema` config.\n */\nexport function extractSchema(definitions: CatalogDefinitions): Array<{\n name: string;\n description?: string;\n props?: Record<string, unknown>;\n}> {\n return Object.entries(definitions).map(([name, def]) => ({\n name,\n description: def.description,\n props: zodSchemaToSimpleObject(def.props),\n }));\n}\n\nfunction zodSchemaToSimpleObject(\n schema: ZodObject<any>,\n): Record<string, unknown> {\n const shape = schema.shape;\n const properties: Record<string, { type: string; description?: string }> = {};\n for (const [key, value] of Object.entries(shape)) {\n const zodValue = value as any;\n properties[key] = {\n type: zodValue._def?.typeName ?? \"unknown\",\n ...(zodValue.description ? { description: zodValue.description } : {}),\n };\n }\n return { type: \"object\", properties };\n}\n\n// ─── Backward Compatibility ──────────────────────────────────────────\n\n// Old API — definitions + renderers combined in one object\nexport interface A2UIComponentDefinition<T extends ZodRawShape = ZodRawShape> {\n props: ZodObject<T>;\n description?: string;\n render: React.FC<RendererProps<z.infer<ZodObject<T>>>>;\n}\n\nexport type A2UIComponentMap = Record<string, A2UIComponentDefinition<any>>;\n\n/**\n * @deprecated Use `createCatalog(definitions, renderers)` instead.\n */\nexport function createA2UICatalog(\n components: A2UIComponentMap,\n options?: {\n catalogId?: string;\n includeBasicCatalog?: boolean;\n },\n): Catalog<ReactComponentImplementation> {\n const definitions: CatalogDefinitions = {};\n const renderers: Record<string, ComponentRenderer<any>> = {};\n\n for (const [name, def] of Object.entries(components)) {\n definitions[name] = { props: def.props, description: def.description };\n renderers[name] = def.render;\n }\n\n return createCatalog(definitions, renderers as any, options);\n}\n\n/**\n * @deprecated Use `extractSchema(definitions)` instead.\n */\nexport function extractA2UISchema(components: A2UIComponentMap): Array<{\n name: string;\n description?: string;\n props?: Record<string, unknown>;\n}> {\n const definitions: CatalogDefinitions = {};\n for (const [name, def] of Object.entries(components)) {\n definitions[name] = { props: def.props, description: def.description };\n }\n return extractSchema(definitions);\n}\n","/**\n * v0.9: Styles are now handled by a2ui-react components internally.\n * These functions are kept as no-ops for backward compatibility.\n */\n\nexport function injectStyles(): void {\n // v0.9: styles are inline in a2ui-react components (no external injection needed)\n}\n\nexport function removeStyles(): void {\n // v0.9: no-op\n}\n","// Core components and provider\nexport {\n A2UIProvider,\n useA2UIActions,\n useA2UIState,\n useA2UIContext,\n useA2UIStore, // @deprecated - use useA2UIContext\n useA2UIStoreSelector, // @deprecated - use useA2UIContext or useA2UI\n useA2UIError,\n} from \"./core/A2UIProvider\";\nexport type { A2UIProviderProps } from \"./core/A2UIProvider\";\nexport { A2UIRenderer } from \"./core/A2UIRenderer\";\nexport type { A2UIRendererProps } from \"./core/A2UIRenderer\";\n\n// Hooks\nexport { useA2UI } from \"./hooks/useA2UI\";\nexport type { UseA2UIResult } from \"./hooks/useA2UI\";\n\n// Theme\nexport {\n ThemeProvider,\n useTheme,\n useThemeOptional,\n} from \"./theme/ThemeContext\";\n\n// Utilities\nexport { cn } from \"./lib/utils\";\n\n// Catalog utilities\nexport {\n A2UI_SCHEMA_CONTEXT_DESCRIPTION,\n extendsBasicCatalog,\n getCustomComponentNames,\n buildCatalogContextValue,\n extractCatalogComponentSchemas,\n} from \"./catalog-utils\";\n\n// Catalog creation — new API (definitions + renderers)\nexport { createCatalog, extractSchema } from \"./create-catalog\";\nexport type {\n CatalogComponentDefinition,\n CatalogDefinitions,\n CatalogRenderers,\n RendererProps,\n ComponentRenderer,\n PropsOf,\n} from \"./create-catalog\";\n\n// Catalog creation — deprecated API (combined definitions + renderers)\nexport { createA2UICatalog, extractA2UISchema } from \"./create-catalog\";\nexport type {\n A2UIComponentDefinition,\n A2UIComponentMap,\n} from \"./create-catalog\";\n\n// Styles\nexport { injectStyles, removeStyles } from \"./styles\";\n\n// Types\nexport type {\n Types,\n Primitives,\n AnyComponentNode,\n Surface,\n SurfaceID,\n Theme,\n ServerToClientMessage,\n A2UIClientEventMessage,\n Action,\n DataValue,\n MessageProcessor,\n StringValue,\n NumberValue,\n BooleanValue,\n A2UIComponentProps,\n ComponentRegistration,\n ComponentLoader,\n OnActionCallback,\n A2UIProviderConfig,\n} from \"./types\";\n\n// Low-level a2ui-react primitives (vendored from @a2ui/react)\nexport { createReactComponent } from \"./a2ui-react/adapter\";\nexport type { ReactComponentImplementation } from \"./a2ui-react/adapter\";\nexport { basicCatalog } from \"./a2ui-react/catalog/basic\";\nexport { Catalog } from \"@a2ui/web_core/v0_9\";\n\n// Backward compat: no-op functions for initializeDefaultCatalog\nexport function registerDefaultCatalog() {\n /* v0.9: catalog is built-in */\n}\nexport function initializeDefaultCatalog() {\n /* v0.9: catalog is built-in */\n}\n\n// Backward compat: defaultTheme export (v0.9 themes are handled internally)\nexport const defaultTheme: Record<string, unknown> = {};\nexport const litTheme = defaultTheme;\n","/**\n * v0.9 A2UI type definitions for CopilotKit integration.\n */\n\n/** Theme type - v0.9 themes are passed via createSurface message */\nexport type Theme = Record<string, unknown>;\n\n/**\n * Client event message dispatched when a user interacts with an A2UI surface.\n * This is the format expected by A2UIMessageRenderer's handleAction.\n */\nexport interface A2UIClientEventMessage {\n userAction?: {\n name: string;\n surfaceId: string;\n sourceComponentId?: string;\n context?: Record<string, unknown>;\n timestamp?: string;\n dataContextPath?: string;\n };\n}\n\n/** Default surface ID when none is specified */\nexport const DEFAULT_SURFACE_ID = \"default\";\n","/*\n Copyright 2025 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\nexport * from \"./react-renderer/index.js\";\nexport { DEFAULT_SURFACE_ID } from \"./a2ui-types.js\";\nexport type { Theme, A2UIClientEventMessage } from \"./a2ui-types.js\";\n\n// Backward compat: viewerTheme (v0.9 themes handled internally)\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