@tearleads/windowing 0.2.29 → 0.2.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,8 +46,8 @@ id; `useOptionalTheme` returns `null` outside a provider.
46
46
 
47
47
  Mount one provider above everything themed. It stamps the attributes before
48
48
  the browser paints and removes them on unmount; under a dark scheme,
49
- `tokens.css` sets `color-scheme: dark`. Tearleads sets its themes per host
50
- profile in `packages/app/src/host/AppHostConfig.ts`.
49
+ [`tokens.css`][tokens] sets `color-scheme: dark`. Tearleads sets its themes per
50
+ host profile in [`packages/app/src/host/AppHostConfig.ts`][host-profile].
51
51
 
52
52
  ## Wallpapers and Display Properties
53
53
 
@@ -118,14 +118,15 @@ chrome's look without rendering a window.
118
118
 
119
119
  The stylesheets read design tokens (colors, spacing, radii, shadows, and the
120
120
  `--window-bar-*` and `--tearleads-window-titlebar-*` chrome tokens). The package
121
- entry imports `tokens.css`, which defines every one of them under
121
+ entry imports [`tokens.css`][tokens], which defines every one of them under
122
122
  `:where(:root)`, so a page that defines none still renders a complete light
123
123
  window. That rule has zero specificity: any `:root` rule, theme, or scoped block
124
124
  the host writes overrides it. Tearleads overrides them with its own themes in
125
- `packages/ui/src/styles.css` and `packages/app/src/shell/layout/AppChrome.css`.
125
+ [`packages/ui/src/styles.css`][ui-styles] and
126
+ [`packages/app/src/shell/layout/AppChrome.css`][app-chrome].
126
127
  The routed shell also reads the screen's safe areas (`--safe-area-*`) and, under
127
128
  `:root[data-navigation-mode="routed"]`, a 44px `--control-height` and 24px
128
- `--control-icon-size`, which `tokens.css` defines the same way.
129
+ `--control-icon-size`, which [`tokens.css`][tokens] defines the same way.
129
130
 
130
131
  Several defaults derive from `--color-dark`, the foreground: the window edge
131
132
  (`--border-strong-color`), the hover and selection chip (`--emphasis-surface`
@@ -134,8 +135,8 @@ and `--emphasis-text`), and `--color-hairline`. A dark theme that sets only the
134
135
  Tearleads' dark theme does.
135
136
 
136
137
  The window, menus, and routed shell draw thin scrollbars in `--scrollbar-thumb`
137
- over `--scrollbar-track`. `tokens.css` leaves both unset, so the thumb falls
138
- back to `--color-dark` at 32%, mixed on each surface so it follows the theme
138
+ over `--scrollbar-track`. [`tokens.css`][tokens] leaves both unset, so the thumb
139
+ falls back to `--color-dark` at 32%, mixed on each surface so it follows the theme
139
140
  there, including a scoped one, and the track to transparent. They use the
140
141
  standard `scrollbar-width` and
141
142
  `scrollbar-color` properties, which Firefox, Chromium 121, and Safari 26.2
@@ -145,8 +146,8 @@ scrolls the same way: `scrollbar-color` inherits from the surface, and
145
146
  specificity, so any host rule wins.
146
147
 
147
148
  The window paints its background, behind its body and sidebar, with
148
- `--window-background`. `tokens.css` leaves it unset, so it falls back to
149
- `--color-light` wherever that is set, including a scoped theme. Content sets
149
+ `--window-background`. [`tokens.css`][tokens] leaves it unset, so it falls back
150
+ to `--color-light` wherever that is set, including a scoped theme. Content sets
150
151
  its own window's background with `useWindowBackground`, while it is mounted;
151
152
  `undefined` keeps the default. A document viewer can use it to set its page
152
153
  apart from the window around it:
@@ -165,3 +166,8 @@ Windows and menus lay out `border-box`, the box model their sizes assume. Since
165
166
  `box-sizing` does not inherit, a zero-specificity rule sets it on the window or
166
167
  menu and everything inside, including window content; any host rule overrides
167
168
  it.
