@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.
- package/README.md +39 -17
- package/THIRD_PARTY_NOTICES.md +41 -0
- package/lib/appearance.js +26 -10
- package/lib/blink.js +3 -3
- package/lib/bloub-heixiu/ambient.d.ts +3 -0
- package/lib/bloub-heixiu/ambient.js +12 -0
- package/lib/bloub-heixiu/character.d.ts +33 -0
- package/lib/bloub-heixiu/character.js +124 -0
- package/lib/bloub-heixiu/effects.d.ts +4 -0
- package/lib/bloub-heixiu/effects.js +91 -0
- package/lib/bloub-heixiu/flight.d.ts +15 -0
- package/lib/bloub-heixiu/flight.js +66 -0
- package/lib/bloub-heixiu/follow.d.ts +13 -0
- package/lib/bloub-heixiu/follow.js +23 -0
- package/lib/bloub-heixiu/layout.d.ts +18 -0
- package/lib/bloub-heixiu/layout.js +12 -0
- package/lib/bloub-heixiu/renderer.d.ts +16 -0
- package/lib/bloub-heixiu/renderer.js +94 -0
- package/lib/bloub-heixiu/runtime.d.ts +6 -0
- package/lib/bloub-heixiu/runtime.js +395 -0
- package/lib/bloub-heixiu/signals.d.ts +17 -0
- package/lib/bloub-heixiu/signals.js +53 -0
- package/lib/bloub-heixiu/styles.d.ts +2 -0
- package/lib/bloub-heixiu/styles.js +98 -0
- package/lib/chrome/accessibility.d.ts +1 -1
- package/lib/chrome/accessibility.js +5 -13
- package/lib/chrome/composer-avatar.d.ts +10 -0
- package/lib/chrome/composer-avatar.js +599 -0
- package/lib/chrome/composer-send-heixiu.d.ts +3 -0
- package/lib/chrome/composer-send-heixiu.js +143 -0
- package/lib/chrome/composer.d.ts +2 -2
- package/lib/chrome/composer.js +84 -95
- package/lib/chrome/controls.d.ts +8 -0
- package/lib/chrome/controls.js +348 -0
- package/lib/chrome/conversation-messages.d.ts +1 -1
- package/lib/chrome/conversation-messages.js +207 -9
- package/lib/chrome/conversation.d.ts +1 -1
- package/lib/chrome/conversation.js +6 -0
- package/lib/chrome/identity.js +4 -18
- package/lib/chrome/portal.d.ts +1 -1
- package/lib/chrome/portal.js +1 -1
- package/lib/chrome/sidebar.d.ts +1 -1
- package/lib/chrome/sidebar.js +134 -153
- package/lib/chrome/tokens.d.ts +1 -1
- package/lib/chrome/tokens.js +121 -68
- package/lib/chrome/workspace.d.ts +2 -2
- package/lib/chrome/workspace.js +35 -254
- package/lib/chrome.js +4 -0
- package/lib/client.d.ts +5 -12
- package/lib/client.js +6262 -4455
- package/lib/composer-avatar.d.ts +18 -0
- package/lib/composer-avatar.js +441 -0
- package/lib/composer-send-heixiu.d.ts +8 -0
- package/lib/composer-send-heixiu.js +133 -0
- package/lib/gaze.js +3 -3
- package/lib/generated-backgrounds.d.ts +14 -0
- package/lib/generated-backgrounds.js +14 -0
- package/lib/generated-character-motion.d.ts +4 -0
- package/lib/generated-character-motion.js +2 -0
- package/lib/generated-identity.d.ts +1 -0
- package/lib/generated-identity.js +1 -0
- package/lib/generated-keyart.d.ts +18 -3
- package/lib/generated-keyart.js +18 -3
- package/lib/host-contract.d.ts +9 -0
- package/lib/host-contract.js +13 -0
- package/lib/host-dom.d.ts +11 -0
- package/lib/host-dom.js +60 -0
- package/lib/loading-heixiu.js +3 -3
- package/lib/metallic-brand-mark.d.ts +10 -0
- package/lib/metallic-brand-mark.js +323 -0
- package/lib/plugin.d.ts +1 -1
- package/lib/plugin.js +31 -16
- package/lib/portal.js +11 -10
- package/lib/reactions.js +3 -3
- package/lib/scene/avatar-model.d.ts +6 -0
- package/lib/scene/avatar-model.js +646 -0
- package/lib/scene/avatar-motion.d.ts +3 -0
- package/lib/scene/avatar-motion.js +799 -0
- package/lib/scene/character-idle.d.ts +17 -0
- package/lib/scene/character-idle.js +65 -0
- package/lib/scene/character-layout.d.ts +24 -0
- package/lib/scene/character-layout.js +51 -0
- package/lib/scene/character-motion-clock.d.ts +18 -0
- package/lib/scene/character-motion-clock.js +57 -0
- package/lib/scene/character-motion-types.d.ts +12 -0
- package/lib/scene/character-motion-types.js +2 -0
- package/lib/scene/character-motion.d.ts +6 -0
- package/lib/scene/character-motion.js +126 -0
- package/lib/scene/character-poses.d.ts +26 -0
- package/lib/scene/character-poses.js +11 -0
- package/lib/scene/character-rig-renderer.d.ts +4 -0
- package/lib/scene/character-rig-renderer.js +85 -0
- package/lib/scene/character-rig.d.ts +20 -0
- package/lib/scene/character-rig.js +53 -0
- package/lib/scene/heixiu-feedback.d.ts +1 -1
- package/lib/scene/heixiu-feedback.js +0 -17
- package/lib/scene/pointer-bridge.d.ts +21 -0
- package/lib/scene/pointer-bridge.js +155 -0
- package/lib/scene/runtime.d.ts +12 -0
- package/lib/scene/runtime.js +87 -0
- package/lib/scene/styles.d.ts +7 -0
- package/lib/scene/styles.js +75 -0
- package/lib/scene/sylva-performance.d.ts +11 -0
- package/lib/scene/sylva-performance.js +58 -0
- package/lib/scene/wallpaper-character-styles.d.ts +3 -0
- package/lib/scene/wallpaper-character-styles.js +53 -0
- package/lib/scene/wallpaper-character.d.ts +4 -0
- package/lib/scene/wallpaper-character.js +213 -0
- package/lib/scene.d.ts +7 -13
- package/lib/scene.js +7 -1023
- package/lib/sidebar-glass.js +99 -36
- package/lib/sidebar-heixiu-roaming.js +5 -5
- package/lib/sidebar-reveal.d.ts +8 -0
- package/lib/sidebar-reveal.js +51 -0
- package/lib/state.d.ts +14 -2
- package/lib/state.js +12 -4
- package/lib/theme.js +2 -2
- package/lib/vendor/bloub/decor.d.ts +114 -0
- package/lib/vendor/bloub/decor.js +198 -0
- package/lib/vendor/bloub/engine.d.ts +213 -0
- package/lib/vendor/bloub/engine.js +452 -0
- package/lib/vendor/bloub/expressions.d.ts +35 -0
- package/lib/vendor/bloub/expressions.js +143 -0
- package/lib/vendor/bloub/eyefit.d.ts +75 -0
- package/lib/vendor/bloub/eyefit.js +393 -0
- package/lib/vendor/bloub/face.d.ts +63 -0
- package/lib/vendor/bloub/face.js +106 -0
- package/lib/vendor/bloub/math.d.ts +22 -0
- package/lib/vendor/bloub/math.js +36 -0
- package/lib/vendor/bloub/profiles.d.ts +8 -0
- package/lib/vendor/bloub/profiles.js +20 -0
- package/lib/vendor/bloub/repere.d.ts +30 -0
- package/lib/vendor/bloub/repere.js +32 -0
- package/lib/vendor/bloub/shape.d.ts +80 -0
- package/lib/vendor/bloub/shape.js +268 -0
- package/lib/vendor/bloub/skins.d.ts +36 -0
- package/lib/vendor/bloub/skins.js +74 -0
- package/lib/vendor/bloub/states.d.ts +87 -0
- package/lib/vendor/bloub/states.js +468 -0
- package/package.json +23 -6
- package/lib/appearance.d.ts.map +0 -1
- package/lib/appearance.js.map +0 -1
- package/lib/blink.d.ts.map +0 -1
- package/lib/blink.js.map +0 -1
- package/lib/boot-appearance.d.ts.map +0 -1
- package/lib/boot-appearance.js.map +0 -1
- package/lib/boot-loader.d.ts.map +0 -1
- package/lib/boot-loader.js.map +0 -1
- package/lib/chrome/accessibility.d.ts.map +0 -1
- package/lib/chrome/accessibility.js.map +0 -1
- package/lib/chrome/blink.d.ts.map +0 -1
- package/lib/chrome/blink.js.map +0 -1
- package/lib/chrome/composer.d.ts.map +0 -1
- package/lib/chrome/composer.js.map +0 -1
- package/lib/chrome/conversation-messages.d.ts.map +0 -1
- package/lib/chrome/conversation-messages.js.map +0 -1
- package/lib/chrome/conversation.d.ts.map +0 -1
- package/lib/chrome/conversation.js.map +0 -1
- package/lib/chrome/frames.d.ts.map +0 -1
- package/lib/chrome/frames.js.map +0 -1
- package/lib/chrome/gaze.d.ts.map +0 -1
- package/lib/chrome/gaze.js.map +0 -1
- package/lib/chrome/identity.d.ts.map +0 -1
- package/lib/chrome/identity.js.map +0 -1
- package/lib/chrome/overlays.d.ts.map +0 -1
- package/lib/chrome/overlays.js.map +0 -1
- package/lib/chrome/portal.d.ts.map +0 -1
- package/lib/chrome/portal.js.map +0 -1
- package/lib/chrome/reactions.d.ts.map +0 -1
- package/lib/chrome/reactions.js.map +0 -1
- package/lib/chrome/sidebar.d.ts.map +0 -1
- package/lib/chrome/sidebar.js.map +0 -1
- package/lib/chrome/tokens.d.ts.map +0 -1
- package/lib/chrome/tokens.js.map +0 -1
- package/lib/chrome/workspace.d.ts.map +0 -1
- package/lib/chrome/workspace.js.map +0 -1
- package/lib/chrome.d.ts.map +0 -1
- package/lib/chrome.js.map +0 -1
- package/lib/client.d.ts.map +0 -1
- package/lib/client.js.map +0 -7
- package/lib/gaze.d.ts.map +0 -1
- package/lib/gaze.js.map +0 -1
- package/lib/generated-identity.d.ts.map +0 -1
- package/lib/generated-identity.js.map +0 -1
- package/lib/generated-keyart.d.ts.map +0 -1
- package/lib/generated-keyart.js.map +0 -1
- package/lib/generated-loading-assets.d.ts.map +0 -1
- package/lib/generated-loading-assets.js.map +0 -1
- package/lib/generated-sidebar-assets.d.ts +0 -4
- package/lib/generated-sidebar-assets.d.ts.map +0 -1
- package/lib/generated-sidebar-assets.js +0 -4
- package/lib/generated-sidebar-assets.js.map +0 -1
- package/lib/heixiu-interactions.d.ts.map +0 -1
- package/lib/heixiu-interactions.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/loading-heixiu.d.ts.map +0 -1
- package/lib/loading-heixiu.js.map +0 -1
- package/lib/plugin.d.ts.map +0 -1
- package/lib/plugin.js.map +0 -1
- package/lib/portal.d.ts.map +0 -1
- package/lib/portal.js.map +0 -1
- package/lib/reactions.d.ts.map +0 -1
- package/lib/reactions.js.map +0 -1
- package/lib/scene/heixiu-feedback.d.ts.map +0 -1
- package/lib/scene/heixiu-feedback.js.map +0 -1
- package/lib/scene/heixiu-interactions.d.ts.map +0 -1
- package/lib/scene/heixiu-interactions.js.map +0 -1
- package/lib/scene/state-transitions.d.ts.map +0 -1
- package/lib/scene/state-transitions.js.map +0 -1
- package/lib/scene.d.ts.map +0 -1
- package/lib/scene.js.map +0 -1
- package/lib/sidebar-glass.d.ts.map +0 -1
- package/lib/sidebar-glass.js.map +0 -1
- package/lib/sidebar-heixiu-escape.d.ts.map +0 -1
- package/lib/sidebar-heixiu-escape.js.map +0 -1
- package/lib/sidebar-heixiu-roaming.d.ts.map +0 -1
- package/lib/sidebar-heixiu-roaming.js.map +0 -1
- package/lib/state.d.ts.map +0 -1
- package/lib/state.js.map +0 -1
- package/lib/theme.d.ts.map +0 -1
- package/lib/theme.js.map +0 -1
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/** Heixiu is the Host send button, not a neighbouring ornament. */
|
|
2
|
+
export const XIAOHEI_COMPOSER_SEND_HEIXIU_CSS = `
|
|
3
|
+
/* Official InputBar contract: row -> trailing controls -> last primary action. */
|
|
4
|
+
#root [data-composer-card='true'] > :last-child > :last-child > button:last-child {
|
|
5
|
+
position: relative;
|
|
6
|
+
isolation: isolate;
|
|
7
|
+
width: 38px;
|
|
8
|
+
height: 38px;
|
|
9
|
+
min-width: 38px;
|
|
10
|
+
min-height: 38px;
|
|
11
|
+
border: 1px solid var(--xiaohei-composer-control-edge) !important;
|
|
12
|
+
border-radius: 50% !important;
|
|
13
|
+
color: var(--xiaohei-composer-primary-icon) !important;
|
|
14
|
+
background: var(--xiaohei-composer-disabled) !important;
|
|
15
|
+
box-shadow: inset 0 1px 0 var(--xiaohei-composer-highlight) !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
#root [data-composer-card='true'] > :last-child > :last-child > button:last-child[data-xiaohei-send-heixiu='true'] {
|
|
19
|
+
overflow: visible;
|
|
20
|
+
padding: 0;
|
|
21
|
+
border-color: transparent !important;
|
|
22
|
+
background: transparent !important;
|
|
23
|
+
box-shadow: none !important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Preserve the native glyph in the DOM; only the visual presentation changes. */
|
|
27
|
+
#root [data-composer-card='true'] > :last-child > :last-child
|
|
28
|
+
> button[data-xiaohei-send-heixiu='true'] > svg {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.xiaohei-composer-send-heixiu {
|
|
33
|
+
position: absolute;
|
|
34
|
+
z-index: 1;
|
|
35
|
+
inset: 0;
|
|
36
|
+
overflow: visible;
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
opacity: 1;
|
|
39
|
+
transform: translateY(-1px) scale(1) translateZ(0);
|
|
40
|
+
transform-origin: 50% 58%;
|
|
41
|
+
transition:
|
|
42
|
+
opacity 160ms ease,
|
|
43
|
+
transform 180ms var(--xiaohei-motion-curve);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.xiaohei-composer-send-heixiu img {
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: 50%;
|
|
49
|
+
left: 50%;
|
|
50
|
+
display: block;
|
|
51
|
+
width: 60px;
|
|
52
|
+
height: 60px;
|
|
53
|
+
max-width: none;
|
|
54
|
+
user-select: none;
|
|
55
|
+
pointer-events: none;
|
|
56
|
+
object-fit: contain;
|
|
57
|
+
filter:
|
|
58
|
+
drop-shadow(0 0 1px var(--xiaohei-composer-heixiu-edge))
|
|
59
|
+
drop-shadow(0 3px 4px var(--xiaohei-composer-heixiu-shadow));
|
|
60
|
+
transform: translate(-50%, -45%) translateZ(0);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.xiaohei-composer-send-heixiu__open {
|
|
64
|
+
opacity: 1;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.xiaohei-composer-send-heixiu__blink {
|
|
68
|
+
opacity: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.xiaohei-composer-send-heixiu[data-xiaohei-blink='closed']
|
|
72
|
+
.xiaohei-composer-send-heixiu__open {
|
|
73
|
+
opacity: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.xiaohei-composer-send-heixiu[data-xiaohei-blink='closed']
|
|
77
|
+
.xiaohei-composer-send-heixiu__blink {
|
|
78
|
+
opacity: 1;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
#root [data-composer-card='true'] > :last-child > :last-child
|
|
82
|
+
> button[data-xiaohei-send-heixiu='true']:not(:disabled):hover {
|
|
83
|
+
border-color: transparent !important;
|
|
84
|
+
background: transparent !important;
|
|
85
|
+
box-shadow: none !important;
|
|
86
|
+
transform: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
#root [data-composer-card='true'] > :last-child > :last-child
|
|
90
|
+
> button[data-xiaohei-send-heixiu='true']:not(:disabled):hover
|
|
91
|
+
.xiaohei-composer-send-heixiu {
|
|
92
|
+
transform: translateY(-2px) scale(1.055) translateZ(0);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
#root [data-composer-card='true'] > :last-child > :last-child
|
|
96
|
+
> button[data-xiaohei-send-heixiu='true']:not(:disabled):active {
|
|
97
|
+
transform: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
#root [data-composer-card='true'] > :last-child > :last-child
|
|
101
|
+
> button[data-xiaohei-send-heixiu='true']:not(:disabled):active
|
|
102
|
+
.xiaohei-composer-send-heixiu {
|
|
103
|
+
transform: translateY(0) scale(.93) translateZ(0);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
#root [data-composer-card='true'] > :last-child > :last-child
|
|
107
|
+
> button[data-xiaohei-send-heixiu='true']:disabled {
|
|
108
|
+
border-color: transparent !important;
|
|
109
|
+
background: transparent !important;
|
|
110
|
+
box-shadow: none !important;
|
|
111
|
+
transform: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
#root [data-composer-card='true'] > :last-child > :last-child
|
|
115
|
+
> button[data-xiaohei-send-heixiu='true']:disabled
|
|
116
|
+
.xiaohei-composer-send-heixiu {
|
|
117
|
+
opacity: .42;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@media (prefers-reduced-motion: reduce) {
|
|
121
|
+
.xiaohei-composer-send-heixiu {
|
|
122
|
+
transition-duration: 0.01ms !important;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@media (forced-colors: active) {
|
|
127
|
+
#root [data-composer-card='true'] > :last-child > :last-child
|
|
128
|
+
> button[data-xiaohei-send-heixiu='true'] {
|
|
129
|
+
border: 1px solid ButtonText !important;
|
|
130
|
+
background: ButtonFace !important;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
#root [data-composer-card='true'] > :last-child > :last-child
|
|
134
|
+
> button[data-xiaohei-send-heixiu='true'] > svg {
|
|
135
|
+
opacity: 1;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.xiaohei-composer-send-heixiu {
|
|
139
|
+
display: none;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
`;
|
|
143
|
+
//# sourceMappingURL=composer-send-heixiu.js.map
|
package/lib/chrome/composer.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/** Conversation composer
|
|
2
|
-
export declare const XIAOHEI_COMPOSER_CSS = "\n#root [data-composer-card='true'] {\n position: relative;\n isolation: isolate;\n overflow: visible;\n border: 1px solid var(--xiaohei-
|
|
1
|
+
/** Conversation composer expressed as Xiaohei's quiet spatial workbench. */
|
|
2
|
+
export declare const XIAOHEI_COMPOSER_CSS = "\n#root [data-composer-card='true'] {\n position: relative;\n isolation: isolate;\n overflow: visible;\n gap: 10px;\n padding-top: 12px;\n border: 1px solid var(--xiaohei-composer-edge) !important;\n border-radius: 14px !important;\n background: var(--xiaohei-composer-fill) !important;\n -webkit-backdrop-filter:\n blur(var(--xiaohei-composer-blur))\n saturate(var(--xiaohei-composer-saturation));\n backdrop-filter:\n blur(var(--xiaohei-composer-blur))\n saturate(var(--xiaohei-composer-saturation));\n box-shadow:\n 0 10px 28px var(--xiaohei-composer-shadow),\n 0 2px 8px var(--xiaohei-shadow) !important;\n transition:\n border-color var(--xiaohei-motion-base) ease,\n box-shadow 260ms ease,\n background-color var(--xiaohei-motion-base) ease;\n}\n\n/* The lower contour behaves like Xiaohei's tail. Workspace-pick mode is\n excluded so the Host keeps ownership of its native dashed affordance. */\n#root [data-composer-card='true']:not(:has(textarea[aria-haspopup='menu']))::after {\n content: '';\n position: absolute;\n z-index: 2;\n right: 58px;\n bottom: -1px;\n left: 18px;\n height: 11px;\n border-bottom: 2px solid var(--xiaohei-composer-tail);\n border-radius: 0 0 76% 34%;\n pointer-events: none;\n opacity: 0.32;\n transform: scaleX(.48) translateZ(0);\n transform-origin: right center;\n -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);\n mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);\n transition:\n opacity 240ms ease,\n transform 360ms var(--xiaohei-motion-curve);\n}\n\n#root [data-composer-card='true']:not(:has(textarea[aria-haspopup='menu'])):focus-within::after {\n opacity: 0.74;\n transform: scaleX(1) translateZ(0);\n}\n\n#root [data-composer-card='true']:not(:has(textarea[aria-haspopup='menu'])):has(textarea:not(:placeholder-shown))::after {\n opacity: 0.88;\n transform: scaleX(.92) translateZ(0);\n}\n\n#root [data-composer-card='true'] textarea {\n -webkit-appearance: none;\n appearance: none;\n border: 0 !important;\n border-radius: 0 !important;\n color: var(--dsw-alias-label-primary) !important;\n background: transparent !important;\n caret-color: var(--xiaohei-spirit-strong);\n box-shadow: none !important;\n}\n\n#root [data-composer-card='true'] textarea:focus-visible {\n outline: none !important;\n box-shadow: none !important;\n}\n\n#root [data-composer-card='true'] textarea::placeholder {\n color: var(--dsw-alias-label-tertiary) !important;\n opacity: 0.84;\n}\n\n#root [data-composer-card='true'] [data-input-backdrop='true'] {\n border-color: transparent !important;\n background: transparent !important;\n}\n\n#root [data-composer-card='true'] button {\n min-width: 30px;\n min-height: 30px;\n border: 1px solid transparent;\n border-radius: 9px;\n transition:\n color var(--xiaohei-motion-fast) ease,\n background-color var(--xiaohei-motion-fast) ease,\n border-color var(--xiaohei-motion-fast) ease,\n box-shadow var(--xiaohei-motion-fast) ease,\n transform var(--xiaohei-motion-fast) var(--xiaohei-motion-curve);\n}\n\n#root [data-composer-card='true'] button:not(:disabled):hover {\n color: var(--dsw-alias-label-primary);\n border-color: var(--xiaohei-composer-control-edge);\n background: var(--xiaohei-composer-control-hover);\n box-shadow: inset 0 1px 0 var(--xiaohei-composer-highlight);\n}\n\n#root [data-composer-card='true'] button:not(:disabled):active {\n transform: translateY(1px) scale(.97);\n}\n\n@media (max-width: 700px) {\n #root [data-composer-card='true'] {\n border-radius: 12px !important;\n }\n\n #root [data-composer-card='true']:not(:has(textarea[aria-haspopup='menu']))::after {\n right: 54px;\n left: 14px;\n }\n}\n\n@media (prefers-reduced-transparency: reduce) {\n #root [data-composer-card='true'] {\n background: var(--xiaohei-composer-solid) !important;\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n }\n}\n\n@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {\n #root [data-composer-card='true'] {\n background: var(--xiaohei-composer-solid) !important;\n }\n}\n";
|
|
3
3
|
//# sourceMappingURL=composer.d.ts.map
|
package/lib/chrome/composer.js
CHANGED
|
@@ -1,47 +1,81 @@
|
|
|
1
|
-
/** Conversation composer
|
|
1
|
+
/** Conversation composer expressed as Xiaohei's quiet spatial workbench. */
|
|
2
2
|
export const XIAOHEI_COMPOSER_CSS = `
|
|
3
3
|
#root [data-composer-card='true'] {
|
|
4
4
|
position: relative;
|
|
5
5
|
isolation: isolate;
|
|
6
6
|
overflow: visible;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
var(--xiaohei-layer-content) !important;
|
|
7
|
+
gap: 10px;
|
|
8
|
+
padding-top: 12px;
|
|
9
|
+
border: 1px solid var(--xiaohei-composer-edge) !important;
|
|
10
|
+
border-radius: 14px !important;
|
|
11
|
+
background: var(--xiaohei-composer-fill) !important;
|
|
12
|
+
-webkit-backdrop-filter:
|
|
13
|
+
blur(var(--xiaohei-composer-blur))
|
|
14
|
+
saturate(var(--xiaohei-composer-saturation));
|
|
15
|
+
backdrop-filter:
|
|
16
|
+
blur(var(--xiaohei-composer-blur))
|
|
17
|
+
saturate(var(--xiaohei-composer-saturation));
|
|
19
18
|
box-shadow:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
inset 0 -1px var(--xiaohei-layer-panel-edge),
|
|
23
|
-
0 8px 22px var(--xiaohei-shadow) !important;
|
|
19
|
+
0 10px 28px var(--xiaohei-composer-shadow),
|
|
20
|
+
0 2px 8px var(--xiaohei-shadow) !important;
|
|
24
21
|
transition:
|
|
25
22
|
border-color var(--xiaohei-motion-base) ease,
|
|
26
|
-
box-shadow
|
|
23
|
+
box-shadow 260ms ease,
|
|
24
|
+
background-color var(--xiaohei-motion-base) ease;
|
|
27
25
|
}
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
/* The lower contour behaves like Xiaohei's tail. Workspace-pick mode is
|
|
28
|
+
excluded so the Host keeps ownership of its native dashed affordance. */
|
|
29
|
+
#root [data-composer-card='true']:not(:has(textarea[aria-haspopup='menu']))::after {
|
|
30
|
+
content: '';
|
|
31
|
+
position: absolute;
|
|
32
|
+
z-index: 2;
|
|
33
|
+
right: 58px;
|
|
34
|
+
bottom: -1px;
|
|
35
|
+
left: 18px;
|
|
36
|
+
height: 11px;
|
|
37
|
+
border-bottom: 2px solid var(--xiaohei-composer-tail);
|
|
38
|
+
border-radius: 0 0 76% 34%;
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
opacity: 0.32;
|
|
41
|
+
transform: scaleX(.48) translateZ(0);
|
|
42
|
+
transform-origin: right center;
|
|
43
|
+
-webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
|
|
44
|
+
mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
|
|
45
|
+
transition:
|
|
46
|
+
opacity 240ms ease,
|
|
47
|
+
transform 360ms var(--xiaohei-motion-curve);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
#root [data-composer-card='true']:not(:has(textarea[aria-haspopup='menu'])):focus-within::after {
|
|
51
|
+
opacity: 0.74;
|
|
52
|
+
transform: scaleX(1) translateZ(0);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
#root [data-composer-card='true']:not(:has(textarea[aria-haspopup='menu'])):has(textarea:not(:placeholder-shown))::after {
|
|
56
|
+
opacity: 0.88;
|
|
57
|
+
transform: scaleX(.92) translateZ(0);
|
|
35
58
|
}
|
|
36
59
|
|
|
37
60
|
#root [data-composer-card='true'] textarea {
|
|
61
|
+
-webkit-appearance: none;
|
|
62
|
+
appearance: none;
|
|
63
|
+
border: 0 !important;
|
|
64
|
+
border-radius: 0 !important;
|
|
38
65
|
color: var(--dsw-alias-label-primary) !important;
|
|
66
|
+
background: transparent !important;
|
|
39
67
|
caret-color: var(--xiaohei-spirit-strong);
|
|
68
|
+
box-shadow: none !important;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
#root [data-composer-card='true'] textarea:focus-visible {
|
|
72
|
+
outline: none !important;
|
|
73
|
+
box-shadow: none !important;
|
|
40
74
|
}
|
|
41
75
|
|
|
42
76
|
#root [data-composer-card='true'] textarea::placeholder {
|
|
43
77
|
color: var(--dsw-alias-label-tertiary) !important;
|
|
44
|
-
opacity: 0.
|
|
78
|
+
opacity: 0.84;
|
|
45
79
|
}
|
|
46
80
|
|
|
47
81
|
#root [data-composer-card='true'] [data-input-backdrop='true'] {
|
|
@@ -50,96 +84,51 @@ export const XIAOHEI_COMPOSER_CSS = `
|
|
|
50
84
|
}
|
|
51
85
|
|
|
52
86
|
#root [data-composer-card='true'] button {
|
|
53
|
-
min-width:
|
|
54
|
-
min-height:
|
|
87
|
+
min-width: 30px;
|
|
88
|
+
min-height: 30px;
|
|
55
89
|
border: 1px solid transparent;
|
|
56
|
-
border-radius:
|
|
90
|
+
border-radius: 9px;
|
|
57
91
|
transition:
|
|
58
92
|
color var(--xiaohei-motion-fast) ease,
|
|
59
93
|
background-color var(--xiaohei-motion-fast) ease,
|
|
60
94
|
border-color var(--xiaohei-motion-fast) ease,
|
|
95
|
+
box-shadow var(--xiaohei-motion-fast) ease,
|
|
61
96
|
transform var(--xiaohei-motion-fast) var(--xiaohei-motion-curve);
|
|
62
97
|
}
|
|
63
98
|
|
|
64
99
|
#root [data-composer-card='true'] button:not(:disabled):hover {
|
|
65
|
-
color: var(--
|
|
66
|
-
border-color: var(--xiaohei-edge);
|
|
67
|
-
background: var(--xiaohei-
|
|
100
|
+
color: var(--dsw-alias-label-primary);
|
|
101
|
+
border-color: var(--xiaohei-composer-control-edge);
|
|
102
|
+
background: var(--xiaohei-composer-control-hover);
|
|
103
|
+
box-shadow: inset 0 1px 0 var(--xiaohei-composer-highlight);
|
|
68
104
|
}
|
|
69
105
|
|
|
70
106
|
#root [data-composer-card='true'] button:not(:disabled):active {
|
|
71
|
-
transform: translateY(1px) scale(
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
#root button[aria-label='发送消息'],
|
|
75
|
-
#root button[aria-label='Send message'] {
|
|
76
|
-
position: relative;
|
|
77
|
-
isolation: isolate;
|
|
78
|
-
border: 1px solid var(--xiaohei-edge-strong) !important;
|
|
79
|
-
border-radius: 50% !important;
|
|
80
|
-
color: var(--dsw-alias-brand-primary-invert) !important;
|
|
81
|
-
background:
|
|
82
|
-
radial-gradient(circle at 36% 27%, rgb(255 255 255 / 36%) 0 7%, transparent 9%),
|
|
83
|
-
linear-gradient(145deg, var(--xiaohei-spirit), var(--dsw-alias-button-primary-fill)) !important;
|
|
84
|
-
box-shadow:
|
|
85
|
-
inset 0 1px rgb(255 255 255 / 34%),
|
|
86
|
-
inset 0 -2px rgb(4 25 31 / 18%),
|
|
87
|
-
0 6px 16px var(--xiaohei-focus-shadow) !important;
|
|
88
|
-
transition:
|
|
89
|
-
transform var(--xiaohei-motion-fast) var(--xiaohei-motion-curve),
|
|
90
|
-
box-shadow var(--xiaohei-motion-base) ease,
|
|
91
|
-
filter var(--xiaohei-motion-base) ease;
|
|
107
|
+
transform: translateY(1px) scale(.97);
|
|
92
108
|
}
|
|
93
109
|
|
|
94
|
-
|
|
95
|
-
#root
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
inset: 3px;
|
|
99
|
-
border: 1px solid rgb(238 253 255 / 28%);
|
|
100
|
-
border-radius: inherit;
|
|
101
|
-
pointer-events: none;
|
|
102
|
-
opacity: 0.58;
|
|
103
|
-
transition: opacity var(--xiaohei-motion-fast) ease, transform 220ms var(--xiaohei-motion-curve);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
#root button[aria-label='发送消息']:not(:disabled):hover,
|
|
107
|
-
#root button[aria-label='Send message']:not(:disabled):hover {
|
|
108
|
-
filter: brightness(1.05) saturate(1.03);
|
|
109
|
-
box-shadow:
|
|
110
|
-
inset 0 1px rgb(255 255 255 / 42%),
|
|
111
|
-
inset 0 -2px rgb(4 25 31 / 16%),
|
|
112
|
-
0 8px 20px var(--xiaohei-focus-shadow) !important;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
#root button[aria-label='发送消息']:not(:disabled):active,
|
|
116
|
-
#root button[aria-label='Send message']:not(:disabled):active {
|
|
117
|
-
transform: translateY(1px) scale(0.96);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
#root button[aria-label='发送消息']:not(:disabled):active::after,
|
|
121
|
-
#root button[aria-label='Send message']:not(:disabled):active::after {
|
|
122
|
-
opacity: 0.86;
|
|
123
|
-
transform: scale(0.76);
|
|
124
|
-
}
|
|
110
|
+
@media (max-width: 700px) {
|
|
111
|
+
#root [data-composer-card='true'] {
|
|
112
|
+
border-radius: 12px !important;
|
|
113
|
+
}
|
|
125
114
|
|
|
126
|
-
#root
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
background: var(--xiaohei-surface-muted) !important;
|
|
131
|
-
filter: saturate(0.42);
|
|
132
|
-
box-shadow: inset 0 1px rgb(255 255 255 / 8%) !important;
|
|
115
|
+
#root [data-composer-card='true']:not(:has(textarea[aria-haspopup='menu']))::after {
|
|
116
|
+
right: 54px;
|
|
117
|
+
left: 14px;
|
|
118
|
+
}
|
|
133
119
|
}
|
|
134
120
|
|
|
135
|
-
|
|
136
|
-
#root
|
|
137
|
-
|
|
121
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
122
|
+
#root [data-composer-card='true'] {
|
|
123
|
+
background: var(--xiaohei-composer-solid) !important;
|
|
124
|
+
-webkit-backdrop-filter: none;
|
|
125
|
+
backdrop-filter: none;
|
|
126
|
+
}
|
|
138
127
|
}
|
|
139
128
|
|
|
140
|
-
@
|
|
129
|
+
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
|
141
130
|
#root [data-composer-card='true'] {
|
|
142
|
-
|
|
131
|
+
background: var(--xiaohei-composer-solid) !important;
|
|
143
132
|
}
|
|
144
133
|
}
|
|
145
134
|
`;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-independent control primitives.
|
|
3
|
+
*
|
|
4
|
+
* This layer owns only the shared native-control contract. Feature chrome is
|
|
5
|
+
* composed after it and remains free to define geometry or stronger states.
|
|
6
|
+
*/
|
|
7
|
+
export declare const XIAOHEI_CONTROL_PRIMITIVES_CSS = "\nhtml {\n color-scheme: dark;\n accent-color: var(--xiaohei-spirit);\n font-family: -apple-system, BlinkMacSystemFont, \"SF Pro Text\", \"PingFang SC\",\n \"Microsoft YaHei\", \"Segoe UI\", sans-serif;\n font-synthesis: none;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\nhtml[data-xiaohei-appearance='light'] {\n color-scheme: light;\n}\n\n#root,\n:where(#root) :where(button, input, textarea, select) {\n font: inherit;\n letter-spacing: inherit;\n}\n\n:where(#root) :where(button, input, textarea, select) {\n box-sizing: border-box;\n color: inherit;\n -webkit-tap-highlight-color: transparent;\n}\n\n:where(#root) :where(button, select, input[type='button'], input[type='submit'], input[type='reset']) {\n -webkit-appearance: none;\n appearance: none;\n}\n\n:where(#root) :where(button, input[type='button'], input[type='submit'], input[type='reset']) {\n margin: 0;\n border: 1px solid transparent;\n border-radius: var(--xiaohei-radius-small);\n color: var(--dsw-alias-label-primary);\n background: transparent;\n cursor: pointer;\n transition:\n color var(--xiaohei-motion-fast) ease,\n border-color var(--xiaohei-motion-fast) ease,\n background-color var(--xiaohei-motion-fast) ease,\n transform var(--xiaohei-motion-fast) var(--xiaohei-motion-curve);\n}\n\n:where(#root) :where(button, input[type='button'], input[type='submit'], input[type='reset']):not(:disabled):hover {\n border-color: var(--xiaohei-edge);\n background-color: var(--xiaohei-spirit-soft);\n}\n\n:where(#root) :where(button, input[type='button'], input[type='submit'], input[type='reset']):not(:disabled):active {\n transform: translateY(1px) scale(.98);\n}\n\n:where(#root) :where(button, input[type='button'], input[type='submit'], input[type='reset']):disabled {\n cursor: not-allowed;\n opacity: .48;\n}\n\n:where(#root) :where(input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']), textarea, select) {\n border: 1px solid var(--xiaohei-edge);\n border-radius: var(--xiaohei-radius-control);\n color: var(--dsw-alias-label-primary);\n background-color: var(--xiaohei-plugin-control-fill);\n box-shadow: inset 0 1px var(--xiaohei-layer-content-highlight);\n transition:\n border-color var(--xiaohei-motion-fast) ease,\n background-color var(--xiaohei-motion-fast) ease,\n box-shadow var(--xiaohei-motion-fast) ease;\n}\n\n:where(#root) :where(input, textarea)::placeholder {\n color: var(--dsw-alias-label-tertiary);\n opacity: 1;\n}\n\n:where(#root) :where(input[type='search'])::-webkit-search-cancel-button,\n:where(#root) :where(input[type='search'])::-webkit-search-decoration {\n -webkit-appearance: none;\n appearance: none;\n}\n\n:where(#root) :where(input[type='number']) {\n -moz-appearance: textfield;\n}\n\n:where(#root) :where(input[type='number'])::-webkit-inner-spin-button,\n:where(#root) :where(input[type='number'])::-webkit-outer-spin-button {\n margin: 0;\n -webkit-appearance: none;\n appearance: none;\n}\n\n:where(#root) :where(textarea) {\n resize: vertical;\n}\n\n:where(#root) :where(select) {\n padding-inline-end: 30px;\n background-image:\n linear-gradient(45deg, transparent 50%, currentColor 50%),\n linear-gradient(135deg, currentColor 50%, transparent 50%);\n background-position:\n calc(100% - 15px) 50%,\n calc(100% - 10px) 50%;\n background-repeat: no-repeat;\n background-size: 5px 5px, 5px 5px;\n}\n\n:where(#root) :where(select)::-ms-expand {\n display: none;\n}\n\n:where(#root) :where(option, optgroup) {\n color: var(--dsw-alias-label-primary);\n background: var(--xiaohei-surface-raised);\n}\n\n:where(#root) :where(input[type='checkbox'], input[type='radio']) {\n -webkit-appearance: none;\n appearance: none;\n display: inline-grid;\n place-content: center;\n width: 16px;\n height: 16px;\n margin: 0;\n border: 1px solid var(--xiaohei-edge-strong);\n color: var(--xiaohei-frame-ink);\n background: var(--xiaohei-plugin-control-fill);\n box-shadow: inset 0 1px var(--xiaohei-layer-content-highlight);\n cursor: pointer;\n transition:\n border-color var(--xiaohei-motion-fast) ease,\n background-color var(--xiaohei-motion-fast) ease,\n box-shadow var(--xiaohei-motion-fast) ease;\n}\n\n:where(#root) :where(input[type='checkbox']) {\n border-radius: 5px;\n}\n\n:where(#root) :where(input[type='radio']) {\n border-radius: 50%;\n}\n\n:where(#root) :where(input[type='checkbox'], input[type='radio'])::before {\n content: '';\n width: 8px;\n height: 8px;\n background: currentColor;\n opacity: 0;\n transform: scale(.5);\n transition:\n opacity var(--xiaohei-motion-fast) ease,\n transform var(--xiaohei-motion-fast) var(--xiaohei-motion-curve);\n}\n\n:where(#root) :where(input[type='checkbox'])::before {\n clip-path: polygon(14% 44%, 0 62%, 40% 100%, 100% 20%, 82% 5%, 38% 70%);\n}\n\n:where(#root) :where(input[type='radio'])::before {\n border-radius: 50%;\n}\n\n:where(#root) :where(input[type='checkbox'], input[type='radio']):checked {\n border-color: var(--xiaohei-spirit-strong);\n background: var(--xiaohei-spirit);\n box-shadow: 0 0 0 3px var(--xiaohei-spirit-faint);\n}\n\n:where(#root) :where(input[type='checkbox'], input[type='radio']):checked::before {\n opacity: 1;\n transform: scale(1);\n}\n\n:where(#root) :where(input[type='checkbox'], input[type='radio']):disabled {\n cursor: not-allowed;\n opacity: .48;\n}\n\n:where(#root) :where(input[type='range']) {\n -webkit-appearance: none;\n appearance: none;\n height: 16px;\n margin: 0;\n background: transparent;\n cursor: pointer;\n}\n\n:where(#root) :where(input[type='range'])::-webkit-slider-runnable-track {\n height: 4px;\n border-radius: 999px;\n background: var(--xiaohei-surface-muted);\n box-shadow: inset 0 0 0 1px var(--xiaohei-edge);\n}\n\n:where(#root) :where(input[type='range'])::-webkit-slider-thumb {\n width: 14px;\n height: 14px;\n margin-top: -5px;\n border: 2px solid var(--xiaohei-surface-raised);\n border-radius: 50%;\n background: var(--xiaohei-spirit);\n box-shadow: 0 2px 6px var(--xiaohei-shadow);\n -webkit-appearance: none;\n appearance: none;\n}\n\n:where(#root) :where(input[type='range'])::-moz-range-track {\n height: 4px;\n border: 0;\n border-radius: 999px;\n background: var(--xiaohei-surface-muted);\n box-shadow: inset 0 0 0 1px var(--xiaohei-edge);\n}\n\n:where(#root) :where(input[type='range'])::-moz-range-progress {\n height: 4px;\n border-radius: 999px;\n background: var(--xiaohei-spirit);\n}\n\n:where(#root) :where(input[type='range'])::-moz-range-thumb {\n width: 10px;\n height: 10px;\n border: 2px solid var(--xiaohei-surface-raised);\n border-radius: 50%;\n background: var(--xiaohei-spirit);\n box-shadow: 0 2px 6px var(--xiaohei-shadow);\n}\n\n:where(#root) :where(input[type='range']):disabled {\n cursor: not-allowed;\n opacity: .48;\n}\n\n:where(#root) :where(input[type='file'])::file-selector-button {\n margin-inline-end: 10px;\n padding: 6px 10px;\n border: 1px solid var(--xiaohei-edge);\n border-radius: var(--xiaohei-radius-small);\n color: var(--dsw-alias-label-primary);\n background: var(--xiaohei-plugin-control-fill);\n font: inherit;\n cursor: pointer;\n}\n\n:where(#root) :where(progress) {\n overflow: hidden;\n border: 0;\n border-radius: 999px;\n color: var(--xiaohei-spirit);\n background: var(--xiaohei-surface-muted);\n accent-color: var(--xiaohei-spirit);\n}\n\n:where(#root) :where(progress)::-webkit-progress-bar {\n background: var(--xiaohei-surface-muted);\n}\n\n:where(#root) :where(progress)::-webkit-progress-value {\n background: var(--xiaohei-spirit);\n}\n\n:where(#root) :where(progress)::-moz-progress-bar {\n background: var(--xiaohei-spirit);\n}\n\n:where(#root) :where(fieldset) {\n min-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n}\n\n:where(#root) :where(legend) {\n padding: 0;\n color: var(--dsw-alias-label-secondary);\n}\n\n:where(#root) :where(summary) {\n cursor: pointer;\n}\n\n:where(#root) :where(a) {\n color: var(--xiaohei-spirit-strong);\n text-decoration-color: var(--xiaohei-edge-strong);\n text-underline-offset: .18em;\n}\n\n:where(#root) :where(a):hover {\n text-decoration-color: currentColor;\n}\n\n#root {\n scrollbar-width: thin;\n scrollbar-color: transparent transparent;\n}\n\n#root:hover,\n#root:focus-within {\n scrollbar-color: var(--dsw-alias-scrollbar-bg-l1) transparent;\n}\n\n#root ::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n}\n\n#root ::-webkit-scrollbar-track,\n#root ::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n#root ::-webkit-scrollbar-thumb {\n min-width: 28px;\n min-height: 28px;\n border: 2px solid transparent;\n border-radius: 999px;\n background: transparent;\n background-clip: padding-box;\n}\n\n#root:hover ::-webkit-scrollbar-thumb,\n#root:focus-within ::-webkit-scrollbar-thumb {\n background-color: var(--dsw-alias-scrollbar-bg-l1);\n}\n\n#root ::-webkit-scrollbar-thumb:hover {\n background-color: var(--dsw-alias-scrollbar-hover-l1);\n}\n\n@media (forced-colors: active) {\n :where(#root) :where(input, textarea, select, button, progress) {\n forced-color-adjust: auto;\n }\n}\n";
|
|
8
|
+
//# sourceMappingURL=controls.d.ts.map
|