@pdf-viewer/react 1.8.0-beta.3 → 1.8.0-beta.4
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/RPDefaultLayout-c962c0b0.js +3258 -0
- package/dist/components/RPController.js +14 -13
- package/dist/components/RPPages.js +4 -3
- package/dist/components/layout/LayoutContainer.js +4 -3
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +3 -4
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +4 -3
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +4 -3
- 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 -4
- package/dist/components/page/AnnotationLayer.js +4 -3
- package/dist/components/page/CanvasLayer.js +4 -3
- package/dist/components/page/CustomElement.js +22 -0
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +5 -3
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +4 -3
- package/dist/components/page/TextLayer.js +4 -3
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/contexts/DimensionPagesContext.js +26 -27
- package/dist/contexts/ElementPageContext.js +52 -0
- package/dist/contexts/PagesRotateContext.js +25 -0
- 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/main.js +19 -17
- package/dist/types/components/layout/sidebar/Thumbnail.d.ts +1 -1
- package/dist/types/components/page/CustomElement.d.ts +6 -0
- package/dist/types/contexts/ElementPageContext.d.ts +6 -0
- package/dist/types/contexts/{SinglePageRotateContext.d.ts → PagesRotateContext.d.ts} +6 -4
- package/dist/types/main.d.ts +1 -0
- package/dist/types/utils/types.d.ts +9 -0
- package/dist/utils/hooks/useFileDownload.js +4 -3
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePageRotateContext.js +19 -13
- package/dist/utils/hooks/usePaginate.js +4 -3
- package/dist/utils/hooks/usePresentPage.js +4 -3
- package/dist/utils/hooks/usePrint.js +4 -3
- package/dist/utils/hooks/useScrollToPage.js +4 -3
- package/dist/utils/hooks/useSearch.js +4 -3
- package/dist/utils/hooks/useThumbnail.js +4 -3
- package/dist/utils/hooks/useVirtualReactWindow.js +4 -3
- package/package.json +1 -1
- package/dist/RPDefaultLayout-129bfdfc.js +0 -3262
- package/dist/contexts/SinglePageRotateContext.js +0 -21
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as s, useContext as r, useState as i, useEffect as P } from "react";
|
|
3
|
-
import { useDocumentContext as l } from "./RPDocumentContext.js";
|
|
4
|
-
const a = s({
|
|
5
|
-
singlePageRotate: {},
|
|
6
|
-
setSinglePageRotate: () => {
|
|
7
|
-
}
|
|
8
|
-
}), m = () => {
|
|
9
|
-
const { singlePageRotate: e, setSinglePageRotate: t } = r(a);
|
|
10
|
-
return { singlePageRotate: e, setSinglePageRotate: t };
|
|
11
|
-
}, x = ({ children: e }) => {
|
|
12
|
-
const [t, o] = i({}), { pages: n } = l();
|
|
13
|
-
return P(() => {
|
|
14
|
-
n && o({});
|
|
15
|
-
}, [n]), /* @__PURE__ */ g(a.Provider, { value: { singlePageRotate: t, setSinglePageRotate: o }, children: e });
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
a as SinglePageRotateContext,
|
|
19
|
-
x as SinglePageRotateProvider,
|
|
20
|
-
m as useSinglePageRotateContext
|
|
21
|
-
};
|