@epam/ai-dial-chat-shared 1.3.0-dev.5 → 1.3.0-dev.55

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 (244) hide show
  1. package/components/ConfirmationDialog/ConfirmationDialog.d.ts +41 -0
  2. package/components/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -0
  3. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts +33 -0
  4. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts.map +1 -0
  5. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts +33 -0
  6. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts.map +1 -0
  7. package/components/ConfirmationView/ConfirmationFooter.d.ts +41 -0
  8. package/components/ConfirmationView/ConfirmationFooter.d.ts.map +1 -0
  9. package/components/ConfirmationView/ConfirmationFooter.js +3 -1
  10. package/components/ConfirmationView/ConfirmationView.d.ts +57 -0
  11. package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -0
  12. package/components/ConfirmationView/ConfirmationView.js +15 -14
  13. package/components/CopyButton/CopyButton.d.ts +19 -0
  14. package/components/CopyButton/CopyButton.d.ts.map +1 -0
  15. package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts +41 -0
  16. package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts.map +1 -0
  17. package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.js +34 -0
  18. package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts +49 -0
  19. package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts.map +1 -0
  20. package/components/DeleteConfirmationView/DeleteConfirmationView.js +37 -0
  21. package/components/DeleteConfirmationView/DeleteConfirmationView.module.scss.js +6 -0
  22. package/components/DeploymentIcon/DeploymentIcon.d.ts +36 -0
  23. package/components/DeploymentIcon/DeploymentIcon.d.ts.map +1 -0
  24. package/components/EntityHeader/EntityHeader.d.ts +38 -0
  25. package/components/EntityHeader/EntityHeader.d.ts.map +1 -0
  26. package/components/EntityTypeLabel/EntityTypeLabel.d.ts +18 -0
  27. package/components/EntityTypeLabel/EntityTypeLabel.d.ts.map +1 -0
  28. package/components/FeaturedChip/FeaturedChip.d.ts +16 -0
  29. package/components/FeaturedChip/FeaturedChip.d.ts.map +1 -0
  30. package/components/InitialsAvatar/InitialsAvatar.d.ts +15 -0
  31. package/components/InitialsAvatar/InitialsAvatar.d.ts.map +1 -0
  32. package/components/ItemHeader/ItemHeader.d.ts +36 -0
  33. package/components/ItemHeader/ItemHeader.d.ts.map +1 -0
  34. package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +53 -0
  35. package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +1 -0
  36. package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts +7 -0
  37. package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts.map +1 -0
  38. package/components/MarkdownRenderer/MDMessageViewer.d.ts +66 -0
  39. package/components/MarkdownRenderer/MDMessageViewer.d.ts.map +1 -0
  40. package/components/MarkdownRenderer/MDMessageViewer.js +14 -12
  41. package/components/MarkdownRenderer/MarkdownRenderer.d.ts +139 -0
  42. package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -0
  43. package/components/MarkdownRenderer/MarkdownRenderer.js +136 -129
  44. package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts +18 -0
  45. package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts.map +1 -0
  46. package/components/MarkdownRenderer/PlainTextRenderer.d.ts +39 -0
  47. package/components/MarkdownRenderer/PlainTextRenderer.d.ts.map +1 -0
  48. package/components/MarkdownRenderer/Table/MarkdownTable.d.ts +47 -0
  49. package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +1 -0
  50. package/components/MarkdownRenderer/Table/TableHeader.d.ts +22 -0
  51. package/components/MarkdownRenderer/Table/TableHeader.d.ts.map +1 -0
  52. package/components/MarkdownRenderer/Table/table-serialization.d.ts +16 -0
  53. package/components/MarkdownRenderer/Table/table-serialization.d.ts.map +1 -0
  54. package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts +27 -0
  55. package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts.map +1 -0
  56. package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts +9 -0
  57. package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts.map +1 -0
  58. package/components/MarkdownRenderer/ThinkingShimmer.d.ts +17 -0
  59. package/components/MarkdownRenderer/ThinkingShimmer.d.ts.map +1 -0
  60. package/components/MarkdownRenderer/markdown-class-names.d.ts +10 -0
  61. package/components/MarkdownRenderer/markdown-class-names.d.ts.map +1 -0
  62. package/components/MarkdownRenderer/markdown-whitespace.d.ts +15 -0
  63. package/components/MarkdownRenderer/markdown-whitespace.d.ts.map +1 -0
  64. package/components/MarkdownRenderer/markdown-whitespace.js +18 -0
  65. package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts +25 -0
  66. package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts.map +1 -0
  67. package/components/PanelEmptyState/PanelEmptyState.d.ts +22 -0
  68. package/components/PanelEmptyState/PanelEmptyState.d.ts.map +1 -0
  69. package/components/ResourceSummary/ResourceSummary.d.ts +49 -0
  70. package/components/ResourceSummary/ResourceSummary.d.ts.map +1 -0
  71. package/components/TextRefinementField/TextRefinementField.d.ts +31 -0
  72. package/components/TextRefinementField/TextRefinementField.d.ts.map +1 -0
  73. package/constants/breakpoint.d.ts +9 -0
  74. package/constants/breakpoint.d.ts.map +1 -0
  75. package/constants/dial.d.ts +5 -0
  76. package/constants/dial.d.ts.map +1 -0
  77. package/constants/entity-colors.d.ts +6 -0
  78. package/constants/entity-colors.d.ts.map +1 -0
  79. package/constants/icon.d.ts +14 -0
  80. package/constants/icon.d.ts.map +1 -0
  81. package/constants/markdown-editor.d.ts +2 -0
  82. package/constants/markdown-editor.d.ts.map +1 -0
  83. package/constants/mime-types.d.ts +27 -0
  84. package/constants/mime-types.d.ts.map +1 -0
  85. package/constants/public-class-names.d.ts +13 -0
  86. package/constants/public-class-names.d.ts.map +1 -0
  87. package/constants/resizable-fields.d.ts +5 -0
  88. package/constants/resizable-fields.d.ts.map +1 -0
  89. package/constants/select-list.d.ts +4 -0
  90. package/constants/select-list.d.ts.map +1 -0
  91. package/constants/tag-input.d.ts +2 -0
  92. package/constants/tag-input.d.ts.map +1 -0
  93. package/entry-points/file-manager.d.ts +5 -0
  94. package/entry-points/file-manager.d.ts.map +1 -0
  95. package/entry-points/markdown.d.ts +19 -0
  96. package/entry-points/markdown.d.ts.map +1 -0
  97. package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts +52 -0
  98. package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -0
  99. package/file-manager/DialFileManagerShell/DialFileManagerShell.js +128 -120
  100. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts +89 -0
  101. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts.map +1 -0
  102. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +2 -1
  103. package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts +17 -0
  104. package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts.map +1 -0
  105. package/file-manager/attach-result.d.ts +9 -0
  106. package/file-manager/attach-result.d.ts.map +1 -0
  107. package/file-manager/file-manager-controller.d.ts +121 -0
  108. package/file-manager/file-manager-controller.d.ts.map +1 -0
  109. package/file-manager/file-manager-variant.d.ts +21 -0
  110. package/file-manager/file-manager-variant.d.ts.map +1 -0
  111. package/file-manager/file-upload-validation.d.ts +8 -0
  112. package/file-manager/file-upload-validation.d.ts.map +1 -0
  113. package/file-manager/index.d.ts +10 -0
  114. package/file-manager/index.d.ts.map +1 -0
  115. package/file-manager/labels.d.ts +156 -0
  116. package/file-manager/labels.d.ts.map +1 -0
  117. package/file-manager/path.d.ts +12 -0
  118. package/file-manager/path.d.ts.map +1 -0
  119. package/file-manager/upload-batch.d.ts +29 -0
  120. package/file-manager/upload-batch.d.ts.map +1 -0
  121. package/file-manager/upload-queue.d.ts +5 -0
  122. package/file-manager/upload-queue.d.ts.map +1 -0
  123. package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts +27 -0
  124. package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts.map +1 -0
  125. package/file-manager.d.ts +2 -506
  126. package/hooks/useAvailableHeightCap.d.ts +30 -0
  127. package/hooks/useAvailableHeightCap.d.ts.map +1 -0
  128. package/hooks/useCodeCopy.d.ts +6 -0
  129. package/hooks/useCodeCopy.d.ts.map +1 -0
  130. package/hooks/useCollapsedText.d.ts +27 -0
  131. package/hooks/useCollapsedText.d.ts.map +1 -0
  132. package/hooks/useHorizontalOverflow.d.ts +21 -0
  133. package/hooks/useHorizontalOverflow.d.ts.map +1 -0
  134. package/hooks/useIsMobile.d.ts +3 -0
  135. package/hooks/useIsMobile.d.ts.map +1 -0
  136. package/hooks/useStreamedMarkdownContent.d.ts +3 -0
  137. package/hooks/useStreamedMarkdownContent.d.ts.map +1 -0
  138. package/hooks/useTextRefinement.d.ts +44 -0
  139. package/hooks/useTextRefinement.d.ts.map +1 -0
  140. package/hooks/useUnsavedChangesGuard.d.ts +14 -0
  141. package/hooks/useUnsavedChangesGuard.d.ts.map +1 -0
  142. package/index.css +2 -2
  143. package/index.d.ts +78 -3072
  144. package/index.d.ts.map +1 -0
  145. package/index.js +28 -25
  146. package/markdown.d.ts +2 -465
  147. package/markdown.js +3 -2
  148. package/models/annotation.d.ts +143 -0
  149. package/models/annotation.d.ts.map +1 -0
  150. package/models/application-visualizer.d.ts +67 -0
  151. package/models/application-visualizer.d.ts.map +1 -0
  152. package/models/auth.d.ts +26 -0
  153. package/models/auth.d.ts.map +1 -0
  154. package/models/chat.d.ts +407 -0
  155. package/models/chat.d.ts.map +1 -0
  156. package/models/conversation-classification.d.ts +9 -0
  157. package/models/conversation-classification.d.ts.map +1 -0
  158. package/models/conversation-transfer.d.ts +96 -0
  159. package/models/conversation-transfer.d.ts.map +1 -0
  160. package/models/custom-visualizer.d.ts +61 -0
  161. package/models/custom-visualizer.d.ts.map +1 -0
  162. package/models/deployment-configuration.d.ts +55 -0
  163. package/models/deployment-configuration.d.ts.map +1 -0
  164. package/models/deployment-features.d.ts +17 -0
  165. package/models/deployment-features.d.ts.map +1 -0
  166. package/models/deployment.d.ts +31 -0
  167. package/models/deployment.d.ts.map +1 -0
  168. package/models/dial-model.d.ts +19 -0
  169. package/models/dial-model.d.ts.map +1 -0
  170. package/models/entity.d.ts +15 -0
  171. package/models/entity.d.ts.map +1 -0
  172. package/models/import-export.d.ts +23 -0
  173. package/models/import-export.d.ts.map +1 -0
  174. package/models/inline-segment.d.ts +11 -0
  175. package/models/inline-segment.d.ts.map +1 -0
  176. package/models/locale.d.ts +19 -0
  177. package/models/locale.d.ts.map +1 -0
  178. package/models/text-refinement.d.ts +18 -0
  179. package/models/text-refinement.d.ts.map +1 -0
  180. package/models/theme.d.ts +36 -0
  181. package/models/theme.d.ts.map +1 -0
  182. package/models/tool-menu-item.d.ts +13 -0
  183. package/models/tool-menu-item.d.ts.map +1 -0
  184. package/package.json +3 -3
  185. package/types/attachment.d.ts +25 -0
  186. package/types/attachment.d.ts.map +1 -0
  187. package/types/code-editor.d.ts +8 -0
  188. package/types/code-editor.d.ts.map +1 -0
  189. package/types/entity-type.d.ts +10 -0
  190. package/types/entity-type.d.ts.map +1 -0
  191. package/types/file-manager-node.d.ts +17 -0
  192. package/types/file-manager-node.d.ts.map +1 -0
  193. package/types/mime-type.d.ts +59 -0
  194. package/types/mime-type.d.ts.map +1 -0
  195. package/utils/annotation.d.ts +29 -0
  196. package/utils/annotation.d.ts.map +1 -0
  197. package/utils/avatar-color.d.ts +10 -0
  198. package/utils/avatar-color.d.ts.map +1 -0
  199. package/utils/build-css-vars.d.ts +4 -0
  200. package/utils/build-css-vars.d.ts.map +1 -0
  201. package/utils/copy-to-clipboard.d.ts +18 -0
  202. package/utils/copy-to-clipboard.d.ts.map +1 -0
  203. package/utils/entity-field-limits.d.ts +11 -0
  204. package/utils/entity-field-limits.d.ts.map +1 -0
  205. package/utils/entity-type.d.ts +5 -0
  206. package/utils/entity-type.d.ts.map +1 -0
  207. package/utils/file-download.d.ts +21 -0
  208. package/utils/file-download.d.ts.map +1 -0
  209. package/utils/format-file-size.d.ts +3 -0
  210. package/utils/format-file-size.d.ts.map +1 -0
  211. package/utils/format-last-used.d.ts +3 -0
  212. package/utils/format-last-used.d.ts.map +1 -0
  213. package/utils/format-price.d.ts +7 -0
  214. package/utils/format-price.d.ts.map +1 -0
  215. package/utils/generate-uuid.d.ts +3 -0
  216. package/utils/generate-uuid.d.ts.map +1 -0
  217. package/utils/initials.d.ts +3 -0
  218. package/utils/initials.d.ts.map +1 -0
  219. package/utils/inline-segments.d.ts +38 -0
  220. package/utils/inline-segments.d.ts.map +1 -0
  221. package/utils/inline-segments.js +53 -0
  222. package/utils/is-audio-transcription-supported.d.ts +3 -0
  223. package/utils/is-audio-transcription-supported.d.ts.map +1 -0
  224. package/utils/is-skill-selection-unsupported.d.ts +3 -0
  225. package/utils/is-skill-selection-unsupported.d.ts.map +1 -0
  226. package/utils/latex.d.ts +21 -0
  227. package/utils/latex.d.ts.map +1 -0
  228. package/utils/markdown-html.d.ts +14 -0
  229. package/utils/markdown-html.d.ts.map +1 -0
  230. package/utils/markdown-html.js +11 -0
  231. package/utils/merge-class.d.ts +4 -0
  232. package/utils/merge-class.d.ts.map +1 -0
  233. package/utils/message-attachment-to-display.d.ts +22 -0
  234. package/utils/message-attachment-to-display.d.ts.map +1 -0
  235. package/utils/message.d.ts +4 -0
  236. package/utils/message.d.ts.map +1 -0
  237. package/utils/mime-type.d.ts +22 -0
  238. package/utils/mime-type.d.ts.map +1 -0
  239. package/utils/prompt-variables.d.ts +62 -0
  240. package/utils/prompt-variables.d.ts.map +1 -0
  241. package/utils/string-utils.d.ts +11 -0
  242. package/utils/string-utils.d.ts.map +1 -0
  243. package/utils/syntax-highlighting.d.ts +8 -0
  244. package/utils/syntax-highlighting.d.ts.map +1 -0
