@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,362 @@
1
+ import { formatBytes as e } from "../lib/format.js";
2
+ import { DicomError as t, readDicom as n } from "../lib/dicom.js";
3
+ import { UnsupportedTransferSyntaxError as r, decodeDicomFrame as i, transferSyntaxName as a } from "../lib/dicomCodecs.js";
4
+ import { autoWindow as o, buildFramePixels as s, renderToImageData as c } from "../lib/dicomRender.js";
5
+ import { Fragment as l, computed as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, defineComponent as m, nextTick as ee, normalizeClass as h, onBeforeUnmount as te, onMounted as ne, openBlock as g, ref as _, renderList as v, toDisplayString as y, unref as re, vModelSelect as ie, vModelText as ae, watch as b, withDirectives as oe, withModifiers as se } from "vue";
6
+ //#region src/components/DicomViewer.vue?vue&type=script&setup=true&lang.ts
7
+ var ce = { class: "dv" }, le = {
8
+ key: 0,
9
+ class: "dv__msg"
10
+ }, ue = {
11
+ key: 1,
12
+ class: "dv__msg dv__msg--error"
13
+ }, de = ["href", "download"], fe = { class: "dv__bar" }, pe = { class: "dv__group" }, me = { class: "dv__zoom" }, he = { class: "dv__group" }, ge = ["disabled"], _e = ["disabled"], ve = {
14
+ key: 0,
15
+ class: "dv__decoding"
16
+ }, ye = { class: "dv__meta-head" }, be = { class: "dv__meta-title" }, xe = { class: "dv__meta-label" }, Se = { class: "dv__meta-val" }, Ce = {
17
+ key: 0,
18
+ class: "dv__meta-empty"
19
+ }, we = {
20
+ key: 0,
21
+ class: "dv__frames"
22
+ }, Te = ["title"], Ee = ["disabled"], De = ["max"], Oe = ["disabled"], ke = { class: "dv__frameno" }, Ae = {
23
+ key: 1,
24
+ class: "dv__info"
25
+ }, je = {
26
+ key: 0,
27
+ class: "dv__tag"
28
+ }, Me = {
29
+ key: 1,
30
+ class: "dv__series"
31
+ }, Ne = {
32
+ key: 2,
33
+ class: "dv__wl"
34
+ }, Pe = { class: "dv__ts" }, Fe = { key: 3 }, Ie = ["title"], x = /*@__PURE__*/ m({
35
+ __name: "DicomViewer",
36
+ props: {
37
+ url: {},
38
+ name: {},
39
+ size: {},
40
+ slices: {},
41
+ start: {}
42
+ },
43
+ setup(m) {
44
+ let x = m, S = u(() => (x.slices?.length ?? 0) > 1), C = _("loading"), w = _(""), T = _(null), E = _(null), D = _(0), O = _(!1), k = /* @__PURE__ */ new Map(), A = _(!1), j = _(5), M = 0, N = 0, P = _(0), F = _(1), I = _(!1), L = _(1), R = 0, Le = 1, z = _(null), B = _(null), V = 1, H = u(() => T.value?.meta ?? null), U = _(!1), W = u(() => T.value?.tags ?? []), G = u(() => E.value?.mode === "gray"), K = u(() => S.value ? x.slices.length : H.value?.numberOfFrames ?? 1), Re = u(() => H.value ? a(H.value.transferSyntaxUid) : "");
45
+ async function q() {
46
+ C.value = "loading", w.value = "", T.value = null, E.value = null, L.value = 1, I.value = !1, U.value = !1, Q(), k.clear(), N++;
47
+ let e = S.value && x.start != null ? Math.min(Math.max(0, x.start), x.slices.length - 1) : 0;
48
+ D.value = e;
49
+ try {
50
+ if (!S.value) {
51
+ let e = await fetch(x.url ?? "");
52
+ if (!e.ok) throw Error(`HTTP ${e.status}`);
53
+ T.value = n(await e.arrayBuffer());
54
+ }
55
+ await Ve(e, !0) && He();
56
+ } catch (e) {
57
+ ze(e);
58
+ }
59
+ }
60
+ function ze(e) {
61
+ w.value = e instanceof t || e instanceof r || e instanceof Error ? e.message : String(e), C.value = "error";
62
+ }
63
+ async function Be(e) {
64
+ if (S.value) {
65
+ let t = n(await x.slices[e].load());
66
+ return T.value ??= t, s(await i(t.meta, t.frameBytes(0)), t.meta);
67
+ }
68
+ let t = T.value;
69
+ return s(await i(t.meta, t.frameBytes(e)), t.meta);
70
+ }
71
+ async function Ve(e, t) {
72
+ if (!S.value && !T.value) return !1;
73
+ let n = k.get(e);
74
+ if (!n) {
75
+ O.value = !0;
76
+ try {
77
+ n = await Be(e), k.set(e, n);
78
+ } catch (e) {
79
+ return ze(e), !1;
80
+ } finally {
81
+ O.value = !1;
82
+ }
83
+ }
84
+ if (e !== D.value) return !1;
85
+ E.value = n;
86
+ let r = T.value?.meta;
87
+ if (t && n.mode === "gray" && r) {
88
+ let e = r.windowCenter != null && r.windowWidth != null && r.windowWidth > 0 ? {
89
+ center: r.windowCenter,
90
+ width: r.windowWidth
91
+ } : o(n);
92
+ P.value = e.center, F.value = e.width, R = e.center, Le = e.width;
93
+ }
94
+ let i = C.value !== "ready";
95
+ return C.value = "ready", i && (await ee(), X()), Y(), !0;
96
+ }
97
+ async function He() {
98
+ let e = K.value;
99
+ if (e <= 1 || !S.value && !T.value) return;
100
+ let t = ++N;
101
+ for (let n = 0; n < e; n++) {
102
+ if (t !== N) return;
103
+ if (!k.has(n)) try {
104
+ let e = await Be(n);
105
+ if (t !== N) return;
106
+ k.set(n, e);
107
+ } catch {}
108
+ await new Promise((e) => setTimeout(e, 0));
109
+ }
110
+ }
111
+ let J = 0;
112
+ function Ue() {
113
+ J ||= requestAnimationFrame(() => {
114
+ J = 0, Y();
115
+ });
116
+ }
117
+ function Y() {
118
+ let e = E.value, t = z.value;
119
+ if (!e || !t) return;
120
+ t.width !== e.width && (t.width = e.width), t.height !== e.height && (t.height = e.height);
121
+ let n = t.getContext("2d");
122
+ if (!n) return;
123
+ let r = c(e, {
124
+ windowCenter: P.value,
125
+ windowWidth: F.value,
126
+ invert: I.value
127
+ });
128
+ n.putImageData(r, 0, 0), Z();
129
+ }
130
+ function X() {
131
+ let e = B.value, t = E.value;
132
+ if (!e || !t) return;
133
+ let n = Math.max(1, e.clientWidth - 24), r = Math.max(1, e.clientHeight - 24), i = Math.min(n / t.width, r / t.height);
134
+ V = Number.isFinite(i) && i > 0 ? i : 1;
135
+ }
136
+ function Z() {
137
+ let e = z.value, t = E.value;
138
+ if (!e || !t) return;
139
+ let n = V * L.value;
140
+ e.style.width = `${Math.max(1, Math.round(t.width * n))}px`, e.style.height = `${Math.max(1, Math.round(t.height * n))}px`;
141
+ }
142
+ function We(e) {
143
+ if (e.button !== 0 || !G.value) return;
144
+ e.preventDefault();
145
+ let t = e.currentTarget;
146
+ t.setPointerCapture(e.pointerId);
147
+ let n = e.clientX, r = e.clientY, i = F.value, a = P.value, o = E.value, s = o && o.maxValue - o.minValue || 255, c = Math.max(1, s / 512), l = (e) => {
148
+ F.value = Math.max(1, i + (e.clientX - n) * c), P.value = a + (e.clientY - r) * c, Ue();
149
+ }, u = (e) => {
150
+ t.releasePointerCapture(e.pointerId), t.removeEventListener("pointermove", l), t.removeEventListener("pointerup", u);
151
+ };
152
+ t.addEventListener("pointermove", l), t.addEventListener("pointerup", u);
153
+ }
154
+ function Ge(e) {
155
+ if (e.preventDefault(), K.value > 1 && !e.ctrlKey && !e.shiftKey) {
156
+ Q(), Ke(e.deltaY > 0 ? 1 : -1);
157
+ return;
158
+ }
159
+ let t = e.deltaY < 0 ? 1.12 : 1 / 1.12;
160
+ L.value = Math.min(20, Math.max(.1, L.value * t)), Z();
161
+ }
162
+ function Ke(e) {
163
+ let t = K.value;
164
+ t <= 1 || (D.value = Math.min(t - 1, Math.max(0, D.value + e)));
165
+ }
166
+ function qe() {
167
+ A.value ? Q() : Je();
168
+ }
169
+ function Je() {
170
+ if (K.value <= 1 || A.value) return;
171
+ A.value = !0;
172
+ let e = () => {
173
+ if (!A.value) return;
174
+ let t = K.value;
175
+ D.value = (D.value + 1) % t, M = window.setTimeout(e, Math.max(20, Math.round(1e3 / j.value)));
176
+ };
177
+ e();
178
+ }
179
+ function Q() {
180
+ A.value = !1, M &&= (clearTimeout(M), 0);
181
+ }
182
+ function Ye(e) {
183
+ L.value = Math.min(20, Math.max(.1, L.value * e)), Z();
184
+ }
185
+ function Xe() {
186
+ L.value = 1, X(), Z();
187
+ }
188
+ function Ze() {
189
+ L.value = 1, I.value = !1, E.value?.mode === "gray" && (P.value = R, F.value = Le), X(), Y();
190
+ }
191
+ b(D, (e) => {
192
+ C.value === "ready" && Ve(e, !1);
193
+ }), b(I, Ue);
194
+ let $ = null;
195
+ ne(() => {
196
+ q(), typeof ResizeObserver < "u" && B.value && ($ = new ResizeObserver(() => {
197
+ X(), Z();
198
+ }), $.observe(B.value));
199
+ }), b([() => x.url, () => x.slices], q), te(() => {
200
+ Q(), N++, J && cancelAnimationFrame(J), $?.disconnect();
201
+ });
202
+ let Qe = u(() => Math.round(P.value)), $e = u(() => Math.round(F.value)), et = u(() => `${Math.round(V * L.value * 100)}%`);
203
+ return (t, n) => (g(), f("div", ce, [C.value === "loading" ? (g(), f("p", le, "加载并解码 DICOM…")) : C.value === "error" ? (g(), f("div", ue, [
204
+ p("p", null, y(w.value), 1),
205
+ p("a", {
206
+ class: "dv__dl",
207
+ href: m.url,
208
+ download: m.name
209
+ }, "下载原文件", 8, de),
210
+ p("button", {
211
+ type: "button",
212
+ class: "dv__retry",
213
+ onClick: q
214
+ }, "重试")
215
+ ])) : (g(), f(l, { key: 2 }, [
216
+ p("div", fe, [p("div", pe, [
217
+ p("button", {
218
+ type: "button",
219
+ class: "dv__btn",
220
+ title: "缩小",
221
+ onClick: n[0] ||= (e) => Ye(1 / 1.2)
222
+ }, "−"),
223
+ p("span", me, y(et.value), 1),
224
+ p("button", {
225
+ type: "button",
226
+ class: "dv__btn",
227
+ title: "放大",
228
+ onClick: n[1] ||= (e) => Ye(1.2)
229
+ }, "+"),
230
+ p("button", {
231
+ type: "button",
232
+ class: "dv__btn",
233
+ title: "适应窗口",
234
+ onClick: Xe
235
+ }, "适应")
236
+ ]), p("div", he, [
237
+ p("button", {
238
+ type: "button",
239
+ class: h(["dv__btn", { "dv__btn--on": I.value }]),
240
+ disabled: !G.value,
241
+ title: "反相显示",
242
+ onClick: n[2] ||= (e) => I.value = !I.value
243
+ }, " 反相 ", 10, ge),
244
+ p("button", {
245
+ type: "button",
246
+ class: "dv__btn",
247
+ title: "重置窗位/缩放",
248
+ onClick: Ze
249
+ }, " 重置 "),
250
+ p("button", {
251
+ type: "button",
252
+ class: h(["dv__btn", { "dv__btn--on": U.value }]),
253
+ disabled: !W.value.length,
254
+ title: "DICOM 元数据",
255
+ onClick: n[3] ||= (e) => U.value = !U.value
256
+ }, " 信息 ", 10, _e)
257
+ ])]),
258
+ p("div", {
259
+ ref_key: "stageRef",
260
+ ref: B,
261
+ class: "dv__stage",
262
+ onWheel: Ge
263
+ }, [
264
+ p("canvas", {
265
+ ref_key: "canvasRef",
266
+ ref: z,
267
+ class: h(["dv__canvas", { "dv__canvas--wl": G.value }]),
268
+ onPointerdown: We
269
+ }, null, 34),
270
+ O.value ? (g(), f("span", ve, "解码中…")) : d("", !0),
271
+ U.value ? (g(), f("div", {
272
+ key: 1,
273
+ class: "dv__meta",
274
+ onWheel: n[5] ||= se(() => {}, ["stop"])
275
+ }, [
276
+ p("div", ye, [n[10] ||= p("span", null, "DICOM 元数据", -1), p("button", {
277
+ type: "button",
278
+ class: "dv__meta-close",
279
+ title: "关闭",
280
+ onClick: n[4] ||= (e) => U.value = !1
281
+ }, " ✕ ")]),
282
+ (g(!0), f(l, null, v(W.value, (e) => (g(), f("div", {
283
+ key: e.title,
284
+ class: "dv__meta-group"
285
+ }, [p("h4", be, y(e.title), 1), (g(!0), f(l, null, v(e.rows, (e) => (g(), f("div", {
286
+ key: e.label,
287
+ class: "dv__meta-row"
288
+ }, [p("span", xe, y(e.label), 1), p("span", Se, y(e.value), 1)]))), 128))]))), 128)),
289
+ W.value.length ? d("", !0) : (g(), f("p", Ce, "无可显示的元数据"))
290
+ ], 32)) : d("", !0)
291
+ ], 544),
292
+ K.value > 1 ? (g(), f("div", we, [
293
+ p("button", {
294
+ type: "button",
295
+ class: h(["dv__btn", { "dv__btn--on": A.value }]),
296
+ title: A.value ? "暂停" : "播放(循环)",
297
+ onClick: qe
298
+ }, y(A.value ? "⏸" : "▶"), 11, Te),
299
+ oe(p("select", {
300
+ "onUpdate:modelValue": n[6] ||= (e) => j.value = e,
301
+ class: "dv__fps",
302
+ title: "播放速度(帧/秒)"
303
+ }, [...n[11] ||= [
304
+ p("option", { value: 5 }, "5 fps", -1),
305
+ p("option", { value: 10 }, "10 fps", -1),
306
+ p("option", { value: 15 }, "15 fps", -1),
307
+ p("option", { value: 24 }, "24 fps", -1)
308
+ ]], 512), [[
309
+ ie,
310
+ j.value,
311
+ void 0,
312
+ { number: !0 }
313
+ ]]),
314
+ p("button", {
315
+ type: "button",
316
+ class: "dv__btn",
317
+ disabled: D.value <= 0,
318
+ onClick: n[7] ||= (e) => (Q(), D.value = Math.max(0, D.value - 1))
319
+ }, " ‹ ", 8, Ee),
320
+ oe(p("input", {
321
+ "onUpdate:modelValue": n[8] ||= (e) => D.value = e,
322
+ type: "range",
323
+ class: "dv__range",
324
+ min: "0",
325
+ max: K.value - 1,
326
+ step: "1",
327
+ onPointerdown: Q
328
+ }, null, 40, De), [[
329
+ ae,
330
+ D.value,
331
+ void 0,
332
+ { number: !0 }
333
+ ]]),
334
+ p("button", {
335
+ type: "button",
336
+ class: "dv__btn",
337
+ disabled: D.value >= K.value - 1,
338
+ onClick: n[9] ||= (e) => (Q(), D.value = Math.min(K.value - 1, D.value + 1))
339
+ }, " › ", 8, Oe),
340
+ p("span", ke, y(D.value + 1) + " / " + y(K.value), 1),
341
+ n[12] ||= p("span", { class: "dv__hint" }, "滚轮切换层面", -1)
342
+ ])) : d("", !0),
343
+ H.value ? (g(), f("div", Ae, [
344
+ H.value.modality ? (g(), f("span", je, y(H.value.modality), 1)) : d("", !0),
345
+ S.value ? (g(), f("span", Me, "序列 · " + y(K.value) + " 层", 1)) : d("", !0),
346
+ p("span", null, y(H.value.columns) + "×" + y(H.value.rows), 1),
347
+ p("span", null, y(H.value.bitsStored) + "/" + y(H.value.bitsAllocated) + "-bit", 1),
348
+ p("span", null, y(H.value.photometric), 1),
349
+ G.value ? (g(), f("span", Ne, "窗位 C " + y(Qe.value) + " · W " + y($e.value), 1)) : d("", !0),
350
+ p("span", Pe, y(Re.value), 1),
351
+ x.size ? (g(), f("span", Fe, y(re(e)(x.size)), 1)) : d("", !0),
352
+ H.value.seriesDescription ? (g(), f("span", {
353
+ key: 4,
354
+ class: "dv__desc",
355
+ title: H.value.seriesDescription
356
+ }, y(H.value.seriesDescription), 9, Ie)) : d("", !0)
357
+ ])) : d("", !0)
358
+ ], 64))]));
359
+ }
360
+ });
361
+ //#endregion
362
+ export { x as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./DocxViewer.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/DocxViewer.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-9bff4ace"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Side-viewer Word (`.docx`) renderer. Fetches the document bytes from the download URL and renders the
3
+ * OOXML to HTML entirely in-browser via docx-preview (https://github.com/VolodymyrBaydalka/docxjs) — a
4
+ * paginated, paper-like preview (white pages on a neutral canvas, like Word). No CDN / network beyond the
5
+ * file fetch: docx-preview bundles its own jszip + renderer, and images are inlined as base64.
6
+ *
7
+ * Two entry shapes mirror the other browsers (DICOM/zip): a real download URL for a held attachment, or a
8
+ * blob URL minted by the archive browsers from already-extracted bytes. docx-preview injects its own CSS
9
+ * into the render container, prefixed with the `className` ('docx') so it can't leak onto the page.
10
+ */
11
+ type __VLS_Props = {
12
+ /** Download/blob URL of the .docx bytes. */
13
+ url?: string;
14
+ name: string;
15
+ size?: number;
16
+ };
17
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,59 @@
1
+ import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, defineComponent as r, onBeforeUnmount as i, onMounted as a, openBlock as o, ref as s, toDisplayString as c, vShow as l, watch as u, withDirectives as d } from "vue";
2
+ import { renderAsync as f } from "docx-preview";
3
+ //#region src/components/DocxViewer.vue?vue&type=script&setup=true&lang.ts
4
+ var p = { class: "dx" }, m = {
5
+ key: 0,
6
+ class: "dx__msg"
7
+ }, h = {
8
+ key: 1,
9
+ class: "dx__msg dx__msg--error"
10
+ }, g = /*@__PURE__*/ r({
11
+ __name: "DocxViewer",
12
+ props: {
13
+ url: {},
14
+ name: {},
15
+ size: {}
16
+ },
17
+ setup(r) {
18
+ let g = r, _ = s("loading"), v = s(""), y = s(null);
19
+ async function b() {
20
+ let e = y.value;
21
+ if (!(!g.url || !e)) {
22
+ _.value = "loading", v.value = "", e.innerHTML = "";
23
+ try {
24
+ let t = await fetch(g.url);
25
+ if (!t.ok) throw Error(`HTTP ${t.status}`);
26
+ let n = await t.arrayBuffer();
27
+ if (y.value !== e || (await f(n, e, void 0, {
28
+ className: "docx",
29
+ inWrapper: !0,
30
+ ignoreWidth: !0,
31
+ ignoreHeight: !0,
32
+ breakPages: !0,
33
+ renderHeaders: !0,
34
+ renderFooters: !0,
35
+ renderFootnotes: !0,
36
+ renderEndnotes: !0,
37
+ useBase64URL: !0
38
+ }), y.value !== e)) return;
39
+ _.value = "ready";
40
+ } catch (e) {
41
+ v.value = e instanceof Error ? e.message : String(e), _.value = "error";
42
+ }
43
+ }
44
+ }
45
+ return a(b), u(() => g.url, b), i(() => {
46
+ y.value && (y.value.innerHTML = "");
47
+ }), (r, i) => (o(), t("div", p, [_.value === "loading" ? (o(), t("p", m, "正在渲染 Word 文档…")) : _.value === "error" ? (o(), t("div", h, [n("p", null, "渲染失败:" + c(v.value), 1), n("button", {
48
+ type: "button",
49
+ class: "dx__retry",
50
+ onClick: b
51
+ }, "重试")])) : e("", !0), d(n("div", {
52
+ ref_key: "docEl",
53
+ ref: y,
54
+ class: "dx__doc"
55
+ }, null, 512), [[l, _.value === "ready"]])]));
56
+ }
57
+ });
58
+ //#endregion
59
+ export { g as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./DrawioViewer.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/DrawioViewer.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-70c38c16"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,16 @@
1
+ import { type DiagramKind } from '@/lib/diagram';
2
+ /**
3
+ * Renders a .drawio (mxGraph) or .excalidraw scene as an inline SVG (see lib/diagram.ts — hand-rolled,
4
+ * zero-dependency, best-effort). Consumes the text the side viewer already fetched (no second download),
5
+ * like the subtitle/geo/csv renderers. Rendering is async (drawio diagrams are usually DEFLATE-compressed).
6
+ * The produced SVG is OUR markup built from the parsed geometry, so v-html is safe; on a parse failure the
7
+ * user can fall back to the source toggle (raw XML/JSON) or download the file.
8
+ */
9
+ type __VLS_Props = {
10
+ text: string;
11
+ name: string;
12
+ kind: DiagramKind;
13
+ };
14
+ 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>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,38 @@
1
+ import { renderDiagram as e } from "../lib/diagram.js";
2
+ import { createElementBlock as t, createElementVNode as n, defineComponent as r, openBlock as i, ref as a, toDisplayString as o, watch as s } from "vue";
3
+ //#region src/components/DrawioViewer.vue?vue&type=script&setup=true&lang.ts
4
+ var c = { class: "dgm" }, l = {
5
+ key: 0,
6
+ class: "dgm__msg"
7
+ }, u = {
8
+ key: 1,
9
+ class: "dgm__msg dgm__msg--error"
10
+ }, d = { class: "dgm__hint" }, f = ["innerHTML"], p = /*@__PURE__*/ r({
11
+ __name: "DrawioViewer",
12
+ props: {
13
+ text: {},
14
+ name: {},
15
+ kind: {}
16
+ },
17
+ setup(r) {
18
+ let p = r, m = a("loading"), h = a(""), g = a("");
19
+ async function _() {
20
+ m.value = "loading", g.value = "", h.value = "";
21
+ let t = p.text;
22
+ try {
23
+ let n = await e(t, p.kind);
24
+ if (p.text !== t) return;
25
+ h.value = n, m.value = "ready";
26
+ } catch (e) {
27
+ g.value = e instanceof Error ? e.message : String(e), m.value = "error";
28
+ }
29
+ }
30
+ return s(() => [p.text, p.kind], _, { immediate: !0 }), (e, a) => (i(), t("div", c, [m.value === "loading" ? (i(), t("p", l, "正在渲染图表…")) : m.value === "error" ? (i(), t("div", u, [n("p", null, "无法渲染该图表:" + o(g.value), 1), n("p", d, " 可切换到「源码」查看原始 " + o(r.kind === "excalidraw" ? "JSON" : "XML") + ",或下载后用对应工具打开。 ", 1)])) : (i(), t("div", {
31
+ key: 2,
32
+ class: "dgm__scroll",
33
+ innerHTML: h.value
34
+ }, null, 8, f))]));
35
+ }
36
+ });
37
+ //#endregion
38
+ export { p as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./DxfViewer.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/DxfViewer.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-b18ead98"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Side-viewer for AutoCAD DXF drawings (.dxf). Fetches the text, parses it in-browser (see lib/dxf.ts —
3
+ * hand-rolled, zero-dependency) into drawable primitives, and draws them as an SVG. DXF Y is up, so the whole
4
+ * drawing is rendered inside a y-flip group (text is flipped back locally to stay upright). Drag to pan, wheel
5
+ * to zoom; toggle layers in the list. Binary DXF isn't supported.
6
+ */
7
+ type __VLS_Props = {
8
+ url?: string;
9
+ name: string;
10
+ size?: number;
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;