@copilotkit/a2ui-renderer 1.51.4-next.5 → 1.51.4-next.6

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 (183) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/A2UIMessageRenderer.d.ts.map +1 -1
  3. package/dist/A2UIMessageRenderer.js +71 -140
  4. package/dist/A2UIMessageRenderer.js.map +1 -1
  5. package/dist/A2UIViewer.d.ts +11 -1
  6. package/dist/A2UIViewer.d.ts.map +1 -1
  7. package/dist/A2UIViewer.js +58 -102
  8. package/dist/A2UIViewer.js.map +1 -1
  9. package/dist/__tests__/A2UIMessageRenderer.test.js +57 -232
  10. package/dist/__tests__/A2UIMessageRenderer.test.js.map +1 -1
  11. package/dist/__tests__/setup.js +0 -13
  12. package/dist/__tests__/setup.js.map +1 -1
  13. package/dist/index.d.ts +1 -3
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +1 -2
  16. package/dist/index.js.map +1 -1
  17. package/dist/index.umd.js +1 -1000
  18. package/dist/index.umd.js.map +1 -1
  19. package/dist/react-renderer/components/content/AudioPlayer.d.ts +8 -0
  20. package/dist/react-renderer/components/content/AudioPlayer.d.ts.map +1 -0
  21. package/dist/react-renderer/components/content/AudioPlayer.js +23 -0
  22. package/dist/react-renderer/components/content/AudioPlayer.js.map +1 -0
  23. package/dist/react-renderer/components/content/Divider.d.ts +13 -0
  24. package/dist/react-renderer/components/content/Divider.d.ts.map +1 -0
  25. package/dist/react-renderer/components/content/Divider.js +22 -0
  26. package/dist/react-renderer/components/content/Divider.js.map +1 -0
  27. package/dist/react-renderer/components/content/Icon.d.ts +16 -0
  28. package/dist/react-renderer/components/content/Icon.d.ts.map +1 -0
  29. package/dist/react-renderer/components/content/Icon.js +40 -0
  30. package/dist/react-renderer/components/content/Icon.js.map +1 -0
  31. package/dist/react-renderer/components/content/Image.d.ts +11 -0
  32. package/dist/react-renderer/components/content/Image.d.ts.map +1 -0
  33. package/dist/react-renderer/components/content/Image.js +34 -0
  34. package/dist/react-renderer/components/content/Image.js.map +1 -0
  35. package/dist/react-renderer/components/content/Text.d.ts +28 -0
  36. package/dist/react-renderer/components/content/Text.d.ts.map +1 -0
  37. package/dist/react-renderer/components/content/Text.js +132 -0
  38. package/dist/react-renderer/components/content/Text.js.map +1 -0
  39. package/dist/react-renderer/components/content/Video.d.ts +10 -0
  40. package/dist/react-renderer/components/content/Video.d.ts.map +1 -0
  41. package/dist/react-renderer/components/content/Video.js +41 -0
  42. package/dist/react-renderer/components/content/Video.js.map +1 -0
  43. package/dist/react-renderer/components/content/index.d.ts +7 -0
  44. package/dist/react-renderer/components/content/index.d.ts.map +1 -0
  45. package/dist/react-renderer/components/content/index.js +7 -0
  46. package/dist/react-renderer/components/content/index.js.map +1 -0
  47. package/dist/react-renderer/components/interactive/Button.d.ts +11 -0
  48. package/dist/react-renderer/components/interactive/Button.d.ts.map +1 -0
  49. package/dist/react-renderer/components/interactive/Button.js +27 -0
  50. package/dist/react-renderer/components/interactive/Button.js.map +1 -0
  51. package/dist/react-renderer/components/interactive/CheckBox.d.ts +10 -0
  52. package/dist/react-renderer/components/interactive/CheckBox.d.ts.map +1 -0
  53. package/dist/react-renderer/components/interactive/CheckBox.js +55 -0
  54. package/dist/react-renderer/components/interactive/CheckBox.js.map +1 -0
  55. package/dist/react-renderer/components/interactive/DateTimeInput.d.ts +10 -0
  56. package/dist/react-renderer/components/interactive/DateTimeInput.d.ts.map +1 -0
  57. package/dist/react-renderer/components/interactive/DateTimeInput.js +68 -0
  58. package/dist/react-renderer/components/interactive/DateTimeInput.js.map +1 -0
  59. package/dist/react-renderer/components/interactive/MultipleChoice.d.ts +11 -0
  60. package/dist/react-renderer/components/interactive/MultipleChoice.d.ts.map +1 -0
  61. package/dist/react-renderer/components/interactive/MultipleChoice.js +43 -0
  62. package/dist/react-renderer/components/interactive/MultipleChoice.js.map +1 -0
  63. package/dist/react-renderer/components/interactive/Slider.d.ts +10 -0
  64. package/dist/react-renderer/components/interactive/Slider.d.ts.map +1 -0
  65. package/dist/react-renderer/components/interactive/Slider.js +62 -0
  66. package/dist/react-renderer/components/interactive/Slider.js.map +1 -0
  67. package/dist/react-renderer/components/interactive/TextField.d.ts +10 -0
  68. package/dist/react-renderer/components/interactive/TextField.d.ts.map +1 -0
  69. package/dist/react-renderer/components/interactive/TextField.js +63 -0
  70. package/dist/react-renderer/components/interactive/TextField.js.map +1 -0
  71. package/dist/react-renderer/components/interactive/index.d.ts +7 -0
  72. package/dist/react-renderer/components/interactive/index.d.ts.map +1 -0
  73. package/dist/react-renderer/components/interactive/index.js +7 -0
  74. package/dist/react-renderer/components/interactive/index.js.map +1 -0
  75. package/dist/react-renderer/components/layout/Card.d.ts +17 -0
  76. package/dist/react-renderer/components/layout/Card.d.ts.map +1 -0
  77. package/dist/react-renderer/components/layout/Card.js +39 -0
  78. package/dist/react-renderer/components/layout/Card.js.map +1 -0
  79. package/dist/react-renderer/components/layout/Column.d.ts +10 -0
  80. package/dist/react-renderer/components/layout/Column.d.ts.map +1 -0
  81. package/dist/react-renderer/components/layout/Column.js +33 -0
  82. package/dist/react-renderer/components/layout/Column.js.map +1 -0
  83. package/dist/react-renderer/components/layout/List.d.ts +10 -0
  84. package/dist/react-renderer/components/layout/List.d.ts.map +1 -0
  85. package/dist/react-renderer/components/layout/List.js +32 -0
  86. package/dist/react-renderer/components/layout/List.js.map +1 -0
  87. package/dist/react-renderer/components/layout/Modal.d.ts +15 -0
  88. package/dist/react-renderer/components/layout/Modal.d.ts.map +1 -0
  89. package/dist/react-renderer/components/layout/Modal.js +65 -0
  90. package/dist/react-renderer/components/layout/Modal.js.map +1 -0
  91. package/dist/react-renderer/components/layout/Row.d.ts +10 -0
  92. package/dist/react-renderer/components/layout/Row.d.ts.map +1 -0
  93. package/dist/react-renderer/components/layout/Row.js +33 -0
  94. package/dist/react-renderer/components/layout/Row.js.map +1 -0
  95. package/dist/react-renderer/components/layout/Tabs.d.ts +8 -0
  96. package/dist/react-renderer/components/layout/Tabs.d.ts.map +1 -0
  97. package/dist/react-renderer/components/layout/Tabs.js +29 -0
  98. package/dist/react-renderer/components/layout/Tabs.js.map +1 -0
  99. package/dist/react-renderer/components/layout/index.d.ts +7 -0
  100. package/dist/react-renderer/components/layout/index.d.ts.map +1 -0
  101. package/dist/react-renderer/components/layout/index.js +7 -0
  102. package/dist/react-renderer/components/layout/index.js.map +1 -0
  103. package/dist/react-renderer/core/A2UIProvider.d.ts +82 -0
  104. package/dist/react-renderer/core/A2UIProvider.d.ts.map +1 -0
  105. package/dist/react-renderer/core/A2UIProvider.js +156 -0
  106. package/dist/react-renderer/core/A2UIProvider.js.map +1 -0
  107. package/dist/react-renderer/core/A2UIRenderer.d.ts +36 -0
  108. package/dist/react-renderer/core/A2UIRenderer.d.ts.map +1 -0
  109. package/dist/react-renderer/core/A2UIRenderer.js +83 -0
  110. package/dist/react-renderer/core/A2UIRenderer.js.map +1 -0
  111. package/dist/react-renderer/core/A2UIViewer.d.ts +56 -0
  112. package/dist/react-renderer/core/A2UIViewer.d.ts.map +1 -0
  113. package/dist/react-renderer/core/A2UIViewer.js +135 -0
  114. package/dist/react-renderer/core/A2UIViewer.js.map +1 -0
  115. package/dist/react-renderer/core/ComponentNode.d.ts +25 -0
  116. package/dist/react-renderer/core/ComponentNode.d.ts.map +1 -0
  117. package/dist/react-renderer/core/ComponentNode.js +43 -0
  118. package/dist/react-renderer/core/ComponentNode.js.map +1 -0
  119. package/dist/react-renderer/core/store.d.ts +37 -0
  120. package/dist/react-renderer/core/store.d.ts.map +1 -0
  121. package/dist/react-renderer/core/store.js +2 -0
  122. package/dist/react-renderer/core/store.js.map +1 -0
  123. package/dist/react-renderer/hooks/useA2UI.d.ts +46 -0
  124. package/dist/react-renderer/hooks/useA2UI.d.ts.map +1 -0
  125. package/dist/react-renderer/hooks/useA2UI.js +41 -0
  126. package/dist/react-renderer/hooks/useA2UI.js.map +1 -0
  127. package/dist/react-renderer/hooks/useA2UIComponent.d.ts +52 -0
  128. package/dist/react-renderer/hooks/useA2UIComponent.d.ts.map +1 -0
  129. package/dist/react-renderer/hooks/useA2UIComponent.js +166 -0
  130. package/dist/react-renderer/hooks/useA2UIComponent.js.map +1 -0
  131. package/dist/react-renderer/index.d.ts +37 -0
  132. package/dist/react-renderer/index.d.ts.map +1 -0
  133. package/dist/react-renderer/index.js +40 -0
  134. package/dist/react-renderer/index.js.map +1 -0
  135. package/dist/react-renderer/lib/utils.d.ts +32 -0
  136. package/dist/react-renderer/lib/utils.d.ts.map +1 -0
  137. package/dist/react-renderer/lib/utils.js +41 -0
  138. package/dist/react-renderer/lib/utils.js.map +1 -0
  139. package/dist/react-renderer/registry/ComponentRegistry.d.ts +78 -0
  140. package/dist/react-renderer/registry/ComponentRegistry.d.ts.map +1 -0
  141. package/dist/react-renderer/registry/ComponentRegistry.js +113 -0
  142. package/dist/react-renderer/registry/ComponentRegistry.js.map +1 -0
  143. package/dist/react-renderer/registry/defaultCatalog.d.ts +13 -0
  144. package/dist/react-renderer/registry/defaultCatalog.d.ts.map +1 -0
  145. package/dist/react-renderer/registry/defaultCatalog.js +59 -0
  146. package/dist/react-renderer/registry/defaultCatalog.js.map +1 -0
  147. package/dist/react-renderer/styles/index.d.ts +41 -0
  148. package/dist/react-renderer/styles/index.d.ts.map +1 -0
  149. package/dist/react-renderer/styles/index.js +473 -0
  150. package/dist/react-renderer/styles/index.js.map +1 -0
  151. package/dist/react-renderer/styles/reset.d.ts +18 -0
  152. package/dist/react-renderer/styles/reset.d.ts.map +1 -0
  153. package/dist/react-renderer/styles/reset.js +24 -0
  154. package/dist/react-renderer/styles/reset.js.map +1 -0
  155. package/dist/react-renderer/theme/ThemeContext.d.ts +29 -0
  156. package/dist/react-renderer/theme/ThemeContext.d.ts.map +1 -0
  157. package/dist/react-renderer/theme/ThemeContext.js +35 -0
  158. package/dist/react-renderer/theme/ThemeContext.js.map +1 -0
  159. package/dist/react-renderer/theme/litTheme.d.ts +8 -0
  160. package/dist/react-renderer/theme/litTheme.d.ts.map +1 -0
  161. package/dist/react-renderer/theme/litTheme.js +401 -0
  162. package/dist/react-renderer/theme/litTheme.js.map +1 -0
  163. package/dist/react-renderer/theme/utils.d.ts +23 -0
  164. package/dist/react-renderer/theme/utils.d.ts.map +1 -0
  165. package/dist/react-renderer/theme/utils.js +46 -0
  166. package/dist/react-renderer/theme/utils.js.map +1 -0
  167. package/dist/react-renderer/types.d.ts +53 -0
  168. package/dist/react-renderer/types.d.ts.map +1 -0
  169. package/dist/react-renderer/types.js +2 -0
  170. package/dist/react-renderer/types.js.map +1 -0
  171. package/package.json +6 -6
  172. package/dist/styles/components.d.ts +0 -7
  173. package/dist/styles/components.d.ts.map +0 -1
  174. package/dist/styles/components.js +0 -7
  175. package/dist/styles/components.js.map +0 -1
  176. package/dist/styles/global.d.ts +0 -2
  177. package/dist/styles/global.d.ts.map +0 -1
  178. package/dist/styles/global.js +0 -145
  179. package/dist/styles/global.js.map +0 -1
  180. package/dist/themed-surface.d.ts +0 -20
  181. package/dist/themed-surface.d.ts.map +0 -1
  182. package/dist/themed-surface.js +0 -133
  183. package/dist/themed-surface.js.map +0 -1
