@lemoncat7/dsh-theme-xiaohei 0.3.0-alpha.23 → 0.3.2

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 (222) hide show
  1. package/README.md +39 -17
  2. package/THIRD_PARTY_NOTICES.md +41 -0
  3. package/lib/appearance.js +26 -10
  4. package/lib/blink.js +3 -3
  5. package/lib/bloub-heixiu/ambient.d.ts +3 -0
  6. package/lib/bloub-heixiu/ambient.js +12 -0
  7. package/lib/bloub-heixiu/character.d.ts +33 -0
  8. package/lib/bloub-heixiu/character.js +124 -0
  9. package/lib/bloub-heixiu/effects.d.ts +4 -0
  10. package/lib/bloub-heixiu/effects.js +91 -0
  11. package/lib/bloub-heixiu/flight.d.ts +15 -0
  12. package/lib/bloub-heixiu/flight.js +66 -0
  13. package/lib/bloub-heixiu/follow.d.ts +13 -0
  14. package/lib/bloub-heixiu/follow.js +23 -0
  15. package/lib/bloub-heixiu/layout.d.ts +18 -0
  16. package/lib/bloub-heixiu/layout.js +12 -0
  17. package/lib/bloub-heixiu/renderer.d.ts +16 -0
  18. package/lib/bloub-heixiu/renderer.js +94 -0
  19. package/lib/bloub-heixiu/runtime.d.ts +6 -0
  20. package/lib/bloub-heixiu/runtime.js +395 -0
  21. package/lib/bloub-heixiu/signals.d.ts +17 -0
  22. package/lib/bloub-heixiu/signals.js +53 -0
  23. package/lib/bloub-heixiu/styles.d.ts +2 -0
  24. package/lib/bloub-heixiu/styles.js +98 -0
  25. package/lib/chrome/accessibility.d.ts +1 -1
  26. package/lib/chrome/accessibility.js +5 -13
  27. package/lib/chrome/composer-avatar.d.ts +10 -0
  28. package/lib/chrome/composer-avatar.js +599 -0
  29. package/lib/chrome/composer-send-heixiu.d.ts +3 -0
  30. package/lib/chrome/composer-send-heixiu.js +143 -0
  31. package/lib/chrome/composer.d.ts +2 -2
  32. package/lib/chrome/composer.js +84 -95
  33. package/lib/chrome/controls.d.ts +8 -0
  34. package/lib/chrome/controls.js +348 -0
  35. package/lib/chrome/conversation-messages.d.ts +1 -1
  36. package/lib/chrome/conversation-messages.js +207 -9
  37. package/lib/chrome/conversation.d.ts +1 -1
  38. package/lib/chrome/conversation.js +6 -0
  39. package/lib/chrome/identity.js +4 -18
  40. package/lib/chrome/portal.d.ts +1 -1
  41. package/lib/chrome/portal.js +1 -1
  42. package/lib/chrome/sidebar.d.ts +1 -1
  43. package/lib/chrome/sidebar.js +134 -153
  44. package/lib/chrome/tokens.d.ts +1 -1
  45. package/lib/chrome/tokens.js +121 -68
  46. package/lib/chrome/workspace.d.ts +2 -2
  47. package/lib/chrome/workspace.js +35 -254
  48. package/lib/chrome.js +4 -0
  49. package/lib/client.d.ts +5 -12
  50. package/lib/client.js +6262 -4455
  51. package/lib/composer-avatar.d.ts +18 -0
  52. package/lib/composer-avatar.js +441 -0
  53. package/lib/composer-send-heixiu.d.ts +8 -0
  54. package/lib/composer-send-heixiu.js +133 -0
  55. package/lib/gaze.js +3 -3
  56. package/lib/generated-backgrounds.d.ts +14 -0
  57. package/lib/generated-backgrounds.js +14 -0
  58. package/lib/generated-character-motion.d.ts +4 -0
  59. package/lib/generated-character-motion.js +2 -0
  60. package/lib/generated-identity.d.ts +1 -0
  61. package/lib/generated-identity.js +1 -0
  62. package/lib/generated-keyart.d.ts +18 -3
  63. package/lib/generated-keyart.js +18 -3
  64. package/lib/host-contract.d.ts +9 -0
  65. package/lib/host-contract.js +13 -0
  66. package/lib/host-dom.d.ts +11 -0
  67. package/lib/host-dom.js +60 -0
  68. package/lib/loading-heixiu.js +3 -3
  69. package/lib/metallic-brand-mark.d.ts +10 -0
  70. package/lib/metallic-brand-mark.js +323 -0
  71. package/lib/plugin.d.ts +1 -1
  72. package/lib/plugin.js +31 -16
  73. package/lib/portal.js +11 -10
  74. package/lib/reactions.js +3 -3
  75. package/lib/scene/avatar-model.d.ts +6 -0
  76. package/lib/scene/avatar-model.js +646 -0
  77. package/lib/scene/avatar-motion.d.ts +3 -0
  78. package/lib/scene/avatar-motion.js +799 -0
  79. package/lib/scene/character-idle.d.ts +17 -0
  80. package/lib/scene/character-idle.js +65 -0
  81. package/lib/scene/character-layout.d.ts +24 -0
  82. package/lib/scene/character-layout.js +51 -0
  83. package/lib/scene/character-motion-clock.d.ts +18 -0
  84. package/lib/scene/character-motion-clock.js +57 -0
  85. package/lib/scene/character-motion-types.d.ts +12 -0
  86. package/lib/scene/character-motion-types.js +2 -0
  87. package/lib/scene/character-motion.d.ts +6 -0
  88. package/lib/scene/character-motion.js +126 -0
  89. package/lib/scene/character-poses.d.ts +26 -0
  90. package/lib/scene/character-poses.js +11 -0
  91. package/lib/scene/character-rig-renderer.d.ts +4 -0
  92. package/lib/scene/character-rig-renderer.js +85 -0
  93. package/lib/scene/character-rig.d.ts +20 -0
  94. package/lib/scene/character-rig.js +53 -0
  95. package/lib/scene/heixiu-feedback.d.ts +1 -1
  96. package/lib/scene/heixiu-feedback.js +0 -17
  97. package/lib/scene/pointer-bridge.d.ts +21 -0
  98. package/lib/scene/pointer-bridge.js +155 -0
  99. package/lib/scene/runtime.d.ts +12 -0
  100. package/lib/scene/runtime.js +87 -0
  101. package/lib/scene/styles.d.ts +7 -0
  102. package/lib/scene/styles.js +75 -0
  103. package/lib/scene/sylva-performance.d.ts +11 -0
  104. package/lib/scene/sylva-performance.js +58 -0
  105. package/lib/scene/wallpaper-character-styles.d.ts +3 -0
  106. package/lib/scene/wallpaper-character-styles.js +53 -0
  107. package/lib/scene/wallpaper-character.d.ts +4 -0
  108. package/lib/scene/wallpaper-character.js +213 -0
  109. package/lib/scene.d.ts +7 -13
  110. package/lib/scene.js +7 -1023
  111. package/lib/sidebar-glass.js +99 -36
  112. package/lib/sidebar-heixiu-roaming.js +5 -5
  113. package/lib/sidebar-reveal.d.ts +8 -0
  114. package/lib/sidebar-reveal.js +51 -0
  115. package/lib/state.d.ts +14 -2
  116. package/lib/state.js +12 -4
  117. package/lib/theme.js +2 -2
  118. package/lib/vendor/bloub/decor.d.ts +114 -0
  119. package/lib/vendor/bloub/decor.js +198 -0
  120. package/lib/vendor/bloub/engine.d.ts +213 -0
  121. package/lib/vendor/bloub/engine.js +452 -0
  122. package/lib/vendor/bloub/expressions.d.ts +35 -0
  123. package/lib/vendor/bloub/expressions.js +143 -0
  124. package/lib/vendor/bloub/eyefit.d.ts +75 -0
  125. package/lib/vendor/bloub/eyefit.js +393 -0
  126. package/lib/vendor/bloub/face.d.ts +63 -0
  127. package/lib/vendor/bloub/face.js +106 -0
  128. package/lib/vendor/bloub/math.d.ts +22 -0
  129. package/lib/vendor/bloub/math.js +36 -0
  130. package/lib/vendor/bloub/profiles.d.ts +8 -0
  131. package/lib/vendor/bloub/profiles.js +20 -0
  132. package/lib/vendor/bloub/repere.d.ts +30 -0
  133. package/lib/vendor/bloub/repere.js +32 -0
  134. package/lib/vendor/bloub/shape.d.ts +80 -0
  135. package/lib/vendor/bloub/shape.js +268 -0
  136. package/lib/vendor/bloub/skins.d.ts +36 -0
  137. package/lib/vendor/bloub/skins.js +74 -0
  138. package/lib/vendor/bloub/states.d.ts +87 -0
  139. package/lib/vendor/bloub/states.js +468 -0
  140. package/package.json +23 -6
  141. package/lib/appearance.d.ts.map +0 -1
  142. package/lib/appearance.js.map +0 -1
  143. package/lib/blink.d.ts.map +0 -1
  144. package/lib/blink.js.map +0 -1
  145. package/lib/boot-appearance.d.ts.map +0 -1
  146. package/lib/boot-appearance.js.map +0 -1
  147. package/lib/boot-loader.d.ts.map +0 -1
  148. package/lib/boot-loader.js.map +0 -1
  149. package/lib/chrome/accessibility.d.ts.map +0 -1
  150. package/lib/chrome/accessibility.js.map +0 -1
  151. package/lib/chrome/blink.d.ts.map +0 -1
  152. package/lib/chrome/blink.js.map +0 -1
  153. package/lib/chrome/composer.d.ts.map +0 -1
  154. package/lib/chrome/composer.js.map +0 -1
  155. package/lib/chrome/conversation-messages.d.ts.map +0 -1
  156. package/lib/chrome/conversation-messages.js.map +0 -1
  157. package/lib/chrome/conversation.d.ts.map +0 -1
  158. package/lib/chrome/conversation.js.map +0 -1
  159. package/lib/chrome/frames.d.ts.map +0 -1
  160. package/lib/chrome/frames.js.map +0 -1
  161. package/lib/chrome/gaze.d.ts.map +0 -1
  162. package/lib/chrome/gaze.js.map +0 -1
  163. package/lib/chrome/identity.d.ts.map +0 -1
  164. package/lib/chrome/identity.js.map +0 -1
  165. package/lib/chrome/overlays.d.ts.map +0 -1
  166. package/lib/chrome/overlays.js.map +0 -1
  167. package/lib/chrome/portal.d.ts.map +0 -1
  168. package/lib/chrome/portal.js.map +0 -1
  169. package/lib/chrome/reactions.d.ts.map +0 -1
  170. package/lib/chrome/reactions.js.map +0 -1
  171. package/lib/chrome/sidebar.d.ts.map +0 -1
  172. package/lib/chrome/sidebar.js.map +0 -1
  173. package/lib/chrome/tokens.d.ts.map +0 -1
  174. package/lib/chrome/tokens.js.map +0 -1
  175. package/lib/chrome/workspace.d.ts.map +0 -1
  176. package/lib/chrome/workspace.js.map +0 -1
  177. package/lib/chrome.d.ts.map +0 -1
  178. package/lib/chrome.js.map +0 -1
  179. package/lib/client.d.ts.map +0 -1
  180. package/lib/client.js.map +0 -7
  181. package/lib/gaze.d.ts.map +0 -1
  182. package/lib/gaze.js.map +0 -1
  183. package/lib/generated-identity.d.ts.map +0 -1
  184. package/lib/generated-identity.js.map +0 -1
  185. package/lib/generated-keyart.d.ts.map +0 -1
  186. package/lib/generated-keyart.js.map +0 -1
  187. package/lib/generated-loading-assets.d.ts.map +0 -1
  188. package/lib/generated-loading-assets.js.map +0 -1
  189. package/lib/generated-sidebar-assets.d.ts +0 -4
  190. package/lib/generated-sidebar-assets.d.ts.map +0 -1
  191. package/lib/generated-sidebar-assets.js +0 -4
  192. package/lib/generated-sidebar-assets.js.map +0 -1
  193. package/lib/heixiu-interactions.d.ts.map +0 -1
  194. package/lib/heixiu-interactions.js.map +0 -1
  195. package/lib/index.d.ts.map +0 -1
  196. package/lib/index.js.map +0 -1
  197. package/lib/loading-heixiu.d.ts.map +0 -1
  198. package/lib/loading-heixiu.js.map +0 -1
  199. package/lib/plugin.d.ts.map +0 -1
  200. package/lib/plugin.js.map +0 -1
  201. package/lib/portal.d.ts.map +0 -1
  202. package/lib/portal.js.map +0 -1
  203. package/lib/reactions.d.ts.map +0 -1
  204. package/lib/reactions.js.map +0 -1
  205. package/lib/scene/heixiu-feedback.d.ts.map +0 -1
  206. package/lib/scene/heixiu-feedback.js.map +0 -1
  207. package/lib/scene/heixiu-interactions.d.ts.map +0 -1
  208. package/lib/scene/heixiu-interactions.js.map +0 -1
  209. package/lib/scene/state-transitions.d.ts.map +0 -1
  210. package/lib/scene/state-transitions.js.map +0 -1
  211. package/lib/scene.d.ts.map +0 -1
  212. package/lib/scene.js.map +0 -1
  213. package/lib/sidebar-glass.d.ts.map +0 -1
  214. package/lib/sidebar-glass.js.map +0 -1
  215. package/lib/sidebar-heixiu-escape.d.ts.map +0 -1
  216. package/lib/sidebar-heixiu-escape.js.map +0 -1
  217. package/lib/sidebar-heixiu-roaming.d.ts.map +0 -1
  218. package/lib/sidebar-heixiu-roaming.js.map +0 -1
  219. package/lib/state.d.ts.map +0 -1
  220. package/lib/state.js.map +0 -1
  221. package/lib/theme.d.ts.map +0 -1
  222. package/lib/theme.js.map +0 -1
