@pdf-viewer/react 1.2.0-beta.1 → 1.2.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Container-8fea0875.js +39 -0
- package/dist/Popover-aaa4344e.js +1445 -0
- package/dist/{RPDefaultLayout-17ed747f.js → RPDefaultLayout-7ebbc6e0.js} +473 -481
- package/dist/assets/Container.css +1 -1
- package/dist/assets/Popover.css +1 -1
- package/dist/assets/RPDefaultLayout.css +1 -1
- package/dist/component-1da194e8.js +337 -0
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/Container.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +2 -2
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +2 -2
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/RotateTool.js +1 -1
- package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +2 -2
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +2 -2
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/Checkbox.js +14 -13
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/Popover.js +4 -3058
- package/dist/components/ui/RPTooltip.js +687 -328
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/floating-ui.react-dom-15b9b819.js +1310 -0
- package/dist/index-2e540713.js +23 -0
- package/dist/index-353ec0a6.js +172 -0
- package/dist/index-5ff5dbd0.js +1675 -0
- package/dist/index-71898eb9.js +139 -0
- package/dist/main.js +1 -1
- package/dist/types/utils/types.d.ts +6 -1
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +40 -32
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/dist/utils/types.js +9 -9
- package/package.json +1 -1
- package/dist/Container-f68e1779.js +0 -38
- package/dist/floating-ui.react-dom-88a86594.js +0 -1447
- package/dist/index-48ca3f30.js +0 -307
- package/dist/index-4ba3ab9a.js +0 -1877
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
3
|
+
function m(e, n) {
|
|
4
|
+
const t = i.createContext(n), r = (s) => {
|
|
5
|
+
const { children: o, ...c } = s, a = i.useMemo(() => c, Object.values(c));
|
|
6
|
+
return /* @__PURE__ */ C(t.Provider, { value: a, children: o });
|
|
7
|
+
};
|
|
8
|
+
r.displayName = e + "Provider";
|
|
9
|
+
function u(s) {
|
|
10
|
+
const o = i.useContext(t);
|
|
11
|
+
if (o)
|
|
12
|
+
return o;
|
|
13
|
+
if (n !== void 0)
|
|
14
|
+
return n;
|
|
15
|
+
throw new Error(`\`${s}\` must be used within \`${e}\``);
|
|
16
|
+
}
|
|
17
|
+
return [r, u];
|
|
18
|
+
}
|
|
19
|
+
function E(e, n = []) {
|
|
20
|
+
let t = [];
|
|
21
|
+
function r(s, o) {
|
|
22
|
+
const c = i.createContext(o), a = t.length;
|
|
23
|
+
t = [...t, o];
|
|
24
|
+
const f = (d) => {
|
|
25
|
+
var b;
|
|
26
|
+
const { scope: l, children: S, ...v } = d, h = ((b = l == null ? void 0 : l[e]) == null ? void 0 : b[a]) || c, z = i.useMemo(() => v, Object.values(v));
|
|
27
|
+
return /* @__PURE__ */ C(h.Provider, { value: z, children: S });
|
|
28
|
+
};
|
|
29
|
+
f.displayName = s + "Provider";
|
|
30
|
+
function x(d, l) {
|
|
31
|
+
var h;
|
|
32
|
+
const S = ((h = l == null ? void 0 : l[e]) == null ? void 0 : h[a]) || c, v = i.useContext(S);
|
|
33
|
+
if (v)
|
|
34
|
+
return v;
|
|
35
|
+
if (o !== void 0)
|
|
36
|
+
return o;
|
|
37
|
+
throw new Error(`\`${d}\` must be used within \`${s}\``);
|
|
38
|
+
}
|
|
39
|
+
return [f, x];
|
|
40
|
+
}
|
|
41
|
+
const u = () => {
|
|
42
|
+
const s = t.map((o) => i.createContext(o));
|
|
43
|
+
return function(c) {
|
|
44
|
+
const a = (c == null ? void 0 : c[e]) || s;
|
|
45
|
+
return i.useMemo(
|
|
46
|
+
() => ({ [`__scope${e}`]: { ...c, [e]: a } }),
|
|
47
|
+
[c, a]
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
return u.scopeName = e, [r, P(u, ...n)];
|
|
52
|
+
}
|
|
53
|
+
function P(...e) {
|
|
54
|
+
const n = e[0];
|
|
55
|
+
if (e.length === 1)
|
|
56
|
+
return n;
|
|
57
|
+
const t = () => {
|
|
58
|
+
const r = e.map((u) => ({
|
|
59
|
+
useScope: u(),
|
|
60
|
+
scopeName: u.scopeName
|
|
61
|
+
}));
|
|
62
|
+
return function(s) {
|
|
63
|
+
const o = r.reduce((c, { useScope: a, scopeName: f }) => {
|
|
64
|
+
const d = a(s)[`__scope${f}`];
|
|
65
|
+
return { ...c, ...d };
|
|
66
|
+
}, {});
|
|
67
|
+
return i.useMemo(() => ({ [`__scope${n.scopeName}`]: o }), [o]);
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
return t.scopeName = n.scopeName, t;
|
|
71
|
+
}
|
|
72
|
+
function y(e) {
|
|
73
|
+
const n = i.useRef(e);
|
|
74
|
+
return i.useEffect(() => {
|
|
75
|
+
n.current = e;
|
|
76
|
+
}), i.useMemo(() => (...t) => {
|
|
77
|
+
var r;
|
|
78
|
+
return (r = n.current) == null ? void 0 : r.call(n, ...t);
|
|
79
|
+
}, []);
|
|
80
|
+
}
|
|
81
|
+
var g = globalThis != null && globalThis.document ? i.useLayoutEffect : () => {
|
|
82
|
+
};
|
|
83
|
+
function $(e) {
|
|
84
|
+
const [n, t] = i.useState(void 0);
|
|
85
|
+
return g(() => {
|
|
86
|
+
if (e) {
|
|
87
|
+
t({ width: e.offsetWidth, height: e.offsetHeight });
|
|
88
|
+
const r = new ResizeObserver((u) => {
|
|
89
|
+
if (!Array.isArray(u) || !u.length)
|
|
90
|
+
return;
|
|
91
|
+
const s = u[0];
|
|
92
|
+
let o, c;
|
|
93
|
+
if ("borderBoxSize" in s) {
|
|
94
|
+
const a = s.borderBoxSize, f = Array.isArray(a) ? a[0] : a;
|
|
95
|
+
o = f.inlineSize, c = f.blockSize;
|
|
96
|
+
} else
|
|
97
|
+
o = e.offsetWidth, c = e.offsetHeight;
|
|
98
|
+
t({ width: o, height: c });
|
|
99
|
+
});
|
|
100
|
+
return r.observe(e, { box: "border-box" }), () => r.unobserve(e);
|
|
101
|
+
} else
|
|
102
|
+
t(void 0);
|
|
103
|
+
}, [e]), n;
|
|
104
|
+
}
|
|
105
|
+
function _({
|
|
106
|
+
prop: e,
|
|
107
|
+
defaultProp: n,
|
|
108
|
+
onChange: t = () => {
|
|
109
|
+
}
|
|
110
|
+
}) {
|
|
111
|
+
const [r, u] = p({ defaultProp: n, onChange: t }), s = e !== void 0, o = s ? e : r, c = y(t), a = i.useCallback(
|
|
112
|
+
(f) => {
|
|
113
|
+
if (s) {
|
|
114
|
+
const d = typeof f == "function" ? f(e) : f;
|
|
115
|
+
d !== e && c(d);
|
|
116
|
+
} else
|
|
117
|
+
u(f);
|
|
118
|
+
},
|
|
119
|
+
[s, e, u, c]
|
|
120
|
+
);
|
|
121
|
+
return [o, a];
|
|
122
|
+
}
|
|
123
|
+
function p({
|
|
124
|
+
defaultProp: e,
|
|
125
|
+
onChange: n
|
|
126
|
+
}) {
|
|
127
|
+
const t = i.useState(e), [r] = t, u = i.useRef(r), s = y(n);
|
|
128
|
+
return i.useEffect(() => {
|
|
129
|
+
u.current !== r && (s(r), u.current = r);
|
|
130
|
+
}, [r, u, s]), t;
|
|
131
|
+
}
|
|
132
|
+
export {
|
|
133
|
+
g as a,
|
|
134
|
+
_ as b,
|
|
135
|
+
E as c,
|
|
136
|
+
$ as d,
|
|
137
|
+
m as e,
|
|
138
|
+
y as u
|
|
139
|
+
};
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RPProvider as t } from "./components/RPProvider.js";
|
|
2
|
-
import { b as x, R as n, c as s, u as m, d as p, e as f } from "./RPDefaultLayout-
|
|
2
|
+
import { b as x, R as n, c as s, u as m, d as p, e as f } from "./RPDefaultLayout-7ebbc6e0.js";
|
|
3
3
|
import { RPConfig as a } from "./components/RPConfig.js";
|
|
4
4
|
import { RPController as i } from "./components/RPController.js";
|
|
5
5
|
import { RPTheme as P } from "./components/RPTheme.js";
|
|
@@ -367,6 +367,7 @@ export declare enum ThemeVariables {
|
|
|
367
367
|
PRIMARY_COLOR = "--rp-primary-color",
|
|
368
368
|
BORDER_RADIUS = "--rp-border-radius",
|
|
369
369
|
DROP_MASK_BACKGROUND_COLOR = "--rp-drop-mask-background-color",
|
|
370
|
+
LOADER_BACKDROP_COLOR = "--rp-loader-backdrop-color",
|
|
370
371
|
ICON_DISABLED = "--rp-icon-disabled",
|
|
371
372
|
ICON_FONT_SIZE = "--rp-icon-font-size",
|
|
372
373
|
TOOLBAR_BACKGROUND = "--rp-toolbar-background",
|
|
@@ -390,6 +391,9 @@ export declare enum ThemeVariables {
|
|
|
390
391
|
DROPDOWN_HOVER_BACKGROUND_COLOR = "--rp-dropdown-hover-background-color",
|
|
391
392
|
DROPDOWN_SEPARATOR_COLOR = "--rp-dropdown-separator-color",
|
|
392
393
|
DROPDOWN_SEPARATOR_MARGIN = "--rp-dropdown-separator-margin",
|
|
394
|
+
POPOVER_BACKGROUND_COLOR = "--rp-popover-background-color",
|
|
395
|
+
POPOVER_COLOR = "--rp-popover-color",
|
|
396
|
+
POPOVER_BORDER_COLOR = "--rp-popover-border-color",
|
|
393
397
|
OVERLAY_BACKGROUND_COLOR = "--rp-overlay-background-color",
|
|
394
398
|
DIALOG_BACKGROUND_COLOR = "--rp-dialog-background-color",
|
|
395
399
|
PROPERTIES_DIVIDER_COLOR = "--rp-properties-divider-color",
|
|
@@ -402,7 +406,8 @@ export declare enum ThemeVariables {
|
|
|
402
406
|
PROPERTY_ITEM_FONT_WEIGHT = "--rp-property-item-font-weight",
|
|
403
407
|
DIALOG_TITLE_FONT_SIZE = "--rp-dialog-title-font-size",
|
|
404
408
|
DIALOG_TITLE_FONT_WEIGHT = "--rp-dialog-title-font-weight",
|
|
405
|
-
MENU_ITEM_ICON_SIZE = "--rp-menu-item-icon-size"
|
|
409
|
+
MENU_ITEM_ICON_SIZE = "--rp-menu-item-icon-size",
|
|
410
|
+
PRINT_PROGRESS_BACKGROUND = "--rp-print-progress-background"
|
|
406
411
|
}
|
|
407
412
|
export interface DarkModeProviderProps extends PropsWithChildren, Partial<Omit<DarkMode, 'setDarkMode'>> {
|
|
408
413
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../contexts/RPDocumentContext.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { c as y } from "../../RPDefaultLayout-
|
|
4
|
+
import { c as y } from "../../RPDefaultLayout-7ebbc6e0.js";
|
|
5
5
|
import "../../contexts/DarkModeContext.js";
|
|
6
6
|
import "../../contexts/RotationContext.js";
|
|
7
7
|
import "../../contexts/LayerContext.js";
|
|
@@ -1,74 +1,82 @@
|
|
|
1
|
-
import { useState as
|
|
1
|
+
import { useState as g, useCallback as h, useEffect as E } from "react";
|
|
2
2
|
import { appConsole as l } from "../appConsole.js";
|
|
3
|
-
const
|
|
3
|
+
const A = /* @__PURE__ */ new Date("2025-03-28T07:44:46.897Z"), d = "Please visit https://www.react-pdf.dev/license-management/ to generate a new license key.", o = {
|
|
4
4
|
invalidLicense: `You are currently using without a valid license. ${d}`,
|
|
5
5
|
mismatchedDomain: `Your license key is not valid for the current domain / IP. ${d}`,
|
|
6
6
|
expired: `Your license key has expired. ${d}`,
|
|
7
7
|
exceededVersion: "Your license does not support the current version of React PDF. The library version you are using exceeds the supported range of your license.",
|
|
8
8
|
invalidSignature: "Invalid license key: Signature mismatch"
|
|
9
9
|
};
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
for (let e = 0; e <
|
|
13
|
-
n[e] =
|
|
10
|
+
function b(r) {
|
|
11
|
+
const t = r.replace(/-----BEGIN PUBLIC KEY-----/, "").replace(/-----END PUBLIC KEY-----/, "").replace(/\s+/g, ""), i = atob(t), n = new Uint8Array(i.length);
|
|
12
|
+
for (let e = 0; e < i.length; e++)
|
|
13
|
+
n[e] = i.charCodeAt(e);
|
|
14
14
|
return n.buffer;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
const
|
|
18
|
-
for (let n = 0; n <
|
|
19
|
-
|
|
20
|
-
return
|
|
16
|
+
function L(r) {
|
|
17
|
+
const t = atob(r), i = new Uint8Array(t.length);
|
|
18
|
+
for (let n = 0; n < t.length; n++)
|
|
19
|
+
i[n] = t.charCodeAt(n);
|
|
20
|
+
return i.buffer;
|
|
21
21
|
}
|
|
22
|
-
async function
|
|
22
|
+
async function S(r, t = "SHA-256") {
|
|
23
23
|
try {
|
|
24
|
-
const { data:
|
|
24
|
+
const { data: i, signature: n } = JSON.parse(atob(r)), e = b(`-----BEGIN PUBLIC KEY-----
|
|
25
|
+
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvIokvErJ0Fctu0jduSAx
|
|
26
|
+
gr+5Har/VSuZLlOunS28hnlqqA+OF1apHL7RYkjBosS15yvviYdLrVWYHpHnoY4b
|
|
27
|
+
HLQ9I6YX6FMB9T/VbB4xLdVdKvfi8r49aTScl5EKuSpgpPgz2VSJTfvVGcRuth/Y
|
|
28
|
+
Bm7PPGYdL2l2gvKDxchmmsHFPukGki9L4JOUeIVX0GXAxabENckaEH/iC1NZhX+W
|
|
29
|
+
vXnpHeHuIIKlZ16LSivXNgo6BH2Z3GFdg4G3cAaXr6qNP8fsacYNqv2SpTW1viFD
|
|
30
|
+
vzcGRabN25gpJAp9/syeScefWH3OiJY1lmw88oTiJbjIoiq6AkPhfn3G9mF54nvR
|
|
31
|
+
kwIDAQAB
|
|
32
|
+
-----END PUBLIC KEY-----`), a = await window.crypto.subtle.importKey(
|
|
25
33
|
"spki",
|
|
26
34
|
// str2ab(publicKeyContent), // Convert PEM string to ArrayBuffer
|
|
27
35
|
e,
|
|
28
|
-
{ name: "RSA-PSS", hash:
|
|
36
|
+
{ name: "RSA-PSS", hash: t },
|
|
29
37
|
!0,
|
|
30
38
|
["verify"]
|
|
31
39
|
);
|
|
32
40
|
if (!await window.crypto.subtle.verify(
|
|
33
41
|
{ name: "RSA-PSS", saltLength: 32 },
|
|
34
42
|
a,
|
|
35
|
-
|
|
43
|
+
L(n),
|
|
36
44
|
// Convert signature to ArrayBuffer
|
|
37
|
-
new TextEncoder().encode(atob(
|
|
45
|
+
new TextEncoder().encode(atob(i))
|
|
38
46
|
))
|
|
39
47
|
throw new Error(o.invalidSignature);
|
|
40
|
-
return JSON.parse(atob(
|
|
48
|
+
return JSON.parse(atob(i));
|
|
41
49
|
} catch {
|
|
42
50
|
throw new Error(o.invalidLicense);
|
|
43
51
|
}
|
|
44
52
|
}
|
|
45
|
-
const
|
|
53
|
+
const I = (r, t) => r === "specific" ? t === window.location.host : window.location.host.includes(t), c = {
|
|
46
54
|
isValid: !0,
|
|
47
55
|
invalidatedMessage: o.invalidLicense,
|
|
48
56
|
type: void 0
|
|
49
|
-
},
|
|
50
|
-
const [
|
|
57
|
+
}, N = (r) => {
|
|
58
|
+
const [t, i] = g(c), n = h(async () => {
|
|
51
59
|
if (!r)
|
|
52
|
-
throw
|
|
60
|
+
throw i(c), new Error("License is missing");
|
|
53
61
|
try {
|
|
54
|
-
const e = await
|
|
62
|
+
const e = await S(r);
|
|
55
63
|
l.debug(">>> validatedLicense", e);
|
|
56
|
-
const { avu: a, exp: s, dmt: m, dm:
|
|
64
|
+
const { avu: a, exp: s, dmt: m, dm: p, t: w } = e;
|
|
57
65
|
if (!s)
|
|
58
66
|
throw new Error("License is missing expiration timestamp");
|
|
59
67
|
if (s > Number.MAX_SAFE_INTEGER / 1e3)
|
|
60
68
|
throw new Error("Invalid expiration timestamp: value too large");
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
69
|
+
const v = new Date(s * 1e3), f = (/* @__PURE__ */ new Date()).getTime();
|
|
70
|
+
if (v.getTime() < f)
|
|
63
71
|
throw new Error(o.expired);
|
|
64
72
|
if (!a)
|
|
65
73
|
throw new Error("License is missing available until version timestamp");
|
|
66
74
|
if (a > Number.MAX_SAFE_INTEGER / 1e3)
|
|
67
75
|
throw new Error("Invalid available until version timestamp: value too large");
|
|
68
76
|
const u = new Date(a * 1e3);
|
|
69
|
-
if (l.debug("availableUntilTimestamp", u), u.getTime() <
|
|
77
|
+
if (l.debug("availableUntilTimestamp", u), u.getTime() < A.getTime())
|
|
70
78
|
throw new Error(o.exceededVersion);
|
|
71
|
-
if (!
|
|
79
|
+
if (!I(m, p))
|
|
72
80
|
throw new Error(o.mismatchedDomain);
|
|
73
81
|
return {
|
|
74
82
|
isValid: !0,
|
|
@@ -79,21 +87,21 @@ const L = (r, i) => r === "specific" ? i === window.location.host : window.locat
|
|
|
79
87
|
return l.warn(e.message), { ...c, invalidatedMessage: e.message };
|
|
80
88
|
}
|
|
81
89
|
}, [r]);
|
|
82
|
-
return
|
|
90
|
+
return E(() => {
|
|
83
91
|
n().then(({ isValid: e, type: a, invalidatedMessage: s }) => {
|
|
84
|
-
|
|
92
|
+
i({
|
|
85
93
|
isValid: e,
|
|
86
94
|
type: a,
|
|
87
95
|
invalidatedMessage: s
|
|
88
96
|
});
|
|
89
97
|
}).catch((e) => {
|
|
90
|
-
throw
|
|
98
|
+
throw i({
|
|
91
99
|
...c,
|
|
92
100
|
isValid: !1
|
|
93
101
|
}), e;
|
|
94
102
|
});
|
|
95
|
-
}, [n]),
|
|
103
|
+
}, [n]), t;
|
|
96
104
|
};
|
|
97
105
|
export {
|
|
98
|
-
|
|
106
|
+
N as useLicense
|
|
99
107
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "../../contexts/RPDocumentContext.js";
|
|
4
|
-
import { i as A } from "../../RPDefaultLayout-
|
|
4
|
+
import { i as A } from "../../RPDefaultLayout-7ebbc6e0.js";
|
|
5
5
|
import "../../contexts/DarkModeContext.js";
|
|
6
6
|
import "../../contexts/RotationContext.js";
|
|
7
7
|
import "../../contexts/LayerContext.js";
|
|
@@ -2,7 +2,7 @@ import "react";
|
|
|
2
2
|
import "../../contexts/ScrollModeContext.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "../../contexts/RPDocumentContext.js";
|
|
5
|
-
import { f as A } from "../../RPDefaultLayout-
|
|
5
|
+
import { f as A } from "../../RPDefaultLayout-7ebbc6e0.js";
|
|
6
6
|
import "../../contexts/DarkModeContext.js";
|
|
7
7
|
import "../types.js";
|
|
8
8
|
import "../../contexts/RotationContext.js";
|
|
@@ -7,7 +7,7 @@ import "pdfjs-dist";
|
|
|
7
7
|
import "../../contexts/RPDocumentContext.js";
|
|
8
8
|
import "../../contexts/ZoomContext.js";
|
|
9
9
|
import "react/jsx-runtime";
|
|
10
|
-
import { n as C } from "../../RPDefaultLayout-
|
|
10
|
+
import { n as C } from "../../RPDefaultLayout-7ebbc6e0.js";
|
|
11
11
|
import "../../contexts/DarkModeContext.js";
|
|
12
12
|
import "../../contexts/RotationContext.js";
|
|
13
13
|
import "../../contexts/LayerContext.js";
|
|
@@ -2,7 +2,7 @@ import "react";
|
|
|
2
2
|
import "../renderPage.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "../../contexts/RPDocumentContext.js";
|
|
5
|
-
import { k as B } from "../../RPDefaultLayout-
|
|
5
|
+
import { k as B } from "../../RPDefaultLayout-7ebbc6e0.js";
|
|
6
6
|
import "../../contexts/DarkModeContext.js";
|
|
7
7
|
import "../../contexts/RotationContext.js";
|
|
8
8
|
import "../../contexts/LayerContext.js";
|
|
@@ -3,7 +3,7 @@ import "../types.js";
|
|
|
3
3
|
import "../../contexts/ScrollModeContext.js";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "../../contexts/RPDocumentContext.js";
|
|
6
|
-
import { r as y } from "../../RPDefaultLayout-
|
|
6
|
+
import { r as y } from "../../RPDefaultLayout-7ebbc6e0.js";
|
|
7
7
|
import "../../contexts/DarkModeContext.js";
|
|
8
8
|
import "../../contexts/RotationContext.js";
|
|
9
9
|
import "../../contexts/LayerContext.js";
|
package/dist/utils/types.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { e as O, z as _, i as R, p as I, t as
|
|
2
|
-
var E = /* @__PURE__ */ ((r) => (r[r.Text = 1] = "Text", r[r.Link = 2] = "Link", r[r.FreeText = 3] = "FreeText", r[r.Line = 4] = "Line", r[r.Square = 5] = "Square", r[r.Circle = 6] = "Circle", r[r.Polygon = 7] = "Polygon", r[r.Polyline = 8] = "Polyline", r[r.Highlight = 9] = "Highlight", r[r.Underline = 10] = "Underline", r[r.Squiggly = 11] = "Squiggly", r[r.StrikeOut = 12] = "StrikeOut", r[r.Stamp = 13] = "Stamp", r[r.Caret = 14] = "Caret", r[r.Ink = 15] = "Ink", r[r.Popup = 16] = "Popup", r[r.FileAttachment = 17] = "FileAttachment", r[r.Widget = 20] = "Widget", r))(E || {}), L = /* @__PURE__ */ ((r) => (r.ACTUAL = "Actual", r.PAGE_FIT = "Fit", r.PAGE_WIDTH = "Width", r))(L || {}), D = /* @__PURE__ */ ((r) => (r.Organization = "organization", r.Developer = "developer", r))(D || {}),
|
|
3
|
-
const
|
|
1
|
+
import { e as O, z as _, i as R, p as I, t as p } from "../th_TH-2c4015a5.js";
|
|
2
|
+
var E = /* @__PURE__ */ ((r) => (r[r.Text = 1] = "Text", r[r.Link = 2] = "Link", r[r.FreeText = 3] = "FreeText", r[r.Line = 4] = "Line", r[r.Square = 5] = "Square", r[r.Circle = 6] = "Circle", r[r.Polygon = 7] = "Polygon", r[r.Polyline = 8] = "Polyline", r[r.Highlight = 9] = "Highlight", r[r.Underline = 10] = "Underline", r[r.Squiggly = 11] = "Squiggly", r[r.StrikeOut = 12] = "StrikeOut", r[r.Stamp = 13] = "Stamp", r[r.Caret = 14] = "Caret", r[r.Ink = 15] = "Ink", r[r.Popup = 16] = "Popup", r[r.FileAttachment = 17] = "FileAttachment", r[r.Widget = 20] = "Widget", r))(E || {}), L = /* @__PURE__ */ ((r) => (r.ACTUAL = "Actual", r.PAGE_FIT = "Fit", r.PAGE_WIDTH = "Width", r))(L || {}), D = /* @__PURE__ */ ((r) => (r.Organization = "organization", r.Developer = "developer", r))(D || {}), N = /* @__PURE__ */ ((r) => (r.SINGLE_PAGE = "Single", r.DUAL_PAGE = "Dual", r))(N || {}), o = /* @__PURE__ */ ((r) => (r.TEXT_COLOR = "--rp-text-color", r.OUTLINE_COLOR = "--rp-outline-color", r.FONT_FAMILY = "--rp-font-family", r.PRIMARY_COLOR = "--rp-primary-color", r.BORDER_RADIUS = "--rp-border-radius", r.DROP_MASK_BACKGROUND_COLOR = "--rp-drop-mask-background-color", r.LOADER_BACKDROP_COLOR = "--rp-loader-backdrop-color", r.ICON_DISABLED = "--rp-icon-disabled", r.ICON_FONT_SIZE = "--rp-icon-font-size", r.TOOLBAR_BACKGROUND = "--rp-toolbar-background", r.TOOLBAR_BORDER_COLOR = "--rp-toolbar-border-color", r.TOOLBAR_PADDING = "--rp-toolbar-padding", r.TOOLBAR_GAP = "--rp-toolbar-gap", r.SIDEBAR_WIDTH = "--rp-sidebar-width", r.THUMBNAIL_BORDER_COLOR = "--rp-thumbnail-border-color", r.THUMBNAIL_BACKGROUND_COLOR = "--rp-thumbnail-background-color", r.THUMBNAIL_ACTIVE_COLOR = "--rp-thumbnail-active-color", r.THUMBNAIL_PADDING_Y = "--rp-thumbnail-padding-y", r.BUTTON_HOVER_BACKGROUND = "--rp-button-hover-background", r.BUTTON_PADDING = "--rp-button-padding", r.INPUT_PADDING = "--rp-input-padding", r.INPUT_BORDER_RADIUS = "--rp-input-border-radius", r.INPUT_BACKGROUND_COLOR = "--rp-input-background-color", r.PAGES_BACKGROUND_COLOR = "--rp-pages-background-color", r.ANNOTATION_LAYER_LINK_HOVER_BACKGROUND = "--rp-annotation-layer__link-hover-background", r.DROPDOWN_BACKGROUND_COLOR = "--rp-dropdown-background-color", r.DROPDOWN_PADDING = "--rp-dropdown-padding", r.DROPDOWN_HOVER_BACKGROUND_COLOR = "--rp-dropdown-hover-background-color", r.DROPDOWN_SEPARATOR_COLOR = "--rp-dropdown-separator-color", r.DROPDOWN_SEPARATOR_MARGIN = "--rp-dropdown-separator-margin", r.POPOVER_BACKGROUND_COLOR = "--rp-popover-background-color", r.POPOVER_COLOR = "--rp-popover-color", r.POPOVER_BORDER_COLOR = "--rp-popover-border-color", r.OVERLAY_BACKGROUND_COLOR = "--rp-overlay-background-color", r.DIALOG_BACKGROUND_COLOR = "--rp-dialog-background-color", r.PROPERTIES_DIVIDER_COLOR = "--rp-properties-divider-color", r.PROPERTIES_DIVIDER_MARGIN = "--rp-properties-divider-margin", r.PROPERTY_ITEM_GAP = "--rp-property-item-gap", r.DIALOG_TITLE_COLOR = "--rp-dialog-title-color", r.PROPERTY_ITEM_LABEL_COLOR = "--rp-property-item-label-color", r.PROPERTY_CLOSE_ICON_SIZE = "--rp-property-close-icon-size", r.PROPERTY_ITEM_FONT_SIZE = "--rp-property-item-font-size", r.PROPERTY_ITEM_FONT_WEIGHT = "--rp-property-item-font-weight", r.DIALOG_TITLE_FONT_SIZE = "--rp-dialog-title-font-size", r.DIALOG_TITLE_FONT_WEIGHT = "--rp-dialog-title-font-weight", r.MENU_ITEM_ICON_SIZE = "--rp-menu-item-icon-size", r.PRINT_PROGRESS_BACKGROUND = "--rp-print-progress-background", r))(o || {}), d = /* @__PURE__ */ ((r) => (r.PAGE_SCROLLING = "PAGE", r.VERTICAL_SCROLLING = "VERTICAL", r.HORIZONTAL_SCROLLING = "HORIZONTAL", r))(d || {}), P = /* @__PURE__ */ ((r) => (r.TEXT = "TEXT", r.HAND = "HAND", r))(P || {});
|
|
3
|
+
const c = {
|
|
4
4
|
en_US: O,
|
|
5
5
|
zh_CN: _,
|
|
6
6
|
it_IT: R,
|
|
7
7
|
pt_PT: I,
|
|
8
|
-
th_TH:
|
|
8
|
+
th_TH: p
|
|
9
9
|
};
|
|
10
10
|
export {
|
|
11
11
|
E as AnnotationSubType,
|
|
12
12
|
D as LicenseType,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
c as Locales,
|
|
14
|
+
d as ScrollMode,
|
|
15
|
+
P as SelectionMode,
|
|
16
|
+
o as ThemeVariables,
|
|
17
|
+
N as ViewMode,
|
|
18
18
|
L as ZoomLevel
|
|
19
19
|
};
|
package/package.json
CHANGED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { useDarkModeContext as _ } from "./contexts/DarkModeContext.js";
|
|
3
|
-
import { c as m } from "./clsx-0c6e471a.js";
|
|
4
|
-
import { useThemeContext as l } from "./contexts/ThemeContext.js";
|
|
5
|
-
import './assets/Container.css';const u = {
|
|
6
|
-
"rp-layout": "_rp-layout_11pux_1",
|
|
7
|
-
"rp-content": "_rp-content_11pux_5",
|
|
8
|
-
"rp-pages": "_rp-pages_11pux_11",
|
|
9
|
-
"rp-container": "_rp-container_11pux_16",
|
|
10
|
-
"rp-theme-variables": "_rp-theme-variables_11pux_52",
|
|
11
|
-
"rp-dark-mode": "_rp-dark-mode_11pux_138"
|
|
12
|
-
}, d = {
|
|
13
|
-
"rp-container": "_rp-container_1fbrq_1"
|
|
14
|
-
}, b = (t) => {
|
|
15
|
-
const { children: a, getContainerRef: o, toolbarRef: r, style: s, className: p } = t, { darkMode: e } = _(), { customVariables: n, customDarkVariables: c } = l();
|
|
16
|
-
return /* @__PURE__ */ i(
|
|
17
|
-
"div",
|
|
18
|
-
{
|
|
19
|
-
ref: o,
|
|
20
|
-
"data-rp": "container",
|
|
21
|
-
className: m(
|
|
22
|
-
d["rp-container"],
|
|
23
|
-
e ? u["rp-dark-mode"] : "",
|
|
24
|
-
p
|
|
25
|
-
),
|
|
26
|
-
style: {
|
|
27
|
-
"--rp-toolbar-height": `${(r == null ? void 0 : r.clientHeight) || 48}px`,
|
|
28
|
-
...e ? c : n,
|
|
29
|
-
...s
|
|
30
|
-
},
|
|
31
|
-
children: a
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
export {
|
|
36
|
-
b as C,
|
|
37
|
-
u as c
|
|
38
|
-
};
|