proscenium 0.19.0.beta6 → 0.19.0.beta7

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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -26
  3. data/lib/proscenium/builder.rb +11 -35
  4. data/lib/proscenium/bundled_gems.rb +37 -0
  5. data/lib/proscenium/css_module/transformer.rb +1 -1
  6. data/lib/proscenium/ext/proscenium +0 -0
  7. data/lib/proscenium/ext/proscenium.h +1 -7
  8. data/lib/proscenium/helper.rb +3 -9
  9. data/lib/proscenium/importer.rb +13 -11
  10. data/lib/proscenium/log_subscriber.rb +0 -12
  11. data/lib/proscenium/middleware/base.rb +10 -8
  12. data/lib/proscenium/middleware/esbuild.rb +1 -6
  13. data/lib/proscenium/middleware/ruby_gems.rb +23 -0
  14. data/lib/proscenium/middleware.rb +26 -22
  15. data/lib/proscenium/monkey.rb +3 -5
  16. data/lib/proscenium/phlex/asset_inclusions.rb +0 -1
  17. data/lib/proscenium/railtie.rb +0 -27
  18. data/lib/proscenium/registry/bundled_package.rb +29 -0
  19. data/lib/proscenium/registry/package.rb +95 -0
  20. data/lib/proscenium/registry/ruby_gem_package.rb +28 -0
  21. data/lib/proscenium/registry.rb +29 -0
  22. data/lib/proscenium/resolver.rb +23 -18
  23. data/lib/proscenium/ruby_gems.rb +67 -0
  24. data/lib/proscenium/side_load.rb +20 -63
  25. data/lib/proscenium/ui/flash/bun.lock +19 -0
  26. data/lib/proscenium/ui/flash/index.js +6 -2
  27. data/lib/proscenium/ui/flash/node_modules/dom-mutations/index.d.ts +33 -0
  28. data/lib/proscenium/ui/flash/node_modules/dom-mutations/index.js +44 -0
  29. data/lib/proscenium/ui/flash/node_modules/dom-mutations/license +9 -0
  30. data/lib/proscenium/ui/flash/node_modules/dom-mutations/package.json +59 -0
  31. data/lib/proscenium/ui/flash/node_modules/dom-mutations/readme.md +125 -0
  32. data/lib/proscenium/ui/flash/node_modules/sourdough-toast/LICENSE +20 -0
  33. data/lib/proscenium/ui/flash/node_modules/sourdough-toast/README.md +11 -0
  34. data/lib/proscenium/ui/flash/node_modules/sourdough-toast/package.json +44 -0
  35. data/lib/proscenium/ui/flash/node_modules/sourdough-toast/src/sourdough-toast.css +697 -0
  36. data/lib/proscenium/ui/flash/node_modules/sourdough-toast/src/sourdough-toast.js +537 -0
  37. data/lib/proscenium/ui/flash/package.json +11 -0
  38. data/lib/proscenium/ui/react-manager/index.jsx +3 -22
  39. data/lib/proscenium/ui/ujs/index.js +1 -1
  40. data/lib/proscenium/version.rb +1 -1
  41. data/lib/proscenium.rb +3 -4
  42. metadata +21 -3
  43. data/lib/proscenium/middleware/engines.rb +0 -41
