@astryxdesign/core 0.6.3-canary.ea2f048 → 0.6.3-canary.f04b501

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 (198) hide show
  1. package/dist/Button/Button.d.ts.map +1 -1
  2. package/dist/Button/Button.js +13 -28
  3. package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
  4. package/dist/Chat/ChatLayoutScrollButton.js +43 -33
  5. package/dist/Chat/ChatMessageBubble.d.ts +2 -0
  6. package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
  7. package/dist/Chat/ChatMessageBubble.js +5 -3
  8. package/dist/Chat/ChatMessageList.d.ts +2 -1
  9. package/dist/Chat/ChatMessageList.d.ts.map +1 -1
  10. package/dist/Chat/ChatMessageList.js +4 -3
  11. package/dist/Chat/ChatMessageMetadata.d.ts +5 -4
  12. package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
  13. package/dist/Chat/ChatMessageMetadata.js +12 -9
  14. package/dist/Chat/ChatSendButton.d.ts +2 -1
  15. package/dist/Chat/ChatSendButton.d.ts.map +1 -1
  16. package/dist/Chat/ChatSendButton.js +5 -3
  17. package/dist/Chat/ChatSystemMessage.d.ts +3 -3
  18. package/dist/Chat/ChatSystemMessage.d.ts.map +1 -1
  19. package/dist/Chat/ChatSystemMessage.js +2 -2
  20. package/dist/Citation/Citation.d.ts +1 -1
  21. package/dist/Citation/Citation.d.ts.map +1 -1
  22. package/dist/Citation/Citation.js +3 -2
  23. package/dist/CodeBlock/highlightRanges.d.ts.map +1 -1
  24. package/dist/CodeBlock/highlightRanges.js +14 -3
  25. package/dist/Dialog/DialogHeader.d.ts.map +1 -1
  26. package/dist/Dialog/DialogHeader.js +4 -4
  27. package/dist/Icon/Icon.d.ts +6 -31
  28. package/dist/Icon/Icon.d.ts.map +1 -1
  29. package/dist/Icon/Icon.js +8 -71
  30. package/dist/Icon/IconDefaultSizeContext.d.ts +4 -0
  31. package/dist/Icon/IconDefaultSizeContext.d.ts.map +1 -0
  32. package/dist/Icon/IconDefaultSizeContext.js +18 -0
  33. package/dist/Icon/IconSize.stylex.d.ts +65 -0
  34. package/dist/Icon/IconSize.stylex.d.ts.map +1 -0
  35. package/dist/Icon/IconSize.stylex.js +75 -0
  36. package/dist/Item/Item.d.ts +1 -1
  37. package/dist/Item/Item.d.ts.map +1 -1
  38. package/dist/Item/Item.js +4 -3
  39. package/dist/Link/useLinkComponent.d.ts +5 -15
  40. package/dist/Link/useLinkComponent.d.ts.map +1 -1
  41. package/dist/Link/useLinkComponent.js +34 -51
  42. package/dist/List/List.d.ts +19 -1
  43. package/dist/List/List.d.ts.map +1 -1
  44. package/dist/List/List.js +9 -2
  45. package/dist/List/ListContext.d.ts +1 -0
  46. package/dist/List/ListContext.d.ts.map +1 -1
  47. package/dist/List/ListContext.js +2 -1
  48. package/dist/List/ListItem.d.ts +1 -1
  49. package/dist/List/ListItem.d.ts.map +1 -1
  50. package/dist/List/ListItem.js +9 -2
  51. package/dist/Markdown/Markdown.js +2 -2
  52. package/dist/Markdown/parser.d.ts.map +1 -1
  53. package/dist/Markdown/parser.js +15 -15
  54. package/dist/Markdown/plugins/index.d.ts +1 -0
  55. package/dist/Markdown/plugins/index.d.ts.map +1 -1
  56. package/dist/Markdown/plugins/index.js +2 -1
  57. package/dist/Markdown/plugins/softBreaks.d.ts +3 -0
  58. package/dist/Markdown/plugins/softBreaks.d.ts.map +1 -0
  59. package/dist/Markdown/plugins/softBreaks.js +172 -0
  60. package/dist/Markdown/url.d.ts +2 -0
  61. package/dist/Markdown/url.d.ts.map +1 -1
  62. package/dist/Markdown/url.js +8 -2
  63. package/dist/MetadataList/MetadataList.js +3 -3
  64. package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
  65. package/dist/PowerSearch/PowerSearchValueEditor.js +5 -0
  66. package/dist/ScrollableArea/ScrollableArea.d.ts +1 -0
  67. package/dist/ScrollableArea/ScrollableArea.d.ts.map +1 -1
  68. package/dist/ScrollableArea/ScrollableArea.js +1 -0
  69. package/dist/SegmentedControl/SegmentedControl.d.ts +1 -1
  70. package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  71. package/dist/SegmentedControl/SegmentedControl.js +1 -0
  72. package/dist/Selector/Selector.d.ts.map +1 -1
  73. package/dist/Selector/Selector.js +9 -2
  74. package/dist/TopNav/TopNavMenu.d.ts +1 -1
  75. package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
  76. package/dist/TopNav/TopNavMenu.js +3 -2
  77. package/dist/astryx.css +7 -2
  78. package/dist/hooks/useClickableContainer.d.ts +10 -1
  79. package/dist/hooks/useClickableContainer.d.ts.map +1 -1
  80. package/dist/hooks/useClickableContainer.js +15 -4
  81. package/dist/theme/declarationBoundary.d.ts +17 -0
  82. package/dist/theme/declarationBoundary.d.ts.map +1 -0
  83. package/dist/theme/declarationBoundary.js +343 -0
  84. package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
  85. package/dist/theme/derivedVarRegistry.js +4 -0
  86. package/dist/theme/generateThemeRules.d.ts +13 -7
  87. package/dist/theme/generateThemeRules.d.ts.map +1 -1
  88. package/dist/theme/generateThemeRules.js +131 -35
  89. package/dist/utils/safeUrl.d.ts +11 -0
  90. package/dist/utils/safeUrl.d.ts.map +1 -0
  91. package/dist/utils/safeUrl.js +78 -0
  92. package/package.json +3 -3
  93. package/src/Button/Button.doc.mjs +5 -5
  94. package/src/Button/Button.tsx +15 -13
  95. package/src/Chat/ChatLayoutScrollButton.spec.md +338 -0
  96. package/src/Chat/ChatLayoutScrollButton.tsx +15 -10
  97. package/src/Chat/ChatMessageBubble.doc.mjs +28 -15
  98. package/src/Chat/ChatMessageBubble.spec.md +263 -0
  99. package/src/Chat/ChatMessageBubble.test.tsx +93 -0
  100. package/src/Chat/ChatMessageBubble.tsx +8 -3
  101. package/src/Chat/ChatMessageList.spec.md +222 -0
  102. package/src/Chat/ChatMessageList.test.tsx +64 -2
  103. package/src/Chat/ChatMessageList.tsx +4 -3
  104. package/src/Chat/ChatMessageMetadata.doc.mjs +57 -3
  105. package/src/Chat/ChatMessageMetadata.spec.md +220 -0
  106. package/src/Chat/ChatMessageMetadata.test.tsx +34 -0
  107. package/src/Chat/ChatMessageMetadata.tsx +13 -13
  108. package/src/Chat/ChatSendButton.doc.mjs +32 -0
  109. package/src/Chat/ChatSendButton.spec.md +227 -0
  110. package/src/Chat/ChatSendButton.test.tsx +127 -4
  111. package/src/Chat/ChatSendButton.tsx +5 -3
  112. package/src/Chat/ChatSystemMessage.doc.mjs +115 -12
  113. package/src/Chat/ChatSystemMessage.spec.md +225 -0
  114. package/src/Chat/ChatSystemMessage.test.tsx +112 -20
  115. package/src/Chat/ChatSystemMessage.tsx +4 -6
  116. package/src/Chat/__tests__/ChatLayoutScrollButton.a11y.chromium.spec.ts +6 -2
  117. package/src/Chat/__tests__/ChatLayoutScrollButtonSurface.a11y.chromium.spec.ts +740 -0
  118. package/src/Chat/__tests__/ChatMessageBubble.a11y.chromium.spec.ts +457 -0
  119. package/src/Chat/__tests__/ChatMessageBubble.auditProvenance.test.ts +91 -0
  120. package/src/Chat/__tests__/ChatMessageBubble.auditProvenance.ts +91 -0
  121. package/src/Chat/__tests__/ChatMessageList.a11y.chromium.spec.ts +456 -0
  122. package/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts +413 -0
  123. package/src/Chat/__tests__/ChatSendButton.a11y.chromium.spec.ts +1522 -0
  124. package/src/Chat/__tests__/ChatSystemMessage.a11y.chromium.spec.ts +1004 -0
  125. package/src/Citation/Citation.doc.mjs +2 -2
  126. package/src/Citation/Citation.test.tsx +17 -0
  127. package/src/Citation/Citation.tsx +4 -2
  128. package/src/ClickableCard/ClickableCard.doc.mjs +2 -2
  129. package/src/CodeBlock/highlightRanges.test.ts +143 -1
  130. package/src/CodeBlock/highlightRanges.ts +15 -5
  131. package/src/Dialog/Dialog.doc.mjs +2 -0
  132. package/src/Dialog/DialogHeader.doc.mjs +10 -0
  133. package/src/Dialog/DialogHeader.test.tsx +70 -3
  134. package/src/Dialog/DialogHeader.tsx +14 -5
  135. package/src/Dialog/modules/DialogHeader.spec.md +62 -40
  136. package/src/DropdownMenu/DropdownMenu.test.tsx +5 -2
  137. package/src/Icon/Icon.doc.mjs +7 -5
  138. package/src/Icon/Icon.spec.md +81 -40
  139. package/src/Icon/Icon.test.tsx +6 -3
  140. package/src/Icon/Icon.tsx +20 -68
  141. package/src/Icon/IconDefaultSizeContext.ts +23 -0
  142. package/src/Icon/IconSize.stylex.ts +70 -0
  143. package/src/IconButton/IconButton.doc.mjs +3 -3
  144. package/src/IconButton/IconButton.test.tsx +40 -0
  145. package/src/Item/Item.doc.mjs +6 -2
  146. package/src/Item/Item.tsx +9 -3
  147. package/src/Link/Link.doc.mjs +6 -4
  148. package/src/Link/LinkProvider.doc.mjs +2 -2
  149. package/src/Link/__tests__/Link.navigation.a11y.chromium.spec.ts +261 -0
  150. package/src/Link/useLinkComponent.test.tsx +333 -0
  151. package/src/Link/useLinkComponent.ts +29 -57
  152. package/src/List/List.doc.mjs +6 -0
  153. package/src/List/List.test.tsx +117 -1
  154. package/src/List/List.tsx +22 -2
  155. package/src/List/ListContext.tsx +3 -1
  156. package/src/List/ListItem.doc.mjs +2 -2
  157. package/src/List/ListItem.source-build.test.mjs +41 -0
  158. package/src/List/ListItem.tsx +26 -2
  159. package/src/Markdown/Markdown.doc.mjs +28 -2
  160. package/src/Markdown/Markdown.public.test.ts +4 -0
  161. package/src/Markdown/Markdown.renderBoundary.test.tsx +72 -0
  162. package/src/Markdown/Markdown.spec.md +30 -18
  163. package/src/Markdown/Markdown.test.tsx +76 -3
  164. package/src/Markdown/Markdown.tsx +2 -2
  165. package/src/Markdown/incremental.test.ts +31 -0
  166. package/src/Markdown/modules/softBreaks.spec.md +137 -0
  167. package/src/Markdown/parser.test.ts +38 -6
  168. package/src/Markdown/parser.ts +45 -11
  169. package/src/Markdown/plugins/index.ts +1 -0
  170. package/src/Markdown/plugins/softBreaks.test.tsx +172 -0
  171. package/src/Markdown/plugins/softBreaks.ts +169 -0
  172. package/src/Markdown/url.ts +9 -3
  173. package/src/MetadataList/MetadataList.test.tsx +4 -2
  174. package/src/MetadataList/MetadataList.tsx +3 -3
  175. package/src/PowerSearch/PowerSearchValueEditor.test.tsx +51 -0
  176. package/src/PowerSearch/PowerSearchValueEditor.tsx +4 -0
  177. package/src/ScrollableArea/ScrollableArea.tsx +1 -0
  178. package/src/SegmentedControl/SegmentedControl.test.tsx +30 -0
  179. package/src/SegmentedControl/SegmentedControl.tsx +2 -1
  180. package/src/Selector/Selector.doc.mjs +1 -1
  181. package/src/Selector/Selector.tsx +11 -1
  182. package/src/Selector/__tests__/Selector.a11y.chromium.spec.ts +45 -0
  183. package/src/Token/Token.doc.mjs +2 -2
  184. package/src/TopNav/TopNavMenu.doc.mjs +2 -2
  185. package/src/TopNav/TopNavMenu.test.tsx +30 -0
  186. package/src/TopNav/TopNavMenu.tsx +7 -2
  187. package/src/hooks/useClickableContainer.test.tsx +236 -0
  188. package/src/hooks/useClickableContainer.ts +20 -4
  189. package/src/theme/Theme.test.tsx +32 -0
  190. package/src/theme/declarationBoundary.test.ts +126 -0
  191. package/src/theme/declarationBoundary.ts +347 -0
  192. package/src/theme/derivedVarRegistry.test.ts +7 -0
  193. package/src/theme/derivedVarRegistry.ts +1 -0
  194. package/src/theme/generateThemeRules.test.ts +497 -2
  195. package/src/theme/generateThemeRules.ts +219 -51
  196. package/src/theme/tokenValueCompat.test.ts +4 -1
  197. package/src/utils/safeUrl.test.ts +88 -0
  198. package/src/utils/safeUrl.ts +85 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAwB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C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usVars, borderVars, durationVars, easeVars, fontWeightVars, typeScaleVars, shadowVars, focusVars } from "../theme/tokens.stylex.js";
