@jc-times/business-ui 0.3.0 → 0.3.2
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/CHANGELOG.md +10 -0
- package/THIRD_PARTY_NOTICES.md +5 -0
- package/assets/pdf-fonts/NotoSans-Bold.ttf +0 -0
- package/assets/pdf-fonts/NotoSans-BoldItalic.ttf +0 -0
- package/assets/pdf-fonts/NotoSans-Italic.ttf +0 -0
- package/assets/pdf-fonts/NotoSans-Regular.ttf +0 -0
- package/assets/pdf-fonts/NotoSansHans-Regular.otf +0 -0
- package/assets/pdf-fonts/OFL-CJK.txt +92 -0
- package/assets/pdf-fonts/OFL-Latin.txt +94 -0
- package/assets/pdf-fonts/README.md +11 -0
- package/dist/Alert.js +5 -1
- package/dist/Button.js +1 -1
- package/dist/Cascader.js +19 -19
- package/dist/Combobox.js +38 -38
- package/dist/DataTableIcons.js +25 -25
- package/dist/DateInput.js +67 -67
- package/dist/DropdownMenu.js +35 -35
- package/dist/EmptyState.js +8 -8
- package/dist/ExplainableButton.js +11 -11
- package/dist/FloatingControls.js +31 -31
- package/dist/ModalShell.js +32 -32
- package/dist/MultiSelect.js +37 -37
- package/dist/Pagination.js +27 -27
- package/dist/RecoverableAsyncState.js +8 -8
- package/dist/Select.js +17 -17
- package/dist/SortableList.js +18 -18
- package/dist/Toast.js +30 -30
- package/dist/TreeSelect.js +107 -107
- package/dist/data-table.js +71 -71
- package/dist/document-viewer/PdfToolbar.js +12 -12
- package/dist/document-viewer/PdfWorkspace.js +15 -15
- package/dist/document-viewer-v2/DocumentViewerV2.js +49 -48
- package/dist/document-viewer-v2/HeadlessPdfViewer.js +128 -124
- package/dist/document-viewer-v2/pdf-font-fallback.js +35 -0
- package/dist/types/document-viewer-v2/pdf-font-fallback.d.ts +2 -0
- package/dist/vendor/embedpdf-zoom-react.js +3 -186
- package/dist/vendor/embedpdf-zoom-react10.js +6 -0
- package/dist/vendor/embedpdf-zoom-react11.js +30 -0
- package/dist/vendor/embedpdf-zoom-react12.js +16 -0
- package/dist/vendor/embedpdf-zoom-react13.js +15 -0
- package/dist/vendor/embedpdf-zoom-react14.js +33 -0
- package/dist/vendor/embedpdf-zoom-react15.js +20 -0
- package/dist/vendor/embedpdf-zoom-react16.js +26 -0
- package/dist/vendor/embedpdf-zoom-react17.js +25 -0
- package/dist/vendor/embedpdf-zoom-react18.js +17 -0
- package/dist/vendor/embedpdf-zoom-react19.js +187 -0
- package/dist/vendor/embedpdf-zoom-react2.js +13 -0
- package/dist/vendor/embedpdf-zoom-react3.js +14 -0
- package/dist/vendor/embedpdf-zoom-react4.js +8 -0
- package/dist/vendor/embedpdf-zoom-react5.js +4 -0
- package/dist/vendor/embedpdf-zoom-react6.js +14 -0
- package/dist/vendor/embedpdf-zoom-react7.js +40 -0
- package/dist/vendor/embedpdf-zoom-react8.js +17 -0
- package/dist/vendor/embedpdf-zoom-react9.js +7 -0
- package/docs/agent-guide.md +2 -0
- package/docs/document-viewer-v2.md +2 -2
- package/package.json +7 -3
|
@@ -1,187 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
4
|
-
import { useCapability as c, useDocumentState as l, usePlugin as u } from "@embedpdf/core/react";
|
|
5
|
-
import { useViewportElement as d } from "@embedpdf/plugin-viewport/react";
|
|
6
|
-
import { ZoomPlugin as f, initialDocumentState as p } from "@embedpdf/plugin-zoom";
|
|
7
|
-
export * from "@embedpdf/plugin-zoom";
|
|
8
|
-
//#region node_modules/.pnpm/@embedpdf+plugin-zoom@2.15.0_patch_hash=21cc50a50730a2920846ef4e8bb72d24d69849e9fd43d6f_aede46f2a75cbc54dc0fefd84f941023/node_modules/@embedpdf/plugin-zoom/dist/react/index.js
|
|
9
|
-
var m = /* @__PURE__ */ e({
|
|
10
|
-
MarqueeZoom: () => w,
|
|
11
|
-
ZoomGestureWrapper: () => C,
|
|
12
|
-
useZoom: () => v,
|
|
13
|
-
useZoomCapability: () => g,
|
|
14
|
-
useZoomGesture: () => S,
|
|
15
|
-
useZoomPlugin: () => _
|
|
16
|
-
});
|
|
17
|
-
import * as h from "@embedpdf/plugin-zoom";
|
|
18
|
-
t(m, h);
|
|
19
|
-
var g = () => c(f.id), _ = () => u(f.id), v = (e) => {
|
|
20
|
-
let { provides: t } = g(), [r, i] = o(p);
|
|
21
|
-
return n(() => {
|
|
22
|
-
if (!t) return;
|
|
23
|
-
let n = t.forDocument(e);
|
|
24
|
-
return i(n.getState()), n.onStateChange((e) => {
|
|
25
|
-
i(e);
|
|
26
|
-
});
|
|
27
|
-
}, [t, e]), {
|
|
28
|
-
state: r,
|
|
29
|
-
provides: t?.forDocument(e) ?? null
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
function y(e) {
|
|
33
|
-
let [t, n] = [e[0], e[1]], r = n.clientX - t.clientX, i = n.clientY - t.clientY;
|
|
34
|
-
return Math.hypot(r, i);
|
|
35
|
-
}
|
|
36
|
-
function b(e) {
|
|
37
|
-
let [t, n] = [e[0], e[1]];
|
|
38
|
-
return {
|
|
39
|
-
x: (t.clientX + n.clientX) / 2,
|
|
40
|
-
y: (t.clientY + n.clientY) / 2
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function x({ element: e, container: t, documentId: n, zoomProvides: r, viewportGap: i = 0, options: a = {} }) {
|
|
44
|
-
let { enablePinch: o = !0, enableWheel: s = !0, minZoom: c = .1, maxZoom: l = 3 } = a;
|
|
45
|
-
if (typeof window > "u") return () => {};
|
|
46
|
-
let u = r.forDocument(n), d = () => u.getState(), f = 0, p = 1, m = !1, h = 0, g = null, _ = 1, v = 0, x = 0, S = 0, C = 0, w = 0, T = 0, E = 0, D = 0, O = 0, k = 0, A = 0, j = 0, M = 0, N = (e, t, n) => Math.min(Math.max(e, t), n), P = () => {
|
|
47
|
-
let n = t.clientWidth - 2 * i, r = e.offsetWidth, a = r < n ? (n - r) / 2 : 0;
|
|
48
|
-
e.style.marginLeft = `${a}px`;
|
|
49
|
-
}, F = (e) => {
|
|
50
|
-
let t = v * e, n = x * e, r = O * (1 - e), i = D - t / 2 - S, a = k - M * e - S, o = Math.max(0, t - E), s = E * .3, c = Math.min(1, o / s), l = i + (a - i) * c;
|
|
51
|
-
if (n > T - j * 2) {
|
|
52
|
-
let e = C + r, t = j, i = T - j - n;
|
|
53
|
-
r = N(e, i, t) - C;
|
|
54
|
-
}
|
|
55
|
-
if (t > w - j * 2) {
|
|
56
|
-
let e = S + l, n = j, r = w - j - t;
|
|
57
|
-
l = N(e, r, n) - S;
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
tx: l,
|
|
61
|
-
ty: r,
|
|
62
|
-
blend: c,
|
|
63
|
-
finalWidth: t
|
|
64
|
-
};
|
|
65
|
-
}, I = (t) => {
|
|
66
|
-
t = Number(N(f * t, c, l).toFixed(2)) / f, p = t;
|
|
67
|
-
let { tx: n, ty: r } = F(t);
|
|
68
|
-
e.style.transformOrigin = "0 0", e.style.transform = `translate(${n}px, ${r}px) scale(${t})`;
|
|
69
|
-
}, L = () => {
|
|
70
|
-
e.style.transform = "none", e.style.transformOrigin = "0 0", p = 1;
|
|
71
|
-
}, R = () => {
|
|
72
|
-
let { tx: e, finalWidth: t } = F(p), n = (p - 1) * f, r, i = A;
|
|
73
|
-
if (t <= E) r = D;
|
|
74
|
-
else {
|
|
75
|
-
let t = 1 - p;
|
|
76
|
-
r = Math.abs(t) > .001 ? S + e / t : k;
|
|
77
|
-
}
|
|
78
|
-
u.requestZoomBy(n, {
|
|
79
|
-
vx: r,
|
|
80
|
-
vy: i
|
|
81
|
-
}), L(), f = 0;
|
|
82
|
-
}, z = (n, r) => {
|
|
83
|
-
let a = t.getBoundingClientRect(), o = e.getBoundingClientRect();
|
|
84
|
-
j = i, v = o.width, x = o.height, S = o.left - a.left, C = o.top - a.top, w = a.width, T = a.height, E = t.clientWidth, D = t.clientLeft + E / 2;
|
|
85
|
-
let s = n - o.left;
|
|
86
|
-
O = r - o.top, k = n - a.left, A = r - a.top, M = v < E ? k * v / E : s;
|
|
87
|
-
}, B = (e) => {
|
|
88
|
-
if (e.touches.length !== 2) return;
|
|
89
|
-
m = !0, f = d().currentZoomLevel, h = y(e.touches);
|
|
90
|
-
let t = b(e.touches);
|
|
91
|
-
z(t.x, t.y), e.preventDefault();
|
|
92
|
-
}, V = (e) => {
|
|
93
|
-
if (!m || e.touches.length !== 2) return;
|
|
94
|
-
let t = y(e.touches) / h;
|
|
95
|
-
I(t), e.preventDefault();
|
|
96
|
-
}, H = (e) => {
|
|
97
|
-
m && (e.touches.length >= 2 || (m = !1, R()));
|
|
98
|
-
}, U = (e) => {
|
|
99
|
-
if (!e.ctrlKey && !e.metaKey) return;
|
|
100
|
-
e.preventDefault(), g === null ? (f = d().currentZoomLevel, _ = 1, z(e.clientX, e.clientY)) : clearTimeout(g);
|
|
101
|
-
let t = 1 - e.deltaY * .01;
|
|
102
|
-
_ *= t, _ = Math.max(.1, Math.min(10, _)), I(_), g = setTimeout(() => {
|
|
103
|
-
g = null, R(), _ = 1;
|
|
104
|
-
}, 150);
|
|
105
|
-
}, W = u.onStateChange(() => P()), G = new ResizeObserver(() => P());
|
|
106
|
-
return G.observe(e), G.observe(t), P(), o && (t.addEventListener("touchstart", B, { passive: !1 }), t.addEventListener("touchmove", V, { passive: !1 }), t.addEventListener("touchend", H), t.addEventListener("touchcancel", H)), s && t.addEventListener("wheel", U, { passive: !1 }), () => {
|
|
107
|
-
o && (t.removeEventListener("touchstart", B), t.removeEventListener("touchmove", V), t.removeEventListener("touchend", H), t.removeEventListener("touchcancel", H)), s && t.removeEventListener("wheel", U), g && clearTimeout(g), W(), G.disconnect(), L(), e.style.marginLeft = "";
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
function S(e, t = {}) {
|
|
111
|
-
let { provides: n } = c("viewport"), { provides: i } = g(), o = d(), s = a(null);
|
|
112
|
-
return r(() => {
|
|
113
|
-
let r = s.current, a = o?.current;
|
|
114
|
-
if (r && a && i) return x({
|
|
115
|
-
element: r,
|
|
116
|
-
container: a,
|
|
117
|
-
documentId: e,
|
|
118
|
-
zoomProvides: i,
|
|
119
|
-
viewportGap: n?.getViewportGap() || 0,
|
|
120
|
-
options: t
|
|
121
|
-
});
|
|
122
|
-
}, [
|
|
123
|
-
n,
|
|
124
|
-
i,
|
|
125
|
-
e,
|
|
126
|
-
o,
|
|
127
|
-
t.enablePinch,
|
|
128
|
-
t.enableWheel,
|
|
129
|
-
t.minZoom,
|
|
130
|
-
t.maxZoom
|
|
131
|
-
]), { elementRef: s };
|
|
132
|
-
}
|
|
133
|
-
function C({ children: e, documentId: t, style: n, enablePinch: r = !0, enableWheel: a = !0, minZoom: o = .1, maxZoom: c = 3, ...l }) {
|
|
134
|
-
let { elementRef: u } = S(t, i(() => ({
|
|
135
|
-
enablePinch: r,
|
|
136
|
-
enableWheel: a,
|
|
137
|
-
minZoom: o,
|
|
138
|
-
maxZoom: c
|
|
139
|
-
}), [
|
|
140
|
-
r,
|
|
141
|
-
a,
|
|
142
|
-
o,
|
|
143
|
-
c
|
|
144
|
-
]));
|
|
145
|
-
return /* @__PURE__ */ s("div", {
|
|
146
|
-
ref: u,
|
|
147
|
-
...l,
|
|
148
|
-
style: {
|
|
149
|
-
...n,
|
|
150
|
-
display: "inline-block",
|
|
151
|
-
overflow: "visible",
|
|
152
|
-
boxSizing: "border-box"
|
|
153
|
-
},
|
|
154
|
-
children: e
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
var w = ({ documentId: e, pageIndex: t, scale: r, className: a, stroke: c = "rgba(33,150,243,0.8)", fill: u = "rgba(33,150,243,0.15)" }) => {
|
|
158
|
-
let { provides: d } = g(), f = l(e), [p, m] = o(null), h = i(() => r === void 0 ? f?.scale ?? 1 : r, [r, f?.scale]);
|
|
159
|
-
return n(() => {
|
|
160
|
-
if (d) return d.registerMarqueeOnPage({
|
|
161
|
-
documentId: e,
|
|
162
|
-
pageIndex: t,
|
|
163
|
-
scale: h,
|
|
164
|
-
callback: { onPreview: m }
|
|
165
|
-
});
|
|
166
|
-
}, [
|
|
167
|
-
d,
|
|
168
|
-
e,
|
|
169
|
-
t,
|
|
170
|
-
h
|
|
171
|
-
]), p ? /* @__PURE__ */ s("div", {
|
|
172
|
-
style: {
|
|
173
|
-
position: "absolute",
|
|
174
|
-
pointerEvents: "none",
|
|
175
|
-
left: p.origin.x * h,
|
|
176
|
-
top: p.origin.y * h,
|
|
177
|
-
width: p.size.width * h,
|
|
178
|
-
height: p.size.height * h,
|
|
179
|
-
border: `1px solid ${c}`,
|
|
180
|
-
background: u,
|
|
181
|
-
boxSizing: "border-box"
|
|
182
|
-
},
|
|
183
|
-
className: a
|
|
184
|
-
}) : null;
|
|
185
|
-
};
|
|
1
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs
|
|
2
|
+
var e = (e) => e?.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
186
3
|
//#endregion
|
|
187
|
-
export {
|
|
4
|
+
export { e as toKebabCase };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext as e, useContext as t } from "react";
|
|
3
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/context.mjs
|
|
4
|
+
var n = e({}), r = () => t(n);
|
|
5
|
+
//#endregion
|
|
6
|
+
export { r as useLucideContext };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { mergeClasses as e } from "./embedpdf-zoom-react5.js";
|
|
3
|
+
import t from "./embedpdf-zoom-react8.js";
|
|
4
|
+
import { hasA11yProp as n } from "./embedpdf-zoom-react9.js";
|
|
5
|
+
import { useLucideContext as r } from "./embedpdf-zoom-react10.js";
|
|
6
|
+
import { createElement as i, forwardRef as a } from "react";
|
|
7
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/Icon.mjs
|
|
8
|
+
var o = a(({ color: a, size: o, width: s, height: c, strokeWidth: l, absoluteStrokeWidth: u, nonScalingStroke: d, className: f = "", children: p, iconNode: m = [], icon: h = {
|
|
9
|
+
node: m,
|
|
10
|
+
aliases: [],
|
|
11
|
+
size: 24
|
|
12
|
+
}, ...g }, _) => {
|
|
13
|
+
let { size: v = 24, strokeWidth: y = 2, absoluteStrokeWidth: b = !1, nonScalingStroke: x = !1, color: S = "currentColor", className: C = "" } = r() ?? {}, w = !!p || n(g), [T, E, D = []] = t(h, {
|
|
14
|
+
color: a ?? S,
|
|
15
|
+
width: s ?? o ?? v,
|
|
16
|
+
height: c ?? o ?? v,
|
|
17
|
+
strokeWidth: l ?? y,
|
|
18
|
+
absoluteStrokeWidth: u ?? b,
|
|
19
|
+
nonScalingStroke: d ?? x,
|
|
20
|
+
className: e(C, f),
|
|
21
|
+
hasA11yProp: w,
|
|
22
|
+
attributes: g
|
|
23
|
+
});
|
|
24
|
+
return i(T, {
|
|
25
|
+
ref: _,
|
|
26
|
+
...E
|
|
27
|
+
}, [...D.map(([e, t]) => i(e, t)), ...Array.isArray(p) ? p : [p]]);
|
|
28
|
+
});
|
|
29
|
+
//#endregion
|
|
30
|
+
export { o as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { toLucideIconData as e } from "./embedpdf-zoom-react2.js";
|
|
2
|
+
import { toPascalCase as t } from "./embedpdf-zoom-react4.js";
|
|
3
|
+
import n from "./embedpdf-zoom-react11.js";
|
|
4
|
+
import { createElement as r, forwardRef as i } from "react";
|
|
5
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/createLucideIcon.mjs
|
|
6
|
+
function a(a, o = [], s = []) {
|
|
7
|
+
let c = typeof a == "string" ? e(a, o, s) : a, l = i(({ className: e, ...t }, i) => r(n, {
|
|
8
|
+
ref: i,
|
|
9
|
+
icon: c,
|
|
10
|
+
className: e,
|
|
11
|
+
...t
|
|
12
|
+
}));
|
|
13
|
+
return c.name && (l.displayName = t(c.name)), l;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { a as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import e from "./embedpdf-zoom-react12.js";
|
|
2
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/loader-circle.mjs
|
|
3
|
+
var t = {
|
|
4
|
+
name: "loader-circle",
|
|
5
|
+
size: 24,
|
|
6
|
+
node: [["path", {
|
|
7
|
+
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
8
|
+
key: "13zald"
|
|
9
|
+
}]],
|
|
10
|
+
aliases: ["loader-2"]
|
|
11
|
+
};
|
|
12
|
+
t.node;
|
|
13
|
+
var n = e(t);
|
|
14
|
+
//#endregion
|
|
15
|
+
export { t as __iconData, n as default };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import e from "./embedpdf-zoom-react12.js";
|
|
2
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/circle-alert.mjs
|
|
3
|
+
var t = {
|
|
4
|
+
name: "circle-alert",
|
|
5
|
+
size: 24,
|
|
6
|
+
node: [
|
|
7
|
+
["circle", {
|
|
8
|
+
cx: "12",
|
|
9
|
+
cy: "12",
|
|
10
|
+
r: "10",
|
|
11
|
+
key: "1mglay"
|
|
12
|
+
}],
|
|
13
|
+
["line", {
|
|
14
|
+
x1: "12",
|
|
15
|
+
x2: "12",
|
|
16
|
+
y1: "8",
|
|
17
|
+
y2: "12",
|
|
18
|
+
key: "1pkeuh"
|
|
19
|
+
}],
|
|
20
|
+
["line", {
|
|
21
|
+
x1: "12",
|
|
22
|
+
x2: "12.01",
|
|
23
|
+
y1: "16",
|
|
24
|
+
y2: "16",
|
|
25
|
+
key: "4dfq90"
|
|
26
|
+
}]
|
|
27
|
+
],
|
|
28
|
+
aliases: ["alert-circle"]
|
|
29
|
+
};
|
|
30
|
+
t.node;
|
|
31
|
+
var n = e(t);
|
|
32
|
+
//#endregion
|
|
33
|
+
export { t as __iconData, n as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import e from "./embedpdf-zoom-react12.js";
|
|
2
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/circle-check.mjs
|
|
3
|
+
var t = {
|
|
4
|
+
name: "circle-check",
|
|
5
|
+
size: 24,
|
|
6
|
+
node: [["circle", {
|
|
7
|
+
cx: "12",
|
|
8
|
+
cy: "12",
|
|
9
|
+
r: "10",
|
|
10
|
+
key: "1mglay"
|
|
11
|
+
}], ["path", {
|
|
12
|
+
d: "m16 9-5.5 5.5L8 12",
|
|
13
|
+
key: "xofnsj"
|
|
14
|
+
}]],
|
|
15
|
+
aliases: ["check-circle-2"]
|
|
16
|
+
};
|
|
17
|
+
t.node;
|
|
18
|
+
var n = e(t);
|
|
19
|
+
//#endregion
|
|
20
|
+
export { t as __iconData, n as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import e from "./embedpdf-zoom-react12.js";
|
|
2
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/info.mjs
|
|
3
|
+
var t = {
|
|
4
|
+
name: "info",
|
|
5
|
+
size: 24,
|
|
6
|
+
node: [
|
|
7
|
+
["circle", {
|
|
8
|
+
cx: "12",
|
|
9
|
+
cy: "12",
|
|
10
|
+
r: "10",
|
|
11
|
+
key: "1mglay"
|
|
12
|
+
}],
|
|
13
|
+
["path", {
|
|
14
|
+
d: "M12 16v-4",
|
|
15
|
+
key: "1dtifu"
|
|
16
|
+
}],
|
|
17
|
+
["path", {
|
|
18
|
+
d: "M12 8h.01",
|
|
19
|
+
key: "e9boi3"
|
|
20
|
+
}]
|
|
21
|
+
]
|
|
22
|
+
};
|
|
23
|
+
t.node;
|
|
24
|
+
var n = e(t);
|
|
25
|
+
//#endregion
|
|
26
|
+
export { t as __iconData, n as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import e from "./embedpdf-zoom-react12.js";
|
|
2
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/triangle-alert.mjs
|
|
3
|
+
var t = {
|
|
4
|
+
name: "triangle-alert",
|
|
5
|
+
size: 24,
|
|
6
|
+
node: [
|
|
7
|
+
["path", {
|
|
8
|
+
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
9
|
+
key: "wmoenq"
|
|
10
|
+
}],
|
|
11
|
+
["path", {
|
|
12
|
+
d: "M12 9v4",
|
|
13
|
+
key: "juzpu7"
|
|
14
|
+
}],
|
|
15
|
+
["path", {
|
|
16
|
+
d: "M12 17h.01",
|
|
17
|
+
key: "p32p05"
|
|
18
|
+
}]
|
|
19
|
+
],
|
|
20
|
+
aliases: ["alert-triangle"]
|
|
21
|
+
};
|
|
22
|
+
t.node;
|
|
23
|
+
var n = e(t);
|
|
24
|
+
//#endregion
|
|
25
|
+
export { t as __iconData, n as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import e from "./embedpdf-zoom-react12.js";
|
|
2
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/x.mjs
|
|
3
|
+
var t = {
|
|
4
|
+
name: "x",
|
|
5
|
+
size: 24,
|
|
6
|
+
node: [["path", {
|
|
7
|
+
d: "M18 6 6 18",
|
|
8
|
+
key: "1bl5f8"
|
|
9
|
+
}], ["path", {
|
|
10
|
+
d: "m6 6 12 12",
|
|
11
|
+
key: "d8bk6v"
|
|
12
|
+
}]]
|
|
13
|
+
};
|
|
14
|
+
t.node;
|
|
15
|
+
var n = e(t);
|
|
16
|
+
//#endregion
|
|
17
|
+
export { t as __iconData, n as default };
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { __exportAll as e, __reExport as t } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { useEffect as n, useLayoutEffect as r, useMemo as i, useRef as a, useState as o } from "react";
|
|
3
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
4
|
+
import { useCapability as c, useDocumentState as l, usePlugin as u } from "@embedpdf/core/react";
|
|
5
|
+
import { useViewportElement as d } from "@embedpdf/plugin-viewport/react";
|
|
6
|
+
import { ZoomPlugin as f, initialDocumentState as p } from "@embedpdf/plugin-zoom";
|
|
7
|
+
export * from "@embedpdf/plugin-zoom";
|
|
8
|
+
//#region node_modules/.pnpm/@embedpdf+plugin-zoom@2.15.0_patch_hash=21cc50a50730a2920846ef4e8bb72d24d69849e9fd43d6f_aede46f2a75cbc54dc0fefd84f941023/node_modules/@embedpdf/plugin-zoom/dist/react/index.js
|
|
9
|
+
var m = /* @__PURE__ */ e({
|
|
10
|
+
MarqueeZoom: () => w,
|
|
11
|
+
ZoomGestureWrapper: () => C,
|
|
12
|
+
useZoom: () => v,
|
|
13
|
+
useZoomCapability: () => g,
|
|
14
|
+
useZoomGesture: () => S,
|
|
15
|
+
useZoomPlugin: () => _
|
|
16
|
+
});
|
|
17
|
+
import * as h from "@embedpdf/plugin-zoom";
|
|
18
|
+
t(m, h);
|
|
19
|
+
var g = () => c(f.id), _ = () => u(f.id), v = (e) => {
|
|
20
|
+
let { provides: t } = g(), [r, i] = o(p);
|
|
21
|
+
return n(() => {
|
|
22
|
+
if (!t) return;
|
|
23
|
+
let n = t.forDocument(e);
|
|
24
|
+
return i(n.getState()), n.onStateChange((e) => {
|
|
25
|
+
i(e);
|
|
26
|
+
});
|
|
27
|
+
}, [t, e]), {
|
|
28
|
+
state: r,
|
|
29
|
+
provides: t?.forDocument(e) ?? null
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
function y(e) {
|
|
33
|
+
let [t, n] = [e[0], e[1]], r = n.clientX - t.clientX, i = n.clientY - t.clientY;
|
|
34
|
+
return Math.hypot(r, i);
|
|
35
|
+
}
|
|
36
|
+
function b(e) {
|
|
37
|
+
let [t, n] = [e[0], e[1]];
|
|
38
|
+
return {
|
|
39
|
+
x: (t.clientX + n.clientX) / 2,
|
|
40
|
+
y: (t.clientY + n.clientY) / 2
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function x({ element: e, container: t, documentId: n, zoomProvides: r, viewportGap: i = 0, options: a = {} }) {
|
|
44
|
+
let { enablePinch: o = !0, enableWheel: s = !0, minZoom: c = .1, maxZoom: l = 3 } = a;
|
|
45
|
+
if (typeof window > "u") return () => {};
|
|
46
|
+
let u = r.forDocument(n), d = () => u.getState(), f = 0, p = 1, m = !1, h = 0, g = null, _ = 1, v = 0, x = 0, S = 0, C = 0, w = 0, T = 0, E = 0, D = 0, O = 0, k = 0, A = 0, j = 0, M = 0, N = (e, t, n) => Math.min(Math.max(e, t), n), P = () => {
|
|
47
|
+
let n = t.clientWidth - 2 * i, r = e.offsetWidth, a = r < n ? (n - r) / 2 : 0;
|
|
48
|
+
e.style.marginLeft = `${a}px`;
|
|
49
|
+
}, F = (e) => {
|
|
50
|
+
let t = v * e, n = x * e, r = O * (1 - e), i = D - t / 2 - S, a = k - M * e - S, o = Math.max(0, t - E), s = E * .3, c = Math.min(1, o / s), l = i + (a - i) * c;
|
|
51
|
+
if (n > T - j * 2) {
|
|
52
|
+
let e = C + r, t = j, i = T - j - n;
|
|
53
|
+
r = N(e, i, t) - C;
|
|
54
|
+
}
|
|
55
|
+
if (t > w - j * 2) {
|
|
56
|
+
let e = S + l, n = j, r = w - j - t;
|
|
57
|
+
l = N(e, r, n) - S;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
tx: l,
|
|
61
|
+
ty: r,
|
|
62
|
+
blend: c,
|
|
63
|
+
finalWidth: t
|
|
64
|
+
};
|
|
65
|
+
}, I = (t) => {
|
|
66
|
+
t = Number(N(f * t, c, l).toFixed(2)) / f, p = t;
|
|
67
|
+
let { tx: n, ty: r } = F(t);
|
|
68
|
+
e.style.transformOrigin = "0 0", e.style.transform = `translate(${n}px, ${r}px) scale(${t})`;
|
|
69
|
+
}, L = () => {
|
|
70
|
+
e.style.transform = "none", e.style.transformOrigin = "0 0", p = 1;
|
|
71
|
+
}, R = () => {
|
|
72
|
+
let { tx: e, finalWidth: t } = F(p), n = (p - 1) * f, r, i = A;
|
|
73
|
+
if (t <= E) r = D;
|
|
74
|
+
else {
|
|
75
|
+
let t = 1 - p;
|
|
76
|
+
r = Math.abs(t) > .001 ? S + e / t : k;
|
|
77
|
+
}
|
|
78
|
+
u.requestZoomBy(n, {
|
|
79
|
+
vx: r,
|
|
80
|
+
vy: i
|
|
81
|
+
}), L(), f = 0;
|
|
82
|
+
}, z = (n, r) => {
|
|
83
|
+
let a = t.getBoundingClientRect(), o = e.getBoundingClientRect();
|
|
84
|
+
j = i, v = o.width, x = o.height, S = o.left - a.left, C = o.top - a.top, w = a.width, T = a.height, E = t.clientWidth, D = t.clientLeft + E / 2;
|
|
85
|
+
let s = n - o.left;
|
|
86
|
+
O = r - o.top, k = n - a.left, A = r - a.top, M = v < E ? k * v / E : s;
|
|
87
|
+
}, B = (e) => {
|
|
88
|
+
if (e.touches.length !== 2) return;
|
|
89
|
+
m = !0, f = d().currentZoomLevel, h = y(e.touches);
|
|
90
|
+
let t = b(e.touches);
|
|
91
|
+
z(t.x, t.y), e.preventDefault();
|
|
92
|
+
}, V = (e) => {
|
|
93
|
+
if (!m || e.touches.length !== 2) return;
|
|
94
|
+
let t = y(e.touches) / h;
|
|
95
|
+
I(t), e.preventDefault();
|
|
96
|
+
}, H = (e) => {
|
|
97
|
+
m && (e.touches.length >= 2 || (m = !1, R()));
|
|
98
|
+
}, U = (e) => {
|
|
99
|
+
if (!e.ctrlKey && !e.metaKey) return;
|
|
100
|
+
e.preventDefault(), g === null ? (f = d().currentZoomLevel, _ = 1, z(e.clientX, e.clientY)) : clearTimeout(g);
|
|
101
|
+
let t = 1 - e.deltaY * .01;
|
|
102
|
+
_ *= t, _ = Math.max(.1, Math.min(10, _)), I(_), g = setTimeout(() => {
|
|
103
|
+
g = null, R(), _ = 1;
|
|
104
|
+
}, 150);
|
|
105
|
+
}, W = u.onStateChange(() => P()), G = new ResizeObserver(() => P());
|
|
106
|
+
return G.observe(e), G.observe(t), P(), o && (t.addEventListener("touchstart", B, { passive: !1 }), t.addEventListener("touchmove", V, { passive: !1 }), t.addEventListener("touchend", H), t.addEventListener("touchcancel", H)), s && t.addEventListener("wheel", U, { passive: !1 }), () => {
|
|
107
|
+
o && (t.removeEventListener("touchstart", B), t.removeEventListener("touchmove", V), t.removeEventListener("touchend", H), t.removeEventListener("touchcancel", H)), s && t.removeEventListener("wheel", U), g && clearTimeout(g), W(), G.disconnect(), L(), e.style.marginLeft = "";
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function S(e, t = {}) {
|
|
111
|
+
let { provides: n } = c("viewport"), { provides: i } = g(), o = d(), s = a(null);
|
|
112
|
+
return r(() => {
|
|
113
|
+
let r = s.current, a = o?.current;
|
|
114
|
+
if (r && a && i) return x({
|
|
115
|
+
element: r,
|
|
116
|
+
container: a,
|
|
117
|
+
documentId: e,
|
|
118
|
+
zoomProvides: i,
|
|
119
|
+
viewportGap: n?.getViewportGap() || 0,
|
|
120
|
+
options: t
|
|
121
|
+
});
|
|
122
|
+
}, [
|
|
123
|
+
n,
|
|
124
|
+
i,
|
|
125
|
+
e,
|
|
126
|
+
o,
|
|
127
|
+
t.enablePinch,
|
|
128
|
+
t.enableWheel,
|
|
129
|
+
t.minZoom,
|
|
130
|
+
t.maxZoom
|
|
131
|
+
]), { elementRef: s };
|
|
132
|
+
}
|
|
133
|
+
function C({ children: e, documentId: t, style: n, enablePinch: r = !0, enableWheel: a = !0, minZoom: o = .1, maxZoom: c = 3, ...l }) {
|
|
134
|
+
let { elementRef: u } = S(t, i(() => ({
|
|
135
|
+
enablePinch: r,
|
|
136
|
+
enableWheel: a,
|
|
137
|
+
minZoom: o,
|
|
138
|
+
maxZoom: c
|
|
139
|
+
}), [
|
|
140
|
+
r,
|
|
141
|
+
a,
|
|
142
|
+
o,
|
|
143
|
+
c
|
|
144
|
+
]));
|
|
145
|
+
return /* @__PURE__ */ s("div", {
|
|
146
|
+
ref: u,
|
|
147
|
+
...l,
|
|
148
|
+
style: {
|
|
149
|
+
...n,
|
|
150
|
+
display: "inline-block",
|
|
151
|
+
overflow: "visible",
|
|
152
|
+
boxSizing: "border-box"
|
|
153
|
+
},
|
|
154
|
+
children: e
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
var w = ({ documentId: e, pageIndex: t, scale: r, className: a, stroke: c = "rgba(33,150,243,0.8)", fill: u = "rgba(33,150,243,0.15)" }) => {
|
|
158
|
+
let { provides: d } = g(), f = l(e), [p, m] = o(null), h = i(() => r === void 0 ? f?.scale ?? 1 : r, [r, f?.scale]);
|
|
159
|
+
return n(() => {
|
|
160
|
+
if (d) return d.registerMarqueeOnPage({
|
|
161
|
+
documentId: e,
|
|
162
|
+
pageIndex: t,
|
|
163
|
+
scale: h,
|
|
164
|
+
callback: { onPreview: m }
|
|
165
|
+
});
|
|
166
|
+
}, [
|
|
167
|
+
d,
|
|
168
|
+
e,
|
|
169
|
+
t,
|
|
170
|
+
h
|
|
171
|
+
]), p ? /* @__PURE__ */ s("div", {
|
|
172
|
+
style: {
|
|
173
|
+
position: "absolute",
|
|
174
|
+
pointerEvents: "none",
|
|
175
|
+
left: p.origin.x * h,
|
|
176
|
+
top: p.origin.y * h,
|
|
177
|
+
width: p.size.width * h,
|
|
178
|
+
height: p.size.height * h,
|
|
179
|
+
border: `1px solid ${c}`,
|
|
180
|
+
background: u,
|
|
181
|
+
boxSizing: "border-box"
|
|
182
|
+
},
|
|
183
|
+
className: a
|
|
184
|
+
}) : null;
|
|
185
|
+
};
|
|
186
|
+
//#endregion
|
|
187
|
+
export { w as MarqueeZoom, C as ZoomGestureWrapper, m as react_exports, v as useZoom, g as useZoomCapability, S as useZoomGesture, _ as useZoomPlugin };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { toKebabCase as e } from "./embedpdf-zoom-react.js";
|
|
2
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs
|
|
3
|
+
function t(t, n, r = []) {
|
|
4
|
+
if (n == null) throw Error("[lucide]: iconNode is required when icon name is used");
|
|
5
|
+
return {
|
|
6
|
+
name: e(t),
|
|
7
|
+
size: 24,
|
|
8
|
+
node: n,
|
|
9
|
+
...r.length > 0 ? { aliases: r } : {}
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as toLucideIconData };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs
|
|
2
|
+
var e = (e) => {
|
|
3
|
+
let t = "", n = !1;
|
|
4
|
+
for (let r of e) {
|
|
5
|
+
if (r === "-" || r === "_" || r <= " ") {
|
|
6
|
+
n = t.length > 0;
|
|
7
|
+
continue;
|
|
8
|
+
}
|
|
9
|
+
t.length === 0 ? t += r.toLowerCase() : t += n ? r.toUpperCase() : r, n = !1;
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as toCamelCase };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { toCamelCase as e } from "./embedpdf-zoom-react3.js";
|
|
2
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs
|
|
3
|
+
var t = (t) => {
|
|
4
|
+
let n = e(t);
|
|
5
|
+
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as toPascalCase };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
|
|
2
|
+
var e = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim();
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as mergeClasses };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.mjs
|
|
2
|
+
var e = {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
width: 24,
|
|
5
|
+
height: 24,
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
fill: "none",
|
|
8
|
+
stroke: "currentColor",
|
|
9
|
+
"stroke-width": 2,
|
|
10
|
+
"stroke-linecap": "round",
|
|
11
|
+
"stroke-linejoin": "round"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as default };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { mergeClasses as e } from "./embedpdf-zoom-react5.js";
|
|
2
|
+
import t from "./embedpdf-zoom-react6.js";
|
|
3
|
+
//#region node_modules/.pnpm/lucide-react@1.45.0_react@19.3.0/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs
|
|
4
|
+
function n(e) {
|
|
5
|
+
return e != null;
|
|
6
|
+
}
|
|
7
|
+
function r(r, i = {}) {
|
|
8
|
+
let a = i.attributeNames ?? {}, o = (e) => a[e] ?? e, s = r.size ?? r.width ?? t.width, c = r.size ?? r.height ?? t.height, l = r.aliases?.filter((e) => typeof e == "string" && e.trim() !== "").map((e) => `lucide-${e}`) ?? [], u = [...r.name ? [`lucide-${r.name}`] : [], ...l], d = i.className?.split(" ").filter(Boolean) ?? [], f = i.includeDefaultClasses === !1 ? e(...d) : e("lucide", ...u, ...d), p = i.absoluteStrokeWidth ? Number(i.strokeWidth ?? t["stroke-width"]) * Number(r.size ?? r.width ?? t.width) / Number(i.size ?? i.width ?? t.width) : i.strokeWidth ?? t["stroke-width"];
|
|
9
|
+
return [
|
|
10
|
+
"svg",
|
|
11
|
+
{
|
|
12
|
+
...Object.entries(t).reduce((e, [t, n]) => (e[o(t)] = n, e), {}),
|
|
13
|
+
..."color" in i && i.color && { [o("stroke")]: i.color },
|
|
14
|
+
..."size" in i && n(i.size) && {
|
|
15
|
+
[o("width")]: i.size,
|
|
16
|
+
[o("height")]: i.size
|
|
17
|
+
},
|
|
18
|
+
..."width" in i && n(i.width) && { [o("width")]: i.width },
|
|
19
|
+
..."height" in i && n(i.height) && { [o("height")]: i.height },
|
|
20
|
+
[o("stroke-width")]: p,
|
|
21
|
+
...f && { [o("class")]: f },
|
|
22
|
+
[o("viewBox")]: `0 0 ${s} ${c}`,
|
|
23
|
+
...i.hasA11yProp === !1 ? { [o("aria-hidden")]: "true" } : {},
|
|
24
|
+
..."attributes" in i && i.attributes
|
|
25
|
+
},
|
|
26
|
+
r.node.map((e) => {
|
|
27
|
+
let [t, n, r] = e, a = i.nonScalingStroke ? {
|
|
28
|
+
[o("vector-effect")]: "non-scaling-stroke",
|
|
29
|
+
...n
|
|
30
|
+
} : n;
|
|
31
|
+
return r ? [
|
|
32
|
+
t,
|
|
33
|
+
a,
|
|
34
|
+
r
|
|
35
|
+
] : [t, a];
|
|
36
|
+
})
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { r as default };
|