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

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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar-color.d.ts","sourceRoot":"","sources":["../../src/utils/avatar-color.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,gBAAgB;IAC/B,qFAAqF;IACrF,UAAU,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,UAAU,EAAE,MAAM,CAAC;CACpB;AAsCD,sEAAsE;AACtE,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,gBAM9C,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Encodes any JSON-serializable value as Unicode-safe base64 — the wrap
3
+ * exists to satisfy clear-text-storage security scanning on web storage, and
4
+ * it is an encoding, not encryption. Going through the UTF-8 bytes (rather
5
+ * than `btoa` on the string itself) keeps any non-Latin1 content encodable:
6
+ * `btoa` alone throws on characters above `U+00FF` (e.g. Cyrillic or CJK).
7
+ */
8
+ export declare const encodeJsonToBase64: (value: unknown) => string;
9
+ /**
10
+ * Decodes base64 written by {@link encodeJsonToBase64}; throws on any
11
+ * malformed input, so the caller owns the failure handling.
12
+ */
13
+ export declare const decodeJsonFromBase64: <T>(raw: string) => T;
14
+ //# sourceMappingURL=base64-json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64-json.d.ts","sourceRoot":"","sources":["../../src/utils/base64-json.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,MAC2B,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,EAAE,KAAK,MAAM,KAAG,CAK9C,CAAC"}
@@ -0,0 +1,4 @@
1
+ //#region src/utils/base64-json.ts
2
+ var e = (e) => btoa(String.fromCharCode(...new TextEncoder().encode(JSON.stringify(e)))), t = (e) => JSON.parse(new TextDecoder().decode(Uint8Array.from(atob(e), (e) => e.charCodeAt(0))));
3
+ //#endregion
4
+ export { t as decodeJsonFromBase64, e as encodeJsonToBase64 };
@@ -0,0 +1,4 @@
1
+ import { CSSProperties } from 'react';
2
+ /** Builds a `CSSProperties` object from a record of CSS custom property names to values, omitting entries with `undefined` or empty-string values. */
3
+ export declare const buildCssVars: (vars: Record<string, string | number | undefined>) => CSSProperties;
4
+ //# sourceMappingURL=build-css-vars.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-css-vars.d.ts","sourceRoot":"","sources":["../../src/utils/build-css-vars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,sJAAsJ;AACtJ,eAAO,MAAM,YAAY,GACvB,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,KAChD,aAQF,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Renders markdown to sanitized HTML whose styling travels inline, so a
3
+ * rich-text target it is pasted into shows the tables, headings, and code
4
+ * blocks the way the conversation does.
5
+ */
6
+ export declare const markdownToRichTextHtml: (content: string) => string;
7
+ /**
8
+ * Copies markdown `content` to the clipboard as rich text, so pasting into a
9
+ * rich-text target (Word, Gmail, Slack) keeps the formatting. Both the
10
+ * `text/html` and the `text/plain` flavour are written, so a plain-text
11
+ * target (Notepad, a terminal, a code editor) pastes the raw markdown instead
12
+ * of nothing. Falls back to {@link copyToClipboard}, and therefore to the raw
13
+ * markdown, when the multi-format Clipboard API isn't available.
14
+ */
15
+ export declare const copyMarkdownAsRichText: (content: string) => Promise<boolean>;
16
+ /** Copies `text` to the clipboard; returns `true` on success, `false` when both the Clipboard API and the `execCommand` fallback fail. */
17
+ export declare const copyToClipboard: (text: string) => Promise<boolean>;
18
+ //# sourceMappingURL=copy-to-clipboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../src/utils/copy-to-clipboard.ts"],"names":[],"mappings":"AA+HA;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,MAAM,KAAG,MAUtD,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,MAAM,KAAG,OAAO,CAAC,OAAO,CAoCvE,CAAC;AAEF,0IAA0I;AAC1I,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,OAAO,CAAC,OAAO,CAY7D,CAAC"}
package/utils/dom.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Makes every child of `document.body` inert except the one holding
3
+ * `element`, for an overlay that dims the page without trapping focus.
4
+ * Returns the function that restores them; a child already inert is left as
5
+ * it was.
6
+ */
7
+ export declare const makeOutsideInert: (element: HTMLElement) => (() => void);
8
+ //# sourceMappingURL=dom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/utils/dom.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,WAAW,KAAG,CAAC,MAAM,IAAI,CAQlE,CAAC"}
package/utils/dom.js ADDED
@@ -0,0 +1,10 @@
1
+ //#region src/utils/dom.ts
2
+ var e = (e) => {
3
+ let t = [...document.body.children].filter((t) => !t.contains(e) && !t.hasAttribute("inert"));
4
+ for (let e of t) e.setAttribute("inert", "");
5
+ return () => {
6
+ for (let e of t) e.removeAttribute("inert");
7
+ };
8
+ };
9
+ //#endregion
10
+ export { e as makeOutsideInert };
@@ -0,0 +1,11 @@
1
+ /** Maximum length of an entity's name or display name. */
2
+ export declare const ENTITY_NAME_MAX_LENGTH = 256;
3
+ /** Maximum length of an entity's description. */
4
+ export declare const ENTITY_DESCRIPTION_MAX_LENGTH = 2000;
5
+ /** Maximum length of an entity's instructions (prompt body, system prompt, skill instructions). */
6
+ export declare const ENTITY_INSTRUCTIONS_MAX_LENGTH = 50000;
7
+ /** Whether `value` is longer than `maxLength` characters. */
8
+ export declare const exceedsMaxLength: (value: string, maxLength: number) => boolean;
9
+ /** Whether `value` contains a control character (line break, tab, NUL, …) that a single-line name must not carry. */
10
+ export declare const hasControlCharacters: (value: string) => boolean;
11
+ //# sourceMappingURL=entity-field-limits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-field-limits.d.ts","sourceRoot":"","sources":["../../src/utils/entity-field-limits.ts"],"names":[],"mappings":"AAOA,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,iDAAiD;AACjD,eAAO,MAAM,6BAA6B,OAAO,CAAC;AAElD,mGAAmG;AACnG,eAAO,MAAM,8BAA8B,QAAQ,CAAC;AAIpD,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,EAAE,WAAW,MAAM,KAAG,OAC1C,CAAC;AAE3B,qHAAqH;AACrH,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,KAAG,OACd,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BadgeColor } from '@epam/ai-dial-ui-kit';
2
+ import { CatalogEntityType } from '../types/entity-type';
3
+ /** Returns the kit badge colour for an entity type — the same visual tokens as `ENTITY_TYPE_COLOR`. */
4
+ export declare const getEntityTypeBadgeColor: (type: CatalogEntityType) => BadgeColor;
5
+ //# sourceMappingURL=entity-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-type.d.ts","sourceRoot":"","sources":["../../src/utils/entity-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAOzD,uGAAuG;AACvG,eAAO,MAAM,uBAAuB,GAClC,MAAM,iBAAiB,KACtB,UAcF,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Returns `name` with a file extension appended when it lacks one.
3
+ * Priority: extension already present on `name` → extension from `contentType` via `MIME_TYPE_EXT_MAP` → extension from the last segment of `url`.
4
+ * A trailing `.` in `name` or the `url` segment is only trusted when it looks
5
+ * like a real extension (letters/digits only) — otherwise it is treated as
6
+ * ordinary punctuation (e.g. a title such as `"Report vs. Summary"`).
7
+ */
8
+ export declare const ensureDownloadFilename: (name: string, url: string | undefined, contentType: string | undefined) => string;
9
+ /** Returns the file extension (without a leading dot) for a fenced-code-block language identifier, defaulting to `txt`. */
10
+ export declare const getFileExtensionForLanguage: (language: string) => string;
11
+ /** Creates a temporary anchor element and clicks it to trigger a browser download for `href`. */
12
+ export declare const triggerAnchorDownload: (href: string, filename: string) => void;
13
+ /** Triggers a browser download of `blob`, using a temporary object URL that is revoked afterward. */
14
+ export declare const triggerBlobDownload: (blob: Blob, filename: string) => void;
15
+ /** Decodes a base64 string into raw bytes, or `undefined` if the string is not valid base64. */
16
+ export declare const tryBase64ToBytes: (base64: string) => Uint8Array | undefined;
17
+ /** Decodes an inline `data` payload into a `Blob` of `mimeType`, treating the payload as raw UTF-8 text when it is not valid base64. */
18
+ export declare const base64ToBlob: (data: string, mimeType: string) => Blob;
19
+ /** Triggers a browser download of `content` as a text file named `filename`. */
20
+ export declare const downloadTextFile: (content: string, filename: string, mimeType?: string) => void;
21
+ //# sourceMappingURL=file-download.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-download.d.ts","sourceRoot":"","sources":["../../src/utils/file-download.ts"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,MAAM,EACZ,KAAK,MAAM,GAAG,SAAS,EACvB,aAAa,MAAM,GAAG,SAAS,KAC9B,MAeF,CAAC;AA2CF,2HAA2H;AAC3H,eAAO,MAAM,2BAA2B,GAAI,UAAU,MAAM,KAAG,MACT,CAAC;AASvD,iGAAiG;AACjG,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,IAWtE,CAAC;AAEF,qGAAqG;AACrG,eAAO,MAAM,mBAAmB,GAAI,MAAM,IAAI,EAAE,UAAU,MAAM,KAAG,IAIlE,CAAC;AAEF,gGAAgG;AAChG,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,KAAG,UAAU,GAAG,SAW9D,CAAC;AAEF,wIAAwI;AACxI,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,IAG7D,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,GAC3B,SAAS,MAAM,EACf,UAAU,MAAM,EAChB,iBAAqC,KACpC,IAEF,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Formats a byte count as a human-readable size string (e.g. `840 KB`, `2.4 MB`). */
2
+ export declare const formatFileSize: (bytes: number) => string;
3
+ //# sourceMappingURL=format-file-size.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-file-size.d.ts","sourceRoot":"","sources":["../../src/utils/format-file-size.ts"],"names":[],"mappings":"AAIA,sFAAsF;AACtF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MAQ9C,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Converts a timestamp to a relative time string (e.g. `'5 min ago'`, `'2 days ago'`); returns an empty string when the input is falsy or invalid. */
2
+ export declare const formatLastUsed: (timestamp?: number) => string;
3
+ //# sourceMappingURL=format-last-used.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-last-used.d.ts","sourceRoot":"","sources":["../../src/utils/format-last-used.ts"],"names":[],"mappings":"AAAA,uJAAuJ;AACvJ,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,KAAG,MA2BnD,CAAC"}
@@ -0,0 +1,7 @@
1
+ /** Formats an accumulated USD cost with at most two decimals (for example, `$0.79`). */
2
+ export declare const formatCost: (value: number) => string;
3
+ /** Formats an amount as USD, keeping up to six significant digits for sub-dollar values (e.g. `$3`, `$0.3`, `$0.00000015`). */
4
+ export declare const formatPrice: (value: number) => string;
5
+ /** Formats a per-unit price string for display, e.g. `$3/M tokens` or `$0.15/M chars without whitespace`. */
6
+ export declare const formatUnitPrice: (price: string | undefined, unit: string | undefined) => string | undefined;
7
+ //# sourceMappingURL=format-price.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-price.d.ts","sourceRoot":"","sources":["../../src/utils/format-price.ts"],"names":[],"mappings":"AAoCA,wFAAwF;AACxF,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,KAAG,MACb,CAAC;AAE/B,+HAA+H;AAC/H,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,MAK3C,CAAC;AASF,6GAA6G;AAC7G,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,GAAG,SAAS,EACzB,MAAM,MAAM,GAAG,SAAS,KACvB,MAAM,GAAG,SAaX,CAAC"}
@@ -1,22 +1,22 @@
1
1
  //#region src/utils/format-price.ts
