···11+import type { Applet } from "@web-applets/sdk";
22+33+import type { ManagedOutput } from "@applets/core/types";
44+import { applet } from "@scripts/applets/common";
55+16////////////////////////////////////////////
27// 🎨 Styles
38////////////////////////////////////////////
···611////////////////////////////////////////////
712// 🗂️ Applets
813////////////////////////////////////////////
99-const ui = {};
1414+import type * as QueueEngine from "@applets/engine/queue/types.d.ts";
10151111-// TESTING
1616+const idA = "deck-a";
1717+const idB = "deck-b";
12181313-// wait(configurator.output, (data) => data?.tracks?.state === "loaded").then(async () => {
1414-// await processor.search.sendAction("supply", configurator.output.data.tracks.collection);
1515-// const tracks = await processor.search.sendAction("search", "artist lee last");
1616-// tracks.forEach((t: Track) => console.log(t.tags));
1919+const configurator = {
2020+ output: await applet<ManagedOutput>("../../configurator/output"),
2121+};
2222+2323+const engine = {
2424+ queue: {
2525+ A: await applet<QueueEngine.State>("../../engine/queue", { groupId: idA }),
2626+ B: await applet<QueueEngine.State>("../../engine/queue", { groupId: idB }),
2727+ },
2828+};
2929+3030+// TODO: Shuffle, limit track amount, etc.
3131+async function fill(deck: Applet<QueueEngine.State>) {
3232+ const tracks = configurator.output.data.tracks.collection;
3333+3434+ await deck.sendAction("add", tracks, {
3535+ timeoutDuration: 60000,
3636+ });
3737+3838+ // Automatically insert track if there isn't any
3939+ if (!deck.data.now) {
4040+ await deck.sendAction("shift");
4141+ }
4242+}
4343+4444+// Add tracks to the queue once the tracks have been loaded;
4545+// and every time the collection changes.
4646+4747+// wait(configurator.output, (d) => d?.tracks.state === "loaded").then(() => {
4848+// connect(configurator.output, (data) => data.tracks.cacheId, fill);
1749// });
+34-19
src/styles/themes/blur/index.css
···11@import "./variables.css";
22+@import "../../diffuse/colors.css";
33+@import "../../diffuse/fonts.css";
2435/***********************************
44- * Fonts
66+ * Base
57 ***********************************/
66-:root {
77- font-family: "Inter", sans-serif;
88- font-size: var(--fs-base);
99-}
1010-1111-@supports (font-variation-settings: normal) {
1212- :root {
1313- font-family: "InterVariable", sans-serif;
1414- font-feature-settings:
1515- "ss03" 2,
1616- "ss02" 2;
1717- font-optical-sizing: auto;
1818- }
1919-}
2020-218body {
2222- background-color: var(--delicate-cloud);
2323- color: var(--made-in-the-shade);
99+ background-color: oklch(from var(--bg-color) calc(l - 0.025) c h);
1010+ color: var(--text-color);
2411 display: flex;
2512 flex-direction: column;
2613 overflow: hidden;
···5037 width: 0;
5138}
52395353-/* Audio is special case, iframe needs to be "visible" in order to play the audio. */
4040+/* Audio is a special case, iframe needs to be "visible" in order to play the audio. */
5441#applet__engine__audio {
5542 height: 1px;
5643 left: 0;
···6047 top: 0;
6148 width: 1px;
6249}
5050+5151+/***********************************
5252+ * Main
5353+ ***********************************/
5454+main {
5555+ display: grid;
5656+ gap: var(--space-2xs);
5757+ grid-template-columns: repeat(3, 1fr);
5858+ grid-template-rows: auto;
5959+ height: 100dvh;
6060+ overflow: hidden;
6161+ padding: var(--space-md) var(--space-md);
6262+6363+ & iframe {
6464+ border-radius: 6px;
6565+ }
6666+}
6767+6868+/***********************************
6969+ * Applets
7070+ ***********************************/
7171+7272+iframe[src*="/artwork-controller/"] {
7373+ grid-column: 3;
7474+ height: 100%;
7575+ max-width: var(--container-2xs);
7676+ width: 100%;
7777+}
+1-1
src/styles/themes/pilot/index.css
···6666 width: 0;
6767}
68686969-/* Audio is special case, iframe needs to be "visible" in order to play the audio. */
6969+/* Audio is a special case, iframe needs to be "visible" in order to play the audio. */
7070#applet__engine__audio {
7171 height: 1px;
7272 left: 0;