@epam/ai-dial-chat-shared 1.2.0-dev.14 → 1.2.0-dev.141

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.
Files changed (32) hide show
  1. package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +64 -63
  2. package/components/MarkdownRenderer/CodeBlock/CodeBlock.module.scss.js +6 -6
  3. package/components/MarkdownRenderer/MDMessageViewer.js +23 -17
  4. package/components/MarkdownRenderer/MarkdownRenderer.js +88 -90
  5. package/components/MarkdownRenderer/Math/MarkdownMathBlock.js +19 -18
  6. package/components/MarkdownRenderer/PlainTextRenderer.js +21 -0
  7. package/components/MarkdownRenderer/Table/MarkdownTable.js +74 -56
  8. package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +11 -11
  9. package/components/MarkdownRenderer/Table/table-serialization.js +23 -3
  10. package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.js +48 -62
  11. package/components/MarkdownRenderer/ThinkingShimmer.js +14 -0
  12. package/components/TextRefinementField/TextRefinementField.js +84 -0
  13. package/constants/mime-types.js +49 -2
  14. package/constants/public-class-names.js +10 -0
  15. package/constants/resizable-fields.js +1 -1
  16. package/file-manager/DialFileManagerShell/DialFileManagerShell.js +160 -159
  17. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +23 -22
  18. package/file-manager/UploadProgressModal/UploadProgressModal.js +26 -32
  19. package/file-manager.d.ts +10 -6
  20. package/hooks/useTextRefinement.js +66 -0
  21. package/index.css +2 -2
  22. package/index.d.ts +258 -10
  23. package/index.js +60 -56
  24. package/markdown.d.ts +61 -8
  25. package/markdown.js +13 -11
  26. package/package.json +3 -3
  27. package/types/attachment.js +1 -1
  28. package/utils/file-download.js +6 -6
  29. package/utils/is-skill-selection-unsupported.js +4 -0
  30. package/utils/latex.js +5 -3
  31. package/utils/merge-class.js +5 -4
  32. package/utils/mime-type.js +10 -6
@@ -1,77 +1,95 @@
1
1
  import { mergeClasses as e } from "../../../utils/merge-class.js";
2
2
  import { buildCssVars as t } from "../../../utils/build-css-vars.js";
3
- import { copyToClipboard as n } from "../../../utils/copy-to-clipboard.js";
3
+ import { copyMarkdownAsRichText as n } from "../../../utils/copy-to-clipboard.js";
4
4
  import { downloadTextFile as r } from "../../../utils/file-download.js";
5
- import { TableHeader as i } from "./TableHeader.js";
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
8
  import { MARKDOWN_TABLE_CSV_MIME_TYPE as s, MarkdownTableCopyFormat as c, serializeMarkdownTableRows as l } from "./table-serialization.js";
9
9
  import { useMarkdownTableActions as u } from "./useMarkdownTableActions/useMarkdownTableActions.js";
