@epam/ai-dial-chat-shared 1.2.0-dev.75 → 1.2.0-dev.78

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.
@@ -31,6 +31,7 @@ var e = {
31
31
  "application/typescript": "ts",
32
32
  "application/xhtml+xml": "xhtml",
33
33
  "application/xml": "xml",
34
+ "application/yaml": "yaml",
34
35
  "application/vnd.amazon.ebook": "azw",
35
36
  "application/vnd.apple.installer+xml": "mpkg",
36
37
  "application/vnd.ms-excel": "xls",
@@ -94,6 +95,52 @@ var e = {
94
95
  "video/ogg": "ogv",
95
96
  "video/webm": "webm",
96
97
  "video/x-msvideo": "avi"
97
- }, t = "*/*", n = "audio/";
98
+ }, t = "*/*", n = "audio/", r = {
99
+ "text/json": "application/json",
100
+ "text/x-json": "application/json",
101
+ "application/x-json": "application/json",
102
+ "text/xml": "application/xml",
103
+ "application/javascript": "text/javascript",
104
+ "application/x-javascript": "text/javascript",
105
+ "application/typescript": "text/typescript",
106
+ "text/x-markdown": "text/markdown",
107
+ "application/markdown": "text/markdown",
108
+ "application/csv": "text/csv",
109
+ "text/x-csv": "text/csv",
110
+ "text/comma-separated-values": "text/csv",
111
+ "text/yaml": "application/yaml",
112
+ "text/x-yaml": "application/yaml",
113
+ "application/x-yaml": "application/yaml",
114
+ "text/sql": "application/sql",
115
+ "text/x-sql": "application/sql",
116
+ "application/php": "text/x-php",
117
+ "application/x-php": "text/x-php",
118
+ "application/x-httpd-php": "text/x-php",
119
+ "application/x-rust": "text/x-rustsrc",
120
+ "application/x-pdf": "application/pdf",
121
+ "application/vnd.ms-word": "application/msword",
122
+ "application/excel": "application/vnd.ms-excel",
123
+ "application/x-excel": "application/vnd.ms-excel",
124
+ "application/x-msexcel": "application/vnd.ms-excel",
125
+ "application/powerpoint": "application/vnd.ms-powerpoint",
126
+ "application/mspowerpoint": "application/vnd.ms-powerpoint",
127
+ "application/x-zip": "application/zip",
128
+ "application/x-zip-compressed": "application/zip",
129
+ "application/x-gzip": "application/gzip",
130
+ "application/x-rar-compressed": "application/vnd.rar",
131
+ "image/jpg": "image/jpeg",
132
+ "image/pjpeg": "image/jpeg",
133
+ "image/x-png": "image/png",
134
+ "image/svg": "image/svg+xml",
135
+ "image/icon": "image/vnd.microsoft.icon",
136
+ "image/x-icon": "image/vnd.microsoft.icon",
137
+ "audio/mp3": "audio/mpeg",
138
+ "audio/mpeg3": "audio/mpeg",
139
+ "audio/x-mpeg-3": "audio/mpeg",
140
+ "audio/wave": "audio/wav",
141
+ "audio/x-wav": "audio/wav",
142
+ "audio/vnd.wave": "audio/wav",
143
+ "audio/x-m4a": "audio/mp4"
144
+ };
98
145
  //#endregion
99
- export { n as MIME_TYPE_AUDIO_PREFIX, e as MIME_TYPE_EXT_MAP, t as MIME_TYPE_WILDCARD };
146
+ export { r as MIME_TYPE_ALIASES, n as MIME_TYPE_AUDIO_PREFIX, e as MIME_TYPE_EXT_MAP, t as MIME_TYPE_WILDCARD };
package/index.d.ts CHANGED
@@ -1240,6 +1240,9 @@ export declare const generateUUID: () => string;
1240
1240
  /** Classifies a MIME type into an `AttachmentType` by prefix (`image/*` / `audio/*`), defaulting to `File`. */
1241
1241
  export declare const getAttachmentTypeFromMime: (mimeType: string | undefined) => AttachmentType;
