@naxodev/opencode-music-player 0.5.2 → 0.5.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/dist/index.js +3 -14
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -895,25 +895,14 @@ function kittyImageId(key) {
|
|
|
895
895
|
}
|
|
896
896
|
function writeGraphics(renderer, data) {
|
|
897
897
|
const target = renderer;
|
|
898
|
-
if (
|
|
898
|
+
if (typeof target.writeOut !== "function")
|
|
899
899
|
return false;
|
|
900
|
+
const commands = typeof data === "string" ? [data] : data;
|
|
900
901
|
const output = (value) => process.env.TMUX && !process.env.HERDR_ENV ? tmuxPassthrough(value) : value;
|
|
901
|
-
let cursorSaved = false;
|
|
902
902
|
try {
|
|
903
|
-
|
|
904
|
-
if (command.includes("\x1B7"))
|
|
905
|
-
cursorSaved = true;
|
|
906
|
-
target.realStdoutWrite.call(target.stdout, output(command));
|
|
907
|
-
if (command.includes("\x1B8"))
|
|
908
|
-
cursorSaved = false;
|
|
909
|
-
}
|
|
903
|
+
target.writeOut.call(renderer, commands.map(output).join(""));
|
|
910
904
|
return true;
|
|
911
905
|
} catch {
|
|
912
|
-
if (cursorSaved) {
|
|
913
|
-
try {
|
|
914
|
-
target.realStdoutWrite.call(target.stdout, output("\x1B8"));
|
|
915
|
-
} catch {}
|
|
916
|
-
}
|
|
917
906
|
return false;
|
|
918
907
|
}
|
|
919
908
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naxodev/opencode-music-player",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "macOS system Now Playing controls for the OpenCode 2 TUI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"validate": "bun run format:check && bun run check && bun run test && bun run pack:check"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@naxodev/music-core": "^0.2.
|
|
63
|
+
"@naxodev/music-core": "^0.2.1",
|
|
64
64
|
"pngjs": "^7.0.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|