@epam/ai-dial-chat-shared 1.1.2 → 1.2.0-dev.101
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.
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +64 -63
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.module.scss.js +6 -6
- package/components/MarkdownRenderer/MarkdownRenderer.js +1 -1
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.js +19 -18
- package/components/MarkdownRenderer/Table/MarkdownTable.js +74 -56
- package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +11 -11
- package/components/MarkdownRenderer/Table/table-serialization.js +23 -3
- package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.js +48 -62
- package/constants/mime-types.js +49 -2
- package/constants/public-class-names.js +10 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.js +160 -159
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +23 -22
- package/file-manager/UploadProgressModal/UploadProgressModal.js +26 -32
- package/file-manager.d.ts +10 -6
- package/index.css +2 -2
- package/index.d.ts +46 -8
- package/index.js +56 -55
- package/markdown.d.ts +15 -7
- package/markdown.js +12 -11
- package/package.json +3 -3
- package/types/attachment.js +1 -1
- package/utils/file-download.js +6 -6
- package/utils/latex.js +5 -3
- package/utils/merge-class.js +5 -4
- package/utils/mime-type.js +10 -6
|
@@ -1,56 +1,50 @@
|
|
|
1
|
-
import { DialFileName as e,
|
|
2
|
-
import { memo as
|
|
3
|
-
import { jsx as
|
|
1
|
+
import { DialFileName as e, ElementSize as t, NeutralButton as n, Popup as r, ProgressBar as i } from "@epam/ai-dial-ui-kit";
|
|
2
|
+
import { memo as a, useCallback as o } from "react";
|
|
3
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
4
4
|
//#region src/file-manager/UploadProgressModal/UploadProgressModal.tsx
|
|
5
|
-
var
|
|
6
|
-
let { files:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"aria-valuemax": 100,
|
|
12
|
-
"aria-valuenow": e,
|
|
13
|
-
children: /* @__PURE__ */ a("div", {
|
|
14
|
-
className: "h-full rounded-full bg-control-accent transition-all duration-300",
|
|
15
|
-
style: { width: `${e}%` }
|
|
16
|
-
})
|
|
5
|
+
var l = ({ batchState: a, uploadProgressTitle: l, uploadProgressText: u, cancelLabel: d, onCancel: f }) => {
|
|
6
|
+
let { files: p } = a, m = o((e, n) => n === void 0 ? null : /* @__PURE__ */ s(i, {
|
|
7
|
+
value: n,
|
|
8
|
+
size: t.Small,
|
|
9
|
+
"aria-label": e,
|
|
10
|
+
"data-qa": "uploading-indicator"
|
|
17
11
|
}), []);
|
|
18
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ s(r, {
|
|
19
13
|
className: "!h-fit !max-h-full !w-[400px] mobile:!w-full desktop:!max-h-[693px]",
|
|
20
|
-
open:
|
|
14
|
+
open: a.isOpen,
|
|
21
15
|
closeOnOutsideClick: !1,
|
|
22
16
|
hideClose: !0,
|
|
23
|
-
onClose:
|
|
24
|
-
footer: /* @__PURE__ */
|
|
17
|
+
onClose: f,
|
|
18
|
+
footer: /* @__PURE__ */ s("div", {
|
|
25
19
|
className: "flex justify-end gap-2 px-6 py-4",
|
|
26
|
-
children: /* @__PURE__ */
|
|
27
|
-
label:
|
|
28
|
-
onClick:
|
|
20
|
+
children: /* @__PURE__ */ s(n, {
|
|
21
|
+
label: d,
|
|
22
|
+
onClick: f
|
|
29
23
|
})
|
|
30
24
|
}),
|
|
31
|
-
header: /* @__PURE__ */
|
|
25
|
+
header: /* @__PURE__ */ c("div", {
|
|
32
26
|
className: "flex flex-col gap-2",
|
|
33
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ s("div", { children: l }), /* @__PURE__ */ s("div", {
|
|
34
28
|
className: "dial-small-text text-secondary",
|
|
35
29
|
"data-qa": "uploading-items-count",
|
|
36
|
-
children:
|
|
30
|
+
children: u
|
|
37
31
|
})]
|
|
38
32
|
}),
|
|
39
|
-
children: /* @__PURE__ */
|
|
33
|
+
children: /* @__PURE__ */ s("div", {
|
|
40
34
|
className: "flex h-full max-h-full flex-col gap-4 px-6",
|
|
41
|
-
children: /* @__PURE__ */
|
|
35
|
+
children: /* @__PURE__ */ s("div", {
|
|
42
36
|
className: "flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto",
|
|
43
|
-
children:
|
|
37
|
+
children: p.map((t) => /* @__PURE__ */ s("div", {
|
|
44
38
|
className: "rounded bg-layer-sunken px-3 py-2",
|
|
45
|
-
children: /* @__PURE__ */
|
|
39
|
+
children: /* @__PURE__ */ s(e, {
|
|
46
40
|
name: t.name,
|
|
47
|
-
details:
|
|
41
|
+
details: m(t.name, t.percent)
|
|
48
42
|
})
|
|
49
43
|
}, t.id))
|
|
50
44
|
})
|
|
51
45
|
})
|
|
52
46
|
});
|
|
53
47
|
};
|
|
54
|
-
|
|
48
|
+
a(l);
|
|
55
49
|
//#endregion
|
|
56
|
-
export {
|
|
50
|
+
export { l as UploadProgressModal };
|
package/file-manager.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ import { DialUploadFileItem } from '@epam/ai-dial-react-file-manager';
|
|
|
11
11
|
import { FC } from 'react';
|
|
12
12
|
import { FileManagerColumnKey } from '@epam/ai-dial-react-file-manager';
|
|
13
13
|
import { FileManagerGridRow } from '@epam/ai-dial-react-file-manager';
|
|
14
|
+
import { FileTreeOptions } from '@epam/ai-dial-react-file-manager';
|
|
14
15
|
import { ReactNode } from 'react';
|
|
15
|
-
import { ToolbarOptions } from '@epam/ai-dial-react-file-manager';
|
|
16
16
|
|
|
17
17
|
/** Result returned by the file-manager attach modal when the user confirms a selection. */
|
|
18
18
|
declare interface AttachResult {
|
|
@@ -174,8 +174,8 @@ export declare interface DialFileManagerShellProps {
|
|
|
174
174
|
labels: DialFileManagerShellLabels;
|
|
175
175
|
/** Currently active tab. */
|
|
176
176
|
activeTab: DialFileManagerTabs;
|
|
177
|
-
/**
|
|
178
|
-
tabs:
|
|
177
|
+
/** Filter chips scoping the tree and the grid, rendered above the folder tree. */
|
|
178
|
+
tabs: FileTreeOptions['tabs'];
|
|
179
179
|
/** Called when the user switches tabs. */
|
|
180
180
|
onTabChange: (tab: DialFileManagerTabs) => void;
|
|
181
181
|
/** Set of currently selected file/folder virtual paths. */
|
|
@@ -190,8 +190,10 @@ export declare interface DialFileManagerShellProps {
|
|
|
190
190
|
autoSelectUploadedItems?: boolean;
|
|
191
191
|
/** MIME type filters for selectable files. */
|
|
192
192
|
allowedFileTypes?: DialFileAcceptType[];
|
|
193
|
-
/** Maximum file size in bytes for selectable files. */
|
|
193
|
+
/** Maximum file size in bytes for selectable files, and — reused as the ui-kit's own `maxFileSize` — the maximum size accepted for a newly-uploaded file. */
|
|
194
194
|
maxSelectableFileSize?: number;
|
|
195
|
+
/** Pre-translated message shown by the ui-kit when a newly-selected file exceeds `maxSelectableFileSize`. Omit to leave upload-size validation unrestricted regardless of `maxSelectableFileSize`. */
|
|
196
|
+
oversizedUploadMessage?: string;
|
|
195
197
|
/** Custom row-selectability predicate, forwarded to the grid's row selection. */
|
|
196
198
|
isRowSelectable?: (node: {
|
|
197
199
|
data?: FileManagerSelectableNode | null;
|
|
@@ -261,8 +263,8 @@ export declare interface FileManagerAttachModalProps {
|
|
|
261
263
|
isAnyOperationInProgress: boolean;
|
|
262
264
|
/** Currently active tab. */
|
|
263
265
|
activeTab: DialFileManagerTabs;
|
|
264
|
-
/**
|
|
265
|
-
tabs:
|
|
266
|
+
/** Filter chips scoping the tree and the grid, rendered above the folder tree. */
|
|
267
|
+
tabs: FileTreeOptions['tabs'];
|
|
266
268
|
/**
|
|
267
269
|
* Called when the user switches tabs.
|
|
268
270
|
* The host is responsible for resetting `selectedPaths` to an empty set.
|
|
@@ -316,6 +318,8 @@ export declare interface FileManagerAttachModalProps {
|
|
|
316
318
|
allowedFileTypes?: DialFileAcceptType[];
|
|
317
319
|
/** Whether to auto-select items immediately after upload. Defaults to `false`. */
|
|
318
320
|
autoSelectUploadedItems?: boolean;
|
|
321
|
+
/** Pre-translated message shown by the ui-kit when a newly-selected file exceeds `maxSelectableFileSize`. Omit to leave upload-size validation unrestricted regardless of `maxSelectableFileSize`. */
|
|
322
|
+
oversizedUploadMessage?: string;
|
|
319
323
|
}
|
|
320
324
|
|
|
321
325
|
/**
|
package/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
._agentIconBadge_1ger8_1{background:var(--di-icon-bg,var(--bg-layer-sunken,#eef1f7))}._badge_1ko75_1{background:var(--ia-bg,var(--bg-visual-green-1,#cde8e5))}._initials_1ko75_5{color:var(--ia-fg,var(--text-visual-green-2,#0d6e72))}._title_11w3i_1{color:var(--ih-title-color,var(--text-primary,#161b2d))}._count_11w3i_5{color:var(--ih-count-color,var(--text-secondary,#57647a))}.
|
|
2
|
-
/*$vite$:1*/.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.end-0{inset-inline-end:0}.top-0{top:0}.top-\[-6px\]{top:-6px}.z-\[2\]{z-index:2}.z-\[52\]{z-index:52}.mx-0{margin-left:0;margin-right:0}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.my-4{margin-bottom:1rem;margin-top:1rem}.my-5{margin-bottom:1.25rem;margin-top:1.25rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.me-1{margin-inline-end:.25rem}.me-1\.5{margin-inline-end:.375rem}.ms-auto{margin-inline-start:auto}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.size-full{height:100%;width:100%}.\!h-\[min\(800px\2c 100dvh\)\]{height:min(800px,100dvh)!important}.\!h-fit{height:-moz-fit-content!important;height:fit-content!important}.h-
|
|
1
|
+
._agentIconBadge_1ger8_1{background:var(--di-icon-bg,var(--bg-layer-sunken,#eef1f7))}._badge_1ko75_1{background:var(--ia-bg,var(--bg-visual-green-1,#cde8e5))}._initials_1ko75_5{color:var(--ia-fg,var(--text-visual-green-2,#0d6e72))}._title_11w3i_1{color:var(--ih-title-color,var(--text-primary,#161b2d))}._count_11w3i_5{color:var(--ih-count-color,var(--text-secondary,#57647a))}._container_sqe5k_1{background:var(--cm-code-block-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--cm-code-block-border,var(--stroke-secondary,#d1dbea))}._containerLight_sqe5k_6{background:var(--cm-code-block-bg,var(--bg-layer-raised,#fcfcfc))}._header_sqe5k_10{background:var(--cm-code-block-header-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--cm-code-block-border,var(--stroke-secondary,#d1dbea))}._languageLabel_sqe5k_15{color:var(--cm-code-block-language,var(--text-secondary,#57647a))}._copiedIcon_sqe5k_19{color:var(--cm-code-block-copied,var(--text-success,#007274))}._scrollContainer_sqe5k_23 .token.table,._scrollContainer_sqe5k_23 .token.table-header-row,._scrollContainer_sqe5k_23 .token.table-line,._scrollContainer_sqe5k_23 .token.table-data-rows{display:inline}._scrollContainer_sqe5k_23{scrollbar-width:thin;scrollbar-color:var(--cm-code-block-scrollbar,var(--stroke-primary,#57647a)) transparent}._scrollContainer_sqe5k_23::-webkit-scrollbar{width:4px;height:4px}._scrollContainer_sqe5k_23::-webkit-scrollbar-track{background-color:#0000}._scrollContainer_sqe5k_23::-webkit-scrollbar-thumb{background-color:var(--cm-code-block-scrollbar,var(--stroke-primary,#57647a));border-radius:4px}@keyframes _cm-shimmer_1g29w_1{0%{background-position:200%}to{background-position:-200%}}._thinking_1g29w_9{background:linear-gradient(270deg, var(--cm-thinking-inverted,var(--text-primary,#161b2d)) 0%, var(--cm-thinking-secondary,var(--text-secondary,#57647a)) 40%, var(--cm-thinking-inverted,var(--text-primary,#161b2d)) 80%);color:#0000;background-size:200%;-webkit-background-clip:text;background-clip:text;animation:2s linear infinite _cm-shimmer_1g29w_1}._h6_1g29w_18{color:var(--cm-h6-text,var(--text-secondary,#57647a))}._codeInline_1g29w_22{background:var(--cm-code-inline-bg,var(--bg-layer-raised,#fcfcfc));color:var(--cm-code-inline-text,var(--text-primary,#161b2d))}._secondaryBorder_1g29w_27{border-color:var(--cm-markdown-border,var(--stroke-secondary,#d1dbea))}._blockquote_1g29w_31{border-color:var(--cm-blockquote-border,var(--stroke-primary,#57647a));color:var(--cm-blockquote-text,var(--text-secondary,#57647a))}._link_1g29w_36{color:var(--cm-link-text,var(--text-accent,#1d4ed8))}._link_1g29w_36:focus-visible{outline-color:var(--cm-link-focus,var(--stroke-focus-black,#161b2d))}._scrollContainer_1f433_1{scrollbar-width:thin;scrollbar-color:var(--cm-math-scrollbar,var(--stroke-primary,#57647a)) transparent}._scrollContainer_1f433_1::-webkit-scrollbar{height:4px}._scrollContainer_1f433_1::-webkit-scrollbar-track{background-color:#0000}._scrollContainer_1f433_1::-webkit-scrollbar-thumb{background-color:var(--cm-math-scrollbar,var(--stroke-primary,#57647a));border-radius:4px}._scrollContainer_1f433_1:focus-visible{outline:1px solid var(--cm-math-focus,var(--stroke-focus-black,#161b2d));outline-offset:2px}._mathContent_1f433_24{width:max-content;min-width:100%;display:block}._tableContainer_1fwnj_1{background:var(--cm-code-block-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--cm-markdown-border,var(--cm-code-block-border,var(--stroke-secondary,#d1dbea)))}._tableContainerLight_1fwnj_6{background:var(--cm-code-block-bg,var(--bg-layer-base,#f5f7fa))}._copiedIcon_1fwnj_10{color:var(--cm-code-block-copied,var(--text-success,#007274))}._scrollContainer_1fwnj_14{scrollbar-width:thin;scrollbar-color:var(--cm-table-scrollbar,var(--stroke-primary,#57647a)) transparent}._scrollContainer_1fwnj_14::-webkit-scrollbar{width:4px;height:4px}._scrollContainer_1fwnj_14::-webkit-scrollbar-track{background-color:#0000}._scrollContainer_1fwnj_14::-webkit-scrollbar-thumb{background-color:var(--cm-table-scrollbar,var(--stroke-primary,#57647a));border-radius:4px}._tableHeaderCell_1fwnj_30{background:var(--cm-code-block-header-bg,var(--bg-layer-raised,#fcfcfc));height:3rem;color:var(--cm-table-header-text,var(--text-secondary,#57647a))}._sectionRow_1fwnj_37 td{background:var(--cm-code-block-header-bg,var(--bg-layer-raised,#fcfcfc))}._rowDivider_1fwnj_41{border-block-end:.5px solid var(--cm-table-row-divider,var(--stroke-tertiary,#e0e6f0))}tbody ._row_1fwnj_41:hover td{background:var(--cm-table-row-hover-bg,var(--bg-control-accent-alpha-hover,#2764d924))}._tableScrollFadeEnd_1fwnj_51{-webkit-mask-image:linear-gradient(to right, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) calc(100% - 1rem), transparent 100%);-webkit-mask-image:linear-gradient(to right, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) calc(100% - 1rem), transparent 100%);mask-image:linear-gradient(to right, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) calc(100% - 1rem), transparent 100%)}[dir=rtl] ._tableScrollFadeEnd_1fwnj_51{-webkit-mask-image:linear-gradient(to left, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) calc(100% - 1rem), transparent 100%);-webkit-mask-image:linear-gradient(to left, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) calc(100% - 1rem), transparent 100%);mask-image:linear-gradient(to left, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) calc(100% - 1rem), transparent 100%)}._tableScrollFadeStart_1fwnj_59{-webkit-mask-image:linear-gradient(to right, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 100%);-webkit-mask-image:linear-gradient(to right, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 100%);mask-image:linear-gradient(to right, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 100%)}[dir=rtl] ._tableScrollFadeStart_1fwnj_59{-webkit-mask-image:linear-gradient(to left, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 100%);-webkit-mask-image:linear-gradient(to left, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 100%);mask-image:linear-gradient(to left, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 100%)}._tableScrollFadeBoth_1fwnj_67{-webkit-mask-image:linear-gradient(to right, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) calc(100% - 1rem), transparent 100%);-webkit-mask-image:linear-gradient(to right, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) calc(100% - 1rem), transparent 100%);mask-image:linear-gradient(to right, transparent 0, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) 1rem, var(--cm-table-fade,var(--stroke-focus-black,#161b2d)) calc(100% - 1rem), transparent 100%)}._tableHeader_1qvg8_1{background:var(--cm-code-block-header-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--cm-markdown-border,var(--cm-code-block-border,var(--stroke-secondary,#d1dbea)))}._label_12p89_1{color:var(--pes-label-color,var(--text-primary,#161b2d))}._row_1csuq_1{border-color:var(--rs-border,var(--stroke-tertiary,#e0e6f0));background:var(--rs-bg,var(--bg-layer-sunken,#eef1f7))}._versionTag_1csuq_7{border-color:var(--rs-version-tag-border,var(--stroke-tertiary,#e0e6f0))!important;background:var(--rs-version-tag-bg,var(--bg-control-accent-alpha,#2764d90f))!important;color:var(--rs-version-tag-text,var(--text-accent,#1d4ed8))!important}
|
|
2
|
+
/*$vite$:1*/.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.end-0{inset-inline-end:0}.end-2{inset-inline-end:.5rem}.top-0{top:0}.top-2{top:.5rem}.top-\[-6px\]{top:-6px}.z-10{z-index:10}.z-\[2\]{z-index:2}.z-\[52\]{z-index:52}.mx-0{margin-left:0;margin-right:0}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.my-4{margin-bottom:1rem;margin-top:1rem}.my-5{margin-bottom:1.25rem;margin-top:1.25rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.me-1{margin-inline-end:.25rem}.me-1\.5{margin-inline-end:.375rem}.ms-auto{margin-inline-start:auto}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.size-full{height:100%;width:100%}.\!h-\[min\(800px\2c 100dvh\)\]{height:min(800px,100dvh)!important}.\!h-fit{height:-moz-fit-content!important;height:fit-content!important}.h-0{height:0}.h-\[24px\]{height:24px}.h-full{height:100%}.\!max-h-full{max-height:100%!important}.max-h-\[344px\]{max-height:344px}.max-h-\[50vh\]{max-height:50vh}.max-h-\[60vh\]{max-height:60vh}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-10{min-height:2.5rem}.\!w-\[400px\]{width:400px!important}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.min-w-0{min-width:0}.min-w-full{min-width:100%}.max-w-96{max-width:24rem}.max-w-\[30\%\]{max-width:30%}.max-w-\[45\%\]{max-width:45%}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.break-words{overflow-wrap:break-word}.rounded{border-radius:4px}.rounded-2xl{border-radius:1rem}.rounded-\[14px\]{border-radius:14px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-s-2{border-inline-start-width:2px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-tertiary{border-color:var(--stroke-tertiary,#e0e6f0)}.\!bg-layer-sunken{background-color:var(--bg-layer-sunken,#eef1f7)!important}.bg-backdrop{background-color:var(--bg-backdrop,#161b2d4d)}.bg-layer-raised{background-color:var(--bg-layer-raised,#fcfcfc)}.bg-layer-sunken{background-color:var(--bg-layer-sunken,#eef1f7)}.object-contain{-o-object-fit:contain;object-fit:contain}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-bottom:0;padding-top:0}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-\[7px\]{padding-bottom:7px;padding-top:7px}.ps-4{padding-inline-start:1rem}.ps-\[2em\]{padding-inline-start:2em}.pt-1{padding-top:.25rem}.text-center{text-align:center}.text-start{text-align:start}.text-end{text-align:end}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.uppercase{text-transform:uppercase}.italic{font-style:italic}.text-secondary{color:var(--text-secondary,#57647a)}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-chat-button{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-chat-button{--tw-shadow:0 2px 12px 0 var(--shadow-xs-1,#2764d933),0 2px 6px 0 var(--shadow-xs-2,#161b2d08);--tw-shadow-colored:0 2px 12px 0 var(--tw-shadow-color),0 2px 6px 0 var(--tw-shadow-color)}.shadow-xs{--tw-shadow:0 1px 4px 0 var(--shadow-xs-1,#2764d933),0 1px 2px 0 var(--shadow-xs-2,#161b2d08);--tw-shadow-colored:0 1px 4px 0 var(--tw-shadow-color),0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid;outline-width:1px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.\[overflow\:clip\]{overflow:clip}.\[text-wrap\:balance\]{text-wrap:balance}.\[text-wrap\:pretty\]{text-wrap:pretty}.first\:mt-0:first-child{margin-top:0}.last\:mb-0:last-child{margin-bottom:0}.focus-within\:opacity-100:focus-within{opacity:1}.hover\:decoration-current:hover{text-decoration-color:currentColor}.focus-visible\:outline:focus-visible{outline-style:solid;outline-width:1px}.focus-visible\:outline-1:focus-visible{outline-width:1px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.group\/table:hover .group-hover\/table\:opacity-100{opacity:1}@media (max-width:1279px){.mobile\:\!w-full{width:100%!important}}@media (min-width:1280px){.desktop\:\!max-h-\[693px\]{max-height:693px!important}.desktop\:p-4{padding:1rem}}.\[\&_\.w-md-editor\:not\(\.w-md-editor-fullscreen\)\]\:max-h-\[var\(--resizable-field-max-height\2c 70vh\)\] .w-md-editor:not(.w-md-editor-fullscreen){max-height:var(--resizable-field-max-height,70vh)}.\[\&_\.wmde-markdown\>ol\]\:list-decimal .wmde-markdown>ol{list-style-type:decimal}.\[\&_\.wmde-markdown_ul\]\:list-disc .wmde-markdown ul{list-style-type:disc}.\[\&_\.wmde-markdown_ul_ul\]\:list-\[circle\] .wmde-markdown ul ul{list-style-type:circle}.\[\&_\.wmde-markdown_ul_ul_ul\]\:list-\[square\] .wmde-markdown ul ul ul{list-style-type:square}
|
package/index.d.ts
CHANGED
|
@@ -140,7 +140,9 @@ export declare enum AttachmentErrorReason {
|
|
|
140
140
|
/** Upload failed because the device was offline. */
|
|
141
141
|
Network = "network",
|
|
142
142
|
/** File MIME type is not in the deployment's inputAttachmentTypes list. */
|
|
143
|
-
UnsupportedType = "unsupported-type"
|
|
143
|
+
UnsupportedType = "unsupported-type",
|
|
144
|
+
/** File size exceeds the configured maximum attachment size. */
|
|
145
|
+
FileTooLarge = "file-too-large"
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
/** A file attachment referenced by a citation — same shape as `MessageAttachment` but scoped to annotations. */
|
|
@@ -221,6 +223,19 @@ export declare enum CatalogEntityType {
|
|
|
221
223
|
Prompt = "PROMPT"
|
|
222
224
|
}
|
|
223
225
|
|
|
226
|
+
export declare const CHAT_SHARED_CLASS: {
|
|
227
|
+
/** The bordered container of a fenced code block. */
|
|
228
|
+
readonly codeBlock: "dial-chat-shared-code-block";
|
|
229
|
+
/** The code block's sticky header, holding the language label and actions. */
|
|
230
|
+
readonly codeBlockHeader: "dial-chat-shared-code-block-header";
|
|
231
|
+
/** The bordered container of a Markdown table. */
|
|
232
|
+
readonly table: "dial-chat-shared-table";
|
|
233
|
+
/** The scrolling box around a Markdown table, which owns its overflow. */
|
|
234
|
+
readonly tableScroll: "dial-chat-shared-table-scroll";
|
|
235
|
+
/** The scrolling box around a display-math block. */
|
|
236
|
+
readonly mathBlock: "dial-chat-shared-math-block";
|
|
237
|
+
};
|
|
238
|
+
|
|
224
239
|
/** Color theme for syntax highlighting. */
|
|
225
240
|
export declare enum CodeBlockTheme {
|
|
226
241
|
/** Dark syntax-highlighting theme. */
|
|
@@ -323,6 +338,8 @@ export declare interface ConversationTransferJob {
|
|
|
323
338
|
* {@link ConversationTransferJobStatus.Warning}.
|
|
324
339
|
*/
|
|
325
340
|
warningCode?: ConversationTransferWarningCode;
|
|
341
|
+
/** Untranslated names of skipped attachments, when available for this warning. */
|
|
342
|
+
warningNames?: string[];
|
|
326
343
|
}
|
|
327
344
|
|
|
328
345
|
/** Lifecycle status of a queued export/import job. */
|
|
@@ -1223,6 +1240,9 @@ export declare const generateUUID: () => string;
|
|
|
1223
1240
|
/** Classifies a MIME type into an `AttachmentType` by prefix (`image/*` / `audio/*`), defaulting to `File`. */
|
|
1224
1241
|
export declare const getAttachmentTypeFromMime: (mimeType: string | undefined) => AttachmentType;
|
|
1225
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
|
+
|
|
1226
1246
|
/** Returns the file extension (without a leading dot) for a fenced-code-block language identifier, defaulting to `txt`. */
|
|
1227
1247
|
export declare const getFileExtensionForLanguage: (language: string) => string;
|
|
1228
1248
|
|
|
@@ -1552,9 +1572,7 @@ export declare interface MarkdownRendererProps {
|
|
|
1552
1572
|
export declare const MarkdownTable: FC<MarkdownTableProps>;
|
|
1553
1573
|
|
|
1554
1574
|
export declare interface MarkdownTableActionLabels {
|
|
1555
|
-
|
|
1556
|
-
copyTxtLabel?: string;
|
|
1557
|
-
copyMarkdownLabel?: string;
|
|
1575
|
+
copyLabel?: string;
|
|
1558
1576
|
copiedLabel?: string;
|
|
1559
1577
|
downloadCsvLabel?: string;
|
|
1560
1578
|
openInCanvasLabel?: string;
|
|
@@ -1580,19 +1598,16 @@ export declare interface MarkdownTableColors {
|
|
|
1580
1598
|
fade?: string;
|
|
1581
1599
|
/** Divider color between rows. Defaults to `--stroke-tertiary`. */
|
|
1582
1600
|
rowDivider?: string;
|
|
1583
|
-
/** Background of even-indexed body rows. Defaults to `--bg-layer-base`. */
|
|
1584
|
-
rowZebraBackground?: string;
|
|
1585
1601
|
/** Background of a body row on hover. Defaults to `--bg-control-accent-alpha-hover`. */
|
|
1586
1602
|
rowHoverBackground?: string;
|
|
1587
1603
|
}
|
|
1588
1604
|
|
|
1589
1605
|
export declare enum MarkdownTableCopyFormat {
|
|
1590
1606
|
Csv = "csv",
|
|
1591
|
-
Txt = "txt",
|
|
1592
1607
|
Markdown = "markdown"
|
|
1593
1608
|
}
|
|
1594
1609
|
|
|
1595
|
-
/** A table
|
|
1610
|
+
/** A table action rendered as an icon button. */
|
|
1596
1611
|
export declare interface MarkdownTableHeaderAction {
|
|
1597
1612
|
/** Stable accessible name and tooltip text. */
|
|
1598
1613
|
label: string;
|
|
@@ -1818,6 +1833,21 @@ export declare interface MessageState {
|
|
|
1818
1833
|
tool_execution_history?: ToolExecutionHistoryMessage[];
|
|
1819
1834
|
}
|
|
1820
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
|
+
|
|
1821
1851
|
/** MIME type prefix shared by all audio content types. */
|
|
1822
1852
|
export declare const MIME_TYPE_AUDIO_PREFIX = "audio/";
|
|
1823
1853
|
|
|
@@ -1887,6 +1917,14 @@ export declare const MOBILE_MAX_WIDTH_PX: number;
|
|
|
1887
1917
|
/** `matchMedia` query matching the mobile/tablet band (up to 1279px). */
|
|
1888
1918
|
export declare const MOBILE_MEDIA_QUERY = "(max-width: 1279px)";
|
|
1889
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
|
+
|
|
1890
1928
|
/**
|
|
1891
1929
|
* Repairs persisted `html_tag` annotations created by older normalizers that
|
|
1892
1930
|
* defaulted every non-HTML source to PDF. An explicit, recognized file
|
package/index.js
CHANGED
|
@@ -6,58 +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 {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { isAudioTranscriptionSupported as
|
|
18
|
-
import { copyMarkdownAsRichText as
|
|
19
|
-
import { formatLastUsed as
|
|
20
|
-
import { formatFileSize as
|
|
21
|
-
import { formatCost as
|
|
22
|
-
import { base64ToBlob as
|
|
23
|
-
import { ENTITY_TYPE_BG_COLOR as
|
|
24
|
-
import { PROMPT_PARAM_DEFAULT_SEPARATOR as
|
|
25
|
-
import { generateUUID as
|
|
26
|
-
import { BASE_LG_ICON_PROPS as
|
|
27
|
-
import { HIDDEN_FILE as
|
|
28
|
-
import { TAG_INPUT_TAG_CLASS_NAME as
|
|
29
|
-
import { MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as
|
|
30
|
-
import { MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as
|
|
31
|
-
import { SELECT_LIST_MAX_HEIGHT_CLASS_NAME as
|
|
32
|
-
import { DESKTOP_BREAKPOINT_PX as
|
|
33
|
-
import { pickAvatarColor as
|
|
34
|
-
import { extractInitials as
|
|
35
|
-
import { InitialsAvatar as
|
|
36
|
-
import { DeploymentIcon as
|
|
37
|
-
import { CopyButton as
|
|
38
|
-
import { PanelEmptyState as
|
|
39
|
-
import { ItemHeader as
|
|
40
|
-
import { EntityTypeLabel as
|
|
41
|
-
import { FeaturedChip as
|
|
42
|
-
import { EntityHeader as
|
|
43
|
-
import { ResourceSummary as
|
|
44
|
-
import { TableHeader as
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
|
|
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/markdown.d.ts
CHANGED
|
@@ -4,6 +4,19 @@ import { FC } from 'react';
|
|
|
4
4
|
import { Options } from 'react-markdown';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
|
|
7
|
+
export declare const CHAT_SHARED_CLASS: {
|
|
8
|
+
/** The bordered container of a fenced code block. */
|
|
9
|
+
readonly codeBlock: "dial-chat-shared-code-block";
|
|
10
|
+
/** The code block's sticky header, holding the language label and actions. */
|
|
11
|
+
readonly codeBlockHeader: "dial-chat-shared-code-block-header";
|
|
12
|
+
/** The bordered container of a Markdown table. */
|
|
13
|
+
readonly table: "dial-chat-shared-table";
|
|
14
|
+
/** The scrolling box around a Markdown table, which owns its overflow. */
|
|
15
|
+
readonly tableScroll: "dial-chat-shared-table-scroll";
|
|
16
|
+
/** The scrolling box around a display-math block. */
|
|
17
|
+
readonly mathBlock: "dial-chat-shared-math-block";
|
|
18
|
+
};
|
|
19
|
+
|
|
7
20
|
/** Color theme for syntax highlighting. */
|
|
8
21
|
declare enum CodeBlockTheme {
|
|
9
22
|
/** Dark syntax-highlighting theme. */
|
|
@@ -225,9 +238,7 @@ export declare interface MarkdownRendererProps {
|
|
|
225
238
|
export declare const MarkdownTable: FC<MarkdownTableProps>;
|
|
226
239
|
|
|
227
240
|
export declare interface MarkdownTableActionLabels {
|
|
228
|
-
|
|
229
|
-
copyTxtLabel?: string;
|
|
230
|
-
copyMarkdownLabel?: string;
|
|
241
|
+
copyLabel?: string;
|
|
231
242
|
copiedLabel?: string;
|
|
232
243
|
downloadCsvLabel?: string;
|
|
233
244
|
openInCanvasLabel?: string;
|
|
@@ -253,19 +264,16 @@ export declare interface MarkdownTableColors {
|
|
|
253
264
|
fade?: string;
|
|
254
265
|
/** Divider color between rows. Defaults to `--stroke-tertiary`. */
|
|
255
266
|
rowDivider?: string;
|
|
256
|
-
/** Background of even-indexed body rows. Defaults to `--bg-layer-base`. */
|
|
257
|
-
rowZebraBackground?: string;
|
|
258
267
|
/** Background of a body row on hover. Defaults to `--bg-control-accent-alpha-hover`. */
|
|
259
268
|
rowHoverBackground?: string;
|
|
260
269
|
}
|
|
261
270
|
|
|
262
271
|
export declare enum MarkdownTableCopyFormat {
|
|
263
272
|
Csv = "csv",
|
|
264
|
-
Txt = "txt",
|
|
265
273
|
Markdown = "markdown"
|
|
266
274
|
}
|
|
267
275
|
|
|
268
|
-
/** A table
|
|
276
|
+
/** A table action rendered as an icon button. */
|
|
269
277
|
export declare interface MarkdownTableHeaderAction {
|
|
270
278
|
/** Stable accessible name and tooltip text. */
|
|
271
279
|
label: string;
|
package/markdown.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
1
|
+
import { CHAT_SHARED_CLASS as e } from "./constants/public-class-names.js";
|
|
2
|
+
import { useCodeCopy as t } from "./hooks/useCodeCopy.js";
|
|
3
|
+
import { restrainedSyntaxTheme as n } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
|
|
4
|
+
import { MarkdownCodeBlock as r } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
|
|
5
|
+
import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as i, MARKDOWN_TABLE_CSV_MIME_TYPE as a, MarkdownTableCopyFormat as o, serializeMarkdownTableRows as s } from "./components/MarkdownRenderer/Table/table-serialization.js";
|
|
6
|
+
import { MarkdownTable as c } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
|
|
7
|
+
import { MarkdownRenderer as l, defaultMarkdownComponents as u } from "./components/MarkdownRenderer/MarkdownRenderer.js";
|
|
8
|
+
import { COMPACT_MARKDOWN_CLASS_NAMES as d, DEFAULT_MARKDOWN_CLASS_NAMES as f } from "./components/MarkdownRenderer/markdown-class-names.js";
|
|
9
|
+
import { MDMessageViewer as p } from "./components/MarkdownRenderer/MDMessageViewer.js";
|
|
10
|
+
import { MarkdownWithPlaceholders as m } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
|
|
11
|
+
import { useCollapsedText as h } from "./hooks/useCollapsedText.js";
|
|
12
|
+
export { e as CHAT_SHARED_CLASS, d as COMPACT_MARKDOWN_CLASS_NAMES, f as DEFAULT_MARKDOWN_CLASS_NAMES, i as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, a as MARKDOWN_TABLE_CSV_MIME_TYPE, p as MDMessageViewer, r as MarkdownCodeBlock, l as MarkdownRenderer, c as MarkdownTable, o as MarkdownTableCopyFormat, m as MarkdownWithPlaceholders, u as defaultMarkdownComponents, n as restrainedSyntaxTheme, s as serializeMarkdownTableRows, t as useCodeCopy, h as useCollapsedText };
|
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.
|
|
4
|
+
"version": "1.2.0-dev.101",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "^19.2.8",
|
|
35
|
-
"@epam/ai-dial-ui-kit": "^0.
|
|
36
|
-
"@epam/ai-dial-react-file-manager": "^0.
|
|
35
|
+
"@epam/ai-dial-ui-kit": "^0.15.0-dev.12",
|
|
36
|
+
"@epam/ai-dial-react-file-manager": "^0.3.0-dev.4",
|
|
37
37
|
"ag-grid-community": "^35.3.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependenciesMeta": {
|
package/types/attachment.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/types/attachment.ts
|
|
2
2
|
var e = /* @__PURE__ */ function(e) {
|
|
3
|
-
return e.Network = "network", e.UnsupportedType = "unsupported-type", e;
|
|
3
|
+
return e.Network = "network", e.UnsupportedType = "unsupported-type", e.FileTooLarge = "file-too-large", e;
|
|
4
4
|
}({}), t = /* @__PURE__ */ function(e) {
|
|
5
5
|
return e.File = "file", e.Image = "image", e.Audio = "audio", e.Prompt = "prompt", e.Pasted = "pasted", e.Link = "link", e;
|
|
6
6
|
}({});
|
package/utils/file-download.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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
|
|
13
|
-
if (
|
|
12
|
+
let t = e[a];
|
|
13
|
+
if (t != null) return `${n}.${t}`;
|
|
14
14
|
}
|
|
15
15
|
if (i != null) {
|
|
16
|
-
let
|
|
17
|
-
if (
|
|
16
|
+
let e = r(t(i).split("/").pop() ?? "");
|
|
17
|
+
if (e != null) return `${n}.${e}`;
|
|
18
18
|
}
|
|
19
19
|
return n;
|
|
20
20
|
}, a = {
|