@duskmoon-dev/core 1.17.1 → 1.18.0

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.
@@ -1,10 +1,371 @@
1
1
  // Auto-generated from chat.css
2
- export const css = `/**
3
- * Chat Component Styles
4
- * DuskMoonUI - LLM-oriented chat primitives
5
- */
2
+ export const css = `@layer components {
3
+ /**
4
+ * Scrollable transcript with Scroll-Driven Animations indicators.
5
+ * Set an explicit height / max-height (or place in a flex child with min-height: 0).
6
+ * Pair each .chat[data-chat-tl="N"] with .chat-scroll-indicator[data-chat-tl="N"] (N = 1..24).
7
+ */
8
+ .chat-scroll {
9
+ --chat-scroll-indicator-size: 0.875rem;
10
+ --chat-scroll-indicator-active-size: 1.125rem;
11
+ --chat-scroll-indicator-thickness: 0.1875rem;
12
+ --chat-scroll-indicator-gap: 0.3125rem;
13
+ --chat-scroll-indicator-hover-scale: 1.55;
14
+ --chat-scroll-indicator-neighbor-scale: 1.22;
15
+
16
+ container-type: size;
17
+ container-name: chat-scroll;
18
+ display: grid;
19
+ grid-template-columns: auto minmax(0, 1fr);
20
+ column-gap: 0.75rem;
21
+ align-items: start;
22
+ min-height: 0;
23
+ overflow-x: hidden;
24
+ overflow-y: auto;
25
+ scroll-behavior: smooth;
26
+ overscroll-behavior-y: contain;
27
+ timeline-scope:
28
+ --chat-1,
29
+ --chat-2,
30
+ --chat-3,
31
+ --chat-4,
32
+ --chat-5,
33
+ --chat-6,
34
+ --chat-7,
35
+ --chat-8,
36
+ --chat-9,
37
+ --chat-10,
38
+ --chat-11,
39
+ --chat-12,
40
+ --chat-13,
41
+ --chat-14,
42
+ --chat-15,
43
+ --chat-16,
44
+ --chat-17,
45
+ --chat-18,
46
+ --chat-19,
47
+ --chat-20,
48
+ --chat-21,
49
+ --chat-22,
50
+ --chat-23,
51
+ --chat-24;
52
+ }
53
+
54
+ .chat-scroll-track {
55
+ position: sticky;
56
+ top: 0;
57
+ z-index: 1;
58
+ display: flex;
59
+ flex-direction: column;
60
+ justify-content: center;
61
+ align-items: center;
62
+ gap: var(--chat-scroll-indicator-gap);
63
+ width: calc(
64
+ var(--chat-scroll-indicator-active-size) * var(--chat-scroll-indicator-hover-scale)
65
+ );
66
+ height: 100cqh;
67
+ margin: 0;
68
+ padding: 0.75rem 0;
69
+ overflow: visible;
70
+ list-style: none;
71
+ pointer-events: none;
72
+ }
73
+
74
+ .chat-scroll-body {
75
+ display: flex;
76
+ flex-direction: column;
77
+ min-width: 0;
78
+ }
79
+
80
+ .chat-scroll-indicator {
81
+ display: block;
82
+ flex-shrink: 0;
83
+ width: var(--chat-scroll-indicator-size);
84
+ height: var(--chat-scroll-indicator-thickness);
85
+ border: 0;
86
+ border-radius: 999px;
87
+ padding: 0;
88
+ appearance: none;
89
+ background-color: color-mix(in oklch, var(--color-on-surface) 28%, transparent);
90
+ color: inherit;
91
+ font: inherit;
92
+ opacity: 0.45;
93
+ pointer-events: auto;
94
+ text-decoration: none;
95
+ cursor: pointer;
96
+ transform: scaleX(1);
97
+ transform-origin: center;
98
+ transition:
99
+ transform 140ms ease,
100
+ opacity 140ms ease,
101
+ background-color 140ms ease;
102
+ }
103
+
104
+ .chat-scroll-indicator:hover,
105
+ .chat-scroll-indicator:focus-visible {
106
+ transform: scaleX(var(--chat-scroll-indicator-hover-scale)) scaleY(1.35);
107
+ background-color: var(--color-on-surface);
108
+ opacity: 1;
109
+ }
110
+
111
+ .chat-scroll-indicator:hover + .chat-scroll-indicator,
112
+ .chat-scroll-indicator:has(+ .chat-scroll-indicator:hover) {
113
+ transform: scaleX(var(--chat-scroll-indicator-neighbor-scale)) scaleY(1.15);
114
+ background-color: color-mix(in oklch, var(--color-on-surface) 55%, transparent);
115
+ opacity: 0.75;
116
+ }
117
+
118
+ .chat[data-chat-tl] {
119
+ scroll-margin-block-start: 0.5rem;
120
+ }
121
+
122
+ .chat-scroll-indicator:focus-visible {
123
+ outline: none;
124
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 20%, transparent);
125
+ }
126
+
127
+ @supports (animation-timeline: --chat-1) {
128
+ .chat-scroll-indicator {
129
+ animation-name: chat-scroll-indicator-activate;
130
+ animation-duration: 1ms;
131
+ animation-timing-function: linear;
132
+ animation-fill-mode: both;
133
+ animation-range: entry 0% exit 100%;
134
+ }
135
+ }
136
+
137
+ .chat[data-chat-tl="1"] {
138
+ view-timeline-name: --chat-1;
139
+ view-timeline-axis: block;
140
+ }
141
+
142
+ .chat[data-chat-tl="2"] {
143
+ view-timeline-name: --chat-2;
144
+ view-timeline-axis: block;
145
+ }
146
+
147
+ .chat[data-chat-tl="3"] {
148
+ view-timeline-name: --chat-3;
149
+ view-timeline-axis: block;
150
+ }
151
+
152
+ .chat[data-chat-tl="4"] {
153
+ view-timeline-name: --chat-4;
154
+ view-timeline-axis: block;
155
+ }
156
+
157
+ .chat[data-chat-tl="5"] {
158
+ view-timeline-name: --chat-5;
159
+ view-timeline-axis: block;
160
+ }
161
+
162
+ .chat[data-chat-tl="6"] {
163
+ view-timeline-name: --chat-6;
164
+ view-timeline-axis: block;
165
+ }
166
+
167
+ .chat[data-chat-tl="7"] {
168
+ view-timeline-name: --chat-7;
169
+ view-timeline-axis: block;
170
+ }
171
+
172
+ .chat[data-chat-tl="8"] {
173
+ view-timeline-name: --chat-8;
174
+ view-timeline-axis: block;
175
+ }
176
+
177
+ .chat[data-chat-tl="9"] {
178
+ view-timeline-name: --chat-9;
179
+ view-timeline-axis: block;
180
+ }
181
+
182
+ .chat[data-chat-tl="10"] {
183
+ view-timeline-name: --chat-10;
184
+ view-timeline-axis: block;
185
+ }
186
+
187
+ .chat[data-chat-tl="11"] {
188
+ view-timeline-name: --chat-11;
189
+ view-timeline-axis: block;
190
+ }
191
+
192
+ .chat[data-chat-tl="12"] {
193
+ view-timeline-name: --chat-12;
194
+ view-timeline-axis: block;
195
+ }
196
+
197
+ .chat[data-chat-tl="13"] {
198
+ view-timeline-name: --chat-13;
199
+ view-timeline-axis: block;
200
+ }
201
+
202
+ .chat[data-chat-tl="14"] {
203
+ view-timeline-name: --chat-14;
204
+ view-timeline-axis: block;
205
+ }
206
+
207
+ .chat[data-chat-tl="15"] {
208
+ view-timeline-name: --chat-15;
209
+ view-timeline-axis: block;
210
+ }
211
+
212
+ .chat[data-chat-tl="16"] {
213
+ view-timeline-name: --chat-16;
214
+ view-timeline-axis: block;
215
+ }
216
+
217
+ .chat[data-chat-tl="17"] {
218
+ view-timeline-name: --chat-17;
219
+ view-timeline-axis: block;
220
+ }
221
+
222
+ .chat[data-chat-tl="18"] {
223
+ view-timeline-name: --chat-18;
224
+ view-timeline-axis: block;
225
+ }
226
+
227
+ .chat[data-chat-tl="19"] {
228
+ view-timeline-name: --chat-19;
229
+ view-timeline-axis: block;
230
+ }
231
+
232
+ .chat[data-chat-tl="20"] {
233
+ view-timeline-name: --chat-20;
234
+ view-timeline-axis: block;
235
+ }
236
+
237
+ .chat[data-chat-tl="21"] {
238
+ view-timeline-name: --chat-21;
239
+ view-timeline-axis: block;
240
+ }
241
+
242
+ .chat[data-chat-tl="22"] {
243
+ view-timeline-name: --chat-22;
244
+ view-timeline-axis: block;
245
+ }
246
+
247
+ .chat[data-chat-tl="23"] {
248
+ view-timeline-name: --chat-23;
249
+ view-timeline-axis: block;
250
+ }
251
+
252
+ .chat[data-chat-tl="24"] {
253
+ view-timeline-name: --chat-24;
254
+ view-timeline-axis: block;
255
+ }
256
+
257
+ .chat-scroll-indicator[data-chat-tl="1"] {
258
+ animation-timeline: --chat-1;
259
+ }
260
+
261
+ .chat-scroll-indicator[data-chat-tl="2"] {
262
+ animation-timeline: --chat-2;
263
+ }
264
+
265
+ .chat-scroll-indicator[data-chat-tl="3"] {
266
+ animation-timeline: --chat-3;
267
+ }
268
+
269
+ .chat-scroll-indicator[data-chat-tl="4"] {
270
+ animation-timeline: --chat-4;
271
+ }
272
+
273
+ .chat-scroll-indicator[data-chat-tl="5"] {
274
+ animation-timeline: --chat-5;
275
+ }
276
+
277
+ .chat-scroll-indicator[data-chat-tl="6"] {
278
+ animation-timeline: --chat-6;
279
+ }
280
+
281
+ .chat-scroll-indicator[data-chat-tl="7"] {
282
+ animation-timeline: --chat-7;
283
+ }
284
+
285
+ .chat-scroll-indicator[data-chat-tl="8"] {
286
+ animation-timeline: --chat-8;
287
+ }
288
+
289
+ .chat-scroll-indicator[data-chat-tl="9"] {
290
+ animation-timeline: --chat-9;
291
+ }
292
+
293
+ .chat-scroll-indicator[data-chat-tl="10"] {
294
+ animation-timeline: --chat-10;
295
+ }
296
+
297
+ .chat-scroll-indicator[data-chat-tl="11"] {
298
+ animation-timeline: --chat-11;
299
+ }
300
+
301
+ .chat-scroll-indicator[data-chat-tl="12"] {
302
+ animation-timeline: --chat-12;
303
+ }
304
+
305
+ .chat-scroll-indicator[data-chat-tl="13"] {
306
+ animation-timeline: --chat-13;
307
+ }
308
+
309
+ .chat-scroll-indicator[data-chat-tl="14"] {
310
+ animation-timeline: --chat-14;
311
+ }
312
+
313
+ .chat-scroll-indicator[data-chat-tl="15"] {
314
+ animation-timeline: --chat-15;
315
+ }
316
+
317
+ .chat-scroll-indicator[data-chat-tl="16"] {
318
+ animation-timeline: --chat-16;
319
+ }
320
+
321
+ .chat-scroll-indicator[data-chat-tl="17"] {
322
+ animation-timeline: --chat-17;
323
+ }
324
+
325
+ .chat-scroll-indicator[data-chat-tl="18"] {
326
+ animation-timeline: --chat-18;
327
+ }
328
+
329
+ .chat-scroll-indicator[data-chat-tl="19"] {
330
+ animation-timeline: --chat-19;
331
+ }
332
+
333
+ .chat-scroll-indicator[data-chat-tl="20"] {
334
+ animation-timeline: --chat-20;
335
+ }
336
+
337
+ .chat-scroll-indicator[data-chat-tl="21"] {
338
+ animation-timeline: --chat-21;
339
+ }
340
+
341
+ .chat-scroll-indicator[data-chat-tl="22"] {
342
+ animation-timeline: --chat-22;
343
+ }
344
+
345
+ .chat-scroll-indicator[data-chat-tl="23"] {
346
+ animation-timeline: --chat-23;
347
+ }
348
+
349
+ .chat-scroll-indicator[data-chat-tl="24"] {
350
+ animation-timeline: --chat-24;
351
+ }
352
+
353
+ @keyframes chat-scroll-indicator-activate {
354
+ 0%,
355
+ 100% {
356
+ width: var(--chat-scroll-indicator-size);
357
+ background-color: color-mix(in oklch, var(--color-on-surface) 28%, transparent);
358
+ opacity: 0.45;
359
+ }
360
+
361
+ 35%,
362
+ 65% {
363
+ width: var(--chat-scroll-indicator-active-size);
364
+ background-color: var(--color-on-surface);
365
+ opacity: 1;
366
+ }
367
+ }
6
368
 
