@cannyminds/dms-file-viewers 0.19.0 → 0.20.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/dist/{chunk-RTQRDZSN.js → chunk-26SS5FLZ.js} +683 -358
- package/dist/chunk-26SS5FLZ.js.map +1 -0
- package/dist/{chunk-ZTKUXLTZ.mjs → chunk-4XX5VZA2.mjs} +2 -2
- package/dist/chunk-5ECHDPQZ.js +425 -0
- package/dist/chunk-5ECHDPQZ.js.map +1 -0
- package/dist/{chunk-TOGDBQAN.js → chunk-AVQCUOWM.js} +4 -4
- package/dist/{chunk-TOGDBQAN.js.map → chunk-AVQCUOWM.js.map} +1 -1
- package/dist/{chunk-TQXRQCS4.mjs → chunk-IY5EEUCU.mjs} +655 -330
- package/dist/chunk-IY5EEUCU.mjs.map +1 -0
- package/dist/chunk-UVF6YOXY.mjs +425 -0
- package/dist/chunk-UVF6YOXY.mjs.map +1 -0
- package/dist/components/viewers/AudioViewer.d.mts +1 -1
- package/dist/components/viewers/AudioViewer.d.ts +1 -1
- package/dist/components/viewers/DefaultViewer.d.mts +1 -1
- package/dist/components/viewers/DefaultViewer.d.ts +1 -1
- package/dist/components/viewers/ImageViewer.d.mts +1 -1
- package/dist/components/viewers/ImageViewer.d.ts +1 -1
- package/dist/components/viewers/ImageViewer.js +3 -3
- package/dist/components/viewers/ImageViewer.mjs +2 -2
- package/dist/components/viewers/PDFViewer.d.mts +18 -1
- package/dist/components/viewers/PDFViewer.d.ts +18 -1
- package/dist/components/viewers/PDFViewer.js +3 -3
- package/dist/components/viewers/PDFViewer.mjs +2 -2
- package/dist/components/viewers/TIFFViewer.d.mts +1 -1
- package/dist/components/viewers/TIFFViewer.d.ts +1 -1
- package/dist/components/viewers/TextViewer.d.mts +1 -1
- package/dist/components/viewers/TextViewer.d.ts +1 -1
- package/dist/components/viewers/VideoViewer.d.mts +1 -1
- package/dist/components/viewers/VideoViewer.d.ts +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/index.mjs +3 -3
- package/dist/{types-DM0RG-Yu.d.mts → types-DFkMK86Q.d.mts} +18 -1
- package/dist/{types-DM0RG-Yu.d.ts → types-DFkMK86Q.d.ts} +18 -1
- package/package.json +1 -1
- package/dist/chunk-GMD6QQLG.js +0 -154
- package/dist/chunk-GMD6QQLG.js.map +0 -1
- package/dist/chunk-PPELANB4.mjs +0 -154
- package/dist/chunk-PPELANB4.mjs.map +0 -1
- package/dist/chunk-RTQRDZSN.js.map +0 -1
- package/dist/chunk-TQXRQCS4.mjs.map +0 -1
- /package/dist/{chunk-ZTKUXLTZ.mjs.map → chunk-4XX5VZA2.mjs.map} +0 -0
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/viewers/pdf/PDFStyles.tsx
|
|
4
|
+
var toolbarStyles = `
|
|
5
|
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
|
|
6
|
+
|
|
7
|
+
* {
|
|
8
|
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
9
|
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
10
|
+
'Noto Sans Tamil', 'Noto Sans Devanagari', sans-serif !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Target PDF.js text layer */
|
|
14
|
+
.textLayer,
|
|
15
|
+
.textLayer span,
|
|
16
|
+
.textLayer div,
|
|
17
|
+
[class*="pdf"],
|
|
18
|
+
[class*="page"],
|
|
19
|
+
canvas + div,
|
|
20
|
+
.embedpdf-viewport *,
|
|
21
|
+
[data-pdf-viewer] *,
|
|
22
|
+
[role="document"] * {
|
|
23
|
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
24
|
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
25
|
+
'Noto Sans Tamil', 'Noto Sans Devanagari', sans-serif !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.pdf-viewer-header {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: flex-start;
|
|
32
|
+
gap: 8px;
|
|
33
|
+
padding: 2px 12px 0 12px;
|
|
34
|
+
background: #fff;
|
|
35
|
+
min-height: 32px;
|
|
36
|
+
}
|
|
37
|
+
.header-file-name {
|
|
38
|
+
font-size: 13px;
|
|
39
|
+
font-weight: 500;
|
|
40
|
+
color: #374151;
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
max-width: 400px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ========== COMPACT TOOLBAR ========== */
|
|
48
|
+
.pdf-viewer-toolbar {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
padding: 6px 12px;
|
|
53
|
+
background: #ffffff;
|
|
54
|
+
border-bottom: 1px solid #e5e7eb;
|
|
55
|
+
gap: 4px;
|
|
56
|
+
flex-wrap: nowrap;
|
|
57
|
+
min-height: 44px;
|
|
58
|
+
}
|
|
59
|
+
.toolbar-left {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
gap: 2px;
|
|
63
|
+
flex: 1;
|
|
64
|
+
min-width: 0;
|
|
65
|
+
}
|
|
66
|
+
.toolbar-right {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: 2px;
|
|
70
|
+
margin-left: auto;
|
|
71
|
+
}
|
|
72
|
+
.toolbar-section {
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
gap: 2px;
|
|
76
|
+
padding: 0;
|
|
77
|
+
}
|
|
78
|
+
.toolbar-separator {
|
|
79
|
+
width: 1px;
|
|
80
|
+
height: 20px;
|
|
81
|
+
background: #e5e7eb;
|
|
82
|
+
margin: 0 8px;
|
|
83
|
+
flex-shrink: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* ========== COMPACT BUTTONS ========== */
|
|
87
|
+
.toolbar-button {
|
|
88
|
+
padding: 6px;
|
|
89
|
+
border: none;
|
|
90
|
+
background: transparent;
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
border-radius: 6px;
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
transition: background-color 0.15s ease;
|
|
97
|
+
position: relative;
|
|
98
|
+
min-width: 32px;
|
|
99
|
+
min-height: 32px;
|
|
100
|
+
color: #4b5563;
|
|
101
|
+
}
|
|
102
|
+
.toolbar-button:hover:not(:disabled) {
|
|
103
|
+
background: #f3f4f6;
|
|
104
|
+
color: #111827;
|
|
105
|
+
}
|
|
106
|
+
.toolbar-button:active:not(:disabled) {
|
|
107
|
+
background: #e5e7eb;
|
|
108
|
+
}
|
|
109
|
+
.toolbar-button:disabled {
|
|
110
|
+
opacity: 0.4;
|
|
111
|
+
cursor: not-allowed;
|
|
112
|
+
}
|
|
113
|
+
.toolbar-button svg {
|
|
114
|
+
width: 18px;
|
|
115
|
+
height: 18px;
|
|
116
|
+
display: block;
|
|
117
|
+
}
|
|
118
|
+
.toolbar-button-active {
|
|
119
|
+
background: #eff6ff !important;
|
|
120
|
+
color: #2563eb !important;
|
|
121
|
+
}
|
|
122
|
+
.toolbar-button-active:hover:not(:disabled) {
|
|
123
|
+
background: #dbeafe !important;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* ========== PAGE NAVIGATION ========== */
|
|
127
|
+
.page-input {
|
|
128
|
+
width: 44px;
|
|
129
|
+
padding: 4px 6px;
|
|
130
|
+
border: 1px solid #d1d5db;
|
|
131
|
+
border-radius: 6px;
|
|
132
|
+
text-align: center;
|
|
133
|
+
font-size: 13px;
|
|
134
|
+
font-weight: 500;
|
|
135
|
+
color: #374151;
|
|
136
|
+
background: #fff;
|
|
137
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
138
|
+
}
|
|
139
|
+
.page-input:focus {
|
|
140
|
+
outline: none;
|
|
141
|
+
border-color: #3b82f6;
|
|
142
|
+
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
|
|
143
|
+
}
|
|
144
|
+
.page-info {
|
|
145
|
+
font-size: 13px;
|
|
146
|
+
color: #6b7280;
|
|
147
|
+
white-space: nowrap;
|
|
148
|
+
font-weight: 500;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* ========== ZOOM DISPLAY ========== */
|
|
152
|
+
.zoom-display {
|
|
153
|
+
min-width: 48px;
|
|
154
|
+
text-align: center;
|
|
155
|
+
font-size: 13px;
|
|
156
|
+
font-weight: 500;
|
|
157
|
+
color: #374151;
|
|
158
|
+
padding: 4px 8px;
|
|
159
|
+
background: #f9fafb;
|
|
160
|
+
border-radius: 6px;
|
|
161
|
+
border: 1px solid #e5e7eb;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.search-input {
|
|
165
|
+
padding: 6px 10px;
|
|
166
|
+
border: 1px solid #d1d5db;
|
|
167
|
+
border-radius: 6px;
|
|
168
|
+
font-size: 13px;
|
|
169
|
+
min-width: 180px;
|
|
170
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
171
|
+
}
|
|
172
|
+
.search-input:focus {
|
|
173
|
+
outline: none;
|
|
174
|
+
border-color: #3b82f6;
|
|
175
|
+
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* ========== VIEWER CONTENT ========== */
|
|
179
|
+
.pdf-viewer-content {
|
|
180
|
+
flex: 1;
|
|
181
|
+
overflow: hidden;
|
|
182
|
+
position: relative;
|
|
183
|
+
user-select: text;
|
|
184
|
+
-webkit-user-select: text;
|
|
185
|
+
-moz-user-select: text;
|
|
186
|
+
-ms-user-select: text;
|
|
187
|
+
background-color: #efefef;
|
|
188
|
+
}
|
|
189
|
+
.pdf-viewer-container {
|
|
190
|
+
display: flex;
|
|
191
|
+
flex-direction: column;
|
|
192
|
+
height: 100%;
|
|
193
|
+
width: 100%;
|
|
194
|
+
background-color: #efefef;
|
|
195
|
+
}
|
|
196
|
+
.pdf-viewer-main {
|
|
197
|
+
display: flex;
|
|
198
|
+
flex: 1;
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
position: relative;
|
|
201
|
+
background-color: #efefef;
|
|
202
|
+
}
|
|
203
|
+
.pdf-viewer-viewer-area {
|
|
204
|
+
flex: 1;
|
|
205
|
+
overflow: hidden;
|
|
206
|
+
position: relative;
|
|
207
|
+
background-color: #efefef; /* Ensure background matches viewer gray */
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* Override library's inline userSelect: none */
|
|
211
|
+
.pdf-viewer-viewer-area div[style*="userSelect"] {
|
|
212
|
+
user-select: auto !important;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* ========== PRINT DROPDOWN ========== */
|
|
216
|
+
.print-dropdown-container {
|
|
217
|
+
position: relative;
|
|
218
|
+
display: inline-flex;
|
|
219
|
+
}
|
|
220
|
+
.print-dropdown-trigger {
|
|
221
|
+
display: flex;
|
|
222
|
+
align-items: center;
|
|
223
|
+
gap: 2px;
|
|
224
|
+
}
|
|
225
|
+
.print-dropdown-menu {
|
|
226
|
+
position: absolute;
|
|
227
|
+
top: 100%;
|
|
228
|
+
right: 0;
|
|
229
|
+
margin-top: 4px;
|
|
230
|
+
background: #ffffff;
|
|
231
|
+
border: 1px solid #e5e7eb;
|
|
232
|
+
border-radius: 8px;
|
|
233
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
234
|
+
min-width: 200px;
|
|
235
|
+
z-index: 1000;
|
|
236
|
+
overflow: hidden;
|
|
237
|
+
}
|
|
238
|
+
.print-dropdown-item {
|
|
239
|
+
display: block;
|
|
240
|
+
width: 100%;
|
|
241
|
+
padding: 10px 14px;
|
|
242
|
+
border: none;
|
|
243
|
+
background: transparent;
|
|
244
|
+
text-align: left;
|
|
245
|
+
font-size: 13px;
|
|
246
|
+
font-weight: 500;
|
|
247
|
+
color: #374151;
|
|
248
|
+
cursor: pointer;
|
|
249
|
+
transition: background-color 0.15s ease;
|
|
250
|
+
}
|
|
251
|
+
.print-dropdown-item:hover {
|
|
252
|
+
background: #f3f4f6;
|
|
253
|
+
}
|
|
254
|
+
.print-dropdown-item:active {
|
|
255
|
+
background: #e5e7eb;
|
|
256
|
+
}
|
|
257
|
+
.print-dropdown-item + .print-dropdown-item {
|
|
258
|
+
border-top: 1px solid #f3f4f6;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/* ========== TOOLBAR DROPDOWN (Annotation Menu) ========== */
|
|
262
|
+
.toolbar-dropdown-container {
|
|
263
|
+
position: relative;
|
|
264
|
+
display: inline-flex;
|
|
265
|
+
}
|
|
266
|
+
.toolbar-dropdown-button {
|
|
267
|
+
display: flex;
|
|
268
|
+
align-items: center;
|
|
269
|
+
gap: 2px;
|
|
270
|
+
}
|
|
271
|
+
.toolbar-dropdown-menu {
|
|
272
|
+
position: absolute;
|
|
273
|
+
top: 100%;
|
|
274
|
+
left: 0;
|
|
275
|
+
margin-top: 4px;
|
|
276
|
+
background: #ffffff;
|
|
277
|
+
border: 1px solid #e5e7eb;
|
|
278
|
+
border-radius: 8px;
|
|
279
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
280
|
+
min-width: 150px;
|
|
281
|
+
z-index: 1000;
|
|
282
|
+
overflow: hidden;
|
|
283
|
+
}
|
|
284
|
+
.toolbar-dropdown-menu-right {
|
|
285
|
+
left: auto;
|
|
286
|
+
right: 0;
|
|
287
|
+
}
|
|
288
|
+
.toolbar-dropdown-item {
|
|
289
|
+
display: flex;
|
|
290
|
+
align-items: center;
|
|
291
|
+
gap: 8px;
|
|
292
|
+
width: 100%;
|
|
293
|
+
padding: 10px 14px;
|
|
294
|
+
border: none;
|
|
295
|
+
background: transparent;
|
|
296
|
+
text-align: left;
|
|
297
|
+
font-size: 13px;
|
|
298
|
+
font-weight: 500;
|
|
299
|
+
color: #374151;
|
|
300
|
+
cursor: pointer;
|
|
301
|
+
transition: background-color 0.15s ease;
|
|
302
|
+
}
|
|
303
|
+
.toolbar-dropdown-item:hover {
|
|
304
|
+
background: #f3f4f6;
|
|
305
|
+
}
|
|
306
|
+
.toolbar-dropdown-item:active {
|
|
307
|
+
background: #e5e7eb;
|
|
308
|
+
}
|
|
309
|
+
.toolbar-dropdown-item:disabled {
|
|
310
|
+
opacity: 0.5;
|
|
311
|
+
cursor: not-allowed;
|
|
312
|
+
}
|
|
313
|
+
.toolbar-dropdown-item + .toolbar-dropdown-item {
|
|
314
|
+
border-top: 1px solid #f3f4f6;
|
|
315
|
+
}
|
|
316
|
+
.toolbar-dropdown-item svg {
|
|
317
|
+
font-size: 18px;
|
|
318
|
+
color: #6b7280;
|
|
319
|
+
}
|
|
320
|
+
.toolbar-dropdown-item-active {
|
|
321
|
+
background: #eff6ff;
|
|
322
|
+
color: #2563eb;
|
|
323
|
+
}
|
|
324
|
+
.toolbar-dropdown-item-active svg {
|
|
325
|
+
color: #2563eb;
|
|
326
|
+
}
|
|
327
|
+
.toolbar-dropdown-divider {
|
|
328
|
+
height: 1px;
|
|
329
|
+
background: #e5e7eb;
|
|
330
|
+
margin: 4px 0;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
/* ========== TOOLTIP STYLES ========== */
|
|
336
|
+
.toolbar-button[title]:hover::after {
|
|
337
|
+
content: attr(title);
|
|
338
|
+
position: absolute;
|
|
339
|
+
bottom: -32px;
|
|
340
|
+
left: 50%;
|
|
341
|
+
transform: translateX(-50%);
|
|
342
|
+
padding: 6px 10px;
|
|
343
|
+
background: #1f2937;
|
|
344
|
+
color: white;
|
|
345
|
+
font-size: 12px;
|
|
346
|
+
font-weight: 500;
|
|
347
|
+
border-radius: 6px;
|
|
348
|
+
white-space: nowrap;
|
|
349
|
+
z-index: 1000;
|
|
350
|
+
pointer-events: none;
|
|
351
|
+
opacity: 0;
|
|
352
|
+
animation: fadeIn 0.2s ease-out 0.3s forwards;
|
|
353
|
+
}
|
|
354
|
+
@keyframes fadeIn {
|
|
355
|
+
to { opacity: 1; }
|
|
356
|
+
}
|
|
357
|
+
/* ========== SECONDARY TOOLBAR & TABS ========== */
|
|
358
|
+
.pdf-viewer-toolbar-container {
|
|
359
|
+
display: flex;
|
|
360
|
+
flex-direction: column;
|
|
361
|
+
width: 100%;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.pdf-viewer-secondary-toolbar {
|
|
365
|
+
display: flex;
|
|
366
|
+
align-items: center;
|
|
367
|
+
justify-content: center;
|
|
368
|
+
padding: 8px 16px;
|
|
369
|
+
background-color: #f9fafb;
|
|
370
|
+
border-bottom: 1px solid #e5e7eb;
|
|
371
|
+
gap: 12px;
|
|
372
|
+
width: 100%;
|
|
373
|
+
box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
|
|
374
|
+
animation: slideDown 0.2s ease-out;
|
|
375
|
+
transform-origin: top;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
@keyframes slideDown {
|
|
379
|
+
from { opacity: 0; transform: scaleY(0.95); }
|
|
380
|
+
to { opacity: 1; transform: scaleY(1); }
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.toolbar-center {
|
|
384
|
+
display: flex;
|
|
385
|
+
align-items: center;
|
|
386
|
+
gap: 4px;
|
|
387
|
+
margin: 0 16px;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.toolbar-tab {
|
|
391
|
+
background: none;
|
|
392
|
+
border: none;
|
|
393
|
+
padding: 6px 12px;
|
|
394
|
+
font-size: 14px;
|
|
395
|
+
font-weight: 500;
|
|
396
|
+
color: #6b7280;
|
|
397
|
+
cursor: pointer;
|
|
398
|
+
border-radius: 6px;
|
|
399
|
+
transition: all 0.2s ease;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.toolbar-tab:hover {
|
|
403
|
+
background-color: #f3f4f6;
|
|
404
|
+
color: #374151;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.toolbar-tab-active {
|
|
408
|
+
color: #2563eb;
|
|
409
|
+
background-color: #eff6ff;
|
|
410
|
+
font-weight: 600;
|
|
411
|
+
}
|
|
412
|
+
.toolbar-dropdown-header {
|
|
413
|
+
font-size: 11px;
|
|
414
|
+
font-weight: 600;
|
|
415
|
+
color: #6b7280;
|
|
416
|
+
padding: 8px 12px 4px 12px;
|
|
417
|
+
letter-spacing: 0.5px;
|
|
418
|
+
text-transform: uppercase;
|
|
419
|
+
}
|
|
420
|
+
`;
|
|
421
|
+
|
|
422
|
+
export {
|
|
423
|
+
toolbarStyles
|
|
424
|
+
};
|
|
425
|
+
//# sourceMappingURL=chunk-UVF6YOXY.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/viewers/pdf/PDFStyles.tsx"],"sourcesContent":["export const toolbarStyles = `\r\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');\r\n\r\n * {\r\n font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\r\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\r\n 'Noto Sans Tamil', 'Noto Sans Devanagari', sans-serif !important;\r\n }\r\n\r\n /* Target PDF.js text layer */\r\n .textLayer,\r\n .textLayer span,\r\n .textLayer div,\r\n [class*=\"pdf\"],\r\n [class*=\"page\"],\r\n canvas + div,\r\n .embedpdf-viewport *,\r\n [data-pdf-viewer] *,\r\n [role=\"document\"] * {\r\n font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\r\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\r\n 'Noto Sans Tamil', 'Noto Sans Devanagari', sans-serif !important;\r\n }\r\n\r\n .pdf-viewer-header {\r\n display: flex;\r\n align-items: center;\r\n justify-content: flex-start;\r\n gap: 8px;\r\n padding: 2px 12px 0 12px;\r\n background: #fff;\r\n min-height: 32px;\r\n }\r\n .header-file-name {\r\n font-size: 13px;\r\n font-weight: 500;\r\n color: #374151;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n max-width: 400px;\r\n }\r\n\r\n /* ========== COMPACT TOOLBAR ========== */\r\n .pdf-viewer-toolbar {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding: 6px 12px;\r\n background: #ffffff;\r\n border-bottom: 1px solid #e5e7eb;\r\n gap: 4px;\r\n flex-wrap: nowrap;\r\n min-height: 44px;\r\n }\r\n .toolbar-left {\r\n display: flex;\r\n align-items: center;\r\n gap: 2px;\r\n flex: 1;\r\n min-width: 0;\r\n }\r\n .toolbar-right {\r\n display: flex;\r\n align-items: center;\r\n gap: 2px;\r\n margin-left: auto;\r\n }\r\n .toolbar-section {\r\n display: flex;\r\n align-items: center;\r\n gap: 2px;\r\n padding: 0;\r\n }\r\n .toolbar-separator {\r\n width: 1px;\r\n height: 20px;\r\n background: #e5e7eb;\r\n margin: 0 8px;\r\n flex-shrink: 0;\r\n }\r\n\r\n /* ========== COMPACT BUTTONS ========== */\r\n .toolbar-button {\r\n padding: 6px;\r\n border: none;\r\n background: transparent;\r\n cursor: pointer;\r\n border-radius: 6px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: background-color 0.15s ease;\r\n position: relative;\r\n min-width: 32px;\r\n min-height: 32px;\r\n color: #4b5563;\r\n }\r\n .toolbar-button:hover:not(:disabled) {\r\n background: #f3f4f6;\r\n color: #111827;\r\n }\r\n .toolbar-button:active:not(:disabled) {\r\n background: #e5e7eb;\r\n }\r\n .toolbar-button:disabled {\r\n opacity: 0.4;\r\n cursor: not-allowed;\r\n }\r\n .toolbar-button svg {\r\n width: 18px;\r\n height: 18px;\r\n display: block;\r\n }\r\n .toolbar-button-active {\r\n background: #eff6ff !important;\r\n color: #2563eb !important;\r\n }\r\n .toolbar-button-active:hover:not(:disabled) {\r\n background: #dbeafe !important;\r\n }\r\n\r\n /* ========== PAGE NAVIGATION ========== */\r\n .page-input {\r\n width: 44px;\r\n padding: 4px 6px;\r\n border: 1px solid #d1d5db;\r\n border-radius: 6px;\r\n text-align: center;\r\n font-size: 13px;\r\n font-weight: 500;\r\n color: #374151;\r\n background: #fff;\r\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\r\n }\r\n .page-input:focus {\r\n outline: none;\r\n border-color: #3b82f6;\r\n box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);\r\n }\r\n .page-info {\r\n font-size: 13px;\r\n color: #6b7280;\r\n white-space: nowrap;\r\n font-weight: 500;\r\n }\r\n\r\n /* ========== ZOOM DISPLAY ========== */\r\n .zoom-display {\r\n min-width: 48px;\r\n text-align: center;\r\n font-size: 13px;\r\n font-weight: 500;\r\n color: #374151;\r\n padding: 4px 8px;\r\n background: #f9fafb;\r\n border-radius: 6px;\r\n border: 1px solid #e5e7eb;\r\n }\r\n\r\n .search-input {\r\n padding: 6px 10px;\r\n border: 1px solid #d1d5db;\r\n border-radius: 6px;\r\n font-size: 13px;\r\n min-width: 180px;\r\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\r\n }\r\n .search-input:focus {\r\n outline: none;\r\n border-color: #3b82f6;\r\n box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);\r\n }\r\n\r\n /* ========== VIEWER CONTENT ========== */\r\n .pdf-viewer-content {\r\n flex: 1;\r\n overflow: hidden;\r\n position: relative;\r\n user-select: text;\r\n -webkit-user-select: text;\r\n -moz-user-select: text;\r\n -ms-user-select: text;\r\n background-color: #efefef;\r\n }\r\n .pdf-viewer-container {\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n width: 100%;\r\n background-color: #efefef;\r\n }\r\n .pdf-viewer-main {\r\n display: flex;\r\n flex: 1;\r\n overflow: hidden;\r\n position: relative;\r\n background-color: #efefef;\r\n }\r\n .pdf-viewer-viewer-area {\r\n flex: 1;\r\n overflow: hidden;\r\n position: relative;\r\n background-color: #efefef; /* Ensure background matches viewer gray */\r\n }\r\n \r\n /* Override library's inline userSelect: none */\r\n .pdf-viewer-viewer-area div[style*=\"userSelect\"] {\r\n user-select: auto !important;\r\n }\r\n\r\n /* ========== PRINT DROPDOWN ========== */\r\n .print-dropdown-container {\r\n position: relative;\r\n display: inline-flex;\r\n }\r\n .print-dropdown-trigger {\r\n display: flex;\r\n align-items: center;\r\n gap: 2px;\r\n }\r\n .print-dropdown-menu {\r\n position: absolute;\r\n top: 100%;\r\n right: 0;\r\n margin-top: 4px;\r\n background: #ffffff;\r\n border: 1px solid #e5e7eb;\r\n border-radius: 8px;\r\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\r\n min-width: 200px;\r\n z-index: 1000;\r\n overflow: hidden;\r\n }\r\n .print-dropdown-item {\r\n display: block;\r\n width: 100%;\r\n padding: 10px 14px;\r\n border: none;\r\n background: transparent;\r\n text-align: left;\r\n font-size: 13px;\r\n font-weight: 500;\r\n color: #374151;\r\n cursor: pointer;\r\n transition: background-color 0.15s ease;\r\n }\r\n .print-dropdown-item:hover {\r\n background: #f3f4f6;\r\n }\r\n .print-dropdown-item:active {\r\n background: #e5e7eb;\r\n }\r\n .print-dropdown-item + .print-dropdown-item {\r\n border-top: 1px solid #f3f4f6;\r\n }\r\n\r\n /* ========== TOOLBAR DROPDOWN (Annotation Menu) ========== */\r\n .toolbar-dropdown-container {\r\n position: relative;\r\n display: inline-flex;\r\n }\r\n .toolbar-dropdown-button {\r\n display: flex;\r\n align-items: center;\r\n gap: 2px;\r\n }\r\n .toolbar-dropdown-menu {\r\n position: absolute;\r\n top: 100%;\r\n left: 0;\r\n margin-top: 4px;\r\n background: #ffffff;\r\n border: 1px solid #e5e7eb;\r\n border-radius: 8px;\r\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\r\n min-width: 150px;\r\n z-index: 1000;\r\n overflow: hidden;\r\n }\r\n .toolbar-dropdown-menu-right {\r\n left: auto;\r\n right: 0;\r\n }\r\n .toolbar-dropdown-item {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n width: 100%;\r\n padding: 10px 14px;\r\n border: none;\r\n background: transparent;\r\n text-align: left;\r\n font-size: 13px;\r\n font-weight: 500;\r\n color: #374151;\r\n cursor: pointer;\r\n transition: background-color 0.15s ease;\r\n }\r\n .toolbar-dropdown-item:hover {\r\n background: #f3f4f6;\r\n }\r\n .toolbar-dropdown-item:active {\r\n background: #e5e7eb;\r\n }\r\n .toolbar-dropdown-item:disabled {\r\n opacity: 0.5;\r\n cursor: not-allowed;\r\n }\r\n .toolbar-dropdown-item + .toolbar-dropdown-item {\r\n border-top: 1px solid #f3f4f6;\r\n }\r\n .toolbar-dropdown-item svg {\r\n font-size: 18px;\r\n color: #6b7280;\r\n }\r\n .toolbar-dropdown-item-active {\r\n background: #eff6ff;\r\n color: #2563eb;\r\n }\r\n .toolbar-dropdown-item-active svg {\r\n color: #2563eb;\r\n }\r\n .toolbar-dropdown-divider {\r\n height: 1px;\r\n background: #e5e7eb;\r\n margin: 4px 0;\r\n }\r\n\r\n\r\n\r\n /* ========== TOOLTIP STYLES ========== */\r\n .toolbar-button[title]:hover::after {\r\n content: attr(title);\r\n position: absolute;\r\n bottom: -32px;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n padding: 6px 10px;\r\n background: #1f2937;\r\n color: white;\r\n font-size: 12px;\r\n font-weight: 500;\r\n border-radius: 6px;\r\n white-space: nowrap;\r\n z-index: 1000;\r\n pointer-events: none;\r\n opacity: 0;\r\n animation: fadeIn 0.2s ease-out 0.3s forwards;\r\n }\r\n @keyframes fadeIn {\r\n to { opacity: 1; }\r\n }\r\n /* ========== SECONDARY TOOLBAR & TABS ========== */\r\n .pdf-viewer-toolbar-container {\r\n display: flex;\r\n flex-direction: column;\r\n width: 100%;\r\n }\r\n\r\n .pdf-viewer-secondary-toolbar {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 8px 16px;\r\n background-color: #f9fafb;\r\n border-bottom: 1px solid #e5e7eb;\r\n gap: 12px;\r\n width: 100%;\r\n box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);\r\n animation: slideDown 0.2s ease-out;\r\n transform-origin: top;\r\n }\r\n\r\n @keyframes slideDown {\r\n from { opacity: 0; transform: scaleY(0.95); }\r\n to { opacity: 1; transform: scaleY(1); }\r\n }\r\n\r\n .toolbar-center {\r\n display: flex;\r\n align-items: center;\r\n gap: 4px;\r\n margin: 0 16px;\r\n }\r\n\r\n .toolbar-tab {\r\n background: none;\r\n border: none;\r\n padding: 6px 12px;\r\n font-size: 14px;\r\n font-weight: 500;\r\n color: #6b7280;\r\n cursor: pointer;\r\n border-radius: 6px;\r\n transition: all 0.2s ease;\r\n }\r\n\r\n .toolbar-tab:hover {\r\n background-color: #f3f4f6;\r\n color: #374151;\r\n }\r\n\r\n .toolbar-tab-active {\r\n color: #2563eb;\r\n background-color: #eff6ff;\r\n font-weight: 600;\r\n }\r\n .toolbar-dropdown-header {\r\n font-size: 11px;\r\n font-weight: 600;\r\n color: #6b7280;\r\n padding: 8px 12px 4px 12px;\r\n letter-spacing: 0.5px;\r\n text-transform: uppercase;\r\n }\r\n`;"],"mappings":";;;AAAO,IAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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QCUOWM.js');
|
|
5
|
+
require('../../chunk-5ECHDPQZ.js');
|
|
6
6
|
require('../../chunk-EEIQAW55.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.ImageViewer =
|
|
9
|
+
exports.ImageViewer = _chunkAVQCUOWMjs.ImageViewer;
|
|
10
10
|
//# sourceMappingURL=ImageViewer.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { F as FileViewerProps } from '../../types-
|
|
2
|
+
import { F as FileViewerProps } from '../../types-DFkMK86Q.mjs';
|
|
3
3
|
|
|
4
4
|
interface PDFViewerMethods {
|
|
5
5
|
zoomIn: () => void;
|
|
@@ -25,6 +25,23 @@ interface PDFViewerMethods {
|
|
|
25
25
|
rotateForward: () => void;
|
|
26
26
|
rotateBackward: () => void;
|
|
27
27
|
getRotation: () => number;
|
|
28
|
+
print: () => void;
|
|
29
|
+
printWithAnnotations: () => Promise<void>;
|
|
30
|
+
printWithoutAnnotations: () => Promise<void>;
|
|
31
|
+
annotation?: {
|
|
32
|
+
activateHighlighter: () => void;
|
|
33
|
+
deactivateHighlighter: () => void;
|
|
34
|
+
activateStamp: (dataUrl: string) => Promise<void>;
|
|
35
|
+
deactivateStamp: () => void;
|
|
36
|
+
deleteSelectedAnnotation: () => boolean;
|
|
37
|
+
getSelectedAnnotation: () => any;
|
|
38
|
+
getAllAnnotations: () => any[];
|
|
39
|
+
exportAnnotationsAsJSON: () => string;
|
|
40
|
+
onAnnotationEvent?: (callback: (event: {
|
|
41
|
+
type: 'create' | 'update' | 'delete';
|
|
42
|
+
annotation: any;
|
|
43
|
+
}) => void) => (() => void) | undefined;
|
|
44
|
+
};
|
|
28
45
|
}
|
|
29
46
|
declare const PDFViewer: React.ForwardRefExoticComponent<Omit<FileViewerProps, "ref"> & React.RefAttributes<PDFViewerMethods>>;
|
|
30
47
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { F as FileViewerProps } from '../../types-
|
|
2
|
+
import { F as FileViewerProps } from '../../types-DFkMK86Q.js';
|
|
3
3
|
|
|
4
4
|
interface PDFViewerMethods {
|
|
5
5
|
zoomIn: () => void;
|
|
@@ -25,6 +25,23 @@ interface PDFViewerMethods {
|
|
|
25
25
|
rotateForward: () => void;
|
|
26
26
|
rotateBackward: () => void;
|
|
27
27
|
getRotation: () => number;
|
|
28
|
+
print: () => void;
|
|
29
|
+
printWithAnnotations: () => Promise<void>;
|
|
30
|
+
printWithoutAnnotations: () => Promise<void>;
|
|
31
|
+
annotation?: {
|
|
32
|
+
activateHighlighter: () => void;
|
|
33
|
+
deactivateHighlighter: () => void;
|
|
34
|
+
activateStamp: (dataUrl: string) => Promise<void>;
|
|
35
|
+
deactivateStamp: () => void;
|
|
36
|
+
deleteSelectedAnnotation: () => boolean;
|
|
37
|
+
getSelectedAnnotation: () => any;
|
|
38
|
+
getAllAnnotations: () => any[];
|
|
39
|
+
exportAnnotationsAsJSON: () => string;
|
|
40
|
+
onAnnotationEvent?: (callback: (event: {
|
|
41
|
+
type: 'create' | 'update' | 'delete';
|
|
42
|
+
annotation: any;
|
|
43
|
+
}) => void) => (() => void) | undefined;
|
|
44
|
+
};
|
|
28
45
|
}
|
|
29
46
|
declare const PDFViewer: React.ForwardRefExoticComponent<Omit<FileViewerProps, "ref"> & React.RefAttributes<PDFViewerMethods>>;
|
|
30
47
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../../chunk-
|
|
4
|
+
var _chunk26SS5FLZjs = require('../../chunk-26SS5FLZ.js');
|
|
5
|
+
require('../../chunk-5ECHDPQZ.js');
|
|
6
6
|
require('../../chunk-YEPEMLM3.js');
|
|
7
7
|
require('../../chunk-EEIQAW55.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.PDFViewer =
|
|
10
|
+
exports.PDFViewer = _chunk26SS5FLZjs.PDFViewer;
|
|
11
11
|
//# sourceMappingURL=PDFViewer.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
PDFViewer
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-IY5EEUCU.mjs";
|
|
5
|
+
import "../../chunk-UVF6YOXY.mjs";
|
|
6
6
|
import "../../chunk-M57PSU4O.mjs";
|
|
7
7
|
import "../../chunk-Q4OU6YDO.mjs";
|
|
8
8
|
export {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { F as FileViewerProps, V as ViewerInfo, a as FileViewerComponent } from './types-
|
|
3
|
-
export { c as DynamicViewerImport, D as DynamicViewerRegistry, S as SearchResult, T as ToolbarActionId, d as ToolbarActionsConfig, b as ViewerRegistry } from './types-
|
|
2
|
+
import { F as FileViewerProps, V as ViewerInfo, a as FileViewerComponent } from './types-DFkMK86Q.mjs';
|
|
3
|
+
export { c as DynamicViewerImport, D as DynamicViewerRegistry, S as SearchResult, T as ToolbarActionId, d as ToolbarActionsConfig, b as ViewerRegistry } from './types-DFkMK86Q.mjs';
|
|
4
4
|
export { TextViewer } from './components/viewers/TextViewer.mjs';
|
|
5
5
|
export { ImageViewer } from './components/viewers/ImageViewer.mjs';
|
|
6
|
-
export { PDFViewer } from './components/viewers/PDFViewer.mjs';
|
|
6
|
+
export { PDFViewer, PDFViewerMethods } from './components/viewers/PDFViewer.mjs';
|
|
7
7
|
export { VideoViewer } from './components/viewers/VideoViewer.mjs';
|
|
8
8
|
export { AudioViewer } from './components/viewers/AudioViewer.mjs';
|
|
9
9
|
export { TIFFViewer } from './components/viewers/TIFFViewer.mjs';
|