169
+
170
+ [tokens]: https://github.com/a2f0/tearleads/blob/main/packages/windowing/src/tokens.css
171
+ [host-profile]: https://github.com/a2f0/tearleads/blob/main/packages/app/src/host/AppHostConfig.ts
172
+ [ui-styles]: https://github.com/a2f0/tearleads/blob/main/packages/ui/src/styles.css
173
+ [app-chrome]: https://github.com/a2f0/tearleads/blob/main/packages/app/src/shell/layout/AppChrome.css
package/docs/launcher.md CHANGED
@@ -27,11 +27,12 @@ receives where the menu opened, for placing a new window near it:
27
27
  The button is named "Menu" unless `label` says otherwise, and announces its
28
28
  menu with `aria-haspopup` and `aria-expanded`. By default it is a square,
29
29
  borderless control the height of the bar's controls, lit while hovered,
30
- focused, or open (`StartMenu.css`). A `className` replaces that styling, so a
30
+ focused, or open ([`StartMenu.css`][start-menu-styles]). A `className` replaces
31
+ that styling, so a
31
32
  host's own button styles apply alone. A menu that needs more than a list passes
32
33
  `renderMenu`, which renders the open menu itself and receives its `position`
33
34
  and a `close` callback. Tearleads' footer does this in
34
- `packages/app/src/shell/pane/footer/PaneFooter.tsx`.
35
+ [`packages/app/src/shell/pane/footer/PaneFooter.tsx`][pane-footer].
35
36
 
36
37
  ## Launching mini-apps
37
38
 
@@ -124,7 +125,9 @@ writes one JSON string, so the host chooses where it lives:
124
125
  `createOpfsDesktopStateStorage` keeps a file in the origin private file system,
125
126
  `createMemoryDesktopStateStorage` keeps it in memory (the default), and a host
126
127
  can wrap its own store, as Tearleads wraps each identity's encrypted blob store
127
- in `packages/app/src/shell/pane/shell/usePaneDesktopStateStorage.ts`. Keep the
128
+ in
129
+ [`packages/app/src/shell/pane/shell/usePaneDesktopStateStorage.ts`][desktop-storage].
130
+ Keep the
128
131
  adapter stable: a new adapter reloads the layout from what it holds. Moves made
129
132
  before the load finishes win and are saved with the stored layout; when the
130
133
  read fails, moves stay in memory and nothing is written.
@@ -160,4 +163,9 @@ offers, such as to those the session may see, and
160
163
  Overlays that should fill the content pane rather than the screen portal into
161
164
  `useRoutedPaneOverlayHost().host`. The shell sizes to the box its host gives
162
165
  `.routed-pane`, as a grid item or a block with a height. Tearleads dresses it in
163
- `packages/app/src/shell/layout/routed/AppRoutedPane.tsx`.
166
+ [`packages/app/src/shell/layout/routed/AppRoutedPane.tsx`][app-routed-pane].
167
+
168
+ [start-menu-styles]: https://github.com/a2f0/tearleads/blob/main/packages/windowing/src/menu/StartMenu.css
169
+ [pane-footer]: https://github.com/a2f0/tearleads/blob/main/packages/app/src/shell/pane/footer/PaneFooter.tsx
170
+ [desktop-storage]: https://github.com/a2f0/tearleads/blob/main/packages/app/src/shell/pane/shell/usePaneDesktopStateStorage.ts
171
+ [app-routed-pane]: https://github.com/a2f0/tearleads/blob/main/packages/app/src/shell/layout/routed/AppRoutedPane.tsx
@@ -15,25 +15,28 @@ bun run --cwd packages/windowing package:smoke # pack, install, render, typeche
15
15
  The built package is ES modules with declarations and source maps, plus every
16
16
  stylesheet. React and react-dom are peer dependencies from 19.2, the first
17
17
  release with `useEffectEvent`; Phosphor icons is its one dependency. The
18
- stylesheets and the entry module (which imports `tokens.css`) are declared side
19
- effects, so bundlers that trust `sideEffects` keep the token defaults.
20
- `src/publishedPackage.test.ts` checks the built manifest and that no module
21
- reaches outside the package, so a new workspace import fails the package's tests
22
- rather than the publish. The declarations drop the stylesheet imports tsc keeps
18
+ stylesheets and the entry module (which imports [`tokens.css`][tokens]) are
19
+ declared side effects, so bundlers that trust `sideEffects` keep the token
20
+ defaults. [`src/publishedPackage.test.ts`][package-tests] checks the built
21
+ manifest, documentation links, and that no module reaches outside the package,
22
+ so a new workspace import fails the package's tests rather than the publish.
23
+ The declarations drop the stylesheet imports tsc keeps
23
24
  in them, which a consumer's typecheck could not resolve. The smoke script
