@dotcraft/avatar 0.6.3 → 0.6.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 (61) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +46 -43
  3. package/dist/accessories.css +14 -14
  4. package/dist/avatar.css +62 -62
  5. package/dist/composer/ComposerMascot.d.ts +1 -1
  6. package/dist/composer/ComposerMascot.d.ts.map +1 -1
  7. package/dist/composer/ComposerMascot.js +2 -2
  8. package/dist/composer/ComposerMascot.js.map +1 -1
  9. package/dist/composer/styles/energy.css +99 -99
  10. package/dist/composer/styles/expressions.css +20 -20
  11. package/dist/composer/styles/feedback.css +188 -188
  12. package/dist/composer/styles/focus.css +72 -72
  13. package/dist/composer/styles/foundation.css +301 -287
  14. package/dist/composer/styles/idle.css +438 -438
  15. package/dist/composer/styles/overdrive.css +264 -264
  16. package/dist/composer/styles/props.css +21 -21
  17. package/dist/composer/types.d.ts +1 -0
  18. package/dist/composer/types.d.ts.map +1 -1
  19. package/dist/rig.css +265 -265
  20. package/dist/styles.css +13 -13
  21. package/package.json +56 -55
  22. package/src/AnimatedDecoration.tsx +43 -0
  23. package/src/AppearanceRig.tsx +15 -0
  24. package/src/Avatar.tsx +85 -0
  25. package/src/DecorationShapes.tsx +8 -0
  26. package/src/Decorations.tsx +31 -0
  27. package/src/Faces.tsx +37 -0
  28. package/src/HatDecorations.tsx +75 -0
  29. package/src/HeldDecorations.tsx +48 -0
  30. package/src/MascotRig.tsx +191 -0
  31. package/src/ObjectDecorations.tsx +55 -0
  32. package/src/accessories.css +14 -0
  33. package/src/appearanceModel.ts +65 -0
  34. package/src/avatar.css +62 -0
  35. package/src/characters.ts +5 -0
  36. package/src/composer/ComposerMascot.tsx +521 -0
  37. package/src/composer/ComposerMascotShadow.tsx +5 -0
  38. package/src/composer/constants.ts +68 -0
  39. package/src/composer/mascotHandoff.ts +19 -0
  40. package/src/composer/styles/energy.css +99 -0
  41. package/src/composer/styles/expressions.css +20 -0
  42. package/src/composer/styles/feedback.css +188 -0
  43. package/src/composer/styles/focus.css +72 -0
  44. package/src/composer/styles/foundation.css +301 -0
  45. package/src/composer/styles/idle.css +438 -0
  46. package/src/composer/styles/overdrive.css +264 -0
  47. package/src/composer/styles/props.css +21 -0
  48. package/src/composer/types.ts +32 -0
  49. package/src/composer/useComposerAvatarBehavior.ts +97 -0
  50. package/src/composer/useComposerMotion.ts +15 -0
  51. package/src/composer/useComposerProfile.ts +50 -0
  52. package/src/decorationCatalog.ts +45 -0
  53. package/src/decorationMotion.ts +68 -0
  54. package/src/environment.ts +46 -0
  55. package/src/index.ts +5 -0
  56. package/src/palette.ts +52 -0
  57. package/src/react.ts +6 -0
  58. package/src/rig.css +265 -0
  59. package/src/styles.css +13 -0
  60. package/src/useEventReplay.ts +13 -0
  61. package/src/useGesture.ts +51 -0
