@mingxy/opencode-mascot 0.4.3 → 0.4.4
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
|
@@ -55,8 +55,10 @@ export function HomeMascot(props: HomeMascotProps): JSX.Element {
|
|
|
55
55
|
|
|
56
56
|
return (
|
|
57
57
|
<box
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
left={posX()}
|
|
59
|
+
top={posY()}
|
|
60
|
+
zIndex={100}
|
|
61
|
+
flexDirection="column"
|
|
60
62
|
onMouseDown={(e: any) => {
|
|
61
63
|
const now = Date.now();
|
|
62
64
|
if (now - lastClickTime < 300) {
|
|
@@ -91,14 +93,7 @@ export function HomeMascot(props: HomeMascotProps): JSX.Element {
|
|
|
91
93
|
onMouseDragEnd={() => { stopDrag(); }}
|
|
92
94
|
onMouseOut={() => { stopDrag(); }}
|
|
93
95
|
>
|
|
94
|
-
|
|
95
|
-
position="absolute"
|
|
96
|
-
left={posX()}
|
|
97
|
-
top={posY()}
|
|
98
|
-
flexDirection="column"
|
|
99
|
-
>
|
|
100
|
-
{renderers[currentName()]?.element() ?? null}
|
|
101
|
-
</box>
|
|
96
|
+
{renderers[currentName()]?.element() ?? null}
|
|
102
97
|
</box>
|
|
103
98
|
);
|
|
104
99
|
}
|
|
@@ -316,8 +316,8 @@ export function createAnimatedRenderer(pack: MascotPack): {
|
|
|
316
316
|
|
|
317
317
|
return (
|
|
318
318
|
<box flexDirection="column" left={left} top={top}>
|
|
319
|
-
{cel ? <text fg={flashColor() ?? fg}>{cel.text}</text> : null}
|
|
320
|
-
{dm ? <text fg="#FF4081">{dm}</text> : null}
|
|
319
|
+
{cel ? <box position="absolute" top={-1} left={0}><text fg={flashColor() ?? fg}>{cel.text}</text></box> : null}
|
|
320
|
+
{dm ? <box position="absolute" top={-1} left={0}><text fg="#FF4081">{dm}</text></box> : null}
|
|
321
321
|
{lines.map((line: string) => (
|
|
322
322
|
<text fg={flashColor() ?? fg}>{line}</text>
|
|
323
323
|
))}
|