25
25
  import { Spinner } from "../Spinner/index.js";
26
26
  import { VisuallyHidden } from "../VisuallyHidden/index.js";
27
+ import { IconDefaultSizeProvider } from "../Icon/IconDefaultSizeContext.js";
28
+ import { iconBoxSizeStyles } from "../Icon/IconSize.stylex.js";
27
29
  import { EDGE_COMP_ATTR } from "../Layout/edgeCompensation.stylex.js";
28
30
  import { useSize } from "../SizeContext/SizeContext.js";
29
31
  import { useButtonGroup } from "../ButtonGroup/ButtonGroupContext.js";
@@ -132,32 +134,6 @@ const sizeStyles = {
132
134
  }
133
135
  };
134
136
 
135
- /**
136
- * Icon size per button size.
137
- * Matches Icon sizing: sm/md=16px, lg=20px.
138
- * fontSize is set so emoji and text-based icons scale correctly.
139
- */
140
- const iconSizeStyles = {
141
- sm: {
142
- kzqmXN: "x1kky2od",
143
- kZKoxP: "xlup9mm",
144
- kGuDYH: "x1j61zf2",
145
- $$css: true
146
- },
147
- md: {
148
- kzqmXN: "x1kky2od",
149
- kZKoxP: "xlup9mm",
150
- kGuDYH: "x1j61zf2",
151
- $$css: true
152
- },
153
- lg: {
154
- kzqmXN: "xw4jnvo",
155
- kZKoxP: "x1qx5ct2",
156
- kGuDYH: "xwsyq91",
157
- $$css: true
158
- }
159
- };
160
-
161
137
  /**
162
138
  * Resting elevation for floating buttons (e.g. a FAB). `none` is the default
163
139
  * flat button; `low`/`med`/`high` map to the shadow token scale. 'none' stays
@@ -221,6 +197,11 @@ const variants = {
221
197
  * Button size type derived from the sizeStyles StyleX object
222
198
  */
