@epam/ai-dial-chat-shared 1.3.0-dev.16 → 1.3.0-dev.161
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/ConfirmationDialog/ConfirmationDialog.d.ts +46 -0
- package/components/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -0
- package/components/ConfirmationDialog/ConfirmationDialog.js +11 -9
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts +33 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts.map +1 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.module.scss.js +5 -4
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts +33 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts.map +1 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.js +2 -2
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.module.scss.js +3 -2
- package/components/ConfirmationView/ConfirmationFooter.d.ts +41 -0
- package/components/ConfirmationView/ConfirmationFooter.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationFooter.js +1 -1
- package/components/ConfirmationView/ConfirmationView.d.ts +59 -0
- package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationView.js +11 -11
- package/components/ConfirmationView/ConfirmationView.module.scss.js +6 -5
- package/components/CopyButton/CopyButton.d.ts +19 -0
- package/components/CopyButton/CopyButton.d.ts.map +1 -0
- package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts +41 -0
- package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts.map +1 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts +49 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts.map +1 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.module.scss.js +5 -4
- package/components/DeploymentIcon/DeploymentIcon.d.ts +36 -0
- package/components/DeploymentIcon/DeploymentIcon.d.ts.map +1 -0
- package/components/DeploymentIcon/DeploymentIcon.module.scss.js +3 -2
- package/components/EntityHeader/EntityHeader.d.ts +38 -0
- package/components/EntityHeader/EntityHeader.d.ts.map +1 -0
- package/components/EntityHeader/EntityHeader.js +1 -1
- package/components/EntityTypeLabel/EntityTypeLabel.d.ts +18 -0
- package/components/EntityTypeLabel/EntityTypeLabel.d.ts.map +1 -0
- package/components/FeaturedChip/FeaturedChip.d.ts +16 -0
- package/components/FeaturedChip/FeaturedChip.d.ts.map +1 -0
- package/components/InitialsAvatar/InitialsAvatar.d.ts +15 -0
- package/components/InitialsAvatar/InitialsAvatar.d.ts.map +1 -0
- package/components/ItemHeader/ItemHeader.d.ts +40 -0
- package/components/ItemHeader/ItemHeader.d.ts.map +1 -0
- package/components/ItemHeader/ItemHeader.js +4 -1
- package/components/ItemHeader/ItemHeader.module.scss.js +5 -4
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +55 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +27 -27
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.module.scss.js +9 -8
- package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts +7 -0
- package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts.map +1 -0
- package/components/MarkdownRenderer/MDMessageViewer.d.ts +66 -0
- package/components/MarkdownRenderer/MDMessageViewer.d.ts.map +1 -0
- package/components/MarkdownRenderer/MDMessageViewer.js +14 -12
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts +139 -0
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -0
- package/components/MarkdownRenderer/MarkdownRenderer.js +140 -133
- package/components/MarkdownRenderer/MarkdownRenderer.module.scss.js +9 -8
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts +18 -0
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts.map +1 -0
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.js +1 -1
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.module.scss.js +5 -4
- package/components/MarkdownRenderer/PlainTextRenderer.d.ts +39 -0
- package/components/MarkdownRenderer/PlainTextRenderer.d.ts.map +1 -0
- package/components/MarkdownRenderer/PlainTextRenderer.js +1 -1
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts +47 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.js +35 -31
- package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +14 -13
- package/components/MarkdownRenderer/Table/TableHeader.d.ts +22 -0
- package/components/MarkdownRenderer/Table/TableHeader.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/TableHeader.module.scss.js +3 -2
- package/components/MarkdownRenderer/Table/table-serialization.d.ts +16 -0
- package/components/MarkdownRenderer/Table/table-serialization.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts +27 -0
- package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts.map +1 -0
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts +9 -0
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts.map +1 -0
- package/components/MarkdownRenderer/ThinkingShimmer.d.ts +17 -0
- package/components/MarkdownRenderer/ThinkingShimmer.d.ts.map +1 -0
- package/components/MarkdownRenderer/markdown-class-names.d.ts +10 -0
- package/components/MarkdownRenderer/markdown-class-names.d.ts.map +1 -0
- package/components/MarkdownRenderer/markdown-whitespace.d.ts +15 -0
- package/components/MarkdownRenderer/markdown-whitespace.d.ts.map +1 -0
- package/components/MarkdownRenderer/markdown-whitespace.js +14 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts +25 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts.map +1 -0
- package/components/PanelEmptyState/PanelEmptyState.d.ts +32 -0
- package/components/PanelEmptyState/PanelEmptyState.d.ts.map +1 -0
- package/components/PanelEmptyState/PanelEmptyState.js +19 -9
- package/components/PanelEmptyState/PanelEmptyState.module.scss.js +6 -2
- package/components/ResourceSummary/ResourceSummary.d.ts +49 -0
- package/components/ResourceSummary/ResourceSummary.d.ts.map +1 -0
- package/components/ResourceSummary/ResourceSummary.module.scss.js +5 -4
- package/components/TextRefinementField/TextRefinementField.d.ts +33 -0
- package/components/TextRefinementField/TextRefinementField.d.ts.map +1 -0
- package/components/TextRefinementField/TextRefinementField.js +27 -18
- package/constants/breakpoint.d.ts +9 -0
- package/constants/breakpoint.d.ts.map +1 -0
- package/constants/breakpoint.js +1 -1
- package/constants/dial.d.ts +5 -0
- package/constants/dial.d.ts.map +1 -0
- package/constants/entity-colors.d.ts +6 -0
- package/constants/entity-colors.d.ts.map +1 -0
- package/constants/icon.d.ts +14 -0
- package/constants/icon.d.ts.map +1 -0
- package/constants/markdown-editor.d.ts +2 -0
- package/constants/markdown-editor.d.ts.map +1 -0
- package/constants/mime-types.d.ts +27 -0
- package/constants/mime-types.d.ts.map +1 -0
- package/constants/public-class-names.d.ts +13 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/constants/resizable-fields.d.ts +5 -0
- package/constants/resizable-fields.d.ts.map +1 -0
- package/constants/select-list.d.ts +4 -0
- package/constants/select-list.d.ts.map +1 -0
- package/constants/tag-input.d.ts +2 -0
- package/constants/tag-input.d.ts.map +1 -0
- package/entry-points/file-manager.d.ts +5 -0
- package/entry-points/file-manager.d.ts.map +1 -0
- package/entry-points/markdown.d.ts +19 -0
- package/entry-points/markdown.d.ts.map +1 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts +67 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.js +302 -255
- package/file-manager/DialFileManagerShell/DialFileManagerShell.module.scss.js +4 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts +89 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts.map +1 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +3 -6
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts +17 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts.map +1 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.js +1 -1
- package/file-manager/attach-result.d.ts +9 -0
- package/file-manager/attach-result.d.ts.map +1 -0
- package/file-manager/file-manager-controller.d.ts +129 -0
- package/file-manager/file-manager-controller.d.ts.map +1 -0
- package/file-manager/file-manager-variant.d.ts +21 -0
- package/file-manager/file-manager-variant.d.ts.map +1 -0
- package/file-manager/file-upload-validation.d.ts +8 -0
- package/file-manager/file-upload-validation.d.ts.map +1 -0
- package/file-manager/index.d.ts +11 -0
- package/file-manager/index.d.ts.map +1 -0
- package/file-manager/labels.d.ts +177 -0
- package/file-manager/labels.d.ts.map +1 -0
- package/file-manager/path.d.ts +12 -0
- package/file-manager/path.d.ts.map +1 -0
- package/file-manager/shell-styles.d.ts +11 -0
- package/file-manager/shell-styles.d.ts.map +1 -0
- package/file-manager/upload-batch.d.ts +75 -0
- package/file-manager/upload-batch.d.ts.map +1 -0
- package/file-manager/upload-batch.js +6 -2
- package/file-manager/upload-queue.d.ts +45 -0
- package/file-manager/upload-queue.d.ts.map +1 -0
- package/file-manager/upload-queue.js +45 -13
- package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts +27 -0
- package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts.map +1 -0
- package/file-manager.d.ts +2 -506
- package/file-manager.js +4 -4
- package/hooks/useAvailableHeightCap.d.ts +30 -0
- package/hooks/useAvailableHeightCap.d.ts.map +1 -0
- package/hooks/useAvailableHeightCap.js +1 -1
- package/hooks/useCodeCopy.d.ts +6 -0
- package/hooks/useCodeCopy.d.ts.map +1 -0
- package/hooks/useCollapsedText.d.ts +27 -0
- package/hooks/useCollapsedText.d.ts.map +1 -0
- package/hooks/useHorizontalOverflow.d.ts +21 -0
- package/hooks/useHorizontalOverflow.d.ts.map +1 -0
- package/hooks/useIsMobile.d.ts +3 -0
- package/hooks/useIsMobile.d.ts.map +1 -0
- package/hooks/useIsMobile.js +1 -1
- package/hooks/useStreamedMarkdownContent.d.ts +3 -0
- package/hooks/useStreamedMarkdownContent.d.ts.map +1 -0
- package/hooks/useTextRefinement.d.ts +44 -0
- package/hooks/useTextRefinement.d.ts.map +1 -0
- package/hooks/useUnsavedChangesGuard.d.ts +14 -0
- package/hooks/useUnsavedChangesGuard.d.ts.map +1 -0
- package/hooks/useUnsavedChangesGuard.js +1 -5
- package/index.css +3 -2
- package/index.d.ts +79 -3167
- package/index.d.ts.map +1 -0
- package/index.js +78 -76
- package/markdown.d.ts +2 -465
- package/markdown.js +3 -2
- package/models/annotation.d.ts +143 -0
- package/models/annotation.d.ts.map +1 -0
- package/models/application-visualizer.d.ts +67 -0
- package/models/application-visualizer.d.ts.map +1 -0
- package/models/auth.d.ts +26 -0
- package/models/auth.d.ts.map +1 -0
- package/models/chat.d.ts +409 -0
- package/models/chat.d.ts.map +1 -0
- package/models/conversation-classification.d.ts +14 -0
- package/models/conversation-classification.d.ts.map +1 -0
- package/models/conversation-classification.js +3 -1
- package/models/conversation-transfer.d.ts +96 -0
- package/models/conversation-transfer.d.ts.map +1 -0
- package/models/custom-visualizer.d.ts +61 -0
- package/models/custom-visualizer.d.ts.map +1 -0
- package/models/deployment-configuration.d.ts +55 -0
- package/models/deployment-configuration.d.ts.map +1 -0
- package/models/deployment-features.d.ts +17 -0
- package/models/deployment-features.d.ts.map +1 -0
- package/models/deployment.d.ts +31 -0
- package/models/deployment.d.ts.map +1 -0
- package/models/dial-model.d.ts +19 -0
- package/models/dial-model.d.ts.map +1 -0
- package/models/entity.d.ts +15 -0
- package/models/entity.d.ts.map +1 -0
- package/models/import-export.d.ts +23 -0
- package/models/import-export.d.ts.map +1 -0
- package/models/inline-segment.d.ts +11 -0
- package/models/inline-segment.d.ts.map +1 -0
- package/models/locale.d.ts +19 -0
- package/models/locale.d.ts.map +1 -0
- package/models/text-refinement.d.ts +18 -0
- package/models/text-refinement.d.ts.map +1 -0
- package/models/theme.d.ts +36 -0
- package/models/theme.d.ts.map +1 -0
- package/models/tool-menu-item.d.ts +13 -0
- package/models/tool-menu-item.d.ts.map +1 -0
- package/package.json +3 -3
- package/types/attachment.d.ts +25 -0
- package/types/attachment.d.ts.map +1 -0
- package/types/code-editor.d.ts +8 -0
- package/types/code-editor.d.ts.map +1 -0
- package/types/entity-type.d.ts +10 -0
- package/types/entity-type.d.ts.map +1 -0
- package/types/file-manager-node.d.ts +17 -0
- package/types/file-manager-node.d.ts.map +1 -0
- package/types/mime-type.d.ts +59 -0
- package/types/mime-type.d.ts.map +1 -0
- package/utils/annotation.d.ts +29 -0
- package/utils/annotation.d.ts.map +1 -0
- package/utils/avatar-color.d.ts +10 -0
- package/utils/avatar-color.d.ts.map +1 -0
- package/utils/base64-json.d.ts +14 -0
- package/utils/base64-json.d.ts.map +1 -0
- package/utils/base64-json.js +4 -0
- package/utils/build-css-vars.d.ts +4 -0
- package/utils/build-css-vars.d.ts.map +1 -0
- package/utils/copy-to-clipboard.d.ts +18 -0
- package/utils/copy-to-clipboard.d.ts.map +1 -0
- package/utils/entity-field-limits.d.ts +11 -0
- package/utils/entity-field-limits.d.ts.map +1 -0
- package/utils/entity-type.d.ts +5 -0
- package/utils/entity-type.d.ts.map +1 -0
- package/utils/file-download.d.ts +21 -0
- package/utils/file-download.d.ts.map +1 -0
- package/utils/format-file-size.d.ts +3 -0
- package/utils/format-file-size.d.ts.map +1 -0
- package/utils/format-last-used.d.ts +3 -0
- package/utils/format-last-used.d.ts.map +1 -0
- package/utils/format-price.d.ts +7 -0
- package/utils/format-price.d.ts.map +1 -0
- package/utils/format-price.js +10 -10
- package/utils/generate-uuid.d.ts +3 -0
- package/utils/generate-uuid.d.ts.map +1 -0
- package/utils/initials.d.ts +3 -0
- package/utils/initials.d.ts.map +1 -0
- package/utils/inline-segments.d.ts +38 -0
- package/utils/inline-segments.d.ts.map +1 -0
- package/utils/inline-segments.js +53 -0
- package/utils/is-audio-transcription-supported.d.ts +3 -0
- package/utils/is-audio-transcription-supported.d.ts.map +1 -0
- package/utils/is-skill-selection-unsupported.d.ts +3 -0
- package/utils/is-skill-selection-unsupported.d.ts.map +1 -0
- package/utils/latex.d.ts +22 -0
- package/utils/latex.d.ts.map +1 -0
- package/utils/latex.js +47 -41
- package/utils/markdown-html.d.ts +14 -0
- package/utils/markdown-html.d.ts.map +1 -0
- package/utils/markdown-html.js +11 -0
- package/utils/merge-class.d.ts +4 -0
- package/utils/merge-class.d.ts.map +1 -0
- package/utils/message-attachment-to-display.d.ts +22 -0
- package/utils/message-attachment-to-display.d.ts.map +1 -0
- package/utils/message-attachment-to-display.js +1 -1
- package/utils/message.d.ts +4 -0
- package/utils/message.d.ts.map +1 -0
- package/utils/mime-type.d.ts +22 -0
- package/utils/mime-type.d.ts.map +1 -0
- package/utils/mime-type.js +1 -1
- package/utils/prompt-variables.d.ts +62 -0
- package/utils/prompt-variables.d.ts.map +1 -0
- package/utils/prompt-variables.js +5 -9
- package/utils/string-utils.d.ts +11 -0
- package/utils/string-utils.d.ts.map +1 -0
- package/utils/syntax-highlighting.d.ts +8 -0
- package/utils/syntax-highlighting.d.ts.map +1 -0
- package/utils/syntax-highlighting.js +8 -8
|
@@ -5,66 +5,70 @@ import { downloadTextFile as r } from "../../../utils/file-download.js";
|
|
|
5
5
|
import { CHAT_SHARED_CLASS as i } from "../../../constants/public-class-names.js";
|
|
6
6
|
import { useHorizontalOverflow as a } from "../../../hooks/useHorizontalOverflow.js";
|
|
7
7
|
import o from "./MarkdownTable.module.scss.js";
|
|
8
|
-
import {
|
|
9
|
-
import { useMarkdownTableActions as
|
|
10
|
-
import { ElementSize as
|
|
11
|
-
import { memo as
|
|
12
|
-
import { jsx as
|
|
8
|
+
import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as s, MARKDOWN_TABLE_CSV_MIME_TYPE as c, MarkdownTableCopyFormat as l, serializeMarkdownTableRows as u } from "./table-serialization.js";
|
|
9
|
+
import { useMarkdownTableActions as d } from "./useMarkdownTableActions/useMarkdownTableActions.js";
|
|
10
|
+
import { ElementSize as f, GhostIconButton as p } from "@epam/ai-dial-ui-kit";
|
|
11
|
+
import { memo as m, useCallback as h, useEffect as g, useRef as _, useState as v } from "react";
|
|
12
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/MarkdownRenderer/Table/MarkdownTable.tsx
|
|
14
|
-
var
|
|
15
|
-
let [O, k] =
|
|
14
|
+
var x = 2e3, S = m(({ children: s, classNames: m, colors: S, actionLabels: C, downloadFilename: w, isStreaming: T, onOpenInCanvas: E, scrollRegionAriaLabel: D = "Scrollable table" }) => {
|
|
15
|
+
let [O, k] = v(!1), A = _(null), { scrollContainerRef: j, contentRef: M, hasContentBeyondStart: N, hasContentBeyondEnd: P, handleScroll: F } = a(), I = t({
|
|
16
16
|
"--cm-markdown-border": S?.border,
|
|
17
17
|
"--cm-table-scrollbar": S?.scrollbar,
|
|
18
18
|
"--cm-table-fade": S?.fade,
|
|
19
19
|
"--cm-table-row-divider": S?.rowDivider,
|
|
20
20
|
"--cm-table-row-hover-bg": S?.rowHoverBackground
|
|
21
21
|
}), L = N || P;
|
|
22
|
-
|
|
22
|
+
g(() => () => {
|
|
23
23
|
A.current != null && clearTimeout(A.current);
|
|
24
24
|
}, []);
|
|
25
|
-
let R =
|
|
25
|
+
let R = h(() => {
|
|
26
26
|
let e = M.current;
|
|
27
|
-
e
|
|
27
|
+
if (e == null) return;
|
|
28
|
+
let t = u(Array.from(e.rows), l.Markdown);
|
|
29
|
+
n(t).then((e) => {
|
|
28
30
|
e && (A.current != null && clearTimeout(A.current), k(!0), A.current = setTimeout(() => {
|
|
29
31
|
k(!1);
|
|
30
|
-
},
|
|
32
|
+
}, x));
|
|
31
33
|
});
|
|
32
|
-
}, [M]), z =
|
|
34
|
+
}, [M]), z = h(() => {
|
|
33
35
|
let e = M.current;
|
|
34
|
-
e
|
|
35
|
-
|
|
36
|
+
if (e == null) return;
|
|
37
|
+
let t = u(Array.from(e.rows), l.Csv);
|
|
38
|
+
r(`\uFEFF${t}`, w ?? "table.csv", c);
|
|
39
|
+
}, [M, w]), B = h(() => {
|
|
36
40
|
let e = M.current;
|
|
37
|
-
e
|
|
38
|
-
}, [M, E]), V =
|
|
41
|
+
e != null && E != null && E(u(Array.from(e.rows), l.Markdown));
|
|
42
|
+
}, [M, E]), V = d({
|
|
39
43
|
actionLabels: C,
|
|
40
44
|
isCopied: O,
|
|
41
45
|
onCopy: R,
|
|
42
46
|
onDownloadCsv: z,
|
|
43
47
|
onOpenInCanvas: E == null ? void 0 : B
|
|
44
48
|
}), H = V.length > 0 && !T;
|
|
45
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ b("div", {
|
|
46
50
|
style: I,
|
|
47
|
-
className: e("group/table relative w-full
|
|
51
|
+
className: e("group/table relative w-full max-w-full min-w-0 [overflow:clip] rounded-xl border", o.tableContainer, m.tableWrapper, i.table),
|
|
48
52
|
children: [
|
|
49
|
-
H && /* @__PURE__ */
|
|
53
|
+
H && /* @__PURE__ */ y("div", {
|
|
50
54
|
className: "sticky top-0 z-10 h-0",
|
|
51
|
-
children: /* @__PURE__ */
|
|
52
|
-
className: "absolute
|
|
53
|
-
children: V.map((e) => /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ y("div", {
|
|
56
|
+
className: "absolute inset-e-2 top-2 flex items-center gap-1 rounded-lg border border-tertiary bg-layer-raised px-2 py-1 opacity-0 shadow-xs transition-opacity group-hover/table:opacity-100 focus-within:opacity-100",
|
|
57
|
+
children: V.map((e) => /* @__PURE__ */ y(p, {
|
|
54
58
|
tooltipProps: { tooltip: e.label },
|
|
55
59
|
"aria-label": e.label,
|
|
56
|
-
icon: /* @__PURE__ */
|
|
60
|
+
icon: /* @__PURE__ */ y("span", {
|
|
57
61
|
"aria-hidden": !0,
|
|
58
62
|
children: e.icon
|
|
59
63
|
}),
|
|
60
|
-
size:
|
|
64
|
+
size: f.Small,
|
|
61
65
|
onClick: e.onClick
|
|
62
66
|
}, e.label))
|
|
63
67
|
})
|
|
64
68
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ y("div", {
|
|
66
70
|
ref: j,
|
|
67
|
-
className: e("w-full
|
|
71
|
+
className: e("w-full max-w-full min-w-0 overflow-x-auto", o.scrollContainer, m.tableScrollContainer, {
|
|
68
72
|
[o.tableScrollFadeBoth]: N && P,
|
|
69
73
|
[o.tableScrollFadeStart]: N && !P,
|
|
70
74
|
[o.tableScrollFadeEnd]: !N && P
|
|
@@ -73,13 +77,13 @@ var b = 2e3, x = p(({ children: p, classNames: x, colors: S, actionLabels: C, do
|
|
|
73
77
|
role: L ? "region" : void 0,
|
|
74
78
|
"aria-label": L ? D : void 0,
|
|
75
79
|
tabIndex: L ? 0 : void 0,
|
|
76
|
-
children: /* @__PURE__ */
|
|
80
|
+
children: /* @__PURE__ */ y("table", {
|
|
77
81
|
ref: M,
|
|
78
|
-
className: e("w-max min-w-full border-collapse",
|
|
79
|
-
children:
|
|
82
|
+
className: e("w-max min-w-full border-collapse", m.tableFont ?? "dial-small-text"),
|
|
83
|
+
children: s
|
|
80
84
|
})
|
|
81
85
|
}),
|
|
82
|
-
C?.copyLabel && /* @__PURE__ */
|
|
86
|
+
C?.copyLabel && /* @__PURE__ */ y("span", {
|
|
83
87
|
"aria-live": "polite",
|
|
84
88
|
className: "sr-only",
|
|
85
89
|
role: "status",
|
|
@@ -89,4 +93,4 @@ var b = 2e3, x = p(({ children: p, classNames: x, colors: S, actionLabels: C, do
|
|
|
89
93
|
});
|
|
90
94
|
});
|
|
91
95
|
//#endregion
|
|
92
|
-
export {
|
|
96
|
+
export { s as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, c as MARKDOWN_TABLE_CSV_MIME_TYPE, S as MarkdownTable, l as MarkdownTableCopyFormat, u as serializeMarkdownTableRows };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
//#region src/components/MarkdownRenderer/Table/MarkdownTable.module.scss
|
|
2
|
+
var e = "_tableContainer_1qw2e_1", t = "_tableContainerLight_1qw2e_6", n = "_copiedIcon_1qw2e_10", r = "_scrollContainer_1qw2e_14", i = "_tableHeaderCell_1qw2e_30", a = "_sectionRow_1qw2e_37", o = "_rowDivider_1qw2e_41", s = "_row_1qw2e_41", c = "_tableScrollFadeEnd_1qw2e_51", l = "_tableScrollFadeStart_1qw2e_59", u = "_tableScrollFadeBoth_1qw2e_67", d = {
|
|
3
|
+
tableContainer: e,
|
|
4
|
+
tableContainerLight: t,
|
|
5
|
+
copiedIcon: n,
|
|
6
|
+
scrollContainer: r,
|
|
7
|
+
tableHeaderCell: i,
|
|
8
|
+
sectionRow: a,
|
|
9
|
+
rowDivider: o,
|
|
10
|
+
row: s,
|
|
11
|
+
tableScrollFadeEnd: c,
|
|
12
|
+
tableScrollFadeStart: l,
|
|
13
|
+
tableScrollFadeBoth: u
|
|
13
14
|
};
|
|
14
15
|
//#endregion
|
|
15
|
-
export {
|
|
16
|
+
export { n as copiedIcon, d as default, s as row, o as rowDivider, r as scrollContainer, a as sectionRow, e as tableContainer, t as tableContainerLight, i as tableHeaderCell, u as tableScrollFadeBoth, c as tableScrollFadeEnd, l as tableScrollFadeStart };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** A single action rendered by {@link TableHeader}. */
|
|
3
|
+
export interface TableHeaderAction {
|
|
4
|
+
/** Stable accessible name and tooltip text. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Decorative icon content rendered inside the action button. */
|
|
7
|
+
icon: ReactNode;
|
|
8
|
+
/** Called when the action button is activated. */
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
}
|
|
11
|
+
/** Props for {@link TableHeader}. */
|
|
12
|
+
export interface TableHeaderProps {
|
|
13
|
+
/** Content rendered at the inline start of the header. */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
/** Action descriptors rendered as icon buttons at the inline end. */
|
|
16
|
+
actions?: TableHeaderAction[];
|
|
17
|
+
/** Extra classes merged onto the header. */
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
/** Reusable table header with caller-supplied leading content and actions. */
|
|
21
|
+
export declare const TableHeader: FC<TableHeaderProps>;
|
|
22
|
+
//# sourceMappingURL=TableHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/Table/TableHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,uDAAuD;AACvD,MAAM,WAAW,iBAAiB;IAChC,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,IAAI,EAAE,SAAS,CAAC;IAChB,kDAAkD;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,qEAAqE;IACrE,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,8EAA8E;AAC9E,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAgC5C,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum MarkdownTableCopyFormat {
|
|
2
|
+
Csv = "csv",
|
|
3
|
+
Markdown = "markdown"
|
|
4
|
+
}
|
|
5
|
+
/** Default filename used when downloading a Markdown table as CSV. */
|
|
6
|
+
export declare const DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME = "table.csv";
|
|
7
|
+
/** MIME type used when downloading a Markdown table as CSV. */
|
|
8
|
+
export declare const MARKDOWN_TABLE_CSV_MIME_TYPE = "text/csv;charset=utf-8";
|
|
9
|
+
export interface MarkdownTableActionLabels {
|
|
10
|
+
copyLabel?: string;
|
|
11
|
+
copiedLabel?: string;
|
|
12
|
+
downloadCsvLabel?: string;
|
|
13
|
+
openInCanvasLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const serializeMarkdownTableRows: (rows: readonly HTMLTableRowElement[], format: MarkdownTableCopyFormat) => string;
|
|
16
|
+
//# sourceMappingURL=table-serialization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-serialization.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/Table/table-serialization.ts"],"names":[],"mappings":"AAAA,oBAAY,uBAAuB;IACjC,GAAG,QAAQ;IACX,QAAQ,aAAa;CACtB;AAED,sEAAsE;AACtE,eAAO,MAAM,wCAAwC,cAAc,CAAC;AACpE,+DAA+D;AAC/D,eAAO,MAAM,4BAA4B,2BAA2B,CAAC;AAErE,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAsID,eAAO,MAAM,0BAA0B,GACrC,MAAM,SAAS,mBAAmB,EAAE,EACpC,QAAQ,uBAAuB,KAC9B,MAiBF,CAAC"}
|
package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MarkdownTableActionLabels } from '../table-serialization';
|
|
3
|
+
/** A table action rendered as an icon button. */
|
|
4
|
+
export interface MarkdownTableHeaderAction {
|
|
5
|
+
/** Stable accessible name and tooltip text. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Decorative icon content. */
|
|
8
|
+
icon: ReactNode;
|
|
9
|
+
/** Called when the action is activated. */
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
}
|
|
12
|
+
/** Params for {@link useMarkdownTableActions}. */
|
|
13
|
+
export interface UseMarkdownTableActionsParams {
|
|
14
|
+
/** Localized labels for table actions. `undefined` yields no actions. */
|
|
15
|
+
actionLabels: MarkdownTableActionLabels | undefined;
|
|
16
|
+
/** Whether the table has just been copied (shows a checkmark on the copy button). */
|
|
17
|
+
isCopied: boolean;
|
|
18
|
+
/** Called when the copy action is activated. */
|
|
19
|
+
onCopy: () => void;
|
|
20
|
+
/** Called when the download-as-CSV action is activated. */
|
|
21
|
+
onDownloadCsv: () => void;
|
|
22
|
+
/** Called when the open-in-canvas action is activated. Omit to hide that action. */
|
|
23
|
+
onOpenInCanvas?: () => void;
|
|
24
|
+
}
|
|
25
|
+
/** Builds the {@link MarkdownTableHeaderAction} list for a table's action bar from its localized labels. */
|
|
26
|
+
export declare const useMarkdownTableActions: ({ actionLabels, isCopied, onCopy, onDownloadCsv, onOpenInCanvas, }: UseMarkdownTableActionsParams) => MarkdownTableHeaderAction[];
|
|
27
|
+
//# sourceMappingURL=useMarkdownTableActions.d.ts.map
|
package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMarkdownTableActions.d.ts","sourceRoot":"","sources":["../../../../../src/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE,iDAAiD;AACjD,MAAM,WAAW,yBAAyB;IACxC,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,yEAAyE;IACzE,YAAY,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACpD,qFAAqF;IACrF,QAAQ,EAAE,OAAO,CAAC;IAClB,gDAAgD;IAChD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,2DAA2D;IAC3D,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,4GAA4G;AAC5G,eAAO,MAAM,uBAAuB,GAAI,oEAMrC,6BAA6B,KAAG,yBAAyB,EAyD3D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/** Props for {@link MarkdownTaskCheckbox}. */
|
|
3
|
+
export interface MarkdownTaskCheckboxProps {
|
|
4
|
+
/** Whether the GFM task-list item is checked. Defaults to `false`. */
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Read-only checkbox for GFM task-list items (`- [ ]` / `- [x]`). */
|
|
8
|
+
export declare const MarkdownTaskCheckbox: FC<MarkdownTaskCheckboxProps>;
|
|
9
|
+
//# sourceMappingURL=MarkdownTaskCheckbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownTaskCheckbox.d.ts","sourceRoot":"","sources":["../../../../src/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB;IACxC,sEAAsE;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,sEAAsE;AACtE,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAM9D,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { MarkdownRendererColors } from './MarkdownRenderer';
|
|
3
|
+
/** Props for {@link ThinkingShimmer}. */
|
|
4
|
+
export interface ThinkingShimmerProps {
|
|
5
|
+
/** Text rendered with the shimmer animation. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Gradient color overrides applied as CSS custom properties. */
|
|
8
|
+
colors?: Pick<MarkdownRendererColors, 'thinkingPrimary' | 'thinkingSecondary'>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The "thinking" placeholder both message renderers show while a stream has
|
|
12
|
+
* started but no content has arrived yet. Owns the mapping from the public
|
|
13
|
+
* color props to the gradient's CSS variables — `thinkingPrimary` drives
|
|
14
|
+
* `--cm-thinking-inverted` — so that mapping exists in one place.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ThinkingShimmer: FC<ThinkingShimmerProps>;
|
|
17
|
+
//# sourceMappingURL=ThinkingShimmer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThinkingShimmer.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/ThinkingShimmer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGjE,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,MAAM,CAAC,EAAE,IAAI,CACX,sBAAsB,EACtB,iBAAiB,GAAG,mBAAmB,CACxC,CAAC;CACH;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAapD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MarkdownRendererClassNames } from './MarkdownRenderer';
|
|
2
|
+
/** Default typography classNames for rendering markdown with full visual hierarchy. */
|
|
3
|
+
export declare const DEFAULT_MARKDOWN_CLASS_NAMES: MarkdownRendererClassNames;
|
|
4
|
+
/**
|
|
5
|
+
* {@link DEFAULT_MARKDOWN_CLASS_NAMES} with the body copy one step down the
|
|
6
|
+
* type scale. Headings, code, and tables are unchanged — only the text that
|
|
7
|
+
* dominates a long answer shrinks, so more of it fits on a narrow viewport.
|
|
8
|
+
*/
|
|
9
|
+
export declare const COMPACT_MARKDOWN_CLASS_NAMES: MarkdownRendererClassNames;
|
|
10
|
+
//# sourceMappingURL=markdown-class-names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-class-names.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/markdown-class-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAErE,uFAAuF;AACvF,eAAO,MAAM,4BAA4B,EAAE,0BAe1C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,0BAI1C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Minimal hast node shape walked by {@link rehypePreserveSpaces}. */
|
|
2
|
+
interface HastNodeLike {
|
|
3
|
+
/** Node type — `'element'`, `'text'`, `'root'`, … */
|
|
4
|
+
type: string;
|
|
5
|
+
/** Tag name of an element node. */
|
|
6
|
+
tagName?: string;
|
|
7
|
+
/** Text of a text node. */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** Child nodes of a parent node. */
|
|
10
|
+
children?: HastNodeLike[];
|
|
11
|
+
}
|
|
12
|
+
/** Rehype plugin that keeps runs of consecutive spaces in prose visible instead of letting HTML collapse them to one. */
|
|
13
|
+
export declare const rehypePreserveSpaces: () => (tree: HastNodeLike) => void;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=markdown-whitespace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-whitespace.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownRenderer/markdown-whitespace.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,UAAU,YAAY;IACpB,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B;AA8BD,yHAAyH;AACzH,eAAO,MAAM,oBAAoB,SAAU,MAAM,YAAY,SAE5D,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/components/MarkdownRenderer/markdown-whitespace.ts
|
|
2
|
+
var e = /* @__PURE__ */ new Set([
|
|
3
|
+
"code",
|
|
4
|
+
"pre",
|
|
5
|
+
"math",
|
|
6
|
+
"script",
|
|
7
|
+
"style"
|
|
8
|
+
]), t = "\xA0", n = / {2,}/g, r = (e) => `${t.repeat(e.length - 1)} `, i = (t) => {
|
|
9
|
+
t.type === "text" && t.value ? t.value = t.value.replace(n, r) : t.type === "element" && t.tagName && e.has(t.tagName) || t.children?.forEach(i);
|
|
10
|
+
}, a = () => (e) => {
|
|
11
|
+
i(e);
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { a as rehypePreserveSpaces };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/** Props for {@link MarkdownWithPlaceholders}. */
|
|
3
|
+
export interface MarkdownWithPlaceholdersProps {
|
|
4
|
+
/** Raw markdown string to render, read-only. */
|
|
5
|
+
content: string;
|
|
6
|
+
/** Typography class overrides applied to `<h1>`–`<h6>`. Defaults to no override. */
|
|
7
|
+
headingClassName?: string;
|
|
8
|
+
/** Accessible label for the copy button in code blocks. Forwarded to {@link MarkdownRenderer}; defaults to `'Copy code'`. */
|
|
9
|
+
codeBlockCopyLabel?: string;
|
|
10
|
+
/** Status announced after a code block has been copied. Forwarded to {@link MarkdownRenderer}; defaults to `'Copied!'`. */
|
|
11
|
+
codeBlockCopiedLabel?: string;
|
|
12
|
+
/** Accessible label for the download button in code blocks. Forwarded to {@link MarkdownRenderer}; defaults to `'Download code'`. */
|
|
13
|
+
codeBlockDownloadLabel?: string;
|
|
14
|
+
/** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}; defaults to `'Scrollable table'`. */
|
|
15
|
+
tableScrollRegionAriaLabel?: string;
|
|
16
|
+
/** Accessible label for a block formula's scrollable region. Forwarded to {@link MarkdownRenderer}; defaults to `'Scrollable formula'`. */
|
|
17
|
+
mathScrollRegionAriaLabel?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Renders read-only markdown with every `{{param}}` token wrapped in a
|
|
21
|
+
* `cat-prompt-variable`-classed span the host can style apart from the
|
|
22
|
+
* surrounding prose.
|
|
23
|
+
*/
|
|
24
|
+
export declare const MarkdownWithPlaceholders: FC<MarkdownWithPlaceholdersProps>;
|
|
25
|
+
//# sourceMappingURL=MarkdownWithPlaceholders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownWithPlaceholders.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAO3B,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6HAA6H;IAC7H,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2HAA2H;IAC3H,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qIAAqI;IACrI,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iIAAiI;IACjI,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,2IAA2I;IAC3I,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC;AAKD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAsBtE,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** CSS custom-property overrides for the `PanelEmptyState` component. */
|
|
3
|
+
export interface PanelEmptyStateColors {
|
|
4
|
+
/** Label text color. */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Description text color. */
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Props for `PanelEmptyState`. */
|
|
10
|
+
export interface PanelEmptyStateProps {
|
|
11
|
+
/** Primary message of the empty state. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Secondary line under the label, e.g. what to do next. */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** Optional way forward, such as a button, rendered under the text. */
|
|
16
|
+
action?: ReactNode;
|
|
17
|
+
/** Color overrides applied as CSS custom properties. */
|
|
18
|
+
colors?: PanelEmptyStateColors;
|
|
19
|
+
/** CSS class applied to the label text, on top of the kit's title typography. */
|
|
20
|
+
labelClassName?: string;
|
|
21
|
+
/** CSS class applied to the description text, on top of the kit's description typography. */
|
|
22
|
+
descriptionClassName?: string;
|
|
23
|
+
/** CSS class applied to the empty-state container. */
|
|
24
|
+
containerClassName?: string;
|
|
25
|
+
/** Decorative illustration above the label. Defaults to the kit's `NoDataContent` illustration. */
|
|
26
|
+
icon?: ReactNode;
|
|
27
|
+
/** Announces the empty state to assistive tech as it appears, e.g. after a search. */
|
|
28
|
+
live?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** Centered empty-state block for use inside a sidebar panel body. */
|
|
31
|
+
export declare const PanelEmptyState: FC<PanelEmptyStateProps>;
|
|
32
|
+
//# sourceMappingURL=PanelEmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelEmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/PanelEmptyState/PanelEmptyState.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKtD,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,wDAAwD;IACxD,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6FAA6F;IAC7F,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mGAAmG;IACnG,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,sFAAsF;IACtF,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,sEAAsE;AACtE,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAmCpD,CAAC"}
|
|
@@ -5,14 +5,24 @@ import { NoDataContent as r } from "@epam/ai-dial-ui-kit";
|
|
|
5
5
|
import { memo as i } from "react";
|
|
6
6
|
import { jsx as a } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/PanelEmptyState/PanelEmptyState.tsx
|
|
8
|
-
var o = i(({ label: i,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
var o = i(({ label: i, description: o, action: s, colors: c, labelClassName: l, descriptionClassName: u, containerClassName: d, icon: f, live: p }) => {
|
|
9
|
+
let m = t({
|
|
10
|
+
"--pes-label-color": c?.label,
|
|
11
|
+
"--pes-description-color": c?.description
|
|
12
|
+
});
|
|
13
|
+
return /* @__PURE__ */ a("div", {
|
|
14
|
+
style: m,
|
|
15
|
+
children: /* @__PURE__ */ a(r, {
|
|
16
|
+
title: i,
|
|
17
|
+
description: o,
|
|
18
|
+
action: s,
|
|
19
|
+
icon: f,
|
|
20
|
+
live: p,
|
|
21
|
+
titleClassName: e(n.label, l),
|
|
22
|
+
descriptionClassName: e(n.description, u),
|
|
23
|
+
className: d
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
});
|
|
17
27
|
//#endregion
|
|
18
28
|
export { o as PanelEmptyState };
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/components/PanelEmptyState/PanelEmptyState.module.scss
|
|
2
|
+
var e = "_label_1qwvo_1", t = "_description_1qwvo_5", n = {
|
|
3
|
+
label: e,
|
|
4
|
+
description: t
|
|
5
|
+
};
|
|
2
6
|
//#endregion
|
|
3
|
-
export {
|
|
7
|
+
export { n as default, t as description, e as label };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { EntityHeaderItem } from '../../models/entity';
|
|
3
|
+
/** CSS custom-property overrides for the `ResourceSummary` row. */
|
|
4
|
+
export interface ResourceSummaryColors {
|
|
5
|
+
/** Row border color. Defaults to `--stroke-tertiary`. */
|
|
6
|
+
border?: string;
|
|
7
|
+
/** Row background color. Defaults to `--bg-layer-sunken`. */
|
|
8
|
+
background?: string;
|
|
9
|
+
/** Version tag border color. Defaults to `--stroke-tertiary`. */
|
|
10
|
+
versionTagBorder?: string;
|
|
11
|
+
/** Version tag background color. Defaults to `--bg-control-accent-alpha`. */
|
|
12
|
+
versionTagBackground?: string;
|
|
13
|
+
/** Version tag text color. Defaults to `--text-accent`. */
|
|
14
|
+
versionTagText?: string;
|
|
15
|
+
}
|
|
16
|
+
/** Typography overrides for the `ResourceSummary` row. */
|
|
17
|
+
export interface ResourceSummaryTypography {
|
|
18
|
+
/** Typography class applied to the version tag. Defaults to `'dial-tiny-text'`. */
|
|
19
|
+
versionTagClassName?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Style overrides for `ResourceSummary`. */
|
|
22
|
+
export interface ResourceSummaryStyles {
|
|
23
|
+
/** Color overrides applied as CSS custom properties. */
|
|
24
|
+
colors?: ResourceSummaryColors;
|
|
25
|
+
/** Typography class overrides. */
|
|
26
|
+
typography?: ResourceSummaryTypography;
|
|
27
|
+
}
|
|
28
|
+
/** Props for `ResourceSummary`. */
|
|
29
|
+
export interface ResourceSummaryProps {
|
|
30
|
+
/** Entity shown in the row as an icon, type label, name, and version tag. Ignored when `children` is set. */
|
|
31
|
+
item?: EntityHeaderItem;
|
|
32
|
+
/** Row content rendered instead of the entity header and version tag. */
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
/** Version tag text; `{version}` is replaced with `item.version`. The tag is omitted when `item.version` is empty. Defaults to `'Version {version} · current'`. */
|
|
35
|
+
versionLabel?: string;
|
|
36
|
+
/** Whether the version is shown as a trailing tag. When `false` it is shown inline after the name instead. Defaults to `true`. */
|
|
37
|
+
hasVersionTag?: boolean;
|
|
38
|
+
/** Size of the entity icon. Defaults to `40`. */
|
|
39
|
+
iconSize?: number;
|
|
40
|
+
/** CSS class applied to the row. */
|
|
41
|
+
className?: string;
|
|
42
|
+
/** Style overrides. */
|
|
43
|
+
styles?: ResourceSummaryStyles;
|
|
44
|
+
/** Color overrides applied as CSS custom properties. Prefer `styles.colors`. */
|
|
45
|
+
colors?: ResourceSummaryColors;
|
|
46
|
+
}
|
|
47
|
+
/** Bordered summary row pairing an entity's identity block with its current-version tag. */
|
|
48
|
+
export declare const ResourceSummary: FC<ResourceSummaryProps>;
|
|
49
|
+
//# sourceMappingURL=ResourceSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourceSummary.d.ts","sourceRoot":"","sources":["../../../src/components/ResourceSummary/ResourceSummary.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D,mEAAmE;AACnE,MAAM,WAAW,qBAAqB;IACpC,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,0DAA0D;AAC1D,MAAM,WAAW,yBAAyB;IACxC,mFAAmF;IACnF,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,6CAA6C;AAC7C,MAAM,WAAW,qBAAqB;IACpC,wDAAwD;IACxD,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,kCAAkC;IAClC,UAAU,CAAC,EAAE,yBAAyB,CAAC;CACxC;AAED,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,6GAA6G;IAC7G,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,mKAAmK;IACnK,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kIAAkI;IAClI,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,gFAAgF;IAChF,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC;AAED,4FAA4F;AAC5F,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA2DpD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/components/ResourceSummary/ResourceSummary.module.scss
|
|
2
|
+
var e = "_row_1csuq_1", t = "_versionTag_1csuq_7", n = {
|
|
3
|
+
row: e,
|
|
4
|
+
versionTag: t
|
|
4
5
|
};
|
|
5
6
|
//#endregion
|
|
6
|
-
export {
|
|
7
|
+
export { n as default, e as row, t as versionTag };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { TextRefinementResult } from '../../hooks/useTextRefinement';
|
|
3
|
+
import { TextRefinementLabels } from '../../models/text-refinement';
|
|
4
|
+
/** Props for `TextRefinementField`. */
|
|
5
|
+
export interface TextRefinementFieldProps {
|
|
6
|
+
/** When false, renders `children` alone — no label row, actions, or feedback. */
|
|
7
|
+
isEnabled: boolean;
|
|
8
|
+
/** Id of the labelled control; also the prefix for the label and error ids. */
|
|
9
|
+
fieldId: string;
|
|
10
|
+
/** Visible field label; names the group. */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Class applied to the `<label>`, after the kit `Label` defaults. */
|
|
13
|
+
labelClassName?: string;
|
|
14
|
+
/** Marks the label as required. */
|
|
15
|
+
required?: boolean;
|
|
16
|
+
/** Action, status, and error copy. */
|
|
17
|
+
labels?: TextRefinementLabels;
|
|
18
|
+
/** The field's `useTextRefinement` result. */
|
|
19
|
+
refinement: TextRefinementResult;
|
|
20
|
+
/** Disables both actions. */
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
/** Class applied to the status message and the error message. */
|
|
23
|
+
feedbackClassName?: string;
|
|
24
|
+
/** Class applied to the error message, after `feedbackClassName`. */
|
|
25
|
+
errorClassName?: string;
|
|
26
|
+
/** Caption shown at the end of the row below the control, beside the refinement status — e.g. a character counter. */
|
|
27
|
+
caption?: string;
|
|
28
|
+
/** The refinable control, whose id must equal `fieldId`. */
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/** Label row with Refine/Undo actions and live feedback around one refinable field. */
|
|
32
|
+
export declare const TextRefinementField: FC<TextRefinementFieldProps>;
|
|
33
|
+
//# sourceMappingURL=TextRefinementField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextRefinementField.d.ts","sourceRoot":"","sources":["../../../src/components/TextRefinementField/TextRefinementField.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAU,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGzE,uCAAuC;AACvC,MAAM,WAAW,wBAAwB;IACvC,iFAAiF;IACjF,SAAS,EAAE,OAAO,CAAC;IACnB,+EAA+E;IAC/E,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,8CAA8C;IAC9C,UAAU,EAAE,oBAAoB,CAAC;IACjC,6BAA6B;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,iEAAiE;IACjE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sHAAsH;IACtH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,uFAAuF;AACvF,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CA2H5D,CAAC"}
|