@eternalheart/vue-file-preview 1.6.6 → 1.6.7

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 (32) hide show
  1. package/README.md +9 -3
  2. package/README.zh-CN.md +9 -3
  3. package/lib/FilePreviewContent.vue.d.ts +6 -0
  4. package/lib/FilePreviewEmbed.vue.d.ts +6 -0
  5. package/lib/FilePreviewModal.vue.d.ts +6 -0
  6. package/lib/chunks/{index-lDd0gQfG.mjs → index--sqXkUEP.mjs} +1 -1
  7. package/lib/chunks/{index-DcNc3goP.mjs → index-06Ivpw6V.mjs} +1 -1
  8. package/lib/chunks/{index-DxBxbEDT.mjs → index-B3jcS1UB.mjs} +1 -1
  9. package/lib/chunks/{index-Dh91eAMV.mjs → index-B6UNmyiS.mjs} +1 -1
  10. package/lib/chunks/{index-BV8V9hEs.mjs → index-BWNmKHd0.mjs} +2 -2
  11. package/lib/chunks/{index-C-hfrxhW.mjs → index-BflKoE04.mjs} +1 -1
  12. package/lib/chunks/{index-07rgqwSI.mjs → index-BgTW_P3u.mjs} +1 -1
  13. package/lib/chunks/{index-DWWV1OKd.mjs → index-BmsJxBJa.mjs} +2 -2
  14. package/lib/chunks/{index-CdsYIxSD.mjs → index-CBN0qoP1.mjs} +1 -1
  15. package/lib/chunks/{index-BF0-zECZ.mjs → index-CK43N0Ho.mjs} +1 -1
  16. package/lib/chunks/{index-BnDCjh8a.mjs → index-CR3QkKJt.mjs} +1 -1
  17. package/lib/chunks/{index-CybXawTx.mjs → index-CSY197_j.mjs} +1 -1
  18. package/lib/chunks/{index-u7QUztr_.mjs → index-CXAEvuVP.mjs} +1 -1
  19. package/lib/chunks/{index-tOax5IQg.mjs → index-Cr7raBmi.mjs} +1 -1
  20. package/lib/chunks/{index-DXqRgna1.mjs → index-Cv0lIWeI.mjs} +1 -1
  21. package/lib/chunks/{index-CksNYAz_.mjs → index-CyIp8Xfg.mjs} +1 -1
  22. package/lib/chunks/{index-hDUlDDey.mjs → index-D_XKzCZJ.mjs} +15 -15
  23. package/lib/chunks/{index-xY2bzsk7.mjs → index-DdbaVSB8.mjs} +765 -744
  24. package/lib/chunks/{index-BHy2oKCa.mjs → index-DlIRXpmw.mjs} +1 -1
  25. package/lib/chunks/{index-D656tL42.mjs → index-DoqCnKkl.mjs} +2 -2
  26. package/lib/chunks/{index-ChMheVNW.mjs → index-Xta2zHnj.mjs} +1 -1
  27. package/lib/chunks/{index-CUrAAk7J.mjs → index-sPfLaVRe.mjs} +1 -1
  28. package/lib/chunks/{useShikiHighlight-DwEsf_jW.mjs → useShikiHighlight-J62fUszo.mjs} +1 -1
  29. package/lib/index.cjs +36 -36
  30. package/lib/index.css +1 -1
  31. package/lib/index.mjs +1 -1
  32. package/package.json +1 -1
package/README.md CHANGED
@@ -17,7 +17,7 @@ A modern, feature-rich file preview component for Vue 3 with support for images,
17
17
  - <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f4dd.svg" width="16" height="16" alt="📝" style="vertical-align: middle;" /> **Markdown Rendering** - GitHub Flavored Markdown support
18
18
  - <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f4bb.svg" width="16" height="16" alt="💻" style="vertical-align: middle;" /> **Code Highlighting** - Supports 40+ programming languages
19
19
  - <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f4f1.svg" width="16" height="16" alt="📱" style="vertical-align: middle;" /> **Responsive Design** - Adapts to all screen sizes
20
- - <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/2328.svg" width="16" height="16" alt="⌨️" style="vertical-align: middle;" /> **Keyboard Navigation** - Arrow keys and ESC support
20
+ - <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/2328.svg" width="16" height="16" alt="⌨️" style="vertical-align: middle;" /> **Keyboard Navigation** - Arrow, Home, End, and ESC key support
21
21
 
