@mingxy/opencode-mascot 0.4.5 → 0.4.7

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mingxy/opencode-mascot",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "OpenCode TUI mascot plugin framework - customizable ASCII mascots for your terminal",
5
5
  "author": "mingxy",
6
6
  "license": "MIT",
@@ -57,7 +57,9 @@ export function HomeMascot(props: HomeMascotProps): JSX.Element {
57
57
  <box
58
58
  left={posX()}
59
59
  top={posY()}
60
- alignItems="center"
60
+ width={16}
61
+ height={7}
62
+ padding={1}
61
63
  zIndex={100}
62
64
  flexDirection="column"
63
65
  onMouseDown={(e: any) => {
@@ -76,8 +78,7 @@ export function HomeMascot(props: HomeMascotProps): JSX.Element {
76
78
  dragAnchorY = posY();
77
79
  isDragging = true;
78
80
  renderers[currentName()].setDragging(true);
79
- e.preventDefault();
80
- e.stopPropagation();
81
+ props.api.renderer.clearSelection();
81
82
  }
82
83
  }}
83
84
  onMouseDrag={(e: any) => {
@@ -90,7 +91,9 @@ export function HomeMascot(props: HomeMascotProps): JSX.Element {
90
91
  onMouseDragEnd={() => { stopDrag(); }}
91
92
  onMouseOut={() => { stopDrag(); }}
92
93
  >
93
- {renderers[currentName()]?.element() ?? null}
94
+ <box flexDirection="column" alignItems="center">
95
+ {renderers[currentName()]?.element() ?? null}
96
+ </box>
94
97
  </box>
95
98
  );
96
99
  }
@@ -216,8 +216,7 @@ export function SidebarMascot(props: SidebarMascotProps): JSX.Element {
216
216
  dragAnchorY = posY();
217
217
  isDragging = true;
218
218
  renderers[currentName()].setDragging(true);
219
- e.preventDefault();
220
- e.stopPropagation();
219
+ props.api.renderer.clearSelection();
221
220
  }
222
221
  }}
223
222
  onMouseDrag={(e: any) => {