@file-viewer/core 2.0.10 → 2.1.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.
Files changed (114) hide show
  1. package/README.en.md +2 -2
  2. package/README.md +2 -2
  3. package/dist/config/options.d.ts +1 -1
  4. package/dist/config/options.js +1 -1
  5. package/dist/contracts/types.d.ts +71 -1
  6. package/dist/headless.d.ts +2 -2
  7. package/dist/headless.js +1 -1
  8. package/dist/index.d.ts +9 -6
  9. package/dist/index.js +105 -48
  10. package/dist/platform/assets.d.ts +3 -1
  11. package/dist/platform/assets.js +18 -2
  12. package/dist/registry/capabilities.d.ts +2 -2
  13. package/dist/registry/capabilities.js +2 -1
  14. package/dist/registry/formats.d.ts +20 -7
  15. package/dist/registry/formats.js +14 -5
  16. package/dist/registry/registry.d.ts +8 -1
  17. package/dist/registry/registry.js +29 -0
  18. package/dist/renderers/image.js +1 -10
  19. package/dist/renderers/index.d.ts +320 -2
  20. package/dist/renderers/index.js +27 -157
  21. package/dist/viewer/createViewer.js +86 -3
  22. package/package.json +17 -44
  23. package/dist/renderers/archive.d.ts +0 -2
  24. package/dist/renderers/archive.js +0 -547
  25. package/dist/renderers/archiveCache.d.ts +0 -10
  26. package/dist/renderers/archiveCache.js +0 -96
  27. package/dist/renderers/archiveFallback.d.ts +0 -7
  28. package/dist/renderers/archiveFallback.js +0 -166
  29. package/dist/renderers/archiveShared.d.ts +0 -23
  30. package/dist/renderers/archiveShared.js +0 -71
  31. package/dist/renderers/audio.d.ts +0 -8
  32. package/dist/renderers/audio.js +0 -219
  33. package/dist/renderers/cad.d.ts +0 -2
  34. package/dist/renderers/cad.js +0 -446
  35. package/dist/renderers/code.d.ts +0 -11
  36. package/dist/renderers/code.js +0 -233
  37. package/dist/renderers/data.d.ts +0 -7
  38. package/dist/renderers/data.js +0 -370
  39. package/dist/renderers/drawing.d.ts +0 -10
  40. package/dist/renderers/drawing.js +0 -882
  41. package/dist/renderers/eda.d.ts +0 -2
  42. package/dist/renderers/eda.js +0 -434
  43. package/dist/renderers/edaParser.d.ts +0 -77
  44. package/dist/renderers/edaParser.js +0 -569
  45. package/dist/renderers/email.d.ts +0 -2
  46. package/dist/renderers/email.js +0 -463
  47. package/dist/renderers/epub.d.ts +0 -2
  48. package/dist/renderers/epub.js +0 -331
  49. package/dist/renderers/geo.d.ts +0 -2
  50. package/dist/renderers/geo.js +0 -284
  51. package/dist/renderers/markdown.d.ts +0 -2
  52. package/dist/renderers/markdown.js +0 -83
  53. package/dist/renderers/model.d.ts +0 -2
  54. package/dist/renderers/model.js +0 -567
  55. package/dist/renderers/ofd.d.ts +0 -2
  56. package/dist/renderers/ofd.js +0 -256
  57. package/dist/renderers/openDocument.d.ts +0 -2
  58. package/dist/renderers/openDocument.js +0 -122
  59. package/dist/renderers/pdf.d.ts +0 -3
  60. package/dist/renderers/pdf.js +0 -1001
  61. package/dist/renderers/pdfStyles.d.ts +0 -1
  62. package/dist/renderers/pdfStyles.js +0 -1
  63. package/dist/renderers/pptx.d.ts +0 -2
  64. package/dist/renderers/pptx.js +0 -217
  65. package/dist/renderers/spreadsheet/state.d.ts +0 -80
  66. package/dist/renderers/spreadsheet/state.js +0 -96
  67. package/dist/renderers/spreadsheet/view.d.ts +0 -25
  68. package/dist/renderers/spreadsheet/view.js +0 -833
  69. package/dist/renderers/spreadsheet/worker/index.d.ts +0 -2
  70. package/dist/renderers/spreadsheet/worker/index.js +0 -1
  71. package/dist/renderers/spreadsheet/worker/sheetjs/SheetJsModel.d.ts +0 -73
  72. package/dist/renderers/spreadsheet/worker/sheetjs/SheetJsModel.js +0 -623
  73. package/dist/renderers/spreadsheet/worker/sheetjs/color.d.ts +0 -2
  74. package/dist/renderers/spreadsheet/worker/sheetjs/color.js +0 -73
  75. package/dist/renderers/spreadsheet/worker/sheetjs/index.d.ts +0 -1
  76. package/dist/renderers/spreadsheet/worker/sheetjs/index.js +0 -1
  77. package/dist/renderers/spreadsheet/worker/sheetjs/parser.d.ts +0 -18
  78. package/dist/renderers/spreadsheet/worker/sheetjs/parser.js +0 -106
  79. package/dist/renderers/spreadsheet/worker/sheetjs/sheet.worker.d.ts +0 -1
  80. package/dist/renderers/spreadsheet/worker/sheetjs/sheet.worker.js +0 -11
  81. package/dist/renderers/spreadsheet/worker/type.d.ts +0 -57
  82. package/dist/renderers/spreadsheet/worker/type.js +0 -1
  83. package/dist/renderers/spreadsheet.d.ts +0 -3
  84. package/dist/renderers/spreadsheet.js +0 -929
  85. package/dist/renderers/typst.d.ts +0 -8
  86. package/dist/renderers/typst.js +0 -547
  87. package/dist/renderers/umd/parser.d.ts +0 -30
  88. package/dist/renderers/umd/parser.js +0 -408
  89. package/dist/renderers/umd.d.ts +0 -2
  90. package/dist/renderers/umd.js +0 -297
  91. package/dist/renderers/video.d.ts +0 -8
  92. package/dist/renderers/video.js +0 -108
  93. package/dist/renderers/wordDoc.d.ts +0 -5
  94. package/dist/renderers/wordDoc.js +0 -284
  95. package/dist/renderers/wordDocx.d.ts +0 -5
  96. package/dist/renderers/wordDocx.js +0 -985
  97. package/dist/renderers/wordDocx.worker.d.ts +0 -1
  98. package/dist/renderers/wordDocx.worker.js +0 -96
  99. package/vendor/ofd/dltech/jbig2/arithmetic_decoder.js +0 -183
  100. package/vendor/ofd/dltech/jbig2/ccitt.js +0 -1070
  101. package/vendor/ofd/dltech/jbig2/compatibility.js +0 -12
  102. package/vendor/ofd/dltech/jbig2/core_utils.js +0 -180
  103. package/vendor/ofd/dltech/jbig2/is_node.js +0 -27
  104. package/vendor/ofd/dltech/jbig2/jbig2.js +0 -2589
  105. package/vendor/ofd/dltech/jbig2/jbig2_stream.js +0 -81
  106. package/vendor/ofd/dltech/jbig2/primitives.js +0 -387
  107. package/vendor/ofd/dltech/jbig2/stream.js +0 -1348
  108. package/vendor/ofd/dltech/jbig2/util.js +0 -972
  109. package/vendor/ofd/dltech/ofd/ofd.d.ts +0 -11
  110. package/vendor/ofd/dltech/ofd/ofd.js +0 -100
  111. package/vendor/ofd/dltech/ofd/ofd_parser.js +0 -395
  112. package/vendor/ofd/dltech/ofd/ofd_render.js +0 -473
  113. package/vendor/ofd/dltech/ofd/ofd_util.js +0 -350
  114. package/vendor/ofd/dltech/ofd/pipeline.js +0 -26
