@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,366 @@
1
+ import { fileExt as e, isDicomFile as t, isTextFile as n } from "../lib/fileType.js";
2
+ import { canToggleView as r, classifyViewerFile as i, mediaMimeForName as ee } from "../lib/viewerKind.js";
3
+ import { formatBytes as a } from "../lib/format.js";
4
+ import o from "./icons/Icon.js";
5
+ import { SevenZipEncryptedError as te, SevenZipPasswordError as ne, extractSevenZipEntry as s, readSevenZip as c } from "../lib/sevenZip.js";
6
+ import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as h, defineAsyncComponent as re, defineComponent as g, nextTick as ie, normalizeClass as _, normalizeStyle as ae, onBeforeUnmount as oe, onMounted as se, openBlock as v, reactive as ce, ref as y, renderList as le, toDisplayString as b, unref as x, vModelText as ue, watch as de, withDirectives as fe, withKeys as pe } from "vue";
7
+ //#region src/components/SevenZipBrowser.vue?vue&type=script&setup=true&lang.ts
8
+ var me = { class: "sz" }, he = {
9
+ key: 0,
10
+ class: "sz__msg"
11
+ }, ge = {
12
+ key: 1,
13
+ class: "sz__msg sz__msg--error"
14
+ }, _e = {
15
+ key: 2,
16
+ class: "sz__locked"
17
+ }, ve = { class: "sz__lockform" }, ye = {
18
+ key: 0,
19
+ class: "sz__lockerr"
20
+ }, be = { class: "sz__bar" }, xe = ["title"], Se = { class: "sz__bsize" }, Ce = {
21
+ key: 0,
22
+ class: "sz__view",
23
+ role: "group",
24
+ "aria-label": "渲染或源码"
25
+ }, we = ["title"], Te = {
26
+ key: 0,
27
+ class: "sz__msg"
28
+ }, Ee = {
29
+ key: 1,
30
+ class: "sz__msg sz__msg--error"
31
+ }, De = { class: "sz__summary" }, Oe = ["placeholder"], ke = {
32
+ key: 0,
33
+ class: "sz__pwerr"
34
+ }, Ae = { class: "sz__scroll sz__tree" }, je = {
35
+ key: 0,
36
+ class: "sz__msg"
37
+ }, Me = ["onClick"], Ne = { class: "sz__twisty" }, Pe = { class: "sz__rowicon" }, Fe = { class: "sz__rowname" }, Ie = {
38
+ key: 1,
39
+ class: "sz__rowsize"
40
+ }, S = /*@__PURE__*/ g({
41
+ __name: "SevenZipBrowser",
42
+ props: {
43
+ url: {},
44
+ name: {}
45
+ },
46
+ setup(g) {
47
+ let S = re(() => import("./DicomViewer.js")), Le = re(() => import("./FileViewerBody.js")), C = g, w = y("loading"), T = y(""), E = null, D = null, O = y([]), k = y(""), A = y(""), j = y(!1), M = y(!1), N = y(!1), P = y({
48
+ name: "",
49
+ path: "",
50
+ isDir: !0,
51
+ size: 0,
52
+ children: []
53
+ }), F = ce(/* @__PURE__ */ new Set()), Re = u(() => O.value.reduce((e, t) => e + +!t.isDir, 0)), ze = u(() => O.value.reduce((e, t) => e + (t.isDir ? 0 : t.size), 0));
54
+ function Be(e) {
55
+ let t = {
56
+ name: "",
57
+ path: "",
58
+ isDir: !0,
59
+ size: 0,
60
+ children: []
61
+ }, n = new Map([["", t]]), r = (e) => {
62
+ let r = t, i = "";
63
+ for (let t of e) {
64
+ i = i ? `${i}/${t}` : t;
65
+ let e = n.get(i);
66
+ e || (e = {
67
+ name: t,
68
+ path: i,
69
+ isDir: !0,
70
+ size: 0,
71
+ children: []
72
+ }, n.set(i, e), r.children.push(e)), r = e;
73
+ }
74
+ return r;
75
+ };
76
+ for (let t of e) {
77
+ let e = t.path.split("/").filter(Boolean);
78
+ if (t.isDir) {
79
+ r(e);
80
+ continue;
81
+ }
82
+ let n = e.pop();
83
+ n && r(e).children.push({
84
+ name: n,
85
+ path: t.path,
86
+ isDir: !1,
87
+ size: t.size,
88
+ entry: t,
89
+ children: []
90
+ });
91
+ }
92
+ return Ve(t), t;
93
+ }
94
+ function Ve(e) {
95
+ e.children.sort((e, t) => e.isDir === t.isDir ? e.name.localeCompare(t.name) : e.isDir ? -1 : 1);
96
+ for (let t of e.children) t.isDir && Ve(t);
97
+ }
98
+ let He = u(() => {
99
+ let e = [], t = (n, r) => {
100
+ for (let i of n) e.push({
101
+ node: i,
102
+ depth: r
103
+ }), i.isDir && F.has(i.path) && t(i.children, r + 1);
104
+ };
105
+ return t(P.value.children, 0), e;
106
+ });
107
+ async function I() {
108
+ w.value = "loading", T.value = "", z.value = null, k.value = "", A.value = "", j.value = !1, M.value = !1, N.value = !1, X(), q.value = [];
109
+ try {
110
+ let e = await fetch(C.url);
111
+ if (!e.ok) throw Error(`HTTP ${e.status}`);
112
+ E = await e.arrayBuffer();
113
+ try {
114
+ D = c(E);
115
+ } catch (e) {
116
+ if (e instanceof te) {
117
+ j.value = !0, w.value = "ready";
118
+ return;
119
+ }
120
+ throw e;
121
+ }
122
+ O.value = D.entries, P.value = Be(D.entries), F.clear(), N.value = D.entries.some((e) => e.encrypted), w.value = "ready";
123
+ } catch (e) {
124
+ T.value = e instanceof Error ? e.message : String(e), w.value = "error";
125
+ }
126
+ }
127
+ function L(e) {
128
+ return e instanceof ne ? "密码错误" : e instanceof te ? "需要密码" : e instanceof Error ? e.message : String(e);
129
+ }
130
+ async function R() {
131
+ if (!(!E || !k.value)) {
132
+ if (A.value = "", j.value) {
133
+ w.value = "loading", await ie();
134
+ try {
135
+ D = c(E, k.value), O.value = D.entries, P.value = Be(D.entries), F.clear(), N.value = D.entries.some((e) => e.encrypted), j.value = !1, M.value = !0;
136
+ } catch (e) {
137
+ A.value = L(e);
138
+ } finally {
139
+ w.value = "ready";
140
+ }
141
+ return;
142
+ }
143
+ try {
144
+ let e = O.value.find((e) => !e.isDir && e.encrypted);
145
+ e && D && s(E, D, e, k.value), M.value = !0;
146
+ } catch (e) {
147
+ M.value = !1, A.value = L(e);
148
+ }
149
+ }
150
+ }
151
+ let z = y(null), B = y("ready"), V = y(""), H = y(""), U = y(null), W = y(!1), G = y("render"), K = y(""), q = y([]), J = y(0), Y = y(""), Ue = u(() => q.value.reduce((e, t) => e + (t.size ?? 0), 0)), We = u(() => r(U.value, H.value));
152
+ function X() {
153
+ K.value &&= (URL.revokeObjectURL(K.value), "");
154
+ }
155
+ function Z(e) {
156
+ let t = e.lastIndexOf("/");
157
+ return t < 0 ? "" : e.slice(0, t);
158
+ }
159
+ function Ge(e) {
160
+ let n = Z(e.path);
161
+ return O.value.filter((e) => !e.isDir && t(e.name) && Z(e.path) === n).sort((e, t) => e.path.localeCompare(t.path, void 0, {
162
+ numeric: !0,
163
+ sensitivity: "base"
164
+ }));
165
+ }
166
+ function Ke(t, r) {
167
+ if (n(r)) return !0;
168
+ if (e(r)) return !1;
169
+ let i = Math.min(t.length, 4096);
170
+ for (let e = 0; e < i; e++) if (t[e] === 0) return !1;
171
+ return !0;
172
+ }
173
+ function qe(e) {
174
+ if (z.value = e, B.value = "loading", V.value = "", H.value = "", U.value = null, W.value = !1, G.value = "render", X(), q.value = [], !(!E || !D)) try {
175
+ if (t(e.name)) {
176
+ let t = Ge(e);
177
+ if (t.length > 1) {
178
+ let n = E, r = D;
179
+ q.value = t.map((e) => ({
180
+ name: e.name,
181
+ size: e.size,
182
+ load: async () => {
183
+ let t = s(n, r, e, k.value), i = new ArrayBuffer(t.byteLength);
184
+ return new Uint8Array(i).set(t), i;
185
+ }
186
+ })), J.value = Math.max(0, t.findIndex((t) => t.path === e.path)), Y.value = Z(e.path).split("/").pop() || e.name, W.value = !0, B.value = "ready";
187
+ return;
188
+ }
189
+ }
190
+ let n = s(E, D, e, k.value);
191
+ K.value = URL.createObjectURL(new Blob([n], { type: ee(e.name) })), U.value = i({
192
+ name: e.name,
193
+ url: K.value,
194
+ size: e.size,
195
+ textHint: Ke(n, e.name)
196
+ }), B.value = "ready";
197
+ } catch (e) {
198
+ V.value = L(e), B.value = "error";
199
+ }
200
+ }
201
+ function Je(e) {
202
+ e.isDir ? F.has(e.path) ? F.delete(e.path) : F.add(e.path) : e.entry && qe(e.entry);
203
+ }
204
+ function Ye() {
205
+ z.value = null, H.value = "", U.value = null, W.value = !1, X(), q.value = [];
206
+ }
207
+ function Xe(e) {
208
+ if (!(!E || !D)) try {
209
+ let t = URL.createObjectURL(new Blob([s(E, D, e, k.value)])), n = document.createElement("a");
210
+ n.href = t, n.download = e.name, document.body.appendChild(n), n.click(), n.remove(), setTimeout(() => URL.revokeObjectURL(t), 1e3);
211
+ } catch {}
212
+ }
213
+ let Q = y(!1), $;
214
+ async function Ze() {
215
+ try {
216
+ await navigator.clipboard?.writeText(H.value);
217
+ } catch {}
218
+ Q.value = !0, clearTimeout($), $ = setTimeout(() => Q.value = !1, 1400);
219
+ }
220
+ return se(I), de(() => C.url, I), oe(() => {
221
+ X(), clearTimeout($);
222
+ }), (e, t) => (v(), p("div", me, [w.value === "loading" ? (v(), p("p", he, "正在解压…")) : w.value === "error" ? (v(), p("div", ge, [m("p", null, b(T.value), 1), m("button", {
223
+ type: "button",
224
+ class: "sz__retry",
225
+ onClick: I
226
+ }, "重试")])) : j.value ? (v(), p("div", _e, [
227
+ h(o, {
228
+ name: "key",
229
+ size: 26,
230
+ class: "sz__lockicon"
231
+ }),
232
+ t[6] ||= m("p", { class: "sz__lockmsg" }, "该 7z 已加密(含文件名),输入密码后查看", -1),
233
+ m("div", ve, [fe(m("input", {
234
+ "onUpdate:modelValue": t[0] ||= (e) => k.value = e,
235
+ type: "password",
236
+ class: "sz__pwinput",
237
+ placeholder: "输入密码",
238
+ onKeyup: pe(R, ["enter"])
239
+ }, null, 544), [[ue, k.value]]), m("button", {
240
+ type: "button",
241
+ class: "sz__pwbtn",
242
+ onClick: R
243
+ }, "解锁")]),
244
+ A.value ? (v(), p("p", ye, b(A.value), 1)) : f("", !0)
245
+ ])) : z.value ? (v(), p(l, { key: 3 }, [m("div", be, [
246
+ m("button", {
247
+ type: "button",
248
+ class: "sz__back",
249
+ title: "返回列表",
250
+ onClick: Ye
251
+ }, [h(o, {
252
+ name: "arrowLeft",
253
+ size: 16
254
+ })]),
255
+ m("span", {
256
+ class: "sz__path",
257
+ title: z.value.path
258
+ }, b(z.value.path), 9, xe),
259
+ m("span", Se, b(x(a)(z.value.size)), 1),
260
+ We.value ? (v(), p("div", Ce, [m("button", {
261
+ type: "button",
262
+ class: _(["sz__vbtn", { "sz__vbtn--on": G.value === "render" }]),
263
+ title: "渲染",
264
+ onClick: t[1] ||= (e) => G.value = "render"
265
+ }, [h(o, {
266
+ name: "eye",
267
+ size: 14
268
+ })], 2), m("button", {
269
+ type: "button",
270
+ class: _(["sz__vbtn", { "sz__vbtn--on": G.value === "source" }]),
271
+ title: "源码",
272
+ onClick: t[2] ||= (e) => G.value = "source"
273
+ }, [h(o, {
274
+ name: "code",
275
+ size: 14
276
+ })], 2)])) : f("", !0),
277
+ H.value && B.value === "ready" ? (v(), p("button", {
278
+ key: 1,
279
+ type: "button",
280
+ class: "sz__act",
281
+ title: Q.value ? "已复制" : "复制",
282
+ onClick: Ze
283
+ }, [h(o, {
284
+ name: "copy",
285
+ size: 14
286
+ })], 8, we)) : f("", !0),
287
+ m("button", {
288
+ type: "button",
289
+ class: "sz__act",
290
+ title: "下载",
291
+ onClick: t[3] ||= (e) => Xe(z.value)
292
+ }, [h(o, {
293
+ name: "download",
294
+ size: 15
295
+ })])
296
+ ]), B.value === "loading" ? (v(), p("p", Te, "读取中…")) : B.value === "error" ? (v(), p("div", Ee, [m("p", null, b(V.value), 1)])) : W.value ? (v(), d(x(S), {
297
+ key: 2,
298
+ slices: q.value,
299
+ start: J.value,
300
+ name: Y.value,
301
+ size: Ue.value
302
+ }, null, 8, [
303
+ "slices",
304
+ "start",
305
+ "name",
306
+ "size"
307
+ ])) : U.value ? (v(), d(x(Le), {
308
+ key: 3,
309
+ file: U.value,
310
+ mode: G.value,
311
+ onLoaded: t[4] ||= (e) => H.value = e
312
+ }, null, 8, ["file", "mode"])) : f("", !0)], 64)) : (v(), p(l, { key: 4 }, [
313
+ m("div", De, b(Re.value) + " 个文件 · " + b(x(a)(ze.value)), 1),
314
+ N.value ? (v(), p("div", {
315
+ key: 0,
316
+ class: _(["sz__pw", { "sz__pw--ok": M.value }])
317
+ }, [
318
+ h(o, {
319
+ name: "key",
320
+ size: 14
321
+ }),
322
+ fe(m("input", {
323
+ "onUpdate:modelValue": t[5] ||= (e) => k.value = e,
324
+ type: "password",
325
+ class: "sz__pwinput",
326
+ placeholder: M.value ? "已解锁(如需可重新输入)" : "此压缩包内容已加密,输入密码解锁",
327
+ onKeyup: pe(R, ["enter"])
328
+ }, null, 40, Oe), [[ue, k.value]]),
329
+ m("button", {
330
+ type: "button",
331
+ class: "sz__pwbtn",
332
+ onClick: R
333
+ }, b(M.value ? "已解锁" : "解锁"), 1),
334
+ A.value ? (v(), p("span", ke, b(A.value), 1)) : f("", !0)
335
+ ], 2)) : f("", !0),
336
+ m("div", Ae, [He.value.length === 0 ? (v(), p("p", je, "空压缩包")) : f("", !0), (v(!0), p(l, null, le(He.value, (e) => (v(), p("button", {
337
+ key: e.node.path,
338
+ type: "button",
339
+ class: _(["sz__row", { "sz__row--dir": e.node.isDir }]),
340
+ style: ae({ paddingLeft: `${12 + e.depth * 14}px` }),
341
+ onClick: (t) => Je(e.node)
342
+ }, [
343
+ m("span", Ne, [e.node.isDir ? (v(), d(o, {
344
+ key: 0,
345
+ name: "chevronRight",
346
+ size: 13,
347
+ class: _({ "sz__twisty--open": F.has(e.node.path) })
348
+ }, null, 8, ["class"])) : f("", !0)]),
349
+ m("span", Pe, [h(o, {
350
+ name: e.node.isDir ? "folder" : "fileOutline",
351
+ size: 15
352
+ }, null, 8, ["name"])]),
353
+ m("span", Fe, b(e.node.name), 1),
354
+ !e.node.isDir && e.node.entry?.encrypted ? (v(), d(o, {
355
+ key: 0,
356
+ name: "key",
357
+ size: 12,
358
+ class: "sz__rowlock"
359
+ })) : f("", !0),
360
+ e.node.isDir ? f("", !0) : (v(), p("span", Ie, b(x(a)(e.node.size)), 1))
361
+ ], 14, Me))), 128))])
362
+ ], 64))]));
363
+ }
364
+ });
365
+ //#endregion
366
+ export { S as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./SqliteViewer.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/SqliteViewer.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-b4d65354"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Side-viewer SQLite (`.sqlite`/`.db`/`.sqlite3`) reader. Fetches the database bytes and opens them with sql.js
3
+ * (WASM, lazily loaded — see lib/sqlite.ts), then browses it read-only: a table/view picker, a paginated data
4
+ * grid (with PK/FK/IDX column badges), and a small SQL console for ad-hoc queries.
5
+ *
6
+ * Everything runs in-browser; sql.js holds the whole file in WASM memory, so very large databases are gated
7
+ * behind a confirm before loading. The DB handle is closed on reload/unmount to free that memory. BLOB cells
8
+ * render as a `[BLOB nB]` placeholder (never decoded into the grid).
9
+ */
10
+ type __VLS_Props = {
11
+ /** Download URL of the database bytes. */
12
+ url?: string;
13
+ name: string;
14
+ size?: number;
15
+ };
16
+ 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>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
@@ -0,0 +1,186 @@
1
+ import { formatBytes as e } from "../lib/format.js";
2
+ import { execSql as t, initSqlEngine as n, listTables as ee, loadDatabase as te, readPage as ne } from "../lib/sqlite.js";
3
+ import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, normalizeClass as l, onBeforeUnmount as re, openBlock as u, ref as d, renderList as f, toDisplayString as p, unref as ie, vModelText as ae, watch as m, withDirectives as oe, withKeys as h, withModifiers as g } from "vue";
4
+ //#region src/components/SqliteViewer.vue?vue&type=script&setup=true&lang.ts
5
+ var _ = { class: "sq" }, v = {
6
+ key: 0,
7
+ class: "sq__msg"
8
+ }, y = {
9
+ key: 1,
10
+ class: "sq__msg sq__gate"
11
+ }, se = {
12
+ key: 2,
13
+ class: "sq__msg sq__msg--error"
14
+ }, ce = { class: "sq__bar" }, le = ["value"], ue = ["value"], de = {
15
+ key: 1,
16
+ class: "sq__notables"
17
+ }, fe = { class: "sq__modes" }, pe = ["disabled"], me = {
18
+ key: 0,
19
+ class: "sq__sqlbar"
20
+ }, he = ["onKeydown"], ge = { class: "sq__sqlrun" }, _e = {
21
+ key: 0,
22
+ class: "sq__stat"
23
+ }, ve = {
24
+ key: 1,
25
+ class: "sq__err"
26
+ }, b = { class: "sq__gridwrap" }, x = {
27
+ key: 0,
28
+ class: "sq__grid"
29
+ }, S = { class: "sq__colname" }, C = {
30
+ key: 1,
31
+ class: "sq__coltype"
32
+ }, w = { class: "sq__rownum" }, T = { key: 0 }, E = ["colspan"], D = {
33
+ key: 1,
34
+ class: "sq__msg"
35
+ }, O = {
36
+ key: 1,
37
+ class: "sq__pager"
38
+ }, k = ["disabled"], A = { class: "sq__pginfo" }, j = ["disabled"], M = 100, N = 60 * 1024 * 1024, P = /*@__PURE__*/ c({
39
+ __name: "SqliteViewer",
40
+ props: {
41
+ url: {},
42
+ name: {},
43
+ size: {}
44
+ },
45
+ setup(c) {
46
+ let P = c, F = d("loading"), I = d(""), L = null, R = d([]), z = d(""), B = d("table"), V = d(0), H = d([]), U = d(""), W = d(null), G = i(() => R.value.find((e) => e.name === z.value) ?? null), K = i(() => {
47
+ let e = G.value;
48
+ return !e || e.rowCount <= 0 ? 1 : Math.max(1, Math.ceil(e.rowCount / M));
49
+ });
50
+ function q() {
51
+ try {
52
+ L?.close();
53
+ } catch {}
54
+ L = null;
55
+ }
56
+ function J() {
57
+ if (!L || !G.value) {
58
+ H.value = [];
59
+ return;
60
+ }
61
+ try {
62
+ H.value = ne(L, z.value, M, V.value * M);
63
+ } catch (e) {
64
+ I.value = e instanceof Error ? e.message : String(e), H.value = [];
65
+ }
66
+ }
67
+ function ye(e) {
68
+ z.value = e, V.value = 0, B.value = "table", J();
69
+ }
70
+ function be() {
71
+ V.value > 0 && (V.value--, J());
72
+ }
73
+ function xe() {
74
+ V.value < K.value - 1 && (V.value++, J());
75
+ }
76
+ function Y() {
77
+ if (!L) return;
78
+ let e = U.value.trim();
79
+ e && (W.value = t(L, e));
80
+ }
81
+ async function X() {
82
+ if (P.url) {
83
+ F.value = "loading", I.value = "", q();
84
+ try {
85
+ let e = await fetch(P.url);
86
+ if (!e.ok) throw Error(`HTTP ${e.status}`);
87
+ let t = await e.arrayBuffer();
88
+ L = te(await n(), new Uint8Array(t)), R.value = ee(L), R.value.length ? (z.value = R.value[0].name, V.value = 0, J()) : z.value = "", F.value = "ready";
89
+ } catch (e) {
90
+ I.value = e instanceof Error ? e.message : String(e), F.value = "error", q();
91
+ }
92
+ }
93
+ }
94
+ function Se() {
95
+ if (P.size && P.size > N) {
96
+ F.value = "gate";
97
+ return;
98
+ }
99
+ X();
100
+ }
101
+ m(() => P.url, Se, { immediate: !0 }), re(q);
102
+ let Z = i(() => B.value === "sql" ? (W.value?.columns ?? []).map((e) => ({
103
+ name: e,
104
+ type: ""
105
+ })) : G.value?.columns ?? []), Q = i(() => B.value === "sql" ? W.value?.rows ?? [] : H.value);
106
+ function $(e) {
107
+ return e.pk ? "PK" : e.fk ? "FK" : e.idx ? "IDX" : "";
108
+ }
109
+ function Ce(e) {
110
+ return e == null ? "" : String(e);
111
+ }
112
+ return (t, n) => (u(), o("div", _, [F.value === "loading" ? (u(), o("p", v, "正在加载数据库…")) : F.value === "gate" ? (u(), o("div", y, [s("p", null, "该数据库较大(" + p(ie(e)(P.size)) + "),将整体载入浏览器内存。是否继续?", 1), s("button", {
113
+ type: "button",
114
+ class: "sq__btn",
115
+ onClick: X
116
+ }, "加载并预览")])) : F.value === "error" ? (u(), o("div", se, [s("p", null, "加载失败:" + p(I.value), 1), s("button", {
117
+ type: "button",
118
+ class: "sq__btn",
119
+ onClick: X
120
+ }, "重试")])) : F.value === "ready" ? (u(), o(r, { key: 3 }, [
121
+ s("div", ce, [R.value.length ? (u(), o("select", {
122
+ key: 0,
123
+ class: "sq__select",
124
+ value: z.value,
125
+ onChange: n[0] ||= (e) => ye(e.target.value)
126
+ }, [(u(!0), o(r, null, f(R.value, (e) => (u(), o("option", {
127
+ key: e.name,
128
+ value: e.name
129
+ }, p(e.kind === "view" ? "⊞ " : "") + p(e.name) + " (" + p(e.rowCount) + ") ", 9, ue))), 128))], 40, le)) : (u(), o("span", de, "(无用户表)")), s("div", fe, [s("button", {
130
+ type: "button",
131
+ class: l(["sq__mode", { "sq__mode--on": B.value === "table" }]),
132
+ disabled: !R.value.length,
133
+ onClick: n[1] ||= (e) => B.value = "table"
134
+ }, " 数据 ", 10, pe), s("button", {
135
+ type: "button",
136
+ class: l(["sq__mode", { "sq__mode--on": B.value === "sql" }]),
137
+ onClick: n[2] ||= (e) => B.value = "sql"
138
+ }, " SQL ", 2)])]),
139
+ B.value === "sql" ? (u(), o("div", me, [oe(s("textarea", {
140
+ "onUpdate:modelValue": n[3] ||= (e) => U.value = e,
141
+ class: "sq__sqlinput",
142
+ rows: "3",
143
+ placeholder: "输入 SQL(如 SELECT * FROM … LIMIT 100),Ctrl+Enter 执行",
144
+ onKeydown: [h(g(Y, ["ctrl", "prevent"]), ["enter"]), h(g(Y, ["meta", "prevent"]), ["enter"])]
145
+ }, null, 40, he), [[ae, U.value]]), s("div", ge, [s("button", {
146
+ type: "button",
147
+ class: "sq__btn",
148
+ onClick: Y
149
+ }, "执行"), W.value && !W.value.error ? (u(), o("span", _e, p(W.value.rowCount) + " 行 · " + p(W.value.elapsedMs.toFixed(1)) + " ms ", 1)) : W.value?.error ? (u(), o("span", ve, p(W.value.error), 1)) : a("", !0)])])) : a("", !0),
150
+ s("div", b, [Z.value.length ? (u(), o("table", x, [s("thead", null, [s("tr", null, [n[4] ||= s("th", { class: "sq__rownum" }, "#", -1), (u(!0), o(r, null, f(Z.value, (e, t) => (u(), o("th", {
151
+ key: t,
152
+ class: "sq__th"
153
+ }, [
154
+ s("span", S, p(e.name), 1),
155
+ $(e) ? (u(), o("span", {
156
+ key: 0,
157
+ class: l(["sq__badge", `sq__badge--${$(e).toLowerCase()}`])
158
+ }, p($(e)), 3)) : a("", !0),
159
+ e.type ? (u(), o("span", C, p(e.type), 1)) : a("", !0)
160
+ ]))), 128))])]), s("tbody", null, [(u(!0), o(r, null, f(Q.value, (e, t) => (u(), o("tr", { key: t }, [s("td", w, p(B.value === "table" ? V.value * M + t + 1 : t + 1), 1), (u(!0), o(r, null, f(e, (e, t) => (u(), o("td", {
161
+ key: t,
162
+ class: l(["sq__td", { "sq__td--null": e == null }])
163
+ }, p(e == null ? "NULL" : Ce(e)), 3))), 128))]))), 128)), Q.value.length ? a("", !0) : (u(), o("tr", T, [s("td", {
164
+ class: "sq__emptycell",
165
+ colspan: Z.value.length + 1
166
+ }, p(B.value === "sql" ? "(无结果)" : "(空表)"), 9, E)]))])])) : (u(), o("p", D, p(B.value === "sql" ? "执行一条 SQL 查看结果。" : "该表无列。"), 1))]),
167
+ B.value === "table" && G.value ? (u(), o("div", O, [
168
+ s("button", {
169
+ type: "button",
170
+ class: "sq__pgbtn",
171
+ disabled: V.value === 0,
172
+ onClick: be
173
+ }, "‹", 8, k),
174
+ s("span", A, " 第 " + p(V.value + 1) + " / " + p(K.value) + " 页 · 共 " + p(G.value.rowCount) + " 行 ", 1),
175
+ s("button", {
176
+ type: "button",
177
+ class: "sq__pgbtn",
178
+ disabled: V.value >= K.value - 1,
179
+ onClick: xe
180
+ }, " › ", 8, j)
181
+ ])) : a("", !0)
182
+ ], 64)) : a("", !0)]));
183
+ }
184
+ });
185
+ //#endregion
186
+ export { P as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./SubtitleViewer.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/SubtitleViewer.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-405d1c5a"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Side-viewer subtitle renderer. Consumes the already-fetched text the panel loaded (like MindMapView —
3
+ * no second download) and parses it in-browser (see lib/subtitle.ts) into a uniform cue list, shown as a
4
+ * readable transcript: each row is its time range + the caption text. SRT / WebVTT / SubStation Alpha.
5
+ *
6
+ * Rendering only — styling/positioning/karaoke from the source are intentionally dropped (the panel's
7
+ * source toggle shows the raw file for anyone who needs the original markup).
8
+ */
9
+ type __VLS_Props = {
10
+ text: string;
11
+ name: string;
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;
@@ -0,0 +1,48 @@
1
+ import { fileExt as e } from "../lib/fileType.js";
2
+ import { parseSubtitle as t } from "../lib/subtitle.js";
3
+ import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, openBlock as c, renderList as l, toDisplayString as u } from "vue";
4
+ //#region src/components/SubtitleViewer.vue?vue&type=script&setup=true&lang.ts
5
+ var d = { class: "sub" }, f = { class: "sub__head" }, p = { class: "sub__badge" }, m = { class: "sub__count" }, h = {
6
+ key: 0,
7
+ class: "sub__dur"
8
+ }, g = {
9
+ key: 0,
10
+ class: "sub__list"
11
+ }, _ = { class: "sub__time" }, v = { class: "sub__idx" }, y = { class: "sub__range" }, b = { class: "sub__body" }, x = {
12
+ key: 0,
13
+ class: "sub__speaker"
14
+ }, S = { class: "sub__text" }, C = {
15
+ key: 1,
16
+ class: "sub__empty"
17
+ }, w = /*@__PURE__*/ s({
18
+ __name: "SubtitleViewer",
19
+ props: {
20
+ text: {},
21
+ name: {}
22
+ },
23
+ setup(s) {
24
+ let w = s, T = r(() => t(w.text, e(w.name))), E = r(() => T.value.cues), D = r(() => E.value.reduce((e, t) => Math.max(e, t.end), 0)), O = {
25
+ srt: "SubRip",
26
+ vtt: "WebVTT",
27
+ ass: "SubStation Alpha"
28
+ };
29
+ function k(e) {
30
+ let t = Math.max(0, e), n = Math.floor(t / 1e3), r = Math.floor(n / 3600), i = Math.floor(n % 3600 / 60), a = n % 60, o = Math.floor(t % 1e3), s = (e, t = 2) => String(e).padStart(t, "0"), c = `${s(i)}:${s(a)}.${s(o, 3)}`;
31
+ return r > 0 ? `${s(r)}:${c}` : c;
32
+ }
33
+ function A(e) {
34
+ let t = Math.round(e / 1e3), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = (e) => String(e).padStart(2, "0");
35
+ return n > 0 ? `${n}:${a(r)}:${a(i)}` : `${r}:${a(i)}`;
36
+ }
37
+ return (e, t) => (c(), a("div", d, [o("div", f, [
38
+ o("span", p, u(O[T.value.format] ?? T.value.format), 1),
39
+ o("span", m, u(E.value.length) + " 条字幕", 1),
40
+ D.value > 0 ? (c(), a("span", h, "时长 " + u(A(D.value)), 1)) : i("", !0)
41
+ ]), E.value.length ? (c(), a("div", g, [(c(!0), a(n, null, l(E.value, (e, t) => (c(), a("div", {
42
+ key: t,
43
+ class: "sub__cue"
44
+ }, [o("div", _, [o("span", v, u(t + 1), 1), o("span", y, u(k(e.start)) + " → " + u(k(e.end)), 1)]), o("div", b, [e.speaker ? (c(), a("span", x, u(e.speaker), 1)) : i("", !0), o("p", S, u(e.text), 1)])]))), 128))])) : (c(), a("p", C, "未解析到字幕条目(可切换到「源码」查看原始内容)。"))]));
45
+ }
46
+ });
47
+ //#endregion
48
+ export { w as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./XlsxChart.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/XlsxChart.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-2e3e48ff"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,14 @@
1
+ import type { XlsxChart } from '@/lib/xlsxCharts';
2
+ /**
3
+ * Render one parsed workbook chart ({@link XlsxChart}) as inline SVG — no charting dependency, in keeping with
4
+ * the hand-rolled renderers elsewhere (markdown, binobj). Covers the kinds these spreadsheets actually use:
5
+ * line/area/scatter as polylines, bar/barH as grouped bars, pie as slices. Geometry is derived from the chart's
6
+ * cached series so the picture matches what Excel last drew. The host ({@link XlsxViewer}) positions us over the
7
+ * grid at the drawing anchor; here we just fill the given pixel box.
8
+ */
9
+ type __VLS_Props = {
10
+ chart: XlsxChart;
11
+ };
12
+ 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>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;