@@ -0,0 +1,8 @@
1
+ import type { Types } from '@a2ui/lit/0.8';
2
+ import type { A2UIComponentProps } from '../../types';
3
+ /**
4
+ * AudioPlayer component - renders an audio player with optional description.
5
+ */
6
+ export declare const AudioPlayer: import("react").NamedExoticComponent<A2UIComponentProps<Types.AudioPlayerNode>>;
7
+ export default AudioPlayer;
8
+ //# sourceMappingURL=AudioPlayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioPlayer.d.ts","sourceRoot":"","sources":["../../../../src/react-renderer/components/content/AudioPlayer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAItD;;GAEG;AACH,eAAO,MAAM,WAAW,iFA2BtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { memo } from 'react';
3
+ import { useA2UIComponent } from '../../hooks/useA2UIComponent';
4
+ import { classMapToString, stylesToObject } from '../../lib/utils';
5
+ /**
6
+ * AudioPlayer component - renders an audio player with optional description.
7
+ */
8
+ export const AudioPlayer = memo(function AudioPlayer({ node, surfaceId }) {
9
+ const { theme, resolveString } = useA2UIComponent(node, surfaceId);
10
+ const props = node.properties;
11
+ const url = resolveString(props.url);
12
+ const description = resolveString(props.description ?? null);
13
+ if (!url) {
14
+ return null;
15
+ }
16
+ // Apply --weight CSS variable on root div (:host equivalent) for flex layouts
17
+ const hostStyle = node.weight !== undefined
18
+ ? { '--weight': node.weight }
19
+ : {};
20
+ return (_jsx("div", { className: "a2ui-audio", style: hostStyle, children: _jsxs("section", { className: classMapToString(theme.components.AudioPlayer), style: stylesToObject(theme.additionalStyles?.AudioPlayer), children: [description && _jsx("p", { children: description }), _jsx("audio", { src: url, controls: true })] }) }));
21
+ });
22
+ export default AudioPlayer;
23
+ //# sourceMappingURL=AudioPlayer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioPlayer.js","sourceRoot":"","sources":["../../../../src/react-renderer/components/content/AudioPlayer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAG7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEnE;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,WAAW,CAAC,EAAE,IAAI,EAAE,SAAS,EAA6C;IACjH,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,gBAAgB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACnE,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC;IAE9B,MAAM,GAAG,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrC,MAAM,WAAW,GAAG,aAAa,CAAC,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC;IAE7D,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8EAA8E;IAC9E,MAAM,SAAS,GAAwB,IAAI,CAAC,MAAM,KAAK,SAAS;QAC9D,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,EAAyB;QACpD,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,CACL,cAAK,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,SAAS,YAC1C,mBACE,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,EACzD,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,gBAAgB,EAAE,WAAW,CAAC,aAEzD,WAAW,IAAI,sBAAI,WAAW,GAAK,EACpC,gBAAO,GAAG,EAAE,GAAG,EAAE,QAAQ,SAAG,IACpB,GACN,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { Types } from '@a2ui/lit/0.8';
2
+ import type { A2UIComponentProps } from '../../types';
3
+ /**
4
+ * Divider component - renders a visual separator line.
5
+ *
6
+ * Structure mirrors Lit's Divider component:
7
+ * <div class="a2ui-divider"> ← :host equivalent
8
+ * <hr class="..."> ← internal element
9
+ * </div>
10
+ */
11
+ export declare const Divider: import("react").NamedExoticComponent<A2UIComponentProps<Types.DividerNode>>;
12
+ export default Divider;
13
+ //# sourceMappingURL=Divider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../src/react-renderer/components/content/Divider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAItD;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,6EAgBlB,CAAC;AAEH,eAAe,OAAO,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo } from 'react';
3
+ import { useA2UIComponent } from '../../hooks/useA2UIComponent';
4
+ import { classMapToString, stylesToObject } from '../../lib/utils';
5
+ /**
6
+ * Divider component - renders a visual separator line.
7
+ *
8
+ * Structure mirrors Lit's Divider component:
9
+ * <div class="a2ui-divider"> ← :host equivalent
10
+ * <hr class="..."> ← internal element
11
+ * </div>
12
+ */
13
+ export const Divider = memo(function Divider({ node, surfaceId }) {
14
+ const { theme } = useA2UIComponent(node, surfaceId);
15
+ // Apply --weight CSS variable on root div (:host equivalent) for flex layouts
16
+ const hostStyle = node.weight !== undefined
17
+ ? { '--weight': node.weight }
18
+ : {};
19
+ return (_jsx("div", { className: "a2ui-divider", style: hostStyle, children: _jsx("hr", { className: classMapToString(theme.components.Divider), style: stylesToObject(theme.additionalStyles?.Divider) }) }));
20
+ });
21
+ export default Divider;
22
+ //# sourceMappingURL=Divider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Divider.js","sourceRoot":"","sources":["../../../../src/react-renderer/components/content/Divider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAG7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,EAAyC;IACrG,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAEpD,8EAA8E;IAC9E,MAAM,SAAS,GAAwB,IAAI,CAAC,MAAM,KAAK,SAAS;QAC9D,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,EAAyB;QACpD,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,CACL,cAAK,SAAS,EAAC,cAAc,EAAC,KAAK,EAAE,SAAS,YAC5C,aACE,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,EACrD,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,gBAAgB,EAAE,OAAO,CAAC,GACtD,GACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,OAAO,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { Types } from '@a2ui/lit/0.8';
2
+ import type { A2UIComponentProps } from '../../types';
3
+ /**
4
+ * Icon component - renders an icon using Material Symbols Outlined font.
5
+ *
6
+ * This matches the Lit renderer's approach using the g-icon class with
7
+ * Material Symbols Outlined font.
8
+ *
9
+ * @example Add Material Symbols font to your HTML:
10
+ * ```html
11
+ * <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" rel="stylesheet">
12
+ * ```
13
+ */
14
+ export declare const Icon: import("react").NamedExoticComponent<A2UIComponentProps<Types.IconNode>>;
15
+ export default Icon;
16
+ //# sourceMappingURL=Icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../src/react-renderer/components/content/Icon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAatD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI,0EA4Bf,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo } from 'react';
3
+ import { useA2UIComponent } from '../../hooks/useA2UIComponent';
4
+ import { classMapToString, stylesToObject } from '../../lib/utils';
5
+ /**
6
+ * Convert camelCase to snake_case for Material Symbols font.
7
+ * e.g., "shoppingCart" -> "shopping_cart"
8
+ * This matches the Lit renderer's approach.
9
+ */
10
+ function toSnakeCase(str) {
11
+ return str.replace(/([A-Z])/g, '_$1').toLowerCase();
12
+ }
13
+ /**
14
+ * Icon component - renders an icon using Material Symbols Outlined font.
15
+ *
16
+ * This matches the Lit renderer's approach using the g-icon class with
17
+ * Material Symbols Outlined font.
18
+ *
19
+ * @example Add Material Symbols font to your HTML:
20
+ * ```html
21
+ * <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" rel="stylesheet">
22
+ * ```
23
+ */
24
+ export const Icon = memo(function Icon({ node, surfaceId }) {
25
+ const { theme, resolveString } = useA2UIComponent(node, surfaceId);
26
+ const props = node.properties;
27
+ const iconName = resolveString(props.name);
28
+ if (!iconName) {
29
+ return null;
30
+ }
31
+ // Convert camelCase to snake_case for Material Symbols
32
+ const snakeCaseName = toSnakeCase(iconName);
33
+ // Apply --weight CSS variable on root div (:host equivalent) for flex layouts
34
+ const hostStyle = node.weight !== undefined
35
+ ? { '--weight': node.weight }
36
+ : {};
37
+ return (_jsx("div", { className: "a2ui-icon", style: hostStyle, children: _jsx("section", { className: classMapToString(theme.components.Icon), style: stylesToObject(theme.additionalStyles?.Icon), children: _jsx("span", { className: "g-icon", children: snakeCaseName }) }) }));
38
+ });
39
+ export default Icon;
40
+ //# sourceMappingURL=Icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../../src/react-renderer/components/content/Icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAG7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,cAAc,E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- renders an image from a URL with optional sizing and fit modes.
5
+ *
6
+ * Supports usageHint values: icon, avatar, smallFeature, mediumFeature, largeFeature, header
7
+ * Supports fit values: contain, cover, fill, none, scale-down (maps to object-fit via CSS variable)
8
+ */
9
+ export declare const Image: import("react").NamedExoticComponent<A2UIComponentProps<Types.ImageNode>>;
10
+ export default Image;
11
+ //# sourceMappingURL=Image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/react-renderer/components/content/Image.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAOtD;;;;;GAKG;AACH,eAAO,MAAM,KAAK,2EAuChB,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo } from 'react';
3
+ import { useA2UIComponent } from '../../hooks/useA2UIComponent';
4
+ import { classMapToString, stylesToObject, mergeClassMaps } from '../../lib/utils';
5
+ /**
6
+ * Image component - renders an image from a URL with optional sizing and fit modes.
7
+ *
8
+ * Supports usageHint values: icon, avatar, smallFeature, mediumFeature, largeFeature, header
9
+ * Supports fit values: contain, cover, fill, none, scale-down (maps to object-fit via CSS variable)
10
+ */
11
+ export const Image = memo(function Image({ node, surfaceId }) {
12
+ const { theme, resolveString } = useA2UIComponent(node, surfaceId);
13
+ const props = node.properties;
14
+ const url = resolveString(props.url);
15
+ const usageHint = props.usageHint;
16
+ const fit = props.fit ?? 'fill';
17
+ // Get merged classes for section (matches Lit's Styles.merge)
18
+ const classes = mergeClassMaps(theme.components.Image.all, usageHint ? theme.components.Image[usageHint] : {});
19
+ // Build style object with object-fit as CSS variable (matches Lit)
20
+ const style = {
21
+ ...stylesToObject(theme.additionalStyles?.Image),
22
+ '--object-fit': fit,
23
+ };
24
+ if (!url) {
25
+ return null;
26
+ }
27
+ // Apply --weight CSS variable on root div (:host equivalent) for flex layouts
28
+ const hostStyle = node.weight !== undefined
29
+ ? { '--weight': node.weight }
30
+ : {};
31
+ return (_jsx("div", { className: "a2ui-image", style: hostStyle, children: _jsx("section", { className: classMapToString(classes), style: style, children: _jsx("img", { src: url, alt: "" }) }) }));
32
+ });
33
+ export default Image;
34
+ //# sourceMappingURL=Image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../../src/react-renderer/components/content/Image.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAG7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKnF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,KAAK,CAAC,EAAE,IAAI,EAAE,SAAS,EAAuC;IAC/F,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,gBAAgB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACnE,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC;IAE9B,MAAM,GAAG,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrC,MAAM,SAAS,GAAG,KAAK,CAAC,SAAkC,CAAC;IAC3D,MAAM,GAAG,GAAI,KAAK,CAAC,GAAe,IAAI,MAAM,CAAC;IAE7C,8DAA8D;IAC9D,MAAM,OAAO,GAAG,cAAc,CAC5B,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,EAC1B,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CACnD,CAAC;IAEF,mEAAmE;IACnE,MAAM,KAAK,GAAwB;QACjC,GAAG,cAAc,CAAC,KAAK,CAAC,gBAAgB,EAAE,KAAK,CAAC;QAChD,cAAc,EAAE,GAAG;KACG,CAAC;IAEzB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8EAA8E;IAC9E,MAAM,SAAS,GAAwB,IAAI,CAAC,MAAM,KAAK,SAAS;QAC9D,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,EAAyB;QACpD,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,CACL,cAAK,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,SAAS,YAC1C,kBACE,SAAS,EAAE,gBAAgB,CAAC,OAAO,CAAC,EACpC,KAAK,EAAE,KAAK,YAEZ,cAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAC,EAAE,GAAG,GAChB,GACN,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { Types } from '@a2ui/lit/0.8';
2
+ import type { A2UIComponentProps } from '../../types';
3
+ /**
4
+ * Text component - renders text content with markdown support.
5
+ *
6
+ * Structure mirrors Lit's Text component:
7
+ * <div class="a2ui-text"> ← :host equivalent
8
+ * <section class="..."> ← theme classes
9
+ * <h2>...</h2> ← rendered markdown content
10
+ * </section>
11
+ * </div>
12
+ *
13
+ * Text is parsed as markdown and rendered as HTML (matches Lit renderer behavior).
14
+ * Supports usageHint values: h1, h2, h3, h4, h5, caption, body
15
+ *
16
+ * Markdown features supported:
17
+ * - **Bold** and *italic* text
18
+ * - Lists (ordered and unordered)
19
+ * - `inline code` and code blocks
20
+ * - [Links](url) (auto-linkified URLs too)
21
+ * - Blockquotes
22
+ * - Horizontal rules
23
+ *
24
+ * Note: Raw HTML is disabled for security.
25
+ */
26
+ export declare const Text: import("react").NamedExoticComponent<A2UIComponentProps<Types.TextNode>>;
27
+ export default Text;
28
+ //# sourceMappingURL=Text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/react-renderer/components/content/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAgEtD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,IAAI,0EA+Ef,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -0,0 +1,132 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo, memo } from 'react';
3
+ import { useA2UIComponent } from '../../hooks/useA2UIComponent';
4
+ import { classMapToString, stylesToObject, mergeClassMaps } from '../../lib/utils';
5
+ import MarkdownIt from 'markdown-it';
6
+ function isHintedStyles(styles) {
7
+ if (typeof styles !== 'object' || !styles || Array.isArray(styles))
8
+ return false;
9
+ const expected = ['h1', 'h2', 'h3', 'h4', 'h5', 'caption', 'body'];
10
+ return expected.some((v) => v in styles);
11
+ }
12
+ /**
13
+ * Markdown-it instance for rendering markdown text.
14
+ * Uses synchronous import to ensure availability at first render (matches Lit renderer).
15
+ *
16
+ * Configuration matches Lit's markdown directive (uses MarkdownIt defaults):
17
+ * - html: false (default) - Security: disable raw HTML
18
+ * - linkify: false (default) - Don't auto-convert URLs/emails to links
19
+ * - breaks: false (default) - Don't convert \n to <br>
20
+ * - typographer: false (default) - Don't use smart quotes/dashes
21
+ */
22
+ const markdownRenderer = new MarkdownIt();
23
+ /**
24
+ * Apply theme classes to markdown HTML elements.
25
+ * Replaces default element tags with themed versions.
26
+ */
27
+ function applyMarkdownTheme(html, markdownTheme) {
28
+ if (!markdownTheme)
29
+ return html;
30
+ // Map of element -> classes
31
+ const replacements = [];
32
+ for (const [element, classes] of Object.entries(markdownTheme)) {
33
+ if (!classes || (Array.isArray(classes) && classes.length === 0))
34
+ continue;
35
+ const classString = Array.isArray(classes) ? classes.join(' ') : classMapToString(classes);
36
+ if (!classString)
37
+ continue;
38
+ // Create regex to match opening tags (handles self-closing and regular)
39
+ const tagRegex = new RegExp(`<${element}(?=\\s|>|/>)`, 'gi');
40
+ replacements.push([tagRegex, `<${element} class="${classString}"`]);
41
+ }
42
+ let result = html;
43
+ for (const [regex, replacement] of replacements) {
44
+ result = result.replace(regex, replacement);
45
+ }
46
+ return result;
47
+ }
48
+ /**
49
+ * Text component - renders text content with markdown support.
50
+ *
51
+ * Structure mirrors Lit's Text component:
52
+ * <div class="a2ui-text"> ← :host equivalent
53
+ * <section class="..."> ← theme classes
54
+ * <h2>...</h2> ← rendered markdown content
55
+ * </section>
56
+ * </div>
57
+ *
58
+ * Text is parsed as markdown and rendered as HTML (matches Lit renderer behavior).
59
+ * Supports usageHint values: h1, h2, h3, h4, h5, caption, body
60
+ *
61
+ * Markdown features supported:
62
+ * - **Bold** and *italic* text
63
+ * - Lists (ordered and unordered)
64
+ * - `inline code` and code blocks
65
+ * - [Links](url) (auto-linkified URLs too)
66
+ * - Blockquotes
67
+ * - Horizontal rules
68
+ *
69
+ * Note: Raw HTML is disabled for security.
70
+ */
71
+ export const Text = memo(function Text({ node, surfaceId }) {
72
+ const { theme, resolveString } = useA2UIComponent(node, surfaceId);
73
+ const props = node.properties;
74
+ const textValue = resolveString(props.text);
75
+ const usageHint = props.usageHint;
76
+ // Get merged classes (matches Lit's Styles.merge)
77
+ const classes = mergeClassMaps(theme.components.Text.all, usageHint ? theme.components.Text[usageHint] : {});
78
+ // Get additional styles based on usage hint
79
+ const additionalStyles = useMemo(() => {
80
+ const textStyles = theme.additionalStyles?.Text;
81
+ if (!textStyles)
82
+ return undefined;
83
+ if (isHintedStyles(textStyles)) {
84
+ const hint = usageHint ?? 'body';
85
+ return stylesToObject(textStyles[hint]);
86
+ }
87
+ return stylesToObject(textStyles);
88
+ }, [theme.additionalStyles?.Text, usageHint]);
89
+ // Render markdown content (matches Lit behavior - always uses markdown)
90
+ const renderedContent = useMemo(() => {
91
+ if (textValue === null || textValue === undefined) {
92
+ return null;
93
+ }
94
+ // Add markdown prefix based on usageHint (matches Lit behavior)
95
+ let markdownText = textValue;
96
+ switch (usageHint) {
97
+ case 'h1':
98
+ markdownText = `# ${markdownText}`;
99
+ break;
100
+ case 'h2':
101
+ markdownText = `## ${markdownText}`;
102
+ break;
103
+ case 'h3':
104
+ markdownText = `### ${markdownText}`;
105
+ break;
106
+ case 'h4':
107
+ markdownText = `#### ${markdownText}`;
108
+ break;
109
+ case 'h5':
110
+ markdownText = `##### ${markdownText}`;
111
+ break;
112
+ case 'caption':
113
+ markdownText = `*${markdownText}*`;
114
+ break;
115
+ default:
116
+ break; // Body - no prefix
117
+ }
118
+ const rawHtml = markdownRenderer.render(markdownText);
119
+ const themedHtml = applyMarkdownTheme(rawHtml, theme.markdown);
120
+ return { __html: themedHtml };
121
+ }, [textValue, theme.markdown, usageHint]);
122
+ if (!renderedContent) {
123
+ return null;
124
+ }
125
+ // Apply --weight CSS variable on root div (:host equivalent) for flex layouts
126
+ const hostStyle = node.weight !== undefined
127
+ ? { '--weight': node.weight }
128
+ : {};
129
+ return (_jsx("div", { className: "a2ui-text", style: hostStyle, children: _jsx("section", { className: classMapToString(classes), style: additionalStyles, dangerouslySetInnerHTML: renderedContent }) }));
130
+ });
131
+ export default Text;
132
+ //# sourceMappingURL=Text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../../src/react-renderer/components/content/Text.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,UAAU,MAAM,aAAa,CAAC;AAcrC,SAAS,cAAc,CAAC,MAAe;IACrC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,MA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,EAAyB;QACpD,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,CACL,cAAK,SAAS,EAAC,WAAW,EAAC,KAAK,EAAE,SAAS,YACzC,kBACE,SAAS,EAAE,gBAAgB,CAAC,OAAO,CAAC,EACpC,KAAK,EAAE,gBAAgB,EACvB,uBAAuB,EAAE,eAAe,GACxC,GACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { Types } from '@a2ui/lit/0.8';
2
+ import type { A2UIComponentProps } from '../../types';
3
+ /**
4
+ * Video component - renders a video player.
5
+ *
6
+ * Supports regular video URLs and YouTube URLs (renders as embedded iframe).
7
+ */
8
+ export declare const Video: import("react").NamedExoticComponent<A2UIComponentProps<Types.VideoNode>>;
9
+ export default Video;
10
+ //# sourceMappingURL=Video.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Video.d.ts","sourceRoot":"","sources":["../../../../src/react-renderer/components/content/Video.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAsBtD;;;;GAIG;AACH,eAAO,MAAM,KAAK,2EAqChB,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo } from 'react';
3
+ import { useA2UIComponent } from '../../hooks/useA2UIComponent';
4
+ import { classMapToString, stylesToObject } from '../../lib/utils';
5
+ /**
6
+ * Check if a URL is a YouTube URL and extract the video ID.
7
+ */
8
+ function getYouTubeVideoId(url) {
9
+ const patterns = [
10
+ /(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([^&\s?]+)/,
11
+ ];
12
+ for (const pattern of patterns) {
13
+ const match = url.match(pattern);
14
+ if (match && match.length > 1) {
15
+ // Non-null assertion is safe here since we checked match.length > 1
16
+ return match[1];
17
+ }
18
+ }
19
+ return null;
20
+ }
21
+ /**
22
+ * Video component - renders a video player.
23
+ *
24
+ * Supports regular video URLs and YouTube URLs (renders as embedded iframe).
25
+ */
26
+ export const Video = memo(function Video({ node, surfaceId }) {
27
+ const { theme, resolveString } = useA2UIComponent(node, surfaceId);
28
+ const props = node.properties;
29
+ const url = resolveString(props.url);
30
+ if (!url) {
31
+ return null;
32
+ }
33
+ const youtubeId = getYouTubeVideoId(url);
34
+ // Apply --weight CSS variable on root div (:host equivalent) for flex layouts
35
+ const hostStyle = node.weight !== undefined
36
+ ? { '--weight': node.weight }
37
+ : {};
38
+ return (_jsx("div", { className: "a2ui-video", style: hostStyle, children: _jsx("section", { className: classMapToString(theme.components.Video), style: stylesToObject(theme.additionalStyles?.Video), children: youtubeId ? (_jsx("iframe", { src: `https://www.youtube.com/embed/${youtubeId}`, title: "YouTube video player", allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", allowFullScreen: true, style: { border: 'none', width: '100%', aspectRatio: '16/9' } })) : (_jsx("video", { src: url, controls: true })) }) }));
39
+ });
40
+ export default Video;
41
+ //# sourceMappingURL=Video.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Video.js","sourceRoot":"","sources":["../../../../src/react-renderer/components/content/Video.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAG7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEnE;;GAEG;AACH,SAAS,iBAAiB,CAAC,GAAW;IACpC,MAAM,QAAQ,GAAG;QACf,yEAAyE;KAC1E,CAAC;IACF,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACjC,IAAI,KAAK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CAAC,CAAC,CAAC,CACF,gBAAO,GAAG,EAAE,GAAG,EAAE,QAAQ,SAAG,CAC7B,GACO,GACN,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { Text } from './Text';
2
+ export { Image } from './Image';
3
+ export { Icon } from './Icon';
4
+ export { Divider } from './Divider';
5
+ export { Video } from './Video';
6
+ export { AudioPlayer } from './AudioPlayer';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react-renderer/components/content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { Text } from './Text';
2
+ export { Image } from './Image';
3
+ export { Icon } from './Icon';
4
+ export { Divider } from './Divider';
5
+ export { Video } from './Video';
6
+ export { AudioPlayer } from './AudioPlayer';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/react-renderer/components/content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { Types } from '@a2ui/lit/0.8';
2
+ import type { A2UIComponentProps } from '../../types';
3
+ /**
4
+ * Button component - a clickable element that triggers an action.
5
+ *
6
+ * Contains a child component (usually Text or Icon) and dispatches
7
+ * a user action when clicked.
8
+ */
9
+ export declare const Button: import("react").NamedExoticComponent<A2UIComponentProps<Types.ButtonNode>>;
10
+ export default Button;
11
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/react-renderer/components/interactive/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAKtD;;;;;GAKG;AACH,eAAO,MAAM,MAAM,4EA0BjB,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback, memo } from 'react';
3
+ import { useA2UIComponent } from '../../hooks/useA2UIComponent';
4
+ import { classMapToString, stylesToObject } from '../../lib/utils';
5
+ import { ComponentNode } from '../../core/ComponentNode';
6
+ /**
7
+ * Button component - a clickable element that triggers an action.
8
+ *
9
+ * Contains a child component (usually Text or Icon) and dispatches
10
+ * a user action when clicked.
11
+ */
12
+ export const Button = memo(function Button({ node, surfaceId }) {
13
+ const { theme, sendAction } = useA2UIComponent(node, surfaceId);
14
+ const props = node.properties;
15
+ const handleClick = useCallback(() => {
16
+ if (props.action) {
17
+ sendAction(props.action);
18
+ }
19
+ }, [props.action, sendAction]);
20
+ // Apply --weight CSS variable on root div (:host equivalent) for flex layouts
21
+ const hostStyle = node.weight !== undefined
22
+ ? { '--weight': node.weight }
23
+ : {};
24
+ return (_jsx("div", { className: "a2ui-button", style: hostStyle, children: _jsx("button", { className: classMapToString(theme.components.Button), style: stylesToObject(theme.additionalStyles?.Button), onClick: handleClick, children: _jsx(ComponentNode, { node: props.child, surfaceId: surfaceId }) }) }));
25
+ });
26
+ export default Button;
27
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/react-renderer/components/interactive/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAwC;IAClG,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,gBAAgB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAChE,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC;IAE9B,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACnC,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YACjB,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAE/B,8EAA8E;IAC9E,MAAM,SAAS,GAAwB,IAAI,CAAC,MAAM,KAAK,SAAS;QAC9D,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,EAAyB;QACpD,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,CACL,cAAK,SAAS,EAAC,aAAa,EAAC,KAAK,EAAE,SAAS,YAC3C,iBACE,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EACpD,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,gBAAgB,EAAE,MAAM,CAAC,EACrD,OAAO,EAAE,WAAW,YAEpB,KAAC,aAAa,IAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,GAAI,GACnD,GACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { Types } from '@a2ui/lit/0.8';
2
+ import type { A2UIComponentProps } from '../../types';
3
+ /**
4
+ * CheckBox component - a boolean toggle with a label.
5
+ *
6
+ * Supports two-way data binding for the checked state.
7
+ */
8
+ export declare const CheckBox: import("react").NamedExoticComponent<A2UIComponentProps<Types.CheckboxNode>>;
9
+ export default CheckBox;
10
+ //# sourceMappingURL=CheckBox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckBox.d.ts","sourceRoot":"","sources":["../../../../src/react-renderer/components/interactive/CheckBox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAItD;;;;GAIG;AACH,eAAO,MAAM,QAAQ,8EAiFnB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useCallback, useEffect, useId, memo } from 'react';
3
+ import { useA2UIComponent } from '../../hooks/useA2UIComponent';
4
+ import { classMapToString, stylesToObject } from '../../lib/utils';
5
+ /**
6
+ * CheckBox component - a boolean toggle with a label.
7
+ *
8
+ * Supports two-way data binding for the checked state.
9
+ */
10
+ export const CheckBox = memo(function CheckBox({ node, surfaceId }) {
11
+ const { theme, resolveString, resolveBoolean, setValue, getValue } = useA2UIComponent(node, surfaceId);
12
+ const props = node.properties;
13
+ const id = useId();
14
+ const label = resolveString(props.label);
15
+ const valuePath = props.value?.path;
16
+ const initialChecked = resolveBoolean(props.value) ?? false;
17
+ const [checked, setChecked] = useState(initialChecked);
18
+ // Sync with external data model changes (path binding)
19
+ useEffect(() => {
20
+ if (valuePath) {
21
+ const externalValue = getValue(valuePath);
22
+ if (externalValue !== null && Boolean(externalValue) !== checked) {
23
+ setChecked(Boolean(externalValue));
24
+ }
25
+ }
26
+ }, [valuePath, getValue]); // eslint-disable-line react-hooks/exhaustive-deps
27
+ // Sync when literal value changes from props (server-driven updates via surfaceUpdate)
28
+ useEffect(() => {
29
+ if (props.value?.literalBoolean !== undefined) {
30
+ setChecked(props.value.literalBoolean);
31
+ }
32
+ }, [props.value?.literalBoolean]);
33
+ const handleChange = useCallback((e) => {
34
+ const newValue = e.target.checked;
35
+ setChecked(newValue);
36
+ // Two-way binding: update data model
37
+ if (valuePath) {
38
+ setValue(valuePath, newValue);
39
+ }
40
+ }, [valuePath, setValue]);
41
+ // Structure mirrors Lit's CheckBox component:
42
+ // <div class="a2ui-checkbox"> ← :host equivalent
43
+ // <section class="..."> ← internal element
44
+ // <input>...</input>
45
+ // <label>...</label>
46
+ // </section>
47
+ // </div>
48
+ // Apply --weight CSS variable on root div (:host equivalent) for flex layouts
49
+ const hostStyle = node.weight !== undefined
50
+ ? { '--weight': node.weight }
51
+ : {};
52
+ return (_jsx("div", { className: "a2ui-checkbox", style: hostStyle, children: _jsxs("section", { className: classMapToString(theme.components.CheckBox.container), style: stylesToObject(theme.additionalStyles?.CheckBox), children: [_jsx("input", { type: "checkbox", id: id, checked: checked, onChange: handleChange, className: classMapToString(theme.components.CheckBox.element) }), label && (_jsx("label", { htmlFor: id, className: classMapToString(theme.components.CheckBox.label), children: label }))] }) }));
53
+ });
54
+ export default CheckBox;
55
+ //# sourceMappingURL=CheckBox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckBox.js","sourceRoot":"","sources":["../../../../src/react-renderer/components/interactive/CheckBox.tsx"],"names":[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AAC,GAC9D,EACD,KAAK,IAAI,CACR,gBACE,OAAO,EAAE,EAAE,EACX,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,YAE3D,KAAK,GACA,CACT,IACO,GACN,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { Types } from '@a2ui/lit/0.8';
2
+ import type { A2UIComponentProps } from '../../types';
3
+ /**
4
+ * DateTimeInput component - a date and/or time picker.
5
+ *
6
+ * Supports enabling date, time, or both. Uses native HTML5 date/time inputs.
7
+ */
8
+ export declare const DateTimeInput: import("react").NamedExoticComponent<A2UIComponentProps<Types.DateTimeInputNode>>;
9
+ export default DateTimeInput;
10
+ //# sourceMappingURL=DateTimeInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateTimeInput.d.ts","sourceRoot":"","sources":["../../../../src/react-renderer/components/interactive/DateTimeInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAItD;;;;GAIG;AACH,eAAO,MAAM,aAAa,mFAwFxB,CAAC;AAEH,eAAe,aAAa,CAAC"}