@epam/ai-dial-chat-shared 1.3.0-dev.35 → 1.3.0-dev.353

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 (333) hide show
  1. package/components/ActionMenu/ActionMenu.d.ts +26 -0
  2. package/components/ActionMenu/ActionMenu.d.ts.map +1 -0
  3. package/components/ActionMenu/ActionMenu.js +50 -0
  4. package/components/ConfirmationDialog/ConfirmationDialog.d.ts +46 -0
  5. package/components/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -0
  6. package/components/ConfirmationDialog/ConfirmationDialog.js +11 -9
  7. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts +33 -0
  8. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts.map +1 -0
  9. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.module.scss.js +5 -4
  10. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts +33 -0
  11. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts.map +1 -0
  12. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.js +2 -2
  13. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.module.scss.js +3 -2
  14. package/components/ConfirmationView/ConfirmationFooter.d.ts +41 -0
  15. package/components/ConfirmationView/ConfirmationFooter.d.ts.map +1 -0
  16. package/components/ConfirmationView/ConfirmationFooter.js +25 -26
  17. package/components/ConfirmationView/ConfirmationView.d.ts +59 -0
  18. package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -0
  19. package/components/ConfirmationView/ConfirmationView.js +12 -12
  20. package/components/ConfirmationView/ConfirmationView.module.scss.js +6 -5
  21. package/components/CopyButton/CopyButton.d.ts +19 -0
  22. package/components/CopyButton/CopyButton.d.ts.map +1 -0
  23. package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts +41 -0
  24. package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts.map +1 -0
  25. package/components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.d.ts +31 -0
  26. package/components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.d.ts.map +1 -0
  27. package/components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.js +36 -0
  28. package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts +52 -0
  29. package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts.map +1 -0
  30. package/components/DeleteConfirmationView/DeleteConfirmationView.js +36 -27
  31. package/components/DeleteConfirmationView/DeleteConfirmationView.module.scss.js +5 -4
  32. package/components/DeploymentIcon/DeploymentIcon.d.ts +36 -0
  33. package/components/DeploymentIcon/DeploymentIcon.d.ts.map +1 -0
  34. package/components/DeploymentIcon/DeploymentIcon.module.scss.js +3 -2
  35. package/components/EntityHeader/EntityHeader.d.ts +38 -0
  36. package/components/EntityHeader/EntityHeader.d.ts.map +1 -0
  37. package/components/EntityHeader/EntityHeader.js +1 -1
  38. package/components/EntityTypeLabel/EntityTypeLabel.d.ts +18 -0
  39. package/components/EntityTypeLabel/EntityTypeLabel.d.ts.map +1 -0
  40. package/components/FeaturedChip/FeaturedChip.d.ts +16 -0
  41. package/components/FeaturedChip/FeaturedChip.d.ts.map +1 -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 +28 -0
  94. package/components/NewVersionAlert/NewVersionAlert.module.scss.js +4 -0
  95. package/components/NotificationStack/NotificationStack.d.ts +48 -0
  96. package/components/NotificationStack/NotificationStack.d.ts.map +1 -0
  97. package/components/NotificationStack/NotificationStack.js +111 -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/components/UnsavedChangesProvider/UnsavedChangesProvider.d.ts +22 -0
  109. package/components/UnsavedChangesProvider/UnsavedChangesProvider.d.ts.map +1 -0
  110. package/components/UnsavedChangesProvider/UnsavedChangesProvider.js +57 -0
  111. package/components/UnsavedChangesProvider/unsaved-changes-context.d.ts +44 -0
  112. package/components/UnsavedChangesProvider/unsaved-changes-context.d.ts.map +1 -0
  113. package/components/UnsavedChangesProvider/unsaved-changes-context.js +13 -0
  114. package/constants/breakpoint.d.ts +15 -0
  115. package/constants/breakpoint.d.ts.map +1 -0
  116. package/constants/breakpoint.js +2 -2
  117. package/constants/dial.d.ts +5 -0
  118. package/constants/dial.d.ts.map +1 -0
  119. package/constants/entity-colors.d.ts +6 -0
  120. package/constants/entity-colors.d.ts.map +1 -0
  121. package/constants/icon.d.ts +14 -0
  122. package/constants/icon.d.ts.map +1 -0
  123. package/constants/markdown-editor.d.ts +2 -0
  124. package/constants/markdown-editor.d.ts.map +1 -0
  125. package/constants/mime-types.d.ts +27 -0
  126. package/constants/mime-types.d.ts.map +1 -0
  127. package/constants/public-class-names.d.ts +13 -0
  128. package/constants/public-class-names.d.ts.map +1 -0
  129. package/constants/resizable-fields.d.ts +5 -0
  130. package/constants/resizable-fields.d.ts.map +1 -0
  131. package/constants/select-list.d.ts +4 -0
  132. package/constants/select-list.d.ts.map +1 -0
  133. package/constants/tag-input.d.ts +2 -0
  134. package/constants/tag-input.d.ts.map +1 -0
  135. package/conversation-transfer/conversation-transfer-queue.d.ts +16 -0
  136. package/conversation-transfer/conversation-transfer-queue.d.ts.map +1 -0
  137. package/conversation-transfer/conversation-transfer-queue.js +24 -0
  138. package/entry-points/file-manager.d.ts +5 -0
  139. package/entry-points/file-manager.d.ts.map +1 -0
  140. package/entry-points/markdown.d.ts +19 -0
  141. package/entry-points/markdown.d.ts.map +1 -0
  142. package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts +67 -0
  143. package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -0
  144. package/file-manager/DialFileManagerShell/DialFileManagerShell.js +330 -266
  145. package/file-manager/DialFileManagerShell/DialFileManagerShell.module.scss.js +8 -0
  146. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts +96 -0
  147. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts.map +1 -0
  148. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +85 -80
  149. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.module.scss.js +7 -0
  150. package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts +22 -0
  151. package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts.map +1 -0
  152. package/file-manager/OperationLoaderModal/OperationLoaderModal.js +25 -20
  153. package/file-manager/OperationLoaderModal/OperationLoaderModal.module.scss.js +4 -0
  154. package/file-manager/attach-result.d.ts +9 -0
  155. package/file-manager/attach-result.d.ts.map +1 -0
  156. package/file-manager/file-manager-controller.d.ts +129 -0
  157. package/file-manager/file-manager-controller.d.ts.map +1 -0
  158. package/file-manager/file-manager-variant.d.ts +21 -0
  159. package/file-manager/file-manager-variant.d.ts.map +1 -0
  160. package/file-manager/file-upload-validation.d.ts +8 -0
  161. package/file-manager/file-upload-validation.d.ts.map +1 -0
  162. package/file-manager/index.d.ts +11 -0
  163. package/file-manager/index.d.ts.map +1 -0
  164. package/file-manager/labels.d.ts +177 -0
  165. package/file-manager/labels.d.ts.map +1 -0
  166. package/file-manager/path.d.ts +12 -0
  167. package/file-manager/path.d.ts.map +1 -0
  168. package/file-manager/shell-styles.d.ts +37 -0
  169. package/file-manager/shell-styles.d.ts.map +1 -0
  170. package/file-manager/upload-batch.d.ts +75 -0
  171. package/file-manager/upload-batch.d.ts.map +1 -0
  172. package/file-manager/upload-batch.js +6 -2
  173. package/file-manager/upload-queue.d.ts +45 -0
  174. package/file-manager/upload-queue.d.ts.map +1 -0
  175. package/file-manager/upload-queue.js +45 -13
  176. package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts +27 -0
  177. package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts.map +1 -0
  178. package/file-manager.d.ts +2 -506
  179. package/file-manager.js +4 -4
  180. package/hooks/useAvailableHeightCap.d.ts +30 -0
  181. package/hooks/useAvailableHeightCap.d.ts.map +1 -0
  182. package/hooks/useAvailableHeightCap.js +1 -1
  183. package/hooks/useCodeCopy.d.ts +6 -0
  184. package/hooks/useCodeCopy.d.ts.map +1 -0
  185. package/hooks/useCollapsedText.d.ts +27 -0
  186. package/hooks/useCollapsedText.d.ts.map +1 -0
  187. package/hooks/useControlErrorAssociation.d.ts +3 -0
  188. package/hooks/useControlErrorAssociation.d.ts.map +1 -0
  189. package/hooks/useControlErrorAssociation.js +12 -0
  190. package/hooks/useHorizontalOverflow.d.ts +21 -0
  191. package/hooks/useHorizontalOverflow.d.ts.map +1 -0
  192. package/hooks/useIsMobile.d.ts +3 -0
  193. package/hooks/useIsMobile.d.ts.map +1 -0
  194. package/hooks/useIsMobile.js +1 -1
  195. package/hooks/useIsPhone.d.ts +3 -0
  196. package/hooks/useIsPhone.d.ts.map +1 -0
  197. package/hooks/useIsPhone.js +13 -0
  198. package/hooks/useIsTablet.d.ts +3 -0
  199. package/hooks/useIsTablet.d.ts.map +1 -0
  200. package/hooks/useIsTablet.js +13 -0
  201. package/hooks/useIsTextClipped.d.ts +26 -0
  202. package/hooks/useIsTextClipped.d.ts.map +1 -0
  203. package/hooks/useIsTextClipped.js +25 -0
  204. package/hooks/useStreamedMarkdownContent.d.ts +3 -0
  205. package/hooks/useStreamedMarkdownContent.d.ts.map +1 -0
  206. package/hooks/useTextRefinement.d.ts +44 -0
  207. package/hooks/useTextRefinement.d.ts.map +1 -0
  208. package/hooks/useTextRefinement.js +4 -4
  209. package/hooks/useUnsavedChangesGuard.d.ts +14 -0
  210. package/hooks/useUnsavedChangesGuard.d.ts.map +1 -0
  211. package/hooks/useUnsavedChangesGuard.js +1 -5
  212. package/hooks/useUnsavedChangesLeaveConfirmation.d.ts +12 -0
  213. package/hooks/useUnsavedChangesLeaveConfirmation.d.ts.map +1 -0
  214. package/hooks/useUnsavedChangesLeaveConfirmation.js +22 -0
  215. package/hooks/useUnsavedChangesLeaveGuard.d.ts +24 -0
  216. package/hooks/useUnsavedChangesLeaveGuard.d.ts.map +1 -0
  217. package/hooks/useUnsavedChangesLeaveGuard.js +24 -0
  218. package/index.css +3 -2
  219. package/index.d.ts +93 -3167
  220. package/index.d.ts.map +1 -0
  221. package/index.js +92 -76
  222. package/markdown.d.ts +2 -465
  223. package/markdown.js +3 -2
  224. package/models/annotation.d.ts +143 -0
  225. package/models/annotation.d.ts.map +1 -0
  226. package/models/application-visualizer.d.ts +67 -0
  227. package/models/application-visualizer.d.ts.map +1 -0
  228. package/models/auth.d.ts +28 -0
  229. package/models/auth.d.ts.map +1 -0
  230. package/models/chat.d.ts +409 -0
  231. package/models/chat.d.ts.map +1 -0
  232. package/models/conversation-classification.d.ts +14 -0
  233. package/models/conversation-classification.d.ts.map +1 -0
  234. package/models/conversation-classification.js +3 -1
  235. package/models/conversation-transfer.d.ts +96 -0
  236. package/models/conversation-transfer.d.ts.map +1 -0
  237. package/models/custom-visualizer.d.ts +61 -0
  238. package/models/custom-visualizer.d.ts.map +1 -0
  239. package/models/deployment-configuration.d.ts +55 -0
  240. package/models/deployment-configuration.d.ts.map +1 -0
  241. package/models/deployment-features.d.ts +17 -0
  242. package/models/deployment-features.d.ts.map +1 -0
  243. package/models/deployment.d.ts +31 -0
  244. package/models/deployment.d.ts.map +1 -0
  245. package/models/dial-model.d.ts +19 -0
  246. package/models/dial-model.d.ts.map +1 -0
  247. package/models/entity.d.ts +15 -0
  248. package/models/entity.d.ts.map +1 -0
  249. package/models/import-export.d.ts +23 -0
  250. package/models/import-export.d.ts.map +1 -0
  251. package/models/inline-segment.d.ts +11 -0
  252. package/models/inline-segment.d.ts.map +1 -0
  253. package/models/locale.d.ts +19 -0
  254. package/models/locale.d.ts.map +1 -0
  255. package/models/text-refinement.d.ts +22 -0
  256. package/models/text-refinement.d.ts.map +1 -0
  257. package/models/theme.d.ts +36 -0
  258. package/models/theme.d.ts.map +1 -0
  259. package/models/tool-menu-item.d.ts +13 -0
  260. package/models/tool-menu-item.d.ts.map +1 -0
  261. package/package.json +10 -17
  262. package/types/attachment.d.ts +25 -0
  263. package/types/attachment.d.ts.map +1 -0
  264. package/types/code-editor.d.ts +8 -0
  265. package/types/code-editor.d.ts.map +1 -0
  266. package/types/entity-type.d.ts +10 -0
  267. package/types/entity-type.d.ts.map +1 -0
  268. package/types/file-manager-node.d.ts +17 -0
  269. package/types/file-manager-node.d.ts.map +1 -0
  270. package/types/mime-type.d.ts +59 -0
  271. package/types/mime-type.d.ts.map +1 -0
  272. package/utils/annotation.d.ts +29 -0
  273. package/utils/annotation.d.ts.map +1 -0
  274. package/utils/avatar-color.d.ts +10 -0
  275. package/utils/avatar-color.d.ts.map +1 -0
  276. package/utils/base64-json.d.ts +14 -0
  277. package/utils/base64-json.d.ts.map +1 -0
  278. package/utils/base64-json.js +4 -0
  279. package/utils/build-css-vars.d.ts +4 -0
  280. package/utils/build-css-vars.d.ts.map +1 -0
  281. package/utils/copy-to-clipboard.d.ts +18 -0
  282. package/utils/copy-to-clipboard.d.ts.map +1 -0
  283. package/utils/dom.d.ts +8 -0
  284. package/utils/dom.d.ts.map +1 -0
  285. package/utils/dom.js +10 -0
  286. package/utils/entity-field-limits.d.ts +11 -0
  287. package/utils/entity-field-limits.d.ts.map +1 -0
  288. package/utils/entity-type.d.ts +5 -0
  289. package/utils/entity-type.d.ts.map +1 -0
  290. package/utils/file-download.d.ts +21 -0
  291. package/utils/file-download.d.ts.map +1 -0
  292. package/utils/format-file-size.d.ts +3 -0
  293. package/utils/format-file-size.d.ts.map +1 -0
  294. package/utils/format-last-used.d.ts +3 -0
  295. package/utils/format-last-used.d.ts.map +1 -0
  296. package/utils/format-price.d.ts +7 -0
  297. package/utils/format-price.d.ts.map +1 -0
  298. package/utils/format-price.js +10 -10
  299. package/utils/generate-uuid.d.ts +3 -0
  300. package/utils/generate-uuid.d.ts.map +1 -0
  301. package/utils/initials.d.ts +3 -0
  302. package/utils/initials.d.ts.map +1 -0
  303. package/utils/inline-segments.d.ts +38 -0
  304. package/utils/inline-segments.d.ts.map +1 -0
  305. package/utils/inline-segments.js +53 -0
  306. package/utils/is-audio-transcription-supported.d.ts +3 -0
  307. package/utils/is-audio-transcription-supported.d.ts.map +1 -0
  308. package/utils/is-skill-selection-unsupported.d.ts +3 -0
  309. package/utils/is-skill-selection-unsupported.d.ts.map +1 -0
  310. package/utils/latex.d.ts +22 -0
  311. package/utils/latex.d.ts.map +1 -0
  312. package/utils/latex.js +47 -41
  313. package/utils/markdown-html.d.ts +14 -0
  314. package/utils/markdown-html.d.ts.map +1 -0
  315. package/utils/markdown-html.js +11 -0
  316. package/utils/merge-class.d.ts +4 -0
  317. package/utils/merge-class.d.ts.map +1 -0
  318. package/utils/message-attachment-to-display.d.ts +22 -0
  319. package/utils/message-attachment-to-display.d.ts.map +1 -0
  320. package/utils/message-attachment-to-display.js +1 -1
  321. package/utils/message.d.ts +4 -0
  322. package/utils/message.d.ts.map +1 -0
  323. package/utils/mime-type.d.ts +22 -0
  324. package/utils/mime-type.d.ts.map +1 -0
  325. package/utils/mime-type.js +1 -1
  326. package/utils/prompt-variables.d.ts +62 -0
  327. package/utils/prompt-variables.d.ts.map +1 -0
  328. package/utils/prompt-variables.js +5 -9
  329. package/utils/string-utils.d.ts +11 -0
  330. package/utils/string-utils.d.ts.map +1 -0
  331. package/utils/syntax-highlighting.d.ts +8 -0
  332. package/utils/syntax-highlighting.d.ts.map +1 -0
  333. package/utils/syntax-highlighting.js +8 -8