@@ -0,0 +1,59 @@
1
+ /** Well-known MIME type constants used in DIAL API attachments. */
2
+ export declare enum MIMEType {
3
+ /** GitHub-flavoured Markdown. */
4
+ Markdown = "text/markdown",
5
+ /** Plain unformatted text. */
6
+ Plain = "text/plain",
7
+ /** HTML markup. */
8
+ HTML = "text/html",
9
+ /** XHTML markup. */
10
+ XHTML = "application/xhtml+xml",
11
+ /** Cascading Style Sheets. */
12
+ CSS = "text/css",
13
+ /** JavaScript source. */
14
+ JavaScript = "text/javascript",
15
+ /** TypeScript source (non-standard but widely used). */
16
+ TypeScript = "text/typescript",
17
+ /** CSV spreadsheet data. */
18
+ CSV = "text/csv",
19
+ /** JSON data. */
20
+ JSON = "application/json",
21
+ /** XML document (application type). */
22
+ XML = "application/xml",
23
+ /** PDF document. */
24
+ PDF = "application/pdf",
25
+ /** ZIP archive. */
26
+ ZIP = "application/zip",
27
+ /** GZIP-compressed data. */
28
+ GZIP = "application/gzip",
29
+ /** JPEG raster image. */
30
+ JPEG = "image/jpeg",
31
+ /** PNG raster image. */
32
+ PNG = "image/png",
33
+ /** GIF image. */
34
+ GIF = "image/gif",
35
+ /** WebP image. */
36
+ WebP = "image/webp",
37
+ /** BMP bitmap image. */
38
+ BMP = "image/bmp",
39
+ /** SVG vector image. */
40
+ SVG = "image/svg+xml",
41
+ /** MPEG audio (`.mp3`). */
42
+ MP3 = "audio/mpeg",
43
+ /** WAV audio. */
44
+ WAV = "audio/wav",
45
+ /** Ogg audio. */
46
+ OGG = "audio/ogg"
47
+ }
48
+ /** Well-known file extension constants used as fallback when a MIME type is unavailable. */
49
+ export declare enum FileExtension {
50
+ /** PDF document. */
51
+ PDF = "pdf",
52
+ /** Markdown document (`.md`). */
53
+ Markdown = "md",
54
+ /** Markdown document, alternate extension (`.markdown`). */
55
+ MarkdownAlt = "markdown",
56
+ /** JSON document. */
57
+ JSON = "json"
58
+ }
59
+ //# sourceMappingURL=mime-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mime-type.d.ts","sourceRoot":"","sources":["../../src/types/mime-type.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,oBAAY,QAAQ;IAElB,iCAAiC;IACjC,QAAQ,kBAAkB;IAC1B,8BAA8B;IAC9B,KAAK,eAAe;IACpB,mBAAmB;IACnB,IAAI,cAAc;IAClB,oBAAoB;IACpB,KAAK,0BAA0B;IAC/B,8BAA8B;IAC9B,GAAG,aAAa;IAChB,yBAAyB;IACzB,UAAU,oBAAoB;IAC9B,wDAAwD;IACxD,UAAU,oBAAoB;IAC9B,4BAA4B;IAC5B,GAAG,aAAa;IAGhB,iBAAiB;IACjB,IAAI,qBAAqB;IACzB,uCAAuC;IACvC,GAAG,oBAAoB;IACvB,oBAAoB;IACpB,GAAG,oBAAoB;IACvB,mBAAmB;IACnB,GAAG,oBAAoB;IACvB,4BAA4B;IAC5B,IAAI,qBAAqB;IAGzB,yBAAyB;IACzB,IAAI,eAAe;IACnB,wBAAwB;IACxB,GAAG,cAAc;IACjB,iBAAiB;IACjB,GAAG,cAAc;IACjB,kBAAkB;IAClB,IAAI,eAAe;IACnB,wBAAwB;IACxB,GAAG,cAAc;IACjB,wBAAwB;IACxB,GAAG,kBAAkB;IAGrB,2BAA2B;IAC3B,GAAG,eAAe;IAClB,iBAAiB;IACjB,GAAG,cAAc;IACjB,iBAAiB;IACjB,GAAG,cAAc;CAClB;AAED,4FAA4F;AAC5F,oBAAY,aAAa;IACvB,oBAAoB;IACpB,GAAG,QAAQ;IACX,iCAAiC;IACjC,QAAQ,OAAO;IACf,4DAA4D;IAC5D,WAAW,aAAa;IACxB,qBAAqB;IACrB,IAAI,SAAS;CACd"}
@@ -0,0 +1,29 @@
1
+ import { Annotation, AnnotationSelector } from '../models/annotation';
2
+ import { MessageAttachment } from '../models/chat';
3
+ /** Returns whether `value` is shaped like an annotation selector. */
4
+ export declare const isAnnotationSelector: (value: unknown) => value is AnnotationSelector;
5
+ /**
6
+ * Repairs persisted `html_tag` annotations created by older normalizers that
7
+ * defaulted every non-HTML source to PDF. An explicit, recognized file
8
+ * extension is more reliable than that historical fallback; opaque URLs keep
9
+ * their stored type so genuine PDF citations without an extension still work.
10
+ */
11
+ export declare const normalizePersistedHtmlTagAttachmentType: (annotation: Annotation) => Annotation;
12
+ /**
13
+ * Normalizes raw annotations from the API wire format (stored in
14
+ * `message.custom_fields.annotations`) to the internal `Annotation` model.
15
+ *
16
+ * Recognizes two wire shapes:
17
+ * - `target.source.attachment_index` (integer) + a `pdf_region` selector
18
+ * with `{ left, top, width, height }` coordinates, resolved against
19
+ * `attachments` and converted to `body.source.attachment.url` + a
20
+ * `pdf_bbox` selector with `{ x1, y1, x2, y2 }` coordinates.
21
+ * - `target.selector` of type `html_tag` (`{ tag, id }`) with a flat
22
+ * `body.source = { type: 'attachment', url }` — normalized to
23
+ * `body.source.attachment.url`/`.title` directly, with no attachment-list
24
+ * lookup, preserving optional indexes and document selectors.
25
+ *
26
+ * Annotations matching neither shape are omitted from the result.
27
+ */
28
+ export declare const normalizeRawAnnotations: (rawAnnotations: unknown[], attachments: MessageAttachment[]) => Annotation[];
29
+ //# sourceMappingURL=annotation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotation.d.ts","sourceRoot":"","sources":["../../src/utils/annotation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAGnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAmCxD,qEAAqE;AACrE,eAAO,MAAM,oBAAoB,GAC/B,OAAO,OAAO,KACb,KAAK,IAAI,kBAKoB,CAAC;AAmJjC;;;;;GAKG;AACH,eAAO,MAAM,uCAAuC,GAClD,YAAY,UAAU,KACrB,UAsBF,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,GAClC,gBAAgB,OAAO,EAAE,EACzB,aAAa,iBAAiB,EAAE,KAC/B,UAAU,EAeT,CAAC"}
@@ -0,0 +1,10 @@
1
+ /** A background/foreground colour pair for an initials avatar badge. */
2
+ export interface AvatarColorEntry {
3
+ /** CSS colour value for the badge background — a theme token with a hex fallback. */
4
+ background: string;
5
+ /** CSS colour value for the initials text — a theme token with a hex fallback. */
6
+ foreground: string;
7
+ }
8
+ /** Returns a deterministic colour-pair for the given display name. */
9
+ export declare const pickAvatarColor: (name: string) => AvatarColorEntry;
10
+ //# sourceMappingURL=avatar-color.d.ts.map
@@ -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,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"}
@@ -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"}
@@ -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 = 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,21 @@
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 deliberately left as-is: they are
17
+ * 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`.
19
+ */
20
+ export declare const preprocessLaTeX: (content: string) => string;
21
+ //# sourceMappingURL=latex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"latex.d.ts","sourceRoot":"","sources":["../../src/utils/latex.ts"],"names":[],"mappings":"AA0SA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,KAAG,MAoEjD,CAAC"}
@@ -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"}
@@ -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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mime-type.d.ts","sourceRoot":"","sources":["../../src/utils/mime-type.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAoF9C,0HAA0H;AAC1H,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,KAAG,MACN,CAAC;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,KAAG,MAGpD,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,wBAAwB,GAAI,KAAK,MAAM,KAAG,MACjC,CAAC;AAEvB;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,KAAG,QAAQ,GAAG,SAM/D,CAAC;AAEF,+GAA+G;AAC/G,eAAO,MAAM,yBAAyB,GACpC,UAAU,MAAM,GAAG,SAAS,KAC3B,cAIF,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Matches a `{{name}}` or `{{name|defaultValue}}` placeholder. The inner run
3
+ * excludes braces so a stray `{{` cannot swallow the rest of the document, and
4
+ * it must be non-empty so a literal `{{}}` stays plain text.
5
+ */
6
+ export declare const PROMPT_PARAM_PATTERN: RegExp;
7
+ /** Class applied to each highlighted placeholder. The host owns its styling. */
8
+ export declare const PROMPT_VARIABLE_CLASS_NAME = "cat-prompt-variable";
9
+ /** Minimal hast shapes this plugin reads and writes. */
10
+ interface HastNode {
11
+ type: string;
12
+ tagName?: string;
13
+ value?: string;
14
+ properties?: Record<string, unknown>;
15
+ children?: HastNode[];
16
+ }
17
+ /**
18
+ * Rehype plugin that wraps every `{{name}}` placeholder in a span so it can be
19
+ * styled apart from the surrounding prose. Placeholders inside code are left
20
+ * alone.
21
+ *
22
+ * The spans are built as hast nodes rather than injected as raw HTML, so a
23
+ * placeholder that contains markup cannot escape into the document.
24
+ */
25
+ export declare const rehypePromptVariables: () => (tree: HastNode) => void;
26
+ /**
27
+ * Separator between a parameter's name and its default value inside a token.
28
+ * `{{language|Spanish}}` names the parameter `language` and offers `Spanish`
29
+ * as its starting value. It is the form the classic chat's prompt editor
30
+ * documents, so prompts authored there carry it.
31
+ */
32
+ export declare const PROMPT_PARAM_DEFAULT_SEPARATOR = "|";
33
+ /** A `{{name}}` or `{{name|defaultValue}}` parameter read out of a prompt. */
34
+ export interface PromptParameter {
35
+ /** The parameter's name — the label a host shows, and the key its value is read by. */
36
+ name: string;
37
+ /**
38
+ * The value the field starts with, when the token carried one. Absent for a
39
+ * bare `{{name}}` token.
40
+ */
41
+ defaultValue?: string;
42
+ }
43
+ /**
44
+ * Returns the distinct parameters found in `content`, in first-occurrence
45
+ * order. Single-brace sequences (e.g. `{name}`) are not parameters. When one
46
+ * name appears more than once the first occurrence decides the default, so the
47
+ * parameter is still asked for once.
48
+ */
49
+ export declare const extractPromptParams: (content: string) => PromptParameter[];
50
+ /**
51
+ * Replaces every parameter occurrence in `content` with the matching entry in
52
+ * `values` (keyed by parameter name), falling back to the token's own default
53
+ * value. A token with neither is left unchanged.
54
+ */
55
+ export declare const resolvePromptParams: (content: string, values: Record<string, string>) => string;
56
+ /**
57
+ * Returns the starting values for `parameters`, keyed by name — one entry per
58
+ * parameter that carries a default, and nothing for the rest.
59
+ */
60
+ export declare const buildPromptParamDefaults: (parameters: PromptParameter[]) => Record<string, string>;
61
+ export {};
62
+ //# sourceMappingURL=prompt-variables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-variables.d.ts","sourceRoot":"","sources":["../../src/utils/prompt-variables.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,QAAsB,CAAC;AAExD,gFAAgF;AAChF,eAAO,MAAM,0BAA0B,wBAAwB,CAAC;AAEhE,wDAAwD;AACxD,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;AAoDD;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,SAAU,MAAM,QAAQ,SAEzD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAElD,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC9B,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAkBD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM,KAAG,eAAe,EAYpE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAC9B,SAAS,MAAM,EACf,QAAQ,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC7B,MAIC,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GACnC,YAAY,eAAe,EAAE,KAC5B,MAAM,CAAC,MAAM,EAAE,MAAM,CAMvB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /** Characters prohibited in conversation names: tab, ", :, ;, /, \, ,, =, {, }, %, & */
2
+ export declare const PROHIBITED_CONVERSATION_NAME_CHARS_RE: RegExp;
3
+ /** Strips characters DIAL Core rejects in a conversation name. */
4
+ export declare const sanitizeConversationName: (name: string) => string;
5
+ /** Strips trailing `.` characters from a name. */
6
+ export declare const stripTrailingDots: (name: string) => string;
7
+ /** Returns the UTF-8 byte length of `str`. */
8
+ export declare const getUtf8ByteLength: (str: string) => number;
9
+ /** Truncates `str` to at most `maxBytes` UTF-8 bytes without splitting multi-byte characters. */
10
+ export declare const truncateToUtf8Bytes: (str: string, maxBytes: number) => string;
11
+ //# sourceMappingURL=string-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string-utils.d.ts","sourceRoot":"","sources":["../../src/utils/string-utils.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,eAAO,MAAM,qCAAqC,QAAsB,CAAC;AAEzE,kEAAkE;AAClE,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,KAAG,MACC,CAAC;AAE1D,kDAAkD;AAClD,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,MAQhD,CAAC;AAKF,8CAA8C;AAC9C,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,KAAG,MACpB,CAAC;AAE7B,iGAAiG;AACjG,eAAO,MAAM,mBAAmB,GAAI,KAAK,MAAM,EAAE,UAAU,MAAM,KAAG,MAanE,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Bounds input sent to synchronous syntax highlighters. Oversized input should
3
+ * render as complete plain text instead. Limits count UTF-16 code units and
4
+ * recognize LF, CRLF, and CR line endings. This is a size guard, not a timeout
5
+ * or a guarantee against pathological grammars on smaller inputs.
6
+ */
7
+ export declare const isSyntaxHighlightingAllowed: (text: string) => boolean;
8
+ //# sourceMappingURL=syntax-highlighting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syntax-highlighting.d.ts","sourceRoot":"","sources":["../../src/utils/syntax-highlighting.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GAAI,MAAM,MAAM,KAAG,OAc1D,CAAC"}