@flyfish-group/file-viewer3 1.0.26 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/README.en.md +3 -388
  2. package/README.md +3 -364
  3. package/dist/file-viewer3.css +1 -2
  4. package/dist/index.d.ts +2 -0
  5. package/dist/index.js +2 -0
  6. package/package.json +22 -126
  7. package/dist/components/3MFLoader.js +0 -527
  8. package/dist/components/AMFLoader.js +0 -188
  9. package/dist/components/ArchiveViewer.js +0 -526
  10. package/dist/components/AudioViewer.js +0 -66
  11. package/dist/components/CadViewer.js +0 -9040
  12. package/dist/components/CodeViewer.js +0 -151
  13. package/dist/components/ColladaLoader.js +0 -2282
  14. package/dist/components/DrawingViewer.js +0 -295
  15. package/dist/components/EdaViewer.js +0 -630
  16. package/dist/components/EmailViewer.js +0 -276
  17. package/dist/components/EpubViewer.js +0 -172
  18. package/dist/components/FBXLoader.js +0 -1574
  19. package/dist/components/GLTFLoader.js +0 -1383
  20. package/dist/components/ImageViewer.js +0 -1519
  21. package/dist/components/KMZLoader.js +0 -45
  22. package/dist/components/MarkdownViewer.js +0 -1476
  23. package/dist/components/ModelViewer.js +0 -797
  24. package/dist/components/OBJLoader.js +0 -287
  25. package/dist/components/OfdViewer.js +0 -133
  26. package/dist/components/PCDLoader.js +0 -141
  27. package/dist/components/PLYLoader.js +0 -305
  28. package/dist/components/PdfView.js +0 -27667
  29. package/dist/components/PptxRender.js +0 -11217
  30. package/dist/components/STLLoader.js +0 -83
  31. package/dist/components/TDSLoader.js +0 -228
  32. package/dist/components/TypstViewer.js +0 -1697
  33. package/dist/components/USDLoader.js +0 -2526
  34. package/dist/components/UmdViewer.js +0 -1873
  35. package/dist/components/VRMLLoader.js +0 -6422
  36. package/dist/components/VTKLoader.js +0 -337
  37. package/dist/components/XYZLoader.js +0 -30
  38. package/dist/components/XlsxTable.js +0 -7879
  39. package/dist/components/__vite-browser-external.js +0 -7
  40. package/dist/components/_plugin-vue_export-helper.js +0 -8
  41. package/dist/components/ar-SA-G6X2FPQ2.js +0 -523
  42. package/dist/components/arc.js +0 -79
  43. package/dist/components/architecture-7EHR7CIX.js +0 -3
  44. package/dist/components/architectureDiagram-3BPJPVTR.js +0 -4096
  45. package/dist/components/archive.js +0 -24
  46. package/dist/components/asyncToGenerator.js +0 -29
  47. package/dist/components/audio.js +0 -19
  48. package/dist/components/az-AZ-76LH7QW2.js +0 -523
  49. package/dist/components/bash.js +0 -169
  50. package/dist/components/bg-BG-XCXSNQG7.js +0 -523
  51. package/dist/components/blockDiagram-GPEHLZMM.js +0 -3357
  52. package/dist/components/bn-BD-2XOGV67Q.js +0 -523
  53. package/dist/components/c4Diagram-AAUBKEIU.js +0 -2957
  54. package/dist/components/ca-ES-6MX7JW3Y.js +0 -523
  55. package/dist/components/cad.js +0 -23
  56. package/dist/components/cfb.js +0 -1174
  57. package/dist/components/channel.js +0 -5
  58. package/dist/components/chunk-2J33WTMH.js +0 -26
  59. package/dist/components/chunk-3OPIFGDE.js +0 -4167
  60. package/dist/components/chunk-4BX2VUAB.js +0 -19
  61. package/dist/components/chunk-55IACEB6.js +0 -9
  62. package/dist/components/chunk-5ZQYHXKU.js +0 -669
  63. package/dist/components/chunk-6U3AYISY.js +0 -624
  64. package/dist/components/chunk-727SXJPM.js +0 -3356
  65. package/dist/components/chunk-AGHRB4JF.js +0 -324
  66. package/dist/components/chunk-AQP2D5EJ.js +0 -2055
  67. package/dist/components/chunk-BSJP7CBP.js +0 -83
  68. package/dist/components/chunk-CSCIHK7Q.js +0 -3500
  69. package/dist/components/chunk-EIO257PC.js +0 -1836
  70. package/dist/components/chunk-FMBD7UC4.js +0 -5
  71. package/dist/components/chunk-K2UTITRG.js +0 -17627
  72. package/dist/components/chunk-KSCS5N6A.js +0 -572
  73. package/dist/components/chunk-L5ZTLDWV.js +0 -40
  74. package/dist/components/chunk-LZXEDZCA.js +0 -60
  75. package/dist/components/chunk-ND2GUHAM.js +0 -61
  76. package/dist/components/chunk-NNHCCRGN.js +0 -20425
  77. package/dist/components/chunk-NZK2D7GU.js +0 -68
  78. package/dist/components/chunk-O5CBEL6O.js +0 -1894
  79. package/dist/components/chunk-QZHKN3VN.js +0 -12
  80. package/dist/components/chunk-SRAX5OIU.js +0 -22
  81. package/dist/components/chunk-WU5MYG2G.js +0 -14
  82. package/dist/components/chunk-XPW4576I.js +0 -1146
  83. package/dist/components/chunk-Z3N5DIM6.js +0 -59
  84. package/dist/components/chunk-ZUYEQ4TG.js +0 -22
  85. package/dist/components/chunk.js +0 -23
  86. package/dist/components/classDiagram-4FO5ZUOK.js +0 -29
  87. package/dist/components/classDiagram-v2-Q7XG4LA2.js +0 -29
  88. package/dist/components/compiler.js +0 -2
  89. package/dist/components/core.js +0 -845
  90. package/dist/components/cose-bilkent-S5V4N54A.js +0 -2268
  91. package/dist/components/cpp.js +0 -225
  92. package/dist/components/cs-CZ-2BRQDIVT.js +0 -523
  93. package/dist/components/csharp.js +0 -260
  94. package/dist/components/css.js +0 -140
  95. package/dist/components/cytoscape.esm.js +0 -18114
  96. package/dist/components/da-DK-5WZEPLOC.js +0 -523
  97. package/dist/components/dagre-BM42HDAG.js +0 -325
  98. package/dist/components/dagre.js +0 -1936
  99. package/dist/components/de-DE-XR44H4JA.js +0 -523
  100. package/dist/components/defaultLocale.js +0 -201
  101. package/dist/components/defineProperty.js +0 -50
  102. package/dist/components/diagram-2AECGRRQ.js +0 -229
  103. package/dist/components/diagram-5GNKFQAL.js +0 -108
  104. package/dist/components/diagram-KO2AKTUF.js +0 -443
  105. package/dist/components/diagram-LMA3HP47.js +0 -139
  106. package/dist/components/diagram-OG6HWLK6.js +0 -541
  107. package/dist/components/diff.js +0 -39
  108. package/dist/components/directory-open-01563666.js +0 -26
  109. package/dist/components/directory-open-4ed118d0.js +0 -83
  110. package/dist/components/dist.js +0 -50
  111. package/dist/components/dist2.js +0 -3291
  112. package/dist/components/dist3.js +0 -1593
  113. package/dist/components/documentSearch.js +0 -378
  114. package/dist/components/docx-preview.js +0 -3113
  115. package/dist/components/drawing.js +0 -19
  116. package/dist/components/ebook.js +0 -16
  117. package/dist/components/eda.js +0 -20
  118. package/dist/components/el-GR-BZB4AONW.js +0 -523
  119. package/dist/components/email.js +0 -21
  120. package/dist/components/en-B4ZKOASM.js +0 -3
  121. package/dist/components/erDiagram-TEJ5UH35.js +0 -1719
  122. package/dist/components/es-ES-U4NZUMDT.js +0 -523
  123. package/dist/components/eu-ES-A7QVB2H4.js +0 -523
  124. package/dist/components/eventmodeling-FCH6USID.js +0 -3
  125. package/dist/components/fa-IR-HGAKTJCU.js +0 -523
  126. package/dist/components/fflate.module.js +0 -323
  127. package/dist/components/fi-FI-Z5N7JZ37.js +0 -523
  128. package/dist/components/file-open-002ab408.js +0 -38
  129. package/dist/components/file-open-7c801643.js +0 -24
  130. package/dist/components/file-save-3189631c.js +0 -40
  131. package/dist/components/file-save-745eba88.js +0 -36
  132. package/dist/components/flowDiagram-I6XJVG4X.js +0 -4181
  133. package/dist/components/fr-FR-RHASNOE6.js +0 -523
  134. package/dist/components/ganttDiagram-6RSMTGT7.js +0 -2182
  135. package/dist/components/gitGraph-WXDBUCRP.js +0 -3
  136. package/dist/components/gitGraphDiagram-PVQCEYII.js +0 -788
  137. package/dist/components/gl-ES-HMX3MZ6V.js +0 -523
  138. package/dist/components/global-compiler.js +0 -23
  139. package/dist/components/global-renderer.js +0 -23
  140. package/dist/components/go.js +0 -140
  141. package/dist/components/graphlib.js +0 -1267
  142. package/dist/components/he-IL-6SHJWFNN.js +0 -523
  143. package/dist/components/hi-IN-IWLTKZ5I.js +0 -523
  144. package/dist/components/hu-HU-A5ZG7DT2.js +0 -523
  145. package/dist/components/id-ID-SAP4L64H.js +0 -523
  146. package/dist/components/image-GAAHSSAO.js +0 -3
  147. package/dist/components/image-blob-reduce.esm.js +0 -1429
  148. package/dist/components/image.js +0 -17
  149. package/dist/components/info-J43DQDTF.js +0 -3
  150. package/dist/components/infoDiagram-5YYISTIA.js +0 -26
  151. package/dist/components/ini.js +0 -88
  152. package/dist/components/init.js +0 -15
  153. package/dist/components/ishikawaDiagram-YF4QCWOH.js +0 -718
  154. package/dist/components/it-IT-JPQ66NNP.js +0 -523
  155. package/dist/components/ja-JP-DBVTYXUO.js +0 -523
  156. package/dist/components/java.js +0 -169
  157. package/dist/components/javascript.js +0 -436
  158. package/dist/components/journeyDiagram-JHISSGLW.js +0 -885
  159. package/dist/components/json.js +0 -36
  160. package/dist/components/jszip.min.js +0 -3033
  161. package/dist/components/kaa-6HZHGXH3.js +0 -523
  162. package/dist/components/kab-KAB-ZGHBKWFO.js +0 -523
  163. package/dist/components/kanban-definition-UN3LZRKU.js +0 -986
  164. package/dist/components/katex.js +0 -21979
  165. package/dist/components/kk-KZ-P5N5QNE5.js +0 -523
  166. package/dist/components/km-KH-HSX4SM5Z.js +0 -523
  167. package/dist/components/ko-KR-MTYHY66A.js +0 -523
  168. package/dist/components/ku-TR-6OUDTVRD.js +0 -523
  169. package/dist/components/lib.js +0 -4877
  170. package/dist/components/libarchive.js +0 -360
  171. package/dist/components/linear.js +0 -289
  172. package/dist/components/lt-LT-XHIRWOB4.js +0 -523
  173. package/dist/components/lv-LV-5QDEKY6T.js +0 -523
  174. package/dist/components/markdown.js +0 -181
  175. package/dist/components/md.js +0 -17
  176. package/dist/components/mermaid-parser.core.js +0 -328
  177. package/dist/components/mindmap-definition-RKZ34NQL.js +0 -1016
  178. package/dist/components/model.js +0 -21
  179. package/dist/components/mp4.js +0 -12
  180. package/dist/components/mr-IN-CRQNXWMA.js +0 -523
  181. package/dist/components/my-MM-5M5IBNSE.js +0 -523
  182. package/dist/components/nb-NO-T6EIAALU.js +0 -523
  183. package/dist/components/nestedRender.js +0 -158
  184. package/dist/components/nl-NL-IS3SIHDZ.js +0 -523
  185. package/dist/components/nn-NO-6E72VCQL.js +0 -523
  186. package/dist/components/objectSpread2.js +0 -29
  187. package/dist/components/objectWithoutProperties.js +0 -28
  188. package/dist/components/oc-FR-POXYY2M6.js +0 -523
  189. package/dist/components/ofd.js +0 -5261
  190. package/dist/components/ofd2.js +0 -16
  191. package/dist/components/ordinal.js +0 -65
  192. package/dist/components/pa-IN-N4M65BXN.js +0 -523
  193. package/dist/components/packet-YPE3B663.js +0 -3
  194. package/dist/components/pdf.js +0 -24
  195. package/dist/components/percentages-BXMCSKIN.js +0 -3
  196. package/dist/components/php.js +0 -294
  197. package/dist/components/pica.js +0 -1009
  198. package/dist/components/pie-LRSECV5Y.js +0 -3
  199. package/dist/components/pie.js +0 -47
  200. package/dist/components/pieDiagram-4H26LBE5.js +0 -130
  201. package/dist/components/pl-PL-T2D74RX3.js +0 -523
  202. package/dist/components/postal-mime.js +0 -3146
  203. package/dist/components/pptx.js +0 -15
  204. package/dist/components/printLayout.js +0 -42
  205. package/dist/components/prod.js +0 -21770
  206. package/dist/components/pt-BR-5N22H2LF.js +0 -523
  207. package/dist/components/pt-PT-UZXXM6DQ.js +0 -523
  208. package/dist/components/python.js +0 -238
  209. package/dist/components/quadrantDiagram-W4KKPZXB.js +0 -1988
  210. package/dist/components/radar-GUYGQ44K.js +0 -3
  211. package/dist/components/renderer.js +0 -2
  212. package/dist/components/requirementDiagram-4Y6WPE33.js +0 -2230
  213. package/dist/components/ro-RO-JPDTUUEW.js +0 -523
  214. package/dist/components/rough.esm.js +0 -1355
  215. package/dist/components/roundRect.js +0 -90
  216. package/dist/components/ru-RU-B4JR7IUQ.js +0 -523
  217. package/dist/components/rust.js +0 -169
  218. package/dist/components/sankeyDiagram-5OEKKPKP.js +0 -972
  219. package/dist/components/sequenceDiagram-3UESZ5HK.js +0 -4255
  220. package/dist/components/shared.js +0 -175
  221. package/dist/components/shared2.js +0 -4
  222. package/dist/components/si-LK-N5RQ5JYF.js +0 -523
  223. package/dist/components/sk-SK-C5VTKIMK.js +0 -523
  224. package/dist/components/sl-SI-NN7IZMDC.js +0 -523
  225. package/dist/components/sourceLoading.js +0 -134
  226. package/dist/components/sql.js +0 -118
  227. package/dist/components/src.js +0 -2664
  228. package/dist/components/src2.js +0 -10722
  229. package/dist/components/stateDiagram-AJRCARHV.js +0 -217
  230. package/dist/components/stateDiagram-v2-BHNVJYJU.js +0 -27
  231. package/dist/components/subset-shared.chunk.js +0 -3
  232. package/dist/components/subset-worker.chunk.js +0 -21
  233. package/dist/components/sv-SE-XGPEYMSR.js +0 -523
  234. package/dist/components/ta-IN-2NMHFXQM.js +0 -523
  235. package/dist/components/text.js +0 -20
  236. package/dist/components/th-TH-HPSO5L25.js +0 -523
  237. package/dist/components/three.module.js +0 -13134
  238. package/dist/components/time.js +0 -910
  239. package/dist/components/timeline-definition-PNZ67QCA.js +0 -1084
  240. package/dist/components/tr-TR-DEFEU3FU.js +0 -523
  241. package/dist/components/treeView-BLDUP644.js +0 -3
  242. package/dist/components/treemap-LRROVOQU.js +0 -3
  243. package/dist/components/typescript.js +0 -521
  244. package/dist/components/typst.js +0 -25
  245. package/dist/components/uk-UA-QMV73CPH.js +0 -523
  246. package/dist/components/umd.js +0 -16
  247. package/dist/components/use.js +0 -422
  248. package/dist/components/util.js +0 -49
  249. package/dist/components/vennDiagram-CIIHVFJN.js +0 -1880
  250. package/dist/components/vi-VN-M7AON7JQ.js +0 -523
  251. package/dist/components/viewerZoom.js +0 -92
  252. package/dist/components/wardley-L42UT6IY.js +0 -3
  253. package/dist/components/wardleyDiagram-YWT4CUSO.js +0 -656
  254. package/dist/components/wasm-pack-shim.js +0 -1711
  255. package/dist/components/wasm-pack-shim2.js +0 -934
  256. package/dist/components/wasm.js +0 -97
  257. package/dist/components/word.js +0 -3055
  258. package/dist/components/worker-ref.js +0 -16
  259. package/dist/components/xlsx.js +0 -21
  260. package/dist/components/xml.js +0 -166
  261. package/dist/components/xychartDiagram-2RQKCTM6.js +0 -2015
  262. package/dist/components/yaml.js +0 -144
  263. package/dist/components/zh-CN-LNUGB5OW.js +0 -523
  264. package/dist/components/zh-HK-E62DVLB3.js +0 -523
  265. package/dist/components/zh-TW-RAJ6MFWO.js +0 -523
  266. package/dist/index.mjs +0 -3293
  267. package/dist/src/App.vue.d.ts +0 -3
  268. package/dist/src/compare/CompareApp.vue.d.ts +0 -3
  269. package/dist/src/compare/main.d.ts +0 -0
  270. package/dist/src/compare/useSynchronizedScroll.d.ts +0 -7
  271. package/dist/src/components/HelloWorld.vue.d.ts +0 -3
  272. package/dist/src/components/utils.d.ts +0 -4
  273. package/dist/src/main.d.ts +0 -0
  274. package/dist/src/package/common/printCapability.d.ts +0 -27
  275. package/dist/src/package/common/printLayout.d.ts +0 -16
  276. package/dist/src/package/common/sourceLoading.d.ts +0 -10
  277. package/dist/src/package/common/type.d.ts +0 -544
  278. package/dist/src/package/common/util.d.ts +0 -5
  279. package/dist/src/package/common/worker-ref.d.ts +0 -12
  280. package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +0 -75
  281. package/dist/src/package/components/FileViewer/exportDocumentTemplate.d.ts +0 -9
  282. package/dist/src/package/components/FileViewer/hooks/useViewerDocumentFeatures.d.ts +0 -29
  283. package/dist/src/package/components/FileViewer/hooks/useViewerExport.d.ts +0 -21
  284. package/dist/src/package/components/FileViewer/hooks/useViewerWatermark.d.ts +0 -8
  285. package/dist/src/package/components/FileViewer/hooks/useViewerZoom.d.ts +0 -34
  286. package/dist/src/package/components/FileViewer/index.d.ts +0 -2
  287. package/dist/src/package/components/FileViewer/util.d.ts +0 -3
  288. package/dist/src/package/index.d.ts +0 -22
  289. package/dist/src/package/use/documentLocation.d.ts +0 -15
  290. package/dist/src/package/use/documentSearch.d.ts +0 -234
  291. package/dist/src/package/use/index.d.ts +0 -5
  292. package/dist/src/package/use/loading.d.ts +0 -33
  293. package/dist/src/package/use/viewerZoom.d.ts +0 -42
  294. package/dist/src/package/use/worker.d.ts +0 -24
  295. package/dist/src/package/vendors/archive/ArchiveViewer.vue.d.ts +0 -9
  296. package/dist/src/package/vendors/archive/cache.d.ts +0 -10
  297. package/dist/src/package/vendors/archive/fallback.d.ts +0 -9
  298. package/dist/src/package/vendors/archive/index.d.ts +0 -3
  299. package/dist/src/package/vendors/archive/shared.d.ts +0 -24
  300. package/dist/src/package/vendors/audio/AudioViewer.vue.d.ts +0 -7
  301. package/dist/src/package/vendors/audio/index.d.ts +0 -7
  302. package/dist/src/package/vendors/cad/CadViewer.vue.d.ts +0 -9
  303. package/dist/src/package/vendors/cad/index.d.ts +0 -8
  304. package/dist/src/package/vendors/drawing/DrawingViewer.vue.d.ts +0 -15
  305. package/dist/src/package/vendors/drawing/index.d.ts +0 -7
  306. package/dist/src/package/vendors/ebook/EpubViewer.vue.d.ts +0 -6
  307. package/dist/src/package/vendors/ebook/index.d.ts +0 -7
  308. package/dist/src/package/vendors/eda/EdaViewer.vue.d.ts +0 -8
  309. package/dist/src/package/vendors/eda/index.d.ts +0 -2
  310. package/dist/src/package/vendors/eda/parser.d.ts +0 -77
  311. package/dist/src/package/vendors/email/EmailViewer.vue.d.ts +0 -10
  312. package/dist/src/package/vendors/email/index.d.ts +0 -2
  313. package/dist/src/package/vendors/image/ImageViewer.vue.d.ts +0 -6
  314. package/dist/src/package/vendors/image/index.d.ts +0 -4
  315. package/dist/src/package/vendors/md/MarkdownViewer.vue.d.ts +0 -6
  316. package/dist/src/package/vendors/md/index.d.ts +0 -4
  317. package/dist/src/package/vendors/model/ModelViewer.vue.d.ts +0 -8
  318. package/dist/src/package/vendors/model/index.d.ts +0 -3
  319. package/dist/src/package/vendors/model/shared.d.ts +0 -1
  320. package/dist/src/package/vendors/mp4/index.d.ts +0 -4
  321. package/dist/src/package/vendors/nestedRender.d.ts +0 -10
  322. package/dist/src/package/vendors/ofd/OfdViewer.vue.d.ts +0 -6
  323. package/dist/src/package/vendors/ofd/index.d.ts +0 -7
  324. package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +0 -10
  325. package/dist/src/package/vendors/pdf/index.d.ts +0 -2
  326. package/dist/src/package/vendors/pdf/worker/index.d.ts +0 -4
  327. package/dist/src/package/vendors/pdf/worker/pdf.worker.d.ts +0 -0
  328. package/dist/src/package/vendors/pptx/PptxRender.vue.d.ts +0 -9
  329. package/dist/src/package/vendors/pptx/index.d.ts +0 -6
  330. package/dist/src/package/vendors/pptx/options.d.ts +0 -39
  331. package/dist/src/package/vendors/pptx/support/chart.d.ts +0 -4
  332. package/dist/src/package/vendors/pptx/worker/index.d.ts +0 -4
  333. package/dist/src/package/vendors/renders.d.ts +0 -3
  334. package/dist/src/package/vendors/text/CodeViewer.vue.d.ts +0 -7
  335. package/dist/src/package/vendors/text/index.d.ts +0 -10
  336. package/dist/src/package/vendors/typst/TypstViewer.vue.d.ts +0 -15
  337. package/dist/src/package/vendors/typst/index.d.ts +0 -8
  338. package/dist/src/package/vendors/umd/UmdViewer.vue.d.ts +0 -6
  339. package/dist/src/package/vendors/umd/index.d.ts +0 -7
  340. package/dist/src/package/vendors/umd/parser.d.ts +0 -30
  341. package/dist/src/package/vendors/word/doc.d.ts +0 -5
  342. package/dist/src/package/vendors/word/docx.d.ts +0 -5
  343. package/dist/src/package/vendors/word/docx.worker.d.ts +0 -1
  344. package/dist/src/package/vendors/word/index.d.ts +0 -3
  345. package/dist/src/package/vendors/xlsx/XlsxTable.state.d.ts +0 -80
  346. package/dist/src/package/vendors/xlsx/XlsxTable.view.d.ts +0 -25
  347. package/dist/src/package/vendors/xlsx/XlsxTable.vue.d.ts +0 -6
  348. package/dist/src/package/vendors/xlsx/index.d.ts +0 -6
  349. package/dist/src/package/vendors/xlsx/util.d.ts +0 -3
  350. package/dist/src/package/vendors/xlsx/worker/index.d.ts +0 -4
  351. package/dist/src/package/vendors/xlsx/worker/sheetjs/SheetJsModel.d.ts +0 -73
  352. package/dist/src/package/vendors/xlsx/worker/sheetjs/color.d.ts +0 -2
  353. package/dist/src/package/vendors/xlsx/worker/sheetjs/index.d.ts +0 -4
  354. package/dist/src/package/vendors/xlsx/worker/sheetjs/sheet.worker.d.ts +0 -1
  355. package/dist/style.css +0 -1
  356. package/dist/wasm/cad/dwfv-render.wasm +0 -0
  357. package/dist/wasm/cad/dwg-worker.js +0 -24
  358. package/dist/wasm/cad/libredwg-web.js +0 -15
  359. package/dist/wasm/cad/libredwg-web.wasm +0 -0