@@ -2,28 +2,29 @@ import { mergeClasses as e } from "../../utils/merge-class.js";
2
2
  import { buildCssVars as t } from "../../utils/build-css-vars.js";
3
3
  import { useStreamedMarkdownContent as n } from "../../hooks/useStreamedMarkdownContent.js";
4
4
  import { preprocessLaTeX as r } from "../../utils/latex.js";
5
- import { MarkdownCodeBlock as i } from "./CodeBlock/CodeBlock.js";
6
- import { rehypePreserveSpaces as a } from "./markdown-whitespace.js";
7
- import o from "./MarkdownRenderer.module.scss.js";
8
- import { MarkdownMathBlock as s } from "./Math/MarkdownMathBlock.js";
9
- import c from "./Table/MarkdownTable.module.scss.js";
10
- import { MarkdownTable as l } from "./Table/MarkdownTable.js";
11
- import { MarkdownTaskCheckbox as u } from "./TaskCheckbox/MarkdownTaskCheckbox.js";
12
- import { ThinkingShimmer as d } from "./ThinkingShimmer.js";
13
- import f from "remark-gfm";
14
- import { memo as p, useEffect as m, useMemo as h, useState as g } from "react";
15
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
16
- import b, { defaultUrlTransform as x } from "react-markdown";
17
- import S from "rehype-raw";
18
- import C, { defaultSchema as w } from "rehype-sanitize";
19
- import T from "remark-breaks";
20
- import E from "remark-math";
5
+ import { rehypeRawAsText as i } from "../../utils/markdown-html.js";
6
+ import { MarkdownCodeBlock as a } from "./CodeBlock/CodeBlock.js";
7
+ import { rehypePreserveSpaces as o } from "./markdown-whitespace.js";
8
+ import s from "./MarkdownRenderer.module.scss.js";
9
+ import { MarkdownMathBlock as c } from "./Math/MarkdownMathBlock.js";
10
+ import l from "./Table/MarkdownTable.module.scss.js";
11
+ import { MarkdownTable as u } from "./Table/MarkdownTable.js";
12
+ import { MarkdownTaskCheckbox as d } from "./TaskCheckbox/MarkdownTaskCheckbox.js";
13
+ import { ThinkingShimmer as f } from "./ThinkingShimmer.js";
14
+ import p from "remark-gfm";
15
+ import { memo as m, useEffect as h, useMemo as g, useState as _ } from "react";
16
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
17
+ import x, { defaultUrlTransform as S } from "react-markdown";
18
+ import C from "rehype-raw";
19
+ import w, { defaultSchema as T } from "rehype-sanitize";
20
+ import E from "remark-breaks";
21
+ import D from "remark-math";
21
22
  //#region src/components/MarkdownRenderer/MarkdownRenderer.tsx
