@epam/ai-dial-chat-shared 1.3.0-dev.28 → 1.3.0-dev.288

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 (312) hide show
  1. package/components/ConfirmationDialog/ConfirmationDialog.d.ts +46 -0
  2. package/components/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -0
  3. package/components/ConfirmationDialog/ConfirmationDialog.js +11 -9
  4. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts +33 -0
  5. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts.map +1 -0
  6. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.module.scss.js +5 -4
  7. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts +33 -0
  8. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts.map +1 -0
  9. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.js +2 -2
  10. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.module.scss.js +3 -2
  11. package/components/ConfirmationView/ConfirmationFooter.d.ts +41 -0
  12. package/components/ConfirmationView/ConfirmationFooter.d.ts.map +1 -0
  13. package/components/ConfirmationView/ConfirmationFooter.js +25 -26
  14. package/components/ConfirmationView/ConfirmationView.d.ts +59 -0
  15. package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -0
  16. package/components/ConfirmationView/ConfirmationView.js +12 -12
  17. package/components/ConfirmationView/ConfirmationView.module.scss.js +6 -5
  18. package/components/CopyButton/CopyButton.d.ts +19 -0
  19. package/components/CopyButton/CopyButton.d.ts.map +1 -0
  20. package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts +41 -0
  21. package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts.map +1 -0
  22. package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts +49 -0
  23. package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts.map +1 -0
  24. package/components/DeleteConfirmationView/DeleteConfirmationView.module.scss.js +5 -4
  25. package/components/DeploymentIcon/DeploymentIcon.d.ts +36 -0
  26. package/components/DeploymentIcon/DeploymentIcon.d.ts.map +1 -0
  27. package/components/DeploymentIcon/DeploymentIcon.module.scss.js +3 -2
  28. package/components/EntityHeader/EntityHeader.d.ts +38 -0
  29. package/components/EntityHeader/EntityHeader.d.ts.map +1 -0
  30. package/components/EntityHeader/EntityHeader.js +1 -1
  31. package/components/EntityTypeLabel/EntityTypeLabel.d.ts +18 -0
  32. package/components/EntityTypeLabel/EntityTypeLabel.d.ts.map +1 -0
  33. package/components/ErrorAlert/ErrorAlert.d.ts +27 -0
  34. package/components/ErrorAlert/ErrorAlert.d.ts.map +1 -0
  35. package/components/ErrorAlert/ErrorAlert.js +26 -0
  36. package/components/ErrorAlert/ErrorAlert.module.scss.js +4 -0
  37. package/components/FeaturedChip/FeaturedChip.d.ts +16 -0
  38. package/components/FeaturedChip/FeaturedChip.d.ts.map +1 -0
  39. package/components/FullScreenAlert/FullScreenAlert.d.ts +17 -0
  40. package/components/FullScreenAlert/FullScreenAlert.d.ts.map +1 -0
  41. package/components/FullScreenAlert/FullScreenAlert.js +19 -0
  42. package/components/InitialsAvatar/InitialsAvatar.d.ts +18 -0
  43. package/components/InitialsAvatar/InitialsAvatar.d.ts.map +1 -0
  44. package/components/InitialsAvatar/InitialsAvatar.js +4 -3
  45. package/components/ItemHeader/ItemHeader.d.ts +40 -0
  46. package/components/ItemHeader/ItemHeader.d.ts.map +1 -0
  47. package/components/ItemHeader/ItemHeader.js +4 -1
  48. package/components/ItemHeader/ItemHeader.module.scss.js +5 -4
  49. package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +57 -0
  50. package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +1 -0
  51. package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +58 -58
  52. package/components/MarkdownRenderer/CodeBlock/CodeBlock.module.scss.js +9 -8
  53. package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts +7 -0
  54. package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts.map +1 -0
  55. package/components/MarkdownRenderer/MDMessageViewer.d.ts +66 -0
  56. package/components/MarkdownRenderer/MDMessageViewer.d.ts.map +1 -0
  57. package/components/MarkdownRenderer/MDMessageViewer.js +14 -12
  58. package/components/MarkdownRenderer/MarkdownRenderer.d.ts +145 -0
  59. package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -0
  60. package/components/MarkdownRenderer/MarkdownRenderer.js +146 -136
  61. package/components/MarkdownRenderer/MarkdownRenderer.module.scss.js +9 -8
  62. package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts +18 -0
  63. package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts.map +1 -0
  64. package/components/MarkdownRenderer/Math/MarkdownMathBlock.js +1 -1
  65. package/components/MarkdownRenderer/Math/MarkdownMathBlock.module.scss.js +5 -4
  66. package/components/MarkdownRenderer/PlainTextRenderer.d.ts +39 -0
  67. package/components/MarkdownRenderer/PlainTextRenderer.d.ts.map +1 -0
  68. package/components/MarkdownRenderer/PlainTextRenderer.js +1 -1
  69. package/components/MarkdownRenderer/Table/MarkdownTable.d.ts +51 -0
  70. package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +1 -0
  71. package/components/MarkdownRenderer/Table/MarkdownTable.js +68 -63
  72. package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +15 -13
  73. package/components/MarkdownRenderer/Table/TableHeader.d.ts +22 -0
  74. package/components/MarkdownRenderer/Table/TableHeader.d.ts.map +1 -0
  75. package/components/MarkdownRenderer/Table/TableHeader.module.scss.js +3 -2
  76. package/components/MarkdownRenderer/Table/table-serialization.d.ts +16 -0
  77. package/components/MarkdownRenderer/Table/table-serialization.d.ts.map +1 -0
  78. package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts +27 -0
  79. package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts.map +1 -0
  80. package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts +9 -0
  81. package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts.map +1 -0
  82. package/components/MarkdownRenderer/ThinkingShimmer.d.ts +17 -0
  83. package/components/MarkdownRenderer/ThinkingShimmer.d.ts.map +1 -0
  84. package/components/MarkdownRenderer/markdown-class-names.d.ts +10 -0
  85. package/components/MarkdownRenderer/markdown-class-names.d.ts.map +1 -0
  86. package/components/MarkdownRenderer/markdown-whitespace.d.ts +15 -0
  87. package/components/MarkdownRenderer/markdown-whitespace.d.ts.map +1 -0
  88. package/components/MarkdownRenderer/markdown-whitespace.js +2 -6
  89. package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts +25 -0
  90. package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts.map +1 -0
  91. package/components/NewVersionAlert/NewVersionAlert.d.ts +27 -0
  92. package/components/NewVersionAlert/NewVersionAlert.d.ts.map +1 -0
  93. package/components/NewVersionAlert/NewVersionAlert.js +26 -0
  94. package/components/NewVersionAlert/NewVersionAlert.module.scss.js +4 -0
  95. package/components/NotificationStack/NotificationStack.d.ts +46 -0
  96. package/components/NotificationStack/NotificationStack.d.ts.map +1 -0
  97. package/components/NotificationStack/NotificationStack.js +109 -0
  98. package/components/PanelEmptyState/PanelEmptyState.d.ts +32 -0
  99. package/components/PanelEmptyState/PanelEmptyState.d.ts.map +1 -0
  100. package/components/PanelEmptyState/PanelEmptyState.js +19 -9
  101. package/components/PanelEmptyState/PanelEmptyState.module.scss.js +6 -2
  102. package/components/ResourceSummary/ResourceSummary.d.ts +49 -0
  103. package/components/ResourceSummary/ResourceSummary.d.ts.map +1 -0
  104. package/components/ResourceSummary/ResourceSummary.module.scss.js +5 -4
  105. package/components/TextRefinementField/TextRefinementField.d.ts +33 -0
  106. package/components/TextRefinementField/TextRefinementField.d.ts.map +1 -0
  107. package/components/TextRefinementField/TextRefinementField.js +84 -55
  108. package/constants/breakpoint.d.ts +9 -0
  109. package/constants/breakpoint.d.ts.map +1 -0
  110. package/constants/breakpoint.js +1 -1
  111. package/constants/dial.d.ts +5 -0
  112. package/constants/dial.d.ts.map +1 -0
  113. package/constants/entity-colors.d.ts +6 -0
  114. package/constants/entity-colors.d.ts.map +1 -0
  115. package/constants/icon.d.ts +14 -0
  116. package/constants/icon.d.ts.map +1 -0
  117. package/constants/markdown-editor.d.ts +2 -0
  118. package/constants/markdown-editor.d.ts.map +1 -0
  119. package/constants/mime-types.d.ts +27 -0
  120. package/constants/mime-types.d.ts.map +1 -0
  121. package/constants/public-class-names.d.ts +13 -0
  122. package/constants/public-class-names.d.ts.map +1 -0
  123. package/constants/resizable-fields.d.ts +5 -0
  124. package/constants/resizable-fields.d.ts.map +1 -0
  125. package/constants/select-list.d.ts +4 -0
  126. package/constants/select-list.d.ts.map +1 -0
  127. package/constants/tag-input.d.ts +2 -0
  128. package/constants/tag-input.d.ts.map +1 -0
  129. package/conversation-transfer/conversation-transfer-queue.d.ts +16 -0
  130. package/conversation-transfer/conversation-transfer-queue.d.ts.map +1 -0
  131. package/conversation-transfer/conversation-transfer-queue.js +24 -0
  132. package/entry-points/file-manager.d.ts +5 -0
  133. package/entry-points/file-manager.d.ts.map +1 -0
  134. package/entry-points/markdown.d.ts +19 -0
  135. package/entry-points/markdown.d.ts.map +1 -0
  136. package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts +67 -0
  137. package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -0
  138. package/file-manager/DialFileManagerShell/DialFileManagerShell.js +328 -266
  139. package/file-manager/DialFileManagerShell/DialFileManagerShell.module.scss.js +8 -0
  140. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts +96 -0
  141. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts.map +1 -0
  142. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +82 -78
  143. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.module.scss.js +7 -0
  144. package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts +22 -0
  145. package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts.map +1 -0
  146. package/file-manager/OperationLoaderModal/OperationLoaderModal.js +21 -17
  147. package/file-manager/OperationLoaderModal/OperationLoaderModal.module.scss.js +4 -0
  148. package/file-manager/attach-result.d.ts +9 -0
  149. package/file-manager/attach-result.d.ts.map +1 -0
  150. package/file-manager/file-manager-controller.d.ts +129 -0
  151. package/file-manager/file-manager-controller.d.ts.map +1 -0
  152. package/file-manager/file-manager-variant.d.ts +21 -0
  153. package/file-manager/file-manager-variant.d.ts.map +1 -0
  154. package/file-manager/file-upload-validation.d.ts +8 -0
  155. package/file-manager/file-upload-validation.d.ts.map +1 -0
  156. package/file-manager/index.d.ts +11 -0
  157. package/file-manager/index.d.ts.map +1 -0
  158. package/file-manager/labels.d.ts +177 -0
  159. package/file-manager/labels.d.ts.map +1 -0
  160. package/file-manager/path.d.ts +12 -0
  161. package/file-manager/path.d.ts.map +1 -0
  162. package/file-manager/shell-styles.d.ts +33 -0
  163. package/file-manager/shell-styles.d.ts.map +1 -0
  164. package/file-manager/upload-batch.d.ts +75 -0
  165. package/file-manager/upload-batch.d.ts.map +1 -0
  166. package/file-manager/upload-batch.js +6 -2
  167. package/file-manager/upload-queue.d.ts +45 -0
  168. package/file-manager/upload-queue.d.ts.map +1 -0
  169. package/file-manager/upload-queue.js +45 -13
  170. package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts +27 -0
  171. package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts.map +1 -0
  172. package/file-manager.d.ts +2 -506
  173. package/file-manager.js +4 -4
  174. package/hooks/useAvailableHeightCap.d.ts +30 -0
  175. package/hooks/useAvailableHeightCap.d.ts.map +1 -0
  176. package/hooks/useAvailableHeightCap.js +1 -1
  177. package/hooks/useCodeCopy.d.ts +6 -0
  178. package/hooks/useCodeCopy.d.ts.map +1 -0
  179. package/hooks/useCollapsedText.d.ts +27 -0
  180. package/hooks/useCollapsedText.d.ts.map +1 -0
  181. package/hooks/useControlErrorAssociation.d.ts +3 -0
  182. package/hooks/useControlErrorAssociation.d.ts.map +1 -0
  183. package/hooks/useControlErrorAssociation.js +12 -0
  184. package/hooks/useHorizontalOverflow.d.ts +21 -0
  185. package/hooks/useHorizontalOverflow.d.ts.map +1 -0
  186. package/hooks/useIsMobile.d.ts +3 -0
  187. package/hooks/useIsMobile.d.ts.map +1 -0
  188. package/hooks/useIsMobile.js +1 -1
  189. package/hooks/useIsTextClipped.d.ts +26 -0
  190. package/hooks/useIsTextClipped.d.ts.map +1 -0
  191. package/hooks/useIsTextClipped.js +25 -0
  192. package/hooks/useStreamedMarkdownContent.d.ts +3 -0
  193. package/hooks/useStreamedMarkdownContent.d.ts.map +1 -0
  194. package/hooks/useTextRefinement.d.ts +44 -0
  195. package/hooks/useTextRefinement.d.ts.map +1 -0
  196. package/hooks/useTextRefinement.js +4 -4
  197. package/hooks/useUnsavedChangesGuard.d.ts +14 -0
  198. package/hooks/useUnsavedChangesGuard.d.ts.map +1 -0
  199. package/hooks/useUnsavedChangesGuard.js +1 -5
  200. package/index.css +3 -2
  201. package/index.d.ts +86 -3167
  202. package/index.d.ts.map +1 -0
  203. package/index.js +85 -76
  204. package/markdown.d.ts +2 -465
  205. package/markdown.js +3 -2
  206. package/models/annotation.d.ts +143 -0
  207. package/models/annotation.d.ts.map +1 -0
  208. package/models/application-visualizer.d.ts +67 -0
  209. package/models/application-visualizer.d.ts.map +1 -0
  210. package/models/auth.d.ts +28 -0
  211. package/models/auth.d.ts.map +1 -0
  212. package/models/chat.d.ts +409 -0
  213. package/models/chat.d.ts.map +1 -0
  214. package/models/conversation-classification.d.ts +14 -0
  215. package/models/conversation-classification.d.ts.map +1 -0
  216. package/models/conversation-classification.js +3 -1
  217. package/models/conversation-transfer.d.ts +96 -0
  218. package/models/conversation-transfer.d.ts.map +1 -0
  219. package/models/custom-visualizer.d.ts +61 -0
  220. package/models/custom-visualizer.d.ts.map +1 -0
  221. package/models/deployment-configuration.d.ts +55 -0
  222. package/models/deployment-configuration.d.ts.map +1 -0
  223. package/models/deployment-features.d.ts +17 -0
  224. package/models/deployment-features.d.ts.map +1 -0
  225. package/models/deployment.d.ts +31 -0
  226. package/models/deployment.d.ts.map +1 -0
  227. package/models/dial-model.d.ts +19 -0
  228. package/models/dial-model.d.ts.map +1 -0
  229. package/models/entity.d.ts +15 -0
  230. package/models/entity.d.ts.map +1 -0
  231. package/models/import-export.d.ts +23 -0
  232. package/models/import-export.d.ts.map +1 -0
  233. package/models/inline-segment.d.ts +11 -0
  234. package/models/inline-segment.d.ts.map +1 -0
  235. package/models/locale.d.ts +19 -0
  236. package/models/locale.d.ts.map +1 -0
  237. package/models/text-refinement.d.ts +22 -0
  238. package/models/text-refinement.d.ts.map +1 -0
  239. package/models/theme.d.ts +36 -0
  240. package/models/theme.d.ts.map +1 -0
  241. package/models/tool-menu-item.d.ts +13 -0
  242. package/models/tool-menu-item.d.ts.map +1 -0
  243. package/package.json +10 -17
  244. package/types/attachment.d.ts +25 -0
  245. package/types/attachment.d.ts.map +1 -0
  246. package/types/code-editor.d.ts +8 -0
  247. package/types/code-editor.d.ts.map +1 -0
  248. package/types/entity-type.d.ts +10 -0
  249. package/types/entity-type.d.ts.map +1 -0
  250. package/types/file-manager-node.d.ts +17 -0
  251. package/types/file-manager-node.d.ts.map +1 -0
  252. package/types/mime-type.d.ts +59 -0
  253. package/types/mime-type.d.ts.map +1 -0
  254. package/utils/annotation.d.ts +29 -0
  255. package/utils/annotation.d.ts.map +1 -0
  256. package/utils/avatar-color.d.ts +10 -0
  257. package/utils/avatar-color.d.ts.map +1 -0
  258. package/utils/base64-json.d.ts +14 -0
  259. package/utils/base64-json.d.ts.map +1 -0
  260. package/utils/base64-json.js +4 -0
  261. package/utils/build-css-vars.d.ts +4 -0
  262. package/utils/build-css-vars.d.ts.map +1 -0
  263. package/utils/copy-to-clipboard.d.ts +18 -0
  264. package/utils/copy-to-clipboard.d.ts.map +1 -0
  265. package/utils/entity-field-limits.d.ts +11 -0
  266. package/utils/entity-field-limits.d.ts.map +1 -0
  267. package/utils/entity-type.d.ts +5 -0
  268. package/utils/entity-type.d.ts.map +1 -0
  269. package/utils/file-download.d.ts +21 -0
  270. package/utils/file-download.d.ts.map +1 -0
  271. package/utils/format-file-size.d.ts +3 -0
  272. package/utils/format-file-size.d.ts.map +1 -0
  273. package/utils/format-last-used.d.ts +3 -0
  274. package/utils/format-last-used.d.ts.map +1 -0
  275. package/utils/format-price.d.ts +7 -0
  276. package/utils/format-price.d.ts.map +1 -0
  277. package/utils/format-price.js +10 -10
  278. package/utils/generate-uuid.d.ts +3 -0
  279. package/utils/generate-uuid.d.ts.map +1 -0
  280. package/utils/initials.d.ts +3 -0
  281. package/utils/initials.d.ts.map +1 -0
  282. package/utils/inline-segments.d.ts +38 -0
  283. package/utils/inline-segments.d.ts.map +1 -0
  284. package/utils/inline-segments.js +53 -0
  285. package/utils/is-audio-transcription-supported.d.ts +3 -0
  286. package/utils/is-audio-transcription-supported.d.ts.map +1 -0
  287. package/utils/is-skill-selection-unsupported.d.ts +3 -0
  288. package/utils/is-skill-selection-unsupported.d.ts.map +1 -0
  289. package/utils/latex.d.ts +22 -0
  290. package/utils/latex.d.ts.map +1 -0
  291. package/utils/latex.js +47 -41
  292. package/utils/markdown-html.d.ts +14 -0
  293. package/utils/markdown-html.d.ts.map +1 -0
  294. package/utils/markdown-html.js +11 -0
  295. package/utils/merge-class.d.ts +4 -0
  296. package/utils/merge-class.d.ts.map +1 -0
  297. package/utils/message-attachment-to-display.d.ts +22 -0
  298. package/utils/message-attachment-to-display.d.ts.map +1 -0
  299. package/utils/message-attachment-to-display.js +1 -1
  300. package/utils/message.d.ts +4 -0
  301. package/utils/message.d.ts.map +1 -0
  302. package/utils/mime-type.d.ts +22 -0
  303. package/utils/mime-type.d.ts.map +1 -0
  304. package/utils/mime-type.js +1 -1
  305. package/utils/prompt-variables.d.ts +62 -0
  306. package/utils/prompt-variables.d.ts.map +1 -0
  307. package/utils/prompt-variables.js +5 -9
  308. package/utils/string-utils.d.ts +11 -0
  309. package/utils/string-utils.d.ts.map +1 -0
  310. package/utils/syntax-highlighting.d.ts +8 -0
  311. package/utils/syntax-highlighting.d.ts.map +1 -0
  312. package/utils/syntax-highlighting.js +8 -8
