@nypl/web-reader 4.3.5 → 5.0.0-alpha.0

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/README.md CHANGED
@@ -14,7 +14,7 @@ This project features an example application under `/example`, which is deployed
14
14
  - [TypeScript](https://www.npmjs.com/package/typescript) - JavaScript with syntax for types
15
15
  - [React](https://www.npmjs.com/package/react) - For creating user interface components
16
16
  - [Jest](https://jestjs.io/) & [React Testing Library](https://testing-library.com/) - For writing unit tests
17
- - The Example App is packaged with [Parcel](https://parceljs.org/) & deployed with [Vercel](https://vercel.com/). Integration tests are run with [Cypress](https://www.cypress.io/).
17
+ - The Example App is packaged with [Parcel](https://parceljs.org/) & deployed with [Vercel](https://vercel.com/).
18
18
 
19
19
  ## Features
20
20
 
@@ -41,12 +41,7 @@ Basic usage within a React app, using the default UI:
41
41
  import WebReader from '@nypl/web-reader';
42
42
 
43
43
  const ReaderPage = ({ manifestUrl }) => {
44
- return (
45
- <WebReader
46
- webpubManifest={manifestUrl}
47
- headerLeft={<button>Back to app</button>}
48
- />
49
- );
44
+ return <WebReader webpubManifest={manifestUrl} />;
50
45
  };
51
46
  ```
52
47
 
@@ -230,7 +225,6 @@ C4 Models have been created to demonstrate how the WebReader and other web readi
230
225
  This is the folder structure:
231
226
 
232
227
  ```txt
233
- /cypress # cypress integration tests
234
228
  /example # example app packaged by Parcel
235
229
  index.html
236
230
  index.tsx # entrypoint for the demo app
@@ -320,24 +314,6 @@ To run all the tests as they run in CI:
320
314
  npm run test:ci
321
315
  ```
322
316
 
323
- ### Integration Tests with Cypress
324
-
325
- The tests we have are located in the `cypress/integration` folder.
326
-
327
- To properly run the tests, make sure the example app is running (Instruction above on how to set up the example page), cypress will test against that page by default. Or if the app is hosted elsewhere, update the `baseUrl` value in the `cypress.json` file to match your host URL.
328
-
329
- To run and open an interactive testing envioment:
330
-
331
- ```bash
332
- npm run cypress:open
333
- ```
334
-
335
- To run tests on your terminal without a browser:
336
-
337
- ```bash
338
- npm run cypress:cli
339
- ```
340
-
341
317
  ## Code Quality & Bundle Size Checks
342
318
 
343
319
  - `npm run lint` to lint the code yourself. Code quality enforcement is set up in pre-commit hooks with `prettier`, `husky`, and `lint-staged`.
@@ -350,7 +326,6 @@ There are three Github Actions Workflows:
350
326
 
351
327
  - `main` - installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix
352
328
  - `size` - comments cost comparison of your library on every pull request using [size-limit](https://github.com/ai/size-limit)
353
- - `cypress` - runs the Cypress integration tests on Vercel deployments, which means it runs whenever a pull request is opened or updated
354
329
 
355
330
  ## Versioning
356
331
 
package/dist/index.css CHANGED
@@ -1,349 +1,22 @@
1
- /* node_modules/react-pdf/dist/esm/Page/AnnotationLayer.css */
2
- :root {
3
- --react-pdf-annotation-layer: 1;
4
- --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>");
5
- --input-focus-border-color: Highlight;
6
- --input-focus-outline: 1px solid Canvas;
7
- --input-unfocused-border-color: transparent;
8
- --input-disabled-border-color: transparent;
9
- --input-hover-border-color: black;
10
- --link-outline: none;
11
- }
12
- @media screen and (forced-colors: active) {
13
- :root {
14
- --input-focus-border-color: CanvasText;
15
- --input-unfocused-border-color: ActiveText;
16
- --input-disabled-border-color: GrayText;
17
- --input-hover-border-color: Highlight;
18
- --link-outline: 1.5px solid LinkText;
19
- }
20
- .annotationLayer .textWidgetAnnotation :is(input, textarea):required,
21
- .annotationLayer .choiceWidgetAnnotation select:required,
22
- .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required {
23
- outline: 1.5px solid selectedItem;
24
- }
25
- .annotationLayer .linkAnnotation:hover {
26
- backdrop-filter: invert(100%);
27
- }
28
- }
29
- .annotationLayer {
30
- position: absolute;
31
- top: 0;
32
- left: 0;
33
- pointer-events: none;
34
- transform-origin: 0 0;
35
- z-index: 3;
36
- }
37
- .annotationLayer[data-main-rotation="90"] .norotate {
38
- transform: rotate(270deg) translateX(-100%);
39
- }
40
- .annotationLayer[data-main-rotation="180"] .norotate {
41
- transform: rotate(180deg) translate(-100%, -100%);
42
- }
43
- .annotationLayer[data-main-rotation="270"] .norotate {
44
- transform: rotate(90deg) translateY(-100%);
45
- }
46
- .annotationLayer canvas {
47
- position: absolute;
48
- width: 100%;
49
- height: 100%;
50
- }
51
- .annotationLayer section {
52
- position: absolute;
53
- text-align: initial;
54
- pointer-events: auto;
55
- box-sizing: border-box;
56
- margin: 0;
57
- transform-origin: 0 0;
58
- }
59
- .annotationLayer .linkAnnotation {
60
- outline: var(--link-outline);
61
- }
62
- .annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a {
63
- position: absolute;
64
- font-size: 1em;
65
- top: 0;
66
- left: 0;
67
- width: 100%;
68
- height: 100%;
69
- }
70
- .annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a:hover {
71
- opacity: 0.2;
72
- background: rgba(255, 255, 0, 1);
73
- box-shadow: 0 2px 10px rgba(255, 255, 0, 1);
74
- }
75
- .annotationLayer .textAnnotation img {
76
- position: absolute;
77
- cursor: pointer;
78
- width: 100%;
79
- height: 100%;
80
- top: 0;
81
- left: 0;
82
- }
83
- .annotationLayer .textWidgetAnnotation :is(input, textarea),
84
- .annotationLayer .choiceWidgetAnnotation select,
85
- .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input {
86
- background-image: var(--annotation-unfocused-field-background);
87
- border: 2px solid var(--input-unfocused-border-color);
88
- box-sizing: border-box;
89
- font: calc(9px * var(--scale-factor)) sans-serif;
90
- height: 100%;
91
- margin: 0;
92
- vertical-align: top;
93
- width: 100%;
94
- }
95
- .annotationLayer .textWidgetAnnotation :is(input, textarea):required,
96
- .annotationLayer .choiceWidgetAnnotation select:required,
97
- .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required {
98
- outline: 1.5px solid red;
99
- }
100
- .annotationLayer .choiceWidgetAnnotation select option {
101
- padding: 0;
102
- }
103
- .annotationLayer .buttonWidgetAnnotation.radioButton input {
104
- border-radius: 50%;
105
- }
106
- .annotationLayer .textWidgetAnnotation textarea {
107
- resize: none;
108
- }
109
- .annotationLayer .textWidgetAnnotation :is(input, textarea)[disabled],
110
- .annotationLayer .choiceWidgetAnnotation select[disabled],
111
- .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input[disabled] {
112
- background: none;
113
- border: 2px solid var(--input-disabled-border-color);
114
- cursor: not-allowed;
115
- }
116
- .annotationLayer .textWidgetAnnotation :is(input, textarea):hover,
117
- .annotationLayer .choiceWidgetAnnotation select:hover,
118
- .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:hover {
119
- border: 2px solid var(--input-hover-border-color);
120
- }
121
- .annotationLayer .textWidgetAnnotation :is(input, textarea):hover,
122
- .annotationLayer .choiceWidgetAnnotation select:hover,
123
- .annotationLayer .buttonWidgetAnnotation.checkBox input:hover {
124
- border-radius: 2px;
125
- }
126
- .annotationLayer .textWidgetAnnotation :is(input, textarea):focus,
127
- .annotationLayer .choiceWidgetAnnotation select:focus {
128
- background: none;
129
- border: 2px solid var(--input-focus-border-color);
130
- border-radius: 2px;
131
- outline: var(--input-focus-outline);
132
- }
133
- .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) :focus {
134
- background-image: none;
135
- background-color: transparent;
136
- }
137
- .annotationLayer .buttonWidgetAnnotation.checkBox :focus {
138
- border: 2px solid var(--input-focus-border-color);
139
- border-radius: 2px;
140
- outline: var(--input-focus-outline);
141
- }
142
- .annotationLayer .buttonWidgetAnnotation.radioButton :focus {
143
- border: 2px solid var(--input-focus-border-color);
144
- outline: var(--input-focus-outline);
145
- }
146
- .annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,
147
- .annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after,
148
- .annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before {
149
- background-color: CanvasText;
150
- content: "";
1
+ /* src/PdfReader/pdfReader.css */
2
+ .react-pdf__Document {
3
+ scrollbar-color: #8d8d8d #424242;
4
+ display: flex;
5
+ flex-direction: column;
6
+ background: #252525;
7
+ gap: 8px;
8
+ }
9
+ .react-pdf__Document > div {
10
+ background: #252525;
11
+ }
12
+ .react-pdf__Page {
151
13
  display: block;
152
- position: absolute;
153
- }
154
- .annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,
155
- .annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after {
156
- height: 80%;
157
- left: 45%;
158
- width: 1px;
159
- }
160
- .annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before {
161
- transform: rotate(45deg);
162
- }
163
- .annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after {
164
- transform: rotate(-45deg);
165
- }
166
- .annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before {
167
- border-radius: 50%;
168
- height: 50%;
169
- left: 30%;
170
- top: 20%;
171
- width: 50%;
172
- }
173
- .annotationLayer .textWidgetAnnotation input.comb {
174
- font-family: monospace;
175
- padding-left: 2px;
176
- padding-right: 0;
177
- }
178
- .annotationLayer .textWidgetAnnotation input.comb:focus {
179
- width: 103%;
14
+ background: #252525 !important;
180
15
  }
181
- .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input {
182
- appearance: none;
183
- }
184
- .annotationLayer .popupTriggerArea {
185
- height: 100%;
186
- width: 100%;
187
- }
188
- .annotationLayer .fileAttachmentAnnotation .popupTriggerArea {
189
- position: absolute;
190
- }
191
- .annotationLayer .popupWrapper {
192
- position: absolute;
193
- font-size: calc(9px * var(--scale-factor));
194
- width: 100%;
195
- min-width: calc(180px * var(--scale-factor));
196
- pointer-events: none;
197
- }
198
- .annotationLayer .popup {
199
- position: absolute;
200
- max-width: calc(180px * var(--scale-factor));
201
- background-color: rgba(255, 255, 153, 1);
202
- box-shadow: 0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) rgba(136, 136, 136, 1);
203
- border-radius: calc(2px * var(--scale-factor));
204
- padding: calc(6px * var(--scale-factor));
205
- margin-left: calc(5px * var(--scale-factor));
206
- cursor: pointer;
207
- font: message-box;
208
- white-space: normal;
209
- word-wrap: break-word;
210
- pointer-events: auto;
211
- }
212
- .annotationLayer .popup > * {
213
- font-size: calc(9px * var(--scale-factor));
214
- }
215
- .annotationLayer .popup h1 {
216
- display: inline-block;
217
- }
218
- .annotationLayer .popupDate {
219
- display: inline-block;
220
- margin-left: calc(5px * var(--scale-factor));
221
- }
222
- .annotationLayer .popupContent {
223
- border-top: 1px solid rgba(51, 51, 51, 1);
224
- margin-top: calc(2px * var(--scale-factor));
225
- padding-top: calc(2px * var(--scale-factor));
226
- }
227
- .annotationLayer .richText > * {
228
- white-space: pre-wrap;
229
- font-size: calc(9px * var(--scale-factor));
230
- }
231
- .annotationLayer .highlightAnnotation,
232
- .annotationLayer .underlineAnnotation,
233
- .annotationLayer .squigglyAnnotation,
234
- .annotationLayer .strikeoutAnnotation,
235
- .annotationLayer .freeTextAnnotation,
236
- .annotationLayer .lineAnnotation svg line,
237
- .annotationLayer .squareAnnotation svg rect,
238
- .annotationLayer .circleAnnotation svg ellipse,
239
- .annotationLayer .polylineAnnotation svg polyline,
240
- .annotationLayer .polygonAnnotation svg polygon,
241
- .annotationLayer .caretAnnotation,
242
- .annotationLayer .inkAnnotation svg polyline,
243
- .annotationLayer .stampAnnotation,
244
- .annotationLayer .fileAttachmentAnnotation {
245
- cursor: pointer;
246
- }
247
- .annotationLayer section svg {
248
- position: absolute;
249
- width: 100%;
250
- height: 100%;
251
- top: 0;
252
- left: 0;
253
- }
254
- .annotationLayer .annotationTextContent {
255
- position: absolute;
256
- width: 100%;
257
- height: 100%;
258
- opacity: 0;
259
- color: transparent;
260
- user-select: none;
261
- pointer-events: none;
262
- }
263
- .annotationLayer .annotationTextContent span {
264
- width: 100%;
265
- display: inline-block;
266
- }
267
-
268
- /* node_modules/react-pdf/dist/esm/Page/TextLayer.css */
269
- :root {
270
- --react-pdf-text-layer: 1;
271
- --highlight-bg-color: rgba(180, 0, 170, 1);
272
- --highlight-selected-bg-color: rgba(0, 100, 0, 1);
273
- }
274
- @media screen and (forced-colors: active) {
275
- :root {
276
- --highlight-bg-color: Highlight;
277
- --highlight-selected-bg-color: ButtonText;
278
- }
279
- }
280
- [data-main-rotation="90"] {
281
- transform: rotate(90deg) translateY(-100%);
282
- }
283
- [data-main-rotation="180"] {
284
- transform: rotate(180deg) translate(-100%, -100%);
285
- }
286
- [data-main-rotation="270"] {
287
- transform: rotate(270deg) translateX(-100%);
288
- }
289
- .textLayer {
290
- position: absolute;
291
- text-align: initial;
292
- inset: 0;
293
- overflow: hidden;
294
- line-height: 1;
295
- text-size-adjust: none;
296
- forced-color-adjust: none;
297
- transform-origin: 0 0;
298
- z-index: 2;
299
- }
300
- .textLayer :is(span, br) {
301
- color: transparent;
302
- position: absolute;
303
- white-space: pre;
304
- cursor: text;
305
- margin: 0;
306
- transform-origin: 0 0;
307
- }
308
- .textLayer span.markedContent {
309
- top: 0;
310
- height: 0;
311
- }
312
- .textLayer .highlight {
313
- margin: -1px;
314
- padding: 1px;
315
- background-color: var(--highlight-bg-color);
316
- border-radius: 4px;
317
- }
318
- .textLayer .highlight.appended {
319
- position: initial;
320
- }
321
- .textLayer .highlight.begin {
322
- border-radius: 4px 0 0 4px;
323
- }
324
- .textLayer .highlight.end {
325
- border-radius: 0 4px 4px 0;
326
- }
327
- .textLayer .highlight.middle {
328
- border-radius: 0;
329
- }
330
- .textLayer .highlight.selected {
331
- background-color: var(--highlight-selected-bg-color);
332
- }
333
- .textLayer br::selection {
334
- background: transparent;
335
- }
336
- .textLayer .endOfContent {
16
+ .react-pdf__Page canvas,
17
+ .react-pdf__Page .textLayer,
18
+ .react-pdf__Page .annotationLayer {
337
19
  display: block;
338
- position: absolute;
339
- inset: 100% 0 0;
340
- z-index: -1;
341
- cursor: default;
342
- user-select: none;
343
- }
344
- .textLayer .endOfContent.active {
345
- top: 0;
20
+ margin: 0 auto;
346
21
  }
347
-
348
- /* src/PdfReader/pdf.css */
349
22
  /*# sourceMappingURL=index.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["../node_modules/react-pdf/dist/esm/Page/AnnotationLayer.css","../node_modules/react-pdf/dist/esm/Page/TextLayer.css"],"sourcesContent":["/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n:root {\n --react-pdf-annotation-layer: 1;\n --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>\");\n --input-focus-border-color: Highlight;\n --input-focus-outline: 1px solid Canvas;\n --input-unfocused-border-color: transparent;\n --input-disabled-border-color: transparent;\n --input-hover-border-color: black;\n --link-outline: none;\n}\n\n@media screen and (forced-colors: active) {\n :root {\n --input-focus-border-color: CanvasText;\n --input-unfocused-border-color: ActiveText;\n --input-disabled-border-color: GrayText;\n --input-hover-border-color: Highlight;\n --link-outline: 1.5px solid LinkText;\n }\n .annotationLayer .textWidgetAnnotation :is(input, textarea):required,\n .annotationLayer .choiceWidgetAnnotation select:required,\n .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required {\n outline: 1.5px solid selectedItem;\n }\n\n .annotationLayer .linkAnnotation:hover {\n backdrop-filter: invert(100%);\n }\n}\n\n.annotationLayer {\n position: absolute;\n top: 0;\n left: 0;\n pointer-events: none;\n transform-origin: 0 0;\n z-index: 3;\n}\n\n.annotationLayer[data-main-rotation='90'] .norotate {\n transform: rotate(270deg) translateX(-100%);\n}\n.annotationLayer[data-main-rotation='180'] .norotate {\n transform: rotate(180deg) translate(-100%, -100%);\n}\n.annotationLayer[data-main-rotation='270'] .norotate {\n transform: rotate(90deg) translateY(-100%);\n}\n\n.annotationLayer canvas {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n\n.annotationLayer section {\n position: absolute;\n text-align: initial;\n pointer-events: auto;\n box-sizing: border-box;\n margin: 0;\n transform-origin: 0 0;\n}\n\n.annotationLayer .linkAnnotation {\n outline: var(--link-outline);\n}\n\n.annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a {\n position: absolute;\n font-size: 1em;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a:hover {\n opacity: 0.2;\n background: rgba(255, 255, 0, 1);\n box-shadow: 0 2px 10px rgba(255, 255, 0, 1);\n}\n\n.annotationLayer .textAnnotation img {\n position: absolute;\n cursor: pointer;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea),\n.annotationLayer .choiceWidgetAnnotation select,\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input {\n background-image: var(--annotation-unfocused-field-background);\n border: 2px solid var(--input-unfocused-border-color);\n box-sizing: border-box;\n font: calc(9px * var(--scale-factor)) sans-serif;\n height: 100%;\n margin: 0;\n vertical-align: top;\n width: 100%;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea):required,\n.annotationLayer .choiceWidgetAnnotation select:required,\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required {\n outline: 1.5px solid red;\n}\n\n.annotationLayer .choiceWidgetAnnotation select option {\n padding: 0;\n}\n\n.annotationLayer .buttonWidgetAnnotation.radioButton input {\n border-radius: 50%;\n}\n\n.annotationLayer .textWidgetAnnotation textarea {\n resize: none;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea)[disabled],\n.annotationLayer .choiceWidgetAnnotation select[disabled],\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input[disabled] {\n background: none;\n border: 2px solid var(--input-disabled-border-color);\n cursor: not-allowed;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea):hover,\n.annotationLayer .choiceWidgetAnnotation select:hover,\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:hover {\n border: 2px solid var(--input-hover-border-color);\n}\n.annotationLayer .textWidgetAnnotation :is(input, textarea):hover,\n.annotationLayer .choiceWidgetAnnotation select:hover,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:hover {\n border-radius: 2px;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea):focus,\n.annotationLayer .choiceWidgetAnnotation select:focus {\n background: none;\n border: 2px solid var(--input-focus-border-color);\n border-radius: 2px;\n outline: var(--input-focus-outline);\n}\n\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) :focus {\n background-image: none;\n background-color: transparent;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox :focus {\n border: 2px solid var(--input-focus-border-color);\n border-radius: 2px;\n outline: var(--input-focus-outline);\n}\n\n.annotationLayer .buttonWidgetAnnotation.radioButton :focus {\n border: 2px solid var(--input-focus-border-color);\n outline: var(--input-focus-outline);\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after,\n.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before {\n background-color: CanvasText;\n content: '';\n display: block;\n position: absolute;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after {\n height: 80%;\n left: 45%;\n width: 1px;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before {\n transform: rotate(45deg);\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after {\n transform: rotate(-45deg);\n}\n\n.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before {\n border-radius: 50%;\n height: 50%;\n left: 30%;\n top: 20%;\n width: 50%;\n}\n\n.annotationLayer .textWidgetAnnotation input.comb {\n font-family: monospace;\n padding-left: 2px;\n padding-right: 0;\n}\n\n.annotationLayer .textWidgetAnnotation input.comb:focus {\n /*\n * Letter spacing is placed on the right side of each character. Hence, the\n * letter spacing of the last character may be placed outside the visible\n * area, causing horizontal scrolling. We avoid this by extending the width\n * when the element has focus and revert this when it loses focus.\n */\n width: 103%;\n}\n\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input {\n appearance: none;\n}\n\n.annotationLayer .popupTriggerArea {\n height: 100%;\n width: 100%;\n}\n\n.annotationLayer .fileAttachmentAnnotation .popupTriggerArea {\n position: absolute;\n}\n\n.annotationLayer .popupWrapper {\n position: absolute;\n font-size: calc(9px * var(--scale-factor));\n width: 100%;\n min-width: calc(180px * var(--scale-factor));\n pointer-events: none;\n}\n\n.annotationLayer .popup {\n position: absolute;\n max-width: calc(180px * var(--scale-factor));\n background-color: rgba(255, 255, 153, 1);\n box-shadow: 0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor))\n rgba(136, 136, 136, 1);\n border-radius: calc(2px * var(--scale-factor));\n padding: calc(6px * var(--scale-factor));\n margin-left: calc(5px * var(--scale-factor));\n cursor: pointer;\n font: message-box;\n white-space: normal;\n word-wrap: break-word;\n pointer-events: auto;\n}\n\n.annotationLayer .popup > * {\n font-size: calc(9px * var(--scale-factor));\n}\n\n.annotationLayer .popup h1 {\n display: inline-block;\n}\n\n.annotationLayer .popupDate {\n display: inline-block;\n margin-left: calc(5px * var(--scale-factor));\n}\n\n.annotationLayer .popupContent {\n border-top: 1px solid rgba(51, 51, 51, 1);\n margin-top: calc(2px * var(--scale-factor));\n padding-top: calc(2px * var(--scale-factor));\n}\n\n.annotationLayer .richText > * {\n white-space: pre-wrap;\n font-size: calc(9px * var(--scale-factor));\n}\n\n.annotationLayer .highlightAnnotation,\n.annotationLayer .underlineAnnotation,\n.annotationLayer .squigglyAnnotation,\n.annotationLayer .strikeoutAnnotation,\n.annotationLayer .freeTextAnnotation,\n.annotationLayer .lineAnnotation svg line,\n.annotationLayer .squareAnnotation svg rect,\n.annotationLayer .circleAnnotation svg ellipse,\n.annotationLayer .polylineAnnotation svg polyline,\n.annotationLayer .polygonAnnotation svg polygon,\n.annotationLayer .caretAnnotation,\n.annotationLayer .inkAnnotation svg polyline,\n.annotationLayer .stampAnnotation,\n.annotationLayer .fileAttachmentAnnotation {\n cursor: pointer;\n}\n\n.annotationLayer section svg {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n.annotationLayer .annotationTextContent {\n position: absolute;\n width: 100%;\n height: 100%;\n opacity: 0;\n color: transparent;\n user-select: none;\n pointer-events: none;\n}\n\n.annotationLayer .annotationTextContent span {\n width: 100%;\n display: inline-block;\n}\n","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n:root {\n --react-pdf-text-layer: 1;\n --highlight-bg-color: rgba(180, 0, 170, 1);\n --highlight-selected-bg-color: rgba(0, 100, 0, 1);\n}\n\n@media screen and (forced-colors: active) {\n :root {\n --highlight-bg-color: Highlight;\n --highlight-selected-bg-color: ButtonText;\n }\n}\n\n[data-main-rotation='90'] {\n transform: rotate(90deg) translateY(-100%);\n}\n[data-main-rotation='180'] {\n transform: rotate(180deg) translate(-100%, -100%);\n}\n[data-main-rotation='270'] {\n transform: rotate(270deg) translateX(-100%);\n}\n\n.textLayer {\n position: absolute;\n text-align: initial;\n inset: 0;\n overflow: hidden;\n line-height: 1;\n text-size-adjust: none;\n forced-color-adjust: none;\n transform-origin: 0 0;\n z-index: 2;\n}\n\n.textLayer :is(span, br) {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n margin: 0;\n transform-origin: 0 0;\n}\n\n/* Only necessary in Google Chrome, see issue 14205, and most unfortunately\n * the problem doesn't show up in \"text\" reference tests. */\n.textLayer span.markedContent {\n top: 0;\n height: 0;\n}\n\n.textLayer .highlight {\n margin: -1px;\n padding: 1px;\n background-color: var(--highlight-bg-color);\n border-radius: 4px;\n}\n\n.textLayer .highlight.appended {\n position: initial;\n}\n\n.textLayer .highlight.begin {\n border-radius: 4px 0 0 4px;\n}\n\n.textLayer .highlight.end {\n border-radius: 0 4px 4px 0;\n}\n\n.textLayer .highlight.middle {\n border-radius: 0;\n}\n\n.textLayer .highlight.selected {\n background-color: var(--highlight-selected-bg-color);\n}\n\n/* Avoids https://github.com/mozilla/pdf.js/issues/13840 in Chrome */\n.textLayer br::selection {\n background: transparent;\n}\n\n.textLayer .endOfContent {\n display: block;\n position: absolute;\n inset: 100% 0 0;\n z-index: -1;\n cursor: default;\n user-select: none;\n}\n\n.textLayer .endOfContent.active {\n top: 0;\n}\n"],"mappings":";AAeA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACE;AACA;AACA;AACA;AACA;AAAA;AAEF;AAAA;AAAA;AAGE;AAAA;AAGF;AACE;AAAA;AAAA;AAIJ;AACE;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AAAA;AAAA;AAGE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AAAA;AAAA;AAGE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AAAA;AAAA;AAGE;AACA;AACA;AAAA;AAGF;AAAA;AAAA;AAGE;AAAA;AAEF;AAAA;AAAA;AAGE;AAAA;AAGF;AAAA;AAEE;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AAAA;AAAA;AAGE;AACA;AACA;AACA;AAAA;AAGF;AAAA;AAEE;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AAOE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;;;ACxTF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACE;AACA;AAAA;AAAA;AAIJ;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AAAA;AAKF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAIF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;","names":[]}
1
+ {"version":3,"sources":["../src/PdfReader/pdfReader.css"],"sourcesContent":[".react-pdf__Document {\n scrollbar-color: #8d8d8d #424242;\n display: flex;\n flex-direction: column;\n background: #252525;\n gap: 8px;\n\n > div {\n background: #252525;\n }\n}\n\n.react-pdf__Page {\n display: block;\n background: #252525 !important;\n}\n\n.react-pdf__Page {\n canvas,\n .textLayer,\n .annotationLayer {\n display: block;\n margin: 0 auto;\n }\n}\n"],"mappings":";AAAA,CAAC;AACC,mBAAiB,QAAQ;AACzB,WAAS;AACT,kBAAgB;AAChB,cAAY;AACZ,OAAK;AAKP;AAVA,CAAC,oBAOC,EAAE;AACA,cAAY;AACd;AAGF,CAAC;AACC,WAAS;AACT,cAAY;AACd;AAEA,CALC,gBAMC;AADF,CALC,gBAOC,CAAC;AAFH,CALC,gBAQC,CAAC;AACC,WAAS;AACT,UAAQ,EAAE;AACZ;","names":[]}