@xzzpig/pi-starline 0.4.0 → 0.4.1
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.
|
@@ -25,7 +25,14 @@ import type { MouseEventsApi } from "@xzzpig/pi-mouse-events/api";
|
|
|
25
25
|
const MOUSE_EVENTS_API_KEY = Symbol.for("pi-mouse-events.api.v1");
|
|
26
26
|
|
|
27
27
|
export function getMouseEventsApi(): MouseEventsApi | undefined {
|
|
28
|
-
|
|
28
|
+
const candidate = (globalThis as Record<symbol, unknown>)[MOUSE_EVENTS_API_KEY] as
|
|
29
29
|
| MouseEventsApi
|
|
30
30
|
| undefined;
|
|
31
|
+
// The symbol key pins the contract name, not its shape: reject an object
|
|
32
|
+
// from a different contract major so callers never dereference a
|
|
33
|
+
// mismatched surface (the key is only bumped together with the version).
|
|
34
|
+
if (!candidate || candidate.version !== 1) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
return candidate;
|
|
31
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xzzpig/pi-starline",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "A Starship-inspired statusline and Opencode-style TUI for Pi.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@types/node": "^26.0.0",
|
|
46
46
|
"typescript": "^7.0.2",
|
|
47
47
|
"vitest": "^4.1.8",
|
|
48
|
-
"@xzzpig/pi-mouse-events": "0.1.
|
|
48
|
+
"@xzzpig/pi-mouse-events": "0.1.2"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
51
|
"@xzzpig/pi-mouse-events": {
|