@mingxy/opencode-mascot 0.5.2 → 0.5.3
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
|
@@ -67,6 +67,7 @@ export function createAnimatedRenderer(pack: MascotPack): {
|
|
|
67
67
|
const [walkEnabled, setWalkEnabled] = createSignal(anim.walkEnabled ?? true);
|
|
68
68
|
const [dragging, setDraggingSignal] = createSignal(false);
|
|
69
69
|
const [celebrate, setCelebrate] = createSignal<{ text: string; count: number } | null>(null);
|
|
70
|
+
const [versionMsg, setVersionMsg] = createSignal<string | null>(null);
|
|
70
71
|
const [flashColor, setFlashColor] = createSignal<string | null>(null);
|
|
71
72
|
const [dragMsg, setDragMsg] = createSignal<string | null>(null);
|
|
72
73
|
const [zzz, setZzz] = createSignal<string | null>(null);
|
|
@@ -105,7 +106,7 @@ export function createAnimatedRenderer(pack: MascotPack): {
|
|
|
105
106
|
};
|
|
106
107
|
const stopVersion = () => {
|
|
107
108
|
if (versionTimer) { clearTimeout(versionTimer); versionTimer = null; }
|
|
108
|
-
|
|
109
|
+
setVersionMsg(null);
|
|
109
110
|
};
|
|
110
111
|
const stopScatter = () => {
|
|
111
112
|
if (scatterTimer) { clearInterval(scatterTimer); scatterTimer = null; }
|
|
@@ -316,6 +317,7 @@ export function createAnimatedRenderer(pack: MascotPack): {
|
|
|
316
317
|
zzz();
|
|
317
318
|
scatter();
|
|
318
319
|
bomb();
|
|
320
|
+
versionMsg();
|
|
319
321
|
|
|
320
322
|
for (const [, [get]] of extraSignals) {
|
|
321
323
|
get();
|
|
@@ -359,6 +361,7 @@ export function createAnimatedRenderer(pack: MascotPack): {
|
|
|
359
361
|
{cel ? <box position="absolute" top={-1} left={0}><text fg={flashColor() ?? fg}>{cel.text}</text></box> : null}
|
|
360
362
|
{dm ? <box position="absolute" top={-1} left={0}><text fg="#FF4081">{dm}</text></box> : null}
|
|
361
363
|
{zzz() ? <box position="absolute" top={-1} left={0}><text fg={flashColor() ?? fg}>{zzz()}</text></box> : null}
|
|
364
|
+
{versionMsg() ? <box position="absolute" top={-1} left={0}><text fg={flashColor() ?? fg}>{versionMsg()}</text></box> : null}
|
|
362
365
|
{bomb() ? (
|
|
363
366
|
<box position="absolute" top={-2} left={3}>
|
|
364
367
|
<text fg="#FF4444">{bomb()!.fuse}↘</text>
|
|
@@ -500,8 +503,8 @@ export function createAnimatedRenderer(pack: MascotPack): {
|
|
|
500
503
|
|
|
501
504
|
const showVersion = (version: string) => {
|
|
502
505
|
stopVersion();
|
|
503
|
-
|
|
504
|
-
versionTimer = setTimeout(() => {
|
|
506
|
+
setVersionMsg(`ᵛ${toSuperscript(version)}`);
|
|
507
|
+
versionTimer = setTimeout(() => { setVersionMsg(null); versionTimer = null; }, 3000);
|
|
505
508
|
};
|
|
506
509
|
|
|
507
510
|
const scatterIn = () => {
|