1242
1242
 
1243
+ /** Lowercases a MIME type and strips its parameters, e.g. `'Application/JSON; charset=utf-8'` -> `'application/json'`. */
1244
+ export declare const getBaseMimeType: (mimeType: string) => string;
1245
+
1243
1246
  /** Returns the file extension (without a leading dot) for a fenced-code-block language identifier, defaulting to `txt`. */
1244
1247
  export declare const getFileExtensionForLanguage: (language: string) => string;
1245
1248
 
@@ -1830,6 +1833,21 @@ export declare interface MessageState {
1830
1833
  tool_execution_history?: ToolExecutionHistoryMessage[];
1831
1834
  }
1832
1835
 
1836
+ /**
1837
+ * Maps non-canonical MIME type spellings to the canonical type they denote.
1838
+ *
1839
+ * Deployments declare their `inputAttachmentTypes` by hand, while DIAL Core
1840
+ * stores the content type a browser or an upload client reported, so the two
1841
+ * sides routinely disagree on which of several equivalent spellings to use for
1842
+ * the same format (`text/json` vs `application/json`). Resolving both through
1843
+ * this map before comparing them keeps a declared type matching the files it
1844
+ * is meant to describe.
1845
+ *
1846
+ * Only aliases for one and the same format belong here — never a pair of
1847
+ * distinct formats that happen to share an extension.
1848
+ */
1849
+ export declare const MIME_TYPE_ALIASES: Record<string, string>;
1850
+
1833
1851
  /** MIME type prefix shared by all audio content types. */
1834
1852
  export declare const MIME_TYPE_AUDIO_PREFIX = "audio/";
1835
1853
 
@@ -1899,6 +1917,14 @@ export declare const MOBILE_MAX_WIDTH_PX: number;
1899
1917
  /** `matchMedia` query matching the mobile/tablet band (up to 1279px). */
1900
1918
  export declare const MOBILE_MEDIA_QUERY = "(max-width: 1279px)";
1901
1919
 
