Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9a17c51
components-settings: marathon 0.23.0 and mise-action v5.3.0
JaimeStill Nov 22, 2026
7b1ff5e
components-settings: web-foundation v0.4.0
JaimeStill Nov 22, 2026
36d1b64
components-settings: the foundation's sheets in place of the local co…
JaimeStill Nov 22, 2026
cc33849
components-settings: the foundation's JSON formatter in place of json.js
JaimeStill Nov 22, 2026
ac315c1
components-settings: web-icons and sl-drawer's glyph Close
JaimeStill Nov 22, 2026
fcf2823
components-settings: sl-drawer's modal mode
JaimeStill Nov 22, 2026
425671f
components-settings: sl-shortcuts, the dialog's bindings as a plain-t…
JaimeStill Nov 23, 2026
5072e6c
components-settings: sl-settings, the reader's theme and keyboard set…
JaimeStill Nov 23, 2026
d4c2f87
components-settings: the S and ? pattern in the demo and README, and …
JaimeStill Nov 23, 2026
73e1c4c
components-settings: release prep for v0.2.0
JaimeStill Nov 23, 2026
fcd68e6
components-settings: standards review: comments.md's five kinds
JaimeStill Nov 23, 2026
fcede2b
components-settings: standards review: consistency with the second pe…
JaimeStill Nov 23, 2026
56020c1
components-settings: standards review: tests at the seam, not restate…
JaimeStill Nov 23, 2026
c78faa5
components-settings: spec review: captures show the Close hint
JaimeStill Nov 23, 2026
7e9b732
components-settings: editor pass
JaimeStill Nov 23, 2026
1dcaf99
components-settings: redirect: sl-settings lays out by its own width
JaimeStill Nov 23, 2026
bb2f79b
components-settings: redirect: the settings' preview placement in the…
JaimeStill Nov 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .claude/marathon.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ currency = "mise run currency"
[remote]
platform = "github"
publish = "gh pr create"
merge = "gh pr checks --watch && gh pr merge --merge --delete-branch"
checks = "gh pr checks --watch"
merge = "gh pr merge --merge --delete-branch"
ci = '''
sha=$(git rev-parse HEAD)
for _ in $(seq 30); do
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v7.0.1

- uses: jdx/mise-action@v5.2.10
- uses: jdx/mise-action@v5.3.0

- name: mise run install
run: mise run install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
exit 1
fi

- uses: jdx/mise-action@v5.2.10
- uses: jdx/mise-action@v5.3.0

- name: mise run install
run: mise run install
Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,40 @@ All notable changes to `@standards-lab/web-components` are documented here. The
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the package adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2026-11-22

### Removed

- **Breaking:** `./json.js`, with no re-export: import `formatJson` and `tryFormatJson` from the
foundation's `format.js`.

### Changed

- **Breaking:** the foundation peer is `@standards-lab/web-foundation` at `^0.4.0`, up from
`^0.3.0`, and `@standards-lab/web-icons` at `^0.1.0` is a second peer, whose glyphs the
components import by package name; a consumer declares both beside the components.
- **Breaking:** the components read the foundation's `--color-accent` and `--color-primary`, which
replace `--accent-color` and `--interaction-color`; a page that set the old names sets the new.
- **Breaking:** each shadow root adopts the foundation's utilities, glyph-button, dialog, and motion
sheets where it uses them, and `sl-settings` its meta and structure sheets, in place of the
components' own rules for the same, so the foundation's classes style the components' internals.
The chat thread's streaming dot and the stage timeline's running ring are spans carrying the
foundation's motion classes, no longer pseudo-elements.
- **Breaking:** `sl-drawer`'s Close is a glyph button showing web-icons' x-16; the `close` slot's
text, "Close" by default, is its name and its hint on hover and keyboard focus, no longer its
visible text.
- The repository's tooling takes marathon 0.23.0 and mise-action v5.3.0.

### Added

- `./settings.js`: `sl-settings`, the reader's theme and keyboard settings, applied and stored at
once.
- `./shortcuts.js`: `sl-shortcuts`, the keyboard shortcuts of the dialog that holds it, as a
plain-text table.
- `sl-drawer`'s `modal` attribute, which keeps the drawer modal at every width.
- The Settings and Help pattern, S and ? opening dialogs that hold `sl-settings` and
`sl-shortcuts`, in the README and the demo, with specimen pages for both.

## [0.1.0] - 2026-11-18

### Added
Expand Down Expand Up @@ -39,4 +73,5 @@ All notable changes to `@standards-lab/web-components` are documented here. The
- Releases by tag: each `v<version>` tag marks a pack commit whose tree is the pack, the build
included, and whose one parent is main's merge commit; its GitHub release carries the tarball.

[0.2.0]: https://github.com/standards-lab/web-components/releases/tag/v0.2.0
[0.1.0]: https://github.com/standards-lab/web-components/releases/tag/v0.1.0
138 changes: 118 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

# web-components

The Lit components of the standards-lab web client stack: twelve elements with a shadow root that
applications compose, their sheets, a Markdown renderer, and a JSON formatter. It is ES modules
with their type declarations and stylesheets, built on
[`@standards-lab/web-foundation`](https://github.com/standards-lab/web-foundation), which it takes
as a peer, and is released by git tag. A component takes properties and attributes, sends events,
The Lit components of the standards-lab web client stack: fourteen elements with a shadow root
that applications compose, their sheets, and a Markdown renderer. It is ES modules with their type
declarations and stylesheets, built on
[`@standards-lab/web-foundation`](https://github.com/standards-lab/web-foundation) with the glyphs
of [`@standards-lab/web-icons`](https://github.com/standards-lab/web-icons), which it takes as
peers, and is released by git tag. A component takes properties and attributes, sends events,
and may hold its own UI state; it holds no services, fetches no data, and binds no key.

## Install
Expand All @@ -16,19 +17,19 @@ Each release is a tag, `v<version>`, of
package as `pnpm pack` builds it: `package.json`, this README, the LICENSE, and `dist/`, the build.
The build lives only in the tag's tree, so the tag installs with no build step, and its manifest
has no scripts. It depends on lit 3.3.3 and marked 18.2.1, and takes the foundation as a peer at
`^0.3.0`: a consumer declares the foundation beside the components, and the one copy serves both,
so a restyle of the foundation's sheets by package name reaches the components' shadow roots too.
Install both by their tags:
`^0.4.0` and the icons at `^0.1.0`: a consumer declares each beside the components, so the page
and the components share one copy of each, and a restyle of the foundation's sheets by package
name reaches the components' shadow roots too. Install all three by their tags:

```
pnpm add github:standards-lab/web-components#v0.1.0 github:standards-lab/web-foundation#v0.3.0
bun add github:standards-lab/web-components#v0.1.0 github:standards-lab/web-foundation#v0.3.0
npm install --allow-git=root github:standards-lab/web-components#v0.1.0 github:standards-lab/web-foundation#v0.3.0
pnpm add github:standards-lab/web-components#v0.2.0 github:standards-lab/web-foundation#v0.4.0 github:standards-lab/web-icons#v0.1.0
bun add github:standards-lab/web-components#v0.2.0 github:standards-lab/web-foundation#v0.4.0 github:standards-lab/web-icons#v0.1.0
npm install --allow-git=root github:standards-lab/web-components#v0.2.0 github:standards-lab/web-foundation#v0.4.0 github:standards-lab/web-icons#v0.1.0
```

npm 12 refuses git dependencies unless `--allow-git` allows them; `root` allows the ones the
project itself declares, which both packages are. Without the foundation declared, the install
fails. Each GitHub release also carries the tarball.
project itself declares, which all three packages are. Leaving either peer undeclared fails the
install. Each GitHub release also carries the tarball.

### Safari

Expand All @@ -40,8 +41,9 @@ package keeps the standard syntax, with no pack-time rewrite.

The package is `@standards-lab/web-components`. Each module defines its element when it is
imported, and the element's shadow root adopts the foundation's reset and elements sheets, then
its own layout-only sheet. The modules import `lit` and the foundation by package name and their
sheets as CSS module scripts, so a page reaches them through an import map or a bundler, and links
the foundation's meta, structure, utilities, glyph-button, dialog, and motion sheets where it uses
them, then its own layout-only sheet. The modules import `lit`, the foundation, and the icons by
package name and their sheets as CSS module scripts, so a page reaches them through an import map or a bundler, and links
the foundation's `page.css`:

```html
Expand All @@ -56,9 +58,11 @@ the foundation's `page.css`:
- `./entry.js`: `sl-entry`, one directory or file of a document hierarchy, as a button.
- `./pagination.js`: `sl-pagination`, a page of entries between its summary and its controls.
- `./drawer.js`: `sl-drawer`, its children docked inline on a wide viewport, in a modal drawer
below.
below, or in the modal drawer at every width with `modal`.
- `./shortcuts.js`: `sl-shortcuts`, the keyboard shortcuts of the dialog that holds it, as a table.
- `./settings.js`: `sl-settings`, the reader's theme and keyboard settings, applied and stored at
once.
- `./markdown.js`: `markdown(source)`, a Markdown string as a Lit template of plain elements.
- `./json.js`: `formatJson(text)`, valid JSON text re-indented from its own tokens.
- `./artifact-viewer.js`: `sl-artifact-viewer`, one artifact's content by its content type.
- `./event-log.js`: `sl-event-log`, events as a log in the order given.
- `./search-results.js`: `sl-search-results`, a search's matches under a status line.
Expand All @@ -72,12 +76,105 @@ the foundation's `page.css`:
[docs/components.md](https://github.com/standards-lab/web-components/blob/main/docs/components.md)
documents each module in full, and its demo and specimen pages.

### Settings and Help

The components bind no key, so the page binds S and ? itself, as `demo/components.html` does. Two
glyph buttons in the header's `.header-actions` open the dialogs with `command="show-modal"`, and
the foundation's `keys.js` binds each to its key through `data-keys`. Help is a `.dialog-fit`
dialog holding `sl-shortcuts`, and Settings is a `.dialog-wide` dialog holding `sl-settings`; each
has a `.dialog-header` whose Close shows the Esc hint. Close and Escape close either dialog with no
script, and focus returns to the element that held it. The page links the foundation's
`glyph-button.css`, `dialog.css`, and `layout.css` after its entry, and web-icons' `iconFill()`
fills the glyphs' markers:

```html
<header>
<strong>App</strong>
<div class="header-actions">
<button
type="button"
class="glyph-button"
commandfor="help"
command="show-modal"
aria-label="Help"
aria-description=""
data-keys="?"
interestfor="help-hint"
>
<svg data-icon="octicon/question-16"></svg>
<span aria-hidden="true"><kbd>?</kbd></span>
</button>
<div id="help-hint" class="glyph-hint" popover="hint" aria-hidden="true">Help</div>
<button
type="button"
class="glyph-button"
commandfor="settings"
command="show-modal"
aria-label="Settings"
aria-description=""
data-keys="s"
interestfor="settings-hint"
>
<svg data-icon="octicon/gear-16"></svg>
<span aria-hidden="true"><kbd>S</kbd></span>
</button>
<div id="settings-hint" class="glyph-hint" popover="hint" aria-hidden="true">Settings</div>
</div>
</header>
<dialog id="help" class="dialog-fit" aria-labelledby="help-title">
<header class="dialog-header">
<h2 id="help-title" tabindex="-1" autofocus>Keyboard shortcuts</h2>
<button
type="button"
class="glyph-button"
commandfor="help"
command="close"
aria-label="Close"
aria-description=""
interestfor="help-close-hint"
>
<svg data-icon="octicon/x-16"></svg>
<span aria-hidden="true"><kbd>Esc</kbd></span>
</button>
<div id="help-close-hint" class="glyph-hint" popover="hint" aria-hidden="true">Close</div>
</header>
<sl-shortcuts></sl-shortcuts>
</dialog>
<dialog id="settings" class="dialog-wide" aria-labelledby="settings-title">
<header class="dialog-header">
<h2 id="settings-title">Settings</h2>
<button
type="button"
class="glyph-button"
commandfor="settings"
command="close"
aria-label="Close"
aria-description=""
interestfor="settings-close-hint"
>
<svg data-icon="octicon/x-16"></svg>
<span aria-hidden="true"><kbd>Esc</kbd></span>
</button>
<div id="settings-close-hint" class="glyph-hint" popover="hint" aria-hidden="true">Close</div>
</header>
<sl-settings></sl-settings>
</dialog>
<script type="module">
import "@standards-lab/web-foundation/keys.js";
import "@standards-lab/web-components/settings.js";
import "@standards-lab/web-components/shortcuts.js";
</script>
```

The Help heading takes focus as its dialog opens; the Settings heading doesn't, so `sl-settings`
focuses its first row. `demo/settings.html` and `demo/shortcuts.html` carry the pattern too.

## Development

Tasks run through [mise](https://mise.jdx.dev):

```
mise run install # the pinned tools, and node_modules with the foundation and the tooling at their tags; reads the network
mise run install # the pinned tools, and node_modules with the foundation, the icons, and the tooling at their tags; reads the network
mise run check # lint, lint-context, lint-references, types, build, and both test tiers; reads no network
mise run build # src/ into dist/
mise run demo # serve the components demo page and the specimen pages on dist/
Expand All @@ -91,11 +188,12 @@ mise run screenshots --scheme dark # only the scheme named, light or dark
mise run screenshots --output browser # a gallery of the captures, opened in the browser; directory keeps the files
mise run screenshots --dir <path> # write the captures into the directory named, with any of the above
mise run screenshots --keep # keep the terminal output's captures, with any of the above
mise run currency # report every tool, package, and action pin, the foundation's and the tooling's tags, and the foundation's peer range, behind its latest; a held pin with its reason
mise run currency # report every tool, package, and action pin, the foundation's, the icons', and the tooling's tags, and both peer ranges, behind its latest; a held pin with its reason
```

`mise run screenshots` captures each specimen page light and dark, in vertical tiles at most
1200px tall, and the drawer's in its viewport at each of its four states. It runs the
1200px tall; it captures the drawer's page in its viewport at each of its six states, and the
settings and shortcuts pages again with their dialogs open. It runs the
`web-screenshots` bin of [web-tooling](https://github.com/standards-lab/web-tooling), the
devDependency the browser tier's driver and server also come from, over the capture description
`scripts/screenshots.config.ts`; `mise run screenshots -- --help` lists the flags with the pages
Expand Down
2 changes: 1 addition & 1 deletion STANDARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The architecture pages that apply, in the architecture repository:
## Package

- The package is `@standards-lab/web-components`, the components layer of the web client stack,
built on `@standards-lab/web-foundation`, its one peer.
built on `@standards-lab/web-foundation` and `@standards-lab/web-icons`, its two peers.
- lit and marked are each pinned exactly, and only the Markdown module imports marked
(`test/unit/marked.test.ts` enforces it).
- `dist/` lives only in a release tag's tree, the pack, never on a branch.
Expand Down
17 changes: 11 additions & 6 deletions context/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# web-components context

web-components is the set of Lit elements with a shadow root that applications compose, built on
web-foundation as a peer. A component takes properties and attributes, sends events, and may hold
web-foundation and web-icons as peers. A component takes properties and attributes, sends events, and may hold
its own UI state; it holds no services, fetches no data, holds no application state, and never
imports the SDK. An application's internal element becomes a component once a second application
needs it.
Expand All @@ -19,14 +19,16 @@ line; the workflows and CHANGELOG.md name theirs, web-foundation's at ceaab61. T
line have their provenance here:

- `package.json` is adapted from spike-html-apps-components (10dde51): package.json. It is renamed
`@standards-lab/web-components` at 0.1.0, takes `@standards-lab/web-foundation` as its peer,
and replaces the spike's foundation and tooling devDependencies with web-foundation's and
web-tooling's release tags; it pins marked and typescript-eslint exactly.
`@standards-lab/web-components` at 0.1.0, takes `@standards-lab/web-foundation` and
`@standards-lab/web-icons` as its peers, and replaces the spike's foundation and tooling
devDependencies with web-foundation's and web-tooling's release tags, adds web-icons' release
tag, and pins marked and typescript-eslint exactly.
- `.prettierrc.json` is from spike-html-apps-components (10dde51): .prettierrc.json.
- `LICENSE` is from spike-html-apps-components (10dde51): LICENSE, unchanged.
- `pnpm-lock.yaml` is generated, not copied.
- `test/unit/marked.test.ts`, `test/browser/themes.test.ts`, and
`test/browser/support/profiles.ts` are written here, with no source.
- `test/unit/marked.test.ts`, `test/browser/themes.test.ts`,
`test/browser/shortcut-dialogs.test.ts`, `test/browser/support/profiles.ts`, and
`demo/glyphs.js` are written here, with no source.
- `CLAUDE.md`, `.claude/`, and this directory are marathon's working files, written here.

## Capability map
Expand All @@ -37,3 +39,6 @@ line have their provenance here:
list](../docs/components.md#inspection).
- **Controls** (built): [the status badge, entry, pagination, and
drawer](../docs/components.md#controls).
- **Settings and Help** (built): [the reader's settings and the keyboard shortcuts
list](../docs/components.md#controls), and [the page pattern that opens
them](../README.md#settings-and-help).
Loading