@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.
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/dist/FileViewer.js +7 -0
- package/dist/FileViewer.vue.d.ts +37 -0
- package/dist/FileViewer.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/components/AppxViewer.js +7 -0
- package/dist/components/AppxViewer.vue.d.ts +18 -0
- package/dist/components/AppxViewer.vue_vue_type_script_setup_true_lang.js +174 -0
- package/dist/components/ArchiveBrowser.js +7 -0
- package/dist/components/ArchiveBrowser.vue.d.ts +18 -0
- package/dist/components/ArchiveBrowser.vue_vue_type_script_setup_true_lang.js +279 -0
- package/dist/components/AudioViewer.js +7 -0
- package/dist/components/AudioViewer.vue.d.ts +21 -0
- package/dist/components/AudioViewer.vue_vue_type_script_setup_true_lang.js +201 -0
- package/dist/components/BinObjBrowser.js +7 -0
- package/dist/components/BinObjBrowser.vue.d.ts +19 -0
- package/dist/components/BinObjBrowser.vue_vue_type_script_setup_true_lang.js +141 -0
- package/dist/components/CertViewer.js +7 -0
- package/dist/components/CertViewer.vue.d.ts +17 -0
- package/dist/components/CertViewer.vue_vue_type_script_setup_true_lang.js +251 -0
- package/dist/components/ClassViewer.js +7 -0
- package/dist/components/ClassViewer.vue.d.ts +15 -0
- package/dist/components/ClassViewer.vue_vue_type_script_setup_true_lang.js +164 -0
- package/dist/components/CodeBlock.js +7 -0
- package/dist/components/CodeBlock.vue.d.ts +17 -0
- package/dist/components/CodeBlock.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/components/CodeView.js +7 -0
- package/dist/components/CodeView.vue.d.ts +21 -0
- package/dist/components/CodeView.vue_vue_type_script_setup_true_lang.js +180 -0
- package/dist/components/CsvViewer.js +7 -0
- package/dist/components/CsvViewer.vue.d.ts +26 -0
- package/dist/components/CsvViewer.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/components/DicomViewer.js +7 -0
- package/dist/components/DicomViewer.vue.d.ts +30 -0
- package/dist/components/DicomViewer.vue_vue_type_script_setup_true_lang.js +362 -0
- package/dist/components/DocxViewer.js +7 -0
- package/dist/components/DocxViewer.vue.d.ts +19 -0
- package/dist/components/DocxViewer.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/DrawioViewer.js +7 -0
- package/dist/components/DrawioViewer.vue.d.ts +16 -0
- package/dist/components/DrawioViewer.vue_vue_type_script_setup_true_lang.js +38 -0
- package/dist/components/DxfViewer.js +7 -0
- package/dist/components/DxfViewer.vue.d.ts +14 -0
- package/dist/components/DxfViewer.vue_vue_type_script_setup_true_lang.js +239 -0
- package/dist/components/EbookViewer.js +7 -0
- package/dist/components/EbookViewer.vue.d.ts +22 -0
- package/dist/components/EbookViewer.vue_vue_type_script_setup_true_lang.js +170 -0
- package/dist/components/EmlViewer.js +7 -0
- package/dist/components/EmlViewer.vue.d.ts +21 -0
- package/dist/components/EmlViewer.vue_vue_type_script_setup_true_lang.js +193 -0
- package/dist/components/EplViewer.js +7 -0
- package/dist/components/EplViewer.vue.d.ts +19 -0
- package/dist/components/EplViewer.vue_vue_type_script_setup_true_lang.js +201 -0
- package/dist/components/FileViewerBody.js +7 -0
- package/dist/components/FileViewerBody.vue.d.ts +47 -0
- package/dist/components/FileViewerBody.vue_vue_type_script_setup_true_lang.js +599 -0
- package/dist/components/FileViewerPanel.js +7 -0
- package/dist/components/FileViewerPanel.vue.d.ts +3 -0
- package/dist/components/FileViewerPanel.vue_vue_type_script_setup_true_lang.js +207 -0
- package/dist/components/FontViewer.js +7 -0
- package/dist/components/FontViewer.vue.d.ts +17 -0
- package/dist/components/FontViewer.vue_vue_type_script_setup_true_lang.js +120 -0
- package/dist/components/FrontmatterCard.js +7 -0
- package/dist/components/FrontmatterCard.vue.d.ts +11 -0
- package/dist/components/FrontmatterCard.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/components/GeoViewer.js +7 -0
- package/dist/components/GeoViewer.vue.d.ts +17 -0
- package/dist/components/GeoViewer.vue_vue_type_script_setup_true_lang.js +255 -0
- package/dist/components/HarViewer.js +7 -0
- package/dist/components/HarViewer.vue.d.ts +20 -0
- package/dist/components/HarViewer.vue_vue_type_script_setup_true_lang.js +322 -0
- package/dist/components/HexViewer.js +7 -0
- package/dist/components/HexViewer.vue.d.ts +22 -0
- package/dist/components/HexViewer.vue_vue_type_script_setup_true_lang.js +121 -0
- package/dist/components/HprofViewer.js +7 -0
- package/dist/components/HprofViewer.vue.d.ts +27 -0
- package/dist/components/HprofViewer.vue_vue_type_script_setup_true_lang.js +561 -0
- package/dist/components/ImageLightbox.js +7 -0
- package/dist/components/ImageLightbox.vue.d.ts +3 -0
- package/dist/components/ImageLightbox.vue_vue_type_script_setup_true_lang.js +86 -0
- package/dist/components/InlineText.d.ts +29 -0
- package/dist/components/InlineText.js +21 -0
- package/dist/components/JksViewer.js +7 -0
- package/dist/components/JksViewer.vue.d.ts +22 -0
- package/dist/components/JksViewer.vue_vue_type_script_setup_true_lang.js +353 -0
- package/dist/components/JsonlViewer.js +7 -0
- package/dist/components/JsonlViewer.vue.d.ts +15 -0
- package/dist/components/JsonlViewer.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/components/LogViewer.js +7 -0
- package/dist/components/LogViewer.vue.d.ts +29 -0
- package/dist/components/LogViewer.vue_vue_type_script_setup_true_lang.js +670 -0
- package/dist/components/LrcViewer.js +7 -0
- package/dist/components/LrcViewer.vue.d.ts +17 -0
- package/dist/components/LrcViewer.vue_vue_type_script_setup_true_lang.js +106 -0
- package/dist/components/MarkdownTable.js +7 -0
- package/dist/components/MarkdownTable.vue.d.ts +19 -0
- package/dist/components/MarkdownTable.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/components/MarkdownText.d.ts +30 -0
- package/dist/components/MarkdownText.js +21 -0
- package/dist/components/MhtViewer.js +7 -0
- package/dist/components/MhtViewer.vue.d.ts +22 -0
- package/dist/components/MhtViewer.vue_vue_type_script_setup_true_lang.js +112 -0
- package/dist/components/MindMapView.js +7 -0
- package/dist/components/MindMapView.vue.d.ts +23 -0
- package/dist/components/MindMapView.vue_vue_type_script_setup_true_lang.js +337 -0
- package/dist/components/MissingDependency.js +7 -0
- package/dist/components/MissingDependency.vue.d.ts +17 -0
- package/dist/components/MissingDependency.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/ModelViewer.js +7 -0
- package/dist/components/ModelViewer.vue.d.ts +18 -0
- package/dist/components/ModelViewer.vue_vue_type_script_setup_true_lang.js +157 -0
- package/dist/components/MsiViewer.js +7 -0
- package/dist/components/MsiViewer.vue.d.ts +19 -0
- package/dist/components/MsiViewer.vue_vue_type_script_setup_true_lang.js +136 -0
- package/dist/components/NotebookViewer.js +7 -0
- package/dist/components/NotebookViewer.vue.d.ts +20 -0
- package/dist/components/NotebookViewer.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/components/PdfViewer.js +7 -0
- package/dist/components/PdfViewer.vue.d.ts +19 -0
- package/dist/components/PdfViewer.vue_vue_type_script_setup_true_lang.js +114 -0
- package/dist/components/PptxViewer.js +7 -0
- package/dist/components/PptxViewer.vue.d.ts +20 -0
- package/dist/components/PptxViewer.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/PsdViewer.js +7 -0
- package/dist/components/PsdViewer.vue.d.ts +15 -0
- package/dist/components/PsdViewer.vue_vue_type_script_setup_true_lang.js +218 -0
- package/dist/components/QmcAudioViewer.js +7 -0
- package/dist/components/QmcAudioViewer.vue.d.ts +18 -0
- package/dist/components/QmcAudioViewer.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/components/RasterViewer.js +7 -0
- package/dist/components/RasterViewer.vue.d.ts +21 -0
- package/dist/components/RasterViewer.vue_vue_type_script_setup_true_lang.js +161 -0
- package/dist/components/RtfViewer.js +7 -0
- package/dist/components/RtfViewer.vue.d.ts +21 -0
- package/dist/components/RtfViewer.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/components/SevenZipBrowser.js +7 -0
- package/dist/components/SevenZipBrowser.vue.d.ts +13 -0
- package/dist/components/SevenZipBrowser.vue_vue_type_script_setup_true_lang.js +366 -0
- package/dist/components/SqliteViewer.js +7 -0
- package/dist/components/SqliteViewer.vue.d.ts +18 -0
- package/dist/components/SqliteViewer.vue_vue_type_script_setup_true_lang.js +186 -0
- package/dist/components/SubtitleViewer.js +7 -0
- package/dist/components/SubtitleViewer.vue.d.ts +15 -0
- package/dist/components/SubtitleViewer.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/XlsxChart.js +7 -0
- package/dist/components/XlsxChart.vue.d.ts +14 -0
- package/dist/components/XlsxChart.vue_vue_type_script_setup_true_lang.js +240 -0
- package/dist/components/XlsxViewer.js +7 -0
- package/dist/components/XlsxViewer.vue.d.ts +22 -0
- package/dist/components/XlsxViewer.vue_vue_type_script_setup_true_lang.js +814 -0
- package/dist/components/XmindViewer.js +7 -0
- package/dist/components/XmindViewer.vue.d.ts +13 -0
- package/dist/components/XmindViewer.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/ZipBrowser.js +7 -0
- package/dist/components/ZipBrowser.vue.d.ts +14 -0
- package/dist/components/ZipBrowser.vue_vue_type_script_setup_true_lang.js +326 -0
- package/dist/components/ZoomImage.js +7 -0
- package/dist/components/ZoomImage.vue.d.ts +29 -0
- package/dist/components/ZoomImage.vue_vue_type_script_setup_true_lang.js +147 -0
- package/dist/components/epl/EplCodeBlock.js +7 -0
- package/dist/components/epl/EplCodeBlock.vue.d.ts +15 -0
- package/dist/components/epl/EplCodeBlock.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/components/epl/EplDoc.js +7 -0
- package/dist/components/epl/EplDoc.vue.d.ts +19 -0
- package/dist/components/epl/EplDoc.vue_vue_type_script_setup_true_lang.js +327 -0
- package/dist/components/epl/EplMethod.js +7 -0
- package/dist/components/epl/EplMethod.vue.d.ts +14 -0
- package/dist/components/epl/EplMethod.vue_vue_type_script_setup_true_lang.js +100 -0
- package/dist/components/epl/EplResource.js +7 -0
- package/dist/components/epl/EplResource.vue.d.ts +15 -0
- package/dist/components/epl/EplResource.vue_vue_type_script_setup_true_lang.js +204 -0
- package/dist/components/epl/EplTree.js +7 -0
- package/dist/components/epl/EplTree.vue.d.ts +27 -0
- package/dist/components/epl/EplTree.vue_vue_type_script_setup_true_lang.js +123 -0
- package/dist/components/epl/EplVarTable.js +7 -0
- package/dist/components/epl/EplVarTable.vue.d.ts +21 -0
- package/dist/components/epl/EplVarTable.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/epl/docTypes.d.ts +12 -0
- package/dist/components/epl/numbering.d.ts +21 -0
- package/dist/components/epl/numbering.js +14 -0
- package/dist/components/icons/Icon.js +7 -0
- package/dist/components/icons/Icon.vue.d.ts +14 -0
- package/dist/components/icons/Icon.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/components/icons/iconPaths.d.ts +60 -0
- package/dist/components/icons/iconPaths.js +54 -0
- package/dist/components/optionalViewer.d.ts +14 -0
- package/dist/components/optionalViewer.js +37 -0
- package/dist/components/ui/ClampBlock.d.ts +82 -0
- package/dist/components/ui/ClampBlock.js +63 -0
- package/dist/composables/useFileViewer.d.ts +428 -0
- package/dist/composables/useFileViewer.js +27 -0
- package/dist/composables/useLightbox.d.ts +33 -0
- package/dist/composables/useLightbox.js +17 -0
- package/dist/composables/useLogRules.d.ts +47 -0
- package/dist/composables/useLogRules.js +74 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +30 -0
- package/dist/lib/aes.d.ts +25 -0
- package/dist/lib/aes.js +99 -0
- package/dist/lib/appx.d.ts +66 -0
- package/dist/lib/appx.js +112 -0
- package/dist/lib/archive.d.ts +29 -0
- package/dist/lib/asn1.d.ts +47 -0
- package/dist/lib/asn1.js +122 -0
- package/dist/lib/binobj.d.ts +69 -0
- package/dist/lib/binobj.js +430 -0
- package/dist/lib/brotli.d.ts +14 -0
- package/dist/lib/brotli.js +16 -0
- package/dist/lib/bzip2.d.ts +14 -0
- package/dist/lib/bzip2.js +161 -0
- package/dist/lib/classfile.d.ts +72 -0
- package/dist/lib/classfile.js +210 -0
- package/dist/lib/codePreview.d.ts +22 -0
- package/dist/lib/codePreview.js +27 -0
- package/dist/lib/codefold.d.ts +14 -0
- package/dist/lib/codefold.js +30 -0
- package/dist/lib/codeformat.d.ts +21 -0
- package/dist/lib/codeformat.js +130 -0
- package/dist/lib/csv.d.ts +19 -0
- package/dist/lib/csv.js +74 -0
- package/dist/lib/des.d.ts +17 -0
- package/dist/lib/des.js +928 -0
- package/dist/lib/diagram.d.ts +5 -0
- package/dist/lib/diagram.js +479 -0
- package/dist/lib/dicom.d.ts +69 -0
- package/dist/lib/dicom.js +442 -0
- package/dist/lib/dicomCodecs.d.ts +28 -0
- package/dist/lib/dicomCodecs.js +156 -0
- package/dist/lib/dicomRender.d.ts +46 -0
- package/dist/lib/dicomRender.js +114 -0
- package/dist/lib/dxf.d.ts +86 -0
- package/dist/lib/dxf.js +399 -0
- package/dist/lib/eml.d.ts +40 -0
- package/dist/lib/eml.js +46 -0
- package/dist/lib/encoding.d.ts +28 -0
- package/dist/lib/encoding.js +44 -0
- package/dist/lib/epl/code/ast.d.ts +150 -0
- package/dist/lib/epl/code/codeDataParser.d.ts +3 -0
- package/dist/lib/epl/code/codeDataParser.js +330 -0
- package/dist/lib/epl/code/codeLines.d.ts +20 -0
- package/dist/lib/epl/code/codeLines.js +191 -0
- package/dist/lib/epl/code/structures.d.ts +86 -0
- package/dist/lib/epl/code/textCode.d.ts +29 -0
- package/dist/lib/epl/code/textCode.js +150 -0
- package/dist/lib/epl/code/variable.d.ts +25 -0
- package/dist/lib/epl/eplDocument.d.ts +21 -0
- package/dist/lib/epl/eplDocument.js +36 -0
- package/dist/lib/epl/imageList.d.ts +28 -0
- package/dist/lib/epl/imageList.js +66 -0
- package/dist/lib/epl/index.d.ts +53 -0
- package/dist/lib/epl/index.js +45 -0
- package/dist/lib/epl/io/binaryReader.d.ts +56 -0
- package/dist/lib/epl/io/binaryReader.js +119 -0
- package/dist/lib/epl/io/encoding.d.ts +16 -0
- package/dist/lib/epl/io/encoding.js +27 -0
- package/dist/lib/epl/model/eplSystemId.d.ts +64 -0
- package/dist/lib/epl/model/eplSystemId.js +16 -0
- package/dist/lib/epl/model/section.d.ts +46 -0
- package/dist/lib/epl/names/eplLibData.js +39 -0
- package/dist/lib/epl/names/idToNameMap.d.ts +33 -0
- package/dist/lib/epl/names/idToNameMap.js +130 -0
- package/dist/lib/epl/names/libNameProvider.d.ts +15 -0
- package/dist/lib/epl/names/libNameProvider.js +18 -0
- package/dist/lib/epl/program.d.ts +120 -0
- package/dist/lib/epl/program.js +134 -0
- package/dist/lib/epl/projectFileReader.d.ts +23 -0
- package/dist/lib/epl/projectFileReader.js +65 -0
- package/dist/lib/epl/sections/code.d.ts +20 -0
- package/dist/lib/epl/sections/esystemInfo.d.ts +14 -0
- package/dist/lib/epl/sections/losable.d.ts +11 -0
- package/dist/lib/epl/sections/projectConfig.d.ts +23 -0
- package/dist/lib/epl/sections/resource.d.ts +57 -0
- package/dist/lib/fb2.d.ts +14 -0
- package/dist/lib/fb2.js +62 -0
- package/dist/lib/fileType.d.ts +315 -0
- package/dist/lib/fileType.js +800 -0
- package/dist/lib/fonts.d.ts +8 -0
- package/dist/lib/fonts.js +4 -0
- package/dist/lib/format.d.ts +16 -0
- package/dist/lib/format.js +38 -0
- package/dist/lib/frontmatter.d.ts +13 -0
- package/dist/lib/frontmatter.js +23 -0
- package/dist/lib/geo.d.ts +30 -0
- package/dist/lib/geo.js +235 -0
- package/dist/lib/har.d.ts +171 -0
- package/dist/lib/har.js +397 -0
- package/dist/lib/highlight.d.ts +18 -0
- package/dist/lib/highlight.js +34 -0
- package/dist/lib/highlightLangs.d.ts +15 -0
- package/dist/lib/highlightLangs.js +93 -0
- package/dist/lib/hprof.d.ts +211 -0
- package/dist/lib/hprof.js +709 -0
- package/dist/lib/ipynb.d.ts +48 -0
- package/dist/lib/ipynb.js +130 -0
- package/dist/lib/jks.d.ts +86 -0
- package/dist/lib/jks.js +167 -0
- package/dist/lib/jsonl.d.ts +29 -0
- package/dist/lib/jsonl.js +24 -0
- package/dist/lib/lrc.d.ts +32 -0
- package/dist/lib/lrc.js +84 -0
- package/dist/lib/lzma.d.ts +70 -0
- package/dist/lib/lzma.js +204 -0
- package/dist/lib/markdown/blocks.d.ts +9 -0
- package/dist/lib/markdown/blocks.js +221 -0
- package/dist/lib/markdown/index.d.ts +3 -0
- package/dist/lib/markdown/inline.d.ts +33 -0
- package/dist/lib/markdown/inline.js +84 -0
- package/dist/lib/markdown/math.d.ts +5 -0
- package/dist/lib/markdown/math.js +25 -0
- package/dist/lib/markdown/segmentize.d.ts +11 -0
- package/dist/lib/markdown/segmentize.js +28 -0
- package/dist/lib/markdown/styles.d.ts +26 -0
- package/dist/lib/markdown/styles.js +135 -0
- package/dist/lib/mht.d.ts +51 -0
- package/dist/lib/mht.js +122 -0
- package/dist/lib/midi.d.ts +28 -0
- package/dist/lib/midi.js +84 -0
- package/dist/lib/mime.d.ts +82 -0
- package/dist/lib/mime.js +151 -0
- package/dist/lib/mindmap.d.ts +51 -0
- package/dist/lib/mindmap.js +113 -0
- package/dist/lib/mobi.d.ts +15 -0
- package/dist/lib/mobi.js +68 -0
- package/dist/lib/msi.d.ts +50 -0
- package/dist/lib/msi.js +332 -0
- package/dist/lib/optionalDep.d.ts +26 -0
- package/dist/lib/optionalDep.js +20 -0
- package/dist/lib/pkcs12.d.ts +56 -0
- package/dist/lib/pkcs12.js +356 -0
- package/dist/lib/qmc.d.ts +50 -0
- package/dist/lib/qmc.js +213 -0
- package/dist/lib/rar.d.ts +16 -0
- package/dist/lib/rar.js +40 -0
- package/dist/lib/rawPreview.d.ts +12 -0
- package/dist/lib/rawPreview.js +54 -0
- package/dist/lib/rc2.d.ts +12 -0
- package/dist/lib/rc2.js +298 -0
- package/dist/lib/resolveInput.d.ts +22 -0
- package/dist/lib/resolveInput.js +55 -0
- package/dist/lib/rtf.d.ts +53 -0
- package/dist/lib/rtf.js +413 -0
- package/dist/lib/sevenZip.d.ts +82 -0
- package/dist/lib/sevenZip.js +395 -0
- package/dist/lib/sha1.d.ts +24 -0
- package/dist/lib/sha1.js +53 -0
- package/dist/lib/sha256.d.ts +21 -0
- package/dist/lib/sha256.js +119 -0
- package/dist/lib/speechAudio.d.ts +36 -0
- package/dist/lib/speechAudio.js +85 -0
- package/dist/lib/sqlite.d.ts +38 -0
- package/dist/lib/sqlite.js +104 -0
- package/dist/lib/subtitle.d.ts +26 -0
- package/dist/lib/subtitle.js +99 -0
- package/dist/lib/tarball.d.ts +20 -0
- package/dist/lib/tarball.js +248 -0
- package/dist/lib/viewerFormats.d.ts +35 -0
- package/dist/lib/viewerFormats.js +83 -0
- package/dist/lib/viewerKind.d.ts +36 -0
- package/dist/lib/viewerKind.js +233 -0
- package/dist/lib/x509.d.ts +68 -0
- package/dist/lib/x509.js +267 -0
- package/dist/lib/xlsx.d.ts +55 -0
- package/dist/lib/xlsx.js +321 -0
- package/dist/lib/xlsxCharts.d.ts +34 -0
- package/dist/lib/xlsxCharts.js +152 -0
- package/dist/lib/xmind.d.ts +6 -0
- package/dist/lib/xmind.js +124 -0
- package/dist/lib/zip.d.ts +56 -0
- package/dist/lib/zip.js +169 -0
- package/dist/style.css +2 -0
- package/dist/types.d.ts +42 -0
- package/package.json +128 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { fileExt as e } from "../lib/fileType.js";
|
|
2
|
+
import { canToggleView as t, skipsTextLoad as n } from "../lib/viewerKind.js";
|
|
3
|
+
import { VIEWER_FORMATTERS as r, findFormatter as i } from "../lib/viewerFormats.js";
|
|
4
|
+
import a from "./icons/Icon.js";
|
|
5
|
+
import { useFileViewer as o } from "../composables/useFileViewer.js";
|
|
6
|
+
import s from "./FileViewerBody.js";
|
|
7
|
+
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createVNode as m, defineComponent as ee, normalizeClass as h, onBeforeUnmount as g, openBlock as _, ref as v, renderList as te, toDisplayString as y, unref as b, watch as x } from "vue";
|
|
8
|
+
//#region src/components/FileViewerPanel.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var ne = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "fv"
|
|
12
|
+
}, S = { class: "fv__head" }, re = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "fv__view",
|
|
15
|
+
role: "group",
|
|
16
|
+
"aria-label": "渲染或源码"
|
|
17
|
+
}, C = ["aria-pressed"], w = ["aria-pressed"], T = ["title"], E = { class: "fv__fname" }, D = { class: "fv__ext" }, O = { class: "fv__actions" }, k = ["title", "aria-expanded"], A = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "fv__menu-pop",
|
|
20
|
+
role: "menu"
|
|
21
|
+
}, j = ["aria-checked"], ie = ["aria-checked", "onClick"], ae = { class: "fv__menu-label" }, oe = ["href", "download"], M = /*@__PURE__*/ ee({
|
|
22
|
+
__name: "FileViewerPanel",
|
|
23
|
+
setup(ee) {
|
|
24
|
+
let { current: M, width: se, setWidth: ce, close: N } = o(), P = v("render"), F = v(""), I = v(!1), L, R = v(null), z = v(null), B = l(() => z.value ?? M.value), V = l(() => M.value?.content != null), H = l(() => n(B.value)), U = l(() => t(B.value, F.value)), W = r, G = v(!1), K = v(null), q = v(""), J = l(() => i(q.value)), le = l(() => !!M.value?.url), Y = l(() => J.value ? `已强制以「${J.value.label}」打开 —— 点击切换查看方式` : "打开方式 —— 选择查看器(十六进制 / 文本 / 图片 / 音频 …)");
|
|
25
|
+
function ue(e) {
|
|
26
|
+
R.value?.pickFormat(e), G.value = !1;
|
|
27
|
+
}
|
|
28
|
+
function de() {
|
|
29
|
+
R.value?.resetFormat(), G.value = !1;
|
|
30
|
+
}
|
|
31
|
+
function X(e) {
|
|
32
|
+
K.value && !K.value.contains(e.target) && (G.value = !1);
|
|
33
|
+
}
|
|
34
|
+
function Z(e) {
|
|
35
|
+
e.key === "Escape" && (G.value = !1);
|
|
36
|
+
}
|
|
37
|
+
x(G, (e) => {
|
|
38
|
+
typeof document > "u" || (e ? (document.addEventListener("click", X), document.addEventListener("keydown", Z)) : (document.removeEventListener("click", X), document.removeEventListener("keydown", Z)));
|
|
39
|
+
});
|
|
40
|
+
let Q = l(() => e(M.value?.name ?? "").toUpperCase()), fe = l(() => {
|
|
41
|
+
let t = M.value?.name ?? "", n = e(t);
|
|
42
|
+
return n ? t.slice(0, t.length - n.length - 1) : t;
|
|
43
|
+
});
|
|
44
|
+
x(M, (e) => {
|
|
45
|
+
e && (P.value = "render", F.value = "", z.value = null, q.value = "", G.value = !1);
|
|
46
|
+
});
|
|
47
|
+
async function pe() {
|
|
48
|
+
try {
|
|
49
|
+
await navigator.clipboard?.writeText(F.value);
|
|
50
|
+
} catch {}
|
|
51
|
+
I.value = !0, clearTimeout(L), L = setTimeout(() => I.value = !1, 1400);
|
|
52
|
+
}
|
|
53
|
+
let $ = v(!1);
|
|
54
|
+
function me(e) {
|
|
55
|
+
e.preventDefault();
|
|
56
|
+
let t = e.currentTarget, n = e.clientX, r = se.value, i = document.body, a = i.style.cursor, o = i.style.userSelect;
|
|
57
|
+
t.setPointerCapture(e.pointerId), $.value = !0, i.style.cursor = "col-resize", i.style.userSelect = "none";
|
|
58
|
+
let s = (e) => ce(r + (n - e.clientX)), c = (e) => e.preventDefault(), l = (e) => {
|
|
59
|
+
t.releasePointerCapture(e.pointerId), t.removeEventListener("pointermove", s), t.removeEventListener("pointerup", l), document.removeEventListener("selectstart", c), i.style.cursor = a, i.style.userSelect = o, $.value = !1;
|
|
60
|
+
};
|
|
61
|
+
t.addEventListener("pointermove", s), t.addEventListener("pointerup", l), document.addEventListener("selectstart", c);
|
|
62
|
+
}
|
|
63
|
+
return g(() => {
|
|
64
|
+
clearTimeout(L), typeof document < "u" && (document.removeEventListener("click", X), document.removeEventListener("keydown", Z));
|
|
65
|
+
}), (e, t) => b(M) ? (_(), f("aside", ne, [
|
|
66
|
+
p("div", {
|
|
67
|
+
class: h(["fv__resizer", { "fv__resizer--active": $.value }]),
|
|
68
|
+
title: "拖动调整宽度",
|
|
69
|
+
onPointerdown: me
|
|
70
|
+
}, [...t[8] ||= [p("span", { class: "fv__grip" }, null, -1)]], 34),
|
|
71
|
+
p("header", S, [
|
|
72
|
+
U.value ? (_(), f("div", re, [p("button", {
|
|
73
|
+
type: "button",
|
|
74
|
+
class: h(["fv__view-btn", { "fv__view-btn--on": P.value === "render" }]),
|
|
75
|
+
"aria-pressed": P.value === "render",
|
|
76
|
+
title: "渲染",
|
|
77
|
+
onClick: t[0] ||= (e) => P.value = "render"
|
|
78
|
+
}, [m(a, {
|
|
79
|
+
name: "eye",
|
|
80
|
+
size: 15
|
|
81
|
+
})], 10, C), p("button", {
|
|
82
|
+
type: "button",
|
|
83
|
+
class: h(["fv__view-btn", { "fv__view-btn--on": P.value === "source" }]),
|
|
84
|
+
"aria-pressed": P.value === "source",
|
|
85
|
+
title: "源码",
|
|
86
|
+
onClick: t[1] ||= (e) => P.value = "source"
|
|
87
|
+
}, [m(a, {
|
|
88
|
+
name: "code",
|
|
89
|
+
size: 15
|
|
90
|
+
})], 10, w)])) : d("", !0),
|
|
91
|
+
p("span", {
|
|
92
|
+
class: "fv__title",
|
|
93
|
+
title: b(M).name
|
|
94
|
+
}, [p("span", E, y(fe.value), 1), Q.value ? (_(), f(c, { key: 0 }, [t[9] ||= p("span", { class: "fv__dot" }, "·", -1), p("span", D, y(Q.value), 1)], 64)) : d("", !0)], 8, T),
|
|
95
|
+
p("div", O, [
|
|
96
|
+
le.value ? (_(), f("div", {
|
|
97
|
+
key: 0,
|
|
98
|
+
ref_key: "menuRef",
|
|
99
|
+
ref: K,
|
|
100
|
+
class: "fv__menu"
|
|
101
|
+
}, [p("button", {
|
|
102
|
+
type: "button",
|
|
103
|
+
class: h(["fv__btn fv__btn--text", { "fv__btn--on": q.value }]),
|
|
104
|
+
title: Y.value,
|
|
105
|
+
"aria-haspopup": !0,
|
|
106
|
+
"aria-expanded": G.value,
|
|
107
|
+
onClick: t[2] ||= (e) => G.value = !G.value
|
|
108
|
+
}, [m(a, {
|
|
109
|
+
name: "apps",
|
|
110
|
+
size: 14
|
|
111
|
+
}), p("span", null, y(J.value ? J.value.label : "打开方式"), 1)], 10, k), G.value ? (_(), f("div", A, [
|
|
112
|
+
p("button", {
|
|
113
|
+
type: "button",
|
|
114
|
+
class: h(["fv__menu-item", { "fv__menu-item--on": !q.value }]),
|
|
115
|
+
role: "menuitemradio",
|
|
116
|
+
"aria-checked": !q.value,
|
|
117
|
+
onClick: de
|
|
118
|
+
}, [
|
|
119
|
+
m(a, {
|
|
120
|
+
name: "eye",
|
|
121
|
+
size: 14
|
|
122
|
+
}),
|
|
123
|
+
t[10] ||= p("span", { class: "fv__menu-label" }, "自动检测", -1),
|
|
124
|
+
q.value ? d("", !0) : (_(), u(a, {
|
|
125
|
+
key: 0,
|
|
126
|
+
name: "check",
|
|
127
|
+
size: 15,
|
|
128
|
+
class: "fv__menu-check"
|
|
129
|
+
}))
|
|
130
|
+
], 10, j),
|
|
131
|
+
t[11] ||= p("div", { class: "fv__menu-sep" }, null, -1),
|
|
132
|
+
(_(!0), f(c, null, te(b(W), (e) => (_(), f("button", {
|
|
133
|
+
key: e.key,
|
|
134
|
+
type: "button",
|
|
135
|
+
class: h(["fv__menu-item", { "fv__menu-item--on": q.value === e.key }]),
|
|
136
|
+
role: "menuitemradio",
|
|
137
|
+
"aria-checked": q.value === e.key,
|
|
138
|
+
onClick: (t) => ue(e.key)
|
|
139
|
+
}, [
|
|
140
|
+
m(a, {
|
|
141
|
+
name: e.icon,
|
|
142
|
+
size: 14
|
|
143
|
+
}, null, 8, ["name"]),
|
|
144
|
+
p("span", ae, y(e.label), 1),
|
|
145
|
+
q.value === e.key ? (_(), u(a, {
|
|
146
|
+
key: 0,
|
|
147
|
+
name: "check",
|
|
148
|
+
size: 15,
|
|
149
|
+
class: "fv__menu-check"
|
|
150
|
+
})) : d("", !0)
|
|
151
|
+
], 10, ie))), 128))
|
|
152
|
+
])) : d("", !0)], 512)) : d("", !0),
|
|
153
|
+
H.value ? d("", !0) : (_(), f("button", {
|
|
154
|
+
key: 1,
|
|
155
|
+
type: "button",
|
|
156
|
+
class: "fv__btn fv__btn--text",
|
|
157
|
+
onClick: pe
|
|
158
|
+
}, [m(a, {
|
|
159
|
+
name: "copy",
|
|
160
|
+
size: 14
|
|
161
|
+
}), p("span", null, y(I.value ? "Copied" : "Copy"), 1)])),
|
|
162
|
+
V.value ? d("", !0) : (_(), f("a", {
|
|
163
|
+
key: 2,
|
|
164
|
+
class: "fv__btn",
|
|
165
|
+
href: b(M).url,
|
|
166
|
+
download: b(M).name,
|
|
167
|
+
title: "下载"
|
|
168
|
+
}, [m(a, {
|
|
169
|
+
name: "download",
|
|
170
|
+
size: 15
|
|
171
|
+
})], 8, oe)),
|
|
172
|
+
!V.value && !H.value ? (_(), f("button", {
|
|
173
|
+
key: 3,
|
|
174
|
+
type: "button",
|
|
175
|
+
class: "fv__btn",
|
|
176
|
+
title: "刷新",
|
|
177
|
+
onClick: t[3] ||= (e) => R.value?.reload()
|
|
178
|
+
}, [m(a, {
|
|
179
|
+
name: "retry",
|
|
180
|
+
size: 15
|
|
181
|
+
})])) : d("", !0),
|
|
182
|
+
p("button", {
|
|
183
|
+
type: "button",
|
|
184
|
+
class: "fv__btn",
|
|
185
|
+
title: "关闭",
|
|
186
|
+
onClick: t[4] ||= (...e) => b(N) && b(N)(...e)
|
|
187
|
+
}, [m(a, {
|
|
188
|
+
name: "close",
|
|
189
|
+
size: 16
|
|
190
|
+
})])
|
|
191
|
+
])
|
|
192
|
+
]),
|
|
193
|
+
m(s, {
|
|
194
|
+
ref_key: "bodyRef",
|
|
195
|
+
ref: R,
|
|
196
|
+
file: b(M),
|
|
197
|
+
mode: P.value,
|
|
198
|
+
"host-chooser": "",
|
|
199
|
+
onLoaded: t[5] ||= (e) => F.value = e,
|
|
200
|
+
onFormatchange: t[6] ||= (e) => z.value = e,
|
|
201
|
+
onFormatpick: t[7] ||= (e) => q.value = e
|
|
202
|
+
}, null, 8, ["file", "mode"])
|
|
203
|
+
])) : d("", !0);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
//#endregion
|
|
207
|
+
export { M as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./FontViewer.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/FontViewer.vue
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-95856016"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Side-viewer font specimen. Fetches the font bytes from the download URL and loads them with the native
|
|
3
|
+
* FontFace API (which decodes ttf/otf/woff AND woff2 in-browser, no library needed), then renders a living
|
|
4
|
+
* specimen in that very face: an editable preview line with a size slider, a size waterfall, and the glyph
|
|
5
|
+
* sets. Mirrors the other byte-fetching viewers (DICOM/DOCX/…): a real download URL in, a self-owned fetch.
|
|
6
|
+
*
|
|
7
|
+
* The face is registered under a unique private alias (so multiple opens never collide) and removed from
|
|
8
|
+
* document.fonts on change/unmount. No styling/security concern: a font is inert data decoded by the browser.
|
|
9
|
+
*/
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
url?: string;
|
|
12
|
+
name: string;
|
|
13
|
+
size?: number;
|
|
14
|
+
};
|
|
15
|
+
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>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { formatBytes as e } from "../lib/format.js";
|
|
2
|
+
import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, normalizeStyle as s, onBeforeUnmount as c, openBlock as l, ref as u, renderList as d, toDisplayString as f, unref as p, vModelText as m, watch as h, withDirectives as g } from "vue";
|
|
3
|
+
//#region src/components/FontViewer.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var _ = { class: "font" }, v = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "font__msg"
|
|
7
|
+
}, y = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "font__msg font__gate"
|
|
10
|
+
}, b = {
|
|
11
|
+
key: 2,
|
|
12
|
+
class: "font__msg font__msg--error"
|
|
13
|
+
}, x = { class: "font__bar" }, S = { class: "font__size" }, C = { class: "font__size-val" }, w = { class: "font__scroll" }, T = { class: "font__section" }, E = { class: "font__wf-tag" }, D = { class: "font__wf-text" }, O = { class: "font__section" }, k = 24 * 1024 * 1024, A = /*@__PURE__*/ o({
|
|
14
|
+
__name: "FontViewer",
|
|
15
|
+
props: {
|
|
16
|
+
url: {},
|
|
17
|
+
name: {},
|
|
18
|
+
size: {}
|
|
19
|
+
},
|
|
20
|
+
setup(o) {
|
|
21
|
+
let A = o, j = u("loading"), M = u(""), N = u(!1), P = 0, F = "", I = null, L = u("The quick brown fox jumps over the lazy dog."), R = u(44), z = [
|
|
22
|
+
14,
|
|
23
|
+
18,
|
|
24
|
+
24,
|
|
25
|
+
32,
|
|
26
|
+
48,
|
|
27
|
+
72
|
|
28
|
+
], B = [
|
|
29
|
+
"ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
30
|
+
"abcdefghijklmnopqrstuvwxyz",
|
|
31
|
+
"0123456789",
|
|
32
|
+
"!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
|
|
33
|
+
"中文示例:永东国爱龙凤,0123456789。"
|
|
34
|
+
], V = n(() => N.value && F ? `"${F}"` : "inherit");
|
|
35
|
+
function H() {
|
|
36
|
+
if (I) {
|
|
37
|
+
try {
|
|
38
|
+
document.fonts.delete(I);
|
|
39
|
+
} catch {}
|
|
40
|
+
I = null;
|
|
41
|
+
}
|
|
42
|
+
N.value = !1;
|
|
43
|
+
}
|
|
44
|
+
async function U() {
|
|
45
|
+
if (A.url) {
|
|
46
|
+
j.value = "loading", M.value = "", H();
|
|
47
|
+
try {
|
|
48
|
+
let e = await fetch(A.url);
|
|
49
|
+
if (!e.ok) throw Error(`HTTP ${e.status}`);
|
|
50
|
+
let t = await e.arrayBuffer();
|
|
51
|
+
F = `fv-font-${++P}`;
|
|
52
|
+
let n = new FontFace(F, t);
|
|
53
|
+
await n.load(), document.fonts.add(n), I = n, N.value = !0, j.value = "ready";
|
|
54
|
+
} catch (e) {
|
|
55
|
+
M.value = e instanceof Error ? e.message : String(e), j.value = "error";
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function W() {
|
|
60
|
+
if (A.size && A.size > k) {
|
|
61
|
+
j.value = "gate";
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
U();
|
|
65
|
+
}
|
|
66
|
+
return h(() => A.url, W, { immediate: !0 }), c(H), (n, o) => (l(), i("div", _, [j.value === "loading" ? (l(), i("p", v, "正在加载字体…")) : j.value === "gate" ? (l(), i("div", y, [a("p", null, "该字体文件较大(" + f(p(e)(A.size)) + "),将在浏览器内解码。是否继续?", 1), a("button", {
|
|
67
|
+
type: "button",
|
|
68
|
+
class: "font__btn",
|
|
69
|
+
onClick: U
|
|
70
|
+
}, "加载并预览")])) : j.value === "error" ? (l(), i("div", b, [
|
|
71
|
+
a("p", null, "加载失败:" + f(M.value), 1),
|
|
72
|
+
o[2] ||= a("p", { class: "font__hint" }, "浏览器可能不支持该字体格式,可尝试下载后用本地工具打开。", -1),
|
|
73
|
+
a("button", {
|
|
74
|
+
type: "button",
|
|
75
|
+
class: "font__btn",
|
|
76
|
+
onClick: U
|
|
77
|
+
}, "重试")
|
|
78
|
+
])) : j.value === "ready" ? (l(), i(t, { key: 3 }, [a("div", x, [g(a("input", {
|
|
79
|
+
"onUpdate:modelValue": o[0] ||= (e) => L.value = e,
|
|
80
|
+
class: "font__input",
|
|
81
|
+
type: "text",
|
|
82
|
+
placeholder: "输入预览文字…",
|
|
83
|
+
"aria-label": "预览文字"
|
|
84
|
+
}, null, 512), [[m, L.value]]), a("label", S, [g(a("input", {
|
|
85
|
+
"onUpdate:modelValue": o[1] ||= (e) => R.value = e,
|
|
86
|
+
type: "range",
|
|
87
|
+
min: "8",
|
|
88
|
+
max: "120",
|
|
89
|
+
step: "1"
|
|
90
|
+
}, null, 512), [[
|
|
91
|
+
m,
|
|
92
|
+
R.value,
|
|
93
|
+
void 0,
|
|
94
|
+
{ number: !0 }
|
|
95
|
+
]]), a("span", C, f(R.value) + "px", 1)])]), a("div", w, [
|
|
96
|
+
a("div", {
|
|
97
|
+
class: "font__hero",
|
|
98
|
+
style: s({
|
|
99
|
+
fontFamily: V.value,
|
|
100
|
+
fontSize: R.value + "px"
|
|
101
|
+
})
|
|
102
|
+
}, f(L.value || " "), 5),
|
|
103
|
+
a("section", T, [o[3] ||= a("h3", { class: "font__h" }, "字号瀑布", -1), (l(), i(t, null, d(z, (e) => a("div", {
|
|
104
|
+
key: e,
|
|
105
|
+
class: "font__wf",
|
|
106
|
+
style: s({
|
|
107
|
+
fontFamily: V.value,
|
|
108
|
+
fontSize: e + "px"
|
|
109
|
+
})
|
|
110
|
+
}, [a("span", E, f(e), 1), a("span", D, f(L.value || "Aa"), 1)], 4)), 64))]),
|
|
111
|
+
a("section", O, [o[4] ||= a("h3", { class: "font__h" }, "字符集", -1), (l(), i(t, null, d(B, (e, t) => a("p", {
|
|
112
|
+
key: t,
|
|
113
|
+
class: "font__glyphs",
|
|
114
|
+
style: s({ fontFamily: V.value })
|
|
115
|
+
}, f(e), 5)), 64))])
|
|
116
|
+
])], 64)) : r("", !0)]));
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
//#endregion
|
|
120
|
+
export { A as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./FrontmatterCard.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/FrontmatterCard.vue
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-e94b6987"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renders a markdown document's YAML frontmatter (SKILL.md & friends) as a labeled
|
|
3
|
+
* card — one "Label / value" row per key, claude.ai's skill-header look. `name` is
|
|
4
|
+
* dropped (it's already the panel title); empty values are skipped.
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
data: Record<string, unknown>;
|
|
8
|
+
};
|
|
9
|
+
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>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, openBlock as o, renderList as s, toDisplayString as c } from "vue";
|
|
2
|
+
//#region src/components/FrontmatterCard.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var l = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "fm"
|
|
6
|
+
}, u = { class: "fm__label" }, d = { class: "fm__value" }, f = /*@__PURE__*/ a({
|
|
7
|
+
__name: "FrontmatterCard",
|
|
8
|
+
props: { data: {} },
|
|
9
|
+
setup(a) {
|
|
10
|
+
let f = a;
|
|
11
|
+
function p(e) {
|
|
12
|
+
let t = e.replace(/[-_]+/g, " ").trim();
|
|
13
|
+
return t ? t.charAt(0).toUpperCase() + t.slice(1) : e;
|
|
14
|
+
}
|
|
15
|
+
function m(e) {
|
|
16
|
+
return e == null ? "" : Array.isArray(e) ? e.map(m).filter(Boolean).join(", ") : typeof e == "object" ? Object.entries(e).map(([e, t]) => `${e}: ${m(t)}`).join("\n") : String(e);
|
|
17
|
+
}
|
|
18
|
+
let h = t(() => Object.entries(f.data).filter(([e]) => e !== "name").map(([e, t]) => ({
|
|
19
|
+
key: e,
|
|
20
|
+
label: p(e),
|
|
21
|
+
value: m(t)
|
|
22
|
+
})).filter((e) => e.value.trim() !== ""));
|
|
23
|
+
return (t, a) => h.value.length ? (o(), r("dl", l, [(o(!0), r(e, null, s(h.value, (e) => (o(), r("div", {
|
|
24
|
+
key: e.key,
|
|
25
|
+
class: "fm__row"
|
|
26
|
+
}, [i("dt", u, c(e.label), 1), i("dd", d, c(e.value), 1)]))), 128))])) : n("", !0);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
//#endregion
|
|
30
|
+
export { f as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./GeoViewer.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/GeoViewer.vue
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-80aaef2d"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Side-viewer geodata renderer. Parses the already-fetched text (see lib/geo.ts) into point / line / polygon
|
|
3
|
+
* features, then draws them over a REAL slippy basemap from OpenFreeMap (MapLibre GL, https://openfreemap.org
|
|
4
|
+
* — free, no API key). GeoJSON / KML / GPX.
|
|
5
|
+
*
|
|
6
|
+
* MapLibre is lazy-loaded inside onMounted (dynamic import — it touches window/WebGL, so it must never enter
|
|
7
|
+
* the SSR module graph, and it keeps ~200 KB out of the initial bundle). If the remote basemap can't be
|
|
8
|
+
* reached (e.g. an air-gapped intranet), we fall back to a blank background so the user's DATA still renders,
|
|
9
|
+
* with a small "offline" hint. Drag/scroll to pan-zoom; click a feature in the list to fly to it.
|
|
10
|
+
*/
|
|
11
|
+
type __VLS_Props = {
|
|
12
|
+
text: string;
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
15
|
+
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>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|