223
199
 
200
+ const iconSizeByButtonSize = {
201
+ sm: 'sm',
202
+ md: 'sm',
203
+ lg: 'md'
204
+ };
224
205
  const spinnerReveal = "x18re5ia-B";
225
206
  const contentHide = "x188b6p3-B";
226
207
 
@@ -457,6 +438,7 @@ export function Button({
457
438
  size,
458
439
  elevation: buttonGroup ? 'none' : elevation
459
440
  }), sharedStylexProps, className, style);
441
+ const iconSize = iconSizeByButtonSize[size];
460
442
  const buttonContent = /*#__PURE__*/_jsxs(_Fragment, {
461
443
  children: [isLoadingState && /*#__PURE__*/_jsx("span", {
462
444
  ...{
@@ -476,8 +458,11 @@ export function Button({
476
458
  ...stylex.props(styles.contentWrapper, isLoadingState && (delaySpinner ? loadingStyles.hiddenContentDelayed : loadingStyles.hiddenContent)),
477
459
  "aria-hidden": isLoadingState || undefined,
478
460
  children: [icon && /*#__PURE__*/_jsx("span", {
479
- ...stylex.props(styles.iconWrapper, iconSizeStyles[size]),
480
- children: icon
461
+ ...stylex.props(styles.iconWrapper, iconBoxSizeStyles[iconSize]),
462
+ children: /*#__PURE__*/_jsx(IconDefaultSizeProvider, {
463
+ value: iconSize,
464
+ children: icon
465
+ })
481
466
  }), isIconOnly ? null : /*#__PURE__*/_jsx("span", {
482
467
  ...{
483
468
  className: "xb3r6kr xlyipyv xeuugli"
@@ -1 +1 @@
1
- {"version":3,"file":"ChatLayoutScrollButton.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatLayoutScrollButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAS5C,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CACvD,SAAS,CAAC,cAAc,CAAC,EACzB,SAAS,CACV;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,qCAAqC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAsED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,GAAG,EACH,SAAS,EACT,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,2BAA2B,qBAkC7B;yBA3Ce,sBAAsB"}
1
+ {"version":3,"file":"ChatLayoutScrollButton.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatLayoutScrollButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAS5C,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CACvD,SAAS,CAAC,cAAc,CAAC,EACzB,SAAS,CACV;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,qCAAqC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAsED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,GAAG,EACH,SAAS,EACT,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,2BAA2B,qBAuC7B;yBAhDe,sBAAsB"}
@@ -75,40 +75,50 @@ export function ChatLayoutScrollButton({
75
75
  ...rest
76
76
  }) {
77
77
  const t = useTranslator();
78
- return /*#__PURE__*/_jsx("div", {
79
- ref: ref,
80
- ...mergeProps(themeProps('chat-layout-scroll-button'), stylex.props(styles.wrapper, xstyle), className, style),
81
- ...rest,
82
- children: /*#__PURE__*/_jsx("div", {
83
- ...{
84
- 0: {
85
- className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x1ueg155 xrgg2z9 xlr8y92 x2rcmwa x12w9bfk xg01cxk x47corl xlshs6z x1jys5uj"
86
- },
87
- 2: {
88
- className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x1ueg155 xrgg2z9 xlr8y92 x2rcmwa x12w9bfk x1hc1fzr x67bb7w xnpuxes x1jys5uj"
89
- },
90
- 1: {
91
- className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x1ueg155 xrgg2z9 xlr8y92 x2rcmwa x12w9bfk xg01cxk x47corl xlshs6z x1ncir08"
92
- },
93
- 3: {
94
- className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x1ueg155 xrgg2z9 xlr8y92 x2rcmwa x12w9bfk x1hc1fzr x67bb7w xnpuxes x1ncir08"
95
- }
96
- }[!!isVisible << 1 | !!label << 0],
97
- children: /*#__PURE__*/_jsx(Button, {
98
- label: label ?? t('@astryx.chatLayoutScrollButton.scrollToBottom'),
99
- "aria-label": label ?? t('@astryx.chatLayoutScrollButton.scrollToBottom'),
100
- icon: /*#__PURE__*/_jsx(Icon, {
101
- icon: "chevronDown",
102
- size: "md"
103
- }),
104
- variant: "ghost",
105
- size: "md",
106
- isIconOnly: !label,
107
- onClick: onClick,
108
- xstyle: [styles.button, label ? styles.buttonWithLabel : null],
109
- children: label ?? undefined
78
+ return (
79
+ /*#__PURE__*/
80
+ // Two elements, two responsibilities. The outer one centres the pill and
81
+ // holds the gap above the composer — spacing outside the pill's border
82
+ // box, which the pill cannot own itself. The inner one is the pill: it is
83
+ // what a reader sees, so it carries the painted surface AND the public
84
+ // theming target. Keeping the target on the outer element would satisfy
85
+ // every automated check while leaving a theme styling an invisible
86
+ // full-width row (architecture:component-theming-surface INV4).
87
+ _jsx("div", {
88
+ ref: ref,
89
+ ...mergeProps(stylex.props(styles.wrapper, xstyle), className, style),
90
+ ...rest,
91
+ children: /*#__PURE__*/_jsx("div", {
92
+ ...mergeProps(themeProps('chat-layout-scroll-button'), {
93
+ 0: {
94
+ className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x1ueg155 xrgg2z9 xlr8y92 x2rcmwa x12w9bfk xg01cxk x47corl xlshs6z x1jys5uj"
95
+ },
96
+ 2: {
97
+ className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x1ueg155 xrgg2z9 xlr8y92 x2rcmwa x12w9bfk x1hc1fzr x67bb7w xnpuxes x1jys5uj"
98
+ },
99
+ 1: {
100
+ className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x1ueg155 xrgg2z9 xlr8y92 x2rcmwa x12w9bfk xg01cxk x47corl xlshs6z x1ncir08"
101
+ },
102
+ 3: {
103
+ className: "xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x1ueg155 xrgg2z9 xlr8y92 x2rcmwa x12w9bfk x1hc1fzr x67bb7w xnpuxes x1ncir08"
104
+ }
105
+ }[!!isVisible << 1 | !!label << 0]),
106
+ children: /*#__PURE__*/_jsx(Button, {
107
+ label: label ?? t('@astryx.chatLayoutScrollButton.scrollToBottom'),
108
+ "aria-label": label ?? t('@astryx.chatLayoutScrollButton.scrollToBottom'),
109
+ icon: /*#__PURE__*/_jsx(Icon, {
110
+ icon: "chevronDown",
111
+ size: "md"
112
+ }),
113
+ variant: "ghost",
114
+ size: "md",
115
+ isIconOnly: !label,
116
+ onClick: onClick,
117
+ xstyle: [styles.button, label ? styles.buttonWithLabel : null],
118
+ children: label ?? undefined
119
+ })
110
120
  })
111
121
  })
112
- });
122
+ );
113
123
  }
114
124
  ChatLayoutScrollButton.displayName = 'ChatLayoutScrollButton';
@@ -43,6 +43,7 @@ export interface ChatMessageBubbleProps extends BaseProps<HTMLDivElement> {
43
43
  variant?: ChatMessageBubbleVariant;
44
44
  /**
45
45
  * Sender name rendered above the bubble, aligned with bubble text padding.
46
+ * Non-rendering scalar values omit the aligned wrapper; numeric zero remains.
46
47
  * Use when the first content in a message is a bubble.
47
48
  * If the first content is raw (no bubble), use ChatMessage's `name`
48
49
  * prop instead.
@@ -50,6 +51,7 @@ export interface ChatMessageBubbleProps extends BaseProps<HTMLDivElement> {
50
51
  name?: ReactNode;
51
52
  /**
52
53
  * Metadata content rendered below the bubble, aligned with bubble text padding.
54
+ * Non-rendering scalar values omit the aligned wrapper; numeric zero remains.
53
55
  * Use when the last content in a message is a bubble.
54
56
  * If the last content is raw (no bubble), use ChatMessage's `metadata`
55
57
  * prop instead.
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessageBubble.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatMessageBubble.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAWrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAG5C,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,sBAAuB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACvE,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEhC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAEnC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAEpC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAwHD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,OAAkB,EAClB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,GAAG,IAAI,EACR,EAAE,sBAAsB,+BA0FxB;yBAvGe,iBAAiB"}
1
+ {"version":3,"file":"ChatMessageBubble.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatMessageBubble.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAWrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAG5C,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,sBAAuB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACvE,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEhC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAEnC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAEpC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAwHD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,OAAkB,EAClB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,GAAG,IAAI,EACR,EAAE,sBAAsB,+BA6FxB;yBA1Ge,iBAAiB"}
@@ -31,7 +31,7 @@ import * as stylex from '@stylexjs/stylex';
31
31
  import "../theme/tokens.stylex.js";
32
32
  import { colorVars, spacingVars, radiusVars, typeScaleVars, typographyVars } from "../theme/tokens.stylex.js";
33
33
  import { useChatMessageContext } from "./ChatContext.js";
34
- import { mergeProps } from "../utils/index.js";
34
+ import { isRenderable, mergeProps } from "../utils/index.js";
35
35
  import { themeProps } from "../utils/themeProps.js";
36
36
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
37
37
  // =============================================================================
@@ -204,8 +204,10 @@ export function ChatMessageBubble({
204
204
  const senderStyle = variant === 'ghost' ? styles.ghost : isUser ? styles.user : styles.assistant;
205
205
  const groupStyle = group === 'first' ? isUser ? styles.groupFirstUser : styles.groupFirstAssistant : group === 'middle' ? isUser ? styles.groupMiddleUser : styles.groupMiddleAssistant : group === 'last' ? isUser ? styles.groupLastUser : styles.groupLastAssistant : null;
206
206
  const metadataPaddingStyle = density === 'compact' ? styles.metadataPaddingCompact : density === 'spacious' ? styles.metadataPaddingSpacious : styles.metadataPaddingBalanced;
207
+ const hasName = isRenderable(name);
208
+ const hasMetadata = isRenderable(metadata);
207
209
  return /*#__PURE__*/_jsxs(_Fragment, {
208
- children: [name && /*#__PURE__*/_jsx("div", {
210
+ children: [hasName && /*#__PURE__*/_jsx("div", {
209
211
  "data-chat-name": true,
210
212
  ...stylex.props(metadataPaddingStyle, styles.nameRow, styles.headerReducedGap, isUser && styles.alignEnd),
211
213
  children: name
@@ -219,7 +221,7 @@ export function ChatMessageBubble({
219
221
  density
220
222
  }), stylex.props(styles.content, density === 'compact' && styles.radiusCompact, senderStyle, paddingStyle, variant === 'ghost' && styles.paddingBlockNone, groupStyle, width != null && dynamicStyles.sizing(width), xstyle), className, styleProp),
221
223
  children: children
222
- }), metadata && /*#__PURE__*/_jsx("div", {
224
+ }), hasMetadata && /*#__PURE__*/_jsx("div", {
223
225
  ...stylex.props(metadataPaddingStyle, styles.metadataReducedGap, isUser && styles.alignEnd),
224
226
  children: metadata
225
227
  })]
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @file ChatMessageList.tsx
3
- * @input Uses React, StyleX, ChatListContext, theme tokens, spacing step utilities
3
+ * @input Uses React, StyleX, ChatListContext, theme tokens, spacing step utilities,
4
+ * and isRenderable to preserve accepted empty-state content
4
5
  * @output Exports ChatMessageList component and ChatMessageListProps
5
6
  * @position Presentational message container — holds ChatMessage children
6
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessageList.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatMessageList.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAC,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAC;AAGhF,OAAO,EAEL,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAGhD,MAAM,WAAW,oBAAqB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACrE,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEhC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,WAAW,CAAC;IAElB;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAEzB;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AA4FD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,OAA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EACnB,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,GAAG,IAAI,EACR,EAAE,oBAAoB,+BAgGtB;yBA9Ge,eAAe"}
@@ -4,7 +4,8 @@
4
4
 
5
5
  /**
6
6
  * @file ChatMessageList.tsx
7
- * @input Uses React, StyleX, ChatListContext, theme tokens, spacing step utilities
7
+ * @input Uses React, StyleX, ChatListContext, theme tokens, spacing step utilities,
8
+ * and isRenderable to preserve accepted empty-state content
8
9
  * @output Exports ChatMessageList component and ChatMessageListProps
9
10
  * @position Presentational message container — holds ChatMessage children
10
11
  *
@@ -27,7 +28,7 @@ import * as stylex from '@stylexjs/stylex';
27
28
  import "../theme/tokens.stylex.js";
28
29
  import { spacingVars } from "../theme/tokens.stylex.js";
29
30
  import { ChatListContext, useChatLayoutContext } from "./ChatContext.js";
30
- import { mergeProps } from "../utils/index.js";
31
+ import { isRenderable, mergeProps } from "../utils/index.js";
31
32
  import { Spinner } from "../Spinner/index.js";
32
33
  import { themeProps } from "../utils/themeProps.js";
33
34
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -225,7 +226,7 @@ export function ChatMessageList({
225
226
  className: "x98rzlu x2lwn1j"
226
227
  },
227
228
  "aria-hidden": true
228
- }), hasChildren ? children : emptyState ? /*#__PURE__*/_jsx("div", {
229
+ }), hasChildren ? children : isRenderable(emptyState) ? /*#__PURE__*/_jsx("div", {
229
230
  ...{
230
231
  className: "x78zum5 x6s0dn4 xl56j7k x98rzlu x2lwn1j"
231
232
  },
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * @file ChatMessageMetadata.tsx
3
- * @input Uses React, StyleX, ChatContext, Icon, theme tokens
3
+ * @input Uses React, StyleX, ChatContext, Icon, theme tokens, and isRenderable
4
4
  * @output Exports ChatMessageMetadata component
5
5
  * @position Shared metadata row used by composing inside ChatMessage
6
6
  *
7
- * Renders: <timestamp> · <footer> · <status>
8
- * Direction reverses for user sender.
7
+ * Renders timestamp, footer, and status values with separators determined by
8
+ * scalar presence. Direction reverses for user sender.
9
9
  */
10
10
  import React, { type ReactNode } from 'react';
11
11
  import type { BaseProps } from '../BaseProps';
@@ -23,7 +23,8 @@ export interface ChatMessageMetadataProps extends BaseProps<HTMLDivElement> {
23
23
  * Composable metadata row for chat messages.
24
24
  *
25
25
  * Renders: timestamp · footer · status
26
- * Renders nothing if all props are null/undefined.
26
+ * Renders nothing when neither slot passes the scalar-presence check and no
27
+ * status is set. Composite React nodes remain caller-owned.
27
28
  *
28
29
  * @example
29
30
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessageMetadata.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatMessageMetadata.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAY5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAI5C,MAAM,MAAM,iBAAiB,GAC3B,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AAsDtD,MAAM,WAAW,wBAAyB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACzE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,gEAAgE;IAChE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,uDAAuD;IACvD,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,SAAS,EACT,MAAM,EACN,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,wBAAwB,4BAmD1B;yBA5De,mBAAmB"}
1
+ {"version":3,"file":"ChatMessageMetadata.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatMessageMetadata.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAY5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAI5C,MAAM,MAAM,iBAAiB,GAC3B,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AAsDtD,MAAM,WAAW,wBAAyB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACzE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,gEAAgE;IAChE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,uDAAuD;IACvD,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,SAAS,EACT,MAAM,EACN,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,wBAAwB,4BAkD1B;yBA3De,mBAAmB"}
@@ -4,12 +4,12 @@
4
4
 
5
5
  /**
6
6
  * @file ChatMessageMetadata.tsx
7
- * @input Uses React, StyleX, ChatContext, Icon, theme tokens
7
+ * @input Uses React, StyleX, ChatContext, Icon, theme tokens, and isRenderable
8
8
  * @output Exports ChatMessageMetadata component
9
9
  * @position Shared metadata row used by composing inside ChatMessage
10
10
  *
11
- * Renders: <timestamp> · <footer> · <status>
12
- * Direction reverses for user sender.
11
+ * Renders timestamp, footer, and status values with separators determined by
12
+ * scalar presence. Direction reverses for user sender.
13
13
  */
14
14
  import React from 'react';
15
15
  import * as stylex from '@stylexjs/stylex';
@@ -17,7 +17,7 @@ import "../theme/tokens.stylex.js";
17
17
  import { colorVars, spacingVars, typeScaleVars, fontWeightVars } from "../theme/tokens.stylex.js";
18
18
  import { useChatMessageContext } from "./ChatContext.js";
19
19
  import { Icon } from "../Icon/index.js";
20
- import { mergeProps } from "../utils/index.js";
20
+ import { isRenderable, mergeProps } from "../utils/index.js";
21
21
  import { themeProps } from "../utils/themeProps.js";
22
22
  import { useTranslator } from "../i18n/index.js";
23
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -69,7 +69,8 @@ const styles = {
69
69
  * Composable metadata row for chat messages.
70
70
  *
71
71
  * Renders: timestamp · footer · status
72
- * Renders nothing if all props are null/undefined.
72
+ * Renders nothing when neither slot passes the scalar-presence check and no
73
+ * status is set. Composite React nodes remain caller-owned.
73
74
  *
74
75
  * @example
75
76
  * ```
@@ -94,7 +95,9 @@ export function ChatMessageMetadata({
94
95
  const sender = msgContext?.sender ?? 'assistant';
95
96
  const statusConfig = status != null ? STATUS_CONFIG[status] : null;
96
97
  const statusLabel = statusConfig != null ? t(statusConfig.i18nKey) : '';
97
- const hasContent = timestamp != null || footer != null || statusConfig != null;
98
+ const hasTimestamp = isRenderable(timestamp);
99
+ const hasFooter = isRenderable(footer);
100
+ const hasContent = hasTimestamp || hasFooter || statusConfig != null;
98
101
  if (!hasContent) {
99
102
  return null;
100
103
  }
@@ -102,11 +105,11 @@ export function ChatMessageMetadata({
102
105
  ref: ref,
103
106
  ...mergeProps(themeProps('chat-message-metadata'), stylex.props(styles.meta, sender === 'user' ? styles.metaUser : styles.metaAssistant, xstyle), className, style),
104
107
  ...rest,
105
- children: [timestamp != null && /*#__PURE__*/_jsx("span", {
108
+ children: [hasTimestamp && /*#__PURE__*/_jsx("span", {
106
109
  children: timestamp
107
- }), timestamp != null && (footer != null || statusConfig != null) && /*#__PURE__*/_jsx("span", {
110
+ }), hasTimestamp && (hasFooter || statusConfig != null) && /*#__PURE__*/_jsx("span", {
108
111
  children: "\xB7"
109
- }), footer != null && footer, footer != null && statusConfig != null && /*#__PURE__*/_jsx("span", {
112
+ }), hasFooter && footer, hasFooter && statusConfig != null && /*#__PURE__*/_jsx("span", {
110
113
  children: "\xB7"
111
114
  }), statusConfig != null && /*#__PURE__*/_jsxs("span", {
112
115
  title: statusLabel,
@@ -6,7 +6,8 @@
6
6
  *
7
7
  * Reads composer state from ChatComposerContext by default so it "just
8
8
  * works" inside ChatComposer. All context-derived values can be
9
- * overridden via props for standalone usage.
9
+ * overridden via props for standalone usage. Accepted `onClick` handlers
10
+ * compose after the selected send or stop action.
10
11
  *
11
12
  * States:
12
13
  * - **Send** — accent/primary, arrowUp icon, disabled when nothing to send.
@@ -1 +1 @@
1
- {"version":3,"file":"ChatSendButton.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatSendButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAM5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAS5C,MAAM,WAAW,mBAAoB,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACvE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC,kFAAkF;IAClF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gFAAgF;IAChF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iCAAiC;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAiBD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,SAAS,CA8CpE;yBA9Ce,cAAc"}
1
+ {"version":3,"file":"ChatSendButton.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatSendButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAM5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAS5C,MAAM,WAAW,mBAAoB,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACvE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC,kFAAkF;IAClF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gFAAgF;IAChF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iCAAiC;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAiBD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,SAAS,CA+CpE;yBA/Ce,cAAc"}
@@ -10,7 +10,8 @@
10
10
  *
11
11
  * Reads composer state from ChatComposerContext by default so it "just
12
12
  * works" inside ChatComposer. All context-derived values can be
13
- * overridden via props for standalone usage.
13
+ * overridden via props for standalone usage. Accepted `onClick` handlers
14
+ * compose after the selected send or stop action.
14
15
  *
15
16
  * States:
16
17
  * - **Send** — accent/primary, arrowUp icon, disabled when nothing to send.
@@ -21,7 +22,7 @@ import * as stylex from '@stylexjs/stylex';
21
22
  import { Button } from "../Button/index.js";
22
23
  import { useIcon } from "../Icon/index.js";
23
24
  import { useChatComposerContext } from "./ChatContext.js";
24
- import { mergeProps } from "../utils/index.js";
25
+ import { composeEventHandlers, mergeProps } from "../utils/index.js";
25
26
  import { themeProps } from "../utils/themeProps.js";
26
27
  import { useTranslator } from "../i18n/index.js";
27
28
 
@@ -64,6 +65,7 @@ export function ChatSendButton(props) {
64
65
  isDisabled = !(context?.canSend ?? false),
65
66
  onSend,
66
67
  onStop = context?.onStop,
68
+ onClick,
67
69
  sendIcon,
68
70
  stopIcon,
69
71
  size = 'md',
@@ -84,7 +86,7 @@ export function ChatSendButton(props) {
84
86
  icon: isStopShown ? stopIcon ?? defaultStopIcon : sendIcon ?? defaultSendIcon,
85
87
  isIconOnly: true,
86
88
  isDisabled: !isStopShown && isDisabled,
87
- onClick: isStopShown ? onStop : handleSend,
89
+ onClick: composeEventHandlers(isStopShown ? onStop : handleSend, onClick),
88
90
  ...rest,
89
91
  ...mergeProps(themeProps('chat-send-button'), {
90
92
  className
@@ -2,7 +2,7 @@
2
2
  * @file ChatSystemMessage.tsx
3
3
  * @input Uses React, StyleX, theme tokens
4
4
  * @output Exports ChatSystemMessage component and ChatSystemMessageProps
5
- * @position Centered system/notice message in a chat thread
5
+ * @position Centered, wrapping system/notice message in a chat thread
6
6
  *
7
7
  * Renders centered, muted system messages like "conversation started",
8
8
  * date separators, or status updates. Not a sender message — no avatar,
@@ -32,8 +32,8 @@ export interface ChatSystemMessageProps extends BaseProps<HTMLDivElement> {
32
32
  */
33
33
  variant?: ChatSystemMessageVariant;
34
34
  /**
35
- * Optional icon rendered before the text.
36
- * Accepts any ReactNode — typically an Icon.
35
+ * Optional caller-provided icon content associated with the message.
36
+ * Accepts any ReactNode, typically an Icon.
37
37
  */
38
38
  icon?: ReactNode;
39
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ChatSystemMessage.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatSystemMessage.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAWrC,OA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wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,OAAmB,EACnB,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EAAE,SAAS,EAChB,GAAG,EACH,GAAG,IAAI,EACR,EAAE,sBAAsB,+BAmCxB;yBA5Ce,iBAAiB"}
@@ -6,7 +6,7 @@
6
6
  * @file ChatSystemMessage.tsx
7
7
  * @input Uses React, StyleX, theme tokens
8
8
  * @output Exports ChatSystemMessage component and ChatSystemMessageProps
9
- * @position Centered system/notice message in a chat thread
9
+ * @position Centered, wrapping system/notice message in a chat thread
10
10
  *
11
11
  * Renders centered, muted system messages like "conversation started",
12
12
  * date separators, or status updates. Not a sender message — no avatar,
@@ -99,7 +99,7 @@ export function ChatSystemMessage({
99
99
  role: "status",
100
100
  children: /*#__PURE__*/_jsxs("span", {
101
101
  ...{
102
- className: "x3nfvp2 x6s0dn4 x1s4dlld x2lah0s xuxw1ft"
102
+ className: "x3nfvp2 x6s0dn4 x1s4dlld"
103
103
  },
104
104
  children: [icon != null && /*#__PURE__*/_jsx("span", {
105
105
  ...{
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @file Citation.tsx
3
- * @input Uses React, StyleX, theme tokens
3
+ * @input Uses React, StyleX, theme tokens, and the shared navigation policy
4
4
  * @output Exports Citation component for inline citation references
5
5
  * @position Core implementation; consumed by index.ts
6
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Citation.d.ts","sourceRoot":"","sources":["../../src/Citation/Citation.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAarC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAK5C,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,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CAAC;CAC9B;AAiHD,wBAAgB,QAAQ,CAAC,EACvB,GAAG,EACH,MAAM,EACN,MAAM,EACN,OAAiB,EACjB,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,IAAI,EACR,EAAE,aAAa,GAAG,KAAK,CAAC,YAAY,CA4FpC;yBAtGe,QAAQ"}
@@ -4,7 +4,7 @@
4
4
 
5
5
  /**
6
6
  * @file Citation.tsx
7
- * @input Uses React, StyleX, theme tokens
7
+ * @input Uses React, StyleX, theme tokens, and the shared navigation policy
8
8
  * @output Exports Citation component for inline citation references
9
9
  * @position Core implementation; consumed by index.ts
10
10
  *
@@ -19,6 +19,7 @@ import * as stylex from '@stylexjs/stylex';
19
19
  import "../theme/tokens.stylex.js";
20
20
  import { colorVars, spacingVars, radiusVars, typeScaleVars, fontWeightVars, borderVars, durationVars, easeVars } from "../theme/tokens.stylex.js";
21
21
  import { mergeProps } from "../utils/index.js";
22
+ import { isSafeUrl } from "../utils/safeUrl.js";
22
23
  import { themeProps } from "../utils/themeProps.js";
23
24
  import { useTranslator } from "../i18n/index.js";
24
25
  import { renderIconSlot } from "../Icon/index.js";
@@ -103,7 +104,7 @@ export function Citation({
103
104
  }) {
104
105
  const t = useTranslator();
105
106
  const title = source.title ?? String(number);
106
- const href = source.url;
107
+ const href = source.url != null && isSafeUrl(source.url) ? source.url : undefined;
107
108
 
108
109
  // Resolve the source icon. A non-string `icon` node renders as-is (an Astryx
109
110
  // <Icon>, SVG, avatar, etc.). Otherwise fall back to an image URL: `src`, or
@@ -1 +1 @@
1
- {"version":3,"file":"highlightRanges.d.ts","sourceRoot":"","sources":["../../src/CodeBlock/highlightRanges.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAc,SAAS,EAAC,MAAM,aAAa,CAAC;AA8FxD,UAAU,UAAU;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;CACtB;AAgD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OAAO,EAAC,aAAa,EAAC,CAAC"}
@@ -52,9 +52,20 @@ function ensureDynamicHighlightType(tokenType) {
52
52
  return;
53
53
  }
54
54
  }
55
- const name = `astryx-${tokenType}`;
56
- const colorVar = `var(--color-syntax-${tokenType}, currentColor)`;
57
- dynamicStyleSheet.insertRule(`.astryx-code-block code::highlight(${name}), .astryx-codeeditor code::highlight(${name}) { color: ${colorVar}; }`);
55
+
56
+ // CSS.escape both generated names before they land in rule text: the
57
+ // registry key stays the raw string (a ::highlight() selector matches by
58
+ // ident VALUE, escapes and all), so dotted, non-ASCII, `_private`, and
59
+ // digit-led token types keep their colours — while nothing a token stream
60
+ // carries can step outside its ident and shape the rule.
61
+ const name = CSS.escape(`astryx-${tokenType}`);
62
+ const colorVar = `var(${CSS.escape(`--color-syntax-${tokenType}`)}, currentColor)`;
63
+ try {
64
+ dynamicStyleSheet.insertRule(`.astryx-code-block code::highlight(${name}), .astryx-codeeditor code::highlight(${name}) { color: ${colorVar}; }`);
65
+ } catch {
66
+ // An engine that still refuses the rule costs that type its colour
67
+ // (ranges paint with currentColor) — never the whole code block.
68
+ }
58
69
  }
59
70
 
60
71
  // ---------------------------------------------------------------------------
@@ -1 +1 @@
1
- {"version":3,"file":"DialogHeader.d.ts","sourceRoot":"","sources":["../../src/Dialog/DialogHeader.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAoB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAQxD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA2C5C,MAAM,WAAW,iBAAkB,SAAQ,SAAS,CAAC,cAAc,CAAC;IAClE,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,YAAY,C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AAG,OAAO,GAAG,KAAK,CAAC;IAExD;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,0BAA0B,EAC1B,UAAU,EACV,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,iBAAiB,+BAuGnB;yBApHe,YAAY"}
@@ -101,9 +101,9 @@ export function DialogHeader({
101
101
  className: "x78zum5 x1cy8zhl x1qughib xjcht0a"
102
102
  }),
103
103
  children: [startContent && /*#__PURE__*/_jsx("div", {
104
- ...{
104
+ ...mergeProps(themeProps('dialog-header-start-content'), {
105
105
  className: "x78zum5 x6s0dn4 x1txdalj x2lah0s"
106
- },
106
+ }),
107
107
  children: startContent
108
108
  }), /*#__PURE__*/_jsxs("div", {
109
109
  ...mergeProps(themeProps('dialog-header-title-block'), {
@@ -123,7 +123,7 @@ export function DialogHeader({
123
123
  children: subtitle
124
124
  })]
125
125
  }), (endContent || onOpenChange) && /*#__PURE__*/_jsxs("div", {
126
- ...{
126
+ ...mergeProps(themeProps('dialog-header-end-content'), {
127
127
  0: {
128
128
  className: "x78zum5 x6s0dn4 x1txdalj x2lah0s"
129
129
  },
@@ -136,7 +136,7 @@ export function DialogHeader({
136
136
  3: {
137
137
  className: "x78zum5 x6s0dn4 x1txdalj x2lah0s xhzvc8f x3kzqx6"
138
138
  }
139
- }[!!shouldCompensateEndBlock << 1 | !!shouldCompensateEndInline << 0],
139
+ }[!!shouldCompensateEndBlock << 1 | !!shouldCompensateEndInline << 0]),
140
140
  children: [endContent, onOpenChange && /*#__PURE__*/_jsx(Button, {
141
141
  variant: "ghost",
142
142
  label: t('@astryx.dialog.close'),