package/README.en.md CHANGED
@@ -1,390 +1,5 @@
1
- # Flyfish Viewer
1
+ # @flyfish-group/file-viewer3
2
2
 
3
- [Simplified Chinese](README.md) | [English](README.en.md)
3
+ This is the historical Vue 3 compatibility package for Flyfish File Viewer. New integrations should prefer the standard package `@file-viewer/vue3`; this package keeps the existing npm line compatible for projects that already import `@flyfish-group/file-viewer3`.
4
4
 
5
- Bring Word, Excel, PowerPoint, PDF, Typst, archives, email, audio, ebooks, drawings, CAD, 3D models, Markdown, images, and source code preview into the browser with a clean, deployable viewer.
6
-
7
- `@flyfish-group/file-viewer3` is a pure frontend file preview component built with Vue 3, TypeScript, and Vite. Vue 2.7 projects should use the matching `@flyfish-group/file-viewer` package. The Vue 3 build is also the baseline runtime for the React, vanilla JavaScript, and iframe integration packages.
8
-
9
- The viewer does not require a backend conversion service. It is designed for OA systems, knowledge bases, attachment centers, workflow platforms, customer support portals, document approval flows, intranet systems, and offline-capable deployments where file preview should feel like a maintained product module rather than a temporary feature.
10
-
11
- - npm for Vue 3: [@flyfish-group/file-viewer3](https://www.npmjs.com/package/@flyfish-group/file-viewer3)
12
- - npm for Vue 2.7: [@flyfish-group/file-viewer](https://www.npmjs.com/package/@flyfish-group/file-viewer)
13
- - npm for React: [@flyfish-group/file-viewer-react](https://www.npmjs.com/package/@flyfish-group/file-viewer-react)
14
- - npm for vanilla JavaScript: [@flyfish-group/file-viewer-web](https://www.npmjs.com/package/@flyfish-group/file-viewer-web)
15
- - Official documentation: [doc.flyfish.dev](https://doc.flyfish.dev)
16
- - Online demo: [viewer.flyfish.dev](https://viewer.flyfish.dev)
17
- - Document comparison demo: [viewer.flyfish.dev/compare.html](https://viewer.flyfish.dev/compare.html)
18
- - Release downloads: [github.com/flyfish-dev/file-viewer/releases](https://github.com/flyfish-dev/file-viewer/releases)
19
- - GitHub artifact repository: [github.com/flyfish-dev/file-viewer](https://github.com/flyfish-dev/file-viewer)
20
- - Gitee artifact mirror: [gitee.com/flyfish-dev/file-viewer](https://gitee.com/flyfish-dev/file-viewer)
21
- - Source access and commercial customization: [https://dev.flyfish.group/shop](https://dev.flyfish.group/shop)
22
-
23
- ## Current Packages
24
-
25
- | Stack | Package | Version | Recommended branch | Notes |
26
- | --- | --- | --- | --- | --- |
27
- | Vue 3 | `@flyfish-group/file-viewer3` | `1.0.25` | `v3` | Recommended version and the runtime baseline for React / vanilla JS iframe integrations |
28
- | Vue 2.7 | `@flyfish-group/file-viewer` | `1.0.25` | `main` | Vue 2 compatible package with the same format coverage and API semantics |
29
- | React 17 / 18 / 19 | `@flyfish-group/file-viewer-react` | `1.0.25` | adapter package | iframe component that loads `/file-viewer/index.html` by default |
30
- | Vanilla JavaScript | `@flyfish-group/file-viewer-web` | `1.0.25` | adapter package | iframe helpers and static viewer asset copier |
31
-
32
- For intranet or offline environments, this artifact repository also ships npm tarballs under `artifacts/`:
33
-
34
- ```bash
35
- npm install ./artifacts/flyfish-group-file-viewer3-1.0.25.tgz
36
- npm install ./artifacts/flyfish-group-file-viewer-1.0.25.tgz
37
- npm install ./artifacts/flyfish-group-file-viewer-web-1.0.25.tgz
38
- npm install ./artifacts/flyfish-group-file-viewer-react-1.0.25.tgz
39
- ```
40
-
41
- When installing the React tarball offline, install the same-version web tarball first because the React package depends on `@flyfish-group/file-viewer-web`.
42
-
43
- If you use pnpm 10 and see `Ignored build scripts: @flyfish-group/file-viewer-web`, run:
44
-
45
- ```bash
46
- pnpm approve-builds
47
- ```
48
-
49
- Then allow `@flyfish-group/file-viewer-web`, or manually copy the bundled viewer assets:
50
-
51
- ```bash
52
- pnpm exec file-viewer-copy-assets ./public/file-viewer
53
- ```
54
-
55
- GitHub Releases provide all distribution downloads:
56
-
57
- | File | Purpose |
58
- | --- | --- |
59
- | `file-viewer-v3-*-demo.tar.gz` | Main demo / iframe private deployment static site; extract it and use `/index.html?url=...` |
60
- | `file-viewer-v3-*-adapter-demo.tar.gz` | React / vanilla JavaScript adapter demo site |
61
- | `file-viewer-v3-*-lib-dist.tar.gz` | Vue 3 library dist for offline inspection or self-hosted packaging |
62
- | `file-viewer-v3-*-docs.tar.gz` | Documentation site static output |
63
- | `flyfish-group-file-viewer3-*.tgz` | Vue 3 local npm package |
64
- | `flyfish-group-file-viewer-*.tgz` | Vue 2.7 local npm package |
65
- | `flyfish-group-file-viewer-web-*.tgz` | Vanilla JavaScript iframe helper with viewer asset copy tooling |
66
- | `flyfish-group-file-viewer-react-*.tgz` | React iframe component; install the same-version web package together with it |
67
-
68
- ![Flyfish Viewer demo](docs/_images/demo-main.png)
69
-
70
- ## Why Use It
71
-
72
- - **Pure frontend and serverless.** File parsing and rendering happen in the browser. You do not need Office Server, a LibreOffice daemon, or a document conversion backend.
73
- - **Broad format coverage.** The current release maps 152 extensions across 20 preview pipelines, including Office, PDF, OFD, Typst, archives, email, EDA files, CAD, 3D models, Excalidraw, draw.io, EPUB, UMD, Markdown, images, audio, video, and source code.
74
- - **Lazy loaded renderers.** Heavy PDF, Office, OFD, Typst, archive, email, CAD, 3D, ebook, Markdown, and code highlighting dependencies are loaded only when the file type needs them.
75
- - **Production-ready operations.** The viewer includes original file download, full rendered printing, rendered HTML export, watermark options, theme options, lifecycle hooks, iframe events, and before-operation guards for permission checks.
76
- - **Better document reading.** Word and PDF keep a grey workspace, white paper surface, centered reading, width fitting, navigation, zoom, rotation, and complete print / HTML export paths.
77
- - **Renderer-native zoom controls.** The common toolbar can zoom in, zoom out, and reset through per-format providers for PDF, Word, PPTX, virtual Excel tables, images, CAD, OFD, Typst, Markdown, code, and drawing files, avoiding fragile host-level CSS transforms.
78
- - **Controlled theming.** `options.theme` supports `light`, `dark`, and `system`. Light business UIs can lock the viewer to `light` even when the operating system is in dark mode.
79
- - **PDF toolbar ergonomics.** `toolbar.position` supports `auto`, `top`, and `bottom-right`. In `auto` mode, PDF uses a bottom-right floating operation bar to avoid duplicating the PDF navigation toolbar.
80
- - **Demo and comparison views.** The repository includes the main demo and a standalone `/compare.html` page for side-by-side document comparison.
81
- - **Component and standalone modes.** Use it as a Vue component, or deploy the static viewer and embed it through iframe in any system.
82
- - **Artifact-first delivery.** This public repository contains minified build artifacts, static demos, documentation output, sample files, Docker deployment assets, and npm tarballs. It does not contain the private source tree.
83
-
84
- ## Supported Formats
85
-
86
- The viewer is organized around preview pipelines rather than one-off file extensions.
87
-
88
- | Category | Extensions | Rendering pipeline | Typical use |
89
- | --- | --- | --- | --- |
90
- | Word | `docx`, `docm`, `dotx`, `dotm` | `docx-preview`, read-only page preview, print and HTML export | Modern Word documents and templates |
91
- | Legacy Word | `doc`, `dot` | `msdoc-viewer` with Word-like paper surface and CFB tolerance fixes | Old Word 97-2003 files |
92
- | Excel | `xlsx`, `xltx` | `styled-exceljs` plus virtual table rendering, merged cells, styles, auto text color, workbook images | Business spreadsheets and templates |
93
- | Excel-compatible | `xlsm`, `xlsb`, `xls`, `xlt`, `xltm`, `csv`, `ods`, `fods`, `numbers` | Progressive spreadsheet parsing and virtual rendering | Legacy spreadsheets and lightweight data preview |
94
- | PowerPoint | `pptx`, `pptm`, `potx`, `potm`, `ppsx`, `ppsm` | Slide preview with images, shapes, theme backgrounds, clipping, and EMF fallback | Presentations, training decks, proposals |
95
- | PDF | `pdf` | `pdfjs-dist`, streaming same-origin loading, Range support, zoom, rotation, page thumbnails, outline tree, width fitting, print, HTML export | Contracts, invoices, official layout documents |
96
- | OFD | `ofd` | Browser-side OFD preview based on `DLTech21/ofd.js` source | Chinese e-invoices, government documents, archives |
97
- | Typst | `typ`, `typst` | Direct Typst source rendering with browser WASM compiler and SVG pages | Technical reports, papers, engineering documents |
98
- | Archives | `zip`, `zipx`, `7z`, `rar`, `tar`, `gz`, `tgz`, `bz2`, `xz`, `zst`, `cab`, `iso`, `jar`, `apk`, `cbz`, `cbr`, and more | `libarchive.js` Worker, directory listing, lazy extraction, IndexedDB cache | Attachment packages and internal document bundles |
99
- | Email | `eml`, `msg` | `postal-mime` for EML, `@kenjiuno/msgreader` for MSG, headers, HTML/text body, attachment preview | Email archives and support tickets |
100
- | EDA | `olb`, `dra` | CFB-based OrCAD / Allegro structure inspection, trees, symbols, footprints, padstack candidates, properties, strings, diagnostics | Component libraries and EDA attachments |
101
- | CAD | `dwg`, `dxf`, `dwf`, `dwfx`, `xps` | `@flyfish-dev/cad-viewer` preview. DWG uses Worker + LibreDWG WASM, DXF uses a JS parser, and DWF/DWFx/XPS use the native `dwf-viewer` path for W2D/W3D/XPS graphics | Engineering drawings and AutoCAD archives |
102
- | 3D models | `glb`, `gltf`, `obj`, `stl`, `ply`, `fbx`, `dae`, `3ds`, `3mf`, `amf`, `usd`, `usda`, `usdc`, `usdz`, `kmz`, `pcd`, `wrl`, `vrml`, `xyz`, `vtk`, `vtp`, `step`, `stp`, `iges`, `igs`, `ifc`, `3dm` | Three.js interactive preview, with conversion guidance for heavy CAD/BIM kernels | 3D assets, point clouds, design models |
103
- | Excalidraw | `excalidraw` | Official `@excalidraw/excalidraw` restore and `exportToSvg` read-only rendering | Whiteboard sketches and product diagrams |
104
- | draw.io | `drawio`, `dio` | Official diagrams.net `GraphViewer` | Flowcharts and architecture diagrams |
105
- | EPUB | `epub` | `epubjs` table of contents and scrolling reader | Ebooks and long training materials |
106
- | UMD ebook | `umd` | UMD metadata, chapters, offsets, zlib text blocks | Legacy mobile ebooks |
107
- | Markdown | `md`, `markdown` | Markdown reading surface with theme-aware styles | README files and knowledge base articles |
108
- | Images | `gif`, `jpg`, `jpeg`, `bmp`, `tiff`, `tif`, `png`, `svg`, `webp` | Native image preview | Image attachments and design assets |
109
- | Source and text | `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` | Lightweight `highlight.js` language-specific highlighting, HTML shown as source | Logs, configs, code snippets, API responses |
110
- | Audio | `mp3`, `mpeg`, `wav`, `ogg`, `oga`, `opus`, `m4a`, `aac`, `flac`, `weba` | Native browser audio player | Recordings and audio attachments |
111
- | Video | `mp4` | Native browser video player | Screen recordings and demo videos |
112
-
113
- ## Vue 3 Integration
114
-
115
- ```bash
116
- npm install @flyfish-group/file-viewer3
117
- ```
118
-
119
- ```ts
120
- import { createApp } from 'vue'
121
- import App from './App.vue'
122
- import FileViewer from '@flyfish-group/file-viewer3'
123
-
124
- createApp(App).use(FileViewer).mount('#app')
125
- ```
126
-
127
- ```vue
128
- <script setup lang="ts">
129
- import { ref } from 'vue'
130
-
131
- const url = ref('/files/demo.pdf')
132
-
133
- const options = {
134
- theme: 'light',
135
- toolbar: { position: 'bottom-right', download: true, print: true, exportHtml: true },
136
- watermark: { text: 'Internal Preview', opacity: 0.14 },
137
- pdf: { streaming: 'same-origin', rangeChunkSize: 64 * 1024 }
138
- }
139
- </script>
140
-
141
- <template>
142
- <div style="height: 100vh">
143
- <file-viewer :url="url" :options="options" />
144
- </div>
145
- </template>
146
- ```
147
-
148
- For local files or authenticated downloads, pass a `File` object:
149
-
150
- ```ts
151
- const response = await fetch('/api/files/contract', { credentials: 'include' })
152
- const blob = await response.blob()
153
-
154
- file.value = new File([blob], 'contract.pdf', { type: blob.type })
155
- ```
156
-
157
- The filename matters. The viewer uses the extension to choose the correct rendering pipeline.
158
-
159
- ## Vue 2.7 Integration
160
-
161
- ```bash
162
- npm install @flyfish-group/file-viewer
163
- ```
164
-
165
- ```ts
166
- import Vue from 'vue'
167
- import FileViewer from '@flyfish-group/file-viewer'
168
-
169
- Vue.use(FileViewer)
170
- ```
171
-
172
- ```vue
173
- <template>
174
- <div style="height: 100vh">
175
- <file-viewer :url="url" :options="options" />
176
- </div>
177
- </template>
178
-
179
- <script>
180
- export default {
181
- data() {
182
- return {
183
- url: '/files/demo.pdf',
184
- options: {
185
- theme: 'light',
186
- toolbar: { position: 'bottom-right' }
187
- }
188
- }
189
- }
190
- }
191
- </script>
192
- ```
193
-
194
- The Vue 2 and Vue 3 package lines share the same user-facing capabilities and option semantics.
195
-
196
- ## React Integration
197
-
198
- The React package is an iframe adapter. It reuses the Vue 3 baseline viewer that is bundled by `@flyfish-group/file-viewer-web`.
199
-
200
- ```bash
201
- npm install @flyfish-group/file-viewer-react
202
- ```
203
-
204
- ```tsx
205
- import FileViewer from '@flyfish-group/file-viewer-react'
206
-
207
- export function Preview() {
208
- return (
209
- <div style={{ height: '100vh' }}>
210
- <FileViewer
211
- url="/files/demo.pdf"
212
- options={{
213
- theme: 'light',
214
- toolbar: { position: 'bottom-right' },
215
- watermark: { text: 'Internal Preview', opacity: 0.14 }
216
- }}
217
- onViewerEvent={(event) => {
218
- console.log(event.type, event.event, event.payload)
219
- }}
220
- />
221
- </div>
222
- )
223
- }
224
- ```
225
-
226
- By default, the iframe loads `/file-viewer/index.html`. If your static assets are deployed elsewhere, pass `viewerUrl`.
227
-
228
- ## Vanilla JavaScript Integration
229
-
230
- ```bash
231
- npm install @flyfish-group/file-viewer-web
232
- ```
233
-
234
- ```html
235
- <div id="viewer" style="height: 100vh"></div>
236
-
237
- <script type="module">
238
- import { mountViewerFrame } from '@flyfish-group/file-viewer-web'
239
-
240
- mountViewerFrame(document.getElementById('viewer'), {
241
- url: '/files/demo.pdf',
242
- options: {
243
- theme: 'light',
244
- toolbar: { position: 'bottom-right' },
245
- archive: { cache: true, workerTimeoutMs: 30000 }
246
- },
247
- onEvent(event) {
248
- console.log(event.type, event.event, event.payload)
249
- }
250
- })
251
- </script>
252
- ```
253
-
254
- The web package copies the static viewer into `public/file-viewer` during installation. If your package manager blocks install scripts, run:
255
-
256
- ```bash
257
- npx file-viewer-copy-assets ./public/file-viewer
258
- ```
259
-
260
- ## iframe Protocol
261
-
262
- If you cannot use npm helpers, deploy the static viewer and pass a file URL through query parameters:
263
-
264
- ```html
265
- <iframe
266
- src="/file-viewer/index.html?url=%2Ffiles%2Fdemo.pdf&options=%7B%22theme%22%3A%22light%22%2C%22toolbar%22%3A%7B%22position%22%3A%22bottom-right%22%7D%7D"
267
- style="width: 100%; height: 100vh; border: 0"
268
- ></iframe>
269
- ```
270
-
271
- For authenticated files, download the file in the host system and push a `Blob` to the iframe:
272
-
273
- ```ts
274
- const viewerUrl = '/file-viewer/index.html'
275
- const viewerOrigin = location.origin
276
- const filename = 'contract.pdf'
277
- const options = { theme: 'light', toolbar: { position: 'bottom-right' } }
278
- const frame = document.getElementById('viewer') as HTMLIFrameElement
279
-
280
- frame.src =
281
- `${viewerUrl}?name=${encodeURIComponent(filename)}` +
282
- `&from=${encodeURIComponent(location.origin)}` +
283
- `&options=${encodeURIComponent(JSON.stringify(options))}`
284
-
285
- frame.onload = async () => {
286
- const response = await fetch('/api/files/contract', { credentials: 'include' })
287
- const blob = await response.blob()
288
- frame.contentWindow?.postMessage(blob, viewerOrigin)
289
- }
290
- ```
291
-
292
- The viewer validates `event.origin === from` and only accepts `Blob` messages from the declared origin.
293
-
294
- ## Core Options
295
-
296
- | Option | Description |
297
- | --- | --- |
298
- | `theme` | `light`, `dark`, or `system`. Default is `system`. Use `light` when embedding in a fixed light UI. |
299
- | `toolbar` | `true`, `false`, or an object that controls download, print, HTML export, unified zoom controls, and toolbar position. |
300
- | `toolbar.zoom` | Shows or hides the built-in zoom group. The actual capability is provided by each renderer, so unsupported or interaction-sensitive formats are not force-scaled. |
301
- | `toolbar.position` | `auto`, `top`, or `bottom-right`. Default `auto` floats the operation bar at bottom right for PDF and keeps other formats at top. |
302
- | `watermark` | Text or image watermark configuration. Watermark participates in preview, print, and exported HTML. |
303
- | `archive.workerUrl` | Custom `libarchive.js` Worker URL for special private deployments. By default the viewer tries `vendor/libarchive/worker-bundle.js` under the current base and falls back to the bundled Worker automatically. |
304
- | `archive.wasmUrl` | Custom libarchive WASM URL used by the bundled Worker fallback. |
305
- | `archive.workerTimeoutMs` | Worker initialization, encryption check, and directory-read timeout. Defaults to 30000ms and then falls back to ZIP/TAR/GZIP compatibility mode when possible. |
306
- | `archive.cache` | Enables IndexedDB cache for extracted archive entries. |
307
- | `archive.maxArchiveSize` | Maximum archive size allowed for directory parsing. |
308
- | `archive.maxEntryPreviewSize` | Maximum extracted entry size allowed for online preview. |
309
- | `pdf.streaming` | PDF URL loading strategy. Same-origin streaming is enabled by default. |
310
- | `pdf.rangeChunkSize` | PDF.js Range request chunk size. |
311
- | `typst.compilerWasmUrl` | Custom Typst compiler WASM URL. |
312
- | `hooks` | Vue component lifecycle hooks for load and unload events. |
313
- | `beforeOperation` | Vue component guard before download, print, HTML export, or zoom actions. Return `false` to cancel. |
314
-
315
- React, vanilla JavaScript, and iframe integrations cannot serialize function hooks into query parameters. Use `onViewerEvent` or `onEvent` to receive lifecycle and operation events from the iframe.
316
-
317
- ## Printing, Exporting, and Watermarks
318
-
319
- - Download keeps the original file bytes. It does not write rendered output back into the source file.
320
- - Print opens a print-only document containing the rendered body and watermark, without the demo shell or host UI.
321
- - PDF print and HTML export use a dedicated adapter that renders complete pages rather than only the visible canvas.
322
- - Word print and HTML export preserve the white paper surface and page sizing while removing preview-only layout wrappers.
323
- - Spreadsheet, archive, email, EPUB, audio, video, and 3D pipelines hide unreliable print buttons when the full document cannot be printed consistently.
324
- - HTML export clones the current rendered output and converts canvas content where possible.
325
-
326
- ## Document Comparison
327
-
328
- The production demo includes a standalone comparison page:
329
-
330
- [https://viewer.flyfish.dev/compare.html](https://viewer.flyfish.dev/compare.html)
331
-
332
- It supports two-pane document preview, built-in samples, URL input, local upload, swapping panes, reset, and synchronized scrolling. The comparison page is intentionally separate from the main viewer entry so that the primary component API stays small and predictable.
333
-
334
- ## Private Deployment
335
-
336
- For npm-based iframe integrations, make sure your final static output contains:
337
-
338
- ```txt
339
- file-viewer/index.html
340
- file-viewer/assets/*
341
- file-viewer/vendor/libarchive/worker-bundle.js # optional unless you want a static Worker path
342
- file-viewer/vendor/libarchive/libarchive.wasm # keep next to worker-bundle.js when using archive.workerUrl
343
- ```
344
-
345
- The artifact repository also contains:
346
-
347
- | Path | Purpose |
348
- | --- | --- |
349
- | `dist/` | Minified library build artifacts |
350
- | `demo/` | Static production demo, including `index.html` and `compare.html` |
351
- | `adapter-demo/` | React and vanilla JavaScript integration demo |
352
- | `docs/` | Static documentation site output |
353
- | `example/` | Sample files used by the demo |
354
- | `artifacts/` | npm tarballs and packaged static build archives |
355
- | `README.md` | Default Chinese documentation |
356
- | `README.en.md` | English documentation |
357
- | `LICENSE` | Apache-2.0 license |
358
-
359
- ## Docker
360
-
361
- The project provides a static nginx runtime image and build scripts for `linux/amd64` and `linux/arm64`. A typical deployment can serve the demo and comparison page directly:
362
-
363
- ```bash
364
- docker run --rm -p 8080:80 flyfishdev/file-viewer:1.0.25
365
- ```
366
-
367
- Then open:
368
-
369
- ```txt
370
- http://localhost:8080/
371
- http://localhost:8080/compare.html
372
- ```
373
-
374
- If you build the image yourself, use the provided `Dockerfile` and keep the static viewer assets, examples, and vendor WASM files together.
375
-
376
- ## Public Artifacts vs Source Code
377
-
378
- This public repository is for artifact delivery. It contains minified build output, static demo sites, sample files, documentation output, and npm tarballs. It intentionally does not include the private source tree. The Gitee mirror is synchronized from a clean latest-artifact snapshot when needed, so domestic users can clone the full expanded artifact repository without inheriting oversized binary release history.
379
-
380
- If you need source code access, second development resources, or commercial customization, use the self-service source access portal:
381
-
382
- [https://dev.flyfish.group/shop](https://dev.flyfish.group/shop)
383
-
384
- The self-service source access price is 4.99. It is designed to make legitimate second development and commercial evaluation straightforward without mixing source delivery into the public artifact repository.
385
-
386
- ## License and Attribution
387
-
388
- Flyfish Viewer is distributed under the Apache-2.0 license. You may use the public artifacts according to that license.
389
-
390
- For second development or commercial use, please keep clear attribution to Flyfish Viewer and contribute useful fixes or compatibility improvements back whenever possible. This keeps the preview ecosystem healthier for everyone using the component in real business systems.
5
+ Documentation: [doc.flyfish-viewer.app](https://doc.flyfish-viewer.app/).