@l1yp/file-viewer 0.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 (373) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +134 -0
  3. package/dist/FileViewer.js +7 -0
  4. package/dist/FileViewer.vue.d.ts +37 -0
  5. package/dist/FileViewer.vue_vue_type_script_setup_true_lang.js +103 -0
  6. package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
  7. package/dist/components/AppxViewer.js +7 -0
  8. package/dist/components/AppxViewer.vue.d.ts +18 -0
  9. package/dist/components/AppxViewer.vue_vue_type_script_setup_true_lang.js +174 -0
  10. package/dist/components/ArchiveBrowser.js +7 -0
  11. package/dist/components/ArchiveBrowser.vue.d.ts +18 -0
  12. package/dist/components/ArchiveBrowser.vue_vue_type_script_setup_true_lang.js +279 -0
  13. package/dist/components/AudioViewer.js +7 -0
  14. package/dist/components/AudioViewer.vue.d.ts +21 -0
  15. package/dist/components/AudioViewer.vue_vue_type_script_setup_true_lang.js +201 -0
  16. package/dist/components/BinObjBrowser.js +7 -0
  17. package/dist/components/BinObjBrowser.vue.d.ts +19 -0
  18. package/dist/components/BinObjBrowser.vue_vue_type_script_setup_true_lang.js +141 -0
  19. package/dist/components/CertViewer.js +7 -0
  20. package/dist/components/CertViewer.vue.d.ts +17 -0
  21. package/dist/components/CertViewer.vue_vue_type_script_setup_true_lang.js +251 -0
  22. package/dist/components/ClassViewer.js +7 -0
  23. package/dist/components/ClassViewer.vue.d.ts +15 -0
  24. package/dist/components/ClassViewer.vue_vue_type_script_setup_true_lang.js +164 -0
  25. package/dist/components/CodeBlock.js +7 -0
  26. package/dist/components/CodeBlock.vue.d.ts +17 -0
  27. package/dist/components/CodeBlock.vue_vue_type_script_setup_true_lang.js +79 -0
  28. package/dist/components/CodeView.js +7 -0
  29. package/dist/components/CodeView.vue.d.ts +21 -0
  30. package/dist/components/CodeView.vue_vue_type_script_setup_true_lang.js +180 -0
  31. package/dist/components/CsvViewer.js +7 -0
  32. package/dist/components/CsvViewer.vue.d.ts +26 -0
  33. package/dist/components/CsvViewer.vue_vue_type_script_setup_true_lang.js +187 -0
  34. package/dist/components/DicomViewer.js +7 -0
  35. package/dist/components/DicomViewer.vue.d.ts +30 -0
  36. package/dist/components/DicomViewer.vue_vue_type_script_setup_true_lang.js +362 -0
  37. package/dist/components/DocxViewer.js +7 -0
  38. package/dist/components/DocxViewer.vue.d.ts +19 -0
  39. package/dist/components/DocxViewer.vue_vue_type_script_setup_true_lang.js +59 -0
  40. package/dist/components/DrawioViewer.js +7 -0
  41. package/dist/components/DrawioViewer.vue.d.ts +16 -0
  42. package/dist/components/DrawioViewer.vue_vue_type_script_setup_true_lang.js +38 -0
  43. package/dist/components/DxfViewer.js +7 -0
  44. package/dist/components/DxfViewer.vue.d.ts +14 -0
  45. package/dist/components/DxfViewer.vue_vue_type_script_setup_true_lang.js +239 -0
  46. package/dist/components/EbookViewer.js +7 -0
  47. package/dist/components/EbookViewer.vue.d.ts +22 -0
  48. package/dist/components/EbookViewer.vue_vue_type_script_setup_true_lang.js +170 -0
  49. package/dist/components/EmlViewer.js +7 -0
  50. package/dist/components/EmlViewer.vue.d.ts +21 -0
  51. package/dist/components/EmlViewer.vue_vue_type_script_setup_true_lang.js +193 -0
  52. package/dist/components/EplViewer.js +7 -0
  53. package/dist/components/EplViewer.vue.d.ts +19 -0
  54. package/dist/components/EplViewer.vue_vue_type_script_setup_true_lang.js +201 -0
  55. package/dist/components/FileViewerBody.js +7 -0
  56. package/dist/components/FileViewerBody.vue.d.ts +47 -0
  57. package/dist/components/FileViewerBody.vue_vue_type_script_setup_true_lang.js +599 -0
  58. package/dist/components/FileViewerPanel.js +7 -0
  59. package/dist/components/FileViewerPanel.vue.d.ts +3 -0
  60. package/dist/components/FileViewerPanel.vue_vue_type_script_setup_true_lang.js +207 -0
  61. package/dist/components/FontViewer.js +7 -0
  62. package/dist/components/FontViewer.vue.d.ts +17 -0
  63. package/dist/components/FontViewer.vue_vue_type_script_setup_true_lang.js +120 -0
  64. package/dist/components/FrontmatterCard.js +7 -0
  65. package/dist/components/FrontmatterCard.vue.d.ts +11 -0
  66. package/dist/components/FrontmatterCard.vue_vue_type_script_setup_true_lang.js +30 -0
  67. package/dist/components/GeoViewer.js +7 -0
  68. package/dist/components/GeoViewer.vue.d.ts +17 -0
  69. package/dist/components/GeoViewer.vue_vue_type_script_setup_true_lang.js +255 -0
  70. package/dist/components/HarViewer.js +7 -0
  71. package/dist/components/HarViewer.vue.d.ts +20 -0
  72. package/dist/components/HarViewer.vue_vue_type_script_setup_true_lang.js +322 -0
  73. package/dist/components/HexViewer.js +7 -0
  74. package/dist/components/HexViewer.vue.d.ts +22 -0
  75. package/dist/components/HexViewer.vue_vue_type_script_setup_true_lang.js +121 -0
  76. package/dist/components/HprofViewer.js +7 -0
  77. package/dist/components/HprofViewer.vue.d.ts +27 -0
  78. package/dist/components/HprofViewer.vue_vue_type_script_setup_true_lang.js +561 -0
  79. package/dist/components/ImageLightbox.js +7 -0
  80. package/dist/components/ImageLightbox.vue.d.ts +3 -0
  81. package/dist/components/ImageLightbox.vue_vue_type_script_setup_true_lang.js +86 -0
  82. package/dist/components/InlineText.d.ts +29 -0
  83. package/dist/components/InlineText.js +21 -0
  84. package/dist/components/JksViewer.js +7 -0
  85. package/dist/components/JksViewer.vue.d.ts +22 -0
  86. package/dist/components/JksViewer.vue_vue_type_script_setup_true_lang.js +353 -0
  87. package/dist/components/JsonlViewer.js +7 -0
  88. package/dist/components/JsonlViewer.vue.d.ts +15 -0
  89. package/dist/components/JsonlViewer.vue_vue_type_script_setup_true_lang.js +103 -0
  90. package/dist/components/LogViewer.js +7 -0
  91. package/dist/components/LogViewer.vue.d.ts +29 -0
  92. package/dist/components/LogViewer.vue_vue_type_script_setup_true_lang.js +670 -0
  93. package/dist/components/LrcViewer.js +7 -0
  94. package/dist/components/LrcViewer.vue.d.ts +17 -0
  95. package/dist/components/LrcViewer.vue_vue_type_script_setup_true_lang.js +106 -0
  96. package/dist/components/MarkdownTable.js +7 -0
  97. package/dist/components/MarkdownTable.vue.d.ts +19 -0
  98. package/dist/components/MarkdownTable.vue_vue_type_script_setup_true_lang.js +71 -0
  99. package/dist/components/MarkdownText.d.ts +30 -0
  100. package/dist/components/MarkdownText.js +21 -0
  101. package/dist/components/MhtViewer.js +7 -0
  102. package/dist/components/MhtViewer.vue.d.ts +22 -0
  103. package/dist/components/MhtViewer.vue_vue_type_script_setup_true_lang.js +112 -0
  104. package/dist/components/MindMapView.js +7 -0
  105. package/dist/components/MindMapView.vue.d.ts +23 -0
  106. package/dist/components/MindMapView.vue_vue_type_script_setup_true_lang.js +337 -0
  107. package/dist/components/MissingDependency.js +7 -0
  108. package/dist/components/MissingDependency.vue.d.ts +17 -0
  109. package/dist/components/MissingDependency.vue_vue_type_script_setup_true_lang.js +37 -0
  110. package/dist/components/ModelViewer.js +7 -0
  111. package/dist/components/ModelViewer.vue.d.ts +18 -0
  112. package/dist/components/ModelViewer.vue_vue_type_script_setup_true_lang.js +157 -0
  113. package/dist/components/MsiViewer.js +7 -0
  114. package/dist/components/MsiViewer.vue.d.ts +19 -0
  115. package/dist/components/MsiViewer.vue_vue_type_script_setup_true_lang.js +136 -0
  116. package/dist/components/NotebookViewer.js +7 -0
  117. package/dist/components/NotebookViewer.vue.d.ts +20 -0
  118. package/dist/components/NotebookViewer.vue_vue_type_script_setup_true_lang.js +125 -0
  119. package/dist/components/PdfViewer.js +7 -0
  120. package/dist/components/PdfViewer.vue.d.ts +19 -0
  121. package/dist/components/PdfViewer.vue_vue_type_script_setup_true_lang.js +114 -0
  122. package/dist/components/PptxViewer.js +7 -0
  123. package/dist/components/PptxViewer.vue.d.ts +20 -0
  124. package/dist/components/PptxViewer.vue_vue_type_script_setup_true_lang.js +73 -0
  125. package/dist/components/PsdViewer.js +7 -0
  126. package/dist/components/PsdViewer.vue.d.ts +15 -0
  127. package/dist/components/PsdViewer.vue_vue_type_script_setup_true_lang.js +218 -0
  128. package/dist/components/QmcAudioViewer.js +7 -0
  129. package/dist/components/QmcAudioViewer.vue.d.ts +18 -0
  130. package/dist/components/QmcAudioViewer.vue_vue_type_script_setup_true_lang.js +92 -0
  131. package/dist/components/RasterViewer.js +7 -0
  132. package/dist/components/RasterViewer.vue.d.ts +21 -0
  133. package/dist/components/RasterViewer.vue_vue_type_script_setup_true_lang.js +161 -0
  134. package/dist/components/RtfViewer.js +7 -0
  135. package/dist/components/RtfViewer.vue.d.ts +21 -0
  136. package/dist/components/RtfViewer.vue_vue_type_script_setup_true_lang.js +66 -0
  137. package/dist/components/SevenZipBrowser.js +7 -0
  138. package/dist/components/SevenZipBrowser.vue.d.ts +13 -0
  139. package/dist/components/SevenZipBrowser.vue_vue_type_script_setup_true_lang.js +366 -0
  140. package/dist/components/SqliteViewer.js +7 -0
  141. package/dist/components/SqliteViewer.vue.d.ts +18 -0
  142. package/dist/components/SqliteViewer.vue_vue_type_script_setup_true_lang.js +186 -0
  143. package/dist/components/SubtitleViewer.js +7 -0
  144. package/dist/components/SubtitleViewer.vue.d.ts +15 -0
  145. package/dist/components/SubtitleViewer.vue_vue_type_script_setup_true_lang.js +48 -0
  146. package/dist/components/XlsxChart.js +7 -0
  147. package/dist/components/XlsxChart.vue.d.ts +14 -0
  148. package/dist/components/XlsxChart.vue_vue_type_script_setup_true_lang.js +240 -0
  149. package/dist/components/XlsxViewer.js +7 -0
  150. package/dist/components/XlsxViewer.vue.d.ts +22 -0
  151. package/dist/components/XlsxViewer.vue_vue_type_script_setup_true_lang.js +814 -0
  152. package/dist/components/XmindViewer.js +7 -0
  153. package/dist/components/XmindViewer.vue.d.ts +13 -0
  154. package/dist/components/XmindViewer.vue_vue_type_script_setup_true_lang.js +48 -0
  155. package/dist/components/ZipBrowser.js +7 -0
  156. package/dist/components/ZipBrowser.vue.d.ts +14 -0
  157. package/dist/components/ZipBrowser.vue_vue_type_script_setup_true_lang.js +326 -0
  158. package/dist/components/ZoomImage.js +7 -0
  159. package/dist/components/ZoomImage.vue.d.ts +29 -0
  160. package/dist/components/ZoomImage.vue_vue_type_script_setup_true_lang.js +147 -0
  161. package/dist/components/epl/EplCodeBlock.js +7 -0
  162. package/dist/components/epl/EplCodeBlock.vue.d.ts +15 -0
  163. package/dist/components/epl/EplCodeBlock.vue_vue_type_script_setup_true_lang.js +72 -0
  164. package/dist/components/epl/EplDoc.js +7 -0
  165. package/dist/components/epl/EplDoc.vue.d.ts +19 -0
  166. package/dist/components/epl/EplDoc.vue_vue_type_script_setup_true_lang.js +327 -0
  167. package/dist/components/epl/EplMethod.js +7 -0
  168. package/dist/components/epl/EplMethod.vue.d.ts +14 -0
  169. package/dist/components/epl/EplMethod.vue_vue_type_script_setup_true_lang.js +100 -0
  170. package/dist/components/epl/EplResource.js +7 -0
  171. package/dist/components/epl/EplResource.vue.d.ts +15 -0
  172. package/dist/components/epl/EplResource.vue_vue_type_script_setup_true_lang.js +204 -0
  173. package/dist/components/epl/EplTree.js +7 -0
  174. package/dist/components/epl/EplTree.vue.d.ts +27 -0
  175. package/dist/components/epl/EplTree.vue_vue_type_script_setup_true_lang.js +123 -0
  176. package/dist/components/epl/EplVarTable.js +7 -0
  177. package/dist/components/epl/EplVarTable.vue.d.ts +21 -0
  178. package/dist/components/epl/EplVarTable.vue_vue_type_script_setup_true_lang.js +60 -0
  179. package/dist/components/epl/docTypes.d.ts +12 -0
  180. package/dist/components/epl/numbering.d.ts +21 -0
  181. package/dist/components/epl/numbering.js +14 -0
  182. package/dist/components/icons/Icon.js +7 -0
  183. package/dist/components/icons/Icon.vue.d.ts +14 -0
  184. package/dist/components/icons/Icon.vue_vue_type_script_setup_true_lang.js +33 -0
  185. package/dist/components/icons/iconPaths.d.ts +60 -0
  186. package/dist/components/icons/iconPaths.js +54 -0
  187. package/dist/components/optionalViewer.d.ts +14 -0
  188. package/dist/components/optionalViewer.js +37 -0
  189. package/dist/components/ui/ClampBlock.d.ts +82 -0
  190. package/dist/components/ui/ClampBlock.js +63 -0
  191. package/dist/composables/useFileViewer.d.ts +428 -0
  192. package/dist/composables/useFileViewer.js +27 -0
  193. package/dist/composables/useLightbox.d.ts +33 -0
  194. package/dist/composables/useLightbox.js +17 -0
  195. package/dist/composables/useLogRules.d.ts +47 -0
  196. package/dist/composables/useLogRules.js +74 -0
  197. package/dist/index.d.ts +44 -0
  198. package/dist/index.js +30 -0
  199. package/dist/lib/aes.d.ts +25 -0
  200. package/dist/lib/aes.js +99 -0
  201. package/dist/lib/appx.d.ts +66 -0
  202. package/dist/lib/appx.js +112 -0
  203. package/dist/lib/archive.d.ts +29 -0
  204. package/dist/lib/asn1.d.ts +47 -0
  205. package/dist/lib/asn1.js +122 -0
  206. package/dist/lib/binobj.d.ts +69 -0
  207. package/dist/lib/binobj.js +430 -0
  208. package/dist/lib/brotli.d.ts +14 -0
  209. package/dist/lib/brotli.js +16 -0
  210. package/dist/lib/bzip2.d.ts +14 -0
  211. package/dist/lib/bzip2.js +161 -0
  212. package/dist/lib/classfile.d.ts +72 -0
  213. package/dist/lib/classfile.js +210 -0
  214. package/dist/lib/codePreview.d.ts +22 -0
  215. package/dist/lib/codePreview.js +27 -0
  216. package/dist/lib/codefold.d.ts +14 -0
  217. package/dist/lib/codefold.js +30 -0
  218. package/dist/lib/codeformat.d.ts +21 -0
  219. package/dist/lib/codeformat.js +130 -0
  220. package/dist/lib/csv.d.ts +19 -0
  221. package/dist/lib/csv.js +74 -0
  222. package/dist/lib/des.d.ts +17 -0
  223. package/dist/lib/des.js +928 -0
  224. package/dist/lib/diagram.d.ts +5 -0
  225. package/dist/lib/diagram.js +479 -0
  226. package/dist/lib/dicom.d.ts +69 -0
  227. package/dist/lib/dicom.js +442 -0
  228. package/dist/lib/dicomCodecs.d.ts +28 -0
  229. package/dist/lib/dicomCodecs.js +156 -0
  230. package/dist/lib/dicomRender.d.ts +46 -0
  231. package/dist/lib/dicomRender.js +114 -0
  232. package/dist/lib/dxf.d.ts +86 -0
  233. package/dist/lib/dxf.js +399 -0
  234. package/dist/lib/eml.d.ts +40 -0
  235. package/dist/lib/eml.js +46 -0
  236. package/dist/lib/encoding.d.ts +28 -0
  237. package/dist/lib/encoding.js +44 -0
  238. package/dist/lib/epl/code/ast.d.ts +150 -0
  239. package/dist/lib/epl/code/codeDataParser.d.ts +3 -0
  240. package/dist/lib/epl/code/codeDataParser.js +330 -0
  241. package/dist/lib/epl/code/codeLines.d.ts +20 -0
  242. package/dist/lib/epl/code/codeLines.js +191 -0
  243. package/dist/lib/epl/code/structures.d.ts +86 -0
  244. package/dist/lib/epl/code/textCode.d.ts +29 -0
  245. package/dist/lib/epl/code/textCode.js +150 -0
  246. package/dist/lib/epl/code/variable.d.ts +25 -0
  247. package/dist/lib/epl/eplDocument.d.ts +21 -0
  248. package/dist/lib/epl/eplDocument.js +36 -0
  249. package/dist/lib/epl/imageList.d.ts +28 -0
  250. package/dist/lib/epl/imageList.js +66 -0
  251. package/dist/lib/epl/index.d.ts +53 -0
  252. package/dist/lib/epl/index.js +45 -0
  253. package/dist/lib/epl/io/binaryReader.d.ts +56 -0
  254. package/dist/lib/epl/io/binaryReader.js +119 -0
  255. package/dist/lib/epl/io/encoding.d.ts +16 -0
  256. package/dist/lib/epl/io/encoding.js +27 -0
  257. package/dist/lib/epl/model/eplSystemId.d.ts +64 -0
  258. package/dist/lib/epl/model/eplSystemId.js +16 -0
  259. package/dist/lib/epl/model/section.d.ts +46 -0
  260. package/dist/lib/epl/names/eplLibData.js +39 -0
  261. package/dist/lib/epl/names/idToNameMap.d.ts +33 -0
  262. package/dist/lib/epl/names/idToNameMap.js +130 -0
  263. package/dist/lib/epl/names/libNameProvider.d.ts +15 -0
  264. package/dist/lib/epl/names/libNameProvider.js +18 -0
  265. package/dist/lib/epl/program.d.ts +120 -0
  266. package/dist/lib/epl/program.js +134 -0
  267. package/dist/lib/epl/projectFileReader.d.ts +23 -0
  268. package/dist/lib/epl/projectFileReader.js +65 -0
  269. package/dist/lib/epl/sections/code.d.ts +20 -0
  270. package/dist/lib/epl/sections/esystemInfo.d.ts +14 -0
  271. package/dist/lib/epl/sections/losable.d.ts +11 -0
  272. package/dist/lib/epl/sections/projectConfig.d.ts +23 -0
  273. package/dist/lib/epl/sections/resource.d.ts +57 -0
  274. package/dist/lib/fb2.d.ts +14 -0
  275. package/dist/lib/fb2.js +62 -0
  276. package/dist/lib/fileType.d.ts +315 -0
  277. package/dist/lib/fileType.js +800 -0
  278. package/dist/lib/fonts.d.ts +8 -0
  279. package/dist/lib/fonts.js +4 -0
  280. package/dist/lib/format.d.ts +16 -0
  281. package/dist/lib/format.js +38 -0
  282. package/dist/lib/frontmatter.d.ts +13 -0
  283. package/dist/lib/frontmatter.js +23 -0
  284. package/dist/lib/geo.d.ts +30 -0
  285. package/dist/lib/geo.js +235 -0
  286. package/dist/lib/har.d.ts +171 -0
  287. package/dist/lib/har.js +397 -0
  288. package/dist/lib/highlight.d.ts +18 -0
  289. package/dist/lib/highlight.js +34 -0
  290. package/dist/lib/highlightLangs.d.ts +15 -0
  291. package/dist/lib/highlightLangs.js +93 -0
  292. package/dist/lib/hprof.d.ts +211 -0
  293. package/dist/lib/hprof.js +709 -0
  294. package/dist/lib/ipynb.d.ts +48 -0
  295. package/dist/lib/ipynb.js +130 -0
  296. package/dist/lib/jks.d.ts +86 -0
  297. package/dist/lib/jks.js +167 -0
  298. package/dist/lib/jsonl.d.ts +29 -0
  299. package/dist/lib/jsonl.js +24 -0
  300. package/dist/lib/lrc.d.ts +32 -0
  301. package/dist/lib/lrc.js +84 -0
  302. package/dist/lib/lzma.d.ts +70 -0
  303. package/dist/lib/lzma.js +204 -0
  304. package/dist/lib/markdown/blocks.d.ts +9 -0
  305. package/dist/lib/markdown/blocks.js +221 -0
  306. package/dist/lib/markdown/index.d.ts +3 -0
  307. package/dist/lib/markdown/inline.d.ts +33 -0
  308. package/dist/lib/markdown/inline.js +84 -0
  309. package/dist/lib/markdown/math.d.ts +5 -0
  310. package/dist/lib/markdown/math.js +25 -0
  311. package/dist/lib/markdown/segmentize.d.ts +11 -0
  312. package/dist/lib/markdown/segmentize.js +28 -0
  313. package/dist/lib/markdown/styles.d.ts +26 -0
  314. package/dist/lib/markdown/styles.js +135 -0
  315. package/dist/lib/mht.d.ts +51 -0
  316. package/dist/lib/mht.js +122 -0
  317. package/dist/lib/midi.d.ts +28 -0
  318. package/dist/lib/midi.js +84 -0
  319. package/dist/lib/mime.d.ts +82 -0
  320. package/dist/lib/mime.js +151 -0
  321. package/dist/lib/mindmap.d.ts +51 -0
  322. package/dist/lib/mindmap.js +113 -0
  323. package/dist/lib/mobi.d.ts +15 -0
  324. package/dist/lib/mobi.js +68 -0
  325. package/dist/lib/msi.d.ts +50 -0
  326. package/dist/lib/msi.js +332 -0
  327. package/dist/lib/optionalDep.d.ts +26 -0
  328. package/dist/lib/optionalDep.js +20 -0
  329. package/dist/lib/pkcs12.d.ts +56 -0
  330. package/dist/lib/pkcs12.js +356 -0
  331. package/dist/lib/qmc.d.ts +50 -0
  332. package/dist/lib/qmc.js +213 -0
  333. package/dist/lib/rar.d.ts +16 -0
  334. package/dist/lib/rar.js +40 -0
  335. package/dist/lib/rawPreview.d.ts +12 -0
  336. package/dist/lib/rawPreview.js +54 -0
  337. package/dist/lib/rc2.d.ts +12 -0
  338. package/dist/lib/rc2.js +298 -0
  339. package/dist/lib/resolveInput.d.ts +22 -0
  340. package/dist/lib/resolveInput.js +55 -0
  341. package/dist/lib/rtf.d.ts +53 -0
  342. package/dist/lib/rtf.js +413 -0
  343. package/dist/lib/sevenZip.d.ts +82 -0
  344. package/dist/lib/sevenZip.js +395 -0
  345. package/dist/lib/sha1.d.ts +24 -0
  346. package/dist/lib/sha1.js +53 -0
  347. package/dist/lib/sha256.d.ts +21 -0
  348. package/dist/lib/sha256.js +119 -0
  349. package/dist/lib/speechAudio.d.ts +36 -0
  350. package/dist/lib/speechAudio.js +85 -0
  351. package/dist/lib/sqlite.d.ts +38 -0
  352. package/dist/lib/sqlite.js +104 -0
  353. package/dist/lib/subtitle.d.ts +26 -0
  354. package/dist/lib/subtitle.js +99 -0
  355. package/dist/lib/tarball.d.ts +20 -0
  356. package/dist/lib/tarball.js +248 -0
  357. package/dist/lib/viewerFormats.d.ts +35 -0
  358. package/dist/lib/viewerFormats.js +83 -0
  359. package/dist/lib/viewerKind.d.ts +36 -0
  360. package/dist/lib/viewerKind.js +233 -0
  361. package/dist/lib/x509.d.ts +68 -0
  362. package/dist/lib/x509.js +267 -0
  363. package/dist/lib/xlsx.d.ts +55 -0
  364. package/dist/lib/xlsx.js +321 -0
  365. package/dist/lib/xlsxCharts.d.ts +34 -0
  366. package/dist/lib/xlsxCharts.js +152 -0
  367. package/dist/lib/xmind.d.ts +6 -0
  368. package/dist/lib/xmind.js +124 -0
  369. package/dist/lib/zip.d.ts +56 -0
  370. package/dist/lib/zip.js +169 -0
  371. package/dist/style.css +2 -0
  372. package/dist/types.d.ts +42 -0
  373. package/package.json +128 -0
