@octanejs/pdf 0.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017–2024 Wojciech Maj
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # @octanejs/pdf
2
+
3
+ Octane binding for the public `react-pdf@10.4.1` root contract.
4
+
5
+ ```tsx
6
+ import { Document, Page, pdfjs } from '@octanejs/pdf';
7
+
8
+ pdfjs.GlobalWorkerOptions.workerSrc = new URL(
9
+ 'pdfjs-dist/build/pdf.worker.min.mjs',
10
+ import.meta.url,
11
+ ).toString();
12
+
13
+ export function Preview({ file }: { file: string }) {
14
+ return <Document file={file}>
15
+ <Page pageNumber={1} />
16
+ </Document>;
17
+ }
18
+ ```
19
+
20
+ The binding preserves `Document`, `Page`, `Thumbnail`, `Outline`, the three
21
+ context hooks, `PasswordResponses`, `pdfjs`, and the published root types. It
22
+ uses Octane refs-as-props and native DOM events; no React renderer is loaded by
23
+ the installed package.
24
+
25
+ ## Styles
26
+
27
+ Import the same documented layer styles under the Octane package name:
28
+
29
+ ```ts
30
+ import '@octanejs/pdf/dist/Page/AnnotationLayer.css';
31
+ import '@octanejs/pdf/dist/Page/TextLayer.css';
32
+ ```
33
+
34
+ The permissive upstream `./*` export also exposes React implementation and
35
+ source files. Those files are pinned parity evidence, not supported Octane
36
+ entry points. Migrate root imports and the two documented CSS paths; do not
37
+ remap direct imports from `react-pdf/src` or undocumented `react-pdf/dist`
38
+ modules.
39
+
40
+ ## Server rendering
41
+
42
+ The package resolves PDF.js's legacy build on the server and its modern build
43
+ in browsers. Server rendering emits deterministic loading, no-data, and error
44
+ shells without starting a worker or touching canvas. Hydration adopts those
45
+ shells before client-side PDF loading begins.
46
+
47
+ ## Upstream
48
+
49
+ - Package: `react-pdf@10.4.1`
50
+ - Tag: `v10.4.1`
51
+ - Commit: `5338e7a24c7ad17d1028146cf8a025a75e0abe79`
52
+ - License: MIT; the layer styles retain their PDF.js Apache-2.0 notices
53
+
54
+ See `upstream-public-surface.json` for the pinned export and wildcard policy.
@@ -0,0 +1,12 @@
1
+ # Third-party notices
2
+
3
+ The files `dist/Page/AnnotationLayer.css` and `dist/Page/TextLayer.css` derive
4
+ from Mozilla PDF.js and retain their Apache License 2.0 headers. PDF.js is
5
+ available at <https://github.com/mozilla/pdf.js>.
6
+
7
+ The component API and compatibility evidence are pinned to `react-pdf@10.4.1`,
8
+ copyright 2017–2024 Wojciech Maj, under the MIT license reproduced in
9
+ `LICENSE`.
10
+
11
+ Event prop filtering and callback currying use `make-event-props@2.0.0`,
12
+ copyright 2018–2024 Wojciech Maj, under the MIT license.
package/UPSTREAM.md ADDED
@@ -0,0 +1,30 @@
1
+ # Upstream provenance
2
+
3
+ - Package: `react-pdf@10.4.1`
4
+ - Repository: `https://github.com/wojtekmaj/react-pdf`
5
+ - Tag: `v10.4.1`
6
+ - Commit: `5338e7a24c7ad17d1028146cf8a025a75e0abe79`
7
+ - License: MIT
8
+ - PDF.js dependency: `pdfjs-dist@5.4.296` (Apache-2.0)
9
+
10
+ ## Immutable React oracles
11
+
12
+ | Oracle | Pinned version | Evidence lanes |
13
+ | --- | --- | --- |
14
+ | React runtime | `react@19.2.3` | `pristine-runtime`, `differential` |
15
+ | ReactDOM runtime | `react-dom@19.2.3` | `pristine-runtime`, `differential` |
16
+ | React types | `@types/react@19.2.7` | type lanes |
17
+ | ReactDOM types | `@types/react-dom@19.2.3` | type lanes |
18
+
19
+ These versions are the exact `catalog:react-pdf-react-oracle` pins in `pnpm-workspace.yaml`.
20
+
21
+ The pinned tag source, all 13 source test authorities, package metadata,
22
+ README, TypeScript programs, and license are vendored under `upstream/tag`.
23
+ The complete published npm artifact is vendored under `upstream/npm`.
24
+ Monorepo-root test fixtures (`test-utils.ts`, `__mocks__/`) are vendored under
25
+ `upstream/support` and linked into the package root for relative imports.
26
+
27
+ `audit/upstream-inventory.json` records SHA-256 hashes for both authorities.
28
+ `audit/case-map.json` accounts for every upstream runtime identity with either a
29
+ one-for-one adapted counterpart or an explicit `pending-adaptation` disposition.
30
+ `audit/pristine-runtime.json` records the executed pristine Vitest identities.
@@ -0,0 +1,333 @@
1
+ /* Copyright 2014 Mozilla Foundation
2
+ *
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ */
15
+
16
+ :root {
17
+ --react-pdf-annotation-layer: 1;
18
+ --annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");
19
+ --input-focus-border-color: Highlight;
20
+ --input-focus-outline: 1px solid Canvas;
21
+ --input-unfocused-border-color: transparent;
22
+ --input-disabled-border-color: transparent;
23
+ --input-hover-border-color: black;
24
+ --link-outline: none;
25
+ }
26
+
27
+ @media screen and (forced-colors: active) {
28
+ :root {
29
+ --input-focus-border-color: CanvasText;
30
+ --input-unfocused-border-color: ActiveText;
31
+ --input-disabled-border-color: GrayText;
32
+ --input-hover-border-color: Highlight;
33
+ --link-outline: 1.5px solid LinkText;
34
+ }
35
+ .annotationLayer .textWidgetAnnotation :is(input, textarea):required,
36
+ .annotationLayer .choiceWidgetAnnotation select:required,
37
+ .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required {
38
+ outline: 1.5px solid selectedItem;
39
+ }
40
+
41
+ .annotationLayer .linkAnnotation:hover {
42
+ backdrop-filter: invert(100%);
43
+ }
44
+ }
45
+
46
+ .annotationLayer {
47
+ position: absolute;
48
+ top: 0;
49
+ left: 0;
50
+ pointer-events: none;
51
+ transform-origin: 0 0;
52
+ z-index: 3;
53
+ }
54
+
55
+ .annotationLayer[data-main-rotation='90'] .norotate {
56
+ transform: rotate(270deg) translateX(-100%);
57
+ }
58
+ .annotationLayer[data-main-rotation='180'] .norotate {
59
+ transform: rotate(180deg) translate(-100%, -100%);
60
+ }
61
+ .annotationLayer[data-main-rotation='270'] .norotate {
62
+ transform: rotate(90deg) translateY(-100%);
63
+ }
64
+
65
+ .annotationLayer canvas {
66
+ position: absolute;
67
+ width: 100%;
68
+ height: 100%;
69
+ }
70
+
71
+ .annotationLayer section {
72
+ position: absolute;
73
+ text-align: initial;
74
+ pointer-events: auto;
75
+ box-sizing: border-box;
76
+ margin: 0;
77
+ transform-origin: 0 0;
78
+ }
79
+
80
+ .annotationLayer .linkAnnotation {
81
+ outline: var(--link-outline);
82
+ }
83
+
84
+ .textLayer.selecting ~ .annotationLayer section {
85
+ pointer-events: none;
86
+ }
87
+
88
+ .annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a {
89
+ position: absolute;
90
+ font-size: 1em;
91
+ top: 0;
92
+ left: 0;
93
+ width: 100%;
94
+ height: 100%;
95
+ }
96
+
97
+ .annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a:hover {
98
+ opacity: 0.2;
99
+ background: rgba(255, 255, 0, 1);
100
+ box-shadow: 0 2px 10px rgba(255, 255, 0, 1);
101
+ }
102
+
103
+ .annotationLayer .textAnnotation img {
104
+ position: absolute;
105
+ cursor: pointer;
106
+ width: 100%;
107
+ height: 100%;
108
+ top: 0;
109
+ left: 0;
110
+ }
111
+
112
+ .annotationLayer .textWidgetAnnotation :is(input, textarea),
113
+ .annotationLayer .choiceWidgetAnnotation select,
114
+ .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input {
115
+ background-image: var(--annotation-unfocused-field-background);
116
+ border: 2px solid var(--input-unfocused-border-color);
117
+ box-sizing: border-box;
118
+ font: calc(9px * var(--total-scale-factor)) sans-serif;
119
+ height: 100%;
120
+ margin: 0;
121
+ vertical-align: top;
122
+ width: 100%;
123
+ }
124
+
125
+ .annotationLayer .textWidgetAnnotation :is(input, textarea):required,
126
+ .annotationLayer .choiceWidgetAnnotation select:required,
127
+ .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required {
128
+ outline: 1.5px solid red;
129
+ }
130
+
131
+ .annotationLayer .choiceWidgetAnnotation select option {
132
+ padding: 0;
133
+ }
134
+
135
+ .annotationLayer .buttonWidgetAnnotation.radioButton input {
136
+ border-radius: 50%;
137
+ }
138
+
139
+ .annotationLayer .textWidgetAnnotation textarea {
140
+ resize: none;
141
+ }
142
+
143
+ .annotationLayer .textWidgetAnnotation :is(input, textarea)[disabled],
144
+ .annotationLayer .choiceWidgetAnnotation select[disabled],
145
+ .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input[disabled] {
146
+ background: none;
147
+ border: 2px solid var(--input-disabled-border-color);
148
+ cursor: not-allowed;
149
+ }
150
+
151
+ .annotationLayer .textWidgetAnnotation :is(input, textarea):hover,
152
+ .annotationLayer .choiceWidgetAnnotation select:hover,
153
+ .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:hover {
154
+ border: 2px solid var(--input-hover-border-color);
155
+ }
156
+ .annotationLayer .textWidgetAnnotation :is(input, textarea):hover,
157
+ .annotationLayer .choiceWidgetAnnotation select:hover,
158
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:hover {
159
+ border-radius: 2px;
160
+ }
161
+
162
+ .annotationLayer .textWidgetAnnotation :is(input, textarea):focus,
163
+ .annotationLayer .choiceWidgetAnnotation select:focus {
164
+ background: none;
165
+ border: 2px solid var(--input-focus-border-color);
166
+ border-radius: 2px;
167
+ outline: var(--input-focus-outline);
168
+ }
169
+
170
+ .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) :focus {
171
+ background-image: none;
172
+ background-color: transparent;
173
+ }
174
+
175
+ .annotationLayer .buttonWidgetAnnotation.checkBox :focus {
176
+ border: 2px solid var(--input-focus-border-color);
177
+ border-radius: 2px;
178
+ outline: var(--input-focus-outline);
179
+ }
180
+
181
+ .annotationLayer .buttonWidgetAnnotation.radioButton :focus {
182
+ border: 2px solid var(--input-focus-border-color);
183
+ outline: var(--input-focus-outline);
184
+ }
185
+
186
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,
187
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after,
188
+ .annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before {
189
+ background-color: CanvasText;
190
+ content: '';
191
+ display: block;
192
+ position: absolute;
193
+ }
194
+
195
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,
196
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after {
197
+ height: 80%;
198
+ left: 45%;
199
+ width: 1px;
200
+ }
201
+
202
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before {
203
+ transform: rotate(45deg);
204
+ }
205
+
206
+ .annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after {
207
+ transform: rotate(-45deg);
208
+ }
209
+
210
+ .annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before {
211
+ border-radius: 50%;
212
+ height: 50%;
213
+ left: 30%;
214
+ top: 20%;
215
+ width: 50%;
216
+ }
217
+
218
+ .annotationLayer .textWidgetAnnotation input.comb {
219
+ font-family: monospace;
220
+ padding-left: 2px;
221
+ padding-right: 0;
222
+ }
223
+
224
+ .annotationLayer .textWidgetAnnotation input.comb:focus {
225
+ /*
226
+ * Letter spacing is placed on the right side of each character. Hence, the
227
+ * letter spacing of the last character may be placed outside the visible
228
+ * area, causing horizontal scrolling. We avoid this by extending the width
229
+ * when the element has focus and revert this when it loses focus.
230
+ */
231
+ width: 103%;
232
+ }
233
+
234
+ .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input {
235
+ appearance: none;
236
+ }
237
+
238
+ .annotationLayer .popupTriggerArea {
239
+ height: 100%;
240
+ width: 100%;
241
+ }
242
+
243
+ .annotationLayer .fileAttachmentAnnotation .popupTriggerArea {
244
+ position: absolute;
245
+ }
246
+
247
+ .annotationLayer .popupWrapper {
248
+ position: absolute;
249
+ font-size: calc(9px * var(--total-scale-factor));
250
+ width: 100%;
251
+ min-width: calc(180px * var(--total-scale-factor));
252
+ pointer-events: none;
253
+ }
254
+
255
+ .annotationLayer .popup {
256
+ position: absolute;
257
+ max-width: calc(180px * var(--total-scale-factor));
258
+ background-color: rgba(255, 255, 153, 1);
259
+ box-shadow: 0 calc(2px * var(--total-scale-factor)) calc(5px * var(--total-scale-factor))
260
+ rgba(136, 136, 136, 1);
261
+ border-radius: calc(2px * var(--total-scale-factor));
262
+ padding: calc(6px * var(--total-scale-factor));
263
+ margin-left: calc(5px * var(--total-scale-factor));
264
+ cursor: pointer;
265
+ font: message-box;
266
+ white-space: normal;
267
+ word-wrap: break-word;
268
+ pointer-events: auto;
269
+ }
270
+
271
+ .annotationLayer .popup > * {
272
+ font-size: calc(9px * var(--total-scale-factor));
273
+ }
274
+
275
+ .annotationLayer .popup h1 {
276
+ display: inline-block;
277
+ }
278
+
279
+ .annotationLayer .popupDate {
280
+ display: inline-block;
281
+ margin-left: calc(5px * var(--total-scale-factor));
282
+ }
283
+
284
+ .annotationLayer .popupContent {
285
+ border-top: 1px solid rgba(51, 51, 51, 1);
286
+ margin-top: calc(2px * var(--total-scale-factor));
287
+ padding-top: calc(2px * var(--total-scale-factor));
288
+ }
289
+
290
+ .annotationLayer .richText > * {
291
+ white-space: pre-wrap;
292
+ font-size: calc(9px * var(--total-scale-factor));
293
+ }
294
+
295
+ .annotationLayer .highlightAnnotation,
296
+ .annotationLayer .underlineAnnotation,
297
+ .annotationLayer .squigglyAnnotation,
298
+ .annotationLayer .strikeoutAnnotation,
299
+ .annotationLayer .freeTextAnnotation,
300
+ .annotationLayer .lineAnnotation svg line,
301
+ .annotationLayer .squareAnnotation svg rect,
302
+ .annotationLayer .circleAnnotation svg ellipse,
303
+ .annotationLayer .polylineAnnotation svg polyline,
304
+ .annotationLayer .polygonAnnotation svg polygon,
305
+ .annotationLayer .caretAnnotation,
306
+ .annotationLayer .inkAnnotation svg polyline,
307
+ .annotationLayer .stampAnnotation,
308
+ .annotationLayer .fileAttachmentAnnotation {
309
+ cursor: pointer;
310
+ }
311
+
312
+ .annotationLayer section svg {
313
+ position: absolute;
314
+ width: 100%;
315
+ height: 100%;
316
+ top: 0;
317
+ left: 0;
318
+ }
319
+
320
+ .annotationLayer .annotationTextContent {
321
+ position: absolute;
322
+ width: 100%;
323
+ height: 100%;
324
+ opacity: 0;
325
+ color: transparent;
326
+ user-select: none;
327
+ pointer-events: none;
328
+ }
329
+
330
+ .annotationLayer .annotationTextContent span {
331
+ width: 100%;
332
+ display: inline-block;
333
+ }
@@ -0,0 +1,119 @@
1
+ /* Copyright 2014 Mozilla Foundation
2
+ *
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ */
15
+
16
+ :root {
17
+ --react-pdf-text-layer: 1;
18
+ --highlight-bg-color: rgba(180, 0, 170, 1);
19
+ --highlight-selected-bg-color: rgba(0, 100, 0, 1);
20
+ }
21
+
22
+ @media screen and (forced-colors: active) {
23
+ :root {
24
+ --highlight-bg-color: Highlight;
25
+ --highlight-selected-bg-color: ButtonText;
26
+ }
27
+ }
28
+
29
+ [data-main-rotation='90'] {
30
+ transform: rotate(90deg) translateY(-100%);
31
+ }
32
+ [data-main-rotation='180'] {
33
+ transform: rotate(180deg) translate(-100%, -100%);
34
+ }
35
+ [data-main-rotation='270'] {
36
+ transform: rotate(270deg) translateX(-100%);
37
+ }
38
+
39
+ .textLayer {
40
+ position: absolute;
41
+ text-align: initial;
42
+ inset: 0;
43
+ overflow: hidden;
44
+ line-height: 1;
45
+ text-size-adjust: none;
46
+ forced-color-adjust: none;
47
+ transform-origin: 0 0;
48
+ z-index: 2;
49
+ }
50
+
51
+ .textLayer :is(span, br) {
52
+ color: transparent;
53
+ position: absolute;
54
+ white-space: pre;
55
+ cursor: text;
56
+ margin: 0;
57
+ transform-origin: 0 0;
58
+ }
59
+
60
+ /* Only necessary in Google Chrome, see issue 14205, and most unfortunately
61
+ * the problem doesn't show up in "text" reference tests. */
62
+ .textLayer span.markedContent {
63
+ top: 0;
64
+ height: 0;
65
+ }
66
+
67
+ .textLayer .highlight {
68
+ margin: -1px;
69
+ padding: 1px;
70
+ background-color: var(--highlight-bg-color);
71
+ border-radius: 4px;
72
+ }
73
+
74
+ .textLayer .highlight.appended {
75
+ position: initial;
76
+ }
77
+
78
+ .textLayer .highlight.begin {
79
+ border-radius: 4px 0 0 4px;
80
+ }
81
+
82
+ .textLayer .highlight.end {
83
+ border-radius: 0 4px 4px 0;
84
+ }
85
+
86
+ .textLayer .highlight.middle {
87
+ border-radius: 0;
88
+ }
89
+
90
+ .textLayer .highlight.selected {
91
+ background-color: var(--highlight-selected-bg-color);
92
+ }
93
+
94
+ /* Avoids https://github.com/mozilla/pdf.js/issues/13840 in Chrome */
95
+ .textLayer br::selection {
96
+ background: transparent;
97
+ }
98
+
99
+ .textLayer .endOfContent {
100
+ display: block;
101
+ position: absolute;
102
+ inset: 100% 0 0;
103
+ z-index: -1;
104
+ cursor: default;
105
+ user-select: none;
106
+ }
107
+
108
+ .textLayer.selecting .endOfContent {
109
+ top: 0;
110
+ }
111
+
112
+ .hiddenCanvasElement {
113
+ position: absolute;
114
+ top: 0;
115
+ left: 0;
116
+ width: 0;
117
+ height: 0;
118
+ display: none;
119
+ }
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "@octanejs/pdf",
3
+ "version": "0.0.1",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "engines": {
7
+ "node": ">=22.22.2"
8
+ },
9
+ "description": "React PDF bindings for the Octane renderer.",
10
+ "author": {
11
+ "name": "Dominic Gannaway",
12
+ "email": "dg@domgan.com"
13
+ },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/octanejs/octane.git",
20
+ "directory": "packages/pdf"
21
+ },
22
+ "main": "src/index.server.ts",
23
+ "module": "src/index.ts",
24
+ "types": "src/index.ts",
25
+ "files": [
26
+ "src",
27
+ "dist",
28
+ "README.md",
29
+ "UPSTREAM.md",
30
+ "LICENSE",
31
+ "THIRD_PARTY_NOTICES.md",
32
+ "upstream-public-surface.json"
33
+ ],
34
+ "exports": {
35
+ ".": {
36
+ "types": "./src/index.ts",
37
+ "browser": "./src/index.ts",
38
+ "default": "./src/index.server.ts"
39
+ },
40
+ "./dist/Page/AnnotationLayer.css": "./dist/Page/AnnotationLayer.css",
41
+ "./dist/Page/TextLayer.css": "./dist/Page/TextLayer.css"
42
+ },
43
+ "dependencies": {
44
+ "make-event-props": "2.0.0",
45
+ "pdfjs-dist": "5.4.296"
46
+ },
47
+ "peerDependencies": {
48
+ "octane": "0.1.35"
49
+ },
50
+ "devDependencies": {
51
+ "@types/react": "19.2.7",
52
+ "@types/react-dom": "19.2.3",
53
+ "@types/warning": "^3.0.4",
54
+ "@vitest/browser-playwright": "4.1.10",
55
+ "clsx": "^2.1.1",
56
+ "dequal": "^2.0.3",
57
+ "make-cancellable-promise": "^2.0.0",
58
+ "merge-refs": "^2.0.0",
59
+ "playwright": "^1.61.1",
60
+ "react": "19.2.3",
61
+ "react-dom": "19.2.3",
62
+ "react-pdf": "10.4.1",
63
+ "tiny-invariant": "^1.3.3",
64
+ "vite": "^8.1.5",
65
+ "vitest": "^4.1.10",
66
+ "vitest-browser-react": "2.0.0",
67
+ "warning": "^4.0.3",
68
+ "octane": "0.1.35"
69
+ },
70
+ "scripts": {
71
+ "test": "pnpm upstream:verify && vitest run --root ../.. --project pdf --project pdf-ssr --project pdf-parity --project pdf-packed",
72
+ "test:browser": "vitest run --root ../.. --project pdf-browser",
73
+ "test:feasibility": "vitest run --root ../.. --project pdf-feasibility --project pdf-feasibility-ssr --project pdf-feasibility-hydration",
74
+ "test:parity": "vitest run --root ../.. --project pdf-parity",
75
+ "test:ssr": "vitest run --root ../.. --project pdf-ssr",
76
+ "test:types": "tsc --noEmit -p typetests/tsconfig.pristine.json && tsrx-tsc --noEmit -p typetests/tsconfig.adapted.json",
77
+ "upstream:verify": "node --test tests/audit/upstream-inventory.test.mjs && node audit/upstream-inventory.mjs",
78
+ "test:pristine": "node ../../scripts/react-parity/pdf-pristine-runtime.mjs"
79
+ }
80
+ }