@epam/ai-dial-attachment-canvas 1.2.0-dev.78 → 1.2.0-dev.81
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAppCanvasRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/McpAppCanvasRenderer/McpAppCanvasRenderer.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,KAAK,EAAE,EAAwC,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAG1E,sDAAsD;AACtD,MAAM,WAAW,yBAAyB;IACxC,iCAAiC;IACjC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,0FAA0F;IAC1F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6JAA6J;IAC7J,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;CAC/C;AAgBD,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,
|
|
1
|
+
{"version":3,"file":"McpAppCanvasRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/McpAppCanvasRenderer/McpAppCanvasRenderer.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,KAAK,EAAE,EAAwC,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAG1E,sDAAsD;AACtD,MAAM,WAAW,yBAAyB;IACxC,iCAAiC;IACjC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,0FAA0F;IAC1F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6JAA6J;IAC7J,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;CAC/C;AAgBD,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA6H9D,CAAC"}
|
package/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
._GzYRV{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;line-height:1.2}._3eOF8{margin-right:5px;font-weight:700}._3eOF8+._3eOF8{margin-left:-5px}._1MFti{cursor:pointer}._f10Tu{-webkit-user-select:none;user-select:none;margin-right:5px;font-size:1.2em}._1UmXx:after{content:"▸"}._1LId0:after{content:"▾"}._1pNG9{margin-right:5px}._1pNG9:after{content:"...";font-size:.8em}._2IvMF{background:#eee}._2bkNM{margin:0;padding:0 10px}._1BXBN{margin:0;padding:0}._1MGIk{color:#000;margin-right:5px;font-weight:600}._3uHL6{color:#000}._2T6PJ,._1Gho6{color:#df113a}._vGjyY{color:#2a3f3c}._1bQdo{color:#0b75f5}._3zQKs{color:#469038}._1xvuR{color:#43413d}._oLqym,._2AXVT,._2KJWg{color:#000}._11RoI{background:#002b36}._17H2C,._3QHg2,._3fDAz{color:#fdf6e3}._2bSDX{color:#fdf6e3;margin-right:5px;font-weight:bolder}._gsbQL{color:#fdf6e3}._LaAZe,._GTKgm{color:#81b5ac}._Chy1W{color:#cb4b16}._2bveF{color:#d33682}._2vRm-{color:#ae81ff}._1prJR{color:#268bd2}._container_1nhig_1{background:var(--cc-bg,var(--bg-layer-raised,#fcfcfc))}._containerLight_1nhig_5{background:var(--cc-bg,var(--bg-layer-base,#f5f7fa))}._openInNewTabButton_c1arc_1{color:var(--ac-open-in-new-tab-text,var(--text-accent,#1d4ed8))}.
|
|
1
|
+
._GzYRV{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;line-height:1.2}._3eOF8{margin-right:5px;font-weight:700}._3eOF8+._3eOF8{margin-left:-5px}._1MFti{cursor:pointer}._f10Tu{-webkit-user-select:none;user-select:none;margin-right:5px;font-size:1.2em}._1UmXx:after{content:"▸"}._1LId0:after{content:"▾"}._1pNG9{margin-right:5px}._1pNG9:after{content:"...";font-size:.8em}._2IvMF{background:#eee}._2bkNM{margin:0;padding:0 10px}._1BXBN{margin:0;padding:0}._1MGIk{color:#000;margin-right:5px;font-weight:600}._3uHL6{color:#000}._2T6PJ,._1Gho6{color:#df113a}._vGjyY{color:#2a3f3c}._1bQdo{color:#0b75f5}._3zQKs{color:#469038}._1xvuR{color:#43413d}._oLqym,._2AXVT,._2KJWg{color:#000}._11RoI{background:#002b36}._17H2C,._3QHg2,._3fDAz{color:#fdf6e3}._2bSDX{color:#fdf6e3;margin-right:5px;font-weight:bolder}._gsbQL{color:#fdf6e3}._LaAZe,._GTKgm{color:#81b5ac}._Chy1W{color:#cb4b16}._2bveF{color:#d33682}._2vRm-{color:#ae81ff}._1prJR{color:#268bd2}._container_1nhig_1{background:var(--cc-bg,var(--bg-layer-raised,#fcfcfc))}._containerLight_1nhig_5{background:var(--cc-bg,var(--bg-layer-base,#f5f7fa))}._openInNewTabButton_c1arc_1{color:var(--ac-open-in-new-tab-text,var(--text-accent,#1d4ed8))}._loadingOverlay_k49bp_2{background-color:var(--mcp-loading-bg,var(--bg-layer-1,#e0e6f0))}._fullscreenFrame_k49bp_21 iframe{width:100%!important;max-width:none!important;height:100%!important;max-height:none!important}._statusLabel_k49bp_28{color:var(--mcp-status-text,var(--text-primary,#161b2d))}._statusDetail_k49bp_33{color:var(--mcp-status-detail-text,var(--text-secondary,#57647a))}._errorIcon_k49bp_37{color:var(--mcp-error-icon,var(--text-error,#ae2f2f))}._viewer_1w97n_2{background:var(--ac-ooxml-bg,var(--bg-layer-raised,#fcfcfc))}._spreadsheetCanvas_1w97n_6{width:100%;height:100%;display:block}._formulaPanel_1w97n_12{border-color:var(--ac-ooxml-formula-border,var(--stroke-secondary,#d1dbea));background:var(--ac-ooxml-bg,var(--bg-layer-raised,#fcfcfc));color:var(--ac-ooxml-formula-text,var(--text-primary,#161b2d))}._formulaValue_1w97n_18{border-color:var(--ac-ooxml-formula-border,var(--stroke-secondary,#d1dbea));background:var(--ac-ooxml-formula-bg,var(--bg-layer-base,#f5f7fa));color:var(--ac-ooxml-formula-text,var(--text-primary,#161b2d))}._statusOverlay_1w97n_24{background:var(--ac-ooxml-bg,var(--bg-layer-raised,#fcfcfc));color:var(--ac-status-text,var(--text-secondary,#57647a))}._errorIcon_1w97n_29{color:var(--ac-error-icon,var(--text-error,#ae2f2f))}._highlight_1w97n_37{border:1px solid var(--ac-ooxml-highlight-border,var(--stroke-accent,#5c8dea));background:var(--ac-ooxml-highlight-bg,transparent);opacity:.55;border-radius:2px}._highlight_1w97n_37[data-selected=true]{opacity:1;border-width:2px}._highlight_1w97n_37[data-clipped=true]{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}._loadingOverlay_12637_1{background-color:var(--vs-loading-bg,var(--bg-layer-sunken,#eef1f7))}._statusLabel_12637_5{color:var(--vs-status-text,var(--text-primary,#161b2d))}._errorIcon_12637_9{color:var(--vs-error-icon,var(--text-error,#ae2f2f))}._body_13ogb_4{color:var(--ac-text,var(--text-primary,#161b2d));font-family:var(--ac-font-family);font-size:var(--ac-font-size);font-weight:var(--ac-font-weight);line-height:var(--ac-line-height);letter-spacing:var(--ac-letter-spacing)}._statusLabel_13ogb_13{color:var(--ac-status-text,var(--text-secondary,#57647a))}._errorIcon_13ogb_17{color:var(--ac-error-icon,var(--text-error,#ae2f2f))}._jsonWrapper_13ogb_21{border-color:var(--ac-json-border,var(--stroke-secondary,#d1dbea));background-color:var(--ac-json-bg,var(--bg-layer-base,#f5f7fa))}._jsonLabel_13ogb_26{color:var(--ac-json-label,var(--text-primary,#161b2d))}._jsonClickableLabel_13ogb_30{color:var(--ac-json-clickable-label,var(--text-primary,#161b2d))}._jsonPunctuation_13ogb_34{color:var(--ac-json-punctuation,var(--text-secondary,#57647a))}._jsonStringValue_13ogb_38{color:var(--ac-json-string,var(--text-success,#007274))}._jsonNumberValue_13ogb_42{color:var(--ac-json-number,var(--text-accent,#1d4ed8))}._jsonBooleanValue_13ogb_46{color:var(--ac-json-boolean,var(--text-warning,#7f6300))}._jsonNullValue_13ogb_50{color:var(--ac-json-null,var(--text-secondary,#57647a))}._jsonExpandIcon_13ogb_54{color:var(--ac-json-toggle-icon,var(--text-secondary,#57647a))}._jsonExpandIcon_13ogb_54:hover{color:var(--ac-json-toggle-icon-hover,var(--text-primary,#161b2d))}._jsonExpandIcon_13ogb_54:after{content:"▶";vertical-align:middle;font-size:.6em}._jsonCollapseIcon_13ogb_67{color:var(--ac-json-toggle-icon,var(--text-secondary,#57647a))}._jsonCollapseIcon_13ogb_67:hover{color:var(--ac-json-toggle-icon-hover,var(--text-primary,#161b2d))}._jsonCollapseIcon_13ogb_67:after{content:"▼";vertical-align:middle;font-size:.6em}.pdf-container:has(+.pdf-container){padding:0}._jsonCollapsedContent_13ogb_84{color:var(--ac-json-collapsed-text,var(--text-secondary,#57647a));background-color:var(--ac-json-collapsed-bg,var(--bg-layer-raised,#fcfcfc));font-size:.75em}._jsonCollapsedContent_13ogb_84:after{content:"…"}._mcpAppDivider_1jh5p_1{border-color:var(--ac-mcp-app-divider,var(--text-secondary,#57647a))}._mcpAppVersion_1jh5p_5{color:var(--ac-mcp-app-version,var(--text-secondary,#57647a))}._frame_g47g7_1{background-color:var(--igv-bg,var(--bg-layer-2,#f3f4f6));border-color:var(--igv-border,var(--stroke-tertiary,#dde1e6))}._header_g47g7_6{border-block-end-color:var(--igv-border,var(--stroke-tertiary,#dde1e6))}._title_g47g7_10{color:var(--igv-title-text,var(--text-primary,#161b2d))}
|
|
2
2
|
.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}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.start-3{inset-inline-start:.75rem}.top-3{top:.75rem}.z-10{z-index:10}.m-0{margin:0}.m-3{margin:.75rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.my-0{margin-bottom:0;margin-top:0}.me-1{margin-inline-end:.25rem}.ms-2{margin-inline-start:.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.table-row{display:table-row}.grid{display:grid}.hidden{display:none}.h-3{height:.75rem}.h-8{height:2rem}.h-full{height:100%}.max-h-\[70vh\]{max-height:70vh}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-10{min-height:2.5rem}.min-h-\[200px\]{min-height:200px}.w-0{width:0}.w-36{width:9rem}.w-full{width:100%}.min-w-0{min-width:0}.max-w-full{max-width:100%}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:4px}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-s{border-inline-start-width:1px}.border-none{border-style:none}.border-tertiary{border-color:var(--stroke-tertiary,#e0e6f0)}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.ps-3{padding-inline-start:.75rem}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.italic{font-style:italic}.text-secondary{color:var(--text-secondary,#57647a)}.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{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.\[scrollbar-gutter\:stable\]{scrollbar-gutter:stable}.hover\:underline:hover{text-decoration-line:underline}.focus-visible\:outline:focus-visible{outline-style:solid;outline-width:1px}.focus-visible\:outline-focus:focus-visible{outline-color:var(--stroke-focus-black,var(--stroke-focus,#161b2d))}@media (max-width:1279px){.mobile\:w-full{width:100%}.mobile\:max-w-full{max-width:100%}}.\[\&\>div\:first-child\]\:hidden>div:first-child{display:none}
|
package/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { i as a, o, t as s } from "./LazyContentBoundary-tNE1ExbI.js";
|
|
|
3
3
|
import { AttachmentType as c, CodeBlockTheme as l, DEFAULT_MARKDOWN_CLASS_NAMES as u, FileExtension as d, MIMEType as f, MarkdownRenderer as p, buildCssVars as m, copyToClipboard as h, mergeClasses as g, restrainedSyntaxTheme as _, stripUrlQueryAndFragment as v } from "@epam/ai-dial-chat-shared";
|
|
4
4
|
import { SidebarOrientation as y, SidebarPanel as b } from "@epam/ai-dial-sidebar";
|
|
5
5
|
import { DIAL_ICON_SIZE as x, DIAL_KIT_ICON_STROKE as S, ElementSize as C, GhostIconButton as w, LinkButton as T, Spinner as E } from "@epam/ai-dial-ui-kit";
|
|
6
|
-
import { IconAlertTriangle as D, IconArrowsMaximize as O, IconCheck as k, IconCode as ee, IconCopy as
|
|
7
|
-
import { createContext as
|
|
6
|
+
import { IconAlertTriangle as D, IconArrowsMaximize as O, IconCheck as k, IconCode as ee, IconCopy as te, IconDownload as ne, IconEye as re, IconLock as ie, IconMarkdown as ae, IconRefresh as oe } from "@tabler/icons-react";
|
|
7
|
+
import { createContext as A, lazy as j, memo as M, useCallback as N, useContext as P, useEffect as F, useMemo as I, useRef as L, useState as R } from "react";
|
|
8
8
|
import { JsonView as se, defaultStyles as ce } from "react-json-view-lite";
|
|
9
9
|
import { Fragment as le, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
10
10
|
import { AppBridge as V, AppFrame as H } from "@mcp-ui/client";
|
|
@@ -18,11 +18,11 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
18
18
|
}, he = {
|
|
19
19
|
[l.Dark]: _,
|
|
20
20
|
[l.Light]: _
|
|
21
|
-
}, U = () =>
|
|
21
|
+
}, U = () => j(async () => {
|
|
22
22
|
let { Prism: e } = await import("react-syntax-highlighter");
|
|
23
23
|
return { default: e };
|
|
24
|
-
}), ge =
|
|
25
|
-
let { text: r, language: i } = e, a = i == null || i === "plaintext", o = he[t], c = t === l.Light, [u, d] = R(0), f = I(U, [u]), p =
|
|
24
|
+
}), ge = M(({ content: e, codeBlockTheme: t = l.Light, labels: n }) => {
|
|
25
|
+
let { text: r, language: i } = e, a = i == null || i === "plaintext", o = he[t], c = t === l.Light, [u, d] = R(0), f = I(U, [u]), p = N(() => {
|
|
26
26
|
d((e) => e + 1);
|
|
27
27
|
}, []), m = /* @__PURE__ */ z("pre", {
|
|
28
28
|
className: "whitespace-pre-wrap break-words p-4",
|
|
@@ -54,18 +54,18 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
54
54
|
})
|
|
55
55
|
})
|
|
56
56
|
});
|
|
57
|
-
}), _e = { openInNewTabButton: "_openInNewTabButton_c1arc_1" }, ve =
|
|
57
|
+
}), _e = { openInNewTabButton: "_openInNewTabButton_c1arc_1" }, ve = M(({ content: e, labels: t, isSourceView: n, title: r, codeBlockTheme: a, openInNewTabButtonTypographyClassName: o = "dial-body-semi-text" }) => {
|
|
58
58
|
let { htmlFrameBlockedLabel: s = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: c = "Open in new tab" } = t, [l, u] = R(!0), [d, f] = R(!1), p = L(null);
|
|
59
59
|
F(() => {
|
|
60
60
|
u(!0), f(!1);
|
|
61
61
|
}, [e]);
|
|
62
|
-
let m =
|
|
62
|
+
let m = N((t) => {
|
|
63
63
|
if (u(!1), e.srcdoc == null) try {
|
|
64
64
|
p.current?.contentDocument ?? f(!0);
|
|
65
65
|
} catch {
|
|
66
66
|
f(!0);
|
|
67
67
|
}
|
|
68
|
-
}, [e.srcdoc]), h =
|
|
68
|
+
}, [e.srcdoc]), h = N(() => {
|
|
69
69
|
u(!1), f(!0);
|
|
70
70
|
}, []);
|
|
71
71
|
if (n && e.srcdoc != null) return /* @__PURE__ */ z(ge, {
|
|
@@ -169,60 +169,66 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
169
169
|
hasFailed: o
|
|
170
170
|
};
|
|
171
171
|
}, W = {
|
|
172
|
-
loadingOverlay: "
|
|
173
|
-
fullscreenFrame: "
|
|
174
|
-
statusLabel: "
|
|
175
|
-
|
|
172
|
+
loadingOverlay: "_loadingOverlay_k49bp_2",
|
|
173
|
+
fullscreenFrame: "_fullscreenFrame_k49bp_21",
|
|
174
|
+
statusLabel: "_statusLabel_k49bp_28",
|
|
175
|
+
statusDetail: "_statusDetail_k49bp_33",
|
|
176
|
+
errorIcon: "_errorIcon_k49bp_37"
|
|
176
177
|
}, we = ({ content: e, errorLabel: t = "Failed to load app", onAppInfo: n }) => {
|
|
177
|
-
let [r, i] = R("loading"), { html:
|
|
178
|
+
let [r, i] = R("loading"), [a, o] = R(), { html: s, sandboxUrl: c, toolInput: l, toolResult: u, hostContext: d } = e, f = I(() => ({ url: new URL(c) }), [c]), p = d?.displayMode === "fullscreen", m = L(null), [h, _] = R();
|
|
178
179
|
F(() => {
|
|
179
|
-
let e =
|
|
180
|
+
let e = m.current;
|
|
180
181
|
if (!e) return;
|
|
181
182
|
let t = new ResizeObserver(([e]) => {
|
|
182
183
|
if (!e) return;
|
|
183
184
|
let { width: t, height: n } = e.contentRect;
|
|
184
|
-
|
|
185
|
+
_({
|
|
185
186
|
width: Math.round(t),
|
|
186
187
|
height: Math.round(n)
|
|
187
188
|
});
|
|
188
189
|
});
|
|
189
190
|
return t.observe(e), () => t.disconnect();
|
|
190
191
|
}, []);
|
|
191
|
-
let { appBridge:
|
|
192
|
-
...
|
|
193
|
-
containerDimensions:
|
|
194
|
-
}, [
|
|
192
|
+
let { appBridge: v, hasFailed: y } = Ce(e, m, I(() => d == null || h == null ? d : {
|
|
193
|
+
...d,
|
|
194
|
+
containerDimensions: h
|
|
195
|
+
}, [d, h])), b = y || r === "error";
|
|
195
196
|
return /* @__PURE__ */ B("div", {
|
|
196
|
-
ref:
|
|
197
|
-
className: g("relative h-full min-h-[200px] w-full",
|
|
197
|
+
ref: m,
|
|
198
|
+
className: g("relative h-full min-h-[200px] w-full", p && W.fullscreenFrame),
|
|
198
199
|
children: [
|
|
199
|
-
|
|
200
|
-
html:
|
|
201
|
-
sandbox:
|
|
202
|
-
appBridge:
|
|
203
|
-
toolInput:
|
|
204
|
-
toolResult:
|
|
200
|
+
v != null && !b && /* @__PURE__ */ z(H, {
|
|
201
|
+
html: s,
|
|
202
|
+
sandbox: f,
|
|
203
|
+
appBridge: v,
|
|
204
|
+
toolInput: l,
|
|
205
|
+
toolResult: u,
|
|
205
206
|
onSizeChanged: () => i("ready"),
|
|
206
207
|
onInitialized: (e) => {
|
|
207
208
|
i("ready"), e.appVersion != null && n?.(e.appVersion);
|
|
208
209
|
},
|
|
209
|
-
onError: () =>
|
|
210
|
+
onError: (e) => {
|
|
211
|
+
o(e.message), i("error");
|
|
212
|
+
}
|
|
210
213
|
}),
|
|
211
|
-
!
|
|
214
|
+
!b && r === "loading" && /* @__PURE__ */ z("div", {
|
|
212
215
|
className: g("absolute inset-0 flex flex-col items-center justify-center gap-2", W.loadingOverlay),
|
|
213
216
|
children: /* @__PURE__ */ z(E, {})
|
|
214
217
|
}),
|
|
215
|
-
|
|
216
|
-
className: "absolute inset-0 flex flex-col items-center justify-center gap-2",
|
|
218
|
+
b && /* @__PURE__ */ B("div", {
|
|
219
|
+
className: "absolute inset-0 flex flex-col items-center justify-center gap-2 p-4",
|
|
217
220
|
children: [/* @__PURE__ */ z(D, {
|
|
218
221
|
size: 60,
|
|
219
222
|
stroke: S,
|
|
220
223
|
"aria-hidden": !0,
|
|
221
224
|
className: W.errorIcon
|
|
222
|
-
}), /* @__PURE__ */
|
|
225
|
+
}), /* @__PURE__ */ B("p", {
|
|
223
226
|
role: "alert",
|
|
224
227
|
className: g("text-center", W.statusLabel),
|
|
225
|
-
children: t
|
|
228
|
+
children: [t, a && /* @__PURE__ */ B(le, { children: [/* @__PURE__ */ z("br", {}), /* @__PURE__ */ z("span", {
|
|
229
|
+
className: W.statusDetail,
|
|
230
|
+
children: a
|
|
231
|
+
})] })]
|
|
226
232
|
})]
|
|
227
233
|
})
|
|
228
234
|
]
|
|
@@ -602,7 +608,7 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
602
608
|
jsonExpandIcon: "_jsonExpandIcon_13ogb_54",
|
|
603
609
|
jsonCollapseIcon: "_jsonCollapseIcon_13ogb_67",
|
|
604
610
|
jsonCollapsedContent: "_jsonCollapsedContent_13ogb_84"
|
|
605
|
-
}, Me = () =>
|
|
611
|
+
}, Me = () => j(async () => ({ default: (await import("./PdfContent-BoAtghsO.js")).PdfContent })), Ne = ({ url: e, fileName: t, loadErrorLabel: n }) => {
|
|
606
612
|
let [r, i] = R(!1);
|
|
607
613
|
return F(() => {
|
|
608
614
|
i(!1);
|
|
@@ -626,8 +632,8 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
626
632
|
i.PlainText,
|
|
627
633
|
i.Code,
|
|
628
634
|
i.Ooxml
|
|
629
|
-
]), Fe =
|
|
630
|
-
let { colors: V, typography: H, bodyClassName: ue, cssVars: de } =
|
|
635
|
+
]), Fe = M(({ content: e, isLoading: t = !1, fileName: r, isHtmlSourceView: a = !1, labels: { unsupportedLabel: o = "Preview is not supported for this file", loadErrorLabel: c = "Failed to load file", forbiddenErrorLabel: l = "You don't have permission to access this file", visualizerErrorLabel: d, htmlFrameBlockedLabel: f = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: h = "Open in new tab", pdfThumbnailsLabel: _, pdfShowThumbnailsLabel: v, pdfHideThumbnailsLabel: y, pdfPageNumberLabel: b, pdfContentLoadingLabel: x, pdfContentErrorLabel: C, pdfContentRetryLabel: w, xlsxFormulaLabel: T = "Formula", codeContentLoadingLabel: O, codeContentErrorLabel: k, codeContentRetryLabel: ee, tableCopyLabel: te, tableCopiedLabel: ne, tableDownloadCsvLabel: re, ooxmlHighlightsLabel: ae, ooxmlHighlightNavigatedLabel: oe } = {}, styles: A, codeBlockTheme: j, tableDownloadFilename: M, loadPdf: P, hidePdfToolbar: F = !1, configurePdfWorker: L, onAppInfo: le }) => {
|
|
636
|
+
let { colors: V, typography: H, bodyClassName: ue, cssVars: de } = A ?? {}, [fe, pe] = R(0), me = I(Me, [fe]), he = N(() => {
|
|
631
637
|
pe((e) => e + 1);
|
|
632
638
|
}, []), U = H?.fontClassName != null, _e = I(() => ({
|
|
633
639
|
...m({
|
|
@@ -661,7 +667,7 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
661
667
|
"--ac-letter-spacing": U ? void 0 : H?.letterSpacing
|
|
662
668
|
}),
|
|
663
669
|
...de
|
|
664
|
-
}), [
|
|
670
|
+
}), [A]), ye = I(() => {
|
|
665
671
|
switch (e.type) {
|
|
666
672
|
case i.Image:
|
|
667
673
|
case i.Audio:
|
|
@@ -704,13 +710,13 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
704
710
|
case i.Markdown: return /* @__PURE__ */ z(p, {
|
|
705
711
|
content: e.text,
|
|
706
712
|
isStreaming: !1,
|
|
707
|
-
codeBlockTheme:
|
|
713
|
+
codeBlockTheme: j,
|
|
708
714
|
classNames: u
|
|
709
715
|
});
|
|
710
716
|
case i.MarkdownTable: return /* @__PURE__ */ z(p, {
|
|
711
717
|
content: e.text,
|
|
712
718
|
isStreaming: !1,
|
|
713
|
-
codeBlockTheme:
|
|
719
|
+
codeBlockTheme: j,
|
|
714
720
|
containerClassName: "flex h-full min-h-0 flex-col",
|
|
715
721
|
classNames: {
|
|
716
722
|
...u,
|
|
@@ -718,11 +724,11 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
718
724
|
tableScrollContainer: "max-h-full"
|
|
719
725
|
},
|
|
720
726
|
tableActionLabels: {
|
|
721
|
-
copyLabel:
|
|
722
|
-
copiedLabel:
|
|
723
|
-
downloadCsvLabel:
|
|
727
|
+
copyLabel: te,
|
|
728
|
+
copiedLabel: ne,
|
|
729
|
+
downloadCsvLabel: re
|
|
724
730
|
},
|
|
725
|
-
tableDownloadFilename:
|
|
731
|
+
tableDownloadFilename: M
|
|
726
732
|
});
|
|
727
733
|
case i.Json: return /* @__PURE__ */ z("div", {
|
|
728
734
|
dir: "ltr",
|
|
@@ -753,7 +759,7 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
753
759
|
});
|
|
754
760
|
case i.Code: return /* @__PURE__ */ z(ge, {
|
|
755
761
|
content: e,
|
|
756
|
-
codeBlockTheme:
|
|
762
|
+
codeBlockTheme: j,
|
|
757
763
|
labels: {
|
|
758
764
|
loadingLabel: O,
|
|
759
765
|
errorLabel: k,
|
|
@@ -768,7 +774,7 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
768
774
|
},
|
|
769
775
|
isSourceView: a,
|
|
770
776
|
title: r,
|
|
771
|
-
codeBlockTheme:
|
|
777
|
+
codeBlockTheme: j
|
|
772
778
|
});
|
|
773
779
|
case i.Pdf: return /* @__PURE__ */ z(s, {
|
|
774
780
|
retryKey: fe,
|
|
@@ -784,7 +790,7 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
784
790
|
highlights: e.highlights ?? [],
|
|
785
791
|
selectedHighlightId: e.selectedHighlightId,
|
|
786
792
|
selectedPageNumber: e.page,
|
|
787
|
-
loadPdf:
|
|
793
|
+
loadPdf: P,
|
|
788
794
|
hideHeader: F,
|
|
789
795
|
configurePdfWorker: L,
|
|
790
796
|
labels: {
|
|
@@ -804,8 +810,8 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
804
810
|
loadErrorLabel: c,
|
|
805
811
|
formulaLabel: T,
|
|
806
812
|
formulaLabelClassName: H?.xlsxFormulaLabelClassName ?? "dial-italic-text",
|
|
807
|
-
highlightsLabel:
|
|
808
|
-
highlightNavigatedLabel:
|
|
813
|
+
highlightsLabel: ae,
|
|
814
|
+
highlightNavigatedLabel: oe
|
|
809
815
|
});
|
|
810
816
|
case i.Visualizer:
|
|
811
817
|
case i.GroupedVisualizer: return /* @__PURE__ */ z(je, {
|
|
@@ -824,7 +830,7 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
824
830
|
let t = e.errorType === n.Forbidden;
|
|
825
831
|
return /* @__PURE__ */ B("div", {
|
|
826
832
|
className: "flex flex-col items-center gap-2",
|
|
827
|
-
children: [z(t ?
|
|
833
|
+
children: [z(t ? ie : D, {
|
|
828
834
|
size: 60,
|
|
829
835
|
stroke: S,
|
|
830
836
|
className: K.errorIcon
|
|
@@ -841,7 +847,7 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
841
847
|
H?.jsonClassName,
|
|
842
848
|
H?.xlsxFormulaLabelClassName,
|
|
843
849
|
r,
|
|
844
|
-
|
|
850
|
+
j,
|
|
845
851
|
o,
|
|
846
852
|
c,
|
|
847
853
|
l,
|
|
@@ -849,8 +855,8 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
849
855
|
f,
|
|
850
856
|
h,
|
|
851
857
|
a,
|
|
852
|
-
|
|
853
|
-
|
|
858
|
+
M,
|
|
859
|
+
P,
|
|
854
860
|
F,
|
|
855
861
|
L,
|
|
856
862
|
le,
|
|
@@ -868,11 +874,11 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
868
874
|
me,
|
|
869
875
|
fe,
|
|
870
876
|
he,
|
|
871
|
-
A,
|
|
872
877
|
te,
|
|
873
878
|
ne,
|
|
874
|
-
|
|
875
|
-
ae
|
|
879
|
+
re,
|
|
880
|
+
ae,
|
|
881
|
+
oe
|
|
876
882
|
]);
|
|
877
883
|
return /* @__PURE__ */ z("div", {
|
|
878
884
|
style: !t && Pe.has(e.type) ? _e : void 0,
|
|
@@ -882,18 +888,18 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
882
888
|
}), Ie = {
|
|
883
889
|
mcpAppDivider: "_mcpAppDivider_1jh5p_1",
|
|
884
890
|
mcpAppVersion: "_mcpAppVersion_1jh5p_5"
|
|
885
|
-
}, Le = 2e3, Re =
|
|
886
|
-
let [Me, Ne] = R(!1), [Pe, Re] = R(!1), [ze, q] = R(!1), [J, Be] = R(!1), [Ve, He] = R(void 0), Y = L(null), X = L(null), Z = L(null), Ue =
|
|
891
|
+
}, Le = 2e3, Re = M(({ isOpen: e, isLoading: t = !1, onClose: n, content: r, fileName: a, labels: { ariaLabel: s, closeLabel: c = "Close", resizeLabel: l = "Resize panel", downloadLabel: u = "Download", copyTextLabel: d = "Copy text", copiedTextLabel: f = "Copied!", copyMarkdownLabel: p = "Copy as Markdown", copiedMarkdownLabel: h = "Copied!", copyJsonLabel: _ = "Copy as JSON", copiedJsonLabel: v = "Copied!", visualizerErrorLabel: C, unsupportedLabel: T = "Preview is not supported for this file", loadErrorLabel: E = "Failed to load file", forbiddenErrorLabel: D = "You don't have permission to access this file", htmlFrameBlockedLabel: O = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: ie = "Open in new tab", htmlViewSourceLabel: A = "View source", htmlViewRenderedLabel: j = "View rendered", mcpAppReloadLabel: M = "Reload", pdfThumbnailsLabel: P, pdfShowThumbnailsLabel: se, pdfHideThumbnailsLabel: ce, pdfPageNumberLabel: V, pdfContentLoadingLabel: H, pdfContentErrorLabel: ue, pdfContentRetryLabel: de, xlsxFormulaLabel: fe, codeContentLoadingLabel: me, codeContentErrorLabel: he, codeContentRetryLabel: U, tableCopyLabel: ge, tableCopiedLabel: _e, tableDownloadCsvLabel: ve, ooxmlHighlightsLabel: ye, ooxmlHighlightNavigatedLabel: be }, onDownload: xe, onCopyText: Se, onCopyMarkdown: Ce, onCopyJson: W, tableDownloadFilename: we, isMobile: G = !1, defaultWidth: Te, minWidth: Ee = 600, maxWidth: De = 1500, onResizeStop: Oe, styles: ke, codeBlockTheme: Ae, loadPdf: je, configurePdfWorker: K }) => {
|
|
892
|
+
let [Me, Ne] = R(!1), [Pe, Re] = R(!1), [ze, q] = R(!1), [J, Be] = R(!1), [Ve, He] = R(void 0), Y = L(null), X = L(null), Z = L(null), Ue = N(() => {
|
|
887
893
|
Se?.(), Y.current != null && clearTimeout(Y.current), Ne(!0), Y.current = setTimeout(() => Ne(!1), Le);
|
|
888
|
-
}, [Se]), We =
|
|
894
|
+
}, [Se]), We = N(() => {
|
|
889
895
|
Ce?.(), X.current != null && clearTimeout(X.current), Re(!0), X.current = setTimeout(() => Re(!1), Le);
|
|
890
|
-
}, [Ce]), Ge =
|
|
896
|
+
}, [Ce]), Ge = N(() => {
|
|
891
897
|
W?.(), Z.current != null && clearTimeout(Z.current), q(!0), Z.current = setTimeout(() => q(!1), Le);
|
|
892
898
|
}, [W]);
|
|
893
899
|
F(() => () => {
|
|
894
900
|
Y.current != null && clearTimeout(Y.current), X.current != null && clearTimeout(X.current), Z.current != null && clearTimeout(Z.current);
|
|
895
901
|
}, []);
|
|
896
|
-
let Ke =
|
|
902
|
+
let Ke = N(() => {
|
|
897
903
|
Be((e) => !e);
|
|
898
904
|
}, []);
|
|
899
905
|
F(() => {
|
|
@@ -940,28 +946,28 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
940
946
|
},
|
|
941
947
|
rightActions: Qe || $e || et || tt || nt || rt ? /* @__PURE__ */ B(le, { children: [
|
|
942
948
|
rt && /* @__PURE__ */ z(w, {
|
|
943
|
-
icon: /* @__PURE__ */ z(
|
|
949
|
+
icon: /* @__PURE__ */ z(oe, {
|
|
944
950
|
size: x.LG,
|
|
945
951
|
stroke: S,
|
|
946
952
|
"aria-hidden": !0
|
|
947
953
|
}),
|
|
948
|
-
"aria-label":
|
|
949
|
-
tooltipProps: { tooltip:
|
|
954
|
+
"aria-label": M,
|
|
955
|
+
tooltipProps: { tooltip: M },
|
|
950
956
|
onClick: r.type === i.McpApp ? r.onReload : void 0
|
|
951
957
|
}),
|
|
952
958
|
Qe && /* @__PURE__ */ z(w, {
|
|
953
|
-
icon: z(J ?
|
|
959
|
+
icon: z(J ? re : ee, {
|
|
954
960
|
size: x.LG,
|
|
955
961
|
stroke: S,
|
|
956
962
|
"aria-hidden": !0
|
|
957
963
|
}),
|
|
958
|
-
"aria-label": J ?
|
|
964
|
+
"aria-label": J ? j : A,
|
|
959
965
|
"aria-pressed": J,
|
|
960
|
-
tooltipProps: { tooltip: J ?
|
|
966
|
+
tooltipProps: { tooltip: J ? j : A },
|
|
961
967
|
onClick: Ke
|
|
962
968
|
}),
|
|
963
969
|
$e && /* @__PURE__ */ z(w, {
|
|
964
|
-
icon: z(Me ? k :
|
|
970
|
+
icon: z(Me ? k : te, {
|
|
965
971
|
size: x.LG,
|
|
966
972
|
stroke: S,
|
|
967
973
|
"aria-hidden": !0
|
|
@@ -971,7 +977,7 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
971
977
|
onClick: Ue
|
|
972
978
|
}),
|
|
973
979
|
et && /* @__PURE__ */ z(w, {
|
|
974
|
-
icon: z(Pe ? k :
|
|
980
|
+
icon: z(Pe ? k : ae, {
|
|
975
981
|
size: x.LG,
|
|
976
982
|
stroke: S,
|
|
977
983
|
"aria-hidden": !0
|
|
@@ -981,7 +987,7 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
981
987
|
onClick: We
|
|
982
988
|
}),
|
|
983
989
|
tt && /* @__PURE__ */ z(w, {
|
|
984
|
-
icon: z(ze ? k :
|
|
990
|
+
icon: z(ze ? k : te, {
|
|
985
991
|
size: x.LG,
|
|
986
992
|
stroke: S,
|
|
987
993
|
"aria-hidden": !0
|
|
@@ -991,7 +997,7 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
991
997
|
onClick: Ge
|
|
992
998
|
}),
|
|
993
999
|
nt && /* @__PURE__ */ z(w, {
|
|
994
|
-
icon: /* @__PURE__ */ z(
|
|
1000
|
+
icon: /* @__PURE__ */ z(ne, {
|
|
995
1001
|
size: x.LG,
|
|
996
1002
|
stroke: S
|
|
997
1003
|
}),
|
|
@@ -1012,8 +1018,8 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
1012
1018
|
forbiddenErrorLabel: D,
|
|
1013
1019
|
visualizerErrorLabel: C,
|
|
1014
1020
|
htmlFrameBlockedLabel: O,
|
|
1015
|
-
htmlOpenInNewTabLabel:
|
|
1016
|
-
pdfThumbnailsLabel:
|
|
1021
|
+
htmlOpenInNewTabLabel: ie,
|
|
1022
|
+
pdfThumbnailsLabel: P,
|
|
1017
1023
|
pdfShowThumbnailsLabel: se,
|
|
1018
1024
|
pdfHideThumbnailsLabel: ce,
|
|
1019
1025
|
pdfPageNumberLabel: V,
|
|
@@ -1140,14 +1146,14 @@ var pe = { panel: "dial-attachment-canvas-panel" }, me = {
|
|
|
1140
1146
|
}, Xe = {
|
|
1141
1147
|
type: i.PlainText,
|
|
1142
1148
|
text: ""
|
|
1143
|
-
}, Ze =
|
|
1149
|
+
}, Ze = A(void 0);
|
|
1144
1150
|
Ze.displayName = "AttachmentCanvasContext";
|
|
1145
1151
|
var Qe = ({ children: e }) => {
|
|
1146
|
-
let [t, n] = R(!1), [r, i] = R(!1), [a, o] = R(Xe), [s, c] = R(void 0), [l, u] = R(void 0), d =
|
|
1152
|
+
let [t, n] = R(!1), [r, i] = R(!1), [a, o] = R(Xe), [s, c] = R(void 0), [l, u] = R(void 0), d = N((e, t) => {
|
|
1147
1153
|
c(e), u(t), i(!0), n(!0);
|
|
1148
|
-
}, []), f =
|
|
1154
|
+
}, []), f = N((e, t, r) => {
|
|
1149
1155
|
o(e), c(t), u(r), i(!1), n(!0);
|
|
1150
|
-
}, []), p =
|
|
1156
|
+
}, []), p = N(() => {
|
|
1151
1157
|
o(Xe), n(!1), i(!1), u(void 0);
|
|
1152
1158
|
}, []);
|
|
1153
1159
|
return F(() => () => {
|
|
@@ -1176,17 +1182,17 @@ var Qe = ({ children: e }) => {
|
|
|
1176
1182
|
children: e
|
|
1177
1183
|
});
|
|
1178
1184
|
}, $e = () => {
|
|
1179
|
-
let e =
|
|
1185
|
+
let e = P(Ze);
|
|
1180
1186
|
if (!e) throw Error("useAttachmentCanvas must be used within an AttachmentCanvasProvider");
|
|
1181
1187
|
return e;
|
|
1182
|
-
}, et =
|
|
1183
|
-
let { ariaLabel: l = "Attachment preview", closeLabel: u = "Close", downloadLabel: d = "Download", unsupportedLabel: f = "Preview is not supported for this file", loadErrorLabel: p = "Failed to load file", forbiddenErrorLabel: m = "You don't have permission to access this file", copyTextLabel: g, copiedTextLabel: _, copyMarkdownLabel: v, copiedMarkdownLabel: y, copyJsonLabel: b, copiedJsonLabel: x, htmlFrameBlockedLabel: S, htmlOpenInNewTabLabel: C, htmlViewSourceLabel: w, htmlViewRenderedLabel: T, pdfThumbnailsLabel: E, pdfShowThumbnailsLabel: D, pdfHideThumbnailsLabel: O, pdfPageNumberLabel: k, pdfContentLoadingLabel: ee, pdfContentErrorLabel:
|
|
1188
|
+
}, et = M(({ labels: e, isMobile: t = !1, defaultWidth: n, maxWidth: r, codeBlockTheme: o, tableDownloadFilename: s, configurePdfWorker: c }) => {
|
|
1189
|
+
let { ariaLabel: l = "Attachment preview", closeLabel: u = "Close", downloadLabel: d = "Download", unsupportedLabel: f = "Preview is not supported for this file", loadErrorLabel: p = "Failed to load file", forbiddenErrorLabel: m = "You don't have permission to access this file", copyTextLabel: g, copiedTextLabel: _, copyMarkdownLabel: v, copiedMarkdownLabel: y, copyJsonLabel: b, copiedJsonLabel: x, htmlFrameBlockedLabel: S, htmlOpenInNewTabLabel: C, htmlViewSourceLabel: w, htmlViewRenderedLabel: T, pdfThumbnailsLabel: E, pdfShowThumbnailsLabel: D, pdfHideThumbnailsLabel: O, pdfPageNumberLabel: k, pdfContentLoadingLabel: ee, pdfContentErrorLabel: te, pdfContentRetryLabel: ne, xlsxFormulaLabel: re, codeContentLoadingLabel: ie, codeContentErrorLabel: ae, codeContentRetryLabel: oe, tableCopyLabel: A, tableCopiedLabel: j, tableDownloadCsvLabel: M, ooxmlHighlightsLabel: P, ooxmlHighlightNavigatedLabel: F } = e ?? {}, { isOpen: I, isLoading: L, content: R, fileName: se, closeCanvas: ce } = $e(), le = N(() => {
|
|
1184
1190
|
a(R, se);
|
|
1185
|
-
}, [R, se]), B =
|
|
1191
|
+
}, [R, se]), B = N(() => {
|
|
1186
1192
|
(R.type === i.PlainText || R.type === i.Code) && h(R.text);
|
|
1187
|
-
}, [R]), V =
|
|
1193
|
+
}, [R]), V = N(() => {
|
|
1188
1194
|
R.type === i.Markdown && h(R.text);
|
|
1189
|
-
}, [R]), H =
|
|
1195
|
+
}, [R]), H = N(() => {
|
|
1190
1196
|
R.type === i.Json && h(JSON.stringify(R.value, null, 2));
|
|
1191
1197
|
}, [R]);
|
|
1192
1198
|
return /* @__PURE__ */ z(Re, {
|
|
@@ -1217,16 +1223,16 @@ var Qe = ({ children: e }) => {
|
|
|
1217
1223
|
pdfHideThumbnailsLabel: O,
|
|
1218
1224
|
pdfPageNumberLabel: k,
|
|
1219
1225
|
pdfContentLoadingLabel: ee,
|
|
1220
|
-
pdfContentErrorLabel:
|
|
1221
|
-
pdfContentRetryLabel:
|
|
1222
|
-
xlsxFormulaLabel:
|
|
1223
|
-
codeContentLoadingLabel:
|
|
1224
|
-
codeContentErrorLabel:
|
|
1225
|
-
codeContentRetryLabel:
|
|
1226
|
-
tableCopyLabel:
|
|
1227
|
-
tableCopiedLabel:
|
|
1228
|
-
tableDownloadCsvLabel:
|
|
1229
|
-
ooxmlHighlightsLabel:
|
|
1226
|
+
pdfContentErrorLabel: te,
|
|
1227
|
+
pdfContentRetryLabel: ne,
|
|
1228
|
+
xlsxFormulaLabel: re,
|
|
1229
|
+
codeContentLoadingLabel: ie,
|
|
1230
|
+
codeContentErrorLabel: ae,
|
|
1231
|
+
codeContentRetryLabel: oe,
|
|
1232
|
+
tableCopyLabel: A,
|
|
1233
|
+
tableCopiedLabel: j,
|
|
1234
|
+
tableDownloadCsvLabel: M,
|
|
1235
|
+
ooxmlHighlightsLabel: P,
|
|
1230
1236
|
ooxmlHighlightNavigatedLabel: F
|
|
1231
1237
|
},
|
|
1232
1238
|
onDownload: le,
|
|
@@ -1244,7 +1250,7 @@ var Qe = ({ children: e }) => {
|
|
|
1244
1250
|
frame: "_frame_g47g7_1",
|
|
1245
1251
|
header: "_header_g47g7_6",
|
|
1246
1252
|
title: "_title_g47g7_10"
|
|
1247
|
-
}, nt =
|
|
1253
|
+
}, nt = M(({ content: e, height: t, onExpand: n, expandAriaLabel: r, actionsGroupAriaLabel: i = "Visualizer actions", frameTitle: a, loadingLabel: o, errorLabel: s, titleClassName: c = "dial-small-semi-text", colors: l }) => {
|
|
1248
1254
|
let u = e.visualizerName.trim();
|
|
1249
1255
|
return /* @__PURE__ */ B("div", {
|
|
1250
1256
|
className: g("flex w-full min-w-0 flex-col overflow-hidden rounded-xl border", tt.frame),
|
|
@@ -1315,7 +1321,7 @@ var Qe = ({ children: e }) => {
|
|
|
1315
1321
|
return n;
|
|
1316
1322
|
}
|
|
1317
1323
|
}, ct = (e, t) => {
|
|
1318
|
-
let { openCanvas: n, openCanvasLoading: r, closeCanvas: a } = $e(), { customVisualizers: o, themeId: s, onBeforeOpen: l } = t, u =
|
|
1324
|
+
let { openCanvas: n, openCanvasLoading: r, closeCanvas: a } = $e(), { customVisualizers: o, themeId: s, onBeforeOpen: l } = t, u = N(async (t, n, r) => {
|
|
1319
1325
|
if (t.url == null && t.referenceUrl != null) {
|
|
1320
1326
|
let i = e.resolveReferencePdfContent(t);
|
|
1321
1327
|
if (i != null) return r(i, t.name, n);
|
|
@@ -1369,7 +1375,7 @@ var Qe = ({ children: e }) => {
|
|
|
1369
1375
|
s,
|
|
1370
1376
|
e
|
|
1371
1377
|
]);
|
|
1372
|
-
return { openAttachmentCanvas:
|
|
1378
|
+
return { openAttachmentCanvas: N(async (t, o = t.id, s) => {
|
|
1373
1379
|
let d = () => s == null || s(), f = (e, t, r) => d() ? (n(e, t, r), !0) : (Ye(e), !1);
|
|
1374
1380
|
switch (t.type) {
|
|
1375
1381
|
case c.Image: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-attachment-canvas",
|
|
3
3
|
"description": "Canvas viewer for rendering attachment content — images, PDFs, Office documents, CSV, JSON, markdown, and plain text",
|
|
4
|
-
"version": "1.2.0-dev.
|
|
4
|
+
"version": "1.2.0-dev.81",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
30
30
|
"@modelcontextprotocol/ext-apps": "1.7.5",
|
|
31
31
|
"pdfjs-dist": "^5.4.149",
|
|
32
|
-
"@epam/ai-dial-sidebar": "1.2.0-dev.
|
|
32
|
+
"@epam/ai-dial-sidebar": "1.2.0-dev.81"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@epam/ai-dial-chat-shared": "1.2.0-dev.
|
|
35
|
+
"@epam/ai-dial-chat-shared": "1.2.0-dev.81",
|
|
36
36
|
"@epam/ai-dial-ui-kit": "^0.15.0-dev.9",
|
|
37
37
|
"react": "^19.2.8"
|
|
38
38
|
},
|