@epam/ai-dial-chat-shared 1.1.0-dev.426 → 1.1.0-dev.430

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,7 +2,7 @@ import { DIAL_ICON_SIZE as e, DIAL_KIT_ICON_STROKE as t, ElementSize as n, Neutr
2
2
  import { jsx as a } from "react/jsx-runtime";
3
3
  import { IconCheck as o, IconCopy as s } from "@tabler/icons-react";
4
4
  //#region src/components/CopyButton/CopyButton.tsx
5
- var c = ({ onClick: r, isCopied: c, copyLabel: l, copiedLabel: u, size: d = n.Standard, ariaLabel: f, iconSize: p = e.LG, iconCopy: m }) => /* @__PURE__ */ a(i, {
5
+ var c = ({ onClick: r, isCopied: c, copyLabel: l, copiedLabel: u, size: d = n.Standard, ariaLabel: f, iconSize: p = e.LG, iconCopy: m, isDisabled: h = !1 }) => /* @__PURE__ */ a(i, {
6
6
  size: d,
7
7
  icon: c ? /* @__PURE__ */ a(o, {
8
8
  size: p,
@@ -15,8 +15,9 @@ var c = ({ onClick: r, isCopied: c, copyLabel: l, copiedLabel: u, size: d = n.St
15
15
  }),
16
16
  "aria-label": c ? u : f ?? l,
17
17
  tooltipProps: { tooltip: c ? u : l },
18
- onClick: r
19
- }), l = ({ onClick: i, isCopied: c, copyLabel: l, copiedLabel: u, size: d = n.Standard }) => /* @__PURE__ */ a(r, {
18
+ onClick: r,
19
+ disabled: h
20
+ }), l = ({ onClick: i, isCopied: c, copyLabel: l, copiedLabel: u, size: d = n.Standard, isDisabled: f = !1 }) => /* @__PURE__ */ a(r, {
20
21
  size: d,
21
22
  label: c ? u : l,
22
23
  iconBefore: a(c ? o : s, {
@@ -25,6 +26,7 @@ var c = ({ onClick: r, isCopied: c, copyLabel: l, copiedLabel: u, size: d = n.St
25
26
  stroke: t
26
27
  }),
27
28
  onClick: i,
29
+ disabled: f,
28
30
  className: "shrink-0"
29
31
  });
30
32
  //#endregion
@@ -0,0 +1,4 @@
1
+ //#region src/constants/select-list.ts
2
+ var e = 344, t = "max-h-[344px]";
3
+ //#endregion
4
+ export { t as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, e as SELECT_LIST_MAX_HEIGHT_PX };
package/index.d.ts CHANGED
@@ -359,6 +359,8 @@ export declare interface CopyButtonProps {
359
359
  ariaLabel?: string;
360
360
  iconSize?: number;
361
361
  iconCopy?: ReactNode;
362
+ /** Renders the button in its disabled state and blocks clicks. Defaults to `false`. */
363
+ isDisabled?: boolean;
362
364
  }
363
365
 
364
366
  export declare const CopyIconButton: FC<CopyButtonProps>;
@@ -2032,6 +2034,11 @@ export declare const restrainedSyntaxTheme: PrismStyleMap;
2032
2034
  /** Strips characters DIAL Core rejects in a conversation name. */
2033
2035
  export declare const sanitizeConversationName: (name: string) => string;
2034
2036
 
2037
+ /** Tailwind form of {@link SELECT_LIST_MAX_HEIGHT_PX}, for the options scroll box. */
2038
+ export declare const SELECT_LIST_MAX_HEIGHT_CLASS_NAME = "max-h-[344px]";
2039
+
2040
+ export declare const SELECT_LIST_MAX_HEIGHT_PX = 344;
2041
+
2035
2042
  export declare const serializeMarkdownTableRows: (rows: readonly HTMLTableRowElement[], format: MarkdownTableCopyFormat) => string;
2036
2043
 
2037
2044
  /** A single agent execution stage produced during a streaming response. */
package/index.js CHANGED
@@ -27,35 +27,36 @@ import { BASE_LG_ICON_PROPS as ie, BASE_MD_ICON_PROPS as ae } from "./constants/
27
27
  import { HIDDEN_FILE as oe } from "./constants/dial.js";
28
28
  import { TAG_INPUT_TAG_CLASS_NAME as se } from "./constants/tag-input.js";
29
29
  import { MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as ce, RESIZABLE_TEXTAREA_CLASS_NAME as le } from "./constants/resizable-fields.js";
30
- import { pickAvatarColor as ue } from "./utils/avatar-color.js";
31
- import { extractInitials as de } from "./utils/initials.js";
32
- import { InitialsAvatar as fe } from "./components/InitialsAvatar/InitialsAvatar.js";
33
- import { DeploymentIcon as pe } from "./components/DeploymentIcon/DeploymentIcon.js";
34
- import { CopyButton as me, CopyIconButton as he } from "./components/CopyButton/CopyButton.js";
35
- import { PanelEmptyState as ge } from "./components/PanelEmptyState/PanelEmptyState.js";
36
- import { ItemHeader as _e } from "./components/ItemHeader/ItemHeader.js";
37
- import { EntityTypeLabel as ve } from "./components/EntityTypeLabel/EntityTypeLabel.js";
38
- import { FeaturedChip as ye } from "./components/FeaturedChip/FeaturedChip.js";
39
- import { EntityHeader as be } from "./components/EntityHeader/EntityHeader.js";
40
- import { ResourceSummary as xe } from "./components/ResourceSummary/ResourceSummary.js";
41
- import { TableHeader as Se } from "./components/MarkdownRenderer/Table/TableHeader.js";
42
- import { useCodeCopy as Ce } from "./hooks/useCodeCopy.js";
43
- import { restrainedSyntaxTheme as we } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
44
- import { MarkdownCodeBlock as Te } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
45
- import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as Ee, MARKDOWN_TABLE_CSV_MIME_TYPE as De, MarkdownTableCopyFormat as Oe, serializeMarkdownTableRows as ke } from "./components/MarkdownRenderer/Table/table-serialization.js";
46
- import { MarkdownTable as Ae } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
47
- import { MarkdownRenderer as je, defaultMarkdownComponents as Me } from "./components/MarkdownRenderer/MarkdownRenderer.js";
48
- import { COMPACT_MARKDOWN_CLASS_NAMES as Ne, DEFAULT_MARKDOWN_CLASS_NAMES as Pe } from "./components/MarkdownRenderer/markdown-class-names.js";
49
- import { MDMessageViewer as Fe } from "./components/MarkdownRenderer/MDMessageViewer.js";
50
- import { MarkdownWithPlaceholders as Ie } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
51
- import { useCollapsedText as Le } from "./hooks/useCollapsedText.js";
52
- import { useIsMobile as Re } from "./hooks/useIsMobile.js";
53
- import { DialFileManagerActionProfile as ze, DialFileManagerVariant as Be } from "./file-manager/file-manager-variant.js";
54
- import { getParentFolderPath as Ve, isHiddenPath as He } from "./file-manager/path.js";
55
- import { FileUploadStatus as Ue } from "./file-manager/upload-batch.js";
56
- import { useGridEditingScroll as We } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
57
- import { OperationLoaderModal as Ge } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
58
- import { UploadProgressModal as Ke } from "./file-manager/UploadProgressModal/UploadProgressModal.js";
59
- import { DialFileManagerShell as qe } from "./file-manager/DialFileManagerShell/DialFileManagerShell.js";
60
- import { FileManagerAttachModal as Je } from "./file-manager/FileManagerAttachModal/FileManagerAttachModal.js";
61
- export { f as AttachmentErrorReason, p as AttachmentType, ie as BASE_LG_ICON_PROPS, ae as BASE_MD_ICON_PROPS, Ne 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, me as CopyButton, he as CopyIconButton, Pe as DEFAULT_MARKDOWN_CLASS_NAMES, Ee as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, pe as DeploymentIcon, ze as DialFileManagerActionProfile, qe as DialFileManagerShell, Be as DialFileManagerVariant, X as ENTITY_TYPE_BG_COLOR, Z as ENTITY_TYPE_COLOR, be as EntityHeader, ve as EntityTypeLabel, ye as FeaturedChip, h as FileExtension, Je as FileManagerAttachModal, Ue as FileUploadStatus, a as FilterTab, oe as HIDDEN_FILE, fe as InitialsAvatar, _e as ItemHeader, ce as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, De as MARKDOWN_TABLE_CSV_MIME_TYPE, Fe as MDMessageViewer, g as MIMEType, j as MIME_TYPE_AUDIO_PREFIX, M as MIME_TYPE_EXT_MAP, N as MIME_TYPE_WILDCARD, Te as MarkdownCodeBlock, je as MarkdownRenderer, Ae as MarkdownTable, Oe as MarkdownTableCopyFormat, Ie as MarkdownWithPlaceholders, o as MessageRating, s as MessageRole, Ge as OperationLoaderModal, v as PROHIBITED_CONVERSATION_NAME_CHARS_RE, Q as PROMPT_PARAM_PATTERN, $ as PROMPT_VARIABLE_CLASS_NAME, ge as PanelEmptyState, le as RESIZABLE_TEXTAREA_CLASS_NAME, c as RequestStatus, xe as ResourceSummary, d as ResponseFormat, l as StageStatus, u as StatusEvent, se as TAG_INPUT_TAG_CLASS_NAME, Se as TableHeader, Ke as UploadProgressModal, U as base64ToBlob, w as buildCssVars, F as copyMarkdownAsRichText, I as copyToClipboard, Me as defaultMarkdownComponents, W as downloadTextFile, G as ensureDownloadFilename, de as extractInitials, ee as extractPromptParams, B as formatCost, z as formatFileSize, R as formatLastUsed, V as formatPrice, H as formatUnitPrice, re as generateUUID, E as getAttachmentTypeFromMime, K as getFileExtensionForLanguage, Ve as getParentFolderPath, y as getUtf8ByteLength, D as inferMimeTypeFromPath, P as isAudioTranscriptionSupported, He as isHiddenPath, T as isStatusMessage, L as markdownToRichTextHtml, C as mergeClasses, k as messageAttachmentToDisplayAttachment, A as messageAttachmentsToDisplayAttachments, ue as pickAvatarColor, te as rehypePromptVariables, ne as resolvePromptParams, we as restrainedSyntaxTheme, b as sanitizeConversationName, ke as serializeMarkdownTableRows, x as stripTrailingDots, O as stripUrlQueryAndFragment, q as triggerAnchorDownload, J as triggerBlobDownload, S as truncateToUtf8Bytes, Y as tryBase64ToBytes, Ce as useCodeCopy, Le as useCollapsedText, We as useGridEditingScroll, Re as useIsMobile };
30
+ import { SELECT_LIST_MAX_HEIGHT_CLASS_NAME as ue, SELECT_LIST_MAX_HEIGHT_PX as de } from "./constants/select-list.js";
31
+ import { pickAvatarColor as fe } from "./utils/avatar-color.js";
32
+ import { extractInitials as pe } from "./utils/initials.js";
33
+ import { InitialsAvatar as me } from "./components/InitialsAvatar/InitialsAvatar.js";
34
+ import { DeploymentIcon as he } from "./components/DeploymentIcon/DeploymentIcon.js";
35
+ import { CopyButton as ge, CopyIconButton as _e } from "./components/CopyButton/CopyButton.js";
36
+ import { PanelEmptyState as ve } from "./components/PanelEmptyState/PanelEmptyState.js";
37
+ import { ItemHeader as ye } from "./components/ItemHeader/ItemHeader.js";
38
+ import { EntityTypeLabel as be } from "./components/EntityTypeLabel/EntityTypeLabel.js";
39
+ import { FeaturedChip as xe } from "./components/FeaturedChip/FeaturedChip.js";
40
+ import { EntityHeader as Se } from "./components/EntityHeader/EntityHeader.js";
41
+ import { ResourceSummary as Ce } from "./components/ResourceSummary/ResourceSummary.js";
42
+ import { TableHeader as we } from "./components/MarkdownRenderer/Table/TableHeader.js";
43
+ import { useCodeCopy as Te } from "./hooks/useCodeCopy.js";
44
+ import { restrainedSyntaxTheme as Ee } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
45
+ import { MarkdownCodeBlock as De } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
46
+ import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as Oe, MARKDOWN_TABLE_CSV_MIME_TYPE as ke, MarkdownTableCopyFormat as Ae, serializeMarkdownTableRows as je } from "./components/MarkdownRenderer/Table/table-serialization.js";
47
+ import { MarkdownTable as Me } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
48
+ import { MarkdownRenderer as Ne, defaultMarkdownComponents as Pe } from "./components/MarkdownRenderer/MarkdownRenderer.js";
49
+ import { COMPACT_MARKDOWN_CLASS_NAMES as Fe, DEFAULT_MARKDOWN_CLASS_NAMES as Ie } from "./components/MarkdownRenderer/markdown-class-names.js";
50
+ import { MDMessageViewer as Le } from "./components/MarkdownRenderer/MDMessageViewer.js";
51
+ import { MarkdownWithPlaceholders as Re } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
52
+ import { useCollapsedText as ze } from "./hooks/useCollapsedText.js";
53
+ import { useIsMobile as Be } from "./hooks/useIsMobile.js";
54
+ import { DialFileManagerActionProfile as Ve, DialFileManagerVariant as He } from "./file-manager/file-manager-variant.js";
55
+ import { getParentFolderPath as Ue, isHiddenPath as We } from "./file-manager/path.js";
56
+ import { FileUploadStatus as Ge } from "./file-manager/upload-batch.js";
57
+ import { useGridEditingScroll as Ke } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
58
+ import { OperationLoaderModal as qe } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
59
+ import { UploadProgressModal as Je } from "./file-manager/UploadProgressModal/UploadProgressModal.js";
60
+ import { DialFileManagerShell as Ye } from "./file-manager/DialFileManagerShell/DialFileManagerShell.js";
61
+ import { FileManagerAttachModal as Xe } from "./file-manager/FileManagerAttachModal/FileManagerAttachModal.js";
62
+ export { f as AttachmentErrorReason, p as AttachmentType, ie as BASE_LG_ICON_PROPS, ae as BASE_MD_ICON_PROPS, Fe 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, ge as CopyButton, _e as CopyIconButton, Ie as DEFAULT_MARKDOWN_CLASS_NAMES, Oe as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, he as DeploymentIcon, Ve as DialFileManagerActionProfile, Ye as DialFileManagerShell, He as DialFileManagerVariant, X as ENTITY_TYPE_BG_COLOR, Z as ENTITY_TYPE_COLOR, Se as EntityHeader, be as EntityTypeLabel, xe as FeaturedChip, h as FileExtension, Xe as FileManagerAttachModal, Ge as FileUploadStatus, a as FilterTab, oe as HIDDEN_FILE, me as InitialsAvatar, ye as ItemHeader, ce as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, ke as MARKDOWN_TABLE_CSV_MIME_TYPE, Le as MDMessageViewer, g as MIMEType, j as MIME_TYPE_AUDIO_PREFIX, M as MIME_TYPE_EXT_MAP, N as MIME_TYPE_WILDCARD, De as MarkdownCodeBlock, Ne as MarkdownRenderer, Me as MarkdownTable, Ae as MarkdownTableCopyFormat, Re as MarkdownWithPlaceholders, o as MessageRating, s as MessageRole, qe as OperationLoaderModal, v as PROHIBITED_CONVERSATION_NAME_CHARS_RE, Q as PROMPT_PARAM_PATTERN, $ as PROMPT_VARIABLE_CLASS_NAME, ve as PanelEmptyState, le as RESIZABLE_TEXTAREA_CLASS_NAME, c as RequestStatus, Ce as ResourceSummary, d as ResponseFormat, ue as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, de as SELECT_LIST_MAX_HEIGHT_PX, l as StageStatus, u as StatusEvent, se as TAG_INPUT_TAG_CLASS_NAME, we as TableHeader, Je as UploadProgressModal, U as base64ToBlob, w as buildCssVars, F as copyMarkdownAsRichText, I as copyToClipboard, Pe as defaultMarkdownComponents, W as downloadTextFile, G as ensureDownloadFilename, pe as extractInitials, ee as extractPromptParams, B as formatCost, z as formatFileSize, R as formatLastUsed, V as formatPrice, H as formatUnitPrice, re as generateUUID, E as getAttachmentTypeFromMime, K as getFileExtensionForLanguage, Ue as getParentFolderPath, y as getUtf8ByteLength, D as inferMimeTypeFromPath, P as isAudioTranscriptionSupported, We as isHiddenPath, T as isStatusMessage, L as markdownToRichTextHtml, C as mergeClasses, k as messageAttachmentToDisplayAttachment, A as messageAttachmentsToDisplayAttachments, fe as pickAvatarColor, te as rehypePromptVariables, ne as resolvePromptParams, Ee as restrainedSyntaxTheme, b as sanitizeConversationName, je as serializeMarkdownTableRows, x as stripTrailingDots, O as stripUrlQueryAndFragment, q as triggerAnchorDownload, J as triggerBlobDownload, S as truncateToUtf8Bytes, Y as tryBase64ToBytes, Te as useCodeCopy, ze as useCollapsedText, Ke as useGridEditingScroll, Be 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.1.0-dev.426",
4
+ "version": "1.1.0-dev.430",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "sideEffects": [