@@ -0,0 +1,17 @@
1
+ export type CharacterIdlePose = 'seated' | 'chin' | 'doze';
2
+ export declare const CHARACTER_CHIN_DELAY = 30000;
3
+ export declare const CHARACTER_DOZE_DELAY = 180000;
4
+ interface IdleClock {
5
+ now(): number;
6
+ setTimeout(callback: () => void, delay: number): number;
7
+ clearTimeout(handle: number): void;
8
+ }
9
+ /** One pending deadline, no polling, no model/session state or persisted user data. */
10
+ export declare function createCharacterIdleController(clock: IdleClock, changed: (pose: CharacterIdlePose) => void): {
11
+ readonly pose: CharacterIdlePose;
12
+ activity(): void;
13
+ setPaused(value: boolean): void;
14
+ dispose(): void;
15
+ };
16
+ export {};
17
+ //# sourceMappingURL=character-idle.d.ts.map
@@ -0,0 +1,65 @@
1
+ export const CHARACTER_CHIN_DELAY = 30_000;
2
+ export const CHARACTER_DOZE_DELAY = 180_000;
3
+ /** One pending deadline, no polling, no model/session state or persisted user data. */
4
+ export function createCharacterIdleController(clock, changed) {
5
+ let pose = 'seated';
6
+ let lastActivity = clock.now();
7
+ let timer;
8
+ let paused = true;
9
+ let disposed = false;
10
+ const clear = () => {
11
+ if (timer !== undefined)
12
+ clock.clearTimeout(timer);
13
+ timer = undefined;
14
+ };
15
+ const update = (next) => {
16
+ if (next !== pose) {
17
+ pose = next;
18
+ changed(next);
19
+ }
20
+ };
21
+ const schedule = () => {
22
+ clear();
23
+ if (paused || disposed || pose === 'doze')
24
+ return;
25
+ const deadline = pose === 'seated' ? CHARACTER_CHIN_DELAY : CHARACTER_DOZE_DELAY;
26
+ timer = clock.setTimeout(tick, Math.max(1, lastActivity + deadline - clock.now()));
27
+ };
28
+ function tick() {
29
+ timer = undefined;
30
+ if (paused || disposed)
31
+ return;
32
+ const elapsed = clock.now() - lastActivity;
33
+ update(elapsed >= CHARACTER_DOZE_DELAY ? 'doze' : elapsed >= CHARACTER_CHIN_DELAY ? 'chin' : 'seated');
34
+ schedule();
35
+ }
36
+ return {
37
+ get pose() { return pose; },
38
+ activity() {
39
+ if (paused || disposed)
40
+ return;
41
+ const now = clock.now();
42
+ // Pointer events can fire at 120 Hz. Update a timestamp at most once per
43
+ // second; never reset a timeout on each pointer movement or keystroke.
44
+ if (pose === 'seated' && now - lastActivity < 1000)
45
+ return;
46
+ lastActivity = now;
47
+ if (pose !== 'seated') {
48
+ update('seated');
49
+ schedule();
50
+ }
51
+ },
52
+ setPaused(value) {
53
+ if (disposed || value === paused)
54
+ return;
55
+ paused = value;
56
+ clear();
57
+ lastActivity = clock.now();
58
+ update('seated');
59
+ if (!paused)
60
+ schedule();
61
+ },
62
+ dispose() { disposed = true; clear(); },
63
+ };
64
+ }
65
+ //# sourceMappingURL=character-idle.js.map
@@ -0,0 +1,24 @@
1
+ /** Pure placement policy: decoration may only occupy space outside message bounds. */
2
+ export interface CharacterRect {
3
+ left: number;
4
+ top: number;
5
+ right: number;
6
+ bottom: number;
7
+ }
8
+ export interface CharacterLayoutInput {
9
+ sidebar: CharacterRect;
10
+ scroll: CharacterRect;
11
+ flow: CharacterRect;
12
+ viewportWidth: number;
13
+ viewportHeight: number;
14
+ controls: CharacterRect[];
15
+ }
16
+ export interface CharacterPlacement {
17
+ pose: 'seated' | 'peek' | 'halfpeek' | 'hidden';
18
+ left: number;
19
+ top: number;
20
+ width: number;
21
+ height: number;
22
+ }
23
+ export declare function resolveCharacterPlacement(input: CharacterLayoutInput): CharacterPlacement;
24
+ //# sourceMappingURL=character-layout.d.ts.map
@@ -0,0 +1,51 @@
1
+ const hidden = { pose: 'hidden', left: 0, top: 0, width: 0, height: 0 };
2
+ const SEATED_RATIO = 0.71;
3
+ const PEEK_RATIO = 0.63;
4
+ const HALF_PEEK_RATIO = 0.44;
5
+ export function resolveCharacterPlacement(input) {
6
+ const { sidebar, scroll, flow, viewportWidth, viewportHeight, controls } = input;
7
+ // Wallpaper belongs to the viewport, not the welcome/composer dock. Reserve
8
+ // the same top/bottom chrome space before and after the first message.
9
+ const bottom = Math.min(sidebar.bottom, viewportHeight) - 148;
10
+ const top = Math.max(sidebar.top + 24, 96);
11
+ if (bottom - top < 130 || sidebar.right > flow.left)
12
+ return hidden;
13
+ const rightStart = flow.right + 56;
14
+ const seatedWidth = Math.min(250, scroll.right - rightStart - 20, (bottom - top) * SEATED_RATIO, 340 * SEATED_RATIO);
15
+ if (seatedWidth >= 190) {
16
+ const height = seatedWidth / SEATED_RATIO;
17
+ return { pose: 'seated', left: scroll.right - seatedWidth - 16,
18
+ top: top + (bottom - top - height) * 0.6, width: seatedWidth, height };
19
+ }
20
+ const avatarInset = viewportWidth > 760 ? 52 : 0;
21
+ const freeGap = flow.left - avatarInset - sidebar.right;
22
+ if (freeGap >= 66) {
23
+ const width = Math.min(104, freeGap - 12, (bottom - top) * PEEK_RATIO);
24
+ const height = width / PEEK_RATIO;
25
+ return { pose: 'peek', left: sidebar.right - 6,
26
+ top: top + Math.min(160, (bottom - top - height) * 0.5), width, height };
27
+ }
28
+ // A collapsed rail has a large blank region between navigation and Settings.
29
+ // Use that region only after excluding every real interactive control.
30
+ if (sidebar.right - sidebar.left > 100)
31
+ return hidden;
32
+ const left = sidebar.left + 7;
33
+ const width = Math.min(60, flow.left - avatarInset - left - 10);
34
+ if (width < 40)
35
+ return hidden;
36
+ const height = width / HALF_PEEK_RATIO;
37
+ const blocked = controls.filter(r => r.right > left && r.left < left + width)
38
+ .map(r => ({ start: Math.max(top, r.top - 12), end: Math.min(bottom, r.bottom + 12) }))
39
+ .filter(r => r.end > r.start).sort((a, b) => a.start - b.start);
40
+ let cursor = top;
41
+ let best = { start: top, end: top };
42
+ for (const block of [...blocked, { start: bottom, end: bottom }]) {
43
+ if (block.start - cursor > best.end - best.start)
44
+ best = { start: cursor, end: block.start };
45
+ cursor = Math.max(cursor, block.end);
46
+ }
47
+ if (best.end - best.start < height + 12)
48
+ return hidden;
49
+ return { pose: 'halfpeek', left, top: best.start + (best.end - best.start - height) * 0.45, width, height };
50
+ }
51
+ //# sourceMappingURL=character-layout.js.map
@@ -0,0 +1,18 @@
1
+ interface Clock {
2
+ setTimeout(callback: () => void, delay: number): number;
3
+ clearTimeout(handle: number): void;
4
+ performance: {
5
+ now(): number;
6
+ };
7
+ }
8
+ export interface CharacterMotionClip {
9
+ duration: number;
10
+ }
11
+ /** One deadline; elapsed-time continuous sampling, capped at 30 fps. */
12
+ export declare function createCharacterMotionClock(clock: Clock, changed: (action: string | undefined, progress: number) => void, random?: () => number): {
13
+ setClips(next: Readonly<Record<string, CharacterMotionClip>> | undefined): void;
14
+ attention(): void;
15
+ dispose(): void;
16
+ };
17
+ export {};
18
+ //# sourceMappingURL=character-motion-clock.d.ts.map
@@ -0,0 +1,57 @@
1
+ /** One deadline; elapsed-time continuous sampling, capped at 30 fps. */
2
+ export function createCharacterMotionClock(clock, changed, random = Math.random) {
3
+ let timer, disposed = false, turn = 0, active = '';
4
+ let clips;
5
+ const clear = () => { if (timer !== undefined)
6
+ clock.clearTimeout(timer); timer = undefined; };
7
+ function rest() {
8
+ active = '';
9
+ changed(undefined, 0);
10
+ if (clips && !disposed)
11
+ timer = clock.setTimeout(start, 2800 + random() * 2800);
12
+ }
13
+ function play(action) {
14
+ const clip = clips?.[action];
15
+ if (!clip || disposed)
16
+ return;
17
+ clear();
18
+ active = action;
19
+ const started = clock.performance.now();
20
+ const step = () => {
21
+ timer = undefined;
22
+ if (!clips || disposed)
23
+ return;
24
+ const t = Math.min(1, (clock.performance.now() - started) / clip.duration);
25
+ changed(active, t);
26
+ if (t >= 1) {
27
+ rest();
28
+ return;
29
+ }
30
+ timer = clock.setTimeout(step, 1000 / 30);
31
+ };
32
+ step();
33
+ }
34
+ function start() {
35
+ timer = undefined;
36
+ if (!clips || disposed)
37
+ return;
38
+ const gestures = Object.keys(clips).filter(name => name !== 'blink' && name !== 'attention');
39
+ play((turn++ % 2 === 0 && clips.blink) || !gestures.length ? 'blink' : gestures[Math.floor(random() * gestures.length)]);
40
+ }
41
+ return {
42
+ setClips(next) {
43
+ if (disposed || next === clips)
44
+ return;
45
+ clear();
46
+ clips = next;
47
+ active = '';
48
+ changed(undefined, 0);
49
+ if (clips)
50
+ timer = clock.setTimeout(start, 1200 + random() * 800);
51
+ },
52
+ attention() { if (!active)
53
+ play('attention'); },
54
+ dispose() { disposed = true; clear(); clips = undefined; changed(undefined, 0); },
55
+ };
56
+ }
57
+ //# sourceMappingURL=character-motion-clock.js.map
@@ -0,0 +1,12 @@
1
+ export type Point = readonly [number, number];
2
+ export interface CharacterLayer {
3
+ readonly src: string;
4
+ readonly box: readonly [number, number, number, number];
5
+ }
6
+ export interface CharacterRig {
7
+ readonly layers: Readonly<Record<string, CharacterLayer>>;
8
+ readonly ears: readonly Point[];
9
+ readonly size: Point;
10
+ }
11
+ export type CharacterMotionCatalog = Readonly<Record<string, Readonly<Record<'light' | 'dark', CharacterRig>>>>;
12
+ //# sourceMappingURL=character-motion-types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=character-motion-types.js.map
@@ -0,0 +1,6 @@
1
+ /** Owns loading and lifecycle only. Rig math and painting stay independent. */
2
+ export declare function createCharacterMotion(doc: Document): {
3
+ setPose(nextPart: HTMLElement | undefined, nextPose: string): void;
4
+ dispose(): void;
5
+ };
6
+ //# sourceMappingURL=character-motion.d.ts.map
@@ -0,0 +1,126 @@
1
+ import { CHARACTER_MOTION } from '../generated-character-motion.js';
2
+ import { createCharacterMotionClock } from './character-motion-clock.js';
3
+ import { createRigRenderer } from './character-rig-renderer.js';
4
+ /** Owns loading and lifecycle only. Rig math and painting stay independent. */
5
+ export function createCharacterMotion(doc) {
6
+ const win = doc.defaultView, reduced = win.matchMedia('(prefers-reduced-motion: reduce)');
7
+ const images = new Map(), loading = new Map();
8
+ let disposed = false, part, rig;
9
+ let canvas, render;
10
+ let pose = '', appearance = '', revision = 0, nearby = false, lastPointer = 0;
11
+ function decode(src) {
12
+ if (loading.has(src))
13
+ return loading.get(src);
14
+ if (images.has(src))
15
+ return Promise.resolve();
16
+ const image = new win.Image();
17
+ image.src = src;
18
+ const pending = image.decode().then(() => { if (!disposed)
19
+ images.set(src, image); }, () => { })
20
+ .finally(() => loading.delete(src));
21
+ loading.set(src, pending);
22
+ return pending;
23
+ }
24
+ const clock = createCharacterMotionClock(win, (action, progress) => {
25
+ if (!canvas || !part || !render)
26
+ return;
27
+ // Keep the same layered rest drawing after an action: no plate swap/pop.
28
+ render(action, progress);
29
+ part.dataset.motion = action ?? 'rig-rest';
30
+ });
31
+ function update() {
32
+ if (disposed)
33
+ return;
34
+ const mode = doc.documentElement.dataset.xiaoheiAppearance === 'light' ? 'light' : 'dark';
35
+ const moving = doc.documentElement.hasAttribute('data-xiaohei-sidebar-resizing');
36
+ const next = !doc.hidden && !reduced.matches && !moving && part ? CHARACTER_MOTION[pose]?.[mode] : undefined;
37
+ if (next === rig && appearance === mode)
38
+ return;
39
+ clock.setClips(undefined);
40
+ render = undefined;
41
+ const current = ++revision;
42
+ canvas?.remove();
43
+ canvas = undefined;
44
+ if (part)
45
+ part.dataset.motion = 'rest';
46
+ rig = next;
47
+ appearance = mode;
48
+ nearby = false;
49
+ if (!next || !part)
50
+ return;
51
+ const currentPart = part;
52
+ void Promise.all(Object.values(next.layers).map(layer => decode(layer.src))).then(() => {
53
+ if (disposed || current !== revision || Object.values(next.layers).some(layer => !images.get(layer.src)))
54
+ return;
55
+ canvas = doc.createElement('canvas');
56
+ canvas.className = 'xiaohei-character-motion';
57
+ canvas.width = next.size[0];
58
+ canvas.height = next.size[1];
59
+ const ctx = canvas.getContext('2d');
60
+ if (!ctx) {
61
+ canvas = undefined;
62
+ return;
63
+ }
64
+ currentPart.append(canvas);
65
+ render = createRigRenderer(ctx, next, images);
66
+ clock.setClips({
67
+ blink: { duration: 330 },
68
+ ...Object.fromEntries(next.ears.map((_, i) => ['ear' + i, { duration: 1050 }])),
69
+ ...(next.layers.tail ? { tail: { duration: 2400 } } : {}),
70
+ attention: { duration: 2400 },
71
+ });
72
+ });
73
+ }
74
+ const pointer = (event) => {
75
+ if (!part || !render || event.pointerType !== 'mouse')
76
+ return;
77
+ const now = win.performance.now();
78
+ if (now - lastPointer < 100)
79
+ return;
80
+ lastPointer = now;
81
+ const rect = part.getBoundingClientRect();
82
+ const near = event.clientX >= rect.left - 70 && event.clientX <= rect.right + 70
83
+ && event.clientY >= rect.top - 50 && event.clientY <= rect.bottom + 50;
84
+ if (near && !nearby)
85
+ clock.attention();
86
+ nearby = near;
87
+ };
88
+ reduced.addEventListener('change', update);
89
+ doc.addEventListener('visibilitychange', update);
90
+ doc.addEventListener('pointermove', pointer, { passive: true });
91
+ const observer = new win.MutationObserver(update);
92
+ observer.observe(doc.documentElement, { attributes: true, attributeFilter: ['data-xiaohei-appearance', 'data-xiaohei-sidebar-resizing'] });
93
+ return {
94
+ setPose(nextPart, nextPose) {
95
+ if (nextPart !== part || pose !== nextPose) {
96
+ revision++;
97
+ clock.setClips(undefined);
98
+ render = undefined;
99
+ canvas?.remove();
100
+ canvas = undefined;
101
+ rig = undefined;
102
+ if (part)
103
+ part.dataset.motion = 'rest';
104
+ }
105
+ part = nextPart;
106
+ pose = nextPose;
107
+ update();
108
+ },
109
+ dispose() {
110
+ disposed = true;
111
+ revision++;
112
+ clock.dispose();
113
+ canvas?.remove();
114
+ render = undefined;
115
+ images.clear();
116
+ loading.clear();
117
+ if (part)
118
+ part.dataset.motion = 'rest';
119
+ reduced.removeEventListener('change', update);
120
+ observer.disconnect();
121
+ doc.removeEventListener('visibilitychange', update);
122
+ doc.removeEventListener('pointermove', pointer);
123
+ },
124
+ };
125
+ }
126
+ //# sourceMappingURL=character-motion.js.map
@@ -0,0 +1,26 @@
1
+ /** Shared catalog: runtime preloading and CSS must always use the same assets. */
2
+ export declare const CHARACTER_POSES: {
3
+ readonly seated: {
4
+ readonly light: string;
5
+ readonly dark: string;
6
+ };
7
+ readonly chin: {
8
+ readonly light: string;
9
+ readonly dark: string;
10
+ };
11
+ readonly doze: {
12
+ readonly light: string;
13
+ readonly dark: string;
14
+ };
15
+ readonly peek: {
16
+ readonly light: string;
17
+ readonly dark: string;
18
+ };
19
+ readonly halfpeek: {
20
+ readonly light: string;
21
+ readonly dark: string;
22
+ };
23
+ };
24
+ export type CharacterPose = keyof typeof CHARACTER_POSES;
25
+ export declare const CHARACTER_POSE_NAMES: CharacterPose[];
26
+ //# sourceMappingURL=character-poses.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { XIAOHEI_SEATED_LIGHT, XIAOHEI_SEATED_DARK, XIAOHEI_PEEK_LIGHT, XIAOHEI_PEEK_DARK, XIAOHEI_CHIN_LIGHT, XIAOHEI_CHIN_DARK, XIAOHEI_DOZE_LIGHT, XIAOHEI_DOZE_DARK, XIAOHEI_HALFPEEK_LIGHT, XIAOHEI_HALFPEEK_DARK, } from '../generated-backgrounds.js';
2
+ /** Shared catalog: runtime preloading and CSS must always use the same assets. */
3
+ export const CHARACTER_POSES = {
4
+ seated: { light: XIAOHEI_SEATED_LIGHT, dark: XIAOHEI_SEATED_DARK },
5
+ chin: { light: XIAOHEI_CHIN_LIGHT, dark: XIAOHEI_CHIN_DARK },
6
+ doze: { light: XIAOHEI_DOZE_LIGHT, dark: XIAOHEI_DOZE_DARK },
7
+ peek: { light: XIAOHEI_PEEK_LIGHT, dark: XIAOHEI_PEEK_DARK },
8
+ halfpeek: { light: XIAOHEI_HALFPEEK_LIGHT, dark: XIAOHEI_HALFPEEK_DARK },
9
+ };
10
+ export const CHARACTER_POSE_NAMES = Object.keys(CHARACTER_POSES);
11
+ //# sourceMappingURL=character-poses.js.map
@@ -0,0 +1,4 @@
1
+ import type { CharacterRig } from './character-motion-types.js';
2
+ /** Small CPU-skinned tail only; body and ears use normal image draws. */
3
+ export declare function createRigRenderer(ctx: CanvasRenderingContext2D, rig: CharacterRig, images: ReadonlyMap<string, HTMLImageElement | null>): (action: string | undefined, progress: number) => void;
4
+ //# sourceMappingURL=character-rig-renderer.d.ts.map
@@ -0,0 +1,85 @@
1
+ import { bindVertex, rigAngles, skinVertex, solveBones, TAIL_JOINTS } from './character-rig.js';
2
+ /** Small CPU-skinned tail only; body and ears use normal image draws. */
3
+ export function createRigRenderer(ctx, rig, images) {
4
+ const tail = rig.layers.tail;
5
+ const vertices = [], triangles = [];
6
+ if (tail) {
7
+ const [x, y, r, b] = tail.box, cols = Math.ceil((r - x) / 10), rows = Math.ceil((b - y) / 10);
8
+ for (let row = 0; row <= rows; row++)
9
+ for (let col = 0; col <= cols; col++)
10
+ vertices.push(bindVertex(x + (r - x) * col / cols, y + (b - y) * row / rows));
11
+ for (let row = 0; row < rows; row++)
12
+ for (let col = 0; col < cols; col++) {
13
+ const i = row * (cols + 1) + col;
14
+ triangles.push([i, i + 1, i + cols + 1], [i + 1, i + cols + 2, i + cols + 1]);
15
+ }
16
+ }
17
+ function layer(name) {
18
+ const layer = rig.layers[name], image = layer && images.get(layer.src);
19
+ if (layer && image) {
20
+ const [x, y, r, b] = layer.box;
21
+ ctx.drawImage(image, x, y, r - x, b - y);
22
+ }
23
+ }
24
+ function drawTail(progress) {
25
+ if (!tail)
26
+ return;
27
+ const image = images.get(tail.src);
28
+ if (!image)
29
+ return;
30
+ if (progress <= 0 || progress >= 1) {
31
+ layer('tail');
32
+ return;
33
+ }
34
+ const joints = solveBones(TAIL_JOINTS, rigAngles(progress, TAIL_JOINTS.length, true));
35
+ const posed = vertices.map(v => skinVertex(v, joints));
36
+ const [left, top] = tail.box;
37
+ for (const indices of triangles) {
38
+ const [ia, ib, ic] = indices;
39
+ const a = vertices[ia], b = vertices[ib], c = vertices[ic];
40
+ const p = posed[ia], q = posed[ib], r = posed[ic];
41
+ const ux = b.x - a.x, uy = b.y - a.y, vx = c.x - a.x, vy = c.y - a.y, det = ux * vy - uy * vx;
42
+ const aa = ((q[0] - p[0]) * vy - (r[0] - p[0]) * uy) / det;
43
+ const bb = ((q[1] - p[1]) * vy - (r[1] - p[1]) * uy) / det;
44
+ const cc = ((r[0] - p[0]) * ux - (q[0] - p[0]) * vx) / det;
45
+ const dd = ((r[1] - p[1]) * ux - (q[1] - p[1]) * vx) / det;
46
+ ctx.save();
47
+ ctx.beginPath();
48
+ // Slightly overlap the interior triangles to avoid antialias hairlines.
49
+ const cx = (p[0] + q[0] + r[0]) / 3, cy = (p[1] + q[1] + r[1]) / 3;
50
+ [p, q, r].forEach((v, i) => {
51
+ const dx = v[0] - cx, dy = v[1] - cy, scale = 1 + 1.2 / Math.max(1, Math.hypot(dx, dy));
52
+ if (i)
53
+ ctx.lineTo(cx + dx * scale, cy + dy * scale);
54
+ else
55
+ ctx.moveTo(cx + dx * scale, cy + dy * scale);
56
+ });
57
+ ctx.closePath();
58
+ ctx.clip();
59
+ ctx.transform(aa, bb, cc, dd, p[0] - aa * (a.x - left) - cc * (a.y - top), p[1] - bb * (a.x - left) - dd * (a.y - top));
60
+ ctx.drawImage(image, 0, 0);
61
+ ctx.restore();
62
+ }
63
+ }
64
+ return (action, progress) => {
65
+ ctx.clearRect(0, 0, rig.size[0], rig.size[1]);
66
+ const ears = rigAngles(progress, rig.ears.length, false);
67
+ rig.ears.forEach(([x, y], i) => {
68
+ ctx.save();
69
+ ctx.translate(x, y);
70
+ ctx.rotate(action === 'attention' || action === 'ear' + i ? ears[i] : 0);
71
+ ctx.translate(-x, -y);
72
+ layer('ear' + i);
73
+ ctx.restore();
74
+ });
75
+ layer('body');
76
+ drawTail(action === 'tail' || action === 'attention' ? progress : 0);
77
+ if (action === 'blink') {
78
+ ctx.save();
79
+ ctx.globalAlpha = Math.min(1, Math.sin(Math.PI * progress) * 2);
80
+ layer('blink');
81
+ ctx.restore();
82
+ }
83
+ };
84
+ }
85
+ //# sourceMappingURL=character-rig-renderer.js.map
@@ -0,0 +1,20 @@
1
+ import type { Point } from './character-motion-types.js';
2
+ /** Bind-space joint positions. Each child inherits its parent's rotation. */
3
+ export declare const TAIL_JOINTS: readonly Point[];
4
+ export interface Joint {
5
+ x: number;
6
+ y: number;
7
+ angle: number;
8
+ }
9
+ export interface Vertex {
10
+ x: number;
11
+ y: number;
12
+ bone: number;
13
+ weight: number;
14
+ }
15
+ export declare function solveBones(rest: readonly Point[], angles: readonly number[]): Joint[];
16
+ export declare function bindVertex(x: number, y: number, rest?: readonly Point[]): Vertex;
17
+ /** Linear blend skinning, inverse bind translation followed by posed rotation. */
18
+ export declare function skinVertex(v: Vertex, joints: readonly Joint[], rest?: readonly Point[]): Point;
19
+ export declare function rigAngles(progress: number, count: number, tail: boolean): number[];
20
+ //# sourceMappingURL=character-rig.d.ts.map
@@ -0,0 +1,53 @@
1
+ /** Bind-space joint positions. Each child inherits its parent's rotation. */
2
+ export const TAIL_JOINTS = [
3
+ [284, 328], [310, 347], [324, 373], [319, 398],
4
+ [307, 423], [307, 448], [319, 464],
5
+ ];
6
+ export function solveBones(rest, angles) {
7
+ return rest.reduce((out, p, i) => {
8
+ const parent = out[i - 1];
9
+ const angle = (parent?.angle ?? 0) + (angles[i] ?? 0);
10
+ if (!parent)
11
+ out.push({ x: p[0], y: p[1], angle });
12
+ else {
13
+ const prev = rest[i - 1], dx = p[0] - prev[0], dy = p[1] - prev[1];
14
+ const c = Math.cos(parent.angle), s = Math.sin(parent.angle);
15
+ out.push({ x: parent.x + dx * c - dy * s, y: parent.y + dx * s + dy * c, angle });
16
+ }
17
+ return out;
18
+ }, []);
19
+ }
20
+ export function bindVertex(x, y, rest = TAIL_JOINTS) {
21
+ let distance = Infinity, bone = 0, weight = 0;
22
+ for (let i = 0; i < rest.length - 1; i++) {
23
+ const a = rest[i], b = rest[i + 1], dx = b[0] - a[0], dy = b[1] - a[1];
24
+ const t = Math.max(0, Math.min(1, ((x - a[0]) * dx + (y - a[1]) * dy) / (dx * dx + dy * dy)));
25
+ const d = (x - a[0] - dx * t) ** 2 + (y - a[1] - dy * t) ** 2;
26
+ if (d < distance) {
27
+ distance = d;
28
+ bone = i;
29
+ weight = t;
30
+ }
31
+ }
32
+ return { x, y, bone, weight };
33
+ }
34
+ /** Linear blend skinning, inverse bind translation followed by posed rotation. */
35
+ export function skinVertex(v, joints, rest = TAIL_JOINTS) {
36
+ let x = 0, y = 0;
37
+ for (let k = 0; k < 2; k++) {
38
+ const i = v.bone + k, p = rest[i], j = joints[i], w = k ? v.weight : 1 - v.weight;
39
+ const dx = v.x - p[0], dy = v.y - p[1], c = Math.cos(j.angle), s = Math.sin(j.angle);
40
+ x += w * (j.x + dx * c - dy * s);
41
+ y += w * (j.y + dx * s + dy * c);
42
+ }
43
+ return [x, y];
44
+ }
45
+ export function rigAngles(progress, count, tail) {
46
+ const t = Math.max(0, Math.min(1, progress));
47
+ const envelope = Math.sin(Math.PI * t) ** 2;
48
+ // Delayed distal joints create follow-through, with zero displacement/velocity
49
+ // at both ends; no discrete frame lookup and no idle simulation.
50
+ return Array.from({ length: count }, (_, i) => envelope * (tail ? (i ? .12 : 0) : .22)
51
+ * Math.sin(t * Math.PI * (tail ? 3 : 4) - i * (tail ? .65 : 1.1)));
52
+ }
53
+ //# sourceMappingURL=character-rig.js.map
@@ -1,3 +1,3 @@
1
1
  /** Session feedback runs on an inner plane so ambient drifting stays untouched. */
