@spicetify/kit 0.4.1 → 0.4.2

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/version.js CHANGED
@@ -4,5 +4,5 @@
4
4
  */
5
5
  // Kept in lockstep with package.json by release-please. Scaffolds must depend
6
6
  // on the kit version that generated them, especially across pre-1.0 minors.
7
- export const KIT_VERSION = "0.4.1"; // x-release-please-version
7
+ export const KIT_VERSION = "0.4.2"; // x-release-please-version
8
8
  export const KIT_DEPENDENCY_RANGE = `^${KIT_VERSION}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spicetify/kit",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Developer kit for spicetify v3 modules: scaffold, build, hot-push, and pack",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "homepage": "https://github.com/spicetify/modules#readme",
@@ -40,7 +40,7 @@
40
40
  "access": "public"
41
41
  },
42
42
  "spicetify": {
43
- "stdlibVersion": "1.13.0"
43
+ "stdlibVersion": "1.13.1"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "tsc -p tsconfig.build.json",
@@ -3,7 +3,7 @@
3
3
  "kind": "lib",
4
4
  "hidden": true,
5
5
  "preview": "./assets/PREVIEW.png",
6
- "version": "1.13.0",
6
+ "version": "1.13.1",
7
7
  "compat": ["0.3.0"],
8
8
  "authors": ["spicetify", "Delusoire"],
9
9
  "description": "The standard library",
@@ -10,6 +10,7 @@
10
10
  // Button/Widget with the v3 playbarButton register so classic extensions and
11
11
  // muscle memory keep working, and the typed API never hands you a dead helper.
12
12
 
13
+ import { client } from "./client.ts";
13
14
  import { React } from "./expose/React.ts";
14
15
  import playbarButtons, { PlaybarButton } from "./registers/playbarButton.tsx";
15
16
 
@@ -21,6 +22,8 @@ const innerSvg = (icon: string): string => {
21
22
  return match ? match[1] : icon;
22
23
  };
23
24
 
25
+ const toInnerSvg = (icon: string): string => client.icons?.[icon as Spicetify.Icon] ?? innerSvg(icon);
26
+
24
27
  class PlaybarCompat {
25
28
  onClick: (self: PlaybarCompat) => void;
26
29
  private _label: string;
@@ -102,7 +105,7 @@ class PlaybarCompat {
102
105
  return (
103
106
  <PlaybarButton
104
107
  label={self._label}
105
- icon={innerSvg(self._icon)}
108
+ icon={toInnerSvg(self._icon)}
106
109
  isActive={self._active}
107
110
  disabled={self._disabled}
108
111
  onClick={() => self.onClick(self)}