From a4999bb665375e6c06577bbd0071aebfd2e5122d Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Fri, 21 Apr 2023 22:35:25 +0300 Subject: [PATCH] feat: init impl --- .eslintignore | 13 + .eslintrc.cjs | 20 + .gitignore | 13 +- .npmrc | 1 + .prettierignore | 13 + .prettierrc | 9 + .vscode/settings.json | 4 + README.md | 39 +- components/Button.tsx | 12 - components/Center.tsx | 12 - components/Input.tsx | 12 - deno.json | 10 - deno.lock | 151 --- dev.ts | 5 - flake.nix | 5 +- fresh.gen.ts | 21 - import_map.json | 13 - main.ts | 13 - package.json | 40 + pnpm-lock.yaml | 2123 ++++++++++++++++++++++++++++++ postcss.config.js | 6 + routes/index.tsx | 19 - routes/library.tsx | 37 - routes/login.tsx | 74 -- src/app.css | 2 + src/app.d.ts | 12 + src/app.html | 15 + src/comms.ts | 169 +++ src/components/a.svelte | 11 + src/components/navbar.svelte | 10 + src/components/track.svelte | 20 + src/routes/+layout.svelte | 81 ++ src/routes/+layout.ts | 6 + src/routes/+page.svelte | 14 + src/routes/settings/+page.svelte | 18 + src/routes/settings/input.svelte | 16 + src/stores.ts | 14 + src/types.ts | 24 + static/favicon.ico | Bin 22382 -> 0 bytes static/favicon.png | Bin 0 -> 1571 bytes static/logo.svg | 6 - svelte.config.js | 13 + tailwind.config.js | 17 + tsconfig.json | 17 + twind.config.ts | 5 - vite.config.ts | 6 + 46 files changed, 2740 insertions(+), 401 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.cjs create mode 100644 .npmrc create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 .vscode/settings.json delete mode 100644 components/Button.tsx delete mode 100644 components/Center.tsx delete mode 100644 components/Input.tsx delete mode 100644 deno.json delete mode 100644 deno.lock delete mode 100755 dev.ts delete mode 100644 fresh.gen.ts delete mode 100644 import_map.json delete mode 100644 main.ts create mode 100644 package.json create mode 100644 pnpm-lock.yaml create mode 100644 postcss.config.js delete mode 100644 routes/index.tsx delete mode 100644 routes/library.tsx delete mode 100644 routes/login.tsx create mode 100644 src/app.css create mode 100644 src/app.d.ts create mode 100644 src/app.html create mode 100644 src/comms.ts create mode 100644 src/components/a.svelte create mode 100644 src/components/navbar.svelte create mode 100644 src/components/track.svelte create mode 100644 src/routes/+layout.svelte create mode 100644 src/routes/+layout.ts create mode 100644 src/routes/+page.svelte create mode 100644 src/routes/settings/+page.svelte create mode 100644 src/routes/settings/input.svelte create mode 100644 src/stores.ts create mode 100644 src/types.ts delete mode 100644 static/favicon.ico create mode 100644 static/favicon.png delete mode 100644 static/logo.svg create mode 100644 svelte.config.js create mode 100644 tailwind.config.js create mode 100644 tsconfig.json delete mode 100644 twind.config.ts create mode 100644 vite.config.ts diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..3897265 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,13 @@ +.DS_Store +node_modules +/build +/.svelte-kit +/package +.env +.env.* +!.env.example + +# Ignore files for PNPM, NPM and YARN +pnpm-lock.yaml +package-lock.json +yarn.lock diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..3ccf435 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,20 @@ +module.exports = { + root: true, + parser: '@typescript-eslint/parser', + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], + plugins: ['svelte3', '@typescript-eslint'], + ignorePatterns: ['*.cjs'], + overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], + settings: { + 'svelte3/typescript': () => require('typescript') + }, + parserOptions: { + sourceType: 'module', + ecmaVersion: 2020 + }, + env: { + browser: true, + es2017: true, + node: true + } +}; diff --git a/.gitignore b/.gitignore index 6c7f6d0..a983f59 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,11 @@ -/.direnv -/.helix \ No newline at end of file +.DS_Store +node_modules +/build +/.svelte-kit +/package +.env +.env.* +!.env.example +vite.config.js.timestamp-* +vite.config.ts.timestamp-* +/.direnv \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..b6f27f1 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..3897265 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,13 @@ +.DS_Store +node_modules +/build +/.svelte-kit +/package +.env +.env.* +!.env.example + +# Ignore files for PNPM, NPM and YARN +pnpm-lock.yaml +package-lock.json +yarn.lock diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..a77fdde --- /dev/null +++ b/.prettierrc @@ -0,0 +1,9 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100, + "plugins": ["prettier-plugin-svelte"], + "pluginSearchDirs": ["."], + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c36ff6a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "svelte.enable-ts-plugin": true, + "editor.tabSize": 2 +} \ No newline at end of file diff --git a/README.md b/README.md index f605bd9..5c91169 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,38 @@ -# fresh project +# create-svelte -### Usage +Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). -Start the project: +## Creating a project -``` -deno task start +If you're seeing this, you've probably already done this step. Congrats! + +```bash +# create a new project in the current directory +npm create svelte@latest + +# create a new project in my-app +npm create svelte@latest my-app ``` -This will watch the project directory and restart as necessary. +## Developing + +Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: + +```bash +npm run dev + +# or start the server and open the app in a new browser tab +npm run dev -- --open +``` + +## Building + +To create a production version of your app: + +```bash +npm run build +``` + +You can preview the production build with `npm run preview`. + +> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/components/Button.tsx b/components/Button.tsx deleted file mode 100644 index 5791edf..0000000 --- a/components/Button.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { JSX } from "preact"; - -export default function Button(props: JSX.HTMLAttributes) { - return ( - - - - - - ); -} diff --git a/src/app.css b/src/app.css new file mode 100644 index 0000000..e447f71 --- /dev/null +++ b/src/app.css @@ -0,0 +1,2 @@ +html, body { @apply h-full overflow-hidden; } +.card { @apply shadow shadow-black; } \ No newline at end of file diff --git a/src/app.d.ts b/src/app.d.ts new file mode 100644 index 0000000..f59b884 --- /dev/null +++ b/src/app.d.ts @@ -0,0 +1,12 @@ +// See https://kit.svelte.dev/docs/types#app +// for information about these interfaces +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface Platform {} + } +} + +export {}; diff --git a/src/app.html b/src/app.html new file mode 100644 index 0000000..db6afd2 --- /dev/null +++ b/src/app.html @@ -0,0 +1,15 @@ + + + + + + + + %sveltekit.head% + + + +
%sveltekit.body%
+ + + \ No newline at end of file diff --git a/src/comms.ts b/src/comms.ts new file mode 100644 index 0000000..9fa34bd --- /dev/null +++ b/src/comms.ts @@ -0,0 +1,169 @@ +import type { TrackWithId } from "./types"; + +const API_VERSION: number = 20; +const HTTP_DISABLED_ERROR: string = + "server does not have HTTP resources enabled, you will not be able to stream music"; +const SERVER_API_INCOMPATIBLE_ERROR: (serverApi: number) => string = + (serverApi) => `server API version (${serverApi}) is different from our supported version (${API_VERSION})`; + +interface Message { + name: string; + id: string; + device_id: string; + type: MessageType; + options: any; +}; +type MessageType = 'request' | 'response' | 'broadcast'; +type RequestCallback = (arg0: Message | null) => void; + +interface Callbacks { + onDisconnect: (authenticated: boolean, reason: string) => void; + onConnect: (initial: Message) => void; + onIncompatible: (reason: string) => void; +} + +export class MetadataCommunicator { + ws: WebSocket | null; + deviceId: string; + callbacks: Map; + authenticated: boolean; + eventCallbacks: Callbacks; + onConnectCallbacks: (() => void)[]; + + constructor() { + this.callbacks = new Map(); + this.deviceId = crypto.randomUUID(); + this.authenticated = false; + this.eventCallbacks = { + onDisconnect: () => { }, + onConnect: () => { }, + onIncompatible: () => { }, + }; + this.onConnectCallbacks = []; + this.ws = null; + } + + setCallbacks(callbacks: Callbacks) { + this.eventCallbacks = callbacks; + } + + connect(address: string, password: string) { + this.close(); + + this.ws = new WebSocket(`ws://${address}`); + + this.ws.addEventListener('open', (event) => { + this.makeRequest("authenticate", 'request', { password }, (msg) => { + if (msg!.options.authenticated) { + this.authenticated = true; + this.eventCallbacks.onConnect(msg!); + this.onConnectCallbacks.forEach((f) => f()); + this.onConnectCallbacks = []; + if (!msg!.options.environment.http_server_enabled) { + this.eventCallbacks.onIncompatible(HTTP_DISABLED_ERROR); + } + const serverApiVersion = msg!.options.environment.api_version; + if (serverApiVersion != API_VERSION) { + this.eventCallbacks.onIncompatible(SERVER_API_INCOMPATIBLE_ERROR(serverApiVersion)); + } + } + }); + }); + this.ws.addEventListener('close', (event) => { + this.eventCallbacks.onDisconnect(this.authenticated, `${event.reason} (code ${event.code})`); + this.authenticated = false; + }); + + this.ws.addEventListener('message', (event) => { + const parsed: Message = JSON.parse(event.data); + const maybeCallback = this.callbacks.get(parsed.id); + if (maybeCallback) { + maybeCallback(parsed); + this.callbacks.delete(parsed.id); + } + }); + } + + fetchTracksCount(): Promise { + const options = { count_only: true }; + const th = this; + return new Promise(function (resolve, reject) { + th.makeRequest("query_tracks", "request", options, (resp) => { + if (resp) { + resolve(resp.options.count); + } else { + reject(null); + } + }); + }); + } + + fetchTracks(limit: number, offset: number, filter: string | null = null): Promise { + const options: any = { limit, offset }; + if (filter !== null) options.filter = filter; + + const th = this; + return new Promise(function (resolve, reject) { + th.makeRequest("query_tracks", "request", options, (resp) => { + if (resp) { + const data: any[] = resp.options.data; + resolve(data.map((t) => ({ + id: t.id, + track: { + title: t.title, + album_id: t.album_id, + artist_id: t.artist_id, + track_num: t.track, + thumbnail_id: t.thumbnail_id, + } + }))); + } else { + reject(null); + } + }); + }); + } + + private makeRequest(name: string, type: MessageType, options: object, callback: RequestCallback) { + // return if not authenticated, allow authentication messages + if (this.isClosed() || !this.authenticated && name != "authenticate") { + callback(null); + return; + } + // Unique enough for our purposes (as request ID) + const id = Math.random().toString(36).substring(2) + Date.now().toString(36); + this.callbacks.set(id, callback); + const payload = JSON.stringify({ + name, + type, + options, + device_id: this.deviceId, + id, + }); + console.trace("sending metadata message: " + payload); + this.ws!.send(payload); + } + + close() { + if (this.isClosed()) return; + this.ws!.close(); + this.authenticated = false; + this.callbacks.clear(); + } + + isClosed() { + return ( + this.ws === null + || this.ws.readyState === WebSocket.CLOSED + || this.ws.readyState === WebSocket.CLOSING + ); + } + + onConnect(cb: () => void) { + if (!this.isClosed() && this.authenticated) { + cb(); + } else { + this.onConnectCallbacks = [...this.onConnectCallbacks, cb]; + } + } +} \ No newline at end of file diff --git a/src/components/a.svelte b/src/components/a.svelte new file mode 100644 index 0000000..6fb429b --- /dev/null +++ b/src/components/a.svelte @@ -0,0 +1,11 @@ + + + + + diff --git a/src/components/navbar.svelte b/src/components/navbar.svelte new file mode 100644 index 0000000..cced898 --- /dev/null +++ b/src/components/navbar.svelte @@ -0,0 +1,10 @@ + + + diff --git a/src/components/track.svelte b/src/components/track.svelte new file mode 100644 index 0000000..81dd3d7 --- /dev/null +++ b/src/components/track.svelte @@ -0,0 +1,20 @@ + + +
+ +
+ (ev.target.style.display = 'none')} + /> +
+ {track.track_num} - {track.title} +
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte new file mode 100644 index 0000000..f2f867d --- /dev/null +++ b/src/routes/+layout.svelte @@ -0,0 +1,81 @@ + + + + musikspider + + + + +
+
+
+
+
+ now playing +
+
volume
+
+
+
+ +
+ diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts new file mode 100644 index 0000000..1f52450 --- /dev/null +++ b/src/routes/+layout.ts @@ -0,0 +1,6 @@ +import { MetadataCommunicator } from "../comms"; + +export const ssr = false; +export const prerender = false; + +export const _metadataComm = new MetadataCommunicator(); \ No newline at end of file diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte new file mode 100644 index 0000000..b4a1725 --- /dev/null +++ b/src/routes/+page.svelte @@ -0,0 +1,14 @@ + + + +
+ +
+
diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte new file mode 100644 index 0000000..b81c0b1 --- /dev/null +++ b/src/routes/settings/+page.svelte @@ -0,0 +1,18 @@ + + +
+
+

server settings

+ + + +
+
diff --git a/src/routes/settings/input.svelte b/src/routes/settings/input.svelte new file mode 100644 index 0000000..f937fcf --- /dev/null +++ b/src/routes/settings/input.svelte @@ -0,0 +1,16 @@ + + + diff --git a/src/stores.ts b/src/stores.ts new file mode 100644 index 0000000..95e1e24 --- /dev/null +++ b/src/stores.ts @@ -0,0 +1,14 @@ +import { writable } from 'svelte/store'; +import type { ResourceId, Track } from './types'; + +function writableStorage(key: string, defaultValue: string) { + const store = writable(localStorage.getItem(key) ?? defaultValue); + store.subscribe(value => localStorage.setItem(key, value)); + return store; +} + +export const address = writableStorage("address", "127.0.0.1:5505"); +export const token = writableStorage("token", ""); + +export const tracks = writable>(new Map()); +export const tracksSorted = writable>(new Map()); \ No newline at end of file diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..3d3f88e --- /dev/null +++ b/src/types.ts @@ -0,0 +1,24 @@ +export type ResourceId = bigint; + +export interface Track { + title: string, + track_num: number, + album_id: ResourceId, + artist_id: ResourceId, + thumbnail_id: ResourceId, +} + +export interface TrackWithId { + id: ResourceId, + track: Track, +} + +export interface Artist { + name: string, +} + +export interface Album { + title: string, + artist_id: ResourceId, + thumbnail_id: ResourceId, +} \ No newline at end of file diff --git a/static/favicon.ico b/static/favicon.ico deleted file mode 100644 index 1cfaaa2193b0f210107a559f7421569f57a25388..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22382 zcmeI4dw7?{mB%N97z7oqA|OH{6p11r>cU#lM7K(nW`t#!NG z`qUAy{#t>9K|!BwH6TqGo5?%XehL;`0&-}m=Ue0llhcL@pl$8VmT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E zu4)}+EnJ_h&_oW%@wrf4jlr;qXhdP>3C?5_u?H|624MmKl)3^;8pZu zug>WxZfF`C3u^mmFjRkh$8v4p59;&>nF*JNiCq7eX5P z(I@U_U2z4!Wnqe?(s-%)q|$bTq4|!^s7e;maYJh)W6_nf7&ql(>KyG?xPLX`2dEBy zFC#b)7WV%+;0j9FTVn&qx%oiClr@+E;3V$3T2m5Zafg2!6iTF zIGBzUQb1p*pOI_LtBQe3(2Gg*k!O&{n?NPk8+o=J*a_&jGwOi9!}nZdC%#XN)RWO# ze@F6{P2KX%qO?b@U%1Iz6ft&<#639s)CxM&8D($iiPS z`4rnXm5kiNe6McZI7{TiY+rES)A(%zQnxTa()hgt(qXnS$U7Oofk4We!fz);a7v(y&DRt~7zy75O|tmn&+X8hls8Z!IVlSy`CR4)Ri4 z8s>?LhlK=}8ow<`Dm8wnA;=RIjN=zlbx%G+IRXhdGgifPzmOU3B69BS4)IC8#<@<) bck@HGWY%2idMme??%p8ZW3z(%VE+9-Ofn0d diff --git a/static/favicon.png b/static/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..825b9e65af7c104cfb07089bb28659393b4f2097 GIT binary patch literal 1571 zcmV+;2Hg3HP)Px)-AP12RCwC$UE6KzI1p6{F2N z1VK2vi|pOpn{~#djwYcWXTI_im_u^TJgMZ4JMOsSj!0ma>B?-(Hr@X&W@|R-$}W@Z zgj#$x=!~7LGqHW?IO8+*oE1MyDp!G=L0#^lUx?;!fXv@l^6SvTnf^ac{5OurzC#ZMYc20lI%HhX816AYVs1T3heS1*WaWH z%;x>)-J}YB5#CLzU@GBR6sXYrD>Vw(Fmt#|JP;+}<#6b63Ike{Fuo!?M{yEffez;| zp!PfsuaC)>h>-AdbnwN13g*1LowNjT5?+lFVd#9$!8Z9HA|$*6dQ8EHLu}U|obW6f z2%uGv?vr=KNq7YYa2Roj;|zooo<)lf=&2yxM@e`kM$CmCR#x>gI>I|*Ubr({5Y^rb zghxQU22N}F51}^yfDSt786oMTc!W&V;d?76)9KXX1 z+6Okem(d}YXmmOiZq$!IPk5t8nnS{%?+vDFz3BevmFNgpIod~R{>@#@5x9zJKEHLHv!gHeK~n)Ld!M8DB|Kfe%~123&Hz1Z(86nU7*G5chmyDe ziV7$pB7pJ=96hpxHv9rCR29%bLOXlKU<_13_M8x)6;P8E1Kz6G<&P?$P^%c!M5`2` zfY2zg;VK5~^>TJGQzc+33-n~gKt{{of8GzUkWmU110IgI0DLxRIM>0US|TsM=L|@F z0Bun8U!cRB7-2apz=y-7*UxOxz@Z0)@QM)9wSGki1AZ38ceG7Q72z5`i;i=J`ILzL z@iUO?SBBG-0cQuo+an4TsLy-g-x;8P4UVwk|D8{W@U1Zi z!M)+jqy@nQ$p?5tsHp-6J304Q={v-B>66$P0IDx&YT(`IcZ~bZfmn11#rXd7<5s}y zBi9eim&zQc0Dk|2>$bs0PnLmDfMP5lcXRY&cvJ=zKxI^f0%-d$tD!`LBf9^jMSYUA zI8U?CWdY@}cRq6{5~y+)#h1!*-HcGW@+gZ4B};0OnC~`xQOyH19z*TA!!BJ%9s0V3F?CAJ{hTd#*tf+ur-W9MOURF-@B77_-OshsY}6 zOXRY=5%C^*26z?l)1=$bz30!so5tfABdSYzO+H=CpV~aaUefmjvfZ3Ttu9W&W3Iu6 zROlh0MFA5h;my}8lB0tAV-Rvc2Zs_CCSJnx@d`**$idgy-iMob4dJWWw|21b4NB=LfsYp0Aeh{Ov)yztQi;eL4y5 zMi>8^SzKqk8~k?UiQK^^-5d8c%bV?$F8%X~czyiaKCI2=UH - - - - - \ No newline at end of file diff --git a/svelte.config.js b/svelte.config.js new file mode 100644 index 0000000..00fd635 --- /dev/null +++ b/svelte.config.js @@ -0,0 +1,13 @@ +import adapter from '@sveltejs/adapter-static'; +import { vitePreprocess } from '@sveltejs/kit/vite'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + preprocess: vitePreprocess(), + + kit: { + adapter: adapter() + } +}; + +export default config; diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..0380caa --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,17 @@ +/** @type {import('tailwindcss').Config} */ +export default { + content: [ + './src/**/*.{html,js,svelte,ts}', + require('path').join(require.resolve( + '@skeletonlabs/skeleton'), + '../**/*.{html,js,svelte,ts}' + ), + ], + theme: { + extend: {}, + }, + plugins: [ + ...require('@skeletonlabs/skeleton/tailwind/skeleton.cjs')() + ], + darkMode: 'class', +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..6ae0c8c --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true + } + // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias + // + // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes + // from the referenced tsconfig.json - TypeScript does not merge them in +} diff --git a/twind.config.ts b/twind.config.ts deleted file mode 100644 index 2a7ac27..0000000 --- a/twind.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Options } from "$fresh/plugins/twind.ts"; - -export default { - selfURL: import.meta.url, -} as Options; diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..bbf8c7d --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,6 @@ +import { sveltekit } from '@sveltejs/kit/vite'; +import { defineConfig } from 'vite'; + +export default defineConfig({ + plugins: [sveltekit()] +});