2
- export declare const XIAOHEI_HEIXIU_FEEDBACK_CSS = "\n.xiaohei-scene__heixiu-body {\n position: absolute;\n inset: 0;\n display: block;\n transform: translate3d(0, 0, 0);\n opacity: 1;\n}\n\nhtml[data-xiaohei-state='thinking'] .xiaohei-scene__heixiu--composer .xiaohei-scene__heixiu-body {\n animation: xiaohei-heixiu-feedback-send 620ms cubic-bezier(0.22, 0.72, 0.24, 1) both;\n}\n\nhtml[data-xiaohei-state='complete'] .xiaohei-scene__heixiu--mascot .xiaohei-scene__heixiu-body,\nhtml[data-xiaohei-state='complete'] .xiaohei-scene__heixiu--composer .xiaohei-scene__heixiu-body,\nhtml[data-xiaohei-state='complete'] .xiaohei-scene__heixiu--sidebar .xiaohei-scene__heixiu-body {\n animation: xiaohei-heixiu-feedback-complete 760ms cubic-bezier(0.16, 1, 0.3, 1) both;\n}\n\nhtml[data-xiaohei-state='complete'] .xiaohei-scene__heixiu--composer .xiaohei-scene__heixiu-body {\n animation-delay: 70ms;\n}\n\nhtml[data-xiaohei-state='complete'] .xiaohei-scene__heixiu--sidebar .xiaohei-scene__heixiu-body {\n animation-delay: 140ms;\n}\n\nhtml[data-xiaohei-state='error'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-body {\n animation: xiaohei-heixiu-feedback-error 880ms cubic-bezier(0.22, 0.72, 0.24, 1) both;\n}\n\nhtml[data-xiaohei-state='thinking'] .xiaohei-scene__heixiu--composer .xiaohei-scene__heixiu-open,\nhtml[data-xiaohei-state='complete'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-open,\nhtml[data-xiaohei-state='error'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-open {\n animation: xiaohei-heixiu-feedback-eyes-open 620ms step-end both;\n}\n\nhtml[data-xiaohei-state='thinking'] .xiaohei-scene__heixiu--composer .xiaohei-scene__heixiu-blink,\nhtml[data-xiaohei-state='complete'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-blink,\nhtml[data-xiaohei-state='error'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-blink {\n animation: xiaohei-heixiu-feedback-eyes-blink 620ms step-end both;\n}\n\n@keyframes xiaohei-heixiu-feedback-send {\n 0%, 100% { transform: translate3d(0, 0, 0); opacity: 1; }\n 34% { transform: translate3d(0, -0.28rem, 0); opacity: 1; }\n 68% { transform: translate3d(0, 0.08rem, 0); opacity: 0.94; }\n}\n\n@keyframes xiaohei-heixiu-feedback-complete {\n 0%, 100% { transform: translate3d(0, 0, 0); opacity: 1; }\n 38% { transform: translate3d(0, -0.42rem, 0); opacity: 1; }\n 68% { transform: translate3d(0, -0.12rem, 0); opacity: 0.96; }\n}\n\n@keyframes xiaohei-heixiu-feedback-error {\n 0%, 100% { transform: translate3d(0, 0, 0); opacity: 1; }\n 30% { transform: translate3d(0, 0.2rem, 0); opacity: 0.52; }\n 62% { transform: translate3d(0, 0.08rem, 0); opacity: 0.72; }\n}\n\n@keyframes xiaohei-heixiu-feedback-eyes-open {\n 0%, 24%, 48%, 100% { opacity: 1; }\n 25%, 47% { opacity: 0; }\n}\n\n@keyframes xiaohei-heixiu-feedback-eyes-blink {\n 0%, 24%, 48%, 100% { opacity: 0; }\n 25%, 47% { opacity: 1; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n html[data-xiaohei-state] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-body,\n html[data-xiaohei-state] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-open,\n html[data-xiaohei-state] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-blink {\n animation: none;\n }\n}\n";
2
+ export declare const XIAOHEI_HEIXIU_FEEDBACK_CSS = "\n.xiaohei-scene__heixiu-body {\n position: absolute;\n inset: 0;\n display: block;\n transform: translate3d(0, 0, 0);\n opacity: 1;\n}\n\nhtml[data-xiaohei-state='complete'] .xiaohei-scene__heixiu--mascot .xiaohei-scene__heixiu-body,\nhtml[data-xiaohei-state='complete'] .xiaohei-scene__heixiu--sidebar .xiaohei-scene__heixiu-body {\n animation: xiaohei-heixiu-feedback-complete 760ms cubic-bezier(0.16, 1, 0.3, 1) both;\n}\n\nhtml[data-xiaohei-state='complete'] .xiaohei-scene__heixiu--sidebar .xiaohei-scene__heixiu-body {\n animation-delay: 140ms;\n}\n\nhtml[data-xiaohei-state='error'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-body {\n animation: xiaohei-heixiu-feedback-error 880ms cubic-bezier(0.22, 0.72, 0.24, 1) both;\n}\n\nhtml[data-xiaohei-state='complete'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-open,\nhtml[data-xiaohei-state='error'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-open {\n animation: xiaohei-heixiu-feedback-eyes-open 620ms step-end both;\n}\n\nhtml[data-xiaohei-state='complete'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-blink,\nhtml[data-xiaohei-state='error'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-blink {\n animation: xiaohei-heixiu-feedback-eyes-blink 620ms step-end both;\n}\n\n@keyframes xiaohei-heixiu-feedback-complete {\n 0%, 100% { transform: translate3d(0, 0, 0); opacity: 1; }\n 38% { transform: translate3d(0, -0.42rem, 0); opacity: 1; }\n 68% { transform: translate3d(0, -0.12rem, 0); opacity: 0.96; }\n}\n\n@keyframes xiaohei-heixiu-feedback-error {\n 0%, 100% { transform: translate3d(0, 0, 0); opacity: 1; }\n 30% { transform: translate3d(0, 0.2rem, 0); opacity: 0.52; }\n 62% { transform: translate3d(0, 0.08rem, 0); opacity: 0.72; }\n}\n\n@keyframes xiaohei-heixiu-feedback-eyes-open {\n 0%, 24%, 48%, 100% { opacity: 1; }\n 25%, 47% { opacity: 0; }\n}\n\n@keyframes xiaohei-heixiu-feedback-eyes-blink {\n 0%, 24%, 48%, 100% { opacity: 0; }\n 25%, 47% { opacity: 1; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n html[data-xiaohei-state] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-body,\n html[data-xiaohei-state] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-open,\n html[data-xiaohei-state] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-blink {\n animation: none;\n }\n}\n";
3
3
  //# sourceMappingURL=heixiu-feedback.d.ts.map
