@aphexcms/ui 0.8.3 → 0.8.4

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 (78) hide show
  1. package/dist/components/ui/attachment/attachment-action.svelte +7 -0
  2. package/dist/components/ui/attachment/attachment-action.svelte.d.ts +4 -0
  3. package/dist/components/ui/attachment/attachment-actions.svelte +19 -0
  4. package/dist/components/ui/attachment/attachment-actions.svelte.d.ts +5 -0
  5. package/dist/components/ui/attachment/attachment-content.svelte +19 -0
  6. package/dist/components/ui/attachment/attachment-content.svelte.d.ts +5 -0
  7. package/dist/components/ui/attachment/attachment-context.svelte.d.ts +10 -0
  8. package/dist/components/ui/attachment/attachment-context.svelte.js +13 -0
  9. package/dist/components/ui/attachment/attachment-description.svelte +19 -0
  10. package/dist/components/ui/attachment/attachment-description.svelte.d.ts +5 -0
  11. package/dist/components/ui/attachment/attachment-group.svelte +22 -0
  12. package/dist/components/ui/attachment/attachment-group.svelte.d.ts +5 -0
  13. package/dist/components/ui/attachment/attachment-media.svelte +26 -0
  14. package/dist/components/ui/attachment/attachment-media.svelte.d.ts +8 -0
  15. package/dist/components/ui/attachment/attachment-title.svelte +25 -0
  16. package/dist/components/ui/attachment/attachment-title.svelte.d.ts +5 -0
  17. package/dist/components/ui/attachment/attachment-trigger.svelte +34 -0
  18. package/dist/components/ui/attachment/attachment-trigger.svelte.d.ts +6 -0
  19. package/dist/components/ui/attachment/attachment.svelte +56 -0
  20. package/dist/components/ui/attachment/attachment.svelte.d.ts +11 -0
  21. package/dist/components/ui/attachment/index.d.ts +10 -0
  22. package/dist/components/ui/attachment/index.js +9 -0
  23. package/dist/components/ui/avatar/avatar-fallback.svelte +4 -1
  24. package/dist/components/ui/avatar/avatar-image.svelte +1 -1
  25. package/dist/components/ui/avatar/avatar.svelte +9 -2
  26. package/dist/components/ui/avatar/avatar.svelte.d.ts +4 -1
  27. package/dist/components/ui/bubble/bubble-content.svelte +22 -0
  28. package/dist/components/ui/bubble/bubble-content.svelte.d.ts +5 -0
  29. package/dist/components/ui/bubble/bubble-group.svelte +19 -0
  30. package/dist/components/ui/bubble/bubble-group.svelte.d.ts +5 -0
  31. package/dist/components/ui/bubble/bubble-reactions.svelte +32 -0
  32. package/dist/components/ui/bubble/bubble-reactions.svelte.d.ts +9 -0
  33. package/dist/components/ui/bubble/bubble.svelte +48 -0
  34. package/dist/components/ui/bubble/bubble.svelte.d.ts +43 -0
  35. package/dist/components/ui/bubble/index.d.ts +5 -0
  36. package/dist/components/ui/bubble/index.js +5 -0
  37. package/dist/components/ui/marker/index.d.ts +4 -0
  38. package/dist/components/ui/marker/index.js +4 -0
  39. package/dist/components/ui/marker/marker-content.svelte +17 -0
  40. package/dist/components/ui/marker/marker-content.svelte.d.ts +5 -0
  41. package/dist/components/ui/marker/marker-icon.svelte +18 -0
  42. package/dist/components/ui/marker/marker-icon.svelte.d.ts +5 -0
  43. package/dist/components/ui/marker/marker.svelte +38 -0
  44. package/dist/components/ui/marker/marker.svelte.d.ts +29 -0
  45. package/dist/components/ui/message/index.d.ts +7 -0
  46. package/dist/components/ui/message/index.js +6 -0
  47. package/dist/components/ui/message/message-avatar.svelte +22 -0
  48. package/dist/components/ui/message/message-avatar.svelte.d.ts +5 -0
  49. package/dist/components/ui/message/message-content.svelte +19 -0
  50. package/dist/components/ui/message/message-content.svelte.d.ts +5 -0
  51. package/dist/components/ui/message/message-context.d.ts +3 -0
  52. package/dist/components/ui/message/message-context.js +8 -0
  53. package/dist/components/ui/message/message-footer.svelte +22 -0
  54. package/dist/components/ui/message/message-footer.svelte.d.ts +5 -0
  55. package/dist/components/ui/message/message-group.svelte +19 -0
  56. package/dist/components/ui/message/message-group.svelte.d.ts +5 -0
  57. package/dist/components/ui/message/message-header.svelte +19 -0
  58. package/dist/components/ui/message/message-header.svelte.d.ts +5 -0
  59. package/dist/components/ui/message/message.svelte +27 -0
  60. package/dist/components/ui/message/message.svelte.d.ts +9 -0
  61. package/dist/components/ui/message-scroller/index.d.ts +7 -0
  62. package/dist/components/ui/message-scroller/index.js +7 -0
  63. package/dist/components/ui/message-scroller/message-scroller-button.svelte +51 -0
  64. package/dist/components/ui/message-scroller/message-scroller-button.svelte.d.ts +11 -0
  65. package/dist/components/ui/message-scroller/message-scroller-content.svelte +35 -0
  66. package/dist/components/ui/message-scroller/message-scroller-content.svelte.d.ts +5 -0
  67. package/dist/components/ui/message-scroller/message-scroller-context.svelte.d.ts +39 -0
  68. package/dist/components/ui/message-scroller/message-scroller-context.svelte.js +161 -0
  69. package/dist/components/ui/message-scroller/message-scroller-item.svelte +51 -0
  70. package/dist/components/ui/message-scroller/message-scroller-item.svelte.d.ts +9 -0
  71. package/dist/components/ui/message-scroller/message-scroller-provider.svelte +40 -0
  72. package/dist/components/ui/message-scroller/message-scroller-provider.svelte.d.ts +12 -0
  73. package/dist/components/ui/message-scroller/message-scroller-viewport.svelte +46 -0
  74. package/dist/components/ui/message-scroller/message-scroller-viewport.svelte.d.ts +5 -0
  75. package/dist/components/ui/message-scroller/message-scroller.svelte +27 -0
  76. package/dist/components/ui/message-scroller/message-scroller.svelte.d.ts +5 -0
  77. package/package.json +30 -5
  78. package/src/app.css +369 -18
