waybetter/packages/shell
CRT 264f69c745 packages: make runtime and shell publishable to npm
Drop private from @waybetter/runtime and @waybetter/shell (root stays
private), add per-module exports with types/import conditions backed by
a tsc build (rewriteRelativeImportExtensions rewrites .ts specifiers to
.js in dist), files/sideEffects/engines/keywords/publishConfig, a
prepublishOnly that builds and tests, and a README + copied LICENSE per
package. Root gains build:packages and pack:check scripts. dist/ is
gitignored; the desktop app keeps importing raw src/*.ts by relative
path, unaffected.
2026-09-27 22:41:01 +00:00
..
src Extract the wayBetter framework core from wayBetter for X 2026-09-27 20:01:33 +00:00
tests Extract the wayBetter framework core from wayBetter for X 2026-09-27 20:01:33 +00:00
LICENSE packages: make runtime and shell publishable to npm 2026-09-27 22:41:01 +00:00
package.json packages: make runtime and shell publishable to npm 2026-09-27 22:41:01 +00:00
README.md packages: make runtime and shell publishable to npm 2026-09-27 22:41:01 +00:00
tsconfig.build.json packages: make runtime and shell publishable to npm 2026-09-27 22:41:01 +00:00

@waybetter/shell

Shell core for wayBetter: pure, unit-testable models for the app chrome around the pages it extends — the address bar's breadcrumb chips, dock/split-pane placement rules, dragged-link handling, account profiles, the titlebar update chip, command palette ranking, and native window controls. Zero runtime dependencies (the Tauri window API is passed in by the caller, never imported).

This package ships plain ESM with .d.ts types; there is no bundler-specific build step.

Install

npm install @waybetter/shell

Usage

Each module is a separate subpath export:

import { parseAddress, type AddressSite } from '@waybetter/shell/addressModel';
import { besideGroup, redundantNavPanes } from '@waybetter/shell/paneModel';
import { fuzzyScore, rankItems } from '@waybetter/shell/palette';
import { createWindowControls, type NativeWindow } from '@waybetter/shell/windowControls';

Most modules have no framework dependency (no React, no Tauri) so they are unit-tested directly under Node; the app wires them into its own UI and native calls. See the source comments in src/ for the contract of each module.

Modules

  • addressModel — parseAddress(url, site) for the address bar's breadcrumb chips.
  • chrome — layout constants for the custom titlebar/toolbar (mirrored in native code).
  • linkDrop — accepting a dragged link dropped into the dock as a tab or split pane.
  • palette — command palette fuzzy scoring, ranking and selection movement.
  • paneModel — dock pane geometry: where a "beside" link opens, which panes keep the rail.
  • profileModel — account profile model, mirrors native ProfileSettings.
  • updateModel — titlebar update chip model, mirrors native UpdateStatus.
  • windowControls — native window calls for the titlebar, resize grips and caption buttons.

License

GPL-3.0-or-later. See LICENSE.