@@ -1,264 +1,264 @@
1
- [data-mascot-context='max'] .composer-mascot-motion {
2
- --mascot-max-edge: oklch(from var(--mascot-energy-accent)
3
- clamp(0.28, calc(l + 0.065), 0.96) clamp(0, calc(c * 0.96), 0.3) calc(h + 4));
4
- --mascot-max-shift: oklch(from var(--mascot-energy-accent)
5
- clamp(0.28, calc(l + 0.1), 0.96) clamp(0, calc(c * 0.92), 0.3) calc(h + 40));
6
- --mascot-max-bright: oklch(from var(--mascot-energy-accent)
7
- clamp(0.28, calc(l + 0.18), 0.96) clamp(0, calc(c * 0.68), 0.3) calc(h + 18));
8
- --mascot-max-edge-bold: rgb(from var(--mascot-max-edge) r g b / 1);
9
- --mascot-max-edge-faint: rgb(from var(--mascot-max-edge) r g b / 0.24);
10
- --mascot-max-shift-bold: rgb(from var(--mascot-max-shift) r g b / 1);
11
- --mascot-max-shift-medium: rgb(from var(--mascot-max-shift) r g b / 0.88);
12
- --mascot-max-shift-soft: rgb(from var(--mascot-max-shift) r g b / 0.44);
13
- --mascot-max-bright-medium: rgb(from var(--mascot-max-bright) r g b / 0.88);
14
- --mascot-max-blur-hair: 1.4px;
15
- --mascot-max-blur-edge: 2.4px;
16
- --mascot-max-blur-glow: 6.8px;
17
- }
18
-
19
- .composer-mascot-motion::after {
20
- content: '';
21
- position: absolute;
22
- top: 50%;
23
- left: 50%;
24
- z-index: 3;
25
- width: 104px;
26
- height: 90px;
27
- border-radius: 48%;
28
- opacity: 0;
29
- pointer-events: none;
30
- transform: translate(-50%, -50%);
31
- transform-origin: center;
32
- }
33
-
34
- [data-mascot-context='max'] .composer-mascot-motion::after {
35
- background:
36
- radial-gradient(circle, var(--mascot-max-bright) 0 0.55px, transparent 1.1px) 13% 42% / 3px 3px no-repeat,
37
- radial-gradient(circle, var(--mascot-max-edge) 0 0.45px, transparent 1px) 27% 74% / 3px 3px no-repeat,
38
- radial-gradient(circle, var(--mascot-max-shift) 0 0.5px, transparent 1.05px) 42% 18% / 3px 3px no-repeat,
39
- radial-gradient(circle, var(--mascot-max-bright) 0 0.45px, transparent 1px) 68% 80% / 3px 3px no-repeat,
40
- radial-gradient(circle, var(--mascot-max-edge) 0 0.55px, transparent 1.1px) 82% 28% / 3px 3px no-repeat,
41
- radial-gradient(circle, var(--mascot-max-shift) 0 0.4px, transparent 0.95px) 91% 62% / 3px 3px no-repeat;
42
- filter: drop-shadow(0 0 1.6px color-mix(in srgb, var(--mascot-max-edge) 32%, transparent));
43
- opacity: 0.18;
44
- animation: composer-mascot-max-micrograin 6.2s ease-in-out infinite;
45
- }
46
-
47
- @keyframes composer-mascot-max-overdrive-edge {
48
- 0%, 100% {
49
- filter:
50
- drop-shadow(-0.6px 0 var(--mascot-max-blur-hair) var(--mascot-max-edge-bold))
51
- drop-shadow(0.7px 0 var(--mascot-max-blur-edge) var(--mascot-max-shift-medium))
52
- drop-shadow(0 0 var(--mascot-max-blur-glow) var(--mascot-max-edge-faint));
53
- }
54
- 46% {
55
- filter:
56
- drop-shadow(0.2px -0.75px var(--mascot-max-blur-hair) var(--mascot-max-shift-bold))
57
- drop-shadow(-0.2px 0.8px var(--mascot-max-blur-edge) var(--mascot-max-bright-medium))
58
- drop-shadow(0 0 var(--mascot-max-blur-glow) var(--mascot-max-shift-soft));
59
- }
60
- }
61
-
62
- @keyframes composer-mascot-max-coat-dark {
63
- 0%, 34%, 100% { stop-color: var(--mascot-body-dark); }
64
- 14% {
65
- stop-color: oklch(from var(--mascot-body-dark)
66
- clamp(0.28, calc(l + 0.09), 0.96) clamp(0, calc(c * 0.9), 0.3) calc(h + 14));
67
- }
68
- }
69
-
70
- @keyframes composer-mascot-max-coat-mid {
71
- 0%, 24%, 68%, 100% { stop-color: var(--mascot-body-mid); }
72
- 44% {
73
- stop-color: oklch(from var(--mascot-body-mid)
74
- clamp(0.28, calc(l + 0.14), 0.96) clamp(0, calc(c * 0.76), 0.3) calc(h + 31));
75
- }
76
- }
77
-
78
- @keyframes composer-mascot-max-coat-light {
79
- 0%, 50%, 94%, 100% { stop-color: var(--mascot-body-light); }
80
- 72% {
81
- stop-color: oklch(from var(--mascot-body-light)
82
- clamp(0.28, calc(l + 0.15), 0.96) clamp(0, calc(c * 0.58), 0.3) calc(h + 41));
83
- }
84
- }
85
-
86
- @keyframes composer-mascot-max-coat-mark-dark {
87
- 0%, 44%, 100% { stop-color: var(--mascot-mark-dark); }
88
- 20% {
89
- stop-color: oklch(from var(--mascot-mark-dark)
90
- clamp(0.28, calc(l + 0.1), 0.96) clamp(0, calc(c * 0.82), 0.3) calc(h + 18));
91
- }
92
- }
93
-
94
- @keyframes composer-mascot-max-coat-mark-light {
95
- 0%, 40%, 88%, 100% { stop-color: var(--mascot-mark-energy); }
96
- 64% {
97
- stop-color: oklch(from var(--mascot-mark-energy)
98
- clamp(0.28, calc(l + 0.15), 0.96) clamp(0, calc(c * 0.6), 0.3) calc(h + 38));
99
- }
100
- }
101
-
102
- @keyframes composer-mascot-max-micrograin {
103
- 0%, 100% { opacity: 0.08; transform: translate(-51%, -49%) scale(0.98); }
104
- 38% { opacity: 0.28; transform: translate(-49%, -52%) scale(1.02); }
105
- 68% { opacity: 0.13; transform: translate(-48%, -54%) scale(1.04); }
106
- }
107
-
108
- [data-mascot-profile-transition='active'] .composer-mascot-character-stage {
109
- transform-origin: 50% 52%;
110
- animation: composer-mascot-profile-character 1.24s linear both;
111
- }
112
-
113
- [data-mascot-profile-transition='active'] .composer-mascot-motion::before {
114
- content: '';
115
- position: absolute;
116
- top: 52%;
117
- left: 50%;
118
- z-index: 1;
119
- width: 64px;
120
- height: 64px;
121
- box-sizing: border-box;
122
- border: 1px solid transparent;
123
- border-radius: 50%;
124
- background: radial-gradient(
125
- circle,
126
- #010106 0 34%,
127
- #05050c 38%,
128
- rgba(232, 236, 255, 0.78) 42%,
129
- rgba(135, 145, 180, 0.18) 48%,
130
- transparent 66%
131
- );
132
- opacity: 0;
133
- pointer-events: none;
134
- transform: translate(-50%, -50%) scale(0.16);
135
- transform-origin: center;
136
- animation:
137
- composer-mascot-profile-hole 1.24s linear both,
138
- composer-mascot-profile-rim 1.24s linear both;
139
- }
140
-
141
- [data-mascot-profile-transition='active'] .composer-mascot-motion::after {
142
- top: 52%;
143
- left: 50%;
144
- z-index: 1;
145
- width: 86px;
146
- height: 86px;
147
- border-radius: 50%;
148
- color: var(--mascot-profile-from-accent);
149
- background:
150
- radial-gradient(circle, currentColor 0 0.9px, transparent 1.55px) 50% 2% / 4px 4px no-repeat,
151
- radial-gradient(circle, currentColor 0 0.76px, transparent 1.4px) 78% 12% / 4px 4px no-repeat,
152
- radial-gradient(circle, rgba(255, 255, 255, 0.88) 0 0.65px, transparent 1.3px) 96% 42% / 4px 4px no-repeat,
153
- radial-gradient(circle, currentColor 0 0.82px, transparent 1.48px) 88% 76% / 4px 4px no-repeat,
154
- radial-gradient(circle, currentColor 0 0.9px, transparent 1.55px) 55% 98% / 4px 4px no-repeat,
155
- radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 0.65px, transparent 1.3px) 19% 86% / 4px 4px no-repeat,
156
- radial-gradient(circle, currentColor 0 0.76px, transparent 1.4px) 3% 55% / 4px 4px no-repeat,
157
- radial-gradient(circle, currentColor 0 0.82px, transparent 1.48px) 14% 20% / 4px 4px no-repeat;
158
- filter: drop-shadow(0 0 3px currentColor);
159
- opacity: 0;
160
- animation:
161
- composer-mascot-profile-particles 1.24s linear both,
162
- composer-mascot-profile-particle-color 1.24s linear both;
163
- }
164
-
165
- [data-composer-root]:has([data-mascot-profile-transition='active']) .composer-mascot-contact-shadow {
166
- animation: composer-mascot-profile-contact-shadow 1.24s linear both;
167
- }
168
-
169
- @keyframes composer-mascot-profile-character {
170
- 0%, 100% {
171
- opacity: 1;
172
- transform: translateY(0) rotate(0) scale(1);
173
- filter: none;
174
- }
175
- 18% {
176
- opacity: 1;
177
- transform: translateY(0) rotate(0) scale(1.015, 0.99);
178
- filter: saturate(1.03);
179
- }
180
- 34% {
181
- opacity: 0.96;
182
- transform: translateY(0) rotate(1.2deg) scale(0.76, 0.8);
183
- filter: brightness(0.96) saturate(1.08);
184
- }
185
- 46% {
186
- opacity: 0.14;
187
- transform: translateY(0) rotate(-4deg) scale(0.13);
188
- filter: brightness(0.72) saturate(1.18) blur(0.7px);
189
- }
190
- 48%, 52% {
191
- opacity: 0;
192
- transform: translateY(0) rotate(-6deg) scale(0.02);
193
- filter: brightness(0.58) saturate(1.2) blur(1px);
194
- }
195
- 64% {
196
- opacity: 0.95;
197
- transform: translateY(0) rotate(1.8deg) scale(1.1, 0.92);
198
- filter: brightness(1.12);
199
- }
200
- 76% {
201
- opacity: 1;
202
- transform: translateY(0) rotate(-0.8deg) scale(0.97, 1.035);
203
- filter: none;
204
- }
205
- 89% {
206
- opacity: 1;
207
- transform: translateY(0) rotate(0.3deg) scale(1.01, 0.995);
208
- filter: none;
209
- }
210
- }
211
-
212
- @keyframes composer-mascot-profile-hole {
213
- 0%, 12%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.16); }
214
- 30% { opacity: 0.72; transform: translate(-50%, -50%) scale(0.72); }
215
- 46%, 54% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
216
- 72% { opacity: 0.54; transform: translate(-50%, -50%) scale(0.66); }
217
- 88% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
218
- }
219
-
220
- @keyframes composer-mascot-profile-particles {
221
- 0%, 14%, 100% { opacity: 0; transform: translate(-50%, -50%) rotate(0) scale(1); }
222
- 20% { opacity: 0.45; transform: translate(-50%, -50%) rotate(8deg) scale(1); }
223
- 34% { opacity: 0.92; transform: translate(-50%, -50%) rotate(38deg) scale(0.72); }
224
- 48% { opacity: 0.12; transform: translate(-50%, -50%) rotate(86deg) scale(0.16); }
225
- 49.5% { opacity: 0; transform: translate(-50%, -50%) rotate(96deg) scale(0.08); }
226
- 50.5% { opacity: 0; transform: translate(-50%, -50%) rotate(104deg) scale(1); }
227
- 64% { opacity: 0.82; transform: translate(-50%, -50%) rotate(146deg) scale(0.7); }
228
- 82% { opacity: 0.08; transform: translate(-50%, -50%) rotate(206deg) scale(0.14); }
229
- 86% { opacity: 0; transform: translate(-50%, -50%) rotate(218deg) scale(0.08); }
230
- }
231
-
232
- @keyframes composer-mascot-profile-particle-color {
233
- 0%, 42% { color: var(--mascot-profile-from-accent); }
234
- 49.5%, 50.5% { color: rgba(240, 244, 255, 0.96); }
235
- 58%, 100% { color: var(--mascot-profile-to-accent); }
236
- }
237
-
238
- @keyframes composer-mascot-profile-rim {
239
- 0%, 16% {
240
- border-color: color-mix(in srgb, var(--mascot-profile-from-accent) 72%, transparent);
241
- box-shadow: 0 0 12px color-mix(in srgb, var(--mascot-profile-from-accent) 42%, transparent);
242
- }
243
- 34% {
244
- border-color: color-mix(in srgb, var(--mascot-profile-from-accent) 84%, white);
245
- box-shadow: 0 0 15px color-mix(in srgb, var(--mascot-profile-from-accent) 48%, transparent);
246
- }
247
- 50% {
248
- border-color: rgba(246, 248, 255, 0.92);
249
- box-shadow: 0 0 17px rgba(220, 226, 255, 0.46);
250
- }
251
- 66% {
252
- border-color: color-mix(in srgb, var(--mascot-profile-to-accent) 84%, white);
253
- box-shadow: 0 0 15px color-mix(in srgb, var(--mascot-profile-to-accent) 48%, transparent);
254
- }
255
- 84%, 100% {
256
- border-color: color-mix(in srgb, var(--mascot-profile-to-accent) 72%, transparent);
257
- box-shadow: 0 0 12px color-mix(in srgb, var(--mascot-profile-to-accent) 36%, transparent);
258
- }
259
- }
260
-
261
- @keyframes composer-mascot-profile-contact-shadow {
262
- 0%, 100% { opacity: 1; transform: translateX(50%) scaleX(1); }
263
- 46%, 54% { opacity: 0; transform: translateX(50%) scaleX(0.25); }
264
- }
1
+ [data-mascot-context='max'] .composer-mascot-motion {
2
+ --mascot-max-edge: oklch(from var(--mascot-energy-accent)
3
+ clamp(0.28, calc(l + 0.065), 0.96) clamp(0, calc(c * 0.96), 0.3) calc(h + 4));
4
+ --mascot-max-shift: oklch(from var(--mascot-energy-accent)
5
+ clamp(0.28, calc(l + 0.1), 0.96) clamp(0, calc(c * 0.92), 0.3) calc(h + 40));
6
+ --mascot-max-bright: oklch(from var(--mascot-energy-accent)
7
+ clamp(0.28, calc(l + 0.18), 0.96) clamp(0, calc(c * 0.68), 0.3) calc(h + 18));
8
+ --mascot-max-edge-bold: rgb(from var(--mascot-max-edge) r g b / 1);
9
+ --mascot-max-edge-faint: rgb(from var(--mascot-max-edge) r g b / 0.24);
10
+ --mascot-max-shift-bold: rgb(from var(--mascot-max-shift) r g b / 1);
11
+ --mascot-max-shift-medium: rgb(from var(--mascot-max-shift) r g b / 0.88);
12
+ --mascot-max-shift-soft: rgb(from var(--mascot-max-shift) r g b / 0.44);
13
+ --mascot-max-bright-medium: rgb(from var(--mascot-max-bright) r g b / 0.88);
14
+ --mascot-max-blur-hair: 1.4px;
15
+ --mascot-max-blur-edge: 2.4px;
16
+ --mascot-max-blur-glow: 6.8px;
17
+ }
18
+
19
+ .composer-mascot-motion::after {
20
+ content: '';
21
+ position: absolute;
22
+ top: 50%;
23
+ left: 50%;
24
+ z-index: 3;
25
+ width: 104px;
26
+ height: 90px;
27
+ border-radius: 48%;
28
+ opacity: 0;
29
+ pointer-events: none;
30
+ transform: translate(-50%, -50%);
31
+ transform-origin: center;
32
+ }
33
+
34
+ [data-mascot-context='max'] .composer-mascot-motion::after {
35
+ background:
36
+ radial-gradient(circle, var(--mascot-max-bright) 0 0.55px, transparent 1.1px) 13% 42% / 3px 3px no-repeat,
37
+ radial-gradient(circle, var(--mascot-max-edge) 0 0.45px, transparent 1px) 27% 74% / 3px 3px no-repeat,
38
+ radial-gradient(circle, var(--mascot-max-shift) 0 0.5px, transparent 1.05px) 42% 18% / 3px 3px no-repeat,
39
+ radial-gradient(circle, var(--mascot-max-bright) 0 0.45px, transparent 1px) 68% 80% / 3px 3px no-repeat,
40
+ radial-gradient(circle, var(--mascot-max-edge) 0 0.55px, transparent 1.1px) 82% 28% / 3px 3px no-repeat,
41
+ radial-gradient(circle, var(--mascot-max-shift) 0 0.4px, transparent 0.95px) 91% 62% / 3px 3px no-repeat;
42
+ filter: drop-shadow(0 0 1.6px color-mix(in srgb, var(--mascot-max-edge) 32%, transparent));
43
+ opacity: 0.18;
44
+ animation: composer-mascot-max-micrograin 6.2s ease-in-out infinite;
45
+ }
46
+
47
+ @keyframes composer-mascot-max-overdrive-edge {
48
+ 0%, 100% {
49
+ filter:
50
+ drop-shadow(-0.6px 0 var(--mascot-max-blur-hair) var(--mascot-max-edge-bold))
51
+ drop-shadow(0.7px 0 var(--mascot-max-blur-edge) var(--mascot-max-shift-medium))
52
+ drop-shadow(0 0 var(--mascot-max-blur-glow) var(--mascot-max-edge-faint));
53
+ }
54
+ 46% {
55
+ filter:
56
+ drop-shadow(0.2px -0.75px var(--mascot-max-blur-hair) var(--mascot-max-shift-bold))
57
+ drop-shadow(-0.2px 0.8px var(--mascot-max-blur-edge) var(--mascot-max-bright-medium))
58
+ drop-shadow(0 0 var(--mascot-max-blur-glow) var(--mascot-max-shift-soft));
59
+ }
60
+ }
61
+
62
+ @keyframes composer-mascot-max-coat-dark {
63
+ 0%, 34%, 100% { stop-color: var(--mascot-body-dark); }
64
+ 14% {
65
+ stop-color: oklch(from var(--mascot-body-dark)
66
+ clamp(0.28, calc(l + 0.09), 0.96) clamp(0, calc(c * 0.9), 0.3) calc(h + 14));
67
+ }
68
+ }
69
+
70
+ @keyframes composer-mascot-max-coat-mid {
71
+ 0%, 24%, 68%, 100% { stop-color: var(--mascot-body-mid); }
72
+ 44% {
73
+ stop-color: oklch(from var(--mascot-body-mid)
74
+ clamp(0.28, calc(l + 0.14), 0.96) clamp(0, calc(c * 0.76), 0.3) calc(h + 31));
75
+ }
76
+ }
77
+
78
+ @keyframes composer-mascot-max-coat-light {
79
+ 0%, 50%, 94%, 100% { stop-color: var(--mascot-body-light); }
80
+ 72% {
81
+ stop-color: oklch(from var(--mascot-body-light)
82
+ clamp(0.28, calc(l + 0.15), 0.96) clamp(0, calc(c * 0.58), 0.3) calc(h + 41));
83
+ }
84
+ }
85
+
86
+ @keyframes composer-mascot-max-coat-mark-dark {
87
+ 0%, 44%, 100% { stop-color: var(--mascot-mark-dark); }
88
+ 20% {
89
+ stop-color: oklch(from var(--mascot-mark-dark)
90
+ clamp(0.28, calc(l + 0.1), 0.96) clamp(0, calc(c * 0.82), 0.3) calc(h + 18));
91
+ }
92
+ }
93
+
94
+ @keyframes composer-mascot-max-coat-mark-light {
95
+ 0%, 40%, 88%, 100% { stop-color: var(--mascot-mark-energy); }
96
+ 64% {
97
+ stop-color: oklch(from var(--mascot-mark-energy)
98
+ clamp(0.28, calc(l + 0.15), 0.96) clamp(0, calc(c * 0.6), 0.3) calc(h + 38));
99
+ }
100
+ }
101
+
102
+ @keyframes composer-mascot-max-micrograin {
103
+ 0%, 100% { opacity: 0.08; transform: translate(-51%, -49%) scale(0.98); }
104
+ 38% { opacity: 0.28; transform: translate(-49%, -52%) scale(1.02); }
105
+ 68% { opacity: 0.13; transform: translate(-48%, -54%) scale(1.04); }
106
+ }
107
+
108
+ [data-mascot-profile-transition='active'] .composer-mascot-character-stage {
109
+ transform-origin: 50% 52%;
110
+ animation: composer-mascot-profile-character 1.24s linear both;
111
+ }
112
+
113
+ [data-mascot-profile-transition='active'] .composer-mascot-motion::before {
114
+ content: '';
115
+ position: absolute;
116
+ top: 52%;
117
+ left: 50%;
118
+ z-index: 1;
119
+ width: 64px;
120
+ height: 64px;
121
+ box-sizing: border-box;
122
+ border: 1px solid transparent;
123
+ border-radius: 50%;
124
+ background: radial-gradient(
125
+ circle,
126
+ #010106 0 34%,
127
+ #05050c 38%,
128
+ rgba(232, 236, 255, 0.78) 42%,
129
+ rgba(135, 145, 180, 0.18) 48%,
130
+ transparent 66%
131
+ );
132
+ opacity: 0;
133
+ pointer-events: none;
134
+ transform: translate(-50%, -50%) scale(0.16);
135
+ transform-origin: center;
136
+ animation:
137
+ composer-mascot-profile-hole 1.24s linear both,
138
+ composer-mascot-profile-rim 1.24s linear both;
139
+ }
140
+
141
+ [data-mascot-profile-transition='active'] .composer-mascot-motion::after {
142
+ top: 52%;
143
+ left: 50%;
144
+ z-index: 1;
145
+ width: 86px;
146
+ height: 86px;
147
+ border-radius: 50%;
148
+ color: var(--mascot-profile-from-accent);
149
+ background:
150
+ radial-gradient(circle, currentColor 0 0.9px, transparent 1.55px) 50% 2% / 4px 4px no-repeat,
151
+ radial-gradient(circle, currentColor 0 0.76px, transparent 1.4px) 78% 12% / 4px 4px no-repeat,
152
+ radial-gradient(circle, rgba(255, 255, 255, 0.88) 0 0.65px, transparent 1.3px) 96% 42% / 4px 4px no-repeat,
153
+ radial-gradient(circle, currentColor 0 0.82px, transparent 1.48px) 88% 76% / 4px 4px no-repeat,
154
+ radial-gradient(circle, currentColor 0 0.9px, transparent 1.55px) 55% 98% / 4px 4px no-repeat,
155
+ radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 0.65px, transparent 1.3px) 19% 86% / 4px 4px no-repeat,
156
+ radial-gradient(circle, currentColor 0 0.76px, transparent 1.4px) 3% 55% / 4px 4px no-repeat,
157
+ radial-gradient(circle, currentColor 0 0.82px, transparent 1.48px) 14% 20% / 4px 4px no-repeat;
158
+ filter: drop-shadow(0 0 3px currentColor);
159
+ opacity: 0;
160
+ animation:
161
+ composer-mascot-profile-particles 1.24s linear both,
162
+ composer-mascot-profile-particle-color 1.24s linear both;
163
+ }
164
+
165
+ [data-composer-root]:has([data-mascot-profile-transition='active']) .composer-mascot-contact-shadow {
166
+ animation: composer-mascot-profile-contact-shadow 1.24s linear both;
167
+ }
168
+
169
+ @keyframes composer-mascot-profile-character {
170
+ 0%, 100% {
171
+ opacity: 1;
172
+ transform: translateY(0) rotate(0) scale(1);
173
+ filter: none;
174
+ }
175
+ 18% {
176
+ opacity: 1;
177
+ transform: translateY(0) rotate(0) scale(1.015, 0.99);
178
+ filter: saturate(1.03);
179
+ }
180
+ 34% {
181
+ opacity: 0.96;
182
+ transform: translateY(0) rotate(1.2deg) scale(0.76, 0.8);
183
+ filter: brightness(0.96) saturate(1.08);
184
+ }
185
+ 46% {
186
+ opacity: 0.14;
187
+ transform: translateY(0) rotate(-4deg) scale(0.13);
188
+ filter: brightness(0.72) saturate(1.18) blur(0.7px);
189
+ }
190
+ 48%, 52% {
191
+ opacity: 0;
192
+ transform: translateY(0) rotate(-6deg) scale(0.02);
193
+ filter: brightness(0.58) saturate(1.2) blur(1px);
194
+ }
195
+ 64% {
196
+ opacity: 0.95;
197
+ transform: translateY(0) rotate(1.8deg) scale(1.1, 0.92);
198
+ filter: brightness(1.12);
199
+ }
200
+ 76% {
201
+ opacity: 1;
202
+ transform: translateY(0) rotate(-0.8deg) scale(0.97, 1.035);
203
+ filter: none;
204
+ }
205
+ 89% {
206
+ opacity: 1;
207
+ transform: translateY(0) rotate(0.3deg) scale(1.01, 0.995);
208
+ filter: none;
209
+ }
210
+ }
211
+
212
+ @keyframes composer-mascot-profile-hole {
213
+ 0%, 12%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.16); }
214
+ 30% { opacity: 0.72; transform: translate(-50%, -50%) scale(0.72); }
215
+ 46%, 54% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
216
+ 72% { opacity: 0.54; transform: translate(-50%, -50%) scale(0.66); }
217
+ 88% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
218
+ }
219
+
220
+ @keyframes composer-mascot-profile-particles {
221
+ 0%, 14%, 100% { opacity: 0; transform: translate(-50%, -50%) rotate(0) scale(1); }
222
+ 20% { opacity: 0.45; transform: translate(-50%, -50%) rotate(8deg) scale(1); }
223
+ 34% { opacity: 0.92; transform: translate(-50%, -50%) rotate(38deg) scale(0.72); }
224
+ 48% { opacity: 0.12; transform: translate(-50%, -50%) rotate(86deg) scale(0.16); }
225
+ 49.5% { opacity: 0; transform: translate(-50%, -50%) rotate(96deg) scale(0.08); }
226
+ 50.5% { opacity: 0; transform: translate(-50%, -50%) rotate(104deg) scale(1); }
227
+ 64% { opacity: 0.82; transform: translate(-50%, -50%) rotate(146deg) scale(0.7); }
228
+ 82% { opacity: 0.08; transform: translate(-50%, -50%) rotate(206deg) scale(0.14); }
229
+ 86% { opacity: 0; transform: translate(-50%, -50%) rotate(218deg) scale(0.08); }
230
+ }
231
+
232
+ @keyframes composer-mascot-profile-particle-color {
233
+ 0%, 42% { color: var(--mascot-profile-from-accent); }
234
+ 49.5%, 50.5% { color: rgba(240, 244, 255, 0.96); }
235
+ 58%, 100% { color: var(--mascot-profile-to-accent); }
236
+ }
237
+
238
+ @keyframes composer-mascot-profile-rim {
239
+ 0%, 16% {
240
+ border-color: color-mix(in srgb, var(--mascot-profile-from-accent) 72%, transparent);
241
+ box-shadow: 0 0 12px color-mix(in srgb, var(--mascot-profile-from-accent) 42%, transparent);
242
+ }
243
+ 34% {
244
+ border-color: color-mix(in srgb, var(--mascot-profile-from-accent) 84%, white);
245
+ box-shadow: 0 0 15px color-mix(in srgb, var(--mascot-profile-from-accent) 48%, transparent);
246
+ }
247
+ 50% {
248
+ border-color: rgba(246, 248, 255, 0.92);
249
+ box-shadow: 0 0 17px rgba(220, 226, 255, 0.46);
250
+ }
251
+ 66% {
252
+ border-color: color-mix(in srgb, var(--mascot-profile-to-accent) 84%, white);
253
+ box-shadow: 0 0 15px color-mix(in srgb, var(--mascot-profile-to-accent) 48%, transparent);
254
+ }
255
+ 84%, 100% {
256
+ border-color: color-mix(in srgb, var(--mascot-profile-to-accent) 72%, transparent);
257
+ box-shadow: 0 0 12px color-mix(in srgb, var(--mascot-profile-to-accent) 36%, transparent);
258
+ }
259
+ }
260
+
261
+ @keyframes composer-mascot-profile-contact-shadow {
262
+ 0%, 100% { opacity: 1; transform: translateX(50%) scaleX(1); }
263
+ 46%, 54% { opacity: 0; transform: translateX(50%) scaleX(0.25); }
264
+ }
@@ -1,21 +1,21 @@
1
- @keyframes composer-mascot-land {
2
- 0%, 100% { transform: translateY(0) scale(1, 1); }
3
- 35% { transform: translateY(2px) scale(1.12, 0.86); }
4
- 70% { transform: translateY(-2px) scale(0.97, 1.03); }
5
- }
6
-
7
- .composer-mascot-land {
8
- animation: composer-mascot-land 380ms ease-out;
9
- transform-origin: bottom center;
10
- }
11
-
12
- @media (prefers-reduced-motion: reduce) {
13
- .composer-mascot-motion,
14
- .composer-mascot-motion * {
15
- animation: none !important;
16
- transition: none !important;
17
- }
18
- }
19
-
20
- [data-composer-mascot-motion='off'],
21
- [data-composer-mascot-motion='off'] * { animation: none !important; transition: none !important; }
1
+ @keyframes composer-mascot-land {
2
+ 0%, 100% { transform: translateY(0) scale(1, 1); }
3
+ 35% { transform: translateY(2px) scale(1.12, 0.86); }
4
+ 70% { transform: translateY(-2px) scale(0.97, 1.03); }
5
+ }
6
+
7
+ .composer-mascot-land {
8
+ animation: composer-mascot-land 380ms ease-out;
9
+ transform-origin: bottom center;
10
+ }
11
+
12
+ @media (prefers-reduced-motion: reduce) {
13
+ .composer-mascot-motion,
14
+ .composer-mascot-motion * {
15
+ animation: none !important;
16
+ transition: none !important;
17
+ }
18
+ }
19
+
20
+ [data-composer-mascot-motion='off'],
21
+ [data-composer-mascot-motion='off'] * { animation: none !important; transition: none !important; }
@@ -15,6 +15,7 @@ export interface ComposerMascotContext {
15
15
  export interface ComposerMascotProps {
16
16
  name?: string;
17
17
  motion?: 'system' | 'on' | 'off';
18
+ theme?: 'light' | 'dark';
18
19
  focused?: boolean;
19
20
  dragOver?: boolean;
20
21
  bounceSignal?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/composer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAAA;AACzE,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;AACzD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAA;IACrG,UAAU,EAAE,gBAAgB,CAAA;IAC5B,KAAK,EAAE,WAAW,CAAA;IAClB,cAAc,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAA;IAChE,KAAK,EAAE,UAAU,GAAG,MAAM,CAAA;IAC1B,UAAU,EAAE,OAAO,CAAA;IACnB,aAAa,EAAE,OAAO,CAAA;CACvB;AACD,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,KAAK,CAAA;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,gBAAgB,CAAC;QAAC,KAAK,CAAC,EAAE,WAAW,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