From 6ee53e7d5ba1ebdfd6796d79abdabce01ff093cc Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 23 Dec 2024 15:13:46 +0400 Subject: [PATCH] refactor --- docs/telegram-bot-playground/index.html | 49 +--- docs/telegram-bot-playground/metadata.json | 5 +- docs/telegram-bot-playground/scripts/_main.js | 258 ++++++++++++++++++ docs/telegram-bot-playground/scripts/init.js | 31 --- docs/telegram-bot-playground/scripts/main.js | 148 ---------- .../scripts/{ => worker}/web-worker.js | 112 ++++---- scripts/prep-page.js | 5 +- src/globals.d.ts | 14 - src/tg-bot-playground/_main.ts | 75 +++++ src/tg-bot-playground/bot-launcher/_main.ts | 22 ++ src/tg-bot-playground/bot-launcher/load.ts | 14 + src/tg-bot-playground/bot-launcher/run.ts | 49 ++++ src/tg-bot-playground/editor/_editor.ts | 51 ++++ src/tg-bot-playground/editor/init.ts | 38 +++ src/tg-bot-playground/editor/setup.ts | 26 ++ src/tg-bot-playground/editor/ts-text-model.ts | 69 +++++ src/tg-bot-playground/init.ts | 40 --- src/tg-bot-playground/main.ts | 130 --------- src/tg-bot-playground/types.ts | 15 + src/tg-bot-playground/utils.ts | 100 +------ src/tg-bot-playground/web-worker.ts | 82 ------ src/tg-bot-playground/worker/handler.ts | 77 ++++++ src/tg-bot-playground/worker/utils.ts | 26 ++ src/tg-bot-playground/worker/web-worker.ts | 10 + tsup.config.json | 5 +- 25 files changed, 820 insertions(+), 631 deletions(-) create mode 100644 docs/telegram-bot-playground/scripts/_main.js delete mode 100644 docs/telegram-bot-playground/scripts/init.js delete mode 100644 docs/telegram-bot-playground/scripts/main.js rename docs/telegram-bot-playground/scripts/{ => worker}/web-worker.js (98%) delete mode 100644 src/globals.d.ts create mode 100644 src/tg-bot-playground/_main.ts create mode 100644 src/tg-bot-playground/bot-launcher/_main.ts create mode 100644 src/tg-bot-playground/bot-launcher/load.ts create mode 100644 src/tg-bot-playground/bot-launcher/run.ts create mode 100644 src/tg-bot-playground/editor/_editor.ts create mode 100644 src/tg-bot-playground/editor/init.ts create mode 100644 src/tg-bot-playground/editor/setup.ts create mode 100644 src/tg-bot-playground/editor/ts-text-model.ts delete mode 100644 src/tg-bot-playground/init.ts delete mode 100644 src/tg-bot-playground/main.ts delete mode 100644 src/tg-bot-playground/web-worker.ts create mode 100644 src/tg-bot-playground/worker/handler.ts create mode 100644 src/tg-bot-playground/worker/utils.ts create mode 100644 src/tg-bot-playground/worker/web-worker.ts diff --git a/docs/telegram-bot-playground/index.html b/docs/telegram-bot-playground/index.html index d28280e..70c1f5a 100644 --- a/docs/telegram-bot-playground/index.html +++ b/docs/telegram-bot-playground/index.html @@ -5,43 +5,17 @@ Telegram Bot Playground - - - - + + + - +

Telegram Bot Playground 🤖

@@ -49,19 +23,22 @@

Telegram Bot Playground 🤖

- - + +