@epam/ai-dial-attachment-canvas 1.1.0-dev.400 → 1.1.0-dev.402
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-CqvIcNMp.js → LazyContentBoundary-DkAcpR4S.js} +3 -2
- package/{PdfContent-CU1Q5IV6.js → PdfContent-BBUc0_SC.js} +1 -1
- package/{renderer-module-contract-BNGz8HvO-BmSLiM0k.js → bounded-raw-part-cache-BfbSxRIL-DD07NKh9.js} +2448 -8979
- package/chart-ex-B0DgG3Dt.js +1009 -0
- package/comment-occurrence-CqejEuts-7SeKCBXk.js +6 -0
- package/comment-ui-runtime-DEtgcmj7-B1G7PH4z.js +170 -0
- package/comment-ui-runtime-TLHustXJ-DWCXG2mL.js +2 -0
- package/comment-ui-runtime-lXwVOgjW-Be4RALsI.js +112 -0
- package/comments-CAn2A_Xh-CdgNAj0h.js +282 -0
- package/components/AttachmentCanvas/AttachmentCanvas.d.ts.map +1 -1
- package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts.map +1 -1
- package/components/AttachmentCanvasContainer/AttachmentCanvasContainer.d.ts.map +1 -1
- package/components/OoxmlContent/OoxmlContent.d.ts +7 -3
- package/components/OoxmlContent/OoxmlContent.d.ts.map +1 -1
- package/delimited-text-worker-host-DcHj_JZt-DWJmaPag.js +25 -0
- package/docx-B9qBTEkj.js +29822 -0
- package/hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas.d.ts +1 -1
- package/index.css +1 -1
- package/index.js +383 -325
- package/line-distribute-IsUGfHXm-DeITjLzJ.js +1234 -0
- package/line-metrics-CBbw80Ko-DoOuwYxZ.js +60 -0
- package/models/attachment-canvas.d.ts +15 -5
- package/models/attachment-canvas.d.ts.map +1 -1
- package/package.json +5 -5
- package/pptx-dkJw0-Vx.js +9179 -0
- package/read-only-comment-decoration-BTnWEeo5-BNhbteYc.js +94 -0
- package/read-only-comment-margin-plStyGfE-mggNAMB_.js +189 -0
- package/render-worker-host-BEfLZvSL-COy91Rd8.js +7 -0
- package/render-worker-host-Ba6Fchqr-DZeKpMWD.js +7 -0
- package/render-worker-host-C3xwtHnv-BBGHFdo9.js +7 -0
- package/renderer-module-contract-Cu-GKuPd-Bt0YZuzB.js +10063 -0
- package/types/attachment-canvas.d.ts +3 -2
- package/types/attachment-canvas.d.ts.map +1 -1
- package/utils/content.d.ts +3 -3
- package/utils/content.d.ts.map +1 -1
- package/utils/download.d.ts.map +1 -1
- package/visible-index-DPoQYSDt-9lRc-2Ik.js +162 -0
- package/xlsx-BAXMTJTG.js +8585 -0
- package/docx-TK1kGI6t.js +0 -27179
- package/highlight-rect-BuX5rWP4-BMOCuZYw.js +0 -1037
- package/pptx-DfVqSUxc.js +0 -7410
- package/render-worker-host-Br7ZDyGE-ByESfBjH.js +0 -7
- package/render-worker-host-CM1JXVqg-DGwZpsUd.js +0 -7
- package/render-worker-host-DFtd9Z-J-DU7fugLI.js +0 -7
- package/visible-index-BjesVGhg-DvGeguMs.js +0 -133
- package/xlsx-44AZTEry.js +0 -7800
package/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { c as e, i as t, l as n, o as r, s as i, t as a } from "./LazyContentBoundary-
|
|
1
|
+
import { c as e, i as t, l as n, o as r, s as i, t as a } from "./LazyContentBoundary-DkAcpR4S.js";
|
|
2
2
|
import { AttachmentType as o, CodeBlockTheme as s, DEFAULT_MARKDOWN_CLASS_NAMES as c, FileExtension as l, MIMEType as u, MarkdownRenderer as d, buildCssVars as f, copyToClipboard as p, mergeClasses as m, restrainedSyntaxTheme as h, stripUrlQueryAndFragment as g } from "@epam/ai-dial-chat-shared";
|
|
3
|
-
import { SidebarOrientation as _, SidebarPanel as
|
|
4
|
-
import { DIAL_ICON_SIZE as
|
|
5
|
-
import { IconAlertTriangle as
|
|
6
|
-
import { createContext as
|
|
7
|
-
import { JsonView as
|
|
8
|
-
import { Fragment as
|
|
3
|
+
import { SidebarOrientation as _, SidebarPanel as v } from "@epam/ai-dial-sidebar";
|
|
4
|
+
import { DIAL_ICON_SIZE as y, DIAL_KIT_ICON_STROKE as b, GhostIconButton as x, LinkButton as S, Spinner as C } from "@epam/ai-dial-ui-kit";
|
|
5
|
+
import { IconAlertTriangle as w, IconCheck as T, IconCode as ee, IconCopy as te, IconDownload as ne, IconEye as re, IconLock as ie, IconMarkdown as ae } from "@tabler/icons-react";
|
|
6
|
+
import { createContext as E, lazy as D, memo as O, useCallback as k, useContext as A, useEffect as j, useMemo as M, useRef as N, useState as P } from "react";
|
|
7
|
+
import { JsonView as oe, defaultStyles as se } from "react-json-view-lite";
|
|
8
|
+
import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
9
9
|
import { AppRenderer as ce } from "@mcp-ui/client";
|
|
10
|
-
import { VisualizerConnectorRequests as
|
|
11
|
-
import { VisualizerConnector as
|
|
12
|
-
var
|
|
10
|
+
import { VisualizerConnectorRequests as le } from "@epam/ai-dial-shared";
|
|
11
|
+
import { VisualizerConnector as R } from "@epam/ai-dial-visualizer-connector";
|
|
12
|
+
var ue = {
|
|
13
13
|
container: "_container_1nhig_1",
|
|
14
14
|
containerLight: "_containerLight_1nhig_5"
|
|
15
|
-
},
|
|
15
|
+
}, de = {
|
|
16
16
|
[s.Dark]: h,
|
|
17
17
|
[s.Light]: h
|
|
18
|
-
},
|
|
18
|
+
}, fe = () => D(async () => {
|
|
19
19
|
let { Prism: e } = await import("react-syntax-highlighter");
|
|
20
20
|
return { default: e };
|
|
21
|
-
}),
|
|
22
|
-
let { text: r, language: i } = e, o = i == null || i === "plaintext", c =
|
|
21
|
+
}), pe = O(({ content: e, codeBlockTheme: t = s.Light, labels: n }) => {
|
|
22
|
+
let { text: r, language: i } = e, o = i == null || i === "plaintext", c = de[t], l = t === s.Light, [u, d] = P(0), f = M(fe, [u]), p = k(() => {
|
|
23
23
|
d((e) => e + 1);
|
|
24
24
|
}, []), h = /* @__PURE__ */ I("pre", {
|
|
25
25
|
className: "whitespace-pre-wrap break-words p-4",
|
|
@@ -27,7 +27,7 @@ var z = {
|
|
|
27
27
|
});
|
|
28
28
|
return /* @__PURE__ */ I("div", {
|
|
29
29
|
dir: "ltr",
|
|
30
|
-
className: m("h-full overflow-auto",
|
|
30
|
+
className: m("h-full overflow-auto", ue.container, l && ue.containerLight),
|
|
31
31
|
children: o ? h : /* @__PURE__ */ I(a, {
|
|
32
32
|
retryKey: u,
|
|
33
33
|
onRetry: p,
|
|
@@ -51,21 +51,21 @@ var z = {
|
|
|
51
51
|
})
|
|
52
52
|
})
|
|
53
53
|
});
|
|
54
|
-
}),
|
|
55
|
-
let { htmlFrameBlockedLabel: s = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: c = "Open in new tab" } = t, [l, u] =
|
|
56
|
-
|
|
54
|
+
}), z = { openInNewTabButton: "_openInNewTabButton_c1arc_1" }, me = O(({ content: e, labels: t, isSourceView: n, title: r, codeBlockTheme: a, openInNewTabButtonTypographyClassName: o = "dial-body-semi-text" }) => {
|
|
55
|
+
let { htmlFrameBlockedLabel: s = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: c = "Open in new tab" } = t, [l, u] = P(!0), [d, f] = P(!1), p = N(null);
|
|
56
|
+
j(() => {
|
|
57
57
|
u(!0), f(!1);
|
|
58
58
|
}, [e]);
|
|
59
|
-
let h =
|
|
59
|
+
let h = k((t) => {
|
|
60
60
|
if (u(!1), e.srcdoc == null) try {
|
|
61
61
|
p.current?.contentDocument ?? f(!0);
|
|
62
62
|
} catch {
|
|
63
63
|
f(!0);
|
|
64
64
|
}
|
|
65
|
-
}, [e.srcdoc]), g =
|
|
65
|
+
}, [e.srcdoc]), g = k(() => {
|
|
66
66
|
u(!1), f(!0);
|
|
67
67
|
}, []);
|
|
68
|
-
if (n && e.srcdoc != null) return /* @__PURE__ */ I(
|
|
68
|
+
if (n && e.srcdoc != null) return /* @__PURE__ */ I(pe, {
|
|
69
69
|
content: {
|
|
70
70
|
type: i.Code,
|
|
71
71
|
text: e.srcdoc,
|
|
@@ -78,37 +78,37 @@ var z = {
|
|
|
78
78
|
children: [/* @__PURE__ */ I("p", {
|
|
79
79
|
className: "text-center",
|
|
80
80
|
children: s
|
|
81
|
-
}), e.url != null && /* @__PURE__ */ I(
|
|
81
|
+
}), e.url != null && /* @__PURE__ */ I(S, {
|
|
82
82
|
href: e.url,
|
|
83
83
|
target: "_blank",
|
|
84
84
|
label: c,
|
|
85
|
-
className:
|
|
85
|
+
className: z.openInNewTabButton,
|
|
86
86
|
textClassName: o
|
|
87
87
|
})]
|
|
88
88
|
});
|
|
89
|
-
let _ = e.srcdoc != null,
|
|
89
|
+
let _ = e.srcdoc != null, v = _ ? void 0 : e.url, y = _ ? e.srcdoc : void 0;
|
|
90
90
|
return /* @__PURE__ */ L("div", {
|
|
91
91
|
className: "relative h-full",
|
|
92
92
|
children: [l && /* @__PURE__ */ I("div", {
|
|
93
93
|
className: "absolute inset-0 flex items-center justify-center",
|
|
94
|
-
children: /* @__PURE__ */ I(
|
|
94
|
+
children: /* @__PURE__ */ I(C, {})
|
|
95
95
|
}), /* @__PURE__ */ I("iframe", {
|
|
96
96
|
ref: p,
|
|
97
97
|
title: r,
|
|
98
|
-
src:
|
|
99
|
-
srcDoc:
|
|
98
|
+
src: v,
|
|
99
|
+
srcDoc: y,
|
|
100
100
|
sandbox: _ ? "allow-scripts" : "allow-scripts allow-same-origin",
|
|
101
101
|
className: m("h-full w-full border-none", l ? "invisible" : ""),
|
|
102
102
|
onLoad: h,
|
|
103
103
|
onError: g
|
|
104
104
|
})]
|
|
105
105
|
});
|
|
106
|
-
}),
|
|
106
|
+
}), B = {
|
|
107
107
|
loadingOverlay: "_loadingOverlay_t3d2v_1",
|
|
108
108
|
statusLabel: "_statusLabel_t3d2v_5",
|
|
109
109
|
errorIcon: "_errorIcon_t3d2v_9"
|
|
110
|
-
},
|
|
111
|
-
let [n, r] =
|
|
110
|
+
}, he = ({ content: e, errorLabel: t = "Failed to load app" }) => {
|
|
111
|
+
let [n, r] = P("loading"), { html: i, sandboxUrl: a, toolName: o, toolInput: s, toolResult: c, hostContext: l, onToolCall: u } = e;
|
|
112
112
|
return /* @__PURE__ */ L("div", {
|
|
113
113
|
className: "relative h-full w-full",
|
|
114
114
|
children: [
|
|
@@ -124,113 +124,159 @@ var z = {
|
|
|
124
124
|
onError: () => r("error")
|
|
125
125
|
}),
|
|
126
126
|
n === "loading" && /* @__PURE__ */ I("div", {
|
|
127
|
-
className: m("absolute inset-0 flex flex-col items-center justify-center gap-2",
|
|
128
|
-
children: /* @__PURE__ */ I(
|
|
127
|
+
className: m("absolute inset-0 flex flex-col items-center justify-center gap-2", B.loadingOverlay),
|
|
128
|
+
children: /* @__PURE__ */ I(C, {})
|
|
129
129
|
}),
|
|
130
130
|
n === "error" && /* @__PURE__ */ L("div", {
|
|
131
131
|
className: "absolute inset-0 flex flex-col items-center justify-center gap-2",
|
|
132
|
-
children: [/* @__PURE__ */ I(
|
|
132
|
+
children: [/* @__PURE__ */ I(w, {
|
|
133
133
|
size: 60,
|
|
134
|
-
stroke:
|
|
134
|
+
stroke: b,
|
|
135
135
|
"aria-hidden": !0,
|
|
136
|
-
className:
|
|
136
|
+
className: B.errorIcon
|
|
137
137
|
}), /* @__PURE__ */ I("p", {
|
|
138
138
|
role: "alert",
|
|
139
|
-
className: m("text-center",
|
|
139
|
+
className: m("text-center", B.statusLabel),
|
|
140
140
|
children: t
|
|
141
141
|
})]
|
|
142
142
|
})
|
|
143
143
|
]
|
|
144
144
|
});
|
|
145
|
-
},
|
|
146
|
-
viewer: "
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
145
|
+
}, V = {
|
|
146
|
+
viewer: "_viewer_1npwu_1",
|
|
147
|
+
spreadsheetCanvas: "_spreadsheetCanvas_1npwu_5",
|
|
148
|
+
formulaPanel: "_formulaPanel_1npwu_11",
|
|
149
|
+
formulaValue: "_formulaValue_1npwu_17",
|
|
150
|
+
statusOverlay: "_statusOverlay_1npwu_23",
|
|
151
|
+
errorIcon: "_errorIcon_1npwu_28"
|
|
152
|
+
}, ge = (e) => {
|
|
153
|
+
if (e?.kind !== "range") return "";
|
|
154
|
+
let { activeCell: t } = e.selection, n = e.cells.find(({ address: e }) => e.row === t.row && e.col === t.col);
|
|
155
|
+
if (n == null) return "";
|
|
156
|
+
let r = n.formula;
|
|
157
|
+
return r == null || r.trim().length === 0 ? n.displayText : r.startsWith("=") ? r : `=${r}`;
|
|
158
|
+
}, _e = async (e, t, r, i) => {
|
|
150
159
|
switch (t) {
|
|
151
160
|
case n.Docx: {
|
|
152
|
-
let { DocxScrollViewer: t } = await import("./docx-
|
|
161
|
+
let [{ DocxScrollViewer: t }, { chartEx: n }] = await Promise.all([import("./docx-B9qBTEkj.js"), import("./chart-ex-B0DgG3Dt.js")]);
|
|
153
162
|
return new t(e, {
|
|
154
163
|
enableTextSelection: !0,
|
|
155
164
|
refitOnResize: !0,
|
|
165
|
+
chartEx: n,
|
|
156
166
|
onError: r
|
|
157
167
|
});
|
|
158
168
|
}
|
|
159
169
|
case n.Xlsx: {
|
|
160
|
-
let { XlsxViewer: t } = await import("./xlsx-
|
|
170
|
+
let [{ XlsxViewer: t }, { chartEx: n }] = await Promise.all([import("./xlsx-BAXMTJTG.js"), import("./chart-ex-B0DgG3Dt.js")]);
|
|
161
171
|
return new t(e, {
|
|
162
172
|
showZoomSlider: !0,
|
|
173
|
+
chartEx: n,
|
|
174
|
+
onError: r,
|
|
175
|
+
onSelectionContextChange: i
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
case n.Csv: {
|
|
179
|
+
let { XlsxSheetViewer: t } = await import("./xlsx-BAXMTJTG.js"), n = document.createElement("canvas");
|
|
180
|
+
n.className = V.spreadsheetCanvas, e.replaceChildren(n);
|
|
181
|
+
let i = new t(n, {
|
|
182
|
+
showScrollbars: !0,
|
|
163
183
|
onError: r
|
|
164
184
|
});
|
|
185
|
+
return {
|
|
186
|
+
load: (e) => i.load(e, { format: "csv" }),
|
|
187
|
+
destroy: () => i.destroy()
|
|
188
|
+
};
|
|
165
189
|
}
|
|
166
190
|
case n.Pptx: {
|
|
167
|
-
let { PptxScrollViewer: t } = await import("./pptx-
|
|
191
|
+
let [{ PptxScrollViewer: t }, { chartEx: n }] = await Promise.all([import("./pptx-dkJw0-Vx.js"), import("./chart-ex-B0DgG3Dt.js")]);
|
|
168
192
|
return new t(e, {
|
|
169
193
|
enableTextSelection: !0,
|
|
170
194
|
refitOnResize: !0,
|
|
195
|
+
chartEx: n,
|
|
171
196
|
onError: r
|
|
172
197
|
});
|
|
173
198
|
}
|
|
174
199
|
}
|
|
175
|
-
},
|
|
176
|
-
let
|
|
177
|
-
return
|
|
178
|
-
let t =
|
|
200
|
+
}, ve = ({ content: e, fileName: t, loadErrorLabel: r, formulaLabel: i, formulaLabelClassName: a }) => {
|
|
201
|
+
let o = N(null), [s, c] = P(!0), [l, u] = P(!1), [d, f] = P("");
|
|
202
|
+
return j(() => {
|
|
203
|
+
let t = o.current;
|
|
179
204
|
if (t == null) return;
|
|
180
|
-
let n,
|
|
181
|
-
return
|
|
205
|
+
let n, r = !1;
|
|
206
|
+
return c(!0), u(!1), f(""), (async () => {
|
|
182
207
|
try {
|
|
183
|
-
let
|
|
184
|
-
|
|
208
|
+
let i = await _e(t, e.format, () => {
|
|
209
|
+
r || (c(!1), u(!0));
|
|
210
|
+
}, (e) => {
|
|
211
|
+
r || f(ge(e));
|
|
185
212
|
});
|
|
186
|
-
if (
|
|
187
|
-
|
|
213
|
+
if (r) {
|
|
214
|
+
i.destroy();
|
|
188
215
|
return;
|
|
189
216
|
}
|
|
190
|
-
n =
|
|
217
|
+
n = i, await n.load(e.url), r || c(!1);
|
|
191
218
|
} catch {
|
|
192
|
-
|
|
219
|
+
r || (n?.destroy(), n = void 0, t.replaceChildren(), c(!1), u(!0));
|
|
193
220
|
}
|
|
194
221
|
})(), () => {
|
|
195
|
-
|
|
222
|
+
r = !0, n?.destroy(), t.replaceChildren();
|
|
196
223
|
};
|
|
197
224
|
}, [e.format, e.url]), /* @__PURE__ */ L("div", {
|
|
198
|
-
className: "relative h-full w-full overflow-hidden",
|
|
199
|
-
children: [
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}), (i || o) && /* @__PURE__ */ I("div", {
|
|
206
|
-
role: o ? "alert" : void 0,
|
|
207
|
-
"aria-live": "polite",
|
|
208
|
-
className: m("absolute inset-0 flex items-center justify-center", H.statusOverlay),
|
|
209
|
-
children: i ? /* @__PURE__ */ I(S, { size: 48 }) : /* @__PURE__ */ L("div", {
|
|
210
|
-
className: "flex flex-col items-center gap-2",
|
|
211
|
-
children: [/* @__PURE__ */ I(C, {
|
|
225
|
+
className: "relative flex h-full w-full min-w-0 flex-col overflow-hidden",
|
|
226
|
+
children: [
|
|
227
|
+
e.format === n.Xlsx && /* @__PURE__ */ L("div", {
|
|
228
|
+
role: "region",
|
|
229
|
+
"aria-label": i,
|
|
230
|
+
className: m("flex min-w-0 shrink-0 items-center gap-2 border-b px-3 py-2", V.formulaPanel),
|
|
231
|
+
children: [/* @__PURE__ */ I("span", {
|
|
212
232
|
"aria-hidden": "true",
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
233
|
+
className: m("shrink-0", a),
|
|
234
|
+
children: "fx"
|
|
235
|
+
}), /* @__PURE__ */ I("code", {
|
|
236
|
+
dir: "ltr",
|
|
237
|
+
tabIndex: 0,
|
|
238
|
+
"aria-live": "polite",
|
|
239
|
+
className: m("h-8 min-w-0 flex-1 overflow-x-auto whitespace-nowrap rounded border px-2 py-1 text-sm focus-visible:outline focus-visible:outline-focus", V.formulaValue),
|
|
240
|
+
children: d
|
|
219
241
|
})]
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ I("div", {
|
|
244
|
+
ref: o,
|
|
245
|
+
role: "document",
|
|
246
|
+
"aria-label": t,
|
|
247
|
+
"aria-busy": s,
|
|
248
|
+
className: m("min-h-0 w-full flex-1 overflow-hidden", V.viewer)
|
|
249
|
+
}),
|
|
250
|
+
(s || l) && /* @__PURE__ */ I("div", {
|
|
251
|
+
role: l ? "alert" : void 0,
|
|
252
|
+
"aria-live": "polite",
|
|
253
|
+
className: m("absolute inset-0 flex items-center justify-center", V.statusOverlay),
|
|
254
|
+
children: s ? /* @__PURE__ */ I(C, { size: 48 }) : /* @__PURE__ */ L("div", {
|
|
255
|
+
className: "flex flex-col items-center gap-2",
|
|
256
|
+
children: [/* @__PURE__ */ I(w, {
|
|
257
|
+
"aria-hidden": "true",
|
|
258
|
+
size: 60,
|
|
259
|
+
stroke: b,
|
|
260
|
+
className: V.errorIcon
|
|
261
|
+
}), /* @__PURE__ */ I("p", {
|
|
262
|
+
className: "text-center",
|
|
263
|
+
children: r
|
|
264
|
+
})]
|
|
265
|
+
})
|
|
220
266
|
})
|
|
221
|
-
|
|
267
|
+
]
|
|
222
268
|
});
|
|
223
|
-
},
|
|
269
|
+
}, H = {
|
|
224
270
|
loadingOverlay: "_loadingOverlay_12637_1",
|
|
225
271
|
statusLabel: "_statusLabel_12637_5",
|
|
226
272
|
errorIcon: "_errorIcon_12637_9"
|
|
227
|
-
},
|
|
228
|
-
let i =
|
|
229
|
-
return u.current = e,
|
|
273
|
+
}, ye = ({ content: e, loadingLabel: t, errorLabel: n = "Failed to load visualizer", colors: r }) => {
|
|
274
|
+
let i = N(null), [a, o] = P("loading"), { url: s, visualizerName: c, requestTimeout: l } = e, u = N(e);
|
|
275
|
+
return u.current = e, j(() => {
|
|
230
276
|
let e = i.current;
|
|
231
277
|
if (!e) return;
|
|
232
278
|
o("loading");
|
|
233
|
-
let t = new
|
|
279
|
+
let t = new R(e, {
|
|
234
280
|
domain: s,
|
|
235
281
|
hostDomain: window.location.origin,
|
|
236
282
|
visualizerName: c,
|
|
@@ -242,7 +288,7 @@ var z = {
|
|
|
242
288
|
layout: r,
|
|
243
289
|
...typeof i == "object" && i ? i : {}
|
|
244
290
|
};
|
|
245
|
-
await t.send(
|
|
291
|
+
await t.send(le.sendVisualizeData, {
|
|
246
292
|
mimeType: e,
|
|
247
293
|
visualizerData: a
|
|
248
294
|
}), n && o("ready");
|
|
@@ -268,28 +314,28 @@ var z = {
|
|
|
268
314
|
className: "h-full w-full"
|
|
269
315
|
}),
|
|
270
316
|
a === "loading" && /* @__PURE__ */ L("div", {
|
|
271
|
-
className: m("absolute inset-0 flex flex-col items-center justify-center gap-2",
|
|
272
|
-
children: [/* @__PURE__ */ I(
|
|
273
|
-
className: m("text-center",
|
|
317
|
+
className: m("absolute inset-0 flex flex-col items-center justify-center gap-2", H.loadingOverlay),
|
|
318
|
+
children: [/* @__PURE__ */ I(C, {}), t && /* @__PURE__ */ I("p", {
|
|
319
|
+
className: m("text-center", H.statusLabel),
|
|
274
320
|
children: t
|
|
275
321
|
})]
|
|
276
322
|
}),
|
|
277
323
|
a === "error" && /* @__PURE__ */ L("div", {
|
|
278
324
|
className: "absolute inset-0 flex flex-col items-center justify-center gap-2",
|
|
279
|
-
children: [/* @__PURE__ */ I(
|
|
325
|
+
children: [/* @__PURE__ */ I(w, {
|
|
280
326
|
size: 60,
|
|
281
|
-
stroke:
|
|
327
|
+
stroke: b,
|
|
282
328
|
"aria-hidden": !0,
|
|
283
|
-
className:
|
|
329
|
+
className: H.errorIcon
|
|
284
330
|
}), /* @__PURE__ */ I("p", {
|
|
285
331
|
role: "alert",
|
|
286
|
-
className: m("text-center",
|
|
332
|
+
className: m("text-center", H.statusLabel),
|
|
287
333
|
children: n
|
|
288
334
|
})]
|
|
289
335
|
})
|
|
290
336
|
]
|
|
291
337
|
});
|
|
292
|
-
},
|
|
338
|
+
}, U = {
|
|
293
339
|
body: "_body_13ogb_4",
|
|
294
340
|
statusLabel: "_statusLabel_13ogb_13",
|
|
295
341
|
errorIcon: "_errorIcon_13ogb_17",
|
|
@@ -304,18 +350,18 @@ var z = {
|
|
|
304
350
|
jsonExpandIcon: "_jsonExpandIcon_13ogb_54",
|
|
305
351
|
jsonCollapseIcon: "_jsonCollapseIcon_13ogb_67",
|
|
306
352
|
jsonCollapsedContent: "_jsonCollapsedContent_13ogb_84"
|
|
307
|
-
},
|
|
308
|
-
let [r, i] =
|
|
309
|
-
return
|
|
353
|
+
}, be = () => D(async () => ({ default: (await import("./PdfContent-BBUc0_SC.js")).PdfContent })), xe = ({ url: e, fileName: t, loadErrorLabel: n }) => {
|
|
354
|
+
let [r, i] = P(!1);
|
|
355
|
+
return j(() => {
|
|
310
356
|
i(!1);
|
|
311
357
|
}, [e]), r ? /* @__PURE__ */ L("div", {
|
|
312
358
|
className: "flex flex-col items-center gap-2",
|
|
313
|
-
children: [/* @__PURE__ */ I(
|
|
359
|
+
children: [/* @__PURE__ */ I(w, {
|
|
314
360
|
size: 60,
|
|
315
|
-
stroke:
|
|
316
|
-
className:
|
|
361
|
+
stroke: b,
|
|
362
|
+
className: U.errorIcon
|
|
317
363
|
}), /* @__PURE__ */ I("p", {
|
|
318
|
-
className: m("text-center",
|
|
364
|
+
className: m("text-center", U.statusLabel),
|
|
319
365
|
children: n
|
|
320
366
|
})]
|
|
321
367
|
}) : /* @__PURE__ */ I("img", {
|
|
@@ -324,41 +370,44 @@ var z = {
|
|
|
324
370
|
className: "max-h-full max-w-full object-contain",
|
|
325
371
|
onError: () => i(!0)
|
|
326
372
|
});
|
|
327
|
-
},
|
|
373
|
+
}, Se = new Set([
|
|
328
374
|
i.PlainText,
|
|
329
375
|
i.Code,
|
|
330
376
|
i.Ooxml
|
|
331
|
-
]),
|
|
332
|
-
let { colors:
|
|
333
|
-
|
|
334
|
-
}, []),
|
|
377
|
+
]), Ce = O(({ content: t, isLoading: n = !1, fileName: r, isHtmlSourceView: o = !1, labels: { unsupportedLabel: s = "Preview is not supported for this file", loadErrorLabel: l = "Failed to load file", forbiddenErrorLabel: u = "You don't have permission to access this file", visualizerErrorLabel: p, htmlFrameBlockedLabel: h = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: g = "Open in new tab", pdfThumbnailsLabel: _, pdfShowThumbnailsLabel: v, pdfHideThumbnailsLabel: y, pdfPageNumberLabel: x, pdfContentLoadingLabel: S, pdfContentErrorLabel: T, pdfContentRetryLabel: ee, xlsxFormulaLabel: te = "Formula", codeContentLoadingLabel: ne, codeContentErrorLabel: re, codeContentRetryLabel: ae } = {}, styles: E, codeBlockTheme: D, loadPdf: O, hidePdfToolbar: A = !1, configurePdfWorker: j }) => {
|
|
378
|
+
let { colors: N, typography: F, bodyClassName: ce, cssVars: le } = E ?? {}, [R, ue] = P(0), de = M(be, [R]), fe = k(() => {
|
|
379
|
+
ue((e) => e + 1);
|
|
380
|
+
}, []), z = F?.fontClassName != null, B = M(() => ({
|
|
335
381
|
...f({
|
|
336
|
-
"--ac-text":
|
|
337
|
-
"--ac-status-text":
|
|
338
|
-
"--ac-error-icon":
|
|
339
|
-
"--ac-open-in-new-tab-text":
|
|
340
|
-
"--ac-json-border":
|
|
341
|
-
"--ac-json-bg":
|
|
342
|
-
"--ac-json-label":
|
|
343
|
-
"--ac-json-clickable-label":
|
|
344
|
-
"--ac-json-punctuation":
|
|
345
|
-
"--ac-json-string":
|
|
346
|
-
"--ac-json-number":
|
|
347
|
-
"--ac-json-boolean":
|
|
348
|
-
"--ac-json-null":
|
|
349
|
-
"--ac-json-toggle-icon":
|
|
350
|
-
"--ac-json-toggle-icon-hover":
|
|
351
|
-
"--ac-ooxml-bg":
|
|
352
|
-
"--ac-
|
|
353
|
-
"--ac-
|
|
354
|
-
"--ac-
|
|
355
|
-
"--ac-
|
|
356
|
-
"--ac-
|
|
357
|
-
"--ac-
|
|
358
|
-
"--ac-
|
|
382
|
+
"--ac-text": N?.text,
|
|
383
|
+
"--ac-status-text": N?.statusText,
|
|
384
|
+
"--ac-error-icon": N?.errorIcon,
|
|
385
|
+
"--ac-open-in-new-tab-text": N?.openInNewTabText,
|
|
386
|
+
"--ac-json-border": N?.jsonBorder,
|
|
387
|
+
"--ac-json-bg": N?.jsonBackground,
|
|
388
|
+
"--ac-json-label": N?.jsonLabel,
|
|
389
|
+
"--ac-json-clickable-label": N?.jsonClickableLabel,
|
|
390
|
+
"--ac-json-punctuation": N?.jsonPunctuation,
|
|
391
|
+
"--ac-json-string": N?.jsonString,
|
|
392
|
+
"--ac-json-number": N?.jsonNumber,
|
|
393
|
+
"--ac-json-boolean": N?.jsonBoolean,
|
|
394
|
+
"--ac-json-null": N?.jsonNull,
|
|
395
|
+
"--ac-json-toggle-icon": N?.jsonToggleIcon,
|
|
396
|
+
"--ac-json-toggle-icon-hover": N?.jsonToggleIconHover,
|
|
397
|
+
"--ac-ooxml-bg": N?.ooxmlBackground,
|
|
398
|
+
"--ac-ooxml-formula-border": N?.ooxmlFormulaBorder,
|
|
399
|
+
"--ac-ooxml-formula-bg": N?.ooxmlFormulaBackground,
|
|
400
|
+
"--ac-ooxml-formula-text": N?.ooxmlFormulaText,
|
|
401
|
+
"--ac-json-collapsed-text": N?.jsonCollapsedText,
|
|
402
|
+
"--ac-json-collapsed-bg": N?.jsonCollapsedBackground,
|
|
403
|
+
"--ac-font-family": z ? void 0 : F?.fontFamily,
|
|
404
|
+
"--ac-font-size": z ? void 0 : F?.fontSize,
|
|
405
|
+
"--ac-font-weight": z ? void 0 : F?.fontWeight,
|
|
406
|
+
"--ac-line-height": z ? void 0 : F?.lineHeight,
|
|
407
|
+
"--ac-letter-spacing": z ? void 0 : F?.letterSpacing
|
|
359
408
|
}),
|
|
360
|
-
...
|
|
361
|
-
}), [
|
|
409
|
+
...le
|
|
410
|
+
}), [E]), V = M(() => {
|
|
362
411
|
switch (t.type) {
|
|
363
412
|
case i.Image:
|
|
364
413
|
case i.Audio:
|
|
@@ -373,13 +422,13 @@ var z = {
|
|
|
373
422
|
case i.Html: return "h-full overflow-hidden";
|
|
374
423
|
default: return "h-full overflow-auto p-4";
|
|
375
424
|
}
|
|
376
|
-
}, [t.type]),
|
|
425
|
+
}, [t.type]), ge = M(() => {
|
|
377
426
|
switch (t.type) {
|
|
378
427
|
case i.PlainText: return /* @__PURE__ */ I("pre", {
|
|
379
|
-
className: m("whitespace-pre-wrap break-words",
|
|
428
|
+
className: m("whitespace-pre-wrap break-words", U.body, F?.fontClassName),
|
|
380
429
|
children: t.text
|
|
381
430
|
});
|
|
382
|
-
case i.Image: return /* @__PURE__ */ I(
|
|
431
|
+
case i.Image: return /* @__PURE__ */ I(xe, {
|
|
383
432
|
url: t.url,
|
|
384
433
|
fileName: r,
|
|
385
434
|
loadErrorLabel: l
|
|
@@ -405,39 +454,39 @@ var z = {
|
|
|
405
454
|
dir: "ltr",
|
|
406
455
|
className: "h-full overflow-auto",
|
|
407
456
|
children: /* @__PURE__ */ I("div", {
|
|
408
|
-
className: m("m-3 overflow-auto rounded-md border",
|
|
409
|
-
children: /* @__PURE__ */ I(
|
|
457
|
+
className: m("m-3 overflow-auto rounded-md border", U.jsonWrapper),
|
|
458
|
+
children: /* @__PURE__ */ I(oe, {
|
|
410
459
|
data: t.value,
|
|
411
460
|
style: {
|
|
412
|
-
container: m("whitespace-pre-wrap break-words p-2",
|
|
413
|
-
basicChildStyle:
|
|
461
|
+
container: m("whitespace-pre-wrap break-words p-2", F?.jsonClassName ?? "dial-code-text"),
|
|
462
|
+
basicChildStyle: se.basicChildStyle,
|
|
414
463
|
childFieldsContainer: "m-0 ps-3",
|
|
415
|
-
label: m("me-1 font-semibold",
|
|
416
|
-
clickableLabel: m("me-1 cursor-pointer font-semibold hover:underline",
|
|
417
|
-
nullValue: m("italic",
|
|
418
|
-
undefinedValue: m("italic",
|
|
419
|
-
stringValue:
|
|
420
|
-
booleanValue:
|
|
421
|
-
numberValue:
|
|
422
|
-
otherValue: m("italic",
|
|
423
|
-
punctuation: m("me-1",
|
|
424
|
-
collapseIcon: m("me-1 cursor-pointer select-none transition-colors",
|
|
425
|
-
expandIcon: m("me-1 cursor-pointer select-none transition-colors",
|
|
426
|
-
collapsedContent: m("me-1 cursor-pointer rounded px-1",
|
|
464
|
+
label: m("me-1 font-semibold", U.jsonLabel),
|
|
465
|
+
clickableLabel: m("me-1 cursor-pointer font-semibold hover:underline", U.jsonClickableLabel),
|
|
466
|
+
nullValue: m("italic", U.jsonNullValue),
|
|
467
|
+
undefinedValue: m("italic", U.jsonNullValue),
|
|
468
|
+
stringValue: U.jsonStringValue,
|
|
469
|
+
booleanValue: U.jsonBooleanValue,
|
|
470
|
+
numberValue: U.jsonNumberValue,
|
|
471
|
+
otherValue: m("italic", U.jsonNullValue),
|
|
472
|
+
punctuation: m("me-1", U.jsonPunctuation),
|
|
473
|
+
collapseIcon: m("me-1 cursor-pointer select-none transition-colors", U.jsonCollapseIcon),
|
|
474
|
+
expandIcon: m("me-1 cursor-pointer select-none transition-colors", U.jsonExpandIcon),
|
|
475
|
+
collapsedContent: m("me-1 cursor-pointer rounded px-1", U.jsonCollapsedContent)
|
|
427
476
|
}
|
|
428
477
|
})
|
|
429
478
|
})
|
|
430
479
|
});
|
|
431
|
-
case i.Code: return /* @__PURE__ */ I(
|
|
480
|
+
case i.Code: return /* @__PURE__ */ I(pe, {
|
|
432
481
|
content: t,
|
|
433
482
|
codeBlockTheme: D,
|
|
434
483
|
labels: {
|
|
435
|
-
loadingLabel:
|
|
436
|
-
errorLabel:
|
|
437
|
-
retryLabel:
|
|
484
|
+
loadingLabel: ne,
|
|
485
|
+
errorLabel: re,
|
|
486
|
+
retryLabel: ae
|
|
438
487
|
}
|
|
439
488
|
});
|
|
440
|
-
case i.Html: return /* @__PURE__ */ I(
|
|
489
|
+
case i.Html: return /* @__PURE__ */ I(me, {
|
|
441
490
|
content: t,
|
|
442
491
|
labels: {
|
|
443
492
|
htmlFrameBlockedLabel: h,
|
|
@@ -449,55 +498,57 @@ var z = {
|
|
|
449
498
|
});
|
|
450
499
|
case i.Pdf: return /* @__PURE__ */ I(a, {
|
|
451
500
|
retryKey: R,
|
|
452
|
-
onRetry:
|
|
501
|
+
onRetry: fe,
|
|
453
502
|
labels: {
|
|
454
|
-
loadingLabel:
|
|
455
|
-
errorLabel:
|
|
456
|
-
retryLabel:
|
|
503
|
+
loadingLabel: S,
|
|
504
|
+
errorLabel: T,
|
|
505
|
+
retryLabel: ee
|
|
457
506
|
},
|
|
458
|
-
children: /* @__PURE__ */ I(
|
|
507
|
+
children: /* @__PURE__ */ I(de, {
|
|
459
508
|
fileName: r,
|
|
460
509
|
url: t.url,
|
|
461
510
|
highlights: t.highlights ?? [],
|
|
462
511
|
selectedHighlightId: t.selectedHighlightId,
|
|
463
512
|
loadPdf: O,
|
|
464
|
-
hideHeader:
|
|
513
|
+
hideHeader: A,
|
|
465
514
|
configurePdfWorker: j,
|
|
466
515
|
labels: {
|
|
467
516
|
thumbnailsLabel: _,
|
|
468
|
-
showThumbnailsLabel:
|
|
469
|
-
hideThumbnailsLabel:
|
|
470
|
-
pageNumberLabel:
|
|
471
|
-
loadingLabel:
|
|
472
|
-
errorLabel:
|
|
473
|
-
retryLabel:
|
|
517
|
+
showThumbnailsLabel: v,
|
|
518
|
+
hideThumbnailsLabel: y,
|
|
519
|
+
pageNumberLabel: x,
|
|
520
|
+
loadingLabel: S,
|
|
521
|
+
errorLabel: T,
|
|
522
|
+
retryLabel: ee
|
|
474
523
|
}
|
|
475
524
|
})
|
|
476
525
|
}, t.url);
|
|
477
|
-
case i.Ooxml: return /* @__PURE__ */ I(
|
|
526
|
+
case i.Ooxml: return /* @__PURE__ */ I(ve, {
|
|
478
527
|
content: t,
|
|
479
528
|
fileName: r,
|
|
480
|
-
loadErrorLabel: l
|
|
529
|
+
loadErrorLabel: l,
|
|
530
|
+
formulaLabel: te,
|
|
531
|
+
formulaLabelClassName: F?.xlsxFormulaLabelClassName ?? "dial-italic-text"
|
|
481
532
|
});
|
|
482
|
-
case i.Visualizer: return /* @__PURE__ */ I(
|
|
533
|
+
case i.Visualizer: return /* @__PURE__ */ I(ye, {
|
|
483
534
|
content: t,
|
|
484
535
|
errorLabel: p
|
|
485
536
|
});
|
|
486
|
-
case i.McpApp: return /* @__PURE__ */ I(
|
|
537
|
+
case i.McpApp: return /* @__PURE__ */ I(he, { content: t });
|
|
487
538
|
case i.Unsupported: return /* @__PURE__ */ I("p", {
|
|
488
|
-
className: m("text-center",
|
|
539
|
+
className: m("text-center", U.statusLabel),
|
|
489
540
|
children: s
|
|
490
541
|
});
|
|
491
542
|
case i.Error: {
|
|
492
543
|
let n = t.errorType === e.Forbidden;
|
|
493
544
|
return /* @__PURE__ */ L("div", {
|
|
494
545
|
className: "flex flex-col items-center gap-2",
|
|
495
|
-
children: [I(n ?
|
|
546
|
+
children: [I(n ? ie : w, {
|
|
496
547
|
size: 60,
|
|
497
|
-
stroke:
|
|
498
|
-
className:
|
|
548
|
+
stroke: b,
|
|
549
|
+
className: U.errorIcon
|
|
499
550
|
}), /* @__PURE__ */ I("p", {
|
|
500
|
-
className: m("text-center",
|
|
551
|
+
className: m("text-center", U.statusLabel),
|
|
501
552
|
children: n ? u : l
|
|
502
553
|
})]
|
|
503
554
|
});
|
|
@@ -505,8 +556,9 @@ var z = {
|
|
|
505
556
|
}
|
|
506
557
|
}, [
|
|
507
558
|
t,
|
|
508
|
-
|
|
509
|
-
|
|
559
|
+
F?.fontClassName,
|
|
560
|
+
F?.jsonClassName,
|
|
561
|
+
F?.xlsxFormulaLabelClassName,
|
|
510
562
|
r,
|
|
511
563
|
D,
|
|
512
564
|
s,
|
|
@@ -517,46 +569,47 @@ var z = {
|
|
|
517
569
|
g,
|
|
518
570
|
o,
|
|
519
571
|
O,
|
|
520
|
-
|
|
572
|
+
A,
|
|
521
573
|
j,
|
|
522
574
|
_,
|
|
523
|
-
ee,
|
|
524
575
|
v,
|
|
525
|
-
|
|
576
|
+
y,
|
|
526
577
|
x,
|
|
527
|
-
|
|
578
|
+
S,
|
|
528
579
|
T,
|
|
529
|
-
|
|
580
|
+
ee,
|
|
530
581
|
te,
|
|
531
582
|
ne,
|
|
532
|
-
|
|
583
|
+
re,
|
|
584
|
+
ae,
|
|
585
|
+
de,
|
|
533
586
|
R,
|
|
534
|
-
|
|
587
|
+
fe
|
|
535
588
|
]);
|
|
536
589
|
return /* @__PURE__ */ I("div", {
|
|
537
|
-
style: !n &&
|
|
538
|
-
className: m(n ? "flex h-full items-center justify-center" : V,
|
|
539
|
-
children: n ? /* @__PURE__ */ I(
|
|
590
|
+
style: !n && Se.has(t.type) ? B : void 0,
|
|
591
|
+
className: m(n ? "flex h-full items-center justify-center" : V, ce),
|
|
592
|
+
children: n ? /* @__PURE__ */ I(C, {}) : ge
|
|
540
593
|
});
|
|
541
|
-
}),
|
|
542
|
-
let [
|
|
543
|
-
|
|
544
|
-
}, [
|
|
545
|
-
|
|
546
|
-
}, [
|
|
547
|
-
|
|
548
|
-
}, [
|
|
549
|
-
|
|
594
|
+
}), we = 2e3, W = O(({ isOpen: e, isLoading: t = !1, onClose: n, content: a, fileName: o, labels: { ariaLabel: s, closeLabel: c = "Close", downloadLabel: l = "Download", copyTextLabel: u = "Copy text", copiedTextLabel: d = "Copied!", copyMarkdownLabel: f = "Copy as Markdown", copiedMarkdownLabel: p = "Copied!", copyJsonLabel: h = "Copy as JSON", copiedJsonLabel: g = "Copied!", visualizerErrorLabel: S, unsupportedLabel: C = "Preview is not supported for this file", loadErrorLabel: w = "Failed to load file", forbiddenErrorLabel: ie = "You don't have permission to access this file", htmlFrameBlockedLabel: E = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: D = "Open in new tab", htmlViewSourceLabel: O = "View source", htmlViewRenderedLabel: A = "View rendered", pdfThumbnailsLabel: M, pdfShowThumbnailsLabel: oe, pdfHideThumbnailsLabel: se, pdfPageNumberLabel: ce, pdfContentLoadingLabel: le, pdfContentErrorLabel: R, pdfContentRetryLabel: ue, xlsxFormulaLabel: de, codeContentLoadingLabel: fe, codeContentErrorLabel: pe, codeContentRetryLabel: z }, onDownload: me, onCopyText: B, onCopyMarkdown: he, onCopyJson: V, isMobile: ge = !1, defaultWidth: _e, minWidth: ve = 600, maxWidth: H = 1500, onResizeStop: ye, styles: U, codeBlockTheme: be, loadPdf: xe, configurePdfWorker: Se }) => {
|
|
595
|
+
let [W, Te] = P(!1), [Ee, G] = P(!1), [De, K] = P(!1), [q, Oe] = P(!1), J = N(null), Y = N(null), X = N(null), ke = k(() => {
|
|
596
|
+
B?.(), J.current != null && clearTimeout(J.current), Te(!0), J.current = setTimeout(() => Te(!1), we);
|
|
597
|
+
}, [B]), Ae = k(() => {
|
|
598
|
+
he?.(), Y.current != null && clearTimeout(Y.current), G(!0), Y.current = setTimeout(() => G(!1), we);
|
|
599
|
+
}, [he]), Z = k(() => {
|
|
600
|
+
V?.(), X.current != null && clearTimeout(X.current), K(!0), X.current = setTimeout(() => K(!1), we);
|
|
601
|
+
}, [V]);
|
|
602
|
+
j(() => () => {
|
|
550
603
|
J.current != null && clearTimeout(J.current), Y.current != null && clearTimeout(Y.current), X.current != null && clearTimeout(X.current);
|
|
551
604
|
}, []);
|
|
552
|
-
let
|
|
553
|
-
|
|
605
|
+
let je = k(() => {
|
|
606
|
+
Oe((e) => !e);
|
|
554
607
|
}, []);
|
|
555
|
-
|
|
556
|
-
|
|
608
|
+
j(() => {
|
|
609
|
+
Oe(!1);
|
|
557
610
|
}, [a]);
|
|
558
|
-
let { className:
|
|
559
|
-
return /* @__PURE__ */ I(
|
|
611
|
+
let { className: Me, panelStyles: Q, ...Ne } = U ?? {}, Pe = !t && a.type === i.Html && a.srcdoc != null, Fe = !t && B != null && (a.type === i.PlainText || a.type === i.Code), $ = !t && he != null && a.type === i.Markdown, Ie = !t && V != null && a.type === i.Json, Le = !t && me != null && r(a);
|
|
612
|
+
return /* @__PURE__ */ I(v, {
|
|
560
613
|
isOpen: e,
|
|
561
614
|
orientation: _.Right,
|
|
562
615
|
title: o,
|
|
@@ -565,118 +618,119 @@ var z = {
|
|
|
565
618
|
closeLabel: c
|
|
566
619
|
},
|
|
567
620
|
onClose: n,
|
|
568
|
-
resizable: !
|
|
569
|
-
defaultWidth:
|
|
570
|
-
minWidth:
|
|
571
|
-
maxWidth:
|
|
572
|
-
onResizeStop:
|
|
621
|
+
resizable: !ge,
|
|
622
|
+
defaultWidth: _e,
|
|
623
|
+
minWidth: ve,
|
|
624
|
+
maxWidth: H,
|
|
625
|
+
onResizeStop: ye,
|
|
573
626
|
styles: {
|
|
574
627
|
...Q,
|
|
575
628
|
titleClassName: Q?.titleClassName ?? "dial-h3-text",
|
|
576
629
|
headerClassName: m("border-b border-tertiary", Q?.headerClassName),
|
|
577
|
-
className: m(e ? "mobile:w-full mobile:max-w-full" : "w-0",
|
|
630
|
+
className: m(e ? "mobile:w-full mobile:max-w-full" : "w-0", Me, Q?.className)
|
|
578
631
|
},
|
|
579
|
-
rightActions:
|
|
580
|
-
|
|
581
|
-
icon: I(q ?
|
|
582
|
-
size:
|
|
583
|
-
stroke:
|
|
632
|
+
rightActions: Pe || Fe || $ || Ie || Le ? /* @__PURE__ */ L(F, { children: [
|
|
633
|
+
Pe && /* @__PURE__ */ I(x, {
|
|
634
|
+
icon: I(q ? re : ee, {
|
|
635
|
+
size: y.LG,
|
|
636
|
+
stroke: b,
|
|
584
637
|
"aria-hidden": !0
|
|
585
638
|
}),
|
|
586
|
-
"aria-label": q ?
|
|
639
|
+
"aria-label": q ? A : O,
|
|
587
640
|
"aria-pressed": q,
|
|
588
|
-
tooltipProps: { tooltip: q ?
|
|
589
|
-
onClick:
|
|
641
|
+
tooltipProps: { tooltip: q ? A : O },
|
|
642
|
+
onClick: je
|
|
590
643
|
}),
|
|
591
|
-
|
|
592
|
-
icon: I(
|
|
593
|
-
size:
|
|
594
|
-
stroke:
|
|
644
|
+
Fe && /* @__PURE__ */ I(x, {
|
|
645
|
+
icon: I(W ? T : te, {
|
|
646
|
+
size: y.LG,
|
|
647
|
+
stroke: b,
|
|
595
648
|
"aria-hidden": !0
|
|
596
649
|
}),
|
|
597
|
-
"aria-label":
|
|
598
|
-
tooltipProps: { tooltip:
|
|
599
|
-
onClick:
|
|
650
|
+
"aria-label": W ? d : u,
|
|
651
|
+
tooltipProps: { tooltip: W ? d : u },
|
|
652
|
+
onClick: ke
|
|
600
653
|
}),
|
|
601
|
-
$ && /* @__PURE__ */ I(
|
|
602
|
-
icon: I(
|
|
603
|
-
size:
|
|
604
|
-
stroke:
|
|
654
|
+
$ && /* @__PURE__ */ I(x, {
|
|
655
|
+
icon: I(Ee ? T : ae, {
|
|
656
|
+
size: y.LG,
|
|
657
|
+
stroke: b,
|
|
605
658
|
"aria-hidden": !0
|
|
606
659
|
}),
|
|
607
|
-
"aria-label":
|
|
608
|
-
tooltipProps: { tooltip:
|
|
609
|
-
onClick:
|
|
660
|
+
"aria-label": Ee ? p : f,
|
|
661
|
+
tooltipProps: { tooltip: Ee ? p : f },
|
|
662
|
+
onClick: Ae
|
|
610
663
|
}),
|
|
611
|
-
|
|
612
|
-
icon: I(
|
|
613
|
-
size:
|
|
614
|
-
stroke:
|
|
664
|
+
Ie && /* @__PURE__ */ I(x, {
|
|
665
|
+
icon: I(De ? T : te, {
|
|
666
|
+
size: y.LG,
|
|
667
|
+
stroke: b,
|
|
615
668
|
"aria-hidden": !0
|
|
616
669
|
}),
|
|
617
|
-
"aria-label":
|
|
618
|
-
tooltipProps: { tooltip:
|
|
670
|
+
"aria-label": De ? g : h,
|
|
671
|
+
tooltipProps: { tooltip: De ? g : h },
|
|
619
672
|
onClick: Z
|
|
620
673
|
}),
|
|
621
|
-
|
|
622
|
-
icon: /* @__PURE__ */ I(
|
|
623
|
-
size:
|
|
624
|
-
stroke:
|
|
674
|
+
Le && /* @__PURE__ */ I(x, {
|
|
675
|
+
icon: /* @__PURE__ */ I(ne, {
|
|
676
|
+
size: y.LG,
|
|
677
|
+
stroke: b
|
|
625
678
|
}),
|
|
626
679
|
"aria-label": l,
|
|
627
680
|
tooltipProps: { tooltip: l },
|
|
628
|
-
onClick:
|
|
681
|
+
onClick: me
|
|
629
682
|
})
|
|
630
683
|
] }) : null,
|
|
631
|
-
children: /* @__PURE__ */ I(
|
|
684
|
+
children: /* @__PURE__ */ I(Ce, {
|
|
632
685
|
content: a,
|
|
633
686
|
isLoading: t,
|
|
634
687
|
fileName: o,
|
|
635
688
|
isHtmlSourceView: q,
|
|
636
689
|
labels: {
|
|
637
|
-
unsupportedLabel:
|
|
638
|
-
loadErrorLabel:
|
|
639
|
-
forbiddenErrorLabel:
|
|
640
|
-
visualizerErrorLabel:
|
|
641
|
-
htmlFrameBlockedLabel:
|
|
642
|
-
htmlOpenInNewTabLabel:
|
|
643
|
-
pdfThumbnailsLabel:
|
|
644
|
-
pdfShowThumbnailsLabel:
|
|
645
|
-
pdfHideThumbnailsLabel:
|
|
690
|
+
unsupportedLabel: C,
|
|
691
|
+
loadErrorLabel: w,
|
|
692
|
+
forbiddenErrorLabel: ie,
|
|
693
|
+
visualizerErrorLabel: S,
|
|
694
|
+
htmlFrameBlockedLabel: E,
|
|
695
|
+
htmlOpenInNewTabLabel: D,
|
|
696
|
+
pdfThumbnailsLabel: M,
|
|
697
|
+
pdfShowThumbnailsLabel: oe,
|
|
698
|
+
pdfHideThumbnailsLabel: se,
|
|
646
699
|
pdfPageNumberLabel: ce,
|
|
647
|
-
pdfContentLoadingLabel:
|
|
648
|
-
pdfContentErrorLabel:
|
|
649
|
-
pdfContentRetryLabel:
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
700
|
+
pdfContentLoadingLabel: le,
|
|
701
|
+
pdfContentErrorLabel: R,
|
|
702
|
+
pdfContentRetryLabel: ue,
|
|
703
|
+
xlsxFormulaLabel: de,
|
|
704
|
+
codeContentLoadingLabel: fe,
|
|
705
|
+
codeContentErrorLabel: pe,
|
|
706
|
+
codeContentRetryLabel: z
|
|
653
707
|
},
|
|
654
|
-
styles:
|
|
655
|
-
codeBlockTheme:
|
|
656
|
-
loadPdf:
|
|
657
|
-
configurePdfWorker:
|
|
708
|
+
styles: Ne,
|
|
709
|
+
codeBlockTheme: be,
|
|
710
|
+
loadPdf: xe,
|
|
711
|
+
configurePdfWorker: Se
|
|
658
712
|
})
|
|
659
713
|
});
|
|
660
|
-
}),
|
|
714
|
+
}), Te = {
|
|
661
715
|
type: i.PlainText,
|
|
662
716
|
text: ""
|
|
663
|
-
},
|
|
717
|
+
}, Ee = (e) => {
|
|
664
718
|
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;
|
|
665
|
-
},
|
|
666
|
-
|
|
667
|
-
var
|
|
668
|
-
let [t, n] =
|
|
719
|
+
}, G = E(void 0);
|
|
720
|
+
G.displayName = "AttachmentCanvasContext";
|
|
721
|
+
var De = ({ children: e }) => {
|
|
722
|
+
let [t, n] = P(!1), [r, i] = P(!1), [a, o] = P(Te), [s, c] = P(void 0), [l, u] = P(void 0), d = k((e, t) => {
|
|
669
723
|
c(e), u(t), i(!0), n(!0);
|
|
670
|
-
}, []), f =
|
|
724
|
+
}, []), f = k((e, t, r) => {
|
|
671
725
|
o(e), c(t), u(r), i(!1), n(!0);
|
|
672
|
-
}, []), p =
|
|
673
|
-
o(
|
|
726
|
+
}, []), p = k(() => {
|
|
727
|
+
o(Te), n(!1), i(!1), u(void 0);
|
|
674
728
|
}, []);
|
|
675
|
-
return
|
|
676
|
-
let e =
|
|
729
|
+
return j(() => () => {
|
|
730
|
+
let e = Ee(a);
|
|
677
731
|
e != null && URL.revokeObjectURL(e);
|
|
678
|
-
}, [a]), /* @__PURE__ */ I(
|
|
679
|
-
value:
|
|
732
|
+
}, [a]), /* @__PURE__ */ I(G.Provider, {
|
|
733
|
+
value: M(() => ({
|
|
680
734
|
isOpen: t,
|
|
681
735
|
isLoading: r,
|
|
682
736
|
content: a,
|
|
@@ -697,24 +751,24 @@ var Te = ({ children: e }) => {
|
|
|
697
751
|
]),
|
|
698
752
|
children: e
|
|
699
753
|
});
|
|
700
|
-
},
|
|
701
|
-
let e =
|
|
754
|
+
}, K = () => {
|
|
755
|
+
let e = A(G);
|
|
702
756
|
if (!e) throw Error("useAttachmentCanvas must be used within an AttachmentCanvasProvider");
|
|
703
757
|
return e;
|
|
704
|
-
}, q =
|
|
705
|
-
let { ariaLabel: c = "Attachment preview", closeLabel: l = "Close", downloadLabel: u = "Download", unsupportedLabel: d = "Preview is not supported for this file", loadErrorLabel: f = "Failed to load file", forbiddenErrorLabel: m = "You don't have permission to access this file", copyTextLabel: h, copiedTextLabel: g, copyMarkdownLabel: _, copiedMarkdownLabel:
|
|
758
|
+
}, q = O(({ labels: e, isMobile: n = !1, defaultWidth: r, maxWidth: a, codeBlockTheme: o, configurePdfWorker: s }) => {
|
|
759
|
+
let { ariaLabel: c = "Attachment preview", closeLabel: l = "Close", downloadLabel: u = "Download", unsupportedLabel: d = "Preview is not supported for this file", loadErrorLabel: f = "Failed to load file", forbiddenErrorLabel: m = "You don't have permission to access this file", copyTextLabel: h, copiedTextLabel: g, copyMarkdownLabel: _, copiedMarkdownLabel: v, copyJsonLabel: y, copiedJsonLabel: b, htmlFrameBlockedLabel: x, htmlOpenInNewTabLabel: S, htmlViewSourceLabel: C, htmlViewRenderedLabel: w, pdfThumbnailsLabel: T, pdfShowThumbnailsLabel: ee, pdfHideThumbnailsLabel: te, pdfPageNumberLabel: ne, pdfContentLoadingLabel: re, pdfContentErrorLabel: ie, pdfContentRetryLabel: ae, xlsxFormulaLabel: E, codeContentLoadingLabel: D, codeContentErrorLabel: O, codeContentRetryLabel: A } = e ?? {}, { isOpen: j, isLoading: M, content: N, fileName: P, closeCanvas: oe } = K(), se = k(() => {
|
|
706
760
|
t(N, P);
|
|
707
|
-
}, [N, P]),
|
|
761
|
+
}, [N, P]), F = k(() => {
|
|
708
762
|
(N.type === i.PlainText || N.type === i.Code) && p(N.text);
|
|
709
|
-
}, [N]),
|
|
763
|
+
}, [N]), L = k(() => {
|
|
710
764
|
N.type === i.Markdown && p(N.text);
|
|
711
|
-
}, [N]),
|
|
765
|
+
}, [N]), ce = k(() => {
|
|
712
766
|
N.type === i.Json && p(JSON.stringify(N.value, null, 2));
|
|
713
767
|
}, [N]);
|
|
714
|
-
return /* @__PURE__ */ I(
|
|
768
|
+
return /* @__PURE__ */ I(W, {
|
|
715
769
|
isOpen: j,
|
|
716
770
|
isLoading: M,
|
|
717
|
-
onClose:
|
|
771
|
+
onClose: oe,
|
|
718
772
|
content: N,
|
|
719
773
|
fileName: P,
|
|
720
774
|
labels: {
|
|
@@ -724,71 +778,75 @@ var Te = ({ children: e }) => {
|
|
|
724
778
|
copyTextLabel: h,
|
|
725
779
|
copiedTextLabel: g,
|
|
726
780
|
copyMarkdownLabel: _,
|
|
727
|
-
copiedMarkdownLabel:
|
|
728
|
-
copyJsonLabel:
|
|
729
|
-
copiedJsonLabel:
|
|
781
|
+
copiedMarkdownLabel: v,
|
|
782
|
+
copyJsonLabel: y,
|
|
783
|
+
copiedJsonLabel: b,
|
|
730
784
|
unsupportedLabel: d,
|
|
731
785
|
loadErrorLabel: f,
|
|
732
786
|
forbiddenErrorLabel: m,
|
|
733
|
-
htmlFrameBlockedLabel:
|
|
734
|
-
htmlOpenInNewTabLabel:
|
|
735
|
-
htmlViewSourceLabel:
|
|
736
|
-
htmlViewRenderedLabel:
|
|
737
|
-
pdfThumbnailsLabel:
|
|
738
|
-
pdfShowThumbnailsLabel:
|
|
739
|
-
pdfHideThumbnailsLabel:
|
|
740
|
-
pdfPageNumberLabel:
|
|
741
|
-
pdfContentLoadingLabel:
|
|
742
|
-
pdfContentErrorLabel:
|
|
743
|
-
pdfContentRetryLabel:
|
|
787
|
+
htmlFrameBlockedLabel: x,
|
|
788
|
+
htmlOpenInNewTabLabel: S,
|
|
789
|
+
htmlViewSourceLabel: C,
|
|
790
|
+
htmlViewRenderedLabel: w,
|
|
791
|
+
pdfThumbnailsLabel: T,
|
|
792
|
+
pdfShowThumbnailsLabel: ee,
|
|
793
|
+
pdfHideThumbnailsLabel: te,
|
|
794
|
+
pdfPageNumberLabel: ne,
|
|
795
|
+
pdfContentLoadingLabel: re,
|
|
796
|
+
pdfContentErrorLabel: ie,
|
|
797
|
+
pdfContentRetryLabel: ae,
|
|
798
|
+
xlsxFormulaLabel: E,
|
|
744
799
|
codeContentLoadingLabel: D,
|
|
745
800
|
codeContentErrorLabel: O,
|
|
746
|
-
codeContentRetryLabel:
|
|
801
|
+
codeContentRetryLabel: A
|
|
747
802
|
},
|
|
748
|
-
onDownload:
|
|
749
|
-
onCopyText: N.type === i.PlainText || N.type === i.Code ?
|
|
750
|
-
onCopyMarkdown: N.type === i.Markdown ?
|
|
751
|
-
onCopyJson: N.type === i.Json ?
|
|
803
|
+
onDownload: se,
|
|
804
|
+
onCopyText: N.type === i.PlainText || N.type === i.Code ? F : void 0,
|
|
805
|
+
onCopyMarkdown: N.type === i.Markdown ? L : void 0,
|
|
806
|
+
onCopyJson: N.type === i.Json ? ce : void 0,
|
|
752
807
|
isMobile: n,
|
|
753
808
|
defaultWidth: r,
|
|
754
809
|
maxWidth: a,
|
|
755
810
|
codeBlockTheme: o,
|
|
756
811
|
configurePdfWorker: s
|
|
757
812
|
});
|
|
758
|
-
}),
|
|
813
|
+
}), Oe = new Set(["html", "htm"]), J = {
|
|
759
814
|
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
760
815
|
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
761
816
|
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
|
762
817
|
}, Y = 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(".")), X = {
|
|
763
818
|
docx: n.Docx,
|
|
764
819
|
xlsx: n.Xlsx,
|
|
765
|
-
pptx: n.Pptx
|
|
766
|
-
|
|
820
|
+
pptx: n.Pptx,
|
|
821
|
+
csv: n.Csv
|
|
822
|
+
}, ke = {
|
|
767
823
|
[J.docx]: n.Docx,
|
|
768
824
|
[J.xlsx]: n.Xlsx,
|
|
769
|
-
[J.pptx]: n.Pptx
|
|
770
|
-
|
|
825
|
+
[J.pptx]: n.Pptx,
|
|
826
|
+
[u.CSV]: n.Csv
|
|
827
|
+
}, Ae = {
|
|
771
828
|
[n.Docx]: J.docx,
|
|
772
829
|
[n.Xlsx]: J.xlsx,
|
|
773
|
-
[n.Pptx]: J.pptx
|
|
830
|
+
[n.Pptx]: J.pptx,
|
|
831
|
+
[n.Csv]: u.CSV
|
|
774
832
|
}, Z = (e, t) => {
|
|
775
833
|
let n = t?.split(";", 1)[0].trim().toLowerCase();
|
|
776
834
|
if (n != null) {
|
|
777
|
-
let e =
|
|
835
|
+
let e = ke[n];
|
|
778
836
|
if (e != null) return e;
|
|
779
837
|
}
|
|
780
838
|
let r = e.lastIndexOf(".");
|
|
781
839
|
if (r !== -1) return X[e.slice(r + 1).toLowerCase()];
|
|
782
|
-
},
|
|
840
|
+
}, je = (e, t) => Z(e, t) != null, Me = (e, t) => {
|
|
783
841
|
let n = Z(e, t);
|
|
784
|
-
return n == null ? void 0 :
|
|
842
|
+
return n == null ? void 0 : Ae[n];
|
|
785
843
|
}, Q = (e) => {
|
|
786
844
|
let t = e.lastIndexOf(".");
|
|
787
845
|
return t === -1 ? !1 : Y.has(e.slice(t + 1).toLowerCase());
|
|
788
|
-
},
|
|
846
|
+
}, Ne = (e) => {
|
|
789
847
|
let t = e.lastIndexOf(".");
|
|
790
|
-
return t === -1 ? !1 :
|
|
791
|
-
},
|
|
848
|
+
return t === -1 ? !1 : Oe.has(e.slice(t + 1).toLowerCase());
|
|
849
|
+
}, Pe = {
|
|
792
850
|
xml: "xml",
|
|
793
851
|
csv: "plaintext",
|
|
794
852
|
tsv: "plaintext",
|
|
@@ -836,21 +894,21 @@ var Te = ({ children: e }) => {
|
|
|
836
894
|
gitignore: "plaintext",
|
|
837
895
|
dockerfile: "plaintext",
|
|
838
896
|
makefile: "plaintext"
|
|
839
|
-
},
|
|
897
|
+
}, Fe = (e) => Pe[e], $ = (e) => ({
|
|
840
898
|
type: i.Unsupported,
|
|
841
899
|
...e != null && { url: e }
|
|
842
|
-
}),
|
|
900
|
+
}), Ie = (t) => ({
|
|
843
901
|
type: i.Error,
|
|
844
902
|
errorType: e.LoadFailed,
|
|
845
903
|
...t != null && { url: t }
|
|
846
|
-
}),
|
|
904
|
+
}), Le = (t) => ({
|
|
847
905
|
type: i.Error,
|
|
848
906
|
errorType: e.Forbidden,
|
|
849
907
|
...t != null && { url: t }
|
|
850
|
-
}),
|
|
908
|
+
}), Re = (e, t) => {
|
|
851
909
|
let n = e.toLowerCase();
|
|
852
910
|
return t.find((e) => e.contentType.split(",").some((e) => e.trim().toLowerCase() === n && e.trim() !== ""));
|
|
853
|
-
},
|
|
911
|
+
}, ze = (e) => {
|
|
854
912
|
let t;
|
|
855
913
|
try {
|
|
856
914
|
t = new URL(e).pathname;
|
|
@@ -863,13 +921,13 @@ var Te = ({ children: e }) => {
|
|
|
863
921
|
} catch {
|
|
864
922
|
return n;
|
|
865
923
|
}
|
|
866
|
-
},
|
|
867
|
-
let { openCanvas: n, openCanvasLoading: r, closeCanvas: a } =
|
|
924
|
+
}, Be = (e, t) => {
|
|
925
|
+
let { openCanvas: n, openCanvasLoading: r, closeCanvas: a } = K(), { customVisualizers: s, themeId: c, onBeforeOpen: d } = t, f = k(async (t, r) => {
|
|
868
926
|
if (t.url == null && t.referenceUrl != null) {
|
|
869
927
|
let i = e.resolveReferencePdfContent(t);
|
|
870
928
|
if (i != null) return n(i, t.name, r), !0;
|
|
871
929
|
}
|
|
872
|
-
let a = t.contentType.toLowerCase(), o =
|
|
930
|
+
let a = t.contentType.toLowerCase(), o = Re(a, s);
|
|
873
931
|
if (o != null) {
|
|
874
932
|
let i = await e.resolveVisualizerContent(t, o, c);
|
|
875
933
|
if (i != null) return n(i, t.name, r), !0;
|
|
@@ -902,7 +960,7 @@ var Te = ({ children: e }) => {
|
|
|
902
960
|
return i == null ? !1 : (n(i, t.name, r), !0);
|
|
903
961
|
}
|
|
904
962
|
}
|
|
905
|
-
let g = t.name != null &&
|
|
963
|
+
let g = t.name != null && Ne(t.name) || t.url != null && Ne(ze(t.url));
|
|
906
964
|
if (t.name != null && !Q(t.name) && !g) return n($(e.resolveContentUrl(t)), t.name, r), !0;
|
|
907
965
|
if (g) {
|
|
908
966
|
let a = await e.resolveHtmlContent(t);
|
|
@@ -911,7 +969,7 @@ var Te = ({ children: e }) => {
|
|
|
911
969
|
url: t.url
|
|
912
970
|
}, t.name, r), !0) : (n(a, t.name, r), !0);
|
|
913
971
|
}
|
|
914
|
-
let _ = await e.resolveCodeContent(t,
|
|
972
|
+
let _ = await e.resolveCodeContent(t, Fe(m));
|
|
915
973
|
return _ == null ? !1 : (n(_, t.name, r), !0);
|
|
916
974
|
}, [
|
|
917
975
|
n,
|
|
@@ -919,7 +977,7 @@ var Te = ({ children: e }) => {
|
|
|
919
977
|
c,
|
|
920
978
|
e
|
|
921
979
|
]);
|
|
922
|
-
return { openAttachmentCanvas:
|
|
980
|
+
return { openAttachmentCanvas: k(async (t, s = t.id) => {
|
|
923
981
|
switch (t.type) {
|
|
924
982
|
case o.Image: {
|
|
925
983
|
let r = e.resolveImageContent(t);
|
|
@@ -956,4 +1014,4 @@ var Te = ({ children: e }) => {
|
|
|
956
1014
|
]) };
|
|
957
1015
|
};
|
|
958
1016
|
//#endregion
|
|
959
|
-
export {
|
|
1017
|
+
export { W as AttachmentCanvas, Ce as AttachmentCanvasBody, q as AttachmentCanvasContainer, De as AttachmentCanvasProvider, i as AttachmentContentType, e as AttachmentErrorType, pe as CodeContent, n as OoxmlFileType, Le as createForbiddenCanvasContent, Ie as createLoadErrorCanvasContent, $ as createUnsupportedCanvasContent, t as downloadAttachmentContent, Fe as extensionToLanguage, Re as findVisualizerForMime, Z as getOoxmlFileType, Me as getOoxmlMimeType, r as isDownloadable, Ne as isHtmlPreviewable, je as isOoxmlPreviewable, Q as isTextPreviewable, K as useAttachmentCanvas, Be as useOpenAttachmentCanvas };
|