@file-viewer/core 3.1.1 → 3.2.0
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 +3 -121
- package/README.md +3 -126
- package/dist/assets.d.ts +2 -2
- package/dist/assets.js +1 -5
- package/dist/browser/controller.d.ts +1 -2
- package/dist/browser/controller.js +2 -34
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +2 -2
- package/dist/config/options.d.ts +1 -1
- package/dist/contracts/types.d.ts +30 -416
- package/dist/contracts/xml.d.ts +48 -0
- package/dist/contracts/xml.js +1 -0
- package/dist/export.d.ts +3 -10
- package/dist/export.js +2 -9
- package/dist/exportDocument.d.ts +1 -12
- package/dist/exportDocument.js +7 -31
- package/dist/features/document/dom/anchors.d.ts +1 -1
- package/dist/features/document/dom/index.d.ts +5 -5
- package/dist/features/document/dom/index.js +3 -3
- package/dist/features/document/dom/providers.d.ts +1 -1
- package/dist/features/document/events.d.ts +2 -2
- package/dist/features/document/events.js +3 -3
- package/dist/features/document/fit.d.ts +1 -1
- package/dist/features/document/fit.js +1 -1
- package/dist/features/document/model.d.ts +1 -1
- package/dist/features/document/search.d.ts +1 -1
- package/dist/features/document/search.js +2 -2
- package/dist/features/document/viewState.d.ts +1 -1
- package/dist/features/document/viewState.js +2 -2
- package/dist/features/document/zoom.d.ts +3 -2
- package/dist/features/document/zoom.js +19 -3
- package/dist/features/document/zoomGestures.d.ts +11 -0
- package/dist/features/document/zoomGestures.js +111 -0
- package/dist/features/printMask.d.ts +1 -1
- package/dist/features/printMaskDesigner.d.ts +2 -6
- package/dist/features/printMaskDesigner.js +2 -11
- package/dist/features/printMaskLoader.d.ts +1 -7
- package/dist/features/printMaskLoader.js +1 -7
- package/dist/features/watermark.d.ts +1 -1
- package/dist/headless.d.ts +29 -29
- package/dist/headless.js +16 -21
- package/dist/i18n/messages.d.ts +1 -1
- package/dist/i18n/messages.de.d.ts +1 -5
- package/dist/i18n/messages.de.js +0 -4
- package/dist/i18n/messages.ja.d.ts +1 -6
- package/dist/i18n/messages.ja.js +0 -5
- package/dist/i18n/messages.js +2 -2
- package/dist/index.d.ts +74 -73
- package/dist/index.js +37 -37
- package/dist/lifecycle/facade.d.ts +4 -4
- package/dist/lifecycle/facade.js +2 -2
- package/dist/lifecycle/operations.d.ts +4 -4
- package/dist/lifecycle/operations.js +4 -9
- package/dist/output/canvasImage.d.ts +1 -2
- package/dist/output/canvasImage.js +1 -4
- package/dist/output/export.d.ts +2 -4
- package/dist/output/export.js +133 -81
- package/dist/output/printLayout.d.ts +2 -5
- package/dist/output/printLayout.js +37 -9
- package/dist/output/snapshotDownload.d.ts +1 -2
- package/dist/output/snapshotDownload.js +2 -3
- package/dist/platform/assets.d.ts +9 -16
- package/dist/platform/assets.js +60 -17
- package/dist/platform/copiedAssets.d.ts +0 -1
- package/dist/platform/copiedAssets.js +1 -2
- package/dist/presentation/state.d.ts +1 -1
- package/dist/presentation/state.js +3 -3
- package/dist/print-mask.d.ts +2 -2
- package/dist/print-mask.js +1 -1
- package/dist/registry/capabilities.d.ts +3 -16
- package/dist/registry/capabilities.js +2 -15
- package/dist/registry/formats.d.ts +5 -5
- package/dist/registry/formats.generated.d.ts +26 -8
- package/dist/registry/formats.generated.js +36 -4
- package/dist/registry/formats.js +2 -2
- package/dist/registry/registry.d.ts +6 -15
- package/dist/registry/registry.js +24 -10
- package/dist/renderers/image.d.ts +1 -1
- package/dist/renderers/image.js +26 -5
- package/dist/renderers/index.d.ts +30 -11
- package/dist/renderers/index.js +5 -11
- package/dist/rendering/dispatcher.d.ts +1 -6
- package/dist/rendering/dispatcher.js +3 -3
- package/dist/rendering/handler.d.ts +10 -15
- package/dist/rendering/handler.js +20 -27
- package/dist/security/svgResources.d.ts +0 -10
- package/dist/security/svgResources.js +2 -11
- package/dist/source/index.d.ts +3 -3
- package/dist/source/index.js +1 -1
- package/dist/source/loading.d.ts +56 -15
- package/dist/source/loading.js +177 -87
- package/dist/source/precheck.d.ts +1 -13
- package/dist/source/precheck.js +2 -9
- package/dist/source/textEncoding.d.ts +6 -3
- package/dist/source/textEncoding.js +58 -8
- package/dist/viewer/createViewer.d.ts +1 -1
- package/dist/viewer/createViewer.js +103 -33
- package/dist/viewer/loading.d.ts +2 -6
- package/dist/viewer/loading.js +1 -9
- package/dist/viewer/operations.d.ts +3 -3
- package/dist/viewer/operations.js +6 -14
- package/dist/viewer/state.d.ts +2 -6
- package/dist/viewer/state.js +3 -8
- package/package.json +127 -19
|
@@ -11,18 +11,24 @@ const readPositiveCssNumber = (value) => {
|
|
|
11
11
|
const parsed = Number.parseFloat(value);
|
|
12
12
|
return Number.isFinite(parsed) && parsed > 0 ? parsed : 0;
|
|
13
13
|
};
|
|
14
|
-
/**
|
|
15
|
-
* Browser print helper. DOM measurement belongs in the core browser layer
|
|
16
|
-
* because it depends on CSS layout and HTMLElement.
|
|
17
|
-
*/
|
|
18
14
|
export const getElementPrintPageSize = (element, fallback = {}) => {
|
|
19
|
-
|
|
20
|
-
const
|
|
15
|
+
var _a;
|
|
16
|
+
const style = (_a = element.ownerDocument.defaultView) === null || _a === void 0 ? void 0 : _a.getComputedStyle(element);
|
|
17
|
+
const horizontal = style && style.boxSizing !== 'border-box'
|
|
18
|
+
? ['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth']
|
|
19
|
+
.reduce((sum, key) => sum + readPositiveCssNumber(style[key]), 0)
|
|
20
|
+
: 0;
|
|
21
|
+
const vertical = style && style.boxSizing !== 'border-box'
|
|
22
|
+
? ['paddingTop', 'paddingBottom', 'borderTopWidth', 'borderBottomWidth']
|
|
23
|
+
.reduce((sum, key) => sum + readPositiveCssNumber(style[key]), 0)
|
|
24
|
+
: 0;
|
|
25
|
+
const cssWidth = readPositiveCssNumber((style === null || style === void 0 ? void 0 : style.width) || '');
|
|
26
|
+
const cssHeight = readPositiveCssNumber((style === null || style === void 0 ? void 0 : style.height) || '') || readPositiveCssNumber((style === null || style === void 0 ? void 0 : style.minHeight) || '');
|
|
27
|
+
const width = (cssWidth ? cssWidth + horizontal : 0) ||
|
|
21
28
|
element.offsetWidth ||
|
|
22
29
|
fallback.width ||
|
|
23
30
|
element.getBoundingClientRect().width;
|
|
24
|
-
const height =
|
|
25
|
-
readPositiveCssNumber(style.minHeight) ||
|
|
31
|
+
const height = (cssHeight ? cssHeight + vertical : 0) ||
|
|
26
32
|
element.offsetHeight ||
|
|
27
33
|
fallback.height ||
|
|
28
34
|
element.getBoundingClientRect().height;
|
|
@@ -50,12 +56,28 @@ export const applyPrintPageSize = (element, size, options = {}) => {
|
|
|
50
56
|
element.style.overflow = 'visible';
|
|
51
57
|
}
|
|
52
58
|
};
|
|
53
|
-
export const buildPrintPageStyle = ({ selector, width, height, heightMode = 'fixed', }) => {
|
|
59
|
+
export const buildPrintPageStyle = ({ selector, width, height, heightMode = 'fixed', pages, }) => {
|
|
54
60
|
const pageWidth = formatCssPixels(width);
|
|
55
61
|
const pageHeight = formatCssPixels(height);
|
|
56
62
|
const heightRule = heightMode === 'fixed'
|
|
57
63
|
? `height:${pageHeight}!important;min-height:${pageHeight}!important;overflow:hidden!important;`
|
|
58
64
|
: `height:auto!important;min-height:${pageHeight}!important;overflow:visible!important;`;
|
|
65
|
+
const mixedPages = heightMode === 'fixed' && pages && pages.length > 1 &&
|
|
66
|
+
pages.every(page => Number.isFinite(page.width) && page.width > 0 && Number.isFinite(page.height) && page.height > 0) &&
|
|
67
|
+
pages.some(page => normalizeCssPixels(page.width) !== normalizeCssPixels(width) || normalizeCssPixels(page.height) !== normalizeCssPixels(height))
|
|
68
|
+
? pages : [];
|
|
69
|
+
const namedPages = mixedPages.map((page, index) => {
|
|
70
|
+
const name = `file-viewer-print-page-${index}`;
|
|
71
|
+
const w = formatCssPixels(page.width), h = formatCssPixels(page.height);
|
|
72
|
+
return `
|
|
73
|
+
@page ${name} { size: ${w} ${h}; margin: 0; }
|
|
74
|
+
@media print {
|
|
75
|
+
${selector}[data-viewer-print-page-index="${index}"] {
|
|
76
|
+
page: ${name}; width: ${w}!important; height: ${h}!important; min-height: ${h}!important;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
}).join('');
|
|
59
81
|
return `
|
|
60
82
|
@page { size: ${formatCssInches(width)} ${formatCssInches(height)}; margin: 0; }
|
|
61
83
|
@media print {
|
|
@@ -89,5 +111,11 @@ export const buildPrintPageStyle = ({ selector, width, height, heightMode = 'fix
|
|
|
89
111
|
page-break-after: auto;
|
|
90
112
|
}
|
|
91
113
|
}
|
|
114
|
+
${namedPages}
|
|
115
|
+
${mixedPages.length ? `@media print {
|
|
116
|
+
html, body, .viewer-export-shell, .viewer-export-content {
|
|
117
|
+
width: auto!important; min-width: 0!important; max-width: none!important;
|
|
118
|
+
}
|
|
119
|
+
}` : ''}
|
|
92
120
|
`;
|
|
93
121
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { FileRenderContext, FileViewerOptions } from
|
|
1
|
+
import type { FileRenderContext, FileViewerOptions } from "../contracts/types.js";
|
|
2
2
|
export declare const isFileViewerSnapshotDownloadPermitted: (options?: FileViewerOptions) => boolean;
|
|
3
|
-
/** Renderer-local downloads still use the owning viewer's hooks and request version. */
|
|
4
3
|
export declare const createFileViewerSnapshotDownload: ({ getOptions, isCurrent, beforeDownload }: {
|
|
5
4
|
getOptions: () => FileViewerOptions | undefined;
|
|
6
5
|
isCurrent: () => boolean;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { isFileViewerToolbarOperationPermitted } from
|
|
2
|
-
import { triggerFileViewerBlobDownload } from
|
|
1
|
+
import { isFileViewerToolbarOperationPermitted } from "../lifecycle/operations.js";
|
|
2
|
+
import { triggerFileViewerBlobDownload } from "./export.js";
|
|
3
3
|
export const isFileViewerSnapshotDownloadPermitted = (options) => isFileViewerToolbarOperationPermitted(options === null || options === void 0 ? void 0 : options.toolbar, 'download') &&
|
|
4
4
|
isFileViewerToolbarOperationPermitted(options === null || options === void 0 ? void 0 : options.toolbar, 'export-html');
|
|
5
|
-
/** Renderer-local downloads still use the owning viewer's hooks and request version. */
|
|
6
5
|
export const createFileViewerSnapshotDownload = ({ getOptions, isCurrent, beforeDownload }) => async (create) => {
|
|
7
6
|
var _a, _b;
|
|
8
7
|
const allowed = () => isCurrent() && isFileViewerSnapshotDownloadPermitted(getOptions());
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FileViewerArchiveOptions, FileViewerCadOptions, FileViewerChmOptions, FileViewerDataOptions, FileViewerDesignOptions, FileViewerDocxOptions, FileViewerDrawingOptions, FileViewerIworkOptions, FileViewerHangulOptions, FileViewerModelOptions, FileViewerOptions, FileViewerPdfOptions, FileViewerPresentationOptions, FileViewerSpreadsheetOptions, FileViewerTypstOptions, FileViewerWordPerfectOptions } from
|
|
1
|
+
import type { FileViewerArchiveOptions, FileViewerCadOptions, FileViewerChmOptions, FileViewerDataOptions, FileViewerDesignOptions, FileViewerDocxOptions, FileViewerDrawingOptions, FileViewerIworkOptions, FileViewerHangulOptions, FileViewerModelOptions, FileViewerOptions, FileViewerPdfOptions, FileViewerPresentationOptions, FileViewerSpreadsheetOptions, FileViewerTypstOptions, FileViewerWordPerfectOptions } from "../contracts/types.js";
|
|
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
4
|
export declare const DEFAULT_FILE_VIEWER_CHM_WORKER_PATH = "vendor/chm/chm.worker.js";
|
|
@@ -9,10 +9,10 @@ export declare const DEFAULT_FILE_VIEWER_CHM_WASM_PATH = "vendor/chm/chm_wasm_bg
|
|
|
9
9
|
export declare const DEFAULT_FILE_VIEWER_CHM_WASM_PACKAGE_PATH = "@file-viewer/renderer-chm/wasm/chm_wasm_bg.wasm";
|
|
10
10
|
export declare const DEFAULT_FILE_VIEWER_DOCX_WORKER_PATH = "vendor/docx/docx.worker.js";
|
|
11
11
|
export declare const DEFAULT_FILE_VIEWER_DOCX_WORKER_JSZIP_PATH = "vendor/docx/jszip.min.js";
|
|
12
|
-
export declare const DEFAULT_FILE_VIEWER_DOCX_RUNTIME_VERSION = "0.3.
|
|
12
|
+
export declare const DEFAULT_FILE_VIEWER_DOCX_RUNTIME_VERSION = "0.3.35";
|
|
13
13
|
export declare const DEFAULT_FILE_VIEWER_PRESENTATION_WORKER_PATH = "vendor/pptx/pptx.worker.js";
|
|
14
14
|
export declare const DEFAULT_FILE_VIEWER_PPT_RUNTIME_PATH = "vendor/ppt";
|
|
15
|
-
export declare const DEFAULT_FILE_VIEWER_PPT_RUNTIME_VERSION = "0.3.
|
|
15
|
+
export declare const DEFAULT_FILE_VIEWER_PPT_RUNTIME_VERSION = "0.3.6";
|
|
16
16
|
export declare const DEFAULT_FILE_VIEWER_PPT_MODULE_PATH = "vendor/ppt/index.mjs";
|
|
17
17
|
export declare const DEFAULT_FILE_VIEWER_PPT_WORKER_PATH = "vendor/ppt/worker.mjs";
|
|
18
18
|
export declare const DEFAULT_FILE_VIEWER_PPT_FRAME_CACHE_PATH = "vendor/ppt/frame-cache.mjs";
|
|
@@ -36,13 +36,13 @@ export declare const DEFAULT_FILE_VIEWER_PDF_STANDARD_FONT_PATH = "vendor/pdf/st
|
|
|
36
36
|
export declare const DEFAULT_FILE_VIEWER_PDF_CJK_FONT_FALLBACK_PATH = "vendor/pdf/fonts/";
|
|
37
37
|
export declare const DEFAULT_FILE_VIEWER_DRAWIO_VIEWER_SCRIPT_PATH = "vendor/drawio/viewer-static.min.js";
|
|
38
38
|
export declare const DEFAULT_FILE_VIEWER_DRAWIO_ASSET_PATH = "vendor/drawio/";
|
|
39
|
-
export declare const DEFAULT_FILE_VIEWER_CAD_RUNTIME_VERSION = "0.8.
|
|
39
|
+
export declare const DEFAULT_FILE_VIEWER_CAD_RUNTIME_VERSION = "0.8.3";
|
|
40
40
|
export declare const COMPATIBILITY_FILE_VIEWER_CAD_RUNTIME_VERSION = "0.8.0";
|
|
41
|
-
export declare const DEFAULT_FILE_VIEWER_CAD_WASM_PATH = "wasm/cad/0.8.
|
|
42
|
-
export declare const DEFAULT_FILE_VIEWER_CAD_WORKER_PATH = "wasm/cad/0.8.
|
|
43
|
-
export declare const DEFAULT_FILE_VIEWER_CAD_DWF_WASM_PATH = "wasm/cad/0.8.
|
|
44
|
-
export declare const DEFAULT_FILE_VIEWER_CAD_LIBREDWG_SCRIPT_PATH = "wasm/cad/0.8.
|
|
45
|
-
export declare const DEFAULT_FILE_VIEWER_CAD_LIBREDWG_WASM_PATH = "wasm/cad/0.8.
|
|
41
|
+
export declare const DEFAULT_FILE_VIEWER_CAD_WASM_PATH = "wasm/cad/0.8.3/";
|
|
42
|
+
export declare const DEFAULT_FILE_VIEWER_CAD_WORKER_PATH = "wasm/cad/0.8.3/dwg-worker.js";
|
|
43
|
+
export declare const DEFAULT_FILE_VIEWER_CAD_DWF_WASM_PATH = "wasm/cad/0.8.3/dwfv-render.wasm";
|
|
44
|
+
export declare const DEFAULT_FILE_VIEWER_CAD_LIBREDWG_SCRIPT_PATH = "wasm/cad/0.8.3/libredwg-web.js";
|
|
45
|
+
export declare const DEFAULT_FILE_VIEWER_CAD_LIBREDWG_WASM_PATH = "wasm/cad/0.8.3/libredwg-web.wasm";
|
|
46
46
|
export declare const DEFAULT_FILE_VIEWER_TYPST_COMPILER_WASM_URL = "wasm/typst/typst_ts_web_compiler_bg.wasm";
|
|
47
47
|
export declare const DEFAULT_FILE_VIEWER_TYPST_RENDERER_WASM_URL = "wasm/typst/typst_ts_renderer_bg.wasm";
|
|
48
48
|
export declare const DEFAULT_FILE_VIEWER_TYPST_FONT_ASSETS_URL = "wasm/typst/fonts/";
|
|
@@ -119,13 +119,6 @@ export interface ResolveFileViewerAssetUrlOptions {
|
|
|
119
119
|
export declare const normalizeFileViewerAssetBaseUrl: (baseUrl?: string | URL | null) => string | undefined;
|
|
120
120
|
export declare const setDefaultFileViewerAssetBaseUrl: (baseUrl?: string | URL | null) => void;
|
|
121
121
|
export declare const resetDefaultFileViewerAssetBaseUrl: () => void;
|
|
122
|
-
/**
|
|
123
|
-
* Resolves the stable public base for runtime assets without reading
|
|
124
|
-
* bundler-specific environment metadata or webpack public-path variables.
|
|
125
|
-
* Explicit HTML `<base>` configuration stays authoritative; for SPA fallback
|
|
126
|
-
* routes, emitted Vite/Webpack/UMI entry scripts reveal the deployment root
|
|
127
|
-
* more reliably than the route-derived page URL.
|
|
128
|
-
*/
|
|
129
122
|
export declare const resolveFileViewerRuntimeAssetBaseUrl: (documentRef: Document) => string;
|
|
130
123
|
export declare const getDefaultFileViewerAssetBaseUrl: (documentRef?: Document | null) => string | undefined;
|
|
131
124
|
export interface ResolvedFileViewerCadAssetUrls {
|
package/dist/platform/assets.js
CHANGED
|
@@ -8,10 +8,10 @@ export const DEFAULT_FILE_VIEWER_CHM_WASM_PATH = 'vendor/chm/chm_wasm_bg.wasm';
|
|
|
8
8
|
export const DEFAULT_FILE_VIEWER_CHM_WASM_PACKAGE_PATH = '@file-viewer/renderer-chm/wasm/chm_wasm_bg.wasm';
|
|
9
9
|
export const DEFAULT_FILE_VIEWER_DOCX_WORKER_PATH = 'vendor/docx/docx.worker.js';
|
|
10
10
|
export const DEFAULT_FILE_VIEWER_DOCX_WORKER_JSZIP_PATH = 'vendor/docx/jszip.min.js';
|
|
11
|
-
export const DEFAULT_FILE_VIEWER_DOCX_RUNTIME_VERSION = '0.3.
|
|
11
|
+
export const DEFAULT_FILE_VIEWER_DOCX_RUNTIME_VERSION = '0.3.35';
|
|
12
12
|
export const DEFAULT_FILE_VIEWER_PRESENTATION_WORKER_PATH = 'vendor/pptx/pptx.worker.js';
|
|
13
13
|
export const DEFAULT_FILE_VIEWER_PPT_RUNTIME_PATH = 'vendor/ppt';
|
|
14
|
-
export const DEFAULT_FILE_VIEWER_PPT_RUNTIME_VERSION = '0.3.
|
|
14
|
+
export const DEFAULT_FILE_VIEWER_PPT_RUNTIME_VERSION = '0.3.6';
|
|
15
15
|
export const DEFAULT_FILE_VIEWER_PPT_MODULE_PATH = `${DEFAULT_FILE_VIEWER_PPT_RUNTIME_PATH}/index.mjs`;
|
|
16
16
|
export const DEFAULT_FILE_VIEWER_PPT_WORKER_PATH = `${DEFAULT_FILE_VIEWER_PPT_RUNTIME_PATH}/worker.mjs`;
|
|
17
17
|
export const DEFAULT_FILE_VIEWER_PPT_FRAME_CACHE_PATH = `${DEFAULT_FILE_VIEWER_PPT_RUNTIME_PATH}/frame-cache.mjs`;
|
|
@@ -35,7 +35,7 @@ export const DEFAULT_FILE_VIEWER_PDF_STANDARD_FONT_PATH = 'vendor/pdf/standard_f
|
|
|
35
35
|
export const DEFAULT_FILE_VIEWER_PDF_CJK_FONT_FALLBACK_PATH = 'vendor/pdf/fonts/';
|
|
36
36
|
export const DEFAULT_FILE_VIEWER_DRAWIO_VIEWER_SCRIPT_PATH = 'vendor/drawio/viewer-static.min.js';
|
|
37
37
|
export const DEFAULT_FILE_VIEWER_DRAWIO_ASSET_PATH = 'vendor/drawio/';
|
|
38
|
-
export const DEFAULT_FILE_VIEWER_CAD_RUNTIME_VERSION = '0.8.
|
|
38
|
+
export const DEFAULT_FILE_VIEWER_CAD_RUNTIME_VERSION = '0.8.3';
|
|
39
39
|
export const COMPATIBILITY_FILE_VIEWER_CAD_RUNTIME_VERSION = '0.8.0';
|
|
40
40
|
export const DEFAULT_FILE_VIEWER_CAD_WASM_PATH = `wasm/cad/${DEFAULT_FILE_VIEWER_CAD_RUNTIME_VERSION}/`;
|
|
41
41
|
export const DEFAULT_FILE_VIEWER_CAD_WORKER_PATH = `${DEFAULT_FILE_VIEWER_CAD_WASM_PATH}dwg-worker.js`;
|
|
@@ -45,8 +45,6 @@ export const DEFAULT_FILE_VIEWER_CAD_LIBREDWG_WASM_PATH = `${DEFAULT_FILE_VIEWER
|
|
|
45
45
|
export const DEFAULT_FILE_VIEWER_TYPST_COMPILER_WASM_URL = 'wasm/typst/typst_ts_web_compiler_bg.wasm';
|
|
46
46
|
export const DEFAULT_FILE_VIEWER_TYPST_RENDERER_WASM_URL = 'wasm/typst/typst_ts_renderer_bg.wasm';
|
|
47
47
|
export const DEFAULT_FILE_VIEWER_TYPST_FONT_ASSETS_URL = 'wasm/typst/fonts/';
|
|
48
|
-
// Compatibility aliases kept for older imports. They intentionally resolve to
|
|
49
|
-
// local viewer assets; the preview runtime must not fall back to a public CDN.
|
|
50
48
|
export const FALLBACK_FILE_VIEWER_TYPST_COMPILER_WASM_URL = DEFAULT_FILE_VIEWER_TYPST_COMPILER_WASM_URL;
|
|
51
49
|
export const FALLBACK_FILE_VIEWER_TYPST_RENDERER_WASM_URL = DEFAULT_FILE_VIEWER_TYPST_RENDERER_WASM_URL;
|
|
52
50
|
export const DEFAULT_FILE_VIEWER_TYPST_COMPILER_WASM_PACKAGE_PATH = '@myriaddreamin/typst-ts-web-compiler/pkg/typst_ts_web_compiler_bg.wasm';
|
|
@@ -165,9 +163,6 @@ const resolveFileViewerScriptAssetBaseCandidate = (script, documentBaseUrl, inde
|
|
|
165
163
|
score += 8;
|
|
166
164
|
}
|
|
167
165
|
if (documentPathname.startsWith(candidateUrl.pathname)) {
|
|
168
|
-
// Prefer the deepest candidate that is still an ancestor of the SPA
|
|
169
|
-
// route. This avoids stripping an earlier deployment segment named
|
|
170
|
-
// `assets` when the emitted suffix is actually `static/js`.
|
|
171
166
|
score += 16 + pathDepth(candidateUrl.pathname) / 4;
|
|
172
167
|
}
|
|
173
168
|
if (script.type === 'module') {
|
|
@@ -222,13 +217,6 @@ const resolveFileViewerScriptAssetBaseCandidate = (script, documentBaseUrl, inde
|
|
|
222
217
|
return [];
|
|
223
218
|
}
|
|
224
219
|
};
|
|
225
|
-
/**
|
|
226
|
-
* Resolves the stable public base for runtime assets without reading
|
|
227
|
-
* bundler-specific environment metadata or webpack public-path variables.
|
|
228
|
-
* Explicit HTML `<base>` configuration stays authoritative; for SPA fallback
|
|
229
|
-
* routes, emitted Vite/Webpack/UMI entry scripts reveal the deployment root
|
|
230
|
-
* more reliably than the route-derived page URL.
|
|
231
|
-
*/
|
|
232
220
|
export const resolveFileViewerRuntimeAssetBaseUrl = (documentRef) => {
|
|
233
221
|
var _a;
|
|
234
222
|
const documentBaseUrl = documentRef.baseURI || documentRef.URL || 'file:///';
|
|
@@ -255,8 +243,6 @@ export const getDefaultFileViewerAssetBaseUrl = (documentRef) => {
|
|
|
255
243
|
if (configuredFileViewerAssetBaseUrl !== automaticFileViewerAssetBaseUrl) {
|
|
256
244
|
return configuredFileViewerAssetBaseUrl;
|
|
257
245
|
}
|
|
258
|
-
// Core remains environment-neutral: callers that want automatic browser
|
|
259
|
-
// inference pass their owning Document explicitly.
|
|
260
246
|
return documentRef ? resolveFileViewerRuntimeAssetBaseUrl(documentRef) : undefined;
|
|
261
247
|
};
|
|
262
248
|
const createDesignThirdPartyAssets = (rendererId, includeContainerXmlLicenses = false) => {
|
|
@@ -602,6 +588,24 @@ export const DEFAULT_FILE_VIEWER_RENDERER_ASSET_MANIFESTS = [
|
|
|
602
588
|
defaultPath: DEFAULT_FILE_VIEWER_CAD_LIBREDWG_WASM_PATH,
|
|
603
589
|
description: 'LibreDWG WebAssembly runtime loaded by the CAD DWG worker for offline parsing.',
|
|
604
590
|
},
|
|
591
|
+
{
|
|
592
|
+
id: 'cad-license',
|
|
593
|
+
rendererId: 'cad',
|
|
594
|
+
kind: 'license',
|
|
595
|
+
target: 'public',
|
|
596
|
+
required: true,
|
|
597
|
+
defaultPath: `${DEFAULT_FILE_VIEWER_CAD_WASM_PATH}LICENSE`,
|
|
598
|
+
description: 'The installed CAD runtime redistribution license.',
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
id: 'cad-notice',
|
|
602
|
+
rendererId: 'cad',
|
|
603
|
+
kind: 'license',
|
|
604
|
+
target: 'public',
|
|
605
|
+
required: true,
|
|
606
|
+
defaultPath: `${DEFAULT_FILE_VIEWER_CAD_WASM_PATH}NOTICE`,
|
|
607
|
+
description: 'The installed CAD runtime third-party attribution notice.',
|
|
608
|
+
},
|
|
605
609
|
{
|
|
606
610
|
id: 'cad-compat-0-8-0-wasm-directory',
|
|
607
611
|
rendererId: 'cad',
|
|
@@ -897,11 +901,40 @@ export const DEFAULT_FILE_VIEWER_RENDERER_ASSET_MANIFESTS = [
|
|
|
897
901
|
packagePath: DEFAULT_FILE_VIEWER_WORDPERFECT_MODULE_PACKAGE_PATH,
|
|
898
902
|
description: 'Emscripten ES module loader for the MPL-2.0 libwpd/librevenge WebAssembly runtime.',
|
|
899
903
|
},
|
|
904
|
+
{
|
|
905
|
+
id: 'wordperfect-third-party-notices',
|
|
906
|
+
rendererId: 'office-wordperfect',
|
|
907
|
+
kind: 'license',
|
|
908
|
+
target: 'public',
|
|
909
|
+
required: true,
|
|
910
|
+
defaultPath: 'vendor/wordperfect/THIRD_PARTY_NOTICES.md',
|
|
911
|
+
packagePath: '@file-viewer/renderer-wordperfect/third-party-notices',
|
|
912
|
+
description: 'Matching source availability and third-party notices for the WordPerfect native runtime.',
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
id: 'wordperfect-native-licenses',
|
|
916
|
+
rendererId: 'office-wordperfect',
|
|
917
|
+
kind: 'directory',
|
|
918
|
+
target: 'public',
|
|
919
|
+
required: true,
|
|
920
|
+
defaultPath: 'vendor/wordperfect/licenses',
|
|
921
|
+
description: 'Complete parser and linked toolchain licenses and native provenance.',
|
|
922
|
+
},
|
|
900
923
|
],
|
|
901
924
|
},
|
|
902
925
|
{
|
|
903
926
|
rendererId: 'typst',
|
|
904
927
|
assets: [
|
|
928
|
+
{
|
|
929
|
+
id: 'typst-native-third-party-licenses',
|
|
930
|
+
rendererId: 'typst',
|
|
931
|
+
kind: 'license',
|
|
932
|
+
target: 'public',
|
|
933
|
+
required: true,
|
|
934
|
+
defaultPath: 'wasm/typst/NATIVE_THIRD_PARTY_LICENSES.json',
|
|
935
|
+
packagePath: '@file-viewer/renderer-typst/native-third-party-licenses',
|
|
936
|
+
description: 'Complete collected native dependency license texts and matching Typst WASM provenance.',
|
|
937
|
+
},
|
|
905
938
|
{
|
|
906
939
|
id: 'typst-compiler-wasm',
|
|
907
940
|
rendererId: 'typst',
|
|
@@ -1186,6 +1219,16 @@ export const DEFAULT_FILE_VIEWER_RENDERER_ASSET_MANIFESTS = [
|
|
|
1186
1219
|
rendererId: 'indesign-idml-design',
|
|
1187
1220
|
assets: [
|
|
1188
1221
|
...createDesignThirdPartyAssets('indesign-idml-design'),
|
|
1222
|
+
{
|
|
1223
|
+
id: 'indesign-idml-native-third-party-licenses',
|
|
1224
|
+
rendererId: 'indesign-idml-design',
|
|
1225
|
+
kind: 'license',
|
|
1226
|
+
target: 'public',
|
|
1227
|
+
required: true,
|
|
1228
|
+
defaultPath: 'vendor/design/Introspect_NATIVE_THIRD_PARTY_LICENSES.json',
|
|
1229
|
+
packagePath: '@file-viewer/renderer-design/licenses/Introspect_NATIVE_THIRD_PARTY_LICENSES.json',
|
|
1230
|
+
description: 'Complete collected native dependency license texts and matching Introspect WASM provenance.',
|
|
1231
|
+
},
|
|
1189
1232
|
{
|
|
1190
1233
|
id: 'indesign-idml-worker',
|
|
1191
1234
|
rendererId: 'indesign-idml-design',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getFileViewerRendererAssetManifest, resolveFileViewerRuntimeAssetBaseUrl } from
|
|
1
|
+
import { getFileViewerRendererAssetManifest, resolveFileViewerRuntimeAssetBaseUrl } from "./assets.js";
|
|
2
2
|
const manifests = new WeakMap();
|
|
3
3
|
const MAX_MANIFEST_BYTES = 1024 * 1024;
|
|
4
4
|
const readManifest = async (url, signal) => {
|
|
@@ -56,7 +56,6 @@ const readManifest = async (url, signal) => {
|
|
|
56
56
|
signal === null || signal === void 0 ? void 0 : signal.removeEventListener('abort', abort);
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
/** Finds assets copied by the standard CLI without trusting a SPA fallback or arbitrary manifest URLs. */
|
|
60
59
|
export async function resolveFileViewerCopiedAssetUrl(documentRef, rendererId, assetId, signal) {
|
|
61
60
|
var _a, _b, _c;
|
|
62
61
|
const asset = (_a = getFileViewerRendererAssetManifest(rendererId)) === null || _a === void 0 ? void 0 : _a.assets.find((item) => item.id === assetId);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FileViewerFileRef, FileViewerOptions, FileViewerThemeMode, FileViewerToolbarOptions, FileViewerUiDensity } from
|
|
1
|
+
import type { FileViewerFileRef, FileViewerOptions, FileViewerThemeMode, FileViewerToolbarOptions, FileViewerUiDensity } from "../contracts/types.js";
|
|
2
2
|
export interface ResolveFileViewerPresentationStateInput {
|
|
3
3
|
filename?: string;
|
|
4
4
|
file?: FileViewerFileRef;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { normalizeFileViewerToolbar } from
|
|
2
|
-
import { normalizeFileViewerTheme, resolveFileViewerUiDensity } from
|
|
3
|
-
import { getExtension, resolveFileViewerSourceFilename } from
|
|
1
|
+
import { normalizeFileViewerToolbar } from "../lifecycle/operations.js";
|
|
2
|
+
import { normalizeFileViewerTheme, resolveFileViewerUiDensity } from "../config/options.js";
|
|
3
|
+
import { getExtension, resolveFileViewerSourceFilename } from "../source/index.js";
|
|
4
4
|
export const resolveFileViewerPresentationState = ({ filename, file, url, options, }) => {
|
|
5
5
|
const displayFilename = resolveFileViewerSourceFilename({
|
|
6
6
|
filename,
|
package/dist/print-mask.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { openFileViewerPrintMaskDesigner, } from
|
|
2
|
-
export type { FileViewerPrintMaskDesignerResult, OpenFileViewerPrintMaskDesignerOptions, } from
|
|
1
|
+
export { openFileViewerPrintMaskDesigner, } from "./features/printMaskDesigner.js";
|
|
2
|
+
export type { FileViewerPrintMaskDesignerResult, OpenFileViewerPrintMaskDesignerOptions, } from "./features/printMaskDesigner.js";
|
package/dist/print-mask.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { openFileViewerPrintMaskDesigner, } from
|
|
1
|
+
export { openFileViewerPrintMaskDesigner, } from "./features/printMaskDesigner.js";
|
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
import type { FileRenderExportAdapter, FileViewerOperationAvailability, FileViewerZoomState, RendererDefinition, RendererSession } from
|
|
1
|
+
import type { FileRenderExportAdapter, FileViewerOperationAvailability, FileViewerZoomState, RendererDefinition, RendererSession } from "../contracts/types.js";
|
|
2
2
|
export declare const DEFAULT_OPERATION_AVAILABILITY: FileViewerOperationAvailability;
|
|
3
3
|
export declare const getRendererAvailability: (renderer: RendererDefinition | undefined, session?: RendererSession | null) => FileViewerOperationAvailability;
|
|
4
4
|
export declare const applyFileViewerZoomAvailability: (availability: FileViewerOperationAvailability, zoomState: FileViewerZoomState) => FileViewerOperationAvailability;
|
|
5
5
|
export declare const createUnsupportedAvailability: (extension: string) => FileViewerOperationAvailability;
|
|
6
|
-
/**
|
|
7
|
-
* 这些格式只有专属适配器准备好后才展示打印。
|
|
8
|
-
*
|
|
9
|
-
* 它们的在线预览常依赖分页引擎、虚拟渲染或 Worker 生命周期,直接克隆
|
|
10
|
-
* DOM 很容易只得到当前页或当前视口。
|
|
11
|
-
*/
|
|
12
6
|
export declare const ADAPTER_PRINT_REQUIRED_EXTENSIONS: readonly ["docx", "docm", "dotx", "dotm", "doc", "dot", "ppt", "pdf", "typ", "typst"];
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* 可以稳定进入浏览器打印流程。
|
|
16
|
-
*/
|
|
17
|
-
export declare const DOM_PRINTABLE_EXTENSIONS: readonly ["pptx", "pptm", "potx", "potm", "ppsx", "ppsm", "ofd", "dxf", "dwg", "dwf", "dwfx", "xps", "excalidraw", "drawio", "dio", "mermaid", "mmd", "plantuml", "puml", "umd", "md", "markdown", "olb", "dra", ...("markdown" | "webp" | "jpeg" | "png" | "pdf" | "xyz" | "wasm" | "chm" | "typst" | "xd" | "fla" | "js" | "html" | "svg" | "rb" | "docx" | "docm" | "dotx" | "dotm" | "doc" | "dot" | "ppt" | "pot" | "pptx" | "pptm" | "potx" | "potm" | "ppsx" | "ppsm" | "rtf" | "odt" | "odp" | "xlsx" | "xltx" | "xlsm" | "xlsb" | "xls" | "xlt" | "xla" | "xlam" | "xltm" | "csv" | "tsv" | "ods" | "fods" | "pages" | "numbers" | "key" | "wpd" | "wp" | "wp5" | "wp6" | "dbf" | "ofd" | "hwp" | "hwpx" | "typ" | "zip" | "zipx" | "7z" | "rar" | "tar" | "gz" | "gzip" | "tgz" | "bz2" | "bzip2" | "tbz" | "tbz2" | "xz" | "txz" | "lzma" | "zst" | "tzst" | "cab" | "ar" | "cpio" | "iso" | "xar" | "lha" | "lzh" | "jar" | "war" | "ear" | "apk" | "cbz" | "cbr" | "eml" | "msg" | "mbox" | "olb" | "dra" | "gds" | "oas" | "oasis" | "dxf" | "dwg" | "dwf" | "dwfx" | "xps" | "glb" | "gltf" | "obj" | "stl" | "ply" | "fbx" | "dae" | "3ds" | "3mf" | "amf" | "usd" | "usda" | "usdc" | "usdz" | "kmz" | "step" | "stp" | "iges" | "igs" | "ifc" | "3dm" | "brep" | "pcd" | "wrl" | "vrml" | "vtk" | "vtp" | "geojson" | "kml" | "gpx" | "shp" | "excalidraw" | "drawio" | "dio" | "mermaid" | "mmd" | "plantuml" | "puml" | "xmind" | "epub" | "fb2" | "umd" | "gif" | "jpg" | "bmp" | "tiff" | "tif" | "avif" | "ico" | "heic" | "heif" | "jxl" | "dicom" | "dcm" | "p7m" | "p7s" | "p7c" | "p7b" | "pkcs7" | "cms" | "cmsc" | "tsd" | "tst" | "tsq" | "tsr" | "asics" | "scs" | "asice" | "sce" | "ers" | "asc" | "sig" | "pgp" | "gpg" | "jws" | "md" | "txt" | "json" | "mjs" | "cjs" | "css" | "java" | "py" | "htm" | "jsx" | "ts" | "tsx" | "xml" | "log" | "vue" | "yaml" | "yml" | "ini" | "sh" | "bash" | "sql" | "go" | "rs" | "php" | "c" | "cpp" | "cc" | "h" | "hpp" | "cs" | "diff" | "patch" | "bundle" | "bdl" | "jsonc" | "json5" | "ipynb" | "toml" | "proto" | "hcl" | "tex" | "gv" | "http" | "react" | "swift" | "kt" | "mp4" | "webm" | "m3u8" | "mp3" | "mpeg" | "wav" | "ogg" | "oga" | "opus" | "m4a" | "aac" | "flac" | "weba" | "midi" | "mid" | "psb" | "pdd" | "psdt" | "psd" | "ait" | "ai" | "idml" | "icml" | "idms" | "inx" | "xfl" | "indd" | "indt" | "ps" | "eps" | "ase" | "aco" | "abr" | "csh" | "pat" | "grd" | "asl" | "ttf" | "otf" | "woff" | "woff2" | "sqlite" | "parquet" | "avro" | "webarchive" | "bin" | "hex" | "elf" | "exe" | "dll" | "class" | "macho")[]];
|
|
18
|
-
/**
|
|
19
|
-
* 这些格式默认不展示打印按钮,避免导出半截内容。
|
|
20
|
-
*/
|
|
21
|
-
export declare const NON_PRINTABLE_EXTENSIONS: readonly ["xlsx", "xltx", "xlsm", "xlsb", "xls", "xlt", "xltm", "csv", "tsv", "ods", "fods", "numbers", ...("markdown" | "webp" | "jpeg" | "png" | "pdf" | "xyz" | "wasm" | "chm" | "typst" | "xd" | "fla" | "js" | "html" | "svg" | "rb" | "docx" | "docm" | "dotx" | "dotm" | "doc" | "dot" | "ppt" | "pot" | "pptx" | "pptm" | "potx" | "potm" | "ppsx" | "ppsm" | "rtf" | "odt" | "odp" | "xlsx" | "xltx" | "xlsm" | "xlsb" | "xls" | "xlt" | "xla" | "xlam" | "xltm" | "csv" | "tsv" | "ods" | "fods" | "pages" | "numbers" | "key" | "wpd" | "wp" | "wp5" | "wp6" | "dbf" | "ofd" | "hwp" | "hwpx" | "typ" | "zip" | "zipx" | "7z" | "rar" | "tar" | "gz" | "gzip" | "tgz" | "bz2" | "bzip2" | "tbz" | "tbz2" | "xz" | "txz" | "lzma" | "zst" | "tzst" | "cab" | "ar" | "cpio" | "iso" | "xar" | "lha" | "lzh" | "jar" | "war" | "ear" | "apk" | "cbz" | "cbr" | "eml" | "msg" | "mbox" | "olb" | "dra" | "gds" | "oas" | "oasis" | "dxf" | "dwg" | "dwf" | "dwfx" | "xps" | "glb" | "gltf" | "obj" | "stl" | "ply" | "fbx" | "dae" | "3ds" | "3mf" | "amf" | "usd" | "usda" | "usdc" | "usdz" | "kmz" | "step" | "stp" | "iges" | "igs" | "ifc" | "3dm" | "brep" | "pcd" | "wrl" | "vrml" | "vtk" | "vtp" | "geojson" | "kml" | "gpx" | "shp" | "excalidraw" | "drawio" | "dio" | "mermaid" | "mmd" | "plantuml" | "puml" | "xmind" | "epub" | "fb2" | "umd" | "gif" | "jpg" | "bmp" | "tiff" | "tif" | "avif" | "ico" | "heic" | "heif" | "jxl" | "dicom" | "dcm" | "p7m" | "p7s" | "p7c" | "p7b" | "pkcs7" | "cms" | "cmsc" | "tsd" | "tst" | "tsq" | "tsr" | "asics" | "scs" | "asice" | "sce" | "ers" | "asc" | "sig" | "pgp" | "gpg" | "jws" | "md" | "txt" | "json" | "mjs" | "cjs" | "css" | "java" | "py" | "htm" | "jsx" | "ts" | "tsx" | "xml" | "log" | "vue" | "yaml" | "yml" | "ini" | "sh" | "bash" | "sql" | "go" | "rs" | "php" | "c" | "cpp" | "cc" | "h" | "hpp" | "cs" | "diff" | "patch" | "bundle" | "bdl" | "jsonc" | "json5" | "ipynb" | "toml" | "proto" | "hcl" | "tex" | "gv" | "http" | "react" | "swift" | "kt" | "mp4" | "webm" | "m3u8" | "mp3" | "mpeg" | "wav" | "ogg" | "oga" | "opus" | "m4a" | "aac" | "flac" | "weba" | "midi" | "mid" | "psb" | "pdd" | "psdt" | "psd" | "ait" | "ai" | "idml" | "icml" | "idms" | "inx" | "xfl" | "indd" | "indt" | "ps" | "eps" | "ase" | "aco" | "abr" | "csh" | "pat" | "grd" | "asl" | "ttf" | "otf" | "woff" | "woff2" | "sqlite" | "parquet" | "avro" | "webarchive" | "bin" | "hex" | "elf" | "exe" | "dll" | "class" | "macho")[]];
|
|
7
|
+
export declare const DOM_PRINTABLE_EXTENSIONS: readonly ["pptx", "pptm", "potx", "potm", "ppsx", "ppsm", "ofd", "dxf", "dwg", "dwf", "dwfx", "xps", "excalidraw", "drawio", "dio", "mermaid", "mmd", "plantuml", "puml", "umd", "md", "markdown", "olb", "dra", ...("markdown" | "webp" | "jpeg" | "png" | "pdf" | "xyz" | "wasm" | "chm" | "typst" | "xd" | "fla" | "js" | "html" | "svg" | "rb" | "docx" | "docm" | "dotx" | "dotm" | "doc" | "dot" | "ppt" | "pot" | "pptx" | "pptm" | "potx" | "potm" | "ppsx" | "ppsm" | "rtf" | "odt" | "odp" | "xlsx" | "xltx" | "xlsm" | "xlsb" | "xls" | "xlt" | "xla" | "xlam" | "xltm" | "csv" | "tsv" | "ods" | "fods" | "pages" | "numbers" | "key" | "wpd" | "wp" | "wp5" | "wp6" | "dbf" | "ofd" | "hwp" | "hwpx" | "typ" | "zip" | "zipx" | "7z" | "rar" | "tar" | "gz" | "gzip" | "tgz" | "bz2" | "bzip2" | "tbz" | "tbz2" | "xz" | "txz" | "lzma" | "zst" | "tzst" | "cab" | "ar" | "cpio" | "iso" | "xar" | "lha" | "lzh" | "jar" | "war" | "ear" | "apk" | "cbz" | "cbr" | "eml" | "msg" | "mbox" | "olb" | "dra" | "gds" | "oas" | "oasis" | "dxf" | "dwg" | "dwf" | "dwfx" | "xps" | "glb" | "gltf" | "obj" | "stl" | "ply" | "fbx" | "dae" | "3ds" | "3mf" | "amf" | "usd" | "usda" | "usdc" | "usdz" | "kmz" | "step" | "stp" | "iges" | "igs" | "ifc" | "3dm" | "brep" | "pcd" | "wrl" | "vrml" | "vtk" | "vtp" | "geojson" | "kml" | "gpx" | "shp" | "excalidraw" | "drawio" | "dio" | "mermaid" | "mmd" | "plantuml" | "puml" | "bpmn" | "xmind" | "epub" | "fb2" | "umd" | "gif" | "jpg" | "bmp" | "tiff" | "tif" | "avif" | "ico" | "heic" | "heif" | "jxl" | "dicom" | "dcm" | "p7m" | "p7s" | "p7c" | "p7b" | "pkcs7" | "cms" | "cmsc" | "tsd" | "tst" | "tsq" | "tsr" | "asics" | "scs" | "asice" | "sce" | "ers" | "asc" | "sig" | "pgp" | "gpg" | "jws" | "md" | "txt" | "lrc" | "json" | "mjs" | "cjs" | "css" | "java" | "py" | "htm" | "jsx" | "ts" | "tsx" | "xml" | "log" | "vue" | "yaml" | "yml" | "ini" | "sh" | "bash" | "sql" | "go" | "rs" | "php" | "c" | "cpp" | "cc" | "h" | "hpp" | "cs" | "diff" | "patch" | "bundle" | "bdl" | "jsonc" | "json5" | "ipynb" | "toml" | "proto" | "hcl" | "tex" | "gv" | "http" | "react" | "swift" | "kt" | "mp4" | "webm" | "m3u8" | "mp3" | "mpeg" | "wav" | "ogg" | "oga" | "opus" | "m4a" | "aac" | "flac" | "weba" | "midi" | "mid" | "psb" | "pdd" | "psdt" | "psd" | "ait" | "ai" | "idml" | "icml" | "idms" | "inx" | "xfl" | "indd" | "indt" | "ps" | "eps" | "ase" | "aco" | "abr" | "csh" | "pat" | "grd" | "asl" | "ttf" | "otf" | "woff" | "woff2" | "sqlite" | "parquet" | "avro" | "webarchive" | "bin" | "hex" | "elf" | "exe" | "dll" | "class" | "macho")[]];
|
|
8
|
+
export declare const NON_PRINTABLE_EXTENSIONS: readonly ["xlsx", "xltx", "xlsm", "xlsb", "xls", "xlt", "xltm", "csv", "tsv", "ods", "fods", "numbers", ...("markdown" | "webp" | "jpeg" | "png" | "pdf" | "xyz" | "wasm" | "chm" | "typst" | "xd" | "fla" | "js" | "html" | "svg" | "rb" | "docx" | "docm" | "dotx" | "dotm" | "doc" | "dot" | "ppt" | "pot" | "pptx" | "pptm" | "potx" | "potm" | "ppsx" | "ppsm" | "rtf" | "odt" | "odp" | "xlsx" | "xltx" | "xlsm" | "xlsb" | "xls" | "xlt" | "xla" | "xlam" | "xltm" | "csv" | "tsv" | "ods" | "fods" | "pages" | "numbers" | "key" | "wpd" | "wp" | "wp5" | "wp6" | "dbf" | "ofd" | "hwp" | "hwpx" | "typ" | "zip" | "zipx" | "7z" | "rar" | "tar" | "gz" | "gzip" | "tgz" | "bz2" | "bzip2" | "tbz" | "tbz2" | "xz" | "txz" | "lzma" | "zst" | "tzst" | "cab" | "ar" | "cpio" | "iso" | "xar" | "lha" | "lzh" | "jar" | "war" | "ear" | "apk" | "cbz" | "cbr" | "eml" | "msg" | "mbox" | "olb" | "dra" | "gds" | "oas" | "oasis" | "dxf" | "dwg" | "dwf" | "dwfx" | "xps" | "glb" | "gltf" | "obj" | "stl" | "ply" | "fbx" | "dae" | "3ds" | "3mf" | "amf" | "usd" | "usda" | "usdc" | "usdz" | "kmz" | "step" | "stp" | "iges" | "igs" | "ifc" | "3dm" | "brep" | "pcd" | "wrl" | "vrml" | "vtk" | "vtp" | "geojson" | "kml" | "gpx" | "shp" | "excalidraw" | "drawio" | "dio" | "mermaid" | "mmd" | "plantuml" | "puml" | "bpmn" | "xmind" | "epub" | "fb2" | "umd" | "gif" | "jpg" | "bmp" | "tiff" | "tif" | "avif" | "ico" | "heic" | "heif" | "jxl" | "dicom" | "dcm" | "p7m" | "p7s" | "p7c" | "p7b" | "pkcs7" | "cms" | "cmsc" | "tsd" | "tst" | "tsq" | "tsr" | "asics" | "scs" | "asice" | "sce" | "ers" | "asc" | "sig" | "pgp" | "gpg" | "jws" | "md" | "txt" | "lrc" | "json" | "mjs" | "cjs" | "css" | "java" | "py" | "htm" | "jsx" | "ts" | "tsx" | "xml" | "log" | "vue" | "yaml" | "yml" | "ini" | "sh" | "bash" | "sql" | "go" | "rs" | "php" | "c" | "cpp" | "cc" | "h" | "hpp" | "cs" | "diff" | "patch" | "bundle" | "bdl" | "jsonc" | "json5" | "ipynb" | "toml" | "proto" | "hcl" | "tex" | "gv" | "http" | "react" | "swift" | "kt" | "mp4" | "webm" | "m3u8" | "mp3" | "mpeg" | "wav" | "ogg" | "oga" | "opus" | "m4a" | "aac" | "flac" | "weba" | "midi" | "mid" | "psb" | "pdd" | "psdt" | "psd" | "ait" | "ai" | "idml" | "icml" | "idms" | "inx" | "xfl" | "indd" | "indt" | "ps" | "eps" | "ase" | "aco" | "abr" | "csh" | "pat" | "grd" | "asl" | "ttf" | "otf" | "woff" | "woff2" | "sqlite" | "parquet" | "avro" | "webarchive" | "bin" | "hex" | "elf" | "exe" | "dll" | "class" | "macho")[]];
|
|
22
9
|
export declare const needsDedicatedPrintAdapter: (extension: string) => boolean;
|
|
23
10
|
export declare const isDomPrintableExtension: (extension: string) => boolean;
|
|
24
11
|
export declare const isKnownNonPrintableExtension: (extension: string) => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ARCHIVE_EXTENSIONS, IMAGE_EXTENSIONS, MODEL_EXTENSIONS, TEXT_EXTENSIONS } from
|
|
2
|
-
import { normalizeFileExtension } from
|
|
1
|
+
import { ARCHIVE_EXTENSIONS, IMAGE_EXTENSIONS, MODEL_EXTENSIONS, TEXT_EXTENSIONS } from "./formats.js";
|
|
2
|
+
import { normalizeFileExtension } from "../source/index.js";
|
|
3
3
|
export const DEFAULT_OPERATION_AVAILABILITY = Object.freeze({
|
|
4
4
|
download: false,
|
|
5
5
|
print: false,
|
|
@@ -45,19 +45,9 @@ export const createUnsupportedAvailability = (extension) => ({
|
|
|
45
45
|
...DEFAULT_OPERATION_AVAILABILITY,
|
|
46
46
|
download: normalizeFileExtension(extension).length > 0,
|
|
47
47
|
});
|
|
48
|
-
/**
|
|
49
|
-
* 这些格式只有专属适配器准备好后才展示打印。
|
|
50
|
-
*
|
|
51
|
-
* 它们的在线预览常依赖分页引擎、虚拟渲染或 Worker 生命周期,直接克隆
|
|
52
|
-
* DOM 很容易只得到当前页或当前视口。
|
|
53
|
-
*/
|
|
54
48
|
export const ADAPTER_PRINT_REQUIRED_EXTENSIONS = [
|
|
55
49
|
'docx', 'docm', 'dotx', 'dotm', 'doc', 'dot', 'ppt', 'pdf', 'typ', 'typst',
|
|
56
50
|
];
|
|
57
|
-
/**
|
|
58
|
-
* 这些格式的预览结果是完整 DOM / SVG / Canvas 截图,解除滚动容器裁切后
|
|
59
|
-
* 可以稳定进入浏览器打印流程。
|
|
60
|
-
*/
|
|
61
51
|
export const DOM_PRINTABLE_EXTENSIONS = [
|
|
62
52
|
'pptx', 'pptm', 'potx', 'potm', 'ppsx', 'ppsm', 'ofd', 'dxf', 'dwg', 'dwf', 'dwfx', 'xps',
|
|
63
53
|
'excalidraw', 'drawio', 'dio', 'mermaid', 'mmd', 'plantuml', 'puml', 'umd', 'md', 'markdown',
|
|
@@ -65,9 +55,6 @@ export const DOM_PRINTABLE_EXTENSIONS = [
|
|
|
65
55
|
...TEXT_EXTENSIONS,
|
|
66
56
|
...IMAGE_EXTENSIONS,
|
|
67
57
|
];
|
|
68
|
-
/**
|
|
69
|
-
* 这些格式默认不展示打印按钮,避免导出半截内容。
|
|
70
|
-
*/
|
|
71
58
|
export const NON_PRINTABLE_EXTENSIONS = [
|
|
72
59
|
'xlsx', 'xltx', 'xlsm', 'xlsb', 'xls', 'xlt', 'xltm', 'csv', 'tsv', 'ods', 'fods', 'numbers',
|
|
73
60
|
...ARCHIVE_EXTENSIONS,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { DEFAULT_REGISTERED_EXTENSIONS, DEFAULT_RENDERER_DEFINITIONS, DEFAULT_STABLE_SUPPORTED_EXTENSIONS, DEFAULT_SUPPORTED_EXTENSIONS, } from
|
|
2
|
-
export declare const ARCHIVE_EXTENSIONS: readonly ("markdown" | "webp" | "jpeg" | "png" | "pdf" | "xyz" | "wasm" | "chm" | "typst" | "xd" | "fla" | "js" | "html" | "svg" | "rb" | "docx" | "docm" | "dotx" | "dotm" | "doc" | "dot" | "ppt" | "pot" | "pptx" | "pptm" | "potx" | "potm" | "ppsx" | "ppsm" | "rtf" | "odt" | "odp" | "xlsx" | "xltx" | "xlsm" | "xlsb" | "xls" | "xlt" | "xla" | "xlam" | "xltm" | "csv" | "tsv" | "ods" | "fods" | "pages" | "numbers" | "key" | "wpd" | "wp" | "wp5" | "wp6" | "dbf" | "ofd" | "hwp" | "hwpx" | "typ" | "zip" | "zipx" | "7z" | "rar" | "tar" | "gz" | "gzip" | "tgz" | "bz2" | "bzip2" | "tbz" | "tbz2" | "xz" | "txz" | "lzma" | "zst" | "tzst" | "cab" | "ar" | "cpio" | "iso" | "xar" | "lha" | "lzh" | "jar" | "war" | "ear" | "apk" | "cbz" | "cbr" | "eml" | "msg" | "mbox" | "olb" | "dra" | "gds" | "oas" | "oasis" | "dxf" | "dwg" | "dwf" | "dwfx" | "xps" | "glb" | "gltf" | "obj" | "stl" | "ply" | "fbx" | "dae" | "3ds" | "3mf" | "amf" | "usd" | "usda" | "usdc" | "usdz" | "kmz" | "step" | "stp" | "iges" | "igs" | "ifc" | "3dm" | "brep" | "pcd" | "wrl" | "vrml" | "vtk" | "vtp" | "geojson" | "kml" | "gpx" | "shp" | "excalidraw" | "drawio" | "dio" | "mermaid" | "mmd" | "plantuml" | "puml" | "xmind" | "epub" | "fb2" | "umd" | "gif" | "jpg" | "bmp" | "tiff" | "tif" | "avif" | "ico" | "heic" | "heif" | "jxl" | "dicom" | "dcm" | "p7m" | "p7s" | "p7c" | "p7b" | "pkcs7" | "cms" | "cmsc" | "tsd" | "tst" | "tsq" | "tsr" | "asics" | "scs" | "asice" | "sce" | "ers" | "asc" | "sig" | "pgp" | "gpg" | "jws" | "md" | "txt" | "json" | "mjs" | "cjs" | "css" | "java" | "py" | "htm" | "jsx" | "ts" | "tsx" | "xml" | "log" | "vue" | "yaml" | "yml" | "ini" | "sh" | "bash" | "sql" | "go" | "rs" | "php" | "c" | "cpp" | "cc" | "h" | "hpp" | "cs" | "diff" | "patch" | "bundle" | "bdl" | "jsonc" | "json5" | "ipynb" | "toml" | "proto" | "hcl" | "tex" | "gv" | "http" | "react" | "swift" | "kt" | "mp4" | "webm" | "m3u8" | "mp3" | "mpeg" | "wav" | "ogg" | "oga" | "opus" | "m4a" | "aac" | "flac" | "weba" | "midi" | "mid" | "psb" | "pdd" | "psdt" | "psd" | "ait" | "ai" | "idml" | "icml" | "idms" | "inx" | "xfl" | "indd" | "indt" | "ps" | "eps" | "ase" | "aco" | "abr" | "csh" | "pat" | "grd" | "asl" | "ttf" | "otf" | "woff" | "woff2" | "sqlite" | "parquet" | "avro" | "webarchive" | "bin" | "hex" | "elf" | "exe" | "dll" | "class" | "macho")[];
|
|
3
|
-
export declare const MODEL_EXTENSIONS: readonly ("markdown" | "webp" | "jpeg" | "png" | "pdf" | "xyz" | "wasm" | "chm" | "typst" | "xd" | "fla" | "js" | "html" | "svg" | "rb" | "docx" | "docm" | "dotx" | "dotm" | "doc" | "dot" | "ppt" | "pot" | "pptx" | "pptm" | "potx" | "potm" | "ppsx" | "ppsm" | "rtf" | "odt" | "odp" | "xlsx" | "xltx" | "xlsm" | "xlsb" | "xls" | "xlt" | "xla" | "xlam" | "xltm" | "csv" | "tsv" | "ods" | "fods" | "pages" | "numbers" | "key" | "wpd" | "wp" | "wp5" | "wp6" | "dbf" | "ofd" | "hwp" | "hwpx" | "typ" | "zip" | "zipx" | "7z" | "rar" | "tar" | "gz" | "gzip" | "tgz" | "bz2" | "bzip2" | "tbz" | "tbz2" | "xz" | "txz" | "lzma" | "zst" | "tzst" | "cab" | "ar" | "cpio" | "iso" | "xar" | "lha" | "lzh" | "jar" | "war" | "ear" | "apk" | "cbz" | "cbr" | "eml" | "msg" | "mbox" | "olb" | "dra" | "gds" | "oas" | "oasis" | "dxf" | "dwg" | "dwf" | "dwfx" | "xps" | "glb" | "gltf" | "obj" | "stl" | "ply" | "fbx" | "dae" | "3ds" | "3mf" | "amf" | "usd" | "usda" | "usdc" | "usdz" | "kmz" | "step" | "stp" | "iges" | "igs" | "ifc" | "3dm" | "brep" | "pcd" | "wrl" | "vrml" | "vtk" | "vtp" | "geojson" | "kml" | "gpx" | "shp" | "excalidraw" | "drawio" | "dio" | "mermaid" | "mmd" | "plantuml" | "puml" | "xmind" | "epub" | "fb2" | "umd" | "gif" | "jpg" | "bmp" | "tiff" | "tif" | "avif" | "ico" | "heic" | "heif" | "jxl" | "dicom" | "dcm" | "p7m" | "p7s" | "p7c" | "p7b" | "pkcs7" | "cms" | "cmsc" | "tsd" | "tst" | "tsq" | "tsr" | "asics" | "scs" | "asice" | "sce" | "ers" | "asc" | "sig" | "pgp" | "gpg" | "jws" | "md" | "txt" | "json" | "mjs" | "cjs" | "css" | "java" | "py" | "htm" | "jsx" | "ts" | "tsx" | "xml" | "log" | "vue" | "yaml" | "yml" | "ini" | "sh" | "bash" | "sql" | "go" | "rs" | "php" | "c" | "cpp" | "cc" | "h" | "hpp" | "cs" | "diff" | "patch" | "bundle" | "bdl" | "jsonc" | "json5" | "ipynb" | "toml" | "proto" | "hcl" | "tex" | "gv" | "http" | "react" | "swift" | "kt" | "mp4" | "webm" | "m3u8" | "mp3" | "mpeg" | "wav" | "ogg" | "oga" | "opus" | "m4a" | "aac" | "flac" | "weba" | "midi" | "mid" | "psb" | "pdd" | "psdt" | "psd" | "ait" | "ai" | "idml" | "icml" | "idms" | "inx" | "xfl" | "indd" | "indt" | "ps" | "eps" | "ase" | "aco" | "abr" | "csh" | "pat" | "grd" | "asl" | "ttf" | "otf" | "woff" | "woff2" | "sqlite" | "parquet" | "avro" | "webarchive" | "bin" | "hex" | "elf" | "exe" | "dll" | "class" | "macho")[];
|
|
4
|
-
export declare const TEXT_EXTENSIONS: readonly ("markdown" | "webp" | "jpeg" | "png" | "pdf" | "xyz" | "wasm" | "chm" | "typst" | "xd" | "fla" | "js" | "html" | "svg" | "rb" | "docx" | "docm" | "dotx" | "dotm" | "doc" | "dot" | "ppt" | "pot" | "pptx" | "pptm" | "potx" | "potm" | "ppsx" | "ppsm" | "rtf" | "odt" | "odp" | "xlsx" | "xltx" | "xlsm" | "xlsb" | "xls" | "xlt" | "xla" | "xlam" | "xltm" | "csv" | "tsv" | "ods" | "fods" | "pages" | "numbers" | "key" | "wpd" | "wp" | "wp5" | "wp6" | "dbf" | "ofd" | "hwp" | "hwpx" | "typ" | "zip" | "zipx" | "7z" | "rar" | "tar" | "gz" | "gzip" | "tgz" | "bz2" | "bzip2" | "tbz" | "tbz2" | "xz" | "txz" | "lzma" | "zst" | "tzst" | "cab" | "ar" | "cpio" | "iso" | "xar" | "lha" | "lzh" | "jar" | "war" | "ear" | "apk" | "cbz" | "cbr" | "eml" | "msg" | "mbox" | "olb" | "dra" | "gds" | "oas" | "oasis" | "dxf" | "dwg" | "dwf" | "dwfx" | "xps" | "glb" | "gltf" | "obj" | "stl" | "ply" | "fbx" | "dae" | "3ds" | "3mf" | "amf" | "usd" | "usda" | "usdc" | "usdz" | "kmz" | "step" | "stp" | "iges" | "igs" | "ifc" | "3dm" | "brep" | "pcd" | "wrl" | "vrml" | "vtk" | "vtp" | "geojson" | "kml" | "gpx" | "shp" | "excalidraw" | "drawio" | "dio" | "mermaid" | "mmd" | "plantuml" | "puml" | "xmind" | "epub" | "fb2" | "umd" | "gif" | "jpg" | "bmp" | "tiff" | "tif" | "avif" | "ico" | "heic" | "heif" | "jxl" | "dicom" | "dcm" | "p7m" | "p7s" | "p7c" | "p7b" | "pkcs7" | "cms" | "cmsc" | "tsd" | "tst" | "tsq" | "tsr" | "asics" | "scs" | "asice" | "sce" | "ers" | "asc" | "sig" | "pgp" | "gpg" | "jws" | "md" | "txt" | "json" | "mjs" | "cjs" | "css" | "java" | "py" | "htm" | "jsx" | "ts" | "tsx" | "xml" | "log" | "vue" | "yaml" | "yml" | "ini" | "sh" | "bash" | "sql" | "go" | "rs" | "php" | "c" | "cpp" | "cc" | "h" | "hpp" | "cs" | "diff" | "patch" | "bundle" | "bdl" | "jsonc" | "json5" | "ipynb" | "toml" | "proto" | "hcl" | "tex" | "gv" | "http" | "react" | "swift" | "kt" | "mp4" | "webm" | "m3u8" | "mp3" | "mpeg" | "wav" | "ogg" | "oga" | "opus" | "m4a" | "aac" | "flac" | "weba" | "midi" | "mid" | "psb" | "pdd" | "psdt" | "psd" | "ait" | "ai" | "idml" | "icml" | "idms" | "inx" | "xfl" | "indd" | "indt" | "ps" | "eps" | "ase" | "aco" | "abr" | "csh" | "pat" | "grd" | "asl" | "ttf" | "otf" | "woff" | "woff2" | "sqlite" | "parquet" | "avro" | "webarchive" | "bin" | "hex" | "elf" | "exe" | "dll" | "class" | "macho")[];
|
|
5
|
-
export declare const IMAGE_EXTENSIONS: readonly ("markdown" | "webp" | "jpeg" | "png" | "pdf" | "xyz" | "wasm" | "chm" | "typst" | "xd" | "fla" | "js" | "html" | "svg" | "rb" | "docx" | "docm" | "dotx" | "dotm" | "doc" | "dot" | "ppt" | "pot" | "pptx" | "pptm" | "potx" | "potm" | "ppsx" | "ppsm" | "rtf" | "odt" | "odp" | "xlsx" | "xltx" | "xlsm" | "xlsb" | "xls" | "xlt" | "xla" | "xlam" | "xltm" | "csv" | "tsv" | "ods" | "fods" | "pages" | "numbers" | "key" | "wpd" | "wp" | "wp5" | "wp6" | "dbf" | "ofd" | "hwp" | "hwpx" | "typ" | "zip" | "zipx" | "7z" | "rar" | "tar" | "gz" | "gzip" | "tgz" | "bz2" | "bzip2" | "tbz" | "tbz2" | "xz" | "txz" | "lzma" | "zst" | "tzst" | "cab" | "ar" | "cpio" | "iso" | "xar" | "lha" | "lzh" | "jar" | "war" | "ear" | "apk" | "cbz" | "cbr" | "eml" | "msg" | "mbox" | "olb" | "dra" | "gds" | "oas" | "oasis" | "dxf" | "dwg" | "dwf" | "dwfx" | "xps" | "glb" | "gltf" | "obj" | "stl" | "ply" | "fbx" | "dae" | "3ds" | "3mf" | "amf" | "usd" | "usda" | "usdc" | "usdz" | "kmz" | "step" | "stp" | "iges" | "igs" | "ifc" | "3dm" | "brep" | "pcd" | "wrl" | "vrml" | "vtk" | "vtp" | "geojson" | "kml" | "gpx" | "shp" | "excalidraw" | "drawio" | "dio" | "mermaid" | "mmd" | "plantuml" | "puml" | "xmind" | "epub" | "fb2" | "umd" | "gif" | "jpg" | "bmp" | "tiff" | "tif" | "avif" | "ico" | "heic" | "heif" | "jxl" | "dicom" | "dcm" | "p7m" | "p7s" | "p7c" | "p7b" | "pkcs7" | "cms" | "cmsc" | "tsd" | "tst" | "tsq" | "tsr" | "asics" | "scs" | "asice" | "sce" | "ers" | "asc" | "sig" | "pgp" | "gpg" | "jws" | "md" | "txt" | "json" | "mjs" | "cjs" | "css" | "java" | "py" | "htm" | "jsx" | "ts" | "tsx" | "xml" | "log" | "vue" | "yaml" | "yml" | "ini" | "sh" | "bash" | "sql" | "go" | "rs" | "php" | "c" | "cpp" | "cc" | "h" | "hpp" | "cs" | "diff" | "patch" | "bundle" | "bdl" | "jsonc" | "json5" | "ipynb" | "toml" | "proto" | "hcl" | "tex" | "gv" | "http" | "react" | "swift" | "kt" | "mp4" | "webm" | "m3u8" | "mp3" | "mpeg" | "wav" | "ogg" | "oga" | "opus" | "m4a" | "aac" | "flac" | "weba" | "midi" | "mid" | "psb" | "pdd" | "psdt" | "psd" | "ait" | "ai" | "idml" | "icml" | "idms" | "inx" | "xfl" | "indd" | "indt" | "ps" | "eps" | "ase" | "aco" | "abr" | "csh" | "pat" | "grd" | "asl" | "ttf" | "otf" | "woff" | "woff2" | "sqlite" | "parquet" | "avro" | "webarchive" | "bin" | "hex" | "elf" | "exe" | "dll" | "class" | "macho")[];
|
|
1
|
+
export { DEFAULT_REGISTERED_EXTENSIONS, DEFAULT_RENDERER_DEFINITIONS, DEFAULT_STABLE_SUPPORTED_EXTENSIONS, DEFAULT_SUPPORTED_EXTENSIONS, } from "./formats.generated.js";
|
|
2
|
+
export declare const ARCHIVE_EXTENSIONS: readonly ("markdown" | "webp" | "jpeg" | "png" | "pdf" | "xyz" | "wasm" | "chm" | "typst" | "xd" | "fla" | "js" | "html" | "svg" | "rb" | "docx" | "docm" | "dotx" | "dotm" | "doc" | "dot" | "ppt" | "pot" | "pptx" | "pptm" | "potx" | "potm" | "ppsx" | "ppsm" | "rtf" | "odt" | "odp" | "xlsx" | "xltx" | "xlsm" | "xlsb" | "xls" | "xlt" | "xla" | "xlam" | "xltm" | "csv" | "tsv" | "ods" | "fods" | "pages" | "numbers" | "key" | "wpd" | "wp" | "wp5" | "wp6" | "dbf" | "ofd" | "hwp" | "hwpx" | "typ" | "zip" | "zipx" | "7z" | "rar" | "tar" | "gz" | "gzip" | "tgz" | "bz2" | "bzip2" | "tbz" | "tbz2" | "xz" | "txz" | "lzma" | "zst" | "tzst" | "cab" | "ar" | "cpio" | "iso" | "xar" | "lha" | "lzh" | "jar" | "war" | "ear" | "apk" | "cbz" | "cbr" | "eml" | "msg" | "mbox" | "olb" | "dra" | "gds" | "oas" | "oasis" | "dxf" | "dwg" | "dwf" | "dwfx" | "xps" | "glb" | "gltf" | "obj" | "stl" | "ply" | "fbx" | "dae" | "3ds" | "3mf" | "amf" | "usd" | "usda" | "usdc" | "usdz" | "kmz" | "step" | "stp" | "iges" | "igs" | "ifc" | "3dm" | "brep" | "pcd" | "wrl" | "vrml" | "vtk" | "vtp" | "geojson" | "kml" | "gpx" | "shp" | "excalidraw" | "drawio" | "dio" | "mermaid" | "mmd" | "plantuml" | "puml" | "bpmn" | "xmind" | "epub" | "fb2" | "umd" | "gif" | "jpg" | "bmp" | "tiff" | "tif" | "avif" | "ico" | "heic" | "heif" | "jxl" | "dicom" | "dcm" | "p7m" | "p7s" | "p7c" | "p7b" | "pkcs7" | "cms" | "cmsc" | "tsd" | "tst" | "tsq" | "tsr" | "asics" | "scs" | "asice" | "sce" | "ers" | "asc" | "sig" | "pgp" | "gpg" | "jws" | "md" | "txt" | "lrc" | "json" | "mjs" | "cjs" | "css" | "java" | "py" | "htm" | "jsx" | "ts" | "tsx" | "xml" | "log" | "vue" | "yaml" | "yml" | "ini" | "sh" | "bash" | "sql" | "go" | "rs" | "php" | "c" | "cpp" | "cc" | "h" | "hpp" | "cs" | "diff" | "patch" | "bundle" | "bdl" | "jsonc" | "json5" | "ipynb" | "toml" | "proto" | "hcl" | "tex" | "gv" | "http" | "react" | "swift" | "kt" | "mp4" | "webm" | "m3u8" | "mp3" | "mpeg" | "wav" | "ogg" | "oga" | "opus" | "m4a" | "aac" | "flac" | "weba" | "midi" | "mid" | "psb" | "pdd" | "psdt" | "psd" | "ait" | "ai" | "idml" | "icml" | "idms" | "inx" | "xfl" | "indd" | "indt" | "ps" | "eps" | "ase" | "aco" | "abr" | "csh" | "pat" | "grd" | "asl" | "ttf" | "otf" | "woff" | "woff2" | "sqlite" | "parquet" | "avro" | "webarchive" | "bin" | "hex" | "elf" | "exe" | "dll" | "class" | "macho")[];
|
|
3
|
+
export declare const MODEL_EXTENSIONS: readonly ("markdown" | "webp" | "jpeg" | "png" | "pdf" | "xyz" | "wasm" | "chm" | "typst" | "xd" | "fla" | "js" | "html" | "svg" | "rb" | "docx" | "docm" | "dotx" | "dotm" | "doc" | "dot" | "ppt" | "pot" | "pptx" | "pptm" | "potx" | "potm" | "ppsx" | "ppsm" | "rtf" | "odt" | "odp" | "xlsx" | "xltx" | "xlsm" | "xlsb" | "xls" | "xlt" | "xla" | "xlam" | "xltm" | "csv" | "tsv" | "ods" | "fods" | "pages" | "numbers" | "key" | "wpd" | "wp" | "wp5" | "wp6" | "dbf" | "ofd" | "hwp" | "hwpx" | "typ" | "zip" | "zipx" | "7z" | "rar" | "tar" | "gz" | "gzip" | "tgz" | "bz2" | "bzip2" | "tbz" | "tbz2" | "xz" | "txz" | "lzma" | "zst" | "tzst" | "cab" | "ar" | "cpio" | "iso" | "xar" | "lha" | "lzh" | "jar" | "war" | "ear" | "apk" | "cbz" | "cbr" | "eml" | "msg" | "mbox" | "olb" | "dra" | "gds" | "oas" | "oasis" | "dxf" | "dwg" | "dwf" | "dwfx" | "xps" | "glb" | "gltf" | "obj" | "stl" | "ply" | "fbx" | "dae" | "3ds" | "3mf" | "amf" | "usd" | "usda" | "usdc" | "usdz" | "kmz" | "step" | "stp" | "iges" | "igs" | "ifc" | "3dm" | "brep" | "pcd" | "wrl" | "vrml" | "vtk" | "vtp" | "geojson" | "kml" | "gpx" | "shp" | "excalidraw" | "drawio" | "dio" | "mermaid" | "mmd" | "plantuml" | "puml" | "bpmn" | "xmind" | "epub" | "fb2" | "umd" | "gif" | "jpg" | "bmp" | "tiff" | "tif" | "avif" | "ico" | "heic" | "heif" | "jxl" | "dicom" | "dcm" | "p7m" | "p7s" | "p7c" | "p7b" | "pkcs7" | "cms" | "cmsc" | "tsd" | "tst" | "tsq" | "tsr" | "asics" | "scs" | "asice" | "sce" | "ers" | "asc" | "sig" | "pgp" | "gpg" | "jws" | "md" | "txt" | "lrc" | "json" | "mjs" | "cjs" | "css" | "java" | "py" | "htm" | "jsx" | "ts" | "tsx" | "xml" | "log" | "vue" | "yaml" | "yml" | "ini" | "sh" | "bash" | "sql" | "go" | "rs" | "php" | "c" | "cpp" | "cc" | "h" | "hpp" | "cs" | "diff" | "patch" | "bundle" | "bdl" | "jsonc" | "json5" | "ipynb" | "toml" | "proto" | "hcl" | "tex" | "gv" | "http" | "react" | "swift" | "kt" | "mp4" | "webm" | "m3u8" | "mp3" | "mpeg" | "wav" | "ogg" | "oga" | "opus" | "m4a" | "aac" | "flac" | "weba" | "midi" | "mid" | "psb" | "pdd" | "psdt" | "psd" | "ait" | "ai" | "idml" | "icml" | "idms" | "inx" | "xfl" | "indd" | "indt" | "ps" | "eps" | "ase" | "aco" | "abr" | "csh" | "pat" | "grd" | "asl" | "ttf" | "otf" | "woff" | "woff2" | "sqlite" | "parquet" | "avro" | "webarchive" | "bin" | "hex" | "elf" | "exe" | "dll" | "class" | "macho")[];
|
|
4
|
+
export declare const TEXT_EXTENSIONS: readonly ("markdown" | "webp" | "jpeg" | "png" | "pdf" | "xyz" | "wasm" | "chm" | "typst" | "xd" | "fla" | "js" | "html" | "svg" | "rb" | "docx" | "docm" | "dotx" | "dotm" | "doc" | "dot" | "ppt" | "pot" | "pptx" | "pptm" | "potx" | "potm" | "ppsx" | "ppsm" | "rtf" | "odt" | "odp" | "xlsx" | "xltx" | "xlsm" | "xlsb" | "xls" | "xlt" | "xla" | "xlam" | "xltm" | "csv" | "tsv" | "ods" | "fods" | "pages" | "numbers" | "key" | "wpd" | "wp" | "wp5" | "wp6" | "dbf" | "ofd" | "hwp" | "hwpx" | "typ" | "zip" | "zipx" | "7z" | "rar" | "tar" | "gz" | "gzip" | "tgz" | "bz2" | "bzip2" | "tbz" | "tbz2" | "xz" | "txz" | "lzma" | "zst" | "tzst" | "cab" | "ar" | "cpio" | "iso" | "xar" | "lha" | "lzh" | "jar" | "war" | "ear" | "apk" | "cbz" | "cbr" | "eml" | "msg" | "mbox" | "olb" | "dra" | "gds" | "oas" | "oasis" | "dxf" | "dwg" | "dwf" | "dwfx" | "xps" | "glb" | "gltf" | "obj" | "stl" | "ply" | "fbx" | "dae" | "3ds" | "3mf" | "amf" | "usd" | "usda" | "usdc" | "usdz" | "kmz" | "step" | "stp" | "iges" | "igs" | "ifc" | "3dm" | "brep" | "pcd" | "wrl" | "vrml" | "vtk" | "vtp" | "geojson" | "kml" | "gpx" | "shp" | "excalidraw" | "drawio" | "dio" | "mermaid" | "mmd" | "plantuml" | "puml" | "bpmn" | "xmind" | "epub" | "fb2" | "umd" | "gif" | "jpg" | "bmp" | "tiff" | "tif" | "avif" | "ico" | "heic" | "heif" | "jxl" | "dicom" | "dcm" | "p7m" | "p7s" | "p7c" | "p7b" | "pkcs7" | "cms" | "cmsc" | "tsd" | "tst" | "tsq" | "tsr" | "asics" | "scs" | "asice" | "sce" | "ers" | "asc" | "sig" | "pgp" | "gpg" | "jws" | "md" | "txt" | "lrc" | "json" | "mjs" | "cjs" | "css" | "java" | "py" | "htm" | "jsx" | "ts" | "tsx" | "xml" | "log" | "vue" | "yaml" | "yml" | "ini" | "sh" | "bash" | "sql" | "go" | "rs" | "php" | "c" | "cpp" | "cc" | "h" | "hpp" | "cs" | "diff" | "patch" | "bundle" | "bdl" | "jsonc" | "json5" | "ipynb" | "toml" | "proto" | "hcl" | "tex" | "gv" | "http" | "react" | "swift" | "kt" | "mp4" | "webm" | "m3u8" | "mp3" | "mpeg" | "wav" | "ogg" | "oga" | "opus" | "m4a" | "aac" | "flac" | "weba" | "midi" | "mid" | "psb" | "pdd" | "psdt" | "psd" | "ait" | "ai" | "idml" | "icml" | "idms" | "inx" | "xfl" | "indd" | "indt" | "ps" | "eps" | "ase" | "aco" | "abr" | "csh" | "pat" | "grd" | "asl" | "ttf" | "otf" | "woff" | "woff2" | "sqlite" | "parquet" | "avro" | "webarchive" | "bin" | "hex" | "elf" | "exe" | "dll" | "class" | "macho")[];
|
|
5
|
+
export declare const IMAGE_EXTENSIONS: readonly ("markdown" | "webp" | "jpeg" | "png" | "pdf" | "xyz" | "wasm" | "chm" | "typst" | "xd" | "fla" | "js" | "html" | "svg" | "rb" | "docx" | "docm" | "dotx" | "dotm" | "doc" | "dot" | "ppt" | "pot" | "pptx" | "pptm" | "potx" | "potm" | "ppsx" | "ppsm" | "rtf" | "odt" | "odp" | "xlsx" | "xltx" | "xlsm" | "xlsb" | "xls" | "xlt" | "xla" | "xlam" | "xltm" | "csv" | "tsv" | "ods" | "fods" | "pages" | "numbers" | "key" | "wpd" | "wp" | "wp5" | "wp6" | "dbf" | "ofd" | "hwp" | "hwpx" | "typ" | "zip" | "zipx" | "7z" | "rar" | "tar" | "gz" | "gzip" | "tgz" | "bz2" | "bzip2" | "tbz" | "tbz2" | "xz" | "txz" | "lzma" | "zst" | "tzst" | "cab" | "ar" | "cpio" | "iso" | "xar" | "lha" | "lzh" | "jar" | "war" | "ear" | "apk" | "cbz" | "cbr" | "eml" | "msg" | "mbox" | "olb" | "dra" | "gds" | "oas" | "oasis" | "dxf" | "dwg" | "dwf" | "dwfx" | "xps" | "glb" | "gltf" | "obj" | "stl" | "ply" | "fbx" | "dae" | "3ds" | "3mf" | "amf" | "usd" | "usda" | "usdc" | "usdz" | "kmz" | "step" | "stp" | "iges" | "igs" | "ifc" | "3dm" | "brep" | "pcd" | "wrl" | "vrml" | "vtk" | "vtp" | "geojson" | "kml" | "gpx" | "shp" | "excalidraw" | "drawio" | "dio" | "mermaid" | "mmd" | "plantuml" | "puml" | "bpmn" | "xmind" | "epub" | "fb2" | "umd" | "gif" | "jpg" | "bmp" | "tiff" | "tif" | "avif" | "ico" | "heic" | "heif" | "jxl" | "dicom" | "dcm" | "p7m" | "p7s" | "p7c" | "p7b" | "pkcs7" | "cms" | "cmsc" | "tsd" | "tst" | "tsq" | "tsr" | "asics" | "scs" | "asice" | "sce" | "ers" | "asc" | "sig" | "pgp" | "gpg" | "jws" | "md" | "txt" | "lrc" | "json" | "mjs" | "cjs" | "css" | "java" | "py" | "htm" | "jsx" | "ts" | "tsx" | "xml" | "log" | "vue" | "yaml" | "yml" | "ini" | "sh" | "bash" | "sql" | "go" | "rs" | "php" | "c" | "cpp" | "cc" | "h" | "hpp" | "cs" | "diff" | "patch" | "bundle" | "bdl" | "jsonc" | "json5" | "ipynb" | "toml" | "proto" | "hcl" | "tex" | "gv" | "http" | "react" | "swift" | "kt" | "mp4" | "webm" | "m3u8" | "mp3" | "mpeg" | "wav" | "ogg" | "oga" | "opus" | "m4a" | "aac" | "flac" | "weba" | "midi" | "mid" | "psb" | "pdd" | "psdt" | "psd" | "ait" | "ai" | "idml" | "icml" | "idms" | "inx" | "xfl" | "indd" | "indt" | "ps" | "eps" | "ase" | "aco" | "abr" | "csh" | "pat" | "grd" | "asl" | "ttf" | "otf" | "woff" | "woff2" | "sqlite" | "parquet" | "avro" | "webarchive" | "bin" | "hex" | "elf" | "exe" | "dll" | "class" | "macho")[];
|