@cannymindstech/file-viewers 0.27.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/dist/chunk-2BLHLWNN.js +299 -0
- package/dist/chunk-2BLHLWNN.js.map +1 -0
- package/dist/chunk-6BRYDA3B.js +329 -0
- package/dist/chunk-6BRYDA3B.js.map +1 -0
- package/dist/chunk-6MV4VQQN.mjs +2269 -0
- package/dist/chunk-6MV4VQQN.mjs.map +1 -0
- package/dist/chunk-7JPF5AYR.mjs +488 -0
- package/dist/chunk-7JPF5AYR.mjs.map +1 -0
- package/dist/chunk-7LPCKPN2.js +2269 -0
- package/dist/chunk-7LPCKPN2.js.map +1 -0
- package/dist/chunk-7PMZ4GN5.mjs +290 -0
- package/dist/chunk-7PMZ4GN5.mjs.map +1 -0
- package/dist/chunk-B5NNB4KD.mjs +268 -0
- package/dist/chunk-B5NNB4KD.mjs.map +1 -0
- package/dist/chunk-CIWCHSAA.js +309 -0
- package/dist/chunk-CIWCHSAA.js.map +1 -0
- package/dist/chunk-D7SDEVDM.js +268 -0
- package/dist/chunk-D7SDEVDM.js.map +1 -0
- package/dist/chunk-ECZ6IBOS.js +424 -0
- package/dist/chunk-ECZ6IBOS.js.map +1 -0
- package/dist/chunk-EKNP342T.mjs +299 -0
- package/dist/chunk-EKNP342T.mjs.map +1 -0
- package/dist/chunk-EM63H4SA.js +290 -0
- package/dist/chunk-EM63H4SA.js.map +1 -0
- package/dist/chunk-IJMNPAXX.mjs +309 -0
- package/dist/chunk-IJMNPAXX.mjs.map +1 -0
- package/dist/chunk-KJNOBIUZ.mjs +36 -0
- package/dist/chunk-KJNOBIUZ.mjs.map +1 -0
- package/dist/chunk-KQCU7XW2.mjs +424 -0
- package/dist/chunk-KQCU7XW2.mjs.map +1 -0
- package/dist/chunk-MJYCPSD4.js +742 -0
- package/dist/chunk-MJYCPSD4.js.map +1 -0
- package/dist/chunk-OPJOCUSL.js +36 -0
- package/dist/chunk-OPJOCUSL.js.map +1 -0
- package/dist/chunk-QGL3ZOPD.mjs +742 -0
- package/dist/chunk-QGL3ZOPD.mjs.map +1 -0
- package/dist/chunk-QV63FULE.js +488 -0
- package/dist/chunk-QV63FULE.js.map +1 -0
- package/dist/chunk-XJQ5J2UF.mjs +329 -0
- package/dist/chunk-XJQ5J2UF.mjs.map +1 -0
- package/dist/components/viewers/AudioViewer.d.mts +6 -0
- package/dist/components/viewers/AudioViewer.d.ts +6 -0
- package/dist/components/viewers/AudioViewer.js +10 -0
- package/dist/components/viewers/AudioViewer.js.map +1 -0
- package/dist/components/viewers/AudioViewer.mjs +10 -0
- package/dist/components/viewers/AudioViewer.mjs.map +1 -0
- package/dist/components/viewers/DefaultViewer.d.mts +6 -0
- package/dist/components/viewers/DefaultViewer.d.ts +6 -0
- package/dist/components/viewers/DefaultViewer.js +10 -0
- package/dist/components/viewers/DefaultViewer.js.map +1 -0
- package/dist/components/viewers/DefaultViewer.mjs +10 -0
- package/dist/components/viewers/DefaultViewer.mjs.map +1 -0
- package/dist/components/viewers/ImageViewer.d.mts +6 -0
- package/dist/components/viewers/ImageViewer.d.ts +6 -0
- package/dist/components/viewers/ImageViewer.js +10 -0
- package/dist/components/viewers/ImageViewer.js.map +1 -0
- package/dist/components/viewers/ImageViewer.mjs +10 -0
- package/dist/components/viewers/ImageViewer.mjs.map +1 -0
- package/dist/components/viewers/PDFViewer.d.mts +51 -0
- package/dist/components/viewers/PDFViewer.d.ts +51 -0
- package/dist/components/viewers/PDFViewer.js +11 -0
- package/dist/components/viewers/PDFViewer.js.map +1 -0
- package/dist/components/viewers/PDFViewer.mjs +11 -0
- package/dist/components/viewers/PDFViewer.mjs.map +1 -0
- package/dist/components/viewers/TIFFViewer.d.mts +6 -0
- package/dist/components/viewers/TIFFViewer.d.ts +6 -0
- package/dist/components/viewers/TIFFViewer.js +10 -0
- package/dist/components/viewers/TIFFViewer.js.map +1 -0
- package/dist/components/viewers/TIFFViewer.mjs +10 -0
- package/dist/components/viewers/TIFFViewer.mjs.map +1 -0
- package/dist/components/viewers/TextViewer.d.mts +6 -0
- package/dist/components/viewers/TextViewer.d.ts +6 -0
- package/dist/components/viewers/TextViewer.js +10 -0
- package/dist/components/viewers/TextViewer.js.map +1 -0
- package/dist/components/viewers/TextViewer.mjs +10 -0
- package/dist/components/viewers/TextViewer.mjs.map +1 -0
- package/dist/components/viewers/VideoViewer.d.mts +6 -0
- package/dist/components/viewers/VideoViewer.d.ts +6 -0
- package/dist/components/viewers/VideoViewer.js +10 -0
- package/dist/components/viewers/VideoViewer.js.map +1 -0
- package/dist/components/viewers/VideoViewer.mjs +10 -0
- package/dist/components/viewers/VideoViewer.mjs.map +1 -0
- package/dist/index.d.mts +75 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.js +305 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +305 -0
- package/dist/index.mjs.map +1 -0
- package/dist/types-AT684fjV.d.mts +96 -0
- package/dist/types-AT684fjV.d.ts +96 -0
- package/package.json +45 -0
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"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: 4px 8px;
|
|
53
|
+
background: #ffffff;
|
|
54
|
+
border-bottom: 1px solid #e5e7eb;
|
|
55
|
+
gap: 4px;
|
|
56
|
+
flex-wrap: wrap;
|
|
57
|
+
min-height: 44px;
|
|
58
|
+
}
|
|
59
|
+
.toolbar-left {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
gap: 2px;
|
|
63
|
+
flex: 0 0 auto;
|
|
64
|
+
}
|
|
65
|
+
.toolbar-right {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
gap: 2px;
|
|
69
|
+
}
|
|
70
|
+
.toolbar-section {
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
gap: 2px;
|
|
74
|
+
padding: 0;
|
|
75
|
+
}
|
|
76
|
+
.toolbar-separator {
|
|
77
|
+
width: 1px;
|
|
78
|
+
height: 20px;
|
|
79
|
+
background: #e5e7eb;
|
|
80
|
+
margin: 0 8px;
|
|
81
|
+
flex-shrink: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* ========== COMPACT BUTTONS ========== */
|
|
85
|
+
.toolbar-button {
|
|
86
|
+
padding: 6px;
|
|
87
|
+
border: none;
|
|
88
|
+
background: transparent;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
border-radius: 6px;
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
transition: background-color 0.15s ease;
|
|
95
|
+
position: relative;
|
|
96
|
+
min-width: 32px;
|
|
97
|
+
min-height: 32px;
|
|
98
|
+
color: #4b5563;
|
|
99
|
+
}
|
|
100
|
+
.toolbar-button:hover:not(:disabled) {
|
|
101
|
+
background: #f3f4f6;
|
|
102
|
+
color: #111827;
|
|
103
|
+
}
|
|
104
|
+
.toolbar-button:active:not(:disabled) {
|
|
105
|
+
background: #e5e7eb;
|
|
106
|
+
}
|
|
107
|
+
.toolbar-button:disabled {
|
|
108
|
+
opacity: 0.4;
|
|
109
|
+
cursor: not-allowed;
|
|
110
|
+
}
|
|
111
|
+
.toolbar-button svg {
|
|
112
|
+
width: 18px;
|
|
113
|
+
height: 18px;
|
|
114
|
+
display: block;
|
|
115
|
+
}
|
|
116
|
+
.toolbar-button-active {
|
|
117
|
+
background: #eff6ff !important;
|
|
118
|
+
color: #2563eb !important;
|
|
119
|
+
}
|
|
120
|
+
.toolbar-button-active:hover:not(:disabled) {
|
|
121
|
+
background: #dbeafe !important;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* ========== PAGE NAVIGATION ========== */
|
|
125
|
+
.page-input {
|
|
126
|
+
width: 44px;
|
|
127
|
+
padding: 4px 6px;
|
|
128
|
+
border: 1px solid #d1d5db;
|
|
129
|
+
border-radius: 6px;
|
|
130
|
+
text-align: center;
|
|
131
|
+
font-size: 13px;
|
|
132
|
+
font-weight: 500;
|
|
133
|
+
color: #374151;
|
|
134
|
+
background: #fff;
|
|
135
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
136
|
+
}
|
|
137
|
+
.page-input:focus {
|
|
138
|
+
outline: none;
|
|
139
|
+
border-color: #3b82f6;
|
|
140
|
+
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
|
|
141
|
+
}
|
|
142
|
+
.page-info {
|
|
143
|
+
font-size: 13px;
|
|
144
|
+
color: #6b7280;
|
|
145
|
+
white-space: nowrap;
|
|
146
|
+
font-weight: 500;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* ========== ZOOM DISPLAY ========== */
|
|
150
|
+
.zoom-display {
|
|
151
|
+
min-width: 48px;
|
|
152
|
+
text-align: center;
|
|
153
|
+
font-size: 13px;
|
|
154
|
+
font-weight: 500;
|
|
155
|
+
color: #374151;
|
|
156
|
+
padding: 4px 8px;
|
|
157
|
+
background: #f9fafb;
|
|
158
|
+
border-radius: 6px;
|
|
159
|
+
border: 1px solid #e5e7eb;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.search-input {
|
|
163
|
+
padding: 6px 10px;
|
|
164
|
+
border: 1px solid #d1d5db;
|
|
165
|
+
border-radius: 6px;
|
|
166
|
+
font-size: 13px;
|
|
167
|
+
min-width: 180px;
|
|
168
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
169
|
+
}
|
|
170
|
+
.search-input:focus {
|
|
171
|
+
outline: none;
|
|
172
|
+
border-color: #3b82f6;
|
|
173
|
+
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* ========== VIEWER CONTENT ========== */
|
|
177
|
+
.pdf-viewer-content {
|
|
178
|
+
flex: 1;
|
|
179
|
+
overflow: hidden;
|
|
180
|
+
position: relative;
|
|
181
|
+
user-select: text;
|
|
182
|
+
-webkit-user-select: text;
|
|
183
|
+
-moz-user-select: text;
|
|
184
|
+
-ms-user-select: text;
|
|
185
|
+
background-color: #efefef;
|
|
186
|
+
}
|
|
187
|
+
.pdf-viewer-container {
|
|
188
|
+
display: flex;
|
|
189
|
+
flex-direction: column;
|
|
190
|
+
height: 100%;
|
|
191
|
+
width: 100%;
|
|
192
|
+
background-color: #efefef;
|
|
193
|
+
}
|
|
194
|
+
.pdf-viewer-main {
|
|
195
|
+
display: flex;
|
|
196
|
+
flex: 1;
|
|
197
|
+
overflow: hidden;
|
|
198
|
+
position: relative;
|
|
199
|
+
background-color: #efefef;
|
|
200
|
+
}
|
|
201
|
+
.pdf-viewer-viewer-area {
|
|
202
|
+
flex: 1;
|
|
203
|
+
overflow: hidden;
|
|
204
|
+
position: relative;
|
|
205
|
+
background-color: #efefef; /* Ensure background matches viewer gray */
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* Override library's inline userSelect: none */
|
|
209
|
+
.pdf-viewer-viewer-area div[style*="userSelect"] {
|
|
210
|
+
user-select: auto !important;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* ========== PRINT DROPDOWN ========== */
|
|
214
|
+
.print-dropdown-container {
|
|
215
|
+
position: relative;
|
|
216
|
+
display: inline-flex;
|
|
217
|
+
}
|
|
218
|
+
.print-dropdown-trigger {
|
|
219
|
+
display: flex;
|
|
220
|
+
align-items: center;
|
|
221
|
+
gap: 2px;
|
|
222
|
+
}
|
|
223
|
+
.print-dropdown-menu {
|
|
224
|
+
position: absolute;
|
|
225
|
+
top: 100%;
|
|
226
|
+
right: 0;
|
|
227
|
+
margin-top: 4px;
|
|
228
|
+
background: #ffffff;
|
|
229
|
+
border: 1px solid #e5e7eb;
|
|
230
|
+
border-radius: 8px;
|
|
231
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
232
|
+
min-width: 200px;
|
|
233
|
+
z-index: 1000;
|
|
234
|
+
overflow: hidden;
|
|
235
|
+
}
|
|
236
|
+
.print-dropdown-item {
|
|
237
|
+
display: block;
|
|
238
|
+
width: 100%;
|
|
239
|
+
padding: 10px 14px;
|
|
240
|
+
border: none;
|
|
241
|
+
background: transparent;
|
|
242
|
+
text-align: left;
|
|
243
|
+
font-size: 13px;
|
|
244
|
+
font-weight: 500;
|
|
245
|
+
color: #374151;
|
|
246
|
+
cursor: pointer;
|
|
247
|
+
transition: background-color 0.15s ease;
|
|
248
|
+
}
|
|
249
|
+
.print-dropdown-item:hover {
|
|
250
|
+
background: #f3f4f6;
|
|
251
|
+
}
|
|
252
|
+
.print-dropdown-item:active {
|
|
253
|
+
background: #e5e7eb;
|
|
254
|
+
}
|
|
255
|
+
.print-dropdown-item + .print-dropdown-item {
|
|
256
|
+
border-top: 1px solid #f3f4f6;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* ========== TOOLBAR DROPDOWN (Annotation Menu) ========== */
|
|
260
|
+
.toolbar-dropdown-container {
|
|
261
|
+
position: relative;
|
|
262
|
+
display: inline-flex;
|
|
263
|
+
}
|
|
264
|
+
.toolbar-dropdown-button {
|
|
265
|
+
display: flex;
|
|
266
|
+
align-items: center;
|
|
267
|
+
gap: 2px;
|
|
268
|
+
}
|
|
269
|
+
.toolbar-dropdown-menu {
|
|
270
|
+
position: absolute;
|
|
271
|
+
top: 100%;
|
|
272
|
+
left: 0;
|
|
273
|
+
margin-top: 4px;
|
|
274
|
+
background: #ffffff;
|
|
275
|
+
border: 1px solid #e5e7eb;
|
|
276
|
+
border-radius: 8px;
|
|
277
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
278
|
+
min-width: 150px;
|
|
279
|
+
z-index: 1000;
|
|
280
|
+
overflow: hidden;
|
|
281
|
+
}
|
|
282
|
+
.toolbar-dropdown-menu-right {
|
|
283
|
+
left: auto;
|
|
284
|
+
right: 0;
|
|
285
|
+
}
|
|
286
|
+
.toolbar-dropdown-item {
|
|
287
|
+
display: flex;
|
|
288
|
+
align-items: center;
|
|
289
|
+
gap: 8px;
|
|
290
|
+
width: 100%;
|
|
291
|
+
padding: 10px 14px;
|
|
292
|
+
border: none;
|
|
293
|
+
background: transparent;
|
|
294
|
+
text-align: left;
|
|
295
|
+
font-size: 13px;
|
|
296
|
+
font-weight: 500;
|
|
297
|
+
color: #374151;
|
|
298
|
+
cursor: pointer;
|
|
299
|
+
transition: background-color 0.15s ease;
|
|
300
|
+
}
|
|
301
|
+
.toolbar-dropdown-item:hover {
|
|
302
|
+
background: #f3f4f6;
|
|
303
|
+
}
|
|
304
|
+
.toolbar-dropdown-item:active {
|
|
305
|
+
background: #e5e7eb;
|
|
306
|
+
}
|
|
307
|
+
.toolbar-dropdown-item:disabled {
|
|
308
|
+
opacity: 0.5;
|
|
309
|
+
cursor: not-allowed;
|
|
310
|
+
}
|
|
311
|
+
.toolbar-dropdown-item + .toolbar-dropdown-item {
|
|
312
|
+
border-top: 1px solid #f3f4f6;
|
|
313
|
+
}
|
|
314
|
+
.toolbar-dropdown-item svg {
|
|
315
|
+
font-size: 18px;
|
|
316
|
+
color: #6b7280;
|
|
317
|
+
}
|
|
318
|
+
.toolbar-dropdown-item-active {
|
|
319
|
+
background: #eff6ff;
|
|
320
|
+
color: #2563eb;
|
|
321
|
+
}
|
|
322
|
+
.toolbar-dropdown-item-active svg {
|
|
323
|
+
color: #2563eb;
|
|
324
|
+
}
|
|
325
|
+
.toolbar-dropdown-divider {
|
|
326
|
+
height: 1px;
|
|
327
|
+
background: #e5e7eb;
|
|
328
|
+
margin: 4px 0;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
/* ========== TOOLTIP STYLES ========== */
|
|
334
|
+
.toolbar-button[title]:hover::after {
|
|
335
|
+
content: attr(title);
|
|
336
|
+
position: absolute;
|
|
337
|
+
bottom: -32px;
|
|
338
|
+
left: 50%;
|
|
339
|
+
transform: translateX(-50%);
|
|
340
|
+
padding: 6px 10px;
|
|
341
|
+
background: #1f2937;
|
|
342
|
+
color: white;
|
|
343
|
+
font-size: 12px;
|
|
344
|
+
font-weight: 500;
|
|
345
|
+
border-radius: 6px;
|
|
346
|
+
white-space: nowrap;
|
|
347
|
+
z-index: 1000;
|
|
348
|
+
pointer-events: none;
|
|
349
|
+
opacity: 0;
|
|
350
|
+
animation: fadeIn 0.2s ease-out 0.3s forwards;
|
|
351
|
+
}
|
|
352
|
+
@keyframes fadeIn {
|
|
353
|
+
to { opacity: 1; }
|
|
354
|
+
}
|
|
355
|
+
/* ========== SECONDARY TOOLBAR & TABS ========== */
|
|
356
|
+
.pdf-viewer-toolbar-container {
|
|
357
|
+
display: flex;
|
|
358
|
+
flex-direction: column;
|
|
359
|
+
width: 100%;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.pdf-viewer-secondary-toolbar {
|
|
363
|
+
display: flex;
|
|
364
|
+
align-items: center;
|
|
365
|
+
justify-content: center;
|
|
366
|
+
padding: 8px 16px;
|
|
367
|
+
background-color: #f9fafb;
|
|
368
|
+
border-bottom: 1px solid #e5e7eb;
|
|
369
|
+
gap: 12px;
|
|
370
|
+
width: 100%;
|
|
371
|
+
box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
|
|
372
|
+
animation: slideDown 0.2s ease-out;
|
|
373
|
+
transform-origin: top;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
@keyframes slideDown {
|
|
377
|
+
from { opacity: 0; transform: scaleY(0.95); }
|
|
378
|
+
to { opacity: 1; transform: scaleY(1); }
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.toolbar-center {
|
|
382
|
+
display: flex;
|
|
383
|
+
align-items: center;
|
|
384
|
+
gap: 4px;
|
|
385
|
+
flex: 1 1 auto;
|
|
386
|
+
justify-content: center;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.toolbar-tab {
|
|
390
|
+
background: none;
|
|
391
|
+
border: none;
|
|
392
|
+
padding: 6px 12px;
|
|
393
|
+
font-size: 14px;
|
|
394
|
+
font-weight: 500;
|
|
395
|
+
color: #6b7280;
|
|
396
|
+
cursor: pointer;
|
|
397
|
+
border-radius: 6px;
|
|
398
|
+
transition: all 0.2s ease;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.toolbar-tab:hover {
|
|
402
|
+
background-color: #f3f4f6;
|
|
403
|
+
color: #374151;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.toolbar-tab-active {
|
|
407
|
+
color: #2563eb;
|
|
408
|
+
background-color: #eff6ff;
|
|
409
|
+
font-weight: 600;
|
|
410
|
+
}
|
|
411
|
+
.toolbar-dropdown-header {
|
|
412
|
+
font-size: 11px;
|
|
413
|
+
font-weight: 600;
|
|
414
|
+
color: #6b7280;
|
|
415
|
+
padding: 8px 12px 4px 12px;
|
|
416
|
+
letter-spacing: 0.5px;
|
|
417
|
+
text-transform: uppercase;
|
|
418
|
+
}
|
|
419
|
+
`;
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
exports.toolbarStyles = toolbarStyles;
|
|
424
|
+
//# sourceMappingURL=chunk-ECZ6IBOS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/premkumar/Documents/GitHub/DMS-File-Viewers/packages/lib/dist/chunk-ECZ6IBOS.js","../src/components/viewers/pdf/PDFStyles.tsx"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACA;ACFO,IAAM,cAAA,EAAgB,CAAA;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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@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');\n\n * {\n font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n 'Noto Sans Tamil', 'Noto Sans Devanagari', sans-serif !important;\n }\n\n /* Target PDF.js text layer */\n .textLayer,\n .textLayer span,\n .textLayer div,\n [class*=\"pdf\"],\n [class*=\"page\"],\n canvas + div,\n .embedpdf-viewport *,\n [data-pdf-viewer] *,\n [role=\"document\"] * {\n font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n 'Noto Sans Tamil', 'Noto Sans Devanagari', sans-serif !important;\n }\n\n .pdf-viewer-header {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n padding: 2px 12px 0 12px;\n background: #fff;\n min-height: 32px;\n }\n .header-file-name {\n font-size: 13px;\n font-weight: 500;\n color: #374151;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 400px;\n }\n\n /* ========== COMPACT TOOLBAR ========== */\n .pdf-viewer-toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 4px 8px;\n background: #ffffff;\n border-bottom: 1px solid #e5e7eb;\n gap: 4px;\n flex-wrap: wrap;\n min-height: 44px;\n }\n .toolbar-left {\n display: flex;\n align-items: center;\n gap: 2px;\n flex: 0 0 auto;\n }\n .toolbar-right {\n display: flex;\n align-items: center;\n gap: 2px;\n }\n .toolbar-section {\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 0;\n }\n .toolbar-separator {\n width: 1px;\n height: 20px;\n background: #e5e7eb;\n margin: 0 8px;\n flex-shrink: 0;\n }\n\n /* ========== COMPACT BUTTONS ========== */\n .toolbar-button {\n padding: 6px;\n border: none;\n background: transparent;\n cursor: pointer;\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background-color 0.15s ease;\n position: relative;\n min-width: 32px;\n min-height: 32px;\n color: #4b5563;\n }\n .toolbar-button:hover:not(:disabled) {\n background: #f3f4f6;\n color: #111827;\n }\n .toolbar-button:active:not(:disabled) {\n background: #e5e7eb;\n }\n .toolbar-button:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n .toolbar-button svg {\n width: 18px;\n height: 18px;\n display: block;\n }\n .toolbar-button-active {\n background: #eff6ff !important;\n color: #2563eb !important;\n }\n .toolbar-button-active:hover:not(:disabled) {\n background: #dbeafe !important;\n }\n\n /* ========== PAGE NAVIGATION ========== */\n .page-input {\n width: 44px;\n padding: 4px 6px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n text-align: center;\n font-size: 13px;\n font-weight: 500;\n color: #374151;\n background: #fff;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n }\n .page-input:focus {\n outline: none;\n border-color: #3b82f6;\n box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);\n }\n .page-info {\n font-size: 13px;\n color: #6b7280;\n white-space: nowrap;\n font-weight: 500;\n }\n\n /* ========== ZOOM DISPLAY ========== */\n .zoom-display {\n min-width: 48px;\n text-align: center;\n font-size: 13px;\n font-weight: 500;\n color: #374151;\n padding: 4px 8px;\n background: #f9fafb;\n border-radius: 6px;\n border: 1px solid #e5e7eb;\n }\n\n .search-input {\n padding: 6px 10px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n font-size: 13px;\n min-width: 180px;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n }\n .search-input:focus {\n outline: none;\n border-color: #3b82f6;\n box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);\n }\n\n /* ========== VIEWER CONTENT ========== */\n .pdf-viewer-content {\n flex: 1;\n overflow: hidden;\n position: relative;\n user-select: text;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n background-color: #efefef;\n }\n .pdf-viewer-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n background-color: #efefef;\n }\n .pdf-viewer-main {\n display: flex;\n flex: 1;\n overflow: hidden;\n position: relative;\n background-color: #efefef;\n }\n .pdf-viewer-viewer-area {\n flex: 1;\n overflow: hidden;\n position: relative;\n background-color: #efefef; /* Ensure background matches viewer gray */\n }\n \n /* Override library's inline userSelect: none */\n .pdf-viewer-viewer-area div[style*=\"userSelect\"] {\n user-select: auto !important;\n }\n\n /* ========== PRINT DROPDOWN ========== */\n .print-dropdown-container {\n position: relative;\n display: inline-flex;\n }\n .print-dropdown-trigger {\n display: flex;\n align-items: center;\n gap: 2px;\n }\n .print-dropdown-menu {\n position: absolute;\n top: 100%;\n right: 0;\n margin-top: 4px;\n background: #ffffff;\n border: 1px solid #e5e7eb;\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n min-width: 200px;\n z-index: 1000;\n overflow: hidden;\n }\n .print-dropdown-item {\n display: block;\n width: 100%;\n padding: 10px 14px;\n border: none;\n background: transparent;\n text-align: left;\n font-size: 13px;\n font-weight: 500;\n color: #374151;\n cursor: pointer;\n transition: background-color 0.15s ease;\n }\n .print-dropdown-item:hover {\n background: #f3f4f6;\n }\n .print-dropdown-item:active {\n background: #e5e7eb;\n }\n .print-dropdown-item + .print-dropdown-item {\n border-top: 1px solid #f3f4f6;\n }\n\n /* ========== TOOLBAR DROPDOWN (Annotation Menu) ========== */\n .toolbar-dropdown-container {\n position: relative;\n display: inline-flex;\n }\n .toolbar-dropdown-button {\n display: flex;\n align-items: center;\n gap: 2px;\n }\n .toolbar-dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n margin-top: 4px;\n background: #ffffff;\n border: 1px solid #e5e7eb;\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n min-width: 150px;\n z-index: 1000;\n overflow: hidden;\n }\n .toolbar-dropdown-menu-right {\n left: auto;\n right: 0;\n }\n .toolbar-dropdown-item {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 10px 14px;\n border: none;\n background: transparent;\n text-align: left;\n font-size: 13px;\n font-weight: 500;\n color: #374151;\n cursor: pointer;\n transition: background-color 0.15s ease;\n }\n .toolbar-dropdown-item:hover {\n background: #f3f4f6;\n }\n .toolbar-dropdown-item:active {\n background: #e5e7eb;\n }\n .toolbar-dropdown-item:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .toolbar-dropdown-item + .toolbar-dropdown-item {\n border-top: 1px solid #f3f4f6;\n }\n .toolbar-dropdown-item svg {\n font-size: 18px;\n color: #6b7280;\n }\n .toolbar-dropdown-item-active {\n background: #eff6ff;\n color: #2563eb;\n }\n .toolbar-dropdown-item-active svg {\n color: #2563eb;\n }\n .toolbar-dropdown-divider {\n height: 1px;\n background: #e5e7eb;\n margin: 4px 0;\n }\n\n\n\n /* ========== TOOLTIP STYLES ========== */\n .toolbar-button[title]:hover::after {\n content: attr(title);\n position: absolute;\n bottom: -32px;\n left: 50%;\n transform: translateX(-50%);\n padding: 6px 10px;\n background: #1f2937;\n color: white;\n font-size: 12px;\n font-weight: 500;\n border-radius: 6px;\n white-space: nowrap;\n z-index: 1000;\n pointer-events: none;\n opacity: 0;\n animation: fadeIn 0.2s ease-out 0.3s forwards;\n }\n @keyframes fadeIn {\n to { opacity: 1; }\n }\n /* ========== SECONDARY TOOLBAR & TABS ========== */\n .pdf-viewer-toolbar-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n .pdf-viewer-secondary-toolbar {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 8px 16px;\n background-color: #f9fafb;\n border-bottom: 1px solid #e5e7eb;\n gap: 12px;\n width: 100%;\n box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);\n animation: slideDown 0.2s ease-out;\n transform-origin: top;\n }\n\n @keyframes slideDown {\n from { opacity: 0; transform: scaleY(0.95); }\n to { opacity: 1; transform: scaleY(1); }\n }\n\n .toolbar-center {\n display: flex;\n align-items: center;\n gap: 4px;\n flex: 1 1 auto;\n justify-content: center;\n }\n\n .toolbar-tab {\n background: none;\n border: none;\n padding: 6px 12px;\n font-size: 14px;\n font-weight: 500;\n color: #6b7280;\n cursor: pointer;\n border-radius: 6px;\n transition: all 0.2s ease;\n }\n\n .toolbar-tab:hover {\n background-color: #f3f4f6;\n color: #374151;\n }\n\n .toolbar-tab-active {\n color: #2563eb;\n background-color: #eff6ff;\n font-weight: 600;\n }\n .toolbar-dropdown-header {\n font-size: 11px;\n font-weight: 600;\n color: #6b7280;\n padding: 8px 12px 4px 12px;\n letter-spacing: 0.5px;\n text-transform: uppercase;\n }\n`;"]}
|