22
22
  ## <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f4e6.svg" width="20" height="20" alt="📦" /> Installation
23
23
 
@@ -239,7 +239,7 @@ Differences from `FilePreviewModal`:
239
239
 
240
240
  - No teleport, no full-screen overlay, no `isOpen` / `@close`
241
241
  - Does **not** show the close button in the toolbar
242
- - Keyboard navigation (←/→) is scoped to the embed container (focus-based)
242
+ - Keyboard navigation (←/→/Home/End) is scoped to the embed container (focus-based)
243
243
  - Size defaults to `width: 100%; height: 100%`; override via `width` / `height` props
244
244
 
245
245
  ```vue
@@ -279,7 +279,7 @@ Differences from `FilePreviewModal`:
279
279
  ### Code & Text
280
280
  - **Markdown**: GitHub Flavored Markdown, code highlighting
281
281
  - **Code Files**: Vue, Svelte, Astro, JS/TS, Dart, GraphQL, Protobuf, Prisma, Terraform, PowerShell, Scala, and 40+ languages
282
- - **Config/Logs**: YAML, TOML, INI, ENV, LOG, DIFF, PATCH, etc.
282
+ - **Config/Logs**: YAML, TOML, INI, ENV, PROPERTIES, BAT, CMD, TEX, MAP, LOG, DIFF, PATCH, etc.
283
283
 
284
284
  ### Structured Data
285
285
  - **JSON**: Auto formatting + syntax highlighting
@@ -366,6 +366,8 @@ Differences from `FilePreviewModal`:
366
366
  | `theme` | `Theme` | ❌ | Theme mode: `'auto' \| 'dark' \| 'light'` (default `'dark'`) |
367
367
  | `showDownload` | `boolean` | ❌ | Whether to show the download button (default `true`) |
368
368
  | `showClose` | `boolean` | ❌ | Whether to show the close button (default `true` for modal) |
369
+ | `showNavigation` | `boolean` | ❌ | Whether to show file navigation arrows (default `true`) |
370
+ | `loopNavigation` | `boolean` | ❌ | Whether file navigation wraps around (default `false`) |
369
371
 
370
372
  ### FilePreviewModal Events
371
373
 
@@ -389,6 +391,8 @@ Differences from `FilePreviewModal`:
389
391
  | `theme` | `Theme` | ❌ | `'dark'` | Theme mode: `'auto' \| 'dark' \| 'light'` |
390
392
  | `showDownload` | `boolean` | ❌ | `true` | Whether to show the download button |
391
393
  | `showClose` | `boolean` | ❌ | `false` | Whether to show the close button (default `false` for embed) |
394
+ | `showNavigation` | `boolean` | ❌ | `true` | Whether to show file navigation arrows |
395
+ | `loopNavigation` | `boolean` | ❌ | `false` | Whether file navigation wraps around |
392
396
 
393
397
  ### FilePreviewEmbed Events
394
398
 
@@ -836,6 +840,8 @@ Verify:
836
840
  - `ESC` - Close preview
837
841
  - `←` - Previous file
838
842
  - `→` - Next file
843
+ - `Home` - First file
844
+ - `End` - Last file
839
845
  - `Mouse Wheel` - Zoom image (image preview only)
840
846
 
841
847
  ## <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f4da.svg" width="20" height="20" alt="📚" /> Documentation
package/README.zh-CN.md CHANGED
@@ -17,7 +17,7 @@
17
17
  - <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f4dd.svg" width="16" height="16" alt="📝" style="vertical-align: middle;" /> **Markdown 渲染** - 支持 GitHub Flavored Markdown
18
18
  - <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f4bb.svg" width="16" height="16" alt="💻" style="vertical-align: middle;" /> **代码高亮** - 支持 40+ 种编程语言
19
19
  - <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f4f1.svg" width="16" height="16" alt="📱" style="vertical-align: middle;" /> **响应式设计** - 适配各种屏幕尺寸
20
- - <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/2328.svg" width="16" height="16" alt="⌨️" style="vertical-align: middle;" /> **键盘导航** - 支持方向键和 ESC 键
20
+ - <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/2328.svg" width="16" height="16" alt="⌨️" style="vertical-align: middle;" /> **键盘导航** - 支持方向键、Home、End 和 ESC 键
21
21
 
22
22
  ## 📦 安装
23
23
 
@@ -239,7 +239,7 @@ const files = [
239
239
 
240
240
  - 不使用 Teleport、无全屏遮罩、没有 `isOpen` / `@close`
241
241
  - **不显示关闭按钮**
242
- - 键盘导航 (←/→) 作用域限定在嵌入容器内 (基于 focus)
242
+ - 键盘导航 (←/→/Home/End) 作用域限定在嵌入容器内 (基于 focus)
243
243
  - 尺寸默认 `width: 100%; height: 100%`,可通过 `width` / `height` props 覆盖
244
244
 
245
245
  ```vue
