diff --git a/themes/aura-theme/README.md b/themes/aura-theme/README.md new file mode 100644 index 0000000..ba8ba85 --- /dev/null +++ b/themes/aura-theme/README.md @@ -0,0 +1,101 @@ +# Aura Theme + +Atmospheric reactive glass theme for LastWave Desktop, with six skins and a draggable, resizable **Orbit Deck**. + +## Install + +1. In LastWave open **Settings → Plugins → Install Local Plugin**. +2. Choose **Choose Folder** and pick this `aura-theme` folder (the one containing `manifest.json`). +3. Click **Install & Activate**. + +Needs LastWave 3.0.0 or newer. + +## Skins + +Nebula, Pop-Out, Dusk, Cobalt, Prism and Obsidian. Pick one from the chips on the theme's Store page, from the pills in the Orbit Deck, or press **Alt+S** to cycle. **Prism** takes its colours from the current cover art. + +## Orbit Deck + +A floating player with cover art, live spectrum, transport controls and a like button. + +| Action | How | +| --- | --- | +| Move | Drag the header. It snaps to the window edges. | +| Resize | Drag the bottom-right corner. | +| Show / hide | **Alt+A**, the ✕ button, or the sparkle button in the player bar | +| Focus stage | **Alt+F** or the ◎ button | +| Bars / ring visualizer | The ◈ button | +| Scroll the skin pills | Mouse wheel over them | + +The deck hides itself while the Mini Player is open, and docks into a compact strip in very small windows. Shortcuts are ignored while you are typing in a text field. + +## Mini Player widget modes + +When the Mini Player window opens, Aura draws its own compact card there. The icon row on the top-left switches the card between widget looks; the choice is remembered across restarts. + +| Look | Replicates | +| --- | --- | +| ◉ Vinyl | Vinyl Spinner: spinning record with the cover label, tonearm, RPM readout and progress bar | +| ▣ Cassette | Cassette Deck: reels that wind with progress and a PLAY / PAUSE timer | +| >_ Terminal | Terminal Log: green-phosphor command lines with ASCII progress and elapsed time | +| ♥ Pet | Wavegotchi: pixel pet that dances while playing and naps when paused | +| ◍ Deck | Aura Orbit Deck: spinning platter, spectrum bars and codec pill | + +Every look keeps previous / play-pause / like, a click-to-seek progress strip, and window controls (minimize, expand to window, close). + +**Lyrics switch:** the `Lyrics` pill on the top-right toggles a lyric strip under the stage. Synced lines follow the playback position; plain (unsynced) lyrics rotate while playing; instrumental tracks show the `♪︎` glyph. The switch state persists. + +Tip: for the most room, set **Settings → Playback → Mini Player Style** to *Compact strip* or *Ambient wide*. If the theme script fails to mount, the app's native mini player stays visible as a fallback. + +## Notes + +- Your skin choice is remembered across restarts. The theme stores it itself, so it works on every LastWave 3.0.0+ build; a skin picked on the theme's Store page still wins the first time you install. +- Animation is switched off when your system is set to reduce motion, and the visualiser rests when Performance Mode is on. + +## Changelog + +### 2.1.4 +- Added packaged screenshot `preview.jpg` and declared it in `manifest.json` → `previews` so the theme card/detail view can show the themed main window with the Mini Player card. + +### 2.1.3 +- **Fixed (root cause):** mini snapshot was reading `LastWave.getCurrentTrack/isPlaying/getPosition` directly; these live under `LastWave.player`, so the card always saw "no track / paused" — the play icon never flipped and lyrics were never requested. Now reads `LastWave.player.*`. +- **Lyrics:** subscribes to the app's `lyrics-partial` Tauri events and adopts its fetched lines, in addition to the theme's own `lyrics_fetch`; empty results now show `No lyrics found` instead of a bare note glyph. + +### 2.1.2 +- **Fixed:** play/pause button now flips its icon immediately on click and on `playState` events. +- **Fixed:** minimize and close buttons reuse the app's native mini-player glyph handlers (with a Tauri `plugin:window:*` fallback), so they actually minimize and close. +- **Fixed:** lyrics strip always renders text when the switch is on (`Loading lyrics…`, native lyric line fallback, `No lyrics found`, `♪︎ instrumental`); fetch failures log to the console instead of failing silently. +- **Fixed:** deck wiring is error-isolated and the frame loop no longer depends on the mini-window detection heuristic, so a failure in one look cannot freeze the card. + +### 2.1.1 +- **Fixed:** the mini card now refreshes from `progress` / `playState` / `trackChange` events as well as the frame loop, so times, progress and the play button stay live; unknown durations show `--:--` instead of a frozen `0:00 / 0:00`. +- **Fixed:** vinyl disc rotation is CSS-driven while playing; per-look frame errors are isolated so one failing look cannot freeze the whole card. +- **Fixed:** the lyrics strip shows `Loading lyrics…`, `No lyrics found` or the instrumental marker instead of staying blank; click-to-seek falls back to the track's own duration; event listeners are removed when the card closes. + +### 2.1.0 +- **Added:** Mini Player widget modes — the mini window now renders a card that matches the Vinyl Spinner, Cassette Deck, Terminal Log, Wavegotchi, or the Aura Orbit Deck widget; switch looks from the icon row on the card, and the choice persists. +- **Added:** on-card **Lyrics switch** that shows or hides the current lyric line: synced lines track playback, plain lyrics rotate while playing, instrumentals show `♪︎`. +- **Improved:** the mini card provides transport, like, click-to-seek progress and window controls; the app's native mini player remains as a fallback when the theme card does not mount. + +### 2.0.3 +- **Fixed:** the skin picked in the deck now actually survives a restart. LastWave has no `LastWave.theme.setVariant`, and its own variant (defaulting to Nebula) overrode the saved choice on every start; the theme now restores its own saved skin first and only follows the app's variant when nothing is saved yet. +- **Fixed:** in very small windows the compact deck strip overflowed — the visualiser canvas fed its own pixel size back into its layout and ballooned the stage far past the 76 px strip. The stage, telemetry column and canvas now get definite heights. +- **Fixed:** `--lw-scrollbar-thumb` was a gradient; the app also feeds that token to `scrollbar-color`, which only accepts colours, so the declaration was dropped. It's a colour now. +- **Fixed:** play buttons and the active skin pill used hard-coded white text; they now use the skin's `on-accent` colour, which keeps contrast on the pale Cobalt accent and the dark-on-light Pop-Out/Obsidian accents. +- **Fixed:** the visualiser read only the first 28 of the 48 spectrum bands, so the top half of the spectrum was never shown. Bars now average slices across all bands. +- **Fixed:** the visualiser kept animating its idle wave while music played with Performance Mode on (where the app stops spectrum frames); it now rests, per LastWave's theme guidance. +- **Fixed:** Prism's cover-art colours silently never updated when the artwork host sends no CORS headers; it now falls back to the track's own accent colour. +- **Fixed:** the visualiser toggle button now reports its state (`aria-pressed`), and the platter clears when nothing is playing. +- **Improved:** the deck has CSS fallback geometry, so it never flashes unpositioned before the script lays it out. + +### 2.0.2 +- **Fixed:** the manifest now follows LastWave's plugin format (`type`, `entry`, `script`, `apiVersion: 1`). It previously failed to install with "Invalid local manifest.json". +- **Fixed:** the skin picked in the deck is now saved, so it no longer reverts to Nebula on restart. +- **Fixed:** the Prism and Obsidian pills were unreachable at the default deck size; the pill row now scrolls with the wheel, shows an edge fade, and centres the active skin. +- **Fixed:** a hidden deck stays out of the tab order; the deck's size no longer depends on the app's global `box-sizing`. +- **Fixed:** Alt shortcuts work on macOS (they used the typed character, which Alt changes) and no longer fire while typing in a field. +- **Improved:** keyboard focus rings, labelled and toggle-aware deck buttons, reduced-motion support, and sanitising of saved or cross-window state. +- **Improved:** mini-player detection runs once per frame instead of on every DOM change, and the bass glow only updates when its value changes. + +### 2.0.1 +- Orbit Deck is removed while the Mini Player is open and restored afterwards. diff --git a/themes/aura-theme/manifest.json b/themes/aura-theme/manifest.json new file mode 100644 index 0000000..b04f36c --- /dev/null +++ b/themes/aura-theme/manifest.json @@ -0,0 +1,24 @@ +{ + "id": "aura-theme", + "name": "Aura Theme", + "type": "theme", + "version": "2.1.4", + "apiVersion": 1, + "minAppVersion": "3.0.0", + "author": { "name": "Pol Daniel Bordoy" }, + "description": "Atmospheric reactive glass theme with six skins and a draggable, resizable Orbit Deck. The Mini Player can now match any plugin-widget look (vinyl, cassette, terminal, pet, deck) with an on-card lyrics switch.", + "tags": ["glass", "dark", "purple", "reactive", "visualizer", "custom-ui", "mini-player", "widget", "lyrics"], + "previews": ["preview.jpg"], + "swatch": ["#0b0914", "#18132b", "#9d6bff", "#ff6b9d"], + "variants": [ + { "id": "nebula", "name": "Nebula", "swatch": ["#0b0914", "#18132b", "#9d6bff"] }, + { "id": "popout", "name": "Pop-Out", "swatch": ["#120d18", "#241930", "#ff7a59"] }, + { "id": "dusk", "name": "Dusk", "swatch": ["#130e1d", "#221733", "#e056fd"] }, + { "id": "cobalt", "name": "Cobalt", "swatch": ["#060d17", "#0f213b", "#38bdf8"] }, + { "id": "prism", "name": "Prism", "swatch": ["#0c0a16", "#1c1733", "#9d6bff"] }, + { "id": "obsidian", "name": "Obsidian", "swatch": ["#000000", "#0d0c14", "#b185ff"] } + ], + "updatedAt": "2026-12-04", + "entry": "theme.css", + "script": "theme.js" +} diff --git a/themes/aura-theme/preview.jpg b/themes/aura-theme/preview.jpg new file mode 100644 index 0000000..f7a0ff8 Binary files /dev/null and b/themes/aura-theme/preview.jpg differ diff --git a/themes/aura-theme/theme.css b/themes/aura-theme/theme.css new file mode 100644 index 0000000..2506698 --- /dev/null +++ b/themes/aura-theme/theme.css @@ -0,0 +1,1469 @@ +:root, +:root[data-lw-theme-variant="nebula"], +:root[data-aura-skin="nebula"] { + color-scheme: dark; + --aura-bg-base: #0b0914; + --aura-bg-deep: #07050e; + --aura-bg-elevated: #18132b; + --aura-bg-surface: #120e22; + --aura-bg-overlay: #211a3b; + --aura-bg-glass: rgba(22, 17, 42, 0.72); + --aura-bg-pill: rgba(157, 107, 255, 0.16); + --aura-border: rgba(182, 146, 255, 0.24); + --aura-border-soft: rgba(182, 146, 255, 0.12); + --aura-border-strong: rgba(255, 107, 157, 0.52); + --aura-primary: #9d6bff; + --aura-secondary: #ff6b9d; + --aura-tertiary: #5ce1e6; + --aura-on-primary: #ffffff; + --aura-text: #f5f2ff; + --aura-text-muted: #aba1ca; + --aura-text-subtle: #8278a3; + --aura-glow: rgba(157, 107, 255, 0.42); + --aura-bass-glow: rgba(255, 107, 157, 0.55); + --aura-shadow: 0 22px 54px rgba(4, 2, 12, 0.74); + --aura-blur: 22px; + --aura-radius: 18px; + --aura-bass-level: 0; +} + +:root[data-lw-theme-variant="popout"], +:root[data-aura-skin="popout"] { + color-scheme: dark; + --aura-bg-base: #120d18; + --aura-bg-deep: #0b0810; + --aura-bg-elevated: #241930; + --aura-bg-surface: #1b1325; + --aura-bg-overlay: #302140; + --aura-bg-glass: rgba(34, 23, 46, 0.80); + --aura-bg-pill: rgba(255, 122, 89, 0.18); + --aura-border: rgba(255, 159, 104, 0.28); + --aura-border-soft: rgba(255, 159, 104, 0.14); + --aura-border-strong: rgba(255, 209, 102, 0.58); + --aura-primary: #ff7a59; + --aura-secondary: #ffd166; + --aura-tertiary: #ff5d8f; + --aura-on-primary: #140b08; + --aura-text: #fff8f3; + --aura-text-muted: #cfb8ae; + --aura-text-subtle: #9e867c; + --aura-glow: rgba(255, 122, 89, 0.46); + --aura-bass-glow: rgba(255, 209, 102, 0.56); + --aura-shadow: 0 26px 60px rgba(0, 0, 0, 0.82), 0 0 0 1px rgba(255, 122, 89, 0.22); + --aura-blur: 18px; + --aura-radius: 20px; +} + +:root[data-lw-theme-variant="dusk"], +:root[data-aura-skin="dusk"] { + color-scheme: dark; + --aura-bg-base: #130e1d; + --aura-bg-deep: #0c0813; + --aura-bg-elevated: #221733; + --aura-bg-surface: #1a1228; + --aura-bg-overlay: #2c1e42; + --aura-bg-glass: rgba(31, 21, 48, 0.74); + --aura-bg-pill: rgba(224, 86, 253, 0.16); + --aura-border: rgba(224, 86, 253, 0.24); + --aura-border-soft: rgba(224, 86, 253, 0.12); + --aura-border-strong: rgba(255, 138, 128, 0.50); + --aura-primary: #e056fd; + --aura-secondary: #ff8a80; + --aura-tertiary: #f8a5c2; + --aura-on-primary: #ffffff; + --aura-text: #fcf4ff; + --aura-text-muted: #bba2c9; + --aura-text-subtle: #8e759c; + --aura-glow: rgba(224, 86, 253, 0.38); + --aura-bass-glow: rgba(255, 138, 128, 0.48); + --aura-shadow: 0 20px 48px rgba(8, 4, 16, 0.76); + --aura-blur: 24px; + --aura-radius: 18px; +} + +:root[data-lw-theme-variant="cobalt"], +:root[data-aura-skin="cobalt"] { + color-scheme: dark; + --aura-bg-base: #060d17; + --aura-bg-deep: #04080f; + --aura-bg-elevated: #0f213b; + --aura-bg-surface: #0b182c; + --aura-bg-overlay: #152c4d; + --aura-bg-glass: rgba(13, 29, 52, 0.76); + --aura-bg-pill: rgba(56, 189, 248, 0.16); + --aura-border: rgba(56, 189, 248, 0.26); + --aura-border-soft: rgba(56, 189, 248, 0.13); + --aura-border-strong: rgba(52, 211, 153, 0.52); + --aura-primary: #38bdf8; + --aura-secondary: #34d399; + --aura-tertiary: #818cf8; + --aura-on-primary: #04101c; + --aura-text: #eef8ff; + --aura-text-muted: #93b7d1; + --aura-text-subtle: #698da8; + --aura-glow: rgba(56, 189, 248, 0.42); + --aura-bass-glow: rgba(52, 211, 153, 0.52); + --aura-shadow: 0 20px 50px rgba(2, 8, 18, 0.80); + --aura-blur: 20px; + --aura-radius: 14px; +} + +:root[data-lw-theme-variant="prism"], +:root[data-aura-skin="prism"] { + color-scheme: dark; + --aura-bg-base: #0c0a16; + --aura-bg-deep: #07060e; + --aura-bg-elevated: #1c1733; + --aura-bg-surface: #141026; + --aura-bg-overlay: #261f45; + --aura-bg-glass: rgba(26, 21, 48, 0.66); + --aura-bg-pill: color-mix(in srgb, var(--aura-dynamic-primary, #9d6bff) 20%, transparent); + --aura-border: color-mix(in srgb, var(--aura-dynamic-primary, #9d6bff) 36%, rgba(255, 255, 255, 0.12)); + --aura-border-soft: color-mix(in srgb, var(--aura-dynamic-primary, #9d6bff) 18%, rgba(255, 255, 255, 0.06)); + --aura-border-strong: var(--aura-dynamic-secondary, #ff6b9d); + --aura-primary: var(--aura-dynamic-primary, #9d6bff); + --aura-secondary: var(--aura-dynamic-secondary, #ff6b9d); + --aura-tertiary: #7dd3fc; + --aura-on-primary: #ffffff; + --aura-text: #ffffff; + --aura-text-muted: #bcb6d6; + --aura-text-subtle: #8b85a8; + --aura-glow: color-mix(in srgb, var(--aura-dynamic-primary, #9d6bff) 46%, transparent); + --aura-bass-glow: color-mix(in srgb, var(--aura-dynamic-secondary, #ff6b9d) 56%, transparent); + --aura-shadow: 0 24px 60px rgba(0, 0, 0, 0.76); + --aura-blur: 28px; + --aura-radius: 20px; +} + +:root[data-lw-theme-variant="obsidian"], +:root[data-aura-skin="obsidian"] { + color-scheme: dark; + --aura-bg-base: #000000; + --aura-bg-deep: #000000; + --aura-bg-elevated: #0d0c14; + --aura-bg-surface: #07070c; + --aura-bg-overlay: #161422; + --aura-bg-glass: rgba(10, 9, 16, 0.90); + --aura-bg-pill: rgba(177, 133, 255, 0.14); + --aura-border: rgba(255, 255, 255, 0.12); + --aura-border-soft: rgba(255, 255, 255, 0.07); + --aura-border-strong: rgba(255, 107, 157, 0.48); + --aura-primary: #b185ff; + --aura-secondary: #ff6b9d; + --aura-tertiary: #38bdf8; + --aura-on-primary: #090612; + --aura-text: #f8f7fc; + --aura-text-muted: #948fa6; + --aura-text-subtle: #69647a; + --aura-glow: rgba(177, 133, 255, 0.34); + --aura-bass-glow: rgba(255, 107, 157, 0.45); + --aura-shadow: 0 18px 44px rgba(0, 0, 0, 0.96); + --aura-blur: 16px; + --aura-radius: 16px; +} + +:root { + --lw-bg: var(--aura-bg-base); + --lw-glass-veil: var(--aura-bg-base); + --lw-bg-deep: var(--aura-bg-deep); + --lw-bg-base: var(--aura-bg-base); + --lw-surface: var(--aura-bg-surface); + --lw-surface-raised: var(--aura-bg-elevated); + --lw-surface-overlay: var(--aura-bg-overlay); + --lw-bg-elevated: var(--aura-bg-elevated); + + --lw-panel-translucent: color-mix(in srgb, var(--aura-bg-elevated) 86%, transparent); + --lw-dock-translucent: color-mix(in srgb, var(--aura-bg-surface) 92%, transparent); + --lw-rail-translucent: color-mix(in srgb, var(--aura-bg-base) 88%, transparent); + + --lw-outline: var(--aura-border); + --lw-outline-soft: var(--aura-border-soft); + --lw-divider: var(--aura-border-soft); + + --lw-text-primary: var(--aura-text); + --lw-text-secondary: var(--aura-text-muted); + --lw-text-tertiary: var(--aura-text-subtle); + + --lw-accent: var(--aura-primary); + --lw-accent-ink: var(--aura-primary); + --lw-on-accent: var(--aura-on-primary); + --lw-accent-subtle: var(--aura-bg-pill); + --lw-focus-ring: color-mix(in srgb, var(--aura-primary) 82%, transparent); + + --lw-wash-hover: color-mix(in srgb, var(--aura-primary) 10%, rgba(255, 255, 255, 0.04)); + --lw-wash-pressed: color-mix(in srgb, var(--aura-primary) 18%, rgba(255, 255, 255, 0.06)); + --lw-control-fill: color-mix(in srgb, var(--aura-primary) 8%, rgba(255, 255, 255, 0.04)); + --lw-control-fill-hover: color-mix(in srgb, var(--aura-primary) 14%, rgba(255, 255, 255, 0.06)); + --lw-control-stroke: var(--aura-border-soft); + --lw-control-stroke-bottom: var(--aura-border); + --lw-card-fill: color-mix(in srgb, var(--aura-bg-elevated) 72%, transparent); + --lw-card-fill-secondary: color-mix(in srgb, var(--aura-bg-surface) 64%, transparent); + --lw-card-stroke: var(--aura-border-soft); + + /* A colour token, not a gradient: the app also feeds it to `scrollbar-color`, + which rejects images and would drop the whole declaration. */ + --lw-scrollbar-thumb: color-mix(in srgb, var(--aura-primary) 55%, transparent); + accent-color: var(--aura-primary); +} + +[data-lw="app-shell"] { + background-color: var(--aura-bg-base) !important; + background-image: + radial-gradient(circle at 12% 10%, color-mix(in srgb, var(--aura-primary) 18%, transparent) 0%, transparent 45%), + radial-gradient(circle at 88% 88%, color-mix(in srgb, var(--aura-secondary) 15%, transparent) 0%, transparent 48%) !important; +} + +:root[data-lw-theme-variant="obsidian"] [data-lw="app-shell"], +:root[data-aura-skin="obsidian"] [data-lw="app-shell"] { + background-image: none !important; +} + +[data-lw="title-bar"] { + background: color-mix(in srgb, var(--aura-bg-base) 84%, transparent) !important; + border-bottom: 1px solid var(--aura-border-soft); +} + +[data-lw="sidebar"].rail { + box-shadow: inset -1px 0 0 0 var(--aura-border-soft) !important; +} + +[data-lw="sidebar-item"][data-active="true"] { + background: var(--aura-bg-pill) !important; + color: var(--aura-text) !important; +} + +[data-lw="sidebar-item"][data-active="true"]::before { + background: linear-gradient(180deg, var(--aura-primary), var(--aura-secondary)) !important; +} + +[data-lw="player-bar"].player-dock { + --lw-dock-edge: var(--aura-border); + box-shadow: + inset 0 1px 0 0 var(--aura-border), + 0 -8px 28px color-mix(in srgb, var(--aura-primary) 10%, transparent) !important; +} + +[data-lw="player-bar"].player-dock > .dock-backdrop { + background: color-mix(in srgb, var(--aura-bg-elevated) 88%, transparent) !important; + backdrop-filter: blur(var(--aura-blur)) saturate(145%); +} + +[data-lw="player-bar"] .dock-play { + background: linear-gradient(135deg, var(--aura-primary), var(--aura-secondary)) !important; + color: var(--lw-on-accent, #ffffff) !important; + box-shadow: 0 4px 16px var(--aura-glow) !important; +} + +body.aura-in-mini-player { + background: var(--aura-bg-base) !important; + overflow: hidden !important; +} + +body.aura-in-mini-player .aura-orbit-deck, +[data-lw="mini-player"] ~ .aura-orbit-deck, +body:has([data-lw="mini-player"]) .aura-orbit-deck { + display: none !important; + visibility: hidden !important; + opacity: 0 !important; + pointer-events: none !important; +} + +[data-lw="mini-player"] { + background: + radial-gradient(circle at 10% 15%, color-mix(in srgb, var(--aura-primary) 22%, transparent) 0%, transparent 55%), + radial-gradient(circle at 92% 85%, color-mix(in srgb, var(--aura-secondary) 18%, transparent) 0%, transparent 55%), + var(--aura-bg-elevated) !important; + border-color: var(--aura-border-strong) !important; + box-shadow: + inset 0 0 0 1px var(--aura-border), + inset 0 0 calc(10px + (var(--aura-bass-level) * 20px)) var(--aura-bass-glow) !important; + color: var(--aura-text) !important; + transition: box-shadow 0.08s linear, border-color 0.25s ease; +} + +:root[data-lw-theme-variant="obsidian"] [data-lw="mini-player"], +:root[data-aura-skin="obsidian"] [data-lw="mini-player"] { + background: #000000 !important; +} + +[data-lw="mini-player"] .mini-ambient-shade { + background: + linear-gradient( + 115deg, + color-mix(in srgb, var(--aura-bg-base) 74%, transparent), + color-mix(in srgb, var(--aura-bg-elevated) 54%, transparent) + ), + radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--aura-primary) 26%, transparent), transparent 65%) !important; +} + +[data-lw="mini-player"] .mini-card-shade { + background: linear-gradient( + to top, + color-mix(in srgb, var(--aura-bg-base) 94%, #000) 0%, + color-mix(in srgb, var(--aura-bg-base) 52%, transparent) 42%, + transparent 68% + ) !important; +} + +[data-lw="mini-player"] [data-lw="mini-player-lyrics"] { + background: color-mix(in srgb, var(--aura-primary) 16%, rgba(0, 0, 0, 0.34)) !important; + border: 1px solid var(--aura-border) !important; + color: var(--aura-text) !important; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28); +} + +[data-lw="mini-player"] .mini-play { + background: linear-gradient(135deg, var(--aura-primary), var(--aura-secondary)) !important; + color: var(--lw-on-accent, #ffffff) !important; + box-shadow: 0 3px 12px var(--aura-glow) !important; +} + +[data-lw="mini-player"] .mini-progress-fill { + background: linear-gradient(90deg, var(--aura-primary), var(--aura-secondary)) !important; + box-shadow: 0 0 8px var(--aura-bass-glow); +} + +[data-lw="mini-player"] .mini-glyph:hover { + background: var(--aura-bg-pill) !important; + color: var(--aura-text) !important; +} + +body.aura-compact-docked:not(.aura-in-mini-player) .aura-orbit-deck { + left: 12px !important; + right: 12px !important; + top: auto !important; + bottom: 78px !important; + width: calc(100vw - 24px) !important; + height: 76px !important; + min-width: 0 !important; + min-height: 76px !important; + border-radius: 16px !important; + padding: 8px 14px !important; +} + +body.aura-compact-docked:not(.aura-in-mini-player) .aura-deck-header, +body.aura-compact-docked:not(.aura-in-mini-player) .aura-resize-handle { + display: none !important; +} + +body.aura-compact-docked:not(.aura-in-mini-player) .aura-deck-body { + padding-top: 0 !important; + flex-direction: row !important; + align-items: center !important; + min-height: 0 !important; + overflow: hidden !important; +} + +/* The strip has a fixed 76px height, so the stage and the canvas need definite heights: + with auto heights the canvas's own pixel buffer fed back into its layout and the stage + ballooned far past the strip. */ +body.aura-compact-docked:not(.aura-in-mini-player) .aura-deck-stage { + flex: 1 1 auto !important; + height: 100% !important; + min-height: 0 !important; + min-width: 0 !important; +} + +body.aura-compact-docked:not(.aura-in-mini-player) .aura-telemetry-col { + height: 100% !important; + min-height: 0 !important; +} + +body.aura-compact-docked:not(.aura-in-mini-player) .aura-eq-canvas { + flex: 1 1 0 !important; + height: auto !important; + min-height: 0 !important; +} + +body.aura-compact-docked:not(.aura-in-mini-player) .aura-platter-wrap { + width: 48px !important; + height: 48px !important; +} + +body.aura-focus-stage [data-lw="sidebar"] { + opacity: 0 !important; + pointer-events: none !important; + flex-basis: 0px !important; + width: 0px !important; +} + +body.aura-focus-stage [data-lw="main-stage"] { + max-width: 1020px; + margin-inline: auto; +} + +.aura-orbit-deck { + box-sizing: border-box; + position: fixed; + z-index: 45; + /* Fallback geometry until the script positions the deck (and if it ever fails to). */ + right: 24px; + bottom: 88px; + width: 392px; + height: 204px; + display: flex; + flex-direction: column; + justify-content: space-between; + background: var(--aura-bg-glass); + backdrop-filter: blur(var(--aura-blur)) saturate(160%); + -webkit-backdrop-filter: blur(var(--aura-blur)) saturate(160%); + border: 1px solid var(--aura-border); + border-radius: var(--aura-radius); + box-shadow: + var(--aura-shadow), + 0 0 calc(8px + (var(--aura-bass-level) * 22px)) var(--aura-glow); + color: var(--aura-text); + padding: 11px 14px; + user-select: none; + overflow: hidden; + transition: + opacity 0.2s ease, + transform 0.2s ease, + border-color 0.25s ease; +} + +.aura-orbit-deck:hover { + border-color: var(--aura-border-strong); +} + +.aura-orbit-deck.is-hidden { + opacity: 0; + pointer-events: none; + + visibility: hidden; + transition: + opacity 0.2s ease, + transform 0.2s ease, + visibility 0s linear 0.2s; + transform: scale(0.96) translateY(8px); +} + +.aura-deck-header { + display: flex; + align-items: center; + justify-content: space-between; + gap: 6px; + cursor: grab; + padding-bottom: 7px; + border-bottom: 1px solid rgba(255, 255, 255, 0.07); +} + +.aura-deck-header:active { + cursor: grabbing; +} + +.aura-brand-badge { + display: inline-flex; + align-items: center; + gap: 6px; + font-size: 10.5px; + font-weight: 700; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--aura-text); + flex-shrink: 0; +} + +.aura-brand-dot { + width: 8px; + height: 8px; + border-radius: 50%; + background: linear-gradient(135deg, var(--aura-primary), var(--aura-secondary)); + box-shadow: 0 0 10px var(--aura-secondary); +} + +.aura-skin-pills { + display: flex; + align-items: center; + gap: 2px; + background: rgba(0, 0, 0, 0.30); + padding: 2px; + border-radius: 999px; + border: 1px solid rgba(255, 255, 255, 0.07); + overflow-x: auto; + scrollbar-width: none; +} + +.aura-skin-pills::-webkit-scrollbar { + display: none; +} + +.aura-skin-pills { + position: relative; + min-width: 0; +} + +.aura-skin-pills.fade-end { + -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); + mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); +} + +.aura-skin-pills.fade-start { + -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 22px), transparent); + mask-image: linear-gradient(270deg, #000 calc(100% - 22px), transparent); +} + +.aura-skin-pills.fade-start.fade-end { + -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent); + mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent); +} + +.aura-pill-btn { + appearance: none; + border: none; + background: transparent; + color: var(--aura-text-muted); + font-size: 9.5px; + font-weight: 600; + padding: 3px 7px; + border-radius: 999px; + cursor: pointer; + white-space: nowrap; + transition: all 0.16s ease; +} + +.aura-pill-btn:hover { + color: var(--aura-text); +} + +.aura-pill-btn.active { + background: linear-gradient(135deg, var(--aura-primary), var(--aura-secondary)); + color: var(--aura-on-primary, #ffffff); + box-shadow: 0 2px 10px var(--aura-glow); +} + +.aura-header-actions { + display: flex; + align-items: center; + gap: 3px; + flex-shrink: 0; +} + +.aura-icon-btn { + appearance: none; + border: 1px solid transparent; + background: rgba(255, 255, 255, 0.06); + color: var(--aura-text-muted); + border-radius: 7px; + width: 22px; + height: 22px; + display: inline-flex; + align-items: center; + justify-content: center; + font-size: 11px; + cursor: pointer; + transition: all 0.15s ease; +} + +.aura-icon-btn:hover, +.aura-icon-btn.active { + color: var(--aura-text); + background: var(--aura-bg-pill); + border-color: var(--aura-border-strong); +} + +.aura-deck-body { + display: flex; + flex-direction: column; + gap: 8px; + flex: 1; + min-height: 0; + padding-top: 8px; +} + +.aura-deck-stage { + display: flex; + align-items: center; + gap: 12px; + flex: 1; + min-height: 0; +} + +.aura-platter-wrap { + position: relative; + width: 82px; + height: 82px; + flex-shrink: 0; + display: flex; + align-items: center; + justify-content: center; +} + +.aura-orbital-ring { + position: absolute; + inset: -4px; + border-radius: 50%; + border: 1.5px dashed color-mix(in srgb, var(--aura-primary) 58%, transparent); + animation: aura-spin 16s linear infinite reverse; + pointer-events: none; +} + +.aura-platter { + position: relative; + width: 100%; + height: 100%; + border-radius: 50%; + background: + radial-gradient(circle at center, #090710 0 18%, transparent 19%), + conic-gradient(from 0deg, var(--aura-primary), var(--aura-secondary), var(--aura-tertiary), var(--aura-primary)); + padding: 3px; + box-shadow: + 0 8px 22px rgba(0, 0, 0, 0.55), + 0 0 calc(6px + (var(--aura-bass-level) * 18px)) var(--aura-bass-glow); + animation: aura-spin 9s linear infinite; + animation-play-state: paused; +} + +.aura-orbit-deck.is-playing .aura-platter { + animation-play-state: running; +} + +.aura-platter-art { + width: 100%; + height: 100%; + border-radius: 50%; + object-fit: cover; + display: block; + background: #141024; +} + +.aura-platter-spindle { + position: absolute; + top: 50%; + left: 50%; + width: 15px; + height: 15px; + transform: translate(-50%, -50%); + border-radius: 50%; + background: var(--aura-bg-base); + border: 2px solid var(--aura-secondary); + box-shadow: 0 0 8px var(--aura-bass-glow); +} + +@keyframes aura-spin { + to { + transform: rotate(360deg); + } +} + +.aura-telemetry-col { + display: flex; + flex-direction: column; + justify-content: space-between; + flex: 1; + min-width: 0; + height: 100%; + gap: 6px; +} + +.aura-meta-row { + display: flex; + align-items: center; + justify-content: space-between; + gap: 6px; +} + +.aura-meta-text { + min-width: 0; + flex: 1; +} + +.aura-track-title { + font-size: 12.5px; + font-weight: 700; + color: var(--aura-text); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.aura-track-artist { + font-size: 11px; + color: var(--aura-text-muted); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.aura-codec-pill { + font-size: 9px; + font-weight: 700; + letter-spacing: 0.04em; + padding: 2px 6px; + border-radius: 6px; + background: var(--aura-bg-pill); + border: 1px solid var(--aura-border); + color: var(--aura-text); + flex-shrink: 0; +} + +.aura-eq-canvas { + width: 100%; + flex: 1; + min-height: 32px; + border-radius: 10px; + background: rgba(0, 0, 0, 0.25); + border: 1px solid rgba(255, 255, 255, 0.06); +} + +.aura-controls-bar { + display: flex; + align-items: center; + justify-content: space-between; + gap: 8px; +} + +.aura-transport-group { + display: flex; + align-items: center; + gap: 5px; +} + +.aura-play-btn { + appearance: none; + border: none; + width: 28px; + height: 28px; + border-radius: 50%; + background: linear-gradient(135deg, var(--aura-primary), var(--aura-secondary)); + color: var(--aura-on-primary, #ffffff); + font-size: 11px; + font-weight: 700; + cursor: pointer; + display: inline-flex; + align-items: center; + justify-content: center; + box-shadow: 0 4px 14px var(--aura-glow); + transition: transform 0.14s ease; +} + +.aura-play-btn:hover { + transform: scale(1.07); +} + +.aura-action-group { + display: flex; + align-items: center; + gap: 4px; +} + +.aura-chip-btn { + appearance: none; + border: 1px solid var(--aura-border); + background: var(--aura-bg-pill); + color: var(--aura-text); + font-size: 10px; + font-weight: 600; + padding: 3px 8px; + border-radius: 999px; + cursor: pointer; + transition: border-color 0.15s ease, background 0.15s ease; +} + +.aura-chip-btn:hover { + border-color: var(--aura-border-strong); +} + +.aura-resize-handle { + position: absolute; + right: 4px; + bottom: 4px; + width: 13px; + height: 13px; + cursor: nwse-resize; + opacity: 0.65; + background: linear-gradient(135deg, transparent 50%, var(--aura-secondary) 50%); + border-bottom-right-radius: 5px; +} + +.aura-resize-handle:hover { + opacity: 1; +} + +.aura-orbit-deck button:focus-visible { + outline: 2px solid var(--aura-primary); + outline-offset: 2px; +} + +@media (prefers-reduced-motion: reduce) { + .aura-orbital-ring, + .aura-platter { + animation: none !important; + } + + .aura-orbit-deck, + .aura-orbit-deck *, + [data-lw="mini-player"], + [data-lw="mini-player"] * { + transition-duration: 0.01ms !important; + } +} + +/* ========================================================================== + Mini Player widget deck (aura-mini-deck) + The theme draws its own compact card in the Mini Player window. The native + mini-player chrome is neutralised only when this card is mounted + (body.aura-mini-custom); if the theme fails to mount, the native UI stays. + ========================================================================== */ + +body.aura-mini-custom [data-lw="mini-player"] { + background: transparent !important; + border-color: transparent !important; + box-shadow: none !important; +} + +body.aura-mini-custom [data-lw="mini-player"] > * { + visibility: hidden !important; +} + +.aura-mini-deck { + position: fixed; + inset: 0; + z-index: 60; + display: flex; + flex-direction: column; + overflow: hidden; + border-radius: 14px; + background: + radial-gradient(circle at 12% 12%, color-mix(in srgb, var(--aura-primary) 18%, transparent) 0%, transparent 55%), + radial-gradient(circle at 90% 88%, color-mix(in srgb, var(--aura-secondary) 16%, transparent) 0%, transparent 55%), + var(--aura-bg-glass); + backdrop-filter: blur(var(--aura-blur)) saturate(150%); + -webkit-backdrop-filter: blur(var(--aura-blur)) saturate(150%); + border: 1px solid var(--aura-border); + box-shadow: var(--aura-shadow); + color: var(--aura-text); + font-family: inherit; + user-select: none; +} + +.aura-mini-deck button:focus-visible { + outline: 2px solid var(--aura-primary); + outline-offset: 1px; +} + +/* ---- top bar: look switcher + lyrics switch + window glyphs ---- */ + +.aum-top { + display: flex; + align-items: center; + justify-content: space-between; + gap: 6px; + padding: 5px 8px 3px; + min-height: 23px; +} + +.aum-look-switch { + display: flex; + gap: 2px; +} + +.aum-look-btn { + appearance: none; + border: 1px solid transparent; + background: transparent; + color: var(--aura-text-muted); + font-size: 11px; + line-height: 1; + width: 23px; + height: 19px; + border-radius: 6px; + cursor: pointer; + font-family: inherit; +} + +.aum-look-btn:hover { + color: var(--aura-text); + background: var(--aura-bg-pill); +} + +.aum-look-btn.active { + background: var(--aura-bg-pill); + color: var(--aura-text); + border-color: var(--aura-border-strong); +} + +.aum-top-right { + display: flex; + align-items: center; + gap: 4px; +} + +.aum-switch { + appearance: none; + display: inline-flex; + align-items: center; + gap: 5px; + background: rgba(0, 0, 0, 0.28); + border: 1px solid var(--aura-border-soft, var(--aura-border)); + border-radius: 999px; + padding: 2px 8px 2px 5px; + cursor: pointer; + color: var(--aura-text-muted); + font-family: inherit; +} + +.aum-switch[aria-checked="true"] { + background: var(--aura-bg-pill); + color: var(--aura-text); + border-color: var(--aura-border-strong); +} + +.aum-switch-track { + width: 22px; + height: 12px; + border-radius: 999px; + background: rgba(255, 255, 255, 0.16); + position: relative; + transition: background 0.15s ease; + flex: none; +} + +.aum-switch-knob { + position: absolute; + top: 1.5px; + left: 2px; + width: 9px; + height: 9px; + border-radius: 50%; + background: #cfc8e0; + transition: transform 0.15s ease; +} + +.aum-switch[aria-checked="true"] .aum-switch-track { + background: var(--aura-primary); +} + +.aum-switch[aria-checked="true"] .aum-switch-knob { + transform: translateX(10px); + background: #ffffff; +} + +.aum-switch-label { + font-size: 10px; + font-weight: 700; + letter-spacing: 0.04em; +} + +.aum-glyph { + appearance: none; + width: 20px; + height: 19px; + border: 1px solid transparent; + border-radius: 6px; + background: transparent; + color: var(--aura-text-muted); + font-size: 11px; + cursor: pointer; + font-family: inherit; +} + +.aum-glyph:hover { + background: var(--aura-bg-pill); + color: var(--aura-text); +} + +.aum-glyph.danger:hover { + color: #ff8a9a; + border-color: color-mix(in srgb, #ff5c74 40%, transparent); +} + +/* ---- body / shared text ---- */ + +.aum-body { + flex: 1; + min-height: 0; + padding: 2px 10px; +} + +.aum-stage { + display: none; + align-items: center; + gap: 10px; + height: 100%; + min-height: 52px; +} + +.aura-mini-deck[data-look="vinyl"] [data-stage="vinyl"], +.aura-mini-deck[data-look="cassette"] [data-stage="cassette"], +.aura-mini-deck[data-look="terminal"] [data-stage="terminal"], +.aura-mini-deck[data-look="pet"] [data-stage="pet"], +.aura-mini-deck[data-look="deck"] [data-stage="deck"] { + display: flex; +} + +.aum-title { + font-size: 12.5px; + font-weight: 800; + color: var(--aura-text); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 100%; +} + +.aum-artist { + font-size: 10.5px; + font-weight: 600; + color: var(--aura-text-muted); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 100%; +} + +/* ---- vinyl look (Vinyl Spinner widget) ---- */ + +.aum-vs-deck { + position: relative; + flex: none; + width: 56px; + height: 56px; +} + +.aum-vs-disc { + position: absolute; + inset: 0; + border-radius: 50%; + background: repeating-radial-gradient(circle, #141418 0 1.2px, #1d1d23 1.2px 2.4px); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.06); + animation: aum-vinyl-spin 3.2s linear infinite; + animation-play-state: paused; +} + +.aura-mini-deck.is-playing .aum-vs-disc { + animation-play-state: running; +} + +@keyframes aum-vinyl-spin { + to { + transform: rotate(360deg); + } +} + +.aum-vs-label { + position: absolute; + inset: 16px; + border-radius: 50%; + background-size: cover; + background-position: center; + background-color: #1c1830; + box-shadow: 0 0 0 2px #0d0d10; +} + +.aum-vs-hole { + position: absolute; + left: 50%; + top: 50%; + width: 3px; + height: 3px; + transform: translate(-50%, -50%); + border-radius: 50%; + background: #0d0d10; +} + +.aum-vs-arm { + position: absolute; + right: -4px; + top: -2px; + width: 7px; + height: 42px; + transform-origin: 4px 4px; + transform: rotate(18deg); + transition: transform 0.6s ease; +} + +.aum-vs-arm::before { + content: ""; + position: absolute; + left: 2px; + top: 0; + width: 4px; + height: 4px; + border-radius: 50%; + background: #d8d8e0; +} + +.aum-vs-arm::after { + content: ""; + position: absolute; + left: 3px; + top: 3px; + width: 2px; + height: 35px; + background: linear-gradient(#d8d8e0, #8d8d99); + border-radius: 1px; +} + +.aum-vs-meta { + min-width: 0; + flex: 1; + display: flex; + flex-direction: column; + gap: 2px; +} + +.aum-row { + display: flex; + align-items: center; + gap: 6px; + margin-top: 4px; +} + +.aum-rpm { + font: 800 9px/1 Consolas, "SF Mono", monospace; + color: var(--aura-primary); + letter-spacing: 0.6px; + flex: none; +} + +.aum-bar { + flex: 1; + height: 3px; + border-radius: 2px; + background: rgba(255, 255, 255, 0.14); + overflow: hidden; +} + +.aum-fill { + height: 100%; + width: 0; + background: var(--aura-primary); +} + +.aum-time { + font: 700 10px/1 Consolas, "SF Mono", monospace; + color: #9c97b0; + flex: none; +} + +/* ---- cassette look (Cassette Deck widget) ---- */ + +.aum-cc-art { + flex: none; + display: flex; + align-items: center; +} + +.aum-cc-svg { + height: 52px; + width: auto; + display: block; +} + +.aum-cc-meta { + min-width: 0; + flex: 1; + display: flex; + flex-direction: column; + gap: 2px; +} + +.aum-cc-sub { + color: #b9b6ad; +} + +.aum-cc-time { + font: 700 9.5px/1 Consolas, "SF Mono", monospace; + color: #8f8b80; + letter-spacing: 0.5px; + margin-top: 3px; +} + +/* ---- terminal look (Terminal Log widget) ---- */ + +[data-stage="terminal"] { + flex-direction: column; + align-items: stretch; + gap: 2px; + padding: 5px 8px; + border-radius: 10px; + background: #030a05; + border: 1px solid rgba(57, 255, 122, 0.18); + font: 10.5px/13px Consolas, "SF Mono", monospace; +} + +.aum-tl-line { + color: #39ff7a; + text-shadow: 0 0 6px rgba(57, 255, 122, 0.45); + white-space: pre; + overflow: hidden; + text-overflow: ellipsis; +} + +.aum-tl-dim { + color: #1f9c4b; + text-shadow: none; +} + +/* ---- pet look (Wavegotchi widget) ---- */ + +.aum-wg-canvas { + flex: none; + width: 96px; + height: 64px; + image-rendering: pixelated; + border-radius: 9px; + background: #9bbc0f; + box-shadow: inset 0 0 0 3px #306230, inset 0 0 12px rgba(15, 56, 15, 0.45); +} + +.aum-wg-meta { + min-width: 0; + flex: 1; + display: flex; + flex-direction: column; + gap: 2px; + font: 700 10px/1.3 Consolas, "SF Mono", monospace; +} + +.aum-wg-name { + font-size: 11px; + letter-spacing: 0.5px; + color: var(--aura-text); +} + +.aum-wg-mood { + color: #a9b3d6; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.aum-wg-hearts { + color: #ff6b8b; + letter-spacing: 2px; +} + +.aum-wg-stats { + color: #7f89ad; +} + +/* ---- orbit deck look ---- */ + +.aum-platter-wrap { + position: relative; + flex: none; + width: 58px; + height: 58px; + display: flex; + align-items: center; + justify-content: center; +} + +.aum-orbital-ring { + position: absolute; + inset: -3px; + border-radius: 50%; + border: 1.5px dashed color-mix(in srgb, var(--aura-primary) 58%, transparent); + animation: aura-spin 16s linear infinite reverse; +} + +.aum-platter { + position: relative; + width: 100%; + height: 100%; + border-radius: 50%; + padding: 3px; + background: conic-gradient(from 0deg, var(--aura-primary), var(--aura-secondary), var(--aura-tertiary, var(--aura-primary)), var(--aura-primary)); + animation: aura-spin 9s linear infinite; + animation-play-state: paused; +} + +.aura-mini-deck.is-playing .aum-platter { + animation-play-state: running; +} + +.aum-platter-art { + width: 100%; + height: 100%; + border-radius: 50%; + object-fit: cover; + background: #141024; +} + +.aum-platter-spindle { + position: absolute; + top: 50%; + left: 50%; + width: 11px; + height: 11px; + transform: translate(-50%, -50%); + border-radius: 50%; + background: var(--aura-bg-base); + border: 2px solid var(--aura-secondary); +} + +.aum-telemetry-col { + flex: 1; + min-width: 0; + display: flex; + flex-direction: column; + gap: 4px; +} + +.aum-meta-row { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 8px; + min-width: 0; +} + +.aum-meta-text { + min-width: 0; + flex: 1; + display: flex; + flex-direction: column; + gap: 1px; +} + +.aum-track-title { + font-size: 12px; + font-weight: 700; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.aum-track-artist { + font-size: 10.5px; + color: var(--aura-text-muted); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.aum-codec-pill { + font-size: 8.5px; + font-weight: 700; + letter-spacing: 0.04em; + padding: 1px 5px; + border-radius: 6px; + background: var(--aura-bg-pill); + border: 1px solid var(--aura-border); + flex: none; +} + +.aum-eq-canvas { + width: 100%; + height: 24px; + border-radius: 8px; + background: rgba(0, 0, 0, 0.25); + border: 1px solid rgba(255, 255, 255, 0.06); +} + +/* ---- lyrics strip ---- */ + +.aum-lyrics { + display: none; + align-items: center; + gap: 6px; + margin: 0 10px 4px; + padding: 3px 8px; + border-radius: 8px; + background: color-mix(in srgb, var(--aura-primary) 16%, rgba(0, 0, 0, 0.34)); + border: 1px solid var(--aura-border); + font-size: 11px; + color: var(--aura-text); +} + +.aura-mini-deck.lyrics-on .aum-lyrics { + display: flex; +} + +.aum-lyrics-icon { + color: var(--aura-secondary); + font-size: 12px; + flex: none; +} + +.aum-lyrics-text { + min-width: 0; + flex: 1; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-weight: 600; +} + +/* ---- transport bar ---- */ + +.aum-transport { + display: flex; + align-items: center; + gap: 6px; + padding: 4px 10px 6px; +} + +.aum-icon-btn { + appearance: none; + border: 1px solid transparent; + background: rgba(255, 255, 255, 0.06); + color: var(--aura-text-muted); + border-radius: 7px; + width: 24px; + height: 22px; + display: inline-flex; + align-items: center; + justify-content: center; + font-size: 11px; + cursor: pointer; + font-family: inherit; +} + +.aum-icon-btn:hover { + color: var(--aura-text); + background: var(--aura-bg-pill); +} + +.aum-icon-btn.active { + color: #ff86b8; +} + +.aum-play-btn { + appearance: none; + border: none; + width: 28px; + height: 24px; + border-radius: 50%; + background: linear-gradient(135deg, var(--aura-primary), var(--aura-secondary)); + color: #ffffff; + font-size: 10px; + font-weight: 700; + cursor: pointer; + box-shadow: 0 3px 10px var(--aura-glow); + font-family: inherit; +} + +.aum-play-btn:hover { + filter: brightness(1.08); +} + +.aum-progress { + flex: 1; + height: 3px; + border-radius: 2px; + background: rgba(255, 255, 255, 0.14); + overflow: hidden; + cursor: pointer; +} + +.aum-progress-fill { + height: 100%; + width: 0; + background: linear-gradient(90deg, var(--aura-primary), var(--aura-secondary)); +} + +@media (prefers-reduced-motion: reduce) { + .aum-orbital-ring, + .aum-platter, + .aum-vs-disc { + animation: none !important; + } + + .aura-mini-deck, + .aura-mini-deck * { + transition-duration: 0.01ms !important; + } +} diff --git a/themes/aura-theme/theme.js b/themes/aura-theme/theme.js new file mode 100644 index 0000000..dcdcb5e --- /dev/null +++ b/themes/aura-theme/theme.js @@ -0,0 +1,1684 @@ +const SKINS = [ + { id: 'nebula', label: 'Nebula' }, + { id: 'popout', label: 'Pop-Out' }, + { id: 'dusk', label: 'Dusk' }, + { id: 'cobalt', label: 'Cobalt' }, + { id: 'prism', label: 'Prism' }, + { id: 'obsidian', label: 'Obsidian' }, +]; + +// Widget-inspired looks for the Mini Player window. Choosing one on the card +// switches the mini window to that look; the choice is remembered. +const LOOKS = [ + { id: 'vinyl', label: 'Vinyl Spinner' }, + { id: 'cassette', label: 'Cassette Deck' }, + { id: 'terminal', label: 'Terminal Log' }, + { id: 'pet', label: 'Wavegotchi' }, + { id: 'deck', label: 'Orbit Deck' }, +]; + +const DEFAULT_STATE = { + skin: 'nebula', + visualizerMode: 'bars', + deckVisible: true, + focusStage: false, + deck: { + x: null, + y: null, + width: 392, + height: 204, + }, + mini: { + look: 'vinyl', + lyrics: false, + }, +}; + +const clamp = (v, lo, hi, fallback) => + typeof v === 'number' && Number.isFinite(v) ? Math.min(hi, Math.max(lo, v)) : fallback; + +function sanitizeState(raw) { + const out = { ...DEFAULT_STATE, deck: { ...DEFAULT_STATE.deck }, mini: { ...DEFAULT_STATE.mini } }; + if (!raw || typeof raw !== 'object') return out; + if (SKINS.some((k) => k.id === raw.skin)) out.skin = raw.skin; + if (raw.visualizerMode === 'bars' || raw.visualizerMode === 'radial') out.visualizerMode = raw.visualizerMode; + if (typeof raw.deckVisible === 'boolean') out.deckVisible = raw.deckVisible; + if (typeof raw.focusStage === 'boolean') out.focusStage = raw.focusStage; + const d = raw.deck && typeof raw.deck === 'object' ? raw.deck : {}; + out.deck.width = clamp(d.width, 320, 680, DEFAULT_STATE.deck.width); + out.deck.height = clamp(d.height, 176, 440, DEFAULT_STATE.deck.height); + out.deck.x = clamp(d.x, 0, 20000, null); + out.deck.y = clamp(d.y, 0, 20000, null); + const m = raw.mini && typeof raw.mini === 'object' ? raw.mini : {}; + if (LOOKS.some((k) => k.id === m.look)) out.mini.look = m.look; + if (typeof m.lyrics === 'boolean') out.mini.lyrics = m.lyrics; + return out; +} + +const store = LastWave?.storage ? LastWave.storage(pluginId || 'aura-theme') : null; + +function readSavedState() { + try { + const v2 = store?.get('v2_state'); + if (v2 && typeof v2 === 'object') return v2; + for (const key of ['aura_theme_state', 'aura_music_state']) { + const raw = localStorage.getItem(key); + if (raw) { + const legacy = JSON.parse(raw); + if (legacy && typeof legacy === 'object') { + return { + skin: legacy.skin || legacy.activeSkin || 'nebula', + deckVisible: legacy.deckVisible ?? true, + focusStage: legacy.focusStage ?? false, + deck: { + x: legacy.deck?.x ?? legacy.x ?? null, + y: legacy.deck?.y ?? legacy.y ?? null, + width: legacy.deck?.width ?? legacy.width ?? 392, + height: legacy.deck?.height ?? legacy.height ?? 204, + }, + }; + } + } + } + } catch (_) {} + return null; +} + +const savedState = readSavedState(); +const state = sanitizeState(savedState); +// Only fall back to the app's variant when this theme has no skin of its own saved yet; +// the app always reports a variant (its default or the Store chip), so letting it win +// unconditionally would snap the deck back to Nebula on every restart. +const hadSavedSkin = Boolean(savedState) && SKINS.some((s) => s.id === savedState.skin); +const initialStoreVariant = LastWave?.theme?.getVariant?.(); +if (!hadSavedSkin && initialStoreVariant && SKINS.some((s) => s.id === initialStoreVariant)) { + state.skin = initialStoreVariant; +} + +const channel = + typeof BroadcastChannel !== 'undefined' ? new BroadcastChannel('aura-theme-v2-sync') : null; + +function pushSkinToApp() { + const applied = LastWave?.theme?.setVariant?.(state.skin); + + if (!applied) document.documentElement.dataset.lwThemeVariant = state.skin; +} + +function setSkin(id) { + if (!SKINS.some((k) => k.id === id)) return; + const changed = state.skin !== id; + state.skin = id; + if (changed) pushSkinToApp(); + applySkinAndLayout(true); +} + +function persistState() { + try { + store?.set('v2_state', state); + } catch (_) {} + try { + channel?.postMessage({ type: 'AURA_STATE_SYNC', state }); + } catch (_) {} +} + +let lastChromaUrl = ''; +function updateArtworkChroma(url) { + if (!url || url === lastChromaUrl) return; + lastChromaUrl = url; + + const img = new Image(); + img.crossOrigin = 'anonymous'; + img.onload = () => { + try { + const canvas = document.createElement('canvas'); + canvas.width = 16; + canvas.height = 16; + const ctx = canvas.getContext('2d'); + if (!ctx) return; + ctx.drawImage(img, 0, 0, 16, 16); + const { data } = ctx.getImageData(0, 0, 16, 16); + + let r1 = 157, g1 = 107, b1 = 255; + let r2 = 255, g2 = 107, b2 = 157; + let bestSat1 = -1; + let bestSat2 = -1; + + for (let i = 0; i < data.length; i += 4) { + const r = data[i], g = data[i + 1], b = data[i + 2]; + const max = Math.max(r, g, b); + const min = Math.min(r, g, b); + const lum = (max + min) / 2; + if (lum < 36 || lum > 234) continue; + const sat = max === 0 ? 0 : (max - min) / max; + if (sat > bestSat1) { + bestSat2 = bestSat1; + r2 = r1; g2 = g1; b2 = b1; + bestSat1 = sat; + r1 = r; g1 = g; b1 = b; + } else if (sat > bestSat2 && Math.abs(r - r1) + Math.abs(g - g1) > 65) { + bestSat2 = sat; + r2 = r; g2 = g; b2 = b; + } + } + + document.documentElement.style.setProperty('--aura-dynamic-primary', `rgb(${r1}, ${g1}, ${b1})`); + document.documentElement.style.setProperty('--aura-dynamic-secondary', `rgb(${r2}, ${g2}, ${b2})`); + } catch (_) {} + }; + img.onerror = () => { + // Artwork without CORS headers can't be sampled; fall back to the app's art-derived colour. + const accent = LastWave?.player?.getCurrentTrack?.()?.accentColor; + if (accent) { + document.documentElement.style.setProperty('--aura-dynamic-primary', accent); + } + }; + img.src = url; +} + +function isMiniPlayerActive() { + if (document.querySelector('[data-lw="mini-player"]')) return true; + if (!document.querySelector('[data-lw="app-shell"]') && window.innerHeight <= 300 && window.innerWidth <= 540) { + return true; + } + return false; +} + +let deckEl = null; +let canvasEl = null; +let ctx = null; + +function destroyDeck() { + if (deckEl) { + deckEl.remove(); + deckEl = null; + canvasEl = null; + ctx = null; + } + document.getElementById('aura-orbit-deck')?.remove(); +} + +function updatePillFade(pills) { + if (!pills) return; + const max = pills.scrollWidth - pills.clientWidth; + pills.classList.toggle('fade-start', pills.scrollLeft > 2); + pills.classList.toggle('fade-end', max > 2 && pills.scrollLeft < max - 2); +} + +function wireDeckInteractions(el) { + const pills = el.querySelector('#aura-skin-pills'); + pills?.addEventListener( + 'wheel', + (e) => { + + if (Math.abs(e.deltaY) > Math.abs(e.deltaX)) { + pills.scrollLeft += e.deltaY; + e.preventDefault(); + } + }, + { passive: false } + ); + pills?.addEventListener('scroll', () => updatePillFade(pills), { passive: true }); + + el.querySelector('#aura-skin-pills')?.addEventListener('click', (e) => { + const btn = e.target.closest('.aura-pill-btn'); + if (!btn) return; + setSkin(btn.dataset.skin); + }); + + el.querySelector('#aura-vis-btn')?.addEventListener('click', () => { + state.visualizerMode = state.visualizerMode === 'bars' ? 'radial' : 'bars'; + persistState(); + }); + + el.querySelector('#aura-focus-btn')?.addEventListener('click', () => { + state.focusStage = !state.focusStage; + applySkinAndLayout(true); + }); + + el.querySelector('#aura-hide-btn')?.addEventListener('click', () => { + state.deckVisible = false; + applySkinAndLayout(true); + }); + + el.querySelector('#aura-play-btn')?.addEventListener('click', () => { + LastWave?.player?.togglePlay?.(); + syncTrackUI(); + }); + + el.querySelector('#aura-prev-btn')?.addEventListener('click', () => { + LastWave?.player?.previous?.(); + }); + + el.querySelector('#aura-next-btn')?.addEventListener('click', () => { + LastWave?.player?.next?.(); + }); + + el.querySelector('#aura-like-btn')?.addEventListener('click', () => { + LastWave?.library?.toggleLike?.(); + syncTrackUI(); + }); + + el.querySelector('#aura-stage-btn')?.addEventListener('click', () => { + LastWave?.nav?.navigate?.('/now-playing'); + }); + + el.querySelector('#aura-mini-btn')?.addEventListener('click', () => { + LastWave?.window?.toggleMiniPlayer?.(); + }); + + const dragHeader = el.querySelector('#aura-deck-drag'); + let dragging = false; + let startX = 0, startY = 0, origX = 0, origY = 0; + + dragHeader?.addEventListener('pointerdown', (e) => { + if (e.target.closest('button')) return; + dragging = true; + startX = e.clientX; + startY = e.clientY; + const rect = el.getBoundingClientRect(); + origX = rect.left; + origY = rect.top; + dragHeader.setPointerCapture(e.pointerId); + }); + + dragHeader?.addEventListener('pointermove', (e) => { + if (!dragging) return; + const maxX = window.innerWidth - state.deck.width - 12; + const maxY = window.innerHeight - state.deck.height - 76; + let nx = Math.min(Math.max(12, origX + (e.clientX - startX)), Math.max(12, maxX)); + let ny = Math.min(Math.max(52, origY + (e.clientY - startY)), Math.max(52, maxY)); + + if (Math.abs(nx - 16) < 18) nx = 16; + if (Math.abs(nx - maxX) < 18) nx = maxX; + if (Math.abs(ny - 56) < 18) ny = 56; + if (Math.abs(ny - maxY) < 18) ny = maxY; + + state.deck.x = nx; + state.deck.y = ny; + el.style.left = `${nx}px`; + el.style.top = `${ny}px`; + }); + + const endDrag = () => { + if (!dragging) return; + dragging = false; + persistState(); + }; + dragHeader?.addEventListener('pointerup', endDrag); + dragHeader?.addEventListener('pointercancel', endDrag); + + const resizeHandle = el.querySelector('#aura-resize-handle'); + let resizing = false; + let rStartX = 0, rStartY = 0, origW = 0, origH = 0; + + resizeHandle?.addEventListener('pointerdown', (e) => { + e.stopPropagation(); + resizing = true; + rStartX = e.clientX; + rStartY = e.clientY; + origW = state.deck.width; + origH = state.deck.height; + resizeHandle.setPointerCapture(e.pointerId); + }); + + resizeHandle?.addEventListener('pointermove', (e) => { + if (!resizing) return; + const nw = Math.min(Math.max(320, origW + (e.clientX - rStartX)), 680); + const nh = Math.min(Math.max(176, origH + (e.clientY - rStartY)), 440); + state.deck.width = nw; + state.deck.height = nh; + el.style.width = `${nw}px`; + el.style.height = `${nh}px`; + }); + + const endResize = () => { + if (!resizing) return; + resizing = false; + persistState(); + }; + resizeHandle?.addEventListener('pointerup', endResize); + resizeHandle?.addEventListener('pointercancel', endResize); +} + +function ensureDeck() { + if (isMiniPlayerActive()) { + destroyDeck(); + return; + } + if (deckEl && document.body.contains(deckEl)) return; + + destroyDeck(); + const el = document.createElement('aside'); + el.id = 'aura-orbit-deck'; + el.className = 'aura-orbit-deck'; + el.setAttribute('aria-label', 'Aura Orbit Deck v2'); + el.innerHTML = ` +