22
- var D = [
23
- f,
24
- T,
25
- [E, { singleDollarTextMath: !1 }]
26
- ], O = /* @__PURE__ */ "math.maction.annotation.annotation-xml.menclose.merror.mfenced.mfrac.mi.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.semantics.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover".split("."), k = {
23
+ var O = [
24
+ p,
25
+ E,
26
+ [D, { singleDollarTextMath: !1 }]
27
+ ], k = /* @__PURE__ */ "math.maction.annotation.annotation-xml.menclose.merror.mfenced.mfrac.mi.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.semantics.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover".split("."), A = {
27
28
  math: ["display", "xmlns"],
28
29
  annotation: ["encoding"],
29
30
  mfrac: ["linethickness"],
@@ -52,134 +53,135 @@ var D = [
52
53
  "width"
53
54
  ],
54
55
  mtd: ["width"]
55
- }, A = [S], j = [C, {
56
- ...w,
56
+ }, j = [C], M = [i], N = [w, {
57
+ ...T,
57
58
  tagNames: [
58
- ...w.tagNames ?? [],
59
- ...O,
59
+ ...T.tagNames ?? [],
60
+ ...k,
60
61
  "cit"
61
62
  ],
62
63
  attributes: {
63
- ...w.attributes,
64
- ...k,
65
- code: [...w.attributes?.code ?? [], ["className"]],
64
+ ...T.attributes,
65
+ ...A,
66
+ code: [...T.attributes?.code ?? [], ["className"]],
66
67
  cit: ["dataId"],
67
- span: [...w.attributes?.span ?? [], [
68
+ span: [...T.attributes?.span ?? [], [
68
69
  "className",
69
70
  "katex",
70
71
  "katex-error"
71
72
  ]]
72
73
  }
73
- }], M = [], N = /\$\$|\\\(|\\\[/, P = (e) => N.test(e), F = {}, I = (e) => e == null ? x : (t) => x(e(t)), L = {
74
- li: ({ children: e }) => /* @__PURE__ */ v("li", {
74
+ }], P = [], F = /\$\$|\\\(|\\\[/, I = (e) => F.test(e), L = {}, R = (e) => e == null ? S : (t) => S(e(t)), z = {
75
+ li: ({ children: e }) => /* @__PURE__ */ y("li", {
75
76
  className: "mb-1.5 last:mb-0",
76
77
  children: e
77
78
  }),
78
- cit: ({ children: e, ...t }) => /* @__PURE__ */ y(_, { children: [
79
+ cit: ({ children: e, ...t }) => /* @__PURE__ */ b(v, { children: [
79
80
  t["data-id"] == null ? "<cit>" : `<cit data-id="${t["data-id"]}">`,
80
81
  e,
81
82
  "</cit>"
82
83
  ] })
83
- }, R = (e) => {
84
+ }, B = (e) => {
84
85
  let t = e?.properties?.className;
85
86
  return !Array.isArray(t) || !t.includes("katex") ? !1 : (e?.children ?? []).some((e) => e.type === "element" && e.tagName === "math" && e.properties?.display === "block");
86
- }, z = {
87
+ }, V = {
87
88
  left: "text-start",
88
89
  center: "text-center",
89
90
  right: "text-end"
90
- }, B = (e) => {
91
+ }, H = (e) => {
91
92
  let t = e?.properties?.align;
92
- return typeof t == "string" ? z[t] : void 0;
93
- }, V = (e) => e ? e.type === "text" ? e.value ?? "" : (e.children ?? []).map(V).join("") : "", H = (t, { isStreaming: n, codeBlockCopyLabel: r, codeBlockCopiedLabel: a, codeBlockDownloadLabel: d, codeBlockTheme: f, tableActionLabels: p, tableDownloadFilename: m, tableOnOpenInCanvas: h, tableScrollRegionAriaLabel: g, mathScrollRegionAriaLabel: y }) => ({
94
- h1: ({ children: e }) => /* @__PURE__ */ v("h1", {
93
+ return typeof t == "string" ? V[t] : void 0;
94
+ }, U = (e) => e ? e.type === "text" ? e.value ?? "" : (e.children ?? []).map(U).join("") : "", W = (t, { isStreaming: n, codeBlockCopyLabel: r, codeBlockCopiedLabel: i, codeBlockDownloadLabel: o, codeBlockTheme: f, tableActionLabels: p, tableDownloadFilename: m, tableOnOpenInCanvas: h, tableScrollRegionAriaLabel: g, mathScrollRegionAriaLabel: _, codeBlockScrollRegionAriaLabel: b }) => ({
95
+ h1: ({ children: e }) => /* @__PURE__ */ y("h1", {
95
96
  className: t.h1,
96
97
  children: e
97
98
  }),
98
- h2: ({ children: e }) => /* @__PURE__ */ v("h2", {
99
+ h2: ({ children: e }) => /* @__PURE__ */ y("h2", {
99
100
  className: t.h2,
100
101
  children: e
101
102
  }),
102
- h3: ({ children: e }) => /* @__PURE__ */ v("h3", {
103
+ h3: ({ children: e }) => /* @__PURE__ */ y("h3", {
103
104
  className: t.h3,
104
105
  children: e
105
106
  }),
106
- h4: ({ children: e }) => /* @__PURE__ */ v("h4", {
107
+ h4: ({ children: e }) => /* @__PURE__ */ y("h4", {
107
108
  className: t.h4,
108
109
  children: e
109
110
  }),
110
- h5: ({ children: e }) => /* @__PURE__ */ v("h5", {
111
+ h5: ({ children: e }) => /* @__PURE__ */ y("h5", {
111
112
  className: t.h5,
112
113
  children: e
113
114
  }),
114
- h6: ({ children: n }) => /* @__PURE__ */ v("h6", {
115
- className: e(o.h6, t.h6),
115
+ h6: ({ children: n }) => /* @__PURE__ */ y("h6", {
116
+ className: e(s.h6, t.h6),
116
117
  children: n
117
118
  }),
118
- p: ({ children: n }) => /* @__PURE__ */ v("p", {
119
- className: e("break-words", t.p),
119
+ p: ({ children: n }) => /* @__PURE__ */ y("p", {
120
+ className: e("wrap-break-word", t.p),
120
121
  children: n
121
122
  }),
122
- ul: ({ children: n }) => /* @__PURE__ */ v("ul", {
123
+ ul: ({ children: n }) => /* @__PURE__ */ y("ul", {
123
124
  className: e("list-disc ps-[2em]", t.ul),
124
125
  children: n
125
126
  }),
126
- ol: ({ children: n }) => /* @__PURE__ */ v("ol", {
127
+ ol: ({ children: n }) => /* @__PURE__ */ y("ol", {
127
128
  className: e("list-decimal ps-[2em]", t.ol),
128
129
  children: n
129
130
  }),
130
- strong: ({ children: e }) => /* @__PURE__ */ v("strong", {
131
+ strong: ({ children: e }) => /* @__PURE__ */ y("strong", {
131
132
  className: t.strong ?? "dial-body-paragraph-semi-text",
132
133
  children: e
133
134
  }),
134
- em: ({ children: e }) => /* @__PURE__ */ v("em", {
135
+ em: ({ children: e }) => /* @__PURE__ */ y("em", {
135
136
  className: t.em ?? "italic",
136
137
  children: e
137
138
  }),
138
- pre: ({ children: e }) => /* @__PURE__ */ v(_, { children: e }),
139
- code: ({ children: s, className: c }) => {
140
- let l = /language-(\w+)/.exec(c ?? "")?.[1] ?? "", u = String(s);
141
- return l || u.includes("\n") ? /* @__PURE__ */ v(i, {
142
- language: l,
143
- value: u.replace(/\n$/, ""),
139
+ pre: ({ children: e }) => /* @__PURE__ */ y(v, { children: e }),
140
+ code: ({ children: c, className: l }) => {
141
+ let u = /language-(\w+)/.exec(l ?? "")?.[1] ?? "", d = String(c);
142
+ return u || d.includes("\n") ? /* @__PURE__ */ y(a, {
143
+ language: u,
144
+ value: d.replace(/\n$/, ""),
144
145
  isStreaming: n,
145
146
  theme: f,
146
147
  copyLabel: r,
147
- copiedLabel: a,
148
- downloadLabel: d,
148
+ copiedLabel: i,
149
+ downloadLabel: o,
150
+ scrollRegionAriaLabel: b,
149
151
  containerClassName: t.codeBlockContainer,
150
152
  headerClassName: t.codeBlockHeader,
151
153
  codeClassName: t.codeFont
152
- }) : /* @__PURE__ */ v("code", {
153
- className: e("rounded px-1 py-0.5", o.codeInline, t.codeInlineFont ?? "dial-code-text", t.codeInline),
154
- children: s
154
+ }) : /* @__PURE__ */ y("code", {
155
+ className: e("rounded px-1 py-0.5", s.codeInline, t.codeInlineFont ?? "dial-code-text", t.codeInline),
156
+ children: c
155
157
  });
156
158
  },
157
- blockquote: ({ children: n }) => /* @__PURE__ */ v("blockquote", {
158
- className: e("border-s-2 py-1 ps-4", o.blockquote, t.blockquote),
159
+ blockquote: ({ children: n }) => /* @__PURE__ */ y("blockquote", {
160
+ className: e("border-s-2 py-1 ps-4", s.blockquote, t.blockquote),
159
161
  children: n
160
162
  }),
161
- a: ({ href: n, children: r }) => /* @__PURE__ */ v("a", {
163
+ a: ({ href: n, children: r }) => /* @__PURE__ */ y("a", {
162
164
  href: n,
163
165
  target: "_blank",
164
166
  rel: "noopener noreferrer",
165
- className: e("decoration-current/60 break-words underline underline-offset-2 hover:decoration-current focus-visible:outline focus-visible:outline-1 focus-visible:outline-offset-2", o.link, t.link),
167
+ className: e("wrap-break-word underline decoration-current/60 underline-offset-2 hover:decoration-current focus-visible:outline-1 focus-visible:outline-offset-2", s.link, t.link),
166
168
  children: r
167
169
  }),
168
- hr: () => /* @__PURE__ */ v("hr", { className: e("my-5 border-t", o.secondaryBorder, t.hr) }),
169
- del: ({ children: n }) => /* @__PURE__ */ v("del", {
170
+ hr: () => /* @__PURE__ */ y("hr", { className: e("my-5 border-t", s.secondaryBorder, t.hr) }),
171
+ del: ({ children: n }) => /* @__PURE__ */ y("del", {
170
172
  className: e("opacity-75", t.del),
171
173
  children: n
172
174
  }),
173
- input: ({ type: e, checked: t }) => e === "checkbox" ? /* @__PURE__ */ v(u, { checked: t ?? !1 }) : null,
174
- span: ({ children: e, node: n, ...r }) => R(n) ? /* @__PURE__ */ v(s, {
175
+ input: ({ type: e, checked: t }) => e === "checkbox" ? /* @__PURE__ */ y(d, { checked: t ?? !1 }) : null,
176
+ span: ({ children: e, node: n, ...r }) => B(n) ? /* @__PURE__ */ y(c, {
175
177
  className: t.mathBlock,
176
- scrollRegionAriaLabel: y,
178
+ scrollRegionAriaLabel: _,
177
179
  children: e
178
- }) : /* @__PURE__ */ v("span", {
180
+ }) : /* @__PURE__ */ y("span", {
179
181
  ...r,
180
182
  children: e
181
183
  }),
182
- table: ({ children: e }) => /* @__PURE__ */ v(l, {
184
+ table: ({ children: e }) => /* @__PURE__ */ y(u, {
183
185
  classNames: t,
184
186
  actionLabels: p,
185
187
  downloadFilename: m,
@@ -189,95 +191,103 @@ var D = [
189
191
  children: e
190
192
  }),
191
193
  tr: ({ children: t, node: n }) => {
192
- let r = n?.children.filter((e) => e.type === "element") ?? [], i = r.some((e) => e.tagName === "th"), a = r.filter((e) => V(e).trim().length > 0).length, o = !i && r.length > 1 && a === 1;
193
- return /* @__PURE__ */ v("tr", {
194
- className: e(c.row, o && c.sectionRow),
194
+ let r = n?.children.filter((e) => e.type === "element") ?? [], i = r.some((e) => e.tagName === "th"), a = r.filter((e) => U(e).trim().length > 0).length, o = !i && r.length > 1 && a === 1;
195
+ return /* @__PURE__ */ y("tr", {
196
+ className: e(l.row, o && l.sectionRow),
195
197
  children: t
196
198
  });
197
199
  },
198
- th: ({ children: n, node: r }) => /* @__PURE__ */ v("th", {
200
+ th: ({ children: n, node: r }) => /* @__PURE__ */ y("th", {
199
201
  scope: "col",
200
- className: e("sticky top-0 z-[2] max-w-96 whitespace-normal break-words px-3 py-2.5 text-start", B(r), c.rowDivider, c.tableHeaderCell, t.tableHeaderFont ?? "dial-tiny-lead-semi-text", t.tableCell, t.tableHeader),
202
+ className: e("sticky top-0 z-2 max-w-96 px-3 py-2.5 text-start wrap-break-word whitespace-normal", H(r), l.rowDivider, l.tableHeaderCell, t.tableHeaderFont ?? "dial-tiny-lead-semi-text", t.tableCell, t.tableHeader),
201
203
  children: n
202
204
  }),
203
- td: ({ children: n, node: r }) => /* @__PURE__ */ v("td", {
204
- className: e("max-w-96 whitespace-normal px-3 py-[7px] align-top [overflow-wrap:anywhere]", B(r), c.rowDivider, t.tableBodyCell, t.tableCell),
205
+ td: ({ children: n, node: r }) => /* @__PURE__ */ y("td", {
206
+ className: e("max-w-96 px-3 py-[7px] align-top wrap-anywhere whitespace-normal", H(r), l.rowDivider, t.tableBodyCell, t.tableCell),
205
207
  children: n
206
208
  })
207
- }), U = p(({ content: e, containerClassName: i, isStreaming: o, streamCharactersPerSecond: s, classNames: c = F, components: l, urlTransform: u, rehypePlugins: f = M, thinkingLabel: p = "Thinking", codeBlockCopyLabel: _, codeBlockCopiedLabel: y, codeBlockDownloadLabel: x, codeBlockTheme: S, colors: C, tableActionLabels: w, tableDownloadFilename: T, tableOnOpenInCanvas: E, tableScrollRegionAriaLabel: O, mathScrollRegionAriaLabel: k }) => {
208
- let N = n(e, o, s), R = h(() => r(N), [N]), z = h(() => P(R), [R]), [B, V] = g(null);
209
- m(() => {
210
- if (!z || B) return;
209
+ }), G = m(({ content: i, containerClassName: a, isStreaming: s, streamCharactersPerSecond: c, classNames: l = L, components: u, urlTransform: d, rehypePlugins: p = P, isRawHtmlEnabled: m = !0, thinkingLabel: v = "Thinking", codeBlockCopyLabel: b, codeBlockCopiedLabel: S, codeBlockDownloadLabel: C, codeBlockTheme: w, colors: T, tableActionLabels: E, tableDownloadFilename: D, tableOnOpenInCanvas: k, tableScrollRegionAriaLabel: A, mathScrollRegionAriaLabel: F, codeBlockScrollRegionAriaLabel: B }) => {
210
+ let V = n(i, s, c), H = g(() => r(V), [V]), U = g(() => I(H), [H]), [G, K] = _(null);
211
+ h(() => {
212
+ if (!U || G) return;
211
213
  let e = !1;
212
214
  return (async () => {
213
215
  let [t] = await Promise.all([import("rehype-katex"), import("katex/dist/katex.min.css")]);
214
- e || V([t.default, {
216
+ e || K([t.default, {
215
217
  output: "mathml",
216
218
  strict: !1
217
219
  }]);
218
220
  })(), () => {
219
221
  e = !0;
220
222
  };
221
- }, [z, B]);
222
- let U = h(() => [
223
- ...A,
224
- ...B ? [B] : [],
225
- j,
226
- a,
227
- ...f
228
- ], [B, f]), W = t({
229
- "--cm-markdown-border": C?.border,
230
- "--cm-blockquote-border": C?.blockquoteBorder,
231
- "--cm-blockquote-text": C?.blockquoteText,
232
- "--cm-link-text": C?.linkText,
233
- "--cm-link-focus": C?.linkFocus,
234
- "--cm-table-header-text": C?.tableHeaderText,
235
- "--cm-h6-text": C?.headingSixText,
236
- "--cm-code-inline-bg": C?.inlineCodeBackground,
237
- "--cm-code-inline-text": C?.inlineCodeText
238
- }), G = h(() => I(u), [u]), K = h(() => ({
239
- ...H(c, {
240
- isStreaming: o,
241
- codeBlockCopyLabel: _,
242
- codeBlockCopiedLabel: y,
243
- codeBlockDownloadLabel: x,
244
- codeBlockTheme: S,
245
- tableActionLabels: w,
246
- tableDownloadFilename: T,
247
- tableOnOpenInCanvas: E,
248
- tableScrollRegionAriaLabel: O,
249
- mathScrollRegionAriaLabel: k
223
+ }, [U, G]);
224
+ let q = g(() => [
225
+ ...m ? j : M,
226
+ ...G ? [G] : [],
227
+ N,
228
+ o,
229
+ ...p
230
+ ], [
231
+ m,
232
+ G,
233
+ p
234
+ ]), J = t({
235
+ "--cm-markdown-border": T?.border,
236
+ "--cm-blockquote-border": T?.blockquoteBorder,
237
+ "--cm-blockquote-text": T?.blockquoteText,
238
+ "--cm-link-text": T?.linkText,
239
+ "--cm-link-focus": T?.linkFocus,
240
+ "--cm-table-header-text": T?.tableHeaderText,
241
+ "--cm-h6-text": T?.headingSixText,
242
+ "--cm-code-inline-bg": T?.inlineCodeBackground,
243
+ "--cm-code-inline-text": T?.inlineCodeText,
244
+ "--cm-math-scrollbar": T?.mathScrollbar,
245
+ "--cm-math-focus": T?.mathFocus
246
+ }), Y = g(() => R(d), [d]), X = g(() => ({
247
+ ...W(l, {
248
+ isStreaming: s,
249
+ codeBlockCopyLabel: b,
250
+ codeBlockCopiedLabel: S,
251
+ codeBlockDownloadLabel: C,
252
+ codeBlockTheme: w,
253
+ tableActionLabels: E,
254
+ tableDownloadFilename: D,
255
+ tableOnOpenInCanvas: k,
256
+ tableScrollRegionAriaLabel: A,
257
+ mathScrollRegionAriaLabel: F,
258
+ codeBlockScrollRegionAriaLabel: B
250
259
  }),
251
- ...L,
252
- ...l
260
+ ...z,
261
+ ...u
253
262
  }), [
254
- c,
255
- o,
256
- _,
257
- y,
258
- x,
263
+ l,
264
+ s,
265
+ b,
259
266
  S,
267
+ C,
260
268
  w,
261
- T,
262
269
  E,
263
- O,
270
+ D,
264
271
  k,
265
- l
272
+ A,
273
+ F,
274
+ B,
275
+ u
266
276
  ]);
267
- return o && !N ? /* @__PURE__ */ v(d, {
268
- label: p,
269
- colors: C
270
- }) : /* @__PURE__ */ v("div", {
271
- style: W,
272
- className: i,
273
- children: /* @__PURE__ */ v(b, {
274
- remarkPlugins: D,
275
- rehypePlugins: U,
276
- components: K,
277
- urlTransform: G,
278
- children: R
277
+ return s && !V ? /* @__PURE__ */ y(f, {
278
+ label: v,
279
+ colors: T
280
+ }) : /* @__PURE__ */ y("div", {
281
+ style: J,
282
+ className: e("wrap-anywhere", a),
283
+ children: /* @__PURE__ */ y(x, {
284
+ remarkPlugins: O,
285
+ rehypePlugins: q,
286
+ components: X,
287
+ urlTransform: Y,
288
+ children: H
279
289
  })
280
290
  });
281
291
  });
282
292
  //#endregion
283
- export { U as MarkdownRenderer, L as defaultMarkdownComponents };
293
+ export { G as MarkdownRenderer, z as defaultMarkdownComponents };
@@ -1,11 +1,12 @@
1
- var e = {
2
- thinking: "_thinking_1ql91_9",
1
+ //#region src/components/MarkdownRenderer/MarkdownRenderer.module.scss
2
+ var e = "_thinking_1ql91_9", t = "_h6_1ql91_18", n = "_codeInline_1ql91_22", r = "_secondaryBorder_1ql91_27", i = "_blockquote_1ql91_31", a = "_link_1ql91_36", o = {
3
+ thinking: e,
3
4
  "cm-shimmer": "_cm-shimmer_1ql91_1",
4
- h6: "_h6_1ql91_18",
5
- codeInline: "_codeInline_1ql91_22",
6
- secondaryBorder: "_secondaryBorder_1ql91_27",
7
- blockquote: "_blockquote_1ql91_31",
8
- link: "_link_1ql91_36"
5
+ h6: t,
6
+ codeInline: n,
7
+ secondaryBorder: r,
8
+ blockquote: i,
9
+ link: a
9
10
  };
10
11
  //#endregion
11
- export { e as default };
12
+ export { i as blockquote, n as codeInline, o as default, t as h6, a as link, r as secondaryBorder, e as thinking };
@@ -0,0 +1,18 @@
1
+ import { FC, ReactNode } from 'react';
2
+ /** Props for {@link MarkdownMathBlock}. */
3
+ export interface MarkdownMathBlockProps {
4
+ /** Rendered KaTeX output — the `<math display="block">` element and its subtree. */
5
+ children: ReactNode;
6
+ /** Extra classes on the scroll container. */
7
+ className?: string;
8
+ /** Accessible label for the horizontally scrollable region. Defaults to `'Scrollable formula'`. */
9
+ scrollRegionAriaLabel?: string;
10
+ }
11
+ /**
12
+ * Wraps KaTeX display math in a horizontally scrollable region so a formula
13
+ * wider than the message column stays reachable instead of being clipped.
14
+ * The region only becomes a labelled, keyboard-focusable landmark while it
15
+ * actually overflows, so ordinary formulas add no tab stop or noise.
16
+ */
17
+ export declare const MarkdownMathBlock: FC<MarkdownMathBlockProps>;
18
+ //# sourceMappingURL=MarkdownMathBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownMathBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/Math/MarkdownMathBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAQ,MAAM,OAAO,CAAC;AAMtD,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACrC,oFAAoF;IACpF,QAAQ,EAAE,SAAS,CAAC;IACpB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mGAAmG;IACnG,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAqCxD,CAAC"}
@@ -9,7 +9,7 @@ var o = i(({ children: i, className: o, scrollRegionAriaLabel: s = "Scrollable f
9
9
  let { scrollContainerRef: c, contentRef: l, hasContentBeyondStart: u, hasContentBeyondEnd: d, handleScroll: f } = n(), p = u || d;
10
10
  return /* @__PURE__ */ a("div", {
11
11
  ref: c,
12
- className: e("w-full min-w-0 max-w-full overflow-x-auto overflow-y-hidden", r.scrollContainer, o, t.mathBlock),
12
+ className: e("w-full max-w-full min-w-0 overflow-x-auto overflow-y-hidden", r.scrollContainer, o, t.mathBlock),
13
13
  onScroll: f,
14
14
  role: p ? "region" : void 0,
15
15
  "aria-label": p ? s : void 0,
@@ -1,6 +1,7 @@
1
- var e = {
2
- scrollContainer: "_scrollContainer_n2oom_1",
3
- mathContent: "_mathContent_n2oom_24"
1
+ //#region src/components/MarkdownRenderer/Math/MarkdownMathBlock.module.scss
2
+ var e = "_scrollContainer_n2oom_1", t = "_mathContent_n2oom_24", n = {
3
+ scrollContainer: e,
4
+ mathContent: t
4
5
  };
5
6
  //#endregion
6
- export { e as default };
7
+ export { n as default, t as mathContent, e as scrollContainer };
@@ -0,0 +1,39 @@
1
+ import { FC } from 'react';
2
+ import { MarkdownRendererClassNames, MarkdownRendererColors } from './MarkdownRenderer';
3
+ /** Props for {@link PlainTextRenderer}. */
4
+ export interface PlainTextRendererProps {
5
+ /** Message text. Rendered verbatim — never parsed as Markdown or HTML. */
6
+ content: string;
7
+ /** Classes applied to the renderer root. */
8
+ containerClassName?: string;
9
+ /** When true, appended content is revealed gradually for smoother streaming updates. */
10
+ isStreaming?: boolean;
11
+ /** Reveal speed used while `isStreaming` is true. Defaults to 120 characters per second. */
12
+ streamCharactersPerSecond?: number;
13
+ /**
14
+ * Typography classes. Only `p` is read — the single paragraph the renderer
15
+ * emits — so the same object a Markdown message is styled with keeps both
16
+ * formats on one type scale.
17
+ */
18
+ classNames?: Pick<MarkdownRendererClassNames, 'p'>;
19
+ /**
20
+ * Label shown with a shimmer animation while `isStreaming` is true and no
21
+ * content has arrived yet. Defaults to `'Thinking'`.
22
+ */
23
+ thinkingLabel?: string;
24
+ /** Color overrides applied as CSS custom properties. */
25
+ colors?: Pick<MarkdownRendererColors, 'thinkingPrimary' | 'thinkingSecondary'>;
26
+ }
27
+ /**
28
+ * Renders message text as plain text: no Markdown pipeline, no raw HTML, no
29
+ * syntax highlighting. The text is a React text child, so it is escaped by
30
+ * construction — a table, a heading, or `**bold**` reaches the reader exactly
31
+ * as the model emitted it, which is what a conversation's `plain_text`
32
+ * response format promises.
33
+ *
34
+ * Lives beside {@link MarkdownRenderer} because it is the other half of the
35
+ * same choice: both render an assistant message body, and both are selected
36
+ * by `MDMessageViewer` from the conversation's response format.
37
+ */
38
+ export declare const PlainTextRenderer: FC<PlainTextRendererProps>;
39
+ //# sourceMappingURL=PlainTextRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlainTextRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/PlainTextRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,KAAK,EACV,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAG5B,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACrC,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wFAAwF;IACxF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4FAA4F;IAC5F,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;;;OAIG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,0BAA0B,EAAE,GAAG,CAAC,CAAC;IACnD;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,MAAM,CAAC,EAAE,IAAI,CACX,sBAAsB,EACtB,iBAAiB,GAAG,mBAAmB,CACxC,CAAC;CACH;AAKD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAuCxD,CAAC"}
@@ -12,7 +12,7 @@ var a = {}, o = r(({ content: r, containerClassName: o, isStreaming: s, streamCh
12
12
  }) : /* @__PURE__ */ i("div", {
13
13
  className: o,
14
14
  children: /* @__PURE__ */ i("p", {
15
- className: e(l.p, "whitespace-pre-wrap break-words [overflow-wrap:anywhere]"),
15
+ className: e(l.p, "wrap-anywhere whitespace-pre-wrap"),
16
16
  children: f
17
17
  })
18
18
  });
@@ -0,0 +1,51 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { MarkdownTableActionLabels } from './table-serialization';
3
+ export { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, MARKDOWN_TABLE_CSV_MIME_TYPE, MarkdownTableCopyFormat, serializeMarkdownTableRows, type MarkdownTableActionLabels, } from './table-serialization';
4
+ export type { MarkdownTableHeaderAction } from './useMarkdownTableActions/useMarkdownTableActions';
5
+ /** Per-element className overrides for {@link MarkdownTable}. */
6
+ export interface MarkdownTableClassNames {
7
+ /** Extra classes on the outer table wrapper. */
8
+ tableWrapper?: string;
9
+ /** Typography class for the table. Defaults to `'dial-small-text'`. */
10
+ tableFont?: string;
11
+ /** Extra classes on the scrollable table region. */
12
+ tableScrollContainer?: string;
13
+ }
14
+ /** CSS custom-property overrides for the `MarkdownTable` component. */
15
+ export interface MarkdownTableColors {
16
+ /** Scroll container border color. */
17
+ border?: string;
18
+ /** Scrollbar thumb/track color. */
19
+ scrollbar?: string;
20
+ /** Edge-fade mask color; only its alpha is used. Defaults to `--stroke-focus-black`. */
21
+ fade?: string;
22
+ /** Divider color between rows. Defaults to `--stroke-tertiary`. */
23
+ rowDivider?: string;
24
+ /** Background of a body row on hover. Defaults to `--bg-control-accent-alpha-hover`. */
25
+ rowHoverBackground?: string;
26
+ /** Border color of the copy/download actions toolbar. Defaults to `--stroke-tertiary`. */
27
+ actionsBorder?: string;
28
+ /** Background of the copy/download actions toolbar. Defaults to `--bg-layer-raised`. */
29
+ actionsBackground?: string;
30
+ }
31
+ /** Props for {@link MarkdownTable}. */
32
+ export interface MarkdownTableProps {
33
+ /** Table body/children rendered inside the scrollable wrapper (typically `<thead>`/`<tbody>` from react-markdown). */
34
+ children: ReactNode;
35
+ /** Per-element className overrides. */
36
+ classNames: MarkdownTableClassNames;
37
+ /** Color overrides applied as CSS custom properties. */
38
+ colors?: MarkdownTableColors;
39
+ /** Localized labels for table actions. Supplying them enables the action bar. */
40
+ actionLabels?: MarkdownTableActionLabels;
41
+ /** Filename used when downloading the table as CSV. Defaults to `'table.csv'`. */
42
+ downloadFilename?: string;
43
+ /** When true, table actions are hidden while content is still arriving. */
44
+ isStreaming?: boolean;
45
+ onOpenInCanvas?: (markdown: string) => void;
46
+ /** Accessible label for the horizontally scrollable region. Defaults to `'Scrollable table'`. */
47
+ scrollRegionAriaLabel?: string;
48
+ }
49
+ /** Renders a responsive Markdown table with an end fade while more columns are available. */
50
+ export declare const MarkdownTable: FC<MarkdownTableProps>;
51
+ //# sourceMappingURL=MarkdownTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownTable.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/Table/MarkdownTable.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,EAAE,EACP,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAQf,OAAO,EAKL,KAAK,yBAAyB,EAC/B,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,wCAAwC,EACxC,4BAA4B,EAC5B,uBAAuB,EACvB,0BAA0B,EAC1B,KAAK,yBAAyB,GAC/B,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,yBAAyB,EAAE,MAAM,mDAAmD,CAAC;AAEnG,iEAAiE;AACjE,MAAM,WAAW,uBAAuB;IACtC,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,uEAAuE;AACvE,MAAM,WAAW,mBAAmB;IAClC,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wFAAwF;IACxF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wFAAwF;IACxF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC,sHAAsH;IACtH,QAAQ,EAAE,SAAS,CAAC;IACpB,uCAAuC;IACvC,UAAU,EAAE,uBAAuB,CAAC;IACpC,wDAAwD;IACxD,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,iFAAiF;IACjF,YAAY,CAAC,EAAE,yBAAyB,CAAC;IACzC,kFAAkF;IAClF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2EAA2E;IAC3E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,iGAAiG;IACjG,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAID,6FAA6F;AAC7F,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAoKhD,CAAC"}