@@ -14,6 +14,7 @@ export const DEFAULT_FILE_VIEWER_CAD_WORKER_PATH = 'wasm/cad/dwg-worker.js';
14
14
  export const DEFAULT_FILE_VIEWER_CAD_DWF_WASM_PATH = 'wasm/cad/dwfv-render.wasm';
15
15
  export const DEFAULT_FILE_VIEWER_TYPST_COMPILER_WASM_URL = 'wasm/typst/typst_ts_web_compiler_bg.wasm';
16
16
  export const DEFAULT_FILE_VIEWER_TYPST_RENDERER_WASM_URL = 'wasm/typst/typst_ts_renderer_bg.wasm';
17
+ export const DEFAULT_FILE_VIEWER_TYPST_FONT_ASSETS_URL = 'wasm/typst/fonts/';
17
18
  // Compatibility aliases kept for older imports. They intentionally resolve to
18
19
  // local viewer assets; the preview runtime must not fall back to a public CDN.
19
20
  export const FALLBACK_FILE_VIEWER_TYPST_COMPILER_WASM_URL = DEFAULT_FILE_VIEWER_TYPST_COMPILER_WASM_URL;
@@ -217,6 +218,16 @@ export const DEFAULT_FILE_VIEWER_RENDERER_ASSET_MANIFESTS = [
217
218
  optionPath: 'typst.rendererWasmUrl',
218
219
  description: 'Typst SVG renderer WebAssembly module copied to the public assets directory.',
219
220
  },
221
+ {
222
+ id: 'typst-font-assets',
223
+ rendererId: 'typst',
224
+ kind: 'directory',
225
+ target: 'public',
226
+ required: true,
227
+ defaultPath: DEFAULT_FILE_VIEWER_TYPST_FONT_ASSETS_URL,
228
+ optionPath: 'typst.fontAssetsUrl',
229
+ description: 'Self-hosted default Typst text fonts used by typst.ts without public CDN requests.',
230
+ },
220
231
  ],
221
232
  },