@@ -0,0 +1,136 @@
1
+ import { formatBytes as e } from "../lib/format.js";
2
+ import t from "./icons/Icon.js";
3
+ import { NotMsiError as n, parseMsi as r } from "../lib/msi.js";
4
+ import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, normalizeClass as f, onBeforeUnmount as p, onMounted as m, openBlock as h, ref as g, renderList as _, toDisplayString as v, unref as y, watch as b } from "vue";
5
+ //#region src/components/MsiViewer.vue?vue&type=script&setup=true&lang.ts
6
+ var ee = { class: "msi" }, te = {
7
+ key: 0,
8
+ class: "msi__confirm"
9
+ }, ne = ["title"], x = { class: "msi__confirm-sub" }, S = {
10
+ key: 1,
11
+ class: "msi__msg"
12
+ }, re = {
13
+ key: 2,
14
+ class: "msi__msg msi__msg--error"
15
+ }, ie = { class: "msi__summary" }, ae = { key: 0 }, C = { key: 1 }, w = {
16
+ key: 0,
17
+ class: "msi__card"
18
+ }, T = { class: "msi__dl" }, E = { class: "msi__dt" }, D = { class: "msi__dd" }, O = ["title", "onClick"], k = {
19
+ key: 0,
20
+ class: "msi__copied"
21
+ }, A = {
22
+ key: 1,
23
+ class: "msi__card"
24
+ }, j = { class: "msi__dl" }, M = { class: "msi__dt" }, N = { class: "msi__dd msi__dd--plain" }, P = {
25
+ key: 2,
26
+ class: "msi__section"
27
+ }, F = {
28
+ key: 0,
29
+ class: "msi__props"
30
+ }, I = ["title", "onClick"], L = { class: "msi__pname" }, R = { class: "msi__pval" }, z = {
31
+ key: 3,
32
+ class: "msi__section"
33
+ }, B = {
34
+ key: 0,
35
+ class: "msi__tables"
36
+ }, V = 8 * 1024 * 1024, H = /*@__PURE__*/ d({
37
+ __name: "MsiViewer",
38
+ props: {
39
+ url: {},
40
+ name: {},
41
+ size: {}
42
+ },
43
+ setup(d) {
44
+ let H = d, U = g("loading"), W = g(""), G = g(null), K = g(!1), q = g(!1);
45
+ function J() {
46
+ G.value = null, K.value = !1, q.value = !1, W.value = "", H.size != null && H.size <= V ? Y() : U.value = "confirm";
47
+ }
48
+ async function Y() {
49
+ U.value = "loading", W.value = "";
50
+ try {
51
+ let e = await fetch(H.url);
52
+ if (!e.ok) throw Error(`HTTP ${e.status}`);
53
+ G.value = r(await e.arrayBuffer()), U.value = "ready";
54
+ } catch (e) {
55
+ W.value = e instanceof n || e instanceof Error ? e.message : String(e), U.value = "error";
56
+ }
57
+ }
58
+ let X = a(() => {
59
+ let e = G.value;
60
+ if (!e) return [];
61
+ let t = [], n = (e, n) => {
62
+ n && t.push({
63
+ label: e,
64
+ value: n
65
+ });
66
+ };
67
+ return n("产品", e.productName), n("版本", e.productVersion), n("厂商", e.manufacturer), n("语言", e.language), n("产品码", e.productCode), n("升级码", e.upgradeCode), t;
68
+ }), Z = g(""), Q;
69
+ async function $(e) {
70
+ try {
71
+ await navigator.clipboard?.writeText(e);
72
+ } catch {}
73
+ Z.value = e, clearTimeout(Q), Q = setTimeout(() => Z.value = "", 1200);
74
+ }
75
+ return m(J), b(() => H.url, J), p(() => clearTimeout(Q)), (n, r) => (h(), s("div", ee, [U.value === "confirm" ? (h(), s("div", te, [
76
+ u(t, {
77
+ name: "archive",
78
+ size: 32
79
+ }),
80
+ c("p", {
81
+ class: "msi__confirm-title",
82
+ title: d.name
83
+ }, v(d.name), 9, ne),
84
+ c("p", x, v(d.size == null ? "文件大小未知" : `文件较大(${y(e)(d.size)})`) + ",解析需将整个文件下载到浏览器。 ", 1),
85
+ c("button", {
86
+ type: "button",
87
+ class: "msi__btn",
88
+ onClick: Y
89
+ }, "加载并解析安装包")
90
+ ])) : U.value === "loading" ? (h(), s("p", S, "正在解析安装包…")) : U.value === "error" ? (h(), s("div", re, [c("p", null, v(W.value), 1), c("button", {
91
+ type: "button",
92
+ class: "msi__retry",
93
+ onClick: Y
94
+ }, "重试")])) : U.value === "ready" && G.value ? (h(), s(i, { key: 3 }, [
95
+ c("div", ie, [
96
+ r[2] ||= c("span", { class: "msi__fmt" }, "MSI", -1),
97
+ G.value.productVersion ? (h(), s("span", ae, "v" + v(G.value.productVersion), 1)) : o("", !0),
98
+ G.value.language ? (h(), s("span", C, v(G.value.language), 1)) : o("", !0),
99
+ c("span", null, v(G.value.properties.length) + " 个属性", 1),
100
+ c("span", null, v(G.value.tables.length) + " 张表", 1)
101
+ ]),
102
+ X.value.length ? (h(), s("div", w, [r[3] ||= c("h3", { class: "msi__h" }, "产品信息", -1), c("dl", T, [(h(!0), s(i, null, _(X.value, (e, t) => (h(), s(i, { key: t }, [c("dt", E, v(e.label), 1), c("dd", D, [c("button", {
103
+ type: "button",
104
+ class: "msi__copyable",
105
+ title: `点击复制:${e.value}`,
106
+ onClick: (t) => $(e.value)
107
+ }, [c("span", null, v(e.value), 1), Z.value === e.value ? (h(), s("span", k, "已复制")) : o("", !0)], 8, O)])], 64))), 128))])])) : o("", !0),
108
+ G.value.summary.length ? (h(), s("div", A, [r[4] ||= c("h3", { class: "msi__h" }, "摘要信息", -1), c("dl", j, [(h(!0), s(i, null, _(G.value.summary, (e, t) => (h(), s(i, { key: t }, [c("dt", M, v(e.label), 1), c("dd", N, v(e.value), 1)], 64))), 128))])])) : o("", !0),
109
+ G.value.properties.length ? (h(), s("div", P, [c("button", {
110
+ type: "button",
111
+ class: "msi__toggle",
112
+ onClick: r[0] ||= (e) => K.value = !K.value
113
+ }, [c("span", { class: f(["msi__caret", { "msi__caret--open": K.value }]) }, "▶", 2), l(" 全部属性(" + v(G.value.properties.length) + ") ", 1)]), K.value ? (h(), s("div", F, [(h(!0), s(i, null, _(G.value.properties, (e, t) => (h(), s("button", {
114
+ key: t,
115
+ type: "button",
116
+ class: "msi__prow",
117
+ title: `点击复制值:${e.value}`,
118
+ onClick: (t) => $(e.value)
119
+ }, [c("span", L, v(e.name), 1), c("span", R, v(Z.value === e.value ? "已复制" : e.value), 1)], 8, I))), 128))])) : o("", !0)])) : o("", !0),
120
+ G.value.tables.length ? (h(), s("div", z, [c("button", {
121
+ type: "button",
122
+ class: "msi__toggle",
123
+ onClick: r[1] ||= (e) => q.value = !q.value
124
+ }, [c("span", { class: f(["msi__caret", { "msi__caret--open": q.value }]) }, "▶", 2), l(" 数据库表(" + v(G.value.tables.length) + ") ", 1)]), q.value ? (h(), s("div", B, [(h(!0), s(i, null, _(G.value.tables, (e) => (h(), s("span", {
125
+ key: e,
126
+ class: "msi__chip"
127
+ }, v(e), 1))), 128))])) : o("", !0)])) : o("", !0),
128
+ (h(!0), s(i, null, _(G.value.notes, (e, t) => (h(), s("p", {
129
+ key: t,
130
+ class: "msi__note"
131
+ }, v(e), 1))), 128))
132
+ ], 64)) : o("", !0)]));
133
+ }
134
+ });
135
+ //#endregion
136
+ export { H as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./NotebookViewer.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/NotebookViewer.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-3419a6e8"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Side-viewer Jupyter Notebook (.ipynb) renderer. Fetches the notebook bytes from the download URL and parses
3
+ * the JSON in-browser (see lib/ipynb.ts), then walks the cells: markdown cells reuse the app's markdown engine,
4
+ * code cells reuse highlight.js, and each output is shown by its best-fit type (stream / text / image / rich
5
+ * HTML / error). Mirrors the other byte-fetching viewers (DICOM/DOCX/…): a real download URL in, a self-owned
6
+ * fetch + render.
7
+ *
8
+ * Safety: a cell's rich `text/html` output is hostile markup (it comes from arbitrary kernels), so it renders
9
+ * the SAME way the panel's HTML preview does — in a fully sandboxed iframe (opaque origin, no `allow-scripts`)
10
+ * whose markup carries an injected `script-src 'none'` CSP, so NO upstream script runs. (Interactive widgets
11
+ * like Plotly therefore won't execute — download the notebook to run it; static tables/plots render fine.)
12
+ */
13
+ type __VLS_Props = {
14
+ url?: string;
15
+ name: string;
16
+ size?: number;
17
+ };
18
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
@@ -0,0 +1,125 @@
1
+ import { formatBytes as e } from "../lib/format.js";
2
+ import { highlightCode as t } from "../lib/highlight.js";
3
+ import n from "./MarkdownText.js";
4
+ import { parseNotebook as r } from "../lib/ipynb.js";
5
+ import { Fragment as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, normalizeClass as u, openBlock as d, ref as f, renderList as p, toDisplayString as m, unref as h, watch as g } from "vue";
6
+ //#region src/components/NotebookViewer.vue?vue&type=script&setup=true&lang.ts
7
+ var _ = { class: "nb" }, v = {
8
+ key: 0,
9
+ class: "nb__msg"
10
+ }, y = {
11
+ key: 1,
12
+ class: "nb__msg nb__gate"
13
+ }, b = {
14
+ key: 2,
15
+ class: "nb__msg nb__msg--error"
16
+ }, x = {
17
+ key: 3,
18
+ class: "nb__scroll"
19
+ }, S = {
20
+ key: 0,
21
+ class: "nb__md"
22
+ }, C = {
23
+ key: 1,
24
+ class: "nb__raw"
25
+ }, w = {
26
+ key: 2,
27
+ class: "nb__code"
28
+ }, T = { class: "nb__in" }, E = { class: "nb__prompt" }, D = { class: "nb__src" }, O = ["innerHTML"], k = {
29
+ key: 0,
30
+ class: "nb__stream"
31
+ }, A = {
32
+ key: 1,
33
+ class: "nb__text"
34
+ }, j = {
35
+ key: 2,
36
+ class: "nb__errtext"
37
+ }, M = {
38
+ key: 3,
39
+ class: "nb__md nb__md--out"
40
+ }, N = ["src"], P = ["srcdoc"], F = {
41
+ key: 0,
42
+ class: "nb__msg"
43
+ }, I = 20 * 1024 * 1024, L = "<meta http-equiv=\"Content-Security-Policy\" content=\"script-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'\">", R = /*@__PURE__*/ l({
44
+ __name: "NotebookViewer",
45
+ props: {
46
+ url: {},
47
+ name: {},
48
+ size: {}
49
+ },
50
+ setup(l) {
51
+ let R = l, z = f("loading"), B = f(""), V = f([]), H = f("python");
52
+ function U(e) {
53
+ return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
54
+ }
55
+ function W(e) {
56
+ return `<!doctype html><html><head><meta charset="utf-8">${L}<style>body{margin:0;padding:8px;font:13px system-ui,-apple-system,sans-serif;color:#222}table{border-collapse:collapse}th,td{border:1px solid #ddd;padding:4px 8px}</style></head><body>${e}</body></html>`;
57
+ }
58
+ function G(e) {
59
+ try {
60
+ return t(e, H.value);
61
+ } catch {
62
+ return U(e);
63
+ }
64
+ }
65
+ async function K() {
66
+ if (R.url) {
67
+ z.value = "loading", B.value = "";
68
+ try {
69
+ let e = await fetch(R.url);
70
+ if (!e.ok) throw Error(`HTTP ${e.status}`);
71
+ let t = r(await e.text());
72
+ V.value = t.cells, H.value = t.language, z.value = "ready";
73
+ } catch (e) {
74
+ B.value = e instanceof Error ? e.message : String(e), z.value = "error";
75
+ }
76
+ }
77
+ }
78
+ function q() {
79
+ if (R.size && R.size > I) {
80
+ z.value = "gate";
81
+ return;
82
+ }
83
+ K();
84
+ }
85
+ return g(() => R.url, q, { immediate: !0 }), (t, r) => (d(), o("div", _, [z.value === "loading" ? (d(), o("p", v, "正在解析 Notebook…")) : z.value === "gate" ? (d(), o("div", y, [s("p", null, "该 Notebook 较大(" + m(h(e)(R.size)) + "),将在浏览器内解析。是否继续?", 1), s("button", {
86
+ type: "button",
87
+ class: "nb__btn",
88
+ onClick: K
89
+ }, "解析并预览")])) : z.value === "error" ? (d(), o("div", b, [s("p", null, "解析失败:" + m(B.value), 1), s("button", {
90
+ type: "button",
91
+ class: "nb__btn",
92
+ onClick: K
93
+ }, "重试")])) : (d(), o("div", x, [(d(!0), o(i, null, p(V.value, (e, t) => (d(), o("div", {
94
+ key: t,
95
+ class: "nb__cell"
96
+ }, [e.type === "markdown" ? (d(), o("div", S, [c(h(n), {
97
+ text: e.source,
98
+ kp: "nb"
99
+ }, null, 8, ["text"])])) : e.type === "raw" ? (d(), o("pre", C, m(e.source), 1)) : (d(), o("div", w, [s("div", T, [s("span", E, "[" + m(e.executionCount ?? " ") + "]", 1), s("pre", D, [s("code", {
100
+ class: "hljs",
101
+ innerHTML: G(e.source)
102
+ }, null, 8, O)])]), (d(!0), o(i, null, p(e.outputs, (e, r) => (d(), o("div", {
103
+ key: r,
104
+ class: u(["nb__out", { "nb__out--err": e.kind === "error" || e.kind === "stream" && e.isError }])
105
+ }, [e.kind === "stream" ? (d(), o("pre", k, m(e.text), 1)) : e.kind === "text" || e.kind === "json" ? (d(), o("pre", A, m(e.text), 1)) : e.kind === "error" ? (d(), o("pre", j, m(e.text), 1)) : e.kind === "markdown" ? (d(), o("div", M, [c(h(n), {
106
+ text: e.text,
107
+ kp: `nbo-${t}-${r}`
108
+ }, null, 8, ["text", "kp"])])) : e.kind === "image" ? (d(), o("img", {
109
+ key: 4,
110
+ class: "nb__img",
111
+ src: e.src,
112
+ alt: "输出图像"
113
+ }, null, 8, N)) : e.kind === "html" ? (d(), o("iframe", {
114
+ key: 5,
115
+ class: "nb__html",
116
+ srcdoc: W(e.html),
117
+ title: "Notebook 富文本输出",
118
+ sandbox: "",
119
+ loading: "lazy",
120
+ referrerpolicy: "no-referrer"
121
+ }, null, 8, P)) : a("", !0)], 2))), 128))]))]))), 128)), V.value.length ? a("", !0) : (d(), o("p", F, "(空 Notebook)"))]))]));
122
+ }
123
+ });
124
+ //#endregion
125
+ export { R as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./PdfViewer.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/PdfViewer.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-2a30ef87"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Side-viewer PDF (`.pdf`) renderer. Fetches the document bytes from the download URL and rasterizes each
3
+ * page to a <canvas> entirely in-browser via pdfjs-dist (https://github.com/mozilla/pdf.js) — a vertically
4
+ * scrollable list of pages (white sheets on a neutral "desk", like the docx/pptx viewers). No CDN / network
5
+ * beyond the file fetch: pdfjs bundles its own worker, fetched lazily as a same-origin asset (see above).
6
+ *
7
+ * Two entry shapes mirror the other viewers (docx/xlsx/pptx/zip): a real download URL for a held attachment,
8
+ * or a blob URL minted by the archive browsers from already-extracted bytes. Pages re-rasterize when the pane
9
+ * is resized (debounced) so text stays crisp at the new width.
10
+ */
11
+ type __VLS_Props = {
12
+ /** Download/blob URL of the .pdf bytes. */
13
+ url?: string;
14
+ name: string;
15
+ size?: number;
16
+ };
17
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,114 @@
1
+ import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, defineComponent as r, onBeforeUnmount as i, onMounted as a, openBlock as o, ref as s, toDisplayString as c, watch as l } from "vue";
2
+ import * as u from "pdfjs-dist";
3
+ import d from "pdfjs-dist/build/pdf.worker.min.mjs?url";
4
+ //#region src/components/PdfViewer.vue?vue&type=script&setup=true&lang.ts
5
+ var f = { class: "pf" }, p = {
6
+ key: 0,
7
+ class: "pf__overlay"
8
+ }, m = {
9
+ key: 1,
10
+ class: "pf__overlay"
11
+ }, h = { class: "pf__msg pf__msg--error" }, g = 2, _ = /*@__PURE__*/ r({
12
+ __name: "PdfViewer",
13
+ props: {
14
+ url: {},
15
+ name: {},
16
+ size: {}
17
+ },
18
+ setup(r) {
19
+ u.GlobalWorkerOptions.workerSrc = d;
20
+ let _ = r, v = s("loading"), y = s(""), b = s(0), x = s(null), S = null, C = [], w = 0;
21
+ function T() {
22
+ for (let e of C) try {
23
+ e.cancel();
24
+ } catch {}
25
+ C = [];
26
+ }
27
+ function E() {
28
+ if (T(), S) {
29
+ try {
30
+ S.destroy();
31
+ } catch {}
32
+ S = null;
33
+ }
34
+ }
35
+ async function D() {
36
+ let e = x.value, t = S;
37
+ if (!e || !t) return;
38
+ let n = ++w;
39
+ T(), e.innerHTML = "";
40
+ let r = getComputedStyle(e), i = parseFloat(r.paddingLeft) + parseFloat(r.paddingRight), a = Math.max(120, e.clientWidth - i), o = Math.min(typeof window < "u" && window.devicePixelRatio || 1, g);
41
+ for (let r = 1; r <= t.numPages; r++) {
42
+ let i;
43
+ try {
44
+ i = await t.getPage(r);
45
+ } catch {
46
+ if (n !== w) return;
47
+ continue;
48
+ }
49
+ if (n !== w) return;
50
+ let s = i.getViewport({ scale: 1 }), c = a / s.width, l = i.getViewport({ scale: c * o }), u = document.createElement("canvas");
51
+ if (u.className = "pf__page", u.width = Math.ceil(l.width), u.height = Math.ceil(l.height), u.style.width = `${Math.round(a)}px`, u.style.height = `${Math.round(a * (s.height / s.width))}px`, !u.getContext("2d")) continue;
52
+ e.appendChild(u);
53
+ let d = i.render({
54
+ canvas: u,
55
+ viewport: l
56
+ });
57
+ C.push(d);
58
+ try {
59
+ await d.promise;
60
+ } catch {
61
+ if (n !== w) return;
62
+ }
63
+ if (n !== w) return;
64
+ }
65
+ }
66
+ async function O() {
67
+ let e = x.value;
68
+ if (!_.url || !e) return;
69
+ v.value = "loading", y.value = "", E(), e.innerHTML = "";
70
+ let t = _.url;
71
+ try {
72
+ let n = await fetch(t);
73
+ if (!n.ok) throw Error(`HTTP ${n.status}`);
74
+ let r = await n.arrayBuffer();
75
+ if (_.url !== t || x.value !== e) return;
76
+ let i = await u.getDocument({ data: new Uint8Array(r) }).promise;
77
+ if (_.url !== t || x.value !== e) {
78
+ try {
79
+ i.destroy();
80
+ } catch {}
81
+ return;
82
+ }
83
+ if (S = i, b.value = i.numPages, await D(), _.url !== t || x.value !== e) return;
84
+ v.value = "ready";
85
+ } catch (e) {
86
+ y.value = e instanceof Error ? e.message : String(e), v.value = "error";
87
+ }
88
+ }
89
+ let k, A = 0, j = null;
90
+ function M() {
91
+ let e = x.value;
92
+ if (!e || !S) return;
93
+ let t = e.clientWidth;
94
+ Math.abs(t - A) < 8 || (A = t, clearTimeout(k), k = setTimeout(() => {
95
+ S && D();
96
+ }, 180));
97
+ }
98
+ return a(() => {
99
+ O(), typeof ResizeObserver < "u" && x.value && (A = x.value.clientWidth, j = new ResizeObserver(M), j.observe(x.value));
100
+ }), l(() => _.url, O), i(() => {
101
+ clearTimeout(k), j?.disconnect(), w++, E(), x.value && (x.value.innerHTML = "");
102
+ }), (r, i) => (o(), t("div", f, [n("div", {
103
+ ref_key: "docEl",
104
+ ref: x,
105
+ class: "pf__doc"
106
+ }, null, 512), v.value === "loading" ? (o(), t("div", p, [...i[0] ||= [n("p", { class: "pf__msg" }, "正在渲染 PDF…", -1)]])) : v.value === "error" ? (o(), t("div", m, [n("div", h, [n("p", null, "渲染失败:" + c(y.value), 1), n("button", {
107
+ type: "button",
108
+ class: "pf__retry",
109
+ onClick: O
110
+ }, "重试")])])) : e("", !0)]));
111
+ }
112
+ });
113
+ //#endregion
114
+ export { _ as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./PptxViewer.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/PptxViewer.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-47d76691"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Side-viewer PowerPoint (`.pptx`/`.pptm`/`.ppsx`) renderer. Fetches the deck bytes from the download URL and
3
+ * renders the OOXML PresentationML to HTML/SVG entirely in-browser via @aiden0z/pptx-renderer
4
+ * (https://github.com/aiden0z/pptx-renderer) — a vertically scrollable list of slides, each scaled to fit the
5
+ * pane (`fitMode: 'contain'`, the library default). No CDN / network beyond the file fetch (+ the lazy pdfjs
6
+ * fallback above): the renderer bundles its own jszip + echarts (charts) and inlines media. The library writes
7
+ * inline styles only, so nothing leaks onto the page.
8
+ *
9
+ * Two entry shapes mirror the other viewers (docx/xlsx/zip): a real download URL for a held attachment, or a
10
+ * blob URL minted by the archive browsers from already-extracted bytes.
11
+ */
12
+ type __VLS_Props = {
13
+ /** Download/blob URL of the .pptx bytes. */
14
+ url?: string;
15
+ name: string;
16
+ size?: number;
17
+ };
18
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
@@ -0,0 +1,73 @@
1
+ import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, defineComponent as r, onBeforeUnmount as i, onMounted as a, openBlock as o, ref as s, toDisplayString as c, watch as l } from "vue";
2
+ import u from "pdfjs-dist/build/pdf.worker.min.mjs?url";
3
+ import { PptxViewer as d, RECOMMENDED_ZIP_LIMITS as f } from "@aiden0z/pptx-renderer";
4
+ import p from "pdfjs-dist/build/pdf.min.mjs?url";
5
+ //#region src/components/PptxViewer.vue?vue&type=script&setup=true&lang.ts
6
+ var m = { class: "pv" }, h = {
7
+ key: 0,
8
+ class: "pv__overlay"
9
+ }, g = {
10
+ key: 1,
11
+ class: "pv__overlay"
12
+ }, _ = { class: "pv__msg pv__msg--error" }, v = /*@__PURE__*/ r({
13
+ __name: "PptxViewer",
14
+ props: {
15
+ url: {},
16
+ name: {},
17
+ size: {}
18
+ },
19
+ setup(r) {
20
+ let v = r, y = s("loading"), b = s(""), x = s(null), S = null;
21
+ function C() {
22
+ if (S) {
23
+ try {
24
+ S.destroy();
25
+ } catch {}
26
+ S = null;
27
+ }
28
+ }
29
+ async function w() {
30
+ let e = x.value;
31
+ if (!v.url || !e) return;
32
+ y.value = "loading", b.value = "", C(), e.innerHTML = "";
33
+ let t = v.url;
34
+ try {
35
+ let n = await fetch(t);
36
+ if (!n.ok) throw Error(`HTTP ${n.status}`);
37
+ let r = await n.arrayBuffer();
38
+ if (v.url !== t || x.value !== e) return;
39
+ let i = await d.open(r, e, {
40
+ zipLimits: f,
41
+ scrollContainer: e,
42
+ listOptions: { windowed: !0 },
43
+ pdfjs: {
44
+ moduleUrl: p,
45
+ workerUrl: u
46
+ }
47
+ });
48
+ if (v.url !== t || x.value !== e) {
49
+ try {
50
+ i.destroy();
51
+ } catch {}
52
+ return;
53
+ }
54
+ S = i, y.value = "ready";
55
+ } catch (e) {
56
+ b.value = e instanceof Error ? e.message : String(e), y.value = "error";
57
+ }
58
+ }
59
+ return a(w), l(() => v.url, w), i(() => {
60
+ C(), x.value && (x.value.innerHTML = "");
61
+ }), (r, i) => (o(), t("div", m, [n("div", {
62
+ ref_key: "docEl",
63
+ ref: x,
64
+ class: "pv__doc"
65
+ }, null, 512), y.value === "loading" ? (o(), t("div", h, [...i[0] ||= [n("p", { class: "pv__msg" }, "正在渲染 PPT…", -1)]])) : y.value === "error" ? (o(), t("div", g, [n("div", _, [n("p", null, "渲染失败:" + c(b.value), 1), n("button", {
66
+ type: "button",
67
+ class: "pv__retry",
68
+ onClick: w
69
+ }, "重试")])])) : e("", !0)]));
70
+ }
71
+ });
72
+ //#endregion
73
+ export { v as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./PsdViewer.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/PsdViewer.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-5fbd3b9c"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Side-viewer for Photoshop documents (.psd/.psb). Fetches the bytes and parses them in-browser with ag-psd
3
+ * (dynamically imported), then — unlike the generic RasterViewer which only shows the flattened composite —
4
+ * exposes the LAYER TREE: a panel of every layer/group with a thumbnail and a visibility toggle, and it
5
+ * RE-COMPOSITES live onto a canvas as you toggle layers (honouring per-layer opacity and blend mode; group
6
+ * visibility cascades to its children). A flattened PSD (no layers) falls back to ag-psd's composite.
7
+ */
8
+ type __VLS_Props = {
9
+ url?: string;
10
+ name: string;
11
+ size?: number;
12
+ };
13
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;