1920
+ /**
1921
+ * Returns the canonical spelling of a MIME type: parameters stripped, lowercased,
1922
+ * and known aliases resolved through `MIME_TYPE_ALIASES` (`'text/json'` ->
1923
+ * `'application/json'`). Wildcards and unrecognized types are returned unchanged
1924
+ * apart from that normalization.
1925
+ */
1926
+ export declare const normalizeMimeType: (mimeType: string) => string;
1927
+
1902
1928
  /**
1903
1929
  * Repairs persisted `html_tag` annotations created by older normalizers that
1904
1930
  * defaulted every non-HTML source to PDF. An explicit, recognized file
package/index.js CHANGED
@@ -6,59 +6,59 @@ import { AttachmentErrorReason as f, AttachmentType as p } from "./types/attachm
6
6
  import { CatalogEntityType as m } from "./types/entity-type.js";
7
7
  import { FileExtension as h, MIMEType as g } from "./types/mime-type.js";
8
8
  import { CodeBlockTheme as _ } from "./types/code-editor.js";
9
- import { getAttachmentTypeFromMime as v, inferMimeTypeFromPath as y, stripUrlQueryAndFragment as b } from "./utils/mime-type.js";
10
- import { isAnnotationSelector as x, normalizePersistedHtmlTagAttachmentType as S, normalizeRawAnnotations as C } from "./utils/annotation.js";
11
- import { PROHIBITED_CONVERSATION_NAME_CHARS_RE as w, getUtf8ByteLength as T, sanitizeConversationName as E, stripTrailingDots as D, truncateToUtf8Bytes as O } from "./utils/string-utils.js";
12
- import { mergeClasses as k } from "./utils/merge-class.js";
13
- import { buildCssVars as A } from "./utils/build-css-vars.js";
14
- import { isStatusMessage as j } from "./utils/message.js";
15
- import { messageAttachmentToDisplayAttachment as M, messageAttachmentsToDisplayAttachments as N } from "./utils/message-attachment-to-display.js";
16
- import { MIME_TYPE_AUDIO_PREFIX as P, MIME_TYPE_EXT_MAP as F, MIME_TYPE_WILDCARD as I } from "./constants/mime-types.js";
17
- import { isAudioTranscriptionSupported as L } from "./utils/is-audio-transcription-supported.js";
18
- import { copyMarkdownAsRichText as R, copyToClipboard as z, markdownToRichTextHtml as B } from "./utils/copy-to-clipboard.js";
19
- import { formatLastUsed as V } from "./utils/format-last-used.js";
20
- import { formatFileSize as H } from "./utils/format-file-size.js";
21
- import { formatCost as U, formatPrice as W, formatUnitPrice as G } from "./utils/format-price.js";
22
- import { base64ToBlob as K, downloadTextFile as q, ensureDownloadFilename as J, getFileExtensionForLanguage as Y, triggerAnchorDownload as X, triggerBlobDownload as Z, tryBase64ToBytes as Q } from "./utils/file-download.js";
23
- import { ENTITY_TYPE_BG_COLOR as $, ENTITY_TYPE_COLOR as ee } from "./constants/entity-colors.js";
24
- import { PROMPT_PARAM_DEFAULT_SEPARATOR as te, PROMPT_PARAM_PATTERN as ne, PROMPT_VARIABLE_CLASS_NAME as re, buildPromptParamDefaults as ie, extractPromptParams as ae, rehypePromptVariables as oe, resolvePromptParams as se } from "./utils/prompt-variables.js";
25
- import { generateUUID as ce } from "./utils/generate-uuid.js";
26
- import { BASE_LG_ICON_PROPS as le, BASE_MD_ICON_PROPS as ue } from "./constants/icon.js";
27
- import { HIDDEN_FILE as de } from "./constants/dial.js";
28
- import { TAG_INPUT_TAG_CLASS_NAME as fe } from "./constants/tag-input.js";
29
- import { MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as pe, RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE as me, RESIZABLE_TEXTAREA_CLASS_NAME as he } from "./constants/resizable-fields.js";
30
- import { MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as ge } from "./constants/markdown-editor.js";
31
- import { SELECT_LIST_MAX_HEIGHT_CLASS_NAME as _e, SELECT_LIST_MAX_HEIGHT_PX as ve } from "./constants/select-list.js";
32
- import { DESKTOP_BREAKPOINT_PX as ye, DESKTOP_MEDIA_QUERY as be, MOBILE_MAX_WIDTH_PX as xe, MOBILE_MEDIA_QUERY as Se } from "./constants/breakpoint.js";
33
- import { pickAvatarColor as Ce } from "./utils/avatar-color.js";
34
- import { extractInitials as we } from "./utils/initials.js";
35
- import { InitialsAvatar as Te } from "./components/InitialsAvatar/InitialsAvatar.js";
36
- import { DeploymentIcon as Ee } from "./components/DeploymentIcon/DeploymentIcon.js";
37
- import { CopyButton as De, CopyIconButton as Oe } from "./components/CopyButton/CopyButton.js";
38
- import { PanelEmptyState as ke } from "./components/PanelEmptyState/PanelEmptyState.js";
39
- import { ItemHeader as Ae } from "./components/ItemHeader/ItemHeader.js";
40
- import { EntityTypeLabel as je } from "./components/EntityTypeLabel/EntityTypeLabel.js";
41
- import { FeaturedChip as Me } from "./components/FeaturedChip/FeaturedChip.js";
42
- import { EntityHeader as Ne } from "./components/EntityHeader/EntityHeader.js";
43
- import { ResourceSummary as Pe } from "./components/ResourceSummary/ResourceSummary.js";
44
- import { TableHeader as Fe } from "./components/MarkdownRenderer/Table/TableHeader.js";
45
- import { CHAT_SHARED_CLASS as Ie } from "./constants/public-class-names.js";
46
- import { useCodeCopy as Le } from "./hooks/useCodeCopy.js";
47
- import { restrainedSyntaxTheme as Re } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
48
- import { MarkdownCodeBlock as ze } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
49
- import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as Be, MARKDOWN_TABLE_CSV_MIME_TYPE as Ve, MarkdownTableCopyFormat as He, serializeMarkdownTableRows as Ue } from "./components/MarkdownRenderer/Table/table-serialization.js";
50
- import { MarkdownTable as We } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
51
- import { MarkdownRenderer as Ge, defaultMarkdownComponents as Ke } from "./components/MarkdownRenderer/MarkdownRenderer.js";
52
- import { COMPACT_MARKDOWN_CLASS_NAMES as qe, DEFAULT_MARKDOWN_CLASS_NAMES as Je } from "./components/MarkdownRenderer/markdown-class-names.js";
53
- import { MDMessageViewer as Ye } from "./components/MarkdownRenderer/MDMessageViewer.js";
54
- import { MarkdownWithPlaceholders as Xe } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
55
- import { useCollapsedText as Ze } from "./hooks/useCollapsedText.js";
56
- import { useAvailableHeightCap as Qe } from "./hooks/useAvailableHeightCap.js";
57
- import { useIsMobile as $e } from "./hooks/useIsMobile.js";
58
- import { DialFileManagerActionProfile as et, DialFileManagerVariant as tt } from "./file-manager/file-manager-variant.js";
59
- import { getParentFolderPath as nt, isHiddenPath as rt } from "./file-manager/path.js";
60
- import { FileUploadStatus as it } from "./file-manager/upload-batch.js";
61
- import { useGridEditingScroll as at } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
62
- import { OperationLoaderModal as ot } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
63
- import { UploadProgressModal as st } from "./file-manager/UploadProgressModal/UploadProgressModal.js";
64
- export { f as AttachmentErrorReason, p as AttachmentType, le as BASE_LG_ICON_PROPS, ue as BASE_MD_ICON_PROPS, Ie as CHAT_SHARED_CLASS, qe as COMPACT_MARKDOWN_CLASS_NAMES, m as CatalogEntityType, _ as CodeBlockTheme, e as ConversationTransferErrorCode, t as ConversationTransferJobStatus, n as ConversationTransferSubjectKind, r as ConversationTransferUnitKind, i as ConversationTransferWarningCode, De as CopyButton, Oe as CopyIconButton, Je as DEFAULT_MARKDOWN_CLASS_NAMES, Be as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, ye as DESKTOP_BREAKPOINT_PX, be as DESKTOP_MEDIA_QUERY, Ee as DeploymentIcon, et as DialFileManagerActionProfile, tt as DialFileManagerVariant, $ as ENTITY_TYPE_BG_COLOR, ee as ENTITY_TYPE_COLOR, Ne as EntityHeader, je as EntityTypeLabel, Me as FeaturedChip, h as FileExtension, it as FileUploadStatus, a as FilterTab, de as HIDDEN_FILE, Te as InitialsAvatar, Ae as ItemHeader, pe as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, ge as MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME, Ve as MARKDOWN_TABLE_CSV_MIME_TYPE, Ye as MDMessageViewer, g as MIMEType, P as MIME_TYPE_AUDIO_PREFIX, F as MIME_TYPE_EXT_MAP, I as MIME_TYPE_WILDCARD, xe as MOBILE_MAX_WIDTH_PX, Se as MOBILE_MEDIA_QUERY, ze as MarkdownCodeBlock, Ge as MarkdownRenderer, We as MarkdownTable, He as MarkdownTableCopyFormat, Xe as MarkdownWithPlaceholders, o as MessageRating, s as MessageRole, ot as OperationLoaderModal, w as PROHIBITED_CONVERSATION_NAME_CHARS_RE, te as PROMPT_PARAM_DEFAULT_SEPARATOR, ne as PROMPT_PARAM_PATTERN, re as PROMPT_VARIABLE_CLASS_NAME, ke as PanelEmptyState, me as RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE, he as RESIZABLE_TEXTAREA_CLASS_NAME, c as RequestStatus, Pe as ResourceSummary, d as ResponseFormat, _e as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, ve as SELECT_LIST_MAX_HEIGHT_PX, l as StageStatus, u as StatusEvent, fe as TAG_INPUT_TAG_CLASS_NAME, Fe as TableHeader, st as UploadProgressModal, K as base64ToBlob, A as buildCssVars, ie as buildPromptParamDefaults, R as copyMarkdownAsRichText, z as copyToClipboard, Ke as defaultMarkdownComponents, q as downloadTextFile, J as ensureDownloadFilename, we as extractInitials, ae as extractPromptParams, U as formatCost, H as formatFileSize, V as formatLastUsed, W as formatPrice, G as formatUnitPrice, ce as generateUUID, v as getAttachmentTypeFromMime, Y as getFileExtensionForLanguage, nt as getParentFolderPath, T as getUtf8ByteLength, y as inferMimeTypeFromPath, x as isAnnotationSelector, L as isAudioTranscriptionSupported, rt as isHiddenPath, j as isStatusMessage, B as markdownToRichTextHtml, k as mergeClasses, M as messageAttachmentToDisplayAttachment, N as messageAttachmentsToDisplayAttachments, S as normalizePersistedHtmlTagAttachmentType, C as normalizeRawAnnotations, Ce as pickAvatarColor, oe as rehypePromptVariables, se as resolvePromptParams, Re as restrainedSyntaxTheme, E as sanitizeConversationName, Ue as serializeMarkdownTableRows, D as stripTrailingDots, b as stripUrlQueryAndFragment, X as triggerAnchorDownload, Z as triggerBlobDownload, O as truncateToUtf8Bytes, Q as tryBase64ToBytes, Qe as useAvailableHeightCap, Le as useCodeCopy, Ze as useCollapsedText, at as useGridEditingScroll, $e as useIsMobile };
9
+ import { MIME_TYPE_ALIASES as v, MIME_TYPE_AUDIO_PREFIX as y, MIME_TYPE_EXT_MAP as b, MIME_TYPE_WILDCARD as x } from "./constants/mime-types.js";
10
+ import { getAttachmentTypeFromMime as S, getBaseMimeType as C, inferMimeTypeFromPath as w, normalizeMimeType as T, stripUrlQueryAndFragment as E } from "./utils/mime-type.js";
11
+ import { isAnnotationSelector as D, normalizePersistedHtmlTagAttachmentType as O, normalizeRawAnnotations as k } from "./utils/annotation.js";
12
+ import { PROHIBITED_CONVERSATION_NAME_CHARS_RE as A, getUtf8ByteLength as j, sanitizeConversationName as M, stripTrailingDots as N, truncateToUtf8Bytes as P } from "./utils/string-utils.js";
13
+ import { mergeClasses as F } from "./utils/merge-class.js";
14
+ import { buildCssVars as I } from "./utils/build-css-vars.js";
15
+ import { isStatusMessage as L } from "./utils/message.js";
16
+ import { messageAttachmentToDisplayAttachment as R, messageAttachmentsToDisplayAttachments as z } from "./utils/message-attachment-to-display.js";
17
+ import { isAudioTranscriptionSupported as B } from "./utils/is-audio-transcription-supported.js";
18
+ import { copyMarkdownAsRichText as V, copyToClipboard as H, markdownToRichTextHtml as U } from "./utils/copy-to-clipboard.js";
19
+ import { formatLastUsed as W } from "./utils/format-last-used.js";
20
+ import { formatFileSize as G } from "./utils/format-file-size.js";
21
+ import { formatCost as K, formatPrice as q, formatUnitPrice as J } from "./utils/format-price.js";
22
+ import { base64ToBlob as Y, downloadTextFile as X, ensureDownloadFilename as Z, getFileExtensionForLanguage as Q, triggerAnchorDownload as $, triggerBlobDownload as ee, tryBase64ToBytes as te } from "./utils/file-download.js";
23
+ import { ENTITY_TYPE_BG_COLOR as ne, ENTITY_TYPE_COLOR as re } from "./constants/entity-colors.js";
24
+ import { PROMPT_PARAM_DEFAULT_SEPARATOR as ie, PROMPT_PARAM_PATTERN as ae, PROMPT_VARIABLE_CLASS_NAME as oe, buildPromptParamDefaults as se, extractPromptParams as ce, rehypePromptVariables as le, resolvePromptParams as ue } from "./utils/prompt-variables.js";
25
+ import { generateUUID as de } from "./utils/generate-uuid.js";
26
+ import { BASE_LG_ICON_PROPS as fe, BASE_MD_ICON_PROPS as pe } from "./constants/icon.js";
27
+ import { HIDDEN_FILE as me } from "./constants/dial.js";
28
+ import { TAG_INPUT_TAG_CLASS_NAME as he } from "./constants/tag-input.js";
29
+ import { MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as ge, RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE as _e, RESIZABLE_TEXTAREA_CLASS_NAME as ve } from "./constants/resizable-fields.js";
30
+ import { MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as ye } from "./constants/markdown-editor.js";
31
+ import { SELECT_LIST_MAX_HEIGHT_CLASS_NAME as be, SELECT_LIST_MAX_HEIGHT_PX as xe } from "./constants/select-list.js";
32
+ import { DESKTOP_BREAKPOINT_PX as Se, DESKTOP_MEDIA_QUERY as Ce, MOBILE_MAX_WIDTH_PX as we, MOBILE_MEDIA_QUERY as Te } from "./constants/breakpoint.js";
33
+ import { pickAvatarColor as Ee } from "./utils/avatar-color.js";
34
+ import { extractInitials as De } from "./utils/initials.js";
35
+ import { InitialsAvatar as Oe } from "./components/InitialsAvatar/InitialsAvatar.js";
36
+ import { DeploymentIcon as ke } from "./components/DeploymentIcon/DeploymentIcon.js";
37
+ import { CopyButton as Ae, CopyIconButton as je } from "./components/CopyButton/CopyButton.js";
38
+ import { PanelEmptyState as Me } from "./components/PanelEmptyState/PanelEmptyState.js";
39
+ import { ItemHeader as Ne } from "./components/ItemHeader/ItemHeader.js";
40
+ import { EntityTypeLabel as Pe } from "./components/EntityTypeLabel/EntityTypeLabel.js";
41
+ import { FeaturedChip as Fe } from "./components/FeaturedChip/FeaturedChip.js";
42
+ import { EntityHeader as Ie } from "./components/EntityHeader/EntityHeader.js";
43
+ import { ResourceSummary as Le } from "./components/ResourceSummary/ResourceSummary.js";
44
+ import { TableHeader as Re } from "./components/MarkdownRenderer/Table/TableHeader.js";
45
+ import { CHAT_SHARED_CLASS as ze } from "./constants/public-class-names.js";
46
+ import { useCodeCopy as Be } from "./hooks/useCodeCopy.js";
47
+ import { restrainedSyntaxTheme as Ve } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
48
+ import { MarkdownCodeBlock as He } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
49
+ import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as Ue, MARKDOWN_TABLE_CSV_MIME_TYPE as We, MarkdownTableCopyFormat as Ge, serializeMarkdownTableRows as Ke } from "./components/MarkdownRenderer/Table/table-serialization.js";
50
+ import { MarkdownTable as qe } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
51
+ import { MarkdownRenderer as Je, defaultMarkdownComponents as Ye } from "./components/MarkdownRenderer/MarkdownRenderer.js";
52
+ import { COMPACT_MARKDOWN_CLASS_NAMES as Xe, DEFAULT_MARKDOWN_CLASS_NAMES as Ze } from "./components/MarkdownRenderer/markdown-class-names.js";
53
+ import { MDMessageViewer as Qe } from "./components/MarkdownRenderer/MDMessageViewer.js";
54
+ import { MarkdownWithPlaceholders as $e } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
55
+ import { useCollapsedText as et } from "./hooks/useCollapsedText.js";
56
+ import { useAvailableHeightCap as tt } from "./hooks/useAvailableHeightCap.js";
57
+ import { useIsMobile as nt } from "./hooks/useIsMobile.js";
58
+ import { DialFileManagerActionProfile as rt, DialFileManagerVariant as it } from "./file-manager/file-manager-variant.js";
59
+ import { getParentFolderPath as at, isHiddenPath as ot } from "./file-manager/path.js";
60
+ import { FileUploadStatus as st } from "./file-manager/upload-batch.js";
61
+ import { useGridEditingScroll as ct } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
62
+ import { OperationLoaderModal as lt } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
63
+ import { UploadProgressModal as ut } from "./file-manager/UploadProgressModal/UploadProgressModal.js";
64
+ export { f as AttachmentErrorReason, p as AttachmentType, fe as BASE_LG_ICON_PROPS, pe as BASE_MD_ICON_PROPS, ze as CHAT_SHARED_CLASS, Xe as COMPACT_MARKDOWN_CLASS_NAMES, m as CatalogEntityType, _ as CodeBlockTheme, e as ConversationTransferErrorCode, t as ConversationTransferJobStatus, n as ConversationTransferSubjectKind, r as ConversationTransferUnitKind, i as ConversationTransferWarningCode, Ae as CopyButton, je as CopyIconButton, Ze as DEFAULT_MARKDOWN_CLASS_NAMES, Ue as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, Se as DESKTOP_BREAKPOINT_PX, Ce as DESKTOP_MEDIA_QUERY, ke as DeploymentIcon, rt as DialFileManagerActionProfile, it as DialFileManagerVariant, ne as ENTITY_TYPE_BG_COLOR, re as ENTITY_TYPE_COLOR, Ie as EntityHeader, Pe as EntityTypeLabel, Fe as FeaturedChip, h as FileExtension, st as FileUploadStatus, a as FilterTab, me as HIDDEN_FILE, Oe as InitialsAvatar, Ne as ItemHeader, ge as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, ye as MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME, We as MARKDOWN_TABLE_CSV_MIME_TYPE, Qe as MDMessageViewer, g as MIMEType, v as MIME_TYPE_ALIASES, y as MIME_TYPE_AUDIO_PREFIX, b as MIME_TYPE_EXT_MAP, x as MIME_TYPE_WILDCARD, we as MOBILE_MAX_WIDTH_PX, Te as MOBILE_MEDIA_QUERY, He as MarkdownCodeBlock, Je as MarkdownRenderer, qe as MarkdownTable, Ge as MarkdownTableCopyFormat, $e as MarkdownWithPlaceholders, o as MessageRating, s as MessageRole, lt as OperationLoaderModal, A as PROHIBITED_CONVERSATION_NAME_CHARS_RE, ie as PROMPT_PARAM_DEFAULT_SEPARATOR, ae as PROMPT_PARAM_PATTERN, oe as PROMPT_VARIABLE_CLASS_NAME, Me as PanelEmptyState, _e as RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE, ve as RESIZABLE_TEXTAREA_CLASS_NAME, c as RequestStatus, Le as ResourceSummary, d as ResponseFormat, be as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, xe as SELECT_LIST_MAX_HEIGHT_PX, l as StageStatus, u as StatusEvent, he as TAG_INPUT_TAG_CLASS_NAME, Re as TableHeader, ut as UploadProgressModal, Y as base64ToBlob, I as buildCssVars, se as buildPromptParamDefaults, V as copyMarkdownAsRichText, H as copyToClipboard, Ye as defaultMarkdownComponents, X as downloadTextFile, Z as ensureDownloadFilename, De as extractInitials, ce as extractPromptParams, K as formatCost, G as formatFileSize, W as formatLastUsed, q as formatPrice, J as formatUnitPrice, de as generateUUID, S as getAttachmentTypeFromMime, C as getBaseMimeType, Q as getFileExtensionForLanguage, at as getParentFolderPath, j as getUtf8ByteLength, w as inferMimeTypeFromPath, D as isAnnotationSelector, B as isAudioTranscriptionSupported, ot as isHiddenPath, L as isStatusMessage, U as markdownToRichTextHtml, F as mergeClasses, R as messageAttachmentToDisplayAttachment, z as messageAttachmentsToDisplayAttachments, T as normalizeMimeType, O as normalizePersistedHtmlTagAttachmentType, k as normalizeRawAnnotations, Ee as pickAvatarColor, le as rehypePromptVariables, ue as resolvePromptParams, Ve as restrainedSyntaxTheme, M as sanitizeConversationName, Ke as serializeMarkdownTableRows, N as stripTrailingDots, E as stripUrlQueryAndFragment, $ as triggerAnchorDownload, ee as triggerBlobDownload, P as truncateToUtf8Bytes, te as tryBase64ToBytes, tt as useAvailableHeightCap, Be as useCodeCopy, et as useCollapsedText, ct as useGridEditingScroll, nt as useIsMobile };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-chat-shared",
3
3
  "description": "Shared domain models, utilities, and UI components for AI DIAL Chat libraries",
4
- "version": "1.2.0-dev.75",
4
+ "version": "1.2.0-dev.78",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "sideEffects": [
@@ -1,5 +1,5 @@
1
- import { stripUrlQueryAndFragment as e } from "./mime-type.js";
2
- import { MIME_TYPE_EXT_MAP as t } from "../constants/mime-types.js";
1
+ import { MIME_TYPE_EXT_MAP as e } from "../constants/mime-types.js";
2
+ import { stripUrlQueryAndFragment as t } from "./mime-type.js";
3
3
  //#region src/utils/file-download.ts
4
4
  var n = /^[a-zA-Z0-9]{1,10}$/, r = (e) => {
5
5
  let t = e.lastIndexOf(".");
@@ -9,12 +9,12 @@ var n = /^[a-zA-Z0-9]{1,10}$/, r = (e) => {
9
9
  }, i = (n, i, a) => {
10
10
  if (r(n) != null) return n;
11
11
  if (a != null) {
12
- let e = t[a];
13
- if (e != null) return `${n}.${e}`;
12
+ let t = e[a];
13
+ if (t != null) return `${n}.${t}`;
14
14
  }
15
15
  if (i != null) {
16
- let t = r(e(i).split("/").pop() ?? "");
17
- if (t != null) return `${n}.${t}`;
16
+ let e = r(t(i).split("/").pop() ?? "");
17
+ if (e != null) return `${n}.${e}`;
18
18
  }
19
19
  return n;
20
20
  }, a = {
@@ -1,7 +1,8 @@
1
1
  import { AttachmentType as e } from "../types/attachment.js";
2
2
  import { MIMEType as t } from "../types/mime-type.js";
3
+ import { MIME_TYPE_ALIASES as n } from "../constants/mime-types.js";
3
4
  //#region src/utils/mime-type.ts
4
- var n = {
5
+ var r = {
5
6
  md: t.Markdown,
6
7
  markdown: t.Markdown,
7
8
  txt: t.Plain,
@@ -65,9 +66,12 @@ var n = {
65
66
  mp3: t.MP3,
66
67
  wav: t.WAV,
67
68
  ogg: t.OGG
68
- }, r = (e) => e.split(/[?#]/)[0], i = (e) => {
69
- let t = r(e), i = t.lastIndexOf(".");
70
- if (i !== -1) return n[t.slice(i + 1).toLowerCase()];
71
- }, a = (t) => t?.startsWith("image/") ? e.Image : t?.startsWith("audio/") ? e.Audio : e.File;
69
+ }, i = (e) => e.toLowerCase().split(";")[0].trim(), a = (e) => {
70
+ let t = i(e);
71
+ return n[t] ?? t;
72
+ }, o = (e) => e.split(/[?#]/)[0], s = (e) => {
73
+ let t = o(e), n = t.lastIndexOf(".");
74
+ if (n !== -1) return r[t.slice(n + 1).toLowerCase()];
75
+ }, c = (t) => t?.startsWith("image/") ? e.Image : t?.startsWith("audio/") ? e.Audio : e.File;
72
76
  //#endregion
73
- export { a as getAttachmentTypeFromMime, i as inferMimeTypeFromPath, r as stripUrlQueryAndFragment };
77
+ export { c as getAttachmentTypeFromMime, i as getBaseMimeType, s as inferMimeTypeFromPath, a as normalizeMimeType, o as stripUrlQueryAndFragment };