@mingxy/opencode-mascot 0.4.10 → 0.4.11
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/package.json
CHANGED
|
@@ -23,6 +23,7 @@ export function HomeMascot(props: HomeMascotProps): JSX.Element {
|
|
|
23
23
|
const [currentName, setCurrentName] = createSignal(initialName);
|
|
24
24
|
const [posX, setPosX] = createSignal(0);
|
|
25
25
|
const [posY, setPosY] = createSignal(0);
|
|
26
|
+
const [zBoost, setZBoost] = createSignal(false);
|
|
26
27
|
let dragStartX = 0;
|
|
27
28
|
let dragStartY = 0;
|
|
28
29
|
let dragAnchorX = 0;
|
|
@@ -42,11 +43,15 @@ export function HomeMascot(props: HomeMascotProps): JSX.Element {
|
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
onCelebrate((newVersion) => {
|
|
46
|
+
setZBoost(true);
|
|
45
47
|
renderers[currentName()].celebrateUpdate(newVersion);
|
|
48
|
+
setTimeout(() => setZBoost(false), 2000);
|
|
46
49
|
});
|
|
47
50
|
|
|
48
51
|
onVersion((version) => {
|
|
52
|
+
setZBoost(true);
|
|
49
53
|
renderers[currentName()].showVersion(version);
|
|
54
|
+
setTimeout(() => setZBoost(false), 3500);
|
|
50
55
|
});
|
|
51
56
|
|
|
52
57
|
const stopDrag = () => {
|
|
@@ -60,7 +65,7 @@ export function HomeMascot(props: HomeMascotProps): JSX.Element {
|
|
|
60
65
|
top={posY()}
|
|
61
66
|
width={12}
|
|
62
67
|
height={6}
|
|
63
|
-
zIndex={100}
|
|
68
|
+
zIndex={zBoost() ? 9999 : 100}
|
|
64
69
|
flexDirection="column"
|
|
65
70
|
onMouseDown={(e: any) => {
|
|
66
71
|
log("MOUSE", `down x=${e.x} y=${e.y} alt=${!!e.modifiers?.alt} btn=${e.button}`);
|
|
@@ -43,6 +43,7 @@ export function SidebarMascot(props: SidebarMascotProps): JSX.Element {
|
|
|
43
43
|
const [posX, setPosX] = createSignal(20);
|
|
44
44
|
const [posY, setPosY] = createSignal(2);
|
|
45
45
|
const [containerWidth, setContainerWidth] = createSignal(0);
|
|
46
|
+
const [zBoost, setZBoost] = createSignal(false);
|
|
46
47
|
let dragStartX = 0;
|
|
47
48
|
let dragStartY = 0;
|
|
48
49
|
let dragAnchorX = 0;
|
|
@@ -173,11 +174,15 @@ export function SidebarMascot(props: SidebarMascotProps): JSX.Element {
|
|
|
173
174
|
});
|
|
174
175
|
|
|
175
176
|
onCelebrate((newVersion) => {
|
|
177
|
+
setZBoost(true);
|
|
176
178
|
renderers[currentName()].celebrateUpdate(newVersion);
|
|
179
|
+
setTimeout(() => setZBoost(false), 2000);
|
|
177
180
|
});
|
|
178
181
|
|
|
179
182
|
onVersion((version) => {
|
|
183
|
+
setZBoost(true);
|
|
180
184
|
renderers[currentName()].showVersion(version);
|
|
185
|
+
setTimeout(() => setZBoost(false), 3500);
|
|
181
186
|
});
|
|
182
187
|
|
|
183
188
|
return (
|
|
@@ -186,7 +191,7 @@ export function SidebarMascot(props: SidebarMascotProps): JSX.Element {
|
|
|
186
191
|
left={posX()}
|
|
187
192
|
top={posY()}
|
|
188
193
|
alignItems="center"
|
|
189
|
-
zIndex={100}
|
|
194
|
+
zIndex={zBoost() ? 9999 : 100}
|
|
190
195
|
flexDirection="column"
|
|
191
196
|
ref={(node: any) => {
|
|
192
197
|
if (node) {
|