From 4c90223474915f604d108c48203e3add59e76f63 Mon Sep 17 00:00:00 2001 From: flop Date: Fri, 22 May 2026 17:41:00 +0200 Subject: [PATCH] refactor: move to mithril --- ts/bun.lock | 8 + ts/package.json | 4 + ts/src/browser.ts | 1042 +++++++++++++++++++++------------------------ ts/style.css | 3 + 4 files changed, 508 insertions(+), 549 deletions(-) diff --git a/ts/bun.lock b/ts/bun.lock index 434fd0d..940f010 100644 --- a/ts/bun.lock +++ b/ts/bun.lock @@ -4,6 +4,10 @@ "workspaces": { "": { "name": "libmonoformat", + "dependencies": { + "@types/mithril": "^2.2.8", + "mithril": "^2.3.8", + }, "devDependencies": { "@types/bun": "latest", }, @@ -15,10 +19,14 @@ "packages": { "@types/bun": ["@types/bun@1.3.14", "", { "dependencies": { "bun-types": "1.3.14" } }, "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw=="], + "@types/mithril": ["@types/mithril@2.2.8", "", {}, "sha512-FN9Tv1+Nlr0LNPGnIL/xOxLJfu5WW2n8HAFeo4yxF+/O0per/8g080xlXoo+xj8baowAcfsNI3k80DxyLY34gQ=="], + "@types/node": ["@types/node@25.7.0", "", { "dependencies": { "undici-types": "~7.21.0" } }, "sha512-z+pdZyxE+RTQE9AcboAZCb4otwcrvgHD+GlBpPgn0emDVt0ohrTMhAwlr2Wd9nZ+nihhYFxO2pThz3C5qSu2Eg=="], "bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="], + "mithril": ["mithril@2.3.8", "", {}, "sha512-za/Yo7qXEckjm5syrSfaaI9Utf4tCUT3T1IOIYqH6Lrj7G0OZuYYLAY9SV4ygoaAf0+CNqU92MBt+7pmo53JVQ=="], + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], "undici-types": ["undici-types@7.21.0", "", {}, "sha512-w9IMgQrz4O0YN1LtB7K5P63vhlIOvC7opSmouCJ+ZywlPAlO9gIkJ+otk6LvGpAs2wg4econaCz3TvQ9xPoyuQ=="], diff --git a/ts/package.json b/ts/package.json index 1b8399c..1efbac5 100644 --- a/ts/package.json +++ b/ts/package.json @@ -11,5 +11,9 @@ }, "peerDependencies": { "typescript": "^5" + }, + "dependencies": { + "@types/mithril": "^2.2.8", + "mithril": "^2.3.8" } } diff --git a/ts/src/browser.ts b/ts/src/browser.ts index 591c16f..1b22ce2 100644 --- a/ts/src/browser.ts +++ b/ts/src/browser.ts @@ -1,671 +1,615 @@ -// browser.ts — IIFE-style browser entry point -// Built by: bun build src/browser.ts --target browser --outfile public/mono-display.js -// Attaches everything to window.MonoDisplay so inline