runtime: plugin UI kit (api.ui: toast, alert, confirm, prompt, dialog, modal) and theme API (api.theme, --wb-* vars); theme JSON Schema; waybetter 0.2.0

The kit draws in one shadow DOM host in the active theme's colors, corners and font and repaints
live; accessible dialogs (focus trap and return, Esc/Enter rules, alertdialog for alerts and
confirms), stacking with inert, toasts with actions, reduced motion, text-only content (ui.h),
and scope.ui closes a plugin's dialogs on dispose. api.toast routes to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
CRTkafa 2026-09-28 21:47:09 +07:00
parent 1486f31a66
commit 3ae7744387
8 changed files with 1627 additions and 25 deletions

View file

@ -1,9 +1,9 @@
{
"name": "waybetter",
"version": "0.1.1",
"version": "0.2.0",
"license": "GPL-3.0-or-later",
"type": "module",
"description": "wayBetter: the framework for apps that run the apps you already use in a light native (Tauri) window and extend them in place. Page runtime (DOM/request hubs, plugins, theme color model, link routing, account reporting) and shell models (address bar, panes, profiles, palette, updates). No dependencies.",
"description": "wayBetter: the framework for apps that run the apps you already use in a light native (Tauri) window and extend them in place. Page runtime (DOM/request hubs, plugins, plugin UI kit with themed dialogs and toasts, theme API and theme JSON Schema, theme color model, link routing, account reporting) and shell models (address bar, panes, profiles, palette, updates). No dependencies.",
"keywords": [
"waybetter",
"tauri",
@ -52,10 +52,18 @@
"types": "./dist/runtime/site.d.ts",
"import": "./dist/runtime/site.js"
},
"./runtime/themeApi": {
"types": "./dist/runtime/themeApi.d.ts",
"import": "./dist/runtime/themeApi.js"
},
"./runtime/themeTokens": {
"types": "./dist/runtime/themeTokens.d.ts",
"import": "./dist/runtime/themeTokens.js"
},
"./runtime/ui": {
"types": "./dist/runtime/ui.d.ts",
"import": "./dist/runtime/ui.js"
},
"./runtime/*": {
"types": "./dist/runtime/*.d.ts",
"import": "./dist/runtime/*.js"
@ -95,10 +103,13 @@
"./shell/*": {
"types": "./dist/shell/*.d.ts",
"import": "./dist/shell/*.js"
}
},
"./theme.schema.json": "./theme.schema.json",
"./package.json": "./package.json"
},
"files": [
"dist",
"theme.schema.json",
"README.md",
"LICENSE"
],