@@ -279,7 +279,7 @@ const files = [
279
279
  ### 代码 & 文本
280
280
  - **Markdown**: GitHub Flavored Markdown,代码高亮
281
281
  - **代码文件**: Vue、Svelte、Astro、JS/TS、Dart、GraphQL、Protobuf、Prisma、Terraform、PowerShell、Scala 等 40+ 种语言
282
- - **配置 / 日志**: YAML, TOML, INI, ENV, LOG, DIFF, PATCH 等
282
+ - **配置 / 日志**: YAML, TOML, INI, ENV, PROPERTIES, BAT, CMD, TEX, MAP, LOG, DIFF, PATCH 等
283
283
 
284
284
  ### 结构化数据
285
285
  - **JSON**: 自动格式化 + 语法高亮
@@ -366,6 +366,8 @@ const files = [
366
366
  | `theme` | `Theme` | ❌ | 主题模式: `'auto' \| 'dark' \| 'light'`(默认 `'dark'`) |
367
367
  | `showDownload` | `boolean` | ❌ | 是否显示下载按钮(默认 `true`) |
368
368
  | `showClose` | `boolean` | ❌ | 是否显示关闭按钮(modal 模式默认 `true`) |
369
+ | `showNavigation` | `boolean` | ❌ | 是否显示文件导航箭头(默认 `true`) |
370
+ | `loopNavigation` | `boolean` | ❌ | 是否循环导航文件(默认 `false`) |
369
371
 
370
372
  ### FilePreviewModal 事件
371
373
 
@@ -389,6 +391,8 @@ const files = [
389
391
  | `theme` | `Theme` | ❌ | `'dark'` | 主题模式: `'auto' \| 'dark' \| 'light'` |
390
392
  | `showDownload` | `boolean` | ❌ | `true` | 是否显示下载按钮 |
391
393
  | `showClose` | `boolean` | ❌ | `false` | 是否显示关闭按钮(embed 模式默认 `false`) |
394
+ | `showNavigation` | `boolean` | ❌ | `true` | 是否显示文件导航箭头 |
395
+ | `loopNavigation` | `boolean` | ❌ | `false` | 是否循环导航文件 |
392
396
 
393
397
  ### FilePreviewEmbed 事件
394
398
 
@@ -836,6 +840,8 @@ watch(resolvedTheme, highlightCode, { immediate: true });
836
840
  - `ESC` - 关闭预览
837
841
  - `←` - 上一个文件
838
842
  - `→` - 下一个文件
843
+ - `Home` - 第一个文件
844
+ - `End` - 最后一个文件
839
845
  - `滚轮` - 缩放图片 (仅图片预览)
840
846
 
841
847
  ## 📚 文档
@@ -30,6 +30,10 @@ interface Props {
30
30
  showClose?: boolean;
31
31
  /** 是否显示下载按钮,默认 true */
32
32
  showDownload?: boolean;
33
+ /** 是否显示文件导航箭头,默认 true */
34
+ showNavigation?: boolean;
35
+ /** 是否循环导航文件,默认 false */
36
+ loopNavigation?: boolean;
33
37
  }
34
38
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
35
39
  close: () => any;
@@ -54,5 +58,7 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
54
58
  onDownload: (file: PreviewFile) => void | Promise<void>;
55
59
  showClose: boolean;
56
60
  showDownload: boolean;
61
+ showNavigation: boolean;
62
+ loopNavigation: boolean;
57
63
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
58
64
  export default _default;
@@ -30,6 +30,10 @@ interface Props {
30
30
  showClose?: boolean;
31
31
  /** 是否显示下载按钮,默认 true */
32
32
  showDownload?: boolean;
33
+ /** 是否显示文件导航箭头,默认 true */
34
+ showNavigation?: boolean;
35
+ /** 是否循环导航文件,默认 false */
36
+ loopNavigation?: boolean;
33
37
  }
34
38
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
35
39
  close: () => any;
@@ -55,5 +59,7 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
55
59
  onDownload: (file: PreviewFile) => void | Promise<void>;
56
60
  showClose: boolean;
57
61
  showDownload: boolean;
62
+ showNavigation: boolean;
63
+ loopNavigation: boolean;
58
64
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
59
65
  export default _default;
@@ -25,6 +25,10 @@ interface Props {
25
25
  showClose?: boolean;
26
26
  /** 是否显示下载按钮,默认 true */
27
27
  showDownload?: boolean;
28
+ /** 是否显示文件导航箭头,默认 true */
29
+ showNavigation?: boolean;
30
+ /** 是否循环导航文件,默认 false */
31
+ loopNavigation?: boolean;
28
32
  }
29
33
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
30
34
  close: () => any;
@@ -46,5 +50,7 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
46
50
  onDownload: (file: PreviewFile) => void | Promise<void>;
47
51
  showClose: boolean;
48
52
  showDownload: boolean;
53
+ showNavigation: boolean;
54
+ loopNavigation: boolean;
49
55
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
50
56
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as x, ref as d, onMounted as b, watch as w, onBeforeUnmount as T, openBlock as f, createBlock as E, createElementBlock as m, createElementVNode as a, toDisplayString as C, unref as D, createCommentVNode as j } from "vue";
2
2
  import B from "video.js";
3
- import { u as N, n as _ } from "./index-xY2bzsk7.mjs";
3
+ import { u as N, n as _ } from "./index-DdbaVSB8.mjs";
4
4
  import { _ as P } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
5
5
  const R = {
6
6
  key: 1,
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as Me, ref as i, watch as $, onBeforeUnmount as ee, onMounted as Re, computed as te, openBlock as x, createElementBlock as C, normalizeStyle as ae, createVNode as _e, unref as le, createElementVNode as X, createTextVNode as Le, toDisplayString as S, createCommentVNode as L, createBlock as oe, normalizeClass as ke } from "vue";
2
2
  import { ZoomOut as Ee, ZoomIn as Ce, Scan as Te, Maximize2 as Ue, RotateCcw as Ye, RotateCw as ze, RefreshCw as Se, Loader2 as Xe } from "lucide-vue-next";
3
- import { u as We, i as Be, Z as De, W as Oe, p as je, R as Ze } from "./index-xY2bzsk7.mjs";
3
+ import { u as We, i as Be, Z as De, W as Oe, p as je, R as Ze } from "./index-DdbaVSB8.mjs";
4
4
  import { _ as ne } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
5
5
  import { T as Pe } from "./base.types-DaftHyg7.mjs";
6
6
  const $e = {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as Os, ref as Ie, onMounted as ws, onBeforeUnmount as Es, watch as Mr, openBlock as ge, createElementBlock as ke, normalizeStyle as Pr, toDisplayString as K, computed as mt, createElementVNode as P, unref as ae, createBlock as Br, Fragment as Dn, createCommentVNode as Wt, withDirectives as Nr, vModelText as _r, renderList as Gr, createVNode as qt } from "vue";
2
- import { u as Hr, b as Vr, c as zr } from "./index-xY2bzsk7.mjs";
2
+ import { u as Hr, b as Vr, c as zr } from "./index-DdbaVSB8.mjs";
3
3
  import { _ as jr } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
4
4
  var mn = 0, Rs = -3;
5
5
  function at() {
@@ -1,6 +1,6 @@
1
1
  import { ref as f, watch as q, onUnmounted as W, defineComponent as X, toRef as J, computed as B, onMounted as K, onBeforeUnmount as Q, unref as e, openBlock as _, createBlock as V, createElementBlock as H, createElementVNode as a, normalizeClass as D, createVNode as E, toDisplayString as N, normalizeStyle as O, resolveDynamicComponent as Y, Transition as Z, withCtx as ee, createCommentVNode as te } from "vue";
2
2
  import { VolumeX as ae, Volume1 as oe, Volume2 as ne, AudioLines as le, Pause as se, Play as re, SkipBack as ie, SkipForward as fe, Repeat as ve } from "lucide-vue-next";
3
- import { r as ue, u as pe } from "./index-xY2bzsk7.mjs";
3
+ import { r as ue, u as pe } from "./index-DdbaVSB8.mjs";
4
4
  import { _ as de } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
5
5
  function ce(L) {
6
6
  const v = f(null), y = f(!1), p = f(!0), n = f(0), T = f(0), g = f(1), x = f(!1), h = f(!1), u = f(null);
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as S, ref as f, computed as c, watch as _, openBlock as a, createElementBlock as s, createElementVNode as l, createBlock as B, unref as x, normalizeClass as k, toDisplayString as T, normalizeStyle as F, Fragment as E, renderList as L } from "vue";
2
2
  import { WrapText as z, Code as G, Eye as M } from "lucide-vue-next";
3
- import { u as W, b as $, k as j, e as D } from "./index-xY2bzsk7.mjs";
4
- import { u as P } from "./useShikiHighlight-DwEsf_jW.mjs";
3
+ import { u as W, b as $, k as j, e as D } from "./index-DdbaVSB8.mjs";
4
+ import { u as P } from "./useShikiHighlight-J62fUszo.mjs";
5
5
  import { _ as R } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
6
6
  import { T as V } from "./base.types-DaftHyg7.mjs";
7
7
  const q = {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as W, ref as y, onMounted as F, watch as L, onBeforeUnmount as P, openBlock as g, createElementBlock as x, createElementVNode as _, toDisplayString as q, unref as B, createCommentVNode as T, createBlock as A, normalizeStyle as G } from "vue";
2
2
  import { init as E } from "pptx-preview";
3
- import { u as H, b as I, D as N } from "./index-xY2bzsk7.mjs";
3
+ import { u as H, b as I, D as N } from "./index-DdbaVSB8.mjs";
4
4
  import { _ as O } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
5
5
  const S = { class: "vfp-relative vfp-flex vfp-flex-col vfp-items-center vfp-w-full vfp-h-full" }, V = {
6
6
  key: 0,
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as er, ref as qe, watch as tr, computed as te, openBlock as J, createElementBlock as Q, createElementVNode as F, createBlock as rr, unref as se, toDisplayString as ne, createVNode as he, createCommentVNode as oe, normalizeStyle as ir, Fragment as nr, renderList as ar, createTextVNode as sr, normalizeClass as or } from "vue";
2
2
  import { User as cr, Users as Ve, Calendar as mt, Clock as Et, Tag as gt, Mail as fr, Paperclip as ur, Hash as hr } from "lucide-vue-next";
3
- import { u as lr, b as dr, _ as pr } from "./index-xY2bzsk7.mjs";
3
+ import { u as lr, b as dr, _ as pr } from "./index-DdbaVSB8.mjs";
4
4
  import { _ as yr } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
5
5
  var fe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6
6
  function br(e) {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as K, ref as u, computed as z, onMounted as ne, onBeforeUnmount as q, watch as j, openBlock as a, createElementBlock as c, Fragment as I, createElementVNode as i, normalizeClass as D, toDisplayString as $, withDirectives as V, renderSlot as W, vShow as H, normalizeStyle as F, resolveComponent as le, createVNode as B, unref as C, createBlock as R, resolveDynamicComponent as O, renderList as G, createCommentVNode as A, defineAsyncComponent as oe, withCtx as P, Teleport as se } from "vue";
2
- import { _ as X, V as ae, R as ie, u as re, b as fe, f as Z, h as ve, I as de, K as pe, w as ue } from "./index-xY2bzsk7.mjs";
2
+ import { _ as X, V as ae, R as ie, u as re, b as fe, f as Z, h as ve, I as de, K as pe, w as ue } from "./index-DdbaVSB8.mjs";
3
3
  import { FileImage as ce, FileText as me, FileCode as he, File as we, ChevronRight as be, FolderOpen as ge, Folder as ye } from "lucide-vue-next";
4
4
  import { _ as xe } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
5
5
  import { T as ke } from "./base.types-DaftHyg7.mjs";
@@ -194,7 +194,7 @@ const Le = { class: "vfp-flex vfp-flex-shrink-0 vfp-border-b vfp-border-line-wea
194
194
  },
195
195
  setup(s, { expose: M }) {
196
196
  const l = oe(
197
- () => import("./index-xY2bzsk7.mjs").then((e) => e.x)
197
+ () => import("./index-DdbaVSB8.mjs").then((e) => e.x)
198
198
  ), v = s, g = new ke(), { t: h } = re(), T = fe(), b = u(null), d = u(null), y = u(!0), r = u(null), t = u(/* @__PURE__ */ new Set([""])), f = u(null), x = u(!1), p = u(null), n = u(null), w = u(null), S = () => {
199
199
  var e;
200
200
  (e = f.value) != null && e.blobUrl && URL.revokeObjectURL(f.value.blobUrl);
@@ -5,7 +5,7 @@ import { DXFLoader as ce } from "three-dxf-loader";
5
5
  import { STLLoader as ue } from "three/examples/jsm/loaders/STLLoader";
6
6
  import { OBJLoader as de } from "three/examples/jsm/loaders/OBJLoader";
7
7
  import { GLTFLoader as pe } from "three/examples/jsm/loaders/GLTFLoader";
8
- import { u as me, b as ve } from "./index-xY2bzsk7.mjs";
8
+ import { u as me, b as ve } from "./index-DdbaVSB8.mjs";
9
9
  import { T as ge } from "./base.types-DaftHyg7.mjs";
10
10
  import { RotateCcw as we, Box as he, Grid3x3 as be, Axis3d as ye } from "lucide-vue-next";
11
11
  function Me(c) {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as E, ref as p, onMounted as D, watch as M, onBeforeUnmount as z, openBlock as v, createElementBlock as h, createElementVNode as m, toDisplayString as B, unref as _, createCommentVNode as w, createBlock as S, normalizeStyle as C } from "vue";
2
2
  import W from "exceljs";
3
3
  import { S as H } from "./index-CyBXARuf.mjs";
4
- import { u as R, b as G, C as L, s as F, y as N, g as O } from "./index-xY2bzsk7.mjs";
4
+ import { u as R, b as G, C as L, s as F, y as N, g as O } from "./index-DdbaVSB8.mjs";
5
5
  import { _ as V } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
6
6
  const $ = { class: "vfp-relative vfp-flex vfp-flex-col vfp-items-center vfp-w-full vfp-h-full" }, j = {
7
7
  key: 0,
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as me, ref as p, watch as ue, onMounted as ce, onBeforeUnmount as ve, openBlock as S, createElementBlock as B, createBlock as Me, createCommentVNode as D, createElementVNode as h, normalizeStyle as W, toDisplayString as Ce, unref as K, createVNode as de, h as N } from "vue";
2
2
  import { List as Se, ChevronLeft as Ne, ChevronRight as Re, Minimize2 as ze, Maximize2 as Ae, X as Le } from "lucide-vue-next";
3
3
  import "foliate-js/view.js";
4
- import { u as Fe, b as Pe, _ as $e } from "./index-xY2bzsk7.mjs";
4
+ import { u as Fe, b as Pe, _ as $e } from "./index-DdbaVSB8.mjs";
5
5
  import { _ as He } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
6
6
  import { T as Be } from "./base.types-DaftHyg7.mjs";
7
7
  const De = { class: "vfp-relative vfp-w-full vfp-h-full vfp-flex vfp-justify-center vfp-bg-surface-1 vfp-overflow-hidden" }, We = {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as d, ref as U, watch as h, openBlock as $, createElementBlock as q, createElementVNode as x, createBlock as K, createVNode as C, unref as ee, h as g, inject as ne, computed as H } from "vue";
2
- import { u as le, b as te, e as ie, L as ue, G as fe, c as oe } from "./index-xY2bzsk7.mjs";
2
+ import { u as le, b as te, e as ie, L as ue, G as fe, c as oe } from "./index-DdbaVSB8.mjs";
3
3
  import { _ as se } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
4
4
  import { ChevronDown as ce, ChevronRight as pe } from "lucide-vue-next";
5
5
  function ke(e, f = !1) {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as m, ref as a, watch as _, openBlock as n, createElementBlock as c, createElementVNode as l, createBlock as h } from "vue";
2
- import { u as w, b as y, T as x } from "./index-xY2bzsk7.mjs";
2
+ import { u as w, b as y, T as x } from "./index-DdbaVSB8.mjs";
3
3
  import { _ as g } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
4
4
  const b = {
5
5
  key: 0,
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as k, ref as p, onMounted as D, watch as z, onBeforeUnmount as M, openBlock as v, createElementBlock as h, createElementVNode as m, toDisplayString as S, unref as C, createCommentVNode as w, createBlock as N, normalizeStyle as B } from "vue";
2
2
  import { S as H } from "./index-CyBXARuf.mjs";
3
- import { u as O, b as R, e as W, d as G, O as V, l as E } from "./index-xY2bzsk7.mjs";
3
+ import { u as O, b as R, e as W, d as G, O as V, l as E } from "./index-DdbaVSB8.mjs";
4
4
  import { _ as F } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
5
5
  const L = { class: "vfp-relative vfp-flex vfp-flex-col vfp-items-center vfp-w-full vfp-h-full" }, j = {
6
6
  key: 0,
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as L, ref as a, watch as _, nextTick as M, computed as y, openBlock as s, createElementBlock as c, createElementVNode as f, createBlock as $, normalizeStyle as p, Fragment as N, renderList as j } from "vue";
2
2
  import I from "mammoth";
3
- import { u as F, b as X, X as C, j as R, B as q } from "./index-xY2bzsk7.mjs";
3
+ import { u as F, b as X, X as C, j as R, B as q } from "./index-DdbaVSB8.mjs";
4
4
  import { _ as z } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
5
5
  const O = {
6
6
  key: 0,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as m, ref as a, watch as _, openBlock as s, createElementBlock as f, createElementVNode as p, createBlock as h } from "vue";
2
- import { u as w, b as y, S as g } from "./index-xY2bzsk7.mjs";
2
+ import { u as w, b as y, S as g } from "./index-DdbaVSB8.mjs";
3
3
  import { _ as b } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
4
4
  const k = {
5
5
  key: 0,
@@ -3,7 +3,7 @@ import N from "markdown-it";
3
3
  import Y from "@traptitech/markdown-it-katex";
4
4
  import { codeToHtml as E } from "shiki";
5
5
  import { Code as F, Eye as W } from "lucide-vue-next";
6
- import { u as z, b as J, c as Q, e as U, _ as X } from "./index-xY2bzsk7.mjs";
6
+ import { u as z, b as J, c as Q, e as U, _ as X } from "./index-DdbaVSB8.mjs";
7
7
  import { _ as Z } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
8
8
  import { T as ee } from "./base.types-DaftHyg7.mjs";
9
9
  const te = {
@@ -19,14 +19,14 @@ const te = {
19
19
  }, ne = ["innerHTML"], le = {
20
20
  key: 3,
21
21
  class: "vfp-w-full vfp-h-full vfp-overflow-auto vfp-py-6 vfp-px-4"
22
- }, se = ["innerHTML"], B = '<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>', L = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>', ae = '<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>', ce = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>', ie = /* @__PURE__ */ P({
22
+ }, ae = ["innerHTML"], B = '<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>', L = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>', se = '<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>', ce = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>', ie = /* @__PURE__ */ P({
23
23
  __name: "index",
24
24
  props: {
25
25
  url: {}
26
26
  },
27
27
  setup(q, { expose: V }) {
28
- const _ = q, x = new ee(), { t: i } = z(), j = J(), G = Q(), y = D(() => G.value === "light" ? "github-light" : "github-dark"), a = c("preview"), b = c(""), v = c(""), f = c(""), p = c(!0), h = c(null), m = c(null);
29
- k([a, p], () => {
28
+ const _ = q, x = new ee(), { t: i } = z(), j = J(), G = Q(), y = D(() => G.value === "light" ? "github-light" : "github-dark"), s = c("preview"), b = c(""), v = c(""), f = c(""), p = c(!0), h = c(null), m = c(null);
29
+ k([s, p], () => {
30
30
  x.notify();
31
31
  }), V({
32
32
  getToolbarGroups: () => {
@@ -35,12 +35,12 @@ const te = {
35
35
  items: [
36
36
  {
37
37
  type: "button",
38
- icon: a.value === "preview" ? F : W,
39
- tooltip: a.value === "preview" ? i.value("toolbar.source") : i.value("toolbar.preview"),
38
+ icon: s.value === "preview" ? F : W,
39
+ tooltip: s.value === "preview" ? i.value("toolbar.source") : i.value("toolbar.preview"),
40
40
  action: () => {
41
- a.value = a.value === "preview" ? "source" : "preview";
41
+ s.value = s.value === "preview" ? "source" : "preview";
42
42
  },
43
- active: a.value === "source"
43
+ active: s.value === "source"
44
44
  }
45
45
  ]
46
46
  }), e;
@@ -96,7 +96,7 @@ const te = {
96
96
  const o = document.createElement("textarea");
97
97
  o.value = e, document.body.appendChild(o), o.select(), document.execCommand("copy"), document.body.removeChild(o);
98
98
  }
99
- t.innerHTML = r ? ae : ce, t.title = i.value("markdown.copied"), setTimeout(() => {
99
+ t.innerHTML = r ? se : ce, t.title = i.value("markdown.copied"), setTimeout(() => {
100
100
  t.innerHTML = r ? B : L, t.title = i.value("markdown.copy_code");
101
101
  }, 2e3);
102
102
  }), t;
@@ -105,9 +105,9 @@ const te = {
105
105
  if (!m.value) return;
106
106
  const e = m.value.querySelectorAll('pre[data-shiki-pending="1"]');
107
107
  for (const o of e) {
108
- const w = o.getAttribute("data-lang") || "text", s = ((t = o.querySelector("code")) == null ? void 0 : t.textContent) || "";
108
+ const w = o.getAttribute("data-lang") || "text", a = ((t = o.querySelector("code")) == null ? void 0 : t.textContent) || "";
109
109
  try {
110
- const g = await E(s, { lang: w, theme: y.value }), M = document.createElement("div");
110
+ const g = await E(a, { lang: w, theme: y.value }), M = document.createElement("div");
111
111
  M.innerHTML = g;
112
112
  const S = M.firstElementChild;
113
113
  S && o.replaceWith(S);
@@ -118,7 +118,7 @@ const te = {
118
118
  const r = m.value.querySelectorAll(".code-block-wrapper");
119
119
  for (const o of r) {
120
120
  if (o.querySelector(".code-copy-btn")) continue;
121
- const w = o.querySelector(".code-block-header"), s = o.querySelector("pre"), g = ((n = s == null ? void 0 : s.querySelector("code")) == null ? void 0 : n.textContent) ?? (s == null ? void 0 : s.textContent) ?? "";
121
+ const w = o.querySelector(".code-block-header"), a = o.querySelector("pre"), g = ((n = a == null ? void 0 : a.querySelector("code")) == null ? void 0 : n.textContent) ?? (a == null ? void 0 : a.textContent) ?? "";
122
122
  w ? w.appendChild(T(g, !0)) : o.appendChild(T(g, !1));
123
123
  }
124
124
  };
@@ -131,7 +131,7 @@ const te = {
131
131
  ])])) : h.value ? (d(), O(Z, {
132
132
  key: 1,
133
133
  message: h.value
134
- }, null, 8, ["message"])) : a.value === "source" ? (d(), u("div", oe, [
134
+ }, null, 8, ["message"])) : s.value === "source" ? (d(), u("div", oe, [
135
135
  f.value ? (d(), u("div", {
136
136
  key: 1,
137
137
  class: "shiki-wrapper",
@@ -143,10 +143,10 @@ const te = {
143
143
  ref: m,
144
144
  class: "markdown-body",
145
145
  innerHTML: v.value
146
- }, null, 8, se)
146
+ }, null, 8, ae)
147
147
  ]));
148
148
  }
149
- }), ke = /* @__PURE__ */ X(ie, [["__scopeId", "data-v-e65958df"]]);
149
+ }), ke = /* @__PURE__ */ X(ie, [["__scopeId", "data-v-ccd85c2a"]]);
150
150
  export {
151
151
  ke as default
152
152
  };