@raster-app/react 0.0.0-stage → 0.1.0-canary-fd0f8dd

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.
Files changed (55) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +122 -2
  3. package/dist/context.d.ts +30 -0
  4. package/dist/context.js +50 -0
  5. package/dist/context.js.map +1 -0
  6. package/dist/icons.d.ts +22 -0
  7. package/dist/icons.js +21 -0
  8. package/dist/icons.js.map +1 -0
  9. package/dist/index.d.ts +13 -0
  10. package/dist/index.js +15 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/picker-parts.d.ts +71 -0
  13. package/dist/picker-parts.js +150 -0
  14. package/dist/picker-parts.js.map +1 -0
  15. package/dist/picker-sign-in.d.ts +7 -0
  16. package/dist/picker-sign-in.js +18 -0
  17. package/dist/picker-sign-in.js.map +1 -0
  18. package/dist/query-keys.d.ts +13 -0
  19. package/dist/query-keys.js +14 -0
  20. package/dist/query-keys.js.map +1 -0
  21. package/dist/raster-picker.d.ts +23 -0
  22. package/dist/raster-picker.js +188 -0
  23. package/dist/raster-picker.js.map +1 -0
  24. package/dist/state-store.d.ts +18 -0
  25. package/dist/state-store.js +47 -0
  26. package/dist/state-store.js.map +1 -0
  27. package/dist/styles.css +1000 -0
  28. package/dist/use-asset-search.d.ts +28 -0
  29. package/dist/use-asset-search.js +82 -0
  30. package/dist/use-asset-search.js.map +1 -0
  31. package/dist/use-asset-upload.d.ts +46 -0
  32. package/dist/use-asset-upload.js +73 -0
  33. package/dist/use-asset-upload.js.map +1 -0
  34. package/dist/use-assets.d.ts +24 -0
  35. package/dist/use-assets.js +63 -0
  36. package/dist/use-assets.js.map +1 -0
  37. package/dist/use-libraries.d.ts +19 -0
  38. package/dist/use-libraries.js +57 -0
  39. package/dist/use-libraries.js.map +1 -0
  40. package/dist/use-navigation.d.ts +31 -0
  41. package/dist/use-navigation.js +111 -0
  42. package/dist/use-navigation.js.map +1 -0
  43. package/dist/use-organizations.d.ts +36 -0
  44. package/dist/use-organizations.js +23 -0
  45. package/dist/use-organizations.js.map +1 -0
  46. package/dist/use-promote-variant.d.ts +43 -0
  47. package/dist/use-promote-variant.js +65 -0
  48. package/dist/use-promote-variant.js.map +1 -0
  49. package/dist/use-session.d.ts +22 -0
  50. package/dist/use-session.js +37 -0
  51. package/dist/use-session.js.map +1 -0
  52. package/dist/use-sign-in.d.ts +34 -0
  53. package/dist/use-sign-in.js +79 -0
  54. package/dist/use-sign-in.js.map +1 -0
  55. package/package.json +54 -4
