@work-zhanguo/light-file-preview 0.0.13 → 0.0.15

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.
@@ -5820,7 +5820,7 @@ const fa = ["aria-modal"], da = {
5820
5820
  },
5821
5821
  emits: ["update:visible", "error"],
5822
5822
  setup(e, { emit: t }) {
5823
- const n = /* @__PURE__ */ Qt(() => import("./PdfRenderer-CANDrYvV.js")), o = /* @__PURE__ */ Qt(() => import("./TextRenderer-CFNsDxIx.js")), r = /* @__PURE__ */ Qt(() => import("./DocxRenderer-DGXNIVsp.js")), s = /* @__PURE__ */ Qt(() => import("./SheetRenderer-CM49qq4y.js")), i = /* @__PURE__ */ Qt(() => import("./UnsupportedRenderer-NMI6uTEn.js")), l = e, u = t, p = /* @__PURE__ */ ft(null), a = /* @__PURE__ */ ft(!1), f = /* @__PURE__ */ ft(""), h = /* @__PURE__ */ ft(0), m = /* @__PURE__ */ ft(gs(l.source, l.fileName)), O = {
5823
+ const n = /* @__PURE__ */ Qt(() => import("./PdfRenderer-DNDmJ3M6.js")), o = /* @__PURE__ */ Qt(() => import("./TextRenderer-CQsD7GMD.js")), r = /* @__PURE__ */ Qt(() => import("./DocxRenderer-DR_4KeGA.js")), s = /* @__PURE__ */ Qt(() => import("./SheetRenderer-XW8dLaab.js")), i = /* @__PURE__ */ Qt(() => import("./UnsupportedRenderer-fr1iHYbj.js")), l = e, u = t, p = /* @__PURE__ */ ft(null), a = /* @__PURE__ */ ft(!1), f = /* @__PURE__ */ ft(""), h = /* @__PURE__ */ ft(0), m = /* @__PURE__ */ ft(gs(l.source, l.fileName)), O = {
5824
5824
  image: "图片",
5825
5825
  pdf: "PDF",
5826
5826
  text: "文本",
@@ -6232,19 +6232,20 @@ export {
6232
6232
  Va as L,
6233
6233
  ir as a,
6234
6234
  he as b,
6235
- Ue as c,
6235
+ tt as c,
6236
6236
  ci as d,
6237
- tn as e,
6237
+ Ue as e,
6238
6238
  ue as f,
6239
- tt as g,
6239
+ tn as g,
6240
6240
  Ta as h,
6241
6241
  du as i,
6242
- oo as j,
6242
+ Yo as j,
6243
6243
  aa as k,
6244
- Yo as n,
6244
+ oo as n,
6245
6245
  ai as o,
6246
6246
  ft as r,
6247
6247
  on as t,
6248
6248
  Mt as u,
6249
- Ca as v
6249
+ Ca as v,
6250
+ xt as w
6250
6251
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@work-zhanguo/light-file-preview",
3
- "version": "0.0.13",
4
- "description": "轻量级通用文件预览组件,支持 Vue3、Vue2 适配与独立产物嵌入。",
3
+ "version": "0.0.15",
4
+ "description": "Lightweight file preview component for Vue 3, Vue 2, and standalone usage / 轻量级文件预览组件,支持 Vue3、Vue2 与独立产物嵌入。",
5
5
  "type": "module",
6
6
  "main": "./dist/light-file-preview.umd.cjs",
7
7
  "module": "./dist/light-file-preview.js",
@@ -1,42 +0,0 @@
1
- import { defineComponent as s, ref as f, onMounted as u, onBeforeUnmount as d, openBlock as m, createElementBlock as p } from "vue";
2
- import { r as v } from "./text-Bqxn_tMI.js";
3
- const x = /* @__PURE__ */ s({
4
- __name: "DocxRenderer",
5
- props: {
6
- source: {}
7
- },
8
- emits: ["loading", "error"],
9
- setup(a, { emit: c }) {
10
- const i = a, n = c, e = f(null), o = new AbortController();
11
- async function l() {
12
- n("loading", !0);
13
- try {
14
- const r = await v(i.source, o.signal), { renderAsync: t } = await import("./docx-preview-BV-bQyiM.js");
15
- if (!e.value)
16
- return;
17
- e.value.innerHTML = "", await t(r, e.value, void 0, {
18
- className: "lfp-docx-content",
19
- ignoreWidth: !1,
20
- ignoreHeight: !1,
21
- useBase64URL: !0
22
- });
23
- } catch (r) {
24
- n("error", r instanceof Error ? r : new Error("DOCX 预览失败"));
25
- } finally {
26
- n("loading", !1);
27
- }
28
- }
29
- return u(() => {
30
- l();
31
- }), d(() => {
32
- o.abort(), e.value && (e.value.innerHTML = "");
33
- }), (r, t) => (m(), p("div", {
34
- ref_key: "containerRef",
35
- ref: e,
36
- class: "lfp-document lfp-docx"
37
- }, null, 512));
38
- }
39
- });
40
- export {
41
- x as default
42
- };