@eternalheart/vue-file-preview 1.7.2 → 1.8.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/README.md +28 -0
- package/README.zh-CN.md +28 -0
- package/lib/FilePreviewContent.vue.d.ts +25 -11
- package/lib/FilePreviewEmbed.vue.d.ts +20 -11
- package/lib/FilePreviewModal.vue.d.ts +20 -11
- package/lib/chunks/{EmptyState.vue_vue_type_script_setup_true_lang-Dna6LmVT.mjs → EmptyState.vue_vue_type_script_setup_true_lang-98G0nOSe.mjs} +1 -1
- package/lib/chunks/{avifLoader-CAUzjn-d-dPsP28D5.mjs → avifLoader-CAUzjn-d-BaqsWKGB.mjs} +1 -1
- package/lib/chunks/{heicLoader-D_9PukkA-T-k1DSgY.mjs → heicLoader-D_9PukkA-C9OkgWGg.mjs} +1 -1
- package/lib/chunks/index-B5B5upNy.mjs +112 -0
- package/lib/chunks/{index-cRhwUlQN.mjs → index-B9xl_UYv.mjs} +26 -26
- package/lib/chunks/{index-B5hprvcF.mjs → index-BKpp6GvN.mjs} +2516 -2085
- package/lib/chunks/{index-oJF-hur2.mjs → index-BNNGXI8X.mjs} +1 -1
- package/lib/chunks/{index-eNZr1h6f.mjs → index-BV5eiYIr.mjs} +23 -23
- package/lib/chunks/{index-BjHEHkZ8.mjs → index-Bghv1art.mjs} +1 -1
- package/lib/chunks/{index-TZv0MqBH.mjs → index-Bl530kxA.mjs} +5 -5
- package/lib/chunks/index-CCHdh2Ta.mjs +220 -0
- package/lib/chunks/{index-QPk2c2Tl.mjs → index-CDd2zFE5.mjs} +2 -2
- package/lib/chunks/{index-C95y29OL.mjs → index-CHpO-VOr.mjs} +19 -19
- package/lib/chunks/index-CSxcgc5S.mjs +401 -0
- package/lib/chunks/{index-Cv3Sg87O.mjs → index-CcyrSSZO.mjs} +17 -17
- package/lib/chunks/{index-JjVQZbDt.mjs → index-CzBIAq6E.mjs} +25 -25
- package/lib/chunks/{index-BPutNVAf.mjs → index-D-18qa-n.mjs} +1 -1
- package/lib/chunks/{index-BN__EwfT.mjs → index-D4OWPWnl.mjs} +1 -1
- package/lib/chunks/{index-Dnyl1HQk.mjs → index-DcEoeHsV.mjs} +10 -10
- package/lib/chunks/{index-DInI3RTN.mjs → index-DjCn0C-U.mjs} +33 -33
- package/lib/chunks/{index-DHba2Axz.mjs → index-Dtr0MERf.mjs} +53 -53
- package/lib/chunks/{index-CqOGKCyE.mjs → index-UBINFnHY.mjs} +1 -1
- package/lib/chunks/{index-BlZ6RmeR.mjs → index-YyZE4Nkm.mjs} +4 -4
- package/lib/chunks/{index-CegPYMyO.mjs → index-mdCIanDM.mjs} +27 -27
- package/lib/chunks/{index-DXzvgRuo.mjs → index-s_jqndx-.mjs} +1 -1
- package/lib/chunks/{jp2Loader-Dig19xyo-hrIg_KJ3.mjs → jp2Loader-Dig19xyo-CD7_CVVV.mjs} +1 -1
- package/lib/chunks/{psdLoader-C0tKUXXl-B2cJ4s7t.mjs → psdLoader-C0tKUXXl-Bf25O3n4.mjs} +1 -1
- package/lib/chunks/{rawLoader-C-tPeFAB-BNV-Wmzr.mjs → rawLoader-C-tPeFAB-CZ65svhu.mjs} +5 -5
- package/lib/chunks/{tiffLoader-BlhByX8w-BzSrLE9Y.mjs → tiffLoader-BlhByX8w-BEFJubN7.mjs} +1 -1
- package/lib/chunks/{useShikiHighlight-CpL0RAQg.mjs → useShikiHighlight-axL5ux5r.mjs} +1 -1
- package/lib/composables/useRendererBridge.d.ts +19 -0
- package/lib/composables/useRequest.d.ts +1 -13
- package/lib/core/index.d.ts +9 -1
- package/lib/core/renderer-bridge/bridge.d.ts +53 -0
- package/lib/core/renderer-bridge/hub.d.ts +58 -0
- package/lib/core/renderer-bridge/types.d.ts +141 -0
- package/lib/core/types.d.ts +0 -7
- package/lib/core/utils/rendererId.d.ts +7 -0
- package/lib/core/utils/spreadsheetSheets.d.ts +17 -0
- package/lib/index.cjs +60 -60
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.mjs +8 -8
- package/lib/renderers/Xlsx/index.vue.d.ts +4 -0
- package/lib/types.d.ts +7 -2
- package/package.json +1 -1
- package/lib/chunks/index-B_Spz6Wn.mjs +0 -359
- package/lib/chunks/index-DcvlMm9Q.mjs +0 -137
- package/lib/chunks/index-dOxDeWYi.mjs +0 -104
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ref as f, watch as G, onUnmounted as O, defineComponent as W, toRef as X, computed as
|
|
1
|
+
import { ref as f, watch as G, onUnmounted as O, defineComponent as W, toRef as X, computed as D, onMounted as J, onBeforeUnmount as K, unref as e, openBlock as _, createBlock as N, createElementBlock as Z, createElementVNode as a, normalizeClass as I, createVNode as T, toDisplayString as j, normalizeStyle as H, resolveDynamicComponent as Q, Transition as Y, 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 { b as ue,
|
|
3
|
+
import { b as ue, Z as pe, k as de, u as ce } from "./index-BKpp6GvN.mjs";
|
|
4
4
|
import { _ as me } from "./RendererError.vue_vue_type_script_setup_true_lang-FmkMQHB8.mjs";
|
|
5
5
|
function ge(x) {
|
|
6
6
|
const v = f(null), y = f(!1), d = f(!0), n = f(0), P = f(0), m = f(1), g = f(!1), h = f(!1), u = f(null), p = ue();
|
|
@@ -97,10 +97,10 @@ const xe = {
|
|
|
97
97
|
}, ye = { class: "vfp-w-full vfp-max-w-xl vfp-flex-shrink-0 vfp-rounded-lg vfp-border vfp-border-line-weak vfp-bg-surface-1 vfp-p-4" }, he = { class: "vfp-flex vfp-items-center vfp-gap-3 vfp-mb-4" }, be = { class: "vfp-min-w-0 vfp-flex-1 vfp-truncate vfp-text-sm vfp-font-medium vfp-text-fg-primary" }, we = { class: "vfp-flex vfp-items-center vfp-gap-3 vfp-mb-4" }, ke = { class: "vfp-w-9 vfp-flex-shrink-0 vfp-text-right vfp-text-[11px] vfp-text-fg-tertiary vfp-tabular-nums" }, _e = { class: "vfp-relative vfp-h-4 vfp-flex vfp-flex-1 vfp-items-center" }, Le = { class: "vfp-absolute vfp-left-[6px] vfp-right-[6px] vfp-h-[3px] vfp-rounded-full vfp-bg-surface-3" }, Ee = ["max", "value", "disabled", "aria-label"], Te = { class: "vfp-w-9 vfp-flex-shrink-0 vfp-text-[11px] vfp-text-fg-tertiary vfp-tabular-nums" }, Pe = { class: "vfp-flex vfp-items-center vfp-gap-1" }, Me = ["title", "aria-label"], Ce = ["title", "aria-label"], Ve = ["title", "aria-label"], Ne = ["title", "aria-label"], je = ["title", "aria-label"], Re = {
|
|
98
98
|
class: "vfp-flex vfp-flex-col vfp-items-center vfp-gap-2",
|
|
99
99
|
style: { height: "100px" }
|
|
100
|
-
},
|
|
100
|
+
}, Fe = {
|
|
101
101
|
class: "vfp-relative vfp-flex vfp-items-center vfp-justify-center",
|
|
102
102
|
style: { width: "24px", height: "80px" }
|
|
103
|
-
},
|
|
103
|
+
}, Se = ["value", "aria-label"], $e = { class: "vfp-text-[10px] vfp-tabular-nums vfp-text-fg-tertiary" }, Be = ["src"], ze = /* @__PURE__ */ W({
|
|
104
104
|
__name: "index",
|
|
105
105
|
props: {
|
|
106
106
|
url: {},
|
|
@@ -117,20 +117,20 @@ const xe = {
|
|
|
117
117
|
isMuted: r,
|
|
118
118
|
error: L,
|
|
119
119
|
togglePlay: R,
|
|
120
|
-
seek:
|
|
121
|
-
skip:
|
|
120
|
+
seek: F,
|
|
121
|
+
skip: S,
|
|
122
122
|
setVolume: A,
|
|
123
|
-
toggleMute:
|
|
124
|
-
toggleLoop:
|
|
123
|
+
toggleMute: $,
|
|
124
|
+
toggleLoop: B,
|
|
125
125
|
formatTime: t
|
|
126
126
|
} = ge(d), l = f(!1), s = f(!1), b = f(0), w = f(null);
|
|
127
127
|
let c = null;
|
|
128
|
-
const k =
|
|
128
|
+
const k = D(() => s.value ? b.value : h.value), M = D(() => u.value > 0 ? k.value / u.value : 0), C = D(() => r.value || p.value === 0 ? ae : p.value < 0.5 ? oe : ne), E = (z) => {
|
|
129
129
|
w.value && !w.value.contains(z.target) && (l.value = !1);
|
|
130
130
|
};
|
|
131
|
-
|
|
131
|
+
J(() => {
|
|
132
132
|
document.addEventListener("mousedown", E);
|
|
133
|
-
}),
|
|
133
|
+
}), K(() => {
|
|
134
134
|
document.removeEventListener("mousedown", E), c !== null && clearTimeout(c);
|
|
135
135
|
});
|
|
136
136
|
const U = () => {
|
|
@@ -145,7 +145,7 @@ const xe = {
|
|
|
145
145
|
}), (z, o) => e(L) ? (_(), N(me, {
|
|
146
146
|
key: 0,
|
|
147
147
|
message: e(n)(e(L))
|
|
148
|
-
}, null, 8, ["message"])) : (_(),
|
|
148
|
+
}, null, 8, ["message"])) : (_(), Z("div", xe, [
|
|
149
149
|
a("div", ye, [
|
|
150
150
|
a("div", he, [
|
|
151
151
|
a("div", {
|
|
@@ -165,7 +165,7 @@ const xe = {
|
|
|
165
165
|
a("div", Le, [
|
|
166
166
|
a("div", {
|
|
167
167
|
class: "vfp-h-full vfp-rounded-full vfp-pointer-events-none",
|
|
168
|
-
style:
|
|
168
|
+
style: H({
|
|
169
169
|
width: `${M.value * 100}%`,
|
|
170
170
|
background: "var(--fp-player-progress)",
|
|
171
171
|
transition: s.value ? "none" : "width 0.1s linear"
|
|
@@ -186,11 +186,11 @@ const xe = {
|
|
|
186
186
|
}),
|
|
187
187
|
onInput: o[1] || (o[1] = (i) => {
|
|
188
188
|
const V = parseFloat(i.target.value);
|
|
189
|
-
s.value ? b.value = V : e(
|
|
189
|
+
s.value ? b.value = V : e(F)(V);
|
|
190
190
|
}),
|
|
191
191
|
onPointerup: o[2] || (o[2] = (i) => {
|
|
192
192
|
const V = parseFloat(i.target.value);
|
|
193
|
-
e(
|
|
193
|
+
e(F)(V), s.value = !1;
|
|
194
194
|
}),
|
|
195
195
|
onPointercancel: o[3] || (o[3] = (i) => s.value = !1)
|
|
196
196
|
}, null, 40, Ee)
|
|
@@ -223,7 +223,7 @@ const xe = {
|
|
|
223
223
|
class: "vfp-audio-control vfp-w-9 vfp-h-9 vfp-rounded-md vfp-flex vfp-items-center vfp-justify-center vfp-transition-colors vfp-text-fg-secondary hover:vfp-bg-surface-3 vfp-flex-shrink-0",
|
|
224
224
|
title: e(n)("audio.aria.backward_10"),
|
|
225
225
|
"aria-label": e(n)("audio.aria.backward_10"),
|
|
226
|
-
onClick: o[5] || (o[5] = (i) => e(
|
|
226
|
+
onClick: o[5] || (o[5] = (i) => e(S)(-10))
|
|
227
227
|
}, [
|
|
228
228
|
T(e(ie), { class: "vfp-w-[18px] vfp-h-[18px]" })
|
|
229
229
|
], 8, Ce),
|
|
@@ -232,7 +232,7 @@ const xe = {
|
|
|
232
232
|
class: "vfp-audio-control vfp-w-9 vfp-h-9 vfp-rounded-md vfp-flex vfp-items-center vfp-justify-center vfp-transition-colors vfp-text-fg-secondary hover:vfp-bg-surface-3 vfp-flex-shrink-0",
|
|
233
233
|
title: e(n)("audio.aria.forward_10"),
|
|
234
234
|
"aria-label": e(n)("audio.aria.forward_10"),
|
|
235
|
-
onClick: o[6] || (o[6] = (i) => e(
|
|
235
|
+
onClick: o[6] || (o[6] = (i) => e(S)(10))
|
|
236
236
|
}, [
|
|
237
237
|
T(e(fe), { class: "vfp-w-[18px] vfp-h-[18px]" })
|
|
238
238
|
], 8, Ve),
|
|
@@ -246,7 +246,7 @@ const xe = {
|
|
|
246
246
|
title: e(g) ? e(n)("audio.aria.loop_off") : e(n)("audio.aria.loop_on"),
|
|
247
247
|
"aria-label": e(g) ? e(n)("audio.aria.loop_off") : e(n)("audio.aria.loop_on"),
|
|
248
248
|
onClick: o[7] || (o[7] = //@ts-ignore
|
|
249
|
-
(...i) => e(
|
|
249
|
+
(...i) => e(B) && e(B)(...i))
|
|
250
250
|
}, [
|
|
251
251
|
T(e(ve), { class: "vfp-w-4 vfp-h-4" })
|
|
252
252
|
], 10, Ne),
|
|
@@ -267,27 +267,27 @@ const xe = {
|
|
|
267
267
|
title: e(r) ? e(n)("audio.aria.unmute") : e(n)("audio.aria.mute"),
|
|
268
268
|
"aria-label": e(r) ? e(n)("audio.aria.unmute") : e(n)("audio.aria.mute"),
|
|
269
269
|
onClick: o[8] || (o[8] = //@ts-ignore
|
|
270
|
-
(...i) => e(
|
|
270
|
+
(...i) => e($) && e($)(...i))
|
|
271
271
|
}, [
|
|
272
|
-
(_(), N(
|
|
272
|
+
(_(), N(Q(C.value), { class: "vfp-w-4 vfp-h-4" }))
|
|
273
273
|
], 10, je),
|
|
274
|
-
T(
|
|
274
|
+
T(Y, { name: "vfp-fade" }, {
|
|
275
275
|
default: ee(() => [
|
|
276
|
-
l.value ? (_(),
|
|
276
|
+
l.value ? (_(), Z("div", {
|
|
277
277
|
key: 0,
|
|
278
278
|
class: "vfp-absolute vfp-right-0 vfp-bottom-full vfp-mb-2 vfp-w-[54px] vfp-rounded-md vfp-p-3 vfp-border vfp-bg-surface-toolbar vfp-border-line",
|
|
279
279
|
onMouseenter: U,
|
|
280
280
|
onMouseleave: q
|
|
281
281
|
}, [
|
|
282
282
|
a("div", Re, [
|
|
283
|
-
a("div",
|
|
283
|
+
a("div", Fe, [
|
|
284
284
|
o[10] || (o[10] = a("div", {
|
|
285
285
|
class: "vfp-absolute vfp-rounded-full vfp-bg-surface-2",
|
|
286
286
|
style: { width: "3px", height: "100%" }
|
|
287
287
|
}, null, -1)),
|
|
288
288
|
a("div", {
|
|
289
289
|
class: "vfp-absolute vfp-bottom-0 vfp-rounded-full vfp-pointer-events-none",
|
|
290
|
-
style:
|
|
290
|
+
style: H({
|
|
291
291
|
width: "3px",
|
|
292
292
|
height: `${(e(r) ? 0 : e(p)) * 100}%`,
|
|
293
293
|
background: "var(--fp-player-progress)",
|
|
@@ -304,9 +304,9 @@ const xe = {
|
|
|
304
304
|
class: "volume-slider-vertical vfp-absolute",
|
|
305
305
|
style: { width: "80px", height: "24px", transform: "rotate(-90deg)", "transform-origin": "center center" },
|
|
306
306
|
onInput: o[9] || (o[9] = (i) => e(A)(parseFloat(i.target.value)))
|
|
307
|
-
}, null, 40,
|
|
307
|
+
}, null, 40, Se)
|
|
308
308
|
]),
|
|
309
|
-
a("span",
|
|
309
|
+
a("span", $e, j(Math.round((e(r) ? 0 : e(p)) * 100)), 1)
|
|
310
310
|
])
|
|
311
311
|
], 32)) : te("", !0)
|
|
312
312
|
]),
|
|
@@ -320,7 +320,7 @@ const xe = {
|
|
|
320
320
|
ref: P,
|
|
321
321
|
src: x.url,
|
|
322
322
|
class: "vfp-hidden"
|
|
323
|
-
}, null, 8,
|
|
323
|
+
}, null, 8, Be)
|
|
324
324
|
]));
|
|
325
325
|
}
|
|
326
326
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as er, ref as qe, watch as tr, computed as te, openBlock as J, createElementBlock as Q, createElementVNode as F, toDisplayString as ne, unref as ae, createBlock as rr, createVNode as he, createCommentVNode as oe, normalizeStyle as ir, Fragment as nr, renderList as ar, createTextVNode as sr, normalizeClass as or } from "vue";
|
|
2
|
-
import { u as cr, a as fr, b as ur,
|
|
2
|
+
import { u as cr, a as fr, b as ur, k as hr, n as lr } from "./index-BKpp6GvN.mjs";
|
|
3
3
|
import { User as dr, Users as Ve, Calendar as mt, Clock as Et, Tag as gt, Mail as pr, Paperclip as yr, Hash as br } from "lucide-vue-next";
|
|
4
4
|
import { _ as vr } from "./RendererError.vue_vue_type_script_setup_true_lang-FmkMQHB8.mjs";
|
|
5
5
|
var fe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|