@octanejs/pdf 0.0.18 → 0.0.20
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/package.json +3 -3
- package/src/components.tsrx +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/pdf",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"pdfjs-dist": "5.4.296"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"octane": "^0.
|
|
49
|
+
"octane": "^0.4.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/react": "19.2.7",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"vitest": "^4.1.10",
|
|
67
67
|
"vitest-browser-react": "2.0.0",
|
|
68
68
|
"warning": "^4.0.3",
|
|
69
|
-
"octane": "0.
|
|
69
|
+
"octane": "0.4.0"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"test": "pnpm upstream:verify && vitest run --root ../.. --project pdf --project pdf-ssr --project pdf-parity --project pdf-packed",
|
package/src/components.tsrx
CHANGED
|
@@ -281,7 +281,7 @@ export function Document(props: DocumentProps = {}) {
|
|
|
281
281
|
ref={documentElement}
|
|
282
282
|
class={['react-pdf__Document', classProp, className]}
|
|
283
283
|
>
|
|
284
|
-
<DocumentContext
|
|
284
|
+
<DocumentContext value={contextValue}>{content}</DocumentContext>
|
|
285
285
|
</div>;
|
|
286
286
|
}
|
|
287
287
|
|
|
@@ -685,7 +685,7 @@ export function Page(props: PageProps = {}) {
|
|
|
685
685
|
throw new Error('renderMode was set to "custom", but no customRenderer was passed.');
|
|
686
686
|
}
|
|
687
687
|
const renderProps = contextValue as PageRenderProps;
|
|
688
|
-
content = <PageContext
|
|
688
|
+
content = <PageContext value={contextValue}>
|
|
689
689
|
{renderMode === 'canvas'
|
|
690
690
|
? <canvas
|
|
691
691
|
ref={canvasElement}
|
|
@@ -711,7 +711,7 @@ export function Page(props: PageProps = {}) {
|
|
|
711
711
|
{typeof children === 'function' && !isChildrenBlock(children)
|
|
712
712
|
? children(renderProps)
|
|
713
713
|
: children}
|
|
714
|
-
</PageContext
|
|
714
|
+
</PageContext>;
|
|
715
715
|
}
|
|
716
716
|
|
|
717
717
|
return <div
|
|
@@ -872,7 +872,7 @@ export function Outline(props: OutlineProps = {}) {
|
|
|
872
872
|
ref={outlineElement}
|
|
873
873
|
class={['react-pdf__Outline', classProp, className]}
|
|
874
874
|
>
|
|
875
|
-
<OutlineContext
|
|
875
|
+
<OutlineContext value={{ onItemClick: clickHandler }}>
|
|
876
876
|
<ul>{outline.map(
|
|
877
877
|
(item) =>
|
|
878
878
|
<OutlineItem
|
|
@@ -882,6 +882,6 @@ export function Outline(props: OutlineProps = {}) {
|
|
|
882
882
|
onItemClick={clickHandler}
|
|
883
883
|
/>,
|
|
884
884
|
)}</ul>
|
|
885
|
-
</OutlineContext
|
|
885
|
+
</OutlineContext>
|
|
886
886
|
</div>;
|
|
887
887
|
}
|