@epam/ai-dial-chat-shared 1.3.0-dev.34 → 1.3.0-dev.343

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 +328 -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 +82 -78
  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 +33 -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
@@ -7,100 +7,100 @@ import { CHAT_SHARED_CLASS as o } from "../../../constants/public-class-names.js
7
7
  import { useCodeCopy as s } from "../../../hooks/useCodeCopy.js";
8
8
  import c from "./CodeBlock.module.scss.js";
9
9
  import { restrainedSyntaxTheme as l } from "./syntax-theme.js";
10
- import { DIAL_ICON_SIZE as u, DIAL_KIT_ICON_STROKE as d, ElementSize as f, GhostIconButton as p } from "@epam/ai-dial-ui-kit";
11
- import { Suspense as m, lazy as h, memo as g, useMemo as _ } from "react";
12
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
13
- import { IconCheck as b, IconCopy as x, IconDownload as S } from "@tabler/icons-react";
10
+ import { DIAL_ICON_SIZE as u, DIAL_KIT_ICON_STROKE as d, ElementSize as f, GhostIconButton as p, LiveRegion as m, LiveRegionElement as h } from "@epam/ai-dial-ui-kit";
11
+ import { Suspense as g, lazy as _, memo as v, useMemo as y } from "react";
12
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
13
+ import { IconCheck as S, IconCopy as C, IconDownload as w } from "@tabler/icons-react";
14
14
  //#region src/components/MarkdownRenderer/CodeBlock/CodeBlock.tsx