package/src/app.css CHANGED
@@ -21,7 +21,7 @@
21
21
  --card-foreground: oklch(0.2809 0 0);
22
22
  --popover: oklch(1 0 0);
23
23
  --popover-foreground: oklch(0.2809 0 0);
24
- --primary: oklch(0.6802 0.1902 32.0008);
24
+ --primary: oklch(0.7446 0.1716 50.67);
25
25
  --primary-foreground: oklch(1 0 0);
26
26
  --secondary: oklch(0.9394 0.0046 258.3251);
27
27
  --secondary-foreground: oklch(0.4489 0.02 251.0512);
@@ -32,8 +32,8 @@
32
32
  --destructive: oklch(0.6509 0.2199 25.0358);
33
33
  --destructive-foreground: oklch(1 0 0);
34
34
  --border: oklch(0.9209 0.0035 247.8607);
35
- --input: oklch(0.9659 0.0025 228.7842);
36
- --ring: oklch(0.6802 0.1902 32.0008);
35
+ --input: oklch(0.8901 0.0045 247.8607);
36
+ --ring: oklch(0.7446 0.1716 50.67);
37
37
  --chart-1: oklch(0.7011 0.1193 239.6974);
38
38
  --chart-2: oklch(0.7449 0.1558 32.2982);
39
39
  --chart-3: oklch(0.765 0.177 163.223);
@@ -41,12 +41,12 @@
41
41
  --chart-5: oklch(0.785 0.115 274.713);
42
42
  --sidebar: oklch(0.9757 0.0017 247.8391);
43
43
  --sidebar-foreground: oklch(0.3211 0 0);
44
- --sidebar-primary: oklch(0.6802 0.1902 32.0008);
44
+ --sidebar-primary: oklch(0.7446 0.1716 50.67);
45
45
  --sidebar-primary-foreground: oklch(1 0 0);
46
46
  --sidebar-accent: oklch(0.9204 0.0203 238.6791);