@@ -0,0 +1,697 @@
1
+ /**
2
+ * This file is heavily inspired by Sonner by Emil Kowalski
3
+ * - see https://sonner.emilkowal.ski
4
+ */
5
+
6
+ html[dir="ltr"],
7
+ [data-sourdough-toaster][dir="ltr"] {
8
+ --toast-icon-margin-start: -3px;
9
+ --toast-icon-margin-end: 4px;
10
+ --toast-svg-margin-start: -1px;
11
+ --toast-svg-margin-end: 0px;
12
+ --toast-button-margin-start: auto;
13
+ --toast-button-margin-end: 0;
14
+ --toast-close-button-start: 0;
15
+ --toast-close-button-end: unset;
16
+ --toast-close-button-transform: translate(-35%, -35%);
17
+ }
18
+
19
+ html[dir="rtl"],
20
+ [data-sourdough-toaster][dir="rtl"] {
21
+ --toast-icon-margin-start: 4px;
22
+ --toast-icon-margin-end: -3px;
23
+ --toast-svg-margin-start: 0px;
24
+ --toast-svg-margin-end: -1px;
25
+ --toast-button-margin-start: 0;
26
+ --toast-button-margin-end: auto;
27
+ --toast-close-button-start: unset;
28
+ --toast-close-button-end: 0;
29
+ --toast-close-button-transform: translate(35%, -35%);
30
+ }
31
+
32
+ [data-sourdough-toaster] {
33
+ --border-radius: 12px;
34
+ --font-family: system-ui, sans-serif;
35
+ --background: white;
36
+ --foreground: hsl(0deg 0% 0%);
37
+
38
+ position: fixed;
39
+ box-sizing: border-box;
40
+ padding: 0;
41
+ margin: 0;
42
+ list-style: none;
43
+ outline: none;
44
+ z-index: 999999999;
45
+
46
+ width: var(--width);
47
+ font-family: var(--font-family);
48
+ }
49
+
50
+ [data-sourdough-toaster][data-x-position="right"] {
51
+ right: max(var(--offset), env(safe-area-inset-right));
52
+ }
53
+
54
+ [data-sourdough-toaster][data-x-position="left"] {
55
+ left: max(var(--offset), env(safe-area-inset-left));
56
+ }
57
+
58
+ [data-sourdough-toaster][data-x-position="center"] {
59
+ left: 50%;
60
+ transform: translateX(-50%);
61
+ }
62
+
63
+ [data-sourdough-toaster][data-y-position="top"] {
64
+ top: max(var(--offset), env(safe-area-inset-top));
65
+ }
66
+
67
+ [data-sourdough-toaster][data-y-position="bottom"] {
68
+ bottom: max(var(--offset), env(safe-area-inset-bottom));
69
+ }
70
+
71
+ [data-sourdough-toast] {
72
+ --y: translateY(100%);
73
+ --lift-amount: calc(var(--lift) * var(--gap));
74
+ z-index: var(--z-index);
75
+ position: absolute;
76
+ opacity: 0;
77
+ transform: var(--y);
78
+ /* https://stackoverflow.com/questions/48124372/pointermove-event-not-working-with-touch-why-not */
79
+ touch-action: none;
80
+ will-change: transform, opacity, height;
81
+ transition:
82
+ transform 400ms,
83
+ opacity 400ms,
84
+ height 400ms,
85
+ box-shadow 200ms;
86
+ box-sizing: border-box;
87
+ outline: none;
88
+ overflow-wrap: anywhere;
89
+ }
90
+
91
+ [data-sourdough-toast][data-styled="true"] {
92
+ padding: var(--padding, 16px);
93
+ background: var(--background);
94
+ border: var(--border-width, 1px) solid var(--border-color);
95
+ color: var(--foreground);
96
+ border-radius: var(--border-radius);
97
+ box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15);
98
+ width: var(--width);
99
+ font-size: var(--sourdough-font-size, 14px);
100
+ display: flex;
101
+ align-items: center;
102
+ gap: 6px;
103
+ }
104
+
105
+ [data-sourdough-toast]:focus-visible {
106
+ box-shadow:
107
+ 0px 4px 12px rgba(0, 0, 0, 0.1),
108
+ 0 0 0 2px rgba(0, 0, 0, 0.2);
109
+ }
110
+
111
+ [data-sourdough-toast][data-y-position="top"] {
112
+ top: 0;
113
+ --y: translateY(-100%);
114
+ --lift: 1;
115
+ --lift-amount: calc(1 * var(--gap));
116
+ }
117
+
118
+ [data-sourdough-toast][data-y-position="bottom"] {
119
+ bottom: 0;
120
+ --y: translateY(100%);
121
+ --lift: -1;
122
+ --lift-amount: calc(var(--lift) * var(--gap));
123
+ }
124
+
125
+ [data-sourdough-toast] [data-description] {
126
+ font-weight: 400;
127
+ line-height: 1.4;
128
+ color: inherit;
129
+ }
130
+
131
+ [data-sourdough-toast] [data-title] {
132
+ font-weight: 500;
133
+ line-height: 1.5;
134
+ color: inherit;
135
+ }
136
+
137
+ [data-sourdough-toast] [data-icon] {
138
+ display: flex;
139
+ height: 16px;
140
+ width: 16px;
141
+ position: relative;
142
+ justify-content: flex-start;
143
+ align-items: center;
144
+ flex-shrink: 0;
145
+ margin-left: var(--toast-icon-margin-start);
146
+ margin-right: var(--toast-icon-margin-end);
147
+ }
148
+
149
+ [data-sourdough-toast][data-promise="true"] [data-icon] > svg {
150
+ opacity: 0;
151
+ transform: scale(0.8);
152
+ transform-origin: center;
153
+ animation: sourdough-fade-in 300ms ease forwards;
154
+ }
155
+
156
+ [data-sourdough-toast] [data-icon] > * {
157
+ flex-shrink: 0;
158
+ }
159
+
160
+ [data-sourdough-toast] [data-icon] svg {
161
+ margin-left: var(--toast-svg-margin-start);
162
+ margin-right: var(--toast-svg-margin-end);
163
+ }
164
+
165
+ [data-sourdough-toast] [data-content] {
166
+ display: flex;
167
+ flex-direction: column;
168
+ gap: 2px;
169
+ }
170
+
171
+ [data-sourdough-toast] [data-button] {
172
+ border-radius: 4px;
173
+ padding-left: 8px;
174
+ padding-right: 8px;
175
+ height: 24px;
176
+ font-size: 12px;
177
+ color: var(--sourdough-background);
178
+ background: var(--sourdough-foreground);
179
+ margin-left: var(--toast-button-margin-start);
180
+ margin-right: var(--toast-button-margin-end);
181
+ border: none;
182
+ cursor: pointer;
183
+ outline: none;
184
+ display: flex;
185
+ align-items: center;
186
+ flex-shrink: 0;
187
+ transition:
188
+ opacity 400ms,
189
+ box-shadow 200ms;
190
+ }
191
+
192
+ [data-sourdough-toast] [data-button]:focus-visible {
193
+ box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4);
194
+ }
195
+
196
+ [data-sourdough-toast] [data-button]:first-of-type {
197
+ margin-left: var(--toast-button-margin-start);
198
+ margin-right: var(--toast-button-margin-end);
199
+ }
200
+
201
+ [data-sourdough-toast] [data-cancel] {
202
+ color: var(--sourdough-foreground);
203
+ background: rgba(0, 0, 0, 0.08);
204
+ }
205
+
206
+ [data-sourdough-toast][data-theme="dark"] [data-cancel] {
207
+ background: rgba(255, 255, 255, 0.3);
208
+ }
209
+
210
+ [data-sourdough-toast] [data-close-button] {
211
+ position: absolute;
212
+ left: var(--toast-close-button-start);
213
+ right: var(--toast-close-button-end);
214
+ top: 0;
215
+ height: 20px;
216
+ width: 20px;
217
+ display: flex;
218
+ justify-content: center;
219
+ align-items: center;
220
+ padding: 0;
221
+ background: var(--gray1);
222
+ color: var(--gray12);
223
+ border: 1px solid var(--gray4);
224
+ transform: var(--toast-close-button-transform);
225
+ border-radius: 50%;
226
+ opacity: 0;
227
+ cursor: pointer;
228
+ z-index: 1;
229
+ transition:
230
+ opacity 100ms,
231
+ background 200ms,
232
+ border-color 200ms;
233
+ }
234
+
235
+ [data-sourdough-toast] [data-close-button]:focus-visible {
236
+ box-shadow:
237
+ 0px 4px 12px rgba(0, 0, 0, 0.1),
238
+ 0 0 0 2px rgba(0, 0, 0, 0.2);
239
+ }
240
+
241
+ [data-sourdough-toast] [data-disabled="true"] {
242
+ cursor: not-allowed;
243
+ }
244
+
245
+ [data-sourdough-toast]:hover [data-close-button] {
246
+ opacity: 1;
247
+ }
248
+ [data-sourdough-toast]:focus [data-close-button] {
249
+ opacity: 1;
250
+ }
251
+ [data-sourdough-toast]:focus-within [data-close-button] {
252
+ opacity: 1;
253
+ }
254
+
255
+ [data-sourdough-toast]:hover [data-close-button]:hover {
256
+ background: var(--gray2);
257
+ border-color: var(--gray5);
258
+ }
259
+
260
+ /* Leave a ghost div to avoid setting hover to false when swiping out */
261
+ [data-sourdough-toast][data-swiping="true"]:before {
262
+ content: "";
263
+ position: absolute;
264
+ left: 0;
265
+ right: 0;
266
+ height: 100%;
267
+ }
268
+
269
+ [data-sourdough-toast][data-y-position="top"][data-swiping="true"]:before {
270
+ /* y 50% needed to distribute height additional height evenly */
271
+ bottom: 50%;
272
+ transform: scaleY(3) translateY(50%);
273
+ }
274
+
275
+ [data-sourdough-toast][data-y-position="bottom"][data-swiping="true"]:before {
276
+ /* y -50% needed to distribute height additional height evenly */
277
+ top: 50%;
278
+ transform: scaleY(3) translateY(-50%);
279
+ }
280
+
281
+ /* Leave a ghost div to avoid setting hover to false when transitioning out */
282
+ [data-sourdough-toast][data-swiping="false"][data-removed="true"]:before {
283
+ content: "";
284
+ position: absolute;
285
+ inset: 0;
286
+ transform: scaleY(2);
287
+ }
288
+
289
+ /* Needed to avoid setting hover to false when inbetween toasts */
290
+ [data-sourdough-toast]:after {
291
+ content: "";
292
+ position: absolute;
293
+ left: 0;
294
+ height: calc(var(--gap) + 1px);
295
+ bottom: 100%;
296
+ width: 100%;
297
+ }
298
+
299
+ [data-sourdough-toast][data-mounted="true"] {
300
+ --y: translateY(0);
301
+ opacity: 1;
302
+ }
303
+
304
+ [data-sourdough-toast][data-expanded="false"][data-front="false"] {
305
+ --scale: var(--toasts-before) * 0.05 + 1;
306
+ --y: translateY(calc(var(--lift-amount) * var(--toasts-before)))
307
+ scale(calc(-1 * var(--scale)));
308
+ height: var(--front-toast-height);
309
+ }
310
+
311
+ [data-sourdough-toast] > * {
312
+ transition: opacity 400ms;
313
+ }
314
+
315
+ [data-sourdough-toast][data-expanded="false"][data-front="false"][data-styled="true"]
316
+ > * {
317
+ opacity: 0;
318
+ }
319
+
320
+ [data-sourdough-toast][data-visible="false"] {
321
+ opacity: 0;
322
+ pointer-events: none;
323
+ }
324
+
325
+ [data-sourdough-toast][data-mounted="true"][data-expanded="true"] {
326
+ --y: translateY(calc(var(--lift) * var(--offset)));
327
+ height: var(--initial-height);
328
+ }
329
+
330
+ [data-sourdough-toast][data-removed="true"][data-front="true"][data-swipe-out="false"] {
331
+ --y: translateY(calc(var(--lift) * -100%));
332
+ opacity: 0;
333
+ }
334
+
335
+ [data-sourdough-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"] {
336
+ --y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));
337
+ opacity: 0;
338
+ }
339
+
340
+ [data-sourdough-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"] {
341
+ --y: translateY(40%);
342
+ opacity: 0;
343
+ transition:
344
+ transform 500ms,
345
+ opacity 200ms;
346
+ }
347
+
348
+ /* Bump up the height to make sure hover state doesn't get set to false */
349
+ [data-sourdough-toast][data-removed="true"][data-front="false"]:before {
350
+ height: calc(var(--initial-height) + 20%);
351
+ }
352
+
353
+ [data-sourdough-toast][data-swiping="true"] {
354
+ transform: var(--y) translateY(var(--swipe-amount, 0px));
355
+ transition: none;
356
+ }
357
+
358
+ [data-sourdough-toast][data-swipe-out="true"][data-y-position="bottom"],
359
+ [data-sourdough-toast][data-swipe-out="true"][data-y-position="top"] {
360
+ animation: swipe-out 200ms ease-out forwards;
361
+ }
362
+
363
+ @keyframes swipe-out {
364
+ from {
365
+ transform: translateY(
366
+ calc(var(--lift) * var(--offset) + var(--swipe-amount))
367
+ );
368
+ opacity: 1;
369
+ }
370
+
371
+ to {
372
+ transform: translateY(
373
+ calc(
374
+ var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%
375
+ )
376
+ );
377
+ opacity: 0;
378
+ }
379
+ }
380
+
381
+ @media (max-width: 600px) {
382
+ [data-sourdough-toaster] {
383
+ position: fixed;
384
+ --mobile-offset: 16px;
385
+ right: var(--mobile-offset);
386
+ left: var(--mobile-offset);
387
+ width: 100%;
388
+ }
389
+
390
+ [data-sourdough-toaster] [data-sourdough-toast] {
391
+ left: 0;
392
+ right: 0;
393
+ width: calc(100% - 32px);
394
+ }
395
+
396
+ [data-sourdough-toaster][data-x-position="left"] {
397
+ left: var(--mobile-offset);
398
+ }
399
+
400
+ [data-sourdough-toaster][data-y-position="bottom"] {
401
+ bottom: 20px;
402
+ }
403
+
404
+ [data-sourdough-toaster][data-y-position="top"] {
405
+ top: 20px;
406
+ }
407
+
408
+ [data-sourdough-toaster][data-x-position="center"] {
409
+ left: var(--mobile-offset);
410
+ right: var(--mobile-offset);
411
+ transform: none;
412
+ }
413
+ }
414
+
415
+ [data-sourdough-toaster][data-theme="light"] {
416
+ --sourdough-background: #fff;
417
+ --sourdough-border-color: var(--white);
418
+ --sourdough-foreground: var(--gray12);
419
+
420
+ --success-bg: hsl(143, 85%, 96%);
421
+ --success-border: hsl(145, 92%, 91%);
422
+ --success-text: hsl(140, 100%, 27%);
423
+
424
+ --info-bg: hsl(208, 100%, 97%);
425
+ --info-border: hsl(221, 91%, 91%);
426
+ --info-text: hsl(210, 92%, 45%);
427
+
428
+ --warning-bg: hsl(49, 100%, 97%);
429
+ --warning-border: hsl(49, 91%, 91%);
430
+ --warning-text: hsl(31, 92%, 45%);
431
+
432
+ --error-bg: hsl(359, 100%, 97%);
433
+ --error-border: hsl(359, 100%, 94%);
434
+ --error-text: hsl(360, 100%, 45%);
435
+ }
436
+
437
+ [data-sourdough-toaster][data-theme="light"]
438
+ [data-sourdough-toast][data-invert="true"] {
439
+ --sourdough-background: #000;
440
+ --sourdough-border-color: hsl(0, 0%, 20%);
441
+ --sourdough-foreground: var(--gray1);
442
+ }
443
+
444
+ [data-sourdough-toaster][data-theme="dark"]
445
+ [data-sourdough-toast][data-invert="true"] {
446
+ --sourdough-background: #fff;
447
+ --sourdough-border-color: var(--gray3);
448
+ --sourdough-foreground: var(--gray12);
449
+ }
450
+
451
+ [data-sourdough-toaster][data-theme="dark"] {
452
+ --sourdough-background: #000;
453
+ --sourdough-border-color: hsl(0, 0%, 20%);
454
+ --sourdough-foreground: var(--gray1);
455
+
456
+ --success-bg: hsl(150, 100%, 6%);
457
+ --success-border: hsl(147, 100%, 12%);
458
+ --success-text: hsl(150, 86%, 65%);
459
+
460
+ --info-bg: hsl(215, 100%, 6%);
461
+ --info-border: hsl(223, 100%, 12%);
462
+ --info-text: hsl(216, 87%, 65%);
463
+
464
+ --warning-bg: hsl(64, 100%, 6%);
465
+ --warning-border: hsl(60, 100%, 12%);
466
+ --warning-text: hsl(46, 87%, 65%);
467
+
468
+ --error-bg: hsl(358, 76%, 10%);
469
+ --error-border: hsl(357, 89%, 16%);
470
+ --error-text: hsl(358, 100%, 81%);
471
+ }
472
+
473
+ [data-rich-colors="true"] [data-sourdough-toast][data-type="success"] {
474
+ background: var(--success-bg);
475
+ border-color: var(--success-border);
476
+ color: var(--success-text);
477
+ }
478
+
479
+ [data-rich-colors="true"]
480
+ [data-sourdough-toast][data-type="success"]
481
+ [data-close-button] {
482
+ background: var(--success-bg);
483
+ border-color: var(--success-border);
484
+ color: var(--success-text);
485
+ }
486
+
487
+ [data-rich-colors="true"] [data-sourdough-toast][data-type="info"] {
488
+ background: var(--info-bg);
489
+ border-color: var(--info-border);
490
+ color: var(--info-text);
491
+ }
492
+
493
+ [data-rich-colors="true"]
494
+ [data-sourdough-toast][data-type="info"]
495
+ [data-close-button] {
496
+ background: var(--info-bg);
497
+ border-color: var(--info-border);
498
+ color: var(--info-text);
499
+ }
500
+
501
+ [data-rich-colors="true"] [data-sourdough-toast][data-type="warning"] {
502
+ background: var(--warning-bg);
503
+ border-color: var(--warning-border);
504
+ color: var(--warning-text);
505
+ }
506
+
507
+ [data-rich-colors="true"]
508
+ [data-sourdough-toast][data-type="warning"]
509
+ [data-close-button] {
510
+ background: var(--warning-bg);
511
+ border-color: var(--warning-border);
512
+ color: var(--warning-text);
513
+ }
514
+
515
+ [data-rich-colors="true"] [data-sourdough-toast][data-type="error"] {
516
+ background: var(--error-bg);
517
+ border-color: var(--error-border);
518
+ color: var(--error-text);
519
+ }
520
+
521
+ [data-rich-colors="true"]
522
+ [data-sourdough-toast][data-type="error"]
523
+ [data-close-button] {
524
+ background: var(--error-bg);
525
+ border-color: var(--error-border);
526
+ color: var(--error-text);
527
+ }
528
+
529
+ .sourdough-loading-wrapper {
530
+ --size: 16px;
531
+ height: var(--size);
532
+ width: var(--size);
533
+ position: absolute;
534
+ inset: 0;
535
+ z-index: 10;
536
+ }
537
+
538
+ .sourdough-loading-wrapper[data-visible="false"] {
539
+ transform-origin: center;
540
+ animation: sourdough-fade-out 0.2s ease forwards;
541
+ }
542
+
543
+ .sourdough-spinner {
544
+ position: relative;
545
+ top: 50%;
546
+ left: 50%;
547
+ height: var(--size);
548
+ width: var(--size);
549
+ }
550
+
551
+ .sourdough-loading-bar {
552
+ animation: sourdough-spin 1.2s linear infinite;
553
+ background: var(--gray11);
554
+ border-radius: 6px;
555
+ height: 8%;
556
+ left: -10%;
557
+ position: absolute;
558
+ top: -3.9%;
559
+ width: 24%;
560
+ }
561
+
562
+ .sourdough-loading-bar:nth-child(1) {
563
+ animation-delay: -1.2s;
564
+ /* Rotate trick to avoid adding an additional pixel in some sizes */
565
+ transform: rotate(0.0001deg) translate(146%);
566
+ }
567
+
568
+ .sourdough-loading-bar:nth-child(2) {
569
+ animation-delay: -1.1s;
570
+ transform: rotate(30deg) translate(146%);
571
+ }
572
+
573
+ .sourdough-loading-bar:nth-child(3) {
574
+ animation-delay: -1s;
575
+ transform: rotate(60deg) translate(146%);
576
+ }
577
+
578
+ .sourdough-loading-bar:nth-child(4) {
579
+ animation-delay: -0.9s;
580
+ transform: rotate(90deg) translate(146%);
581
+ }
582
+
583
+ .sourdough-loading-bar:nth-child(5) {
584
+ animation-delay: -0.8s;
585
+ transform: rotate(120deg) translate(146%);
586
+ }
587
+
588
+ .sourdough-loading-bar:nth-child(6) {
589
+ animation-delay: -0.7s;
590
+ transform: rotate(150deg) translate(146%);
591
+ }
592
+
593
+ .sourdough-loading-bar:nth-child(7) {
594
+ animation-delay: -0.6s;
595
+ transform: rotate(180deg) translate(146%);
596
+ }
597
+
598
+ .sourdough-loading-bar:nth-child(8) {
599
+ animation-delay: -0.5s;
600
+ transform: rotate(210deg) translate(146%);
601
+ }
602
+
603
+ .sourdough-loading-bar:nth-child(9) {
604
+ animation-delay: -0.4s;
605
+ transform: rotate(240deg) translate(146%);
606
+ }
607
+
608
+ .sourdough-loading-bar:nth-child(10) {
609
+ animation-delay: -0.3s;
610
+ transform: rotate(270deg) translate(146%);
611
+ }
612
+
613
+ .sourdough-loading-bar:nth-child(11) {
614
+ animation-delay: -0.2s;
615
+ transform: rotate(300deg) translate(146%);
616
+ }
617
+
618
+ .sourdough-loading-bar:nth-child(12) {
619
+ animation-delay: -0.1s;
620
+ transform: rotate(330deg) translate(146%);
621
+ }
622
+
623
+ @keyframes sourdough-fade-in {
624
+ 0% {
625
+ opacity: 0;
626
+ transform: scale(0.8);
627
+ }
628
+ 100% {
629
+ opacity: 1;
630
+ transform: scale(1);
631
+ }
632
+ }
633
+
634
+ @keyframes sourdough-fade-out {
635
+ 0% {
636
+ opacity: 1;
637
+ transform: scale(1);
638
+ }
639
+ 100% {
640
+ opacity: 0;
641
+ transform: scale(0.8);
642
+ }
643
+ }
644
+
645
+ @keyframes sourdough-spin {
646
+ 0% {
647
+ opacity: 1;
648
+ }
649
+ 100% {
650
+ opacity: 0.15;
651
+ }
652
+ }
653
+
654
+ @media (prefers-reduced-motion) {
655
+ [data-sourdough-toast],
656
+ [data-sourdough-toast] > *,
657
+ .sourdough-loading-bar {
658
+ transition: none !important;
659
+ animation: none !important;
660
+ }
661
+ }
662
+
663
+ .loader {
664
+ position: absolute;
665
+ top: 50%;
666
+ left: 50%;
667
+ transform: translate(-50%, -50%);
668
+ transform-origin: center;
669
+ transition:
670
+ opacity 200ms,
671
+ transform 200ms;
672
+ }
673
+
674
+ .loader[data-visible="false"] {
675
+ opacity: 0;
676
+ transform: scale(0.8) translate(-50%, -50%);
677
+ }
678
+
679
+ /* sonner's styles end here */
680
+
681
+ @keyframes sourdough-spin {
682
+ 0% {
683
+ opacity: 1;
684
+ transform: rotate(0deg);
685
+ }
686
+ 50% {
687
+ opacity: 0.5;
688
+ }
689
+ 100% {
690
+ opacity: 1;
691
+ transform: rotate(360deg);
692
+ }
693
+ }
694
+
695
+ [data-sourdough-spinner] {
696
+ animation: sourdough-spin 0.8s linear infinite;
697
+ }