@embedpdf/plugin-scroll 1.0.10 → 1.0.12
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/index.cjs +2 -651
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -200
- package/dist/index.js +43 -67
- package/dist/index.js.map +1 -1
- package/dist/lib/actions.d.ts +27 -0
- package/dist/lib/index.d.ts +9 -0
- package/dist/lib/manifest.d.ts +4 -0
- package/dist/lib/reducer.d.ts +6 -0
- package/dist/lib/scroll-plugin.d.ts +45 -0
- package/dist/lib/selectors.d.ts +2 -0
- package/dist/lib/strategies/base-strategy.d.ts +35 -0
- package/dist/lib/strategies/horizontal-strategy.d.ts +14 -0
- package/dist/lib/strategies/vertical-strategy.d.ts +14 -0
- package/dist/lib/types/virtual-item.d.ts +21 -0
- package/dist/lib/types.d.ts +112 -0
- package/dist/preact/adapter.d.ts +4 -0
- package/dist/preact/core.d.ts +1 -0
- package/dist/preact/index.cjs +2 -176
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.d.ts +1 -53
- package/dist/preact/index.js +17 -17
- package/dist/preact/index.js.map +1 -1
- package/dist/react/adapter.d.ts +2 -0
- package/dist/react/core.d.ts +1 -0
- package/dist/react/index.cjs +2 -176
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.ts +1 -52
- package/dist/react/index.js +16 -17
- package/dist/react/index.js.map +1 -1
- package/dist/shared-preact/components/index.d.ts +1 -0
- package/dist/shared-preact/components/scroller.d.ts +14 -0
- package/dist/shared-preact/hooks/index.d.ts +1 -0
- package/dist/shared-preact/hooks/use-scroll.d.ts +32 -0
- package/dist/shared-preact/index.d.ts +2 -0
- package/dist/shared-react/components/index.d.ts +1 -0
- package/dist/shared-react/components/scroller.d.ts +14 -0
- package/dist/shared-react/hooks/index.d.ts +1 -0
- package/dist/shared-react/hooks/use-scroll.d.ts +32 -0
- package/dist/shared-react/index.d.ts +2 -0
- package/dist/vue/components/index.d.ts +1 -0
- package/dist/vue/components/scroller.vue.d.ts +28 -0
- package/dist/vue/hooks/index.d.ts +1 -0
- package/dist/vue/hooks/use-scroll.d.ts +11 -0
- package/dist/vue/index.cjs +2 -0
- package/dist/vue/index.cjs.map +1 -0
- package/dist/vue/index.d.ts +2 -0
- package/dist/vue/index.js +136 -0
- package/dist/vue/index.js.map +1 -0
- package/package.json +22 -13
- package/dist/index.d.cts +0 -200
- package/dist/preact/index.d.cts +0 -53
- package/dist/react/index.d.cts +0 -52
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface PageLayout {
|
|
2
|
+
pageNumber: number;
|
|
3
|
+
pageIndex: number;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
rotatedWidth: number;
|
|
9
|
+
rotatedHeight: number;
|
|
10
|
+
}
|
|
11
|
+
export interface VirtualItem {
|
|
12
|
+
id: string;
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
offset: number;
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
pageLayouts: PageLayout[];
|
|
19
|
+
pageNumbers: number[];
|
|
20
|
+
index: number;
|
|
21
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { BasePluginConfig, EventHook } from '@embedpdf/core';
|
|
2
|
+
import { PdfPageObject, Rect, Rotation } from '@embedpdf/models';
|
|
3
|
+
import { ViewportMetrics } from '@embedpdf/plugin-viewport';
|
|
4
|
+
import { VirtualItem } from './types/virtual-item';
|
|
5
|
+
export interface ScrollState extends ScrollMetrics {
|
|
6
|
+
virtualItems: VirtualItem[];
|
|
7
|
+
totalPages: number;
|
|
8
|
+
totalContentSize: {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
desiredScrollPosition: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
};
|
|
16
|
+
strategy: ScrollStrategy;
|
|
17
|
+
pageGap: number;
|
|
18
|
+
scale: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ScrollerLayout {
|
|
21
|
+
startSpacing: number;
|
|
22
|
+
endSpacing: number;
|
|
23
|
+
totalWidth: number;
|
|
24
|
+
totalHeight: number;
|
|
25
|
+
pageGap: number;
|
|
26
|
+
strategy: ScrollState['strategy'];
|
|
27
|
+
items: VirtualItem[];
|
|
28
|
+
}
|
|
29
|
+
export declare enum ScrollStrategy {
|
|
30
|
+
Vertical = "vertical",
|
|
31
|
+
Horizontal = "horizontal"
|
|
32
|
+
}
|
|
33
|
+
export interface PageVisibilityMetrics {
|
|
34
|
+
pageNumber: number;
|
|
35
|
+
viewportX: number;
|
|
36
|
+
viewportY: number;
|
|
37
|
+
visiblePercentage: number;
|
|
38
|
+
original: {
|
|
39
|
+
pageX: number;
|
|
40
|
+
pageY: number;
|
|
41
|
+
visibleWidth: number;
|
|
42
|
+
visibleHeight: number;
|
|
43
|
+
scale: number;
|
|
44
|
+
};
|
|
45
|
+
scaled: {
|
|
46
|
+
pageX: number;
|
|
47
|
+
pageY: number;
|
|
48
|
+
visibleWidth: number;
|
|
49
|
+
visibleHeight: number;
|
|
50
|
+
scale: number;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export interface ScrollMetrics {
|
|
54
|
+
currentPage: number;
|
|
55
|
+
visiblePages: number[];
|
|
56
|
+
pageVisibilityMetrics: PageVisibilityMetrics[];
|
|
57
|
+
renderedPageIndexes: number[];
|
|
58
|
+
scrollOffset: {
|
|
59
|
+
x: number;
|
|
60
|
+
y: number;
|
|
61
|
+
};
|
|
62
|
+
startSpacing: number;
|
|
63
|
+
endSpacing: number;
|
|
64
|
+
}
|
|
65
|
+
export interface ScrollStrategyInterface {
|
|
66
|
+
initialize(container: HTMLElement, innerDiv: HTMLElement): void;
|
|
67
|
+
destroy(): void;
|
|
68
|
+
updateLayout(viewport: ViewportMetrics, pdfPageObject: PdfPageObject[][]): void;
|
|
69
|
+
handleScroll(viewport: ViewportMetrics): void;
|
|
70
|
+
getVirtualItems(): VirtualItem[];
|
|
71
|
+
scrollToPage(pageNumber: number, behavior?: ScrollBehavior): void;
|
|
72
|
+
calculateDimensions(pdfPageObject: PdfPageObject[][]): void;
|
|
73
|
+
}
|
|
74
|
+
export interface ScrollPluginConfig extends BasePluginConfig {
|
|
75
|
+
strategy?: ScrollStrategy;
|
|
76
|
+
initialPage?: number;
|
|
77
|
+
bufferSize?: number;
|
|
78
|
+
pageGap?: number;
|
|
79
|
+
}
|
|
80
|
+
export type LayoutChangePayload = Pick<ScrollState, 'virtualItems' | 'totalContentSize'>;
|
|
81
|
+
export interface ScrollToPageOptions {
|
|
82
|
+
pageNumber: number;
|
|
83
|
+
pageCoordinates?: {
|
|
84
|
+
x: number;
|
|
85
|
+
y: number;
|
|
86
|
+
};
|
|
87
|
+
behavior?: ScrollBehavior;
|
|
88
|
+
center?: boolean;
|
|
89
|
+
}
|
|
90
|
+
export interface PageChangePayload {
|
|
91
|
+
pageNumber: number;
|
|
92
|
+
totalPages: number;
|
|
93
|
+
}
|
|
94
|
+
export interface ScrollCapability {
|
|
95
|
+
onScrollerData: EventHook<ScrollerLayout>;
|
|
96
|
+
onStateChange: EventHook<ScrollState>;
|
|
97
|
+
onScroll: EventHook<ScrollMetrics>;
|
|
98
|
+
getCurrentPage(): number;
|
|
99
|
+
getTotalPages(): number;
|
|
100
|
+
onPageChange: EventHook<PageChangePayload>;
|
|
101
|
+
onLayoutChange: EventHook<LayoutChangePayload>;
|
|
102
|
+
onLayoutReady: EventHook<boolean>;
|
|
103
|
+
scrollToPage(options: ScrollToPageOptions): void;
|
|
104
|
+
scrollToNextPage(behavior?: ScrollBehavior): void;
|
|
105
|
+
scrollToPreviousPage(behavior?: ScrollBehavior): void;
|
|
106
|
+
getMetrics(viewport?: ViewportMetrics): ScrollMetrics;
|
|
107
|
+
getLayout(): LayoutChangePayload;
|
|
108
|
+
getScrollerLayout(): ScrollerLayout;
|
|
109
|
+
getRectPositionForPage(page: number, rect: Rect, scale?: number, rotation?: Rotation): Rect | null;
|
|
110
|
+
setScrollStrategy(strategy: ScrollStrategy): void;
|
|
111
|
+
getPageGap(): number;
|
|
112
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@embedpdf/core/preact';
|
package/dist/preact/index.cjs
CHANGED
|
@@ -1,176 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/preact/index.ts
|
|
21
|
-
var preact_exports = {};
|
|
22
|
-
__export(preact_exports, {
|
|
23
|
-
Scroller: () => Scroller,
|
|
24
|
-
useScroll: () => useScroll,
|
|
25
|
-
useScrollCapability: () => useScrollCapability,
|
|
26
|
-
useScrollPlugin: () => useScrollPlugin
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(preact_exports);
|
|
29
|
-
|
|
30
|
-
// src/preact/hooks/use-scroll.ts
|
|
31
|
-
var import_preact = require("@embedpdf/core/preact");
|
|
32
|
-
var import_plugin_scroll = require("@embedpdf/plugin-scroll");
|
|
33
|
-
var import_hooks = require("preact/hooks");
|
|
34
|
-
var useScrollPlugin = () => (0, import_preact.usePlugin)(import_plugin_scroll.ScrollPlugin.id);
|
|
35
|
-
var useScrollCapability = () => (0, import_preact.useCapability)(import_plugin_scroll.ScrollPlugin.id);
|
|
36
|
-
var useScroll = () => {
|
|
37
|
-
const { provides: scroll } = useScrollCapability();
|
|
38
|
-
const [currentPage, setCurrentPage] = (0, import_hooks.useState)(1);
|
|
39
|
-
const [totalPages, setTotalPages] = (0, import_hooks.useState)(1);
|
|
40
|
-
(0, import_hooks.useEffect)(() => {
|
|
41
|
-
if (!scroll) return;
|
|
42
|
-
return scroll.onPageChange(({ pageNumber, totalPages: totalPages2 }) => {
|
|
43
|
-
setCurrentPage(pageNumber);
|
|
44
|
-
setTotalPages(totalPages2);
|
|
45
|
-
});
|
|
46
|
-
}, [scroll]);
|
|
47
|
-
return {
|
|
48
|
-
...scroll,
|
|
49
|
-
currentPage,
|
|
50
|
-
totalPages
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
// src/preact/components/scroller.tsx
|
|
55
|
-
var import_hooks2 = require("preact/hooks");
|
|
56
|
-
var import_plugin_scroll2 = require("@embedpdf/plugin-scroll");
|
|
57
|
-
var import_preact2 = require("@embedpdf/core/preact");
|
|
58
|
-
var import_jsx_runtime = require("preact/jsx-runtime");
|
|
59
|
-
function Scroller({ renderPage, overlayElements, ...props }) {
|
|
60
|
-
const { provides: scrollProvides } = useScrollCapability();
|
|
61
|
-
const { registry } = (0, import_preact2.useRegistry)();
|
|
62
|
-
const [scrollerLayout, setScrollerLayout] = (0, import_hooks2.useState)(
|
|
63
|
-
() => scrollProvides?.getScrollerLayout() ?? null
|
|
64
|
-
);
|
|
65
|
-
(0, import_hooks2.useEffect)(() => {
|
|
66
|
-
if (!scrollProvides) return;
|
|
67
|
-
return scrollProvides.onScrollerData(setScrollerLayout);
|
|
68
|
-
}, [scrollProvides]);
|
|
69
|
-
if (!scrollerLayout) return null;
|
|
70
|
-
if (!registry) return null;
|
|
71
|
-
const coreState = registry.getStore().getState();
|
|
72
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
73
|
-
"div",
|
|
74
|
-
{
|
|
75
|
-
...props,
|
|
76
|
-
style: {
|
|
77
|
-
width: `${scrollerLayout.totalWidth}px`,
|
|
78
|
-
height: `${scrollerLayout.totalHeight}px`,
|
|
79
|
-
position: "relative",
|
|
80
|
-
boxSizing: "border-box",
|
|
81
|
-
margin: "0 auto",
|
|
82
|
-
...scrollerLayout.strategy === import_plugin_scroll2.ScrollStrategy.Horizontal && {
|
|
83
|
-
display: "flex",
|
|
84
|
-
flexDirection: "row"
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
children: [
|
|
88
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
89
|
-
"div",
|
|
90
|
-
{
|
|
91
|
-
style: {
|
|
92
|
-
...scrollerLayout.strategy === import_plugin_scroll2.ScrollStrategy.Horizontal ? {
|
|
93
|
-
width: scrollerLayout.startSpacing,
|
|
94
|
-
height: "100%",
|
|
95
|
-
flexShrink: 0
|
|
96
|
-
} : {
|
|
97
|
-
height: scrollerLayout.startSpacing,
|
|
98
|
-
width: "100%"
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
),
|
|
103
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
104
|
-
"div",
|
|
105
|
-
{
|
|
106
|
-
style: {
|
|
107
|
-
gap: scrollerLayout.pageGap,
|
|
108
|
-
display: "flex",
|
|
109
|
-
alignItems: "center",
|
|
110
|
-
position: "relative",
|
|
111
|
-
boxSizing: "border-box",
|
|
112
|
-
...scrollerLayout.strategy === import_plugin_scroll2.ScrollStrategy.Horizontal ? {
|
|
113
|
-
flexDirection: "row",
|
|
114
|
-
minHeight: "100%"
|
|
115
|
-
} : {
|
|
116
|
-
flexDirection: "column",
|
|
117
|
-
minWidth: "fit-content"
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
children: scrollerLayout.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
121
|
-
"div",
|
|
122
|
-
{
|
|
123
|
-
style: {
|
|
124
|
-
display: "flex",
|
|
125
|
-
justifyContent: "center",
|
|
126
|
-
gap: scrollerLayout.pageGap
|
|
127
|
-
},
|
|
128
|
-
children: item.pageLayouts.map((layout) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
129
|
-
"div",
|
|
130
|
-
{
|
|
131
|
-
style: {
|
|
132
|
-
width: `${layout.rotatedWidth}px`,
|
|
133
|
-
height: `${layout.rotatedHeight}px`
|
|
134
|
-
},
|
|
135
|
-
children: renderPage({
|
|
136
|
-
...layout,
|
|
137
|
-
rotation: coreState.core.rotation,
|
|
138
|
-
scale: coreState.core.scale,
|
|
139
|
-
document: coreState.core.document
|
|
140
|
-
})
|
|
141
|
-
},
|
|
142
|
-
layout.pageNumber
|
|
143
|
-
))
|
|
144
|
-
},
|
|
145
|
-
item.pageNumbers[0]
|
|
146
|
-
))
|
|
147
|
-
}
|
|
148
|
-
),
|
|
149
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
150
|
-
"div",
|
|
151
|
-
{
|
|
152
|
-
style: {
|
|
153
|
-
...scrollerLayout.strategy === import_plugin_scroll2.ScrollStrategy.Horizontal ? {
|
|
154
|
-
width: scrollerLayout.endSpacing,
|
|
155
|
-
height: "100%",
|
|
156
|
-
flexShrink: 0
|
|
157
|
-
} : {
|
|
158
|
-
height: scrollerLayout.endSpacing,
|
|
159
|
-
width: "100%"
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
),
|
|
164
|
-
overlayElements
|
|
165
|
-
]
|
|
166
|
-
}
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
170
|
-
0 && (module.exports = {
|
|
171
|
-
Scroller,
|
|
172
|
-
useScroll,
|
|
173
|
-
useScrollCapability,
|
|
174
|
-
useScrollPlugin
|
|
175
|
-
});
|
|
176
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core/preact"),t=require("@embedpdf/plugin-scroll");require("preact");const r=require("preact/hooks"),i=require("preact/jsx-runtime"),o=()=>e.usePlugin(t.ScrollPlugin.id),l=()=>e.useCapability(t.ScrollPlugin.id);exports.Scroller=function({renderPage:a,overlayElements:n,...s}){const{provides:c}=l(),{plugin:g}=o(),{registry:u}=e.useRegistry(),[d,p]=r.useState((()=>(null==c?void 0:c.getScrollerLayout())??null));if(r.useEffect((()=>{if(c)return c.onScrollerData(p)}),[c]),r.useEffect((()=>{g&&g.setLayoutReady()}),[g]),!d)return null;if(!u)return null;const h=u.getStore().getState();return i.jsxs("div",{...s,style:{width:`${d.totalWidth}px`,height:`${d.totalHeight}px`,position:"relative",boxSizing:"border-box",margin:"0 auto",...d.strategy===t.ScrollStrategy.Horizontal&&{display:"flex",flexDirection:"row"}},children:[i.jsx("div",{style:{...d.strategy===t.ScrollStrategy.Horizontal?{width:d.startSpacing,height:"100%",flexShrink:0}:{height:d.startSpacing,width:"100%"}}}),i.jsx("div",{style:{gap:d.pageGap,display:"flex",alignItems:"center",position:"relative",boxSizing:"border-box",...d.strategy===t.ScrollStrategy.Horizontal?{flexDirection:"row",minHeight:"100%"}:{flexDirection:"column",minWidth:"fit-content"}},children:d.items.map((e=>i.jsx("div",{style:{display:"flex",justifyContent:"center",gap:d.pageGap},children:e.pageLayouts.map((e=>i.jsx("div",{style:{width:`${e.rotatedWidth}px`,height:`${e.rotatedHeight}px`},children:a({...e,rotation:h.core.rotation,scale:h.core.scale,document:h.core.document})},e.pageNumber)))},e.pageNumbers[0])))}),i.jsx("div",{style:{...d.strategy===t.ScrollStrategy.Horizontal?{width:d.endSpacing,height:"100%",flexShrink:0}:{height:d.endSpacing,width:"100%"}}}),n]})},exports.useScroll=()=>{const{provides:e}=l(),[t,i]=r.useState(1),[o,a]=r.useState(1);return r.useEffect((()=>{if(e)return e.onPageChange((({pageNumber:e,totalPages:t})=>{i(e),a(t)}))}),[e]),{...e,currentPage:t,totalPages:o}},exports.useScrollCapability=l,exports.useScrollPlugin=o;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/shared/hooks/use-scroll.ts","../../src/shared/components/scroller.tsx"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/@framework';\nimport { ScrollPlugin } from '@embedpdf/plugin-scroll';\nimport { useEffect, useState } from '@framework';\n\nexport const useScrollPlugin = () => usePlugin<ScrollPlugin>(ScrollPlugin.id);\nexport const useScrollCapability = () => useCapability<ScrollPlugin>(ScrollPlugin.id);\n\nexport const useScroll = () => {\n const { provides: scroll } = useScrollCapability();\n const [currentPage, setCurrentPage] = useState(1);\n const [totalPages, setTotalPages] = useState(1);\n\n useEffect(() => {\n if (!scroll) return;\n return scroll.onPageChange(({ pageNumber, totalPages }) => {\n setCurrentPage(pageNumber);\n setTotalPages(totalPages);\n });\n }, [scroll]);\n\n return {\n ...scroll,\n currentPage,\n totalPages,\n };\n};\n","import { ReactNode, useEffect, useState, HTMLAttributes } from '@framework';\nimport { ScrollStrategy, ScrollerLayout, PageLayout } from '@embedpdf/plugin-scroll';\nimport { useRegistry } from '@embedpdf/core/@framework';\nimport { PdfDocumentObject, Rotation } from '@embedpdf/models';\n\nimport { useScrollCapability, useScrollPlugin } from '../hooks';\n\ninterface RenderPageProps extends PageLayout {\n rotation: Rotation;\n scale: number;\n document: PdfDocumentObject | null;\n}\n\ntype ScrollerProps = HTMLAttributes<HTMLDivElement> & {\n renderPage: (props: RenderPageProps) => ReactNode;\n overlayElements?: ReactNode[];\n};\n\nexport function Scroller({ renderPage, overlayElements, ...props }: ScrollerProps) {\n const { provides: scrollProvides } = useScrollCapability();\n const { plugin: scrollPlugin } = useScrollPlugin();\n const { registry } = useRegistry();\n const [scrollerLayout, setScrollerLayout] = useState<ScrollerLayout | null>(\n () => scrollProvides?.getScrollerLayout() ?? null,\n );\n\n useEffect(() => {\n if (!scrollProvides) return;\n\n return scrollProvides.onScrollerData(setScrollerLayout);\n }, [scrollProvides]);\n\n useEffect(() => {\n if (!scrollPlugin) return;\n\n scrollPlugin.setLayoutReady();\n }, [scrollPlugin]);\n\n if (!scrollerLayout) return null;\n if (!registry) return null;\n\n const coreState = registry.getStore().getState();\n\n return (\n <div\n {...props}\n style={{\n width: `${scrollerLayout.totalWidth}px`,\n height: `${scrollerLayout.totalHeight}px`,\n position: 'relative',\n boxSizing: 'border-box',\n margin: '0 auto',\n ...(scrollerLayout.strategy === ScrollStrategy.Horizontal && {\n display: 'flex',\n flexDirection: 'row',\n }),\n }}\n >\n <div\n style={{\n ...(scrollerLayout.strategy === ScrollStrategy.Horizontal\n ? {\n width: scrollerLayout.startSpacing,\n height: '100%',\n flexShrink: 0,\n }\n : {\n height: scrollerLayout.startSpacing,\n width: '100%',\n }),\n }}\n />\n <div\n style={{\n gap: scrollerLayout.pageGap,\n display: 'flex',\n alignItems: 'center',\n position: 'relative',\n boxSizing: 'border-box',\n ...(scrollerLayout.strategy === ScrollStrategy.Horizontal\n ? {\n flexDirection: 'row',\n minHeight: '100%',\n }\n : {\n flexDirection: 'column',\n minWidth: 'fit-content',\n }),\n }}\n >\n {scrollerLayout.items.map((item) => (\n <div\n key={item.pageNumbers[0]}\n style={{\n display: 'flex',\n justifyContent: 'center',\n gap: scrollerLayout.pageGap,\n }}\n >\n {item.pageLayouts.map((layout) => (\n <div\n key={layout.pageNumber}\n style={{\n width: `${layout.rotatedWidth}px`,\n height: `${layout.rotatedHeight}px`,\n }}\n >\n {renderPage({\n ...layout,\n rotation: coreState.core.rotation,\n scale: coreState.core.scale,\n document: coreState.core.document,\n })}\n </div>\n ))}\n </div>\n ))}\n </div>\n <div\n style={{\n ...(scrollerLayout.strategy === ScrollStrategy.Horizontal\n ? {\n width: scrollerLayout.endSpacing,\n height: '100%',\n flexShrink: 0,\n }\n : {\n height: scrollerLayout.endSpacing,\n width: '100%',\n }),\n }}\n />\n {overlayElements}\n </div>\n );\n}\n"],"names":["useScrollPlugin","usePlugin","ScrollPlugin","id","useScrollCapability","useCapability","renderPage","overlayElements","props","provides","scrollProvides","plugin","scrollPlugin","registry","useRegistry","scrollerLayout","setScrollerLayout","useState","getScrollerLayout","useEffect","onScrollerData","setLayoutReady","coreState","getStore","getState","jsxRuntime","jsxs","style","width","totalWidth","height","totalHeight","position","boxSizing","margin","strategy","ScrollStrategy","Horizontal","display","flexDirection","children","jsx","startSpacing","flexShrink","gap","pageGap","alignItems","minHeight","minWidth","items","map","item","justifyContent","pageLayouts","layout","rotatedWidth","rotatedHeight","rotation","core","scale","document","pageNumber","pageNumbers","endSpacing","scroll","currentPage","setCurrentPage","totalPages","setTotalPages","onPageChange"],"mappings":"gPAIaA,EAAkB,IAAMC,YAAwBC,EAAAA,aAAaC,IAC7DC,EAAsB,IAAMC,gBAA4BH,EAAAA,aAAaC,qBCa3E,UAAkBG,WAAEA,EAAAC,gBAAYA,KAAoBC,IACzD,MAAQC,SAAUC,GAAmBN,KAC7BO,OAAQC,GAAiBZ,KAC3Ba,SAAEA,GAAaC,iBACdC,EAAgBC,GAAqBC,EAAAA,UAC1C,WAAMP,WAAgBQ,sBAAuB,OAe3C,GAZJC,EAAAA,WAAU,KACR,GAAKT,EAEE,OAAAA,EAAeU,eAAeJ,EAAiB,GACrD,CAACN,IAEJS,EAAAA,WAAU,KACHP,GAELA,EAAaS,gBAAe,GAC3B,CAACT,KAECG,EAAuB,OAAA,KACxB,IAACF,EAAiB,OAAA,KAEtB,MAAMS,EAAYT,EAASU,WAAWC,WAGpC,OAAAC,EAAAC,KAAC,MAAA,IACK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D,GAAW5D,KACtB6D,EAAaC,GAAkBjD,EAAAA,SAAS,IACxCkD,EAAYC,GAAiBnD,EAAAA,SAAS,GAUtC,OARPE,EAAAA,WAAU,KACR,GAAK6C,EACL,OAAOA,EAAOK,cAAa,EAAGR,aAAYM,WAAAA,MACxCD,EAAeL,GACfO,EAAcD,EAAU,GACzB,GACA,CAACH,IAEG,IACFA,EACHC,cACAE,aACF"}
|
package/dist/preact/index.d.ts
CHANGED
|
@@ -1,53 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { Rotation, PdfDocumentObject } from '@embedpdf/models';
|
|
3
|
-
import * as _embedpdf_plugin_viewport from '@embedpdf/plugin-viewport';
|
|
4
|
-
import * as _embedpdf_core from '@embedpdf/core';
|
|
5
|
-
import * as _embedpdf_plugin_scroll from '@embedpdf/plugin-scroll';
|
|
6
|
-
import { ScrollPlugin, PageLayout } from '@embedpdf/plugin-scroll';
|
|
7
|
-
import { JSX } from 'preact';
|
|
8
|
-
|
|
9
|
-
declare const useScrollPlugin: () => {
|
|
10
|
-
plugin: ScrollPlugin | null;
|
|
11
|
-
isLoading: boolean;
|
|
12
|
-
ready: Promise<void>;
|
|
13
|
-
};
|
|
14
|
-
declare const useScrollCapability: () => {
|
|
15
|
-
provides: Readonly<_embedpdf_plugin_scroll.ScrollCapability> | null;
|
|
16
|
-
isLoading: boolean;
|
|
17
|
-
ready: Promise<void>;
|
|
18
|
-
};
|
|
19
|
-
declare const useScroll: () => {
|
|
20
|
-
currentPage: number;
|
|
21
|
-
totalPages: number;
|
|
22
|
-
onScrollerData?: _embedpdf_core.EventHook<_embedpdf_plugin_scroll.ScrollerLayout> | undefined;
|
|
23
|
-
onStateChange?: _embedpdf_core.EventHook<_embedpdf_plugin_scroll.ScrollState> | undefined;
|
|
24
|
-
onScroll?: _embedpdf_core.EventHook<_embedpdf_plugin_scroll.ScrollMetrics> | undefined;
|
|
25
|
-
getCurrentPage?: (() => number) | undefined;
|
|
26
|
-
getTotalPages?: (() => number) | undefined;
|
|
27
|
-
onPageChange?: _embedpdf_core.EventHook<_embedpdf_plugin_scroll.PageChangePayload> | undefined;
|
|
28
|
-
onLayoutChange?: _embedpdf_core.EventHook<_embedpdf_plugin_scroll.LayoutChangePayload> | undefined;
|
|
29
|
-
scrollToPage?: ((options: _embedpdf_plugin_scroll.ScrollToPageOptions) => void) | undefined;
|
|
30
|
-
scrollToNextPage?: ((behavior?: ScrollBehavior) => void) | undefined;
|
|
31
|
-
scrollToPreviousPage?: ((behavior?: ScrollBehavior) => void) | undefined;
|
|
32
|
-
getMetrics?: ((viewport?: _embedpdf_plugin_viewport.ViewportMetrics) => _embedpdf_plugin_scroll.ScrollMetrics) | undefined;
|
|
33
|
-
getLayout?: (() => _embedpdf_plugin_scroll.LayoutChangePayload) | undefined;
|
|
34
|
-
getScrollerLayout?: (() => _embedpdf_plugin_scroll.ScrollerLayout) | undefined;
|
|
35
|
-
getRectPositionForPage?: ((page: number, rect: _embedpdf_models.Rect, scale?: number, rotation?: _embedpdf_models.Rotation) => _embedpdf_models.Rect | null) | undefined;
|
|
36
|
-
setScrollStrategy?: ((strategy: _embedpdf_plugin_scroll.ScrollStrategy) => void) | undefined;
|
|
37
|
-
getPageGap?: (() => number) | undefined;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
/** @jsxImportSource preact */
|
|
41
|
-
|
|
42
|
-
interface RenderPageProps extends PageLayout {
|
|
43
|
-
rotation: Rotation;
|
|
44
|
-
scale: number;
|
|
45
|
-
document: PdfDocumentObject | null;
|
|
46
|
-
}
|
|
47
|
-
type ScrollerProps = JSX.HTMLAttributes<HTMLDivElement> & {
|
|
48
|
-
renderPage: (props: RenderPageProps) => JSX.Element;
|
|
49
|
-
overlayElements?: JSX.Element[];
|
|
50
|
-
};
|
|
51
|
-
declare function Scroller({ renderPage, overlayElements, ...props }: ScrollerProps): JSX.Element | null;
|
|
52
|
-
|
|
53
|
-
export { Scroller, useScroll, useScrollCapability, useScrollPlugin };
|
|
1
|
+
export * from '../shared-preact';
|
package/dist/preact/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { usePlugin, useCapability, useRegistry } from "@embedpdf/core/preact";
|
|
2
|
+
import { ScrollPlugin, ScrollStrategy } from "@embedpdf/plugin-scroll";
|
|
3
|
+
import "preact";
|
|
4
|
+
import { useState, useEffect } from "preact/hooks";
|
|
5
|
+
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
6
|
+
const useScrollPlugin = () => usePlugin(ScrollPlugin.id);
|
|
7
|
+
const useScrollCapability = () => useCapability(ScrollPlugin.id);
|
|
8
|
+
const useScroll = () => {
|
|
8
9
|
const { provides: scroll } = useScrollCapability();
|
|
9
10
|
const [currentPage, setCurrentPage] = useState(1);
|
|
10
11
|
const [totalPages, setTotalPages] = useState(1);
|
|
@@ -21,22 +22,21 @@ var useScroll = () => {
|
|
|
21
22
|
totalPages
|
|
22
23
|
};
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
-
// src/preact/components/scroller.tsx
|
|
26
|
-
import { useEffect as useEffect2, useState as useState2 } from "preact/hooks";
|
|
27
|
-
import { ScrollStrategy } from "@embedpdf/plugin-scroll";
|
|
28
|
-
import { useRegistry } from "@embedpdf/core/preact";
|
|
29
|
-
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
30
25
|
function Scroller({ renderPage, overlayElements, ...props }) {
|
|
31
26
|
const { provides: scrollProvides } = useScrollCapability();
|
|
27
|
+
const { plugin: scrollPlugin } = useScrollPlugin();
|
|
32
28
|
const { registry } = useRegistry();
|
|
33
|
-
const [scrollerLayout, setScrollerLayout] =
|
|
34
|
-
() => scrollProvides
|
|
29
|
+
const [scrollerLayout, setScrollerLayout] = useState(
|
|
30
|
+
() => (scrollProvides == null ? void 0 : scrollProvides.getScrollerLayout()) ?? null
|
|
35
31
|
);
|
|
36
|
-
|
|
32
|
+
useEffect(() => {
|
|
37
33
|
if (!scrollProvides) return;
|
|
38
34
|
return scrollProvides.onScrollerData(setScrollerLayout);
|
|
39
35
|
}, [scrollProvides]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (!scrollPlugin) return;
|
|
38
|
+
scrollPlugin.setLayoutReady();
|
|
39
|
+
}, [scrollPlugin]);
|
|
40
40
|
if (!scrollerLayout) return null;
|
|
41
41
|
if (!registry) return null;
|
|
42
42
|
const coreState = registry.getStore().getState();
|
|
@@ -143,4 +143,4 @@ export {
|
|
|
143
143
|
useScrollCapability,
|
|
144
144
|
useScrollPlugin
|
|
145
145
|
};
|
|
146
|
-
//# sourceMappingURL=index.js.map
|
|
146
|
+
//# sourceMappingURL=index.js.map
|
package/dist/preact/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/shared/hooks/use-scroll.ts","../../src/shared/components/scroller.tsx"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/@framework';\nimport { ScrollPlugin } from '@embedpdf/plugin-scroll';\nimport { useEffect, useState } from '@framework';\n\nexport const useScrollPlugin = () => usePlugin<ScrollPlugin>(ScrollPlugin.id);\nexport const useScrollCapability = () => useCapability<ScrollPlugin>(ScrollPlugin.id);\n\nexport const useScroll = () => {\n const { provides: scroll } = useScrollCapability();\n const [currentPage, setCurrentPage] = useState(1);\n const [totalPages, setTotalPages] = useState(1);\n\n useEffect(() => {\n if (!scroll) return;\n return scroll.onPageChange(({ pageNumber, totalPages }) => {\n setCurrentPage(pageNumber);\n setTotalPages(totalPages);\n });\n }, [scroll]);\n\n return {\n ...scroll,\n currentPage,\n totalPages,\n };\n};\n","import { ReactNode, useEffect, useState, HTMLAttributes } from '@framework';\nimport { ScrollStrategy, ScrollerLayout, PageLayout } from '@embedpdf/plugin-scroll';\nimport { useRegistry } from '@embedpdf/core/@framework';\nimport { PdfDocumentObject, Rotation } from '@embedpdf/models';\n\nimport { useScrollCapability, useScrollPlugin } from '../hooks';\n\ninterface RenderPageProps extends PageLayout {\n rotation: Rotation;\n scale: number;\n document: PdfDocumentObject | null;\n}\n\ntype ScrollerProps = HTMLAttributes<HTMLDivElement> & {\n renderPage: (props: RenderPageProps) => ReactNode;\n overlayElements?: ReactNode[];\n};\n\nexport function Scroller({ renderPage, overlayElements, ...props }: ScrollerProps) {\n const { provides: scrollProvides } = useScrollCapability();\n const { plugin: scrollPlugin } = useScrollPlugin();\n const { registry } = useRegistry();\n const [scrollerLayout, setScrollerLayout] = useState<ScrollerLayout | null>(\n () => scrollProvides?.getScrollerLayout() ?? null,\n );\n\n useEffect(() => {\n if (!scrollProvides) return;\n\n return scrollProvides.onScrollerData(setScrollerLayout);\n }, [scrollProvides]);\n\n useEffect(() => {\n if (!scrollPlugin) return;\n\n scrollPlugin.setLayoutReady();\n }, [scrollPlugin]);\n\n if (!scrollerLayout) return null;\n if (!registry) return null;\n\n const coreState = registry.getStore().getState();\n\n return (\n <div\n {...props}\n style={{\n width: `${scrollerLayout.totalWidth}px`,\n height: `${scrollerLayout.totalHeight}px`,\n position: 'relative',\n boxSizing: 'border-box',\n margin: '0 auto',\n ...(scrollerLayout.strategy === ScrollStrategy.Horizontal && {\n display: 'flex',\n flexDirection: 'row',\n }),\n }}\n >\n <div\n style={{\n ...(scrollerLayout.strategy === ScrollStrategy.Horizontal\n ? {\n width: scrollerLayout.startSpacing,\n height: '100%',\n flexShrink: 0,\n }\n : {\n height: scrollerLayout.startSpacing,\n width: '100%',\n }),\n }}\n />\n <div\n style={{\n gap: scrollerLayout.pageGap,\n display: 'flex',\n alignItems: 'center',\n position: 'relative',\n boxSizing: 'border-box',\n ...(scrollerLayout.strategy === ScrollStrategy.Horizontal\n ? {\n flexDirection: 'row',\n minHeight: '100%',\n }\n : {\n flexDirection: 'column',\n minWidth: 'fit-content',\n }),\n }}\n >\n {scrollerLayout.items.map((item) => (\n <div\n key={item.pageNumbers[0]}\n style={{\n display: 'flex',\n justifyContent: 'center',\n gap: scrollerLayout.pageGap,\n }}\n >\n {item.pageLayouts.map((layout) => (\n <div\n key={layout.pageNumber}\n style={{\n width: `${layout.rotatedWidth}px`,\n height: `${layout.rotatedHeight}px`,\n }}\n >\n {renderPage({\n ...layout,\n rotation: coreState.core.rotation,\n scale: coreState.core.scale,\n document: coreState.core.document,\n })}\n </div>\n ))}\n </div>\n ))}\n </div>\n <div\n style={{\n ...(scrollerLayout.strategy === ScrollStrategy.Horizontal\n ? {\n width: scrollerLayout.endSpacing,\n height: '100%',\n flexShrink: 0,\n }\n : {\n height: scrollerLayout.endSpacing,\n width: '100%',\n }),\n }}\n />\n {overlayElements}\n </div>\n );\n}\n"],"names":["totalPages"],"mappings":";;;;;AAIO,MAAM,kBAAkB,MAAM,UAAwB,aAAa,EAAE;AACrE,MAAM,sBAAsB,MAAM,cAA4B,aAAa,EAAE;AAE7E,MAAM,YAAY,MAAM;AAC7B,QAAM,EAAE,UAAU,OAAO,IAAI,oBAAoB;AACjD,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,CAAC;AAChD,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,CAAC;AAE9C,YAAU,MAAM;AACd,QAAI,CAAC,OAAQ;AACb,WAAO,OAAO,aAAa,CAAC,EAAE,YAAY,YAAAA,kBAAiB;AACzD,qBAAe,UAAU;AACzB,oBAAcA,WAAU;AAAA,IAAA,CACzB;AAAA,EAAA,GACA,CAAC,MAAM,CAAC;AAEJ,SAAA;AAAA,IACL,GAAG;AAAA,IACH;AAAA,IACA;AAAA,EACF;AACF;ACPO,SAAS,SAAS,EAAE,YAAY,iBAAiB,GAAG,SAAwB;AACjF,QAAM,EAAE,UAAU,eAAe,IAAI,oBAAoB;AACzD,QAAM,EAAE,QAAQ,aAAa,IAAI,gBAAgB;AAC3C,QAAA,EAAE,SAAS,IAAI,YAAY;AAC3B,QAAA,CAAC,gBAAgB,iBAAiB,IAAI;A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