@@ -5,88 +5,93 @@ import { downloadTextFile as r } from "../../../utils/file-download.js";
5
5
  import { CHAT_SHARED_CLASS as i } from "../../../constants/public-class-names.js";
6
6
  import { useHorizontalOverflow as a } from "../../../hooks/useHorizontalOverflow.js";
7
7
  import o from "./MarkdownTable.module.scss.js";
8
- import { MARKDOWN_TABLE_CSV_MIME_TYPE as s, MarkdownTableCopyFormat as c, serializeMarkdownTableRows as l } from "./table-serialization.js";
9
- import { useMarkdownTableActions as u } from "./useMarkdownTableActions/useMarkdownTableActions.js";
10
- import { ElementSize as d, GhostIconButton as f } from "@epam/ai-dial-ui-kit";
11
- import { memo as p, useCallback as m, useEffect as h, useRef as g, useState as _ } from "react";
12
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
8
+ import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as s, MARKDOWN_TABLE_CSV_MIME_TYPE as c, MarkdownTableCopyFormat as l, serializeMarkdownTableRows as u } from "./table-serialization.js";
9
+ import { useMarkdownTableActions as d } from "./useMarkdownTableActions/useMarkdownTableActions.js";
10
+ import { ElementSize as f, GhostIconButton as p, LiveRegion as m, LiveRegionElement as h } from "@epam/ai-dial-ui-kit";
11
+ import { memo as g, useCallback as _, useEffect as v, useRef as y, useState as b } from "react";
12
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
13
13
  //#region src/components/MarkdownRenderer/Table/MarkdownTable.tsx
