@naxodev/opencode-music-player 0.3.1 → 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.
- package/dist/index.js +19 -19
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1193,7 +1193,7 @@ var BLUE = [
|
|
|
1193
1193
|
];
|
|
1194
1194
|
function blueFor(level, playing, theme) {
|
|
1195
1195
|
if (!playing && level < 0.05)
|
|
1196
|
-
return theme.text.
|
|
1196
|
+
return theme.text.muted;
|
|
1197
1197
|
if (level <= 0.02)
|
|
1198
1198
|
return BLUE[1];
|
|
1199
1199
|
const idx = Math.min(BLUE.length - 1, Math.floor(level * (BLUE.length - 1)));
|
|
@@ -1429,7 +1429,7 @@ function CompactPlayer(props) {
|
|
|
1429
1429
|
_$setProp2(_el$2, "wrapMode", "none");
|
|
1430
1430
|
_$setProp2(_el$2, "truncate", true);
|
|
1431
1431
|
_$insert3(_el$2, renderLine);
|
|
1432
|
-
_$effect2((_$p) => _$setProp2(_el$2, "fg", theme().text.action.primary.
|
|
1432
|
+
_$effect2((_$p) => _$setProp2(_el$2, "fg", theme().text.action.primary.base, _$p));
|
|
1433
1433
|
return _el$;
|
|
1434
1434
|
})()
|
|
1435
1435
|
});
|
|
@@ -1514,11 +1514,11 @@ function ProgressBar(props) {
|
|
|
1514
1514
|
_$insert3(_el$7, () => rendered().right);
|
|
1515
1515
|
_$effect2((_p$) => {
|
|
1516
1516
|
var _v$ = width(), _v$2 = {
|
|
1517
|
-
fg: props.accent ?? props.theme.text.action.primary.
|
|
1517
|
+
fg: props.accent ?? props.theme.text.action.primary.base
|
|
1518
1518
|
}, _v$3 = {
|
|
1519
|
-
fg: props.accent ?? props.theme.text.action.primary.
|
|
1519
|
+
fg: props.accent ?? props.theme.text.action.primary.base
|
|
1520
1520
|
}, _v$4 = {
|
|
1521
|
-
fg: props.theme.text.
|
|
1521
|
+
fg: props.theme.text.muted
|
|
1522
1522
|
};
|
|
1523
1523
|
_v$ !== _p$.e && (_p$.e = _$setProp2(_el$3, "width", _v$, _p$.e));
|
|
1524
1524
|
_v$2 !== _p$.t && (_p$.t = _$setProp2(_el$5, "style", _v$2, _p$.t));
|
|
@@ -1555,7 +1555,7 @@ function LiveElapsed(props) {
|
|
|
1555
1555
|
var _el$8 = _$createElement3("text");
|
|
1556
1556
|
_$use3((element) => text = element, _el$8);
|
|
1557
1557
|
_$insert3(_el$8, () => formatMs(liveProgress(props.source.current())));
|
|
1558
|
-
_$effect2((_$p) => _$setProp2(_el$8, "fg", props.theme.text.
|
|
1558
|
+
_$effect2((_$p) => _$setProp2(_el$8, "fg", props.theme.text.muted, _$p));
|
|
1559
1559
|
return _el$8;
|
|
1560
1560
|
})();
|
|
1561
1561
|
}
|
|
@@ -1564,17 +1564,17 @@ function IconBtn(props) {
|
|
|
1564
1564
|
const [press, setPress] = createSignal(false);
|
|
1565
1565
|
const bg = () => {
|
|
1566
1566
|
if (press() || props.active) {
|
|
1567
|
-
return props.theme.background.action.primary.
|
|
1567
|
+
return props.theme.background.action.primary.base;
|
|
1568
1568
|
}
|
|
1569
|
-
return props.theme.background.
|
|
1569
|
+
return props.theme.background.raised.base;
|
|
1570
1570
|
};
|
|
1571
1571
|
const fg2 = () => {
|
|
1572
1572
|
if (press() || props.active)
|
|
1573
|
-
return props.accent ?? props.theme.text.action.primary.
|
|
1573
|
+
return props.accent ?? props.theme.text.action.primary.base;
|
|
1574
1574
|
if (props.primary) {
|
|
1575
|
-
return hover() ? props.theme.text.action.primary.
|
|
1575
|
+
return hover() ? props.theme.text.action.primary.base : props.theme.text.base;
|
|
1576
1576
|
}
|
|
1577
|
-
return hover() ? props.theme.text.action.primary.
|
|
1577
|
+
return hover() ? props.theme.text.action.primary.base : props.theme.text.base;
|
|
1578
1578
|
};
|
|
1579
1579
|
const w = () => props.width ?? 3;
|
|
1580
1580
|
const h = () => props.height ?? 1;
|
|
@@ -1663,7 +1663,7 @@ function SidebarPlayer(props) {
|
|
|
1663
1663
|
children: (err) => (() => {
|
|
1664
1664
|
var _el$17 = _$createElement3("text");
|
|
1665
1665
|
_$insert3(_el$17, () => sanitizeTerminalText(err()));
|
|
1666
|
-
_$effect2((_$p) => _$setProp2(_el$17, "fg", theme().text.feedback.error.
|
|
1666
|
+
_$effect2((_$p) => _$setProp2(_el$17, "fg", theme().text.feedback.error.base, _$p));
|
|
1667
1667
|
return _el$17;
|
|
1668
1668
|
})()
|
|
1669
1669
|
}), _el$10);
|
|
@@ -1689,7 +1689,7 @@ function SidebarPlayer(props) {
|
|
|
1689
1689
|
var _c$ = _$memo(() => !!track());
|
|
1690
1690
|
return () => _c$() ? track()?.artwork_loading ? "Loading artwork\u2026" : "Artwork unavailable" : "";
|
|
1691
1691
|
})());
|
|
1692
|
-
_$effect2((_$p) => _$setProp2(_el$19, "fg", theme().text.
|
|
1692
|
+
_$effect2((_$p) => _$setProp2(_el$19, "fg", theme().text.muted, _$p));
|
|
1693
1693
|
return _el$18;
|
|
1694
1694
|
})();
|
|
1695
1695
|
},
|
|
@@ -1710,7 +1710,7 @@ function SidebarPlayer(props) {
|
|
|
1710
1710
|
return (() => {
|
|
1711
1711
|
var _el$20 = _$createElement3("text");
|
|
1712
1712
|
_$insert3(_el$20, () => props.state.loading ? "Syncing\u2026" : "Nothing playing");
|
|
1713
|
-
_$effect2((_$p) => _$setProp2(_el$20, "fg", theme().text.
|
|
1713
|
+
_$effect2((_$p) => _$setProp2(_el$20, "fg", theme().text.muted, _$p));
|
|
1714
1714
|
return _el$20;
|
|
1715
1715
|
})();
|
|
1716
1716
|
},
|
|
@@ -1728,7 +1728,7 @@ function SidebarPlayer(props) {
|
|
|
1728
1728
|
get children() {
|
|
1729
1729
|
var _el$24 = _$createElement3("text");
|
|
1730
1730
|
_$insert3(_el$24, () => sanitizeTerminalText(t2().artists));
|
|
1731
|
-
_$effect2((_$p) => _$setProp2(_el$24, "fg", theme().text.
|
|
1731
|
+
_$effect2((_$p) => _$setProp2(_el$24, "fg", theme().text.muted, _$p));
|
|
1732
1732
|
return _el$24;
|
|
1733
1733
|
}
|
|
1734
1734
|
}), null);
|
|
@@ -1739,11 +1739,11 @@ function SidebarPlayer(props) {
|
|
|
1739
1739
|
get children() {
|
|
1740
1740
|
var _el$25 = _$createElement3("text");
|
|
1741
1741
|
_$insert3(_el$25, () => sanitizeTerminalText(t2().album));
|
|
1742
|
-
_$effect2((_$p) => _$setProp2(_el$25, "fg", theme().text.
|
|
1742
|
+
_$effect2((_$p) => _$setProp2(_el$25, "fg", theme().text.muted, _$p));
|
|
1743
1743
|
return _el$25;
|
|
1744
1744
|
}
|
|
1745
1745
|
}), null);
|
|
1746
|
-
_$effect2((_$p) => _$setProp2(_el$22, "fg", theme().text.
|
|
1746
|
+
_$effect2((_$p) => _$setProp2(_el$22, "fg", theme().text.base, _$p));
|
|
1747
1747
|
return _el$21;
|
|
1748
1748
|
})()
|
|
1749
1749
|
}), _el$12);
|
|
@@ -1791,7 +1791,7 @@ function SidebarPlayer(props) {
|
|
|
1791
1791
|
source
|
|
1792
1792
|
}), _el$15);
|
|
1793
1793
|
_$insert3(_el$15, () => formatMs(duration()));
|
|
1794
|
-
_$effect2((_$p) => _$setProp2(_el$15, "fg", theme().text.
|
|
1794
|
+
_$effect2((_$p) => _$setProp2(_el$15, "fg", theme().text.muted, _$p));
|
|
1795
1795
|
return _el$13;
|
|
1796
1796
|
}
|
|
1797
1797
|
}), _el$16);
|
|
@@ -1850,7 +1850,7 @@ function SidebarPlayer(props) {
|
|
|
1850
1850
|
onClick: () => props.onNext()
|
|
1851
1851
|
}), null);
|
|
1852
1852
|
_$effect2((_p$) => {
|
|
1853
|
-
var _v$9 = playing() ? track()?.artwork?.accent ?? theme().text.action.primary.
|
|
1853
|
+
var _v$9 = playing() ? track()?.artwork?.accent ?? theme().text.action.primary.base : theme().border.base, _v$0 = TRANSPORT_LAYOUT.gap;
|
|
1854
1854
|
_v$9 !== _p$.e && (_p$.e = _$setProp2(_el$1, "borderColor", _v$9, _p$.e));
|
|
1855
1855
|
_v$0 !== _p$.t && (_p$.t = _$setProp2(_el$16, "gap", _v$0, _p$.t));
|
|
1856
1856
|
return _p$;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naxodev/opencode-music-player",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "macOS system Now Playing controls for the OpenCode 2 TUI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -60,20 +60,20 @@
|
|
|
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.1.
|
|
63
|
+
"@naxodev/music-core": "^0.1.5",
|
|
64
64
|
"pngjs": "^7.0.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@opencode/plugin": "2.0.
|
|
67
|
+
"@opencode/plugin": "2.0.16",
|
|
68
68
|
"@opentui/core": "0.5.10",
|
|
69
69
|
"@opentui/solid": "0.5.10"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@opencode/plugin": "2.0.
|
|
72
|
+
"@opencode/plugin": "2.0.16",
|
|
73
73
|
"@opentui/core": "0.5.10",
|
|
74
74
|
"@opentui/solid": "0.5.10",
|
|
75
75
|
"solid-js": "1.9.15",
|
|
76
|
-
"@opencode/theme": "2.0.
|
|
76
|
+
"@opencode/theme": "2.0.16",
|
|
77
77
|
"@types/bun": "^1.3.14",
|
|
78
78
|
"@types/pngjs": "^6.0.5",
|
|
79
79
|
"prettier": "3.9.6",
|