@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,428 @@
1
+ /** A file opened in the side viewer: its display name, fetch/download URL, and highlight language. */
2
+ export interface ViewerFile {
3
+ name: string;
4
+ /** Download endpoint URL — fetched as text and reused by the download button. Omit when `content` is set. */
5
+ url?: string;
6
+ /** highlight.js language id, '' for plain text, or 'markdown' (the panel renders markdown instead of highlighting). */
7
+ lang: string;
8
+ /** HTML document: the panel offers a render/source toggle, rendering the markup in a sandboxed iframe. */
9
+ html?: boolean;
10
+ /** SVG document: the panel offers a render/source toggle — render shows the picture, source the XML. */
11
+ svg?: boolean;
12
+ /** ZIP archive: the panel fetches the bytes and hands them to the in-browser archive browser. */
13
+ zip?: boolean;
14
+ /** 7z archive: the panel fetches the bytes and hands them to the in-browser 7z browser. */
15
+ sevenZip?: boolean;
16
+ /**
17
+ * tar-family ('tar': tar/gz/tgz/xz/txz/bz2/tbz2) or rar ('rar') archive: the panel hands the URL + this
18
+ * kind to the generic in-browser ArchiveBrowser, which decompresses the bytes and browses the entries.
19
+ */
20
+ archive?: 'tar' | 'rar';
21
+ /** Native binary object (.so/.dll): the panel hands the URL to the in-browser symbol browser. */
22
+ binobj?: boolean;
23
+ /** E-language (.e/.ec) project: the panel hands the URL to the in-browser EPL viewer (parse + decompile). */
24
+ epl?: boolean;
25
+ /** DICOM (.dcm) medical image: the panel hands the URL to the in-browser DICOM viewer. */
26
+ dicom?: boolean;
27
+ /** Word (.docx) document: the panel hands the URL to the in-browser Word viewer (docx-preview). */
28
+ docx?: boolean;
29
+ /** Excel (.xlsx/.xlsm) workbook: the panel hands the URL to the in-browser spreadsheet viewer (exceljs). */
30
+ xlsx?: boolean;
31
+ /** PowerPoint (.pptx/.pptm/.ppsx) deck: the panel hands the URL to the in-browser slide viewer (pptx-renderer). */
32
+ pptx?: boolean;
33
+ /** Rich Text (.rtf) document: the panel hands the URL to the in-browser rich-text viewer (hand-rolled RTF parser). */
34
+ rtf?: boolean;
35
+ /** PDF (.pdf) document: the panel hands the URL to the in-browser PDF viewer (pdfjs-dist). */
36
+ pdf?: boolean;
37
+ /** OPML / FreeMind (.opml/.mm) outline: the panel fetches the text and renders it as an interactive mind map. */
38
+ mindmap?: boolean;
39
+ /** XMind workbook (.xmind): the panel hands the URL to the in-browser XMind viewer (unzip → mind-map tree). */
40
+ xmind?: boolean;
41
+ /** Email (.eml) message: the panel hands the URL to the in-browser email viewer (MIME parser). */
42
+ eml?: boolean;
43
+ /** Web archive (.mht/.mhtml): the panel hands the URL to the in-browser web-archive viewer (MIME parser). */
44
+ mht?: boolean;
45
+ /** HAR (.har) capture: the panel hands the URL to the in-browser HAR viewer (hand-rolled JSON parser). */
46
+ har?: boolean;
47
+ /** SQLite database (.sqlite/.db/…): the panel hands the URL to the in-browser SQLite viewer (sql.js). */
48
+ sqlite?: boolean;
49
+ /** Certificate / key (.pem/.crt/.der/.csr/.p12/…): the panel hands the URL to the in-browser cert viewer (ASN.1/X.509). */
50
+ cert?: boolean;
51
+ /** Keystore (.jks/.keystore/.jceks + PKCS#12 .p12/.pfx): the panel hands the URL to the in-browser keystore viewer (sniffs format, parse + password decrypt). */
52
+ jks?: boolean;
53
+ /** Subtitle (.srt/.vtt/.ass/.ssa): the panel renders the fetched text as a parsed cue list (render/source toggle). */
54
+ subtitle?: boolean;
55
+ /** CSV / TSV (.csv/.tsv): the panel renders the fetched text as a parsed table (render/source toggle). */
56
+ csv?: boolean;
57
+ /** JSON Lines (.jsonl/.ndjson): the panel renders the fetched text as a record list — truncated rows, click to expand (render/source toggle). */
58
+ jsonl?: boolean;
59
+ /** Java bytecode (.class): the panel hands the URL to the in-browser class viewer (parse structure → fields/methods). */
60
+ javaClass?: boolean;
61
+ /** JVM heap dump (.hprof): the panel hands the URL to the in-browser HPROF viewer (stream-parse → class histogram + per-class object drill-in). */
62
+ hprof?: boolean;
63
+ /** Windows Installer (.msi/.msp/.msm): the panel hands the URL to the in-browser MSI viewer (OLE compound file → product identity + summary). */
64
+ msi?: boolean;
65
+ /** Windows app package (.appx/.msix/.appxbundle/.msixbundle): the panel hands the URL to the in-browser APPX viewer (unzip manifest → identity/deps/capabilities). */
66
+ appx?: boolean;
67
+ /** Font (.ttf/.otf/.woff/.woff2): the panel hands the URL to the in-browser font specimen (FontFace API). */
68
+ font?: boolean;
69
+ /** Jupyter Notebook (.ipynb): the panel hands the URL to the in-browser notebook viewer (hand-rolled JSON parser). */
70
+ ipynb?: boolean;
71
+ /** Geodata (.geojson/.kml/.gpx): the panel renders the fetched text as an offline SVG map (render/source toggle). */
72
+ geo?: boolean;
73
+ /** Audio (mp3/wav/flac/ogg/m4a/aac/opus, or .mid): the panel hands the URL to the in-browser audio player. */
74
+ audio?: boolean;
75
+ /** QQ Music encrypted audio (.mflac/.mgg/…): the panel hands the URL to the QMC player (decrypts in-browser, then plays). */
76
+ qmc?: boolean;
77
+ /** LRC lyrics (.lrc): the panel hands the URL to the lyrics viewer (self-fetches + sniffs GBK, then renders synced lines). */
78
+ lrc?: boolean;
79
+ /** Large text / `.log`: the panel hands the URL to the in-browser streaming log viewer (virtual-scrolled). */
80
+ log?: boolean;
81
+ /** 3D model (.stl/.obj/.ply/.glb/.gltf): the panel hands the URL to the in-browser three.js model viewer. */
82
+ model?: boolean;
83
+ /** Decoding image (TIFF/PSD/HEIC/RAW): the panel hands the URL + kind to the in-browser raster viewer. */
84
+ raster?: 'tiff' | 'psd' | 'heic' | 'raw';
85
+ /** E-book (EPUB/FB2/MOBI/DjVu): the panel hands the URL + kind to the in-browser e-book reader. */
86
+ ebook?: 'epub' | 'fb2' | 'mobi' | 'djvu';
87
+ /** Diagram (.drawio/.excalidraw): the panel renders the fetched text as an SVG (render/source toggle). */
88
+ diagram?: 'drawio' | 'excalidraw';
89
+ /** DXF (.dxf) CAD drawing: the panel hands the URL to the in-browser DXF viewer (parse → SVG, pan/zoom/layers). */
90
+ dxf?: boolean;
91
+ /**
92
+ * Raster image (png/jpg/…/svg-as-picture): rendered inline as a zoomable picture. The main FileChip flow
93
+ * routes images to the LIGHTBOX, so this is set only for archive entries (browsed inside the side viewer,
94
+ * where there is no lightbox) — see classifyViewerFile.
95
+ */
96
+ image?: boolean;
97
+ /** Video (mp4/webm/…): rendered inline with a native <video> player. Like {@link image}, set only for archive entries. */
98
+ video?: boolean;
99
+ /** Unpreviewable binary: the body shows a "can't preview — download" card. Set only for archive entries with no matching viewer. */
100
+ binary?: boolean;
101
+ /**
102
+ * Hex dump: the panel hands the URL to the in-browser hex viewer (offset + raw bytes + ASCII gutter). Never
103
+ * auto-detected — set only when the user picks "十六进制" from the unpreviewable-binary card's "open with"
104
+ * chooser (any bytes can be inspected this way), see FileViewerBody.
105
+ */
106
+ hex?: boolean;
107
+ /** File size in bytes (from the manifest) when known — drives the symbol browser's large-file gate. */
108
+ size?: number;
109
+ /** Inline text to render directly (e.g. a loaded skill's SKILL.md) — when set, the panel skips fetching. */
110
+ content?: string;
111
+ }
112
+ /** Clamp to a sane range: never narrower than MIN_WIDTH, and always leave ~320px for the conversation. */
113
+ declare function setWidth(px: number): void;
114
+ export declare function useFileViewer(): {
115
+ current: import("vue").Ref<{
116
+ name: string;
117
+ url?: string
118
+ /** highlight.js language id, '' for plain text, or 'markdown' (the panel renders markdown instead of highlighting). */
119
+ | undefined;
120
+ lang: string;
121
+ html?: boolean
122
+ /** SVG document: the panel offers a render/source toggle — render shows the picture, source the XML. */
123
+ | undefined;
124
+ svg?: boolean
125
+ /** ZIP archive: the panel fetches the bytes and hands them to the in-browser archive browser. */
126
+ | undefined;
127
+ zip?: boolean
128
+ /** 7z archive: the panel fetches the bytes and hands them to the in-browser 7z browser. */
129
+ | undefined;
130
+ sevenZip?: boolean
131
+ /**
132
+ * tar-family ('tar': tar/gz/tgz/xz/txz/bz2/tbz2) or rar ('rar') archive: the panel hands the URL + this
133
+ * kind to the generic in-browser ArchiveBrowser, which decompresses the bytes and browses the entries.
134
+ */
135
+ | undefined;
136
+ archive?: "tar" | "rar"
137
+ /** Native binary object (.so/.dll): the panel hands the URL to the in-browser symbol browser. */
138
+ | undefined;
139
+ binobj?: boolean
140
+ /** E-language (.e/.ec) project: the panel hands the URL to the in-browser EPL viewer (parse + decompile). */
141
+ | undefined;
142
+ epl?: boolean
143
+ /** DICOM (.dcm) medical image: the panel hands the URL to the in-browser DICOM viewer. */
144
+ | undefined;
145
+ dicom?: boolean
146
+ /** Word (.docx) document: the panel hands the URL to the in-browser Word viewer (docx-preview). */
147
+ | undefined;
148
+ docx?: boolean
149
+ /** Excel (.xlsx/.xlsm) workbook: the panel hands the URL to the in-browser spreadsheet viewer (exceljs). */
150
+ | undefined;
151
+ xlsx?: boolean
152
+ /** PowerPoint (.pptx/.pptm/.ppsx) deck: the panel hands the URL to the in-browser slide viewer (pptx-renderer). */
153
+ | undefined;
154
+ pptx?: boolean
155
+ /** Rich Text (.rtf) document: the panel hands the URL to the in-browser rich-text viewer (hand-rolled RTF parser). */
156
+ | undefined;
157
+ rtf?: boolean
158
+ /** PDF (.pdf) document: the panel hands the URL to the in-browser PDF viewer (pdfjs-dist). */
159
+ | undefined;
160
+ pdf?: boolean
161
+ /** OPML / FreeMind (.opml/.mm) outline: the panel fetches the text and renders it as an interactive mind map. */
162
+ | undefined;
163
+ mindmap?: boolean
164
+ /** XMind workbook (.xmind): the panel hands the URL to the in-browser XMind viewer (unzip → mind-map tree). */
165
+ | undefined;
166
+ xmind?: boolean
167
+ /** Email (.eml) message: the panel hands the URL to the in-browser email viewer (MIME parser). */
168
+ | undefined;
169
+ eml?: boolean
170
+ /** Web archive (.mht/.mhtml): the panel hands the URL to the in-browser web-archive viewer (MIME parser). */
171
+ | undefined;
172
+ mht?: boolean
173
+ /** HAR (.har) capture: the panel hands the URL to the in-browser HAR viewer (hand-rolled JSON parser). */
174
+ | undefined;
175
+ har?: boolean
176
+ /** SQLite database (.sqlite/.db/…): the panel hands the URL to the in-browser SQLite viewer (sql.js). */
177
+ | undefined;
178
+ sqlite?: boolean
179
+ /** Certificate / key (.pem/.crt/.der/.csr/.p12/…): the panel hands the URL to the in-browser cert viewer (ASN.1/X.509). */
180
+ | undefined;
181
+ cert?: boolean
182
+ /** Keystore (.jks/.keystore/.jceks + PKCS#12 .p12/.pfx): the panel hands the URL to the in-browser keystore viewer (sniffs format, parse + password decrypt). */
183
+ | undefined;
184
+ jks?: boolean
185
+ /** Subtitle (.srt/.vtt/.ass/.ssa): the panel renders the fetched text as a parsed cue list (render/source toggle). */
186
+ | undefined;
187
+ subtitle?: boolean
188
+ /** CSV / TSV (.csv/.tsv): the panel renders the fetched text as a parsed table (render/source toggle). */
189
+ | undefined;
190
+ csv?: boolean
191
+ /** JSON Lines (.jsonl/.ndjson): the panel renders the fetched text as a record list — truncated rows, click to expand (render/source toggle). */
192
+ | undefined;
193
+ jsonl?: boolean
194
+ /** Java bytecode (.class): the panel hands the URL to the in-browser class viewer (parse structure → fields/methods). */
195
+ | undefined;
196
+ javaClass?: boolean
197
+ /** JVM heap dump (.hprof): the panel hands the URL to the in-browser HPROF viewer (stream-parse → class histogram + per-class object drill-in). */
198
+ | undefined;
199
+ hprof?: boolean
200
+ /** Windows Installer (.msi/.msp/.msm): the panel hands the URL to the in-browser MSI viewer (OLE compound file → product identity + summary). */
201
+ | undefined;
202
+ msi?: boolean
203
+ /** Windows app package (.appx/.msix/.appxbundle/.msixbundle): the panel hands the URL to the in-browser APPX viewer (unzip manifest → identity/deps/capabilities). */
204
+ | undefined;
205
+ appx?: boolean
206
+ /** Font (.ttf/.otf/.woff/.woff2): the panel hands the URL to the in-browser font specimen (FontFace API). */
207
+ | undefined;
208
+ font?: boolean
209
+ /** Jupyter Notebook (.ipynb): the panel hands the URL to the in-browser notebook viewer (hand-rolled JSON parser). */
210
+ | undefined;
211
+ ipynb?: boolean
212
+ /** Geodata (.geojson/.kml/.gpx): the panel renders the fetched text as an offline SVG map (render/source toggle). */
213
+ | undefined;
214
+ geo?: boolean
215
+ /** Audio (mp3/wav/flac/ogg/m4a/aac/opus, or .mid): the panel hands the URL to the in-browser audio player. */
216
+ | undefined;
217
+ audio?: boolean
218
+ /** QQ Music encrypted audio (.mflac/.mgg/…): the panel hands the URL to the QMC player (decrypts in-browser, then plays). */
219
+ | undefined;
220
+ qmc?: boolean
221
+ /** LRC lyrics (.lrc): the panel hands the URL to the lyrics viewer (self-fetches + sniffs GBK, then renders synced lines). */
222
+ | undefined;
223
+ lrc?: boolean
224
+ /** Large text / `.log`: the panel hands the URL to the in-browser streaming log viewer (virtual-scrolled). */
225
+ | undefined;
226
+ log?: boolean
227
+ /** 3D model (.stl/.obj/.ply/.glb/.gltf): the panel hands the URL to the in-browser three.js model viewer. */
228
+ | undefined;
229
+ model?: boolean
230
+ /** Decoding image (TIFF/PSD/HEIC/RAW): the panel hands the URL + kind to the in-browser raster viewer. */
231
+ | undefined;
232
+ raster?: "tiff" | "psd" | "heic" | "raw"
233
+ /** E-book (EPUB/FB2/MOBI/DjVu): the panel hands the URL + kind to the in-browser e-book reader. */
234
+ | undefined;
235
+ ebook?: "epub" | "fb2" | "mobi" | "djvu"
236
+ /** Diagram (.drawio/.excalidraw): the panel renders the fetched text as an SVG (render/source toggle). */
237
+ | undefined;
238
+ diagram?: "drawio" | "excalidraw"
239
+ /** DXF (.dxf) CAD drawing: the panel hands the URL to the in-browser DXF viewer (parse → SVG, pan/zoom/layers). */
240
+ | undefined;
241
+ dxf?: boolean
242
+ /**
243
+ * Raster image (png/jpg/…/svg-as-picture): rendered inline as a zoomable picture. The main FileChip flow
244
+ * routes images to the LIGHTBOX, so this is set only for archive entries (browsed inside the side viewer,
245
+ * where there is no lightbox) — see classifyViewerFile.
246
+ */
247
+ | undefined;
248
+ image?: boolean
249
+ /** Video (mp4/webm/…): rendered inline with a native <video> player. Like {@link image}, set only for archive entries. */
250
+ | undefined;
251
+ video?: boolean
252
+ /** Unpreviewable binary: the body shows a "can't preview — download" card. Set only for archive entries with no matching viewer. */
253
+ | undefined;
254
+ binary?: boolean
255
+ /**
256
+ * Hex dump: the panel hands the URL to the in-browser hex viewer (offset + raw bytes + ASCII gutter). Never
257
+ * auto-detected — set only when the user picks "十六进制" from the unpreviewable-binary card's "open with"
258
+ * chooser (any bytes can be inspected this way), see FileViewerBody.
259
+ */
260
+ | undefined;
261
+ hex?: boolean
262
+ /** File size in bytes (from the manifest) when known — drives the symbol browser's large-file gate. */
263
+ | undefined;
264
+ size?: number
265
+ /** Inline text to render directly (e.g. a loaded skill's SKILL.md) — when set, the panel skips fetching. */
266
+ | undefined;
267
+ content?: string | undefined;
268
+ } | null, ViewerFile | {
269
+ name: string;
270
+ url?: string
271
+ /** highlight.js language id, '' for plain text, or 'markdown' (the panel renders markdown instead of highlighting). */
272
+ | undefined;
273
+ lang: string;
274
+ html?: boolean
275
+ /** SVG document: the panel offers a render/source toggle — render shows the picture, source the XML. */
276
+ | undefined;
277
+ svg?: boolean
278
+ /** ZIP archive: the panel fetches the bytes and hands them to the in-browser archive browser. */
279
+ | undefined;
280
+ zip?: boolean
281
+ /** 7z archive: the panel fetches the bytes and hands them to the in-browser 7z browser. */
282
+ | undefined;
283
+ sevenZip?: boolean
284
+ /**
285
+ * tar-family ('tar': tar/gz/tgz/xz/txz/bz2/tbz2) or rar ('rar') archive: the panel hands the URL + this
286
+ * kind to the generic in-browser ArchiveBrowser, which decompresses the bytes and browses the entries.
287
+ */
288
+ | undefined;
289
+ archive?: "tar" | "rar"
290
+ /** Native binary object (.so/.dll): the panel hands the URL to the in-browser symbol browser. */
291
+ | undefined;
292
+ binobj?: boolean
293
+ /** E-language (.e/.ec) project: the panel hands the URL to the in-browser EPL viewer (parse + decompile). */
294
+ | undefined;
295
+ epl?: boolean
296
+ /** DICOM (.dcm) medical image: the panel hands the URL to the in-browser DICOM viewer. */
297
+ | undefined;
298
+ dicom?: boolean
299
+ /** Word (.docx) document: the panel hands the URL to the in-browser Word viewer (docx-preview). */
300
+ | undefined;
301
+ docx?: boolean
302
+ /** Excel (.xlsx/.xlsm) workbook: the panel hands the URL to the in-browser spreadsheet viewer (exceljs). */
303
+ | undefined;
304
+ xlsx?: boolean
305
+ /** PowerPoint (.pptx/.pptm/.ppsx) deck: the panel hands the URL to the in-browser slide viewer (pptx-renderer). */
306
+ | undefined;
307
+ pptx?: boolean
308
+ /** Rich Text (.rtf) document: the panel hands the URL to the in-browser rich-text viewer (hand-rolled RTF parser). */
309
+ | undefined;
310
+ rtf?: boolean
311
+ /** PDF (.pdf) document: the panel hands the URL to the in-browser PDF viewer (pdfjs-dist). */
312
+ | undefined;
313
+ pdf?: boolean
314
+ /** OPML / FreeMind (.opml/.mm) outline: the panel fetches the text and renders it as an interactive mind map. */
315
+ | undefined;
316
+ mindmap?: boolean
317
+ /** XMind workbook (.xmind): the panel hands the URL to the in-browser XMind viewer (unzip → mind-map tree). */
318
+ | undefined;
319
+ xmind?: boolean
320
+ /** Email (.eml) message: the panel hands the URL to the in-browser email viewer (MIME parser). */
321
+ | undefined;
322
+ eml?: boolean
323
+ /** Web archive (.mht/.mhtml): the panel hands the URL to the in-browser web-archive viewer (MIME parser). */
324
+ | undefined;
325
+ mht?: boolean
326
+ /** HAR (.har) capture: the panel hands the URL to the in-browser HAR viewer (hand-rolled JSON parser). */
327
+ | undefined;
328
+ har?: boolean
329
+ /** SQLite database (.sqlite/.db/…): the panel hands the URL to the in-browser SQLite viewer (sql.js). */
330
+ | undefined;
331
+ sqlite?: boolean
332
+ /** Certificate / key (.pem/.crt/.der/.csr/.p12/…): the panel hands the URL to the in-browser cert viewer (ASN.1/X.509). */
333
+ | undefined;
334
+ cert?: boolean
335
+ /** Keystore (.jks/.keystore/.jceks + PKCS#12 .p12/.pfx): the panel hands the URL to the in-browser keystore viewer (sniffs format, parse + password decrypt). */
336
+ | undefined;
337
+ jks?: boolean
338
+ /** Subtitle (.srt/.vtt/.ass/.ssa): the panel renders the fetched text as a parsed cue list (render/source toggle). */
339
+ | undefined;
340
+ subtitle?: boolean
341
+ /** CSV / TSV (.csv/.tsv): the panel renders the fetched text as a parsed table (render/source toggle). */
342
+ | undefined;
343
+ csv?: boolean
344
+ /** JSON Lines (.jsonl/.ndjson): the panel renders the fetched text as a record list — truncated rows, click to expand (render/source toggle). */
345
+ | undefined;
346
+ jsonl?: boolean
347
+ /** Java bytecode (.class): the panel hands the URL to the in-browser class viewer (parse structure → fields/methods). */
348
+ | undefined;
349
+ javaClass?: boolean
350
+ /** JVM heap dump (.hprof): the panel hands the URL to the in-browser HPROF viewer (stream-parse → class histogram + per-class object drill-in). */
351
+ | undefined;
352
+ hprof?: boolean
353
+ /** Windows Installer (.msi/.msp/.msm): the panel hands the URL to the in-browser MSI viewer (OLE compound file → product identity + summary). */
354
+ | undefined;
355
+ msi?: boolean
356
+ /** Windows app package (.appx/.msix/.appxbundle/.msixbundle): the panel hands the URL to the in-browser APPX viewer (unzip manifest → identity/deps/capabilities). */
357
+ | undefined;
358
+ appx?: boolean
359
+ /** Font (.ttf/.otf/.woff/.woff2): the panel hands the URL to the in-browser font specimen (FontFace API). */
360
+ | undefined;
361
+ font?: boolean
362
+ /** Jupyter Notebook (.ipynb): the panel hands the URL to the in-browser notebook viewer (hand-rolled JSON parser). */
363
+ | undefined;
364
+ ipynb?: boolean
365
+ /** Geodata (.geojson/.kml/.gpx): the panel renders the fetched text as an offline SVG map (render/source toggle). */
366
+ | undefined;
367
+ geo?: boolean
368
+ /** Audio (mp3/wav/flac/ogg/m4a/aac/opus, or .mid): the panel hands the URL to the in-browser audio player. */
369
+ | undefined;
370
+ audio?: boolean
371
+ /** QQ Music encrypted audio (.mflac/.mgg/…): the panel hands the URL to the QMC player (decrypts in-browser, then plays). */
372
+ | undefined;
373
+ qmc?: boolean
374
+ /** LRC lyrics (.lrc): the panel hands the URL to the lyrics viewer (self-fetches + sniffs GBK, then renders synced lines). */
375
+ | undefined;
376
+ lrc?: boolean
377
+ /** Large text / `.log`: the panel hands the URL to the in-browser streaming log viewer (virtual-scrolled). */
378
+ | undefined;
379
+ log?: boolean
380
+ /** 3D model (.stl/.obj/.ply/.glb/.gltf): the panel hands the URL to the in-browser three.js model viewer. */
381
+ | undefined;
382
+ model?: boolean
383
+ /** Decoding image (TIFF/PSD/HEIC/RAW): the panel hands the URL + kind to the in-browser raster viewer. */
384
+ | undefined;
385
+ raster?: "tiff" | "psd" | "heic" | "raw"
386
+ /** E-book (EPUB/FB2/MOBI/DjVu): the panel hands the URL + kind to the in-browser e-book reader. */
387
+ | undefined;
388
+ ebook?: "epub" | "fb2" | "mobi" | "djvu"
389
+ /** Diagram (.drawio/.excalidraw): the panel renders the fetched text as an SVG (render/source toggle). */
390
+ | undefined;
391
+ diagram?: "drawio" | "excalidraw"
392
+ /** DXF (.dxf) CAD drawing: the panel hands the URL to the in-browser DXF viewer (parse → SVG, pan/zoom/layers). */
393
+ | undefined;
394
+ dxf?: boolean
395
+ /**
396
+ * Raster image (png/jpg/…/svg-as-picture): rendered inline as a zoomable picture. The main FileChip flow
397
+ * routes images to the LIGHTBOX, so this is set only for archive entries (browsed inside the side viewer,
398
+ * where there is no lightbox) — see classifyViewerFile.
399
+ */
400
+ | undefined;
401
+ image?: boolean
402
+ /** Video (mp4/webm/…): rendered inline with a native <video> player. Like {@link image}, set only for archive entries. */
403
+ | undefined;
404
+ video?: boolean
405
+ /** Unpreviewable binary: the body shows a "can't preview — download" card. Set only for archive entries with no matching viewer. */
406
+ | undefined;
407
+ binary?: boolean
408
+ /**
409
+ * Hex dump: the panel hands the URL to the in-browser hex viewer (offset + raw bytes + ASCII gutter). Never
410
+ * auto-detected — set only when the user picks "十六进制" from the unpreviewable-binary card's "open with"
411
+ * chooser (any bytes can be inspected this way), see FileViewerBody.
412
+ */
413
+ | undefined;
414
+ hex?: boolean
415
+ /** File size in bytes (from the manifest) when known — drives the symbol browser's large-file gate. */
416
+ | undefined;
417
+ size?: number
418
+ /** Inline text to render directly (e.g. a loaded skill's SKILL.md) — when set, the panel skips fetching. */
419
+ | undefined;
420
+ content?: string | undefined;
421
+ } | null>;
422
+ width: import("vue").Ref<number, number>;
423
+ setWidth: typeof setWidth;
424
+ isOpen: import("vue").ComputedRef<boolean>;
425
+ open(file: ViewerFile): void;
426
+ close(): void;
427
+ };
428
+ export {};
@@ -0,0 +1,27 @@
1
+ import { computed as e, ref as t } from "vue";
2
+ //#region src/composables/useFileViewer.ts
3
+ var n = t(null), r = 360, i = 760;
4
+ function a() {
5
+ return typeof window > "u" ? 680 : Math.min(i, Math.max(r, Math.round(window.innerWidth * .42)));
6
+ }
7
+ var o = t(a());
8
+ function s(e) {
9
+ let t = typeof window < "u" ? Math.max(r, window.innerWidth - 320) : 900;
10
+ o.value = Math.min(t, Math.max(r, Math.round(e)));
11
+ }
12
+ function c() {
13
+ return {
14
+ current: n,
15
+ width: o,
16
+ setWidth: s,
17
+ isOpen: e(() => n.value !== null),
18
+ open(e) {
19
+ n.value = e;
20
+ },
21
+ close() {
22
+ n.value = null;
23
+ }
24
+ };
25
+ }
26
+ //#endregion
27
+ export { c as useFileViewer };
@@ -0,0 +1,33 @@
1
+ /** Media shown full-screen in the lightbox: its source URL, an alt/title, and the kind to render. */
2
+ export interface LightboxImage {
3
+ src: string;
4
+ alt?: string;
5
+ /** 'video' fetches the source and plays it in a <video> (blob-backed); default 'image' shows an <img>. */
6
+ kind?: 'image' | 'video';
7
+ /** A "long image" (tall screenshot): show it at a readable width inside a vertical-scroll frame, not letterboxed. */
8
+ long?: boolean;
9
+ }
10
+ export declare function useLightbox(): {
11
+ current: import("vue").Ref<{
12
+ src: string;
13
+ alt?: string
14
+ /** 'video' fetches the source and plays it in a <video> (blob-backed); default 'image' shows an <img>. */
15
+ | undefined;
16
+ kind?: "image" | "video"
17
+ /** A "long image" (tall screenshot): show it at a readable width inside a vertical-scroll frame, not letterboxed. */
18
+ | undefined;
19
+ long?: boolean | undefined;
20
+ } | null, LightboxImage | {
21
+ src: string;
22
+ alt?: string
23
+ /** 'video' fetches the source and plays it in a <video> (blob-backed); default 'image' shows an <img>. */
24
+ | undefined;
25
+ kind?: "image" | "video"
26
+ /** A "long image" (tall screenshot): show it at a readable width inside a vertical-scroll frame, not letterboxed. */
27
+ | undefined;
28
+ long?: boolean | undefined;
29
+ } | null>;
30
+ isOpen: import("vue").ComputedRef<boolean>;
31
+ open(img: LightboxImage): void;
32
+ close(): void;
33
+ };
@@ -0,0 +1,17 @@
1
+ import { computed as e, ref as t } from "vue";
2
+ //#region src/composables/useLightbox.ts
3
+ var n = t(null);
4
+ function r() {
5
+ return {
6
+ current: n,
7
+ isOpen: e(() => n.value !== null),
8
+ open(e) {
9
+ e.src && (n.value = e);
10
+ },
11
+ close() {
12
+ n.value = null;
13
+ }
14
+ };
15
+ }
16
+ //#endregion
17
+ export { r as useLightbox };
@@ -0,0 +1,47 @@
1
+ /**
2
+ * A single line-coloring rule for the log viewer: match lines by substring or regex, then paint their
3
+ * background and/or text. Rules apply top-to-bottom, first match wins (see LogViewer's `styleFor`).
4
+ */
5
+ export interface ColorRule {
6
+ id: string;
7
+ pattern: string;
8
+ regex: boolean;
9
+ caseSensitive: boolean;
10
+ bgOn: boolean;
11
+ bg: string;
12
+ fgOn: boolean;
13
+ fg: string;
14
+ enabled: boolean;
15
+ }
16
+ export declare function defaultRule(): ColorRule;
17
+ /**
18
+ * Persisted, browser-global line-coloring rules for the log viewer. A singleton (like {@link useListPrefs})
19
+ * so the set sticks across navigation and reloads; every mutation reassigns/deep-touches `rules` so the
20
+ * watcher writes through to localStorage.
21
+ */
22
+ export declare function useLogRules(): {
23
+ rules: import("vue").Ref<{
24
+ id: string;
25
+ pattern: string;
26
+ regex: boolean;
27
+ caseSensitive: boolean;
28
+ bgOn: boolean;
29
+ bg: string;
30
+ fgOn: boolean;
31
+ fg: string;
32
+ enabled: boolean;
33
+ }[], ColorRule[] | {
34
+ id: string;
35
+ pattern: string;
36
+ regex: boolean;
37
+ caseSensitive: boolean;
38
+ bgOn: boolean;
39
+ bg: string;
40
+ fgOn: boolean;
41
+ fg: string;
42
+ enabled: boolean;
43
+ }[]>;
44
+ add: () => void;
45
+ remove: (id: string) => void;
46
+ move: (id: string, dir: -1 | 1) => void;
47
+ };
@@ -0,0 +1,74 @@
1
+ import { ref as e, watch as t } from "vue";
2
+ //#region src/composables/useLogRules.ts
3
+ var n = "viewer-log-color-rules";
4
+ function r() {
5
+ try {
6
+ return crypto.randomUUID();
7
+ } catch {
8
+ return "r" + Date.now().toString(36) + Math.floor(Math.random() * 1e9).toString(36);
9
+ }
10
+ }
11
+ function i() {
12
+ return {
13
+ id: r(),
14
+ pattern: "",
15
+ regex: !1,
16
+ caseSensitive: !1,
17
+ bgOn: !0,
18
+ bg: "#fde68a",
19
+ fgOn: !1,
20
+ fg: "#111827",
21
+ enabled: !0
22
+ };
23
+ }
24
+ function a(e) {
25
+ if (!e || typeof e != "object") return null;
26
+ let t = e, n = i();
27
+ return {
28
+ id: typeof t.id == "string" ? t.id : n.id,
29
+ pattern: typeof t.pattern == "string" ? t.pattern : "",
30
+ regex: !!t.regex,
31
+ caseSensitive: !!t.caseSensitive,
32
+ bgOn: t.bgOn !== !1,
33
+ bg: typeof t.bg == "string" ? t.bg : n.bg,
34
+ fgOn: !!t.fgOn,
35
+ fg: typeof t.fg == "string" ? t.fg : n.fg,
36
+ enabled: t.enabled !== !1
37
+ };
38
+ }
39
+ function o() {
40
+ if (typeof localStorage < "u") try {
41
+ let e = localStorage.getItem(n);
42
+ if (e) {
43
+ let t = JSON.parse(e);
44
+ if (Array.isArray(t)) return t.map(a).filter((e) => e !== null);
45
+ }
46
+ } catch {}
47
+ return [];
48
+ }
49
+ var s = e(o());
50
+ t(s, (e) => {
51
+ if (typeof localStorage < "u") try {
52
+ localStorage.setItem(n, JSON.stringify(e));
53
+ } catch {}
54
+ }, { deep: !0 });
55
+ function c() {
56
+ function e() {
57
+ s.value = [...s.value, i()];
58
+ }
59
+ function t(e) {
60
+ s.value = s.value.filter((t) => t.id !== e);
61
+ }
62
+ function n(e, t) {
63
+ let n = [...s.value], r = n.findIndex((t) => t.id === e), i = r + t;
64
+ r < 0 || i < 0 || i >= n.length || ([n[r], n[i]] = [n[i], n[r]], s.value = n);
65
+ }
66
+ return {
67
+ rules: s,
68
+ add: e,
69
+ remove: t,
70
+ move: n
71
+ };
72
+ }
73
+ //#endregion
74
+ export { c as useLogRules };