15
- var C = {
15
+ var T = {
16
16
  dark: l,
17
17
  light: l
18
- }, w = h(async () => {
18
+ }, E = _(async () => {
19
19
  let { Prism: e } = await import("react-syntax-highlighter");
20
20
  return { default: e };
21
- }), T = g(({ language: h, value: g, isStreaming: T, theme: E = e.Dark, copyLabel: D = "Copy code", copiedLabel: O = "Copied!", downloadLabel: k = "Download code", hideDownload: A = !1, containerClassName: j, headerClassName: M, codeClassName: N = "dial-code-text", languageLabelClassName: P = "dial-tiny-lead-semi-text", title: F, titleSlot: I, colors: L }) => {
22
- let { isCopied: R, copy: z } = s(g), B = _(() => a(g), [g]), V = E === e.Light, H = () => {
23
- r(g, `code.${i(h)}`);
24
- }, U = /* @__PURE__ */ v("pre", {
25
- className: "p-4",
26
- children: /* @__PURE__ */ v("code", {
27
- className: t("whitespace-pre", N),
28
- children: g
21
+ }), D = v(({ language: _, value: v, isStreaming: D, theme: O = e.Dark, copyLabel: k = "Copy code", copiedLabel: A = "Copied!", downloadLabel: j = "Download code", scrollRegionAriaLabel: M = "Scrollable code", hideDownload: N = !1, hasContentTopPadding: P = !0, containerClassName: F, headerClassName: I, codeClassName: L = "dial-code-text", languageLabelClassName: R = "dial-tiny-lead-semi-text", title: z, titleSlot: B, colors: V }) => {
22
+ let { isCopied: H, copy: U } = s(v), W = y(() => a(v), [v]), G = O === e.Light, K = () => {
23
+ r(v, `code.${i(_)}`);
24
+ }, q = /* @__PURE__ */ b("pre", {
25
+ className: P ? "p-4" : "px-4 pt-0 pb-4",
26
+ children: /* @__PURE__ */ b("code", {
27
+ className: t("whitespace-pre", L),
28
+ children: v
29
29
  })
30
+ }), J = n({
31
+ "--cm-code-block-bg": V?.background,
32
+ "--cm-code-block-border": V?.border,
33
+ "--cm-code-block-header-bg": V?.headerBackground,
34
+ "--cm-code-block-language": V?.language,
35
+ "--cm-code-block-copied": V?.copied,
36
+ "--cm-code-block-scrollbar": V?.scrollbar
30
37
  });
31
- return /* @__PURE__ */ y("div", {
32
- style: n({
33
- "--cm-code-block-bg": L?.background,
34
- "--cm-code-block-border": L?.border,
35
- "--cm-code-block-header-bg": L?.headerBackground,
36
- "--cm-code-block-language": L?.language,
37
- "--cm-code-block-copied": L?.copied,
38
- "--cm-code-block-scrollbar": L?.scrollbar
39
- }),
40
- className: t("my-4 max-w-full rounded-xl border [overflow:clip]", c.container, V && c.containerLight, j, o.codeBlock),
38
+ return /* @__PURE__ */ x("div", {
39
+ style: J,
40
+ className: t("my-4 max-w-full overflow-clip rounded-xl border", c.container, G && c.containerLight, F, o.codeBlock),
41
41
  children: [
42
- /* @__PURE__ */ y("div", {
43
- className: t("sticky top-0 z-10 flex min-h-10 items-center justify-between px-4", I == null ? "py-2" : "py-0", c.header, M, o.codeBlockHeader),
44
- children: [I ?? /* @__PURE__ */ v("span", {
45
- className: t(c.languageLabel, P),
46
- children: F ?? h
47
- }), !T && /* @__PURE__ */ y("div", {
42
+ /* @__PURE__ */ x("div", {
43
+ className: t("sticky top-0 z-10 flex min-h-10 items-center justify-between px-4", B == null ? "py-2" : "py-0", c.header, I, o.codeBlockHeader),
44
+ children: [B ?? /* @__PURE__ */ b("span", {
45
+ className: t(c.languageLabel, R),
46
+ children: z ?? _
47
+ }), !D && /* @__PURE__ */ x("div", {
48
48
  className: "flex items-center gap-1",
49
- children: [!A && /* @__PURE__ */ v(p, {
50
- icon: /* @__PURE__ */ v(S, {
49
+ children: [!N && /* @__PURE__ */ b(p, {
50
+ icon: /* @__PURE__ */ b(w, {
51
51
  size: u.SM,
52
52
  stroke: d
53
53
  }),
54
- "aria-label": k,
54
+ "aria-label": j,
55
55
  size: f.Small,
56
- onClick: H
57
- }), /* @__PURE__ */ v(p, {
58
- icon: R ? /* @__PURE__ */ v(b, {
56
+ onClick: K
57
+ }), /* @__PURE__ */ b(p, {
58
+ icon: H ? /* @__PURE__ */ b(S, {
59
59
  size: u.SM,
60
60
  className: c.copiedIcon,
61
61
  "aria-hidden": !0,
62
62
  stroke: d
63
- }) : /* @__PURE__ */ v(x, {
63
+ }) : /* @__PURE__ */ b(C, {
64
64
  size: u.SM,
65
65
  "aria-hidden": !0,
66
66
  stroke: d
67
67
  }),
68
- "aria-label": D,
68
+ "aria-label": k,
69
69
  size: f.Small,
70
- onClick: z
70
+ onClick: U
71
71
  })]
72
72
  })]
73
73
  }),
74
- /* @__PURE__ */ v("div", {
74
+ /* @__PURE__ */ b("div", {
75
75
  className: t(c.scrollContainer, "max-h-[60vh] overflow-auto"),
76
76
  dir: "ltr",
77
- children: h && B ? /* @__PURE__ */ v(m, {
78
- fallback: U,
79
- children: /* @__PURE__ */ v(w, {
80
- language: h,
81
- style: C[E] ?? l,
77
+ role: "region",
78
+ "aria-label": M,
79
+ tabIndex: 0,
80
+ children: _ && W ? /* @__PURE__ */ b(g, {
81
+ fallback: q,
82
+ children: /* @__PURE__ */ b(E, {
83
+ language: _,
84
+ style: T[O] ?? l,
82
85
  customStyle: {
83
86
  margin: 0,
84
87
  borderRadius: 0,
85
88
  background: "transparent",
86
- fontSize: 14,
87
- lineHeight: 1.5,
88
- padding: "14px 16px",
89
- letterSpacing: 0
89
+ padding: P ? "14px 16px" : "0 16px 14px"
90
90
  },
91
- codeTagProps: { className: N },
92
- children: g
91
+ className: L,
92
+ codeTagProps: { className: L },
93
+ children: v
93
94
  })
94
- }) : U
95
+ }) : q
95
96
  }),
96
- /* @__PURE__ */ v("span", {
97
- role: "status",
98
- "aria-live": "polite",
99
- className: "sr-only",
100
- children: R ? O : ""
97
+ /* @__PURE__ */ b(m, {
98
+ visuallyHidden: !0,
99
+ as: h.Span,
100
+ children: H ? A : ""
101
101
  })
102
102
  ]
103
103
  });
104
104
  });
105
105
  //#endregion
106
- export { T as MarkdownCodeBlock };
106
+ export { D as MarkdownCodeBlock };
@@ -1,10 +1,11 @@
1
- var e = {
2
- container: "_container_sqe5k_1",
3
- containerLight: "_containerLight_sqe5k_6",
4
- header: "_header_sqe5k_10",
5
- languageLabel: "_languageLabel_sqe5k_15",
6
- copiedIcon: "_copiedIcon_sqe5k_19",
7
- scrollContainer: "_scrollContainer_sqe5k_23"
1
+ //#region src/components/MarkdownRenderer/CodeBlock/CodeBlock.module.scss
2
+ var e = "_container_sqe5k_1", t = "_containerLight_sqe5k_6", n = "_header_sqe5k_10", r = "_languageLabel_sqe5k_15", i = "_copiedIcon_sqe5k_19", a = "_scrollContainer_sqe5k_23", o = {
3
+ container: e,
4
+ containerLight: t,
5
+ header: n,
6
+ languageLabel: r,
7
+ copiedIcon: i,
8
+ scrollContainer: a
8
9
  };
9
10
  //#endregion
10
- export { e as default };
11
+ export { e as container, t as containerLight, i as copiedIcon, o as default, n as header, r as languageLabel, a as scrollContainer };
@@ -0,0 +1,7 @@
1
+ import { CSSProperties } from 'react';
2
+ /** Style map consumed by `react-syntax-highlighter`'s `Prism` renderer. */
3
+ type PrismStyleMap = Record<string, CSSProperties>;
4
+ /** Prism syntax-highlighting style map used by {@link MarkdownCodeBlock}, restrained to design-system CSS variables. */
5
+ export declare const restrainedSyntaxTheme: PrismStyleMap;
6
+ export {};
7
+ //# sourceMappingURL=syntax-theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syntax-theme.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/CodeBlock/syntax-theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,2EAA2E;AAC3E,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AASnD,wHAAwH;AACxH,eAAO,MAAM,qBAAqB,EAAE,aA6DnC,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { FC } from 'react';
2
+ import { Components, Options } from 'react-markdown';
3
+ import { CodeBlockTheme } from '../../types/code-editor';
4
+ import { MarkdownRendererClassNames } from './MarkdownRenderer';
5
+ import { MarkdownTableActionLabels } from './Table/MarkdownTable';
6
+ /** Props for the {@link MDMessageViewer} markdown renderer. */
7
+ interface MDMessageViewerProps {
8
+ /** Raw markdown string to render. */
9
+ content: string;
10
+ /**
11
+ * Renders `content` verbatim as escaped plain text instead of running the
12
+ * Markdown pipeline — the conversation's `plain_text` response format.
13
+ * Markdown-only props (`components`, `urlTransform`, the code-block and
14
+ * table labels) do not apply while it is set. Defaults to `false`.
15
+ */
16
+ isPlainText?: boolean;
17
+ /** Enables gradual reveal for appended streaming content. */
18
+ isStreaming?: boolean;
19
+ /**
20
+ * Label shown while `isStreaming` is true and no content has arrived yet.
21
+ * Forwarded to {@link MarkdownRenderer}. Defaults to `'Thinking'`.
22
+ */
23
+ thinkingLabel?: string;
24
+ /**
25
+ * Additional react-markdown component overrides merged on top of the
26
+ * built-in map. Use to inject custom React nodes (e.g. citation markers)
27
+ * into specific markdown elements without modifying the viewer directly.
28
+ */
29
+ components?: Components;
30
+ /**
31
+ * Rewrites `href` and `src` values before they are rendered. Forwarded to
32
+ * {@link MarkdownRenderer}. Defaults to no extra rewrite.
33
+ */
34
+ urlTransform?: (url: string) => string;
35
+ /** Extra rehype plugins forwarded to {@link MarkdownRenderer}. Defaults to none. */
36
+ rehypePlugins?: NonNullable<Options['rehypePlugins']>;
37
+ /** When `false`, raw HTML renders as literal text. Forwarded to {@link MarkdownRenderer}; defaults to `true`. */
38
+ isRawHtmlEnabled?: boolean;
39
+ /** Accessible label for the copy button in code blocks. Forwarded to {@link MarkdownRenderer}. */
40
+ codeBlockCopyLabel?: string;
41
+ /** Accessible label for the copy button after copying. Forwarded to {@link MarkdownRenderer}. */
42
+ codeBlockCopiedLabel?: string;
43
+ /** Accessible label for the code-block download button. Forwarded to {@link MarkdownRenderer}. */
44
+ codeBlockDownloadLabel?: string;
45
+ /** Syntax highlight color theme for code blocks. Forwarded to {@link MarkdownRenderer}. */
46
+ codeBlockTheme?: CodeBlockTheme;
47
+ /** Localized labels for Markdown table actions. Forwarded to {@link MarkdownRenderer}. */
48
+ tableActionLabels?: MarkdownTableActionLabels;
49
+ /** Filename used when downloading a Markdown table as CSV. Forwarded to {@link MarkdownRenderer}. */
50
+ tableDownloadFilename?: string;
51
+ tableOnOpenInCanvas?: (markdown: string) => void;
52
+ /** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}. */
53
+ tableScrollRegionAriaLabel?: string;
54
+ /** Accessible label for a block formula's scrollable region. Forwarded to {@link MarkdownRenderer}. */
55
+ mathScrollRegionAriaLabel?: string;
56
+ /**
57
+ * Per-element typography classes. Defaults to {@link DEFAULT_MARKDOWN_CLASS_NAMES};
58
+ * pass {@link COMPACT_MARKDOWN_CLASS_NAMES} for the smaller body scale. Give a
59
+ * stable reference: this component is memoised.
60
+ */
61
+ classNames?: MarkdownRendererClassNames;
62
+ }
63
+ /** Renders message content as formatted markdown, or as escaped plain text when `isPlainText` is set. */
64
+ export declare const MDMessageViewer: FC<MDMessageViewerProps>;
65
+ export {};
66
+ //# sourceMappingURL=MDMessageViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MDMessageViewer.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/MDMessageViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,E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CAAC;IACpC,uGAAuG;IACvG,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;;;OAIG;IACH,UAAU,CAAC,EAAE,0BAA0B,CAAC;CACzC;AAED,yGAAyG;AACzG,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAiDpD,CAAC"}
@@ -4,27 +4,29 @@ import { PlainTextRenderer as n } from "./PlainTextRenderer.js";
4
4
  import { memo as r } from "react";
5
5
  import { jsx as i } from "react/jsx-runtime";
6
6
  //#region src/components/MarkdownRenderer/MDMessageViewer.tsx
7
- var a = r(({ content: r, isPlainText: a, isStreaming: o, thinkingLabel: s, components: c, urlTransform: l, codeBlockCopyLabel: u, codeBlockCopiedLabel: d, codeBlockDownloadLabel: f, codeBlockTheme: p, tableActionLabels: m, tableDownloadFilename: h, tableOnOpenInCanvas: g, tableScrollRegionAriaLabel: _, mathScrollRegionAriaLabel: v, classNames: y = t }) => a ? /* @__PURE__ */ i(n, {
7
+ var a = r(({ content: r, isPlainText: a, isStreaming: o, thinkingLabel: s, components: c, urlTransform: l, rehypePlugins: u, isRawHtmlEnabled: d, codeBlockCopyLabel: f, codeBlockCopiedLabel: p, codeBlockDownloadLabel: m, codeBlockTheme: h, tableActionLabels: g, tableDownloadFilename: _, tableOnOpenInCanvas: v, tableScrollRegionAriaLabel: y, mathScrollRegionAriaLabel: b, classNames: x = t }) => a ? /* @__PURE__ */ i(n, {
8
8
  content: r,
9
9
  isStreaming: o,
10
10
  thinkingLabel: s,
11
- classNames: y
11
+ classNames: x
12
12
  }) : /* @__PURE__ */ i(e, {
13
13
  content: r,
14
14
  isStreaming: o,
15
15
  thinkingLabel: s,
16
16
  components: c,
17
17
  urlTransform: l,
18
- codeBlockCopyLabel: u,
19
- codeBlockCopiedLabel: d,
20
- codeBlockDownloadLabel: f,
21
- codeBlockTheme: p,
22
- tableActionLabels: m,
23
- tableDownloadFilename: h,
24
- tableOnOpenInCanvas: g,
25
- tableScrollRegionAriaLabel: _,
26
- mathScrollRegionAriaLabel: v,
27
- classNames: y
18
+ rehypePlugins: u,
19
+ isRawHtmlEnabled: d,
20
+ codeBlockCopyLabel: f,
21
+ codeBlockCopiedLabel: p,
22
+ codeBlockDownloadLabel: m,
23
+ codeBlockTheme: h,
24
+ tableActionLabels: g,
25
+ tableDownloadFilename: _,
26
+ tableOnOpenInCanvas: v,
27
+ tableScrollRegionAriaLabel: y,
28
+ mathScrollRegionAriaLabel: b,
29
+ classNames: x
28
30
  }));
29
31
  //#endregion
30
32
  export { a as MDMessageViewer };
@@ -0,0 +1,145 @@
1
+ import { FC } from 'react';
2
+ import { Components, Options } from 'react-markdown';
3
+ import { CodeBlockTheme } from '../../types/code-editor';
4
+ import { MarkdownTableActionLabels, MarkdownTableClassNames } from './Table/MarkdownTable';
5
+ /** Per-element className overrides passed to {@link MarkdownRenderer}. */
6
+ export interface MarkdownRendererClassNames extends MarkdownTableClassNames {
7
+ /** Class on `<h1>`. */
8
+ h1?: string;
9
+ /** Class on `<h2>`. */
10
+ h2?: string;
11
+ /** Class on `<h3>`. */
12
+ h3?: string;
13
+ /** Class on `<h4>`. */
14
+ h4?: string;
15
+ /** Class on `<h5>`. */
16
+ h5?: string;
17
+ /** Class on `<h6>`. */
18
+ h6?: string;
19
+ /** Classes on `<p>` elements. */
20
+ p?: string;
21
+ /** Extra classes on `<ul>` (base: `list-disc ps-[2em]`). */
22
+ ul?: string;
23
+ /** Extra classes on `<ol>` (base: `list-decimal ps-[2em]`). */
24
+ ol?: string;
25
+ /** Typography class for `<strong>`. Defaults to `'dial-body-paragraph-semi-text'` — the semibold step matching the default `p` class. */
26
+ strong?: string;
27
+ /** Typography class for `<em>`. Defaults to `'italic'`. */
28
+ em?: string;
29
+ /** Extra classes on the {@link MarkdownCodeBlock} outer container. */
30
+ codeBlockContainer?: string;
31
+ /** Extra classes on the {@link MarkdownCodeBlock} header bar. */
32
+ codeBlockHeader?: string;
33
+ /** Typography class for the `<code>` element inside a code block. Defaults to `'dial-code-text'`. */
34
+ codeFont?: string;
35
+ /** Extra classes on inline `<code>` (base: `rounded px-1 py-0.5`). */
36
+ codeInline?: string;
37
+ /** Typography class for inline `<code>`. Defaults to `'dial-code-text'`. */
38
+ codeInlineFont?: string;
39
+ /** Extra classes on `<blockquote>` (base uses a logical start border and padding). */
40
+ blockquote?: string;
41
+ /** Extra classes on `<a>` (base uses the accent text color and an offset underline). */
42
+ link?: string;
43
+ /** Extra classes on `<hr>` separators. */
44
+ hr?: string;
45
+ /** Extra classes on deleted text rendered by GFM. */
46
+ del?: string;
47
+ /** Extra classes on `<th>` and `<td>` (base includes borders, spacing, and text wrapping). */
48
+ tableCell?: string;
49
+ /** Extra classes on `<td>` only (applied before `tableCell`, e.g. a body-cell background). */
50
+ tableBodyCell?: string;
51
+ /** Extra classes on `<th>` only (applied alongside `tableCell`). */
52
+ tableHeader?: string;
53
+ /** Typography class for `<th>` cells. Defaults to `'dial-tiny-lead-semi-text'`. Text color is set separately via `colors.tableHeaderText`. */
54
+ tableHeaderFont?: string;
55
+ /** Extra classes on the scrollable wrapper around block (display) LaTeX formulas. */
56
+ mathBlock?: string;
57
+ }
58
+ /** Props for {@link MarkdownRenderer}. */
59
+ export interface MarkdownRendererProps {
60
+ /** Raw markdown string to render. */
61
+ content: string;
62
+ /** Classes applied to the renderer root. */
63
+ containerClassName?: string;
64
+ /** When true, appended content is revealed gradually for smoother streaming updates. */
65
+ isStreaming?: boolean;
66
+ /** Reveal speed used while `isStreaming` is true. Defaults to 120 characters per second. */
67
+ streamCharactersPerSecond?: number;
68
+ /** Per-element styling classes. Merged with structural base classes inside the component. Defaults to no overrides (`{}`). */
69
+ classNames?: MarkdownRendererClassNames;
70
+ /**
71
+ * Full component overrides merged on top of the built-in map.
72
+ * Use for elements not covered by `classNames`.
73
+ */
74
+ components?: Components;
75
+ /**
76
+ * Rewrites `href` and `src` values before they are rendered. The result is
77
+ * still passed through react-markdown's protocol allowlist. Hosts use this
78
+ * to map DIAL file ids (`files/{bucket}/{path}`) to download URLs. Defaults
79
+ * to no extra rewrite.
80
+ */
81
+ urlTransform?: (url: string) => string;
82
+ /** Extra rehype plugins, applied after the built-in KaTeX pass. Defaults to none. */
83
+ rehypePlugins?: NonNullable<Options['rehypePlugins']>;
84
+ /** When `false`, raw HTML in `content` renders as literal text instead of being parsed into elements. Defaults to `true`. */
85
+ isRawHtmlEnabled?: boolean;
86
+ /**
87
+ * Label shown with a shimmer animation while `isStreaming` is true and no content has arrived yet.
88
+ * Defaults to `'Thinking'`. Pass a translated string from the consuming app.
89
+ */
90
+ thinkingLabel?: string;
91
+ /** Accessible label for the copy button in code blocks. Defaults to `'Copy code'`. */
92
+ codeBlockCopyLabel?: string;
93
+ /** Accessible label for the copy button after copying. Defaults to `'Copied!'`. */
94
+ codeBlockCopiedLabel?: string;
95
+ /** Accessible label for the download button in code blocks. Defaults to `'Download code'`. */
96
+ codeBlockDownloadLabel?: string;
97
+ /** Syntax highlight color theme for code blocks and tables. Defaults to `'dark'`. */
98
+ codeBlockTheme?: CodeBlockTheme;
99
+ /** Color overrides applied as CSS custom properties. */
100
+ colors?: MarkdownRendererColors;
101
+ /** Localized labels for Markdown table actions. Supplying them enables the action bar. */
102
+ tableActionLabels?: MarkdownTableActionLabels;
103
+ /** Filename used when downloading a Markdown table as CSV. Defaults to `'table.csv'`. */
104
+ tableDownloadFilename?: string;
105
+ tableOnOpenInCanvas?: (markdown: string) => void;
106
+ /** Accessible label for a table's horizontally scrollable region. Defaults to `'Scrollable table'`. */
107
+ tableScrollRegionAriaLabel?: string;
108
+ /** Accessible label for a block formula's horizontally scrollable region. Defaults to `'Scrollable formula'`. */
109
+ mathScrollRegionAriaLabel?: string;
110
+ /** Accessible label for a code block's scrollable region. Defaults to `'Scrollable code'`. */
111
+ codeBlockScrollRegionAriaLabel?: string;
112
+ }
113
+ /** CSS custom-property overrides for the `MarkdownRenderer` component. */
114
+ export interface MarkdownRendererColors {
115
+ /** Primary color of the "thinking" shimmer gradient. */
116
+ thinkingPrimary?: string;
117
+ /** Secondary color of the "thinking" shimmer gradient. */
118
+ thinkingSecondary?: string;
119
+ /** Border color for `<hr>` separators and table cell borders. */
120
+ border?: string;
121
+ /** Border color for the `<blockquote>` start border. Defaults to `--stroke-primary`. */
122
+ blockquoteBorder?: string;
123
+ /** Text color for `<blockquote>` content. Defaults to `--text-secondary`. */
124
+ blockquoteText?: string;
125
+ /** Text color for `<a>` links. Defaults to `--text-accent`. */
126
+ linkText?: string;
127
+ /** Focus-visible outline color for `<a>` links. Defaults to `--stroke-focus`. */
128
+ linkFocus?: string;
129
+ /** Text color for `<th>` table header cells. Defaults to `--text-secondary`. */
130
+ tableHeaderText?: string;
131
+ /** Text color for `<h6>` headings. Defaults to `--text-secondary`. */
132
+ headingSixText?: string;
133
+ /** Background color for inline `<code>` spans. Defaults to `--bg-layer-raised`. */
134
+ inlineCodeBackground?: string;
135
+ /** Text color for inline `<code>` spans. Defaults to `--text-primary`. */
136
+ inlineCodeText?: string;
137
+ /** Scrollbar thumb color of a horizontally scrolling display formula. Defaults to `--stroke-primary`. */
138
+ mathScrollbar?: string;
139
+ /** Focus-visible outline color of a scrollable display formula. Defaults to `--stroke-focus`. */
140
+ mathFocus?: string;
141
+ }
142
+ export declare const defaultMarkdownComponents: Components;
143
+ /** Markdown renderer with GFM support. Styling is driven by `classNames`; structural overrides via `components`. */
144
+ export declare const MarkdownRenderer: FC<MarkdownRendererProps>;
145
+ //# sourceMappingURL=MarkdownRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/MarkdownRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AACf,OAAsB,EAEpB,KAAK,UAAU,EACf,KAAK,OAAO,EAEb,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AASzD,OAAO,EAEL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