24
25
  installs the lowest React the peer range admits, typechecks against the
25
26
  declarations with TypeScript's defaults, and bundles a named import with webpack.
26
27
 
27
- Merging to `main` publishes. When `packages/windowing` changes there,
28
- `.github/workflows/windowing-publish.yml` publishes the version in
29
- `package.json` if it is a stable `x.y.z` newer than npm's `latest`; a merge that
28
+ Merging to `main` publishes. When [`packages/windowing`][windowing-source] changes
29
+ there, [`.github/workflows/windowing-publish.yml`][windowing-publish] publishes
30
+ the version in [`package.json`][workspace-manifest] if it is a stable `x.y.z`
31
+ newer than npm's `latest`; a merge that
30
32
  leaves the version alone, a re-run, or a run that finishes after a newer release
31
33
  succeeds without publishing, as decided by `agent-tool release plan`.
32
34
  The workflow authenticates with
33
35
  [npm trusted publishing](https://docs.npmjs.com/trusted-publishers): npm accepts
34
36
  the job's GitHub OIDC token instead of an npm token, and attaches provenance to
35
37
  each version. On npmjs.com the package's trusted publisher names the `a2f0`
36
- owner, the `tearleads` repository, the `windowing-publish.yml` workflow, and
38
+ owner, the `tearleads` repository, the
39
+ [`windowing-publish.yml`][windowing-publish] workflow, and
37
40
  the `npm` environment, which the repository restricts to `main`. Renaming the
38
41
  workflow or the environment breaks publishing until that setting matches.
39
42
 
@@ -48,8 +51,9 @@ bun run publish:npm windowing
48
51
 
49
52
  Windowing has no workspace dependencies, and its React peers and Phosphor
50
53
  dependency already exist on npm, so it publishes on its own.
51
- `scripts/release/publishNpmPackage.sh` publishes each npm package by its
52
- directory name; `bun run --cwd packages/windowing publish:npm` runs it for
54
+ [`scripts/release/publishNpmPackage.sh`][publish-npm-package] publishes each npm
55
+ package by its directory name; `bun run --cwd packages/windowing publish:npm`
56
+ runs it for
53
57
  windowing, and the workflow runs it too.
54
58
 
55
59
  The command rebuilds into a fresh temporary directory, publishes its generated
@@ -68,7 +72,15 @@ Run `package:smoke` separately before a release to verify the packed package in
68
72
  an external consumer. It needs the network to install the consumer dependencies.
69
73
 
70
74
  `ship-pr` bumps changed workspace packages before review and merge; the generated
71
- manifest copies `version` from `package.json`. For a release outside that flow,
72
- bump the version yourself before publishing. The manifest names this repository,
75
+ manifest copies `version` from [`package.json`][workspace-manifest]. For a release
76
+ outside that flow, bump the version yourself before publishing. The manifest
77
+ names this repository,
73
78
  which npm requires of a version with provenance, and declares
74
79
  `"license": "UNLICENSED"`.
80
+
81
+ [tokens]: https://github.com/a2f0/tearleads/blob/main/packages/windowing/src/tokens.css
82
+ [package-tests]: https://github.com/a2f0/tearleads/blob/main/packages/windowing/src/publishedPackage.test.ts
83
+ [windowing-source]: https://github.com/a2f0/tearleads/tree/main/packages/windowing
84
+ [windowing-publish]: https://github.com/a2f0/tearleads/blob/main/.github/workflows/windowing-publish.yml
85
+ [workspace-manifest]: https://github.com/a2f0/tearleads/blob/main/packages/windowing/package.json
86
+ [publish-npm-package]: https://github.com/a2f0/tearleads/blob/main/scripts/release/publishNpmPackage.sh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tearleads/windowing",
3
- "version": "0.2.29",
3
+ "version": "0.2.30",
4
4
  "description": "App-agnostic window management for React: window state, window chrome, and the menu and sidebar primitives it renders with.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {