Something went wrong. Try again.
A music player that connects to your cloud/distributed storage. diffuse.sh
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449import { walk } from "@std/fs/walk";
const srcDir = new URL("../", import.meta.url).pathname;/** @type {Record<string, string>} */const sources = {};
for await ( const entry of walk(srcDir + "components", { match: [/element\.js$/] })) { const content = await Deno.readTextFile(entry.path); const key = entry.path.slice(srcDir.length); sources[key] = content;}
export default { sources,
artwork: [ { url: "components/artwork/audio-metadata/element.js", title: "Audio Metadata", desc: "Extracts embedded artwork from audio files using the music-metadata library.", }, { url: "components/artwork/input/element.js", title: "Input", desc: "Fetches artwork by delegating to the configured input element's artwork method.", }, { url: "components/artwork/last.fm/element.js", title: "Last.fm", desc: "Fetches cover art from the Last.fm API using track artist and album tags.", }, { url: "components/artwork/musicbrainz/element.js", title: "MusicBrainz", desc: "Fetches cover art from MusicBrainz and the Cover Art Archive using track artist and album tags.", }, ],
collaboration: [ { url: "components/collaboration/atproto/element.js", title: "AT Protocol", desc: "Resolves `atproto/handle` and `atproto/did` collaborators and reads their collaboration records and playlist bundles from their PDS.", }, ],
configurators: [ { url: "components/configurator/artwork/element.js", title: "Artwork", desc: "Takes artwork components as children and tries each in sequence, returning the first non-null result.", }, { url: "components/configurator/collaboration/element.js", title: "Collaboration", desc: "Holds collaboration sources as children. Each source declares the hint prefix it handles, so the cooperative-playlists orchestrator can resolve collaborators across protocols.", }, { url: "components/configurator/input/element.js", title: "Input", desc: "Allows for multiple inputs to be used at once.", }, { url: "components/configurator/metadata/element.js", title: "Metadata", desc: "Takes metadata components as children and chains their patches in sequence.", }, { url: "components/configurator/output/element.js", title: "Output", desc: "Enables the user to configure a specific output. If no default output is set, it creates a temporary session by storing everything in memory.", }, { url: "components/configurator/scrobbles/element.js", title: "Scrobbles", desc: "Configure multiple scrobblers (music trackers).", }, { url: "components/configurator/upload/element.js", title: "Upload", desc: "Takes upload components as children and enables configuring one or more upload destinations.", }, ],
engines: [ { url: "components/engine/audio/element.js", title: "Audio", desc: "Plays audio through audio elements.", }, { url: "components/engine/queue/element.js", title: "Queue", desc: "A queue for tracks.", }, { url: "components/engine/repeat-shuffle/element.js", title: "Repeat & Shuffle", desc: "Signals synced with local storage (classified by group) that decide if audio should be repeated and if the queue should be shuffled when filling it.", }, { url: "components/engine/scope/element.js", title: "Scope", desc: "Signals that could influence the scope of a set of tracks.", }, ],
input: [ { url: "components/input/dropbox/element.js", title: "Dropbox", desc: "Dropbox, using the Dropbox v2 HTTP API.", }, { url: "components/input/ephemeral-cache/element.js", title: "Ephemeral Cache", desc: "Ephemeral blobs stored in indexedDB, resolving creates temporary Blob URLs. Not responsible for storing blobs.", }, { url: "components/input/firkin/element.js", title: "Firkin", desc: "Firkin account files plus generic CID-addressed blobs. Generic blobs resolve anonymously via RASL by default; a read token in the URI opts into authenticated access.", }, { url: "components/input/https/element.js", title: "HTTPS", desc: "HTTPS URLs to audio files or streams.", }, { url: "components/input/https-json/element.js", title: "HTTPS + JSON", desc: "HTTPS servers with JSON directory listings.", }, { url: "components/input/icecast/element.js", title: "Icecast", desc: "Icecast internet radio streams. Fetches ICY metadata to populate track information.", }, { url: "components/input/local/element.js", title: "Local", desc: "Audio files or directories from your local device, using the browser's File System Access API.", }, { url: "components/input/opensubsonic/element.js", title: "Opensubsonic", desc: "(Open)subsonic audio servers.", }, { url: "components/input/s3/element.js", title: "S3", desc: "AWS S3 and services that provide the same surface API such as Cloudflare R2.", }, { url: "components/input/webdav/element.js", title: "WebDAV", desc: "WebDAV servers. Depends on a service worker handling the `diffuse:basic-auth` query parameter and converting it to a `Authorization` header.", }, ],
metadata: [ { url: "components/metadata/audio-file/element.js", title: "Audio File", desc: "Extracts tags and audio stats from audio files using the music-metadata library.", }, { url: "components/metadata/spectrogram/element.js", title: "Spectrogram", desc: "Decodes a track's audio, computes a spectrogram and stores the derived spectral descriptors (centroid, rolloff, spread, flatness, flux) on the track's stats.", }, ],
orchestrators: [ { url: "components/orchestrator/artwork/element.js", title: "Artwork", desc: "Fetches cover art for a given set of tracks, stored locally in indexedDB. Uses the artwork configurator to try each configured source in sequence.", }, { url: "components/orchestrator/auto-queue/element.js", title: "Automatic Queue", desc: "Fill the queue automatically with non-manual items (shuffled or regular, based on repeat-shuffle engine).", }, { url: "components/orchestrator/controller/element.js", title: "Controller", desc: "Provides commonly used computed signals derived from the audio engine, queue engine, and output. Exposes currentTrack(), isPlaying(), and references to the underlying engines.", }, { url: "components/orchestrator/cooperative-playlists/element.js", title: "Cooperative Playlists", desc: "Exposes the cohesive view of playlists shared with collaborators. Reads collaboration records from the given output, resolves collaborators through registered collaboration sources, and provides merged `playlistItems` and `playlists` signals. An AT Protocol source is included. Collaborator items are never written back, so each account only edits its own items.", }, { url: "components/orchestrator/cover-groups/element.js", title: "Cover Groups", desc: "Groups tracks by cover art to form collections.", }, { url: "components/orchestrator/favourites/element.js", title: "Favourites", desc: "Mark tracks as favourites. Automatically creates an unordered 'Favourites' playlist.", }, { url: "components/orchestrator/media-session/element.js", title: "Media Session", desc: "Keeps the browser/os media session in sync with queue and audio state. Adds handlers for previous, next, seek to, etc.", }, { url: "components/orchestrator/output/element.js", title: "Output", desc: "A default output configuration. Contains all the outputs provided here along with the relevant transformers.", }, { url: "components/orchestrator/process-tracks/element.js", title: "Process Inputs Into Tracks", desc: "Whenever the cached tracks are initially loaded through the passed output element it will list tracks by using the passed input element. Afterwards it loops over all tracks and checks if metadata needs to be fetched. If anything has changed, it'll pass the results to the output element.", }, { url: "components/orchestrator/queue-audio/element.js", title: "Queue + Audio", desc: "Connects the given queue engine to the given audio engine.", }, { url: "components/orchestrator/scoped-tracks/element.js", title: "Scoped Tracks", desc: "Watches the given output's tracks collection and runs them through a built-in search index. Can perform a search and other ways to reduce the scope of tracks based on the given scope engine. Provides a tracks signal similar to output.tracks.collection.", }, { url: "components/orchestrator/scrobble-audio/element.js", title: "Scrobble + Audio", desc: "Connects the audio engine with a scrobbler element. Calls nowPlaying when a track starts playing and scrobble once the user has listened long enough.", }, { url: "components/orchestrator/sources/element.js", title: "Sources", desc: "Monitor tracks from the given output to form a list of sources based on the input's sources return value.", }, { url: "components/orchestrator/spectrogram-audio/element.js", title: "Spectrogram + Audio", desc: "When a track starts playing and is missing spectrogram-derived stats, analyses it via the spectrogram metadata element and persists the result to the output. Only the leader tab performs the analysis.", }, ],
output: [ { url: "components/output/polymorphic/indexed-db/element.js", title: "Polymorphic / IndexedDB", desc: "Stores output into the local indexedDB. Supports any type of data that indexedDB supports.", }, { url: "components/output/bytes/dropbox/element.js", title: "Bytes / Dropbox", desc: "Store output data as raw bytes in the Dropbox app folder.", }, { url: "components/output/raw/firkin/encrypted/incremental-automerge/element.js", title: "Raw / Firkin / Encrypted / Incremental Automerge", desc: "The complete Firkin userdata output: an append-only log of encrypted Automerge changes on a Firkin instance. Each save appends only the changes since the log last saw them (a whole document every 32 saves), entries are sealed per save, and per-device manifests are signed by the writer's session key.", }, { url: "components/output/bytes/s3/element.js", title: "Bytes / S3", desc: "Store output data on AWS S3 or compatible services such as Cloudflare R2.", }, { url: "components/output/bytes/wnfs/element.js", title: "Bytes / WNFS (Firkin)", desc: "Stores user data in a private WNFS on a Firkin instance, with all blocks held by the account. Playlist items and tracks are written as one file per bundle (per playlist or input source), so a save only rewrites the bundle that changed. Requires a passkey-backed Firkin account.", }, ],
supplements: [ { url: "components/supplement/atproto-publish/element.js", title: "Publish on the Atmosphere", desc: "Publishes playlist items, facets and collaborations to the user's AT Protocol account beside whichever output is selected. Owns the shared AT Protocol publish session and only writes changed records.", }, { url: "components/supplement/last.fm/element.js", title: "Last.fm Scrobbler", desc: "Scrobbles track plays to Last.fm.", }, { url: "components/supplement/listenbrainz/element.js", title: "ListenBrainz Scrobbler", desc: "Scrobbles track plays to ListenBrainz.", }, { url: "components/supplement/rocksky/element.js", title: "Rocksky Scrobbler", desc: "Scrobbles track plays to Rocksky.", }, ],
transformers: [ { url: "components/transformer/output/bundles/element.js", title: "Output / Bundles", desc: "Exposes an output's collections as bundles: one per playlist, and one per track source (an S3 bucket, a Subsonic server, a directory, …). Without an input to name the source, tracks fall back to their URI scheme. Other collections pass through unchanged, and saving bundles flattens them back into the wrapped output.", }, { url: "components/transformer/output/bytes/dasl-sync/element.js", title: "Output / Bytes / DASL Sync", desc: "Syncs data between local and remote using CID-based diffing and performs union merges with tombstone tracking when both sides have diverged.", }, { url: "components/transformer/output/bytes/json/element.js", title: "Output / Bytes / JSON", desc: "Raw data schema output to and from JSON Uint8Array.", }, { url: "components/transformer/output/refiner/default/element.js", title: "Output / Refiner / Default", desc: "Removes output state that is not meant to be saved to storage, such as ephemeral tracks. Ideally part of every theme.", }, { url: "components/transformer/output/refiner/initial-contents/element.js", title: "Output / Refiner / Initial Contents", desc: "Sets the initial contents for an output on first load.", }, { url: "components/transformer/output/refiner/path-collections/element.js", title: "Output / Refiner / Path Collections", desc: "Generates ephemeral playlists based on a path part of each track's URI. The 1-based part can be set using the `path-part` attribute (defaults to the first). Percent-encoded parts are decoded. Items with an id prefixed `path-collections/` are excluded from storage.", }, { url: "components/transformer/output/string/json/element.js", title: "Output / String / JSON", desc: "Raw data schema output to and from JSON UTF8 string.", }, ],
upload: [ { url: "components/upload/dropbox/element.js", title: "Dropbox", desc: "Uploads and deletes files on Dropbox using the Dropbox v2 HTTP API.", }, { url: "components/upload/firkin/element.js", title: "Firkin", desc: "Uploads files to Firkin and records them in the account's file registry.", }, { url: "components/upload/s3/element.js", title: "S3", desc: "Uploads and deletes files in an S3-compatible bucket using the S3 HTTP API. Buckets are connected on the S3 connect page.", }, { url: "components/upload/webdav/element.js", title: "WebDAV", desc: "Uploads and deletes files on a WebDAV server using PUT and DELETE requests.", }, ],
definitions: [ { url: "definitions/output/collaboration.json", title: "Output / Collaboration", desc: "Represents a collaboration between multiple collaborators on a subject, such as a playlist.", }, { url: "definitions/output/facet.json", title: "Output / Facet", desc: "A MASL manifest (`resources` + `blocks`), or a pointer (`uri`) to an `.html` file or `.tile` CAR.", }, { url: "definitions/output/playlistItem.json", title: "Output / Playlist Item", desc: "Represents a single item in a playlist. Tracks are matched based on the given criteria. A playlist is formed by grouping items by their playlist property.", }, { url: "definitions/output/playlistItemBundle.json", title: "Output / Playlist Item Bundle", desc: "A bundle of playlist items.", }, { url: "definitions/output/setting.json", title: "Output / Setting", desc: "Represents a single application setting as a key-value pair.", }, { url: "definitions/output/track.json", title: "Output / Track", desc: "Represents audio that can be played, or a placeholder for a source of tracks. Contains a URI that will resolve to the audio.", }, { url: "definitions/output/trackBundle.json", title: "Output / Track Bundle", desc: "A bundle of tracks.", }, ],};