@pdf-viewer/react 1.4.0 → 1.4.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Popover-b7402893.js +1445 -0
- package/dist/{RPDefaultLayout-70dc4200.js → RPDefaultLayout-a5d7b0b8.js} +1115 -1090
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Container.css +1 -1
- package/dist/assets/DropDown.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/Popover.css +1 -1
- package/dist/assets/RPDefaultLayout.css +1 -1
- package/dist/assets/RPTooltip.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 +18 -6
- package/dist/components/layout/LayoutContainer.js +31 -0
- package/dist/components/layout/RPDefaultLayout.js +3 -4
- 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/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/Checkbox.js +22 -21
- package/dist/components/ui/DropDown.js +12 -12
- package/dist/components/ui/Input.js +12 -12
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/Popover.js +1 -1
- 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/components/layout/Container.d.ts +0 -1
- package/dist/types/components/layout/LayoutContainer.d.ts +9 -0
- package/dist/types/utils/types.d.ts +24 -3
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- 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 +12 -12
- package/package.json +2 -2
- package/dist/Container-8fea0875.js +0 -39
- package/dist/Popover-5281103c.js +0 -3061
- 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-a5d7b0b8.js";
|
|
3
3
|
import { RPConfig as a } from "./components/RPConfig.js";
|
|
4
4
|
import { RPController as l } from "./components/RPController.js";
|
|
5
5
|
import { RPTheme as P } from "./components/RPTheme.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
toolbarRef: HTMLDivElement | null;
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
}
|
|
6
|
+
export declare const LayoutContainer: import('react').ForwardRefExoticComponent<Props & {
|
|
7
|
+
children?: import('react').ReactNode | undefined;
|
|
8
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export {};
|
|
@@ -378,11 +378,12 @@ export interface ConfigContextType {
|
|
|
378
378
|
workerUrlAdded: boolean;
|
|
379
379
|
}
|
|
380
380
|
export declare enum ThemeVariables {
|
|
381
|
-
TEXT_COLOR = "--rp-text-color",
|
|
382
|
-
OUTLINE_COLOR = "--rp-outline-color",
|
|
383
381
|
FONT_FAMILY = "--rp-font-family",
|
|
384
382
|
PRIMARY_COLOR = "--rp-primary-color",
|
|
385
383
|
BORDER_RADIUS = "--rp-border-radius",
|
|
384
|
+
TEXT_COLOR = "--rp-text-color",
|
|
385
|
+
OUTLINE_COLOR = "--rp-outline-color",
|
|
386
|
+
FONT_SIZE = "--rp-font-size",
|
|
386
387
|
DROP_MASK_BACKGROUND_COLOR = "--rp-drop-mask-background-color",
|
|
387
388
|
LOADER_BACKDROP_COLOR = "--rp-loader-backdrop-color",
|
|
388
389
|
ICON_DISABLED = "--rp-icon-disabled",
|
|
@@ -391,6 +392,7 @@ export declare enum ThemeVariables {
|
|
|
391
392
|
TOOLBAR_BORDER_COLOR = "--rp-toolbar-border-color",
|
|
392
393
|
TOOLBAR_PADDING = "--rp-toolbar-padding",
|
|
393
394
|
TOOLBAR_GAP = "--rp-toolbar-gap",
|
|
395
|
+
TOOLBAR_SIZE = "--rp-toolbar-size",
|
|
394
396
|
SIDEBAR_WIDTH = "--rp-sidebar-width",
|
|
395
397
|
THUMBNAIL_BORDER_COLOR = "--rp-thumbnail-border-color",
|
|
396
398
|
THUMBNAIL_BACKGROUND_COLOR = "--rp-thumbnail-background-color",
|
|
@@ -401,6 +403,7 @@ export declare enum ThemeVariables {
|
|
|
401
403
|
INPUT_PADDING = "--rp-input-padding",
|
|
402
404
|
INPUT_BORDER_RADIUS = "--rp-input-border-radius",
|
|
403
405
|
INPUT_BACKGROUND_COLOR = "--rp-input-background-color",
|
|
406
|
+
INPUT_PLACEHOLDER_COLOR = "--rp-input-placeholder-color",
|
|
404
407
|
PAGES_BACKGROUND_COLOR = "--rp-pages-background-color",
|
|
405
408
|
ANNOTATION_LAYER_LINK_HOVER_BACKGROUND = "--rp-annotation-layer__link-hover-background",
|
|
406
409
|
DROPDOWN_BACKGROUND_COLOR = "--rp-dropdown-background-color",
|
|
@@ -408,9 +411,15 @@ export declare enum ThemeVariables {
|
|
|
408
411
|
DROPDOWN_HOVER_BACKGROUND_COLOR = "--rp-dropdown-hover-background-color",
|
|
409
412
|
DROPDOWN_SEPARATOR_COLOR = "--rp-dropdown-separator-color",
|
|
410
413
|
DROPDOWN_SEPARATOR_MARGIN = "--rp-dropdown-separator-margin",
|
|
414
|
+
DROPDOWN_PADDING_MENU_ITEM = "--rp-dropdown-padding-menu-item",
|
|
415
|
+
DROPDOWN_FONT_SIZE = "--rp-dropdown-font-size",
|
|
416
|
+
DROPDOWN_BORDER_RADIUS = "--rp-dropdown-border-radius",
|
|
417
|
+
SEARCH_TOOL_DROPDOWN_PADDING = "--rp-search-tool-dropdown-padding",
|
|
418
|
+
POPOVER_FONT_SIZE = "--rp-popover-font-size",
|
|
411
419
|
POPOVER_BACKGROUND_COLOR = "--rp-popover-background-color",
|
|
412
420
|
POPOVER_COLOR = "--rp-popover-color",
|
|
413
421
|
POPOVER_BORDER_COLOR = "--rp-popover-border-color",
|
|
422
|
+
POPOVER_BORDER_RADIUS = "--rp-popover-border-radius",
|
|
414
423
|
OVERLAY_BACKGROUND_COLOR = "--rp-overlay-background-color",
|
|
415
424
|
DIALOG_BACKGROUND_COLOR = "--rp-dialog-background-color",
|
|
416
425
|
PROPERTIES_DIVIDER_COLOR = "--rp-properties-divider-color",
|
|
@@ -424,7 +433,19 @@ export declare enum ThemeVariables {
|
|
|
424
433
|
DIALOG_TITLE_FONT_SIZE = "--rp-dialog-title-font-size",
|
|
425
434
|
DIALOG_TITLE_FONT_WEIGHT = "--rp-dialog-title-font-weight",
|
|
426
435
|
MENU_ITEM_ICON_SIZE = "--rp-menu-item-icon-size",
|
|
427
|
-
PRINT_PROGRESS_BACKGROUND = "--rp-print-progress-background"
|
|
436
|
+
PRINT_PROGRESS_BACKGROUND = "--rp-print-progress-background",
|
|
437
|
+
PRINT_PROGRESS_COLOR = "--rp-print-progress-color",
|
|
438
|
+
DROP_ZONE_BORDER = "--rp-drop-zone-border",
|
|
439
|
+
DROP_ZONE_FONT_COLOR = "--rp-drop-zone-font-color",
|
|
440
|
+
DROP_ZONE_FONT_SIZE = "--rp-drop-zone-font-size",
|
|
441
|
+
DROP_ZONE_BACKGROUND_COLOR = "--rp-drop-zone-background-color",
|
|
442
|
+
CHECKBOX_BORDER_RADIUS = "--rp-checkbox-border-radius",
|
|
443
|
+
CHECKBOX_BORDER_COLOR = "--rp-checkbox-border-color",
|
|
444
|
+
HIGHLIGHT_BACKGROUND_COLOR = "--rp-highlight-background-color",
|
|
445
|
+
TEXT_LAYER_HIGHLIGHT_BORDER_RADIUS = "--rp-text-layer-highlight-border-radius",
|
|
446
|
+
CURRENT_HIGHLIGHT_BACKGROUND_COLOR = "--rp-current-highlight-background-color",
|
|
447
|
+
TOOLTIP_BACKGROUND_COLOR = "--rp-tooltip-background-color",
|
|
448
|
+
TOOLTIP_BORDER_RADIUS = "--rp-tooltip-border-radius"
|
|
428
449
|
}
|
|
429
450
|
export interface DarkModeProviderProps extends PropsWithChildren, Partial<Omit<DarkMode, 'setDarkMode'>> {
|
|
430
451
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../contexts/RPDocumentContext.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { c as A } from "../../RPDefaultLayout-
|
|
4
|
+
import { c as A } from "../../RPDefaultLayout-a5d7b0b8.js";
|
|
5
5
|
import "../../contexts/DarkModeContext.js";
|
|
6
6
|
import "../../contexts/RotationContext.js";
|
|
7
7
|
import "../../contexts/LayerContext.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState as E, useCallback as h, useEffect as A } from "react";
|
|
2
2
|
import { appConsole as c } from "../appConsole.js";
|
|
3
|
-
const b = /* @__PURE__ */ new Date("2025-04-
|
|
3
|
+
const b = /* @__PURE__ */ new Date("2025-04-25T09:25:09.714Z"), l = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", o = {
|
|
4
4
|
invalidLicense: `You are currently using without a valid license. ${l}`,
|
|
5
5
|
mismatchedDomain: `Your license key is not valid for the current domain / IP. ${l}`,
|
|
6
6
|
expired: `Your license key has expired. ${l}`,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "../../contexts/RPDocumentContext.js";
|
|
4
|
-
import { i as C } from "../../RPDefaultLayout-
|
|
4
|
+
import { i as C } from "../../RPDefaultLayout-a5d7b0b8.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 B } from "../../RPDefaultLayout-
|
|
5
|
+
import { f as B } from "../../RPDefaultLayout-a5d7b0b8.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 E } from "../../RPDefaultLayout-
|
|
10
|
+
import { n as E } from "../../RPDefaultLayout-a5d7b0b8.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 D } from "../../RPDefaultLayout-
|
|
5
|
+
import { k as D } from "../../RPDefaultLayout-a5d7b0b8.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 { s as A } from "../../RPDefaultLayout-
|
|
6
|
+
import { s as A } from "../../RPDefaultLayout-a5d7b0b8.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,20 +1,20 @@
|
|
|
1
|
-
import { e as
|
|
2
|
-
var
|
|
1
|
+
import { e as r, z as _, i as R, p as o, t as p } from "../th_TH-2c4015a5.js";
|
|
2
|
+
var E = /* @__PURE__ */ ((O) => (O[O.Text = 1] = "Text", O[O.Link = 2] = "Link", O[O.FreeText = 3] = "FreeText", O[O.Line = 4] = "Line", O[O.Square = 5] = "Square", O[O.Circle = 6] = "Circle", O[O.Polygon = 7] = "Polygon", O[O.Polyline = 8] = "Polyline", O[O.Highlight = 9] = "Highlight", O[O.Underline = 10] = "Underline", O[O.Squiggly = 11] = "Squiggly", O[O.StrikeOut = 12] = "StrikeOut", O[O.Stamp = 13] = "Stamp", O[O.Caret = 14] = "Caret", O[O.Ink = 15] = "Ink", O[O.Popup = 16] = "Popup", O[O.FileAttachment = 17] = "FileAttachment", O[O.Widget = 20] = "Widget", O))(E || {}), I = /* @__PURE__ */ ((O) => (O.INTERNAL_LINK = "internal-link", O.LINK = "link", O.FILE_ATTACHMENT = "file-attachment", O.FORM_TEXT = "form-text", O.FORM_SELECT = "form-select", O.FORM_CHECKBOX = "form-checkbox", O.FORM_RADIO = "form-radio", O.FORM_BUTTON = "form-button", O.BUTTON = "button", O))(I || {}), D = /* @__PURE__ */ ((O) => (O.ACTUAL = "Actual", O.PAGE_FIT = "Fit", O.PAGE_WIDTH = "Width", O))(D || {}), d = /* @__PURE__ */ ((O) => (O.Organization = "organization", O.Developer = "developer", O))(d || {}), N = /* @__PURE__ */ ((O) => (O.SINGLE_PAGE = "Single", O.DUAL_PAGE = "Dual", O))(N || {}), L = /* @__PURE__ */ ((O) => (O.FONT_FAMILY = "--rp-font-family", O.PRIMARY_COLOR = "--rp-primary-color", O.BORDER_RADIUS = "--rp-border-radius", O.TEXT_COLOR = "--rp-text-color", O.OUTLINE_COLOR = "--rp-outline-color", O.FONT_SIZE = "--rp-font-size", O.DROP_MASK_BACKGROUND_COLOR = "--rp-drop-mask-background-color", O.LOADER_BACKDROP_COLOR = "--rp-loader-backdrop-color", O.ICON_DISABLED = "--rp-icon-disabled", O.ICON_FONT_SIZE = "--rp-icon-font-size", O.TOOLBAR_BACKGROUND = "--rp-toolbar-background", O.TOOLBAR_BORDER_COLOR = "--rp-toolbar-border-color", O.TOOLBAR_PADDING = "--rp-toolbar-padding", O.TOOLBAR_GAP = "--rp-toolbar-gap", O.TOOLBAR_SIZE = "--rp-toolbar-size", O.SIDEBAR_WIDTH = "--rp-sidebar-width", O.THUMBNAIL_BORDER_COLOR = "--rp-thumbnail-border-color", O.THUMBNAIL_BACKGROUND_COLOR = "--rp-thumbnail-background-color", O.THUMBNAIL_ACTIVE_COLOR = "--rp-thumbnail-active-color", O.THUMBNAIL_PADDING_Y = "--rp-thumbnail-padding-y", O.BUTTON_HOVER_BACKGROUND = "--rp-button-hover-background", O.BUTTON_PADDING = "--rp-button-padding", O.INPUT_PADDING = "--rp-input-padding", O.INPUT_BORDER_RADIUS = "--rp-input-border-radius", O.INPUT_BACKGROUND_COLOR = "--rp-input-background-color", O.INPUT_PLACEHOLDER_COLOR = "--rp-input-placeholder-color", O.PAGES_BACKGROUND_COLOR = "--rp-pages-background-color", O.ANNOTATION_LAYER_LINK_HOVER_BACKGROUND = "--rp-annotation-layer__link-hover-background", O.DROPDOWN_BACKGROUND_COLOR = "--rp-dropdown-background-color", O.DROPDOWN_PADDING = "--rp-dropdown-padding", O.DROPDOWN_HOVER_BACKGROUND_COLOR = "--rp-dropdown-hover-background-color", O.DROPDOWN_SEPARATOR_COLOR = "--rp-dropdown-separator-color", O.DROPDOWN_SEPARATOR_MARGIN = "--rp-dropdown-separator-margin", O.DROPDOWN_PADDING_MENU_ITEM = "--rp-dropdown-padding-menu-item", O.DROPDOWN_FONT_SIZE = "--rp-dropdown-font-size", O.DROPDOWN_BORDER_RADIUS = "--rp-dropdown-border-radius", O.SEARCH_TOOL_DROPDOWN_PADDING = "--rp-search-tool-dropdown-padding", O.POPOVER_FONT_SIZE = "--rp-popover-font-size", O.POPOVER_BACKGROUND_COLOR = "--rp-popover-background-color", O.POPOVER_COLOR = "--rp-popover-color", O.POPOVER_BORDER_COLOR = "--rp-popover-border-color", O.POPOVER_BORDER_RADIUS = "--rp-popover-border-radius", O.OVERLAY_BACKGROUND_COLOR = "--rp-overlay-background-color", O.DIALOG_BACKGROUND_COLOR = "--rp-dialog-background-color", O.PROPERTIES_DIVIDER_COLOR = "--rp-properties-divider-color", O.PROPERTIES_DIVIDER_MARGIN = "--rp-properties-divider-margin", O.PROPERTY_ITEM_GAP = "--rp-property-item-gap", O.DIALOG_TITLE_COLOR = "--rp-dialog-title-color", O.PROPERTY_ITEM_LABEL_COLOR = "--rp-property-item-label-color", O.PROPERTY_CLOSE_ICON_SIZE = "--rp-property-close-icon-size", O.PROPERTY_ITEM_FONT_SIZE = "--rp-property-item-font-size", O.PROPERTY_ITEM_FONT_WEIGHT = "--rp-property-item-font-weight", O.DIALOG_TITLE_FONT_SIZE = "--rp-dialog-title-font-size", O.DIALOG_TITLE_FONT_WEIGHT = "--rp-dialog-title-font-weight", O.MENU_ITEM_ICON_SIZE = "--rp-menu-item-icon-size", O.PRINT_PROGRESS_BACKGROUND = "--rp-print-progress-background", O.PRINT_PROGRESS_COLOR = "--rp-print-progress-color", O.DROP_ZONE_BORDER = "--rp-drop-zone-border", O.DROP_ZONE_FONT_COLOR = "--rp-drop-zone-font-color", O.DROP_ZONE_FONT_SIZE = "--rp-drop-zone-font-size", O.DROP_ZONE_BACKGROUND_COLOR = "--rp-drop-zone-background-color", O.CHECKBOX_BORDER_RADIUS = "--rp-checkbox-border-radius", O.CHECKBOX_BORDER_COLOR = "--rp-checkbox-border-color", O.HIGHLIGHT_BACKGROUND_COLOR = "--rp-highlight-background-color", O.TEXT_LAYER_HIGHLIGHT_BORDER_RADIUS = "--rp-text-layer-highlight-border-radius", O.CURRENT_HIGHLIGHT_BACKGROUND_COLOR = "--rp-current-highlight-background-color", O.TOOLTIP_BACKGROUND_COLOR = "--rp-tooltip-background-color", O.TOOLTIP_BORDER_RADIUS = "--rp-tooltip-border-radius", O))(L || {}), C = /* @__PURE__ */ ((O) => (O.PAGE_SCROLLING = "PAGE", O.VERTICAL_SCROLLING = "VERTICAL", O.HORIZONTAL_SCROLLING = "HORIZONTAL", O))(C || {}), P = /* @__PURE__ */ ((O) => (O.TEXT = "TEXT", O.HAND = "HAND", O))(P || {});
|
|
3
3
|
const g = {
|
|
4
|
-
en_US:
|
|
4
|
+
en_US: r,
|
|
5
5
|
zh_CN: _,
|
|
6
6
|
it_IT: R,
|
|
7
|
-
pt_PT:
|
|
8
|
-
th_TH:
|
|
7
|
+
pt_PT: o,
|
|
8
|
+
th_TH: p
|
|
9
9
|
};
|
|
10
10
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
E as AnnotationSubType,
|
|
12
|
+
I as AnnotationType,
|
|
13
|
+
d as LicenseType,
|
|
14
14
|
g as Locales,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
C as ScrollMode,
|
|
16
|
+
P as SelectionMode,
|
|
17
|
+
L as ThemeVariables,
|
|
18
|
+
N as ViewMode,
|
|
19
19
|
D as ZoomLevel
|
|
20
20
|
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@pdf-viewer/react",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "The PDF Viewer component for React and Next.js",
|
|
5
|
-
"version": "1.4.0",
|
|
5
|
+
"version": "1.4.1-rc.0",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"component",
|
|
8
8
|
"frontend",
|
|
@@ -88,4 +88,4 @@
|
|
|
88
88
|
"overrides": {
|
|
89
89
|
"pdfjs-dist": "4.7.76"
|
|
90
90
|
}
|
|
91
|
-
}
|
|
91
|
+
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { jsx as _ } from "react/jsx-runtime";
|
|
2
|
-
import { useDarkModeContext as i } 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 d = {
|
|
6
|
-
"rp-layout": "_rp-layout_1965c_1",
|
|
7
|
-
"rp-content": "_rp-content_1965c_5",
|
|
8
|
-
"rp-pages": "_rp-pages_1965c_11",
|
|
9
|
-
"rp-container": "_rp-container_1965c_16",
|
|
10
|
-
"rp-loader": "_rp-loader_1965c_52",
|
|
11
|
-
"rp-theme-variables": "_rp-theme-variables_1965c_56",
|
|
12
|
-
"rp-dark-mode": "_rp-dark-mode_1965c_143"
|
|
13
|
-
}, h = {
|
|
14
|
-
"rp-container": "_rp-container_1fbrq_1"
|
|
15
|
-
}, b = (t) => {
|
|
16
|
-
const { children: a, getContainerRef: o, toolbarRef: r, style: s, className: c } = t, { darkMode: e } = i(), { customVariables: n, customDarkVariables: p } = l();
|
|
17
|
-
return /* @__PURE__ */ _(
|
|
18
|
-
"div",
|
|
19
|
-
{
|
|
20
|
-
ref: o,
|
|
21
|
-
"data-rp": "container",
|
|
22
|
-
className: m(
|
|
23
|
-
h["rp-container"],
|
|
24
|
-
e ? d["rp-dark-mode"] : "",
|
|
25
|
-
c
|
|
26
|
-
),
|
|
27
|
-
style: {
|
|
28
|
-
"--rp-toolbar-height": `${(r == null ? void 0 : r.clientHeight) || 48}px`,
|
|
29
|
-
...e ? p : n,
|
|
30
|
-
...s
|
|
31
|
-
},
|
|
32
|
-
children: a
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
b as C,
|
|
38
|
-
d as c
|
|
39
|
-
};
|