Compare commits

..

No commits in common. "devel/inline-bundle" and "main" have entirely different histories.

11 changed files with 534 additions and 639 deletions

2
.gitignore vendored
View file

@ -11,8 +11,6 @@ node_modules
dist
dist-ssr
*.local
build
.svelte-kit
# Editor directories and files
.vscode/*

13
index.html Normal file
View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="./src/app.css" />
<title>Homo Streams</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="./src/main.js"></script>
</body>
</html>

View file

@ -1,19 +1,33 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
}
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
//
// 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
"compilerOptions": {
"moduleResolution": "bundler",
"target": "ESNext",
"module": "ESNext",
/**
* svelte-preprocess cannot figure out whether you have
* a value or a type, so tell TypeScript to enforce using
* `import type` instead of `import` for Types.
*/
"verbatimModuleSyntax": true,
"isolatedModules": true,
"resolveJsonModule": true,
/**
* To have warnings / errors of the Svelte compiler at the
* correct position, enable source maps by default.
*/
"sourceMap": true,
"esModuleInterop": true,
"skipLibCheck": true,
/**
* Typecheck JS in `.svelte` and `.js` files by default.
* Disable this if you'd like to use dynamic types.
*/
"checkJs": true
},
/**
* Use global.d.ts instead of compilerOptions.types
* to avoid limiting type declarations.
*/
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"]
}

View file

@ -12,12 +12,9 @@
},
"devDependencies": {
"@cloudflare/kv-asset-handler": "^0.3.4",
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.15.1",
"@sveltejs/vite-plugin-svelte": "5.0.3",
"svelte": "5.16.0",
"vite": "^6.0.6",
"wrangler": "^3.99.0"
"@sveltejs/vite-plugin-svelte": "4.0.0",
"svelte": "5.0.2",
"vite": "^5.4.9",
"wrangler": "^3.81.0"
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,9 @@
<script>
import { onMount } from "svelte";
import Header from "$lib/Header.svelte";
import Stream from "$lib/Stream.svelte";
import AddStreamDialog from "$lib/AddStreamDialog.svelte";
import ManageStreamDialog from "$lib/ManageStreamDialog.svelte";
import Header from "./lib/Header.svelte";
import Stream from "./lib/Stream.svelte";
import AddStreamDialog from "./lib/AddStreamDialog.svelte";
import ManageStreamDialog from "./lib/ManageStreamDialog.svelte";
let streams = $state([]);
let fracsX = $state(0);
@ -52,14 +52,14 @@
{/if}
{#if currentDialog === "add-stream"}
<AddStreamDialog
add={(newStream) => {
add={(newStream) => {
currentDialog = null;
streams.push(newStream);
const newUrl = new URL(window.location.toString());
newUrl.searchParams.append(newStream.type, newStream.streamId);
window.history.pushState({}, null, newUrl);
}}
close={() => closeDialog()}
close={() => closeDialog()}
></AddStreamDialog>
{/if}
{#if currentDialog === "manage-streams"}
@ -81,9 +81,9 @@
></AddStreamDialog>
{/if}-->
<div
bind:this={containerElement}
class="streams"
style={"grid-template-columns: repeat(" +
bind:this={containerElement}
class="streams"
style={"grid-template-columns: repeat(" +
fracsY +
", 1fr); grid-template-rows: repeat(" +
fracsX +

13
src/app.d.ts vendored
View file

@ -1,13 +0,0 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}
export {};

View file

@ -1,12 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>

8
src/main.js Normal file
View file

@ -0,0 +1,8 @@
import { mount } from 'svelte';
import App from './App.svelte';
const app = mount(App, {
target: document.getElementById('app'),
});
export default app;

View file

@ -1,18 +1,7 @@
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter({
fallback: 'index.html' // may differ from host to host
}),
output: {
bundleStrategy: "inline"
}
}
};
export default config;
export default {
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess
// for more information about preprocessors
preprocess: vitePreprocess(),
}

View file

@ -1,6 +1,8 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
export default defineConfig({
plugins: [sveltekit()]
plugins: [
svelte({})
]
});