@epam/ai-dial-chat-shared 1.2.0-dev.219 → 1.2.0-dev.225

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.
@@ -2,82 +2,83 @@ import { CodeBlockTheme as e } from "../../../types/code-editor.js";
2
2
  import { mergeClasses as t } from "../../../utils/merge-class.js";
3
3
  import { buildCssVars as n } from "../../../utils/build-css-vars.js";
4
4
  import { downloadTextFile as r, getFileExtensionForLanguage as i } from "../../../utils/file-download.js";
5
- import { CHAT_SHARED_CLASS as a } from "../../../constants/public-class-names.js";
6
- import { useCodeCopy as o } from "../../../hooks/useCodeCopy.js";
7
- import s from "./CodeBlock.module.scss.js";
8
- import { restrainedSyntaxTheme as c } from "./syntax-theme.js";
9
- import { DIAL_ICON_SIZE as l, DIAL_KIT_ICON_STROKE as u, ElementSize as d, GhostIconButton as f } from "@epam/ai-dial-ui-kit";
10
- import { Suspense as p, lazy as m, memo as h } from "react";
11
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
12
- import { IconCheck as v, IconCopy as y, IconDownload as b } from "@tabler/icons-react";
5
+ import { isSyntaxHighlightingAllowed as a } from "../../../utils/syntax-highlighting.js";
6
+ import { CHAT_SHARED_CLASS as o } from "../../../constants/public-class-names.js";
7
+ import { useCodeCopy as s } from "../../../hooks/useCodeCopy.js";
8
+ import c from "./CodeBlock.module.scss.js";
9
+ import { restrainedSyntaxTheme as l } from "./syntax-theme.js";
10
+ import { DIAL_ICON_SIZE as u, DIAL_KIT_ICON_STROKE as d, ElementSize as f, GhostIconButton as p } from "@epam/ai-dial-ui-kit";
11
+ import { Suspense as m, lazy as h, memo as g, useMemo as _ } from "react";
12
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
13
+ import { IconCheck as b, IconCopy as x, IconDownload as S } from "@tabler/icons-react";
13
14
  //#region src/components/MarkdownRenderer/CodeBlock/CodeBlock.tsx
