@pdf-viewer/react 1.8.0-beta.0 → 1.8.0-beta.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/{Popover-b7402893.js → Popover-1faa77f6.js} +80 -80
- package/dist/RPDefaultLayout-129bfdfc.js +3262 -0
- package/dist/assets/DropDown.css +1 -1
- package/dist/assets/Popover.css +1 -1
- package/dist/assets/RPDefaultLayout.css +1 -1
- package/dist/components/RPController.js +26 -19
- package/dist/components/RPPages.js +3 -2
- package/dist/components/RPProvider.js +9 -23
- package/dist/components/layout/LayoutContainer.js +3 -2
- package/dist/components/layout/RPDefaultLayout.js +2 -2
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +4 -2
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +3 -2
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +3 -2
- package/dist/components/layout/toolbar/OtherTool.js +1 -1
- 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/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +4 -3
- package/dist/components/layout/toolbar/ZoomTool.js +3 -2
- package/dist/components/page/AnnotationLayer.js +3 -2
- package/dist/components/page/CanvasLayer.js +3 -2
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +3 -2
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +3 -2
- package/dist/components/page/TextLayer.js +3 -2
- package/dist/components/ui/DropDown.js +10 -10
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/Popover.js +1 -1
- package/dist/contexts/DimensionPagesContext.js +27 -26
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +3 -3
- package/dist/contexts/RotationContext.js +21 -16
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/SinglePageRotateContext.js +21 -0
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/main.js +18 -16
- package/dist/{th_TH-4af60d36.js → th_TH-f515b3ad.js} +1 -1
- package/dist/types/components/layout/sidebar/Thumbnail.d.ts +1 -0
- package/dist/types/contexts/SinglePageRotateContext.d.ts +13 -0
- package/dist/types/locales/zh_CN.json.d.ts +2 -2
- package/dist/types/main.d.ts +2 -1
- package/dist/types/utils/hooks/useSinglePageRotate.d.ts +4 -0
- package/dist/types/utils/types.d.ts +5 -0
- package/dist/utils/getWordPositionInPage.js +21 -14
- package/dist/utils/hooks/useFileDownload.js +3 -2
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/useLocalization.js +1 -1
- package/dist/utils/hooks/usePaginate.js +3 -2
- package/dist/utils/hooks/usePresentPage.js +3 -2
- package/dist/utils/hooks/usePrint.js +3 -2
- package/dist/utils/hooks/useScrollToPage.js +3 -2
- package/dist/utils/hooks/useSearch.js +3 -2
- package/dist/utils/hooks/useSinglePageRotate.js +18 -0
- package/dist/utils/hooks/useThumbnail.js +3 -2
- package/dist/utils/hooks/useVirtualReactWindow.js +3 -2
- package/dist/utils/hooks/useWatermark.js +1 -1
- package/dist/utils/types.js +11 -10
- package/package.json +1 -1
- package/dist/RPDefaultLayout-f02500c9.js +0 -3205
|
@@ -7,7 +7,7 @@ import "../../contexts/RPDocumentContext.js";
|
|
|
7
7
|
import "../../contexts/ZoomContext.js";
|
|
8
8
|
import "react/jsx-runtime";
|
|
9
9
|
import "../../contexts/DocumentPasswordContext.js";
|
|
10
|
-
import { n as
|
|
10
|
+
import { n as J } from "../../RPDefaultLayout-129bfdfc.js";
|
|
11
11
|
import "../../contexts/DarkModeContext.js";
|
|
12
12
|
import "../../contexts/RotationContext.js";
|
|
13
13
|
import "../../contexts/LayerContext.js";
|
|
@@ -25,6 +25,7 @@ import "../../contexts/HighlightContext.js";
|
|
|
25
25
|
import "../../contexts/LicenseContext.js";
|
|
26
26
|
import "../../contexts/DownloadContext.js";
|
|
27
27
|
import "../../contexts/SmoothScrollContext.js";
|
|
28
|
+
import "../../contexts/SinglePageRotateContext.js";
|
|
28
29
|
import "../../contexts/LoaderContext.js";
|
|
29
30
|
import "../../components/RPConfig.js";
|
|
30
31
|
import "../../contexts/ThemeContext.js";
|
|
@@ -33,5 +34,5 @@ import "../../contexts/ToolbarComponentContext.js";
|
|
|
33
34
|
import "../getScrollDistance.js";
|
|
34
35
|
import "../getWordPositionInPage.js";
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
J as useSearch
|
|
37
38
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useCallback as r } from "react";
|
|
2
|
+
import { useSinglePageRotateContext as a } from "../../contexts/SinglePageRotateContext.js";
|
|
3
|
+
import { RotateDirection as i } from "../types.js";
|
|
4
|
+
const m = () => {
|
|
5
|
+
const { setSinglePageRotate: e } = a();
|
|
6
|
+
return { rotate: r(
|
|
7
|
+
(t, n) => {
|
|
8
|
+
e((o) => ({
|
|
9
|
+
...o,
|
|
10
|
+
[t]: n === i.CLOCKWISE ? ((o[t] || 0) + 90) % 360 : ((o[t] || 0) - 90) % 360
|
|
11
|
+
}));
|
|
12
|
+
},
|
|
13
|
+
[e]
|
|
14
|
+
) };
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
m as useSinglePageRotate
|
|
18
|
+
};
|
|
@@ -3,7 +3,7 @@ import "../renderPage.js";
|
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "../../contexts/RPDocumentContext.js";
|
|
5
5
|
import "../../contexts/DocumentPasswordContext.js";
|
|
6
|
-
import { k as
|
|
6
|
+
import { k as H } from "../../RPDefaultLayout-129bfdfc.js";
|
|
7
7
|
import "../../contexts/DarkModeContext.js";
|
|
8
8
|
import "../../contexts/RotationContext.js";
|
|
9
9
|
import "../../contexts/LayerContext.js";
|
|
@@ -24,6 +24,7 @@ import "../../contexts/HighlightContext.js";
|
|
|
24
24
|
import "../../contexts/LicenseContext.js";
|
|
25
25
|
import "../../contexts/DownloadContext.js";
|
|
26
26
|
import "../../contexts/SmoothScrollContext.js";
|
|
27
|
+
import "../../contexts/SinglePageRotateContext.js";
|
|
27
28
|
import "../../contexts/LoaderContext.js";
|
|
28
29
|
import "../../components/RPConfig.js";
|
|
29
30
|
import "../../contexts/ThemeContext.js";
|
|
@@ -31,5 +32,5 @@ import "../../components/RPDropFileZone.js";
|
|
|
31
32
|
import "../../contexts/ToolbarComponentContext.js";
|
|
32
33
|
import "../getThumbnailViewport.js";
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
H as useThumbnail
|
|
35
36
|
};
|
|
@@ -4,7 +4,7 @@ import "../../contexts/ScrollModeContext.js";
|
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "../../contexts/RPDocumentContext.js";
|
|
6
6
|
import "../../contexts/DocumentPasswordContext.js";
|
|
7
|
-
import { s as
|
|
7
|
+
import { s as E } from "../../RPDefaultLayout-129bfdfc.js";
|
|
8
8
|
import "../../contexts/DarkModeContext.js";
|
|
9
9
|
import "../../contexts/RotationContext.js";
|
|
10
10
|
import "../../contexts/LayerContext.js";
|
|
@@ -24,11 +24,12 @@ import "../../contexts/HighlightContext.js";
|
|
|
24
24
|
import "../../contexts/LicenseContext.js";
|
|
25
25
|
import "../../contexts/DownloadContext.js";
|
|
26
26
|
import "../../contexts/SmoothScrollContext.js";
|
|
27
|
+
import "../../contexts/SinglePageRotateContext.js";
|
|
27
28
|
import "../../contexts/LoaderContext.js";
|
|
28
29
|
import "../../components/RPConfig.js";
|
|
29
30
|
import "../../contexts/ThemeContext.js";
|
|
30
31
|
import "../../components/RPDropFileZone.js";
|
|
31
32
|
import "../../contexts/ToolbarComponentContext.js";
|
|
32
33
|
export {
|
|
33
|
-
|
|
34
|
+
E as useVirtualReactWindow
|
|
34
35
|
};
|
|
@@ -67,7 +67,7 @@ const m = "data:image/webp;base64,UklGRrabAABXRUJQVlA4WAoAAAAQAAAAnwUA/wMAQUxQSP
|
|
|
67
67
|
line-height: 1.25;
|
|
68
68
|
color: rgba(140, 153, 166, 0.6);
|
|
69
69
|
pointer-events: none;
|
|
70
|
-
z-index: calc(var(--
|
|
70
|
+
z-index: calc(var(--rp-base-z-index, 1) * 5);
|
|
71
71
|
}
|
|
72
72
|
@media only screen and (min-width: 768px) {
|
|
73
73
|
.${r} {
|
package/dist/utils/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { e as r, z as _, i as R, p as o, t as p } from "../th_TH-
|
|
2
|
-
var D = /* @__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))(D || {}),
|
|
3
|
-
const
|
|
1
|
+
import { e as r, z as _, i as R, p as o, t as p } from "../th_TH-f515b3ad.js";
|
|
2
|
+
var D = /* @__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))(D || {}), E = /* @__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))(E || {}), L = /* @__PURE__ */ ((O) => (O.ACTUAL = "Actual", O.PAGE_FIT = "Fit", O.PAGE_WIDTH = "Width", O))(L || {}), N = /* @__PURE__ */ ((O) => (O.CLOCKWISE = "CLOCKWISE", O.COUNTER_CLOCKWISE = "COUNTER_CLOCKWISE", O))(N || {}), I = /* @__PURE__ */ ((O) => (O.Organization = "organization", O.Developer = "developer", O))(I || {}), d = /* @__PURE__ */ ((O) => (O.SINGLE_PAGE = "Single", O.DUAL_PAGE = "Dual", O))(d || {}), C = /* @__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.CHECKBOX_INDICATOR_COLOR = "--rp-checkbox-indicator-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.TOOLTIP_FONT_COLOR = "--rp-tooltip-font-color", O.TOOLTIP_FONT_SIZE = "--rp-tooltip-font-size", O.TOOLTIP_PADDING = "--rp-tooltip-padding", O.PASSWORD_MODAL_BACKGROUND_COLOR = "--rp-password-background-color", O.PASSWORD_MODAL_TITLE_FONT_COLOR = "--rp-password-title-font-color", O.PASSWORD_MODAL_CONTENT_FONT_COLOR = "--rp-password-content-font-color", O.PASSWORD_MODAL_INPUT_PLACEHOLDER_COLOR = "--rp-password-input-placeholder-color", O.PASSWORD_MODAL_INPUT_BORDER_COLOR = "--rp-password-input-border-color", O.PASSWORD_MODAL_INPUT_FONT_COLOR = "--rp-password-input-font-color", O.PASSWORD_MODAL_BUTTON_FONT_COLOR = "--rp-password-button-font-color", O.PASSWORD_MODAL_BUTTON_BACKGROUND_COLOR = "--rp-password-button-background-color", O.PASSWORD_MODAL_BUTTON_BORDER_COLOR = "--rp-password-button-border-color", O.PASSWORD_MODAL_BORDER_COLOR = "--rp-password-border-color", O.CONTAINER_FOCUS_OUTLINE_WIDTH = "--rp-container-focus-outline-width", O.CONTAINER_FOCUS_OUTLINE_COLOR = "--rp-container-focus-outline-color", O.CONTAINER_FOCUS_OUTLINE_OFFSET = "--rp-container-focus-outline-offset", O.BUTTON_BORDER_RADIUS = "--rp-button-border-radius", O))(C || {}), P = /* @__PURE__ */ ((O) => (O.PAGE_SCROLLING = "PAGE", O.VERTICAL_SCROLLING = "VERTICAL", O.HORIZONTAL_SCROLLING = "HORIZONTAL", O))(P || {}), c = /* @__PURE__ */ ((O) => (O.TEXT = "TEXT", O.HAND = "HAND", O))(c || {});
|
|
3
|
+
const t = {
|
|
4
4
|
en_US: r,
|
|
5
5
|
zh_CN: _,
|
|
6
6
|
it_IT: R,
|
|
@@ -9,12 +9,13 @@ const A = {
|
|
|
9
9
|
};
|
|
10
10
|
export {
|
|
11
11
|
D as AnnotationSubType,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
P as
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
E as AnnotationType,
|
|
13
|
+
I as LicenseType,
|
|
14
|
+
t as Locales,
|
|
15
|
+
N as RotateDirection,
|
|
16
|
+
P as ScrollMode,
|
|
17
|
+
c as SelectionMode,
|
|
18
|
+
C as ThemeVariables,
|
|
19
|
+
d as ViewMode,
|
|
19
20
|
L as ZoomLevel
|
|
20
21
|
};
|