@edgepdf/viewer-react 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.
@@ -0,0 +1,340 @@
1
+ /* Re-export Leaflet CSS for convenience */
2
+ @import 'leaflet/dist/leaflet.css';
3
+
4
+ /* Seamless tile rendering - removes borders and gaps between tiles */
5
+ .seamless-tiles img,
6
+ .leaflet-tile {
7
+ border: none !important;
8
+ outline: none !important;
9
+ margin: 0 !important;
10
+ padding: 0 !important;
11
+ }
12
+
13
+ .leaflet-layer {
14
+ border: none !important;
15
+ }
16
+
17
+ /* Marker tooltip alignment */
18
+ .edgepdf-marker-tooltip {
19
+ text-align: center;
20
+ white-space: nowrap;
21
+ }
22
+
23
+ /* Center the tooltip arrow */
24
+ .leaflet-tooltip-top.edgepdf-marker-tooltip::before,
25
+ .leaflet-tooltip-bottom.edgepdf-marker-tooltip::before {
26
+ left: 50% !important;
27
+ margin-left: -8px !important;
28
+ }
29
+
30
+ .leaflet-tooltip-left.edgepdf-marker-tooltip::before,
31
+ .leaflet-tooltip-right.edgepdf-marker-tooltip::before {
32
+ top: 50% !important;
33
+ margin-top: -8px !important;
34
+ }
35
+
36
+ /* Marker popup action buttons */
37
+ .edgepdf-marker-popup-actions {
38
+ display: flex;
39
+ gap: 8px;
40
+ margin-top: 12px;
41
+ padding-top: 12px;
42
+ border-top: 1px solid #e0e0e0;
43
+ }
44
+
45
+ .edgepdf-marker-popup-edit,
46
+ .edgepdf-marker-popup-delete {
47
+ flex: 1;
48
+ padding: 6px 12px;
49
+ border: 1px solid #ccc;
50
+ border-radius: 4px;
51
+ background-color: #fff;
52
+ color: #333;
53
+ cursor: pointer;
54
+ font-size: 14px;
55
+ transition: all 0.2s ease;
56
+ }
57
+
58
+ .edgepdf-marker-popup-edit:hover {
59
+ background-color: #f0f0f0;
60
+ border-color: #999;
61
+ }
62
+
63
+ .edgepdf-marker-popup-delete {
64
+ color: #d32f2f;
65
+ border-color: #d32f2f;
66
+ }
67
+
68
+ .edgepdf-marker-popup-delete:hover {
69
+ background-color: #ffebee;
70
+ border-color: #b71c1c;
71
+ }
72
+
73
+ /* Edit popup modal */
74
+ .edgepdf-marker-edit-popup {
75
+ position: fixed;
76
+ top: 0;
77
+ left: 0;
78
+ right: 0;
79
+ bottom: 0;
80
+ z-index: 100000;
81
+ display: flex;
82
+ align-items: center;
83
+ justify-content: center;
84
+ }
85
+
86
+ .edgepdf-marker-edit-popup-overlay {
87
+ position: absolute;
88
+ top: 0;
89
+ left: 0;
90
+ right: 0;
91
+ bottom: 0;
92
+ background-color: rgba(0, 0, 0, 0.5);
93
+ cursor: pointer;
94
+ }
95
+
96
+ .edgepdf-marker-edit-popup-content {
97
+ position: relative;
98
+ background-color: #fff;
99
+ border-radius: 8px;
100
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
101
+ width: 90%;
102
+ max-width: 500px;
103
+ max-height: 90vh;
104
+ overflow: auto;
105
+ z-index: 100001;
106
+ }
107
+
108
+ .edgepdf-marker-edit-popup-header {
109
+ display: flex;
110
+ justify-content: space-between;
111
+ align-items: center;
112
+ padding: 16px 20px;
113
+ border-bottom: 1px solid #e0e0e0;
114
+ }
115
+
116
+ .edgepdf-marker-edit-popup-header h3 {
117
+ margin: 0;
118
+ font-size: 18px;
119
+ font-weight: 600;
120
+ color: #333;
121
+ }
122
+
123
+ .edgepdf-marker-edit-popup-close {
124
+ background: none;
125
+ border: none;
126
+ font-size: 24px;
127
+ line-height: 1;
128
+ color: #666;
129
+ cursor: pointer;
130
+ padding: 0;
131
+ width: 32px;
132
+ height: 32px;
133
+ display: flex;
134
+ align-items: center;
135
+ justify-content: center;
136
+ border-radius: 4px;
137
+ transition: background-color 0.2s ease;
138
+ }
139
+
140
+ .edgepdf-marker-edit-popup-close:hover {
141
+ background-color: #f0f0f0;
142
+ color: #333;
143
+ }
144
+
145
+ .edgepdf-marker-edit-popup-body {
146
+ padding: 20px;
147
+ }
148
+
149
+ .edgepdf-marker-edit-field {
150
+ margin-bottom: 16px;
151
+ }
152
+
153
+ .edgepdf-marker-edit-field:last-child {
154
+ margin-bottom: 0;
155
+ }
156
+
157
+ .edgepdf-marker-edit-field label {
158
+ display: block;
159
+ margin-bottom: 8px;
160
+ font-size: 14px;
161
+ font-weight: 500;
162
+ color: #333;
163
+ }
164
+
165
+ .edgepdf-marker-edit-input {
166
+ width: 100%;
167
+ padding: 10px 12px;
168
+ border: 1px solid #ccc;
169
+ border-radius: 4px;
170
+ font-size: 14px;
171
+ box-sizing: border-box;
172
+ transition: border-color 0.2s ease;
173
+ }
174
+
175
+ .edgepdf-marker-edit-input:focus {
176
+ outline: none;
177
+ border-color: #1976d2;
178
+ box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
179
+ }
180
+
181
+ .edgepdf-marker-edit-popup-footer {
182
+ display: flex;
183
+ justify-content: flex-end;
184
+ gap: 12px;
185
+ padding: 16px 20px;
186
+ border-top: 1px solid #e0e0e0;
187
+ }
188
+
189
+ .edgepdf-marker-edit-button {
190
+ padding: 10px 20px;
191
+ border: 1px solid #ccc;
192
+ border-radius: 4px;
193
+ background-color: #fff;
194
+ color: #333;
195
+ cursor: pointer;
196
+ font-size: 14px;
197
+ font-weight: 500;
198
+ transition: all 0.2s ease;
199
+ }
200
+
201
+ .edgepdf-marker-edit-button-cancel:hover {
202
+ background-color: #f0f0f0;
203
+ border-color: #999;
204
+ }
205
+
206
+ .edgepdf-marker-edit-button-save {
207
+ background-color: #1976d2;
208
+ color: #fff;
209
+ border-color: #1976d2;
210
+ }
211
+
212
+ .edgepdf-marker-edit-button-save:hover {
213
+ background-color: #1565c0;
214
+ border-color: #1565c0;
215
+ }
216
+
217
+ /* Delete popup modal - reuses most edit popup styles */
218
+ .edgepdf-marker-delete-popup {
219
+ position: fixed;
220
+ top: 0;
221
+ left: 0;
222
+ right: 0;
223
+ bottom: 0;
224
+ z-index: 100000;
225
+ display: flex;
226
+ align-items: center;
227
+ justify-content: center;
228
+ }
229
+
230
+ .edgepdf-marker-delete-popup-overlay {
231
+ position: absolute;
232
+ top: 0;
233
+ left: 0;
234
+ right: 0;
235
+ bottom: 0;
236
+ background-color: rgba(0, 0, 0, 0.5);
237
+ cursor: pointer;
238
+ }
239
+
240
+ .edgepdf-marker-delete-popup-content {
241
+ position: relative;
242
+ background-color: #fff;
243
+ border-radius: 8px;
244
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
245
+ width: 90%;
246
+ max-width: 500px;
247
+ max-height: 90vh;
248
+ overflow: auto;
249
+ z-index: 100001;
250
+ }
251
+
252
+ .edgepdf-marker-delete-popup-header {
253
+ display: flex;
254
+ justify-content: space-between;
255
+ align-items: center;
256
+ padding: 16px 20px;
257
+ border-bottom: 1px solid #e0e0e0;
258
+ }
259
+
260
+ .edgepdf-marker-delete-popup-header h3 {
261
+ margin: 0;
262
+ font-size: 18px;
263
+ font-weight: 600;
264
+ color: #333;
265
+ }
266
+
267
+ .edgepdf-marker-delete-popup-close {
268
+ background: none;
269
+ border: none;
270
+ font-size: 24px;
271
+ line-height: 1;
272
+ color: #666;
273
+ cursor: pointer;
274
+ padding: 0;
275
+ width: 32px;
276
+ height: 32px;
277
+ display: flex;
278
+ align-items: center;
279
+ justify-content: center;
280
+ border-radius: 4px;
281
+ transition: background-color 0.2s ease;
282
+ }
283
+
284
+ .edgepdf-marker-delete-popup-close:hover {
285
+ background-color: #f0f0f0;
286
+ color: #333;
287
+ }
288
+
289
+ .edgepdf-marker-delete-popup-body {
290
+ padding: 20px;
291
+ }
292
+
293
+ .edgepdf-marker-delete-popup-body p {
294
+ margin: 0;
295
+ font-size: 14px;
296
+ color: #333;
297
+ line-height: 1.5;
298
+ }
299
+
300
+ .edgepdf-marker-delete-popup-body strong {
301
+ font-weight: 600;
302
+ color: #d32f2f;
303
+ }
304
+
305
+ .edgepdf-marker-delete-popup-footer {
306
+ display: flex;
307
+ justify-content: flex-end;
308
+ gap: 12px;
309
+ padding: 16px 20px;
310
+ border-top: 1px solid #e0e0e0;
311
+ }
312
+
313
+ .edgepdf-marker-delete-button {
314
+ padding: 10px 20px;
315
+ border: 1px solid #ccc;
316
+ border-radius: 4px;
317
+ background-color: #fff;
318
+ color: #333;
319
+ cursor: pointer;
320
+ font-size: 14px;
321
+ font-weight: 500;
322
+ transition: all 0.2s ease;
323
+ }
324
+
325
+ .edgepdf-marker-delete-button-cancel:hover {
326
+ background-color: #f0f0f0;
327
+ border-color: #999;
328
+ }
329
+
330
+ .edgepdf-marker-delete-button-confirm {
331
+ background-color: #d32f2f;
332
+ color: #fff;
333
+ border-color: #d32f2f;
334
+ }
335
+
336
+ .edgepdf-marker-delete-button-confirm:hover {
337
+ background-color: #b71c1c;
338
+ border-color: #b71c1c;
339
+ }
340
+
@@ -0,0 +1,2 @@
1
+ import '@testing-library/jest-dom';
2
+ //# sourceMappingURL=test-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-setup.d.ts","sourceRoot":"","sources":["../src/test-setup.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
package/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "@edgepdf/viewer-react",
3
+ "version": "0.0.1",
4
+ "description": "EdgePDF Viewer - React components for viewing PDF documents with interactive markers and zoom controls",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/EdgeTechStudio/EdgePDF.git",
13
+ "directory": "packages/viewer-react"
14
+ },
15
+ "keywords": [
16
+ "pdf",
17
+ "viewer",
18
+ "react",
19
+ "leaflet",
20
+ "markers",
21
+ "zoom",
22
+ "interactive",
23
+ "components"
24
+ ],
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "exports": {
29
+ "./package.json": "./package.json",
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "import": "./dist/index.js",
33
+ "require": "./dist/index.js",
34
+ "default": "./dist/index.js"
35
+ },
36
+ "./styles.css": "./dist/styles.css"
37
+ },
38
+ "files": [
39
+ "dist",
40
+ "!**/*.tsbuildinfo"
41
+ ],
42
+ "nx": {
43
+ "targets": {
44
+ "build": {
45
+ "executor": "@nx/esbuild:esbuild",
46
+ "outputs": [
47
+ "{options.outputPath}"
48
+ ],
49
+ "options": {
50
+ "outputPath": "packages/viewer-react/dist",
51
+ "main": "packages/viewer-react/src/index.ts",
52
+ "tsConfig": "packages/viewer-react/tsconfig.lib.json",
53
+ "format": [
54
+ "esm"
55
+ ],
56
+ "declarationRootDir": "packages/viewer-react/src"
57
+ }
58
+ }
59
+ }
60
+ },
61
+ "dependencies": {},
62
+ "devDependencies": {
63
+ "@edgepdf/viewer-js": "workspace:*",
64
+ "@edgepdf/types": "workspace:*",
65
+ "@edgepdf/utils": "workspace:*",
66
+ "@edgepdf/testing-utils": "workspace:*"
67
+ },
68
+ "peerDependencies": {
69
+ "react": "^18.0.0",
70
+ "react-dom": "^18.0.0"
71
+ }
72
+ }