@sdeck/plugin-spotify 0.2.0 → 0.4.0

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/src/panels.tsx CHANGED
@@ -1,5 +1,6 @@
1
1
  /** What Spotify keys draw with, and the Now playing panel, which draws itself. */
2
2
  import { useHostState, useImage } from "@sdeck/plugin";
3
+ import { surfaceStyle } from "@sdeck/schema";
3
4
  import type { CSSProperties } from "react";
4
5
 
5
6
  export const GREEN = "#1ed760";
@@ -64,7 +65,7 @@ export function NowPlaying({ kind }: { kind: "key" | "window" | "sensor" }) {
64
65
  width: "100%",
65
66
  height: "100%",
66
67
  alignItems: "center",
67
- background: BACKGROUND,
68
+ ...surfaceStyle(BACKGROUND),
68
69
  gap: 4,
69
70
  padding: "0 4px",
70
71
  }}
@@ -92,12 +93,12 @@ export function NowPlaying({ kind }: { kind: "key" | "window" | "sensor" }) {
92
93
  alignItems: "center",
93
94
  justifyContent: "center",
94
95
  gap: 8,
95
- background: BACKGROUND,
96
+ ...surfaceStyle(BACKGROUND),
96
97
  }}
97
98
  >
98
99
  <Icon icon="si/SiSpotify" size={kind === "window" ? 30 : 40} color={GREEN} />
99
100
  <div
100
- style={{ ...box, color: MUTED, fontSize: kind === "window" ? 15 : 11, fontWeight: 700 }}
101
+ style={{ ...box, color: MUTED, fontSize: kind === "window" ? 15 : 12, fontWeight: 700 }}
101
102
  >
102
103
  Not playing
103
104
  </div>
@@ -113,7 +114,7 @@ export function NowPlaying({ kind }: { kind: "key" | "window" | "sensor" }) {
113
114
  width: "100%",
114
115
  height: "100%",
115
116
  flexDirection: "column",
116
- background: BACKGROUND,
117
+ ...surfaceStyle(BACKGROUND),
117
118
  }}
118
119
  >
119
120
  <div style={{ ...box, flexGrow: 1, alignItems: "center", gap: 10, padding: "0 10px 0 0" }}>
@@ -186,7 +187,7 @@ export function NowPlaying({ kind }: { kind: "key" | "window" | "sensor" }) {
186
187
  width: "100%",
187
188
  height: "100%",
188
189
  position: "relative",
189
- background: BACKGROUND,
190
+ ...surfaceStyle(BACKGROUND),
190
191
  }}
191
192
  >
192
193
  {art ? (