14
- var x = {
15
- dark: c,
16
- light: c
17
- }, S = m(async () => {
15
+ var C = {
16
+ dark: l,
17
+ light: l
18
+ }, w = h(async () => {
18
19
  let { Prism: e } = await import("react-syntax-highlighter");
19
20
  return { default: e };
20
- }), C = h(({ language: m, value: h, isStreaming: C, theme: w = e.Dark, copyLabel: T = "Copy code", copiedLabel: E = "Copied!", downloadLabel: D = "Download code", hideDownload: O = !1, containerClassName: k, headerClassName: A, codeClassName: j = "dial-code-text", languageLabelClassName: M = "dial-tiny-lead-semi-text", title: N, titleSlot: P, colors: F }) => {
21
- let { isCopied: I, copy: L } = o(h), R = w === e.Light, z = () => {
22
- r(h, `code.${i(m)}`);
23
- }, B = /* @__PURE__ */ g("pre", {
21
+ }), T = g(({ language: h, value: g, isStreaming: T, theme: E = e.Dark, copyLabel: D = "Copy code", copiedLabel: O = "Copied!", downloadLabel: k = "Download code", hideDownload: A = !1, containerClassName: j, headerClassName: M, codeClassName: N = "dial-code-text", languageLabelClassName: P = "dial-tiny-lead-semi-text", title: F, titleSlot: I, colors: L }) => {
22
+ let { isCopied: R, copy: z } = s(g), B = _(() => a(g), [g]), V = E === e.Light, H = () => {
23
+ r(g, `code.${i(h)}`);
24
+ }, U = /* @__PURE__ */ v("pre", {
24
25
  className: "p-4",
25
- children: /* @__PURE__ */ g("code", {
26
- className: t("whitespace-pre", j),
27
- children: h
26
+ children: /* @__PURE__ */ v("code", {
27
+ className: t("whitespace-pre", N),
28
+ children: g
28
29
  })
29
30
  });
30
- return /* @__PURE__ */ _("div", {
31
+ return /* @__PURE__ */ y("div", {
31
32
  style: n({
32
- "--cm-code-block-bg": F?.background,
33
- "--cm-code-block-border": F?.border,
34
- "--cm-code-block-header-bg": F?.headerBackground,
35
- "--cm-code-block-language": F?.language,
36
- "--cm-code-block-copied": F?.copied,
37
- "--cm-code-block-scrollbar": F?.scrollbar
33
+ "--cm-code-block-bg": L?.background,
34
+ "--cm-code-block-border": L?.border,
35
+ "--cm-code-block-header-bg": L?.headerBackground,
36
+ "--cm-code-block-language": L?.language,
37
+ "--cm-code-block-copied": L?.copied,
38
+ "--cm-code-block-scrollbar": L?.scrollbar
38
39
  }),
39
- className: t("my-4 max-w-full rounded-xl border [overflow:clip]", s.container, R && s.containerLight, k, a.codeBlock),
40
+ className: t("my-4 max-w-full rounded-xl border [overflow:clip]", c.container, V && c.containerLight, j, o.codeBlock),
40
41
  children: [
41
- /* @__PURE__ */ _("div", {
42
- className: t("sticky top-0 z-10 flex min-h-10 items-center justify-between px-4", P == null ? "py-2" : "py-0", s.header, A, a.codeBlockHeader),
43
- children: [P ?? /* @__PURE__ */ g("span", {
44
- className: t(s.languageLabel, M),
45
- children: N ?? m
46
- }), !C && /* @__PURE__ */ _("div", {
42
+ /* @__PURE__ */ y("div", {
43
+ className: t("sticky top-0 z-10 flex min-h-10 items-center justify-between px-4", I == null ? "py-2" : "py-0", c.header, M, o.codeBlockHeader),
44
+ children: [I ?? /* @__PURE__ */ v("span", {
45
+ className: t(c.languageLabel, P),
46
+ children: F ?? h
47
+ }), !T && /* @__PURE__ */ y("div", {
47
48
  className: "flex items-center gap-1",
48
- children: [!O && /* @__PURE__ */ g(f, {
49
- icon: /* @__PURE__ */ g(b, {
50
- size: l.SM,
51
- stroke: u
49
+ children: [!A && /* @__PURE__ */ v(p, {
50
+ icon: /* @__PURE__ */ v(S, {
51
+ size: u.SM,
52
+ stroke: d
52
53
  }),
53
- "aria-label": D,
54
- size: d.Small,
55
- onClick: z
56
- }), /* @__PURE__ */ g(f, {
57
- icon: I ? /* @__PURE__ */ g(v, {
58
- size: l.SM,
59
- className: s.copiedIcon,
54
+ "aria-label": k,
55
+ size: f.Small,
56
+ onClick: H
57
+ }), /* @__PURE__ */ v(p, {
58
+ icon: R ? /* @__PURE__ */ v(b, {
59
+ size: u.SM,
60
+ className: c.copiedIcon,
60
61
  "aria-hidden": !0,
61
- stroke: u
62
- }) : /* @__PURE__ */ g(y, {
63
- size: l.SM,
62
+ stroke: d
63
+ }) : /* @__PURE__ */ v(x, {
64
+ size: u.SM,
64
65
  "aria-hidden": !0,
65
- stroke: u
66
+ stroke: d
66
67
  }),
67
- "aria-label": T,
68
- size: d.Small,
69
- onClick: L
68
+ "aria-label": D,
69
+ size: f.Small,
70
+ onClick: z
70
71
  })]
71
72
  })]
72
73
  }),
73
- /* @__PURE__ */ g("div", {
74
- className: t(s.scrollContainer, "max-h-[60vh] overflow-auto"),
74
+ /* @__PURE__ */ v("div", {
75
+ className: t(c.scrollContainer, "max-h-[60vh] overflow-auto"),
75
76
  dir: "ltr",
76
- children: m ? /* @__PURE__ */ g(p, {
77
- fallback: B,
78
- children: /* @__PURE__ */ g(S, {
79
- language: m,
80
- style: x[w] ?? c,
77
+ children: h && B ? /* @__PURE__ */ v(m, {
78
+ fallback: U,
79
+ children: /* @__PURE__ */ v(w, {
80
+ language: h,
81
+ style: C[E] ?? l,
81
82
  customStyle: {
82
83
  margin: 0,
83
84
  borderRadius: 0,
@@ -87,19 +88,19 @@ var x = {
87
88
  padding: "14px 16px",
88
89
  letterSpacing: 0
89
90
  },
90
- codeTagProps: { className: j },
91
- children: h
91
+ codeTagProps: { className: N },
92
+ children: g
92
93
  })
93
- }) : B
94
+ }) : U
94
95
  }),
95
- /* @__PURE__ */ g("span", {
96
+ /* @__PURE__ */ v("span", {
96
97
  role: "status",
97
98
  "aria-live": "polite",
98
99
  className: "sr-only",
99
- children: I ? E : ""
100
+ children: R ? O : ""
100
101
  })
101
102
  ]
102
103
  });
103
104
  });
104
105
  //#endregion
105
- export { C as MarkdownCodeBlock };
106
+ export { T as MarkdownCodeBlock };
package/index.d.ts CHANGED
@@ -1362,6 +1362,14 @@ export declare const isSkillSelectionUnsupported: (skillUrl: string | null | und
1362
1362
  /** Returns `true` when `msg` is a `StatusMessage`. */
1363
1363
  export declare const isStatusMessage: (msg: Message | StatusMessage) => msg is StatusMessage;
1364
1364
 
1365
+ /**
1366
+ * Bounds input sent to synchronous syntax highlighters. Oversized input should
1367
+ * render as complete plain text instead. Limits count UTF-16 code units and
1368
+ * recognize LF, CRLF, and CR line endings. This is a size guard, not a timeout
1369
+ * or a guarantee against pathological grammars on smaller inputs.
1370
+ */
1371
+ export declare const isSyntaxHighlightingAllowed: (text: string) => boolean;
1372
+
1365
1373
  /** Returns whether any file in the batch is still queued or uploading. */
1366
1374
  export declare const isUploadInProgress: (batchState: FileUploadBatchState | null) => boolean;
1367
1375
 
package/index.js CHANGED
@@ -21,48 +21,49 @@ import { formatLastUsed as Y } from "./utils/format-last-used.js";
21
21
  import { formatFileSize as X } from "./utils/format-file-size.js";
22
22
  import { formatCost as Z, formatPrice as Q, formatUnitPrice as $ } from "./utils/format-price.js";
23
23
  import { base64ToBlob as ee, downloadTextFile as te, ensureDownloadFilename as ne, getFileExtensionForLanguage as re, triggerAnchorDownload as ie, triggerBlobDownload as ae, tryBase64ToBytes as oe } from "./utils/file-download.js";
24
- import { ENTITY_TYPE_BG_COLOR as se, ENTITY_TYPE_COLOR as ce } from "./constants/entity-colors.js";
25
- import { PROMPT_PARAM_DEFAULT_SEPARATOR as le, PROMPT_PARAM_PATTERN as ue, PROMPT_VARIABLE_CLASS_NAME as de, buildPromptParamDefaults as fe, extractPromptParams as pe, rehypePromptVariables as me, resolvePromptParams as he } from "./utils/prompt-variables.js";
26
- import { generateUUID as ge } from "./utils/generate-uuid.js";
27
- import { BASE_LG_ICON_PROPS as _e, BASE_MD_ICON_PROPS as ve } from "./constants/icon.js";
28
- import { HIDDEN_FILE as ye, PUBLIC_BUCKET as be } from "./constants/dial.js";
29
- import { TAG_INPUT_TAG_CLASS_NAME as xe } from "./constants/tag-input.js";
30
- import { MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME as Se, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as Ce, RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE as we, RESIZABLE_TEXTAREA_CLASS_NAME as Te } from "./constants/resizable-fields.js";
31
- import { MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as Ee } from "./constants/markdown-editor.js";
32
- import { SELECT_LIST_MAX_HEIGHT_CLASS_NAME as De, SELECT_LIST_MAX_HEIGHT_PX as Oe } from "./constants/select-list.js";
33
- import { DESKTOP_BREAKPOINT_PX as ke, DESKTOP_MEDIA_QUERY as Ae, MOBILE_MAX_WIDTH_PX as je, MOBILE_MEDIA_QUERY as Me } from "./constants/breakpoint.js";
34
- import { pickAvatarColor as Ne } from "./utils/avatar-color.js";
35
- import { extractInitials as Pe } from "./utils/initials.js";
36
- import { InitialsAvatar as Fe } from "./components/InitialsAvatar/InitialsAvatar.js";
37
- import { DeploymentIcon as Ie } from "./components/DeploymentIcon/DeploymentIcon.js";
38
- import { CopyButton as Le, CopyIconButton as Re } from "./components/CopyButton/CopyButton.js";
39
- import { PanelEmptyState as ze } from "./components/PanelEmptyState/PanelEmptyState.js";
40
- import { ItemHeader as Be } from "./components/ItemHeader/ItemHeader.js";
41
- import { EntityTypeLabel as Ve } from "./components/EntityTypeLabel/EntityTypeLabel.js";
42
- import { FeaturedChip as He } from "./components/FeaturedChip/FeaturedChip.js";
43
- import { EntityHeader as Ue } from "./components/EntityHeader/EntityHeader.js";
44
- import { ResourceSummary as We } from "./components/ResourceSummary/ResourceSummary.js";
45
- import { TableHeader as Ge } from "./components/MarkdownRenderer/Table/TableHeader.js";
46
- import { TextRefinementState as Ke, useTextRefinement as qe } from "./hooks/useTextRefinement.js";
47
- import { TextRefinementField as Je } from "./components/TextRefinementField/TextRefinementField.js";
48
- import { CHAT_SHARED_CLASS as Ye } from "./constants/public-class-names.js";
49
- import { useCodeCopy as Xe } from "./hooks/useCodeCopy.js";
50
- import { restrainedSyntaxTheme as Ze } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
51
- import { MarkdownCodeBlock as Qe } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
52
- import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as $e, MARKDOWN_TABLE_CSV_MIME_TYPE as et, MarkdownTableCopyFormat as tt, serializeMarkdownTableRows as nt } from "./components/MarkdownRenderer/Table/table-serialization.js";
53
- import { MarkdownTable as rt } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
54
- import { MarkdownRenderer as it, defaultMarkdownComponents as at } from "./components/MarkdownRenderer/MarkdownRenderer.js";
55
- import { COMPACT_MARKDOWN_CLASS_NAMES as ot, DEFAULT_MARKDOWN_CLASS_NAMES as st } from "./components/MarkdownRenderer/markdown-class-names.js";
56
- import { PlainTextRenderer as ct } from "./components/MarkdownRenderer/PlainTextRenderer.js";
57
- import { MDMessageViewer as lt } from "./components/MarkdownRenderer/MDMessageViewer.js";
58
- import { MarkdownWithPlaceholders as ut } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
59
- import { useCollapsedText as dt } from "./hooks/useCollapsedText.js";
60
- import { useAvailableHeightCap as ft } from "./hooks/useAvailableHeightCap.js";
61
- import { useIsMobile as pt } from "./hooks/useIsMobile.js";
62
- import { DialFileManagerActionProfile as mt, DialFileManagerVariant as ht } from "./file-manager/file-manager-variant.js";
63
- import { getParentFolderPath as gt, isHiddenPath as _t } from "./file-manager/path.js";
64
- import { FileUploadStatus as vt, isUploadInProgress as yt } from "./file-manager/upload-batch.js";
65
- import { useGridEditingScroll as bt } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
66
- import { OperationLoaderModal as xt } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
67
- import { isSkillSelectionUnsupported as St } from "./utils/is-skill-selection-unsupported.js";
68
- export { f as AttachmentErrorReason, p as AttachmentType, _e as BASE_LG_ICON_PROPS, ve as BASE_MD_ICON_PROPS, Ye as CHAT_SHARED_CLASS, ot 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, Le as CopyButton, Re as CopyIconButton, st as DEFAULT_MARKDOWN_CLASS_NAMES, $e as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, ke as DESKTOP_BREAKPOINT_PX, Ae as DESKTOP_MEDIA_QUERY, Ie as DeploymentIcon, mt as DialFileManagerActionProfile, ht as DialFileManagerVariant, F as ENTITY_DESCRIPTION_MAX_LENGTH, I as ENTITY_INSTRUCTIONS_MAX_LENGTH, L as ENTITY_NAME_MAX_LENGTH, se as ENTITY_TYPE_BG_COLOR, ce as ENTITY_TYPE_COLOR, Ue as EntityHeader, Ve as EntityTypeLabel, He as FeaturedChip, h as FileExtension, vt as FileUploadStatus, a as FilterTab, ye as HIDDEN_FILE, Fe as InitialsAvatar, Be as ItemHeader, Se as MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME, Ce as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, Ee as MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME, et as MARKDOWN_TABLE_CSV_MIME_TYPE, lt 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, je as MOBILE_MAX_WIDTH_PX, Me as MOBILE_MEDIA_QUERY, Qe as MarkdownCodeBlock, it as MarkdownRenderer, rt as MarkdownTable, tt as MarkdownTableCopyFormat, ut as MarkdownWithPlaceholders, o as MessageRating, s as MessageRole, xt as OperationLoaderModal, A as PROHIBITED_CONVERSATION_NAME_CHARS_RE, le as PROMPT_PARAM_DEFAULT_SEPARATOR, ue as PROMPT_PARAM_PATTERN, de as PROMPT_VARIABLE_CLASS_NAME, be as PUBLIC_BUCKET, ze as PanelEmptyState, ct as PlainTextRenderer, we as RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE, Te as RESIZABLE_TEXTAREA_CLASS_NAME, c as RequestStatus, We as ResourceSummary, d as ResponseFormat, De as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, Oe as SELECT_LIST_MAX_HEIGHT_PX, l as StageStatus, u as StatusEvent, xe as TAG_INPUT_TAG_CLASS_NAME, Ge as TableHeader, Je as TextRefinementField, Ke as TextRefinementState, ee as base64ToBlob, V as buildCssVars, fe as buildPromptParamDefaults, K as copyMarkdownAsRichText, q as copyToClipboard, at as defaultMarkdownComponents, te as downloadTextFile, ne as ensureDownloadFilename, R as exceedsMaxLength, Pe as extractInitials, pe as extractPromptParams, Z as formatCost, X as formatFileSize, Y as formatLastUsed, Q as formatPrice, $ as formatUnitPrice, ge as generateUUID, S as getAttachmentTypeFromMime, C as getBaseMimeType, re as getFileExtensionForLanguage, gt as getParentFolderPath, j as getUtf8ByteLength, z as hasControlCharacters, w as inferMimeTypeFromPath, D as isAnnotationSelector, G as isAudioTranscriptionSupported, _t as isHiddenPath, St as isSkillSelectionUnsupported, H as isStatusMessage, yt as isUploadInProgress, J as markdownToRichTextHtml, B as mergeClasses, U as messageAttachmentToDisplayAttachment, W as messageAttachmentsToDisplayAttachments, T as normalizeMimeType, O as normalizePersistedHtmlTagAttachmentType, k as normalizeRawAnnotations, Ne as pickAvatarColor, me as rehypePromptVariables, he as resolvePromptParams, Ze as restrainedSyntaxTheme, M as sanitizeConversationName, nt as serializeMarkdownTableRows, N as stripTrailingDots, E as stripUrlQueryAndFragment, ie as triggerAnchorDownload, ae as triggerBlobDownload, P as truncateToUtf8Bytes, oe as tryBase64ToBytes, ft as useAvailableHeightCap, Xe as useCodeCopy, dt as useCollapsedText, bt as useGridEditingScroll, pt as useIsMobile, qe as useTextRefinement };
24
+ import { isSyntaxHighlightingAllowed as se } from "./utils/syntax-highlighting.js";
25
+ import { ENTITY_TYPE_BG_COLOR as ce, ENTITY_TYPE_COLOR as le } from "./constants/entity-colors.js";
26
+ import { PROMPT_PARAM_DEFAULT_SEPARATOR as ue, PROMPT_PARAM_PATTERN as de, PROMPT_VARIABLE_CLASS_NAME as fe, buildPromptParamDefaults as pe, extractPromptParams as me, rehypePromptVariables as he, resolvePromptParams as ge } from "./utils/prompt-variables.js";
27
+ import { generateUUID as _e } from "./utils/generate-uuid.js";
28
+ import { BASE_LG_ICON_PROPS as ve, BASE_MD_ICON_PROPS as ye } from "./constants/icon.js";
29
+ import { HIDDEN_FILE as be, PUBLIC_BUCKET as xe } from "./constants/dial.js";
30
+ import { TAG_INPUT_TAG_CLASS_NAME as Se } from "./constants/tag-input.js";
31
+ import { MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME as Ce, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as we, RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE as Te, RESIZABLE_TEXTAREA_CLASS_NAME as Ee } from "./constants/resizable-fields.js";
32
+ import { MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as De } from "./constants/markdown-editor.js";
33
+ import { SELECT_LIST_MAX_HEIGHT_CLASS_NAME as Oe, SELECT_LIST_MAX_HEIGHT_PX as ke } from "./constants/select-list.js";
34
+ import { DESKTOP_BREAKPOINT_PX as Ae, DESKTOP_MEDIA_QUERY as je, MOBILE_MAX_WIDTH_PX as Me, MOBILE_MEDIA_QUERY as Ne } from "./constants/breakpoint.js";
35
+ import { pickAvatarColor as Pe } from "./utils/avatar-color.js";
36
+ import { extractInitials as Fe } from "./utils/initials.js";
37
+ import { InitialsAvatar as Ie } from "./components/InitialsAvatar/InitialsAvatar.js";
38
+ import { DeploymentIcon as Le } from "./components/DeploymentIcon/DeploymentIcon.js";
39
+ import { CopyButton as Re, CopyIconButton as ze } from "./components/CopyButton/CopyButton.js";
40
+ import { PanelEmptyState as Be } from "./components/PanelEmptyState/PanelEmptyState.js";
41
+ import { ItemHeader as Ve } from "./components/ItemHeader/ItemHeader.js";
42
+ import { EntityTypeLabel as He } from "./components/EntityTypeLabel/EntityTypeLabel.js";
43
+ import { FeaturedChip as Ue } from "./components/FeaturedChip/FeaturedChip.js";
44
+ import { EntityHeader as We } from "./components/EntityHeader/EntityHeader.js";
45
+ import { ResourceSummary as Ge } from "./components/ResourceSummary/ResourceSummary.js";
46
+ import { TableHeader as Ke } from "./components/MarkdownRenderer/Table/TableHeader.js";
47
+ import { TextRefinementState as qe, useTextRefinement as Je } from "./hooks/useTextRefinement.js";
48
+ import { TextRefinementField as Ye } from "./components/TextRefinementField/TextRefinementField.js";
49
+ import { CHAT_SHARED_CLASS as Xe } from "./constants/public-class-names.js";
50
+ import { useCodeCopy as Ze } from "./hooks/useCodeCopy.js";
51
+ import { restrainedSyntaxTheme as Qe } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
52
+ import { MarkdownCodeBlock as $e } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
53
+ import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as et, MARKDOWN_TABLE_CSV_MIME_TYPE as tt, MarkdownTableCopyFormat as nt, serializeMarkdownTableRows as rt } from "./components/MarkdownRenderer/Table/table-serialization.js";
54
+ import { MarkdownTable as it } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
55
+ import { MarkdownRenderer as at, defaultMarkdownComponents as ot } from "./components/MarkdownRenderer/MarkdownRenderer.js";
56
+ import { COMPACT_MARKDOWN_CLASS_NAMES as st, DEFAULT_MARKDOWN_CLASS_NAMES as ct } from "./components/MarkdownRenderer/markdown-class-names.js";
57
+ import { PlainTextRenderer as lt } from "./components/MarkdownRenderer/PlainTextRenderer.js";
58
+ import { MDMessageViewer as ut } from "./components/MarkdownRenderer/MDMessageViewer.js";
59
+ import { MarkdownWithPlaceholders as dt } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
60
+ import { useCollapsedText as ft } from "./hooks/useCollapsedText.js";
61
+ import { useAvailableHeightCap as pt } from "./hooks/useAvailableHeightCap.js";
62
+ import { useIsMobile as mt } from "./hooks/useIsMobile.js";
63
+ import { DialFileManagerActionProfile as ht, DialFileManagerVariant as gt } from "./file-manager/file-manager-variant.js";
64
+ import { getParentFolderPath as _t, isHiddenPath as vt } from "./file-manager/path.js";
65
+ import { FileUploadStatus as yt, isUploadInProgress as bt } from "./file-manager/upload-batch.js";
66
+ import { useGridEditingScroll as xt } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
67
+ import { OperationLoaderModal as St } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
68
+ import { isSkillSelectionUnsupported as Ct } from "./utils/is-skill-selection-unsupported.js";
69
+ export { f as AttachmentErrorReason, p as AttachmentType, ve as BASE_LG_ICON_PROPS, ye as BASE_MD_ICON_PROPS, Xe as CHAT_SHARED_CLASS, st 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, Re as CopyButton, ze as CopyIconButton, ct as DEFAULT_MARKDOWN_CLASS_NAMES, et as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, Ae as DESKTOP_BREAKPOINT_PX, je as DESKTOP_MEDIA_QUERY, Le as DeploymentIcon, ht as DialFileManagerActionProfile, gt as DialFileManagerVariant, F as ENTITY_DESCRIPTION_MAX_LENGTH, I as ENTITY_INSTRUCTIONS_MAX_LENGTH, L as ENTITY_NAME_MAX_LENGTH, ce as ENTITY_TYPE_BG_COLOR, le as ENTITY_TYPE_COLOR, We as EntityHeader, He as EntityTypeLabel, Ue as FeaturedChip, h as FileExtension, yt as FileUploadStatus, a as FilterTab, be as HIDDEN_FILE, Ie as InitialsAvatar, Ve as ItemHeader, Ce as MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME, we as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, De as MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME, tt as MARKDOWN_TABLE_CSV_MIME_TYPE, ut 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, Me as MOBILE_MAX_WIDTH_PX, Ne as MOBILE_MEDIA_QUERY, $e as MarkdownCodeBlock, at as MarkdownRenderer, it as MarkdownTable, nt as MarkdownTableCopyFormat, dt as MarkdownWithPlaceholders, o as MessageRating, s as MessageRole, St as OperationLoaderModal, A as PROHIBITED_CONVERSATION_NAME_CHARS_RE, ue as PROMPT_PARAM_DEFAULT_SEPARATOR, de as PROMPT_PARAM_PATTERN, fe as PROMPT_VARIABLE_CLASS_NAME, xe as PUBLIC_BUCKET, Be as PanelEmptyState, lt as PlainTextRenderer, Te as RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE, Ee as RESIZABLE_TEXTAREA_CLASS_NAME, c as RequestStatus, Ge as ResourceSummary, d as ResponseFormat, Oe as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, ke as SELECT_LIST_MAX_HEIGHT_PX, l as StageStatus, u as StatusEvent, Se as TAG_INPUT_TAG_CLASS_NAME, Ke as TableHeader, Ye as TextRefinementField, qe as TextRefinementState, ee as base64ToBlob, V as buildCssVars, pe as buildPromptParamDefaults, K as copyMarkdownAsRichText, q as copyToClipboard, ot as defaultMarkdownComponents, te as downloadTextFile, ne as ensureDownloadFilename, R as exceedsMaxLength, Fe as extractInitials, me as extractPromptParams, Z as formatCost, X as formatFileSize, Y as formatLastUsed, Q as formatPrice, $ as formatUnitPrice, _e as generateUUID, S as getAttachmentTypeFromMime, C as getBaseMimeType, re as getFileExtensionForLanguage, _t as getParentFolderPath, j as getUtf8ByteLength, z as hasControlCharacters, w as inferMimeTypeFromPath, D as isAnnotationSelector, G as isAudioTranscriptionSupported, vt as isHiddenPath, Ct as isSkillSelectionUnsupported, H as isStatusMessage, se as isSyntaxHighlightingAllowed, bt as isUploadInProgress, J as markdownToRichTextHtml, B as mergeClasses, U as messageAttachmentToDisplayAttachment, W as messageAttachmentsToDisplayAttachments, T as normalizeMimeType, O as normalizePersistedHtmlTagAttachmentType, k as normalizeRawAnnotations, Pe as pickAvatarColor, he as rehypePromptVariables, ge as resolvePromptParams, Qe as restrainedSyntaxTheme, M as sanitizeConversationName, rt as serializeMarkdownTableRows, N as stripTrailingDots, E as stripUrlQueryAndFragment, ie as triggerAnchorDownload, ae as triggerBlobDownload, P as truncateToUtf8Bytes, oe as tryBase64ToBytes, pt as useAvailableHeightCap, Ze as useCodeCopy, ft as useCollapsedText, xt as useGridEditingScroll, mt as useIsMobile, Je as useTextRefinement };
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.219",
4
+ "version": "1.2.0-dev.225",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "sideEffects": [
@@ -0,0 +1,13 @@
1
+ //#region src/utils/syntax-highlighting.ts
2
+ var e = 5e4, t = 2e3, n = (n) => {
3
+ if (n.length > e) return !1;
4
+ let r = 0;
5
+ for (let e = 0; e < n.length; e++) {
6
+ let i = n[e];
7
+ if (i === "\n" || i === "\r") r = 0;
8
+ else if (++r > t) return !1;
9
+ }
10
+ return !0;
11
+ };
12
+ //#endregion
13
+ export { n as isSyntaxHighlightingAllowed };