47
47
  --sidebar-accent-foreground: oklch(0.3808 0.1001 259.7551);
48
48
  --sidebar-border: oklch(0.9106 0.006 239.8262);
49
- --sidebar-ring: oklch(0.6802 0.1902 32.0008);
49
+ --sidebar-ring: oklch(0.7446 0.1716 50.67);
50
50
  --font-sans: Inter, sans-serif;
51
51
  --font-serif: Source Serif 4, serif;
52
52
  --font-mono: JetBrains Mono, monospace;
@@ -55,21 +55,21 @@
55
55
  --shadow-y: 1px;
56
56
  --shadow-blur: 3px;
57
57
  --shadow-spread: 0px;
58
- --shadow-opacity: 0.1;
58
+ --shadow-opacity: 0.16;
59
59
  --shadow-color: #29303d;
60
- --shadow-2xs: 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.05);
61
- --shadow-xs: 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.05);
60
+ --shadow-2xs: 0px 1px 2px 0px hsl(219 19.6078% 20% / 0.09);
61
+ --shadow-xs: 0px 1px 2px 0px hsl(219 19.6078% 20% / 0.09);
62
62
  --shadow-sm:
63
- 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.1), 0px 1px 2px -1px hsl(219 19.6078% 20% / 0.1);
63
+ 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.16), 0px 1px 2px -1px hsl(219 19.6078% 20% / 0.12);
64
64
  --shadow:
65
- 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.1), 0px 1px 2px -1px hsl(219 19.6078% 20% / 0.1);
65
+ 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.16), 0px 1px 2px -1px hsl(219 19.6078% 20% / 0.12);
66
66
  --shadow-md:
67
- 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.1), 0px 2px 4px -1px hsl(219 19.6078% 20% / 0.1);
67
+ 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.16), 0px 2px 4px -1px hsl(219 19.6078% 20% / 0.13);
68
68
  --shadow-lg:
69
- 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.1), 0px 4px 6px -1px hsl(219 19.6078% 20% / 0.1);
69
+ 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.16), 0px 4px 6px -1px hsl(219 19.6078% 20% / 0.14);
70
70
  --shadow-xl:
71
- 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.1), 0px 8px 10px -1px hsl(219 19.6078% 20% / 0.1);
72
- --shadow-2xl: 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.25);
71
+ 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.16), 0px 8px 10px -1px hsl(219 19.6078% 20% / 0.15);
72
+ --shadow-2xl: 0px 2px 6px 0px hsl(219 19.6078% 20% / 0.3);
73
73
  --tracking-normal: 0em;
74
74
  --spacing: 0.25rem;
75
75
  }
@@ -81,7 +81,7 @@
81
81
  --card-foreground: oklch(0.9189 0 0);
82
82
  --popover: oklch(0.2617 0.0197 254.8441);
83
83
  --popover-foreground: oklch(0.9189 0 0);
84
- --primary: oklch(0.6802 0.1902 32.0008);
84
+ --primary: oklch(0.7446 0.1716 50.67);
85
85
  --primary-foreground: oklch(1 0 0);
86
86
  --secondary: oklch(0.2988 0.0207 257.2741);
87
87
  --secondary-foreground: oklch(0.9006 0 0);
@@ -93,7 +93,7 @@
93
93
  --destructive-foreground: oklch(1 0 0);
94
94
  --border: oklch(0.3408 0.0192 251.4559);
95
95
  --input: oklch(0.3408 0.0192 251.4559);
96
- --ring: oklch(0.6802 0.1902 32.0008);
96
+ --ring: oklch(0.7446 0.1716 50.67);
97
97
  --chart-1: oklch(0.7011 0.1193 239.6974);
98
98
  --chart-2: oklch(0.7449 0.1558 32.2982);
99
99
  --chart-3: oklch(0.765 0.177 163.223);
@@ -101,12 +101,12 @@
101
101
  --chart-5: oklch(0.785 0.115 274.713);
102
102
  --sidebar: oklch(0.2492 0.02 254.8597);
103
103
  --sidebar-foreground: oklch(0.9189 0 0);
104
- --sidebar-primary: oklch(0.6802 0.1902 32.0008);
104
+ --sidebar-primary: oklch(0.7446 0.1716 50.67);
105
105
  --sidebar-primary-foreground: oklch(1 0 0);
