@eternalheart/vue-file-preview 1.3.12 → 1.3.13
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/README.md +27 -0
- package/README.zh-CN.md +27 -0
- package/lib/FilePreviewContent.vue.d.ts.map +1 -1
- package/lib/chunks/{index-BX-xIvu9.mjs → index-B2lqsdp7.mjs} +2 -2
- package/lib/chunks/{index-BX-xIvu9.mjs.map → index-B2lqsdp7.mjs.map} +1 -1
- package/lib/chunks/{index-Dpqyibd9.mjs → index-BHi1WRQZ.mjs} +2 -2
- package/lib/chunks/{index-Dpqyibd9.mjs.map → index-BHi1WRQZ.mjs.map} +1 -1
- package/lib/chunks/{index-Bt25EBuH.mjs → index-BTW1xwB9.mjs} +2 -2
- package/lib/chunks/{index-Bt25EBuH.mjs.map → index-BTW1xwB9.mjs.map} +1 -1
- package/lib/chunks/{index-Bhkl1Msu.mjs → index-BvegaxQF.mjs} +2 -2
- package/lib/chunks/{index-Bhkl1Msu.mjs.map → index-BvegaxQF.mjs.map} +1 -1
- package/lib/chunks/{index-BeTJ1DUg.mjs → index-CYt6tpQC.mjs} +2 -2
- package/lib/chunks/{index-BeTJ1DUg.mjs.map → index-CYt6tpQC.mjs.map} +1 -1
- package/lib/chunks/{index-BA2QrqaL.mjs → index-Cjnw238n.mjs} +2 -2
- package/lib/chunks/{index-BA2QrqaL.mjs.map → index-Cjnw238n.mjs.map} +1 -1
- package/lib/chunks/{index-yZM6j-26.mjs → index-Ctd0JQ6K.mjs} +2 -2
- package/lib/chunks/{index-yZM6j-26.mjs.map → index-Ctd0JQ6K.mjs.map} +1 -1
- package/lib/chunks/index-CyrFxdIJ.mjs +318 -0
- package/lib/chunks/index-CyrFxdIJ.mjs.map +1 -0
- package/lib/chunks/{index-CtEc7uvz.mjs → index-DBw8tvyb.mjs} +2 -2
- package/lib/chunks/{index-CtEc7uvz.mjs.map → index-DBw8tvyb.mjs.map} +1 -1
- package/lib/chunks/{index-DvNpZrTA.mjs → index-DEoR7aDN.mjs} +2 -2
- package/lib/chunks/{index-DvNpZrTA.mjs.map → index-DEoR7aDN.mjs.map} +1 -1
- package/lib/chunks/{index-D37d-1Bp.mjs → index-DIe0vHlt.mjs} +9 -9
- package/lib/chunks/{index-D37d-1Bp.mjs.map → index-DIe0vHlt.mjs.map} +1 -1
- package/lib/chunks/index-DT9dPz8I.mjs +279 -0
- package/lib/chunks/index-DT9dPz8I.mjs.map +1 -0
- package/lib/chunks/{index-CRmrH3nJ.mjs → index-DTtHrdBl.mjs} +6 -6
- package/lib/chunks/{index-CRmrH3nJ.mjs.map → index-DTtHrdBl.mjs.map} +1 -1
- package/lib/chunks/{index-C-4Vkx_h.mjs → index-DX_NBPzS.mjs} +2 -2
- package/lib/chunks/{index-C-4Vkx_h.mjs.map → index-DX_NBPzS.mjs.map} +1 -1
- package/lib/chunks/{index-BnkUXcOD.mjs → index-Dw1U4YqT.mjs} +2 -2
- package/lib/chunks/{index-BnkUXcOD.mjs.map → index-Dw1U4YqT.mjs.map} +1 -1
- package/lib/chunks/{index-BzLx8rHY.mjs → index-DyipSoKh.mjs} +2 -2
- package/lib/chunks/{index-BzLx8rHY.mjs.map → index-DyipSoKh.mjs.map} +1 -1
- package/lib/chunks/{index-BQqNfXR5.mjs → index-GGGDPwxX.mjs} +2 -2
- package/lib/chunks/{index-BQqNfXR5.mjs.map → index-GGGDPwxX.mjs.map} +1 -1
- package/lib/chunks/{index-B0tDrTQA.mjs → index-Oxwizt6-.mjs} +4 -4
- package/lib/chunks/{index-B0tDrTQA.mjs.map → index-Oxwizt6-.mjs.map} +1 -1
- package/lib/chunks/{index-Ba1_ms5t.mjs → index-Zwl5J-Uw.mjs} +2 -2
- package/lib/chunks/{index-Ba1_ms5t.mjs.map → index-Zwl5J-Uw.mjs.map} +1 -1
- package/lib/components/ResizableSplit.vue.d.ts +17 -2
- package/lib/components/ResizableSplit.vue.d.ts.map +1 -1
- package/lib/index.cjs +32 -32
- package/lib/index.cjs.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.mjs +1 -1
- package/lib/renderers/Image/index.vue.d.ts.map +1 -1
- package/lib/renderers/Text/index.vue.d.ts.map +1 -1
- package/lib/renderers/Xml/index.vue.d.ts.map +1 -1
- package/lib/renderers/Zip/index.vue.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/chunks/index-BVWAQngT.mjs +0 -234
- package/lib/chunks/index-BVWAQngT.mjs.map +0 -1
- package/lib/chunks/index-DWmW_luw.mjs +0 -280
- package/lib/chunks/index-DWmW_luw.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -95,6 +95,33 @@ export default defineConfig({
|
|
|
95
95
|
});
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
+
### Vite Bundler Note (AVIF Decoder)
|
|
99
|
+
|
|
100
|
+
If your project bundler is Vite and you happen to have `@jsquash/avif` installed (transitively or directly), the production build may fail with:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
[commonjs--resolver] Invalid value "iife" for option "worker.format"
|
|
104
|
+
- UMD and IIFE output formats are not supported for code-splitting builds.
|
|
105
|
+
file: .../@jsquash/avif/codec/enc/avif_enc_mt.js
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
This happens because `@jsquash/avif` ships a multi-threaded worker that uses code-splitting, while Vite's default `worker.format` is `'iife'`, which does not support split chunks.
|
|
109
|
+
|
|
110
|
+
**Fix** — add this to your `vite.config.ts`:
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
export default defineConfig({
|
|
114
|
+
// ... your existing config
|
|
115
|
+
worker: {
|
|
116
|
+
format: 'es',
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
`'es'` produces module workers (`type: 'module'`), supported by all modern browsers and compatible with code-splitting.
|
|
122
|
+
|
|
123
|
+
> Note: `@jsquash/avif` is only used as a fallback when the browser does not natively support AVIF (Chrome 85+, Firefox 93+, Safari 16+ all support it natively). If your target browsers cover the native list, you can also remove `@jsquash/avif` from your dependencies entirely.
|
|
124
|
+
|
|
98
125
|
## 🚀 Quick Start
|
|
99
126
|
|
|
100
127
|
### Basic Usage
|
package/README.zh-CN.md
CHANGED
|
@@ -95,6 +95,33 @@ export default defineConfig({
|
|
|
95
95
|
});
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
+
### Vite 打包提示(AVIF 解码器)
|
|
99
|
+
|
|
100
|
+
如果你的项目使用 Vite 打包,且项目里安装了 `@jsquash/avif`(直接安装或被其它依赖间接引入),生产构建时可能报错:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
[commonjs--resolver] Invalid value "iife" for option "worker.format"
|
|
104
|
+
- UMD and IIFE output formats are not supported for code-splitting builds.
|
|
105
|
+
file: .../@jsquash/avif/codec/enc/avif_enc_mt.js
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
原因:`@jsquash/avif` 内部包含一个使用代码分割的多线程 worker,而 Vite 默认的 `worker.format` 是 `'iife'`,不支持多 chunk 拆分。
|
|
109
|
+
|
|
110
|
+
**解决方法** —— 在你的 `vite.config.ts` 中加入:
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
export default defineConfig({
|
|
114
|
+
// ... 原有配置
|
|
115
|
+
worker: {
|
|
116
|
+
format: 'es',
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
`'es'` 会产生 module worker(`type: 'module'`),现代浏览器全部支持,且兼容代码分割。
|
|
122
|
+
|
|
123
|
+
> 说明:`@jsquash/avif` 仅在浏览器不原生支持 AVIF 时作为兜底使用(Chrome 85+、Firefox 93+、Safari 16+ 均已原生支持)。如果你的目标浏览器都覆盖原生支持范围,也可以直接从依赖中移除 `@jsquash/avif`。
|
|
124
|
+
|
|
98
125
|
## 🚀 快速开始
|
|
99
126
|
|
|
100
127
|
### 基础用法
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePreviewContent.vue.d.ts","sourceRoot":"","sources":["../src/FilePreviewContent.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilePreviewContent.vue.d.ts","sourceRoot":"","sources":["../src/FilePreviewContent.vue"],"names":[],"mappings":"AA2vBA,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,0BAA0B,EAC/B,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAyB,MAAM,SAAS,CAAC;AAuCrE,UAAU,KAAK;IACb,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,kCAAkC;IAClC,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,qCAAqC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS;IACT,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtD,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,mDAAmD;IACnD,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,4BAA4B;IAC5B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,4CAA4C;IAC5C,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1D;;;;;;;;;;iBAPe,kBAAkB;oBAEf,cAAc;UAdxB,OAAO,GAAG,OAAO;WAUhB,KAAK;qBAZK,cAAc,EAAE;qBAIhB,MAAM;YAEf,MAAM;cAEJ,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;cAE1C,OAAO;uBAQE,iBAAiB;gBAExB,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;AA0nC1D,wBAQG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as er, ref as qe, watch as tr, computed as ee, openBlock as X, createElementBlock as J, createElementVNode as F, createBlock as rr, unref as ae, toDisplayString as ie, createVNode as he, createCommentVNode as se, 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, a as dr, _ as pr } from "./index-
|
|
3
|
+
import { u as lr, a as dr, _ as pr } from "./index-Oxwizt6-.mjs";
|
|
4
4
|
import { _ as yr } from "./RendererError.vue_vue_type_script_setup_true_lang-CbgZBSDr.mjs";
|
|
5
5
|
var ce = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
6
6
|
function br(e) {
|
|
@@ -13187,4 +13187,4 @@ const Bi = /* @__PURE__ */ br(Vt), Ui = {
|
|
|
13187
13187
|
export {
|
|
13188
13188
|
Pn as default
|
|
13189
13189
|
};
|
|
13190
|
-
//# sourceMappingURL=index-
|
|
13190
|
+
//# sourceMappingURL=index-B2lqsdp7.mjs.map
|