@lemoncat7/dsh-theme-xiaohei 0.4.6 → 0.5.1

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 (232) hide show
  1. package/README.md +15 -9
  2. package/THIRD_PARTY_NOTICES.md +13 -1
  3. package/docs/dsh-021-compatibility.md +23 -0
  4. package/docs/releases/0.5.0.md +24 -0
  5. package/docs/rift-interaction.md +35 -0
  6. package/docs/rift-preview.md +39 -0
  7. package/lib/client.companion.js +3 -4
  8. package/lib/client.decorations.js +224 -51
  9. package/lib/client.js +534 -2405
  10. package/lib/index.d.ts +1 -2
  11. package/lib/index.js +395 -11
  12. package/lib/rift/boot.d.ts +6 -0
  13. package/package.json +29 -19
  14. package/lib/appearance.d.ts +0 -12
  15. package/lib/appearance.js +0 -42
  16. package/lib/blink.d.ts +0 -4
  17. package/lib/blink.js +0 -110
  18. package/lib/bloub-heixiu/ambient.d.ts +0 -3
  19. package/lib/bloub-heixiu/ambient.js +0 -12
  20. package/lib/bloub-heixiu/character.d.ts +0 -33
  21. package/lib/bloub-heixiu/character.js +0 -124
  22. package/lib/bloub-heixiu/effects.d.ts +0 -4
  23. package/lib/bloub-heixiu/effects.js +0 -91
  24. package/lib/bloub-heixiu/flight.d.ts +0 -15
  25. package/lib/bloub-heixiu/flight.js +0 -66
  26. package/lib/bloub-heixiu/follow.d.ts +0 -13
  27. package/lib/bloub-heixiu/follow.js +0 -23
  28. package/lib/bloub-heixiu/layout.d.ts +0 -34
  29. package/lib/bloub-heixiu/layout.js +0 -26
  30. package/lib/bloub-heixiu/renderer.d.ts +0 -16
  31. package/lib/bloub-heixiu/renderer.js +0 -94
  32. package/lib/bloub-heixiu/runtime.d.ts +0 -6
  33. package/lib/bloub-heixiu/runtime.js +0 -440
  34. package/lib/bloub-heixiu/signals.d.ts +0 -17
  35. package/lib/bloub-heixiu/signals.js +0 -55
  36. package/lib/bloub-heixiu/styles.d.ts +0 -2
  37. package/lib/bloub-heixiu/styles.js +0 -98
  38. package/lib/boot-appearance.d.ts +0 -10
  39. package/lib/boot-appearance.js +0 -47
  40. package/lib/boot-loader.d.ts +0 -5
  41. package/lib/boot-loader.js +0 -158
  42. package/lib/chrome/accessibility.d.ts +0 -3
  43. package/lib/chrome/accessibility.js +0 -69
  44. package/lib/chrome/blink.d.ts +0 -3
  45. package/lib/chrome/blink.js +0 -15
  46. package/lib/chrome/composer-avatar.d.ts +0 -10
  47. package/lib/chrome/composer-avatar.js +0 -599
  48. package/lib/chrome/composer-send-heixiu.d.ts +0 -3
  49. package/lib/chrome/composer-send-heixiu.js +0 -143
  50. package/lib/chrome/composer.d.ts +0 -3
  51. package/lib/chrome/composer.js +0 -135
  52. package/lib/chrome/controls.d.ts +0 -8
  53. package/lib/chrome/controls.js +0 -348
  54. package/lib/chrome/conversation-messages.d.ts +0 -3
  55. package/lib/chrome/conversation-messages.js +0 -329
  56. package/lib/chrome/conversation-submissions.d.ts +0 -3
  57. package/lib/chrome/conversation-submissions.js +0 -68
  58. package/lib/chrome/conversation.d.ts +0 -3
  59. package/lib/chrome/conversation.js +0 -67
  60. package/lib/chrome/frames.d.ts +0 -6
  61. package/lib/chrome/frames.js +0 -134
  62. package/lib/chrome/gaze.d.ts +0 -3
  63. package/lib/chrome/gaze.js +0 -103
  64. package/lib/chrome/identity.d.ts +0 -6
  65. package/lib/chrome/identity.js +0 -47
  66. package/lib/chrome/overlays.d.ts +0 -3
  67. package/lib/chrome/overlays.js +0 -104
  68. package/lib/chrome/portal.d.ts +0 -6
  69. package/lib/chrome/portal.js +0 -169
  70. package/lib/chrome/reactions.d.ts +0 -3
  71. package/lib/chrome/reactions.js +0 -85
  72. package/lib/chrome/sidebar.d.ts +0 -3
  73. package/lib/chrome/sidebar.js +0 -313
  74. package/lib/chrome/tokens.d.ts +0 -3
  75. package/lib/chrome/tokens.js +0 -224
  76. package/lib/chrome/workspace.d.ts +0 -3
  77. package/lib/chrome/workspace.js +0 -94
  78. package/lib/chrome.d.ts +0 -10
  79. package/lib/chrome.js +0 -46
  80. package/lib/client-entry.d.ts +0 -3
  81. package/lib/client-entry.js +0 -3
  82. package/lib/client.d.ts +0 -10
  83. package/lib/client.pose-chin-dark.js +0 -4
  84. package/lib/client.pose-chin-light.js +0 -4
  85. package/lib/client.pose-doze-dark.js +0 -4
  86. package/lib/client.pose-doze-light.js +0 -4
  87. package/lib/client.pose-halfpeek-dark.js +0 -4
  88. package/lib/client.pose-halfpeek-light.js +0 -4
  89. package/lib/client.pose-peek-dark.js +0 -4
  90. package/lib/client.pose-peek-light.js +0 -4
  91. package/lib/client.pose-seated-dark.js +0 -4
  92. package/lib/client.pose-seated-light.js +0 -4
  93. package/lib/client.rig-chin-dark.js +0 -4
  94. package/lib/client.rig-chin-light.js +0 -4
  95. package/lib/client.rig-halfpeek-dark.js +0 -4
  96. package/lib/client.rig-halfpeek-light.js +0 -4
  97. package/lib/client.rig-peek-dark.js +0 -4
  98. package/lib/client.rig-peek-light.js +0 -4
  99. package/lib/client.rig-seated-dark.js +0 -4
  100. package/lib/client.rig-seated-light.js +0 -4
  101. package/lib/companion-entry.d.ts +0 -3
  102. package/lib/companion-entry.js +0 -3
  103. package/lib/composer-avatar.d.ts +0 -18
  104. package/lib/composer-avatar.js +0 -441
  105. package/lib/composer-draft-preview.d.ts +0 -4
  106. package/lib/composer-draft-preview.js +0 -8
  107. package/lib/composer-send-heixiu.d.ts +0 -8
  108. package/lib/composer-send-heixiu.js +0 -133
  109. package/lib/current-session.d.ts +0 -6
  110. package/lib/current-session.js +0 -5
  111. package/lib/decorations-entry.d.ts +0 -3
  112. package/lib/decorations-entry.js +0 -18
  113. package/lib/deferred-companion.d.ts +0 -5
  114. package/lib/deferred-companion.js +0 -9
  115. package/lib/deferred-decorations.d.ts +0 -3
  116. package/lib/deferred-decorations.js +0 -51
  117. package/lib/gaze.d.ts +0 -4
  118. package/lib/gaze.js +0 -230
  119. package/lib/generated-backgrounds.d.ts +0 -14
  120. package/lib/generated-backgrounds.js +0 -14
  121. package/lib/generated-character-motion.d.ts +0 -4
  122. package/lib/generated-character-motion.js +0 -2
  123. package/lib/generated-identity.d.ts +0 -6
  124. package/lib/generated-identity.js +0 -6
  125. package/lib/generated-keyart.d.ts +0 -34
  126. package/lib/generated-keyart.js +0 -34
  127. package/lib/generated-loading-assets.d.ts +0 -4
  128. package/lib/generated-loading-assets.js +0 -4
  129. package/lib/heixiu-interactions.d.ts +0 -10
  130. package/lib/heixiu-interactions.js +0 -161
  131. package/lib/host-contract.d.ts +0 -9
  132. package/lib/host-contract.js +0 -13
  133. package/lib/host-dom.d.ts +0 -11
  134. package/lib/host-dom.js +0 -72
  135. package/lib/loading-heixiu.d.ts +0 -8
  136. package/lib/loading-heixiu.js +0 -287
  137. package/lib/metallic-brand-mark.d.ts +0 -10
  138. package/lib/metallic-brand-mark.js +0 -296
  139. package/lib/plugin.d.ts +0 -6
  140. package/lib/plugin.js +0 -60
  141. package/lib/portal.d.ts +0 -40
  142. package/lib/portal.js +0 -225
  143. package/lib/reactions.d.ts +0 -20
  144. package/lib/reactions.js +0 -380
  145. package/lib/scene/avatar-model.d.ts +0 -6
  146. package/lib/scene/avatar-model.js +0 -646
  147. package/lib/scene/avatar-motion.d.ts +0 -3
  148. package/lib/scene/avatar-motion.js +0 -799
  149. package/lib/scene/character-assets.d.ts +0 -13
  150. package/lib/scene/character-assets.js +0 -26
  151. package/lib/scene/character-expression.d.ts +0 -4
  152. package/lib/scene/character-expression.js +0 -15
  153. package/lib/scene/character-eye-material.d.ts +0 -13
  154. package/lib/scene/character-eye-material.js +0 -88
  155. package/lib/scene/character-eye-renderer.d.ts +0 -5
  156. package/lib/scene/character-eye-renderer.js +0 -80
  157. package/lib/scene/character-eye-rig.d.ts +0 -20
  158. package/lib/scene/character-eye-rig.js +0 -35
  159. package/lib/scene/character-gaze.d.ts +0 -16
  160. package/lib/scene/character-gaze.js +0 -36
  161. package/lib/scene/character-idle.d.ts +0 -17
  162. package/lib/scene/character-idle.js +0 -65
  163. package/lib/scene/character-layout.d.ts +0 -24
  164. package/lib/scene/character-layout.js +0 -51
  165. package/lib/scene/character-motion-clock.d.ts +0 -18
  166. package/lib/scene/character-motion-clock.js +0 -70
  167. package/lib/scene/character-motion-types.d.ts +0 -12
  168. package/lib/scene/character-motion-types.js +0 -2
  169. package/lib/scene/character-motion.d.ts +0 -6
  170. package/lib/scene/character-motion.js +0 -187
  171. package/lib/scene/character-poses.d.ts +0 -26
  172. package/lib/scene/character-poses.js +0 -11
  173. package/lib/scene/character-rig-renderer.d.ts +0 -5
  174. package/lib/scene/character-rig-renderer.js +0 -95
  175. package/lib/scene/character-rig.d.ts +0 -22
  176. package/lib/scene/character-rig.js +0 -61
  177. package/lib/scene/heixiu-feedback.d.ts +0 -3
  178. package/lib/scene/heixiu-feedback.js +0 -64
  179. package/lib/scene/heixiu-interactions.d.ts +0 -3
  180. package/lib/scene/heixiu-interactions.js +0 -92
  181. package/lib/scene/ids.d.ts +0 -5
  182. package/lib/scene/ids.js +0 -5
  183. package/lib/scene/pointer-bridge.d.ts +0 -21
  184. package/lib/scene/pointer-bridge.js +0 -155
  185. package/lib/scene/runtime.d.ts +0 -12
  186. package/lib/scene/runtime.js +0 -74
  187. package/lib/scene/state-transitions.d.ts +0 -3
  188. package/lib/scene/state-transitions.js +0 -37
  189. package/lib/scene/styles.d.ts +0 -5
  190. package/lib/scene/styles.js +0 -69
  191. package/lib/scene/sylva-performance.d.ts +0 -11
  192. package/lib/scene/sylva-performance.js +0 -58
  193. package/lib/scene/wallpaper-character-styles.d.ts +0 -3
  194. package/lib/scene/wallpaper-character-styles.js +0 -49
  195. package/lib/scene/wallpaper-character.d.ts +0 -5
  196. package/lib/scene/wallpaper-character.js +0 -222
  197. package/lib/scene.d.ts +0 -8
  198. package/lib/scene.js +0 -8
  199. package/lib/sidebar-glass.d.ts +0 -16
  200. package/lib/sidebar-glass.js +0 -168
  201. package/lib/sidebar-heixiu-escape.d.ts +0 -44
  202. package/lib/sidebar-heixiu-escape.js +0 -340
  203. package/lib/sidebar-heixiu-roaming.d.ts +0 -27
  204. package/lib/sidebar-heixiu-roaming.js +0 -310
  205. package/lib/sidebar-reveal.d.ts +0 -8
  206. package/lib/sidebar-reveal.js +0 -59
  207. package/lib/state.d.ts +0 -21
  208. package/lib/state.js +0 -123
  209. package/lib/theme.d.ts +0 -19
  210. package/lib/theme.js +0 -188
  211. package/lib/vendor/bloub/decor.d.ts +0 -114
  212. package/lib/vendor/bloub/decor.js +0 -198
  213. package/lib/vendor/bloub/engine.d.ts +0 -213
  214. package/lib/vendor/bloub/engine.js +0 -452
  215. package/lib/vendor/bloub/expressions.d.ts +0 -35
  216. package/lib/vendor/bloub/expressions.js +0 -143
  217. package/lib/vendor/bloub/eyefit.d.ts +0 -75
  218. package/lib/vendor/bloub/eyefit.js +0 -393
  219. package/lib/vendor/bloub/face.d.ts +0 -63
  220. package/lib/vendor/bloub/face.js +0 -106
  221. package/lib/vendor/bloub/math.d.ts +0 -22
  222. package/lib/vendor/bloub/math.js +0 -36
  223. package/lib/vendor/bloub/profiles.d.ts +0 -8
  224. package/lib/vendor/bloub/profiles.js +0 -20
  225. package/lib/vendor/bloub/repere.d.ts +0 -30
  226. package/lib/vendor/bloub/repere.js +0 -32
  227. package/lib/vendor/bloub/shape.d.ts +0 -80
  228. package/lib/vendor/bloub/shape.js +0 -268
  229. package/lib/vendor/bloub/skins.d.ts +0 -36
  230. package/lib/vendor/bloub/skins.js +0 -74
  231. package/lib/vendor/bloub/states.d.ts +0 -87
  232. package/lib/vendor/bloub/states.js +0 -468