222
233
  {
@@ -308,6 +319,9 @@ export const resolveFileViewerTypstCompilerWasmUrl = (options, overrides = [], d
308
319
  export const resolveFileViewerTypstRendererWasmUrl = (options, overrides = [], documentBaseUrl) => {
309
320
  return resolveFileViewerAssetUrl((options === null || options === void 0 ? void 0 : options.rendererWasmUrl) || overrides.find(Boolean), DEFAULT_FILE_VIEWER_TYPST_RENDERER_WASM_URL, { documentBaseUrl });
310
321
  };
322
+ export const resolveFileViewerTypstFontAssetsUrl = (options, overrides = [], documentBaseUrl) => {
323
+ return resolveFileViewerAssetUrl((options === null || options === void 0 ? void 0 : options.fontAssetsUrl) || overrides.find(Boolean), DEFAULT_FILE_VIEWER_TYPST_FONT_ASSETS_URL, { documentBaseUrl, trimTrailingSlash: true });
324
+ };
311
325
  export const resolveFileViewerDataSqlWasmUrl = (options, overrides = [], documentBaseUrl) => {
312
326
  return resolveFileViewerAssetUrl((options === null || options === void 0 ? void 0 : options.sqlWasmUrl) || overrides.find(Boolean), DEFAULT_FILE_VIEWER_DATA_SQL_WASM_URL, { documentBaseUrl });
313
327
  };
@@ -318,7 +332,7 @@ export const getFileViewerRendererAssetManifest = (rendererId) => {
318
332
  return DEFAULT_FILE_VIEWER_RENDERER_ASSET_MANIFESTS.find(manifest => manifest.rendererId === rendererId) || null;
319
333
  };
320
334
  const getRendererAssetOptionValue = (options, optionPath) => {
321
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
335
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
322
336
  switch (optionPath) {
323
337
  case 'archive.workerUrl':
324
338
  return (_a = options === null || options === void 0 ? void 0 : options.archive) === null || _a === void 0 ? void 0 : _a.workerUrl;
@@ -350,8 +364,10 @@ const getRendererAssetOptionValue = (options, optionPath) => {
350
364
  return (_p = options === null || options === void 0 ? void 0 : options.spreadsheet) === null || _p === void 0 ? void 0 : _p.workerUrl;
351
365
  case 'typst.compilerWasmUrl':
352
366
  return (_q = options === null || options === void 0 ? void 0 : options.typst) === null || _q === void 0 ? void 0 : _q.compilerWasmUrl;
367
+ case 'typst.fontAssetsUrl':
368
+ return (_r = options === null || options === void 0 ? void 0 : options.typst) === null || _r === void 0 ? void 0 : _r.fontAssetsUrl;
353
369
  case 'typst.rendererWasmUrl':
354
- return (_r = options === null || options === void 0 ? void 0 : options.typst) === null || _r === void 0 ? void 0 : _r.rendererWasmUrl;
370
+ return (_s = options === null || options === void 0 ? void 0 : options.typst) === null || _s === void 0 ? void 0 : _s.rendererWasmUrl;
355
371
  default:
356
372
  return undefined;
357
373
  }
@@ -13,11 +13,11 @@ export declare const ADAPTER_PRINT_REQUIRED_EXTENSIONS: readonly ["docx", "docm"
13
13
  * 这些格式的预览结果是完整 DOM / SVG / Canvas 截图,解除滚动容器裁切后
14
14
  * 可以稳定进入浏览器打印流程。
15
15
  */
16
- export declare const DOM_PRINTABLE_EXTENSIONS: readonly ["pptx", "pptm", "potx", "potm", "ppsx", "ppsm", "ofd", "dxf", "dwg", "dwf", "dwfx", "xps", "excalidraw", "drawio", "dio", "umd", "md", "markdown", "olb", "dra", "txt", "json", "js", "mjs", "cjs", "css", "java", "py", "html", "htm", "jsx", "ts", "tsx", "xml", "log", "vue", "yaml", "yml", "ini", "sh", "bash", "sql", "go", "rs", "php", "c", "cpp", "cc", "h", "hpp", "cs", "diff", "jsonc", "json5", "ipynb", "toml", "proto", "hcl", "tex", "gv", "http", "react", "rb", "swift", "kt", "gif", "jpg", "jpeg", "bmp", "tiff", "tif", "png", "svg", "webp", "avif", "ico", "heic", "heif", "jxl"];
16
+ 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", "txt", "json", "js", "mjs", "cjs", "css", "java", "py", "html", "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", "rb", "swift", "kt", "gif", "jpg", "jpeg", "bmp", "tiff", "tif", "png", "svg", "webp", "avif", "ico", "heic", "heif", "jxl"];
17
17
  /**
18
18
  * 这些格式默认不展示打印按钮,避免导出半截内容。
19
19
  */
20
- export declare const NON_PRINTABLE_EXTENSIONS: readonly ["xlsx", "xltx", "xlsm", "xlsb", "xls", "xlt", "xltm", "csv", "ods", "fods", "numbers", "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", "epub", "mp4", "mp3", "mpeg", "wav", "ogg", "oga", "opus", "m4a", "aac", "flac", "weba", "glb", "gltf", "obj", "stl", "ply", "fbx", "dae", "3ds", "3mf", "amf", "usd", "usda", "usdc", "usdz", "kmz", "step", "stp", "iges", "igs", "ifc", "3dm", "pcd", "wrl", "vrml", "xyz", "vtk", "vtp"];
20
+ export declare const NON_PRINTABLE_EXTENSIONS: readonly ["xlsx", "xltx", "xlsm", "xlsb", "xls", "xlt", "xltm", "csv", "ods", "fods", "numbers", "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", "epub", "mp4", "mp3", "mpeg", "wav", "ogg", "oga", "opus", "m4a", "aac", "flac", "weba", "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", "xyz", "vtk", "vtp"];
21
21
  export declare const needsDedicatedPrintAdapter: (extension: string) => boolean;
22
22
  export declare const isDomPrintableExtension: (extension: string) => boolean;
23
23
  export declare const isKnownNonPrintableExtension: (extension: string) => boolean;
@@ -50,7 +50,8 @@ export const ADAPTER_PRINT_REQUIRED_EXTENSIONS = [
50
50
  */
51
51
  export const DOM_PRINTABLE_EXTENSIONS = [
52
52
  'pptx', 'pptm', 'potx', 'potm', 'ppsx', 'ppsm', 'ofd', 'dxf', 'dwg', 'dwf', 'dwfx', 'xps',
53
- 'excalidraw', 'drawio', 'dio', 'umd', 'md', 'markdown', 'olb', 'dra',
53
+ 'excalidraw', 'drawio', 'dio', 'mermaid', 'mmd', 'plantuml', 'puml', 'umd', 'md', 'markdown',
54
+ 'olb', 'dra',
54
55
  ...TEXT_EXTENSIONS,
55
56
  ...IMAGE_EXTENSIONS,
56
57
  ];
@@ -1,6 +1,6 @@
1
1
  export declare const ARCHIVE_EXTENSIONS: readonly ["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"];
2
- export declare const MODEL_EXTENSIONS: readonly ["glb", "gltf", "obj", "stl", "ply", "fbx", "dae", "3ds", "3mf", "amf", "usd", "usda", "usdc", "usdz", "kmz", "step", "stp", "iges", "igs", "ifc", "3dm", "pcd", "wrl", "vrml", "xyz", "vtk", "vtp"];
3
- export declare const TEXT_EXTENSIONS: readonly ["txt", "json", "js", "mjs", "cjs", "css", "java", "py", "html", "htm", "jsx", "ts", "tsx", "xml", "log", "vue", "yaml", "yml", "ini", "sh", "bash", "sql", "go", "rs", "php", "c", "cpp", "cc", "h", "hpp", "cs", "diff", "jsonc", "json5", "ipynb", "toml", "proto", "hcl", "tex", "gv", "http", "react", "rb", "swift", "kt"];
2
+ export declare const MODEL_EXTENSIONS: readonly ["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", "xyz", "vtk", "vtp"];
3
+ export declare const TEXT_EXTENSIONS: readonly ["txt", "json", "js", "mjs", "cjs", "css", "java", "py", "html", "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", "rb", "swift", "kt"];
4
4
  export declare const IMAGE_EXTENSIONS: readonly ["gif", "jpg", "jpeg", "bmp", "tiff", "tif", "png", "svg", "webp", "avif", "ico", "heic", "heif", "jxl"];
5
5
  export declare const DEFAULT_RENDERER_DEFINITIONS: readonly [{
6
6
  readonly id: "office-word-openxml";
@@ -136,7 +136,7 @@ export declare const DEFAULT_RENDERER_DEFINITIONS: readonly [{
136
136
  readonly id: "eda";
137
137
  readonly label: "EDA";
138
138
  readonly category: "eda";
139
- readonly extensions: readonly ["olb", "dra"];
139
+ readonly extensions: readonly ["olb", "dra", "gds", "oas", "oasis"];
140
140
  readonly async: true;
141
141
  readonly capabilities: {
142
142
  readonly download: true;
@@ -162,7 +162,7 @@ export declare const DEFAULT_RENDERER_DEFINITIONS: readonly [{
162
162
  readonly id: "model";
163
163
  readonly label: "3D Model";
164
164
  readonly category: "model";
165
- readonly extensions: readonly ["glb", "gltf", "obj", "stl", "ply", "fbx", "dae", "3ds", "3mf", "amf", "usd", "usda", "usdc", "usdz", "kmz", "step", "stp", "iges", "igs", "ifc", "3dm", "pcd", "wrl", "vrml", "xyz", "vtk", "vtp"];
165
+ readonly extensions: readonly ["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", "xyz", "vtk", "vtp"];
166
166
  readonly async: true;
167
167
  readonly capabilities: {
168
168
  readonly download: true;
@@ -188,7 +188,20 @@ export declare const DEFAULT_RENDERER_DEFINITIONS: readonly [{
188
188
  readonly id: "drawing";
189
189
  readonly label: "Drawing";
190
190
  readonly category: "drawing";
191
- readonly extensions: readonly ["excalidraw", "drawio", "dio"];
191
+ readonly extensions: readonly ["excalidraw", "drawio", "dio", "mermaid", "mmd", "plantuml", "puml"];
192
+ readonly async: true;
193
+ readonly capabilities: {
194
+ readonly download: true;
195
+ readonly print: true;
196
+ readonly exportHtml: true;
197
+ readonly zoom: "provider";
198
+ readonly search: true;
199
+ };
200
+ }, {
201
+ readonly id: "mindmap";
202
+ readonly label: "Mind Map";
203
+ readonly category: "mindmap";
204
+ readonly extensions: readonly ["xmind"];
192
205
  readonly async: true;
193
206
  readonly capabilities: {
194
207
  readonly download: true;
@@ -253,7 +266,7 @@ export declare const DEFAULT_RENDERER_DEFINITIONS: readonly [{
253
266
  readonly id: "code";
254
267
  readonly label: "Code and Text";
255
268
  readonly category: "code";
256
- readonly extensions: readonly ["txt", "json", "js", "mjs", "cjs", "css", "java", "py", "html", "htm", "jsx", "ts", "tsx", "xml", "log", "vue", "yaml", "yml", "ini", "sh", "bash", "sql", "go", "rs", "php", "c", "cpp", "cc", "h", "hpp", "cs", "diff", "jsonc", "json5", "ipynb", "toml", "proto", "hcl", "tex", "gv", "http", "react", "rb", "swift", "kt"];
269
+ readonly extensions: readonly ["txt", "json", "js", "mjs", "cjs", "css", "java", "py", "html", "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", "rb", "swift", "kt"];
257
270
  readonly async: true;
258
271
  readonly capabilities: {
259
272
  readonly download: true;
@@ -302,4 +315,4 @@ export declare const DEFAULT_RENDERER_DEFINITIONS: readonly [{
302
315
  readonly search: true;
303
316
  };
304
317
  }];
305
- export declare const DEFAULT_SUPPORTED_EXTENSIONS: readonly ("markdown" | "wasm" | "pdf" | "typst" | "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" | "glb" | "gltf" | "obj" | "stl" | "ply" | "fbx" | "dae" | "3ds" | "3mf" | "amf" | "usd" | "usda" | "usdc" | "usdz" | "kmz" | "step" | "stp" | "iges" | "igs" | "ifc" | "3dm" | "pcd" | "wrl" | "vrml" | "xyz" | "vtk" | "vtp" | "txt" | "json" | "js" | "mjs" | "cjs" | "css" | "java" | "py" | "html" | "htm" | "jsx" | "ts" | "tsx" | "xml" | "log" | "vue" | "yaml" | "yml" | "ini" | "sh" | "bash" | "sql" | "go" | "rs" | "php" | "c" | "cpp" | "cc" | "h" | "hpp" | "cs" | "diff" | "jsonc" | "json5" | "ipynb" | "toml" | "proto" | "hcl" | "tex" | "gv" | "http" | "react" | "rb" | "swift" | "kt" | "gif" | "jpg" | "jpeg" | "bmp" | "tiff" | "tif" | "png" | "svg" | "webp" | "avif" | "ico" | "heic" | "heif" | "jxl" | "docx" | "docm" | "dotx" | "dotm" | "doc" | "dot" | "pptx" | "pptm" | "potx" | "potm" | "ppsx" | "ppsm" | "rtf" | "odt" | "odp" | "xlsx" | "xltx" | "xlsm" | "xlsb" | "xls" | "xlt" | "xltm" | "csv" | "ods" | "fods" | "numbers" | "ofd" | "typ" | "eml" | "msg" | "mbox" | "olb" | "dra" | "dxf" | "dwg" | "dwf" | "dwfx" | "xps" | "geojson" | "kml" | "gpx" | "shp" | "excalidraw" | "drawio" | "dio" | "epub" | "umd" | "md" | "mp4" | "webm" | "m3u8" | "mp3" | "mpeg" | "wav" | "ogg" | "oga" | "opus" | "m4a" | "aac" | "flac" | "weba" | "midi" | "mid" | "ttf" | "otf" | "woff" | "woff2" | "psd" | "ai" | "eps" | "sqlite" | "parquet" | "avro" | "webarchive")[];
318
+ export declare const DEFAULT_SUPPORTED_EXTENSIONS: readonly ("markdown" | "wasm" | "pdf" | "typst" | "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" | "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" | "xyz" | "vtk" | "vtp" | "txt" | "json" | "js" | "mjs" | "cjs" | "css" | "java" | "py" | "html" | "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" | "rb" | "swift" | "kt" | "gif" | "jpg" | "jpeg" | "bmp" | "tiff" | "tif" | "png" | "svg" | "webp" | "avif" | "ico" | "heic" | "heif" | "jxl" | "docx" | "docm" | "dotx" | "dotm" | "doc" | "dot" | "pptx" | "pptm" | "potx" | "potm" | "ppsx" | "ppsm" | "rtf" | "odt" | "odp" | "xlsx" | "xltx" | "xlsm" | "xlsb" | "xls" | "xlt" | "xltm" | "csv" | "ods" | "fods" | "numbers" | "ofd" | "typ" | "eml" | "msg" | "mbox" | "olb" | "dra" | "gds" | "oas" | "oasis" | "dxf" | "dwg" | "dwf" | "dwfx" | "xps" | "geojson" | "kml" | "gpx" | "shp" | "excalidraw" | "drawio" | "dio" | "mermaid" | "mmd" | "plantuml" | "puml" | "xmind" | "epub" | "umd" | "md" | "mp4" | "webm" | "m3u8" | "mp3" | "mpeg" | "wav" | "ogg" | "oga" | "opus" | "m4a" | "aac" | "flac" | "weba" | "midi" | "mid" | "ttf" | "otf" | "woff" | "woff2" | "psd" | "ai" | "eps" | "sqlite" | "parquet" | "avro" | "webarchive")[];
@@ -5,14 +5,15 @@ export const ARCHIVE_EXTENSIONS = [
5
5
  ];
6
6
  export const MODEL_EXTENSIONS = [
7
7
  'glb', 'gltf', 'obj', 'stl', 'ply', 'fbx', 'dae', '3ds', '3mf', 'amf', 'usd', 'usda',
8
- 'usdc', 'usdz', 'kmz', 'step', 'stp', 'iges', 'igs', 'ifc', '3dm', 'pcd', 'wrl',
8
+ 'usdc', 'usdz', 'kmz', 'step', 'stp', 'iges', 'igs', 'ifc', '3dm', 'brep', 'pcd', 'wrl',
9
9
  'vrml', 'xyz', 'vtk', 'vtp',
10
10
  ];
11
11
  export const TEXT_EXTENSIONS = [
12
12
  'txt', 'json', 'js', 'mjs', 'cjs', 'css', 'java', 'py', 'html', 'htm', 'jsx', 'ts',
13
13
  'tsx', 'xml', 'log', 'vue', 'yaml', 'yml', 'ini', 'sh', 'bash', 'sql', 'go', 'rs',
14
- 'php', 'c', 'cpp', 'cc', 'h', 'hpp', 'cs', 'diff', 'jsonc', 'json5', 'ipynb', 'toml',
15
- 'proto', 'hcl', 'tex', 'gv', 'http', 'react', 'rb', 'swift', 'kt',
14
+ 'php', 'c', 'cpp', 'cc', 'h', 'hpp', 'cs', 'diff', 'patch', 'bundle', 'bdl',
15
+ 'jsonc', 'json5', 'ipynb', 'toml', 'proto', 'hcl', 'tex', 'gv', 'http', 'react',
16
+ 'rb', 'swift', 'kt',
16
17
  ];
17
18
  export const IMAGE_EXTENSIONS = [
18
19
  'gif', 'jpg', 'jpeg', 'bmp', 'tiff', 'tif', 'png', 'svg', 'webp', 'avif', 'ico',
@@ -103,7 +104,7 @@ export const DEFAULT_RENDERER_DEFINITIONS = [
103
104
  id: 'eda',
104
105
  label: 'EDA',
105
106
  category: 'eda',
106
- extensions: ['olb', 'dra'],
107
+ extensions: ['olb', 'dra', 'gds', 'oas', 'oasis'],
107
108
  async: true,
108
109
  capabilities: { download: true, print: true, exportHtml: true, zoom: false, search: true },
109
110
  },
@@ -135,7 +136,15 @@ export const DEFAULT_RENDERER_DEFINITIONS = [
135
136
  id: 'drawing',
136
137
  label: 'Drawing',
137
138
  category: 'drawing',
138
- extensions: ['excalidraw', 'drawio', 'dio'],
139
+ extensions: ['excalidraw', 'drawio', 'dio', 'mermaid', 'mmd', 'plantuml', 'puml'],
140
+ async: true,
141
+ capabilities: { download: true, print: true, exportHtml: true, zoom: 'provider', search: true },
142
+ },
143
+ {
144
+ id: 'mindmap',
145
+ label: 'Mind Map',
146
+ category: 'mindmap',
147
+ extensions: ['xmind'],
139
148
  async: true,
140
149
  capabilities: { download: true, print: true, exportHtml: true, zoom: 'provider', search: true },
141
150
  },
@@ -1,2 +1,9 @@
1
- import type { RendererDefinition, RendererRegistry } from '../contracts/types';
1
+ import type { FileViewerRendererHandlerRegistration, FileViewerRendererPluginInput, FileViewerRendererPlugin, RendererDefinition, RendererRegistry } from '../contracts/types';
2
2
  export declare const createRendererRegistry: (initialDefinitions?: readonly RendererDefinition[]) => RendererRegistry;
3
+ export interface InstallFileViewerRendererPluginsOptions<Handler = unknown> {
4
+ registry: RendererRegistry;
5
+ plugins: Iterable<FileViewerRendererPlugin<Handler>>;
6
+ registerHandler?: (registration: FileViewerRendererHandlerRegistration<Handler>) => void;
7
+ }
8
+ export declare const collectFileViewerRendererPlugins: <Handler = unknown>(input?: FileViewerRendererPluginInput<Handler> | null) => FileViewerRendererPlugin<Handler>[];
9
+ export declare const installFileViewerRendererPlugins: <Handler = unknown>({ registry, plugins, registerHandler, }: InstallFileViewerRendererPluginsOptions<Handler>) => Promise<RendererRegistry>;
@@ -61,3 +61,32 @@ export const createRendererRegistry = (initialDefinitions = DEFAULT_RENDERER_DEF
61
61
  },
62
62
  };
63
63
  };
64
+ const isRendererPreset = (input) => {
65
+ return !!input && typeof input === 'object' && !Array.isArray(input) &&
66
+ Array.isArray(input.renderers);
67
+ };
68
+ export const collectFileViewerRendererPlugins = (input) => {
69
+ if (!input) {
70
+ return [];
71
+ }
72
+ if (Array.isArray(input)) {
73
+ return input.flatMap(item => collectFileViewerRendererPlugins(item));
74
+ }
75
+ if (isRendererPreset(input)) {
76
+ return collectFileViewerRendererPlugins(input.renderers);
77
+ }
78
+ return [input];
79
+ };
80
+ export const installFileViewerRendererPlugins = async ({ registry, plugins, registerHandler, }) => {
81
+ var _a, _b, _c;
82
+ for (const plugin of plugins) {
83
+ (_a = plugin.definitions) === null || _a === void 0 ? void 0 : _a.forEach(definition => {
84
+ registry.register(definition);
85
+ });
86
+ (_b = plugin.handlers) === null || _b === void 0 ? void 0 : _b.forEach(registration => {
87
+ registerHandler === null || registerHandler === void 0 ? void 0 : registerHandler(registration);
88
+ });
89
+ await ((_c = plugin.install) === null || _c === void 0 ? void 0 : _c.call(plugin, { registry, registerHandler }));
90
+ }
91
+ return registry;
92
+ };
@@ -53,19 +53,10 @@ const readBlobDataUrl = async (blob) => {
53
53
  reader.readAsDataURL(blob);
54
54
  });
55
55
  };
56
- const renderHeic = async (buffer, type) => {
57
- const { default: heic2any } = await import('heic2any');
58
- const result = await heic2any({
59
- blob: new Blob([buffer], { type: getImageBlobType(type) }),
60
- toType: 'image/png',
61
- });
62
- const blob = Array.isArray(result) ? result[0] : result;
63
- return readBlobDataUrl(blob);
64
- };
65
56
  const resolveImageUrl = async (buffer, type) => {
66
57
  const normalizedType = (type || '').trim().toLowerCase();
67
58
  if (normalizedType === 'heic' || normalizedType === 'heif') {
68
- return renderHeic(buffer, normalizedType);
59
+ throw new Error('HEIC/HEIF image conversion has moved out of @file-viewer/core. Install and pass @file-viewer/renderer-image, or use @file-viewer/preset-all.');
69
60
  }
70
61
  return readBlobDataUrl(new Blob([buffer], { type: getImageBlobType(normalizedType) }));
71
62
  };
@@ -1,11 +1,329 @@
1
- import type { FileRenderHandler, FileViewerRenderedInstance } from '../contracts/types';
1
+ import type { FileViewerBuiltinRendererPreset, FileRenderHandler, FileViewerRenderedInstance } from '../contracts/types';
2
2
  type CoreBrowserRendererHandler = FileRenderHandler<FileViewerRenderedInstance, HTMLDivElement>;
3
3
  interface CoreBrowserRendererHandlerEntry {
4
4
  rendererId: string;
5
5
  handler: CoreBrowserRendererHandler;
6
6
  }
7
7
  export declare const coreBrowserRendererHandlers: readonly CoreBrowserRendererHandlerEntry[];
8
- export declare const createFileViewerCoreRendererRegistry: () => {
8
+ export declare const CORE_LITE_RENDERER_IDS: readonly ["image"];
9
+ export declare const coreLiteBrowserRendererHandlers: CoreBrowserRendererHandlerEntry[];
10
+ export declare const coreLiteRendererDefinitions: ({
11
+ readonly id: "office-word-openxml";
12
+ readonly label: "Word OpenXML";
13
+ readonly category: "office";
14
+ readonly extensions: readonly ["docx", "docm", "dotx", "dotm"];
15
+ readonly async: true;
16
+ readonly capabilities: {
17
+ readonly download: true;
18
+ readonly print: "adapter";
19
+ readonly exportHtml: "adapter";
20
+ readonly zoom: "provider";
21
+ readonly search: true;
22
+ };
23
+ } | {
24
+ readonly id: "office-word-binary";
25
+ readonly label: "Word Binary";
26
+ readonly category: "office";
27
+ readonly extensions: readonly ["doc", "dot"];
28
+ readonly async: true;
29
+ readonly capabilities: {
30
+ readonly download: true;
31
+ readonly print: "adapter";
32
+ readonly exportHtml: "adapter";
33
+ readonly zoom: "provider";
34
+ readonly search: true;
35
+ };
36
+ } | {
37
+ readonly id: "office-presentation";
38
+ readonly label: "PowerPoint";
39
+ readonly category: "office";
40
+ readonly extensions: readonly ["pptx", "pptm", "potx", "potm", "ppsx", "ppsm"];
41
+ readonly async: true;
42
+ readonly capabilities: {
43
+ readonly download: true;
44
+ readonly print: true;
45
+ readonly exportHtml: true;
46
+ readonly zoom: "provider";
47
+ readonly search: true;
48
+ };
49
+ } | {
50
+ readonly id: "open-document";
51
+ readonly label: "Open Document";
52
+ readonly category: "office";
53
+ readonly extensions: readonly ["rtf", "odt", "odp"];
54
+ readonly async: true;
55
+ readonly capabilities: {
56
+ readonly download: true;
57
+ readonly print: true;
58
+ readonly exportHtml: true;
59
+ readonly zoom: "provider";
60
+ readonly search: true;
61
+ };
62
+ } | {
63
+ readonly id: "spreadsheet-openxml";
64
+ readonly label: "Spreadsheet";
65
+ readonly category: "office";
66
+ readonly extensions: readonly ["xlsx", "xltx", "xlsm", "xlsb", "xls", "xlt", "xltm", "csv", "ods", "fods", "numbers"];
67
+ readonly async: true;
68
+ readonly capabilities: {
69
+ readonly download: true;
70
+ readonly print: false;
71
+ readonly exportHtml: false;
72
+ readonly zoom: "provider";
73
+ readonly search: true;
74
+ };
75
+ } | {
76
+ readonly id: "pdf";
77
+ readonly label: "PDF";
78
+ readonly category: "document";
79
+ readonly extensions: readonly ["pdf"];
80
+ readonly async: true;
81
+ readonly capabilities: {
82
+ readonly download: true;
83
+ readonly print: "adapter";
84
+ readonly exportHtml: "adapter";
85
+ readonly zoom: "provider";
86
+ readonly search: "provider";
87
+ };
88
+ } | {
89
+ readonly id: "ofd";
90
+ readonly label: "OFD";
91
+ readonly category: "document";
92
+ readonly extensions: readonly ["ofd"];
93
+ readonly async: true;
94
+ readonly capabilities: {
95
+ readonly download: true;
96
+ readonly print: true;
97
+ readonly exportHtml: true;
98
+ readonly zoom: "provider";
99
+ readonly search: true;
100
+ };
101
+ } | {
102
+ readonly id: "typst";
103
+ readonly label: "Typst";
104
+ readonly category: "document";
105
+ readonly extensions: readonly ["typ", "typst"];
106
+ readonly async: true;
107
+ readonly capabilities: {
108
+ readonly download: true;
109
+ readonly print: "adapter";
110
+ readonly exportHtml: "adapter";
111
+ readonly zoom: "provider";
112
+ readonly search: true;
113
+ };
114
+ } | {
115
+ readonly id: "archive";
116
+ readonly label: "Archive";
117
+ readonly category: "archive";
118
+ readonly extensions: readonly ["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"];
119
+ readonly async: true;
120
+ readonly capabilities: {
121
+ readonly download: true;
122
+ readonly print: false;
123
+ readonly exportHtml: false;
124
+ readonly zoom: false;
125
+ readonly search: true;
126
+ };
127
+ } | {
128
+ readonly id: "email";
129
+ readonly label: "Email";
130
+ readonly category: "email";
131
+ readonly extensions: readonly ["eml", "msg", "mbox"];
132
+ readonly async: true;
133
+ readonly capabilities: {
134
+ readonly download: true;
135
+ readonly print: false;
136
+ readonly exportHtml: true;
137
+ readonly zoom: false;
138
+ readonly search: true;
139
+ };
140
+ } | {
141
+ readonly id: "eda";
142
+ readonly label: "EDA";
143
+ readonly category: "eda";
144
+ readonly extensions: readonly ["olb", "dra", "gds", "oas", "oasis"];
145
+ readonly async: true;
146
+ readonly capabilities: {
147
+ readonly download: true;
148
+ readonly print: true;
149
+ readonly exportHtml: true;
150
+ readonly zoom: false;
151
+ readonly search: true;
152
+ };
153
+ } | {
154
+ readonly id: "cad";
155
+ readonly label: "CAD";
156
+ readonly category: "cad";
157
+ readonly extensions: readonly ["dxf", "dwg", "dwf", "dwfx", "xps"];
158
+ readonly async: true;
159
+ readonly capabilities: {
160
+ readonly download: true;
161
+ readonly print: true;
162
+ readonly exportHtml: true;
163
+ readonly zoom: "provider";
164
+ readonly search: false;
165
+ };
166
+ } | {
167
+ readonly id: "model";
168
+ readonly label: "3D Model";
169
+ readonly category: "model";
170
+ readonly extensions: readonly ["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", "xyz", "vtk", "vtp"];
171
+ readonly async: true;
172
+ readonly capabilities: {
173
+ readonly download: true;
174
+ readonly print: false;
175
+ readonly exportHtml: false;
176
+ readonly zoom: "provider";
177
+ readonly search: false;
178
+ };
179
+ } | {
180
+ readonly id: "geo";
181
+ readonly label: "Geospatial";
182
+ readonly category: "geo";
183
+ readonly extensions: readonly ["geojson", "kml", "gpx", "shp"];
184
+ readonly async: true;
185
+ readonly capabilities: {
186
+ readonly download: true;
187
+ readonly print: true;
188
+ readonly exportHtml: true;
189
+ readonly zoom: "provider";
190
+ readonly search: true;
191
+ };
192
+ } | {
193
+ readonly id: "drawing";
194
+ readonly label: "Drawing";
195
+ readonly category: "drawing";
196
+ readonly extensions: readonly ["excalidraw", "drawio", "dio", "mermaid", "mmd", "plantuml", "puml"];
197
+ readonly async: true;
198
+ readonly capabilities: {
199
+ readonly download: true;
200
+ readonly print: true;
201
+ readonly exportHtml: true;
202
+ readonly zoom: "provider";
203
+ readonly search: true;
204
+ };
205
+ } | {
206
+ readonly id: "mindmap";
207
+ readonly label: "Mind Map";
208
+ readonly category: "mindmap";
209
+ readonly extensions: readonly ["xmind"];
210
+ readonly async: true;
211
+ readonly capabilities: {
212
+ readonly download: true;
213
+ readonly print: true;
214
+ readonly exportHtml: true;
215
+ readonly zoom: "provider";
216
+ readonly search: true;
217
+ };
218
+ } | {
219
+ readonly id: "epub";
220
+ readonly label: "EPUB";
221
+ readonly category: "ebook";
222
+ readonly extensions: readonly ["epub"];
223
+ readonly async: true;
224
+ readonly capabilities: {
225
+ readonly download: true;
226
+ readonly print: false;
227
+ readonly exportHtml: true;
228
+ readonly zoom: false;
229
+ readonly search: "provider";
230
+ };
231
+ } | {
232
+ readonly id: "umd";
233
+ readonly label: "UMD";
234
+ readonly category: "ebook";
235
+ readonly extensions: readonly ["umd"];
236
+ readonly async: true;
237
+ readonly capabilities: {
238
+ readonly download: true;
239
+ readonly print: true;
240
+ readonly exportHtml: true;
241
+ readonly zoom: "provider";
242
+ readonly search: true;
243
+ };
244
+ } | {
245
+ readonly id: "image";
246
+ readonly label: "Image";
247
+ readonly category: "image";
248
+ readonly extensions: readonly ["gif", "jpg", "jpeg", "bmp", "tiff", "tif", "png", "svg", "webp", "avif", "ico", "heic", "heif", "jxl"];
249
+ readonly async: true;
250
+ readonly capabilities: {
251
+ readonly download: true;
252
+ readonly print: true;
253
+ readonly exportHtml: true;
254
+ readonly zoom: "provider";
255
+ readonly search: false;
256
+ };
257
+ } | {
258
+ readonly id: "markdown";
259
+ readonly label: "Markdown";
260
+ readonly category: "markdown";
261
+ readonly extensions: readonly ["md", "markdown"];
262
+ readonly async: true;
263
+ readonly capabilities: {
264
+ readonly download: true;
265
+ readonly print: true;
266
+ readonly exportHtml: true;
267
+ readonly zoom: false;
268
+ readonly search: true;
269
+ };
270
+ } | {
271
+ readonly id: "code";
272
+ readonly label: "Code and Text";
273
+ readonly category: "code";
274
+ readonly extensions: readonly ["txt", "json", "js", "mjs", "cjs", "css", "java", "py", "html", "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", "rb", "swift", "kt"];
275
+ readonly async: true;
276
+ readonly capabilities: {
277
+ readonly download: true;
278
+ readonly print: true;
279
+ readonly exportHtml: true;
280
+ readonly zoom: false;
281
+ readonly search: true;
282
+ };
283
+ } | {
284
+ readonly id: "video";
285
+ readonly label: "Video";
286
+ readonly category: "media";
287
+ readonly extensions: readonly ["mp4", "webm", "m3u8"];
288
+ readonly async: true;
289
+ readonly capabilities: {
290
+ readonly download: true;
291
+ readonly print: false;
292
+ readonly exportHtml: false;
293
+ readonly zoom: false;
294
+ readonly search: false;
295
+ };
296
+ } | {
297
+ readonly id: "audio";
298
+ readonly label: "Audio";
299
+ readonly category: "media";
300
+ readonly extensions: readonly ["mp3", "mpeg", "wav", "ogg", "oga", "opus", "m4a", "aac", "flac", "weba", "midi", "mid"];
301
+ readonly async: true;
302
+ readonly capabilities: {
303
+ readonly download: true;
304
+ readonly print: false;
305
+ readonly exportHtml: false;
306
+ readonly zoom: false;
307
+ readonly search: false;
308
+ };
309
+ } | {
310
+ readonly id: "data-asset";
311
+ readonly label: "Data Asset";
312
+ readonly category: "asset";
313
+ readonly extensions: readonly ["ttf", "otf", "woff", "woff2", "psd", "ai", "eps", "sqlite", "wasm", "parquet", "avro", "webarchive"];
314
+ readonly async: true;
315
+ readonly capabilities: {
316
+ readonly download: true;
317
+ readonly print: false;
318
+ readonly exportHtml: true;
319
+ readonly zoom: false;
320
+ readonly search: true;
321
+ };
322
+ })[];
323
+ export interface CreateFileViewerCoreRendererRegistryOptions {
324
+ builtinRenderers?: FileViewerBuiltinRendererPreset;
325
+ }
326
+ export declare const createFileViewerCoreRendererRegistry: (options?: CreateFileViewerCoreRendererRegistryOptions) => {
9
327
  dispatcher: import("..").FileViewerRendererDispatcher<CoreBrowserRendererHandler>;
10
328
  registry: import("..").RendererRegistry;
11
329
  missingRendererIds: string[];