2
- var e = "token", t = 1e6, n = {
2
+ var e = {
3
3
  token: "tokens",
4
4
  char_without_whitespace: "chars without whitespace"
5
- }, r = "en-US", i = new Intl.NumberFormat(r, {
5
+ }, t = "en-US", n = new Intl.NumberFormat(t, {
6
6
  style: "currency",
7
7
  currency: "USD",
8
8
  minimumFractionDigits: 0,
9
9
  maximumFractionDigits: 2
10
- }), a = new Intl.NumberFormat(r, {
10
+ }), r = new Intl.NumberFormat(t, {
11
11
  style: "currency",
12
12
  currency: "USD",
13
13
  maximumSignificantDigits: 6
14
- }), o = (e) => i.format(e), s = (e) => e !== 0 && Math.abs(e) < 1 ? a.format(e) : o(e), c = (r, i) => {
15
- if (r == null) return;
16
- let a = Number(r);
17
- if (r.trim() === "" || !Number.isFinite(a)) return r;
18
- let o = (i ?? e).toLowerCase(), c = n[o];
19
- return c == null ? `${s(a)}/${o.replace(/_/g, " ")}` : `${s(a * t)}/M ${c}`;
14
+ }), i = (e) => n.format(e), a = (e) => e !== 0 && Math.abs(e) < 1 ? r.format(e) : i(e), o = (t, n) => {
15
+ if (t == null) return;
16
+ let r = Number(t);
17
+ if (t.trim() === "" || !Number.isFinite(r)) return t;
18
+ let i = (n ?? "token").toLowerCase(), o = e[i];
19
+ return o == null ? `${a(r)}/${i.replace(/_/g, " ")}` : `${a(r * 1e6)}/M ${o}`;
20
20
  };
21
21
  //#endregion
22
- export { o as formatCost, s as formatPrice, c as formatUnitPrice };
22
+ export { i as formatCost, a as formatPrice, o as formatUnitPrice };
@@ -0,0 +1,3 @@
1
+ /** Returns a UUID v4 string, with a fallback for non-secure browser contexts (HTTP deployments). */
2
+ export declare const generateUUID: () => string;
3
+ //# sourceMappingURL=generate-uuid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-uuid.d.ts","sourceRoot":"","sources":["../../src/utils/generate-uuid.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,eAAO,MAAM,YAAY,QAAO,MAY/B,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Returns 1–2 uppercase initials derived from a display name, or `'?'` when the name is empty. */
2
+ export declare const extractInitials: (name: string) => string;
3
+ //# sourceMappingURL=initials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initials.d.ts","sourceRoot":"","sources":["../../src/utils/initials.ts"],"names":[],"mappings":"AAGA,mGAAmG;AACnG,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,MAa9C,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { Components } from 'react-markdown';
2
+ import { InlineTextSegment, TextSegment } from '../models/inline-segment';
3
+ /** Minimal hast shapes the inline-segment plugin reads and writes. */
4
+ interface HastNode {
5
+ type: string;
6
+ tagName?: string;
7
+ value?: string;
8
+ properties?: Record<string, unknown>;
9
+ children?: HastNode[];
10
+ }
11
+ /** Markdown source with inline segments replaced by placeholder tokens. */
12
+ export interface InlineSegmentSource {
13
+ /** Markdown source to render, with one token per inline segment. */
14
+ source: string;
15
+ /** Inline segments in token order; a token's number is its index here. */
16
+ inlineSegments: InlineTextSegment[];
17
+ }
18
+ /**
19
+ * Returns the markdown source for `segments`, with every inline segment
20
+ * replaced by a placeholder token, or the plain concatenated text (and no
21
+ * inline segments) when a string run already contains a token character.
22
+ */
23
+ export declare const buildInlineSegmentSource: (segments: TextSegment[]) => InlineSegmentSource;
24
+ /**
25
+ * Returns a rehype plugin that turns each placeholder token from
26
+ * {@link buildInlineSegmentSource} into an inline-segment element, or into
27
+ * the segment's literal text inside code, preformatted and link elements and
28
+ * inside `href`/`src` values. Run it after sanitization, which would strip
29
+ * the element.
30
+ */
31
+ export declare const createRehypeInlineSegments: (inlineSegments: InlineTextSegment[]) => () => (tree: HastNode) => void;
32
+ /**
33
+ * Returns the react-markdown component overrides that render each
34
+ * inline-segment element as its segment's `node`.
35
+ */
36
+ export declare const createInlineSegmentComponents: (inlineSegments: InlineTextSegment[]) => Components;
37
+ export {};
38
+ //# sourceMappingURL=inline-segments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-segments.d.ts","sourceRoot":"","sources":["../../src/utils/inline-segments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AA6B/E,sEAAsE;AACtE,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,2EAA2E;AAC3E,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,cAAc,EAAE,iBAAiB,EAAE,CAAC;CACrC;AAQD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,WAAW,EAAE,KACtB,mBAuBF,CAAC;AA+EF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GACpC,gBAAgB,iBAAiB,EAAE,YAAY,MAAM,QAAQ,SAE7D,CAAC;AAQJ;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GACxC,gBAAgB,iBAAiB,EAAE,KAClC,UAWF,CAAC"}
@@ -0,0 +1,53 @@
1
+ //#region src/utils/inline-segments.ts
2
+ var e = "", t = "", n = RegExp(`${e}(\\d+)${t}`, "g"), r = RegExp(`${encodeURI(e)}(\\d+)${encodeURI(t)}`, "gi"), i = "dial-inline-segment", a = /* @__PURE__ */ new Set([
3
+ "code",
4
+ "pre",
5
+ "a"
6
+ ]), o = ["href", "src"], s = (e) => typeof e != "string", c = (n) => n.includes(e) || n.includes(t), l = (n) => {
7
+ if (n.some((e) => !s(e) && c(e))) return {
8
+ source: n.map((e) => s(e) ? e.text : e).join(""),
9
+ inlineSegments: []
10
+ };
11
+ let r = [];
12
+ return {
13
+ source: n.map((n) => s(n) ? (r.push(n), `${e}${r.length - 1}${t}`) : n).join(""),
14
+ inlineSegments: r
15
+ };
16
+ }, u = (e, t) => e.replace(n, (e, n) => t[Number(n)]?.text ?? e), d = (e) => {
17
+ let t = [], r = 0;
18
+ for (let a of e.matchAll(n)) a.index > r && t.push({
19
+ type: "text",
20
+ value: e.slice(r, a.index)
21
+ }), t.push({
22
+ type: "element",
23
+ tagName: i,
24
+ properties: { dataIndex: Number(a[1]) },
25
+ children: []
26
+ }), r = a.index + a[0].length;
27
+ return r < e.length && t.push({
28
+ type: "text",
29
+ value: e.slice(r)
30
+ }), t;
31
+ }, f = (e, t) => {
32
+ e.properties != null && o.forEach((n) => {
33
+ let i = e.properties?.[n];
34
+ typeof i == "string" && e.properties && (e.properties[n] = u(i, t).replace(r, (e, n) => {
35
+ let r = t[Number(n)]?.text;
36
+ return r == null ? e : encodeURI(r);
37
+ }));
38
+ });
39
+ }, p = (e, t, n) => {
40
+ if (f(e, t), e.children == null) return;
41
+ let r = n || e.tagName != null && a.has(e.tagName);
42
+ e.children = e.children.flatMap((e) => e.type !== "text" || e.value == null ? (p(e, t, r), [e]) : r ? [{
43
+ ...e,
44
+ value: u(e.value, t)
45
+ }] : d(e.value));
46
+ }, m = (e) => () => (t) => {
47
+ p(t, e, !1);
48
+ }, h = (e) => {
49
+ let t = ({ node: t }) => e[Number(t?.properties?.dataIndex)]?.node ?? null;
50
+ return { [i]: t };
51
+ };
52
+ //#endregion
53
+ export { l as buildInlineSegmentSource, h as createInlineSegmentComponents, m as createRehypeInlineSegments };
@@ -0,0 +1,3 @@
1
+ /** Returns `true` when `types` contains a wildcard or any audio MIME type; `false` otherwise. */
2
+ export declare const isAudioTranscriptionSupported: (types?: string[]) => boolean;
3
+ //# sourceMappingURL=is-audio-transcription-supported.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-audio-transcription-supported.d.ts","sourceRoot":"","sources":["../../src/utils/is-audio-transcription-supported.ts"],"names":[],"mappings":"AAKA,iGAAiG;AACjG,eAAO,MAAM,6BAA6B,GAAI,QAAQ,MAAM,EAAE,KAAG,OAGrD,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Whether a selected skill lacks explicitly confirmed support. */
2
+ export declare const isSkillSelectionUnsupported: (skillUrl: string | null | undefined, isSkillsSupported: boolean | undefined) => boolean;
3
+ //# sourceMappingURL=is-skill-selection-unsupported.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-skill-selection-unsupported.d.ts","sourceRoot":"","sources":["../../src/utils/is-skill-selection-unsupported.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,eAAO,MAAM,2BAA2B,GACtC,UAAU,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,mBAAmB,OAAO,GAAG,SAAS,KACrC,OAAkE,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Escapes currency-looking dollar signs and converts single-dollar LaTeX math delimiters
3
+ * (`$...$`) to the double-dollar form (`$$...$$`) that `remark-math`/KaTeX render, leaving
4
+ * code blocks and already-escaped `\$` untouched. Display blocks are re-fenced so a
5
+ * formula that cannot be typeset stays inside its own delimiters instead of consuming the
6
+ * rest of the message.
7
+ *
8
+ * Delimiters are paired in a single left-to-right walk rather than by an independent
9
+ * currency pass, because declining to open a formula on one `$` while leaving its partner
10
+ * free to open the next one shifts every pairing along the line — which is how
11
+ * `$0 < x$ and then $y \in H$` used to typeset the English words and print the formulas.
12
+ * For the same reason a currency-shaped opening is weighed against the span it would
13
+ * open, not against the few characters after the amount: `$1 - \frac{3}{p} < 1$` reads as
14
+ * a price for one character and as LaTeX for the rest of the line.
15
+ *
16
+ * The `\(...\)`/`\[...\]` delimiters LLMs commonly emit are left as-is around a formula: they
17
+ * are recognized directly by `micromark-extension-llm-math`, which the consuming app's bundler
18
+ * config aliases in place of the default `micromark-extension-math` used by `remark-math`. A
19
+ * pair wrapping a link or a URL is escaped prose and is turned back into literal brackets.
20
+ */
21
+ export declare const preprocessLaTeX: (content: string) => string;
22
+ //# sourceMappingURL=latex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"latex.d.ts","sourceRoot":"","sources":["../../src/utils/latex.ts"],"names":[],"mappings":"AAuWA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,KAAG,MAoEjD,CAAC"}
package/utils/latex.js CHANGED
@@ -1,15 +1,23 @@
1
1
  //#region src/utils/latex.ts
2
- var e = /\$\\ce\{/g, t = /\$\\pu\{/g, n = /\$\\\\ce\{[^}]*\}\$/g, r = /\$\\\\pu\{[^}]*\}\$/g, i = /\$\$([\s\S]*?)\$\$/g, a = /^[ \t]*\r?\n/, o = /\r?\n[ \t]*$/, s = /\d+(?:,\d{3})*(?:\.\d+)?(?:[KMBkmb])?/y, c = /\s|[^a-zA-Z\d]/y, l = /[\^_\\]/y, u = /(?:[<>]|\\(?:le|leq|ll|ge|geq|gg|ne|neq|approx|equiv|sim|simeq|cong|in|notin|subset|subseteq|supset|supseteq|to|rightarrow|leftarrow|mapsto|implies|iff)\b)/y, d = /\\[a-zA-Z]|[\^_]/, f = (i) => {
2
+ var e = /\$\\ce\{/g, t = /\$\\pu\{/g, n = /\$\\\\ce\{[^}]*\}\$/g, r = /\$\\\\pu\{[^}]*\}\$/g, i = /\]\(|:\/\//, a = {
3
+ "[": "]",
4
+ "(": ")"
5
+ }, o = {
6
+ "[": "&#91;",
7
+ "]": "&#93;",
8
+ "(": "&#40;",
9
+ ")": "&#41;"
10
+ }, s = /\$\$([\s\S]*?)\$\$/g, c = /^[ \t]*\r?\n/, l = /\r?\n[ \t]*$/, u = /\d+(?:,\d{3})*(?:\.\d+)?(?:[KMBkmb])?/y, d = /\s|[^a-zA-Z\d]/y, f = /[\^_\\]/y, p = /(?:[<>]|\\(?:le|leq|ll|ge|geq|gg|ne|neq|approx|equiv|sim|simeq|cong|in|notin|subset|subseteq|supset|supseteq|to|rightarrow|leftarrow|mapsto|implies|iff)\b)/y, m = /\\[a-zA-Z]|[\^_]/, h = (i) => {
3
11
  let a = i.replace(e, "$\\\\ce{");
4
12
  return a = a.replace(t, "$\\\\pu{"), a = a.replace(n, (e) => `$${e}$`), a = a.replace(r, (e) => `$${e}$`), a;
5
- }, p = (e) => {
13
+ }, g = (e) => {
6
14
  let t = [], n = -1, r = -1;
7
15
  for (let i = 0; i < e.length; i++) {
8
16
  let a = e[i];
9
17
  a === "`" && i + 2 < e.length && e[i + 1] === "`" && e[i + 2] === "`" ? r === -1 ? (r = i, i += 2) : (t.push([r, i + 2]), r = -1, i += 2) : a === "`" && r === -1 && (n === -1 ? n = i : (t.push([n, i]), n = -1));
10
18
  }
11
19
  return t;
12
- }, m = (e, t) => {
20
+ }, _ = (e, t) => {
13
21
  let n = 0, r = t.length - 1;
14
22
  for (; n <= r;) {
15
23
  let i = Math.floor((n + r) / 2), [a, o] = t[i];
@@ -17,60 +25,58 @@ var e = /\$\\ce\{/g, t = /\$\\pu\{/g, n = /\$\\\\ce\{[^}]*\}\$/g, r = /\$\\\\pu\
17
25
  e < a ? r = i - 1 : n = i + 1;
18
26
  }
19
27
  return !1;
20
- }, h = (e, t, n) => (e.lastIndex = n, e.exec(t)), g = /\s/, _ = (e, t) => {
28
+ }, v = (e, t, n) => (e.lastIndex = n, e.exec(t)), y = /\s/, b = (e, t) => {
21
29
  let n = t;
22
- for (; n < e.length && g.test(e[n]);) n++;
30
+ for (; n < e.length && y.test(e[n]);) n++;
23
31
  return n;
24
- }, v = (e) => {
32
+ }, x = (e) => {
25
33
  if (!e.includes("$$")) return e;
26
- let t = p(e), n = [], r = 0, s;
27
- for (i.lastIndex = 0; (s = i.exec(e)) !== null;) {
28
- let i = s.index, c = i + s[0].length, l = s[1];
29
- if (m(i, t)) continue;
30
- let u = e.lastIndexOf("\n", i - 1) + 1;
31
- if (e.slice(u, i).trim() !== "") continue;
32
- let d = e.indexOf("\n", c), f = e.slice(c, d === -1 ? e.length : d);
33
- if (!l.includes("\n") && (f.trim() !== "" || l.trim() === "")) continue;
34
- let p = l.replace(a, "").replace(o, "");
35
- n.push(e.slice(r, i)), n.push(`$$\n${p}\n$$${f.trim() === "" ? "" : "\n"}`), r = c;
34
+ let t = g(e), n = [], r = 0, i;
35
+ for (s.lastIndex = 0; (i = s.exec(e)) !== null;) {
36
+ let a = i.index, o = a + i[0].length, s = i[1];
37
+ if (_(a, t)) continue;
38
+ let u = e.lastIndexOf("\n", a - 1) + 1;
39
+ if (e.slice(u, a).trim() !== "") continue;
40
+ let d = e.indexOf("\n", o), f = e.slice(o, d === -1 ? e.length : d);
41
+ if (!s.includes("\n") && (f.trim() !== "" || s.trim() === "")) continue;
42
+ let p = s.replace(c, "").replace(l, "");
43
+ n.push(e.slice(r, a)), n.push(`$$\n${p}\n$$${f.trim() === "" ? "" : "\n"}`), r = o;
36
44
  }
37
45
  return n.push(e.substring(r)), n.join("");
38
- }, y = (e, t) => {
39
- let n = h(s, e, t + 1);
46
+ }, S = (e) => {
47
+ if (!e.includes("\\[") && !e.includes("\\(")) return e;
48
+ let t = g(e), n = [], r = 0;
49
+ for (let s = 0; s < e.length - 1; s++) {
50
+ let c = e[s + 1], l = a[c];
51
+ if (e[s] !== "\\" || l == null || s > 0 && e[s - 1] === "\\" || _(s, t)) continue;
52
+ let u = e.indexOf(`\\${l}`, s + 2);
53
+ u !== -1 && i.test(e.slice(s + 2, u)) && (n.push(e.slice(r, s), o[c], e.slice(s + 2, u), o[l]), r = u + 2, s = u + 1);
54
+ }
55
+ return r === 0 ? e : (n.push(e.substring(r)), n.join(""));
56
+ }, C = (e, t) => {
57
+ let n = v(u, e, t + 1);
40
58
  return n ? t + 1 + n[0].length : -1;
41
- }, b = (e, t) => t >= e.length ? !0 : !(!h(c, e, t) || h(l, e, t) || h(u, e, _(e, t))), x = (e, t) => {
59
+ }, w = (e, t) => t >= e.length || !(!v(d, e, t) || v(f, e, t) || v(p, e, b(e, t))), T = (e, t) => {
42
60
  let n = [];
43
61
  for (let r = 0; r < e.length; r++) {
44
62
  if (e[r] !== "$") continue;
45
63
  let i = r;
46
64
  for (; i + 1 < e.length && e[i + 1] === "$";) i++;
47
- if (i > r) {
48
- r = i;
49
- continue;
50
- }
51
- r > 0 && e[r - 1] === "\\" || m(r, t) || n.push(r);
65
+ i > r ? r = i : r > 0 && e[r - 1] === "\\" || _(r, t) || n.push(r);
52
66
  }
53
67
  return n;
54
- }, S = (e, t, n, r) => {
68
+ }, E = (e, t, n, r) => {
55
69
  if (n <= t + 1 || e[n - 1] === "`") return !1;
56
70
  for (let i = t + 1; i < n; i++) if (e[i] === "\n" || e[i] === "$" && !(e[i - 1] === "\\" || r.has(i))) return !1;
57
71
  return !0;
58
- }, C = (e, t, n, r) => n !== void 0 && S(e, t, n, r) && d.test(e.slice(t + 1, n)), w = (e) => {
59
- if (!e.includes("$")) return e;
60
- let t = e;
61
- (e.includes("\\ce{") || e.includes("\\pu{")) && (t = f(e)), t = v(t);
62
- let n = p(t), r = x(t, n), i = /* @__PURE__ */ new Map(), a = -1;
72
+ }, D = (e, t, n, r) => n !== void 0 && E(e, t, n, r) && m.test(e.slice(t + 1, n)), O = (e) => {
73
+ let t = S(e);
74
+ if (!t.includes("$")) return t;
75
+ (t.includes("\\ce{") || t.includes("\\pu{")) && (t = h(t)), t = x(t);
76
+ let n = g(t), r = T(t, n), i = /* @__PURE__ */ new Map(), a = -1;
63
77
  for (let e = 0; e < r.length; e++) {
64
- let n = r[e], o = y(t, n);
65
- if (o !== -1 && b(t, o) && (a !== -1 || !C(t, n, r[e + 1], i))) {
66
- i.set(n, "\\$"), a === -1 && r[e + 1] === o && (i.set(o, "\\$"), e++);
67
- continue;
68
- }
69
- if (a === -1) {
70
- a = n;
71
- continue;
72
- }
73
- S(t, a, n, i) ? (i.set(a, "$$"), i.set(n, "$$"), a = -1) : a = n;
78
+ let n = r[e], o = C(t, n);
79
+ o !== -1 && w(t, o) && (a !== -1 || !D(t, n, r[e + 1], i)) ? (i.set(n, "\\$"), a === -1 && r[e + 1] === o && (i.set(o, "\\$"), e++)) : a === -1 ? a = n : E(t, a, n, i) ? (i.set(a, "$$"), i.set(n, "$$"), a = -1) : a = n;
74
80
  }
75
81
  if (i.size === 0) return t;
76
82
  let o = [], s = 0;
@@ -78,4 +84,4 @@ var e = /\$\\ce\{/g, t = /\$\\pu\{/g, n = /\$\\\\ce\{[^}]*\}\$/g, r = /\$\\\\pu\
78
84
  return o.push(t.substring(s)), o.join("");
79
85
  };
80
86
  //#endregion
81
- export { w as preprocessLaTeX };
87
+ export { O as preprocessLaTeX };
@@ -0,0 +1,14 @@
1
+ /** Minimal hast shape this plugin reads and writes. */
2
+ interface HastNode {
3
+ type: string;
4
+ value?: string;
5
+ children?: HastNode[];
6
+ }
7
+ /**
8
+ * Rehype plugin that turns every raw HTML node into a text node, so markup in
9
+ * the source renders as the literal characters the author typed instead of
10
+ * being dropped by sanitization.
11
+ */
12
+ export declare const rehypeRawAsText: () => (tree: HastNode) => void;
13
+ export {};
14
+ //# sourceMappingURL=markdown-html.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-html.d.ts","sourceRoot":"","sources":["../../src/utils/markdown-html.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB;AAcD;;;;GAIG;AACH,eAAO,MAAM,eAAe,SAAU,MAAM,QAAQ,SAEnD,CAAC"}
@@ -0,0 +1,11 @@
1
+ //#region src/utils/markdown-html.ts
2
+ var e = (t) => {
3
+ t.children != null && (t.children = t.children.map((t) => t.type === "raw" ? {
4
+ type: "text",
5
+ value: t.value ?? ""
6
+ } : (e(t), t)));
7
+ }, t = () => (t) => {
8
+ e(t);
9
+ };
10
+ //#endregion
11
+ export { t as rehypeRawAsText };
@@ -0,0 +1,4 @@
1
+ import { default as classNames } from 'classnames';
2
+ /** Merge class names (classnames → tailwind-merge). */
3
+ export declare function mergeClasses(...inputs: Parameters<typeof classNames>): string;
4
+ //# sourceMappingURL=merge-class.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-class.d.ts","sourceRoot":"","sources":["../../src/utils/merge-class.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AAcpC,uDAAuD;AACvD,wBAAgB,YAAY,CAAC,GAAG,MAAM,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,MAAM,CAE7E"}
@@ -0,0 +1,22 @@
1
+ import { DisplayAttachment, MessageAttachment } from '../models/chat';
2
+ /**
3
+ * Optional app-owned callbacks used to resolve display URLs for an attachment.
4
+ * When omitted, the mapper falls back to the attachment's own `url` (or a
5
+ * synthesized `data:` URL when only inline base64 `data` is present).
6
+ */
7
+ export interface AttachmentDisplayResolvers {
8
+ /** Resolves the image preview URL for an attachment that has a remote `url`. */
9
+ resolvePreviewUrl?(dto: MessageAttachment): string | undefined;
10
+ /** Resolves the audio playback URL for an attachment that has a remote `url`. */
11
+ resolvePlayUrl?(dto: MessageAttachment): string | undefined;
12
+ }
13
+ /**
14
+ * Maps a {@link MessageAttachment} DTO to the display-only {@link DisplayAttachment}
15
+ * model used by UI components. This is a pure function: any app/host-specific URL
16
+ * resolution (catalog icon URLs, DIAL file download URLs, etc.) is injected through
17
+ * the optional `resolvers` argument rather than performed here.
18
+ */
19
+ export declare const messageAttachmentToDisplayAttachment: (dto: MessageAttachment, resolvers?: AttachmentDisplayResolvers) => DisplayAttachment;
20
+ /** Maps a list of {@link MessageAttachment} DTOs to display-only attachment models. Entries with duplicate `id` values are deduplicated — first occurrence wins. */
21
+ export declare const messageAttachmentsToDisplayAttachments: (dtos: MessageAttachment[] | undefined, resolvers?: AttachmentDisplayResolvers) => DisplayAttachment[];
22
+ //# sourceMappingURL=message-attachment-to-display.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-attachment-to-display.d.ts","sourceRoot":"","sources":["../../src/utils/message-attachment-to-display.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AAIxB;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,gFAAgF;IAChF,iBAAiB,CAAC,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAAC;IAC/D,iFAAiF;IACjF,cAAc,CAAC,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAAC;CAC7D;AAYD;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC,GAC/C,KAAK,iBAAiB,EACtB,YAAW,0BAA+B,KACzC,iBA4CF,CAAC;AAEF,oKAAoK;AACpK,eAAO,MAAM,sCAAsC,GACjD,MAAM,iBAAiB,EAAE,GAAG,SAAS,EACrC,YAAW,0BAA+B,KACzC,iBAAiB,EAYnB,CAAC"}
@@ -3,7 +3,7 @@ import { AttachmentType as t } from "../types/attachment.js";
3
3
  import { getAttachmentTypeFromMime as n, inferMimeTypeFromPath as r } from "./mime-type.js";
4
4
  //#region src/utils/message-attachment-to-display.ts
5
5
  var i = (e, t, n) => {
6
- if (!(!e?.startsWith(n) || !t)) return `data:${e};base64,${t}`;
6
+ if (e?.startsWith(n) && t) return `data:${e};base64,${t}`;
7
7
  }, a = (a, o = {}) => {
8
8
  let s = n(a.type), c = s === t.Image, l = s === t.Audio, u = a.url && a.reference_url && !a.reference_type, d = a.url ?? a.data ?? a.title, f = (a.url == null && a.reference_url != null ? a.reference_type ?? r(a.reference_url) : void 0) ?? a.type ?? "", p;
9
9
  c && (a.url ? p = o.resolvePreviewUrl?.(a) ?? a.url : a.data && (p = i(a.type, a.data, "image/")));
@@ -0,0 +1,4 @@
1
+ import { Message, StatusMessage } from '../models/chat';
2
+ /** Returns `true` when `msg` is a `StatusMessage`. */
3
+ export declare const isStatusMessage: (msg: Message | StatusMessage) => msg is StatusMessage;
4
+ //# sourceMappingURL=message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/utils/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/E,sDAAsD;AACtD,eAAO,MAAM,eAAe,GAC1B,KAAK,OAAO,GAAG,aAAa,KAC3B,GAAG,IAAI,aAAgD,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { AttachmentType } from '../types/attachment';
2
+ import { MIMEType } from '../types/mime-type';
3
+ /** Lowercases a MIME type and strips its parameters, e.g. `'Application/JSON; charset=utf-8'` -> `'application/json'`. */
4
+ export declare const getBaseMimeType: (mimeType: string) => string;
5
+ /**
6
+ * Returns the canonical spelling of a MIME type: parameters stripped, lowercased,
7
+ * and known aliases resolved through `MIME_TYPE_ALIASES` (`'text/json'` ->
8
+ * `'application/json'`). Wildcards and unrecognized types are returned unchanged
9
+ * apart from that normalization.
10
+ */
11
+ export declare const normalizeMimeType: (mimeType: string) => string;
12
+ /** Strips a trailing `?query` string and/or `#fragment` from a URL or path. */
13
+ export declare const stripUrlQueryAndFragment: (url: string) => string;
14
+ /**
15
+ * Infers a `MIMEType` from a file path's extension, ignoring any query string
16
+ * or `#` fragment. Returns `undefined` when the path has no extension or the
17
+ * extension is not recognized.
18
+ */
19
+ export declare const inferMimeTypeFromPath: (path: string) => MIMEType | undefined;
20
+ /** Classifies a MIME type into an `AttachmentType` by prefix (`image/*` / `audio/*`), defaulting to `File`. */
21
+ export declare const getAttachmentTypeFromMime: (mimeType: string | undefined) => AttachmentType;
22
+ //# sourceMappingURL=mime-type.d.ts.map