@@ -1,55 +0,0 @@
1
- import { currentSession } from '../current-session.js';
2
- /** Small local read model. No messages, RPCs, history scans or persisted state. */
3
- export function createHeixiuSignals() {
4
- let value = { running: false, notice: null, revision: 0 };
5
- const listeners = new Set();
6
- return {
7
- getSnapshot: () => value,
8
- subscribe(fn) { listeners.add(fn); return () => { listeners.delete(fn); }; },
9
- publish(next) {
10
- if (next.sessionId === value.sessionId && next.running === value.running && next.notice === value.notice)
11
- return;
12
- value = { ...next, revision: value.revision + 1 };
13
- for (const fn of listeners)
14
- fn();
15
- },
16
- };
17
- }
18
- /** Optional official service adapter, subscribed only to the selected session. */
19
- export function bindHeixiuSessions(sessions, signals) {
20
- let face;
21
- let removeSession = () => { };
22
- let previous;
23
- const read = () => {
24
- const next = face?.getSnapshot();
25
- const live = next?.openState === 'open' && !next.removed;
26
- const wasLive = previous?.openState === 'open' && !previous.removed;
27
- const same = previous?.sessionId === next?.sessionId;
28
- const failed = !!next && !!previous && (next.lastAgentError && next.lastAgentError !== previous.lastAgentError
29
- || next.promptError && next.promptError !== previous.promptError);
30
- const ended = wasLive && same && previous?.running && !next?.running;
31
- const notice = live && wasLive && same ? failed ? 'alert' : ended ? 'notify' : null : null;
32
- signals.publish({ sessionId: next?.sessionId, running: !!live && !!next?.running, notice });
33
- previous = next;
34
- };
35
- const select = () => {
36
- const snapshot = sessions.list.getSnapshot();
37
- const id = currentSession(snapshot);
38
- const next = id ? sessions.binding(id)?.session : undefined;
39
- if (next === face)
40
- return;
41
- removeSession();
42
- previous = undefined;
43
- face = next;
44
- removeSession = face?.subscribe(read) ?? (() => { });
45
- read();
46
- };
47
- const removeList = sessions.list.subscribe(select);
48
- select();
49
- return () => {
50
- removeList();
51
- removeSession();
52
- signals.publish({ running: false, notice: null });
53
- };
54
- }
55
- //# sourceMappingURL=signals.js.map
@@ -1,2 +0,0 @@
1
- export declare const HEIXIU_BLOUB_CSS = "\n#root [data-composer-card] > button.xiaohei-bloub {\n all: unset;\n --heixiu-ink: #111214;\n --heixiu-outline: rgba(245,243,215,.16);\n position: absolute;\n box-sizing: border-box;\n display: block;\n width: 96px;\n height: 96px;\n min-width: 44px;\n min-height: 44px;\n right: calc(100% + 18px);\n top: calc(50% - 48px);\n margin: 0 !important;\n padding: 0 !important;\n border: 0 !important;\n border-radius: 50%;\n background: none !important;\n box-shadow: none !important;\n color: inherit;\n cursor: pointer;\n touch-action: manipulation;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n /* Flight owns this transform. A CSS transition would replay cancelled\n WAAPI transforms and corrupt the next target measurement. */\n transition: none;\n z-index: 3;\n}\n#root [data-composer-card] > button.xiaohei-bloub:focus-visible {\n outline: 2px solid var(--dsw-alias-label-secondary);\n outline-offset: -7px;\n}\n#root [data-composer-card] > button.xiaohei-bloub > .xiaohei-bloub-drift {\n display: block;\n width: 100%; height: 100%;\n pointer-events: none;\n --heixiu-drift-x: 7px;\n --heixiu-drift-y: 10px;\n animation: xiaohei-bloub-float 14s cubic-bezier(.45,0,.55,1) infinite;\n animation-play-state: paused;\n}\n#root [data-composer-card] > button.xiaohei-bloub[data-floating='true'] > .xiaohei-bloub-drift {\n animation-play-state: running;\n}\n@keyframes xiaohei-bloub-float {\n 0%, 100% { transform: translate(calc(-1 * var(--heixiu-drift-x)), var(--heixiu-drift-y)); }\n 50% { transform: translate(var(--heixiu-drift-x), calc(-1 * var(--heixiu-drift-y))); }\n}\n#root [data-composer-card] > button.xiaohei-bloub > .xiaohei-bloub-drift > svg {\n display: block;\n width: 100%; height: 100%;\n overflow: hidden;\n pointer-events: none;\n transform: translate(var(--heixiu-follow-x, 0px), var(--heixiu-follow-y, 0px));\n transition: transform 480ms cubic-bezier(.2,.75,.25,1);\n}\n#root [data-composer-card] > button.xiaohei-bloub:active > .xiaohei-bloub-drift > svg {\n transform: translate(var(--heixiu-follow-x, 0px), var(--heixiu-follow-y, 0px)) scale(.98);\n}\n#root [data-composer-card][data-heixiu-dock='compact'] {\n padding-inline-start: 64px !important;\n}\n#root [data-composer-card][data-heixiu-dock='compact'] > button.xiaohei-bloub {\n width: 52px; height: 52px;\n right: auto; left: 4px; top: 6px;\n}\n#root [data-composer-card][data-heixiu-dock='compact'] .xiaohei-bloub-drift {\n --heixiu-drift-x: 2px;\n --heixiu-drift-y: 3px;\n}\n#root [data-composer-card][data-heixiu-dock='welcome'] > button.xiaohei-bloub {\n right: auto;\n left: var(--heixiu-welcome-left);\n top: var(--heixiu-welcome-top);\n width: var(--heixiu-welcome-size);\n height: var(--heixiu-welcome-size);\n}\n@media (max-width: 760px) {\n #root [data-heixiu-hero-row] { box-sizing: border-box; padding-inline-start: 64px; max-width: 100%; }\n #root [data-composer-card][data-heixiu-dock='welcome'] .xiaohei-bloub-drift {\n --heixiu-drift-x: 2px;\n --heixiu-drift-y: 4px;\n }\n}\n#root [data-composer-card] > button.xiaohei-bloub[hidden] { display: none; }\n@media (prefers-reduced-motion: reduce) {\n #root [data-composer-card] > button.xiaohei-bloub { transition: none; transform: none; }\n #root [data-composer-card] > button.xiaohei-bloub > .xiaohei-bloub-drift { animation: none; transform: none; }\n #root [data-composer-card] > button.xiaohei-bloub > .xiaohei-bloub-drift > svg { transition: none; transform: none; }\n}\n@media print {\n #root [data-composer-card] > button.xiaohei-bloub { display: none; }\n #root [data-composer-card][data-heixiu-dock='compact'] { padding-inline-start: 12px !important; }\n}\n";
2
- //# sourceMappingURL=styles.d.ts.map
@@ -1,98 +0,0 @@
1
- export const HEIXIU_BLOUB_CSS = `
2
- #root [data-composer-card] > button.xiaohei-bloub {
3
- all: unset;
4
- --heixiu-ink: #111214;
5
- --heixiu-outline: rgba(245,243,215,.16);
6
- position: absolute;
7
- box-sizing: border-box;
8
- display: block;
9
- width: 96px;
10
- height: 96px;
11
- min-width: 44px;
12
- min-height: 44px;
13
- right: calc(100% + 18px);
14
- top: calc(50% - 48px);
15
- margin: 0 !important;
16
- padding: 0 !important;
17
- border: 0 !important;
18
- border-radius: 50%;
19
- background: none !important;
20
- box-shadow: none !important;
21
- color: inherit;
22
- cursor: pointer;
23
- touch-action: manipulation;
24
- user-select: none;
25
- -webkit-tap-highlight-color: transparent;
26
- /* Flight owns this transform. A CSS transition would replay cancelled
27
- WAAPI transforms and corrupt the next target measurement. */
28
- transition: none;
29
- z-index: 3;
30
- }
31
- #root [data-composer-card] > button.xiaohei-bloub:focus-visible {
32
- outline: 2px solid var(--dsw-alias-label-secondary);
33
- outline-offset: -7px;
34
- }
35
- #root [data-composer-card] > button.xiaohei-bloub > .xiaohei-bloub-drift {
36
- display: block;
37
- width: 100%; height: 100%;
38
- pointer-events: none;
39
- --heixiu-drift-x: 7px;
40
- --heixiu-drift-y: 10px;
41
- animation: xiaohei-bloub-float 14s cubic-bezier(.45,0,.55,1) infinite;
42
- animation-play-state: paused;
43
- }
44
- #root [data-composer-card] > button.xiaohei-bloub[data-floating='true'] > .xiaohei-bloub-drift {
45
- animation-play-state: running;
46
- }
47
- @keyframes xiaohei-bloub-float {
48
- 0%, 100% { transform: translate(calc(-1 * var(--heixiu-drift-x)), var(--heixiu-drift-y)); }
49
- 50% { transform: translate(var(--heixiu-drift-x), calc(-1 * var(--heixiu-drift-y))); }
50
- }
51
- #root [data-composer-card] > button.xiaohei-bloub > .xiaohei-bloub-drift > svg {
52
- display: block;
53
- width: 100%; height: 100%;
54
- overflow: hidden;
55
- pointer-events: none;
56
- transform: translate(var(--heixiu-follow-x, 0px), var(--heixiu-follow-y, 0px));
57
- transition: transform 480ms cubic-bezier(.2,.75,.25,1);
58
- }
59
- #root [data-composer-card] > button.xiaohei-bloub:active > .xiaohei-bloub-drift > svg {
60
- transform: translate(var(--heixiu-follow-x, 0px), var(--heixiu-follow-y, 0px)) scale(.98);
61
- }
62
- #root [data-composer-card][data-heixiu-dock='compact'] {
63
- padding-inline-start: 64px !important;
64
- }
65
- #root [data-composer-card][data-heixiu-dock='compact'] > button.xiaohei-bloub {
66
- width: 52px; height: 52px;
67
- right: auto; left: 4px; top: 6px;
68
- }
69
- #root [data-composer-card][data-heixiu-dock='compact'] .xiaohei-bloub-drift {
70
- --heixiu-drift-x: 2px;
71
- --heixiu-drift-y: 3px;
72
- }
73
- #root [data-composer-card][data-heixiu-dock='welcome'] > button.xiaohei-bloub {
74
- right: auto;
75
- left: var(--heixiu-welcome-left);
76
- top: var(--heixiu-welcome-top);
77
- width: var(--heixiu-welcome-size);
78
- height: var(--heixiu-welcome-size);
79
- }
80
- @media (max-width: 760px) {
81
- #root [data-heixiu-hero-row] { box-sizing: border-box; padding-inline-start: 64px; max-width: 100%; }
82
- #root [data-composer-card][data-heixiu-dock='welcome'] .xiaohei-bloub-drift {
83
- --heixiu-drift-x: 2px;
84
- --heixiu-drift-y: 4px;
85
- }
86
- }
87
- #root [data-composer-card] > button.xiaohei-bloub[hidden] { display: none; }
88
- @media (prefers-reduced-motion: reduce) {
89
- #root [data-composer-card] > button.xiaohei-bloub { transition: none; transform: none; }
90
- #root [data-composer-card] > button.xiaohei-bloub > .xiaohei-bloub-drift { animation: none; transform: none; }
91
- #root [data-composer-card] > button.xiaohei-bloub > .xiaohei-bloub-drift > svg { transition: none; transform: none; }
92
- }
93
- @media print {
94
- #root [data-composer-card] > button.xiaohei-bloub { display: none; }
95
- #root [data-composer-card][data-heixiu-dock='compact'] { padding-inline-start: 12px !important; }
96
- }
97
- `;
98
- //# sourceMappingURL=styles.js.map
@@ -1,10 +0,0 @@
1
- export declare const XIAOHEI_BOOT_APPEARANCE_ATTRIBUTE = "data-xiaohei-boot-appearance";
2
- export declare const XIAOHEI_BOOT_APPEARANCE_STYLE_ID = "dsh-theme-xiaohei/boot-appearance-style";
3
- /**
4
- * Keep the document on the resolved DSH palette until the complete Xiaohei
5
- * theme has synchronously taken ownership of the page.
6
- */
7
- export declare const XIAOHEI_BOOT_APPEARANCE_CSS = "\nhtml:not([data-xiaohei-boot-appearance]) body:not([data-ds-dark-theme]),\nhtml:not([data-xiaohei-boot-appearance]) body:not([data-ds-dark-theme]) > #root {\n color: #364044;\n background-color: #E7ECEC !important;\n}\n\nhtml:not([data-xiaohei-boot-appearance]) body[data-ds-dark-theme],\nhtml:not([data-xiaohei-boot-appearance]) body[data-ds-dark-theme] > #root {\n color: #D5DEDC;\n background-color: #151C1E !important;\n}\n\nhtml[data-xiaohei-boot-appearance='light'] {\n color-scheme: light !important;\n background-color: #E7ECEC !important;\n}\n\nhtml[data-xiaohei-boot-appearance='light'] body,\nhtml[data-xiaohei-boot-appearance='light'] body > #root {\n color: #364044;\n background-color: #E7ECEC !important;\n}\n\nhtml[data-xiaohei-boot-appearance='dark'] {\n color-scheme: dark !important;\n background-color: #151C1E !important;\n}\n\nhtml[data-xiaohei-boot-appearance='dark'] body,\nhtml[data-xiaohei-boot-appearance='dark'] body > #root {\n color: #D5DEDC;\n background-color: #151C1E !important;\n}\n";
8
- /** Release the first-frame palette only after ThemeRuntime is authoritative. */
9
- export declare function releaseXiaoheiBootAppearance(doc: Document): void;
10
- //# sourceMappingURL=boot-appearance.d.ts.map
@@ -1,47 +0,0 @@
1
- export const XIAOHEI_BOOT_APPEARANCE_ATTRIBUTE = 'data-xiaohei-boot-appearance';
2
- export const XIAOHEI_BOOT_APPEARANCE_STYLE_ID = 'dsh-theme-xiaohei/boot-appearance-style';
3
- /**
4
- * Keep the document on the resolved DSH palette until the complete Xiaohei
5
- * theme has synchronously taken ownership of the page.
6
- */
7
- export const XIAOHEI_BOOT_APPEARANCE_CSS = `
8
- html:not([data-xiaohei-boot-appearance]) body:not([data-ds-dark-theme]),
9
- html:not([data-xiaohei-boot-appearance]) body:not([data-ds-dark-theme]) > #root {
10
- color: #364044;
11
- background-color: #E7ECEC !important;
12
- }
13
-
14
- html:not([data-xiaohei-boot-appearance]) body[data-ds-dark-theme],
15
- html:not([data-xiaohei-boot-appearance]) body[data-ds-dark-theme] > #root {
16
- color: #D5DEDC;
17
- background-color: #151C1E !important;
18
- }
19
-
20
- html[data-xiaohei-boot-appearance='light'] {
21
- color-scheme: light !important;
22
- background-color: #E7ECEC !important;
23
- }
24
-
25
- html[data-xiaohei-boot-appearance='light'] body,
26
- html[data-xiaohei-boot-appearance='light'] body > #root {
27
- color: #364044;
28
- background-color: #E7ECEC !important;
29
- }
30
-
31
- html[data-xiaohei-boot-appearance='dark'] {
32
- color-scheme: dark !important;
33
- background-color: #151C1E !important;
34
- }
35
-
36
- html[data-xiaohei-boot-appearance='dark'] body,
37
- html[data-xiaohei-boot-appearance='dark'] body > #root {
38
- color: #D5DEDC;
39
- background-color: #151C1E !important;
40
- }
41
- `;
42
- /** Release the first-frame palette only after ThemeRuntime is authoritative. */
43
- export function releaseXiaoheiBootAppearance(doc) {
44
- doc.documentElement.removeAttribute(XIAOHEI_BOOT_APPEARANCE_ATTRIBUTE);
45
- doc.getElementById(XIAOHEI_BOOT_APPEARANCE_STYLE_ID)?.remove();
46
- }
47
- //# sourceMappingURL=boot-appearance.js.map
@@ -1,5 +0,0 @@
1
- export declare const XIAOHEI_BOOT_LOADER_SCRIPT_ID = "dsh-theme-xiaohei/boot-loader-script";
2
- export declare const XIAOHEI_BOOT_LOADER_MARKER = "data-xiaohei-boot-loader";
3
- /** Inject the bootstrap immediately after body opens, before DSH's module script. */
4
- export declare function injectXiaoheiBootLoader(html: string): string;
5
- //# sourceMappingURL=boot-loader.d.ts.map
@@ -1,158 +0,0 @@
1
- import { XIAOHEI_LOADING_HEIXIU_BLINK, XIAOHEI_LOADING_HEIXIU_OPEN, } from './generated-loading-assets.js';
2
- import { XIAOHEI_PLUGIN_LOADING_CSS } from './loading-heixiu.js';
3
- import { XIAOHEI_BOOT_APPEARANCE_ATTRIBUTE, XIAOHEI_BOOT_APPEARANCE_CSS, XIAOHEI_BOOT_APPEARANCE_STYLE_ID, } from './boot-appearance.js';
4
- export const XIAOHEI_BOOT_LOADER_SCRIPT_ID = 'dsh-theme-xiaohei/boot-loader-script';
5
- export const XIAOHEI_BOOT_LOADER_MARKER = 'data-xiaohei-boot-loader';
6
- /** Inject the bootstrap immediately after body opens, before DSH's module script. */
7
- export function injectXiaoheiBootLoader(html) {
8
- if (html.includes(`id="${XIAOHEI_BOOT_LOADER_SCRIPT_ID}"`))
9
- return html;
10
- const config = {
11
- appearanceAttribute: XIAOHEI_BOOT_APPEARANCE_ATTRIBUTE,
12
- css: XIAOHEI_PLUGIN_LOADING_CSS,
13
- openImage: XIAOHEI_LOADING_HEIXIU_OPEN,
14
- blinkImage: XIAOHEI_LOADING_HEIXIU_BLINK,
15
- scriptId: XIAOHEI_BOOT_LOADER_SCRIPT_ID,
16
- };
17
- const payload = escapeInlineScriptJson(config);
18
- const script = `<script id="${XIAOHEI_BOOT_LOADER_SCRIPT_ID}">(${runXiaoheiBootLoader.toString()})(${payload});</script>`;
19
- const withAppearance = injectBootAppearanceStyle(html);
20
- const body = /<body(?:\s[^>]*)?>/i.exec(withAppearance);
21
- if (body === null)
22
- return `${withAppearance}${script}`;
23
- const insertionPoint = resolveBootLoaderInsertionPoint(withAppearance, body.index + body[0].length);
24
- return `${withAppearance.slice(0, insertionPoint)}${script}${withAppearance.slice(insertionPoint)}`;
25
- }
26
- /** Install the critical palette before the parser reaches the body. */
27
- function injectBootAppearanceStyle(html) {
28
- const style = `<style id="${XIAOHEI_BOOT_APPEARANCE_STYLE_ID}">${XIAOHEI_BOOT_APPEARANCE_CSS}</style>`;
29
- const headEnd = /<\/head\s*>/i.exec(html);
30
- if (headEnd !== null) {
31
- return `${html.slice(0, headEnd.index)}${style}${html.slice(headEnd.index)}`;
32
- }
33
- return `${style}${html}`;
34
- }
35
- /** Start after DSH has synchronously resolved its persisted theme preference. */
36
- function resolveBootLoaderInsertionPoint(html, bodyStart) {
37
- const themeMutation = html.indexOf('document.body.toggleAttribute', bodyStart);
38
- const themeMarker = themeMutation < 0
39
- ? -1
40
- : html.indexOf('data-ds-dark-theme', themeMutation);
41
- if (themeMarker < 0)
42
- return bodyStart;
43
- const themeScriptEnd = html.indexOf('</script>', themeMarker);
44
- return themeScriptEnd < 0 ? bodyStart : themeScriptEnd + '</script>'.length;
45
- }
46
- function escapeInlineScriptJson(value) {
47
- return JSON.stringify(value)
48
- .replaceAll('<', '\\u003c')
49
- .replaceAll('\u2028', '\\u2028')
50
- .replaceAll('\u2029', '\\u2029');
51
- }
52
- /** Self-contained browser bootstrap serialized into index.html by the Host. */
53
- function runXiaoheiBootLoader(config) {
54
- const root = document.documentElement;
55
- if (root.getAttribute('data-xiaohei-boot-loader') === 'host')
56
- return;
57
- root.setAttribute('data-xiaohei-boot-loader', 'host');
58
- const syncAppearance = () => {
59
- const dark = root.style.colorScheme === 'dark'
60
- || document.body.hasAttribute('data-ds-dark-theme');
61
- root.setAttribute(config.appearanceAttribute, dark ? 'dark' : 'light');
62
- };
63
- syncAppearance();
64
- const style = document.createElement('style');
65
- style.id = `${config.scriptId}/style`;
66
- style.textContent = config.css;
67
- document.head.append(style);
68
- let decoratedCard;
69
- let loadingSeen = false;
70
- let disposed = false;
71
- const isLoadingHint = (value) => {
72
- const normalized = value?.trim() ?? '';
73
- return normalized === 'Loading plugins...' || normalized === 'Loading plugins…';
74
- };
75
- const findHint = () => {
76
- for (const element of document.querySelectorAll('div')) {
77
- if (element.children.length === 0 && isLoadingHint(element.textContent))
78
- return element;
79
- }
80
- return undefined;
81
- };
82
- const createImage = (source, className) => {
83
- const image = document.createElement('img');
84
- image.className = className;
85
- image.alt = '';
86
- image.decoding = 'async';
87
- image.src = source;
88
- return image;
89
- };
90
- const createTrack = () => {
91
- const track = document.createElement('div');
92
- track.className = 'xiaohei-plugin-loader__track';
93
- track.setAttribute('aria-hidden', 'true');
94
- for (let index = 0; index < 4; index += 1) {
95
- const runner = document.createElement('span');
96
- runner.className = 'xiaohei-plugin-loader__runner';
97
- runner.style.setProperty('--xiaohei-loader-index', String(index));
98
- runner.style.setProperty('--xiaohei-loader-delay', `${index * -700}ms`);
99
- const sprite = document.createElement('span');
100
- sprite.className = 'xiaohei-plugin-loader__sprite';
101
- sprite.append(createImage(config.openImage, 'xiaohei-plugin-loader__runner-open'), createImage(config.blinkImage, 'xiaohei-plugin-loader__runner-blink'));
102
- runner.append(sprite);
103
- track.append(runner);
104
- }
105
- return track;
106
- };
107
- const clearCard = () => {
108
- if (decoratedCard === undefined)
109
- return;
110
- decoratedCard.removeAttribute('data-xiaohei-plugin-loading');
111
- decoratedCard.querySelector('.xiaohei-plugin-loader__track')?.remove();
112
- decoratedCard = undefined;
113
- };
114
- let observer;
115
- const dispose = () => {
116
- if (disposed)
117
- return;
118
- disposed = true;
119
- observer.disconnect();
120
- clearCard();
121
- style.remove();
122
- };
123
- const sync = () => {
124
- if (disposed)
125
- return;
126
- const hint = findHint();
127
- if (hint === undefined || hint.parentElement === null) {
128
- if (loadingSeen)
129
- dispose();
130
- return;
131
- }
132
- loadingSeen = true;
133
- const card = hint.parentElement;
134
- if (card === decoratedCard && card.querySelector('.xiaohei-plugin-loader__track') !== null)
135
- return;
136
- clearCard();
137
- decoratedCard = card;
138
- const spinner = card.querySelector(":scope > [class*='_spinner_']");
139
- if (spinner === null)
140
- return;
141
- card.setAttribute('data-xiaohei-plugin-loading', 'true');
142
- spinner.append(createTrack());
143
- };
144
- let syncQueued = false;
145
- const queueSync = () => {
146
- if (syncQueued || disposed)
147
- return;
148
- syncQueued = true;
149
- queueMicrotask(() => {
150
- syncQueued = false;
151
- sync();
152
- });
153
- };
154
- observer = new MutationObserver(queueSync);
155
- observer.observe(document, { childList: true, subtree: true });
156
- sync();
157
- }
158
- //# sourceMappingURL=boot-loader.js.map
@@ -1,3 +0,0 @@
1
- /** Reduced-motion, reduced-transparency, unsupported-browser, and forced-color fallbacks. */
2
- export declare const XIAOHEI_CHROME_ACCESSIBILITY_CSS = "\n@media (prefers-reduced-motion: reduce) {\n #root [data-composer-card='true'],\n #root [data-composer-card='true']::after,\n #root [data-composer-card='true'] button::before,\n #root [data-composer-card='true'] button::after,\n #root [data-slot='conversation.composer'] button,\n #root [data-slot='sidebar'] button,\n #root [role='dialog']::before,\n #root [role='dialog']::after,\n #root [role='dialog'] button,\n #root [role='menu'] button,\n #root [role='listbox'] button {\n transition-duration: 0.01ms !important;\n animation: none !important;\n }\n}\n\n@media (prefers-reduced-transparency: reduce) {\n #root [data-composer-card='true'],\n #root [role='dialog'],\n #root [role='menu'],\n #root [role='listbox'] {\n background: var(--xiaohei-surface-raised) !important;\n -webkit-backdrop-filter: none !important;\n backdrop-filter: none !important;\n }\n\n #root [role='dialog']::before {\n -webkit-backdrop-filter: none !important;\n backdrop-filter: none !important;\n background: transparent !important;\n border: 1px solid var(--xiaohei-edge-strong);\n }\n}\n\n@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {\n #root [role='dialog'],\n #root [role='menu'],\n #root [role='listbox'] {\n background: var(--xiaohei-surface-raised) !important;\n }\n #root [role='dialog']::before {\n background: transparent;\n border: 1px solid var(--xiaohei-edge-strong);\n }\n}\n\n@media (forced-colors: active) {\n #root [data-composer-card='true'],\n #root [role='dialog'],\n #root [role='menu'],\n #root [role='listbox'] {\n border: 1px solid CanvasText !important;\n background: Canvas !important;\n box-shadow: none !important;\n }\n\n #root [data-composer-card='true']::after,\n #root [role='dialog']::before,\n #root [role='dialog']::after,\n #root [data-composer-card='true'] button::before,\n #root [data-composer-card='true'] button::after {\n display: none;\n }\n}\n";
3
- //# sourceMappingURL=accessibility.d.ts.map
@@ -1,69 +0,0 @@
1
- /** Reduced-motion, reduced-transparency, unsupported-browser, and forced-color fallbacks. */
2
- export const XIAOHEI_CHROME_ACCESSIBILITY_CSS = `
3
- @media (prefers-reduced-motion: reduce) {
4
- #root [data-composer-card='true'],
5
- #root [data-composer-card='true']::after,
6
- #root [data-composer-card='true'] button::before,
7
- #root [data-composer-card='true'] button::after,
8
- #root [data-slot='conversation.composer'] button,
9
- #root [data-slot='sidebar'] button,
10
- #root [role='dialog']::before,
11
- #root [role='dialog']::after,
12
- #root [role='dialog'] button,
13
- #root [role='menu'] button,
14
- #root [role='listbox'] button {
15
- transition-duration: 0.01ms !important;
16
- animation: none !important;
17
- }
18
- }
19
-
20
- @media (prefers-reduced-transparency: reduce) {
21
- #root [data-composer-card='true'],
22
- #root [role='dialog'],
23
- #root [role='menu'],
24
- #root [role='listbox'] {
25
- background: var(--xiaohei-surface-raised) !important;
26
- -webkit-backdrop-filter: none !important;
27
- backdrop-filter: none !important;
28
- }
29
-
30
- #root [role='dialog']::before {
31
- -webkit-backdrop-filter: none !important;
32
- backdrop-filter: none !important;
33
- background: transparent !important;
34
- border: 1px solid var(--xiaohei-edge-strong);
35
- }
36
- }
37
-
38
- @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
39
- #root [role='dialog'],
40
- #root [role='menu'],
41
- #root [role='listbox'] {
42
- background: var(--xiaohei-surface-raised) !important;
43
- }
44
- #root [role='dialog']::before {
45
- background: transparent;
46
- border: 1px solid var(--xiaohei-edge-strong);
47
- }
48
- }
49
-
50
- @media (forced-colors: active) {
51
- #root [data-composer-card='true'],
52
- #root [role='dialog'],
53
- #root [role='menu'],
54
- #root [role='listbox'] {
55
- border: 1px solid CanvasText !important;
56
- background: Canvas !important;
57
- box-shadow: none !important;
58
- }
59
-
60
- #root [data-composer-card='true']::after,
61
- #root [role='dialog']::before,
62
- #root [role='dialog']::after,
63
- #root [data-composer-card='true'] button::before,
64
- #root [data-composer-card='true'] button::after {
65
- display: none;
66
- }
67
- }
68
- `;
69
- //# sourceMappingURL=accessibility.js.map
@@ -1,3 +0,0 @@
1
- /** Atomic blink rendering: one state hides live eyes and reveals the complete closed frame. */
2
- export declare const XIAOHEI_BLINK_CSS = "\n.xiaohei-scene__mascot-blink {\n animation: none;\n}\n\n.xiaohei-scene__mascot[data-xiaohei-blink='closed'] .xiaohei-scene__mascot-blink {\n opacity: 1;\n}\n\n.xiaohei-scene__mascot[data-xiaohei-blink='closed'] .xiaohei-gaze__eye {\n visibility: hidden;\n}\n";
3
- //# sourceMappingURL=blink.d.ts.map
@@ -1,15 +0,0 @@
1
- /** Atomic blink rendering: one state hides live eyes and reveals the complete closed frame. */
2
- export const XIAOHEI_BLINK_CSS = `
3
- .xiaohei-scene__mascot-blink {
4
- animation: none;
5
- }
6
-
7
- .xiaohei-scene__mascot[data-xiaohei-blink='closed'] .xiaohei-scene__mascot-blink {
8
- opacity: 1;
9
- }
10
-
11
- .xiaohei-scene__mascot[data-xiaohei-blink='closed'] .xiaohei-gaze__eye {
12
- visibility: hidden;
13
- }
14
- `;
15
- //# sourceMappingURL=blink.js.map
@@ -1,10 +0,0 @@
1
- /**
2
- * Layered break-frame portrait.
3
- *
4
- * The character is rendered from authored raster poses. Only the body layer is
5
- * clipped by the doorway. Hair, ears and action hands are repeated through
6
- * dedicated masks above the front rim. Keeping one renderer and one state
7
- * machine avoids the pose jumps caused by handing off between DOM and WebGL.
8
- */
9
- export declare const XIAOHEI_COMPOSER_AVATAR_CSS: string;
10
- //# sourceMappingURL=composer-avatar.d.ts.map