@epam/ai-dial-attachment-canvas 1.3.0-dev.252 → 1.3.0-dev.256
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/{LazyContentBoundary-uhIGBROU.js → LazyContentBoundary-rT6s5wBc.js} +13 -12
- package/LazyContentBoundary.css +1 -0
- package/{PdfContent-CNj7_lpl.js → PdfContent-CyCIPzRp.js} +104 -103
- package/components/AttachmentCanvas/AttachmentCanvas.d.ts.map +1 -1
- package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts.map +1 -1
- package/components/CodeContent/CodeContent.d.ts +4 -0
- package/components/CodeContent/CodeContent.d.ts.map +1 -1
- package/components/HtmlContent/HtmlContent.d.ts +2 -0
- package/components/HtmlContent/HtmlContent.d.ts.map +1 -1
- package/components/LazyContentBoundary/LazyContentBoundary.d.ts +3 -0
- package/components/LazyContentBoundary/LazyContentBoundary.d.ts.map +1 -1
- package/components/PdfContent/PdfContent.d.ts +2 -0
- package/components/PdfContent/PdfContent.d.ts.map +1 -1
- package/index.css +2 -2
- package/index.js +392 -377
- package/models/attachment-canvas.d.ts +18 -2
- package/models/attachment-canvas.d.ts.map +1 -1
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -1,83 +1,84 @@
|
|
|
1
1
|
import { a as e, i as t, n, r, t as i } from "./attachment-canvas-BgwyzrRC.js";
|
|
2
|
-
import { i as a, o, t as s } from "./LazyContentBoundary-
|
|
2
|
+
import { i as a, o, t as s } from "./LazyContentBoundary-rT6s5wBc.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, isSyntaxHighlightingAllowed as g, mergeClasses as _, restrainedSyntaxTheme as v, stripUrlQueryAndFragment as y } from "@epam/ai-dial-chat-shared";
|
|
4
4
|
import { SidebarOrientation as b, SidebarPanel as x } from "@epam/ai-dial-sidebar";
|
|
5
5
|
import { DIAL_ICON_SIZE as S, DIAL_KIT_ICON_STROKE as C, ElementSize as w, GhostIconButton as T, LinkButton as E, LiveRegion as D, Spinner as O } from "@epam/ai-dial-ui-kit";
|
|
6
|
-
import { IconAlertTriangle as k, IconArrowsMaximize as A, IconCheck as j, IconCode as
|
|
7
|
-
import { createContext as
|
|
8
|
-
import { JsonView as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { AppBridge as
|
|
11
|
-
import { McpUiHostContextChangedNotificationSchema as
|
|
12
|
-
import { VisualizerConnector as
|
|
6
|
+
import { IconAlertTriangle as k, IconArrowsMaximize as A, IconCheck as j, IconCode as M, IconCopy as ee, IconDownload as te, IconEye as N, IconLock as ne, IconMarkdown as re, IconRefresh as ie } from "@tabler/icons-react";
|
|
7
|
+
import { createContext as P, lazy as F, memo as I, useCallback as L, useContext as ae, useEffect as R, useMemo as z, useRef as B, useState as V } from "react";
|
|
8
|
+
import { JsonView as oe, defaultStyles as se } from "react-json-view-lite";
|
|
9
|
+
import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
10
|
+
import { AppBridge as ce, AppFrame as le } from "@mcp-ui/client";
|
|
11
|
+
import { McpUiHostContextChangedNotificationSchema as G } from "@modelcontextprotocol/ext-apps/app-bridge";
|
|
12
|
+
import { VisualizerConnector as ue, VisualizerConnectorEvents as de, VisualizerConnectorRequests as fe } from "@epam/ai-dial-visualizer-connector";
|
|
13
13
|
//#region src/constants/public-class-names.ts
|
|
14
14
|
var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
15
|
-
container: "
|
|
16
|
-
containerLight: "
|
|
15
|
+
container: "_container_k7ib4_1",
|
|
16
|
+
containerLight: "_containerLight_k7ib4_5"
|
|
17
17
|
}, pe = {
|
|
18
18
|
[l.Dark]: v,
|
|
19
19
|
[l.Light]: v
|
|
20
|
-
}, me = () =>
|
|
20
|
+
}, me = () => F(async () => {
|
|
21
21
|
let { Prism: e } = await import("react-syntax-highlighter");
|
|
22
22
|
return { default: e };
|
|
23
|
-
}), he =
|
|
24
|
-
let { text:
|
|
25
|
-
|
|
26
|
-
}, []),
|
|
27
|
-
className: "
|
|
28
|
-
children:
|
|
23
|
+
}), he = I(({ content: e, codeBlockTheme: t = l.Light, labels: n, codeClassName: r = "dial-code-text", errorLabelClassName: i }) => {
|
|
24
|
+
let { text: a, language: o } = e, c = z(() => g(a), [a]), u = o == null || o === "plaintext" || !c, d = pe[t], f = t === l.Light, [p, m] = V(0), h = z(me, [p]), v = L(() => {
|
|
25
|
+
m((e) => e + 1);
|
|
26
|
+
}, []), y = /* @__PURE__ */ U("pre", {
|
|
27
|
+
className: _(r, "p-4 wrap-break-word whitespace-pre-wrap"),
|
|
28
|
+
children: a
|
|
29
29
|
});
|
|
30
|
-
return /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ U("div", {
|
|
31
31
|
dir: "ltr",
|
|
32
|
-
className: _("h-full overflow-auto", q.container,
|
|
33
|
-
children:
|
|
34
|
-
retryKey:
|
|
35
|
-
onRetry:
|
|
36
|
-
pendingContent:
|
|
37
|
-
errorContent:
|
|
32
|
+
className: _("h-full overflow-auto", q.container, f && q.containerLight),
|
|
33
|
+
children: u ? y : /* @__PURE__ */ U(s, {
|
|
34
|
+
retryKey: p,
|
|
35
|
+
onRetry: v,
|
|
36
|
+
pendingContent: y,
|
|
37
|
+
errorContent: y,
|
|
38
38
|
labels: n,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
errorLabelClassName: i,
|
|
40
|
+
children: /* @__PURE__ */ U(h, {
|
|
41
|
+
language: o,
|
|
42
|
+
style: d,
|
|
42
43
|
customStyle: {
|
|
43
44
|
margin: 0,
|
|
44
45
|
borderRadius: 0,
|
|
45
46
|
background: "transparent",
|
|
46
47
|
padding: "16px"
|
|
47
48
|
},
|
|
48
|
-
className:
|
|
49
|
-
codeTagProps: { className:
|
|
49
|
+
className: r,
|
|
50
|
+
codeTagProps: { className: r },
|
|
50
51
|
wrapLongLines: !0,
|
|
51
|
-
children:
|
|
52
|
+
children: a
|
|
52
53
|
})
|
|
53
54
|
})
|
|
54
55
|
});
|
|
55
|
-
}), ge = "dial-html-preview:render", _e = { openInNewTabButton: "_openInNewTabButton_c1arc_1" }, ve =
|
|
56
|
-
let { htmlFrameBlockedLabel:
|
|
56
|
+
}), ge = "dial-html-preview:render", _e = { openInNewTabButton: "_openInNewTabButton_c1arc_1" }, ve = I(({ content: e, labels: t, isSourceView: n, title: r, codeBlockTheme: a, openInNewTabButtonTypographyClassName: o = "dial-body-semi-text", codeClassName: s }) => {
|
|
57
|
+
let { htmlFrameBlockedLabel: c = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: l = "Open in new tab" } = t, [u, d] = V(!0), [f, p] = V(!1), [m, h] = V(void 0), [g, v] = V(!1), [y, b] = V(!1), x = B(null), S = B(null), C = B(!1), w = B({
|
|
57
58
|
content: e,
|
|
58
59
|
generation: 0
|
|
59
60
|
});
|
|
60
|
-
|
|
61
|
+
w.current.content !== e && (w.current = {
|
|
61
62
|
content: e,
|
|
62
|
-
generation:
|
|
63
|
+
generation: w.current.generation + 1
|
|
63
64
|
});
|
|
64
|
-
let
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
let T = w.current.generation;
|
|
66
|
+
R(() => {
|
|
67
|
+
d(!0), p(!1), h(void 0), v(!1), b(!1);
|
|
67
68
|
}, [e]);
|
|
68
|
-
let
|
|
69
|
-
|
|
70
|
-
if (!n || e.srcdoc != null || e.resolveSourceText == null ||
|
|
69
|
+
let D = B(n);
|
|
70
|
+
D.current !== n && (D.current = n, n && y && b(!1), !n && C.current && (C.current = !1, d(!0))), R(() => {
|
|
71
|
+
if (!n || e.srcdoc != null || e.resolveSourceText == null || m != null) return;
|
|
71
72
|
let t = !1, r = e.resolveSourceText;
|
|
72
73
|
return (async () => {
|
|
73
|
-
|
|
74
|
+
v(!0);
|
|
74
75
|
try {
|
|
75
76
|
let e = await r();
|
|
76
|
-
t ||
|
|
77
|
+
t || h(e);
|
|
77
78
|
} catch {
|
|
78
|
-
t ||
|
|
79
|
+
t || b(!0);
|
|
79
80
|
} finally {
|
|
80
|
-
t ||
|
|
81
|
+
t || v(!1);
|
|
81
82
|
}
|
|
82
83
|
})(), () => {
|
|
83
84
|
t = !0;
|
|
@@ -85,68 +86,69 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
85
86
|
}, [
|
|
86
87
|
n,
|
|
87
88
|
e,
|
|
88
|
-
|
|
89
|
+
m
|
|
89
90
|
]);
|
|
90
|
-
let
|
|
91
|
-
if (
|
|
92
|
-
let e =
|
|
93
|
-
e != null && e !==
|
|
91
|
+
let k = e.isSameOriginUrl === !0 && e.url != null, A = !k && e.srcdoc != null, j = A ? e.srcdocHostUrl : void 0, M = e.srcdoc, ee = L((e) => {
|
|
92
|
+
if (d(!1), j != null) {
|
|
93
|
+
let e = x.current?.contentWindow;
|
|
94
|
+
e != null && e !== S.current && M != null && (S.current = e, e.postMessage({
|
|
94
95
|
type: ge,
|
|
95
|
-
html:
|
|
96
|
+
html: M
|
|
96
97
|
}, "*"));
|
|
97
|
-
} else if (!(
|
|
98
|
-
|
|
98
|
+
} else if (!(A || k)) try {
|
|
99
|
+
x.current?.contentDocument ?? p(!0);
|
|
99
100
|
} catch {
|
|
100
|
-
|
|
101
|
+
p(!0);
|
|
101
102
|
}
|
|
102
103
|
}, [
|
|
103
|
-
k,
|
|
104
|
-
D,
|
|
105
104
|
A,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
k,
|
|
106
|
+
j,
|
|
107
|
+
M
|
|
108
|
+
]), te = L(() => {
|
|
109
|
+
d(!1), p(!0);
|
|
110
|
+
}, []), N = e.srcdoc ?? m, ne = e.srcdoc != null || e.resolveSourceText != null, re = e.srcdoc == null && e.resolveSourceText != null && m == null && !y;
|
|
111
|
+
if (n && ne && (N != null || g || re)) return C.current = !0, N == null ? /* @__PURE__ */ U("div", {
|
|
111
112
|
className: "flex h-full items-center justify-center",
|
|
112
|
-
children: /* @__PURE__ */
|
|
113
|
-
}) : /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ U(O, {})
|
|
114
|
+
}) : /* @__PURE__ */ U(he, {
|
|
114
115
|
content: {
|
|
115
116
|
type: i.Code,
|
|
116
|
-
text:
|
|
117
|
+
text: N,
|
|
117
118
|
language: "html"
|
|
118
119
|
},
|
|
119
|
-
codeBlockTheme: a
|
|
120
|
+
codeBlockTheme: a,
|
|
121
|
+
codeClassName: s
|
|
120
122
|
});
|
|
121
|
-
if (
|
|
123
|
+
if (f) return /* @__PURE__ */ W("div", {
|
|
122
124
|
className: "flex h-full flex-col items-center justify-center gap-3 p-4",
|
|
123
|
-
children: [/* @__PURE__ */
|
|
125
|
+
children: [/* @__PURE__ */ U("p", {
|
|
124
126
|
className: "text-center",
|
|
125
|
-
children:
|
|
126
|
-
}), e.url != null && /* @__PURE__ */
|
|
127
|
+
children: c
|
|
128
|
+
}), e.url != null && /* @__PURE__ */ U(E, {
|
|
127
129
|
href: e.url,
|
|
128
130
|
target: "_blank",
|
|
129
|
-
label:
|
|
131
|
+
label: l,
|
|
130
132
|
className: _e.openInNewTabButton,
|
|
131
133
|
textClassName: o
|
|
132
134
|
})]
|
|
133
135
|
});
|
|
134
|
-
let ie =
|
|
135
|
-
return /* @__PURE__ */
|
|
136
|
+
let ie = A ? j : e.url, P = A && j == null ? e.srcdoc : void 0;
|
|
137
|
+
return /* @__PURE__ */ W("div", {
|
|
136
138
|
className: "relative h-full",
|
|
137
|
-
children: [
|
|
139
|
+
children: [u && /* @__PURE__ */ U("div", {
|
|
138
140
|
className: "absolute inset-0 flex items-center justify-center",
|
|
139
|
-
children: /* @__PURE__ */
|
|
140
|
-
}), /* @__PURE__ */
|
|
141
|
-
ref:
|
|
141
|
+
children: /* @__PURE__ */ U(O, {})
|
|
142
|
+
}), /* @__PURE__ */ U("iframe", {
|
|
143
|
+
ref: x,
|
|
142
144
|
title: r,
|
|
143
145
|
src: ie,
|
|
144
|
-
srcDoc:
|
|
145
|
-
sandbox:
|
|
146
|
-
className: _("h-full w-full border-none",
|
|
146
|
+
srcDoc: P,
|
|
147
|
+
sandbox: A || k ? "allow-scripts" : "allow-scripts allow-same-origin",
|
|
148
|
+
className: _("h-full w-full border-none", u ? "invisible" : ""),
|
|
147
149
|
onLoad: ee,
|
|
148
150
|
onError: te
|
|
149
|
-
},
|
|
151
|
+
}, T)]
|
|
150
152
|
});
|
|
151
153
|
}), ye = {
|
|
152
154
|
name: "MCP-UI Host",
|
|
@@ -173,12 +175,12 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
173
175
|
let r = t;
|
|
174
176
|
r != null && (r.width != null && (e.style.width = `${r.width}px`), r.maxWidth != null && (e.style.maxWidth = `${r.maxWidth}px`), r.height != null && (e.style.height = `${r.height}px`), r.maxHeight != null && (e.style.maxHeight = `${r.maxHeight}px`));
|
|
175
177
|
}, Ce = (e, t, n) => {
|
|
176
|
-
let r =
|
|
177
|
-
|
|
178
|
+
let r = B(e);
|
|
179
|
+
R(() => {
|
|
178
180
|
r.current = e;
|
|
179
181
|
});
|
|
180
|
-
let [i, a] =
|
|
181
|
-
return
|
|
182
|
+
let [i, a] = V(null), [o, s] = V(!1);
|
|
183
|
+
return R(() => {
|
|
182
184
|
let e = null;
|
|
183
185
|
try {
|
|
184
186
|
let n = t.current?.getBoundingClientRect(), i = n != null && n.width > 0 && n.height > 0 ? {
|
|
@@ -188,13 +190,13 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
188
190
|
height: Math.round(n.height)
|
|
189
191
|
}
|
|
190
192
|
} : r.current.hostContext;
|
|
191
|
-
e = new
|
|
193
|
+
e = new ce(null, r.current.hostInfo ?? ye, be, { hostContext: i }), e.onopenlink = async ({ url: e }) => {
|
|
192
194
|
let t = r.current.onOpenLink;
|
|
193
195
|
return (t == null ? xe(e) : t(e)) === !1 ? { isError: !0 } : {};
|
|
194
196
|
}, e.onrequestdisplaymode = async ({ mode: e }) => {
|
|
195
197
|
let t = r.current.onRequestDisplayMode, n = r.current.hostContext?.displayMode ?? "inline";
|
|
196
198
|
return { mode: t?.(e) ?? n };
|
|
197
|
-
}, e.oncalltool = (e) => r.current.onToolCall(e.name, e.arguments), e.setNotificationHandler(
|
|
199
|
+
}, e.oncalltool = (e) => r.current.onToolCall(e.name, e.arguments), e.setNotificationHandler(G, ({ params: e }) => {
|
|
198
200
|
let n = t.current?.querySelector("iframe");
|
|
199
201
|
n != null && Se(n, e.containerDimensions, r.current.hostContext?.displayMode === "fullscreen");
|
|
200
202
|
}), a(e);
|
|
@@ -204,22 +206,22 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
204
206
|
return () => {
|
|
205
207
|
e?.close().catch((e) => console.error("[useMcpAppBridge] Error closing AppBridge:", e));
|
|
206
208
|
};
|
|
207
|
-
}, [t]),
|
|
209
|
+
}, [t]), R(() => {
|
|
208
210
|
i != null && i.transport != null && n != null && i.setHostContext(n);
|
|
209
211
|
}, [i, n]), {
|
|
210
212
|
appBridge: i,
|
|
211
213
|
hasFailed: o
|
|
212
214
|
};
|
|
213
215
|
}, J = {
|
|
214
|
-
loadingOverlay: "
|
|
215
|
-
fullscreenFrame: "
|
|
216
|
-
loadingFrame: "
|
|
217
|
-
statusLabel: "
|
|
218
|
-
statusDetail: "
|
|
219
|
-
errorIcon: "
|
|
216
|
+
loadingOverlay: "_loadingOverlay_1kink_2",
|
|
217
|
+
fullscreenFrame: "_fullscreenFrame_1kink_21",
|
|
218
|
+
loadingFrame: "_loadingFrame_1kink_29",
|
|
219
|
+
statusLabel: "_statusLabel_1kink_33",
|
|
220
|
+
statusDetail: "_statusDetail_1kink_38",
|
|
221
|
+
errorIcon: "_errorIcon_1kink_42"
|
|
220
222
|
}, we = ({ content: e, errorLabel: t = "Failed to load app", onAppInfo: n }) => {
|
|
221
|
-
let [r, i] =
|
|
222
|
-
|
|
223
|
+
let [r, i] = V("loading"), [a, o] = V(), { html: s, sandboxUrl: c, toolInput: l, toolResult: u, hostContext: d } = e, f = z(() => ({ url: new URL(c) }), [c]), p = d?.displayMode === "fullscreen", m = B(null), [h, g] = V();
|
|
224
|
+
R(() => {
|
|
223
225
|
let e = m.current;
|
|
224
226
|
if (!e) return;
|
|
225
227
|
let t = new ResizeObserver(([e]) => {
|
|
@@ -232,15 +234,15 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
232
234
|
});
|
|
233
235
|
return t.observe(e), () => t.disconnect();
|
|
234
236
|
}, []);
|
|
235
|
-
let { appBridge: v, hasFailed: y } = Ce(e, m,
|
|
237
|
+
let { appBridge: v, hasFailed: y } = Ce(e, m, z(() => d == null || h == null ? d : {
|
|
236
238
|
...d,
|
|
237
239
|
containerDimensions: h
|
|
238
240
|
}, [d, h])), b = y || r === "error";
|
|
239
|
-
return /* @__PURE__ */
|
|
241
|
+
return /* @__PURE__ */ W("div", {
|
|
240
242
|
ref: m,
|
|
241
243
|
className: _("relative h-full w-full", b ? "min-h-[160px]" : "min-h-[100px]", p && J.fullscreenFrame, !p && r === "loading" && J.loadingFrame),
|
|
242
244
|
children: [
|
|
243
|
-
v != null && !b && /* @__PURE__ */
|
|
245
|
+
v != null && !b && /* @__PURE__ */ U(le, {
|
|
244
246
|
html: s,
|
|
245
247
|
sandbox: f,
|
|
246
248
|
appBridge: v,
|
|
@@ -254,21 +256,21 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
254
256
|
o(e.message), i("error");
|
|
255
257
|
}
|
|
256
258
|
}),
|
|
257
|
-
!b && r === "loading" && /* @__PURE__ */
|
|
259
|
+
!b && r === "loading" && /* @__PURE__ */ U("div", {
|
|
258
260
|
className: _("absolute inset-0 flex flex-col items-center justify-center gap-2", J.loadingOverlay),
|
|
259
|
-
children: /* @__PURE__ */
|
|
261
|
+
children: /* @__PURE__ */ U(O, {})
|
|
260
262
|
}),
|
|
261
|
-
b && /* @__PURE__ */
|
|
263
|
+
b && /* @__PURE__ */ W("div", {
|
|
262
264
|
className: "absolute inset-0 flex flex-col items-center justify-center gap-2 p-4",
|
|
263
|
-
children: [/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ U(k, {
|
|
264
266
|
size: 60,
|
|
265
267
|
stroke: C,
|
|
266
268
|
"aria-hidden": !0,
|
|
267
269
|
className: J.errorIcon
|
|
268
|
-
}), /* @__PURE__ */
|
|
270
|
+
}), /* @__PURE__ */ W("p", {
|
|
269
271
|
role: "status",
|
|
270
272
|
className: _("text-center", J.statusLabel),
|
|
271
|
-
children: [t, a && /* @__PURE__ */
|
|
273
|
+
children: [t, a && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("br", {}), /* @__PURE__ */ U("span", {
|
|
272
274
|
className: J.statusDetail,
|
|
273
275
|
children: a
|
|
274
276
|
})] })]
|
|
@@ -277,13 +279,13 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
277
279
|
]
|
|
278
280
|
});
|
|
279
281
|
}, Y = {
|
|
280
|
-
viewer: "
|
|
281
|
-
spreadsheetCanvas: "
|
|
282
|
-
formulaPanel: "
|
|
283
|
-
formulaValue: "
|
|
284
|
-
statusOverlay: "
|
|
285
|
-
errorIcon: "
|
|
286
|
-
highlight: "
|
|
282
|
+
viewer: "_viewer_gdafg_2",
|
|
283
|
+
spreadsheetCanvas: "_spreadsheetCanvas_gdafg_6",
|
|
284
|
+
formulaPanel: "_formulaPanel_gdafg_12",
|
|
285
|
+
formulaValue: "_formulaValue_gdafg_18",
|
|
286
|
+
statusOverlay: "_statusOverlay_gdafg_27",
|
|
287
|
+
errorIcon: "_errorIcon_gdafg_32",
|
|
288
|
+
highlight: "_highlight_gdafg_40"
|
|
287
289
|
}, Te = (e) => {
|
|
288
290
|
if (e?.kind !== "range") return "";
|
|
289
291
|
let { activeCell: t } = e.selection, n = e.cells.find(({ address: e }) => e.row === t.row && e.col === t.col);
|
|
@@ -404,10 +406,10 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
404
406
|
}
|
|
405
407
|
}
|
|
406
408
|
}, Oe = class extends Error {}, ke = ({ content: t, fileName: n, loadErrorLabel: i, formulaLabel: a, formulaLabelClassName: o, formulaValueClassName: s, highlightsLabel: c = "Cited locations", highlightNavigatedLabel: l = "Scrolled to the cited location" }) => {
|
|
407
|
-
let u =
|
|
409
|
+
let u = B(null), [d, f] = V(!0), [p, m] = V(!1), [h, g] = V(""), [v, y] = V([]), [b, x] = V(!1), { highlights: S, selectedHighlightId: w } = t, T = S != null && S.length > 0, E = B(void 0), A = B(S);
|
|
408
410
|
A.current = S;
|
|
409
|
-
let j =
|
|
410
|
-
return
|
|
411
|
+
let j = B(void 0);
|
|
412
|
+
return R(() => {
|
|
411
413
|
let e = u.current;
|
|
412
414
|
if (e == null) return;
|
|
413
415
|
let n, r, i = !1, a, o = () => i;
|
|
@@ -468,9 +470,9 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
468
470
|
t.format,
|
|
469
471
|
t.url,
|
|
470
472
|
T
|
|
471
|
-
]),
|
|
473
|
+
]), R(() => {
|
|
472
474
|
j.current?.();
|
|
473
|
-
}, [S]),
|
|
475
|
+
}, [S]), R(() => {
|
|
474
476
|
x(!1);
|
|
475
477
|
let t = E.current;
|
|
476
478
|
if (t == null || d) return;
|
|
@@ -488,38 +490,38 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
488
490
|
})(), () => {
|
|
489
491
|
r = !0;
|
|
490
492
|
};
|
|
491
|
-
}, [w, d]), /* @__PURE__ */
|
|
493
|
+
}, [w, d]), /* @__PURE__ */ W("div", {
|
|
492
494
|
className: "relative flex h-full w-full min-w-0 flex-col overflow-hidden",
|
|
493
495
|
children: [
|
|
494
|
-
t.format === r.Xlsx && /* @__PURE__ */
|
|
496
|
+
t.format === r.Xlsx && /* @__PURE__ */ W("div", {
|
|
495
497
|
role: "region",
|
|
496
498
|
"aria-label": a,
|
|
497
499
|
className: _("flex min-w-0 shrink-0 items-center gap-2 border-b px-3 py-2", Y.formulaPanel),
|
|
498
|
-
children: [/* @__PURE__ */
|
|
500
|
+
children: [/* @__PURE__ */ U("span", {
|
|
499
501
|
"aria-hidden": "true",
|
|
500
502
|
className: _("shrink-0", o),
|
|
501
503
|
children: "fx"
|
|
502
|
-
}), /* @__PURE__ */
|
|
504
|
+
}), /* @__PURE__ */ U("code", {
|
|
503
505
|
dir: "ltr",
|
|
504
506
|
tabIndex: 0,
|
|
505
507
|
"aria-live": "polite",
|
|
506
|
-
className: _("h-8 min-w-0 flex-1 overflow-x-auto rounded border px-2 py-1 whitespace-nowrap focus-visible:outline
|
|
508
|
+
className: _("h-8 min-w-0 flex-1 overflow-x-auto rounded border px-2 py-1 whitespace-nowrap focus-visible:outline", Y.formulaValue, s),
|
|
507
509
|
children: h
|
|
508
510
|
})]
|
|
509
511
|
}),
|
|
510
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ W("div", {
|
|
511
513
|
className: "relative min-h-0 w-full flex-1",
|
|
512
|
-
children: [/* @__PURE__ */
|
|
514
|
+
children: [/* @__PURE__ */ U("div", {
|
|
513
515
|
ref: u,
|
|
514
516
|
role: "document",
|
|
515
517
|
"aria-label": n,
|
|
516
518
|
"aria-busy": d,
|
|
517
519
|
className: _("h-full w-full overflow-hidden", Y.viewer)
|
|
518
|
-
}), v.length > 0 && /* @__PURE__ */
|
|
520
|
+
}), v.length > 0 && /* @__PURE__ */ U("div", {
|
|
519
521
|
role: "region",
|
|
520
522
|
"aria-label": c,
|
|
521
523
|
className: "pointer-events-none absolute inset-0 overflow-hidden",
|
|
522
|
-
children: v.map((e, t) => /* @__PURE__ */
|
|
524
|
+
children: v.map((e, t) => /* @__PURE__ */ U("div", {
|
|
523
525
|
"aria-hidden": "true",
|
|
524
526
|
style: {
|
|
525
527
|
left: `${e.left}px`,
|
|
@@ -533,22 +535,22 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
533
535
|
}, `${e.highlightId}-${t}`))
|
|
534
536
|
})]
|
|
535
537
|
}),
|
|
536
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ U(D, {
|
|
537
539
|
visuallyHidden: !0,
|
|
538
540
|
children: b ? l : ""
|
|
539
541
|
}),
|
|
540
|
-
(d || p) && /* @__PURE__ */
|
|
542
|
+
(d || p) && /* @__PURE__ */ U("div", {
|
|
541
543
|
role: p ? "alert" : void 0,
|
|
542
544
|
"aria-live": "polite",
|
|
543
545
|
className: _("absolute inset-0 flex items-center justify-center", Y.statusOverlay),
|
|
544
|
-
children: d ? /* @__PURE__ */
|
|
546
|
+
children: d ? /* @__PURE__ */ U(O, { size: 48 }) : /* @__PURE__ */ W("div", {
|
|
545
547
|
className: "flex flex-col items-center gap-2",
|
|
546
|
-
children: [/* @__PURE__ */
|
|
548
|
+
children: [/* @__PURE__ */ U(k, {
|
|
547
549
|
"aria-hidden": "true",
|
|
548
550
|
size: 60,
|
|
549
551
|
stroke: C,
|
|
550
552
|
className: Y.errorIcon
|
|
551
|
-
}), /* @__PURE__ */
|
|
553
|
+
}), /* @__PURE__ */ U("p", {
|
|
552
554
|
className: "text-center",
|
|
553
555
|
children: i
|
|
554
556
|
})]
|
|
@@ -578,14 +580,14 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
578
580
|
statusLabel: "_statusLabel_12637_5",
|
|
579
581
|
errorIcon: "_errorIcon_12637_9"
|
|
580
582
|
}, Ie = ({ content: e, loadingLabel: t, errorLabel: n = "Failed to load visualizer", frameTitle: r, colors: a, onSendMessage: o }) => {
|
|
581
|
-
let s =
|
|
583
|
+
let s = B(null), [c, l] = V("loading"), { url: u, visualizerName: d, requestTimeout: f } = e, p = B(e);
|
|
582
584
|
p.current = e;
|
|
583
|
-
let h =
|
|
584
|
-
return h.current = o,
|
|
585
|
+
let h = B(o);
|
|
586
|
+
return h.current = o, R(() => {
|
|
585
587
|
let e = s.current;
|
|
586
588
|
if (!e) return;
|
|
587
589
|
l("loading");
|
|
588
|
-
let t = new
|
|
590
|
+
let t = new ue(e, {
|
|
589
591
|
domain: u,
|
|
590
592
|
visualizerName: d,
|
|
591
593
|
requestTimeout: f
|
|
@@ -620,7 +622,7 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
620
622
|
u,
|
|
621
623
|
d,
|
|
622
624
|
f
|
|
623
|
-
]),
|
|
625
|
+
]), R(() => {
|
|
624
626
|
let e = r ?? d.trim();
|
|
625
627
|
e !== "" && s.current?.querySelector("iframe")?.setAttribute("title", e);
|
|
626
628
|
}, [
|
|
@@ -628,7 +630,7 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
628
630
|
d,
|
|
629
631
|
u,
|
|
630
632
|
f
|
|
631
|
-
]), /* @__PURE__ */
|
|
633
|
+
]), /* @__PURE__ */ W("div", {
|
|
632
634
|
className: "relative h-full w-full",
|
|
633
635
|
style: m({
|
|
634
636
|
"--vs-loading-bg": a?.loadingBackground,
|
|
@@ -636,25 +638,25 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
636
638
|
"--vs-error-icon": a?.errorIcon
|
|
637
639
|
}),
|
|
638
640
|
children: [
|
|
639
|
-
/* @__PURE__ */
|
|
641
|
+
/* @__PURE__ */ U("div", {
|
|
640
642
|
ref: s,
|
|
641
643
|
className: "h-full w-full"
|
|
642
644
|
}),
|
|
643
|
-
c === "loading" && /* @__PURE__ */
|
|
645
|
+
c === "loading" && /* @__PURE__ */ W("div", {
|
|
644
646
|
className: _("absolute inset-0 flex flex-col items-center justify-center gap-2", Fe.loadingOverlay),
|
|
645
|
-
children: [/* @__PURE__ */
|
|
647
|
+
children: [/* @__PURE__ */ U(O, {}), t && /* @__PURE__ */ U("p", {
|
|
646
648
|
className: _("text-center", Fe.statusLabel),
|
|
647
649
|
children: t
|
|
648
650
|
})]
|
|
649
651
|
}),
|
|
650
|
-
c === "error" && /* @__PURE__ */
|
|
652
|
+
c === "error" && /* @__PURE__ */ W("div", {
|
|
651
653
|
className: "absolute inset-0 flex flex-col items-center justify-center gap-2",
|
|
652
|
-
children: [/* @__PURE__ */
|
|
654
|
+
children: [/* @__PURE__ */ U(k, {
|
|
653
655
|
size: 60,
|
|
654
656
|
stroke: C,
|
|
655
657
|
"aria-hidden": !0,
|
|
656
658
|
className: Fe.errorIcon
|
|
657
|
-
}), /* @__PURE__ */
|
|
659
|
+
}), /* @__PURE__ */ U("p", {
|
|
658
660
|
role: "status",
|
|
659
661
|
className: _("text-center", Fe.statusLabel),
|
|
660
662
|
children: n
|
|
@@ -677,41 +679,37 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
677
679
|
jsonExpandIcon: "_jsonExpandIcon_fvnln_54",
|
|
678
680
|
jsonCollapseIcon: "_jsonCollapseIcon_fvnln_67",
|
|
679
681
|
jsonCollapsedContent: "_jsonCollapsedContent_fvnln_84"
|
|
680
|
-
}, Le = () =>
|
|
681
|
-
let [r, i] =
|
|
682
|
-
return
|
|
682
|
+
}, Le = () => F(async () => ({ default: (await import("./PdfContent-CyCIPzRp.js")).PdfContent })), Re = ({ url: e, fileName: t, loadErrorLabel: n }) => {
|
|
683
|
+
let [r, i] = V(!1);
|
|
684
|
+
return R(() => {
|
|
683
685
|
i(!1);
|
|
684
|
-
}, [e]), r ? /* @__PURE__ */
|
|
686
|
+
}, [e]), r ? /* @__PURE__ */ W("div", {
|
|
685
687
|
className: "flex flex-col items-center gap-2",
|
|
686
|
-
children: [/* @__PURE__ */
|
|
688
|
+
children: [/* @__PURE__ */ U(k, {
|
|
687
689
|
size: 60,
|
|
688
690
|
stroke: C,
|
|
689
691
|
className: X.errorIcon
|
|
690
|
-
}), /* @__PURE__ */
|
|
692
|
+
}), /* @__PURE__ */ U("p", {
|
|
691
693
|
className: _("text-center", X.statusLabel),
|
|
692
694
|
children: n
|
|
693
695
|
})]
|
|
694
|
-
}) : /* @__PURE__ */
|
|
696
|
+
}) : /* @__PURE__ */ U("img", {
|
|
695
697
|
src: e,
|
|
696
698
|
alt: t ?? "",
|
|
697
699
|
className: "max-h-full max-w-full object-contain",
|
|
698
700
|
onError: () => i(!0)
|
|
699
701
|
});
|
|
700
|
-
}, ze =
|
|
701
|
-
|
|
702
|
-
i.Code,
|
|
703
|
-
i.Ooxml
|
|
704
|
-
]), Be = F(({ 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: g, pdfShowThumbnailsLabel: v, pdfHideThumbnailsLabel: y, pdfPageNumberLabel: b, pdfContentLoadingLabel: x, pdfContentErrorLabel: S, pdfContentRetryLabel: w, xlsxFormulaLabel: T = "Formula", codeContentLoadingLabel: E, codeContentErrorLabel: D, codeContentRetryLabel: A, tableCopyLabel: j, tableCopiedLabel: ee, tableDownloadCsvLabel: te, codeBlockCopyLabel: M, codeBlockCopiedLabel: ne, codeBlockDownloadLabel: ie, tableScrollRegionAriaLabel: ae, mathScrollRegionAriaLabel: N, ooxmlHighlightsLabel: P, ooxmlHighlightNavigatedLabel: F } = {}, styles: oe, codeBlockTheme: V, tableDownloadFilename: le, loadPdf: ue, hidePdfToolbar: W = !1, configurePdfWorker: G, onAppInfo: de, onVisualizerSendMessage: fe }) => {
|
|
705
|
-
let { colors: K, typography: q, bodyClassName: pe, cssVars: me } = oe ?? {}, [ge, _e] = B(0), ye = R(Le, [ge]), be = I(() => {
|
|
702
|
+
}, ze = I(({ 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: g, pdfShowThumbnailsLabel: v, pdfHideThumbnailsLabel: y, pdfPageNumberLabel: b, pdfContentLoadingLabel: x, pdfContentErrorLabel: S, pdfContentRetryLabel: w, xlsxFormulaLabel: T = "Formula", codeContentLoadingLabel: E, codeContentErrorLabel: D, codeContentRetryLabel: A, tableCopyLabel: j, tableCopiedLabel: M, tableDownloadCsvLabel: ee, codeBlockCopyLabel: te, codeBlockCopiedLabel: N, codeBlockDownloadLabel: re, tableScrollRegionAriaLabel: ie, mathScrollRegionAriaLabel: P, ooxmlHighlightsLabel: F, ooxmlHighlightNavigatedLabel: I } = {}, styles: ae, codeBlockTheme: H, tableDownloadFilename: ce, loadPdf: le, hidePdfToolbar: G = !1, configurePdfWorker: ue, onAppInfo: de, onVisualizerSendMessage: fe }) => {
|
|
703
|
+
let { colors: K, typography: q, bodyClassName: pe, cssVars: me } = ae ?? {}, [ge, _e] = V(0), ye = z(Le, [ge]), be = L(() => {
|
|
706
704
|
_e((e) => e + 1);
|
|
707
|
-
}, []), xe =
|
|
705
|
+
}, []), xe = B(void 0), [Se, Ce] = V(0), J = L((e) => {
|
|
708
706
|
xe.current = e;
|
|
709
707
|
}, []);
|
|
710
|
-
|
|
708
|
+
R(() => {
|
|
711
709
|
let t = xe.current;
|
|
712
710
|
t != null && (xe.current = void 0, e.type === i.Pdf && e.url === t && Ce((e) => e + 1));
|
|
713
711
|
}, [e]);
|
|
714
|
-
let Y = q?.fontClassName != null, Te =
|
|
712
|
+
let Y = q?.fontClassName != null, Te = z(() => ({
|
|
715
713
|
...m({
|
|
716
714
|
"--ac-text": K?.text,
|
|
717
715
|
"--ac-status-text": K?.statusText,
|
|
@@ -736,6 +734,10 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
736
734
|
"--ac-ooxml-highlight-bg": K?.ooxmlHighlightBackground,
|
|
737
735
|
"--ac-json-collapsed-text": K?.jsonCollapsedText,
|
|
738
736
|
"--ac-json-collapsed-bg": K?.jsonCollapsedBackground,
|
|
737
|
+
"--ac-focus-outline": K?.focusOutline,
|
|
738
|
+
"--ac-code-bg": K?.codeBackground,
|
|
739
|
+
"--ac-mcp-app-loading-bg": K?.mcpAppLoadingBackground,
|
|
740
|
+
"--ac-mcp-app-status-text": K?.mcpAppStatusText,
|
|
739
741
|
"--ac-font-family": Y ? void 0 : q?.fontFamily,
|
|
740
742
|
"--ac-font-size": Y ? void 0 : q?.fontSize,
|
|
741
743
|
"--ac-font-weight": Y ? void 0 : q?.fontWeight,
|
|
@@ -743,7 +745,7 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
743
745
|
"--ac-letter-spacing": Y ? void 0 : q?.letterSpacing
|
|
744
746
|
}),
|
|
745
747
|
...me
|
|
746
|
-
}), [
|
|
748
|
+
}), [ae]), Ee = z(() => {
|
|
747
749
|
switch (e.type) {
|
|
748
750
|
case i.Image:
|
|
749
751
|
case i.Audio:
|
|
@@ -761,52 +763,52 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
761
763
|
case i.MarkdownTable: return "flex h-full min-h-0 flex-col overflow-hidden p-4";
|
|
762
764
|
default: return "h-full overflow-auto p-4";
|
|
763
765
|
}
|
|
764
|
-
}, [e.type]), De =
|
|
766
|
+
}, [e.type]), De = z(() => {
|
|
765
767
|
switch (e.type) {
|
|
766
|
-
case i.PlainText: return /* @__PURE__ */
|
|
767
|
-
className: _("break-
|
|
768
|
+
case i.PlainText: return /* @__PURE__ */ U("pre", {
|
|
769
|
+
className: _("wrap-break-word whitespace-pre-wrap", X.body, q?.fontClassName),
|
|
768
770
|
children: e.text
|
|
769
771
|
});
|
|
770
|
-
case i.Image: return /* @__PURE__ */
|
|
772
|
+
case i.Image: return /* @__PURE__ */ U(Re, {
|
|
771
773
|
url: e.url,
|
|
772
774
|
fileName: r,
|
|
773
775
|
loadErrorLabel: c
|
|
774
776
|
});
|
|
775
|
-
case i.Audio: return /* @__PURE__ */
|
|
777
|
+
case i.Audio: return /* @__PURE__ */ U("audio", {
|
|
776
778
|
controls: !0,
|
|
777
779
|
controlsList: "nodownload",
|
|
778
780
|
src: e.url,
|
|
779
781
|
"aria-label": r ?? "Audio attachment",
|
|
780
782
|
className: "w-full max-w-sm",
|
|
781
783
|
preload: "metadata",
|
|
782
|
-
children: e.mimeType && /* @__PURE__ */
|
|
784
|
+
children: e.mimeType && /* @__PURE__ */ U("source", {
|
|
783
785
|
src: e.url,
|
|
784
786
|
type: e.mimeType
|
|
785
787
|
})
|
|
786
788
|
});
|
|
787
|
-
case i.Markdown: return /* @__PURE__ */
|
|
789
|
+
case i.Markdown: return /* @__PURE__ */ U("div", {
|
|
788
790
|
className: "p-4",
|
|
789
|
-
children: /* @__PURE__ */
|
|
791
|
+
children: /* @__PURE__ */ U(p, {
|
|
790
792
|
content: e.text,
|
|
791
793
|
isStreaming: !1,
|
|
792
|
-
codeBlockTheme:
|
|
793
|
-
codeBlockCopyLabel:
|
|
794
|
-
codeBlockCopiedLabel:
|
|
795
|
-
codeBlockDownloadLabel:
|
|
796
|
-
tableScrollRegionAriaLabel:
|
|
797
|
-
mathScrollRegionAriaLabel:
|
|
794
|
+
codeBlockTheme: H,
|
|
795
|
+
codeBlockCopyLabel: te,
|
|
796
|
+
codeBlockCopiedLabel: N,
|
|
797
|
+
codeBlockDownloadLabel: re,
|
|
798
|
+
tableScrollRegionAriaLabel: ie,
|
|
799
|
+
mathScrollRegionAriaLabel: P,
|
|
798
800
|
classNames: u
|
|
799
801
|
})
|
|
800
802
|
});
|
|
801
|
-
case i.MarkdownTable: return /* @__PURE__ */
|
|
803
|
+
case i.MarkdownTable: return /* @__PURE__ */ U(p, {
|
|
802
804
|
content: e.text,
|
|
803
805
|
isStreaming: !1,
|
|
804
|
-
codeBlockTheme:
|
|
805
|
-
codeBlockCopyLabel:
|
|
806
|
-
codeBlockCopiedLabel:
|
|
807
|
-
codeBlockDownloadLabel:
|
|
808
|
-
tableScrollRegionAriaLabel:
|
|
809
|
-
mathScrollRegionAriaLabel:
|
|
806
|
+
codeBlockTheme: H,
|
|
807
|
+
codeBlockCopyLabel: te,
|
|
808
|
+
codeBlockCopiedLabel: N,
|
|
809
|
+
codeBlockDownloadLabel: re,
|
|
810
|
+
tableScrollRegionAriaLabel: ie,
|
|
811
|
+
mathScrollRegionAriaLabel: P,
|
|
810
812
|
containerClassName: "flex h-full min-h-0 flex-col",
|
|
811
813
|
classNames: {
|
|
812
814
|
...u,
|
|
@@ -815,23 +817,23 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
815
817
|
},
|
|
816
818
|
tableActionLabels: {
|
|
817
819
|
copyLabel: j,
|
|
818
|
-
copiedLabel:
|
|
819
|
-
downloadCsvLabel:
|
|
820
|
+
copiedLabel: M,
|
|
821
|
+
downloadCsvLabel: ee
|
|
820
822
|
},
|
|
821
|
-
tableDownloadFilename:
|
|
823
|
+
tableDownloadFilename: ce
|
|
822
824
|
});
|
|
823
825
|
case i.Json: {
|
|
824
826
|
let t = q?.jsonLabelClassName ?? (q?.jsonClassName ? void 0 : "dial-code-semi-text");
|
|
825
|
-
return /* @__PURE__ */
|
|
827
|
+
return /* @__PURE__ */ U("div", {
|
|
826
828
|
dir: "ltr",
|
|
827
829
|
className: "h-full overflow-auto",
|
|
828
|
-
children: /* @__PURE__ */
|
|
830
|
+
children: /* @__PURE__ */ U("div", {
|
|
829
831
|
className: _("m-3 overflow-auto rounded-md border", X.jsonWrapper),
|
|
830
|
-
children: /* @__PURE__ */
|
|
832
|
+
children: /* @__PURE__ */ U(oe, {
|
|
831
833
|
data: e.value,
|
|
832
834
|
style: {
|
|
833
|
-
container: _("whitespace-pre-wrap break-
|
|
834
|
-
basicChildStyle:
|
|
835
|
+
container: _("whitespace-pre-wrap wrap-break-word p-2", q?.jsonClassName ?? "dial-code-text"),
|
|
836
|
+
basicChildStyle: se.basicChildStyle,
|
|
835
837
|
childFieldsContainer: "m-0 ps-3",
|
|
836
838
|
label: _("me-1", t, X.jsonLabel),
|
|
837
839
|
clickableLabel: _("me-1 cursor-pointer hover:underline", t, X.jsonClickableLabel),
|
|
@@ -844,22 +846,24 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
844
846
|
punctuation: _("me-1", X.jsonPunctuation),
|
|
845
847
|
collapseIcon: _("me-1 cursor-pointer select-none transition-colors", X.jsonCollapseIcon),
|
|
846
848
|
expandIcon: _("me-1 cursor-pointer select-none transition-colors", X.jsonExpandIcon),
|
|
847
|
-
collapsedContent: _("dial-caption-text me-1 cursor-pointer rounded px-1", X.jsonCollapsedContent)
|
|
849
|
+
collapsedContent: _(q?.jsonCollapsedClassName ?? "dial-caption-text", "me-1 cursor-pointer rounded px-1", X.jsonCollapsedContent)
|
|
848
850
|
}
|
|
849
851
|
})
|
|
850
852
|
})
|
|
851
853
|
});
|
|
852
854
|
}
|
|
853
|
-
case i.Code: return /* @__PURE__ */
|
|
855
|
+
case i.Code: return /* @__PURE__ */ U(he, {
|
|
854
856
|
content: e,
|
|
855
|
-
codeBlockTheme:
|
|
857
|
+
codeBlockTheme: H,
|
|
858
|
+
codeClassName: q?.codeClassName,
|
|
859
|
+
errorLabelClassName: q?.errorMessageClassName,
|
|
856
860
|
labels: {
|
|
857
861
|
loadingLabel: E,
|
|
858
862
|
errorLabel: D,
|
|
859
863
|
retryLabel: A
|
|
860
864
|
}
|
|
861
865
|
});
|
|
862
|
-
case i.Html: return /* @__PURE__ */
|
|
866
|
+
case i.Html: return /* @__PURE__ */ U(ve, {
|
|
863
867
|
content: e,
|
|
864
868
|
labels: {
|
|
865
869
|
htmlFrameBlockedLabel: f,
|
|
@@ -867,26 +871,29 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
867
871
|
},
|
|
868
872
|
isSourceView: a,
|
|
869
873
|
title: r,
|
|
870
|
-
codeBlockTheme:
|
|
874
|
+
codeBlockTheme: H,
|
|
875
|
+
codeClassName: q?.codeClassName
|
|
871
876
|
});
|
|
872
|
-
case i.Pdf: return /* @__PURE__ */
|
|
877
|
+
case i.Pdf: return /* @__PURE__ */ U(s, {
|
|
873
878
|
retryKey: ge,
|
|
874
879
|
onRetry: be,
|
|
880
|
+
errorLabelClassName: q?.errorMessageClassName,
|
|
875
881
|
labels: {
|
|
876
882
|
loadingLabel: x,
|
|
877
883
|
errorLabel: S,
|
|
878
884
|
retryLabel: w
|
|
879
885
|
},
|
|
880
|
-
children: /* @__PURE__ */
|
|
886
|
+
children: /* @__PURE__ */ U(ye, {
|
|
881
887
|
fileName: r,
|
|
882
888
|
url: e.url,
|
|
883
889
|
highlights: e.highlights ?? [],
|
|
884
890
|
selectedHighlightId: e.selectedHighlightId,
|
|
885
891
|
selectedPageNumber: e.page,
|
|
886
|
-
loadPdf:
|
|
892
|
+
loadPdf: le,
|
|
887
893
|
onLoadError: J,
|
|
888
|
-
hideHeader:
|
|
889
|
-
configurePdfWorker:
|
|
894
|
+
hideHeader: G,
|
|
895
|
+
configurePdfWorker: ue,
|
|
896
|
+
errorLabelClassName: q?.errorMessageClassName,
|
|
890
897
|
labels: {
|
|
891
898
|
thumbnailsLabel: g,
|
|
892
899
|
showThumbnailsLabel: v,
|
|
@@ -898,39 +905,39 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
898
905
|
}
|
|
899
906
|
})
|
|
900
907
|
}, `${e.url}#${Se}`);
|
|
901
|
-
case i.Ooxml: return /* @__PURE__ */
|
|
908
|
+
case i.Ooxml: return /* @__PURE__ */ U(ke, {
|
|
902
909
|
content: e,
|
|
903
910
|
fileName: r,
|
|
904
911
|
loadErrorLabel: c,
|
|
905
912
|
formulaLabel: T,
|
|
906
913
|
formulaLabelClassName: q?.xlsxFormulaLabelClassName ?? "dial-italic-text",
|
|
907
914
|
formulaValueClassName: q?.xlsxFormulaValueClassName ?? "dial-code-text",
|
|
908
|
-
highlightsLabel:
|
|
909
|
-
highlightNavigatedLabel:
|
|
915
|
+
highlightsLabel: F,
|
|
916
|
+
highlightNavigatedLabel: I
|
|
910
917
|
});
|
|
911
918
|
case i.Visualizer:
|
|
912
|
-
case i.GroupedVisualizer: return /* @__PURE__ */
|
|
919
|
+
case i.GroupedVisualizer: return /* @__PURE__ */ U(Ie, {
|
|
913
920
|
content: e,
|
|
914
921
|
errorLabel: d,
|
|
915
922
|
onSendMessage: fe
|
|
916
923
|
});
|
|
917
|
-
case i.McpApp: return /* @__PURE__ */
|
|
924
|
+
case i.McpApp: return /* @__PURE__ */ U(we, {
|
|
918
925
|
content: e,
|
|
919
926
|
onAppInfo: de
|
|
920
927
|
});
|
|
921
|
-
case i.Unsupported: return /* @__PURE__ */
|
|
928
|
+
case i.Unsupported: return /* @__PURE__ */ U("p", {
|
|
922
929
|
className: _("text-center", X.statusLabel),
|
|
923
930
|
children: o
|
|
924
931
|
});
|
|
925
932
|
case i.Error: {
|
|
926
933
|
let t = e.errorType === n.Forbidden;
|
|
927
|
-
return /* @__PURE__ */
|
|
934
|
+
return /* @__PURE__ */ W("div", {
|
|
928
935
|
className: "flex flex-col items-center gap-2",
|
|
929
|
-
children: [
|
|
936
|
+
children: [U(t ? ne : k, {
|
|
930
937
|
size: 60,
|
|
931
938
|
stroke: C,
|
|
932
939
|
className: X.errorIcon
|
|
933
|
-
}), /* @__PURE__ */
|
|
940
|
+
}), /* @__PURE__ */ U("p", {
|
|
934
941
|
className: _("text-center", X.statusLabel),
|
|
935
942
|
children: t ? l : c
|
|
936
943
|
})]
|
|
@@ -944,8 +951,11 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
944
951
|
q?.jsonLabelClassName,
|
|
945
952
|
q?.xlsxFormulaLabelClassName,
|
|
946
953
|
q?.xlsxFormulaValueClassName,
|
|
954
|
+
q?.codeClassName,
|
|
955
|
+
q?.jsonCollapsedClassName,
|
|
956
|
+
q?.errorMessageClassName,
|
|
947
957
|
r,
|
|
948
|
-
|
|
958
|
+
H,
|
|
949
959
|
o,
|
|
950
960
|
c,
|
|
951
961
|
l,
|
|
@@ -954,10 +964,10 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
954
964
|
f,
|
|
955
965
|
h,
|
|
956
966
|
a,
|
|
967
|
+
ce,
|
|
957
968
|
le,
|
|
958
|
-
ue,
|
|
959
|
-
W,
|
|
960
969
|
G,
|
|
970
|
+
ue,
|
|
961
971
|
de,
|
|
962
972
|
g,
|
|
963
973
|
v,
|
|
@@ -976,60 +986,61 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
976
986
|
Se,
|
|
977
987
|
J,
|
|
978
988
|
j,
|
|
989
|
+
M,
|
|
979
990
|
ee,
|
|
980
991
|
te,
|
|
981
|
-
M,
|
|
982
|
-
ne,
|
|
983
|
-
ie,
|
|
984
|
-
ae,
|
|
985
992
|
N,
|
|
993
|
+
re,
|
|
994
|
+
ie,
|
|
986
995
|
P,
|
|
987
|
-
F
|
|
996
|
+
F,
|
|
997
|
+
I
|
|
988
998
|
]);
|
|
989
|
-
return /* @__PURE__ */
|
|
990
|
-
style:
|
|
999
|
+
return /* @__PURE__ */ U("div", {
|
|
1000
|
+
style: t ? void 0 : Te,
|
|
991
1001
|
className: _(t ? "flex h-full items-center justify-center" : Ee, pe),
|
|
992
|
-
children: t ? /* @__PURE__ */
|
|
1002
|
+
children: t ? /* @__PURE__ */ U(O, {}) : De
|
|
993
1003
|
});
|
|
994
|
-
}),
|
|
995
|
-
mcpAppDivider: "
|
|
996
|
-
mcpAppVersion: "
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
+
}), Be = {
|
|
1005
|
+
mcpAppDivider: "_mcpAppDivider_1gxed_1",
|
|
1006
|
+
mcpAppVersion: "_mcpAppVersion_1gxed_5",
|
|
1007
|
+
panelHeader: "_panelHeader_1gxed_9"
|
|
1008
|
+
}, Ve = 2e3, He = I(({ isOpen: e, isLoading: t = !1, onClose: n, content: r, fileName: a, leftActions: s, labels: { ariaLabel: c, closeLabel: l = "Close", resizeLabel: u = "Resize panel", downloadLabel: d = "Download", copyTextLabel: f = "Copy text", copiedTextLabel: p = "Copied!", copyMarkdownLabel: h = "Copy as Markdown", copiedMarkdownLabel: g = "Copied!", copyJsonLabel: v = "Copy as JSON", copiedJsonLabel: y = "Copied!", visualizerErrorLabel: w, unsupportedLabel: E = "Preview is not supported for this file", loadErrorLabel: D = "Failed to load file", forbiddenErrorLabel: O = "You don't have permission to access this file", htmlFrameBlockedLabel: k = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: A = "Open in new tab", htmlViewSourceLabel: ne = "View source", htmlViewRenderedLabel: P = "View rendered", mcpAppReloadLabel: F = "Reload", pdfThumbnailsLabel: I, pdfShowThumbnailsLabel: ae, pdfHideThumbnailsLabel: oe, pdfPageNumberLabel: se, pdfContentLoadingLabel: ce, pdfContentErrorLabel: le, pdfContentRetryLabel: G, xlsxFormulaLabel: ue, codeContentLoadingLabel: de, codeContentErrorLabel: fe, codeContentRetryLabel: q, tableCopyLabel: pe, tableCopiedLabel: me, tableDownloadCsvLabel: he, codeBlockCopyLabel: ge, codeBlockCopiedLabel: _e, codeBlockDownloadLabel: ve, tableScrollRegionAriaLabel: ye, mathScrollRegionAriaLabel: be, ooxmlHighlightsLabel: xe, ooxmlHighlightNavigatedLabel: Se }, onDownload: Ce, onCopyText: J, onCopyMarkdown: we, onCopyJson: Y, tableDownloadFilename: Te, isMobile: Ee = !1, defaultWidth: De, minWidth: Oe = 600, maxWidth: ke = 1500, onResizeStop: Ae, styles: je, codeBlockTheme: Me, loadPdf: Ne, configurePdfWorker: Pe, onVisualizerSendMessage: Fe }) => {
|
|
1009
|
+
let [Ie, X] = V(!1), [Le, Re] = V(!1), [He, Ue] = V(!1), [Z, We] = V(!1), [Ge, Ke] = V(void 0), qe = B(null), Q = B(null), Je = B(null), Ye = L(() => {
|
|
1010
|
+
J?.(), qe.current != null && clearTimeout(qe.current), X(!0), qe.current = setTimeout(() => X(!1), Ve);
|
|
1011
|
+
}, [J]), Xe = L(() => {
|
|
1012
|
+
we?.(), Q.current != null && clearTimeout(Q.current), Re(!0), Q.current = setTimeout(() => Re(!1), Ve);
|
|
1013
|
+
}, [we]), Ze = L(() => {
|
|
1014
|
+
Y?.(), Je.current != null && clearTimeout(Je.current), Ue(!0), Je.current = setTimeout(() => Ue(!1), Ve);
|
|
1004
1015
|
}, [Y]);
|
|
1005
|
-
|
|
1006
|
-
qe.current != null && clearTimeout(qe.current),
|
|
1016
|
+
R(() => () => {
|
|
1017
|
+
qe.current != null && clearTimeout(qe.current), Q.current != null && clearTimeout(Q.current), Je.current != null && clearTimeout(Je.current);
|
|
1007
1018
|
}, []);
|
|
1008
|
-
let Qe =
|
|
1009
|
-
|
|
1019
|
+
let Qe = L(() => {
|
|
1020
|
+
We((e) => !e);
|
|
1010
1021
|
}, []);
|
|
1011
|
-
|
|
1012
|
-
|
|
1022
|
+
R(() => {
|
|
1023
|
+
We(!1), Ke(void 0);
|
|
1013
1024
|
}, [r]);
|
|
1014
|
-
let { className: $e, panelStyles: et
|
|
1025
|
+
let { className: $e, panelStyles: $, ...et } = je ?? {}, { colors: tt, typography: nt } = et, rt = z(() => m({
|
|
1015
1026
|
"--ac-mcp-app-divider": tt?.mcpAppDividerColor,
|
|
1016
1027
|
"--ac-mcp-app-version": tt?.mcpAppVersionColor
|
|
1017
|
-
}), [tt?.mcpAppDividerColor, tt?.mcpAppVersionColor]), it = r.type === i.McpApp && Ge != null ? /* @__PURE__ */
|
|
1028
|
+
}), [tt?.mcpAppDividerColor, tt?.mcpAppVersionColor]), it = r.type === i.McpApp && Ge != null ? /* @__PURE__ */ W("span", {
|
|
1018
1029
|
style: rt,
|
|
1019
1030
|
children: [
|
|
1020
|
-
/* @__PURE__ */
|
|
1021
|
-
/* @__PURE__ */
|
|
1031
|
+
/* @__PURE__ */ U("span", { children: a }),
|
|
1032
|
+
/* @__PURE__ */ U("span", {
|
|
1022
1033
|
"aria-hidden": !0,
|
|
1023
|
-
className: _("mx-1.5 inline-block h-3 w-0 border-s align-middle",
|
|
1034
|
+
className: _("mx-1.5 inline-block h-3 w-0 border-s align-middle", Be.mcpAppDivider)
|
|
1024
1035
|
}),
|
|
1025
|
-
/* @__PURE__ */
|
|
1026
|
-
Ge.version && /* @__PURE__ */
|
|
1027
|
-
className: _("ms-2", nt?.mcpAppVersionClassName ?? "dial-caption-text",
|
|
1036
|
+
/* @__PURE__ */ U("span", { children: Ge.name }),
|
|
1037
|
+
Ge.version && /* @__PURE__ */ U("span", {
|
|
1038
|
+
className: _("ms-2", nt?.mcpAppVersionClassName ?? "dial-caption-text", Be.mcpAppVersion),
|
|
1028
1039
|
children: Ge.version
|
|
1029
1040
|
})
|
|
1030
1041
|
]
|
|
1031
1042
|
}) : a, at = !t && r.type === i.Html && (r.srcdoc != null || r.resolveSourceText != null), ot = !t && J != null && (r.type === i.PlainText || r.type === i.Code), st = !t && we != null && r.type === i.Markdown, ct = !t && Y != null && r.type === i.Json, lt = !t && Ce != null && o(r), ut = !t && r.type === i.McpApp && r.onReload != null;
|
|
1032
|
-
return /* @__PURE__ */
|
|
1043
|
+
return /* @__PURE__ */ U(x, {
|
|
1033
1044
|
isOpen: e,
|
|
1034
1045
|
orientation: b.Right,
|
|
1035
1046
|
title: it,
|
|
@@ -1045,36 +1056,40 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
1045
1056
|
maxWidth: ke,
|
|
1046
1057
|
onResizeStop: Ae,
|
|
1047
1058
|
styles: {
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1059
|
+
...$,
|
|
1060
|
+
cssVars: {
|
|
1061
|
+
...m({ "--ac-header-border": tt?.headerBorder }),
|
|
1062
|
+
...$?.cssVars
|
|
1063
|
+
},
|
|
1064
|
+
titleClassName: $?.titleClassName ?? "dial-h3-text",
|
|
1065
|
+
headerClassName: _("border-b", Be.panelHeader, $?.headerClassName),
|
|
1066
|
+
className: _(e ? "mobile:w-full mobile:max-w-full" : "w-0", $e, $?.className, K.panel)
|
|
1052
1067
|
},
|
|
1053
1068
|
leftActions: s,
|
|
1054
|
-
rightActions: at || ot || st || ct || lt || ut ? /* @__PURE__ */
|
|
1055
|
-
ut && /* @__PURE__ */
|
|
1056
|
-
icon: /* @__PURE__ */
|
|
1069
|
+
rightActions: at || ot || st || ct || lt || ut ? /* @__PURE__ */ W(H, { children: [
|
|
1070
|
+
ut && /* @__PURE__ */ U(T, {
|
|
1071
|
+
icon: /* @__PURE__ */ U(ie, {
|
|
1057
1072
|
size: S.LG,
|
|
1058
1073
|
stroke: C,
|
|
1059
1074
|
"aria-hidden": !0
|
|
1060
1075
|
}),
|
|
1061
|
-
"aria-label":
|
|
1062
|
-
tooltipProps: { tooltip:
|
|
1076
|
+
"aria-label": F,
|
|
1077
|
+
tooltipProps: { tooltip: F },
|
|
1063
1078
|
onClick: r.type === i.McpApp ? r.onReload : void 0
|
|
1064
1079
|
}),
|
|
1065
|
-
at && /* @__PURE__ */
|
|
1066
|
-
icon:
|
|
1080
|
+
at && /* @__PURE__ */ U(T, {
|
|
1081
|
+
icon: U(Z ? N : M, {
|
|
1067
1082
|
size: S.LG,
|
|
1068
1083
|
stroke: C,
|
|
1069
1084
|
"aria-hidden": !0
|
|
1070
1085
|
}),
|
|
1071
|
-
"aria-label":
|
|
1072
|
-
"aria-pressed":
|
|
1073
|
-
tooltipProps: { tooltip:
|
|
1086
|
+
"aria-label": Z ? P : ne,
|
|
1087
|
+
"aria-pressed": Z,
|
|
1088
|
+
tooltipProps: { tooltip: Z ? P : ne },
|
|
1074
1089
|
onClick: Qe
|
|
1075
1090
|
}),
|
|
1076
|
-
ot && /* @__PURE__ */
|
|
1077
|
-
icon:
|
|
1091
|
+
ot && /* @__PURE__ */ U(T, {
|
|
1092
|
+
icon: U(Ie ? j : ee, {
|
|
1078
1093
|
size: S.LG,
|
|
1079
1094
|
stroke: C,
|
|
1080
1095
|
"aria-hidden": !0
|
|
@@ -1083,8 +1098,8 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
1083
1098
|
tooltipProps: { tooltip: Ie ? p : f },
|
|
1084
1099
|
onClick: Ye
|
|
1085
1100
|
}),
|
|
1086
|
-
st && /* @__PURE__ */
|
|
1087
|
-
icon:
|
|
1101
|
+
st && /* @__PURE__ */ U(T, {
|
|
1102
|
+
icon: U(Le ? j : re, {
|
|
1088
1103
|
size: S.LG,
|
|
1089
1104
|
stroke: C,
|
|
1090
1105
|
"aria-hidden": !0
|
|
@@ -1093,18 +1108,18 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
1093
1108
|
tooltipProps: { tooltip: Le ? g : h },
|
|
1094
1109
|
onClick: Xe
|
|
1095
1110
|
}),
|
|
1096
|
-
ct && /* @__PURE__ */
|
|
1097
|
-
icon:
|
|
1111
|
+
ct && /* @__PURE__ */ U(T, {
|
|
1112
|
+
icon: U(He ? j : ee, {
|
|
1098
1113
|
size: S.LG,
|
|
1099
1114
|
stroke: C,
|
|
1100
1115
|
"aria-hidden": !0
|
|
1101
1116
|
}),
|
|
1102
|
-
"aria-label":
|
|
1103
|
-
tooltipProps: { tooltip:
|
|
1117
|
+
"aria-label": He ? y : v,
|
|
1118
|
+
tooltipProps: { tooltip: He ? y : v },
|
|
1104
1119
|
onClick: Ze
|
|
1105
1120
|
}),
|
|
1106
|
-
lt && /* @__PURE__ */
|
|
1107
|
-
icon: /* @__PURE__ */
|
|
1121
|
+
lt && /* @__PURE__ */ U(T, {
|
|
1122
|
+
icon: /* @__PURE__ */ U(te, {
|
|
1108
1123
|
size: S.LG,
|
|
1109
1124
|
stroke: C
|
|
1110
1125
|
}),
|
|
@@ -1113,11 +1128,11 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
1113
1128
|
onClick: Ce
|
|
1114
1129
|
})
|
|
1115
1130
|
] }) : null,
|
|
1116
|
-
children: /* @__PURE__ */
|
|
1131
|
+
children: /* @__PURE__ */ U(ze, {
|
|
1117
1132
|
content: r,
|
|
1118
1133
|
isLoading: t,
|
|
1119
1134
|
fileName: a,
|
|
1120
|
-
isHtmlSourceView:
|
|
1135
|
+
isHtmlSourceView: Z,
|
|
1121
1136
|
onAppInfo: r.type === i.McpApp ? Ke : void 0,
|
|
1122
1137
|
labels: {
|
|
1123
1138
|
unsupportedLabel: E,
|
|
@@ -1126,14 +1141,14 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
1126
1141
|
visualizerErrorLabel: w,
|
|
1127
1142
|
htmlFrameBlockedLabel: k,
|
|
1128
1143
|
htmlOpenInNewTabLabel: A,
|
|
1129
|
-
pdfThumbnailsLabel:
|
|
1130
|
-
pdfShowThumbnailsLabel:
|
|
1131
|
-
pdfHideThumbnailsLabel:
|
|
1132
|
-
pdfPageNumberLabel:
|
|
1133
|
-
pdfContentLoadingLabel:
|
|
1134
|
-
pdfContentErrorLabel:
|
|
1135
|
-
pdfContentRetryLabel:
|
|
1136
|
-
xlsxFormulaLabel:
|
|
1144
|
+
pdfThumbnailsLabel: I,
|
|
1145
|
+
pdfShowThumbnailsLabel: ae,
|
|
1146
|
+
pdfHideThumbnailsLabel: oe,
|
|
1147
|
+
pdfPageNumberLabel: se,
|
|
1148
|
+
pdfContentLoadingLabel: ce,
|
|
1149
|
+
pdfContentErrorLabel: le,
|
|
1150
|
+
pdfContentRetryLabel: G,
|
|
1151
|
+
xlsxFormulaLabel: ue,
|
|
1137
1152
|
codeContentLoadingLabel: de,
|
|
1138
1153
|
codeContentErrorLabel: fe,
|
|
1139
1154
|
codeContentRetryLabel: q,
|
|
@@ -1148,7 +1163,7 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
1148
1163
|
ooxmlHighlightsLabel: xe,
|
|
1149
1164
|
ooxmlHighlightNavigatedLabel: Se
|
|
1150
1165
|
},
|
|
1151
|
-
styles:
|
|
1166
|
+
styles: et,
|
|
1152
1167
|
codeBlockTheme: Me,
|
|
1153
1168
|
tableDownloadFilename: Te,
|
|
1154
1169
|
loadPdf: Ne,
|
|
@@ -1156,21 +1171,21 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
1156
1171
|
onVisualizerSendMessage: Fe
|
|
1157
1172
|
})
|
|
1158
1173
|
});
|
|
1159
|
-
}),
|
|
1174
|
+
}), Ue = /* @__PURE__ */ new Set(["html", "htm"]), Z = {
|
|
1160
1175
|
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
1161
1176
|
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
1162
1177
|
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
|
1163
|
-
},
|
|
1178
|
+
}, We = /* @__PURE__ */ new Set(/* @__PURE__ */ "txt.md.markdown.json.jsonl.ndjson.xml.csv.tsv.yaml.yml.toml.ini.conf.cfg.css.scss.sass.less.js.jsx.ts.tsx.mjs.cjs.mts.cts.py.rb.go.rs.java.kt.swift.c.h.cpp.cs.sh.bash.zsh.fish.ps1.log.env.gitignore.dockerfile.makefile.sql".split(".")), Ge = {
|
|
1164
1179
|
docx: r.Docx,
|
|
1165
1180
|
xlsx: r.Xlsx,
|
|
1166
1181
|
pptx: r.Pptx,
|
|
1167
1182
|
csv: r.Csv
|
|
1168
|
-
},
|
|
1183
|
+
}, Ke = {
|
|
1169
1184
|
[Z.docx]: r.Docx,
|
|
1170
1185
|
[Z.xlsx]: r.Xlsx,
|
|
1171
1186
|
[Z.pptx]: r.Pptx,
|
|
1172
1187
|
[f.CSV]: r.Csv
|
|
1173
|
-
},
|
|
1188
|
+
}, qe = {
|
|
1174
1189
|
[r.Docx]: Z.docx,
|
|
1175
1190
|
[r.Xlsx]: Z.xlsx,
|
|
1176
1191
|
[r.Pptx]: Z.pptx,
|
|
@@ -1178,21 +1193,21 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
1178
1193
|
}, Q = (e, t) => {
|
|
1179
1194
|
let n = t?.split(";", 1)[0].trim().toLowerCase();
|
|
1180
1195
|
if (n != null) {
|
|
1181
|
-
let e =
|
|
1196
|
+
let e = Ke[n];
|
|
1182
1197
|
if (e != null) return e;
|
|
1183
1198
|
}
|
|
1184
1199
|
let r = e.lastIndexOf(".");
|
|
1185
|
-
if (r !== -1) return
|
|
1186
|
-
},
|
|
1200
|
+
if (r !== -1) return Ge[e.slice(r + 1).toLowerCase()];
|
|
1201
|
+
}, Je = (e, t) => Q(e, t) != null, Ye = (e, t) => {
|
|
1187
1202
|
let n = Q(e, t);
|
|
1188
|
-
return n == null ? void 0 :
|
|
1189
|
-
},
|
|
1190
|
-
let t = e.lastIndexOf(".");
|
|
1191
|
-
return t !== -1 && Ge.has(e.slice(t + 1).toLowerCase());
|
|
1192
|
-
}, Qe = (e) => {
|
|
1203
|
+
return n == null ? void 0 : qe[n];
|
|
1204
|
+
}, Xe = (e) => {
|
|
1193
1205
|
let t = e.lastIndexOf(".");
|
|
1194
1206
|
return t !== -1 && We.has(e.slice(t + 1).toLowerCase());
|
|
1195
|
-
},
|
|
1207
|
+
}, Ze = (e) => {
|
|
1208
|
+
let t = e.lastIndexOf(".");
|
|
1209
|
+
return t !== -1 && Ue.has(e.slice(t + 1).toLowerCase());
|
|
1210
|
+
}, Qe = {
|
|
1196
1211
|
xml: "xml",
|
|
1197
1212
|
csv: "plaintext",
|
|
1198
1213
|
tsv: "plaintext",
|
|
@@ -1240,47 +1255,47 @@ var K = { panel: "dial-attachment-canvas-panel" }, q = {
|
|
|
1240
1255
|
gitignore: "plaintext",
|
|
1241
1256
|
dockerfile: "plaintext",
|
|
1242
1257
|
makefile: "plaintext"
|
|
1243
|
-
},
|
|
1258
|
+
}, $e = (e) => Qe[e], $ = (e) => ({
|
|
1244
1259
|
type: i.Unsupported,
|
|
1245
1260
|
...e != null && { url: e }
|
|
1246
|
-
}),
|
|
1261
|
+
}), et = (e) => ({
|
|
1247
1262
|
type: i.Error,
|
|
1248
1263
|
errorType: n.LoadFailed,
|
|
1249
1264
|
...e != null && { url: e }
|
|
1250
|
-
}),
|
|
1265
|
+
}), tt = (e) => ({
|
|
1251
1266
|
type: i.Error,
|
|
1252
1267
|
errorType: n.Forbidden,
|
|
1253
1268
|
...e != null && { url: e }
|
|
1254
|
-
}),
|
|
1269
|
+
}), nt = (e) => {
|
|
1255
1270
|
if (e.type === i.Image || e.type === i.Audio || e.type === i.Pdf || e.type === i.Ooxml) return e.url.startsWith("blob:") ? e.url : void 0;
|
|
1256
|
-
},
|
|
1257
|
-
let t =
|
|
1271
|
+
}, rt = (e) => {
|
|
1272
|
+
let t = nt(e);
|
|
1258
1273
|
t != null && URL.revokeObjectURL(t);
|
|
1259
|
-
},
|
|
1274
|
+
}, it = {
|
|
1260
1275
|
type: i.PlainText,
|
|
1261
1276
|
text: ""
|
|
1262
|
-
},
|
|
1263
|
-
|
|
1264
|
-
var
|
|
1265
|
-
let t =
|
|
1277
|
+
}, at = P(void 0);
|
|
1278
|
+
at.displayName = "AttachmentCanvasContext";
|
|
1279
|
+
var ot = P(void 0), st = ({ children: e }) => {
|
|
1280
|
+
let t = B(0), n = L(() => {
|
|
1266
1281
|
let e = ++t.current;
|
|
1267
1282
|
return () => e === t.current;
|
|
1268
1283
|
}, []);
|
|
1269
|
-
|
|
1284
|
+
R(() => () => {
|
|
1270
1285
|
t.current += 1;
|
|
1271
1286
|
}, []);
|
|
1272
|
-
let [r, i] =
|
|
1287
|
+
let [r, i] = V(!1), [a, o] = V(!1), [s, c] = V(it), [l, u] = V(void 0), [d, f] = V(void 0), p = L((e, t) => {
|
|
1273
1288
|
u(e), f(t), o(!0), i(!0);
|
|
1274
|
-
}, []), m =
|
|
1289
|
+
}, []), m = L((e, t, n) => {
|
|
1275
1290
|
c(e), u(t), f(n), o(!1), i(!0);
|
|
1276
|
-
}, []), h =
|
|
1277
|
-
c(
|
|
1291
|
+
}, []), h = L(() => {
|
|
1292
|
+
c(it), i(!1), o(!1), f(void 0);
|
|
1278
1293
|
}, []);
|
|
1279
|
-
return
|
|
1280
|
-
let e =
|
|
1294
|
+
return R(() => () => {
|
|
1295
|
+
let e = nt(s);
|
|
1281
1296
|
e != null && URL.revokeObjectURL(e);
|
|
1282
|
-
}, [s]), /* @__PURE__ */
|
|
1283
|
-
value:
|
|
1297
|
+
}, [s]), /* @__PURE__ */ U(at.Provider, {
|
|
1298
|
+
value: z(() => ({
|
|
1284
1299
|
isOpen: r,
|
|
1285
1300
|
isLoading: a,
|
|
1286
1301
|
content: s,
|
|
@@ -1299,41 +1314,41 @@ var st = N(void 0), ct = ({ children: e }) => {
|
|
|
1299
1314
|
m,
|
|
1300
1315
|
h
|
|
1301
1316
|
]),
|
|
1302
|
-
children: /* @__PURE__ */
|
|
1317
|
+
children: /* @__PURE__ */ U(ot.Provider, {
|
|
1303
1318
|
value: n,
|
|
1304
1319
|
children: e
|
|
1305
1320
|
})
|
|
1306
1321
|
});
|
|
1307
|
-
},
|
|
1308
|
-
let e =
|
|
1322
|
+
}, ct = () => {
|
|
1323
|
+
let e = ae(at);
|
|
1309
1324
|
if (!e) throw Error("useAttachmentCanvas must be used within an AttachmentCanvasProvider");
|
|
1310
1325
|
return e;
|
|
1311
|
-
},
|
|
1312
|
-
let e =
|
|
1326
|
+
}, lt = () => {
|
|
1327
|
+
let e = ae(ot);
|
|
1313
1328
|
if (!e) throw Error("useLatestCanvasRequest must be used within an AttachmentCanvasProvider");
|
|
1314
|
-
let t =
|
|
1315
|
-
return
|
|
1329
|
+
let t = B(void 0);
|
|
1330
|
+
return R(() => (t.current = {}, () => {
|
|
1316
1331
|
t.current = void 0;
|
|
1317
|
-
}), []),
|
|
1332
|
+
}), []), L(() => {
|
|
1318
1333
|
let n = t.current, r = e();
|
|
1319
1334
|
return () => n !== void 0 && t.current === n && r();
|
|
1320
1335
|
}, [e]);
|
|
1321
|
-
},
|
|
1322
|
-
let { ariaLabel: p = "Attachment preview", closeLabel: m = "Close", downloadLabel: g = "Download", unsupportedLabel: _ = "Preview is not supported for this file", loadErrorLabel: v = "Failed to load file", forbiddenErrorLabel: y = "You don't have permission to access this file", copyTextLabel: b, copiedTextLabel: x, copyMarkdownLabel: S, copiedMarkdownLabel: C, copyJsonLabel: w, copiedJsonLabel: T, htmlFrameBlockedLabel: E, htmlOpenInNewTabLabel: D, htmlViewSourceLabel: O, htmlViewRenderedLabel: k, pdfThumbnailsLabel: A, pdfShowThumbnailsLabel: j, pdfHideThumbnailsLabel:
|
|
1323
|
-
a(
|
|
1324
|
-
}, [
|
|
1325
|
-
(
|
|
1326
|
-
}, [
|
|
1327
|
-
|
|
1328
|
-
}, [
|
|
1329
|
-
|
|
1330
|
-
}, [
|
|
1331
|
-
return /* @__PURE__ */
|
|
1332
|
-
isOpen:
|
|
1333
|
-
isLoading:
|
|
1336
|
+
}, ut = I(({ labels: e, leftActions: t, isMobile: n = !1, defaultWidth: r, minWidth: o, maxWidth: s, codeBlockTheme: c, tableDownloadFilename: l, loadPdf: u, configurePdfWorker: d, onVisualizerSendMessage: f }) => {
|
|
1337
|
+
let { ariaLabel: p = "Attachment preview", closeLabel: m = "Close", downloadLabel: g = "Download", unsupportedLabel: _ = "Preview is not supported for this file", loadErrorLabel: v = "Failed to load file", forbiddenErrorLabel: y = "You don't have permission to access this file", copyTextLabel: b, copiedTextLabel: x, copyMarkdownLabel: S, copiedMarkdownLabel: C, copyJsonLabel: w, copiedJsonLabel: T, htmlFrameBlockedLabel: E, htmlOpenInNewTabLabel: D, htmlViewSourceLabel: O, htmlViewRenderedLabel: k, pdfThumbnailsLabel: A, pdfShowThumbnailsLabel: j, pdfHideThumbnailsLabel: M, pdfPageNumberLabel: ee, pdfContentLoadingLabel: te, pdfContentErrorLabel: N, pdfContentRetryLabel: ne, xlsxFormulaLabel: re, codeContentLoadingLabel: ie, codeContentErrorLabel: P, codeContentRetryLabel: F, tableCopyLabel: I, tableCopiedLabel: ae, tableDownloadCsvLabel: R, codeBlockCopyLabel: z, codeBlockCopiedLabel: B, codeBlockDownloadLabel: V, tableScrollRegionAriaLabel: oe, mathScrollRegionAriaLabel: se, ooxmlHighlightsLabel: H, ooxmlHighlightNavigatedLabel: W } = e ?? {}, { isOpen: ce, isLoading: le, content: G, fileName: ue, closeCanvas: de } = ct(), fe = L(() => {
|
|
1338
|
+
a(G, ue);
|
|
1339
|
+
}, [G, ue]), K = L(() => {
|
|
1340
|
+
(G.type === i.PlainText || G.type === i.Code) && h(G.text);
|
|
1341
|
+
}, [G]), q = L(() => {
|
|
1342
|
+
G.type === i.Markdown && h(G.text);
|
|
1343
|
+
}, [G]), pe = L(() => {
|
|
1344
|
+
G.type === i.Json && h(JSON.stringify(G.value, null, 2));
|
|
1345
|
+
}, [G]);
|
|
1346
|
+
return /* @__PURE__ */ U(He, {
|
|
1347
|
+
isOpen: ce,
|
|
1348
|
+
isLoading: le,
|
|
1334
1349
|
onClose: de,
|
|
1335
|
-
content:
|
|
1336
|
-
fileName:
|
|
1350
|
+
content: G,
|
|
1351
|
+
fileName: ue,
|
|
1337
1352
|
leftActions: t,
|
|
1338
1353
|
labels: {
|
|
1339
1354
|
ariaLabel: p,
|
|
@@ -1354,30 +1369,30 @@ var st = N(void 0), ct = ({ children: e }) => {
|
|
|
1354
1369
|
htmlViewRenderedLabel: k,
|
|
1355
1370
|
pdfThumbnailsLabel: A,
|
|
1356
1371
|
pdfShowThumbnailsLabel: j,
|
|
1357
|
-
pdfHideThumbnailsLabel:
|
|
1358
|
-
pdfPageNumberLabel:
|
|
1359
|
-
pdfContentLoadingLabel:
|
|
1360
|
-
pdfContentErrorLabel:
|
|
1361
|
-
pdfContentRetryLabel:
|
|
1362
|
-
xlsxFormulaLabel:
|
|
1363
|
-
codeContentLoadingLabel:
|
|
1364
|
-
codeContentErrorLabel:
|
|
1365
|
-
codeContentRetryLabel:
|
|
1366
|
-
tableCopyLabel:
|
|
1367
|
-
tableCopiedLabel:
|
|
1368
|
-
tableDownloadCsvLabel:
|
|
1369
|
-
codeBlockCopyLabel:
|
|
1370
|
-
codeBlockCopiedLabel:
|
|
1371
|
-
codeBlockDownloadLabel:
|
|
1372
|
-
tableScrollRegionAriaLabel:
|
|
1373
|
-
mathScrollRegionAriaLabel:
|
|
1374
|
-
ooxmlHighlightsLabel:
|
|
1375
|
-
ooxmlHighlightNavigatedLabel:
|
|
1372
|
+
pdfHideThumbnailsLabel: M,
|
|
1373
|
+
pdfPageNumberLabel: ee,
|
|
1374
|
+
pdfContentLoadingLabel: te,
|
|
1375
|
+
pdfContentErrorLabel: N,
|
|
1376
|
+
pdfContentRetryLabel: ne,
|
|
1377
|
+
xlsxFormulaLabel: re,
|
|
1378
|
+
codeContentLoadingLabel: ie,
|
|
1379
|
+
codeContentErrorLabel: P,
|
|
1380
|
+
codeContentRetryLabel: F,
|
|
1381
|
+
tableCopyLabel: I,
|
|
1382
|
+
tableCopiedLabel: ae,
|
|
1383
|
+
tableDownloadCsvLabel: R,
|
|
1384
|
+
codeBlockCopyLabel: z,
|
|
1385
|
+
codeBlockCopiedLabel: B,
|
|
1386
|
+
codeBlockDownloadLabel: V,
|
|
1387
|
+
tableScrollRegionAriaLabel: oe,
|
|
1388
|
+
mathScrollRegionAriaLabel: se,
|
|
1389
|
+
ooxmlHighlightsLabel: H,
|
|
1390
|
+
ooxmlHighlightNavigatedLabel: W
|
|
1376
1391
|
},
|
|
1377
1392
|
onDownload: fe,
|
|
1378
|
-
onCopyText:
|
|
1379
|
-
onCopyMarkdown:
|
|
1380
|
-
onCopyJson:
|
|
1393
|
+
onCopyText: G.type === i.PlainText || G.type === i.Code ? K : void 0,
|
|
1394
|
+
onCopyMarkdown: G.type === i.Markdown ? q : void 0,
|
|
1395
|
+
onCopyJson: G.type === i.Json ? pe : void 0,
|
|
1381
1396
|
tableDownloadFilename: l,
|
|
1382
1397
|
isMobile: n,
|
|
1383
1398
|
defaultWidth: r,
|
|
@@ -1388,30 +1403,30 @@ var st = N(void 0), ct = ({ children: e }) => {
|
|
|
1388
1403
|
loadPdf: u,
|
|
1389
1404
|
onVisualizerSendMessage: f
|
|
1390
1405
|
});
|
|
1391
|
-
}),
|
|
1406
|
+
}), dt = {
|
|
1392
1407
|
frame: "_frame_1ys0b_1",
|
|
1393
1408
|
header: "_header_1ys0b_6",
|
|
1394
1409
|
title: "_title_1ys0b_10"
|
|
1395
|
-
},
|
|
1410
|
+
}, ft = I(({ content: e, height: t, onExpand: n, expandAriaLabel: r, actionsGroupAriaLabel: i = "Visualizer actions", frameTitle: a, loadingLabel: o, errorLabel: s, titleClassName: c = "dial-small-semi-text", isBorderless: l = !1, isTitleHidden: u = !1, colors: d, onVisualizerSendMessage: f }) => {
|
|
1396
1411
|
let p = e.visualizerName.trim(), h = !u && p !== "";
|
|
1397
|
-
return /* @__PURE__ */
|
|
1398
|
-
className: _("flex w-full min-w-0 flex-col overflow-hidden", !l && ["rounded-xl border",
|
|
1412
|
+
return /* @__PURE__ */ W("div", {
|
|
1413
|
+
className: _("flex w-full min-w-0 flex-col overflow-hidden", !l && ["rounded-xl border", dt.frame]),
|
|
1399
1414
|
style: m({
|
|
1400
1415
|
"--igv-bg": d?.background,
|
|
1401
1416
|
"--igv-border": d?.border,
|
|
1402
1417
|
"--igv-title-text": d?.titleText
|
|
1403
1418
|
}),
|
|
1404
|
-
children: [/* @__PURE__ */
|
|
1405
|
-
className: _("flex min-h-10 items-center gap-2 py-2", h ? "justify-between" : "justify-end", !l && ["border-b px-4",
|
|
1406
|
-
children: [h && /* @__PURE__ */
|
|
1407
|
-
className: _("min-w-0 truncate", c,
|
|
1419
|
+
children: [/* @__PURE__ */ W("div", {
|
|
1420
|
+
className: _("flex min-h-10 items-center gap-2 py-2", h ? "justify-between" : "justify-end", !l && ["border-b px-4", dt.header]),
|
|
1421
|
+
children: [h && /* @__PURE__ */ U("span", {
|
|
1422
|
+
className: _("min-w-0 truncate", c, dt.title),
|
|
1408
1423
|
children: p
|
|
1409
|
-
}), /* @__PURE__ */
|
|
1424
|
+
}), /* @__PURE__ */ U("div", {
|
|
1410
1425
|
role: "toolbar",
|
|
1411
1426
|
"aria-label": i,
|
|
1412
1427
|
className: "flex items-center gap-1",
|
|
1413
|
-
children: /* @__PURE__ */
|
|
1414
|
-
icon: /* @__PURE__ */
|
|
1428
|
+
children: /* @__PURE__ */ U(T, {
|
|
1429
|
+
icon: /* @__PURE__ */ U(A, {
|
|
1415
1430
|
size: S.SM,
|
|
1416
1431
|
stroke: C,
|
|
1417
1432
|
"aria-hidden": !0
|
|
@@ -1421,10 +1436,10 @@ var st = N(void 0), ct = ({ children: e }) => {
|
|
|
1421
1436
|
onClick: n
|
|
1422
1437
|
})
|
|
1423
1438
|
})]
|
|
1424
|
-
}), /* @__PURE__ */
|
|
1439
|
+
}), /* @__PURE__ */ U("div", {
|
|
1425
1440
|
className: "w-full",
|
|
1426
1441
|
style: { height: `${t}px` },
|
|
1427
|
-
children: /* @__PURE__ */
|
|
1442
|
+
children: /* @__PURE__ */ U(Ie, {
|
|
1428
1443
|
content: e,
|
|
1429
1444
|
loadingLabel: o,
|
|
1430
1445
|
errorLabel: s,
|
|
@@ -1433,7 +1448,7 @@ var st = N(void 0), ct = ({ children: e }) => {
|
|
|
1433
1448
|
})
|
|
1434
1449
|
})]
|
|
1435
1450
|
});
|
|
1436
|
-
}),
|
|
1451
|
+
}), pt = (e) => {
|
|
1437
1452
|
let t;
|
|
1438
1453
|
try {
|
|
1439
1454
|
t = new URL(e).pathname;
|
|
@@ -1446,8 +1461,8 @@ var st = N(void 0), ct = ({ children: e }) => {
|
|
|
1446
1461
|
} catch {
|
|
1447
1462
|
return n;
|
|
1448
1463
|
}
|
|
1449
|
-
},
|
|
1450
|
-
let { openCanvas: n, openCanvasLoading: r, closeCanvas: a } =
|
|
1464
|
+
}, mt = (e, t) => {
|
|
1465
|
+
let { openCanvas: n, openCanvasLoading: r, closeCanvas: a } = ct(), { customVisualizers: o, themeId: s, onBeforeOpen: l } = t, u = L(async (t, n, r) => {
|
|
1451
1466
|
if (t.url == null && t.referenceUrl != null) {
|
|
1452
1467
|
let i = e.resolveReferencePdfContent(t);
|
|
1453
1468
|
if (i != null) return r(i, t.name, n);
|
|
@@ -1485,8 +1500,8 @@ var st = N(void 0), ct = ({ children: e }) => {
|
|
|
1485
1500
|
return i != null && r(i, t.name, n);
|
|
1486
1501
|
}
|
|
1487
1502
|
}
|
|
1488
|
-
let g = t.name != null &&
|
|
1489
|
-
if (t.name != null && !
|
|
1503
|
+
let g = t.name != null && Ze(t.name) || t.url != null && Ze(pt(t.url));
|
|
1504
|
+
if (t.name != null && !Xe(t.name) && !g) return r($(e.resolveContentUrl(t)), t.name, n);
|
|
1490
1505
|
if (g) {
|
|
1491
1506
|
let a = await e.resolveHtmlContent(t);
|
|
1492
1507
|
return a == null ? e.hasTextSource(t) ? r($(e.resolveContentUrl(t)), t.name, n) : t.url != null && r({
|
|
@@ -1494,15 +1509,15 @@ var st = N(void 0), ct = ({ children: e }) => {
|
|
|
1494
1509
|
url: t.url
|
|
1495
1510
|
}, t.name, n) : r(a, t.name, n);
|
|
1496
1511
|
}
|
|
1497
|
-
let _ = await e.resolveCodeContent(t,
|
|
1512
|
+
let _ = await e.resolveCodeContent(t, $e(m));
|
|
1498
1513
|
return _ != null && r(_, t.name, n);
|
|
1499
1514
|
}, [
|
|
1500
1515
|
o,
|
|
1501
1516
|
s,
|
|
1502
1517
|
e
|
|
1503
1518
|
]);
|
|
1504
|
-
return { openAttachmentCanvas:
|
|
1505
|
-
let d = () => s == null || s(), f = (e, t, r) => d() ? (n(e, t, r), !0) : (
|
|
1519
|
+
return { openAttachmentCanvas: L(async (t, o = t.id, s) => {
|
|
1520
|
+
let d = () => s == null || s(), f = (e, t, r) => d() ? (n(e, t, r), !0) : (rt(e), !1);
|
|
1506
1521
|
switch (t.type) {
|
|
1507
1522
|
case c.Image: {
|
|
1508
1523
|
let r = e.resolveImageContent(t);
|
|
@@ -1539,4 +1554,4 @@ var st = N(void 0), ct = ({ children: e }) => {
|
|
|
1539
1554
|
]) };
|
|
1540
1555
|
};
|
|
1541
1556
|
//#endregion
|
|
1542
|
-
export { K as ATTACHMENT_CANVAS_CLASS,
|
|
1557
|
+
export { K as ATTACHMENT_CANVAS_CLASS, He as AttachmentCanvas, ze as AttachmentCanvasBody, ut as AttachmentCanvasContainer, st as AttachmentCanvasProvider, i as AttachmentContentType, n as AttachmentErrorType, he as CodeContent, ge as HTML_PREVIEW_FRAME_RENDER_MESSAGE, ft as InlineGroupedVisualizer, we as McpAppCanvasRenderer, r as OoxmlFileType, t as OoxmlHighlightKind, tt as createForbiddenCanvasContent, et as createLoadErrorCanvasContent, $ as createUnsupportedCanvasContent, a as downloadAttachmentContent, $e as extensionToLanguage, je as findVisualizerForApplication, Ae as findVisualizerForMime, Q as getOoxmlFileType, Ye as getOoxmlMimeType, Me as groupedVisualizerCanvasKey, o as isDownloadable, Ze as isHtmlPreviewable, Je as isOoxmlPreviewable, Xe as isTextPreviewable, Ne as partitionAttachmentsForApplicationVisualizer, ct as useAttachmentCanvas, lt as useLatestCanvasRequest, mt as useOpenAttachmentCanvas };
|