@duskmoon-dev/core 1.16.0 → 1.17.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.
- package/dist/components/chat.css +406 -0
- package/dist/components/index.css +407 -0
- package/dist/esm/components/chat.js +413 -0
- package/dist/index.css +450 -79
- package/dist/index.min.css +1 -1
- package/dist/themes/generated/forest.css +5 -0
- package/dist/themes/generated/moonlight.css +5 -0
- package/dist/themes/generated/ocean.css +5 -0
- package/dist/themes/generated/sunshine.css +6 -1
- package/dist/types/themes/generated/ts/types.d.ts +7 -0
- package/dist/types/themes/generated/ts/types.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/plugin.d.ts +1 -1
- package/dist/types/types/plugin.d.ts.map +1 -1
- package/dist/types/types/theme.d.ts +1 -1
- package/dist/types/types/theme.d.ts.map +1 -1
- package/package.json +6 -4
- package/dist/themes/generated/sunset.css +0 -77
|
@@ -3036,6 +3036,413 @@
|
|
|
3036
3036
|
}
|
|
3037
3037
|
}
|
|
3038
3038
|
|
|
3039
|
+
/**
|
|
3040
|
+
* Chat Component Styles
|
|
3041
|
+
* DuskMoonUI - LLM-oriented chat primitives
|
|
3042
|
+
*/
|
|
3043
|
+
|
|
3044
|
+
@layer components {
|
|
3045
|
+
.chat {
|
|
3046
|
+
display: grid;
|
|
3047
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
3048
|
+
column-gap: 0.75rem;
|
|
3049
|
+
align-items: end;
|
|
3050
|
+
padding: 0.25rem 0;
|
|
3051
|
+
}
|
|
3052
|
+
|
|
3053
|
+
.chat-start {
|
|
3054
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
3055
|
+
}
|
|
3056
|
+
|
|
3057
|
+
.chat-end {
|
|
3058
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3061
|
+
.chat-avatar {
|
|
3062
|
+
grid-row: 1 / span 999;
|
|
3063
|
+
grid-column: 1;
|
|
3064
|
+
align-self: start;
|
|
3065
|
+
justify-self: start;
|
|
3066
|
+
}
|
|
3067
|
+
|
|
3068
|
+
.chat-end .chat-avatar {
|
|
3069
|
+
grid-column: 2;
|
|
3070
|
+
justify-self: end;
|
|
3071
|
+
}
|
|
3072
|
+
|
|
3073
|
+
.chat > :not(.chat-avatar) {
|
|
3074
|
+
grid-column: 2;
|
|
3075
|
+
justify-self: start;
|
|
3076
|
+
max-width: 100%;
|
|
3077
|
+
margin-bottom: 0.25rem;
|
|
3078
|
+
}
|
|
3079
|
+
|
|
3080
|
+
.chat-end > :not(.chat-avatar) {
|
|
3081
|
+
grid-column: 1;
|
|
3082
|
+
justify-self: end;
|
|
3083
|
+
}
|
|
3084
|
+
|
|
3085
|
+
.chat-header,
|
|
3086
|
+
.chat-footer {
|
|
3087
|
+
color: var(--color-on-surface-variant);
|
|
3088
|
+
font-size: 0.75rem;
|
|
3089
|
+
line-height: 1rem;
|
|
3090
|
+
}
|
|
3091
|
+
|
|
3092
|
+
.chat-header {
|
|
3093
|
+
margin-bottom: 0.125rem;
|
|
3094
|
+
}
|
|
3095
|
+
|
|
3096
|
+
.chat-footer {
|
|
3097
|
+
margin-top: 0.125rem;
|
|
3098
|
+
margin-bottom: 0;
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3101
|
+
.chat-bubble {
|
|
3102
|
+
--chat-bubble-bg: var(--color-surface-container-highest);
|
|
3103
|
+
--chat-bubble-fg: var(--color-on-surface);
|
|
3104
|
+
|
|
3105
|
+
position: relative;
|
|
3106
|
+
max-width: min(80ch, 100%);
|
|
3107
|
+
padding: 0.625rem 0.875rem;
|
|
3108
|
+
border-radius: 1rem;
|
|
3109
|
+
background-color: var(--chat-bubble-bg);
|
|
3110
|
+
color: var(--chat-bubble-fg);
|
|
3111
|
+
box-shadow: inset 0 0 0 1px var(--color-outline-variant);
|
|
3112
|
+
font-size: 0.875rem;
|
|
3113
|
+
line-height: 1.45;
|
|
3114
|
+
overflow-wrap: anywhere;
|
|
3115
|
+
word-break: break-word;
|
|
3116
|
+
}
|
|
3117
|
+
|
|
3118
|
+
.chat-start .chat-bubble::before,
|
|
3119
|
+
.chat-end .chat-bubble::before,
|
|
3120
|
+
.chat-start .chat-bubble::after,
|
|
3121
|
+
.chat-end .chat-bubble::after {
|
|
3122
|
+
content: "";
|
|
3123
|
+
position: absolute;
|
|
3124
|
+
top: 0;
|
|
3125
|
+
clip-path: polygon(0 0, 100% 0, 100% 100%);
|
|
3126
|
+
}
|
|
3127
|
+
|
|
3128
|
+
.chat-start .chat-bubble::before {
|
|
3129
|
+
left: -0.625rem;
|
|
3130
|
+
width: 1rem;
|
|
3131
|
+
height: 1rem;
|
|
3132
|
+
background-color: var(--color-outline-variant);
|
|
3133
|
+
}
|
|
3134
|
+
|
|
3135
|
+
.chat-start .chat-bubble::after {
|
|
3136
|
+
left: -0.5rem;
|
|
3137
|
+
width: calc(1rem - 2px);
|
|
3138
|
+
height: calc(1rem - 2px);
|
|
3139
|
+
top: 1px;
|
|
3140
|
+
background-color: var(--chat-bubble-bg);
|
|
3141
|
+
}
|
|
3142
|
+
|
|
3143
|
+
.chat-start .chat-bubble {
|
|
3144
|
+
border-top-left-radius: 0;
|
|
3145
|
+
}
|
|
3146
|
+
|
|
3147
|
+
.chat-end .chat-bubble::before {
|
|
3148
|
+
right: -0.625rem;
|
|
3149
|
+
width: 1rem;
|
|
3150
|
+
height: 1rem;
|
|
3151
|
+
background-color: var(--color-outline-variant);
|
|
3152
|
+
transform: scaleX(-1);
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
.chat-end .chat-bubble::after {
|
|
3156
|
+
right: -0.5rem;
|
|
3157
|
+
width: calc(1rem - 2px);
|
|
3158
|
+
height: calc(1rem - 2px);
|
|
3159
|
+
top: 1px;
|
|
3160
|
+
background-color: var(--chat-bubble-bg);
|
|
3161
|
+
transform: scaleX(-1);
|
|
3162
|
+
}
|
|
3163
|
+
|
|
3164
|
+
.chat-end .chat-bubble {
|
|
3165
|
+
border-top-right-radius: 0;
|
|
3166
|
+
}
|
|
3167
|
+
|
|
3168
|
+
.chat-bubble-primary {
|
|
3169
|
+
--chat-bubble-bg: var(--color-primary-container);
|
|
3170
|
+
--chat-bubble-fg: var(--color-on-primary-container);
|
|
3171
|
+
}
|
|
3172
|
+
|
|
3173
|
+
.chat-bubble-secondary {
|
|
3174
|
+
--chat-bubble-bg: var(--color-secondary-container);
|
|
3175
|
+
--chat-bubble-fg: var(--color-on-secondary-container);
|
|
3176
|
+
}
|
|
3177
|
+
|
|
3178
|
+
.chat-bubble-tertiary {
|
|
3179
|
+
--chat-bubble-bg: var(--color-tertiary-container);
|
|
3180
|
+
--chat-bubble-fg: var(--color-on-tertiary-container);
|
|
3181
|
+
}
|
|
3182
|
+
|
|
3183
|
+
.chat-bubble-info {
|
|
3184
|
+
--chat-bubble-bg: var(--color-info-container);
|
|
3185
|
+
--chat-bubble-fg: var(--color-on-info-container);
|
|
3186
|
+
}
|
|
3187
|
+
|
|
3188
|
+
.chat-bubble-success {
|
|
3189
|
+
--chat-bubble-bg: var(--color-success-container);
|
|
3190
|
+
--chat-bubble-fg: var(--color-on-success-container);
|
|
3191
|
+
}
|
|
3192
|
+
|
|
3193
|
+
.chat-bubble-warning {
|
|
3194
|
+
--chat-bubble-bg: var(--color-warning-container);
|
|
3195
|
+
--chat-bubble-fg: var(--color-on-warning-container);
|
|
3196
|
+
}
|
|
3197
|
+
|
|
3198
|
+
.chat-bubble-error {
|
|
3199
|
+
--chat-bubble-bg: var(--color-error-container);
|
|
3200
|
+
--chat-bubble-fg: var(--color-on-error-container);
|
|
3201
|
+
}
|
|
3202
|
+
|
|
3203
|
+
.chat-bubble-filled.chat-bubble-primary {
|
|
3204
|
+
--chat-bubble-bg: var(--color-primary);
|
|
3205
|
+
--chat-bubble-fg: var(--color-primary-content);
|
|
3206
|
+
}
|
|
3207
|
+
|
|
3208
|
+
.chat-bubble-filled.chat-bubble-secondary {
|
|
3209
|
+
--chat-bubble-bg: var(--color-secondary);
|
|
3210
|
+
--chat-bubble-fg: var(--color-secondary-content);
|
|
3211
|
+
}
|
|
3212
|
+
|
|
3213
|
+
.chat-bubble-filled.chat-bubble-tertiary {
|
|
3214
|
+
--chat-bubble-bg: var(--color-tertiary);
|
|
3215
|
+
--chat-bubble-fg: var(--color-tertiary-content);
|
|
3216
|
+
}
|
|
3217
|
+
|
|
3218
|
+
.chat-bubble-filled.chat-bubble-info {
|
|
3219
|
+
--chat-bubble-bg: var(--color-info);
|
|
3220
|
+
--chat-bubble-fg: var(--color-info-content);
|
|
3221
|
+
}
|
|
3222
|
+
|
|
3223
|
+
.chat-bubble-filled.chat-bubble-success {
|
|
3224
|
+
--chat-bubble-bg: var(--color-success);
|
|
3225
|
+
--chat-bubble-fg: var(--color-success-content);
|
|
3226
|
+
}
|
|
3227
|
+
|
|
3228
|
+
.chat-bubble-filled.chat-bubble-warning {
|
|
3229
|
+
--chat-bubble-bg: var(--color-warning);
|
|
3230
|
+
--chat-bubble-fg: var(--color-warning-content);
|
|
3231
|
+
}
|
|
3232
|
+
|
|
3233
|
+
.chat-bubble-filled.chat-bubble-error {
|
|
3234
|
+
--chat-bubble-bg: var(--color-error);
|
|
3235
|
+
--chat-bubble-fg: var(--color-error-content);
|
|
3236
|
+
}
|
|
3237
|
+
|
|
3238
|
+
.chat-bubble-xs {
|
|
3239
|
+
padding: 0.375rem 0.625rem;
|
|
3240
|
+
font-size: 0.75rem;
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3243
|
+
.chat-bubble-sm {
|
|
3244
|
+
padding: 0.5rem 0.75rem;
|
|
3245
|
+
font-size: 0.8125rem;
|
|
3246
|
+
}
|
|
3247
|
+
|
|
3248
|
+
.chat-bubble-md {
|
|
3249
|
+
padding: 0.625rem 0.875rem;
|
|
3250
|
+
font-size: 0.875rem;
|
|
3251
|
+
}
|
|
3252
|
+
|
|
3253
|
+
.chat-bubble-lg {
|
|
3254
|
+
padding: 0.875rem 1.125rem;
|
|
3255
|
+
font-size: 1rem;
|
|
3256
|
+
}
|
|
3257
|
+
|
|
3258
|
+
.chat-reasoning,
|
|
3259
|
+
.chat-tool {
|
|
3260
|
+
width: min(80ch, 100%);
|
|
3261
|
+
border: 1px solid var(--color-outline);
|
|
3262
|
+
border-radius: var(--radius-sm);
|
|
3263
|
+
background-color: var(--color-surface-container-low);
|
|
3264
|
+
color: var(--color-on-surface);
|
|
3265
|
+
font-size: 0.8125rem;
|
|
3266
|
+
line-height: 1.45;
|
|
3267
|
+
overflow: hidden;
|
|
3268
|
+
}
|
|
3269
|
+
|
|
3270
|
+
.chat-reasoning > summary,
|
|
3271
|
+
.chat-tool > summary {
|
|
3272
|
+
cursor: pointer;
|
|
3273
|
+
list-style-position: inside;
|
|
3274
|
+
}
|
|
3275
|
+
|
|
3276
|
+
.chat-reasoning > summary {
|
|
3277
|
+
padding: 0.5rem 0.75rem;
|
|
3278
|
+
color: var(--color-on-surface-variant);
|
|
3279
|
+
font-weight: 500;
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3282
|
+
.chat-reasoning > :not(summary) {
|
|
3283
|
+
padding: 0 0.75rem 0.75rem;
|
|
3284
|
+
color: var(--color-on-surface-variant);
|
|
3285
|
+
font-style: italic;
|
|
3286
|
+
}
|
|
3287
|
+
|
|
3288
|
+
.chat-tool-header {
|
|
3289
|
+
display: flex;
|
|
3290
|
+
align-items: center;
|
|
3291
|
+
gap: 0.5rem;
|
|
3292
|
+
padding: 0.5rem 0.75rem;
|
|
3293
|
+
color: var(--color-on-surface);
|
|
3294
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
|
|
3295
|
+
font-size: 0.75rem;
|
|
3296
|
+
font-weight: 600;
|
|
3297
|
+
}
|
|
3298
|
+
|
|
3299
|
+
.chat-tool-status {
|
|
3300
|
+
display: inline-flex;
|
|
3301
|
+
align-items: center;
|
|
3302
|
+
min-height: 1.25rem;
|
|
3303
|
+
padding: 0.125rem 0.5rem;
|
|
3304
|
+
border-radius: 999px;
|
|
3305
|
+
margin-left: auto;
|
|
3306
|
+
font-family: inherit;
|
|
3307
|
+
font-size: 0.6875rem;
|
|
3308
|
+
font-weight: 600;
|
|
3309
|
+
line-height: 1;
|
|
3310
|
+
}
|
|
3311
|
+
|
|
3312
|
+
.chat-tool-call,
|
|
3313
|
+
.chat-tool-result {
|
|
3314
|
+
padding: 0.75rem;
|
|
3315
|
+
border-top: 1px solid var(--color-outline);
|
|
3316
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
|
|
3317
|
+
font-size: 0.75rem;
|
|
3318
|
+
overflow-x: auto;
|
|
3319
|
+
}
|
|
3320
|
+
|
|
3321
|
+
.chat-tool-result {
|
|
3322
|
+
background-color: color-mix(in oklch, var(--color-surface-container) 65%, transparent);
|
|
3323
|
+
}
|
|
3324
|
+
|
|
3325
|
+
.chat-tool-pending .chat-tool-status {
|
|
3326
|
+
border: 1px solid var(--color-outline);
|
|
3327
|
+
color: var(--color-on-surface-variant);
|
|
3328
|
+
}
|
|
3329
|
+
|
|
3330
|
+
.chat-tool-running .chat-tool-status {
|
|
3331
|
+
background-color: var(--color-info-container);
|
|
3332
|
+
color: var(--color-on-info-container);
|
|
3333
|
+
}
|
|
3334
|
+
|
|
3335
|
+
.chat-tool-running .chat-tool-header::before {
|
|
3336
|
+
content: "";
|
|
3337
|
+
width: 0.875rem;
|
|
3338
|
+
height: 0.875rem;
|
|
3339
|
+
border: 2px solid currentColor;
|
|
3340
|
+
border-top-color: transparent;
|
|
3341
|
+
border-radius: 999px;
|
|
3342
|
+
animation: chat-tool-spin 800ms linear infinite;
|
|
3343
|
+
}
|
|
3344
|
+
|
|
3345
|
+
.chat-tool-success .chat-tool-status {
|
|
3346
|
+
background-color: var(--color-success-container);
|
|
3347
|
+
color: var(--color-on-success-container);
|
|
3348
|
+
}
|
|
3349
|
+
|
|
3350
|
+
.chat-tool-error .chat-tool-status {
|
|
3351
|
+
background-color: var(--color-error-container);
|
|
3352
|
+
color: var(--color-on-error-container);
|
|
3353
|
+
}
|
|
3354
|
+
|
|
3355
|
+
.chat-typing {
|
|
3356
|
+
display: inline-flex;
|
|
3357
|
+
align-items: center;
|
|
3358
|
+
gap: 0.25rem;
|
|
3359
|
+
min-width: 2.25rem;
|
|
3360
|
+
}
|
|
3361
|
+
|
|
3362
|
+
.chat-typing::before,
|
|
3363
|
+
.chat-typing::after,
|
|
3364
|
+
.chat-typing span {
|
|
3365
|
+
content: "";
|
|
3366
|
+
width: 0.375rem;
|
|
3367
|
+
height: 0.375rem;
|
|
3368
|
+
border-radius: 999px;
|
|
3369
|
+
background-color: currentColor;
|
|
3370
|
+
opacity: 0.55;
|
|
3371
|
+
animation: chat-typing-dot 1.4s ease-in-out infinite;
|
|
3372
|
+
}
|
|
3373
|
+
|
|
3374
|
+
.chat-typing span {
|
|
3375
|
+
animation-delay: 150ms;
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3378
|
+
.chat-typing::after {
|
|
3379
|
+
animation-delay: 300ms;
|
|
3380
|
+
}
|
|
3381
|
+
|
|
3382
|
+
.chat-bubble-streaming::after {
|
|
3383
|
+
content: "";
|
|
3384
|
+
display: inline-block;
|
|
3385
|
+
width: 1px;
|
|
3386
|
+
height: 1em;
|
|
3387
|
+
margin-left: 0.25rem;
|
|
3388
|
+
background-color: currentColor;
|
|
3389
|
+
vertical-align: -0.125em;
|
|
3390
|
+
animation: chat-stream-caret 1s step-end infinite;
|
|
3391
|
+
}
|
|
3392
|
+
|
|
3393
|
+
.chat-reasoning > summary:focus-visible,
|
|
3394
|
+
.chat-tool > summary:focus-visible {
|
|
3395
|
+
outline: none;
|
|
3396
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
|
|
3397
|
+
}
|
|
3398
|
+
|
|
3399
|
+
@keyframes chat-typing-dot {
|
|
3400
|
+
0%,
|
|
3401
|
+
80%,
|
|
3402
|
+
100% {
|
|
3403
|
+
opacity: 0.45;
|
|
3404
|
+
transform: translateY(0);
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3407
|
+
40% {
|
|
3408
|
+
opacity: 1;
|
|
3409
|
+
transform: translateY(-0.1875rem);
|
|
3410
|
+
}
|
|
3411
|
+
}
|
|
3412
|
+
|
|
3413
|
+
@keyframes chat-stream-caret {
|
|
3414
|
+
0%,
|
|
3415
|
+
49% {
|
|
3416
|
+
opacity: 1;
|
|
3417
|
+
}
|
|
3418
|
+
|
|
3419
|
+
50%,
|
|
3420
|
+
100% {
|
|
3421
|
+
opacity: 0;
|
|
3422
|
+
}
|
|
3423
|
+
}
|
|
3424
|
+
|
|
3425
|
+
@keyframes chat-tool-spin {
|
|
3426
|
+
to {
|
|
3427
|
+
transform: rotate(360deg);
|
|
3428
|
+
}
|
|
3429
|
+
}
|
|
3430
|
+
|
|
3431
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3432
|
+
.chat-typing::before,
|
|
3433
|
+
.chat-typing::after,
|
|
3434
|
+
.chat-typing span,
|
|
3435
|
+
.chat-bubble-streaming::after,
|
|
3436
|
+
.chat-tool-running .chat-tool-header::before {
|
|
3437
|
+
animation: none;
|
|
3438
|
+
}
|
|
3439
|
+
|
|
3440
|
+
.chat-bubble-streaming::after {
|
|
3441
|
+
opacity: 1;
|
|
3442
|
+
}
|
|
3443
|
+
}
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3039
3446
|
/**
|
|
3040
3447
|
* Chip Component Styles
|
|
3041
3448
|
* DuskMoonUI - Material Design 3 inspired chip system
|