@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/index.css CHANGED
@@ -108,6 +108,18 @@ html {
108
108
  */
109
109
 
110
110
  @theme {
111
+ /* ============================================
112
+ * THEME METADATA (5 tokens)
113
+ * Set by generated theme CSS files (e.g., sunshine.css)
114
+ * Enables data-driven theme switching via --theme-pair
115
+ * ============================================ */
116
+
117
+ --theme-name: initial;
118
+ --theme-mode: initial;
119
+ --theme-family: initial;
120
+ --theme-pair: initial;
121
+ --theme-description: initial;
122
+
111
123
  /* ============================================
112
124
  * BRAND COLORS (12 tokens)
113
125
  * ============================================ */
@@ -468,6 +480,11 @@ html {
468
480
  /* Light default — sunshine theme */
469
481
  :root {
470
482
  color-scheme: light;
483
+ --theme-name: "sunshine";
484
+ --theme-mode: "light";
485
+ --theme-family: "duskmoon";
486
+ --theme-pair: "moonlight";
487
+ --theme-description: "Warm amber/coral";
471
488
  --color-primary: oklch(72% 0.17 75);
472
489
  --color-primary-content: oklch(100% 0 0);
473
490
  --color-primary-container: oklch(95% 0.035 95.91);
@@ -544,6 +561,11 @@ html {
544
561
  @media (prefers-color-scheme: dark) {
545
562
  :root:not([data-theme]) {
546
563
  color-scheme: dark;
564
+ --theme-name: "moonlight";
565
+ --theme-mode: "dark";
566
+ --theme-family: "duskmoon";
567
+ --theme-pair: "sunshine";
568
+ --theme-description: "Neutral white/gold";
547
569
  --color-primary: oklch(85.45% 0 0);
548
570
  --color-primary-content: oklch(14.94% 0.031 39.947);
549
571
  --color-primary-container: oklch(25% 0.01 0);
@@ -623,6 +645,11 @@ html {
623
645
 
624
646
  [data-theme="sunshine"] {
625
647
  color-scheme: light;
648
+ --theme-name: "sunshine";
649
+ --theme-mode: "light";
650
+ --theme-family: "duskmoon";
651
+ --theme-pair: "moonlight";
652
+ --theme-description: "Warm amber/coral";
626
653
  --color-primary: oklch(72% 0.17 75);
627
654
  --color-primary-content: oklch(100% 0 0);
628
655
  --color-primary-container: oklch(95% 0.035 95.91);
@@ -677,7 +704,7 @@ html {
677
704
  --color-success-container: oklch(93% 0.04 150);
678
705
  --color-on-success-container: oklch(30% 0.08 150);
679
706
  --color-warning: oklch(68.19% 0.203 42.44);
680
- --color-warning-content: oklch(18.19% 0.3 42);
707
+ --color-warning-content: oklch(18.19% 0.6 42);
681
708
  --color-warning-container: oklch(93% 0.05 80);
682
709
  --color-on-warning-container: oklch(38% 0.10 80);
683
710
  --color-error: oklch(61.17% 0.237 28.15);
@@ -701,6 +728,11 @@ html {
701
728
 
702
729
  [data-theme="moonlight"] {
703
730
  color-scheme: dark;
731
+ --theme-name: "moonlight";
732
+ --theme-mode: "dark";
733
+ --theme-family: "duskmoon";
734
+ --theme-pair: "sunshine";
735
+ --theme-description: "Neutral white/gold";
704
736
  --color-primary: oklch(85.45% 0 0);
705
737
  --color-primary-content: oklch(14.94% 0.031 39.947);
706
738
  --color-primary-container: oklch(25% 0.01 0);
@@ -779,6 +811,11 @@ html {
779
811
 
780
812
  [data-theme="ocean"] {
781
813
  color-scheme: dark;
814
+ --theme-name: "ocean";
815
+ --theme-mode: "dark";
816
+ --theme-family: "ecotone";
817
+ --theme-pair: "forest";
818
+ --theme-description: "Cool blue";
782
819
  --color-primary: oklch(72% 0.12 210);
783
820
  --color-primary-content: oklch(15% 0.02 210);
784
821
  --color-primary-container: oklch(30% 0.08 210);
@@ -857,6 +894,11 @@ html {
857
894
 
858
895
  [data-theme="forest"] {
859
896
  color-scheme: light;
897
+ --theme-name: "forest";
898
+ --theme-mode: "light";
899
+ --theme-family: "ecotone";
900
+ --theme-pair: "ocean";
901
+ --theme-description: "Cool green/teal";
860
902
  --color-primary: oklch(50% 0.14 150);
861
903
  --color-primary-content: oklch(98% 0.01 150);
862
904
  --color-primary-container: oklch(92% 0.04 150);
@@ -929,84 +971,6 @@ html {
929
971
  --noise: 0.8;
930
972
  }
931
973
 
932
- /* GENERATED — DO NOT EDIT */
933
- /* Source: tokens/sunset.yaml */
934
- /* Generator: duskmoon-codegen v2.0.0 */
935
-
936
- [data-theme="sunset"] {
937
- color-scheme: light;
938
- --color-primary: oklch(58% 0.18 35);
939
- --color-primary-content: oklch(98% 0.01 35);
940
- --color-primary-container: oklch(92% 0.04 35);
941
- --color-on-primary-container: oklch(25% 0.07 35);
942
- --color-secondary: oklch(58% 0.15 350);
943
- --color-secondary-content: oklch(98% 0.01 350);
944
- --color-secondary-container: oklch(92% 0.04 350);
945
- --color-on-secondary-container: oklch(25% 0.06 350);
946
- --color-tertiary: oklch(65% 0.14 75);
947
- --color-tertiary-content: oklch(18% 0.04 75);
948
- --color-tertiary-container: oklch(93% 0.04 75);
949
- --color-on-tertiary-container: oklch(28% 0.06 75);
950
- --color-accent: oklch(62% 0.14 310);
951
- --color-accent-content: oklch(98% 0.01 310);
952
- --color-neutral: oklch(14% 0.01 30);
953
- --color-neutral-content: oklch(92% 0.01 50);
954
- --color-neutral-variant: oklch(48% 0.015 40);
955
- --color-surface: oklch(99% 0.008 50);
956
- --color-surface-dim: oklch(95% 0.012 50);
957
- --color-surface-bright: oklch(100% 0 0);
958
- --color-surface-container-lowest: oklch(100% 0 0);
959
- --color-surface-container-low: oklch(98% 0.01 50);
960
- --color-surface-container: oklch(96% 0.012 50);
961
- --color-surface-container-high: oklch(94% 0.015 50);
962
- --color-surface-container-highest: oklch(92% 0.018 50);
963
- --color-surface-variant: oklch(93% 0.02 50);
964
- --color-on-surface: oklch(22% 0.02 30);
965
- --color-on-surface-variant: oklch(42% 0.02 30);
966
- --color-base-100: oklch(99% 0.008 50);
967
- --color-base-200: oklch(92% 0.012 50);
968
- --color-base-300: oklch(80% 0.01 50);
969
- --color-base-400: oklch(60% 0.01 50);
970
- --color-base-500: oklch(48% 0.01 50);
971
- --color-base-600: oklch(38% 0.008 50);
972
- --color-base-700: oklch(28% 0.008 50);
973
- --color-base-800: oklch(20% 0.005 50);
974
- --color-base-900: oklch(14% 0.003 50);
975
- --color-base-content: oklch(14% 0.01 30);
976
- --color-outline: oklch(60% 0.015 40);
977
- --color-outline-variant: oklch(80% 0.01 40);
978
- --color-inverse-surface: oklch(22% 0.02 30);
979
- --color-inverse-on-surface: oklch(95% 0.01 50);
980
- --color-inverse-primary: oklch(75% 0.14 35);
981
- --color-shadow: oklch(0% 0 0);
982
- --color-scrim: oklch(0% 0 0 / 45%);
983
- --color-info: oklch(50% 0.10 245);
984
- --color-info-content: oklch(98% 0.01 245);
985
- --color-info-container: oklch(94% 0.03 245);
986
- --color-on-info-container: oklch(28% 0.05 245);
987
- --color-success: oklch(58% 0.14 140);
988
- --color-success-content: oklch(98% 0.01 140);
989
- --color-success-container: oklch(93% 0.04 140);
990
- --color-on-success-container: oklch(26% 0.06 140);
991
- --color-warning: oklch(65% 0.18 60);
992
- --color-warning-content: oklch(18% 0.05 60);
993
- --color-warning-container: oklch(93% 0.05 60);
994
- --color-on-warning-container: oklch(32% 0.08 60);
995
- --color-error: oklch(52% 0.20 20);
996
- --color-error-content: oklch(98% 0.01 20);
997
- --color-error-container: oklch(93% 0.04 20);
998
- --color-on-error-container: oklch(28% 0.08 20);
999
-
1000
- --radius-selector: 0.1875rem;
1001
- --radius-field: 0.5rem;
1002
- --radius-box: 1.25rem;
1003
- --size-selector: 0.1875rem;
1004
- --size-field: 0.1875rem;
1005
- --border: 0.75px;
1006
- --depth: 0.9;
1007
- --noise: 0.7;
1008
- }
1009
-
1010
974
  /* GENERATED — DO NOT EDIT */
1011
975
  /* Source: tokens/_spacing.yaml */
1012
976
  /* Generator: duskmoon-codegen v2.0.0 */
@@ -4047,6 +4011,413 @@ html {
4047
4011
  }
4048
4012
  }
4049
4013
 
4014
+ /**
4015
+ * Chat Component Styles
4016
+ * DuskMoonUI - LLM-oriented chat primitives
4017
+ */
4018
+
4019
+ @layer components {
4020
+ .chat {
4021
+ display: grid;
4022
+ grid-template-columns: auto minmax(0, 1fr);
4023
+ column-gap: 0.75rem;
4024
+ align-items: end;
4025
+ padding: 0.25rem 0;
4026
+ }
4027
+
4028
+ .chat-start {
4029
+ grid-template-columns: auto minmax(0, 1fr);
4030
+ }
4031
+
4032
+ .chat-end {
4033
+ grid-template-columns: minmax(0, 1fr) auto;
4034
+ }
4035
+
4036
+ .chat-avatar {
4037
+ grid-row: 1 / span 999;
4038
+ grid-column: 1;
4039
+ align-self: start;
4040
+ justify-self: start;
4041
+ }
4042
+
4043
+ .chat-end .chat-avatar {
4044
+ grid-column: 2;
4045
+ justify-self: end;
4046
+ }
4047
+
4048
+ .chat > :not(.chat-avatar) {
4049
+ grid-column: 2;
4050
+ justify-self: start;
4051
+ max-width: 100%;
4052
+ margin-bottom: 0.25rem;
4053
+ }
4054
+
4055
+ .chat-end > :not(.chat-avatar) {
4056
+ grid-column: 1;
4057
+ justify-self: end;
4058
+ }
4059
+
4060
+ .chat-header,
4061
+ .chat-footer {
4062
+ color: var(--color-on-surface-variant);
4063
+ font-size: 0.75rem;
4064
+ line-height: 1rem;
4065
+ }
4066
+
4067
+ .chat-header {
4068
+ margin-bottom: 0.125rem;
4069
+ }
4070
+
4071
+ .chat-footer {
4072
+ margin-top: 0.125rem;
4073
+ margin-bottom: 0;
4074
+ }
4075
+
4076
+ .chat-bubble {
4077
+ --chat-bubble-bg: var(--color-surface-container-highest);
4078
+ --chat-bubble-fg: var(--color-on-surface);
4079
+
4080
+ position: relative;
4081
+ max-width: min(80ch, 100%);
4082
+ padding: 0.625rem 0.875rem;
4083
+ border-radius: 1rem;
4084
+ background-color: var(--chat-bubble-bg);
4085
+ color: var(--chat-bubble-fg);
4086
+ box-shadow: inset 0 0 0 1px var(--color-outline-variant);
4087
+ font-size: 0.875rem;
4088
+ line-height: 1.45;
4089
+ overflow-wrap: anywhere;
4090
+ word-break: break-word;
4091
+ }
4092
+
4093
+ .chat-start .chat-bubble::before,
4094
+ .chat-end .chat-bubble::before,
4095
+ .chat-start .chat-bubble::after,
4096
+ .chat-end .chat-bubble::after {
4097
+ content: "";
4098
+ position: absolute;
4099
+ top: 0;
4100
+ clip-path: polygon(0 0, 100% 0, 100% 100%);
4101
+ }
4102
+
4103
+ .chat-start .chat-bubble::before {
4104
+ left: -0.625rem;
4105
+ width: 1rem;
4106
+ height: 1rem;
4107
+ background-color: var(--color-outline-variant);
4108
+ }
4109
+
4110
+ .chat-start .chat-bubble::after {
4111
+ left: -0.5rem;
4112
+ width: calc(1rem - 2px);
4113
+ height: calc(1rem - 2px);
4114
+ top: 1px;
4115
+ background-color: var(--chat-bubble-bg);
4116
+ }
4117
+
4118
+ .chat-start .chat-bubble {
4119
+ border-top-left-radius: 0;
4120
+ }
4121
+
4122
+ .chat-end .chat-bubble::before {
4123
+ right: -0.625rem;
4124
+ width: 1rem;
4125
+ height: 1rem;
4126
+ background-color: var(--color-outline-variant);
4127
+ transform: scaleX(-1);
4128
+ }
4129
+
4130
+ .chat-end .chat-bubble::after {
4131
+ right: -0.5rem;
4132
+ width: calc(1rem - 2px);
4133
+ height: calc(1rem - 2px);
4134
+ top: 1px;
4135
+ background-color: var(--chat-bubble-bg);
4136
+ transform: scaleX(-1);
4137
+ }
4138
+
4139
+ .chat-end .chat-bubble {
4140
+ border-top-right-radius: 0;
4141
+ }
4142
+
4143
+ .chat-bubble-primary {
4144
+ --chat-bubble-bg: var(--color-primary-container);
4145
+ --chat-bubble-fg: var(--color-on-primary-container);
4146
+ }
4147
+
4148
+ .chat-bubble-secondary {
4149
+ --chat-bubble-bg: var(--color-secondary-container);
4150
+ --chat-bubble-fg: var(--color-on-secondary-container);
4151
+ }
4152
+
4153
+ .chat-bubble-tertiary {
4154
+ --chat-bubble-bg: var(--color-tertiary-container);
4155
+ --chat-bubble-fg: var(--color-on-tertiary-container);
4156
+ }
4157
+
4158
+ .chat-bubble-info {
4159
+ --chat-bubble-bg: var(--color-info-container);
4160
+ --chat-bubble-fg: var(--color-on-info-container);
4161
+ }
4162
+
4163
+ .chat-bubble-success {
4164
+ --chat-bubble-bg: var(--color-success-container);
4165
+ --chat-bubble-fg: var(--color-on-success-container);
4166
+ }
4167
+
4168
+ .chat-bubble-warning {
4169
+ --chat-bubble-bg: var(--color-warning-container);
4170
+ --chat-bubble-fg: var(--color-on-warning-container);
4171
+ }
4172
+
4173
+ .chat-bubble-error {
4174
+ --chat-bubble-bg: var(--color-error-container);
4175
+ --chat-bubble-fg: var(--color-on-error-container);
4176
+ }
4177
+
4178
+ .chat-bubble-filled.chat-bubble-primary {
4179
+ --chat-bubble-bg: var(--color-primary);
4180
+ --chat-bubble-fg: var(--color-primary-content);
4181
+ }
4182
+
4183
+ .chat-bubble-filled.chat-bubble-secondary {
4184
+ --chat-bubble-bg: var(--color-secondary);
4185
+ --chat-bubble-fg: var(--color-secondary-content);
4186
+ }
4187
+
4188
+ .chat-bubble-filled.chat-bubble-tertiary {
4189
+ --chat-bubble-bg: var(--color-tertiary);
4190
+ --chat-bubble-fg: var(--color-tertiary-content);
4191
+ }
4192
+
4193
+ .chat-bubble-filled.chat-bubble-info {
4194
+ --chat-bubble-bg: var(--color-info);
4195
+ --chat-bubble-fg: var(--color-info-content);
4196
+ }
4197
+
4198
+ .chat-bubble-filled.chat-bubble-success {
4199
+ --chat-bubble-bg: var(--color-success);
4200
+ --chat-bubble-fg: var(--color-success-content);
4201
+ }
4202
+
4203
+ .chat-bubble-filled.chat-bubble-warning {
4204
+ --chat-bubble-bg: var(--color-warning);
4205
+ --chat-bubble-fg: var(--color-warning-content);
4206
+ }
4207
+
4208
+ .chat-bubble-filled.chat-bubble-error {
4209
+ --chat-bubble-bg: var(--color-error);
4210
+ --chat-bubble-fg: var(--color-error-content);
4211
+ }
4212
+
4213
+ .chat-bubble-xs {
4214
+ padding: 0.375rem 0.625rem;
4215
+ font-size: 0.75rem;
4216
+ }
4217
+
4218
+ .chat-bubble-sm {
4219
+ padding: 0.5rem 0.75rem;
4220
+ font-size: 0.8125rem;
4221
+ }
4222
+
4223
+ .chat-bubble-md {
4224
+ padding: 0.625rem 0.875rem;
4225
+ font-size: 0.875rem;
4226
+ }
4227
+
4228
+ .chat-bubble-lg {
4229
+ padding: 0.875rem 1.125rem;
4230
+ font-size: 1rem;
4231
+ }
4232
+
4233
+ .chat-reasoning,
4234
+ .chat-tool {
4235
+ width: min(80ch, 100%);
4236
+ border: 1px solid var(--color-outline);
4237
+ border-radius: var(--radius-sm);
4238
+ background-color: var(--color-surface-container-low);
4239
+ color: var(--color-on-surface);
4240
+ font-size: 0.8125rem;
4241
+ line-height: 1.45;
4242
+ overflow: hidden;
4243
+ }
4244
+
4245
+ .chat-reasoning > summary,
4246
+ .chat-tool > summary {
4247
+ cursor: pointer;
4248
+ list-style-position: inside;
4249
+ }
4250
+
4251
+ .chat-reasoning > summary {
4252
+ padding: 0.5rem 0.75rem;
4253
+ color: var(--color-on-surface-variant);
4254
+ font-weight: 500;
4255
+ }
4256
+
4257
+ .chat-reasoning > :not(summary) {
4258
+ padding: 0 0.75rem 0.75rem;
4259
+ color: var(--color-on-surface-variant);
4260
+ font-style: italic;
4261
+ }
4262
+
4263
+ .chat-tool-header {
4264
+ display: flex;
4265
+ align-items: center;
4266
+ gap: 0.5rem;
4267
+ padding: 0.5rem 0.75rem;
4268
+ color: var(--color-on-surface);
4269
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
4270
+ font-size: 0.75rem;
4271
+ font-weight: 600;
4272
+ }
4273
+
4274
+ .chat-tool-status {
4275
+ display: inline-flex;
4276
+ align-items: center;
4277
+ min-height: 1.25rem;
4278
+ padding: 0.125rem 0.5rem;
4279
+ border-radius: 999px;
4280
+ margin-left: auto;
4281
+ font-family: inherit;
4282
+ font-size: 0.6875rem;
4283
+ font-weight: 600;
4284
+ line-height: 1;
4285
+ }
4286
+
4287
+ .chat-tool-call,
4288
+ .chat-tool-result {
4289
+ padding: 0.75rem;
4290
+ border-top: 1px solid var(--color-outline);
4291
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
4292
+ font-size: 0.75rem;
4293
+ overflow-x: auto;
4294
+ }
4295
+
4296
+ .chat-tool-result {
4297
+ background-color: color-mix(in oklch, var(--color-surface-container) 65%, transparent);
4298
+ }
4299
+
4300
+ .chat-tool-pending .chat-tool-status {
4301
+ border: 1px solid var(--color-outline);
4302
+ color: var(--color-on-surface-variant);
4303
+ }
4304
+
4305
+ .chat-tool-running .chat-tool-status {
4306
+ background-color: var(--color-info-container);
4307
+ color: var(--color-on-info-container);
4308
+ }
4309
+
4310
+ .chat-tool-running .chat-tool-header::before {
4311
+ content: "";
4312
+ width: 0.875rem;
4313
+ height: 0.875rem;
4314
+ border: 2px solid currentColor;
4315
+ border-top-color: transparent;
4316
+ border-radius: 999px;
4317
+ animation: chat-tool-spin 800ms linear infinite;
4318
+ }
4319
+
4320
+ .chat-tool-success .chat-tool-status {
4321
+ background-color: var(--color-success-container);
4322
+ color: var(--color-on-success-container);
4323
+ }
4324
+
4325
+ .chat-tool-error .chat-tool-status {
4326
+ background-color: var(--color-error-container);
4327
+ color: var(--color-on-error-container);
4328
+ }
4329
+
4330
+ .chat-typing {
4331
+ display: inline-flex;
4332
+ align-items: center;
4333
+ gap: 0.25rem;
4334
+ min-width: 2.25rem;
4335
+ }
4336
+
4337
+ .chat-typing::before,
4338
+ .chat-typing::after,
4339
+ .chat-typing span {
4340
+ content: "";
4341
+ width: 0.375rem;
4342
+ height: 0.375rem;
4343
+ border-radius: 999px;
4344
+ background-color: currentColor;
4345
+ opacity: 0.55;
4346
+ animation: chat-typing-dot 1.4s ease-in-out infinite;
4347
+ }
4348
+
4349
+ .chat-typing span {
4350
+ animation-delay: 150ms;
4351
+ }
4352
+
4353
+ .chat-typing::after {
4354
+ animation-delay: 300ms;
4355
+ }
4356
+
4357
+ .chat-bubble-streaming::after {
4358
+ content: "";
4359
+ display: inline-block;
4360
+ width: 1px;
4361
+ height: 1em;
4362
+ margin-left: 0.25rem;
4363
+ background-color: currentColor;
4364
+ vertical-align: -0.125em;
4365
+ animation: chat-stream-caret 1s step-end infinite;
4366
+ }
4367
+
4368
+ .chat-reasoning > summary:focus-visible,
4369
+ .chat-tool > summary:focus-visible {
4370
+ outline: none;
4371
+ box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
4372
+ }
4373
+
4374
+ @keyframes chat-typing-dot {
4375
+ 0%,
4376
+ 80%,
4377
+ 100% {
4378
+ opacity: 0.45;
4379
+ transform: translateY(0);
4380
+ }
4381
+
4382
+ 40% {
4383
+ opacity: 1;
4384
+ transform: translateY(-0.1875rem);
4385
+ }
4386
+ }
4387
+
4388
+ @keyframes chat-stream-caret {
4389
+ 0%,
4390
+ 49% {
4391
+ opacity: 1;
4392
+ }
4393
+
4394
+ 50%,
4395
+ 100% {
4396
+ opacity: 0;
4397
+ }
4398
+ }
4399
+
4400
+ @keyframes chat-tool-spin {
4401
+ to {
4402
+ transform: rotate(360deg);
4403
+ }
4404
+ }
4405
+
4406
+ @media (prefers-reduced-motion: reduce) {
4407
+ .chat-typing::before,
4408
+ .chat-typing::after,
4409
+ .chat-typing span,
4410
+ .chat-bubble-streaming::after,
4411
+ .chat-tool-running .chat-tool-header::before {
4412
+ animation: none;
4413
+ }
4414
+
4415
+ .chat-bubble-streaming::after {
4416
+ opacity: 1;
4417
+ }
4418
+ }
4419
+ }
4420
+
4050
4421
  /**
4051
4422
  * Chip Component Styles
4052
4423
  * DuskMoonUI - Material Design 3 inspired chip system