@eternalheart/vue-file-preview 1.6.0 → 1.6.1
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 +6 -5
- package/README.zh-CN.md +6 -5
- package/lib/chunks/{index-EPkoXaAV.mjs → index--NHXqnK2.mjs} +2 -2
- package/lib/chunks/{index-EPkoXaAV.mjs.map → index--NHXqnK2.mjs.map} +1 -1
- package/lib/chunks/{index-DxSw5Ekp.mjs → index-BGVPsEZp.mjs} +2 -2
- package/lib/chunks/{index-DxSw5Ekp.mjs.map → index-BGVPsEZp.mjs.map} +1 -1
- package/lib/chunks/{index-Cy83gsDL.mjs → index-BNjAUMTI.mjs} +59 -59
- package/lib/chunks/{index-Cy83gsDL.mjs.map → index-BNjAUMTI.mjs.map} +1 -1
- package/lib/chunks/{index-DL3qn-zG.mjs → index-Buf_PAEv.mjs} +2 -2
- package/lib/chunks/{index-DL3qn-zG.mjs.map → index-Buf_PAEv.mjs.map} +1 -1
- package/lib/chunks/index-BvYbkmGS.mjs +2524 -0
- package/lib/chunks/index-BvYbkmGS.mjs.map +1 -0
- package/lib/chunks/{index-Dcruruhk.mjs → index-CDeIjujW.mjs} +2 -2
- package/lib/chunks/{index-Dcruruhk.mjs.map → index-CDeIjujW.mjs.map} +1 -1
- package/lib/chunks/{index-B3Bv_Etp.mjs → index-CaXSY4F_.mjs} +8 -8
- package/lib/chunks/{index-B3Bv_Etp.mjs.map → index-CaXSY4F_.mjs.map} +1 -1
- package/lib/chunks/{index-D-YwSyrE.mjs → index-CbPX5YEA.mjs} +7 -7
- package/lib/chunks/{index-D-YwSyrE.mjs.map → index-CbPX5YEA.mjs.map} +1 -1
- package/lib/chunks/{index-CdUSfYfF.mjs → index-Ck3FZUMF.mjs} +26 -26
- package/lib/chunks/{index-CdUSfYfF.mjs.map → index-Ck3FZUMF.mjs.map} +1 -1
- package/lib/chunks/{index-DcLACobl.mjs → index-DEEd_KpG.mjs} +21 -21
- package/lib/chunks/{index-DcLACobl.mjs.map → index-DEEd_KpG.mjs.map} +1 -1
- package/lib/chunks/{index-C-ikNsDh.mjs → index-DWSMgSrs.mjs} +21 -21
- package/lib/chunks/{index-C-ikNsDh.mjs.map → index-DWSMgSrs.mjs.map} +1 -1
- package/lib/chunks/{index-C1Ev7K-W.mjs → index-DbthlQ9z.mjs} +2 -2
- package/lib/chunks/{index-C1Ev7K-W.mjs.map → index-DbthlQ9z.mjs.map} +1 -1
- package/lib/chunks/{index-CKKL3xiq.mjs → index-DgD64732.mjs} +30 -30
- package/lib/chunks/{index-CKKL3xiq.mjs.map → index-DgD64732.mjs.map} +1 -1
- package/lib/chunks/{index-BMz5d0Rs.mjs → index-DqRN6v-z.mjs} +12 -12
- package/lib/chunks/{index-BMz5d0Rs.mjs.map → index-DqRN6v-z.mjs.map} +1 -1
- package/lib/chunks/{index-BAbJRSyS.mjs → index-ScdxMQor.mjs} +2 -2
- package/lib/chunks/{index-BAbJRSyS.mjs.map → index-ScdxMQor.mjs.map} +1 -1
- package/lib/chunks/{index-Dqqq0VnB.mjs → index-_ltPndx6.mjs} +2 -2
- package/lib/chunks/{index-Dqqq0VnB.mjs.map → index-_ltPndx6.mjs.map} +1 -1
- package/lib/chunks/{index-Cl9ZiWVl.mjs → index-mWbm3FGb.mjs} +2 -2
- package/lib/chunks/{index-Cl9ZiWVl.mjs.map → index-mWbm3FGb.mjs.map} +1 -1
- package/lib/chunks/index-ptVTEZ5w.mjs +377 -0
- package/lib/chunks/index-ptVTEZ5w.mjs.map +1 -0
- package/lib/chunks/{index-CLDPeQbI.mjs → index-sFYQzEQ1.mjs} +18 -18
- package/lib/chunks/{index-CLDPeQbI.mjs.map → index-sFYQzEQ1.mjs.map} +1 -1
- package/lib/chunks/{index-DD9QZ4a2.mjs → index-zxN76i2p.mjs} +13 -13
- package/lib/chunks/{index-DD9QZ4a2.mjs.map → index-zxN76i2p.mjs.map} +1 -1
- package/lib/chunks/psdLoader-D5CkupyY-DMppLen1.mjs +79 -0
- package/lib/chunks/psdLoader-D5CkupyY-DMppLen1.mjs.map +1 -0
- package/lib/chunks/{tiffLoader-CTFKVLqJ-B84NfwhR.mjs → tiffLoader-CmUAD1vO-DABms0J3.mjs} +7 -7
- package/lib/chunks/tiffLoader-CmUAD1vO-DABms0J3.mjs.map +1 -0
- package/lib/chunks/{useShikiHighlight-CIk_v_UB.mjs → useShikiHighlight-C4qBqIx6.mjs} +2 -2
- package/lib/chunks/{useShikiHighlight-CIk_v_UB.mjs.map → useShikiHighlight-C4qBqIx6.mjs.map} +1 -1
- package/lib/index.cjs +47 -47
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.mjs +2 -2
- package/lib/renderers/Image/index.vue.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/chunks/index-2RMNnT0y.mjs +0 -363
- package/lib/chunks/index-2RMNnT0y.mjs.map +0 -1
- package/lib/chunks/index-M_Nf3MY5.mjs +0 -2458
- package/lib/chunks/index-M_Nf3MY5.mjs.map +0 -1
- package/lib/chunks/psdLoader-Doxw3mWm-DVOGFSlh.mjs +0 -73
- package/lib/chunks/psdLoader-Doxw3mWm-DVOGFSlh.mjs.map +0 -1
- package/lib/chunks/tiffLoader-CTFKVLqJ-B84NfwhR.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -250,8 +250,9 @@ Differences from `FilePreviewModal`:
|
|
|
250
250
|
## <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f4d6.svg" width="20" height="20" alt="📖" /> Supported File Formats
|
|
251
251
|
|
|
252
252
|
### Images
|
|
253
|
-
- **Formats**: JPG, PNG, GIF, WebP, SVG, BMP, ICO
|
|
254
|
-
- **Features**: Zoom (0.
|
|
253
|
+
- **Formats**: JPG, PNG, GIF, WebP, SVG, BMP, ICO, HEIC/HEIF, AVIF, TIFF, RAW, PSD, JPEG 2000
|
|
254
|
+
- **Features**: Zoom (0.01x - 10x), rotate, drag, mouse wheel zoom, double-click reset, multi-page TIFF
|
|
255
|
+
- **Decoding**: HEIC/RAW/PSD use a Worker-first path with a main-thread fallback; other advanced formats are loaded on demand
|
|
255
256
|
|
|
256
257
|
### Videos
|
|
257
258
|
- **Formats**: MP4, WebM, OGG, MOV, AVI, MKV, M4V, 3GP, FLV
|
|
@@ -522,7 +523,7 @@ const files = [
|
|
|
522
523
|
:custom-renderers="[
|
|
523
524
|
{
|
|
524
525
|
test: (file) => file.type === 'application/custom',
|
|
525
|
-
|
|
526
|
+
render: () => CustomRenderer
|
|
526
527
|
}
|
|
527
528
|
]"
|
|
528
529
|
/>
|
|
@@ -545,7 +546,7 @@ All built-in renderers use code-splitting via `defineAsyncComponent` to minimize
|
|
|
545
546
|
|
|
546
547
|
- Main entry point: gzip ≤ 60 KB (strictly enforced by CI)
|
|
547
548
|
- Each renderer: separate async chunk
|
|
548
|
-
- Total library: gzip ≤
|
|
549
|
+
- Total library: gzip ≤ 3 MB (all ESM chunks and CSS combined)
|
|
549
550
|
|
|
550
551
|
**Implementation Example:**
|
|
551
552
|
|
|
@@ -598,7 +599,7 @@ const files = [...];
|
|
|
598
599
|
:custom-renderers="[
|
|
599
600
|
{
|
|
600
601
|
test: (file) => file.type === 'application/custom',
|
|
601
|
-
|
|
602
|
+
render: () => MyCustomRenderer
|
|
602
603
|
}
|
|
603
604
|
]"
|
|
604
605
|
/>
|
package/README.zh-CN.md
CHANGED
|
@@ -250,8 +250,9 @@ const files = [
|
|
|
250
250
|
## 📖 支持的文件格式
|
|
251
251
|
|
|
252
252
|
### 图片
|
|
253
|
-
- **格式**: JPG, PNG, GIF, WebP, SVG, BMP, ICO
|
|
254
|
-
- **功能**: 缩放 (0.
|
|
253
|
+
- **格式**: JPG, PNG, GIF, WebP, SVG, BMP, ICO, HEIC/HEIF, AVIF, TIFF, RAW, PSD, JPEG 2000
|
|
254
|
+
- **功能**: 缩放 (0.01x - 10x)、旋转、拖拽、滚轮缩放、双击重置、多页 TIFF
|
|
255
|
+
- **解码**: HEIC/RAW/PSD 优先通过 Worker 解码,失败时回退主线程;其他高级格式按需加载
|
|
255
256
|
|
|
256
257
|
### 视频
|
|
257
258
|
- **格式**: MP4, WebM, OGG, MOV, AVI, MKV, M4V, 3GP, FLV
|
|
@@ -522,7 +523,7 @@ const files = [
|
|
|
522
523
|
:custom-renderers="[
|
|
523
524
|
{
|
|
524
525
|
test: (file) => file.type === 'application/custom',
|
|
525
|
-
|
|
526
|
+
render: () => CustomRenderer
|
|
526
527
|
}
|
|
527
528
|
]"
|
|
528
529
|
/>
|
|
@@ -545,7 +546,7 @@ const files = [
|
|
|
545
546
|
|
|
546
547
|
- 主入口:gzip ≤ 60 KB(CI 强制约束)
|
|
547
548
|
- 每个渲染器:独立异步 chunk
|
|
548
|
-
- 整个库:gzip ≤
|
|
549
|
+
- 整个库:gzip ≤ 3 MB(所有 ESM chunk 与 CSS 合计)
|
|
549
550
|
|
|
550
551
|
**实现示例:**
|
|
551
552
|
|
|
@@ -598,7 +599,7 @@ const files = [...];
|
|
|
598
599
|
:custom-renderers="[
|
|
599
600
|
{
|
|
600
601
|
test: (file) => file.type === 'application/custom',
|
|
601
|
-
|
|
602
|
+
render: () => MyCustomRenderer
|
|
602
603
|
}
|
|
603
604
|
]"
|
|
604
605
|
/>
|
|
@@ -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, a as Vr, b as zr } from "./index-
|
|
2
|
+
import { u as Hr, a as Vr, b as zr } from "./index-BvYbkmGS.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() {
|
|
@@ -12349,4 +12349,4 @@ abcdefghijklmnopqrstuvwxyz
|
|
|
12349
12349
|
export {
|
|
12350
12350
|
Lf as default
|
|
12351
12351
|
};
|
|
12352
|
-
//# sourceMappingURL=index
|
|
12352
|
+
//# sourceMappingURL=index--NHXqnK2.mjs.map
|