7
- @layer components {
8
369
  .chat {
9
370
  display: grid;
10
371
  grid-template-columns: auto minmax(0, 1fr);
@@ -66,6 +427,10 @@ export const css = `/**
66
427
  --chat-bubble-fg: var(--color-on-surface);
67
428
 
68
429
  position: relative;
430
+ display: flex;
431
+ flex-direction: column;
432
+ align-items: stretch;
433
+ gap: 0.5rem;
69
434
  max-width: min(80ch, 100%);
70
435
  padding: 0.625rem 0.875rem;
71
436
  border-radius: 1rem;
@@ -78,6 +443,10 @@ export const css = `/**
78
443
  word-break: break-word;
79
444
  }
80
445
 
446
+ .chat-bubble-content {
447
+ min-width: 0;
448
+ }
449
+
81
450
  .chat-start .chat-bubble::before,
82
451
  .chat-end .chat-bubble::before,
83
452
  .chat-start .chat-bubble::after,
@@ -260,6 +629,14 @@ export const css = `/**
260
629
  overflow: hidden;
261
630
  }
262
631
 
632
+ .chat-bubble > .chat-reasoning,
633
+ .chat-bubble > .chat-tool,
634
+ .chat-reasoning .chat-tool,
635
+ .chat-reasoning-body > .chat-tool {
636
+ width: 100%;
637
+ max-width: none;
638
+ }
639
+
263
640
  .chat-reasoning > summary,
264
641
  .chat-tool > summary {
265
642
  cursor: pointer;
@@ -272,12 +649,28 @@ export const css = `/**
272
649
  font-weight: 500;
273
650
  }
274
651
 
275
- .chat-reasoning > :not(summary) {
652
+ .chat-reasoning-body {
653
+ display: flex;
654
+ flex-direction: column;
655
+ gap: 0.5rem;
656
+ padding: 0 0.75rem 0.75rem;
657
+ color: var(--color-on-surface-variant);
658
+ }
659
+
660
+ .chat-reasoning-body > :not(.chat-tool) {
661
+ font-style: italic;
662
+ }
663
+
664
+ .chat-reasoning > div:not(.chat-tool):not(.chat-reasoning-body) {
276
665
  padding: 0 0.75rem 0.75rem;
277
666
  color: var(--color-on-surface-variant);
278
667
  font-style: italic;
279
668
  }
280
669
 
670
+ .chat-reasoning > .chat-tool {
671
+ margin: 0 0.75rem 0.75rem;
672
+ }
673
+
281
674
  .chat-tool-header {
282
675
  display: flex;
283
676
  align-items: center;
@@ -372,7 +765,8 @@ export const css = `/**
372
765
  animation-delay: 300ms;
373
766
  }
374
767
 
375
- .chat-bubble-streaming::after {
768
+ .chat-bubble-streaming::after,
769
+ .chat-bubble-content.chat-bubble-streaming::after {
376
770
  content: "";
377
771
  display: inline-block;
378
772
  width: 1px;
@@ -383,6 +777,10 @@ export const css = `/**
383
777
  animation: chat-stream-caret 1s step-end infinite;
384
778
  }
385
779
 
780
+ .chat-bubble.chat-bubble-streaming:has(.chat-reasoning, .chat-tool, .chat-bubble-content)::after {
781
+ content: none;
782
+ }
783
+
386
784
  .chat-reasoning > summary:focus-visible,
387
785
  .chat-tool > summary:focus-visible {
388
786
  outline: none;
@@ -422,15 +820,26 @@ export const css = `/**
422
820
  }
423
821
 
424
822
  @media (prefers-reduced-motion: reduce) {
823
+ .chat-scroll {
824
+ scroll-behavior: auto;
825
+ }
826
+
827
+ .chat-scroll-indicator {
828
+ animation: none;
829
+ transition: none;
830
+ }
831
+
425
832
  .chat-typing::before,
426
833
  .chat-typing::after,
427
834
  .chat-typing span,
428
835
  .chat-bubble-streaming::after,
836
+ .chat-bubble-content.chat-bubble-streaming::after,
429
837
  .chat-tool-running .chat-tool-header::before {
430
838
  animation: none;
431
839
  }
432
840
 
433
- .chat-bubble-streaming::after {
841
+ .chat-bubble-streaming::after,
842
+ .chat-bubble-content.chat-bubble-streaming::after {
434
843
  opacity: 1;
435
844
  }
436
845
  }