waybetter/packages/runtime/tests
CRT 582c3d9460 Theme engine v2, the document side: component tokens, layout variants, decoration, icon packs
A theme may now say how each piece of a site is built, not only one radius and one density:
- components (themeComponents.ts): 36 generic parts with clamped tokens (radius, border incl.
  98.css-style bevels, fill by color role / glass / gradient, padding, sizes, type, shadow, shape,
  hover/active/focus), presets and parents; compiled over a site's part map as soft values
  (--wb-part-*) and rigid rules; text on a chosen fill keeps its contrast.
- variants (themeVariants.ts): fixed words on six axes; the owner holds an axis or switches layout
  changes off; the look of a variant is the site's skin.
- decoration (themeDecor.ts): dividers, chrome (title bar, masthead, prompt), a focus ring that is
  always visible, selection, scrollbars, links, motion under reduced-motion.
- icon packs (themeIcons.ts): a standalone document of glyphs by semantic name (path data, colored
  layers or a small PNG, never an SVG document), with license, source and credits; a theme only
  names a pack; the owner's icon choice is separate; drawn as CSS masks of the current color over
  the site's own svg boxes, behind forced-colors and mask-support guards, per group.
- a theme document gains the optional groups components, variants, decor, icons and
  colors.actions; a theme without them is sanitized to exactly what it was.
- theme.schema.json and the new icons.schema.json are generated from the same tables
  (scripts/theme-schema.mjs; a test fails when they are stale).
2026-09-30 23:22:36 +07:00
..
column.test.ts runtime column: set the column attributes on scan (config delivered at document start has no <html> yet), no scrollbar in columns, unread only above both the read items and what is on screen, a hidden 1 px webview counts as off screen 2026-09-28 23:42:21 +07:00
commands.test.ts runtime: plugin commands for the command palette (api.commands / scope.commands: register, list, run, owner = the starting plugin, removed on stop, caps, in-page shortcuts); host: start/stop scripts own and drop a plugin's commands; dev_start_script with sourceURL + devError for live reload; devErrors (file:line from a start failure) 2026-09-29 01:35:44 +07:00
devErrors.test.ts runtime: plugin commands for the command palette (api.commands / scope.commands: register, list, run, owner = the starting plugin, removed on stop, caps, in-page shortcuts); host: start/stop scripts own and drop a plugin's commands; dev_start_script with sourceURL + devError for live reload; devErrors (file:line from a start failure) 2026-09-29 01:35:44 +07:00
features.test.ts Feature health on the area cards: a feature that paused itself is named by its area's "health" palette entry, and the panel reads it for the row and the card (no new report to the host) 2026-09-30 22:00:04 +07:00
hubs.test.ts Extract the wayBetter framework core from wayBetter for X 2026-09-28 03:01:33 +07:00
i18n.test.ts locales: the Windows installer's words (wb.installer.*) and its language files, generated from the catalogs 2026-09-30 14:48:04 +07:00
linkRouting.test.ts Extract the wayBetter framework core from wayBetter for X 2026-09-28 03:01:33 +07:00
pageLang.test.ts pageLang: report X's language even when installed before <html> exists or before the IPC bridge 2026-09-29 11:01:53 +07:00
paneNav.test.ts Extract the wayBetter framework core from wayBetter for X 2026-09-28 03:01:33 +07:00
permissions.test.ts Plugin permissions and app installs: @permissions header, per-plugin API views, validated install/remove 2026-09-29 01:08:52 +07:00
pluginApi.test.ts Extract the wayBetter framework core from wayBetter for X 2026-09-28 03:01:33 +07:00
siteRuntime.test.ts Feature modules: a feature table (areas, flags, modes), a registry that runs a module only on its surfaces, one shared observer for every feature and plugin, settings from a schema, selector health with self-pause 2026-09-30 18:11:42 +07:00
stringPacks.test.ts String packs, phase 1: data-only packs that replace the wrapped site's own UI strings. Pack and inventory formats, validator (only inventory keys, parameter names, plural and select kinds, no markup), ordered idempotent engine that keeps what a restore needs, coverage and drift report; the per-site catalog hook adapter with a self-check (ok, hook not matched, no catalog seen), a fail-open webpack chunk array hook, a small DOM text net; waybetter strings check 2026-09-30 22:38:07 +07:00
styles.test.ts runtime: styles for created roots are constructed sheets (CSP-proof) 2026-09-29 04:09:14 +07:00
themeEngine.test.ts Theme engine: a rule is read as it takes effect (a Tailwind opacity utility's nested @supports value, not its solid fallback); unsupported @supports groups are left out; reach() is exported for site adapters 2026-09-30 21:04:12 +07:00
themeStructure.test.ts Theme engine v2, the document side: component tokens, layout variants, decoration, icon packs 2026-09-30 23:22:36 +07:00
themeTokens.test.ts Theme color model: a foreground the site paints dimmer than its secondary text becomes the theme's secondary text 2026-09-30 22:58:48 +07:00
ui.test.ts 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 2026-09-28 21:47:09 +07:00