@files-preview-app/preview-file 1.3.0 → 1.3.2

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/styles.css CHANGED
@@ -140,48 +140,177 @@
140
140
  overflow: hidden;
141
141
  }
142
142
 
143
+ .fp-thumbnail-container {
144
+ height: 100%;
145
+ display: flex;
146
+ flex-shrink: 0;
147
+ overflow: hidden;
148
+ position: relative;
149
+ }
150
+
143
151
  .fp-thumbnail-panel {
144
152
  width: 200px;
145
- background: var(--fp-sidebar-bg);
146
- border-right: 1px solid var(--fp-sidebar-border);
153
+ height: 100%;
154
+ background: var(--fp-sidebar-bg, #0f172a);
155
+ border-right: 1px solid var(--fp-sidebar-border, #1e293b);
147
156
  display: flex;
148
157
  flex-direction: column;
149
- overflow-y: auto;
150
- transition: margin-left 0.3s ease;
158
+ box-sizing: border-box;
159
+ overflow: hidden;
160
+ transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
161
+ flex-shrink: 0;
151
162
  }
152
163
 
153
164
  .fp-thumbnail-panel.hidden {
154
- margin-left: -200px;
165
+ width: 0 !important;
166
+ min-width: 0 !important;
167
+ border-right: none !important;
168
+ opacity: 0;
169
+ pointer-events: none;
170
+ }
171
+
172
+ .fp-thumbnail-header {
173
+ display: flex;
174
+ align-items: center;
175
+ justify-content: space-between;
176
+ padding: 10px 14px;
177
+ border-bottom: 1px solid var(--fp-sidebar-border, #1e293b);
178
+ font-size: 13px;
179
+ font-weight: 600;
180
+ color: var(--fp-text-color, #e2e8f0);
181
+ flex-shrink: 0;
182
+ user-select: none;
183
+ }
184
+
185
+ .fp-thumbnail-title {
186
+ display: flex;
187
+ align-items: center;
188
+ gap: 6px;
189
+ }
190
+
191
+ .fp-thumbnail-close-btn {
192
+ background: transparent;
193
+ border: none;
194
+ color: var(--fp-text-color, #94a3b8);
195
+ cursor: pointer;
196
+ padding: 4px;
197
+ border-radius: 4px;
198
+ display: flex;
199
+ align-items: center;
200
+ justify-content: center;
201
+ transition: background 0.15s ease, color 0.15s ease;
202
+ }
203
+
204
+ .fp-thumbnail-close-btn svg {
205
+ width: 14px;
206
+ height: 14px;
207
+ }
208
+
209
+ .fp-thumbnail-close-btn:hover {
210
+ background: var(--fp-btn-hover-bg, rgba(255, 255, 255, 0.1));
211
+ color: #ffffff;
212
+ }
213
+
214
+ .fp-thumbnail-list {
215
+ flex: 1;
216
+ overflow-y: auto;
217
+ overflow-x: hidden;
218
+ padding: 12px 10px;
219
+ display: flex;
220
+ flex-direction: column;
221
+ gap: 12px;
222
+ align-items: center;
223
+ box-sizing: border-box;
155
224
  }
156
225
 
157
226
  .fp-thumbnail-item {
158
- padding: 12px;
159
227
  display: flex;
160
228
  flex-direction: column;
161
229
  align-items: center;
162
- gap: 8px;
230
+ gap: 6px;
163
231
  cursor: pointer;
164
- border-bottom: 1px solid var(--fp-sidebar-border);
232
+ padding: 6px;
233
+ border-radius: 6px;
234
+ transition: background 0.15s ease, transform 0.1s ease;
235
+ user-select: none;
236
+ width: 150px;
237
+ box-sizing: border-box;
165
238
  }
166
239
 
167
240
  .fp-thumbnail-item:hover {
168
- background: var(--fp-btn-hover-bg);
241
+ background: var(--fp-btn-hover-bg, rgba(255, 255, 255, 0.08));
169
242
  }
170
243
 
171
244
  .fp-thumbnail-item.active {
172
- background: var(--fp-btn-active-bg);
245
+ background: var(--fp-btn-active-bg, rgba(59, 130, 246, 0.15));
246
+ }
247
+
248
+ .fp-thumbnail-canvas-wrapper {
249
+ background: #ffffff;
250
+ border-radius: 3px;
251
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
252
+ padding: 2px;
253
+ display: flex;
254
+ align-items: center;
255
+ justify-content: center;
256
+ border: 2px solid transparent;
257
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
258
+ max-width: 134px;
259
+ overflow: hidden;
260
+ }
261
+
262
+ .fp-thumbnail-item.active .fp-thumbnail-canvas-wrapper {
263
+ border-color: #3b82f6;
264
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4), 0 4px 12px rgba(0, 0, 0, 0.4);
173
265
  }
174
266
 
175
267
  .fp-thumbnail-item canvas {
176
- box-shadow: 0 1px 3px rgba(0,0,0,0.1);
268
+ display: block;
177
269
  max-width: 100%;
178
270
  height: auto;
179
- background: white;
271
+ background: #ffffff;
180
272
  }
181
273
 
182
274
  .fp-thumbnail-label {
183
- font-size: 12px;
184
- color: var(--fp-text-color);
275
+ font-size: 11px;
276
+ font-weight: 500;
277
+ color: var(--fp-text-color, #94a3b8);
278
+ }
279
+
280
+ .fp-thumbnail-item.active .fp-thumbnail-label {
281
+ color: #60a5fa;
282
+ font-weight: 600;
283
+ }
284
+
285
+ /* PDF Text Layer */
286
+ .textLayer {
287
+ position: absolute;
288
+ text-align: initial;
289
+ inset: 0;
290
+ overflow: clip;
291
+ opacity: 1;
292
+ line-height: 1;
293
+ -webkit-text-size-adjust: none;
294
+ -moz-text-size-adjust: none;
295
+ text-size-adjust: none;
296
+ forced-color-adjust: none;
297
+ transform-origin: 0 0;
298
+ caret-color: transparent;
299
+ z-index: 2;
300
+ pointer-events: auto;
301
+ }
302
+
303
+ .textLayer span,
304
+ .textLayer br {
305
+ color: transparent;
306
+ position: absolute;
307
+ white-space: pre;
308
+ cursor: text;
309
+ transform-origin: 0% 0%;
310
+ }
311
+
312
+ .textLayer ::selection {
313
+ background: rgba(0, 102, 255, 0.35);
185
314
  }
186
315
 
187
316
  .fp-content {
@@ -227,3 +356,55 @@
227
356
  font-size: 48px;
228
357
  margin-bottom: 16px;
229
358
  }
359
+
360
+ /* File Name / Title Bar (above toolbar) */
361
+ .fp-titlebar {
362
+ display: flex;
363
+ align-items: center;
364
+ justify-content: space-between;
365
+ padding: 8px 16px;
366
+ background: var(--fp-toolbar-bg, #1e293b);
367
+ border-bottom: 1px solid var(--fp-toolbar-border, #334155);
368
+ color: var(--fp-text-color, #f8fafc);
369
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
370
+ font-size: 13px;
371
+ font-weight: 500;
372
+ user-select: none;
373
+ box-sizing: border-box;
374
+ flex-shrink: 0;
375
+ width: 100%;
376
+ }
377
+
378
+ .fp-titlebar-info {
379
+ display: flex;
380
+ align-items: center;
381
+ gap: 8px;
382
+ min-width: 0;
383
+ overflow: hidden;
384
+ }
385
+
386
+ .fp-titlebar-icon {
387
+ font-size: 15px;
388
+ display: inline-flex;
389
+ align-items: center;
390
+ flex-shrink: 0;
391
+ }
392
+
393
+ .fp-titlebar-name {
394
+ white-space: nowrap;
395
+ overflow: hidden;
396
+ text-overflow: ellipsis;
397
+ font-weight: 600;
398
+ color: var(--fp-text-color, #f8fafc);
399
+ }
400
+
401
+ .fp-titlebar-badge {
402
+ font-size: 11px;
403
+ font-weight: 600;
404
+ padding: 2px 6px;
405
+ border-radius: 4px;
406
+ background: var(--fp-btn-active-bg, rgba(59, 130, 246, 0.2));
407
+ color: var(--fp-accent, #3b82f6);
408
+ text-transform: uppercase;
409
+ flex-shrink: 0;
410
+ }