@file-viewer/core 2.4.0 → 3.0.1
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/README.en.md +18 -1
- package/README.md +18 -1
- package/dist/config/options.js +9 -3
- package/dist/contracts/types.d.ts +249 -9
- package/dist/export.d.ts +10 -0
- package/dist/export.js +9 -0
- package/dist/exportDocument.d.ts +36 -0
- package/dist/exportDocument.js +894 -0
- package/dist/features/document/zoom.d.ts +1 -0
- package/dist/features/document/zoom.js +3 -0
- package/dist/features/printMask.js +138 -13
- package/dist/headless.d.ts +2 -2
- package/dist/headless.js +1 -1
- package/dist/i18n/messages.de.js +3 -0
- package/dist/i18n/messages.ja.js +3 -0
- package/dist/i18n/messages.js +6 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3 -2
- package/dist/output/export.d.ts +3 -24
- package/dist/output/export.js +27 -372
- package/dist/output/printLayout.js +10 -0
- package/dist/platform/assets.d.ts +69 -2
- package/dist/platform/assets.js +532 -29
- package/dist/registry/capabilities.d.ts +2 -2
- package/dist/registry/formats.d.ts +4 -4
- package/dist/registry/formats.generated.d.ts +273 -20
- package/dist/registry/formats.generated.js +463 -2
- package/dist/registry/registry.js +153 -11
- package/dist/renderers/index.d.ts +270 -17
- package/dist/security/svgResources.d.ts +13 -0
- package/dist/security/svgResources.js +177 -0
- package/dist/viewer/createViewer.js +42 -0
- package/dist/viewer/operations.d.ts +1 -0
- package/dist/viewer/operations.js +68 -5
- package/dist/viewer/state.js +1 -0
- package/package.json +9 -1
package/dist/output/export.js
CHANGED
|
@@ -1,332 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const escapeHtmlAttribute = (value) => value
|
|
3
|
-
.replace(/&/g, '&')
|
|
4
|
-
.replace(/"/g, '"')
|
|
5
|
-
.replace(/</g, '<')
|
|
6
|
-
.replace(/>/g, '>');
|
|
7
|
-
const EXPORT_DOCUMENT_STYLE = `
|
|
8
|
-
* { box-sizing: border-box; }
|
|
9
|
-
html, body { margin: 0; min-height: 100%; background: #f2f4f7; color: #172033; font-family: Aptos, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
|
|
10
|
-
body { padding: 24px; }
|
|
11
|
-
.viewer-export-shell { position: relative; min-height: calc(100vh - 48px); overflow: visible; background: #f2f4f7; }
|
|
12
|
-
.viewer-export-content { position: relative; z-index: 1; contain: none; width: 100%; min-height: 100%; overflow: visible; }
|
|
13
|
-
.viewer-export-watermark { position: absolute; inset: 0; pointer-events: none; z-index: 20; background-repeat: repeat; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
|
|
14
|
-
.viewer-export-content .file-render,
|
|
15
|
-
.viewer-export-content .file-viewer,
|
|
16
|
-
.viewer-export-content .viewer-stage,
|
|
17
|
-
.viewer-export-content .content,
|
|
18
|
-
.viewer-export-content .pdf-shell,
|
|
19
|
-
.viewer-export-content .pdf-content,
|
|
20
|
-
.viewer-export-content .pdf-viewport,
|
|
21
|
-
.viewer-export-content .pdf-wrapper,
|
|
22
|
-
.viewer-export-content .docx-fit-viewer,
|
|
23
|
-
.viewer-export-content .docx-wrapper,
|
|
24
|
-
.viewer-export-content .msdoc-stage,
|
|
25
|
-
.viewer-export-content .code-viewer,
|
|
26
|
-
.viewer-export-content .markdown-viewer,
|
|
27
|
-
.viewer-export-content .email-shell,
|
|
28
|
-
.viewer-export-content .archive-shell,
|
|
29
|
-
.viewer-export-content .eda-shell,
|
|
30
|
-
.viewer-export-content .ebook-shell,
|
|
31
|
-
.viewer-export-content .umd-shell,
|
|
32
|
-
.viewer-export-content .drawing-shell,
|
|
33
|
-
.viewer-export-content .audio-shell,
|
|
34
|
-
.viewer-export-content .cad-shell,
|
|
35
|
-
.viewer-export-content .cad-body,
|
|
36
|
-
.viewer-export-content .cad-canvas-wrap,
|
|
37
|
-
.viewer-export-content .dwg-preview-frame {
|
|
38
|
-
position: relative !important;
|
|
39
|
-
inset: auto !important;
|
|
40
|
-
contain: none !important;
|
|
41
|
-
width: 100% !important;
|
|
42
|
-
height: auto !important;
|
|
43
|
-
min-height: 0 !important;
|
|
44
|
-
max-height: none !important;
|
|
45
|
-
overflow: visible !important;
|
|
46
|
-
}
|
|
47
|
-
.viewer-export-content .docx-wrapper {
|
|
48
|
-
display: block !important;
|
|
49
|
-
padding: 0 !important;
|
|
50
|
-
background: transparent !important;
|
|
51
|
-
}
|
|
52
|
-
.viewer-export-content .docx-print-document {
|
|
53
|
-
display: block !important;
|
|
54
|
-
width: fit-content !important;
|
|
55
|
-
max-width: 100% !important;
|
|
56
|
-
height: auto !important;
|
|
57
|
-
overflow: visible !important;
|
|
58
|
-
margin: 0 auto !important;
|
|
59
|
-
}
|
|
60
|
-
.viewer-export-content .docx-page-frame {
|
|
61
|
-
position: relative !important;
|
|
62
|
-
width: var(--viewer-print-page-width, fit-content) !important;
|
|
63
|
-
height: var(--viewer-print-page-height, auto) !important;
|
|
64
|
-
min-height: var(--viewer-print-page-height, 0) !important;
|
|
65
|
-
max-width: 100% !important;
|
|
66
|
-
margin: 0 auto 18px !important;
|
|
67
|
-
overflow: hidden !important;
|
|
68
|
-
break-inside: avoid;
|
|
69
|
-
page-break-inside: avoid;
|
|
70
|
-
break-after: page;
|
|
71
|
-
page-break-after: always;
|
|
72
|
-
}
|
|
73
|
-
.viewer-export-content .msdoc-page {
|
|
74
|
-
position: relative !important;
|
|
75
|
-
width: var(--viewer-print-page-width, 794px) !important;
|
|
76
|
-
min-height: var(--viewer-print-page-height, 1123px) !important;
|
|
77
|
-
max-width: 100% !important;
|
|
78
|
-
height: auto !important;
|
|
79
|
-
margin: 0 auto 18px !important;
|
|
80
|
-
overflow: visible !important;
|
|
81
|
-
break-after: page;
|
|
82
|
-
page-break-after: always;
|
|
83
|
-
}
|
|
84
|
-
.viewer-export-content .docx-page-frame:last-child,
|
|
85
|
-
.viewer-export-content .msdoc-page:last-child {
|
|
86
|
-
break-after: auto;
|
|
87
|
-
page-break-after: auto;
|
|
88
|
-
}
|
|
89
|
-
.viewer-export-content .docx-page-frame > section.docx {
|
|
90
|
-
position: relative !important;
|
|
91
|
-
top: auto !important;
|
|
92
|
-
left: auto !important;
|
|
93
|
-
width: var(--viewer-print-page-width, auto) !important;
|
|
94
|
-
min-height: var(--viewer-print-page-height, auto) !important;
|
|
95
|
-
max-width: none !important;
|
|
96
|
-
margin: 0 auto !important;
|
|
97
|
-
overflow: visible !important;
|
|
98
|
-
transform: none !important;
|
|
99
|
-
box-shadow: none !important;
|
|
100
|
-
break-inside: avoid;
|
|
101
|
-
page-break-inside: avoid;
|
|
102
|
-
}
|
|
103
|
-
.viewer-export-content .msdoc-stage {
|
|
104
|
-
display: block !important;
|
|
105
|
-
padding: 0 !important;
|
|
106
|
-
background: transparent !important;
|
|
107
|
-
}
|
|
108
|
-
.viewer-export-content .msdoc-page > .msdoc-root {
|
|
109
|
-
margin: 0 auto !important;
|
|
110
|
-
box-shadow: none !important;
|
|
111
|
-
overflow: visible !important;
|
|
112
|
-
}
|
|
113
|
-
.viewer-export-content .pdf-toolbar,
|
|
114
|
-
.viewer-export-content .pdf-nav-pane,
|
|
115
|
-
.viewer-export-content .viewer-actions,
|
|
116
|
-
.viewer-export-content .code-toolbar,
|
|
117
|
-
.viewer-export-content .umd-toolbar,
|
|
118
|
-
.viewer-export-content .drawing-toolbar,
|
|
119
|
-
.viewer-export-content .cad-toolbar {
|
|
120
|
-
display: none !important;
|
|
121
|
-
}
|
|
122
|
-
.viewer-export-content .pdf-content,
|
|
123
|
-
.viewer-export-content .pdf-shell--nav-hidden .pdf-content,
|
|
124
|
-
.viewer-export-content .cad-body.without-layers {
|
|
125
|
-
display: block !important;
|
|
126
|
-
grid-template-columns: none !important;
|
|
127
|
-
}
|
|
128
|
-
.viewer-export-content .pdfViewer { padding: 0 !important; }
|
|
129
|
-
.viewer-export-content .pdfViewer .page {
|
|
130
|
-
margin: 0 auto 16px !important;
|
|
131
|
-
border: 0 !important;
|
|
132
|
-
box-shadow: none !important;
|
|
133
|
-
break-after: page;
|
|
134
|
-
page-break-after: always;
|
|
135
|
-
}
|
|
136
|
-
.viewer-export-content .pdfViewer .page:last-child {
|
|
137
|
-
break-after: auto;
|
|
138
|
-
page-break-after: auto;
|
|
139
|
-
}
|
|
140
|
-
.viewer-export-content .pdf-export-document {
|
|
141
|
-
display: grid;
|
|
142
|
-
justify-items: center;
|
|
143
|
-
gap: 18px;
|
|
144
|
-
padding: 4px 0;
|
|
145
|
-
}
|
|
146
|
-
.viewer-export-content .pdf-export-page {
|
|
147
|
-
width: var(--viewer-print-page-width, auto);
|
|
148
|
-
height: var(--viewer-print-page-height, auto);
|
|
149
|
-
max-width: 100%;
|
|
150
|
-
overflow: hidden;
|
|
151
|
-
background: #ffffff;
|
|
152
|
-
box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
|
|
153
|
-
break-inside: avoid;
|
|
154
|
-
page-break-inside: avoid;
|
|
155
|
-
break-after: page;
|
|
156
|
-
page-break-after: always;
|
|
157
|
-
}
|
|
158
|
-
.viewer-export-content .pdf-export-page:last-child {
|
|
159
|
-
break-after: auto;
|
|
160
|
-
page-break-after: auto;
|
|
161
|
-
}
|
|
162
|
-
.viewer-export-content .pdf-export-page img {
|
|
163
|
-
display: block;
|
|
164
|
-
width: 100%;
|
|
165
|
-
height: 100%;
|
|
166
|
-
object-fit: contain;
|
|
167
|
-
}
|
|
168
|
-
.viewer-export-content .pptx-wrapper {
|
|
169
|
-
width: 100% !important;
|
|
170
|
-
max-width: 100% !important;
|
|
171
|
-
height: auto !important;
|
|
172
|
-
overflow: visible !important;
|
|
173
|
-
transform: none !important;
|
|
174
|
-
}
|
|
175
|
-
.viewer-export-content .pptx-wrapper .slide {
|
|
176
|
-
margin: 0 auto 18px !important;
|
|
177
|
-
break-inside: avoid;
|
|
178
|
-
page-break-inside: avoid;
|
|
179
|
-
break-after: page;
|
|
180
|
-
page-break-after: always;
|
|
181
|
-
box-shadow: none !important;
|
|
182
|
-
}
|
|
183
|
-
.viewer-export-content .pptx-wrapper .slide:last-child {
|
|
184
|
-
break-after: auto;
|
|
185
|
-
page-break-after: auto;
|
|
186
|
-
}
|
|
187
|
-
.viewer-export-content .ofd-stage {
|
|
188
|
-
padding: 0 !important;
|
|
189
|
-
overflow: visible !important;
|
|
190
|
-
}
|
|
191
|
-
.viewer-export-content .ofd-page,
|
|
192
|
-
.viewer-export-content .drawing-svg,
|
|
193
|
-
.viewer-export-content .cad-canvas-wrap,
|
|
194
|
-
.viewer-export-content .dwg-preview-frame {
|
|
195
|
-
break-inside: avoid;
|
|
196
|
-
page-break-inside: avoid;
|
|
197
|
-
break-after: page;
|
|
198
|
-
page-break-after: always;
|
|
199
|
-
box-shadow: none !important;
|
|
200
|
-
}
|
|
201
|
-
.viewer-export-content .ofd-page:last-child,
|
|
202
|
-
.viewer-export-content .drawing-svg:last-child,
|
|
203
|
-
.viewer-export-content .cad-canvas-wrap:last-child,
|
|
204
|
-
.viewer-export-content .dwg-preview-frame:last-child {
|
|
205
|
-
break-after: auto;
|
|
206
|
-
page-break-after: auto;
|
|
207
|
-
}
|
|
208
|
-
.viewer-export-content .code-area {
|
|
209
|
-
overflow: visible !important;
|
|
210
|
-
white-space: pre-wrap !important;
|
|
211
|
-
word-break: break-word !important;
|
|
212
|
-
}
|
|
213
|
-
.viewer-export-content .umd-body,
|
|
214
|
-
.viewer-export-content .umd-stage-wrap,
|
|
215
|
-
.viewer-export-content .umd-stage {
|
|
216
|
-
display: block !important;
|
|
217
|
-
height: auto !important;
|
|
218
|
-
max-height: none !important;
|
|
219
|
-
overflow: visible !important;
|
|
220
|
-
}
|
|
221
|
-
.viewer-export-content .umd-toc {
|
|
222
|
-
display: none !important;
|
|
223
|
-
}
|
|
224
|
-
img, canvas, svg, video { max-width: 100%; }
|
|
225
|
-
@media print {
|
|
226
|
-
@page { margin: 12mm; }
|
|
227
|
-
html, body { min-height: auto; background: #ffffff; }
|
|
228
|
-
body { padding: 0; }
|
|
229
|
-
.viewer-export-shell,
|
|
230
|
-
.viewer-export-content {
|
|
231
|
-
min-height: 0;
|
|
232
|
-
overflow: visible;
|
|
233
|
-
background: #ffffff;
|
|
234
|
-
}
|
|
235
|
-
.viewer-export-content .pdf-export-document {
|
|
236
|
-
display: block;
|
|
237
|
-
padding: 0;
|
|
238
|
-
}
|
|
239
|
-
.viewer-export-content .pdf-export-page {
|
|
240
|
-
width: var(--viewer-print-page-width, auto) !important;
|
|
241
|
-
height: var(--viewer-print-page-height, auto) !important;
|
|
242
|
-
max-width: none !important;
|
|
243
|
-
margin: 0;
|
|
244
|
-
overflow: hidden;
|
|
245
|
-
box-shadow: none;
|
|
246
|
-
}
|
|
247
|
-
.viewer-export-content .docx-page-frame {
|
|
248
|
-
width: var(--viewer-print-page-width, auto) !important;
|
|
249
|
-
height: var(--viewer-print-page-height, auto) !important;
|
|
250
|
-
min-height: var(--viewer-print-page-height, 0) !important;
|
|
251
|
-
max-width: none !important;
|
|
252
|
-
margin: 0 !important;
|
|
253
|
-
overflow: hidden !important;
|
|
254
|
-
}
|
|
255
|
-
.viewer-export-content .msdoc-page {
|
|
256
|
-
width: var(--viewer-print-page-width, 794px) !important;
|
|
257
|
-
min-height: var(--viewer-print-page-height, 1123px) !important;
|
|
258
|
-
max-width: none !important;
|
|
259
|
-
margin: 0 !important;
|
|
260
|
-
overflow: visible !important;
|
|
261
|
-
}
|
|
262
|
-
.viewer-export-content .docx-page-frame > section.docx,
|
|
263
|
-
.viewer-export-content .msdoc-page > .msdoc-root {
|
|
264
|
-
width: var(--viewer-print-page-width, 100%) !important;
|
|
265
|
-
max-width: none !important;
|
|
266
|
-
border: 0 !important;
|
|
267
|
-
}
|
|
268
|
-
.viewer-export-content .pptx-wrapper .slide,
|
|
269
|
-
.viewer-export-content .ofd-page,
|
|
270
|
-
.viewer-export-content .drawing-svg,
|
|
271
|
-
.viewer-export-content .cad-canvas-wrap,
|
|
272
|
-
.viewer-export-content .dwg-preview-frame {
|
|
273
|
-
box-shadow: none !important;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
`;
|
|
277
|
-
export const collectDocumentStyles = () => {
|
|
278
|
-
return Array.from(document.querySelectorAll('style, link[rel="stylesheet"]'))
|
|
279
|
-
.map(node => {
|
|
280
|
-
if (node instanceof HTMLStyleElement) {
|
|
281
|
-
return `<style>${node.textContent || ''}</style>`;
|
|
282
|
-
}
|
|
283
|
-
if (node.href) {
|
|
284
|
-
return `<link rel="stylesheet" href="${escapeHtmlAttribute(node.href)}" />`;
|
|
285
|
-
}
|
|
286
|
-
return '';
|
|
287
|
-
})
|
|
288
|
-
.filter(Boolean)
|
|
289
|
-
.join('\n');
|
|
290
|
-
};
|
|
291
|
-
export const buildExportHtmlDocument = ({ contentHtml, includeDocumentStyles = true, printStyle = '', title, watermarkInlineStyle = '', mask = null, }) => {
|
|
292
|
-
var _a, _b;
|
|
293
|
-
const watermark = watermarkInlineStyle
|
|
294
|
-
? `<div class="viewer-export-watermark" style="${watermarkInlineStyle}"></div>`
|
|
295
|
-
: '';
|
|
296
|
-
const normalizedMask = normalizeFileViewerPrintMaskOptions(mask);
|
|
297
|
-
const globalMask = normalizedMask
|
|
298
|
-
? {
|
|
299
|
-
...normalizedMask,
|
|
300
|
-
regions: (_a = normalizedMask.regions) === null || _a === void 0 ? void 0 : _a.filter(region => region.pageIndex === undefined),
|
|
301
|
-
stamps: (_b = normalizedMask.stamps) === null || _b === void 0 ? void 0 : _b.filter(stamp => stamp.pageIndex === undefined),
|
|
302
|
-
}
|
|
303
|
-
: null;
|
|
304
|
-
const maskHtml = buildFileViewerPrintMaskOverlayHtml(globalMask);
|
|
305
|
-
const maskedContentHtml = applyFileViewerPagePrintMasksToHtml(contentHtml, normalizedMask);
|
|
306
|
-
const styles = includeDocumentStyles ? collectDocumentStyles() : '';
|
|
307
|
-
const printOverrideStyle = printStyle ? `<style data-viewer-print-style>${printStyle}</style>` : '';
|
|
308
|
-
const maskStyle = normalizedMask ? `<style data-viewer-print-mask-style>${FILE_VIEWER_PRINT_MASK_STYLE}</style>` : '';
|
|
309
|
-
const safeTitle = escapeHtmlAttribute(title);
|
|
310
|
-
return `<!doctype html>
|
|
311
|
-
<html lang="zh-CN">
|
|
312
|
-
<head>
|
|
313
|
-
<meta charset="utf-8" />
|
|
314
|
-
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
315
|
-
<title>${safeTitle}</title>
|
|
316
|
-
${styles}
|
|
317
|
-
<style>${EXPORT_DOCUMENT_STYLE}</style>
|
|
318
|
-
${maskStyle}
|
|
319
|
-
</head>
|
|
320
|
-
<body>
|
|
321
|
-
<main class="viewer-export-shell">
|
|
322
|
-
<div class="viewer-export-content">${maskedContentHtml}</div>
|
|
323
|
-
${maskHtml}
|
|
324
|
-
${watermark}
|
|
325
|
-
</main>
|
|
326
|
-
${printOverrideStyle}
|
|
327
|
-
</body>
|
|
328
|
-
</html>`;
|
|
329
|
-
};
|
|
1
|
+
/** Lightweight export helpers that remain on the normal viewer path. */
|
|
330
2
|
export const triggerFileViewerBlobDownload = (blob, name) => {
|
|
331
3
|
const objectUrl = URL.createObjectURL(blob);
|
|
332
4
|
const link = document.createElement('a');
|
|
@@ -357,7 +29,7 @@ export const replaceFileViewerCanvasWithImages = (source, clone) => {
|
|
|
357
29
|
return;
|
|
358
30
|
}
|
|
359
31
|
try {
|
|
360
|
-
const image =
|
|
32
|
+
const image = source.ownerDocument.createElement('img');
|
|
361
33
|
image.src = sourceCanvas.toDataURL('image/png');
|
|
362
34
|
image.alt = 'rendered canvas';
|
|
363
35
|
image.style.maxWidth = '100%';
|
|
@@ -366,13 +38,13 @@ export const replaceFileViewerCanvasWithImages = (source, clone) => {
|
|
|
366
38
|
canvas.replaceWith(image);
|
|
367
39
|
}
|
|
368
40
|
catch {
|
|
369
|
-
//
|
|
41
|
+
// A canvas tainted by cross-origin resources cannot be exported.
|
|
370
42
|
}
|
|
371
43
|
});
|
|
372
44
|
};
|
|
373
45
|
export const waitForFileViewerNextPaint = (targetWindow) => {
|
|
374
46
|
return new Promise(resolve => {
|
|
375
|
-
const currentWindow = targetWindow ||
|
|
47
|
+
const currentWindow = targetWindow || globalThis.window;
|
|
376
48
|
if (!currentWindow || typeof currentWindow.requestAnimationFrame !== 'function') {
|
|
377
49
|
const schedule = (currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow.setTimeout)
|
|
378
50
|
? currentWindow.setTimeout.bind(currentWindow)
|
|
@@ -401,7 +73,7 @@ export const waitForFileViewerImages = async (root) => {
|
|
|
401
73
|
return;
|
|
402
74
|
}
|
|
403
75
|
catch {
|
|
404
|
-
//
|
|
76
|
+
// Fall back to load/error events so one bad image cannot block export.
|
|
405
77
|
}
|
|
406
78
|
}
|
|
407
79
|
await new Promise(resolve => {
|
|
@@ -443,10 +115,7 @@ const collectBlobUrls = (html) => {
|
|
|
443
115
|
const matches = html.match(/blob:[^\s"'<>)\\]+/g) || [];
|
|
444
116
|
return Array.from(new Set(matches));
|
|
445
117
|
};
|
|
446
|
-
/**
|
|
447
|
-
* Rewrite ephemeral `blob:` URLs into portable `data:` URLs so exported / printed
|
|
448
|
-
* HTML keeps images after leaving the live viewer document (GitHub #90).
|
|
449
|
-
*/
|
|
118
|
+
/** Rewrite ephemeral blob URLs into portable data URLs for export and print. */
|
|
450
119
|
export const inlineFileViewerBlobUrlsInHtml = async (html) => {
|
|
451
120
|
if (!html.includes('blob:') || typeof fetch !== 'function') {
|
|
452
121
|
return html;
|
|
@@ -497,7 +166,7 @@ export const waitForFileViewerPrintWindowReady = async (printWindow) => {
|
|
|
497
166
|
return;
|
|
498
167
|
}
|
|
499
168
|
catch {
|
|
500
|
-
//
|
|
169
|
+
// Image decode failures do not block the browser's print attempt.
|
|
501
170
|
}
|
|
502
171
|
}
|
|
503
172
|
await new Promise(resolve => {
|
|
@@ -507,9 +176,25 @@ export const waitForFileViewerPrintWindowReady = async (printWindow) => {
|
|
|
507
176
|
});
|
|
508
177
|
}));
|
|
509
178
|
await new Promise(resolve => {
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
179
|
+
let settled = false;
|
|
180
|
+
let timeoutId;
|
|
181
|
+
const finish = () => {
|
|
182
|
+
if (settled)
|
|
183
|
+
return;
|
|
184
|
+
settled = true;
|
|
185
|
+
if (timeoutId !== undefined)
|
|
186
|
+
printWindow.clearTimeout(timeoutId);
|
|
187
|
+
resolve();
|
|
188
|
+
};
|
|
189
|
+
timeoutId = printWindow.setTimeout(finish, 250);
|
|
190
|
+
try {
|
|
191
|
+
printWindow.requestAnimationFrame(() => {
|
|
192
|
+
printWindow.requestAnimationFrame(finish);
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
catch {
|
|
196
|
+
finish();
|
|
197
|
+
}
|
|
513
198
|
});
|
|
514
199
|
};
|
|
515
200
|
export const resolveFileViewerPrintStyle = async (adapter, options) => {
|
|
@@ -524,36 +209,6 @@ export const resolveFileViewerPrintStyle = async (adapter, options) => {
|
|
|
524
209
|
export const prepareFileViewerRenderedContentForSnapshot = async (source, adapter) => {
|
|
525
210
|
var _a;
|
|
526
211
|
await ((_a = adapter === null || adapter === void 0 ? void 0 : adapter.beforeSnapshot) === null || _a === void 0 ? void 0 : _a.call(adapter));
|
|
527
|
-
await waitForFileViewerNextPaint();
|
|
212
|
+
await waitForFileViewerNextPaint(source.ownerDocument.defaultView || undefined);
|
|
528
213
|
await waitForFileViewerImages(source);
|
|
529
214
|
};
|
|
530
|
-
export const buildFileViewerRenderedHtmlDocument = async ({ source, mode = 'export', title, adapter = null, watermarkInlineStyle = '', mask = null, }) => {
|
|
531
|
-
const exportOptions = { mode, title };
|
|
532
|
-
const toHtml = adapter === null || adapter === void 0 ? void 0 : adapter.toHtml;
|
|
533
|
-
const normalizedMask = normalizeFileViewerPrintMaskOptions(mask);
|
|
534
|
-
if (toHtml) {
|
|
535
|
-
await prepareFileViewerRenderedContentForSnapshot(source, adapter);
|
|
536
|
-
const contentHtml = await inlineFileViewerBlobUrlsInHtml(await toHtml(exportOptions));
|
|
537
|
-
const printStyle = await resolveFileViewerPrintStyle(adapter, exportOptions);
|
|
538
|
-
return buildExportHtmlDocument({
|
|
539
|
-
contentHtml,
|
|
540
|
-
includeDocumentStyles: adapter.includeDocumentStyles !== false,
|
|
541
|
-
printStyle,
|
|
542
|
-
title,
|
|
543
|
-
watermarkInlineStyle,
|
|
544
|
-
mask: normalizedMask,
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
await prepareFileViewerRenderedContentForSnapshot(source, adapter);
|
|
548
|
-
const clone = source.cloneNode(true);
|
|
549
|
-
clone.querySelectorAll('.viewer-watermark').forEach(node => node.remove());
|
|
550
|
-
replaceFileViewerCanvasWithImages(source, clone);
|
|
551
|
-
const printStyle = await resolveFileViewerPrintStyle(adapter, exportOptions);
|
|
552
|
-
return buildExportHtmlDocument({
|
|
553
|
-
contentHtml: await inlineFileViewerBlobUrlsInHtml(clone.innerHTML),
|
|
554
|
-
printStyle,
|
|
555
|
-
title,
|
|
556
|
-
watermarkInlineStyle,
|
|
557
|
-
mask: normalizedMask,
|
|
558
|
-
});
|
|
559
|
-
};
|
|
@@ -62,8 +62,18 @@ export const buildPrintPageStyle = ({ selector, width, height, heightMode = 'fix
|
|
|
62
62
|
html, body {
|
|
63
63
|
width: ${pageWidth};
|
|
64
64
|
min-width: ${pageWidth};
|
|
65
|
+
margin: 0 !important;
|
|
66
|
+
padding: 0 !important;
|
|
67
|
+
min-height: 0 !important;
|
|
65
68
|
background: #ffffff !important;
|
|
66
69
|
}
|
|
70
|
+
.viewer-export-shell,
|
|
71
|
+
.viewer-export-content {
|
|
72
|
+
width: ${pageWidth} !important;
|
|
73
|
+
min-height: 0 !important;
|
|
74
|
+
margin: 0 !important;
|
|
75
|
+
padding: 0 !important;
|
|
76
|
+
}
|
|
67
77
|
${selector} {
|
|
68
78
|
width: ${pageWidth}!important;
|
|
69
79
|
max-width: none!important;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import type { FileViewerArchiveOptions, FileViewerCadOptions, FileViewerDataOptions, FileViewerDocxOptions, FileViewerDrawingOptions, FileViewerIworkOptions, FileViewerHangulOptions, FileViewerModelOptions, FileViewerOptions, FileViewerPdfOptions, FileViewerPresentationOptions, FileViewerSpreadsheetOptions, FileViewerTypstOptions, FileViewerWordPerfectOptions } from '../contracts/types';
|
|
1
|
+
import type { FileViewerArchiveOptions, FileViewerCadOptions, FileViewerChmOptions, FileViewerDataOptions, FileViewerDesignOptions, FileViewerDocxOptions, FileViewerDrawingOptions, FileViewerIworkOptions, FileViewerHangulOptions, FileViewerModelOptions, FileViewerOptions, FileViewerPdfOptions, FileViewerPresentationOptions, FileViewerSpreadsheetOptions, FileViewerTypstOptions, FileViewerWordPerfectOptions } from '../contracts/types';
|
|
2
2
|
export declare const DEFAULT_FILE_VIEWER_ARCHIVE_WORKER_PATH = "vendor/libarchive/worker-bundle.js";
|
|
3
3
|
export declare const DEFAULT_FILE_VIEWER_ARCHIVE_WASM_PATH = "vendor/libarchive/libarchive.wasm";
|
|
4
|
+
export declare const DEFAULT_FILE_VIEWER_CHM_WORKER_PATH = "vendor/chm/chm.worker.js";
|
|
5
|
+
export declare const DEFAULT_FILE_VIEWER_CHM_WORKER_PACKAGE_PATH = "@file-viewer/renderer-chm/worker/chm.worker.js";
|
|
6
|
+
export declare const DEFAULT_FILE_VIEWER_CHM_WASM_MODULE_PATH = "vendor/chm/chm_wasm.js";
|
|
7
|
+
export declare const DEFAULT_FILE_VIEWER_CHM_WASM_MODULE_PACKAGE_PATH = "@file-viewer/renderer-chm/wasm/chm_wasm.js";
|
|
8
|
+
export declare const DEFAULT_FILE_VIEWER_CHM_WASM_PATH = "vendor/chm/chm_wasm_bg.wasm";
|
|
9
|
+
export declare const DEFAULT_FILE_VIEWER_CHM_WASM_PACKAGE_PATH = "@file-viewer/renderer-chm/wasm/chm_wasm_bg.wasm";
|
|
4
10
|
export declare const DEFAULT_FILE_VIEWER_DOCX_WORKER_PATH = "vendor/docx/docx.worker.js";
|
|
5
11
|
export declare const DEFAULT_FILE_VIEWER_DOCX_WORKER_JSZIP_PATH = "vendor/docx/jszip.min.js";
|
|
6
12
|
export declare const DEFAULT_FILE_VIEWER_DOCX_RUNTIME_VERSION = "0.3.26";
|
|
@@ -45,6 +51,56 @@ export declare const DEFAULT_FILE_VIEWER_TYPST_COMPILER_WASM_PACKAGE_PATH = "@my
|
|
|
45
51
|
export declare const DEFAULT_FILE_VIEWER_TYPST_RENDERER_WASM_PACKAGE_PATH = "@myriaddreamin/typst-ts-renderer/pkg/typst_ts_renderer_bg.wasm";
|
|
46
52
|
export declare const DEFAULT_FILE_VIEWER_DATA_SQL_WASM_URL = "wasm/data/sql-wasm.wasm";
|
|
47
53
|
export declare const DEFAULT_FILE_VIEWER_DATA_SQL_WASM_PACKAGE_PATH = "sql.js/dist/sql-wasm.wasm";
|
|
54
|
+
export declare const DEFAULT_FILE_VIEWER_ILLUSTRATOR_WORKER_PATH = "vendor/design/illustrator-pgf.worker.js";
|
|
55
|
+
export declare const DEFAULT_FILE_VIEWER_ILLUSTRATOR_WORKER_PACKAGE_PATH = "@file-viewer/renderer-design/worker/illustrator-pgf.worker.js";
|
|
56
|
+
export declare const DEFAULT_FILE_VIEWER_ILLUSTRATOR_LICENSE_PATH = "vendor/design/LICENSE.illustrator-pgf-MIT.txt";
|
|
57
|
+
export declare const DEFAULT_FILE_VIEWER_ILLUSTRATOR_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/illustrator-pgf-MIT.txt";
|
|
58
|
+
export declare const DEFAULT_FILE_VIEWER_ILLUSTRATOR_ZSTD_LICENSE_PATH = "vendor/design/LICENSE.fzstd-MIT.txt";
|
|
59
|
+
export declare const DEFAULT_FILE_VIEWER_ILLUSTRATOR_ZSTD_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/fzstd-MIT.txt";
|
|
60
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_WORKER_PATH = "vendor/design/photoshop.worker.js";
|
|
61
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_WORKER_PACKAGE_PATH = "@file-viewer/renderer-design/worker/photoshop.worker.js";
|
|
62
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_CONTAINER_WORKER_PATH = "vendor/design/adobe-container.worker.js";
|
|
63
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_CONTAINER_WORKER_PACKAGE_PATH = "@file-viewer/renderer-design/worker/adobe-container.worker.js";
|
|
64
|
+
export declare const DEFAULT_FILE_VIEWER_ADOBE_RESOURCE_WORKER_PATH = "vendor/design/adobe-resource.worker.js";
|
|
65
|
+
export declare const DEFAULT_FILE_VIEWER_ADOBE_RESOURCE_WORKER_PACKAGE_PATH = "@file-viewer/renderer-design/worker/adobe-resource.worker.js";
|
|
66
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_WORKER_PATH = "vendor/design/postscript.worker.js";
|
|
67
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_WORKER_PACKAGE_PATH = "@file-viewer/renderer-design/worker/postscript.worker.js";
|
|
68
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_WASM_PATH = "vendor/design/stet_wasm_bg.wasm";
|
|
69
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_WASM_PACKAGE_PATH = "@file-viewer/renderer-design/wasm/postscript.wasm";
|
|
70
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_STET_APACHE_LICENSE_PATH = "vendor/design/LICENSE.stet-Apache-2.0.txt";
|
|
71
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_STET_APACHE_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/Stet-Apache-2.0.txt";
|
|
72
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_STET_MIT_LICENSE_PATH = "vendor/design/LICENSE.stet-MIT.txt";
|
|
73
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_STET_MIT_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/Stet-MIT.txt";
|
|
74
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_CARLITO_LICENSE_PATH = "vendor/design/LICENSE.Carlito-OFL-1.1.txt";
|
|
75
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_CARLITO_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/Carlito-OFL-1.1.txt";
|
|
76
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_TINOS_LICENSE_PATH = "vendor/design/LICENSE.Tinos-OFL-1.1.txt";
|
|
77
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_TINOS_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/Tinos-OFL-1.1.txt";
|
|
78
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_COUSINE_LICENSE_PATH = "vendor/design/LICENSE.Cousine-OFL-1.1.txt";
|
|
79
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_COUSINE_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/Cousine-OFL-1.1.txt";
|
|
80
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_NOTO_SYMBOLS_LICENSE_PATH = "vendor/design/LICENSE.NotoSansSymbols2-OFL-1.1.txt";
|
|
81
|
+
export declare const DEFAULT_FILE_VIEWER_POSTSCRIPT_NOTO_SYMBOLS_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/NotoSansSymbols2-OFL-1.1.txt";
|
|
82
|
+
export declare const DEFAULT_FILE_VIEWER_IDML_WORKER_PATH = "vendor/design/idml.worker.js";
|
|
83
|
+
export declare const DEFAULT_FILE_VIEWER_IDML_WORKER_PACKAGE_PATH = "@file-viewer/renderer-design/worker/idml.worker.js";
|
|
84
|
+
export declare const DEFAULT_FILE_VIEWER_IDML_WASM_PATH = "vendor/design/paged_introspect_wasm_bg.wasm";
|
|
85
|
+
export declare const DEFAULT_FILE_VIEWER_IDML_WASM_PACKAGE_PATH = "@paged-media/introspect-wasm/paged_introspect_wasm_bg.wasm";
|
|
86
|
+
export declare const DEFAULT_FILE_VIEWER_IDML_LICENSE_PATH = "vendor/design/LICENSE.introspect-wasm-MPL-2.0.txt";
|
|
87
|
+
export declare const DEFAULT_FILE_VIEWER_IDML_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/MPL-2.0.txt";
|
|
88
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_THIRD_PARTY_NOTICES_PATH = "vendor/design/THIRD_PARTY_NOTICES.md";
|
|
89
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_THIRD_PARTY_NOTICES_PACKAGE_PATH = "@file-viewer/renderer-design/third-party-notices";
|
|
90
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_XMLDOM_LICENSE_PATH = "vendor/design/LICENSE.xmldom-MIT.txt";
|
|
91
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_XMLDOM_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/xmldom-MIT.txt";
|
|
92
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_SAXES_LICENSE_PATH = "vendor/design/LICENSE.saxes-ISC.txt";
|
|
93
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_SAXES_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/saxes-ISC.txt";
|
|
94
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_AG_PSD_LICENSE_PATH = "vendor/design/LICENSE.ag-psd-MIT.txt";
|
|
95
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_AG_PSD_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/ag-psd-MIT.txt";
|
|
96
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_WEBTOON_PSD_LICENSE_PATH = "vendor/design/LICENSE.webtoon-psd-MIT.txt";
|
|
97
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_WEBTOON_PSD_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/webtoon-psd-MIT.txt";
|
|
98
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_BASE64_JS_LICENSE_PATH = "vendor/design/LICENSE.base64-js-MIT.txt";
|
|
99
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_BASE64_JS_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/base64-js-MIT.txt";
|
|
100
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_PAKO_LICENSE_PATH = "vendor/design/LICENSE.pako-MIT.txt";
|
|
101
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_PAKO_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/pako-MIT.txt";
|
|
102
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_XMLCHARS_LICENSE_PATH = "vendor/design/LICENSE.xmlchars-MIT.txt";
|
|
103
|
+
export declare const DEFAULT_FILE_VIEWER_DESIGN_XMLCHARS_LICENSE_PACKAGE_PATH = "@file-viewer/renderer-design/licenses/xmlchars-MIT.txt";
|
|
48
104
|
export declare const DEFAULT_FILE_VIEWER_MODEL_WORKER_URL = "wasm/model/occt-worker.js";
|
|
49
105
|
export declare const DEFAULT_FILE_VIEWER_MODEL_RUNTIME_URL = "wasm/model/occt-import-js.js";
|
|
50
106
|
export declare const DEFAULT_FILE_VIEWER_MODEL_WASM_URL = "wasm/model/occt-import-js.wasm";
|
|
@@ -90,7 +146,7 @@ export interface ResolvedFileViewerModelAssetUrls {
|
|
|
90
146
|
}
|
|
91
147
|
export type FileViewerRendererAssetKind = 'directory' | 'worker' | 'wasm' | 'wasm-directory' | 'script' | 'font' | 'metadata' | 'bundled-wasm' | 'license';
|
|
92
148
|
export type FileViewerRendererAssetTarget = 'public' | 'bundled' | 'external';
|
|
93
|
-
export type FileViewerRendererAssetOptionPath = 'archive.workerUrl' | 'archive.wasmUrl' | 'cad.wasmPath' | 'cad.workerUrl' | 'cad.dwfWasmUrl' | 'data.sqlWasmUrl' | 'docx.workerJsZipUrl' | 'docx.workerUrl' | 'drawing.viewerScriptUrl' | 'iwork.workerUrl' | 'hangul.workerUrl' | 'wordPerfect.workerUrl' | 'wordPerfect.wasmUrl' | 'model.workerUrl' | 'model.runtimeUrl' | 'model.wasmUrl' | 'pdf.workerUrl' | 'pdf.cMapUrl' | 'pdf.wasmUrl' | 'pdf.standardFontDataUrl' | 'pdf.cjkFontFallbackPath' | 'presentation.pptModuleUrl' | 'presentation.pptWorkerUrl' | 'presentation.pptWasmUrl' | 'presentation.pptFontUrl' | 'presentation.workerUrl' | 'spreadsheet.workerUrl' | 'typst.compilerWasmUrl' | 'typst.fontAssetsUrl' | 'typst.rendererWasmUrl';
|
|
149
|
+
export type FileViewerRendererAssetOptionPath = 'archive.workerUrl' | 'archive.wasmUrl' | 'chm.workerUrl' | 'chm.wasmModuleUrl' | 'chm.wasmUrl' | 'cad.wasmPath' | 'cad.workerUrl' | 'cad.dwfWasmUrl' | 'data.sqlWasmUrl' | 'design.illustratorWorkerUrl' | 'design.workerUrl' | 'design.containerWorkerUrl' | 'design.adobeResourceWorkerUrl' | 'design.postscriptWorkerUrl' | 'design.postscriptWasmUrl' | 'design.idmlWorkerUrl' | 'design.idmlWasmUrl' | 'docx.workerJsZipUrl' | 'docx.workerUrl' | 'drawing.viewerScriptUrl' | 'iwork.workerUrl' | 'hangul.workerUrl' | 'wordPerfect.workerUrl' | 'wordPerfect.wasmUrl' | 'model.workerUrl' | 'model.runtimeUrl' | 'model.wasmUrl' | 'pdf.workerUrl' | 'pdf.cMapUrl' | 'pdf.wasmUrl' | 'pdf.standardFontDataUrl' | 'pdf.cjkFontFallbackPath' | 'presentation.pptModuleUrl' | 'presentation.pptWorkerUrl' | 'presentation.pptWasmUrl' | 'presentation.pptFontUrl' | 'presentation.workerUrl' | 'spreadsheet.workerUrl' | 'typst.compilerWasmUrl' | 'typst.fontAssetsUrl' | 'typst.rendererWasmUrl';
|
|
94
150
|
export interface FileViewerRendererAssetDefinition {
|
|
95
151
|
id: string;
|
|
96
152
|
rendererId: string;
|
|
@@ -129,11 +185,22 @@ export declare const resolveFileViewerIworkWorkerUrl: (options?: Pick<FileViewer
|
|
|
129
185
|
export declare const resolveFileViewerHangulWorkerUrl: (options?: Pick<FileViewerHangulOptions, "workerUrl"> | null, documentBaseUrl?: string) => string;
|
|
130
186
|
export declare const resolveFileViewerWordPerfectWorkerUrl: (options?: Pick<FileViewerWordPerfectOptions, "workerUrl"> | null, documentBaseUrl?: string) => string;
|
|
131
187
|
export declare const resolveFileViewerWordPerfectWasmUrl: (options?: Pick<FileViewerWordPerfectOptions, "wasmUrl"> | null, documentBaseUrl?: string) => string;
|
|
188
|
+
export declare const resolveFileViewerChmWorkerUrl: (options?: Pick<FileViewerChmOptions, "workerUrl"> | null, documentBaseUrl?: string) => string;
|
|
189
|
+
export declare const resolveFileViewerChmWasmModuleUrl: (options?: Pick<FileViewerChmOptions, "wasmModuleUrl"> | null, documentBaseUrl?: string) => string;
|
|
190
|
+
export declare const resolveFileViewerChmWasmUrl: (options?: Pick<FileViewerChmOptions, "wasmUrl"> | null, documentBaseUrl?: string) => string;
|
|
132
191
|
export declare const resolveFileViewerPresentationWorkerUrl: (options?: Pick<FileViewerPresentationOptions, "workerUrl"> | null, documentBaseUrl?: string) => string;
|
|
133
192
|
export declare const resolveFileViewerTypstCompilerWasmUrl: (options?: Pick<FileViewerTypstOptions, "compilerWasmUrl"> | null, overrides?: Array<string | undefined>, documentBaseUrl?: string) => string;
|
|
134
193
|
export declare const resolveFileViewerTypstRendererWasmUrl: (options?: Pick<FileViewerTypstOptions, "rendererWasmUrl"> | null, overrides?: Array<string | undefined>, documentBaseUrl?: string) => string;
|
|
135
194
|
export declare const resolveFileViewerTypstFontAssetsUrl: (options?: Pick<FileViewerTypstOptions, "fontAssetsUrl"> | null, overrides?: Array<string | undefined>, documentBaseUrl?: string) => string;
|
|
136
195
|
export declare const resolveFileViewerDataSqlWasmUrl: (options?: Pick<FileViewerDataOptions, "sqlWasmUrl"> | null, overrides?: Array<string | undefined>, documentBaseUrl?: string) => string;
|
|
196
|
+
export declare const resolveFileViewerDesignWorkerUrl: (options?: Pick<FileViewerDesignOptions, "workerUrl"> | null, documentBaseUrl?: string) => string;
|
|
197
|
+
export declare const resolveFileViewerIllustratorWorkerUrl: (options?: Pick<FileViewerDesignOptions, "illustratorWorkerUrl"> | null, documentBaseUrl?: string) => string;
|
|
198
|
+
export declare const resolveFileViewerDesignContainerWorkerUrl: (options?: Pick<FileViewerDesignOptions, "containerWorkerUrl"> | null, documentBaseUrl?: string) => string;
|
|
199
|
+
export declare const resolveFileViewerAdobeResourceWorkerUrl: (options?: Pick<FileViewerDesignOptions, "adobeResourceWorkerUrl"> | null, documentBaseUrl?: string) => string;
|
|
200
|
+
export declare const resolveFileViewerPostscriptWorkerUrl: (options?: Pick<FileViewerDesignOptions, "postscriptWorkerUrl"> | null, documentBaseUrl?: string) => string;
|
|
201
|
+
export declare const resolveFileViewerPostscriptWasmUrl: (options?: Pick<FileViewerDesignOptions, "postscriptWasmUrl"> | null, documentBaseUrl?: string) => string;
|
|
202
|
+
export declare const resolveFileViewerIdmlWorkerUrl: (options?: Pick<FileViewerDesignOptions, "idmlWorkerUrl"> | null, documentBaseUrl?: string) => string;
|
|
203
|
+
export declare const resolveFileViewerIdmlWasmUrl: (options?: Pick<FileViewerDesignOptions, "idmlWasmUrl"> | null, documentBaseUrl?: string) => string;
|
|
137
204
|
export declare const resolveFileViewerModelAssetUrls: (options?: Pick<FileViewerModelOptions, "workerUrl" | "runtimeUrl" | "wasmUrl"> | null, documentBaseUrl?: string) => ResolvedFileViewerModelAssetUrls;
|
|
138
205
|
export declare const listFileViewerRendererAssetManifests: () => FileViewerRendererAssetManifest[];
|
|
139
206
|
export declare const getFileViewerRendererAssetManifest: (rendererId: string) => FileViewerRendererAssetManifest | null;
|