@peeekpage/viewer 0.3.16 → 0.3.18
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/dist/index.js +172 -130
- package/dist/peeekviewer.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as h, jsx as a, Fragment as Ze } from "react/jsx-runtime";
|
|
2
2
|
import { useState as w, useRef as O, useEffect as T, useCallback as S, useMemo as Ue } from "react";
|
|
3
3
|
const je = /* @__PURE__ */ new Set(["http:", "https:"]);
|
|
4
4
|
function D(t) {
|
|
@@ -165,9 +165,9 @@ function at(t, e) {
|
|
|
165
165
|
return T(() => {
|
|
166
166
|
let i = !1;
|
|
167
167
|
if (r("loading"), c(null), b(null), !t) return;
|
|
168
|
-
const
|
|
168
|
+
const _ = () => {
|
|
169
169
|
d.current !== null && (clearTimeout(d.current), d.current = null);
|
|
170
|
-
},
|
|
170
|
+
}, k = async () => {
|
|
171
171
|
let u;
|
|
172
172
|
try {
|
|
173
173
|
const s = await fetch(t);
|
|
@@ -184,10 +184,10 @@ function at(t, e) {
|
|
|
184
184
|
b(f.error), r("error");
|
|
185
185
|
return;
|
|
186
186
|
}
|
|
187
|
-
c(f.value), r("ready"), f.value.status === "wip" && (d.current = setTimeout(
|
|
187
|
+
c(f.value), r("ready"), f.value.status === "wip" && (d.current = setTimeout(k, e));
|
|
188
188
|
};
|
|
189
|
-
return
|
|
190
|
-
i = !0,
|
|
189
|
+
return k(), () => {
|
|
190
|
+
i = !0, _();
|
|
191
191
|
};
|
|
192
192
|
}, [t, e]), { state: n, manifest: l, error: p };
|
|
193
193
|
}
|
|
@@ -254,17 +254,17 @@ function st(t) {
|
|
|
254
254
|
thumbsOpen: b,
|
|
255
255
|
isFullscreen: d,
|
|
256
256
|
downloadUrl: i,
|
|
257
|
-
show:
|
|
258
|
-
onZoomIn:
|
|
257
|
+
show: _,
|
|
258
|
+
onZoomIn: k,
|
|
259
259
|
onZoomOut: u,
|
|
260
260
|
onZoomSet: f,
|
|
261
261
|
onToggleThumbs: s,
|
|
262
|
-
onToggleFullscreen:
|
|
262
|
+
onToggleFullscreen: z,
|
|
263
263
|
onAbout: Z
|
|
264
264
|
} = t;
|
|
265
|
-
return /* @__PURE__ */
|
|
265
|
+
return /* @__PURE__ */ h("div", { className: "peeek__toolbar", children: [
|
|
266
266
|
/* @__PURE__ */ a("span", { className: "peeek__label", children: n }),
|
|
267
|
-
|
|
267
|
+
_.bar && /* @__PURE__ */ a("div", { className: "peeek__scrubber", "aria-hidden": !0, children: /* @__PURE__ */ a("div", { className: "peeek__scrubber-fill", style: { width: `${r}%` } }) }),
|
|
268
268
|
/* @__PURE__ */ a(
|
|
269
269
|
"button",
|
|
270
270
|
{
|
|
@@ -295,11 +295,11 @@ function st(t) {
|
|
|
295
295
|
className: "peeek__btn",
|
|
296
296
|
"aria-label": e.zoomIn,
|
|
297
297
|
disabled: l >= p,
|
|
298
|
-
onClick:
|
|
298
|
+
onClick: k,
|
|
299
299
|
children: "+"
|
|
300
300
|
}
|
|
301
301
|
),
|
|
302
|
-
|
|
302
|
+
_.thumbnails && /* @__PURE__ */ a(
|
|
303
303
|
"button",
|
|
304
304
|
{
|
|
305
305
|
type: "button",
|
|
@@ -322,18 +322,18 @@ function st(t) {
|
|
|
322
322
|
children: "↓"
|
|
323
323
|
}
|
|
324
324
|
),
|
|
325
|
-
|
|
325
|
+
_.fullscreen && /* @__PURE__ */ a(
|
|
326
326
|
"button",
|
|
327
327
|
{
|
|
328
328
|
type: "button",
|
|
329
329
|
className: `peeek__btn${d ? " peeek__btn--active" : ""}`,
|
|
330
330
|
"aria-label": e.fullscreen,
|
|
331
331
|
"aria-pressed": d,
|
|
332
|
-
onClick:
|
|
332
|
+
onClick: z,
|
|
333
333
|
children: "⛶"
|
|
334
334
|
}
|
|
335
335
|
),
|
|
336
|
-
|
|
336
|
+
_.about && /* @__PURE__ */ a(
|
|
337
337
|
"button",
|
|
338
338
|
{
|
|
339
339
|
type: "button",
|
|
@@ -348,11 +348,11 @@ function st(t) {
|
|
|
348
348
|
function it({ pages: t, layout: e, rtl: n, activePages: r, onJump: l }) {
|
|
349
349
|
const c = t.length, p = new Set(r), b = ae(c, e);
|
|
350
350
|
return /* @__PURE__ */ a("div", { className: "peeek__thumbs", role: "group", "aria-label": "Pages", children: Array.from({ length: b }, (d, i) => {
|
|
351
|
-
const
|
|
352
|
-
return /* @__PURE__ */
|
|
353
|
-
|
|
351
|
+
const _ = he(i, c, e), k = _.length === 2;
|
|
352
|
+
return /* @__PURE__ */ h("div", { className: "peeek__thumb-group", children: [
|
|
353
|
+
_.map((u, f) => {
|
|
354
354
|
let s = "";
|
|
355
|
-
return
|
|
355
|
+
return k && (s = (n ? f === 1 : f === 0) ? " peeek__thumb--flat-right" : " peeek__thumb--flat-left"), /* @__PURE__ */ a(
|
|
356
356
|
"button",
|
|
357
357
|
{
|
|
358
358
|
type: "button",
|
|
@@ -365,7 +365,7 @@ function it({ pages: t, layout: e, rtl: n, activePages: r, onJump: l }) {
|
|
|
365
365
|
u
|
|
366
366
|
);
|
|
367
367
|
}),
|
|
368
|
-
/* @__PURE__ */ a("span", { className: "peeek__thumb-badge", "aria-hidden": !0, children:
|
|
368
|
+
/* @__PURE__ */ a("span", { className: "peeek__thumb-badge", "aria-hidden": !0, children: _.map((u) => u + 1).join("-") })
|
|
369
369
|
] }, i);
|
|
370
370
|
}) });
|
|
371
371
|
}
|
|
@@ -381,11 +381,11 @@ function ct(t) {
|
|
|
381
381
|
autoTransition: b,
|
|
382
382
|
autoTransitionInterval: d,
|
|
383
383
|
show: i,
|
|
384
|
-
downloadUrl:
|
|
385
|
-
isFullscreen:
|
|
384
|
+
downloadUrl: _,
|
|
385
|
+
isFullscreen: k,
|
|
386
386
|
onToggleFullscreen: u,
|
|
387
387
|
onAbout: f
|
|
388
|
-
} = t, s = e.length,
|
|
388
|
+
} = t, s = e.length, z = ae(s, r), N = be() || !p, [W, M] = w(0), [C, U] = w(1), [X, v] = w(!1), [g, P] = w({ x: 0, y: 0 }), [A, R] = w(!1), G = O(null), oe = O(null), [y, le] = w(null), se = O(null), [_e, ke] = w(0.707);
|
|
389
389
|
T(() => {
|
|
390
390
|
if (!e[0]) return;
|
|
391
391
|
const o = new globalThis.Image();
|
|
@@ -393,35 +393,35 @@ function ct(t) {
|
|
|
393
393
|
o.naturalWidth && o.naturalHeight && ke(o.naturalWidth / o.naturalHeight);
|
|
394
394
|
}, o.src = e[0];
|
|
395
395
|
}, [e]);
|
|
396
|
-
const
|
|
396
|
+
const $ = ee(W, s, r), ye = $ <= 0, q = $ >= z - 1, E = S(
|
|
397
397
|
(o) => {
|
|
398
|
-
|
|
398
|
+
y || M((m) => {
|
|
399
399
|
const x = ee(m + o, s, r);
|
|
400
400
|
return x === m ? m : N ? x : (le({ dir: o, to: x }), m);
|
|
401
401
|
});
|
|
402
402
|
},
|
|
403
|
-
[s, r, N,
|
|
403
|
+
[s, r, N, y]
|
|
404
404
|
), ve = S(() => {
|
|
405
|
-
le((o) => (o &&
|
|
405
|
+
le((o) => (o && M(o.to), null));
|
|
406
406
|
}, []);
|
|
407
407
|
T(() => {
|
|
408
|
-
if (!
|
|
408
|
+
if (!y) return;
|
|
409
409
|
const o = se.current;
|
|
410
410
|
if (!o) return;
|
|
411
411
|
o.style.transform = "rotateY(0deg)";
|
|
412
412
|
let m = 0;
|
|
413
413
|
const x = requestAnimationFrame(() => {
|
|
414
414
|
m = requestAnimationFrame(() => {
|
|
415
|
-
o.style.transform = `rotateY(${
|
|
415
|
+
o.style.transform = `rotateY(${y.dir === 1 ? -180 : 180}deg)`;
|
|
416
416
|
});
|
|
417
417
|
});
|
|
418
418
|
return () => {
|
|
419
419
|
cancelAnimationFrame(x), cancelAnimationFrame(m);
|
|
420
420
|
};
|
|
421
|
-
}, [
|
|
421
|
+
}, [y]);
|
|
422
422
|
const we = S(
|
|
423
423
|
(o) => {
|
|
424
|
-
|
|
424
|
+
M(ee(lt(o, r), s, r));
|
|
425
425
|
},
|
|
426
426
|
[s, r]
|
|
427
427
|
), Ne = S(
|
|
@@ -434,19 +434,19 @@ function ct(t) {
|
|
|
434
434
|
if (!b || q) return;
|
|
435
435
|
const o = setTimeout(() => E(1), d);
|
|
436
436
|
return () => clearTimeout(o);
|
|
437
|
-
}, [b, d, q,
|
|
437
|
+
}, [b, d, q, $, E]);
|
|
438
438
|
const Te = () => U((o) => Math.min(ne, o + me)), Ce = () => U((o) => Math.max(te, o - me)), K = S((o, m, x) => {
|
|
439
439
|
const Q = oe.current;
|
|
440
440
|
if (!Q || x <= 1) return { x: 0, y: 0 };
|
|
441
441
|
const ue = (x - 1) * Q.clientWidth / 2, de = (x - 1) * Q.clientHeight / 2;
|
|
442
442
|
return { x: Math.max(-ue, Math.min(ue, o)), y: Math.max(-de, Math.min(de, m)) };
|
|
443
443
|
}, []);
|
|
444
|
-
T(() =>
|
|
444
|
+
T(() => P((o) => K(o.x, o.y, C)), [C, K]), T(() => P({ x: 0, y: 0 }), [$]);
|
|
445
445
|
const xe = (o) => {
|
|
446
446
|
C <= 1 || (G.current = { x: o.clientX, y: o.clientY, px: g.x, py: g.y }, R(!0), o.currentTarget.setPointerCapture(o.pointerId));
|
|
447
447
|
}, Ie = (o) => {
|
|
448
448
|
const m = G.current;
|
|
449
|
-
m &&
|
|
449
|
+
m && P(K(m.px + (o.clientX - m.x), m.py + (o.clientY - m.y), C));
|
|
450
450
|
}, ie = (o) => {
|
|
451
451
|
if (G.current) {
|
|
452
452
|
G.current = null, R(!1);
|
|
@@ -455,12 +455,12 @@ function ct(t) {
|
|
|
455
455
|
} catch {
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
|
-
}, j = he(
|
|
458
|
+
}, j = he($, s, r), J = j[0] ?? 0, ze = r === "double" && j.length === 2 ? `${j[0] + 1} - ${j[1] + 1} / ${s}` : `${J + 1} / ${s}`, Pe = z <= 1 ? 100 : $ / (z - 1) * 100, Ae = n.prev, $e = n.next, Fe = y ? y.to : $, L = Y(Fe, s, r), Se = L.left < 0 && L.right >= 0, Me = L.left >= 0 && L.right < 0, Ee = L.left >= 0 && L.right >= 0, Le = Se ? "-25%" : Me ? "25%" : "0%", F = Y($, s, r), B = y ? Y(y.to, s, r) : F, Oe = y ? y.dir === 1 ? F.right >= 0 ? F.right : F.left : F.left >= 0 ? F.left : F.right : J, Re = y ? y.dir === 1 ? B.left >= 0 ? B.left : B.right : B.right >= 0 ? B.right : B.left : J, Be = y ? y.dir === 1 ? "left" : "right" : null, ce = (o) => o === Be ? F[o] : L[o], De = [
|
|
459
459
|
["left", ce("left")],
|
|
460
460
|
["right", ce("right")]
|
|
461
461
|
];
|
|
462
|
-
return /* @__PURE__ */
|
|
463
|
-
/* @__PURE__ */
|
|
462
|
+
return /* @__PURE__ */ h(Ze, { children: [
|
|
463
|
+
/* @__PURE__ */ h(
|
|
464
464
|
"div",
|
|
465
465
|
{
|
|
466
466
|
ref: oe,
|
|
@@ -474,7 +474,7 @@ function ct(t) {
|
|
|
474
474
|
{
|
|
475
475
|
type: "button",
|
|
476
476
|
className: "peeek__arrow peeek__arrow--prev",
|
|
477
|
-
"aria-label":
|
|
477
|
+
"aria-label": Ae,
|
|
478
478
|
disabled: ye,
|
|
479
479
|
onClick: () => E(-1),
|
|
480
480
|
children: "‹"
|
|
@@ -486,20 +486,20 @@ function ct(t) {
|
|
|
486
486
|
className: `peeek__zoom${C > 1 ? " peeek__zoom--pannable" : ""}`,
|
|
487
487
|
style: {
|
|
488
488
|
transform: `translate(${g.x}px, ${g.y}px) scale(${C})`,
|
|
489
|
-
transition: N ||
|
|
489
|
+
transition: N || A ? "none" : void 0
|
|
490
490
|
},
|
|
491
491
|
onPointerDown: xe,
|
|
492
492
|
onPointerMove: Ie,
|
|
493
493
|
onPointerUp: ie,
|
|
494
494
|
onPointerCancel: ie,
|
|
495
|
-
children: /* @__PURE__ */
|
|
495
|
+
children: /* @__PURE__ */ h(
|
|
496
496
|
"div",
|
|
497
497
|
{
|
|
498
498
|
className: `peeek__spread${c ? " peeek--shadows" : ""}${Ee ? " peeek__spread--pair" : ""}`,
|
|
499
499
|
style: { transform: `translateX(${Le})` },
|
|
500
500
|
children: [
|
|
501
501
|
De.map(([o, m]) => {
|
|
502
|
-
const x = m >= 0 && i.fullscreen && !
|
|
502
|
+
const x = m >= 0 && i.fullscreen && !k && !y && C === 1;
|
|
503
503
|
return /* @__PURE__ */ a(
|
|
504
504
|
"div",
|
|
505
505
|
{
|
|
@@ -518,11 +518,11 @@ function ct(t) {
|
|
|
518
518
|
o
|
|
519
519
|
);
|
|
520
520
|
}),
|
|
521
|
-
|
|
521
|
+
y && /* @__PURE__ */ h(
|
|
522
522
|
"div",
|
|
523
523
|
{
|
|
524
524
|
ref: se,
|
|
525
|
-
className: `peeek__leaf peeek__leaf--${
|
|
525
|
+
className: `peeek__leaf peeek__leaf--${y.dir === 1 ? "fwd" : "back"}`,
|
|
526
526
|
onTransitionEnd: ve,
|
|
527
527
|
children: [
|
|
528
528
|
/* @__PURE__ */ a("div", { className: "peeek__leaf-face peeek__leaf-face--front", children: /* @__PURE__ */ a("img", { src: e[Oe], alt: "", referrerPolicy: "no-referrer" }) }),
|
|
@@ -540,7 +540,7 @@ function ct(t) {
|
|
|
540
540
|
{
|
|
541
541
|
type: "button",
|
|
542
542
|
className: "peeek__arrow peeek__arrow--next",
|
|
543
|
-
"aria-label":
|
|
543
|
+
"aria-label": $e,
|
|
544
544
|
disabled: q,
|
|
545
545
|
onClick: () => E(1),
|
|
546
546
|
children: "›"
|
|
@@ -553,19 +553,19 @@ function ct(t) {
|
|
|
553
553
|
st,
|
|
554
554
|
{
|
|
555
555
|
strings: n,
|
|
556
|
-
label:
|
|
557
|
-
progress:
|
|
556
|
+
label: ze,
|
|
557
|
+
progress: Pe,
|
|
558
558
|
zoom: C,
|
|
559
559
|
minZoom: te,
|
|
560
560
|
maxZoom: ne,
|
|
561
561
|
thumbsOpen: X,
|
|
562
|
-
isFullscreen:
|
|
563
|
-
downloadUrl:
|
|
562
|
+
isFullscreen: k,
|
|
563
|
+
downloadUrl: _,
|
|
564
564
|
show: { bar: i.bar, fullscreen: i.fullscreen, thumbnails: i.thumbnails && i.overview, about: i.about },
|
|
565
565
|
onZoomIn: Te,
|
|
566
566
|
onZoomOut: Ce,
|
|
567
567
|
onZoomSet: (o) => U(Math.min(ne, Math.max(te, o))),
|
|
568
|
-
onToggleThumbs: () =>
|
|
568
|
+
onToggleThumbs: () => v((o) => !o),
|
|
569
569
|
onToggleFullscreen: u,
|
|
570
570
|
onAbout: f
|
|
571
571
|
}
|
|
@@ -601,39 +601,39 @@ function ft(t) {
|
|
|
601
601
|
autoTransitionInterval: b,
|
|
602
602
|
downloadUrl: d,
|
|
603
603
|
isFullscreen: i,
|
|
604
|
-
onToggleFullscreen:
|
|
605
|
-
onAbout:
|
|
604
|
+
onToggleFullscreen: _,
|
|
605
|
+
onAbout: k,
|
|
606
606
|
show: u
|
|
607
|
-
} = t, f = e.length, [s,
|
|
608
|
-
(
|
|
607
|
+
} = t, f = e.length, [s, z] = w(0), Z = be(), N = S(
|
|
608
|
+
(v) => z((g) => Math.max(0, Math.min(f - 1, g + v))),
|
|
609
609
|
[f]
|
|
610
|
-
), W = s <= 0,
|
|
610
|
+
), W = s <= 0, M = s >= f - 1, C = O([]);
|
|
611
611
|
T(() => {
|
|
612
|
-
var
|
|
613
|
-
(g = (
|
|
612
|
+
var v, g;
|
|
613
|
+
(g = (v = C.current[s]) == null ? void 0 : v.scrollIntoView) == null || g.call(v, { behavior: "smooth", inline: "center", block: "nearest" });
|
|
614
614
|
}, [s]), T(() => {
|
|
615
|
-
if (!p || Z ||
|
|
616
|
-
const
|
|
617
|
-
return () => clearTimeout(
|
|
618
|
-
}, [p, b, Z,
|
|
615
|
+
if (!p || Z || M) return;
|
|
616
|
+
const v = setTimeout(() => N(1), b);
|
|
617
|
+
return () => clearTimeout(v);
|
|
618
|
+
}, [p, b, Z, M, s, N]);
|
|
619
619
|
const U = S(
|
|
620
|
-
(
|
|
621
|
-
|
|
620
|
+
(v) => {
|
|
621
|
+
v.key === "ArrowRight" ? N(c ? -1 : 1) : v.key === "ArrowLeft" && N(c ? 1 : -1);
|
|
622
622
|
},
|
|
623
623
|
[N, c]
|
|
624
624
|
), X = ut(r, l);
|
|
625
|
-
return /* @__PURE__ */
|
|
626
|
-
/* @__PURE__ */
|
|
625
|
+
return /* @__PURE__ */ h("div", { className: "peeek__cf", children: [
|
|
626
|
+
/* @__PURE__ */ h("div", { className: "peeek__cf-header", children: [
|
|
627
627
|
/* @__PURE__ */ a("span", { className: "peeek__cf-badge", children: X }),
|
|
628
|
-
/* @__PURE__ */
|
|
628
|
+
/* @__PURE__ */ h("div", { className: "peeek__cf-meta", children: [
|
|
629
629
|
/* @__PURE__ */ a("span", { className: "peeek__cf-name", children: r }),
|
|
630
|
-
/* @__PURE__ */
|
|
630
|
+
/* @__PURE__ */ h("span", { className: "peeek__cf-count", children: [
|
|
631
631
|
f,
|
|
632
632
|
" ",
|
|
633
633
|
f === 1 ? n.page : n.pages
|
|
634
634
|
] })
|
|
635
635
|
] }),
|
|
636
|
-
/* @__PURE__ */
|
|
636
|
+
/* @__PURE__ */ h("span", { className: "peeek__cf-indicator", children: [
|
|
637
637
|
s + 1,
|
|
638
638
|
" / ",
|
|
639
639
|
f
|
|
@@ -657,7 +657,7 @@ function ft(t) {
|
|
|
657
657
|
className: `peeek__btn${i ? " peeek__btn--active" : ""}`,
|
|
658
658
|
"aria-label": n.fullscreen,
|
|
659
659
|
"aria-pressed": i,
|
|
660
|
-
onClick:
|
|
660
|
+
onClick: _,
|
|
661
661
|
children: "⛶"
|
|
662
662
|
}
|
|
663
663
|
),
|
|
@@ -667,12 +667,12 @@ function ft(t) {
|
|
|
667
667
|
type: "button",
|
|
668
668
|
className: "peeek__btn",
|
|
669
669
|
"aria-label": n.about,
|
|
670
|
-
onClick:
|
|
670
|
+
onClick: k,
|
|
671
671
|
children: "?"
|
|
672
672
|
}
|
|
673
673
|
)
|
|
674
674
|
] }),
|
|
675
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ h(
|
|
676
676
|
"div",
|
|
677
677
|
{
|
|
678
678
|
className: "peeek__cf-stage",
|
|
@@ -690,20 +690,20 @@ function ft(t) {
|
|
|
690
690
|
children: "‹"
|
|
691
691
|
}
|
|
692
692
|
),
|
|
693
|
-
e.map((
|
|
694
|
-
const
|
|
695
|
-
if (Math.abs(
|
|
696
|
-
const
|
|
693
|
+
e.map((v, g) => {
|
|
694
|
+
const P = g - s;
|
|
695
|
+
if (Math.abs(P) > 1) return null;
|
|
696
|
+
const A = P === 0, R = A && u.fullscreen;
|
|
697
697
|
return /* @__PURE__ */ a(
|
|
698
698
|
"button",
|
|
699
699
|
{
|
|
700
700
|
type: "button",
|
|
701
|
-
className: `peeek__cf-card${
|
|
702
|
-
style: dt(
|
|
703
|
-
tabIndex:
|
|
701
|
+
className: `peeek__cf-card${A ? " peeek__cf-card--center" : ""}${R ? " peeek__cf-card--zoom" : ""}`,
|
|
702
|
+
style: dt(P, c),
|
|
703
|
+
tabIndex: A ? 0 : -1,
|
|
704
704
|
"aria-label": R ? n.openFullscreen : `Go to page ${g + 1}`,
|
|
705
|
-
onClick: () => R ?
|
|
706
|
-
children: /* @__PURE__ */ a("img", { src:
|
|
705
|
+
onClick: () => R ? _() : z(g),
|
|
706
|
+
children: /* @__PURE__ */ a("img", { src: v, alt: A ? `Page ${g + 1}` : "", loading: "lazy", referrerPolicy: "no-referrer" })
|
|
707
707
|
},
|
|
708
708
|
g
|
|
709
709
|
);
|
|
@@ -714,7 +714,7 @@ function ft(t) {
|
|
|
714
714
|
type: "button",
|
|
715
715
|
className: "peeek__arrow peeek__arrow--next",
|
|
716
716
|
"aria-label": n.next,
|
|
717
|
-
disabled:
|
|
717
|
+
disabled: M,
|
|
718
718
|
onClick: () => N(1),
|
|
719
719
|
children: "›"
|
|
720
720
|
}
|
|
@@ -722,21 +722,21 @@ function ft(t) {
|
|
|
722
722
|
]
|
|
723
723
|
}
|
|
724
724
|
),
|
|
725
|
-
u.thumbnails && /* @__PURE__ */ a("div", { className: "peeek__cf-thumbs", role: "group", "aria-label": "Pages", children: e.map((
|
|
726
|
-
const
|
|
727
|
-
return /* @__PURE__ */
|
|
725
|
+
u.thumbnails && /* @__PURE__ */ a("div", { className: "peeek__cf-thumbs", role: "group", "aria-label": "Pages", children: e.map((v, g) => {
|
|
726
|
+
const P = g === s;
|
|
727
|
+
return /* @__PURE__ */ h(
|
|
728
728
|
"button",
|
|
729
729
|
{
|
|
730
|
-
ref: (
|
|
731
|
-
C.current[g] =
|
|
730
|
+
ref: (A) => {
|
|
731
|
+
C.current[g] = A;
|
|
732
732
|
},
|
|
733
733
|
type: "button",
|
|
734
|
-
className: `peeek__cf-thumb${
|
|
734
|
+
className: `peeek__cf-thumb${P ? " peeek__cf-thumb--active" : ""}`,
|
|
735
735
|
"aria-label": `Go to page ${g + 1}`,
|
|
736
|
-
"aria-current":
|
|
737
|
-
onClick: () =>
|
|
736
|
+
"aria-current": P ? "page" : void 0,
|
|
737
|
+
onClick: () => z(g),
|
|
738
738
|
children: [
|
|
739
|
-
/* @__PURE__ */ a("img", { src:
|
|
739
|
+
/* @__PURE__ */ a("img", { src: v, alt: "", loading: "lazy", referrerPolicy: "no-referrer" }),
|
|
740
740
|
/* @__PURE__ */ a("span", { className: "peeek__cf-thumb-num", children: String(g + 1).padStart(2, "0") })
|
|
741
741
|
]
|
|
742
742
|
},
|
|
@@ -750,7 +750,21 @@ function mt({ logo: t, logoLink: e }) {
|
|
|
750
750
|
const n = /* @__PURE__ */ a("img", { src: t, alt: "Logo", loading: "lazy", referrerPolicy: "no-referrer" });
|
|
751
751
|
return /* @__PURE__ */ a("div", { className: "peeek__branding", children: e ? /* @__PURE__ */ a("a", { href: e, target: "_blank", rel: "noopener noreferrer", children: n }) : n });
|
|
752
752
|
}
|
|
753
|
-
|
|
753
|
+
const gt = [
|
|
754
|
+
{ top: "12%", left: "10%", size: 3, v: "A", dur: 13, delay: 0 },
|
|
755
|
+
{ top: "22%", left: "82%", size: 2, v: "B", dur: 16, delay: 2 },
|
|
756
|
+
{ top: "40%", left: "16%", size: 2, v: "C", dur: 12, delay: 1 },
|
|
757
|
+
{ top: "68%", left: "8%", size: 3, v: "A", dur: 18, delay: 3 },
|
|
758
|
+
{ top: "78%", left: "24%", size: 2, v: "B", dur: 15, delay: 0 },
|
|
759
|
+
{ top: "58%", left: "88%", size: 3, v: "C", dur: 14, delay: 4 },
|
|
760
|
+
{ top: "84%", left: "70%", size: 2, v: "A", dur: 17, delay: 1 },
|
|
761
|
+
{ top: "34%", left: "92%", size: 2, v: "B", dur: 13, delay: 2 },
|
|
762
|
+
{ top: "50%", left: "50%", size: 2, v: "C", dur: 16, delay: 5 },
|
|
763
|
+
{ top: "88%", left: "46%", size: 3, v: "A", dur: 15, delay: 0 },
|
|
764
|
+
{ top: "16%", left: "50%", size: 2, v: "B", dur: 14, delay: 3 },
|
|
765
|
+
{ top: "62%", left: "34%", size: 2, v: "C", dur: 12, delay: 2 }
|
|
766
|
+
];
|
|
767
|
+
function pt({ strings: t, onClose: e }) {
|
|
754
768
|
const n = O(null);
|
|
755
769
|
return T(() => {
|
|
756
770
|
var r;
|
|
@@ -760,7 +774,7 @@ function gt({ strings: t, onClose: e }) {
|
|
|
760
774
|
l.key === "Escape" && e();
|
|
761
775
|
};
|
|
762
776
|
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
|
763
|
-
}, [e]), /* @__PURE__ */ a("div", { className: "peeek__about-backdrop", onClick: e, children: /* @__PURE__ */
|
|
777
|
+
}, [e]), /* @__PURE__ */ a("div", { className: "peeek__about-backdrop", onClick: e, children: /* @__PURE__ */ h(
|
|
764
778
|
"div",
|
|
765
779
|
{
|
|
766
780
|
role: "dialog",
|
|
@@ -769,6 +783,20 @@ function gt({ strings: t, onClose: e }) {
|
|
|
769
783
|
className: "peeek__about",
|
|
770
784
|
onClick: (r) => r.stopPropagation(),
|
|
771
785
|
children: [
|
|
786
|
+
/* @__PURE__ */ a("span", { className: "peeek__about-particles", "aria-hidden": "true", children: gt.map((r, l) => /* @__PURE__ */ a(
|
|
787
|
+
"span",
|
|
788
|
+
{
|
|
789
|
+
className: "peeek__about-particle",
|
|
790
|
+
style: {
|
|
791
|
+
top: r.top,
|
|
792
|
+
left: r.left,
|
|
793
|
+
width: r.size,
|
|
794
|
+
height: r.size,
|
|
795
|
+
animation: `peeekAboutDrift${r.v} ${r.dur}s ease-in-out ${r.delay}s infinite`
|
|
796
|
+
}
|
|
797
|
+
},
|
|
798
|
+
l
|
|
799
|
+
)) }),
|
|
772
800
|
/* @__PURE__ */ a(
|
|
773
801
|
"button",
|
|
774
802
|
{
|
|
@@ -780,42 +808,56 @@ function gt({ strings: t, onClose: e }) {
|
|
|
780
808
|
children: "×"
|
|
781
809
|
}
|
|
782
810
|
),
|
|
783
|
-
/* @__PURE__ */
|
|
784
|
-
"
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
811
|
+
/* @__PURE__ */ h("div", { className: "peeek__about-content", children: [
|
|
812
|
+
/* @__PURE__ */ h("div", { className: "peeek__about-orbwrap", children: [
|
|
813
|
+
/* @__PURE__ */ a("span", { className: "peeek__about-ring", "aria-hidden": "true" }),
|
|
814
|
+
/* @__PURE__ */ h(
|
|
815
|
+
"svg",
|
|
816
|
+
{
|
|
817
|
+
className: "peeek__about-mark",
|
|
818
|
+
width: "48",
|
|
819
|
+
height: "48",
|
|
820
|
+
viewBox: "0 0 256 256",
|
|
821
|
+
"aria-hidden": "true",
|
|
822
|
+
children: [
|
|
823
|
+
/* @__PURE__ */ a("defs", { children: /* @__PURE__ */ h("radialGradient", { id: "peeek-about-orb", cx: "38%", cy: "30%", r: "80%", children: [
|
|
824
|
+
/* @__PURE__ */ a("stop", { offset: "0%", stopColor: "#9aa2e6" }),
|
|
825
|
+
/* @__PURE__ */ a("stop", { offset: "55%", stopColor: "#6E79D6" }),
|
|
826
|
+
/* @__PURE__ */ a("stop", { offset: "100%", stopColor: "#535cc0" })
|
|
827
|
+
] }) }),
|
|
828
|
+
/* @__PURE__ */ a("circle", { cx: "128", cy: "128", r: "128", fill: "url(#peeek-about-orb)" }),
|
|
829
|
+
/* @__PURE__ */ a(
|
|
830
|
+
"path",
|
|
831
|
+
{
|
|
832
|
+
d: "M90 196 V70 H140 A38 38 0 0 1 140 146 H90",
|
|
833
|
+
fill: "none",
|
|
834
|
+
stroke: "#fff",
|
|
835
|
+
strokeWidth: "30",
|
|
836
|
+
strokeLinecap: "round",
|
|
837
|
+
strokeLinejoin: "round"
|
|
838
|
+
}
|
|
839
|
+
)
|
|
840
|
+
]
|
|
841
|
+
}
|
|
842
|
+
)
|
|
843
|
+
] }),
|
|
844
|
+
/* @__PURE__ */ a("div", { className: "peeek__about-name", children: "Peeek Viewer" }),
|
|
845
|
+
/* @__PURE__ */ a("div", { className: "peeek__about-tagline", children: t.aboutTagline }),
|
|
846
|
+
/* @__PURE__ */ h("div", { className: "peeek__about-version", children: [
|
|
847
|
+
"v",
|
|
848
|
+
"0.3.18"
|
|
849
|
+
] }),
|
|
850
|
+
/* @__PURE__ */ a("p", { className: "peeek__about-desc", children: t.aboutDescription })
|
|
851
|
+
] })
|
|
810
852
|
]
|
|
811
853
|
}
|
|
812
854
|
) });
|
|
813
855
|
}
|
|
814
|
-
function
|
|
856
|
+
function _t(t) {
|
|
815
857
|
const e = tt(t), n = Qe(e.language), r = O(null), { isFullscreen: l, toggle: c } = ot(r), [p, b] = w(!1), d = t.pages !== void 0, i = Ue(
|
|
816
858
|
() => d ? rt(t.pages, { filename: t.filename, mimeType: t.mimeType }) : null,
|
|
817
859
|
[d, t.pages, t.filename, t.mimeType]
|
|
818
|
-
),
|
|
860
|
+
), _ = at(d ? null : e.src, e.pollInterval), k = d ? i : _.manifest, u = d ? i ? "ready" : "loading" : _.state, f = {
|
|
819
861
|
"--peeek-accent": e.accentColor
|
|
820
862
|
};
|
|
821
863
|
e.background === "transparent" ? f["--peeek-bg"] = "transparent" : e.background === "color" && e.backgroundColor ? f["--peeek-bg"] = e.backgroundColor : e.background === "image" && e.backgroundImage && (f["--peeek-bg"] = `center / cover no-repeat url("${e.backgroundImage}")`);
|
|
@@ -828,7 +870,7 @@ function ht(t) {
|
|
|
828
870
|
overview: e.pagesOverview,
|
|
829
871
|
about: e.aboutButton
|
|
830
872
|
};
|
|
831
|
-
return /* @__PURE__ */
|
|
873
|
+
return /* @__PURE__ */ h(
|
|
832
874
|
"div",
|
|
833
875
|
{
|
|
834
876
|
ref: r,
|
|
@@ -841,13 +883,13 @@ function ht(t) {
|
|
|
841
883
|
/* @__PURE__ */ a(mt, { logo: e.logo, logoLink: e.logoLink }),
|
|
842
884
|
u === "loading" && /* @__PURE__ */ a("div", { className: "peeek__state", children: n.loading }),
|
|
843
885
|
u === "error" && /* @__PURE__ */ a("div", { className: "peeek__state", children: n.error }),
|
|
844
|
-
u === "ready" &&
|
|
886
|
+
u === "ready" && k && e.mode === "coverflow" && /* @__PURE__ */ a(
|
|
845
887
|
ft,
|
|
846
888
|
{
|
|
847
|
-
pages:
|
|
889
|
+
pages: k.pages,
|
|
848
890
|
strings: n,
|
|
849
|
-
filename:
|
|
850
|
-
mimeType:
|
|
891
|
+
filename: k.metadata.filename,
|
|
892
|
+
mimeType: k.metadata.mimeType,
|
|
851
893
|
rtl: e.rtl,
|
|
852
894
|
autoTransition: e.autoTransition,
|
|
853
895
|
autoTransitionInterval: e.autoTransitionInterval,
|
|
@@ -858,10 +900,10 @@ function ht(t) {
|
|
|
858
900
|
show: { arrows: e.arrows, thumbnails: e.pagesOverview, fullscreen: e.fullscreen, about: e.aboutButton }
|
|
859
901
|
}
|
|
860
902
|
),
|
|
861
|
-
u === "ready" &&
|
|
903
|
+
u === "ready" && k && e.mode === "flip" && /* @__PURE__ */ a(
|
|
862
904
|
ct,
|
|
863
905
|
{
|
|
864
|
-
pages:
|
|
906
|
+
pages: k.pages,
|
|
865
907
|
strings: n,
|
|
866
908
|
layout: e.layout,
|
|
867
909
|
rtl: e.rtl,
|
|
@@ -876,11 +918,11 @@ function ht(t) {
|
|
|
876
918
|
onAbout: () => b(!0)
|
|
877
919
|
}
|
|
878
920
|
),
|
|
879
|
-
p && /* @__PURE__ */ a(
|
|
921
|
+
p && /* @__PURE__ */ a(pt, { strings: n, onClose: () => b(!1) })
|
|
880
922
|
]
|
|
881
923
|
}
|
|
882
924
|
);
|
|
883
925
|
}
|
|
884
926
|
export {
|
|
885
|
-
|
|
927
|
+
_t as PeeekViewer
|
|
886
928
|
};
|
package/dist/peeekviewer.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.peeek{--peeek-accent: #6E79D6;--peeek-bg: #0b0b10;--peeek-surface: rgba(255, 255, 255, .06);--peeek-text: #f5f5fa;--peeek-radius: 16px;position:relative;display:flex;flex-direction:column;width:100%;color:var(--peeek-text);background:var(--peeek-bg);border-radius:var(--peeek-radius);overflow:hidden;font-family:ui-sans-serif,system-ui,sans-serif}.peeek__stage{position:relative;display:flex;align-items:center;justify-content:center;flex:1;min-height:24rem;padding:1.75rem 3rem;overflow:hidden;perspective:2000px}.peeek__zoom{display:flex;align-items:center;justify-content:center;width:100%;height:100%;transform-origin:center center}.peeek__zoom--pannable{cursor:grab;touch-action:none}.peeek__zoom--pannable:active{cursor:grabbing}.peeek__zoom--pannable img{pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.peeek__spread{position:relative;display:flex;width:100%;transition:transform .5s cubic-bezier(.6,.05,.3,.95);transform-style:preserve-3d}.peeek__page{position:relative;width:50%;aspect-ratio:var(--peeek-aspect, .707);background:#fff;overflow:hidden}.peeek__page--empty{background:transparent;box-shadow:none}.peeek__page--left{border-top-left-radius:8px;border-bottom-left-radius:8px}.peeek__page--right{border-top-right-radius:8px;border-bottom-right-radius:8px}.peeek__spread:not(.peeek__spread--pair) .peeek__page{border-radius:8px}.peeek__page img{display:block;width:100%;height:100%;object-fit:contain}.peeek__page-btn{all:unset;display:block;width:100%;height:100%;cursor:zoom-in}.peeek--shadows .peeek__spread{box-shadow:0 24px 60px -24px #000000b3}.peeek--shadows.peeek__spread--pair .peeek__page--left{box-shadow:inset -30px 0 36px -22px #0009}.peeek--shadows.peeek__spread--pair .peeek__page--right{box-shadow:inset 30px 0 36px -22px #0009}.peeek--shadows.peeek__spread--pair .peeek__page--left:after,.peeek--shadows.peeek__spread--pair .peeek__page--right:after{content:"";position:absolute;top:0;bottom:0;width:14px;pointer-events:none}.peeek--shadows.peeek__spread--pair .peeek__page--left:after{right:0;background:linear-gradient(to right,#0000,#00000047)}.peeek--shadows.peeek__spread--pair .peeek__page--right:after{left:0;background:linear-gradient(to left,#0000,#00000047)}.peeek__leaf{position:absolute;top:0;width:50%;height:100%;z-index:3;transform-style:preserve-3d;transition:transform .62s cubic-bezier(.55,.06,.3,.98);will-change:transform}.peeek__leaf--fwd{left:50%;transform-origin:left center}.peeek__leaf--back{right:50%;transform-origin:right center}.peeek__leaf-face{position:absolute;top:0;right:0;bottom:0;left:0;backface-visibility:hidden;background:#fff;overflow:hidden}.peeek__leaf-face img{display:block;width:100%;height:100%;object-fit:contain}.peeek__leaf-face--back{transform:rotateY(180deg)}.peeek__leaf-face:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;opacity:.15;animation:peeek-curl .62s cubic-bezier(.55,.06,.3,.98) forwards;background:linear-gradient(var(--peeek-curl-dir, to right),rgba(0,0,0,.34),rgba(0,0,0,0) 58%,rgba(255,255,255,.05))}.peeek__leaf--fwd .peeek__leaf-face:after{--peeek-curl-dir: to right}.peeek__leaf--back .peeek__leaf-face:after{--peeek-curl-dir: to left}.peeek__leaf-face--back:after{transform:scaleX(-1)}@keyframes peeek-curl{0%{opacity:.15}45%{opacity:1}to{opacity:.55}}.peeek__arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:2;display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border:none;border-radius:9999px;background:#00000059;color:#fff;cursor:pointer}.peeek__arrow:disabled{opacity:.3;cursor:default}.peeek__arrow--prev{left:.75rem}.peeek__arrow--next{right:.75rem}.peeek__toolbar{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-top:1px solid rgba(255,255,255,.08);font-size:14px}.peeek__scrubber{flex:1;height:2px;background:#ffffff26;border-radius:9999px;overflow:hidden}.peeek__scrubber-fill{height:100%;background:var(--peeek-accent)}.peeek__btn{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;border-radius:8px;background:transparent;color:var(--peeek-text);cursor:pointer}.peeek__btn:disabled{opacity:.3;cursor:default}.peeek__btn--active{color:var(--peeek-accent)}.peeek__thumbs{display:flex;gap:.4rem;overflow-x:auto;padding:.75rem 1rem;border-top:1px solid rgba(255,255,255,.08)}.peeek__thumb-group{flex:0 0 auto;display:flex;gap:2px;position:relative}.peeek__thumb{flex:0 0 auto;width:4rem;height:5rem;padding:0;border:2px solid transparent;border-radius:6px;background:#fff;cursor:pointer;overflow:hidden}.peeek__thumb img{width:100%;height:100%;object-fit:contain}.peeek__thumb--active{border-color:var(--peeek-accent)}.peeek__thumb--flat-right{border-top-right-radius:0;border-bottom-right-radius:0}.peeek__thumb--flat-left{border-top-left-radius:0;border-bottom-left-radius:0}.peeek__branding{display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem}.peeek__branding img{height:1.5rem;width:auto}.peeek__state{display:flex;align-items:center;justify-content:center;min-height:24rem;font-size:16px;color:var(--peeek-text)}.peeek[data-skin=minimal] .peeek__toolbar,.peeek[data-skin=minimal] .peeek__thumbs{border-top:none;background:#00000040}.peeek[data-skin=minimal] .peeek__arrow{background:#0003}.peeek[dir=rtl] .peeek__leaf{transform-origin:right center}.peeek__cf{display:flex;flex:1;flex-direction:column;min-height:0}.peeek__cf-header{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-bottom:1px solid rgba(255,255,255,.08);font-size:14px}.peeek__cf-badge{display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.75rem;flex:0 0 auto;border-radius:6px;background:var(--peeek-accent);color:#fff;font-size:13px;font-weight:700}.peeek__cf-meta{display:flex;min-width:0;flex:1;flex-direction:column}.peeek__cf-name{overflow:hidden;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.peeek__cf-count{font-size:14px;opacity:.6}.peeek__cf-indicator{padding:.25rem .75rem;border:1px solid rgba(255,255,255,.1);border-radius:8px;font-family:ui-monospace,monospace;font-size:14px}.peeek__cf-stage{position:relative;display:flex;flex:1;align-items:center;justify-content:center;min-height:20rem;overflow:hidden;perspective:1400px}.peeek__cf-card{position:absolute;display:flex;max-width:55%;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;transition:transform .3s ease-out,opacity .3s ease-out}.peeek__cf-card--center{max-width:70%}.peeek__cf-card--zoom{cursor:zoom-in}.peeek__cf-card img{max-width:100%;max-height:19rem;border-radius:8px;background:#fff;object-fit:contain;box-shadow:0 18px 40px -12px #0009}.peeek__cf-thumbs{display:flex;gap:.5rem;overflow-x:auto;padding:.75rem 1rem;border-top:1px solid rgba(255,255,255,.08);scrollbar-width:none}.peeek__cf-thumbs::-webkit-scrollbar{display:none}.peeek__cf-thumb{display:flex;flex:0 0 auto;flex-direction:column;align-items:center;gap:.25rem;padding:.25rem;border:2px solid transparent;border-radius:8px;background:transparent;cursor:pointer}.peeek__cf-thumb img{width:3rem;height:4rem;border-radius:4px;background:#fff;object-fit:cover;opacity:.8}.peeek__cf-thumb--active{border-color:var(--peeek-accent);background:#ffffff0f}.peeek__cf-thumb--active img{opacity:1}.peeek__cf-thumb-num{font-family:ui-monospace,monospace;font-size:14px;opacity:.6}.peeek__cf-thumb--active .peeek__cf-thumb-num{color:var(--peeek-accent);opacity:1}.peeek:fullscreen .peeek__cf-card img{max-height:78vh}.peeek:fullscreen .peeek__spread{width:auto;height:100%}.peeek:fullscreen .peeek__page{width:auto;height:100%}.peeek[data-skin=minimal] .peeek__cf-header,.peeek[data-skin=minimal] .peeek__cf-thumbs{border-color:transparent;background:#00000040}.peeek[data-skin=showcase] .peeek__label{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:14px}.peeek[data-skin=showcase] .peeek__scrubber{height:2px}.peeek[data-skin=showcase] .peeek__scrubber-fill{background:var(--peeek-accent)}.peeek[data-skin=showcase] .peeek__arrow{width:2.5rem;height:2.5rem;border-radius:9999px;background:#0000004d;color:#fff;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.peeek[data-skin=showcase] .peeek__arrow:hover{background:#00000080}.peeek__thumb-badge{position:absolute;right:2px;bottom:2px;padding:0 4px;border-radius:4px;background:#000000b3;color:#fff;font-size:14px;font-weight:500;pointer-events:none}.peeek--fill-height{height:100%}.peeek--fill-height .peeek__stage{min-height:0}.peeek--fill-height .peeek__spread,.peeek--fill-height .peeek__page{width:auto;height:100%}.peeek[data-layout=double] .peeek__spread:not(.peeek__spread--pair) .peeek__page--right{border-radius:0 8px 8px 0}.peeek[data-layout=double] .peeek__spread:not(.peeek__spread--pair) .peeek__page--left{border-radius:8px 0 0 8px}.peeek[data-layout=double] .peeek__leaf--fwd .peeek__leaf-face--front{border-top-right-radius:8px;border-bottom-right-radius:8px}.peeek[data-layout=double] .peeek__leaf--fwd .peeek__leaf-face--back,.peeek[data-layout=double] .peeek__leaf--back .peeek__leaf-face--front{border-top-left-radius:8px;border-bottom-left-radius:8px}.peeek[data-layout=double] .peeek__leaf--back .peeek__leaf-face--back{border-top-right-radius:8px;border-bottom-right-radius:8px}.peeek[data-layout=single] .peeek__leaf-face{border-radius:8px}.peeek__about-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:100;display:flex;align-items:center;align-items:safe center;justify-content:center;overflow-y:auto;padding:1rem;background:#06060c9e;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}.peeek__about{position:relative;width:100%;max-width:360px;box-sizing:border-box;padding:1.75rem 1.5rem 1.25rem;text-align:center;color:var(--peeek-text);background:#16161f;border:1px solid rgba(255,255,255,.1);border-radius:var(--peeek-radius);box-shadow:0 24px 60px #00000080}.peeek__about-close{position:absolute;top:.5rem;right:.5rem;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border:none;border-radius:8px;background:transparent;color:var(--peeek-text);font-size:20px;line-height:1;cursor:pointer}.peeek__about-close:hover{background:#ffffff14}.peeek__about-mark{display:block;margin-inline:auto;color:var(--peeek-accent)}.peeek__about-name{margin-top:.5rem;font-size:20px;font-weight:700;letter-spacing:.01em}.peeek__about-tagline{margin-top:.25rem;font-size:14px;color:#f5f5fab3}.peeek__about-version{display:inline-block;margin-top:.75rem;padding:.15rem .6rem;font-size:14px;font-weight:600;color:var(--peeek-accent);background:#6e79d629;border-radius:9999px}.peeek__about-desc{margin:.9rem 0 0;font-size:14px;line-height:1.5;color:#f5f5fad1}
|
|
1
|
+
.peeek{--peeek-accent: #6E79D6;--peeek-bg: #0b0b10;--peeek-surface: rgba(255, 255, 255, .06);--peeek-text: #f5f5fa;--peeek-radius: 16px;position:relative;display:flex;flex-direction:column;width:100%;color:var(--peeek-text);background:var(--peeek-bg);border-radius:var(--peeek-radius);overflow:hidden;font-family:ui-sans-serif,system-ui,sans-serif}.peeek__stage{position:relative;display:flex;align-items:center;justify-content:center;flex:1;min-height:24rem;padding:1.75rem 3rem;overflow:hidden;perspective:2000px}.peeek__zoom{display:flex;align-items:center;justify-content:center;width:100%;height:100%;transform-origin:center center}.peeek__zoom--pannable{cursor:grab;touch-action:none}.peeek__zoom--pannable:active{cursor:grabbing}.peeek__zoom--pannable img{pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.peeek__spread{position:relative;display:flex;width:100%;transition:transform .5s cubic-bezier(.6,.05,.3,.95);transform-style:preserve-3d}.peeek__page{position:relative;width:50%;aspect-ratio:var(--peeek-aspect, .707);background:#fff;overflow:hidden}.peeek__page--empty{background:transparent;box-shadow:none}.peeek__page--left{border-top-left-radius:8px;border-bottom-left-radius:8px}.peeek__page--right{border-top-right-radius:8px;border-bottom-right-radius:8px}.peeek__spread:not(.peeek__spread--pair) .peeek__page{border-radius:8px}.peeek__page img{display:block;width:100%;height:100%;object-fit:contain}.peeek__page-btn{all:unset;display:block;width:100%;height:100%;cursor:zoom-in}.peeek--shadows .peeek__spread{box-shadow:0 24px 60px -24px #000000b3}.peeek--shadows.peeek__spread--pair .peeek__page--left{box-shadow:inset -30px 0 36px -22px #0009}.peeek--shadows.peeek__spread--pair .peeek__page--right{box-shadow:inset 30px 0 36px -22px #0009}.peeek--shadows.peeek__spread--pair .peeek__page--left:after,.peeek--shadows.peeek__spread--pair .peeek__page--right:after{content:"";position:absolute;top:0;bottom:0;width:14px;pointer-events:none}.peeek--shadows.peeek__spread--pair .peeek__page--left:after{right:0;background:linear-gradient(to right,#0000,#00000047)}.peeek--shadows.peeek__spread--pair .peeek__page--right:after{left:0;background:linear-gradient(to left,#0000,#00000047)}.peeek__leaf{position:absolute;top:0;width:50%;height:100%;z-index:3;transform-style:preserve-3d;transition:transform .62s cubic-bezier(.55,.06,.3,.98);will-change:transform}.peeek__leaf--fwd{left:50%;transform-origin:left center}.peeek__leaf--back{right:50%;transform-origin:right center}.peeek__leaf-face{position:absolute;top:0;right:0;bottom:0;left:0;backface-visibility:hidden;background:#fff;overflow:hidden}.peeek__leaf-face img{display:block;width:100%;height:100%;object-fit:contain}.peeek__leaf-face--back{transform:rotateY(180deg)}.peeek__leaf-face:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;opacity:.15;animation:peeek-curl .62s cubic-bezier(.55,.06,.3,.98) forwards;background:linear-gradient(var(--peeek-curl-dir, to right),rgba(0,0,0,.34),rgba(0,0,0,0) 58%,rgba(255,255,255,.05))}.peeek__leaf--fwd .peeek__leaf-face:after{--peeek-curl-dir: to right}.peeek__leaf--back .peeek__leaf-face:after{--peeek-curl-dir: to left}.peeek__leaf-face--back:after{transform:scaleX(-1)}@keyframes peeek-curl{0%{opacity:.15}45%{opacity:1}to{opacity:.55}}.peeek__arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:2;display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border:none;border-radius:9999px;background:#00000059;color:#fff;cursor:pointer}.peeek__arrow:disabled{opacity:.3;cursor:default}.peeek__arrow--prev{left:.75rem}.peeek__arrow--next{right:.75rem}.peeek__toolbar{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-top:1px solid rgba(255,255,255,.08);font-size:14px}.peeek__scrubber{flex:1;height:2px;background:#ffffff26;border-radius:9999px;overflow:hidden}.peeek__scrubber-fill{height:100%;background:var(--peeek-accent)}.peeek__btn{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;border-radius:8px;background:transparent;color:var(--peeek-text);cursor:pointer}.peeek__btn:disabled{opacity:.3;cursor:default}.peeek__btn--active{color:var(--peeek-accent)}.peeek__thumbs{display:flex;gap:.4rem;overflow-x:auto;padding:.75rem 1rem;border-top:1px solid rgba(255,255,255,.08)}.peeek__thumb-group{flex:0 0 auto;display:flex;gap:2px;position:relative}.peeek__thumb{flex:0 0 auto;width:4rem;height:5rem;padding:0;border:2px solid transparent;border-radius:6px;background:#fff;cursor:pointer;overflow:hidden}.peeek__thumb img{width:100%;height:100%;object-fit:contain}.peeek__thumb--active{border-color:var(--peeek-accent)}.peeek__thumb--flat-right{border-top-right-radius:0;border-bottom-right-radius:0}.peeek__thumb--flat-left{border-top-left-radius:0;border-bottom-left-radius:0}.peeek__branding{display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem}.peeek__branding img{height:1.5rem;width:auto}.peeek__state{display:flex;align-items:center;justify-content:center;min-height:24rem;font-size:16px;color:var(--peeek-text)}.peeek[data-skin=minimal] .peeek__toolbar,.peeek[data-skin=minimal] .peeek__thumbs{border-top:none;background:#00000040}.peeek[data-skin=minimal] .peeek__arrow{background:#0003}.peeek[dir=rtl] .peeek__leaf{transform-origin:right center}.peeek__cf{display:flex;flex:1;flex-direction:column;min-height:0}.peeek__cf-header{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-bottom:1px solid rgba(255,255,255,.08);font-size:14px}.peeek__cf-badge{display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.75rem;flex:0 0 auto;border-radius:6px;background:var(--peeek-accent);color:#fff;font-size:13px;font-weight:700}.peeek__cf-meta{display:flex;min-width:0;flex:1;flex-direction:column}.peeek__cf-name{overflow:hidden;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.peeek__cf-count{font-size:14px;opacity:.6}.peeek__cf-indicator{padding:.25rem .75rem;border:1px solid rgba(255,255,255,.1);border-radius:8px;font-family:ui-monospace,monospace;font-size:14px}.peeek__cf-stage{position:relative;display:flex;flex:1;align-items:center;justify-content:center;min-height:20rem;overflow:hidden;perspective:1400px}.peeek__cf-card{position:absolute;display:flex;max-width:55%;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;transition:transform .3s ease-out,opacity .3s ease-out}.peeek__cf-card--center{max-width:70%}.peeek__cf-card--zoom{cursor:zoom-in}.peeek__cf-card img{max-width:100%;max-height:19rem;border-radius:8px;background:#fff;object-fit:contain;box-shadow:0 18px 40px -12px #0009}.peeek__cf-thumbs{display:flex;gap:.5rem;overflow-x:auto;padding:.75rem 1rem;border-top:1px solid rgba(255,255,255,.08);scrollbar-width:none}.peeek__cf-thumbs::-webkit-scrollbar{display:none}.peeek__cf-thumb{display:flex;flex:0 0 auto;flex-direction:column;align-items:center;gap:.25rem;padding:.25rem;border:2px solid transparent;border-radius:8px;background:transparent;cursor:pointer}.peeek__cf-thumb img{width:3rem;height:4rem;border-radius:4px;background:#fff;object-fit:cover;opacity:.8}.peeek__cf-thumb--active{border-color:var(--peeek-accent);background:#ffffff0f}.peeek__cf-thumb--active img{opacity:1}.peeek__cf-thumb-num{font-family:ui-monospace,monospace;font-size:14px;opacity:.6}.peeek__cf-thumb--active .peeek__cf-thumb-num{color:var(--peeek-accent);opacity:1}.peeek:fullscreen .peeek__cf-card img{max-height:78vh}.peeek:fullscreen .peeek__spread{width:auto;height:100%}.peeek:fullscreen .peeek__page{width:auto;height:100%}.peeek[data-skin=minimal] .peeek__cf-header,.peeek[data-skin=minimal] .peeek__cf-thumbs{border-color:transparent;background:#00000040}.peeek[data-skin=showcase] .peeek__label{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:14px}.peeek[data-skin=showcase] .peeek__scrubber{height:2px}.peeek[data-skin=showcase] .peeek__scrubber-fill{background:var(--peeek-accent)}.peeek[data-skin=showcase] .peeek__arrow{width:2.5rem;height:2.5rem;border-radius:9999px;background:#0000004d;color:#fff;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.peeek[data-skin=showcase] .peeek__arrow:hover{background:#00000080}.peeek__thumb-badge{position:absolute;right:2px;bottom:2px;padding:0 4px;border-radius:4px;background:#000000b3;color:#fff;font-size:14px;font-weight:500;pointer-events:none}.peeek--fill-height{height:100%}.peeek--fill-height .peeek__stage{min-height:0}.peeek--fill-height .peeek__spread,.peeek--fill-height .peeek__page{width:auto;height:100%}.peeek[data-layout=double] .peeek__spread:not(.peeek__spread--pair) .peeek__page--right{border-radius:0 8px 8px 0}.peeek[data-layout=double] .peeek__spread:not(.peeek__spread--pair) .peeek__page--left{border-radius:8px 0 0 8px}.peeek[data-layout=double] .peeek__leaf--fwd .peeek__leaf-face--front{border-top-right-radius:8px;border-bottom-right-radius:8px}.peeek[data-layout=double] .peeek__leaf--fwd .peeek__leaf-face--back,.peeek[data-layout=double] .peeek__leaf--back .peeek__leaf-face--front{border-top-left-radius:8px;border-bottom-left-radius:8px}.peeek[data-layout=double] .peeek__leaf--back .peeek__leaf-face--back{border-top-right-radius:8px;border-bottom-right-radius:8px}.peeek[data-layout=single] .peeek__leaf-face{border-radius:8px}.peeek__about-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:100;display:flex;align-items:center;align-items:safe center;justify-content:center;overflow-y:auto;padding:1rem;background:#06060c9e;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}.peeek__about{position:relative;width:100%;max-width:360px;box-sizing:border-box;padding:1.75rem 1.5rem 1.25rem;text-align:center;color:var(--peeek-text);background:#16161f;border:1px solid rgba(255,255,255,.1);border-radius:var(--peeek-radius);box-shadow:0 24px 60px #00000080;overflow:hidden}.peeek__about-particles{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;pointer-events:none;overflow:hidden}.peeek__about-particle{position:absolute;border-radius:9999px;background:#6e79d673;box-shadow:0 0 9px #6e79d659}@keyframes peeekAboutDriftA{0%,to{transform:translate(0)}50%{transform:translate(6px,-8px)}}@keyframes peeekAboutDriftB{0%,to{transform:translate(0)}50%{transform:translate(-7px,6px)}}@keyframes peeekAboutDriftC{0%,to{transform:translate(0)}50%{transform:translate(5px,7px)}}.peeek__about-content{position:relative;z-index:1}.peeek__about-orbwrap{position:relative;width:48px;height:48px;margin-inline:auto;border-radius:9999px;animation:peeekAboutPulse 3.2s ease-in-out infinite}.peeek__about-ring{position:absolute;top:-5px;right:-5px;bottom:-5px;left:-5px;border-radius:9999px;background:conic-gradient(from 0deg,transparent 0 66%,#828ce0 86%,transparent 100%);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 3px));mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 3px));animation:peeekAboutSpin 2.6s linear infinite}@keyframes peeekAboutSpin{to{transform:rotate(360deg)}}@keyframes peeekAboutPulse{0%,to{box-shadow:0 0 26px -8px #6e79d699}50%{box-shadow:0 0 40px -4px #6e79d6e6}}@media (prefers-reduced-motion: reduce){.peeek__about-particle,.peeek__about-ring,.peeek__about-orbwrap{animation:none}}.peeek__about-close{position:absolute;top:.5rem;right:.5rem;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border:none;border-radius:8px;background:transparent;color:var(--peeek-text);font-size:20px;line-height:1;cursor:pointer}.peeek__about-close:hover{background:#ffffff14}.peeek__about-mark{display:block;margin-inline:auto;color:var(--peeek-accent)}.peeek__about-name{margin-top:.5rem;font-size:20px;font-weight:700;letter-spacing:.01em}.peeek__about-tagline{margin-top:.25rem;font-size:14px;color:#f5f5fab3}.peeek__about-version{display:inline-block;margin-top:.75rem;padding:.15rem .6rem;font-size:14px;font-weight:600;color:var(--peeek-accent);background:#6e79d629;border-radius:9999px}.peeek__about-desc{margin:.9rem 0 0;font-size:14px;line-height:1.5;color:#f5f5fad1}
|