@copilotkit/a2ui-renderer 1.60.2 → 1.61.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 (295) hide show
  1. package/dist/web-components/_virtual/_rolldown/runtime.cjs +19 -0
  2. package/dist/web-components/_virtual/_rolldown/runtime.mjs +18 -0
  3. package/dist/web-components/a2ui-types.d.cts +23 -0
  4. package/dist/web-components/a2ui-types.d.cts.map +1 -0
  5. package/dist/web-components/a2ui-types.d.mts +23 -0
  6. package/dist/web-components/a2ui-types.d.mts.map +1 -0
  7. package/dist/web-components/adapter.cjs +33 -0
  8. package/dist/web-components/adapter.cjs.map +1 -0
  9. package/dist/web-components/adapter.d.cts +12 -0
  10. package/dist/web-components/adapter.d.cts.map +1 -0
  11. package/dist/web-components/adapter.d.mts +12 -0
  12. package/dist/web-components/adapter.d.mts.map +1 -0
  13. package/dist/web-components/adapter.mjs +32 -0
  14. package/dist/web-components/adapter.mjs.map +1 -0
  15. package/dist/web-components/bound-component.cjs +71 -0
  16. package/dist/web-components/bound-component.cjs.map +1 -0
  17. package/dist/web-components/bound-component.d.cts +44 -0
  18. package/dist/web-components/bound-component.d.cts.map +1 -0
  19. package/dist/web-components/bound-component.d.mts +44 -0
  20. package/dist/web-components/bound-component.d.mts.map +1 -0
  21. package/dist/web-components/bound-component.mjs +71 -0
  22. package/dist/web-components/bound-component.mjs.map +1 -0
  23. package/dist/web-components/catalog/basic/audio-player.cjs +32 -0
  24. package/dist/web-components/catalog/basic/audio-player.cjs.map +1 -0
  25. package/dist/web-components/catalog/basic/audio-player.d.cts +8 -0
  26. package/dist/web-components/catalog/basic/audio-player.d.cts.map +1 -0
  27. package/dist/web-components/catalog/basic/audio-player.d.mts +8 -0
  28. package/dist/web-components/catalog/basic/audio-player.d.mts.map +1 -0
  29. package/dist/web-components/catalog/basic/audio-player.mjs +32 -0
  30. package/dist/web-components/catalog/basic/audio-player.mjs.map +1 -0
  31. package/dist/web-components/catalog/basic/button.cjs +33 -0
  32. package/dist/web-components/catalog/basic/button.cjs.map +1 -0
  33. package/dist/web-components/catalog/basic/button.d.cts +8 -0
  34. package/dist/web-components/catalog/basic/button.d.cts.map +1 -0
  35. package/dist/web-components/catalog/basic/button.d.mts +8 -0
  36. package/dist/web-components/catalog/basic/button.d.mts.map +1 -0
  37. package/dist/web-components/catalog/basic/button.mjs +33 -0
  38. package/dist/web-components/catalog/basic/button.mjs.map +1 -0
  39. package/dist/web-components/catalog/basic/card.cjs +23 -0
  40. package/dist/web-components/catalog/basic/card.cjs.map +1 -0
  41. package/dist/web-components/catalog/basic/card.d.cts +8 -0
  42. package/dist/web-components/catalog/basic/card.d.cts.map +1 -0
  43. package/dist/web-components/catalog/basic/card.d.mts +8 -0
  44. package/dist/web-components/catalog/basic/card.d.mts.map +1 -0
  45. package/dist/web-components/catalog/basic/card.mjs +23 -0
  46. package/dist/web-components/catalog/basic/card.mjs.map +1 -0
  47. package/dist/web-components/catalog/basic/check-box.cjs +50 -0
  48. package/dist/web-components/catalog/basic/check-box.cjs.map +1 -0
  49. package/dist/web-components/catalog/basic/check-box.d.cts +8 -0
  50. package/dist/web-components/catalog/basic/check-box.d.cts.map +1 -0
  51. package/dist/web-components/catalog/basic/check-box.d.mts +8 -0
  52. package/dist/web-components/catalog/basic/check-box.d.mts.map +1 -0
  53. package/dist/web-components/catalog/basic/check-box.mjs +50 -0
  54. package/dist/web-components/catalog/basic/check-box.mjs.map +1 -0
  55. package/dist/web-components/catalog/basic/choice-picker.cjs +90 -0
  56. package/dist/web-components/catalog/basic/choice-picker.cjs.map +1 -0
  57. package/dist/web-components/catalog/basic/choice-picker.d.cts +8 -0
  58. package/dist/web-components/catalog/basic/choice-picker.d.cts.map +1 -0
  59. package/dist/web-components/catalog/basic/choice-picker.d.mts +8 -0
  60. package/dist/web-components/catalog/basic/choice-picker.d.mts.map +1 -0
  61. package/dist/web-components/catalog/basic/choice-picker.mjs +90 -0
  62. package/dist/web-components/catalog/basic/choice-picker.mjs.map +1 -0
  63. package/dist/web-components/catalog/basic/column.cjs +27 -0
  64. package/dist/web-components/catalog/basic/column.cjs.map +1 -0
  65. package/dist/web-components/catalog/basic/column.d.cts +8 -0
  66. package/dist/web-components/catalog/basic/column.d.cts.map +1 -0
  67. package/dist/web-components/catalog/basic/column.d.mts +8 -0
  68. package/dist/web-components/catalog/basic/column.d.mts.map +1 -0
  69. package/dist/web-components/catalog/basic/column.mjs +27 -0
  70. package/dist/web-components/catalog/basic/column.mjs.map +1 -0
  71. package/dist/web-components/catalog/basic/components.cjs +44 -0
  72. package/dist/web-components/catalog/basic/components.cjs.map +1 -0
  73. package/dist/web-components/catalog/basic/components.d.cts +19 -0
  74. package/dist/web-components/catalog/basic/components.d.mts +19 -0
  75. package/dist/web-components/catalog/basic/components.mjs +44 -0
  76. package/dist/web-components/catalog/basic/components.mjs.map +1 -0
  77. package/dist/web-components/catalog/basic/date-time-input.cjs +50 -0
  78. package/dist/web-components/catalog/basic/date-time-input.cjs.map +1 -0
  79. package/dist/web-components/catalog/basic/date-time-input.d.cts +8 -0
  80. package/dist/web-components/catalog/basic/date-time-input.d.cts.map +1 -0
  81. package/dist/web-components/catalog/basic/date-time-input.d.mts +8 -0
  82. package/dist/web-components/catalog/basic/date-time-input.d.mts.map +1 -0
  83. package/dist/web-components/catalog/basic/date-time-input.mjs +50 -0
  84. package/dist/web-components/catalog/basic/date-time-input.mjs.map +1 -0
  85. package/dist/web-components/catalog/basic/divider.cjs +21 -0
  86. package/dist/web-components/catalog/basic/divider.cjs.map +1 -0
  87. package/dist/web-components/catalog/basic/divider.d.cts +8 -0
  88. package/dist/web-components/catalog/basic/divider.d.cts.map +1 -0
  89. package/dist/web-components/catalog/basic/divider.d.mts +8 -0
  90. package/dist/web-components/catalog/basic/divider.d.mts.map +1 -0
  91. package/dist/web-components/catalog/basic/divider.mjs +21 -0
  92. package/dist/web-components/catalog/basic/divider.mjs.map +1 -0
  93. package/dist/web-components/catalog/basic/icon.cjs +29 -0
  94. package/dist/web-components/catalog/basic/icon.cjs.map +1 -0
  95. package/dist/web-components/catalog/basic/icon.d.cts +8 -0
  96. package/dist/web-components/catalog/basic/icon.d.cts.map +1 -0
  97. package/dist/web-components/catalog/basic/icon.d.mts +8 -0
  98. package/dist/web-components/catalog/basic/icon.d.mts.map +1 -0
  99. package/dist/web-components/catalog/basic/icon.mjs +29 -0
  100. package/dist/web-components/catalog/basic/icon.mjs.map +1 -0
  101. package/dist/web-components/catalog/basic/ids.cjs +11 -0
  102. package/dist/web-components/catalog/basic/ids.cjs.map +1 -0
  103. package/dist/web-components/catalog/basic/ids.mjs +10 -0
  104. package/dist/web-components/catalog/basic/ids.mjs.map +1 -0
  105. package/dist/web-components/catalog/basic/image.cjs +42 -0
  106. package/dist/web-components/catalog/basic/image.cjs.map +1 -0
  107. package/dist/web-components/catalog/basic/image.d.cts +8 -0
  108. package/dist/web-components/catalog/basic/image.d.cts.map +1 -0
  109. package/dist/web-components/catalog/basic/image.d.mts +8 -0
  110. package/dist/web-components/catalog/basic/image.d.mts.map +1 -0
  111. package/dist/web-components/catalog/basic/image.mjs +42 -0
  112. package/dist/web-components/catalog/basic/image.mjs.map +1 -0
  113. package/dist/web-components/catalog/basic/index.cjs +31 -0
  114. package/dist/web-components/catalog/basic/index.cjs.map +1 -0
  115. package/dist/web-components/catalog/basic/index.d.cts +29 -0
  116. package/dist/web-components/catalog/basic/index.d.cts.map +1 -0
  117. package/dist/web-components/catalog/basic/index.d.mts +29 -0
  118. package/dist/web-components/catalog/basic/index.d.mts.map +1 -0
  119. package/dist/web-components/catalog/basic/index.mjs +30 -0
  120. package/dist/web-components/catalog/basic/index.mjs.map +1 -0
  121. package/dist/web-components/catalog/basic/list.cjs +31 -0
  122. package/dist/web-components/catalog/basic/list.cjs.map +1 -0
  123. package/dist/web-components/catalog/basic/list.d.cts +8 -0
  124. package/dist/web-components/catalog/basic/list.d.cts.map +1 -0
  125. package/dist/web-components/catalog/basic/list.d.mts +8 -0
  126. package/dist/web-components/catalog/basic/list.d.mts.map +1 -0
  127. package/dist/web-components/catalog/basic/list.mjs +31 -0
  128. package/dist/web-components/catalog/basic/list.mjs.map +1 -0
  129. package/dist/web-components/catalog/basic/modal.cjs +80 -0
  130. package/dist/web-components/catalog/basic/modal.cjs.map +1 -0
  131. package/dist/web-components/catalog/basic/modal.d.cts +8 -0
  132. package/dist/web-components/catalog/basic/modal.d.cts.map +1 -0
  133. package/dist/web-components/catalog/basic/modal.d.mts +8 -0
  134. package/dist/web-components/catalog/basic/modal.d.mts.map +1 -0
  135. package/dist/web-components/catalog/basic/modal.mjs +80 -0
  136. package/dist/web-components/catalog/basic/modal.mjs.map +1 -0
  137. package/dist/web-components/catalog/basic/row.cjs +27 -0
  138. package/dist/web-components/catalog/basic/row.cjs.map +1 -0
  139. package/dist/web-components/catalog/basic/row.d.cts +8 -0
  140. package/dist/web-components/catalog/basic/row.d.cts.map +1 -0
  141. package/dist/web-components/catalog/basic/row.d.mts +8 -0
  142. package/dist/web-components/catalog/basic/row.d.mts.map +1 -0
  143. package/dist/web-components/catalog/basic/row.mjs +27 -0
  144. package/dist/web-components/catalog/basic/row.mjs.map +1 -0
  145. package/dist/web-components/catalog/basic/slider.cjs +44 -0
  146. package/dist/web-components/catalog/basic/slider.cjs.map +1 -0
  147. package/dist/web-components/catalog/basic/slider.d.cts +8 -0
  148. package/dist/web-components/catalog/basic/slider.d.cts.map +1 -0
  149. package/dist/web-components/catalog/basic/slider.d.mts +8 -0
  150. package/dist/web-components/catalog/basic/slider.d.mts.map +1 -0
  151. package/dist/web-components/catalog/basic/slider.mjs +44 -0
  152. package/dist/web-components/catalog/basic/slider.mjs.map +1 -0
  153. package/dist/web-components/catalog/basic/tabs.cjs +58 -0
  154. package/dist/web-components/catalog/basic/tabs.cjs.map +1 -0
  155. package/dist/web-components/catalog/basic/tabs.d.cts +8 -0
  156. package/dist/web-components/catalog/basic/tabs.d.cts.map +1 -0
  157. package/dist/web-components/catalog/basic/tabs.d.mts +8 -0
  158. package/dist/web-components/catalog/basic/tabs.d.mts.map +1 -0
  159. package/dist/web-components/catalog/basic/tabs.mjs +58 -0
  160. package/dist/web-components/catalog/basic/tabs.mjs.map +1 -0
  161. package/dist/web-components/catalog/basic/text-field.cjs +60 -0
  162. package/dist/web-components/catalog/basic/text-field.cjs.map +1 -0
  163. package/dist/web-components/catalog/basic/text-field.d.cts +8 -0
  164. package/dist/web-components/catalog/basic/text-field.d.cts.map +1 -0
  165. package/dist/web-components/catalog/basic/text-field.d.mts +8 -0
  166. package/dist/web-components/catalog/basic/text-field.d.mts.map +1 -0
  167. package/dist/web-components/catalog/basic/text-field.mjs +60 -0
  168. package/dist/web-components/catalog/basic/text-field.mjs.map +1 -0
  169. package/dist/web-components/catalog/basic/text.cjs +36 -0
  170. package/dist/web-components/catalog/basic/text.cjs.map +1 -0
  171. package/dist/web-components/catalog/basic/text.d.cts +8 -0
  172. package/dist/web-components/catalog/basic/text.d.cts.map +1 -0
  173. package/dist/web-components/catalog/basic/text.d.mts +8 -0
  174. package/dist/web-components/catalog/basic/text.d.mts.map +1 -0
  175. package/dist/web-components/catalog/basic/text.mjs +36 -0
  176. package/dist/web-components/catalog/basic/text.mjs.map +1 -0
  177. package/dist/web-components/catalog/basic/utils.cjs +48 -0
  178. package/dist/web-components/catalog/basic/utils.cjs.map +1 -0
  179. package/dist/web-components/catalog/basic/utils.d.cts +1 -0
  180. package/dist/web-components/catalog/basic/utils.d.mts +1 -0
  181. package/dist/web-components/catalog/basic/utils.mjs +41 -0
  182. package/dist/web-components/catalog/basic/utils.mjs.map +1 -0
  183. package/dist/web-components/catalog/basic/video.cjs +22 -0
  184. package/dist/web-components/catalog/basic/video.cjs.map +1 -0
  185. package/dist/web-components/catalog/basic/video.d.cts +8 -0
  186. package/dist/web-components/catalog/basic/video.d.cts.map +1 -0
  187. package/dist/web-components/catalog/basic/video.d.mts +8 -0
  188. package/dist/web-components/catalog/basic/video.d.mts.map +1 -0
  189. package/dist/web-components/catalog/basic/video.mjs +22 -0
  190. package/dist/web-components/catalog/basic/video.mjs.map +1 -0
  191. package/dist/web-components/catalog/children.cjs +17 -0
  192. package/dist/web-components/catalog/children.cjs.map +1 -0
  193. package/dist/web-components/catalog/children.mjs +16 -0
  194. package/dist/web-components/catalog/children.mjs.map +1 -0
  195. package/dist/web-components/catalog/minimal/button.cjs +38 -0
  196. package/dist/web-components/catalog/minimal/button.cjs.map +1 -0
  197. package/dist/web-components/catalog/minimal/button.d.cts +284 -0
  198. package/dist/web-components/catalog/minimal/button.d.cts.map +1 -0
  199. package/dist/web-components/catalog/minimal/button.d.mts +284 -0
  200. package/dist/web-components/catalog/minimal/button.d.mts.map +1 -0
  201. package/dist/web-components/catalog/minimal/button.mjs +36 -0
  202. package/dist/web-components/catalog/minimal/button.mjs.map +1 -0
  203. package/dist/web-components/catalog/minimal/column.cjs +50 -0
  204. package/dist/web-components/catalog/minimal/column.cjs.map +1 -0
  205. package/dist/web-components/catalog/minimal/column.d.cts +68 -0
  206. package/dist/web-components/catalog/minimal/column.d.cts.map +1 -0
  207. package/dist/web-components/catalog/minimal/column.d.mts +68 -0
  208. package/dist/web-components/catalog/minimal/column.d.mts.map +1 -0
  209. package/dist/web-components/catalog/minimal/column.mjs +48 -0
  210. package/dist/web-components/catalog/minimal/column.mjs.map +1 -0
  211. package/dist/web-components/catalog/minimal/components.cjs +18 -0
  212. package/dist/web-components/catalog/minimal/components.cjs.map +1 -0
  213. package/dist/web-components/catalog/minimal/components.d.cts +12 -0
  214. package/dist/web-components/catalog/minimal/components.d.cts.map +1 -0
  215. package/dist/web-components/catalog/minimal/components.d.mts +12 -0
  216. package/dist/web-components/catalog/minimal/components.d.mts.map +1 -0
  217. package/dist/web-components/catalog/minimal/components.mjs +18 -0
  218. package/dist/web-components/catalog/minimal/components.mjs.map +1 -0
  219. package/dist/web-components/catalog/minimal/index.cjs +49 -0
  220. package/dist/web-components/catalog/minimal/index.cjs.map +1 -0
  221. package/dist/web-components/catalog/minimal/index.d.cts +17 -0
  222. package/dist/web-components/catalog/minimal/index.d.cts.map +1 -0
  223. package/dist/web-components/catalog/minimal/index.d.mts +17 -0
  224. package/dist/web-components/catalog/minimal/index.d.mts.map +1 -0
  225. package/dist/web-components/catalog/minimal/index.mjs +43 -0
  226. package/dist/web-components/catalog/minimal/index.mjs.map +1 -0
  227. package/dist/web-components/catalog/minimal/row.cjs +49 -0
  228. package/dist/web-components/catalog/minimal/row.cjs.map +1 -0
  229. package/dist/web-components/catalog/minimal/row.d.cts +68 -0
  230. package/dist/web-components/catalog/minimal/row.d.cts.map +1 -0
  231. package/dist/web-components/catalog/minimal/row.d.mts +68 -0
  232. package/dist/web-components/catalog/minimal/row.d.mts.map +1 -0
  233. package/dist/web-components/catalog/minimal/row.mjs +47 -0
  234. package/dist/web-components/catalog/minimal/row.mjs.map +1 -0
  235. package/dist/web-components/catalog/minimal/text-field.cjs +74 -0
  236. package/dist/web-components/catalog/minimal/text-field.cjs.map +1 -0
  237. package/dist/web-components/catalog/minimal/text-field.d.cts +164 -0
  238. package/dist/web-components/catalog/minimal/text-field.d.cts.map +1 -0
  239. package/dist/web-components/catalog/minimal/text-field.d.mts +164 -0
  240. package/dist/web-components/catalog/minimal/text-field.d.mts.map +1 -0
  241. package/dist/web-components/catalog/minimal/text-field.mjs +72 -0
  242. package/dist/web-components/catalog/minimal/text-field.mjs.map +1 -0
  243. package/dist/web-components/catalog/minimal/text.cjs +40 -0
  244. package/dist/web-components/catalog/minimal/text.cjs.map +1 -0
  245. package/dist/web-components/catalog/minimal/text.d.cts +92 -0
  246. package/dist/web-components/catalog/minimal/text.d.cts.map +1 -0
  247. package/dist/web-components/catalog/minimal/text.d.mts +92 -0
  248. package/dist/web-components/catalog/minimal/text.d.mts.map +1 -0
  249. package/dist/web-components/catalog/minimal/text.mjs +38 -0
  250. package/dist/web-components/catalog/minimal/text.mjs.map +1 -0
  251. package/dist/web-components/catalog/minimal/utils.cjs +26 -0
  252. package/dist/web-components/catalog/minimal/utils.cjs.map +1 -0
  253. package/dist/web-components/catalog/minimal/utils.mjs +24 -0
  254. package/dist/web-components/catalog/minimal/utils.mjs.map +1 -0
  255. package/dist/web-components/create-catalog.cjs +143 -0
  256. package/dist/web-components/create-catalog.cjs.map +1 -0
  257. package/dist/web-components/create-catalog.d.cts +44 -0
  258. package/dist/web-components/create-catalog.d.cts.map +1 -0
  259. package/dist/web-components/create-catalog.d.mts +44 -0
  260. package/dist/web-components/create-catalog.d.mts.map +1 -0
  261. package/dist/web-components/create-catalog.mjs +137 -0
  262. package/dist/web-components/create-catalog.mjs.map +1 -0
  263. package/dist/web-components/define.cjs +24 -0
  264. package/dist/web-components/define.cjs.map +1 -0
  265. package/dist/web-components/define.d.cts +19 -0
  266. package/dist/web-components/define.d.cts.map +1 -0
  267. package/dist/web-components/define.d.mts +19 -0
  268. package/dist/web-components/define.d.mts.map +1 -0
  269. package/dist/web-components/define.mjs +17 -0
  270. package/dist/web-components/define.mjs.map +1 -0
  271. package/dist/web-components/index.cjs +78 -0
  272. package/dist/web-components/index.d.cts +30 -0
  273. package/dist/web-components/index.d.mts +30 -0
  274. package/dist/web-components/index.mjs +29 -0
  275. package/dist/web-components/node.cjs +94 -0
  276. package/dist/web-components/node.cjs.map +1 -0
  277. package/dist/web-components/node.d.cts +33 -0
  278. package/dist/web-components/node.d.cts.map +1 -0
  279. package/dist/web-components/node.d.mts +33 -0
  280. package/dist/web-components/node.d.mts.map +1 -0
  281. package/dist/web-components/node.mjs +94 -0
  282. package/dist/web-components/node.mjs.map +1 -0
  283. package/dist/web-components/surface.cjs +314 -0
  284. package/dist/web-components/surface.cjs.map +1 -0
  285. package/dist/web-components/surface.d.cts +43 -0
  286. package/dist/web-components/surface.d.cts.map +1 -0
  287. package/dist/web-components/surface.d.mts +43 -0
  288. package/dist/web-components/surface.d.mts.map +1 -0
  289. package/dist/web-components/surface.mjs +314 -0
  290. package/dist/web-components/surface.mjs.map +1 -0
  291. package/dist/web-components/types.d.cts +45 -0
  292. package/dist/web-components/types.d.cts.map +1 -0
  293. package/dist/web-components/types.d.mts +45 -0
  294. package/dist/web-components/types.d.mts.map +1 -0
  295. package/package.json +38 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define.mjs","names":[],"sources":["../../src/web-components/define.ts"],"sourcesContent":["import { CpkA2uiBoundComponent } from \"./bound-component\";\nimport { CpkA2uiNode } from \"./node\";\nimport { CpkA2uiSurface } from \"./surface\";\n\nexport const CPK_A2UI_SURFACE_TAG = \"cpk-a2ui-surface\";\nexport const CPK_A2UI_NODE_TAG = \"cpk-a2ui-node\";\nexport const CPK_A2UI_BOUND_COMPONENT_TAG = \"cpk-a2ui-bound-component\";\n\nexport function defineA2UIWebComponents(): void {\n if (!customElements.get(CPK_A2UI_BOUND_COMPONENT_TAG)) {\n customElements.define(CPK_A2UI_BOUND_COMPONENT_TAG, CpkA2uiBoundComponent);\n }\n if (!customElements.get(CPK_A2UI_NODE_TAG)) {\n customElements.define(CPK_A2UI_NODE_TAG, CpkA2uiNode);\n }\n if (!customElements.get(CPK_A2UI_SURFACE_TAG)) {\n customElements.define(CPK_A2UI_SURFACE_TAG, CpkA2uiSurface);\n }\n}\n\nexport { CpkA2uiSurface, CpkA2uiNode, CpkA2uiBoundComponent };\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"cpk-a2ui-surface\": CpkA2uiSurface;\n \"cpk-a2ui-node\": CpkA2uiNode;\n \"cpk-a2ui-bound-component\": CpkA2uiBoundComponent;\n }\n}\n"],"mappings":";;;;;AAIA,MAAa,uBAAuB;AACpC,MAAa,oBAAoB;AACjC,MAAa,+BAA+B;AAE5C,SAAgB,0BAAgC;AAC9C,KAAI,CAAC,eAAe,IAAI,6BAA6B,CACnD,gBAAe,OAAO,8BAA8B,sBAAsB;AAE5E,KAAI,CAAC,eAAe,IAAI,kBAAkB,CACxC,gBAAe,OAAO,mBAAmB,YAAY;AAEvD,KAAI,CAAC,eAAe,IAAI,qBAAqB,CAC3C,gBAAe,OAAO,sBAAsB,eAAe"}
