@epam/ai-dial-attachment-canvas 1.1.0-dev.43 → 1.1.0-dev.430
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-9fvYBGuL.js +171 -0
- package/PdfContent-BexpRNO0.js +239 -0
- package/PdfContent.css +1 -0
- package/bounded-raw-part-cache-BfbSxRIL-DD07NKh9.js +37832 -0
- 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 +1 -0
- package/components/AttachmentCanvas/AttachmentCanvas.d.ts.map +1 -1
- package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts +4 -0
- package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts.map +1 -0
- package/components/AttachmentCanvasContainer/AttachmentCanvasContainer.d.ts +14 -0
- package/components/AttachmentCanvasContainer/AttachmentCanvasContainer.d.ts.map +1 -1
- package/components/CodeContent/CodeContent.d.ts +24 -0
- package/components/CodeContent/CodeContent.d.ts.map +1 -0
- package/components/HtmlContent/HtmlContent.d.ts +21 -0
- package/components/HtmlContent/HtmlContent.d.ts.map +1 -0
- package/components/LazyContentBoundary/LazyContentBoundary.d.ts +73 -0
- package/components/LazyContentBoundary/LazyContentBoundary.d.ts.map +1 -0
- package/components/McpAppCanvasRenderer/McpAppCanvasRenderer.d.ts +12 -0
- package/components/McpAppCanvasRenderer/McpAppCanvasRenderer.d.ts.map +1 -0
- package/components/OoxmlContent/OoxmlContent.d.ts +18 -0
- package/components/OoxmlContent/OoxmlContent.d.ts.map +1 -0
- package/components/PdfContent/PdfContent.d.ts +56 -0
- package/components/PdfContent/PdfContent.d.ts.map +1 -1
- package/components/VisualizerCanvasRenderer/VisualizerCanvasRenderer.d.ts +25 -0
- package/components/VisualizerCanvasRenderer/VisualizerCanvasRenderer.d.ts.map +1 -0
- package/constants/file.d.ts +8 -0
- package/constants/file.d.ts.map +1 -1
- package/context/AttachmentCanvasContext.d.ts +5 -3
- package/context/AttachmentCanvasContext.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 +64 -0
- package/hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas.d.ts.map +1 -0
- package/index.css +1 -2
- package/index.d.ts +11 -3
- package/index.d.ts.map +1 -1
- package/index.js +976 -17253
- package/line-distribute-IsUGfHXm-DeITjLzJ.js +1234 -0
- package/line-metrics-CBbw80Ko-DoOuwYxZ.js +60 -0
- package/models/attachment-canvas.d.ts +243 -11
- package/models/attachment-canvas.d.ts.map +1 -1
- package/package.json +17 -9
- 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 +13 -0
- package/types/attachment-canvas.d.ts.map +1 -1
- package/utils/content.d.ts +11 -0
- package/utils/content.d.ts.map +1 -1
- package/utils/download.d.ts.map +1 -1
- package/utils/visualizer.d.ts +8 -0
- package/utils/visualizer.d.ts.map +1 -0
- package/utils/vite-external-matcher.d.ts +16 -0
- package/utils/vite-external-matcher.d.ts.map +1 -0
- package/visible-index-DPoQYSDt-9lRc-2Ik.js +162 -0
- package/xlsx-BAXMTJTG.js +8585 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//#region ../../node_modules/@silurus/ooxml/dist/line-metrics-CBbw80Ko.js
|
|
2
|
+
var e = [
|
|
3
|
+
[(e) => e.includes("meiryo ui") || e.includes("meiryoui") || e.includes("メイリオ") && e.includes("ui"), {
|
|
4
|
+
asc: 2171 * 1.3 / 2048,
|
|
5
|
+
desc: 430 * 1.3 / 2048,
|
|
6
|
+
eaOnly: !0
|
|
7
|
+
}],
|
|
8
|
+
[(e) => e.includes("meiryo") || e.includes("メイリオ"), {
|
|
9
|
+
asc: 2210 / 2048,
|
|
10
|
+
desc: 1059 / 2048
|
|
11
|
+
}],
|
|
12
|
+
[(e) => !e.includes("ui") && (e.includes("yu mincho") || e.includes("yumincho") || e.includes("游明朝") || e.includes("yu gothic") || e.includes("yugothic") || e.includes("游ゴシック")), {
|
|
13
|
+
asc: 1802 * 1.3 / 2048,
|
|
14
|
+
desc: 455 * 1.3 / 2048,
|
|
15
|
+
eaOnly: !0
|
|
16
|
+
}],
|
|
17
|
+
[(e) => e.includes("sakkal majalla") || e.includes("majalla"), {
|
|
18
|
+
asc: 1810 / 2048,
|
|
19
|
+
desc: 1050 / 2048
|
|
20
|
+
}],
|
|
21
|
+
[(e) => e === "times new roman", {
|
|
22
|
+
asc: 1825 / 2048,
|
|
23
|
+
desc: 530 / 2048
|
|
24
|
+
}],
|
|
25
|
+
[(e) => e === "arial", {
|
|
26
|
+
asc: 1854 / 2048,
|
|
27
|
+
desc: 501 / 2048
|
|
28
|
+
}]
|
|
29
|
+
];
|
|
30
|
+
function t(t, n) {
|
|
31
|
+
if (!t) return null;
|
|
32
|
+
let r = t.toLowerCase();
|
|
33
|
+
for (let [t, i] of e) if (t(r) && (n || !i.eaOnly)) return i;
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
function n(e, n = !1) {
|
|
37
|
+
let r = t(e, n);
|
|
38
|
+
return r === null ? null : r.asc + r.desc;
|
|
39
|
+
}
|
|
40
|
+
function r(e, t, r = !1) {
|
|
41
|
+
let i = n(e, r);
|
|
42
|
+
return i === null ? 0 : i * t;
|
|
43
|
+
}
|
|
44
|
+
function i(e, n, r, i, a = !1) {
|
|
45
|
+
let o = t(e, a);
|
|
46
|
+
if (o === null) return {
|
|
47
|
+
ascent: r,
|
|
48
|
+
descent: i
|
|
49
|
+
};
|
|
50
|
+
let s = (o.asc + o.desc) * n;
|
|
51
|
+
return r + i <= s ? {
|
|
52
|
+
ascent: r,
|
|
53
|
+
descent: i
|
|
54
|
+
} : {
|
|
55
|
+
ascent: o.asc * n,
|
|
56
|
+
descent: o.desc * n
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { r as n, i as t };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { CodeBlockTheme } from '@epam/ai-dial-chat-shared';
|
|
1
|
+
import { CodeBlockTheme, CustomVisualizerDataLayout } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
import { SidebarPanelStyles } from '@epam/ai-dial-sidebar';
|
|
3
3
|
import { InputHighlightData } from '@epam/pdf-highlighter-kit';
|
|
4
|
+
import { McpUiHostContext } from '@mcp-ui/client';
|
|
5
|
+
import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
4
6
|
import { CSSProperties } from 'react';
|
|
5
|
-
import { AttachmentContentType, AttachmentErrorType } from '../types/attachment-canvas';
|
|
7
|
+
import { AttachmentContentType, AttachmentErrorType, OoxmlFileType } from '../types/attachment-canvas';
|
|
6
8
|
/** Content payload for plain-text attachments. */
|
|
7
9
|
export interface PlainTextCanvasContent {
|
|
8
10
|
/** Discriminates the content type to select the correct renderer. */
|
|
@@ -24,6 +26,13 @@ export interface MarkdownCanvasContent {
|
|
|
24
26
|
/** Raw Markdown string to render. */
|
|
25
27
|
text: string;
|
|
26
28
|
}
|
|
29
|
+
/** Content payload for a Markdown table opened standalone (e.g. via a table's "open in canvas" action). */
|
|
30
|
+
export interface MarkdownTableCanvasContent {
|
|
31
|
+
/** Discriminates the content type to select the correct renderer. */
|
|
32
|
+
type: AttachmentContentType.MarkdownTable;
|
|
33
|
+
/** The table serialized back to Markdown syntax. */
|
|
34
|
+
text: string;
|
|
35
|
+
}
|
|
27
36
|
/** Content payload for JSON file attachments. */
|
|
28
37
|
export interface JsonCanvasContent {
|
|
29
38
|
/** Discriminates the content type to select the correct renderer. */
|
|
@@ -41,6 +50,17 @@ export interface PdfCanvasContent {
|
|
|
41
50
|
highlights?: InputHighlightData[];
|
|
42
51
|
/** ID of the highlight to scroll to and select on initial load. */
|
|
43
52
|
selectedHighlightId?: string;
|
|
53
|
+
/** 1-based page to navigate to on initial load, independent of highlight geometry. */
|
|
54
|
+
page?: number;
|
|
55
|
+
}
|
|
56
|
+
/** Content payload for OOXML document and CSV spreadsheet attachments. */
|
|
57
|
+
export interface OoxmlCanvasContent {
|
|
58
|
+
/** Discriminates the content type to select the correct renderer. */
|
|
59
|
+
type: AttachmentContentType.Ooxml;
|
|
60
|
+
/** Resolved download URL or object URL for the source file. */
|
|
61
|
+
url: string;
|
|
62
|
+
/** The document format used to select and configure the format-specific renderer. */
|
|
63
|
+
format: OoxmlFileType;
|
|
44
64
|
}
|
|
45
65
|
/** Content payload for audio file attachments. */
|
|
46
66
|
export interface AudioCanvasContent {
|
|
@@ -51,6 +71,62 @@ export interface AudioCanvasContent {
|
|
|
51
71
|
/** MIME type forwarded to the `<audio>` element (e.g. `audio/webm`). */
|
|
52
72
|
mimeType?: string;
|
|
53
73
|
}
|
|
74
|
+
/** Content payload for syntax-highlighted source-code or text file attachments. */
|
|
75
|
+
export interface CodeCanvasContent {
|
|
76
|
+
/** Discriminates the content type to select the correct renderer. */
|
|
77
|
+
type: AttachmentContentType.Code;
|
|
78
|
+
/** The raw source text to display. */
|
|
79
|
+
text: string;
|
|
80
|
+
/** `react-syntax-highlighter` language identifier (e.g. `'typescript'`). `undefined` renders plain monospace. */
|
|
81
|
+
language?: string;
|
|
82
|
+
}
|
|
83
|
+
/** Content payload for HTML file attachments or external HTML URL sources. */
|
|
84
|
+
export interface HtmlCanvasContent {
|
|
85
|
+
/** Discriminates the content type to select the correct renderer. */
|
|
86
|
+
type: AttachmentContentType.Html;
|
|
87
|
+
/** Full HTML text rendered via `srcdoc` in a sandboxed iframe. Used for file attachments. */
|
|
88
|
+
srcdoc?: string;
|
|
89
|
+
/** External URL rendered via `src` in a sandboxed iframe. Used for external link sources. */
|
|
90
|
+
url?: string;
|
|
91
|
+
}
|
|
92
|
+
/** Content payload for a custom-visualizer attachment rendered inside a sandboxed iframe. */
|
|
93
|
+
export interface VisualizerCanvasContent {
|
|
94
|
+
/** Discriminates the content type to select the correct renderer. */
|
|
95
|
+
type: AttachmentContentType.Visualizer;
|
|
96
|
+
/** Iframe `src`, resolved from the matching registry entry's `url`. */
|
|
97
|
+
url: string;
|
|
98
|
+
/** The attachment's own MIME type (not the registry entry's raw, possibly comma-separated, `contentType`). */
|
|
99
|
+
mimeType: string;
|
|
100
|
+
/** Opaque attachment payload consumed by the visualizer. */
|
|
101
|
+
data: unknown;
|
|
102
|
+
/** Presentation layout hints (`themeId`, `width`, `height`, `mobileHeight`). */
|
|
103
|
+
layout: CustomVisualizerDataLayout;
|
|
104
|
+
/** postMessage protocol namespace — MUST equal the registry entry's `title`, or the iframe never receives data. */
|
|
105
|
+
visualizerName: string;
|
|
106
|
+
/** Milliseconds to wait for a `send()` request's response before rejecting. From the registry entry; does NOT bound the handshake. */
|
|
107
|
+
requestTimeout?: number;
|
|
108
|
+
}
|
|
109
|
+
/** Content payload for an MCP App's `ui://` resource, rendered in a sandboxed iframe via an isolated-origin sandbox proxy. */
|
|
110
|
+
export interface McpAppCanvasContent {
|
|
111
|
+
/** Discriminates the content type to select the correct renderer. */
|
|
112
|
+
type: AttachmentContentType.McpApp;
|
|
113
|
+
/** HTML body of the tool's `ui://` resource, fetched by the app layer — never fetched by this lib. */
|
|
114
|
+
html: string;
|
|
115
|
+
/** Isolated-origin URL of the MCP Apps sandbox-proxy page, resolved by the app layer from its own config. */
|
|
116
|
+
sandboxUrl: string;
|
|
117
|
+
/** Name of the tool call that produced this resource, forwarded on every `onToolCall`. */
|
|
118
|
+
toolName: string;
|
|
119
|
+
/** Arguments of the original tool call that produced this resource, passed to the mounted app so it renders that invocation immediately instead of an empty initial state. */
|
|
120
|
+
toolInput?: Record<string, unknown>;
|
|
121
|
+
/** Result of the original tool call that produced this resource, passed to the mounted app so it renders that invocation immediately instead of an empty initial state. */
|
|
122
|
+
toolResult?: CallToolResult;
|
|
123
|
+
/** UI context delivered to the View during the `ui/initialize` handshake; built by the app layer from the active theme, locale, and CSS design tokens. */
|
|
124
|
+
hostContext?: McpUiHostContext;
|
|
125
|
+
/** Forwards a `tools/call` request issued by the mounted app to the owning MCP session via the app layer. */
|
|
126
|
+
onToolCall: (name: string, args: unknown) => Promise<CallToolResult>;
|
|
127
|
+
/** Re-fetches the resource and re-resolves the tool result from scratch, bypassing any cache the app layer keeps. Shows a reload action in the canvas header when provided; omit to hide it. */
|
|
128
|
+
onReload?: () => void;
|
|
129
|
+
}
|
|
54
130
|
/** Content payload for attachments whose format cannot be previewed. */
|
|
55
131
|
export interface UnsupportedCanvasContent {
|
|
56
132
|
/** Discriminates the content type to select the correct renderer. */
|
|
@@ -66,15 +142,57 @@ export interface ErrorCanvasContent {
|
|
|
66
142
|
errorType: AttachmentErrorType;
|
|
67
143
|
/** Remote URL of the file, if known. Ignored for download purposes when `errorType` is `Forbidden`. */
|
|
68
144
|
url?: string;
|
|
145
|
+
/** Overrides the default `loadErrorLabel`/`forbiddenErrorLabel` message, for callers whose failed content isn't a generic "file" (e.g. an MCP App). */
|
|
146
|
+
label?: string;
|
|
69
147
|
}
|
|
70
148
|
/** The content payload passed to AttachmentCanvas. */
|
|
71
|
-
export type AttachmentCanvasContent = PlainTextCanvasContent | ImageCanvasContent | AudioCanvasContent | MarkdownCanvasContent | JsonCanvasContent | PdfCanvasContent | UnsupportedCanvasContent | ErrorCanvasContent;
|
|
149
|
+
export type AttachmentCanvasContent = PlainTextCanvasContent | ImageCanvasContent | AudioCanvasContent | MarkdownCanvasContent | MarkdownTableCanvasContent | JsonCanvasContent | PdfCanvasContent | OoxmlCanvasContent | CodeCanvasContent | HtmlCanvasContent | VisualizerCanvasContent | McpAppCanvasContent | UnsupportedCanvasContent | ErrorCanvasContent;
|
|
72
150
|
/** Themeable color overrides for the AttachmentCanvas content body. */
|
|
73
151
|
export interface AttachmentCanvasColors {
|
|
74
152
|
/** Primary text color for the content body. */
|
|
75
153
|
text?: string;
|
|
154
|
+
/** Status/summary line text color. Defaults to `--text-secondary`. */
|
|
155
|
+
statusText?: string;
|
|
156
|
+
/** Error icon color. Defaults to `--text-error`. */
|
|
157
|
+
errorIcon?: string;
|
|
158
|
+
/** "Open in new tab" link color in the blocked-iframe panel. Defaults to `--text-accent`. */
|
|
159
|
+
openInNewTabText?: string;
|
|
160
|
+
/** Border color of the JSON viewer wrapper. Defaults to `--stroke-secondary`. */
|
|
161
|
+
jsonBorder?: string;
|
|
162
|
+
/** Background color of the JSON viewer wrapper. Defaults to `--bg-layer-base`. */
|
|
163
|
+
jsonBackground?: string;
|
|
164
|
+
/** JSON key/label color. Defaults to `--text-primary`. */
|
|
165
|
+
jsonLabel?: string;
|
|
166
|
+
/** JSON expandable key/label color. Defaults to `--text-primary`. */
|
|
167
|
+
jsonClickableLabel?: string;
|
|
168
|
+
/** JSON punctuation (braces, commas, colons) color. Defaults to `--text-secondary`. */
|
|
169
|
+
jsonPunctuation?: string;
|
|
170
|
+
/** JSON string-literal color. Defaults to `--text-success`. */
|
|
171
|
+
jsonString?: string;
|
|
172
|
+
/** JSON number-literal color. Defaults to `--text-accent`. */
|
|
173
|
+
jsonNumber?: string;
|
|
174
|
+
/** JSON boolean-literal color. Defaults to `--text-warning`. */
|
|
175
|
+
jsonBoolean?: string;
|
|
176
|
+
/** JSON `null`-literal color. Defaults to `--text-secondary`. */
|
|
177
|
+
jsonNull?: string;
|
|
178
|
+
/** Expand/collapse triangle color. Defaults to `--text-secondary`. */
|
|
179
|
+
jsonToggleIcon?: string;
|
|
180
|
+
/** Expand/collapse triangle color on hover. Defaults to `--text-primary`. */
|
|
181
|
+
jsonToggleIconHover?: string;
|
|
182
|
+
/** Background color of the OOXML/CSV viewer surface and its loading/error overlay. Defaults to `--bg-layer-raised`. */
|
|
183
|
+
ooxmlBackground?: string;
|
|
184
|
+
/** Border color of the XLSX formula panel and value field. Defaults to `--stroke-secondary`. */
|
|
185
|
+
ooxmlFormulaBorder?: string;
|
|
186
|
+
/** Background color of the XLSX formula value field. Defaults to `--bg-layer-base`. */
|
|
187
|
+
ooxmlFormulaBackground?: string;
|
|
188
|
+
/** Text color of the XLSX formula panel. Defaults to `--text-primary`. */
|
|
189
|
+
ooxmlFormulaText?: string;
|
|
190
|
+
/** Text color of the collapsed-content ellipsis. Defaults to `--text-secondary`. */
|
|
191
|
+
jsonCollapsedText?: string;
|
|
192
|
+
/** Background color of the collapsed-content ellipsis. Defaults to `--bg-layer-raised`. */
|
|
193
|
+
jsonCollapsedBackground?: string;
|
|
76
194
|
}
|
|
77
|
-
/** Themeable typography overrides for the AttachmentCanvas content body. */
|
|
195
|
+
/** Themeable typography overrides for the AttachmentCanvas plain-text content body. */
|
|
78
196
|
export interface AttachmentCanvasTypography {
|
|
79
197
|
/** CSS font-family value. */
|
|
80
198
|
fontFamily?: string;
|
|
@@ -87,27 +205,33 @@ export interface AttachmentCanvasTypography {
|
|
|
87
205
|
/** CSS letter-spacing value. */
|
|
88
206
|
letterSpacing?: string;
|
|
89
207
|
/**
|
|
90
|
-
* A single CSS utility class applied to the content body instead of
|
|
91
|
-
* individual typography
|
|
92
|
-
* are ignored.
|
|
208
|
+
* A single CSS utility class applied to the content body instead of the
|
|
209
|
+
* individual typography fields above. When set, those fields are ignored.
|
|
93
210
|
*/
|
|
94
211
|
fontClassName?: string;
|
|
212
|
+
/** CSS utility class applied to the JSON tree viewer. Defaults to `'dial-code-text'`. */
|
|
213
|
+
jsonClassName?: string;
|
|
214
|
+
/** CSS utility class applied to the decorative XLSX `fx` label. Defaults to `'dial-italic-text'`. */
|
|
215
|
+
xlsxFormulaLabelClassName?: string;
|
|
95
216
|
}
|
|
96
|
-
/**
|
|
97
|
-
export interface
|
|
217
|
+
/** Style override prop for `AttachmentCanvasBody`'s content-rendering area. */
|
|
218
|
+
export interface AttachmentCanvasBodyStyles {
|
|
98
219
|
/** Color overrides for the content body, applied as CSS custom properties. */
|
|
99
220
|
colors?: AttachmentCanvasColors;
|
|
100
221
|
/** Typography overrides for the content body. */
|
|
101
222
|
typography?: AttachmentCanvasTypography;
|
|
102
223
|
/** Extra class name(s) merged onto the scrollable content body element. */
|
|
103
224
|
bodyClassName?: string;
|
|
104
|
-
/** Extra class name(s) merged onto the panel width wrapper. */
|
|
105
|
-
className?: string;
|
|
106
225
|
/**
|
|
107
226
|
* Arbitrary CSS custom properties applied inline to the content body.
|
|
108
227
|
* Merged after the typed color/typography vars, so they can override them.
|
|
109
228
|
*/
|
|
110
229
|
cssVars?: CSSProperties;
|
|
230
|
+
}
|
|
231
|
+
/** Combined style override prop for AttachmentCanvas. */
|
|
232
|
+
export interface AttachmentCanvasStyles extends AttachmentCanvasBodyStyles {
|
|
233
|
+
/** Extra class name(s) merged onto the panel width wrapper. */
|
|
234
|
+
className?: string;
|
|
111
235
|
/** Style overrides forwarded to the underlying SidebarPanel (panel chrome). */
|
|
112
236
|
panelStyles?: SidebarPanelStyles;
|
|
113
237
|
}
|
|
@@ -137,6 +261,50 @@ export interface AttachmentCanvasLabels {
|
|
|
137
261
|
copyJsonLabel?: string;
|
|
138
262
|
/** Tooltip and accessible label for the copy-JSON button after a successful copy. Defaults to `'Copied!'`. */
|
|
139
263
|
copiedJsonLabel?: string;
|
|
264
|
+
/** Message shown inside the visualizer canvas when the iframe handshake fails. Defaults to `'Failed to load visualizer'`. */
|
|
265
|
+
visualizerErrorLabel?: string;
|
|
266
|
+
/** Message shown when a URL-sourced iframe is blocked by the page's CSP or X-Frame-Options. Defaults to `'This page cannot be displayed in preview'`. */
|
|
267
|
+
htmlFrameBlockedLabel?: string;
|
|
268
|
+
/** Label for the "Open in new tab" fallback link shown alongside `htmlFrameBlockedLabel`. Defaults to `'Open in new tab'`. */
|
|
269
|
+
htmlOpenInNewTabLabel?: string;
|
|
270
|
+
/** Tooltip and `aria-label` for the toggle button when the rendered view is active (clicking switches to source). Defaults to `'View source'`. */
|
|
271
|
+
htmlViewSourceLabel?: string;
|
|
272
|
+
/** Tooltip and `aria-label` for the toggle button when the source view is active (clicking switches back to rendered). Defaults to `'View rendered'`. */
|
|
273
|
+
htmlViewRenderedLabel?: string;
|
|
274
|
+
/** Tooltip and accessible label for the MCP App reload button. Only shown when content type is `McpApp` and `content.onReload` is provided. Defaults to `'Reload'`. */
|
|
275
|
+
mcpAppReloadLabel?: string;
|
|
276
|
+
/** Accessible name for the PDF viewer's floating thumbnails panel region. Defaults to `'Thumbnails'`. */
|
|
277
|
+
pdfThumbnailsLabel?: string;
|
|
278
|
+
/** Accessible label for the FAB button that opens the PDF thumbnails panel. Defaults to `'Show thumbnails'`. */
|
|
279
|
+
pdfShowThumbnailsLabel?: string;
|
|
280
|
+
/** Accessible label for the FAB button that closes the PDF thumbnails panel. Defaults to `'Hide thumbnails'`. */
|
|
281
|
+
pdfHideThumbnailsLabel?: string;
|
|
282
|
+
/** Accessible label for the current-page number input at the top of the PDF thumbnails panel. Defaults to `'Page number'`. */
|
|
283
|
+
pdfPageNumberLabel?: string;
|
|
284
|
+
/** Accessible status text announced while the PDF viewer's dynamic import is loading. Defaults to `'Loading…'`. */
|
|
285
|
+
pdfContentLoadingLabel?: string;
|
|
286
|
+
/** Message shown when the PDF viewer's dynamic import fails to load. Defaults to `'Failed to load content'`. */
|
|
287
|
+
pdfContentErrorLabel?: string;
|
|
288
|
+
/** Label and accessible name for the retry control shown alongside `pdfContentErrorLabel`. Defaults to `'Retry'`. */
|
|
289
|
+
pdfContentRetryLabel?: string;
|
|
290
|
+
/** Accessible label for the active XLSX cell's formula panel. Defaults to `'Formula'`. */
|
|
291
|
+
xlsxFormulaLabel?: string;
|
|
292
|
+
/** Accessible status text announced while the syntax-highlighter engine's dynamic import is loading. Defaults to `'Loading…'`. */
|
|
293
|
+
codeContentLoadingLabel?: string;
|
|
294
|
+
/** Message shown when the syntax-highlighter engine's dynamic import fails to load. Defaults to `'Failed to load content'`. */
|
|
295
|
+
codeContentErrorLabel?: string;
|
|
296
|
+
/** Label and accessible name for the retry control shown alongside `codeContentErrorLabel`. Defaults to `'Retry'`. */
|
|
297
|
+
codeContentRetryLabel?: string;
|
|
298
|
+
/** Label for copying a Markdown table as CSV. */
|
|
299
|
+
tableCopyCsvLabel?: string;
|
|
300
|
+
/** Label for copying a Markdown table as text. */
|
|
301
|
+
tableCopyTxtLabel?: string;
|
|
302
|
+
/** Label for copying a Markdown table as Markdown. */
|
|
303
|
+
tableCopyMarkdownLabel?: string;
|
|
304
|
+
/** Status announced after a Markdown table has been copied. */
|
|
305
|
+
tableCopiedLabel?: string;
|
|
306
|
+
/** Label for downloading a Markdown table as CSV. */
|
|
307
|
+
tableDownloadCsvLabel?: string;
|
|
140
308
|
}
|
|
141
309
|
/** Props for the AttachmentCanvas component. */
|
|
142
310
|
export interface AttachmentCanvasProps {
|
|
@@ -160,6 +328,8 @@ export interface AttachmentCanvasProps {
|
|
|
160
328
|
onCopyMarkdown?: () => void;
|
|
161
329
|
/** Called when the user activates the copy-JSON button. When omitted the button is hidden. Only relevant when content type is `Json`. */
|
|
162
330
|
onCopyJson?: () => void;
|
|
331
|
+
/** Filename used when downloading a `MarkdownTable`'s content as CSV. Defaults to `'table.csv'`. */
|
|
332
|
+
tableDownloadFilename?: string;
|
|
163
333
|
/** Whether the viewport is in mobile breakpoint — disables drag-to-resize. */
|
|
164
334
|
isMobile?: boolean;
|
|
165
335
|
/** Initial panel width in pixels (when resizable). Defaults to `min(maxWidth, 2/3 of viewport width)`. */
|
|
@@ -180,5 +350,67 @@ export interface AttachmentCanvasProps {
|
|
|
180
350
|
* plain `fetch` if not provided.
|
|
181
351
|
*/
|
|
182
352
|
loadPdf?: (url: string) => Promise<Blob>;
|
|
353
|
+
/**
|
|
354
|
+
* Configures `pdfjs-dist`'s worker (`GlobalWorkerOptions.workerSrc`) for the
|
|
355
|
+
* host app. Called once, the first time a PDF attachment is opened, and
|
|
356
|
+
* awaited before the viewer mounts. Concurrent PDF opens share one
|
|
357
|
+
* in-flight call; a successful call is memoized so later opens never
|
|
358
|
+
* repeat it. A rejected call is not cached — the next PDF open (or a
|
|
359
|
+
* subsequent retry) invokes it again. When omitted,
|
|
360
|
+
* `@epam/pdf-highlighter-kit`'s own CDN-hosted worker fallback is used
|
|
361
|
+
* instead, so PDF rendering still works, just without the host's own
|
|
362
|
+
* bundled worker asset.
|
|
363
|
+
*/
|
|
364
|
+
configurePdfWorker?: () => void | Promise<void>;
|
|
365
|
+
}
|
|
366
|
+
/** User-visible strings for `AttachmentCanvasBody`'s content states. */
|
|
367
|
+
export type AttachmentCanvasBodyLabels = Pick<AttachmentCanvasLabels, 'unsupportedLabel' | 'loadErrorLabel' | 'forbiddenErrorLabel' | 'visualizerErrorLabel' | 'htmlFrameBlockedLabel' | 'htmlOpenInNewTabLabel' | 'pdfThumbnailsLabel' | 'pdfShowThumbnailsLabel' | 'pdfHideThumbnailsLabel' | 'pdfPageNumberLabel' | 'pdfContentLoadingLabel' | 'pdfContentErrorLabel' | 'pdfContentRetryLabel' | 'xlsxFormulaLabel' | 'codeContentLoadingLabel' | 'codeContentErrorLabel' | 'codeContentRetryLabel' | 'tableCopyCsvLabel' | 'tableCopyTxtLabel' | 'tableCopyMarkdownLabel' | 'tableCopiedLabel' | 'tableDownloadCsvLabel'>;
|
|
368
|
+
/** Props for the `AttachmentCanvasBody` component. */
|
|
369
|
+
export interface AttachmentCanvasBodyProps {
|
|
370
|
+
/** The attachment content to render. */
|
|
371
|
+
content: AttachmentCanvasContent;
|
|
372
|
+
/** When `true`, renders a loading spinner instead of content. Defaults to `false`. */
|
|
373
|
+
isLoading?: boolean;
|
|
374
|
+
/** File name used for image `alt` text and the audio player's accessible label. */
|
|
375
|
+
fileName?: string;
|
|
376
|
+
/**
|
|
377
|
+
* Whether an `Html` content type renders its raw source instead of the
|
|
378
|
+
* sandboxed rendered view. Ignored for every other content type. Defaults
|
|
379
|
+
* to `false`. The host owns this toggle's state since the corresponding
|
|
380
|
+
* toggle button lives outside this component.
|
|
381
|
+
*/
|
|
382
|
+
isHtmlSourceView?: boolean;
|
|
383
|
+
/** User-visible strings for content states (unsupported/error/HTML-blocked messages). */
|
|
384
|
+
labels?: AttachmentCanvasBodyLabels;
|
|
385
|
+
/** Style overrides for the content body. */
|
|
386
|
+
styles?: AttachmentCanvasBodyStyles;
|
|
387
|
+
/** Syntax highlight color theme forwarded to MarkdownRenderer/CodeContent code blocks. */
|
|
388
|
+
codeBlockTheme?: CodeBlockTheme;
|
|
389
|
+
/** Filename used when downloading a `MarkdownTable`'s content as CSV. Defaults to `'table.csv'`. Only relevant when content type is `MarkdownTable`. */
|
|
390
|
+
tableDownloadFilename?: string;
|
|
391
|
+
/**
|
|
392
|
+
* Fetches a PDF file by URL and returns its bytes as a `Blob`. Used when
|
|
393
|
+
* content type is `Pdf` to load the file before rendering. Defaults to a
|
|
394
|
+
* plain `fetch` if not provided.
|
|
395
|
+
*/
|
|
396
|
+
loadPdf?: (url: string) => Promise<Blob>;
|
|
397
|
+
/**
|
|
398
|
+
* Hides the PDF renderer's own title/zoom toolbar row for `Pdf` content —
|
|
399
|
+
* for hosts that render their own header and don't want it duplicated.
|
|
400
|
+
* Ignored for every other content type. Defaults to `false`.
|
|
401
|
+
*/
|
|
402
|
+
hidePdfToolbar?: boolean;
|
|
403
|
+
/**
|
|
404
|
+
* Configures `pdfjs-dist`'s worker (`GlobalWorkerOptions.workerSrc`) for the
|
|
405
|
+
* host app. Called once, the first time a PDF attachment is opened, and
|
|
406
|
+
* awaited before the viewer mounts. Concurrent PDF opens share one
|
|
407
|
+
* in-flight call; a successful call is memoized so later opens never
|
|
408
|
+
* repeat it. A rejected call is not cached — the next PDF open (or a
|
|
409
|
+
* subsequent retry) invokes it again. When omitted,
|
|
410
|
+
* `@epam/pdf-highlighter-kit`'s own CDN-hosted worker fallback is used
|
|
411
|
+
* instead, so PDF rendering still works, just without the host's own
|
|
412
|
+
* bundled worker asset.
|
|
413
|
+
*/
|
|
414
|
+
configurePdfWorker?: () => void | Promise<void>;
|
|
183
415
|
}
|
|
184
416
|
//# sourceMappingURL=attachment-canvas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-canvas.d.ts","sourceRoot":"","sources":["../../src/models/attachment-canvas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"attachment-canvas.d.ts","sourceRoot":"","sources":["../../src/models/attachment-canvas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,0BAA0B,EAC3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACd,MAAM,4BAA4B,CAAC;AAEpC,kDAAkD;AAClD,MAAM,WAAW,sBAAsB;IACrC,qEAAqE;IACrE,IAAI,EAAE,qBAAqB,CAAC,SAAS,CAAC;IACtC,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,6CAA6C;AAC7C,MAAM,WAAW,kB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,GACvB,oBAAoB,GACpB,wBAAwB,GACxB,wBAAwB,GACxB,oBAAoB,GACpB,wBAAwB,GACxB,sBAAsB,GACtB,sBAAsB,GACtB,kBAAkB,GAClB,yBAAyB,GACzB,uBAAuB,GACvB,uBAAuB,GACvB,mBAAmB,GACnB,mBAAmB,GACnB,wBAAwB,GACxB,kBAAkB,GAClB,uBAAuB,CAC1B,CAAC;AAEF,sDAAsD;AACtD,MAAM,WAAW,yBAAyB;IACxC,wCAAwC;IACxC,OAAO,EAAE,uBAAuB,CAAC;IACjC,sFAAsF;IACtF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,yFAAyF;IACzF,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,4CAA4C;IAC5C,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,0FAA0F;IAC1F,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,wJAAwJ;IACxJ,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-attachment-canvas",
|
|
3
|
-
"description": "Canvas viewer for rendering attachment content — images, PDFs, JSON, markdown, and plain text",
|
|
4
|
-
"version": "1.1.0-dev.
|
|
3
|
+
"description": "Canvas viewer for rendering attachment content — images, PDFs, Office documents, CSV, JSON, markdown, and plain text",
|
|
4
|
+
"version": "1.1.0-dev.430",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"types": "./index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
"./package.json": "./package.json",
|
|
12
|
-
"./styles.css": "./
|
|
12
|
+
"./styles.css": "./index.css",
|
|
13
13
|
".": {
|
|
14
14
|
"types": "./index.d.ts",
|
|
15
15
|
"import": "./index.js",
|
|
@@ -17,16 +17,24 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
21
|
-
"@epam/ai-dial-
|
|
22
|
-
"@epam/ai-dial-
|
|
23
|
-
"@epam/
|
|
20
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.430",
|
|
21
|
+
"@epam/ai-dial-react-pdf-highlighter": "^0.2.0-dev.28",
|
|
22
|
+
"@epam/ai-dial-shared": "0.48.0",
|
|
23
|
+
"@epam/ai-dial-sidebar": "1.1.0-dev.430",
|
|
24
|
+
"@epam/ai-dial-visualizer-connector": "0.48.0",
|
|
25
|
+
"@epam/ai-dial-ui-kit": "^0.14.0-dev.15",
|
|
26
|
+
"@epam/pdf-highlighter-kit": "^0.0.18",
|
|
27
|
+
"@mcp-ui/client": "^7.1.1",
|
|
28
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
24
29
|
"@tabler/icons-react": "^3.44.0",
|
|
30
|
+
"pdfjs-dist": "^5.4.149",
|
|
25
31
|
"react": "^19.0.0",
|
|
26
32
|
"react-json-view-lite": "^2.5.0",
|
|
27
|
-
"
|
|
33
|
+
"react-syntax-highlighter": "^16.1.1"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@silurus/ooxml": "^0.86.1"
|
|
28
37
|
},
|
|
29
|
-
"dependencies": {},
|
|
30
38
|
"repository": {
|
|
31
39
|
"type": "git",
|
|
32
40
|
"url": "git+https://github.com/epam/ai-dial-chat.git",
|