A music player that connects to your cloud/distributed storage.
1import * as TID from "@atcute/tid";
2import facets from "../../_data/facets.json" with {
3 type: "json",
4};
5
6/**
7 * @import {Facet} from "~/definitions/types.d.ts"
8 */
9
10export const TYPE = /** @type {const} */ ("sh.diffuse.output.facet");
11
12/** @type {Facet[]} */
13export const STARTING_SET = facets.flatMap((facet) => {
14 const properties = {
15 $type: TYPE,
16 description: facet.desc,
17 kind: facet.kind === "prelude"
18 ? /** @type {const} */ ("prelude")
19 : /** @type {const} */ ("interactive"),
20 name: facet.title,
21 uri: "diffuse://" + facet.url,
22 };
23
24 if (
25 [
26 "facets/data/input-bundle/index.html",
27 "facets/data/output-bundle/index.html",
28 "facets/data/process-tracks/prelude/index.html",
29 "facets/playback/auto-queue/prelude/index.html",
30 ].includes(facet.url)
31 ) {
32 return [{
33 ...properties,
34 id: TID.now(),
35 }];
36 }
37
38 return [];
39});