@@ -0,0 +1,78 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_bound_component = require('./bound-component.cjs');
3
+ const require_node = require('./node.cjs');
4
+ const require_adapter = require('./adapter.cjs');
5
+ const require_audio_player = require('./catalog/basic/audio-player.cjs');
6
+ const require_button = require('./catalog/basic/button.cjs');
7
+ const require_card = require('./catalog/basic/card.cjs');
8
+ const require_check_box = require('./catalog/basic/check-box.cjs');
9
+ const require_choice_picker = require('./catalog/basic/choice-picker.cjs');
10
+ const require_column = require('./catalog/basic/column.cjs');
11
+ const require_date_time_input = require('./catalog/basic/date-time-input.cjs');
12
+ const require_divider = require('./catalog/basic/divider.cjs');
13
+ const require_icon = require('./catalog/basic/icon.cjs');
14
+ const require_image = require('./catalog/basic/image.cjs');
15
+ const require_list = require('./catalog/basic/list.cjs');
16
+ const require_modal = require('./catalog/basic/modal.cjs');
17
+ const require_row = require('./catalog/basic/row.cjs');
18
+ const require_slider = require('./catalog/basic/slider.cjs');
19
+ const require_tabs = require('./catalog/basic/tabs.cjs');
20
+ const require_text = require('./catalog/basic/text.cjs');
21
+ const require_text_field = require('./catalog/basic/text-field.cjs');
22
+ const require_video = require('./catalog/basic/video.cjs');
23
+ const require_index = require('./catalog/basic/index.cjs');
24
+ const require_surface = require('./surface.cjs');
25
+ const require_define = require('./define.cjs');
26
+ const require_index$1 = require('./catalog/minimal/index.cjs');
27
+ const require_create_catalog = require('./create-catalog.cjs');
28
+ let _a2ui_web_core_v0_9 = require("@a2ui/web_core/v0_9");
29
+
30
+ exports.A2UI_SCHEMA_CONTEXT_DESCRIPTION = require_create_catalog.A2UI_SCHEMA_CONTEXT_DESCRIPTION;
31
+ exports.AudioPlayer = require_audio_player.AudioPlayer;
32
+ exports.Button = require_button.Button;
33
+ exports.CPK_A2UI_BOUND_COMPONENT_TAG = require_define.CPK_A2UI_BOUND_COMPONENT_TAG;
34
+ exports.CPK_A2UI_NODE_TAG = require_define.CPK_A2UI_NODE_TAG;
35
+ exports.CPK_A2UI_SURFACE_TAG = require_define.CPK_A2UI_SURFACE_TAG;
36
+ exports.Card = require_card.Card;
37
+ Object.defineProperty(exports, 'Catalog', {
38
+ enumerable: true,
39
+ get: function () {
40
+ return _a2ui_web_core_v0_9.Catalog;
41
+ }
42
+ });
43
+ exports.CheckBox = require_check_box.CheckBox;
44
+ exports.ChoicePicker = require_choice_picker.ChoicePicker;
45
+ exports.Column = require_column.Column;
46
+ exports.CpkA2uiBoundComponent = require_bound_component.CpkA2uiBoundComponent;
47
+ exports.CpkA2uiNode = require_node.CpkA2uiNode;
48
+ exports.CpkA2uiSurface = require_surface.CpkA2uiSurface;
49
+ exports.DateTimeInput = require_date_time_input.DateTimeInput;
50
+ exports.Divider = require_divider.Divider;
51
+ exports.Icon = require_icon.Icon;
52
+ exports.Image = require_image.Image;
53
+ exports.List = require_list.List;
54
+ Object.defineProperty(exports, 'MinimalCatalog', {
55
+ enumerable: true,
56
+ get: function () {
57
+ return require_index$1.minimal_exports;
58
+ }
59
+ });
60
+ exports.Modal = require_modal.Modal;
61
+ exports.Row = require_row.Row;
62
+ exports.Slider = require_slider.Slider;
63
+ exports.Tabs = require_tabs.Tabs;
64
+ exports.Text = require_text.Text;
65
+ exports.TextField = require_text_field.TextField;
66
+ exports.Video = require_video.Video;
67
+ exports.basicCatalog = require_index.basicCatalog;
68
+ exports.buildCatalogContextValue = require_create_catalog.buildCatalogContextValue;
69
+ exports.createA2UICatalog = require_create_catalog.createA2UICatalog;
70
+ exports.createBinderlessLitComponent = require_adapter.createBinderlessLitComponent;
71
+ exports.createCatalog = require_create_catalog.createCatalog;
72
+ exports.createLitComponent = require_adapter.createLitComponent;
73
+ exports.defineA2UIWebComponents = require_define.defineA2UIWebComponents;
74
+ exports.extractA2UISchema = require_create_catalog.extractA2UISchema;
75
+ exports.extractCatalogComponentSchemas = require_create_catalog.extractCatalogComponentSchemas;
76
+ exports.extractSchema = require_create_catalog.extractSchema;
77
+ exports.fullCatalog = require_index.fullCatalog;
78
+ exports.minimalCatalog = require_index$1.minimalCatalog;
@@ -0,0 +1,30 @@
1
+ import { A2UINodeElement, A2UISurfaceElement, CatalogComponentDefinition, CatalogDefinitions, CatalogRenderers, ComponentRenderer, LitA2UIComponentProps, LitComponentImplementation, LitRenderable, LitRendererFn, PropsOf, RendererProps } from "./types.cjs";
2
+ import { CpkA2uiBoundComponent } from "./bound-component.cjs";
3
+ import { CpkA2uiNode } from "./node.cjs";
4
+ import { CpkA2uiSurface } from "./surface.cjs";
5
+ import { CPK_A2UI_BOUND_COMPONENT_TAG, CPK_A2UI_NODE_TAG, CPK_A2UI_SURFACE_TAG, defineA2UIWebComponents } from "./define.cjs";
6
+ import { createBinderlessLitComponent, createLitComponent } from "./adapter.cjs";
7
+ import { AudioPlayer } from "./catalog/basic/audio-player.cjs";
8
+ import { Button } from "./catalog/basic/button.cjs";
9
+ import { Card } from "./catalog/basic/card.cjs";
10
+ import { CheckBox } from "./catalog/basic/check-box.cjs";
11
+ import { ChoicePicker } from "./catalog/basic/choice-picker.cjs";
12
+ import { Column } from "./catalog/basic/column.cjs";
13
+ import { DateTimeInput } from "./catalog/basic/date-time-input.cjs";
14
+ import { Divider } from "./catalog/basic/divider.cjs";
15
+ import { Icon } from "./catalog/basic/icon.cjs";
16
+ import { Image } from "./catalog/basic/image.cjs";
17
+ import { List } from "./catalog/basic/list.cjs";
18
+ import { Modal } from "./catalog/basic/modal.cjs";
19
+ import { Row } from "./catalog/basic/row.cjs";
20
+ import { Slider } from "./catalog/basic/slider.cjs";
21
+ import { Tabs } from "./catalog/basic/tabs.cjs";
22
+ import { Text } from "./catalog/basic/text.cjs";
23
+ import { TextField } from "./catalog/basic/text-field.cjs";
24
+ import { Video } from "./catalog/basic/video.cjs";
25
+ import { basicCatalog, fullCatalog } from "./catalog/basic/index.cjs";
26
+ import { index_d_exports, minimalCatalog } from "./catalog/minimal/index.cjs";
27
+ import { A2UIComponentDefinition, A2UIComponentMap, A2UI_SCHEMA_CONTEXT_DESCRIPTION, buildCatalogContextValue, createA2UICatalog, createCatalog, extractA2UISchema, extractCatalogComponentSchemas, extractSchema } from "./create-catalog.cjs";
28
+ import { A2UIClientEventMessage, Theme } from "./a2ui-types.cjs";
29
+ import { Catalog } from "@a2ui/web_core/v0_9";
30
+ export { type A2UIClientEventMessage, type A2UIComponentDefinition, type A2UIComponentMap, type A2UINodeElement, type A2UISurfaceElement, A2UI_SCHEMA_CONTEXT_DESCRIPTION, AudioPlayer, Button, CPK_A2UI_BOUND_COMPONENT_TAG, CPK_A2UI_NODE_TAG, CPK_A2UI_SURFACE_TAG, Card, Catalog, type CatalogComponentDefinition, type CatalogDefinitions, type CatalogRenderers, CheckBox, ChoicePicker, Column, type ComponentRenderer, CpkA2uiBoundComponent, CpkA2uiNode, CpkA2uiSurface, DateTimeInput, Divider, Icon, Image, List, type LitA2UIComponentProps, type LitComponentImplementation, type LitRenderable, type LitRendererFn, index_d_exports as MinimalCatalog, Modal, type PropsOf, type RendererProps, Row, Slider, Tabs, Text, TextField, type Theme, Video, basicCatalog, buildCatalogContextValue, createA2UICatalog, createBinderlessLitComponent, createCatalog, createLitComponent, defineA2UIWebComponents, extractA2UISchema, extractCatalogComponentSchemas, extractSchema, fullCatalog, minimalCatalog };
@@ -0,0 +1,30 @@
1
+ import { A2UINodeElement, A2UISurfaceElement, CatalogComponentDefinition, CatalogDefinitions, CatalogRenderers, ComponentRenderer, LitA2UIComponentProps, LitComponentImplementation, LitRenderable, LitRendererFn, PropsOf, RendererProps } from "./types.mjs";
2
+ import { CpkA2uiBoundComponent } from "./bound-component.mjs";
3
+ import { CpkA2uiNode } from "./node.mjs";
4
+ import { CpkA2uiSurface } from "./surface.mjs";
5
+ import { CPK_A2UI_BOUND_COMPONENT_TAG, CPK_A2UI_NODE_TAG, CPK_A2UI_SURFACE_TAG, defineA2UIWebComponents } from "./define.mjs";
6
+ import { createBinderlessLitComponent, createLitComponent } from "./adapter.mjs";
7
+ import { AudioPlayer } from "./catalog/basic/audio-player.mjs";
8
+ import { Button } from "./catalog/basic/button.mjs";
9
+ import { Card } from "./catalog/basic/card.mjs";
10
+ import { CheckBox } from "./catalog/basic/check-box.mjs";
11
+ import { ChoicePicker } from "./catalog/basic/choice-picker.mjs";
12
+ import { Column } from "./catalog/basic/column.mjs";
13
+ import { DateTimeInput } from "./catalog/basic/date-time-input.mjs";
14
+ import { Divider } from "./catalog/basic/divider.mjs";
15
+ import { Icon } from "./catalog/basic/icon.mjs";
16
+ import { Image } from "./catalog/basic/image.mjs";
17
+ import { List } from "./catalog/basic/list.mjs";
18
+ import { Modal } from "./catalog/basic/modal.mjs";
19
+ import { Row } from "./catalog/basic/row.mjs";
20
+ import { Slider } from "./catalog/basic/slider.mjs";
21
+ import { Tabs } from "./catalog/basic/tabs.mjs";
22
+ import { Text } from "./catalog/basic/text.mjs";
23
+ import { TextField } from "./catalog/basic/text-field.mjs";
24
+ import { Video } from "./catalog/basic/video.mjs";
25
+ import { basicCatalog, fullCatalog } from "./catalog/basic/index.mjs";
26
+ import { index_d_exports, minimalCatalog } from "./catalog/minimal/index.mjs";
27
+ import { A2UIComponentDefinition, A2UIComponentMap, A2UI_SCHEMA_CONTEXT_DESCRIPTION, buildCatalogContextValue, createA2UICatalog, createCatalog, extractA2UISchema, extractCatalogComponentSchemas, extractSchema } from "./create-catalog.mjs";
28
+ import { A2UIClientEventMessage, Theme } from "./a2ui-types.mjs";
29
+ import { Catalog } from "@a2ui/web_core/v0_9";
30
+ export { type A2UIClientEventMessage, type A2UIComponentDefinition, type A2UIComponentMap, type A2UINodeElement, type A2UISurfaceElement, A2UI_SCHEMA_CONTEXT_DESCRIPTION, AudioPlayer, Button, CPK_A2UI_BOUND_COMPONENT_TAG, CPK_A2UI_NODE_TAG, CPK_A2UI_SURFACE_TAG, Card, Catalog, type CatalogComponentDefinition, type CatalogDefinitions, type CatalogRenderers, CheckBox, ChoicePicker, Column, type ComponentRenderer, CpkA2uiBoundComponent, CpkA2uiNode, CpkA2uiSurface, DateTimeInput, Divider, Icon, Image, List, type LitA2UIComponentProps, type LitComponentImplementation, type LitRenderable, type LitRendererFn, index_d_exports as MinimalCatalog, Modal, type PropsOf, type RendererProps, Row, Slider, Tabs, Text, TextField, type Theme, Video, basicCatalog, buildCatalogContextValue, createA2UICatalog, createBinderlessLitComponent, createCatalog, createLitComponent, defineA2UIWebComponents, extractA2UISchema, extractCatalogComponentSchemas, extractSchema, fullCatalog, minimalCatalog };
@@ -0,0 +1,29 @@
1
+ import { CpkA2uiBoundComponent } from "./bound-component.mjs";
2
+ import { CpkA2uiNode } from "./node.mjs";
3
+ import { createBinderlessLitComponent, createLitComponent } from "./adapter.mjs";
4
+ import { AudioPlayer } from "./catalog/basic/audio-player.mjs";
5
+ import { Button } from "./catalog/basic/button.mjs";
6
+ import { Card } from "./catalog/basic/card.mjs";
7
+ import { CheckBox } from "./catalog/basic/check-box.mjs";
8
+ import { ChoicePicker } from "./catalog/basic/choice-picker.mjs";
9
+ import { Column } from "./catalog/basic/column.mjs";
10
+ import { DateTimeInput } from "./catalog/basic/date-time-input.mjs";
11
+ import { Divider } from "./catalog/basic/divider.mjs";
12
+ import { Icon } from "./catalog/basic/icon.mjs";
13
+ import { Image } from "./catalog/basic/image.mjs";
14
+ import { List } from "./catalog/basic/list.mjs";
15
+ import { Modal } from "./catalog/basic/modal.mjs";
16
+ import { Row } from "./catalog/basic/row.mjs";
17
+ import { Slider } from "./catalog/basic/slider.mjs";
18
+ import { Tabs } from "./catalog/basic/tabs.mjs";
19
+ import { Text } from "./catalog/basic/text.mjs";
20
+ import { TextField } from "./catalog/basic/text-field.mjs";
21
+ import { Video } from "./catalog/basic/video.mjs";
22
+ import { basicCatalog, fullCatalog } from "./catalog/basic/index.mjs";
23
+ import { CpkA2uiSurface } from "./surface.mjs";
24
+ import { CPK_A2UI_BOUND_COMPONENT_TAG, CPK_A2UI_NODE_TAG, CPK_A2UI_SURFACE_TAG, defineA2UIWebComponents } from "./define.mjs";
25
+ import { minimalCatalog, minimal_exports } from "./catalog/minimal/index.mjs";
26
+ import { A2UI_SCHEMA_CONTEXT_DESCRIPTION, buildCatalogContextValue, createA2UICatalog, createCatalog, extractA2UISchema, extractCatalogComponentSchemas, extractSchema } from "./create-catalog.mjs";
27
+ import { Catalog } from "@a2ui/web_core/v0_9";
28
+
29
+ export { A2UI_SCHEMA_CONTEXT_DESCRIPTION, AudioPlayer, Button, CPK_A2UI_BOUND_COMPONENT_TAG, CPK_A2UI_NODE_TAG, CPK_A2UI_SURFACE_TAG, Card, Catalog, CheckBox, ChoicePicker, Column, CpkA2uiBoundComponent, CpkA2uiNode, CpkA2uiSurface, DateTimeInput, Divider, Icon, Image, List, minimal_exports as MinimalCatalog, Modal, Row, Slider, Tabs, Text, TextField, Video, basicCatalog, buildCatalogContextValue, createA2UICatalog, createBinderlessLitComponent, createCatalog, createLitComponent, defineA2UIWebComponents, extractA2UISchema, extractCatalogComponentSchemas, extractSchema, fullCatalog, minimalCatalog };
@@ -0,0 +1,94 @@
1
+ let lit = require("lit");
2
+ let _a2ui_web_core_v0_9 = require("@a2ui/web_core/v0_9");
3
+
4
+ //#region src/web-components/node.ts
5
+ var CpkA2uiNode = class extends lit.LitElement {
6
+ constructor(..._args) {
7
+ super(..._args);
8
+ this.componentId = "root";
9
+ this.basePath = "/";
10
+ this.subscriptions = [];
11
+ }
12
+ static {
13
+ this.properties = {
14
+ surface: { attribute: false },
15
+ componentId: { attribute: false },
16
+ basePath: { attribute: false }
17
+ };
18
+ }
19
+ createRenderRoot() {
20
+ return this;
21
+ }
22
+ connectedCallback() {
23
+ super.connectedCallback();
24
+ this.style.display = "contents";
25
+ }
26
+ disconnectedCallback() {
27
+ this.unsubscribe();
28
+ super.disconnectedCallback();
29
+ }
30
+ unsubscribe() {
31
+ this.subscriptions.forEach((sub) => sub.unsubscribe());
32
+ this.subscriptions = [];
33
+ this.subscribedSurface = void 0;
34
+ this.subscribedComponentId = void 0;
35
+ }
36
+ ensureSubscriptions() {
37
+ if (!this.surface) return;
38
+ if (this.subscribedSurface === this.surface && this.subscribedComponentId === this.componentId) return;
39
+ this.unsubscribe();
40
+ this.subscribedSurface = this.surface;
41
+ this.subscribedComponentId = this.componentId;
42
+ this.subscriptions.push(this.surface.componentsModel.onCreated.subscribe((comp) => {
43
+ if (comp.id === this.componentId) this.requestUpdate();
44
+ }), this.surface.componentsModel.onDeleted.subscribe((id) => {
45
+ if (id === this.componentId) this.requestUpdate();
46
+ }));
47
+ }
48
+ render() {
49
+ this.ensureSubscriptions();
50
+ const surface = this.surface;
51
+ if (!surface) return lit.nothing;
52
+ const componentModel = surface.componentsModel.get(this.componentId);
53
+ if (!componentModel) return lit.html`
54
+ <div
55
+ style="
56
+ padding: 12px 16px;
57
+ border-radius: 8px;
58
+ background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
59
+ background-size: 200% 100%;
60
+ animation: a2ui-shimmer 1.5s ease-in-out infinite;
61
+ min-height: 2rem;
62
+ "
63
+ >
64
+ <style>
65
+ @keyframes a2ui-shimmer {
66
+ 0% {
67
+ background-position: 200% 0;
68
+ }
69
+ 100% {
70
+ background-position: -200% 0;
71
+ }
72
+ }
73
+ </style>
74
+ </div>
75
+ `;
76
+ const compImpl = surface.catalog.components.get(componentModel.type);
77
+ if (!compImpl) return lit.html`
78
+ <div style="color: red;">Unknown component: ${componentModel.type}</div>
79
+ `;
80
+ const context = new _a2ui_web_core_v0_9.ComponentContext(surface, this.componentId, this.basePath);
81
+ const buildChild = (childId, specificPath) => lit.html`
82
+ <cpk-a2ui-node
83
+ .surface=${surface}
84
+ .componentId=${childId}
85
+ .basePath=${specificPath || context.dataContext.path}
86
+ ></cpk-a2ui-node>
87
+ `;
88
+ return compImpl.render(context, buildChild);
89
+ }
90
+ };
91
+
92
+ //#endregion
93
+ exports.CpkA2uiNode = CpkA2uiNode;
94
+ //# sourceMappingURL=node.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.cjs","names":["LitElement","nothing","ComponentContext"],"sources":["../../src/web-components/node.ts"],"sourcesContent":["import { html, LitElement, nothing } from \"lit\";\nimport { ComponentContext } from \"@a2ui/web_core/v0_9\";\nimport type { SurfaceModel } from \"@a2ui/web_core/v0_9\";\nimport type { LitComponentImplementation } from \"./types\";\n\ntype SubscriptionLike = { unsubscribe: () => void };\n\nexport class CpkA2uiNode extends LitElement {\n static properties = {\n surface: { attribute: false },\n componentId: { attribute: false },\n basePath: { attribute: false },\n };\n\n surface?: SurfaceModel<LitComponentImplementation>;\n componentId = \"root\";\n basePath = \"/\";\n private subscriptions: SubscriptionLike[] = [];\n private subscribedSurface?: SurfaceModel<LitComponentImplementation>;\n private subscribedComponentId?: string;\n\n protected createRenderRoot() {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.style.display = \"contents\";\n }\n\n disconnectedCallback(): void {\n this.unsubscribe();\n super.disconnectedCallback();\n }\n\n private unsubscribe(): void {\n this.subscriptions.forEach((sub) => sub.unsubscribe());\n this.subscriptions = [];\n this.subscribedSurface = undefined;\n this.subscribedComponentId = undefined;\n }\n\n private ensureSubscriptions(): void {\n if (!this.surface) return;\n if (\n this.subscribedSurface === this.surface &&\n this.subscribedComponentId === this.componentId\n ) {\n return;\n }\n\n this.unsubscribe();\n this.subscribedSurface = this.surface;\n this.subscribedComponentId = this.componentId;\n this.subscriptions.push(\n this.surface.componentsModel.onCreated.subscribe((comp) => {\n if (comp.id === this.componentId) this.requestUpdate();\n }),\n this.surface.componentsModel.onDeleted.subscribe((id) => {\n if (id === this.componentId) this.requestUpdate();\n }),\n );\n }\n\n render() {\n this.ensureSubscriptions();\n const surface = this.surface;\n if (!surface) return nothing;\n\n const componentModel = surface.componentsModel.get(this.componentId);\n if (!componentModel) {\n return html`\n <div\n style=\"\n padding: 12px 16px;\n border-radius: 8px;\n background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);\n background-size: 200% 100%;\n animation: a2ui-shimmer 1.5s ease-in-out infinite;\n min-height: 2rem;\n \"\n >\n <style>\n @keyframes a2ui-shimmer {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n }\n </style>\n </div>\n `;\n }\n\n const compImpl = surface.catalog.components.get(componentModel.type);\n if (!compImpl) {\n return html`\n <div style=\"color: red;\">Unknown component: ${componentModel.type}</div>\n `;\n }\n\n const context = new ComponentContext(\n surface,\n this.componentId,\n this.basePath,\n );\n const buildChild = (childId: string, specificPath?: string) => html`\n <cpk-a2ui-node\n .surface=${surface}\n .componentId=${childId}\n .basePath=${specificPath || context.dataContext.path}\n ></cpk-a2ui-node>\n `;\n\n return compImpl.render(context, buildChild);\n }\n}\n"],"mappings":";;;;AAOA,IAAa,cAAb,cAAiCA,eAAW;;;qBAQ5B;kBACH;uBACiC,EAAE;;;oBAT1B;GAClB,SAAS,EAAE,WAAW,OAAO;GAC7B,aAAa,EAAE,WAAW,OAAO;GACjC,UAAU,EAAE,WAAW,OAAO;GAC/B;;CASD,AAAU,mBAAmB;AAC3B,SAAO;;CAGT,oBAA0B;AACxB,QAAM,mBAAmB;AACzB,OAAK,MAAM,UAAU;;CAGvB,uBAA6B;AAC3B,OAAK,aAAa;AAClB,QAAM,sBAAsB;;CAG9B,AAAQ,cAAoB;AAC1B,OAAK,cAAc,SAAS,QAAQ,IAAI,aAAa,CAAC;AACtD,OAAK,gBAAgB,EAAE;AACvB,OAAK,oBAAoB;AACzB,OAAK,wBAAwB;;CAG/B,AAAQ,sBAA4B;AAClC,MAAI,CAAC,KAAK,QAAS;AACnB,MACE,KAAK,sBAAsB,KAAK,WAChC,KAAK,0BAA0B,KAAK,YAEpC;AAGF,OAAK,aAAa;AAClB,OAAK,oBAAoB,KAAK;AAC9B,OAAK,wBAAwB,KAAK;AAClC,OAAK,cAAc,KACjB,KAAK,QAAQ,gBAAgB,UAAU,WAAW,SAAS;AACzD,OAAI,KAAK,OAAO,KAAK,YAAa,MAAK,eAAe;IACtD,EACF,KAAK,QAAQ,gBAAgB,UAAU,WAAW,OAAO;AACvD,OAAI,OAAO,KAAK,YAAa,MAAK,eAAe;IACjD,CACH;;CAGH,SAAS;AACP,OAAK,qBAAqB;EAC1B,MAAM,UAAU,KAAK;AACrB,MAAI,CAAC,QAAS,QAAOC;EAErB,MAAM,iBAAiB,QAAQ,gBAAgB,IAAI,KAAK,YAAY;AACpE,MAAI,CAAC,eACH,QAAO,QAAI;;;;;;;;;;;;;;;;;;;;;;;EAyBb,MAAM,WAAW,QAAQ,QAAQ,WAAW,IAAI,eAAe,KAAK;AACpE,MAAI,CAAC,SACH,QAAO,QAAI;sDACqC,eAAe,KAAK;;EAItE,MAAM,UAAU,IAAIC,qCAClB,SACA,KAAK,aACL,KAAK,SACN;EACD,MAAM,cAAc,SAAiB,iBAA0B,QAAI;;mBAEpD,QAAQ;uBACJ,QAAQ;oBACX,gBAAgB,QAAQ,YAAY,KAAK;;;AAIzD,SAAO,SAAS,OAAO,SAAS,WAAW"}
@@ -0,0 +1,33 @@
1
+ import { LitComponentImplementation, LitRenderable } from "./types.cjs";
2
+ import { LitElement, nothing } from "lit";
3
+ import { SurfaceModel } from "@a2ui/web_core/v0_9";
4
+
5
+ //#region src/web-components/node.d.ts
6
+ declare class CpkA2uiNode extends LitElement {
7
+ static properties: {
8
+ surface: {
9
+ attribute: boolean;
10
+ };
11
+ componentId: {
12
+ attribute: boolean;
13
+ };
14
+ basePath: {
15
+ attribute: boolean;
16
+ };
17
+ };
18
+ surface?: SurfaceModel<LitComponentImplementation>;
19
+ componentId: string;
20
+ basePath: string;
21
+ private subscriptions;
22
+ private subscribedSurface?;
23
+ private subscribedComponentId?;
24
+ protected createRenderRoot(): this;
25
+ connectedCallback(): void;
26
+ disconnectedCallback(): void;
27
+ private unsubscribe;
28
+ private ensureSubscriptions;
29
+ render(): LitRenderable | typeof nothing;
30
+ }
31
+ //#endregion
32
+ export { CpkA2uiNode };
33
+ //# sourceMappingURL=node.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.cts","names":[],"sources":["../../src/web-components/node.ts"],"mappings":";;;;;cAOa,WAAA,SAAoB,UAAA;EAAA,OACxB,UAAA;;;;;;;;;;;EAMP,OAAA,GAAU,YAAA,CAAa,0BAAA;EACvB,WAAA;EACA,QAAA;EAAA,QACQ,aAAA;EAAA,QACA,iBAAA;EAAA,QACA,qBAAA;EAAA,UAEE,gBAAA,CAAA;EAIV,iBAAA,CAAA;EAKA,oBAAA,CAAA;EAAA,QAKQ,WAAA;EAAA,QAOA,mBAAA;EAsBR,MAAA,CAAA,GAlDsB,aAAA,UAkDhB,OAAA;AAAA"}
@@ -0,0 +1,33 @@
1
+ import { LitComponentImplementation, LitRenderable } from "./types.mjs";
2
+ import { LitElement, nothing } from "lit";
3
+ import { SurfaceModel } from "@a2ui/web_core/v0_9";
4
+
5
+ //#region src/web-components/node.d.ts
6
+ declare class CpkA2uiNode extends LitElement {
7
+ static properties: {
8
+ surface: {
9
+ attribute: boolean;
10
+ };
11
+ componentId: {
12
+ attribute: boolean;
13
+ };
14
+ basePath: {
15
+ attribute: boolean;
16
+ };
17
+ };
18
+ surface?: SurfaceModel<LitComponentImplementation>;
19
+ componentId: string;
20
+ basePath: string;
21
+ private subscriptions;
22
+ private subscribedSurface?;
23
+ private subscribedComponentId?;
24
+ protected createRenderRoot(): this;
25
+ connectedCallback(): void;
26
+ disconnectedCallback(): void;
27
+ private unsubscribe;
28
+ private ensureSubscriptions;
29
+ render(): LitRenderable | typeof nothing;
30
+ }
31
+ //#endregion
32
+ export { CpkA2uiNode };
33
+ //# sourceMappingURL=node.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.mts","names":[],"sources":["../../src/web-components/node.ts"],"mappings":";;;;;cAOa,WAAA,SAAoB,UAAA;EAAA,OACxB,UAAA;;;;;;;;;;;EAMP,OAAA,GAAU,YAAA,CAAa,0BAAA;EACvB,WAAA;EACA,QAAA;EAAA,QACQ,aAAA;EAAA,QACA,iBAAA;EAAA,QACA,qBAAA;EAAA,UAEE,gBAAA,CAAA;EAIV,iBAAA,CAAA;EAKA,oBAAA,CAAA;EAAA,QAKQ,WAAA;EAAA,QAOA,mBAAA;EAsBR,MAAA,CAAA,GAlDsB,aAAA,UAkDhB,OAAA;AAAA"}
@@ -0,0 +1,94 @@
1
+ import { LitElement, html, nothing } from "lit";
2
+ import { ComponentContext } from "@a2ui/web_core/v0_9";
3
+
4
+ //#region src/web-components/node.ts
5
+ var CpkA2uiNode = class extends LitElement {
6
+ constructor(..._args) {
7
+ super(..._args);
8
+ this.componentId = "root";
9
+ this.basePath = "/";
10
+ this.subscriptions = [];
11
+ }
12
+ static {
13
+ this.properties = {
14
+ surface: { attribute: false },
15
+ componentId: { attribute: false },
16
+ basePath: { attribute: false }
17
+ };
18
+ }
19
+ createRenderRoot() {
20
+ return this;
21
+ }
22
+ connectedCallback() {
23
+ super.connectedCallback();
24
+ this.style.display = "contents";
25
+ }
26
+ disconnectedCallback() {
27
+ this.unsubscribe();
28
+ super.disconnectedCallback();
29
+ }
30
+ unsubscribe() {
31
+ this.subscriptions.forEach((sub) => sub.unsubscribe());
32
+ this.subscriptions = [];
33
+ this.subscribedSurface = void 0;
34
+ this.subscribedComponentId = void 0;
35
+ }
36
+ ensureSubscriptions() {
37
+ if (!this.surface) return;
38
+ if (this.subscribedSurface === this.surface && this.subscribedComponentId === this.componentId) return;
39
+ this.unsubscribe();
40
+ this.subscribedSurface = this.surface;
41
+ this.subscribedComponentId = this.componentId;
42
+ this.subscriptions.push(this.surface.componentsModel.onCreated.subscribe((comp) => {
43
+ if (comp.id === this.componentId) this.requestUpdate();
44
+ }), this.surface.componentsModel.onDeleted.subscribe((id) => {
45
+ if (id === this.componentId) this.requestUpdate();
46
+ }));
47
+ }
48
+ render() {
49
+ this.ensureSubscriptions();
50
+ const surface = this.surface;
51
+ if (!surface) return nothing;
52
+ const componentModel = surface.componentsModel.get(this.componentId);
53
+ if (!componentModel) return html`
54
+ <div
55
+ style="
56
+ padding: 12px 16px;
57
+ border-radius: 8px;
58
+ background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
59
+ background-size: 200% 100%;
60
+ animation: a2ui-shimmer 1.5s ease-in-out infinite;
61
+ min-height: 2rem;
62
+ "
63
+ >
64
+ <style>
65
+ @keyframes a2ui-shimmer {
66
+ 0% {
67
+ background-position: 200% 0;
68
+ }
69
+ 100% {
70
+ background-position: -200% 0;
71
+ }
72
+ }
73
+ </style>
74
+ </div>
75
+ `;
76
+ const compImpl = surface.catalog.components.get(componentModel.type);
77
+ if (!compImpl) return html`
78
+ <div style="color: red;">Unknown component: ${componentModel.type}</div>
79
+ `;
80
+ const context = new ComponentContext(surface, this.componentId, this.basePath);
81
+ const buildChild = (childId, specificPath) => html`
82
+ <cpk-a2ui-node
83
+ .surface=${surface}
84
+ .componentId=${childId}
85
+ .basePath=${specificPath || context.dataContext.path}
86
+ ></cpk-a2ui-node>
87
+ `;
88
+ return compImpl.render(context, buildChild);
89
+ }
90
+ };
91
+
92
+ //#endregion
93
+ export { CpkA2uiNode };
94
+ //# sourceMappingURL=node.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.mjs","names":[],"sources":["../../src/web-components/node.ts"],"sourcesContent":["import { html, LitElement, nothing } from \"lit\";\nimport { ComponentContext } from \"@a2ui/web_core/v0_9\";\nimport type { SurfaceModel } from \"@a2ui/web_core/v0_9\";\nimport type { LitComponentImplementation } from \"./types\";\n\ntype SubscriptionLike = { unsubscribe: () => void };\n\nexport class CpkA2uiNode extends LitElement {\n static properties = {\n surface: { attribute: false },\n componentId: { attribute: false },\n basePath: { attribute: false },\n };\n\n surface?: SurfaceModel<LitComponentImplementation>;\n componentId = \"root\";\n basePath = \"/\";\n private subscriptions: SubscriptionLike[] = [];\n private subscribedSurface?: SurfaceModel<LitComponentImplementation>;\n private subscribedComponentId?: string;\n\n protected createRenderRoot() {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.style.display = \"contents\";\n }\n\n disconnectedCallback(): void {\n this.unsubscribe();\n super.disconnectedCallback();\n }\n\n private unsubscribe(): void {\n this.subscriptions.forEach((sub) => sub.unsubscribe());\n this.subscriptions = [];\n this.subscribedSurface = undefined;\n this.subscribedComponentId = undefined;\n }\n\n private ensureSubscriptions(): void {\n if (!this.surface) return;\n if (\n this.subscribedSurface === this.surface &&\n this.subscribedComponentId === this.componentId\n ) {\n return;\n }\n\n this.unsubscribe();\n this.subscribedSurface = this.surface;\n this.subscribedComponentId = this.componentId;\n this.subscriptions.push(\n this.surface.componentsModel.onCreated.subscribe((comp) => {\n if (comp.id === this.componentId) this.requestUpdate();\n }),\n this.surface.componentsModel.onDeleted.subscribe((id) => {\n if (id === this.componentId) this.requestUpdate();\n }),\n );\n }\n\n render() {\n this.ensureSubscriptions();\n const surface = this.surface;\n if (!surface) return nothing;\n\n const componentModel = surface.componentsModel.get(this.componentId);\n if (!componentModel) {\n return html`\n <div\n style=\"\n padding: 12px 16px;\n border-radius: 8px;\n background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);\n background-size: 200% 100%;\n animation: a2ui-shimmer 1.5s ease-in-out infinite;\n min-height: 2rem;\n \"\n >\n <style>\n @keyframes a2ui-shimmer {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n }\n </style>\n </div>\n `;\n }\n\n const compImpl = surface.catalog.components.get(componentModel.type);\n if (!compImpl) {\n return html`\n <div style=\"color: red;\">Unknown component: ${componentModel.type}</div>\n `;\n }\n\n const context = new ComponentContext(\n surface,\n this.componentId,\n this.basePath,\n );\n const buildChild = (childId: string, specificPath?: string) => html`\n <cpk-a2ui-node\n .surface=${surface}\n .componentId=${childId}\n .basePath=${specificPath || context.dataContext.path}\n ></cpk-a2ui-node>\n `;\n\n return compImpl.render(context, buildChild);\n }\n}\n"],"mappings":";;;;AAOA,IAAa,cAAb,cAAiC,WAAW;;;qBAQ5B;kBACH;uBACiC,EAAE;;;oBAT1B;GAClB,SAAS,EAAE,WAAW,OAAO;GAC7B,aAAa,EAAE,WAAW,OAAO;GACjC,UAAU,EAAE,WAAW,OAAO;GAC/B;;CASD,AAAU,mBAAmB;AAC3B,SAAO;;CAGT,oBAA0B;AACxB,QAAM,mBAAmB;AACzB,OAAK,MAAM,UAAU;;CAGvB,uBAA6B;AAC3B,OAAK,aAAa;AAClB,QAAM,sBAAsB;;CAG9B,AAAQ,cAAoB;AAC1B,OAAK,cAAc,SAAS,QAAQ,IAAI,aAAa,CAAC;AACtD,OAAK,gBAAgB,EAAE;AACvB,OAAK,oBAAoB;AACzB,OAAK,wBAAwB;;CAG/B,AAAQ,sBAA4B;AAClC,MAAI,CAAC,KAAK,QAAS;AACnB,MACE,KAAK,sBAAsB,KAAK,WAChC,KAAK,0BAA0B,KAAK,YAEpC;AAGF,OAAK,aAAa;AAClB,OAAK,oBAAoB,KAAK;AAC9B,OAAK,wBAAwB,KAAK;AAClC,OAAK,cAAc,KACjB,KAAK,QAAQ,gBAAgB,UAAU,WAAW,SAAS;AACzD,OAAI,KAAK,OAAO,KAAK,YAAa,MAAK,eAAe;IACtD,EACF,KAAK,QAAQ,gBAAgB,UAAU,WAAW,OAAO;AACvD,OAAI,OAAO,KAAK,YAAa,MAAK,eAAe;IACjD,CACH;;CAGH,SAAS;AACP,OAAK,qBAAqB;EAC1B,MAAM,UAAU,KAAK;AACrB,MAAI,CAAC,QAAS,QAAO;EAErB,MAAM,iBAAiB,QAAQ,gBAAgB,IAAI,KAAK,YAAY;AACpE,MAAI,CAAC,eACH,QAAO,IAAI;;;;;;;;;;;;;;;;;;;;;;;EAyBb,MAAM,WAAW,QAAQ,QAAQ,WAAW,IAAI,eAAe,KAAK;AACpE,MAAI,CAAC,SACH,QAAO,IAAI;sDACqC,eAAe,KAAK;;EAItE,MAAM,UAAU,IAAI,iBAClB,SACA,KAAK,aACL,KAAK,SACN;EACD,MAAM,cAAc,SAAiB,iBAA0B,IAAI;;mBAEpD,QAAQ;uBACJ,QAAQ;oBACX,gBAAgB,QAAQ,YAAY,KAAK;;;AAIzD,SAAO,SAAS,OAAO,SAAS,WAAW"}