106
106
  --sidebar-accent: oklch(0.3206 0.0396 254.678);
107
107
  --sidebar-accent-foreground: oklch(0.8996 0.0504 251.1357);
108
108
  --sidebar-border: oklch(0.3408 0.0192 251.4559);
109
- --sidebar-ring: oklch(0.6802 0.1902 32.0008);
109
+ --sidebar-ring: oklch(0.7446 0.1716 50.67);
110
110
  --font-sans: Inter, sans-serif;
111
111
  --font-serif: Source Serif 4, serif;
112
112
  --font-mono: JetBrains Mono, monospace;
@@ -192,3 +192,354 @@
192
192
  @apply bg-background text-foreground;
193
193
  }
194
194
  }
195
+
196
+ @layer components {
197
+ .cn-avatar {
198
+ @apply size-8 rounded-full after:rounded-full data-[size=lg]:size-10 data-[size=sm]:size-6;
199
+ }
200
+
201
+ .cn-avatar-fallback {
202
+ @apply bg-muted text-muted-foreground rounded-full;
203
+ }
204
+
205
+ .cn-avatar-image {
206
+ @apply rounded-full;
207
+ }
208
+
209
+ .cn-bubble {
210
+ @apply max-w-[80%] gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full;
211
+ }
212
+
213
+ .cn-bubble-content {
214
+ @apply [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-ring/30 rounded-3xl border border-transparent px-3 py-2.5 text-sm leading-relaxed group-data-[align=end]/bubble:self-end [button,a]:outline-none [button,a]:focus-visible:ring-3;
215
+ }
216
+
217
+ .cn-bubble-variant-default {
218
+ @apply *:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80;
219
+ }
220
+
221
+ .cn-bubble-variant-secondary {
222
+ @apply *:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)];
223
+ }
224
+
225
+ .cn-bubble-variant-muted {
226
+ @apply *:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)];
227
+ }
228
+
229
+ .cn-bubble-variant-tinted {
230
+ @apply *:data-[slot=bubble-content]:text-foreground *:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)];
231
+ }
232
+
233
+ .cn-bubble-variant-outline {
234
+ @apply *:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30;
235
+ }
236
+
237
+ .cn-bubble-variant-ghost {
238
+ @apply [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50 border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0;
239
+ }
240
+
241
+ .cn-bubble-variant-destructive {
242
+ @apply *:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30;
243
+ }
244
+
245
+ .cn-bubble-reactions {
246
+ @apply bg-muted ring-card shrink-0 gap-1 rounded-full px-1.5 py-0.5 text-sm ring-3 has-[button]:p-0;
247
+ }
248
+
249
+ .cn-bubble-reactions-side-top {
250
+ @apply top-0 -translate-y-3/4;
251
+ }
252
+
253
+ .cn-bubble-reactions-side-bottom {
254
+ @apply bottom-0 translate-y-3/4;
255
+ }
256
+
257
+ .cn-bubble-reactions-align-start {
258
+ @apply left-3;
259
+ }
260
+
261
+ .cn-bubble-reactions-align-end {
262
+ @apply right-3;
263
+ }
264
+
265
+ .cn-bubble-group {
266
+ @apply gap-2;
267
+ }
268
+
269
+ .cn-attachment {
270
+ @apply focus-within:ring-ring/30 w-fit rounded-2xl focus-within:ring-1;
271
+ }
272
+
273
+ .cn-attachment-orientation-horizontal {
274
+ @apply min-w-40;
275
+ }
276
+
277
+ .cn-attachment-orientation-vertical {
278
+ @apply w-24 has-data-[slot=attachment-content]:w-30;
279
+ }
280
+
281
+ .cn-attachment-size-default {
282
+ @apply gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2;
283
+ }
284
+
285
+ .cn-attachment-size-sm {
286
+ @apply gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5;
287
+ }
288
+
289
+ .cn-attachment-size-xs {
290
+ @apply gap-1.5 rounded-xl text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1;
291
+ }
292
+
293
+ .cn-attachment-media {
294
+ @apply bg-muted text-foreground w-10 rounded-lg group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5;
295
+ }
296
+
297
+ .cn-attachment-media-variant-image {
298
+ @apply opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100;
299
+ }
300
+
301
+ .cn-attachment-content {
302
+ @apply leading-tight group-data-[orientation=vertical]/attachment:px-1;
303
+ }
304
+
305
+ .cn-attachment-title {
306
+ @apply font-medium;
307
+ }
308
+
309
+ .cn-attachment-description {
310
+ @apply mt-0.5 text-xs;
311
+ }
312
+
313
+ .cn-attachment-actions {
314
+ @apply relative z-20 group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1;
315
+ }
316
+
317
+ .cn-attachment-group {
318
+ @apply scroll-px-1 gap-3 py-1;
319
+ }
320
+
321
+ .cn-attachment-trigger {
322
+ @apply absolute inset-0 z-10 outline-none;
323
+ }
324
+
325
+ .cn-marker {
326
+ @apply text-muted-foreground [a]:hover:text-foreground min-h-4 gap-2 text-left text-sm [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3;
327
+ }
328
+
329
+ .cn-marker-variant-separator {
330
+ @apply before:bg-border after:bg-border before:mr-1 before:h-px before:min-w-0 before:flex-1 after:ml-1 after:h-px after:min-w-0 after:flex-1;
331
+ }
332
+
333
+ .cn-marker-variant-border {
334
+ @apply border-border border-b pb-2;
335
+ }
336
+
337
+ .cn-marker-icon {
338
+ @apply size-4 [&_svg:not([class*='size-'])]:size-4;
339
+ }
340
+
341
+ .cn-marker-content {
342
+ @apply *:[a]:hover:text-foreground group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3;
343
+ }
344
+
345
+ .cn-message-scroller-content {
346
+ @apply gap-8;
347
+ }
348
+
349
+ .cn-message {
350
+ @apply gap-2 text-sm;
351
+ }
352
+
353
+ .cn-message-avatar {
354
+ @apply min-w-8 group-has-data-[slot=message-footer]/message:-translate-y-8;
355
+ }
356
+
357
+ .cn-message-content {
358
+ @apply gap-2.5 group-data-[align=end]/message:*:data-slot:self-end;
359
+ }
360
+
361
+ .cn-message-header {
362
+ @apply text-muted-foreground px-3 text-xs font-medium group-has-data-[variant=ghost]/message:px-0;
363
+ }
364
+
365
+ .cn-message-footer {
366
+ @apply text-muted-foreground px-3 text-xs font-medium group-has-data-[variant=ghost]/message:px-0;
367
+ }
368
+
369
+ .cn-message-group {
370
+ @apply gap-2;
371
+ }
372
+ }
373
+
374
+ @property --scroll-fade-b {
375
+ syntax: '<length-percentage>';
376
+ inherits: false;
377
+ initial-value: 0px;
378
+ }
379
+
380
+ @property --scroll-fade-mask {
381
+ syntax: '*';
382
+ inherits: false;
383
+ }
384
+
385
+ @theme inline {
386
+ @keyframes scroll-fade-reveal-b {
387
+ from {
388
+ --scroll-fade-b: var(
389
+ --_scroll-fade-size-b,
390
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
391
+ );
392
+ }
393
+ to {
394
+ --scroll-fade-b: 0px;
395
+ }
396
+ }
397
+ }
398
+
399
+ @utility scroll-fade-b {
400
+ --_scroll-fade-size-b: var(
401
+ --scroll-fade-b-size,
402
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
403
+ );
404
+ --scroll-fade-mask: linear-gradient(
405
+ to bottom,
406
+ #000 0,
407
+ #000 calc(100% - var(--scroll-fade-b, 0px)),
408
+ transparent 100%
409
+ );
410
+ -webkit-mask-image: var(--scroll-fade-mask);
411
+ mask-image: var(--scroll-fade-mask);
412
+ -webkit-mask-composite: source-in;
413
+ mask-composite: intersect;
414
+ -webkit-mask-repeat: no-repeat;
415
+ mask-repeat: no-repeat;
416
+
417
+ @supports (animation-timeline: scroll()) {
418
+ animation: scroll-fade-reveal-b 1ms ease-in-out;
419
+ animation-timeline: scroll(self y);
420
+ animation-range: calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
421
+ animation-fill-mode: both;
422
+ }
423
+
424
+ @supports not (animation-timeline: scroll()) {
425
+ --scroll-fade-b: var(--_scroll-fade-size-b);
426
+ }
427
+ }
428
+
429
+ @utility scroll-fade {
430
+ --scroll-fade-size: 2rem;
431
+ mask-image: linear-gradient(
432
+ to bottom,
433
+ transparent,
434
+ black var(--scroll-fade-size),
435
+ black calc(100% - var(--scroll-fade-size)),
436
+ transparent
437
+ );
438
+ }
439
+
440
+ /* Shimmer */
441
+ @property --shimmer-angle {
442
+ syntax: '<angle>';
443
+ inherits: true;
444
+ initial-value: 20deg;
445
+ }
446
+
447
+ @property --shimmer-image {
448
+ syntax: '*';
449
+ inherits: false;
450
+ }
451
+
452
+ @property --shimmer-text-fill {
453
+ syntax: '*';
454
+ inherits: false;
455
+ }
456
+
457
+ @theme inline {
458
+ @keyframes tw-shimmer {
459
+ from {
460
+ background-position: 100% 0;
461
+ }
462
+ to {
463
+ background-position: 0 0;
464
+ }
465
+ }
466
+ }
467
+
468
+ @utility shimmer {
469
+ --_spread: var(--shimmer-spread, calc(3ch + 40px));
470
+ --_base: currentColor;
471
+ --_highlight: var(--shimmer-color, oklch(from currentColor l c h / calc(alpha* 0.2)));
472
+
473
+ background-image: var(
474
+ --shimmer-image,
475
+ linear-gradient(
476
+ calc(90deg + var(--shimmer-angle)),
477
+ var(--_base) calc(50% - var(--_spread)),
478
+ color-mix(in oklch, var(--_highlight), var(--_base) 50%) calc(50% - var(--_spread) * 0.5),
479
+ var(--_highlight) 50%,
480
+ color-mix(in oklch, var(--_highlight), var(--_base) 50%) calc(50% + var(--_spread) * 0.5),
481
+ var(--_base) calc(50% + var(--_spread))
482
+ )
483
+ );
484
+ background-repeat: no-repeat;
485
+ background-size: calc(200% + var(--_spread) * 2) 100%;
486
+ background-position: 0 0;
487
+ background-clip: text;
488
+ -webkit-background-clip: text;
489
+ -webkit-text-fill-color: var(--shimmer-text-fill, transparent);
490
+ animation: tw-shimmer var(--shimmer-duration, 2s) linear infinite;
491
+
492
+ @variant dark {
493
+ --_highlight: var(
494
+ --shimmer-color,
495
+ oklch(from currentColor max(0.8, calc(l + 0.4)) c h / calc(alpha + 0.4))
496
+ );
497
+ }
498
+
499
+ &:where([dir='rtl'], [dir='rtl'] *) {
500
+ animation-direction: reverse;
501
+ }
502
+ }
503
+
504
+ @utility shimmer-once {
505
+ animation-iteration-count: 1;
506
+ }
507
+
508
+ @utility shimmer-reverse {
509
+ animation-direction: reverse;
510
+ }
511
+
512
+ @utility shimmer-none {
513
+ --shimmer-image: none;
514
+ --shimmer-text-fill: currentColor;
515
+ }
516
+
517
+ @utility shimmer-color-* {
518
+ --shimmer-color: --value(--color, [color]);
519
+ --shimmer-color: color-mix(
520
+ in oklch,
521
+ --value(--color, [color]) calc(--modifier(integer) * 1%),
522
+ transparent
523
+ );
524
+ }
525
+
526
+ @utility shimmer-duration-* {
527
+ --shimmer-duration: calc(--value(integer) * 1ms);
528
+ }
529
+
530
+ @utility shimmer-spread-* {
531
+ --shimmer-spread: calc(var(--spacing) * --value(integer));
532
+ --shimmer-spread: --value([length], [percentage]);
533
+ }
534
+
535
+ @utility shimmer-angle-* {
536
+ --shimmer-angle: calc(--value(integer) * 1deg);
537
+ }
538
+
539
+ @media (prefers-reduced-motion: reduce) {
540
+ .shimmer {
541
+ animation: none;
542
+ background-image: none;
543
+ -webkit-text-fill-color: currentColor;
544
+ }
545
+ }