@@ -8,20 +8,11 @@ export const XIAOHEI_HEIXIU_FEEDBACK_CSS = `
8
8
  opacity: 1;
9
9
  }
10
10
 
11
- html[data-xiaohei-state='thinking'] .xiaohei-scene__heixiu--composer .xiaohei-scene__heixiu-body {
12
- animation: xiaohei-heixiu-feedback-send 620ms cubic-bezier(0.22, 0.72, 0.24, 1) both;
13
- }
14
-
15
11
  html[data-xiaohei-state='complete'] .xiaohei-scene__heixiu--mascot .xiaohei-scene__heixiu-body,
16
- html[data-xiaohei-state='complete'] .xiaohei-scene__heixiu--composer .xiaohei-scene__heixiu-body,
17
12
  html[data-xiaohei-state='complete'] .xiaohei-scene__heixiu--sidebar .xiaohei-scene__heixiu-body {
18
13
  animation: xiaohei-heixiu-feedback-complete 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
19
14
  }
20
15
 
21
- html[data-xiaohei-state='complete'] .xiaohei-scene__heixiu--composer .xiaohei-scene__heixiu-body {
22
- animation-delay: 70ms;
23
- }
24
-
25
16
  html[data-xiaohei-state='complete'] .xiaohei-scene__heixiu--sidebar .xiaohei-scene__heixiu-body {
26
17
  animation-delay: 140ms;
27
18
  }
@@ -30,24 +21,16 @@ html[data-xiaohei-state='error'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-b
30
21
  animation: xiaohei-heixiu-feedback-error 880ms cubic-bezier(0.22, 0.72, 0.24, 1) both;
31
22
  }
32
23
 
33
- html[data-xiaohei-state='thinking'] .xiaohei-scene__heixiu--composer .xiaohei-scene__heixiu-open,
34
24
  html[data-xiaohei-state='complete'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-open,
35
25
  html[data-xiaohei-state='error'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-open {
36
26
  animation: xiaohei-heixiu-feedback-eyes-open 620ms step-end both;
37
27
  }
38
28
 
39
- html[data-xiaohei-state='thinking'] .xiaohei-scene__heixiu--composer .xiaohei-scene__heixiu-blink,
40
29
  html[data-xiaohei-state='complete'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-blink,
41
30
  html[data-xiaohei-state='error'] .xiaohei-scene__heixiu .xiaohei-scene__heixiu-blink {
42
31
  animation: xiaohei-heixiu-feedback-eyes-blink 620ms step-end both;
43
32
  }
44
33
 
45
- @keyframes xiaohei-heixiu-feedback-send {
46
- 0%, 100% { transform: translate3d(0, 0, 0); opacity: 1; }
47
- 34% { transform: translate3d(0, -0.28rem, 0); opacity: 1; }
48
- 68% { transform: translate3d(0, 0.08rem, 0); opacity: 0.94; }
49
- }
50
-
51
34
  @keyframes xiaohei-heixiu-feedback-complete {
52
35
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 1; }
53
36
  38% { transform: translate3d(0, -0.42rem, 0); opacity: 1; }