@@ -0,0 +1,1000 @@
1
+ /*
2
+ * RasterPicker, drawn in Raster's design language: the values of raster/apps/web, by way of
3
+ * mngr.am's Raster picker, with Raster's 14px rem multiplied out to px. Everything is scoped
4
+ * under `.rs`. The picker follows the system's color scheme unless `theme` sets one.
5
+ */
6
+
7
+ .rs {
8
+ color-scheme: light dark;
9
+ --rs-red: #ff2f66;
10
+ --rs-fg: light-dark(#27272a, #ffffff);
11
+ --rs-gray-400: #a1a1aa;
12
+ --rs-gray-500: #71717a;
13
+ --rs-bg: light-dark(#f4f4f5, #27272a);
14
+ --rs-line: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
15
+ --rs-line-strong: light-dark(rgba(0, 0, 0, 0.18), rgba(255, 255, 255, 0.18));
16
+ --rs-hr: light-dark(#e4e4e7, #3f3f46);
17
+ --rs-sidebar-bg: light-dark(rgba(228, 228, 231, 0.3), rgba(63, 63, 70, 0.3));
18
+ --rs-sidebar-edge-inner: light-dark(#fff, #000);
19
+ --rs-sidebar-edge-outer: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
20
+ --rs-item-hover: light-dark(rgba(0, 0, 0, 0.02), rgba(255, 255, 255, 0.02));
21
+ --rs-item-active: light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.1));
22
+ --rs-count-bg: light-dark(#e4e4e7, #3f3f46);
23
+ --rs-input-bg: light-dark(#e4e4e7, #27272a);
24
+ --rs-button-secondary: light-dark(rgba(244, 244, 245, 0.4), rgba(255, 255, 255, 0.1));
25
+ --rs-wash: light-dark(#000, #fff);
26
+ --rs-ghost-hover: light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.1));
27
+ --rs-thumb-bg: light-dark(#e4e4e7, #18181b);
28
+ --rs-thumb-gap: light-dark(#fff, #000);
29
+ --rs-thumb-ring: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
30
+ --rs-thumb-ring-hover: light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.2));
31
+ --rs-thumb-meta: light-dark(rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.2));
32
+ --rs-scroll-thumb: light-dark(#a1a1aa, rgba(255, 255, 255, 0.2));
33
+ --rs-shadow:
34
+ inset 0 0 0 1px light-dark(#fff, rgba(255, 255, 255, 0.1)),
35
+ 0 0 0 1px light-dark(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.5)),
36
+ 0 10px 35px 5px light-dark(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.1)),
37
+ 0 5px 20px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));
38
+
39
+ background: var(--rs-bg);
40
+ color: var(--rs-fg);
41
+ font-family:
42
+ ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
43
+ "Noto Color Emoji";
44
+ font-size: 14px;
45
+ line-height: 1.5;
46
+ text-align: left;
47
+ -webkit-font-smoothing: antialiased;
48
+ -moz-osx-font-smoothing: grayscale;
49
+ user-select: none;
50
+ }
51
+
52
+ .rs[data-theme="light"] {
53
+ color-scheme: light;
54
+ }
55
+
56
+ .rs[data-theme="dark"] {
57
+ color-scheme: dark;
58
+ }
59
+
60
+ .rs *,
61
+ .rs *::before,
62
+ .rs *::after {
63
+ box-sizing: border-box;
64
+ font-family: inherit;
65
+ }
66
+
67
+ /* Raster's `a, button { cursor: default }`: the app is a tool, not a page. */
68
+ .rs button,
69
+ .rs a,
70
+ .rs label {
71
+ cursor: default;
72
+ }
73
+
74
+ .rs h1,
75
+ .rs h2,
76
+ .rs p {
77
+ margin: 0;
78
+ }
79
+
80
+ .rs-visually-hidden {
81
+ position: absolute;
82
+ width: 1px;
83
+ height: 1px;
84
+ overflow: hidden;
85
+ clip-path: inset(50%);
86
+ white-space: nowrap;
87
+ }
88
+
89
+ .rs-selectable {
90
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
91
+ user-select: text;
92
+ }
93
+
94
+ /* ---- layout ---- */
95
+
96
+ .rs-picker {
97
+ display: flex;
98
+ width: 100%;
99
+ height: 100%;
100
+ min-height: 360px;
101
+ overflow: hidden;
102
+ }
103
+
104
+ .rs-picker > .rs-sidebar {
105
+ width: 208px;
106
+ flex-shrink: 0;
107
+ }
108
+
109
+ .rs-main {
110
+ position: relative;
111
+ display: flex;
112
+ flex: 1;
113
+ flex-direction: column;
114
+ min-width: 0;
115
+ }
116
+
117
+ .rs-header {
118
+ display: flex;
119
+ flex-shrink: 0;
120
+ align-items: center;
121
+ gap: 10.5px;
122
+ padding: 10.5px 10.5px 0 16px;
123
+ }
124
+
125
+ /* The title and search give way first, so no button's label is cut. */
126
+ .rs-header > .rs-button {
127
+ flex-shrink: 0;
128
+ }
129
+
130
+ .rs-content {
131
+ flex: 1;
132
+ min-height: 0;
133
+ padding: 16px;
134
+ }
135
+
136
+ .rs-content > * + * {
137
+ margin-top: 16px;
138
+ }
139
+
140
+ .rs-center {
141
+ display: flex;
142
+ flex: 1;
143
+ align-items: center;
144
+ justify-content: center;
145
+ padding: 16px;
146
+ }
147
+
148
+ .rs-row {
149
+ display: flex;
150
+ align-items: center;
151
+ gap: 7px;
152
+ }
153
+
154
+ .rs-scroll {
155
+ overflow-y: auto;
156
+ }
157
+
158
+ .rs-scroll::-webkit-scrollbar {
159
+ width: 12px;
160
+ height: 12px;
161
+ }
162
+
163
+ .rs-scroll::-webkit-scrollbar-thumb {
164
+ border: 5px solid transparent;
165
+ border-radius: 20px;
166
+ background: var(--rs-scroll-thumb);
167
+ background-clip: padding-box;
168
+ }
169
+
170
+ .rs-scroll::-webkit-scrollbar-thumb:hover {
171
+ background-color: var(--rs-red);
172
+ }
173
+
174
+ /* ---- surfaces and type ---- */
175
+
176
+ .rs-window {
177
+ border-radius: 7px;
178
+ background: var(--rs-bg);
179
+ box-shadow: var(--rs-shadow);
180
+ }
181
+
182
+ .rs-card {
183
+ padding: 10.5px 14px;
184
+ border: 1px solid rgba(255, 47, 102, 0.2);
185
+ border-radius: 7px;
186
+ background: rgba(255, 47, 102, 0.1);
187
+ font-size: 12.25px;
188
+ line-height: 17.5px;
189
+ user-select: text;
190
+ }
191
+
192
+ .rs-hr {
193
+ margin: 3.5px 0 10.5px;
194
+ border: 0;
195
+ border-top: 1px solid var(--rs-hr);
196
+ }
197
+
198
+ .rs-brand {
199
+ display: flex;
200
+ align-items: center;
201
+ gap: 8.75px;
202
+ padding: 4px 7px;
203
+ font-weight: 500;
204
+ }
205
+
206
+ .rs-brand > svg {
207
+ color: var(--rs-red);
208
+ }
209
+
210
+ .rs-title {
211
+ font-size: 21px;
212
+ line-height: 28px;
213
+ font-weight: 700;
214
+ letter-spacing: -0.025em;
215
+ }
216
+
217
+ .rs-heading {
218
+ overflow: hidden;
219
+ font-size: 15.75px;
220
+ line-height: 22px;
221
+ font-weight: 500;
222
+ text-overflow: ellipsis;
223
+ white-space: nowrap;
224
+ }
225
+
226
+ .rs-label {
227
+ display: block;
228
+ margin-bottom: 7px;
229
+ font-size: 10.5px;
230
+ line-height: 14px;
231
+ opacity: 0.85;
232
+ }
233
+
234
+ .rs-muted {
235
+ color: var(--rs-gray-500);
236
+ }
237
+
238
+ .rs-small {
239
+ font-size: 12.25px;
240
+ line-height: 17.5px;
241
+ }
242
+
243
+ /* ---- buttons ---- */
244
+
245
+ .rs-button {
246
+ position: relative;
247
+ display: inline-flex;
248
+ align-items: center;
249
+ justify-content: center;
250
+ gap: 7px;
251
+ overflow: hidden;
252
+ padding: 7px 28px;
253
+ border: 1px solid var(--rs-line);
254
+ border-radius: 5.25px;
255
+ background: transparent;
256
+ color: inherit;
257
+ font-size: 14px;
258
+ line-height: 21px;
259
+ font-weight: 500;
260
+ text-decoration: none;
261
+ white-space: nowrap;
262
+ transform: translateZ(0);
263
+ transition:
264
+ color 0.15s ease,
265
+ background-color 0.15s ease,
266
+ border-color 0.15s ease,
267
+ opacity 0.15s ease;
268
+ }
269
+
270
+ .rs-button::after {
271
+ content: "";
272
+ position: absolute;
273
+ inset: 0;
274
+ background: var(--rs-wash);
275
+ opacity: 0;
276
+ transform: translateY(40%);
277
+ transition:
278
+ transform 0.15s ease,
279
+ opacity 0.15s ease;
280
+ }
281
+
282
+ .rs-button:hover,
283
+ .rs-button:focus-visible,
284
+ .rs-button:has(:focus-visible) {
285
+ border-color: var(--rs-line-strong);
286
+ outline: none;
287
+ }
288
+
289
+ .rs-button:active::after {
290
+ opacity: 0.1;
291
+ transform: translateY(0);
292
+ }
293
+
294
+ .rs-button:disabled,
295
+ .rs-button:has(:disabled) {
296
+ opacity: 0.5;
297
+ pointer-events: none;
298
+ }
299
+
300
+ .rs-button-primary {
301
+ border-color: light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.18));
302
+ background: var(--rs-red);
303
+ color: #fff;
304
+ box-shadow: inset 0 0 10px -10px #ff5381;
305
+ }
306
+
307
+ .rs-button-primary:hover,
308
+ .rs-button-primary:focus-visible {
309
+ border-color: light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.3));
310
+ }
311
+
312
+ .rs-button-secondary {
313
+ background: var(--rs-button-secondary);
314
+ }
315
+
316
+ .rs-button-sm {
317
+ padding: 5.25px 14px;
318
+ font-size: 12.25px;
319
+ line-height: 17.5px;
320
+ }
321
+
322
+ .rs-icon-button {
323
+ display: inline-flex;
324
+ align-items: center;
325
+ justify-content: center;
326
+ padding: 5.25px;
327
+ border: 0;
328
+ border-radius: 3.5px;
329
+ background: transparent;
330
+ color: var(--rs-gray-400);
331
+ transition:
332
+ color 0.15s ease,
333
+ background-color 0.15s ease;
334
+ }
335
+
336
+ .rs-icon-button:hover,
337
+ .rs-icon-button:focus-visible {
338
+ outline: none;
339
+ background: var(--rs-ghost-hover);
340
+ color: var(--rs-fg);
341
+ }
342
+
343
+ /* ---- fields ---- */
344
+
345
+ .rs-input {
346
+ width: 100%;
347
+ min-width: 0;
348
+ appearance: none;
349
+ padding: 4.5px 8.75px;
350
+ border: 1px solid var(--rs-line);
351
+ border-radius: 5.25px;
352
+ background: var(--rs-input-bg);
353
+ color: var(--rs-fg);
354
+ font-size: 12.25px;
355
+ line-height: 17.5px;
356
+ outline: none;
357
+ user-select: text;
358
+ transition:
359
+ border-color 0.15s ease,
360
+ background-color 0.15s ease;
361
+ }
362
+
363
+ .rs-input::placeholder {
364
+ color: var(--rs-gray-400);
365
+ }
366
+
367
+ .rs-input:hover {
368
+ border-color: var(--rs-line-strong);
369
+ }
370
+
371
+ .rs-input:focus {
372
+ border-color: var(--rs-red);
373
+ }
374
+
375
+ .rs-input:disabled {
376
+ opacity: 0.5;
377
+ pointer-events: none;
378
+ }
379
+
380
+ .rs-search {
381
+ position: relative;
382
+ display: flex;
383
+ align-items: center;
384
+ width: 100%;
385
+ max-width: 280px;
386
+ margin-left: auto;
387
+ }
388
+
389
+ .rs-search > svg {
390
+ position: absolute;
391
+ left: 8.75px;
392
+ color: var(--rs-gray-400);
393
+ pointer-events: none;
394
+ }
395
+
396
+ .rs-search > .rs-input {
397
+ padding-left: 26px;
398
+ padding-right: 26px;
399
+ }
400
+
401
+ .rs-search > .rs-icon-button {
402
+ position: absolute;
403
+ right: 3.5px;
404
+ padding: 3.5px;
405
+ }
406
+
407
+ /* ---- sidebar ---- */
408
+
409
+ .rs-sidebar {
410
+ display: flex;
411
+ flex-direction: column;
412
+ gap: 1px;
413
+ padding: 10.5px 5.25px;
414
+ background: var(--rs-sidebar-bg);
415
+ box-shadow:
416
+ inset -1px 0 0 var(--rs-sidebar-edge-inner),
417
+ inset -2px 0 0 var(--rs-sidebar-edge-outer);
418
+ }
419
+
420
+ .rs-sidebar > .rs-brand {
421
+ margin-bottom: 7px;
422
+ }
423
+
424
+ .rs-sidebar > nav {
425
+ flex: 1;
426
+ min-height: 0;
427
+ }
428
+
429
+ .rs-sidebar-item {
430
+ display: flex;
431
+ width: 100%;
432
+ align-items: center;
433
+ gap: 8.75px;
434
+ padding: 4px 10.5px;
435
+ border: 0;
436
+ border-radius: 5.25px;
437
+ background: transparent;
438
+ color: inherit;
439
+ font-size: 13px;
440
+ line-height: 19px;
441
+ text-align: left;
442
+ transition: background-color 0.3s ease;
443
+ }
444
+
445
+ .rs-sidebar-item > svg {
446
+ color: var(--rs-gray-400);
447
+ }
448
+
449
+ .rs-sidebar-item:hover,
450
+ .rs-sidebar-item:focus-visible,
451
+ .rs-sidebar-item:has(:focus-visible) {
452
+ outline: none;
453
+ background-color: var(--rs-item-hover);
454
+ }
455
+
456
+ .rs-sidebar-item.is-active {
457
+ background-color: var(--rs-item-active);
458
+ }
459
+
460
+ .rs-sidebar-item:disabled,
461
+ .rs-sidebar-item:has(:disabled) {
462
+ opacity: 0.3;
463
+ pointer-events: none;
464
+ }
465
+
466
+ .rs-sidebar-count {
467
+ flex-shrink: 0;
468
+ min-width: 1.5em;
469
+ margin-left: auto;
470
+ padding: 1.75px 7px;
471
+ border-radius: 3.5px;
472
+ background: var(--rs-count-bg);
473
+ font-size: 10.5px;
474
+ line-height: 14px;
475
+ text-align: center;
476
+ opacity: 0.5;
477
+ }
478
+
479
+ .rs-sidebar-count.is-active {
480
+ opacity: 1;
481
+ }
482
+
483
+ .rs-sidebar-heading {
484
+ margin: 10.5px 0 7px;
485
+ padding-left: 10.5px;
486
+ color: var(--rs-gray-500);
487
+ font-size: 10.5px;
488
+ line-height: 14px;
489
+ font-weight: 400;
490
+ }
491
+
492
+ .rs-sidebar-footer {
493
+ display: grid;
494
+ gap: 1px;
495
+ margin-top: auto;
496
+ padding-top: 7px;
497
+ border-top: 1px solid var(--rs-hr);
498
+ }
499
+
500
+ /* The organization switcher, and its menu in glass over the page. */
501
+ .rs-org {
502
+ position: relative;
503
+ margin-bottom: 7px;
504
+ }
505
+
506
+ .rs-org-trigger {
507
+ padding: 5.25px 8.75px;
508
+ font-size: 14px;
509
+ font-weight: 500;
510
+ }
511
+
512
+ .rs-org-trigger > svg:last-child {
513
+ margin-left: auto;
514
+ }
515
+
516
+ .rs-avatar {
517
+ display: flex;
518
+ flex-shrink: 0;
519
+ align-items: center;
520
+ justify-content: center;
521
+ width: 17.5px;
522
+ height: 17.5px;
523
+ border-radius: 3.5px;
524
+ color: #fff;
525
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
526
+ font-size: 10.5px;
527
+ }
528
+
529
+ .rs-menu {
530
+ position: absolute;
531
+ top: calc(100% + 4px);
532
+ left: 0;
533
+ z-index: 50;
534
+ display: flex;
535
+ flex-direction: column;
536
+ gap: 1px;
537
+ min-width: 266px;
538
+ max-width: 280px;
539
+ max-height: min(calc(100vh - 60px), 600px);
540
+ overflow-y: auto;
541
+ padding: 7px;
542
+ border-radius: 5.25px;
543
+ background: light-dark(rgba(255, 255, 255, 0.8), rgba(24, 24, 27, 0.7));
544
+ -webkit-backdrop-filter: blur(24px);
545
+ backdrop-filter: blur(24px);
546
+ box-shadow: var(--rs-shadow);
547
+ }
548
+
549
+ .rs-menu-heading {
550
+ padding: 3.5px 7px;
551
+ color: var(--rs-gray-500);
552
+ font-size: 10.5px;
553
+ line-height: 14px;
554
+ }
555
+
556
+ /* The library line, red while the library is open. */
557
+ .rs-library {
558
+ position: relative;
559
+ }
560
+
561
+ .rs-library::after {
562
+ content: "";
563
+ position: absolute;
564
+ top: 2px;
565
+ bottom: 4px;
566
+ left: 4px;
567
+ width: 1px;
568
+ background: var(--rs-gray-500);
569
+ transition: background-color 460ms cubic-bezier(0.32, 0.72, 0, 1);
570
+ }
571
+
572
+ .rs-library.is-expanded::after {
573
+ background: var(--rs-red);
574
+ }
575
+
576
+ .rs-library-row {
577
+ height: 30px;
578
+ margin-bottom: 2px;
579
+ padding-right: 5.25px;
580
+ font-weight: 500;
581
+ }
582
+
583
+ .rs-library.is-expanded .rs-library-row > svg {
584
+ color: var(--rs-red);
585
+ }
586
+
587
+ .rs-library-menu {
588
+ display: grid;
589
+ grid-template-rows: 0fr;
590
+ overflow: hidden;
591
+ padding-left: 10px;
592
+ transition: grid-template-rows 460ms cubic-bezier(0.32, 0.72, 0, 1);
593
+ }
594
+
595
+ .rs-library-menu.is-expanded {
596
+ grid-template-rows: 1fr;
597
+ }
598
+
599
+ .rs-library-menu > div {
600
+ min-height: 0;
601
+ opacity: 0;
602
+ transition: opacity 460ms cubic-bezier(0.32, 0.72, 0, 1);
603
+ }
604
+
605
+ .rs-library-menu.is-expanded > div {
606
+ opacity: 1;
607
+ }
608
+
609
+ .rs-library-menu > div::after {
610
+ content: "";
611
+ display: block;
612
+ height: 8px;
613
+ }
614
+
615
+ .rs-library-name {
616
+ flex: 1;
617
+ min-width: 0;
618
+ overflow: hidden;
619
+ white-space: nowrap;
620
+ mask-image: linear-gradient(90deg, #000 80%, transparent 95%);
621
+ }
622
+
623
+ /* ---- asset tiles ---- */
624
+
625
+ .rs-grid {
626
+ display: grid;
627
+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
628
+ gap: 16px;
629
+ }
630
+
631
+ .rs-asset-thumb {
632
+ position: relative;
633
+ isolation: isolate;
634
+ display: flex;
635
+ flex-direction: column;
636
+ justify-content: space-between;
637
+ width: 100%;
638
+ height: 164px;
639
+ overflow: hidden;
640
+ padding: 0;
641
+ border: 0;
642
+ border-radius: 3.5px;
643
+ background: var(--rs-thumb-bg);
644
+ color: inherit;
645
+ text-align: left;
646
+ box-shadow:
647
+ 0 0 0 1px var(--rs-thumb-gap),
648
+ 0 0 0 2px var(--rs-thumb-ring);
649
+ }
650
+
651
+ .rs-asset-thumb:hover {
652
+ box-shadow:
653
+ 0 0 0 1px var(--rs-thumb-gap),
654
+ 0 0 0 2px var(--rs-thumb-ring-hover);
655
+ }
656
+
657
+ .rs-asset-thumb:focus-visible,
658
+ .rs-asset-thumb:active,
659
+ .rs-asset-thumb[aria-pressed="true"] {
660
+ outline: none;
661
+ box-shadow:
662
+ 0 0 0 1px var(--rs-thumb-gap),
663
+ 0 0 0 2px var(--rs-red);
664
+ }
665
+
666
+ .rs-asset-thumb:disabled {
667
+ opacity: 0.6;
668
+ }
669
+
670
+ .rs-thumb-blur {
671
+ position: absolute;
672
+ inset: -56px;
673
+ z-index: 10;
674
+ width: calc(100% + 112px);
675
+ height: calc(100% + 112px);
676
+ object-fit: cover;
677
+ filter: blur(40px);
678
+ opacity: 0.75;
679
+ transform: translateZ(0);
680
+ }
681
+
682
+ .rs-thumb-preview {
683
+ position: relative;
684
+ z-index: 20;
685
+ flex: 1 1 0;
686
+ min-height: 0;
687
+ }
688
+
689
+ .rs-thumb-preview > img {
690
+ position: absolute;
691
+ inset: 0;
692
+ width: 100%;
693
+ height: 100%;
694
+ object-fit: contain;
695
+ transition: opacity 200ms ease;
696
+ }
697
+
698
+ .rs-asset-thumb:not([data-loaded]) .rs-thumb-preview > img {
699
+ opacity: 0;
700
+ }
701
+
702
+ .rs-thumb-meta {
703
+ position: relative;
704
+ z-index: 10;
705
+ display: flex;
706
+ flex-direction: column;
707
+ justify-content: center;
708
+ flex-shrink: 0;
709
+ height: 44px;
710
+ padding: 7px 10.5px;
711
+ background: var(--rs-thumb-meta);
712
+ -webkit-backdrop-filter: blur(12px);
713
+ backdrop-filter: blur(12px);
714
+ }
715
+
716
+ .rs-thumb-title {
717
+ overflow: hidden;
718
+ font-size: 11.5px;
719
+ line-height: 16px;
720
+ text-overflow: ellipsis;
721
+ white-space: nowrap;
722
+ }
723
+
724
+ .rs-thumb-subtitle {
725
+ display: flex;
726
+ align-items: center;
727
+ overflow: hidden;
728
+ font-size: 9.5px;
729
+ line-height: 13px;
730
+ white-space: nowrap;
731
+ opacity: 0.7;
732
+ }
733
+
734
+ .rs-thumb-subtitle > span + span {
735
+ margin-left: 7px;
736
+ padding-left: 7px;
737
+ border-left: 1px solid var(--rs-line);
738
+ }
739
+
740
+ .rs-thumb-subtitle > .rs-spinner {
741
+ width: 11px;
742
+ height: 11px;
743
+ margin-right: 7px;
744
+ }
745
+
746
+ /* A tile's pills: a badge on the left, an action on the right that shows on hover. */
747
+ .rs-tile {
748
+ position: relative;
749
+ }
750
+
751
+ .rs-pill {
752
+ position: absolute;
753
+ top: 7px;
754
+ z-index: 30;
755
+ display: inline-flex;
756
+ align-items: center;
757
+ gap: 3.5px;
758
+ padding: 1.75px 7px;
759
+ border: 0;
760
+ border-radius: 5.25px;
761
+ background: rgba(17, 24, 39, 0.7);
762
+ color: #fff;
763
+ font-size: 10.5px;
764
+ line-height: 14px;
765
+ white-space: nowrap;
766
+ }
767
+
768
+ .rs-tile-badge {
769
+ left: 7px;
770
+ }
771
+
772
+ .rs-tile-action {
773
+ right: 7px;
774
+ opacity: 0;
775
+ transition:
776
+ opacity 0.15s ease,
777
+ background-color 0.15s ease;
778
+ }
779
+
780
+ .rs-tile:hover .rs-tile-action,
781
+ .rs-tile-action:focus-visible,
782
+ .rs-tile-action.is-confirming {
783
+ opacity: 1;
784
+ outline: none;
785
+ }
786
+
787
+ .rs-tile-action:hover {
788
+ background: rgba(17, 24, 39, 0.9);
789
+ }
790
+
791
+ .rs-tile-action.is-confirming {
792
+ background: var(--rs-red);
793
+ }
794
+
795
+ .rs-tile-action:disabled {
796
+ opacity: 0.5;
797
+ pointer-events: none;
798
+ }
799
+
800
+ /* The transparency checkerboard, behind a format that carries alpha. */
801
+ .rs-transparent {
802
+ position: absolute;
803
+ inset: 0 0 44px 0;
804
+ z-index: 10;
805
+ background-color: var(--rs-thumb-bg);
806
+ }
807
+
808
+ .rs-transparent::before {
809
+ content: "";
810
+ position: absolute;
811
+ inset: 0;
812
+ opacity: 0.2;
813
+ background-size: 20px 20px;
814
+ background-image:
815
+ linear-gradient(45deg, #808080 25%, transparent 25%, transparent 75%, #808080 75%, #808080),
816
+ linear-gradient(45deg, #808080 25%, transparent 25%, transparent 75%, #808080 75%, #808080);
817
+ background-position:
818
+ 0 0,
819
+ 10px 10px;
820
+ }
821
+
822
+ /* An opened asset: the image large, beside its facts and actions, which wrap below it when narrow. */
823
+ .rs-detail {
824
+ display: flex;
825
+ flex-wrap: wrap;
826
+ gap: 16px;
827
+ }
828
+
829
+ .rs-detail-image {
830
+ position: relative;
831
+ flex: 999 1 320px;
832
+ height: clamp(220px, 45vh, 440px);
833
+ overflow: hidden;
834
+ border-radius: 3.5px;
835
+ background: var(--rs-thumb-bg);
836
+ box-shadow:
837
+ 0 0 0 1px var(--rs-thumb-gap),
838
+ 0 0 0 2px var(--rs-thumb-ring);
839
+ }
840
+
841
+ .rs-detail-image > img {
842
+ position: absolute;
843
+ inset: 0;
844
+ width: 100%;
845
+ height: 100%;
846
+ object-fit: contain;
847
+ }
848
+
849
+ .rs-detail-info {
850
+ display: flex;
851
+ flex: 1 1 200px;
852
+ flex-direction: column;
853
+ gap: 10.5px;
854
+ min-width: 0;
855
+ }
856
+
857
+ .rs-detail-info > .rs-heading {
858
+ white-space: normal;
859
+ overflow-wrap: anywhere;
860
+ }
861
+
862
+ /* ---- states ---- */
863
+
864
+ .rs-empty {
865
+ display: flex;
866
+ flex-direction: column;
867
+ align-items: center;
868
+ justify-content: center;
869
+ gap: 5.25px;
870
+ min-height: 100%;
871
+ text-align: center;
872
+ }
873
+
874
+ .rs-empty-glyph {
875
+ display: flex;
876
+ align-items: center;
877
+ justify-content: center;
878
+ width: 44px;
879
+ height: 44px;
880
+ margin-bottom: 12px;
881
+ border: 1.5px dashed var(--rs-gray-500);
882
+ border-radius: 10.5px;
883
+ color: var(--rs-gray-500);
884
+ font-size: 17.5px;
885
+ line-height: 1;
886
+ }
887
+
888
+ .rs-spinner {
889
+ display: inline-block;
890
+ flex-shrink: 0;
891
+ width: 14px;
892
+ height: 14px;
893
+ background: currentColor;
894
+ -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19.28.46a24 24 0 109.44 0l-.38 1.97a22 22 0 11-8.68 0L19.28.46z'/%3E%3C/svg%3E")
895
+ center / contain no-repeat;
896
+ mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19.28.46a24 24 0 109.44 0l-.38 1.97a22 22 0 11-8.68 0L19.28.46z'/%3E%3C/svg%3E")
897
+ center / contain no-repeat;
898
+ animation: rs-spin 1s linear infinite;
899
+ }
900
+
901
+ @keyframes rs-spin {
902
+ 100% {
903
+ rotate: 360deg;
904
+ }
905
+ }
906
+
907
+ .rs-status {
908
+ display: inline-flex;
909
+ flex-shrink: 0;
910
+ align-items: center;
911
+ gap: 7px;
912
+ font-size: 12.25px;
913
+ line-height: 17.5px;
914
+ white-space: nowrap;
915
+ }
916
+
917
+ .rs-status[data-status="done"] > svg {
918
+ color: #22c55e;
919
+ }
920
+
921
+ .rs-status[data-status="timed-out"] > svg {
922
+ color: #f59e0b;
923
+ }
924
+
925
+ /* The way back from an opened asset to its library, or to the search results. */
926
+ .rs-crumb {
927
+ flex-shrink: 0;
928
+ padding: 0;
929
+ border: 0;
930
+ background: none;
931
+ color: var(--rs-gray-500);
932
+ font-size: 15.75px;
933
+ line-height: 22px;
934
+ font-weight: 500;
935
+ }
936
+
937
+ .rs-crumb:hover,
938
+ .rs-crumb:focus-visible {
939
+ outline: none;
940
+ color: var(--rs-fg);
941
+ }
942
+
943
+ /* Where a file dropped on the grid lands. */
944
+ .rs-drop {
945
+ position: absolute;
946
+ inset: 7px;
947
+ z-index: 50;
948
+ border: 1px solid var(--rs-red);
949
+ border-radius: 14px;
950
+ background: rgba(255, 47, 102, 0.1);
951
+ opacity: 0;
952
+ pointer-events: none;
953
+ transition: opacity 150ms ease-out;
954
+ }
955
+
956
+ .rs-drop.is-active {
957
+ opacity: 1;
958
+ }
959
+
960
+ /* ---- sign-in ---- */
961
+
962
+ .rs-auth {
963
+ display: flex;
964
+ flex-direction: column;
965
+ gap: 14px;
966
+ width: min(380px, 100%);
967
+ padding: 24px;
968
+ }
969
+
970
+ .rs-auth > .rs-brand {
971
+ padding: 0;
972
+ }
973
+
974
+ .rs-device {
975
+ display: flex;
976
+ flex-direction: column;
977
+ align-items: center;
978
+ gap: 10.5px;
979
+ padding: 16px;
980
+ border: 1.5px dashed var(--rs-gray-500);
981
+ border-radius: 7px;
982
+ }
983
+
984
+ .rs-device-code {
985
+ font-size: 28px;
986
+ line-height: 1;
987
+ font-weight: 700;
988
+ letter-spacing: 0.08em;
989
+ }
990
+
991
+ @media (prefers-reduced-motion: reduce) {
992
+ .rs-library-menu,
993
+ .rs-library-menu > div {
994
+ transition: none;
995
+ }
996
+
997
+ .rs-spinner {
998
+ animation-duration: 3s;
999
+ }
1000
+ }