10
- import { memo as d, useCallback as f, useEffect as p, useRef as m, useState as h } from "react";
11
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
10
+ import { ElementSize as d, GhostIconButton as f, Tooltip 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";
12
13
  //#region src/components/MarkdownRenderer/Table/MarkdownTable.tsx
13
- var v = 2e3, y = d(({ children: d, classNames: y, colors: b, actionLabels: x, downloadFilename: S, isStreaming: C, onOpenInCanvas: w, scrollRegionAriaLabel: T = "Scrollable table" }) => {
14
- let [E, D] = h(void 0), O = m(null), { scrollContainerRef: k, contentRef: A, hasContentBeyondStart: j, hasContentBeyondEnd: M, handleScroll: N } = a(), P = t({
15
- "--cm-markdown-border": b?.border,
16
- "--cm-table-scrollbar": b?.scrollbar,
17
- "--cm-table-fade": b?.fade,
18
- "--cm-table-row-divider": b?.rowDivider,
19
- "--cm-table-row-zebra-bg": b?.rowZebraBackground,
20
- "--cm-table-row-hover-bg": b?.rowHoverBackground
21
- }), F = j || M;
22
- p(() => () => {
23
- O.current != null && clearTimeout(O.current);
14
+ var x = 2e3, S = m(({ children: m, classNames: S, colors: C, actionLabels: w, downloadFilename: T, isStreaming: E, onOpenInCanvas: D, scrollRegionAriaLabel: O = "Scrollable table" }) => {
15
+ let [k, A] = v(!1), j = _(null), { scrollContainerRef: M, contentRef: N, hasContentBeyondStart: P, hasContentBeyondEnd: F, handleScroll: I } = a(), L = t({
16
+ "--cm-markdown-border": C?.border,
17
+ "--cm-table-scrollbar": C?.scrollbar,
18
+ "--cm-table-fade": C?.fade,
19
+ "--cm-table-row-divider": C?.rowDivider,
20
+ "--cm-table-row-hover-bg": C?.rowHoverBackground
21
+ }), R = P || F;
22
+ g(() => () => {
23
+ j.current != null && clearTimeout(j.current);
24
24
  }, []);
25
- let I = f((e) => {
26
- let t = A.current;
27
- t != null && n(l(Array.from(t.rows), e)).then((t) => {
28
- t && (O.current != null && clearTimeout(O.current), D(e), O.current = setTimeout(() => {
29
- D(void 0);
30
- }, v));
25
+ let z = h(() => {
26
+ let e = N.current;
27
+ e != null && n(l(Array.from(e.rows), c.Markdown)).then((e) => {
28
+ e && (j.current != null && clearTimeout(j.current), A(!0), j.current = setTimeout(() => {
29
+ A(!1);
30
+ }, x));
31
31
  });
32
- }, [A]), L = f(() => {
33
- let e = A.current;
34
- e != null && r(`\uFEFF${l(Array.from(e.rows), c.Csv)}`, S ?? "table.csv", s);
35
- }, [A, S]), R = f(() => {
36
- let e = A.current;
37
- e == null || w == null || w(l(Array.from(e.rows), c.Markdown));
38
- }, [A, w]), z = u({
39
- actionLabels: x,
40
- copiedFormat: E,
41
- onCopy: I,
42
- onDownloadCsv: L,
43
- onOpenInCanvas: w == null ? void 0 : R
44
- }), B = z.length > 0 && !C;
45
- return /* @__PURE__ */ _("div", {
46
- style: P,
47
- className: e("relative w-full min-w-0 max-w-full overflow-hidden rounded-xl border", o.tableContainer, o.tableContainerLight, y.tableWrapper),
32
+ }, [N]), B = h(() => {
33
+ let e = N.current;
34
+ e != null && r(`\uFEFF${l(Array.from(e.rows), c.Csv)}`, T ?? "table.csv", s);
35
+ }, [N, T]), V = h(() => {
36
+ let e = N.current;
37
+ e == null || D == null || D(l(Array.from(e.rows), c.Markdown));
38
+ }, [N, D]), H = u({
39
+ actionLabels: w,
40
+ isCopied: k,
41
+ onCopy: z,
42
+ onDownloadCsv: B,
43
+ onOpenInCanvas: D == null ? void 0 : V
44
+ }), U = H.length > 0 && !E;
45
+ return /* @__PURE__ */ b("div", {
46
+ style: L,
47
+ className: e("group/table relative w-full min-w-0 max-w-full rounded-xl border [overflow:clip]", o.tableContainer, S.tableWrapper, i.table),
48
48
  children: [
49
- B && /* @__PURE__ */ g(i, { actions: z }),
50
- /* @__PURE__ */ g("div", {
51
- ref: k,
52
- className: e("w-full min-w-0 max-w-full overflow-x-auto", o.scrollContainer, y.tableScrollContainer, {
53
- [o.tableScrollFadeBoth]: j && M,
54
- [o.tableScrollFadeStart]: j && !M,
55
- [o.tableScrollFadeEnd]: !j && M
56
- }),
57
- onScroll: N,
58
- role: F ? "region" : void 0,
59
- "aria-label": F ? T : void 0,
60
- tabIndex: F ? 0 : void 0,
61
- children: /* @__PURE__ */ g("table", {
62
- ref: A,
63
- className: e("w-max min-w-full border-collapse", y.tableFont ?? "dial-small-text"),
64
- children: d
49
+ U && /* @__PURE__ */ y("div", {
50
+ className: "sticky top-0 z-10 h-0",
51
+ children: /* @__PURE__ */ y("div", {
52
+ className: "absolute end-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 focus-within:opacity-100 group-hover/table:opacity-100",
53
+ children: H.map((e) => /* @__PURE__ */ y(p, {
54
+ tooltip: e.label,
55
+ asChild: !0,
56
+ children: /* @__PURE__ */ y(f, {
57
+ "aria-label": e.label,
58
+ icon: /* @__PURE__ */ y("span", {
59
+ "aria-hidden": !0,
60
+ children: e.icon
61
+ }),
62
+ size: d.Small,
63
+ onClick: e.onClick
64
+ })
65
+ }, e.label))
65
66
  })
66
67
  }),
67
- x?.copiedLabel && /* @__PURE__ */ g("span", {
68
+ /* @__PURE__ */ y("div", {
69
+ ref: M,
70
+ className: e("w-full min-w-0 max-w-full overflow-x-auto", o.scrollContainer, S.tableScrollContainer, {
71
+ [o.tableScrollFadeBoth]: P && F,
72
+ [o.tableScrollFadeStart]: P && !F,
73
+ [o.tableScrollFadeEnd]: !P && F
74
+ }, i.tableScroll),
75
+ onScroll: I,
76
+ role: R ? "region" : void 0,
77
+ "aria-label": R ? O : void 0,
78
+ tabIndex: R ? 0 : void 0,
79
+ children: /* @__PURE__ */ y("table", {
80
+ ref: N,
81
+ className: e("w-max min-w-full border-collapse", S.tableFont ?? "dial-small-text"),
82
+ children: m
83
+ })
84
+ }),
85
+ w?.copyLabel && /* @__PURE__ */ y("span", {
68
86
  "aria-live": "polite",
69
87
  className: "sr-only",
70
88
  role: "status",
71
- children: E ? x.copiedLabel : ""
89
+ children: k ? w.copiedLabel ?? "" : ""
72
90
  })
73
91
  ]
74
92
  });
75
93
  });
76
94
  //#endregion
77
- export { y as MarkdownTable };
95
+ export { S as MarkdownTable };
@@ -1,15 +1,15 @@
1
1
  var e = {
2
- tableContainer: "_tableContainer_187t3_1",
3
- tableContainerLight: "_tableContainerLight_187t3_6",
4
- copiedIcon: "_copiedIcon_187t3_10",
5
- scrollContainer: "_scrollContainer_187t3_14",
6
- tableHeaderCell: "_tableHeaderCell_187t3_30",
7
- sectionRow: "_sectionRow_187t3_35",
8
- row: "_row_187t3_39",
9
- rowDivider: "_rowDivider_187t3_43",
10
- tableScrollFadeEnd: "_tableScrollFadeEnd_187t3_53",
11
- tableScrollFadeStart: "_tableScrollFadeStart_187t3_61",
12
- tableScrollFadeBoth: "_tableScrollFadeBoth_187t3_69"
2
+ tableContainer: "_tableContainer_1fwnj_1",
3
+ tableContainerLight: "_tableContainerLight_1fwnj_6",
4
+ copiedIcon: "_copiedIcon_1fwnj_10",
5
+ scrollContainer: "_scrollContainer_1fwnj_14",
6
+ tableHeaderCell: "_tableHeaderCell_1fwnj_30",
7
+ sectionRow: "_sectionRow_1fwnj_37",
8
+ rowDivider: "_rowDivider_1fwnj_41",
9
+ row: "_row_1fwnj_41",
10
+ tableScrollFadeEnd: "_tableScrollFadeEnd_1fwnj_51",
11
+ tableScrollFadeStart: "_tableScrollFadeStart_1fwnj_59",
12
+ tableScrollFadeBoth: "_tableScrollFadeBoth_1fwnj_67"
13
13
  };
14
14
  //#endregion
15
15
  export { e as default };
@@ -1,6 +1,26 @@
1
1
  //#region src/components/MarkdownRenderer/Table/table-serialization.ts
2
2
  var e = /* @__PURE__ */ function(e) {
3
- return e.Csv = "csv", e.Txt = "txt", e.Markdown = "markdown", e;
4
- }({}), t = "table.csv", n = "text/csv;charset=utf-8", r = (e) => Array.from(e.cells).map((e) => e.textContent?.trim() ?? ""), i = (e) => r(e).map((e) => e ? `"${e.replace(/"/g, "\"\"")}"` : "").join(","), a = (e) => r(e).join(" "), o = (e) => `| ${r(e).join(" | ")} |`, s = (e, t) => t === "csv" ? e.map(i).join("\n") : t === "txt" ? e.map(a).join("\n") : e.map((e, t) => t === 0 ? [o(e), `| ${r(e).map(() => ":--").join(" | ")} |`].join("\n") : o(e)).join("\n");
3
+ return e.Csv = "csv", e.Markdown = "markdown", e;
4
+ }({}), t = "table.csv", n = "text/csv;charset=utf-8", r = ".katex", i = "annotation[encoding=\"application/x-tex\"]", a = (e) => e.querySelector(i)?.textContent?.trim() || null, o = (e) => e.replace(/\\/g, String.raw`\\`).replace(/\|/g, String.raw`\|`), s = (e) => e.replace(/\\\||\|/g, (t, n) => `${t === "|" ? String.raw`\vert` : String.raw`\Vert`}${/^[a-zA-Z]/.test(e.slice(n + t.length)) ? " " : ""}`), c = {
5
+ formatFormula: (e) => `$$${s(e)}$$`,
6
+ escapeText: o
7
+ }, l = {
8
+ formatFormula: (e) => e,
9
+ escapeText: (e) => e
10
+ }, u = (e, t) => {
11
+ let n = document.createTreeWalker(e, NodeFilter.SHOW_TEXT), i = [];
12
+ for (; n.nextNode();) i.push(n.currentNode);
13
+ i.forEach((e) => {
14
+ e.parentElement?.closest(r) ?? (e.data = t(e.data));
15
+ });
16
+ }, d = (e, { formatFormula: t, escapeText: n }) => {
17
+ if (e.querySelector(r) == null) return n(e.textContent?.trim() ?? "");
18
+ let i = e.cloneNode(!0);
19
+ return u(i, n), i.querySelectorAll(r).forEach((e) => {
20
+ if (!i.contains(e)) return;
21
+ let r = a(e);
22
+ e.replaceWith(document.createTextNode(r ? t(r) : n(e.textContent ?? "")));
23
+ }), i.textContent?.trim() ?? "";
24
+ }, f = (e, t) => Array.from(e.cells).map((e) => d(e, t)), p = (e) => f(e, l).map((e) => e ? `"${e.replace(/"/g, "\"\"")}"` : "").join(","), m = (e) => `| ${f(e, c).join(" | ")} |`, h = (e, t) => t === "csv" ? e.map(p).join("\n") : e.map((e, t) => t === 0 ? [m(e), `| ${Array.from(e.cells).map(() => ":--").join(" | ")} |`].join("\n") : m(e)).join("\n");
5
25
  //#endregion
6
- export { t as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, n as MARKDOWN_TABLE_CSV_MIME_TYPE, e as MarkdownTableCopyFormat, s as serializeMarkdownTableRows };
26
+ export { t as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, n as MARKDOWN_TABLE_CSV_MIME_TYPE, e as MarkdownTableCopyFormat, h as serializeMarkdownTableRows };
@@ -1,66 +1,52 @@
1
1
  import e from "../MarkdownTable.module.scss.js";
2
- import { MarkdownTableCopyFormat as t } from "../table-serialization.js";
3
- import { DIAL_ICON_SIZE as n, DIAL_KIT_ICON_STROKE as r } from "@epam/ai-dial-ui-kit";
4
- import { useMemo as i } from "react";
5
- import { jsx as a } from "react/jsx-runtime";
6
- import { IconCheck as o, IconCsv as s, IconDownload as c, IconMarkdown as l, IconMaximize as u, IconTxt as d } from "@tabler/icons-react";
2
+ import { DIAL_ICON_SIZE as t, DIAL_KIT_ICON_STROKE as n } from "@epam/ai-dial-ui-kit";
3
+ import { useMemo as r } from "react";
4
+ import { jsx as i } from "react/jsx-runtime";
5
+ import { IconCheck as a, IconCopy as o, IconDownload as s, IconLayoutSidebarRight as c } from "@tabler/icons-react";
7
6
  //#region src/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.tsx
8
- var f = ({ actionLabels: f, copiedFormat: p, onCopy: m, onDownloadCsv: h, onOpenInCanvas: g }) => i(() => {
9
- if (f == null) return [];
10
- let i = [], _ = [
11
- {
12
- label: f.copyCsvLabel,
13
- format: t.Csv,
14
- Icon: s
15
- },
16
- {
17
- label: f.copyTxtLabel,
18
- format: t.Txt,
19
- Icon: d
20
- },
21
- {
22
- label: f.copyMarkdownLabel,
23
- format: t.Markdown,
24
- Icon: l
7
+ var l = ({ actionLabels: l, isCopied: u, onCopy: d, onDownloadCsv: f, onOpenInCanvas: p }) => {
8
+ let m = l?.copyLabel, h = l?.downloadCsvLabel, g = l?.openInCanvasLabel;
9
+ return r(() => {
10
+ let r = [];
11
+ if (m != null) {
12
+ let s = u ? /* @__PURE__ */ i(a, {
13
+ className: e.copiedIcon,
14
+ size: t.SM,
15
+ stroke: n
16
+ }) : /* @__PURE__ */ i(o, {
17
+ size: t.SM,
18
+ stroke: n
19
+ });
20
+ r.push({
21
+ label: m,
22
+ icon: s,
23
+ onClick: d
24
+ });
25
25
  }
26
- ];
27
- for (let { label: t, format: s, Icon: c } of _) {
28
- if (t == null) continue;
29
- let l = p === s ? /* @__PURE__ */ a(o, {
30
- className: e.copiedIcon,
31
- size: n.SM,
32
- stroke: r
33
- }) : /* @__PURE__ */ a(c, {
34
- size: n.SM,
35
- stroke: r
36
- });
37
- i.push({
38
- label: t,
39
- icon: l,
40
- onClick: () => m(s)
41
- });
42
- }
43
- return f.downloadCsvLabel != null && i.push({
44
- label: f.downloadCsvLabel,
45
- icon: /* @__PURE__ */ a(c, {
46
- size: n.SM,
47
- stroke: r
48
- }),
49
- onClick: h
50
- }), f.openInCanvasLabel != null && g != null && i.push({
51
- label: f.openInCanvasLabel,
52
- icon: /* @__PURE__ */ a(u, {
53
- size: n.SM,
54
- stroke: r
55
- }),
56
- onClick: g
57
- }), i;
58
- }, [
59
- f,
60
- p,
61
- m,
62
- h,
63
- g
64
- ]);
26
+ return h != null && r.push({
27
+ label: h,
28
+ icon: /* @__PURE__ */ i(s, {
29
+ size: t.SM,
30
+ stroke: n
31
+ }),
32
+ onClick: f
33
+ }), g != null && p != null && r.push({
34
+ label: g,
35
+ icon: /* @__PURE__ */ i(c, {
36
+ size: t.SM,
37
+ stroke: n
38
+ }),
39
+ onClick: p
40
+ }), r;
41
+ }, [
42
+ m,
43
+ h,
44
+ g,
45
+ u,
46
+ d,
47
+ f,
48
+ p
49
+ ]);
50
+ };
65
51
  //#endregion
66
- export { f as useMarkdownTableActions };
52
+ export { l as useMarkdownTableActions };
@@ -0,0 +1,14 @@
1
+ import { buildCssVars as e } from "../../utils/build-css-vars.js";
2
+ import t from "./MarkdownRenderer.module.scss.js";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ //#region src/components/MarkdownRenderer/ThinkingShimmer.tsx
5
+ var r = ({ label: r, colors: i }) => /* @__PURE__ */ n("span", {
6
+ className: t.thinking,
7
+ style: e({
8
+ "--cm-thinking-inverted": i?.thinkingPrimary,
9
+ "--cm-thinking-secondary": i?.thinkingSecondary
10
+ }),
11
+ children: r
12
+ });
13
+ //#endregion
14
+ export { r as ThinkingShimmer };
@@ -0,0 +1,84 @@
1
+ import { mergeClasses as e } from "../../utils/merge-class.js";
2
+ import { TextRefinementState as t } from "../../hooks/useTextRefinement.js";
3
+ import { DIAL_ICON_SIZE as n, DIAL_KIT_ICON_STROKE as r, ElementSize as i, ErrorText as a, GhostButton as o, Label as s, Spinner as c } from "@epam/ai-dial-ui-kit";
4
+ import { useRef as l } from "react";
5
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
6
+ import { IconSparkles as p } from "@tabler/icons-react";
7
+ //#region src/components/TextRefinementField/TextRefinementField.tsx
8
+ var m = ({ isEnabled: m, fieldId: h, label: g, labelClassName: _, required: v, labels: y, refinement: b, disabled: x, feedbackClassName: S, errorClassName: C, children: w }) => {
9
+ let T = l(null);
10
+ if (!m) return /* @__PURE__ */ d(u, { children: w });
11
+ let E = b.state === t.Error, D = {
12
+ [t.Idle]: "",
13
+ [t.Pending]: y?.refinePendingAriaLabel ?? "Refining text",
14
+ [t.Success]: y?.refineSuccessAriaLabel ?? "Text refined. Undo is available.",
15
+ [t.Restored]: y?.refineUndoAriaLabel ?? "Original text restored.",
16
+ [t.Unchanged]: y?.refineUnchangedAriaLabel ?? "No changes were needed.",
17
+ [t.Error]: ""
18
+ }[b.state];
19
+ return /* @__PURE__ */ f("div", {
20
+ className: "flex min-w-0 flex-col gap-1",
21
+ role: "group",
22
+ "aria-labelledby": h + "-label",
23
+ "aria-describedby": E ? h + "-refinement-error" : void 0,
24
+ children: [
25
+ /* @__PURE__ */ f("div", {
26
+ className: "flex min-w-0 flex-wrap items-center gap-x-3",
27
+ children: [/* @__PURE__ */ d(s, {
28
+ id: h + "-label",
29
+ htmlFor: h,
30
+ className: _,
31
+ label: g,
32
+ required: v
33
+ }), /* @__PURE__ */ f("div", {
34
+ ref: T,
35
+ className: "ms-auto flex min-w-0 flex-wrap items-center",
36
+ children: [/* @__PURE__ */ d(o, {
37
+ size: i.Small,
38
+ label: y?.refineWithAiLabel ?? "Refine with AI",
39
+ disabled: x || !b.canRefine,
40
+ onClick: () => {
41
+ b.refine();
42
+ },
43
+ iconBefore: b.isPending ? /* @__PURE__ */ d("span", {
44
+ "aria-hidden": !0,
45
+ children: /* @__PURE__ */ d(c, {
46
+ size: n.SM,
47
+ ariaLabel: ""
48
+ })
49
+ }) : /* @__PURE__ */ d(p, {
50
+ size: n.SM,
51
+ stroke: r,
52
+ "aria-hidden": !0
53
+ })
54
+ }), b.canUndo && /* @__PURE__ */ d(o, {
55
+ size: i.Small,
56
+ label: y?.refineUndoLabel ?? "Undo",
57
+ disabled: x,
58
+ onClick: () => {
59
+ b.undo(), T.current?.querySelector("button")?.focus();
60
+ }
61
+ })]
62
+ })]
63
+ }),
64
+ /* @__PURE__ */ d("div", {
65
+ "aria-busy": b.isPending,
66
+ children: w
67
+ }),
68
+ /* @__PURE__ */ d("div", {
69
+ role: "status",
70
+ "aria-live": "polite",
71
+ className: S,
72
+ children: D
73
+ }),
74
+ E && /* @__PURE__ */ d(a, {
75
+ role: "alert",
76
+ id: h + "-refinement-error",
77
+ className: e(S, C),
78
+ text: y?.refineErrorLabel ?? "Could not refine this text. Please try again."
79
+ })
80
+ ]
81
+ });
82
+ };
83
+ //#endregion
84
+ export { m as TextRefinementField };
@@ -31,6 +31,7 @@ var e = {
31
31
  "application/typescript": "ts",
32
32
  "application/xhtml+xml": "xhtml",
33
33
  "application/xml": "xml",
34
+ "application/yaml": "yaml",
34
35
  "application/vnd.amazon.ebook": "azw",
35
36
  "application/vnd.apple.installer+xml": "mpkg",
36
37
  "application/vnd.ms-excel": "xls",
@@ -94,6 +95,52 @@ var e = {
94
95
  "video/ogg": "ogv",
95
96
  "video/webm": "webm",
96
97
  "video/x-msvideo": "avi"
97
- }, t = "*/*", n = "audio/";
98
+ }, t = "*/*", n = "audio/", r = {
99
+ "text/json": "application/json",
100
+ "text/x-json": "application/json",
101
+ "application/x-json": "application/json",
102
+ "text/xml": "application/xml",
103
+ "application/javascript": "text/javascript",
104
+ "application/x-javascript": "text/javascript",
105
+ "application/typescript": "text/typescript",
106
+ "text/x-markdown": "text/markdown",
107
+ "application/markdown": "text/markdown",
108
+ "application/csv": "text/csv",
109
+ "text/x-csv": "text/csv",
110
+ "text/comma-separated-values": "text/csv",
111
+ "text/yaml": "application/yaml",
112
+ "text/x-yaml": "application/yaml",
113
+ "application/x-yaml": "application/yaml",
114
+ "text/sql": "application/sql",
115
+ "text/x-sql": "application/sql",
116
+ "application/php": "text/x-php",
117
+ "application/x-php": "text/x-php",
118
+ "application/x-httpd-php": "text/x-php",
119
+ "application/x-rust": "text/x-rustsrc",
120
+ "application/x-pdf": "application/pdf",
121
+ "application/vnd.ms-word": "application/msword",
122
+ "application/excel": "application/vnd.ms-excel",
123
+ "application/x-excel": "application/vnd.ms-excel",
124
+ "application/x-msexcel": "application/vnd.ms-excel",
125
+ "application/powerpoint": "application/vnd.ms-powerpoint",
126
+ "application/mspowerpoint": "application/vnd.ms-powerpoint",
127
+ "application/x-zip": "application/zip",
128
+ "application/x-zip-compressed": "application/zip",
129
+ "application/x-gzip": "application/gzip",
130
+ "application/x-rar-compressed": "application/vnd.rar",
131
+ "image/jpg": "image/jpeg",
132
+ "image/pjpeg": "image/jpeg",
133
+ "image/x-png": "image/png",
134
+ "image/svg": "image/svg+xml",
135
+ "image/icon": "image/vnd.microsoft.icon",
136
+ "image/x-icon": "image/vnd.microsoft.icon",
137
+ "audio/mp3": "audio/mpeg",
138
+ "audio/mpeg3": "audio/mpeg",
139
+ "audio/x-mpeg-3": "audio/mpeg",
140
+ "audio/wave": "audio/wav",
141
+ "audio/x-wav": "audio/wav",
142
+ "audio/vnd.wave": "audio/wav",
143
+ "audio/x-m4a": "audio/mp4"
144
+ };
98
145
  //#endregion
99
- export { n as MIME_TYPE_AUDIO_PREFIX, e as MIME_TYPE_EXT_MAP, t as MIME_TYPE_WILDCARD };
146
+ export { r as MIME_TYPE_ALIASES, n as MIME_TYPE_AUDIO_PREFIX, e as MIME_TYPE_EXT_MAP, t as MIME_TYPE_WILDCARD };
@@ -0,0 +1,10 @@
1
+ //#region src/constants/public-class-names.ts
2
+ var e = {
3
+ codeBlock: "dial-chat-shared-code-block",
4
+ codeBlockHeader: "dial-chat-shared-code-block-header",
5
+ table: "dial-chat-shared-table",
6
+ tableScroll: "dial-chat-shared-table-scroll",
7
+ mathBlock: "dial-chat-shared-math-block"
8
+ };
9
+ //#endregion
10
+ export { e as CHAT_SHARED_CLASS };
@@ -1,4 +1,4 @@
1
1
  //#region src/constants/resizable-fields.ts
2
- var e = "max-h-[50vh]", t = "--resizable-field-max-height", n = "[&_.w-md-editor]:max-h-[var(--resizable-field-max-height,70vh)]";
2
+ var e = "max-h-[50vh]", t = "--resizable-field-max-height", n = "[&_.w-md-editor:not(.w-md-editor-fullscreen)]:max-h-[var(--resizable-field-max-height,70vh)]";
3
3
  //#endregion
4
4
  export { n as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, t as RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE, e as RESIZABLE_TEXTAREA_CLASS_NAME };