14
- var b = 2e3, x = p(({ children: p, classNames: x, colors: S, actionLabels: C, downloadFilename: w, isStreaming: T, onOpenInCanvas: E, scrollRegionAriaLabel: D = "Scrollable table" }) => {
15
- let [O, k] = _(!1), A = g(null), { scrollContainerRef: j, contentRef: M, hasContentBeyondStart: N, hasContentBeyondEnd: P, handleScroll: F } = a(), I = t({
16
- "--cm-markdown-border": S?.border,
17
- "--cm-table-scrollbar": S?.scrollbar,
18
- "--cm-table-fade": S?.fade,
19
- "--cm-table-row-divider": S?.rowDivider,
20
- "--cm-table-row-hover-bg": S?.rowHoverBackground
21
- }), L = N || P;
22
- h(() => () => {
23
- A.current != null && clearTimeout(A.current);
14
+ var C = 2e3, w = g(({ children: s, classNames: g, colors: w, actionLabels: T, downloadFilename: E, isStreaming: D, onOpenInCanvas: O, scrollRegionAriaLabel: k = "Scrollable table" }) => {
15
+ let [A, j] = b(!1), M = y(null), { scrollContainerRef: N, contentRef: P, hasContentBeyondStart: F, hasContentBeyondEnd: I, handleScroll: L } = a(), R = t({
16
+ "--cm-markdown-border": w?.border,
17
+ "--cm-table-scrollbar": w?.scrollbar,
18
+ "--cm-table-fade": w?.fade,
19
+ "--cm-table-row-divider": w?.rowDivider,
20
+ "--cm-table-row-hover-bg": w?.rowHoverBackground,
21
+ "--cm-table-actions-border": w?.actionsBorder,
22
+ "--cm-table-actions-bg": w?.actionsBackground
23
+ }), z = F || I;
24
+ v(() => () => {
25
+ M.current != null && clearTimeout(M.current);
24
26
  }, []);
25
- let R = m(() => {
26
- let e = M.current;
27
- e != null && n(l(Array.from(e.rows), c.Markdown)).then((e) => {
28
- e && (A.current != null && clearTimeout(A.current), k(!0), A.current = setTimeout(() => {
29
- k(!1);
30
- }, b));
27
+ let B = _(() => {
28
+ let e = P.current;
29
+ if (e == null) return;
30
+ let t = u(Array.from(e.rows), l.Markdown);
31
+ n(t).then((e) => {
32
+ e && (M.current != null && clearTimeout(M.current), j(!0), M.current = setTimeout(() => {
33
+ j(!1);
34
+ }, C));
31
35
  });
32
- }, [M]), z = m(() => {
33
- let e = M.current;
34
- e != null && r(`\uFEFF${l(Array.from(e.rows), c.Csv)}`, w ?? "table.csv", s);
35
- }, [M, w]), B = m(() => {
36
- let e = M.current;
37
- e == null || E == null || E(l(Array.from(e.rows), c.Markdown));
38
- }, [M, E]), V = u({
39
- actionLabels: C,
40
- isCopied: O,
41
- onCopy: R,
42
- onDownloadCsv: z,
43
- onOpenInCanvas: E == null ? void 0 : B
44
- }), H = V.length > 0 && !T;
45
- return /* @__PURE__ */ y("div", {
46
- style: I,
47
- className: e("group/table relative w-full min-w-0 max-w-full rounded-xl border [overflow:clip]", o.tableContainer, x.tableWrapper, i.table),
36
+ }, [P]), V = _(() => {
37
+ let e = P.current;
38
+ if (e == null) return;
39
+ let t = u(Array.from(e.rows), l.Csv);
40
+ r(`\uFEFF${t}`, E ?? "table.csv", c);
41
+ }, [P, E]), H = _(() => {
42
+ let e = P.current;
43
+ e != null && O != null && O(u(Array.from(e.rows), l.Markdown));
44
+ }, [P, O]), U = d({
45
+ actionLabels: T,
46
+ isCopied: A,
47
+ onCopy: B,
48
+ onDownloadCsv: V,
49
+ onOpenInCanvas: O == null ? void 0 : H
50
+ }), W = U.length > 0 && !D;
51
+ return /* @__PURE__ */ S("div", {
52
+ style: R,
53
+ className: e("group/table relative w-full max-w-full min-w-0 overflow-clip rounded-xl border", o.tableContainer, g.tableWrapper, i.table),
48
54
  children: [
49
- H && /* @__PURE__ */ v("div", {
55
+ W && /* @__PURE__ */ x("div", {
50
56
  className: "sticky top-0 z-10 h-0",
51
- children: /* @__PURE__ */ v("div", {
52
- className: "absolute end-2 top-2 flex items-center gap-1 rounded-lg border border-tertiary bg-layer-raised px-2 py-1 opacity-0 shadow-xs transition-opacity focus-within:opacity-100 group-hover/table:opacity-100",
53
- children: V.map((e) => /* @__PURE__ */ v(f, {
57
+ children: /* @__PURE__ */ x("div", {
58
+ className: e("absolute inset-e-2 top-2 flex items-center gap-1 rounded-lg border px-2 py-1 opacity-0 shadow-xs transition-opacity group-hover/table:opacity-100 focus-within:opacity-100", o.actions),
59
+ children: U.map((e) => /* @__PURE__ */ x(p, {
54
60
  tooltipProps: { tooltip: e.label },
55
61
  "aria-label": e.label,
56
- icon: /* @__PURE__ */ v("span", {
62
+ icon: /* @__PURE__ */ x("span", {
57
63
  "aria-hidden": !0,
58
64
  children: e.icon
59
65
  }),
60
- size: d.Small,
66
+ size: f.Small,
61
67
  onClick: e.onClick
62
68
  }, e.label))
63
69
  })
64
70
  }),
65
- /* @__PURE__ */ v("div", {
66
- ref: j,
67
- className: e("w-full min-w-0 max-w-full overflow-x-auto", o.scrollContainer, x.tableScrollContainer, {
68
- [o.tableScrollFadeBoth]: N && P,
69
- [o.tableScrollFadeStart]: N && !P,
70
- [o.tableScrollFadeEnd]: !N && P
71
+ /* @__PURE__ */ x("div", {
72
+ ref: N,
73
+ className: e("w-full max-w-full min-w-0 overflow-x-auto", o.scrollContainer, g.tableScrollContainer, {
74
+ [o.tableScrollFadeBoth]: F && I,
75
+ [o.tableScrollFadeStart]: F && !I,
76
+ [o.tableScrollFadeEnd]: !F && I
71
77
  }, i.tableScroll),
72
- onScroll: F,
73
- role: L ? "region" : void 0,
74
- "aria-label": L ? D : void 0,
75
- tabIndex: L ? 0 : void 0,
76
- children: /* @__PURE__ */ v("table", {
77
- ref: M,
78
- className: e("w-max min-w-full border-collapse", x.tableFont ?? "dial-small-text"),
79
- children: p
78
+ onScroll: L,
79
+ role: z ? "region" : void 0,
80
+ "aria-label": z ? k : void 0,
81
+ tabIndex: z ? 0 : void 0,
82
+ children: /* @__PURE__ */ x("table", {
83
+ ref: P,
84
+ className: e("w-max min-w-full border-collapse", g.tableFont ?? "dial-small-text"),
85
+ children: s
80
86
  })
81
87
  }),
82
- C?.copyLabel && /* @__PURE__ */ v("span", {
83
- "aria-live": "polite",
84
- className: "sr-only",
85
- role: "status",
86
- children: O ? C.copiedLabel ?? "" : ""
88
+ T?.copyLabel && /* @__PURE__ */ x(m, {
89
+ visuallyHidden: !0,
90
+ as: h.Span,
91
+ children: A ? T.copiedLabel ?? "" : ""
87
92
  })
88
93
  ]
89
94
  });
90
95
  });
91
96
  //#endregion
92
- export { x as MarkdownTable };
97
+ export { s as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, c as MARKDOWN_TABLE_CSV_MIME_TYPE, w as MarkdownTable, l as MarkdownTableCopyFormat, u as serializeMarkdownTableRows };
@@ -1,15 +1,17 @@
1
- var e = {
2
- tableContainer: "_tableContainer_1qw2e_1",
3
- tableContainerLight: "_tableContainerLight_1qw2e_6",
4
- copiedIcon: "_copiedIcon_1qw2e_10",
5
- scrollContainer: "_scrollContainer_1qw2e_14",
6
- tableHeaderCell: "_tableHeaderCell_1qw2e_30",
7
- sectionRow: "_sectionRow_1qw2e_37",
8
- rowDivider: "_rowDivider_1qw2e_41",
9
- row: "_row_1qw2e_41",
10
- tableScrollFadeEnd: "_tableScrollFadeEnd_1qw2e_51",
11
- tableScrollFadeStart: "_tableScrollFadeStart_1qw2e_59",
12
- tableScrollFadeBoth: "_tableScrollFadeBoth_1qw2e_67"
1
+ //#region src/components/MarkdownRenderer/Table/MarkdownTable.module.scss
2
+ var e = "_tableContainer_82t2b_1", t = "_tableContainerLight_82t2b_6", n = "_actions_82t2b_10", r = "_copiedIcon_82t2b_15", i = "_scrollContainer_82t2b_19", a = "_tableHeaderCell_82t2b_35", o = "_sectionRow_82t2b_42", s = "_rowDivider_82t2b_46", c = "_row_82t2b_46", l = "_tableScrollFadeEnd_82t2b_56", u = "_tableScrollFadeStart_82t2b_64", d = "_tableScrollFadeBoth_82t2b_72", f = {
3
+ tableContainer: e,
4
+ tableContainerLight: t,
5
+ actions: n,
6
+ copiedIcon: r,
7
+ scrollContainer: i,
8
+ tableHeaderCell: a,
9
+ sectionRow: o,
10
+ rowDivider: s,
11
+ row: c,
12
+ tableScrollFadeEnd: l,
13
+ tableScrollFadeStart: u,
14
+ tableScrollFadeBoth: d
13
15
  };
14
16
  //#endregion
15
- export { e as default };
17
+ export { n as actions, r as copiedIcon, f as default, c as row, s as rowDivider, i as scrollContainer, o as sectionRow, e as tableContainer, t as tableContainerLight, a as tableHeaderCell, d as tableScrollFadeBoth, l as tableScrollFadeEnd, u as tableScrollFadeStart };
@@ -0,0 +1,22 @@
1
+ import { FC, ReactNode } from 'react';
2
+ /** A single action rendered by {@link TableHeader}. */
3
+ export interface TableHeaderAction {
4
+ /** Stable accessible name and tooltip text. */
5
+ label: string;
6
+ /** Decorative icon content rendered inside the action button. */
7
+ icon: ReactNode;
8
+ /** Called when the action button is activated. */
9
+ onClick: () => void;
10
+ }
11
+ /** Props for {@link TableHeader}. */
12
+ export interface TableHeaderProps {
13
+ /** Content rendered at the inline start of the header. */
14
+ children?: ReactNode;
15
+ /** Action descriptors rendered as icon buttons at the inline end. */
16
+ actions?: TableHeaderAction[];
17
+ /** Extra classes merged onto the header. */
18
+ className?: string;
19
+ }
20
+ /** Reusable table header with caller-supplied leading content and actions. */
21
+ export declare const TableHeader: FC<TableHeaderProps>;
22
+ //# sourceMappingURL=TableHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/Table/TableHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,uDAAuD;AACvD,MAAM,WAAW,iBAAiB;IAChC,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,IAAI,EAAE,SAAS,CAAC;IAChB,kDAAkD;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,qEAAqE;IACrE,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,8EAA8E;AAC9E,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAgC5C,CAAC"}
@@ -1,3 +1,4 @@
1
- var e = { tableHeader: "_tableHeader_1qvg8_1" };
1
+ //#region src/components/MarkdownRenderer/Table/TableHeader.module.scss
2
+ var e = "_tableHeader_1qvg8_1", t = { tableHeader: e };
2
3
  //#endregion
3
- export { e as default };
4
+ export { t as default, e as tableHeader };
@@ -0,0 +1,16 @@
1
+ export declare enum MarkdownTableCopyFormat {
2
+ Csv = "csv",
3
+ Markdown = "markdown"
4
+ }
5
+ /** Default filename used when downloading a Markdown table as CSV. */
6
+ export declare const DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME = "table.csv";
7
+ /** MIME type used when downloading a Markdown table as CSV. */
8
+ export declare const MARKDOWN_TABLE_CSV_MIME_TYPE = "text/csv;charset=utf-8";
9
+ export interface MarkdownTableActionLabels {
10
+ copyLabel?: string;
11
+ copiedLabel?: string;
12
+ downloadCsvLabel?: string;
13
+ openInCanvasLabel?: string;
14
+ }
15
+ export declare const serializeMarkdownTableRows: (rows: readonly HTMLTableRowElement[], format: MarkdownTableCopyFormat) => string;
16
+ //# sourceMappingURL=table-serialization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-serialization.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/Table/table-serialization.ts"],"names":[],"mappings":"AAAA,oBAAY,uBAAuB;IACjC,GAAG,QAAQ;IACX,QAAQ,aAAa;CACtB;AAED,sEAAsE;AACtE,eAAO,MAAM,wCAAwC,cAAc,CAAC;AACpE,+DAA+D;AAC/D,eAAO,MAAM,4BAA4B,2BAA2B,CAAC;AAErE,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAsID,eAAO,MAAM,0BAA0B,GACrC,MAAM,SAAS,mBAAmB,EAAE,EACpC,QAAQ,uBAAuB,KAC9B,MAiBF,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { ReactNode } from 'react';
2
+ import { MarkdownTableActionLabels } from '../table-serialization';
3
+ /** A table action rendered as an icon button. */
4
+ export interface MarkdownTableHeaderAction {
5
+ /** Stable accessible name and tooltip text. */
6
+ label: string;
7
+ /** Decorative icon content. */
8
+ icon: ReactNode;
9
+ /** Called when the action is activated. */
10
+ onClick: () => void;
11
+ }
12
+ /** Params for {@link useMarkdownTableActions}. */
13
+ export interface UseMarkdownTableActionsParams {
14
+ /** Localized labels for table actions. `undefined` yields no actions. */
15
+ actionLabels: MarkdownTableActionLabels | undefined;
16
+ /** Whether the table has just been copied (shows a checkmark on the copy button). */
17
+ isCopied: boolean;
18
+ /** Called when the copy action is activated. */
19
+ onCopy: () => void;
20
+ /** Called when the download-as-CSV action is activated. */
21
+ onDownloadCsv: () => void;
22
+ /** Called when the open-in-canvas action is activated. Omit to hide that action. */
23
+ onOpenInCanvas?: () => void;
24
+ }
25
+ /** Builds the {@link MarkdownTableHeaderAction} list for a table's action bar from its localized labels. */
26
+ export declare const useMarkdownTableActions: ({ actionLabels, isCopied, onCopy, onDownloadCsv, onOpenInCanvas, }: UseMarkdownTableActionsParams) => MarkdownTableHeaderAction[];
27
+ //# sourceMappingURL=useMarkdownTableActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMarkdownTableActions.d.ts","sourceRoot":"","sources":["../../../../../src/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE,iDAAiD;AACjD,MAAM,WAAW,yBAAyB;IACxC,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,yEAAyE;IACzE,YAAY,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACpD,qFAAqF;IACrF,QAAQ,EAAE,OAAO,CAAC;IAClB,gDAAgD;IAChD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,2DAA2D;IAC3D,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,4GAA4G;AAC5G,eAAO,MAAM,uBAAuB,GAAI,oEAMrC,6BAA6B,KAAG,yBAAyB,EAyD3D,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ /** Props for {@link MarkdownTaskCheckbox}. */
3
+ export interface MarkdownTaskCheckboxProps {
4
+ /** Whether the GFM task-list item is checked. Defaults to `false`. */
5
+ checked?: boolean;
6
+ }
7
+ /** Read-only checkbox for GFM task-list items (`- [ ]` / `- [x]`). */
8
+ export declare const MarkdownTaskCheckbox: FC<MarkdownTaskCheckboxProps>;
9
+ //# sourceMappingURL=MarkdownTaskCheckbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownTaskCheckbox.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB;IACxC,sEAAsE;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,sEAAsE;AACtE,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAM9D,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { FC } from 'react';
2
+ import { MarkdownRendererColors } from './MarkdownRenderer';
3
+ /** Props for {@link ThinkingShimmer}. */
4
+ export interface ThinkingShimmerProps {
5
+ /** Text rendered with the shimmer animation. */
6
+ label: string;
7
+ /** Gradient color overrides applied as CSS custom properties. */
8
+ colors?: Pick<MarkdownRendererColors, 'thinkingPrimary' | 'thinkingSecondary'>;
9
+ }
10
+ /**
11
+ * The "thinking" placeholder both message renderers show while a stream has
12
+ * started but no content has arrived yet. Owns the mapping from the public
13
+ * color props to the gradient's CSS variables — `thinkingPrimary` drives
14
+ * `--cm-thinking-inverted` — so that mapping exists in one place.
15
+ */
16
+ export declare const ThinkingShimmer: FC<ThinkingShimmerProps>;
17
+ //# sourceMappingURL=ThinkingShimmer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThinkingShimmer.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/ThinkingShimmer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGjE,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,MAAM,CAAC,EAAE,IAAI,CACX,sBAAsB,EACtB,iBAAiB,GAAG,mBAAmB,CACxC,CAAC;CACH;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAapD,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { MarkdownRendererClassNames } from './MarkdownRenderer';
2
+ /** Default typography classNames for rendering markdown with full visual hierarchy. */
3
+ export declare const DEFAULT_MARKDOWN_CLASS_NAMES: MarkdownRendererClassNames;
4
+ /**
5
+ * {@link DEFAULT_MARKDOWN_CLASS_NAMES} with the body copy one step down the
6
+ * type scale. Headings, code, and tables are unchanged — only the text that
7
+ * dominates a long answer shrinks, so more of it fits on a narrow viewport.
8
+ */
9
+ export declare const COMPACT_MARKDOWN_CLASS_NAMES: MarkdownRendererClassNames;
10
+ //# sourceMappingURL=markdown-class-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-class-names.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/markdown-class-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAErE,uFAAuF;AACvF,eAAO,MAAM,4BAA4B,EAAE,0BAe1C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,0BAI1C,CAAC"}
@@ -0,0 +1,15 @@
1
+ /** Minimal hast node shape walked by {@link rehypePreserveSpaces}. */
2
+ interface HastNodeLike {
3
+ /** Node type — `'element'`, `'text'`, `'root'`, … */
4
+ type: string;
5
+ /** Tag name of an element node. */
6
+ tagName?: string;
7
+ /** Text of a text node. */
8
+ value?: string;
9
+ /** Child nodes of a parent node. */
10
+ children?: HastNodeLike[];
11
+ }
12
+ /** Rehype plugin that keeps runs of consecutive spaces in prose visible instead of letting HTML collapse them to one. */
13
+ export declare const rehypePreserveSpaces: () => (tree: HastNodeLike) => void;
14
+ export {};
15
+ //# sourceMappingURL=markdown-whitespace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-whitespace.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/markdown-whitespace.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,UAAU,YAAY;IACpB,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B;AA8BD,yHAAyH;AACzH,eAAO,MAAM,oBAAoB,SAAU,MAAM,YAAY,SAE5D,CAAC"}
@@ -1,16 +1,12 @@
1
1
  //#region src/components/MarkdownRenderer/markdown-whitespace.ts
2
- var e = new Set([
2
+ var e = /* @__PURE__ */ new Set([
3
3
  "code",
4
4
  "pre",
5
5
  "math",
6
6
  "script",
7
7
  "style"
8
8
  ]), t = "\xA0", n = / {2,}/g, r = (e) => `${t.repeat(e.length - 1)} `, i = (t) => {
9
- if (t.type === "text" && t.value) {
10
- t.value = t.value.replace(n, r);
11
- return;
12
- }
13
- t.type === "element" && t.tagName && e.has(t.tagName) || t.children?.forEach(i);
9
+ t.type === "text" && t.value ? t.value = t.value.replace(n, r) : t.type === "element" && t.tagName && e.has(t.tagName) || t.children?.forEach(i);
14
10
  }, a = () => (e) => {
15
11
  i(e);
16
12
  };
@@ -0,0 +1,25 @@
1
+ import { FC } from 'react';
2
+ /** Props for {@link MarkdownWithPlaceholders}. */
3
+ export interface MarkdownWithPlaceholdersProps {
4
+ /** Raw markdown string to render, read-only. */
5
+ content: string;
6
+ /** Typography class overrides applied to `<h1>`–`<h6>`. Defaults to no override. */
7
+ headingClassName?: string;
8
+ /** Accessible label for the copy button in code blocks. Forwarded to {@link MarkdownRenderer}; defaults to `'Copy code'`. */
9
+ codeBlockCopyLabel?: string;
10
+ /** Status announced after a code block has been copied. Forwarded to {@link MarkdownRenderer}; defaults to `'Copied!'`. */
11
+ codeBlockCopiedLabel?: string;
12
+ /** Accessible label for the download button in code blocks. Forwarded to {@link MarkdownRenderer}; defaults to `'Download code'`. */
13
+ codeBlockDownloadLabel?: string;
14
+ /** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}; defaults to `'Scrollable table'`. */
15
+ tableScrollRegionAriaLabel?: string;
16
+ /** Accessible label for a block formula's scrollable region. Forwarded to {@link MarkdownRenderer}; defaults to `'Scrollable formula'`. */
17
+ mathScrollRegionAriaLabel?: string;
18
+ }
19
+ /**
20
+ * Renders read-only markdown with every `{{param}}` token wrapped in a
21
+ * `cat-prompt-variable`-classed span the host can style apart from the
22
+ * surrounding prose.
23
+ */
24
+ export declare const MarkdownWithPlaceholders: FC<MarkdownWithPlaceholdersProps>;
25
+ //# sourceMappingURL=MarkdownWithPlaceholders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownWithPlaceholders.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAO3B,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6HAA6H;IAC7H,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2HAA2H;IAC3H,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qIAAqI;IACrI,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iIAAiI;IACjI,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,2IAA2I;IAC3I,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC;AAKD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAsBtE,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { FC } from 'react';
2
+ /** User-visible strings of `NewVersionAlert`. */
3
+ export interface NewVersionAlertLabels {
4
+ /** Screen heading. Defaults to `'New version available'`. */
5
+ heading?: string;
6
+ /** Explanation under the heading. Defaults to `'Reload the page to get the latest version.'`. */
7
+ message?: string;
8
+ /** Reload button text. Defaults to `'Reload the page'`. */
9
+ reloadLabel?: string;
10
+ }
11
+ /** CSS custom-property overrides for `NewVersionAlert`. */
12
+ export interface NewVersionAlertColors {
13
+ /** Refresh icon color. Defaults to `--text-accent`. */
14
+ icon?: string;
15
+ }
16
+ /** Props for `NewVersionAlert`. */
17
+ export interface NewVersionAlertProps {
18
+ /** Called when the reload button is activated; the host reloads the page. */
19
+ onReload: () => void;
20
+ /** User-visible strings, each with an English default. */
21
+ labels?: NewVersionAlertLabels;
22
+ /** Color overrides applied as CSS custom properties. */
23
+ colors?: NewVersionAlertColors;
24
+ }
25
+ /** Full-screen prompt shown instead of the app once a newer build has been deployed. */
26
+ export declare const NewVersionAlert: FC<NewVersionAlertProps>;
27
+ //# sourceMappingURL=NewVersionAlert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NewVersionAlert.d.ts","sourceRoot":"","sources":["../../../src/components/NewVersionAlert/NewVersionAlert.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAKtC,iDAAiD;AACjD,MAAM,WAAW,qBAAqB;IACpC,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iGAAiG;IACjG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,2DAA2D;AAC3D,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,wDAAwD;IACxD,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC;AAED,wFAAwF;AACxF,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAwBpD,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { buildCssVars as e } from "../../utils/build-css-vars.js";
2
+ import { FullScreenAlert as t } from "../FullScreenAlert/FullScreenAlert.js";
3
+ import n from "./NewVersionAlert.module.scss.js";
4
+ import { DIAL_ICON_SIZE as r, DIAL_KIT_ICON_STROKE as i } from "@epam/ai-dial-ui-kit";
5
+ import { memo as a } from "react";
6
+ import { jsx as o } from "react/jsx-runtime";
7
+ import { IconRefresh as s } from "@tabler/icons-react";
8
+ //#region src/components/NewVersionAlert/NewVersionAlert.tsx
9
+ var c = a(({ onReload: a, labels: c, colors: l }) => /* @__PURE__ */ o("div", {
10
+ className: "size-full",
11
+ style: e({ "--nva-icon": l?.icon }),
12
+ children: /* @__PURE__ */ o(t, {
13
+ icon: /* @__PURE__ */ o(s, {
14
+ "aria-hidden": "true",
15
+ size: r.LG,
16
+ stroke: i,
17
+ className: n.icon
18
+ }),
19
+ heading: c?.heading ?? "New version available",
20
+ message: c?.message ?? "Reload the page to get the latest version.",
21
+ actionLabel: c?.reloadLabel ?? "Reload the page",
22
+ onAction: a
23
+ })
24
+ }));
25
+ //#endregion
26
+ export { c as NewVersionAlert };
@@ -0,0 +1,4 @@
1
+ //#region src/components/NewVersionAlert/NewVersionAlert.module.scss
2
+ var e = "_icon_18yqy_1", t = { icon: e };
3
+ //#endregion
4
+ export { t as default, e as icon };
@@ -0,0 +1,46 @@
1
+ import { NotificationVariant } from '@epam/ai-dial-ui-kit';
2
+ import { FC, ReactNode } from 'react';
3
+ /** One toast in a `NotificationStack`. */
4
+ export interface NotificationStackItem {
5
+ /** Stable id, handed back to `onDismiss`. */
6
+ id: string;
7
+ /** Kit variant: icon, colour and live-region politeness. */
8
+ variant: NotificationVariant;
9
+ /** Optional heading above the message. */
10
+ title?: string;
11
+ /** Message body. */
12
+ message?: ReactNode;
13
+ /** Optional control at the toast's inline end; an action-bearing toast stays until dismissed. */
14
+ action?: ReactNode;
15
+ /** Trace id shown as a copyable "Request ID" row; a toast carrying one stays until dismissed. */
16
+ requestId?: string;
17
+ }
18
+ /** User-visible strings of `NotificationStack`. */
19
+ export interface NotificationStackLabels {
20
+ /** Label before the request id. Defaults to `'Request ID'`. */
21
+ requestId?: string;
22
+ /** Accessible name of the copy button. Defaults to `'Copy request ID'`. */
23
+ copyRequestIdAriaLabel?: string;
24
+ /** Announcement after a successful copy. Defaults to `'Request ID copied'`. */
25
+ requestIdCopied?: string;
26
+ /** Announcement after a failed copy. Defaults to `"Couldn't copy request ID"`. */
27
+ requestIdCopyFailed?: string;
28
+ }
29
+ /** Props for `NotificationStack`. */
30
+ export interface NotificationStackProps {
31
+ /** Toasts in arrival order; the newest renders last. */
32
+ items: readonly NotificationStackItem[];
33
+ /** Called with a toast's id when it is closed or its dismiss delay ends. */
34
+ onDismiss: (id: string) => void;
35
+ /** User-visible strings, each with an English default. */
36
+ labels?: NotificationStackLabels;
37
+ /** Delay before a plain toast dismisses itself, in milliseconds. Defaults to `5000`. */
38
+ dismissDelayMs?: number;
39
+ /** Classes of the fixed stack, replacing the default bottom-edge (phone) / bottom-end corner (desktop) placement. */
40
+ className?: string;
41
+ /** CSS class applied to the request-id row. Defaults to `'dial-tiny-text'`. */
42
+ requestIdClassName?: string;
43
+ }
44
+ /** Portalled stack of toasts that auto-dismisses plain ones and keeps request-id and action toasts until closed. */
45
+ export declare const NotificationStack: FC<NotificationStackProps>;
46
+ //# sourceMappingURL=NotificationStack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationStack.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationStack/NotificationStack.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAOL,KAAK,EAAE,EACP,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,4DAA4D;IAC5D,OAAO,EAAE,mBAAmB,CAAC;IAC7B,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,iGAAiG;IACjG,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,iGAAiG;IACjG,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,mDAAmD;AACnD,MAAM,WAAW,uBAAuB;IACtC,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,+EAA+E;IAC/E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kFAAkF;IAClF,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,qCAAqC;AACrC,MAAM,WAAW,sBAAsB;IACrC,wDAAwD;IACxD,KAAK,EAAE,SAAS,qBAAqB,EAAE,CAAC;IACxC,4EAA4E;IAC5E,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qHAAqH;IACrH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAiJD,oHAAoH;AACpH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAuDxD,CAAC"}