@tonycodes-ui/mortar 0.12.0 → 0.14.0
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.
- package/CHANGELOG.md +6 -45
- package/DESIGN.md +1 -1
- package/README.md +1 -1
- package/catalog.json +413 -377
- package/cli/audit.mjs +152 -0
- package/dist/agent-data.json +1 -1
- package/dist/application.d.ts +30 -5
- package/dist/application.js +20 -8
- package/dist/email-theme.d.ts +38 -0
- package/dist/email-theme.js +200 -0
- package/dist/email.d.ts +100 -0
- package/dist/email.js +152 -0
- package/dist/index.d.ts +1 -1
- package/dist/inspection.js +17 -1
- package/dist/internal.d.ts +15 -1
- package/dist/internal.js +12 -1
- package/dist/marketing.d.ts +3 -2
- package/dist/marketing.js +2 -6
- package/dist/primitives.js +20 -11
- package/docs/agents.md +21 -18
- package/docs/auth-flows.md +2 -0
- package/docs/email.md +101 -0
- package/docs/theming.md +72 -1
- package/package.json +14 -3
- package/skills/mortar/SKILL.md +1 -1
- package/src/application.css +95 -1
- package/src/application.tsx +88 -19
- package/src/data.css +58 -2
- package/src/email-theme.ts +254 -0
- package/src/email.tsx +413 -0
- package/src/foundation.css +10 -0
- package/src/index.ts +3 -0
- package/src/inspection.tsx +15 -0
- package/src/internal.tsx +93 -2
- package/src/marketing.tsx +4 -74
- package/src/primitives.tsx +38 -19
package/CHANGELOG.md
CHANGED
|
@@ -2,54 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Mortar follows [semantic versioning](https://semver.org/). Before 1.0, a minor release may contain breaking changes, and it says so. Each release is published from its `v<version>` tag to [npmjs.com](https://www.npmjs.com/package/@tonycodes-ui/mortar) with npm provenance. Its GitHub release carries the exact archive and a `provenance.json` with the commit and SHA-512 integrity.
|
|
4
4
|
|
|
5
|
-
## 0.
|
|
5
|
+
## 0.14.0 (2026-11-07)
|
|
6
6
|
|
|
7
7
|
### Added
|
|
8
8
|
|
|
9
|
-
- **
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- `
|
|
13
|
-
-
|
|
14
|
-
- **NetworkIllustration** ([#68](https://github.com/tonycodes/mortar/issues/68)) draws nodes and straight connections supplied as data, in a viewBox that scales to its container. Signals travel along connections that carry one, with a duration per illustration or per connection and an even stagger by default. It is decorative by default (`aria-hidden`). Given a `label`, it is one named image with an optional `description`. Colours are tokens: surface nodes with a strong-line outline, accent nodes and signals, and secondary labels. While signals move, a visible "Pause animation" button controls them, and `paused` with `onPausedChange` makes that choice controlled or shared. Signals stop automatically under `prefers-reduced-motion`, which shows the static drawing with no control, even before scripts run. They also stop while the document is hidden or the drawing is off screen. Returning never overrides the user's pause. `motion="static"` draws the same thing without motion. The animation is illustrative and never announced as live activity. It adds no dependency.
|
|
15
|
-
- **Landing-page composition** ([#68](https://github.com/tonycodes/mortar/issues/68)). All additions are optional, and default markup is unchanged.
|
|
16
|
-
- **MarketingPage** frames a public page: a header, a `<main>` that grows to fill the viewport, and a footer. `align="center"` centres a single hero between them. The page is at least the viewport's height, and longer content scrolls rather than clipping.
|
|
17
|
-
- **Hero** `emphasis` marks a phrase of the title as `<em class="m-emphasis">` inside the one heading, in the brand's link colour. The title stays a string, and a phrase that isn't in it is ignored. `note` adds supporting content below the actions, such as a note or a Notice. `wide="copy" | "preview"` gives one split column three fifths of the width.
|
|
18
|
-
- **MarketingHeader** `tagline` shows a short descriptor beside the wordmark, outside the home link. It is hidden at 560px and narrower.
|
|
19
|
-
- **Footer** `layout="inline"` is one compact row of brand, notes, links, copyright and legal links. It wraps without changing reading order. `description` and `columns` are now optional.
|
|
20
|
-
- **Open agent tooling in the package: an MCP server and the `mortar` CLI.** They read the installed version's catalogue, contracts, examples and guides, run locally, work offline and need no account. They add no runtime dependencies. See [Mortar for coding agents](https://github.com/tonycodes/mortar/blob/main/docs/agents.md).
|
|
21
|
-
- `mortar mcp` is a stdio MCP server (`claude mcp add mortar -- npx -y @tonycodes-ui/mortar mcp`) with six tools: `search_components`, `get_component` (props with types and defaults, usage notes, dependencies, marker, tested states and a JSX example), `get_build_packet` (for component names or a free-text brief: the dependency closure, imports, CSS and ThemeProvider setup, design principles, API conventions and matching page templates), `get_guide`, `list_kits` and `audit_app`.
|
|
22
|
-
- `mortar search`, `component`, `packet`, `audit`, `guide` and `kits` give the same answers on the command line, with `--json`.
|
|
23
|
-
- `mortar audit [path]` is a read-only static audit of an application: version range, imports and props that the installed version does not have (with 0.6 rename suggestions), invalid prop values, CSS overriding `.m-*` classes or `[data-m-component]`, raw colours beside Mortar components, a missing `styles.css` import or ThemeProvider, deep imports and local copies of Mortar source. It exits 1 when it finds errors.
|
|
24
|
-
- An agent skill, `skills/mortar/SKILL.md` (`npx mortar skill`), with the workflow defaults: search, packet, compose, audit, and contribute by pull request.
|
|
25
|
-
- The package now also ships `AGENTS.md`, `CONTRIBUTING.md`, `TESTING.md` and the guides in `docs/`, which the tools read.
|
|
26
|
-
- **`ErrorSummary`** (Foundation › Form controls): the problems that stopped a form submitting, listed above the form with a link to each field. Props: `errors` (`{ message; href?; target? }[]`; renders nothing when empty), `title` (default "There is a problem"), `headingLevel` (default 2), `autoFocus` (default true), `submitCount`, `id` and `className`. It is a `role="alert"` region named by its heading with `tabIndex={-1}`: it takes focus when it appears and whenever `submitCount` changes, but not while a fixed field's error clears. A link focuses its field without changing the URL hash; for a group such as a RadioGroup the checked or first radio takes focus, and the label or legend scrolls into view.
|
|
27
|
-
- **Checkbox `error`**: the message is announced when it appears (`role="alert"`), the box is `aria-invalid` and `aria-describedby` links the description and the error. `required` adds the decorative `*` after the label, as on Input and Select. Without these props the markup is unchanged.
|
|
28
|
-
- **RadioGroup `error`, `hint`, `required` and `id`**: the hint or error sits under the legend and describes the fieldset; with an error each radio is `aria-invalid`, and `required` marks every radio and adds `*` to the legend. Without these props the markup is unchanged.
|
|
29
|
-
|
|
30
|
-
### Fixed
|
|
31
|
-
|
|
32
|
-
- **Brand values are checked as colour syntax.** `brandToStyle`, `brandToCss`, `registerBrand` and `brandTokens` accepted any value made of letters, digits and brackets, so `accent: "linear-gradient(…)"` or `url(…)` passed and then failed silently in the browser. A colour is now hex, a colour name (including `transparent` and `currentcolor`), or `rgb()`, `rgba()`, `hsl()`, `hsla()`, `hwb()`, `lab()`, `lch()`, `oklab()`, `oklch()`, `color()`, `color-mix()`, `light-dark()` or `var()`, with nested functions checked the same way. Anything else throws an error that names the key, such as `dark.accent`.
|
|
33
|
-
- **The audit no longer flags brand colours as `raw-colour`.** Colours inside a `brandTokens={…}` value (and a `const` it references in the same file), the arguments of `brandToCss`, `brandToStyle` and `registerBrand`, objects typed as or satisfying `BrandDefinition`, and `--m-brand-*` values are where colours belong. Other colours in the same file are still reported.
|
|
34
|
-
|
|
35
|
-
### Changed
|
|
36
|
-
|
|
37
|
-
- **`--m-line-strong` in light is `#8b8b90`** (was `#8e8e93`), and `--m-inv-line-strong` in dark with it. The old value was 2.99:1 on the default sunken surface, just under the 3:1 that control borders need.
|
|
38
|
-
- **Packages are published to npmjs.com.** Install with a plain `npm install @tonycodes-ui/mortar`; no registry configuration, account or token is needed. Releases are published from GitHub Actions with npm trusted publishing (OIDC, no long-lived token) and `--provenance`, so each version on npmjs.com links to the workflow run and commit that built it.
|
|
39
|
-
- **The playground moved to GitHub Pages**, at https://mortar.tony.codes/playground/. The site root links the playground, GitHub, npm and the docs. The package `homepage` points there.
|
|
40
|
-
- **Everything is free and in this repository.** The hosted Mortar Cloud preview (agent identities, OAuth MCP connections, hosted audits and planned paid plans) is retired. The kit, docs, playground and agent tooling are MIT licensed here, with no accounts, licence checks, telemetry or hosted service. GitHub maintainer review is the only review gate.
|
|
41
|
-
- The sign-up and other auth page templates use `ErrorSummary` and `Checkbox error` instead of a local summary and a hand-wired terms error. The terms checkbox is now `required`.
|
|
42
|
-
|
|
43
|
-
### Migration
|
|
44
|
-
|
|
45
|
-
Versions up to 0.11 of the private-registry package `@tony-ui/mortar` were published only to the previous owner-hosted registry, `https://git.tony.codes/api/packages/tony/npm/`, which will be retired. New versions are on npmjs.com only. To upgrade, remove the scope override and install from npmjs.com:
|
|
46
|
-
|
|
47
|
-
```sh
|
|
48
|
-
npm config delete @tony-ui:registry --location=project
|
|
49
|
-
npm install @tonycodes-ui/mortar@latest
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
A project that must stay on 0.11 or earlier keeps its scope override (`@tony-ui:registry=https://git.tony.codes/api/packages/tony/npm/` in `.npmrc`) while that registry remains available, or installs the archive attached to the version's [GitHub release](https://github.com/tonycodes/mortar/releases).
|
|
9
|
+
- **Transactional email** (`@tonycodes-ui/mortar/email`, [#91](https://github.com/tonycodes/mortar/issues/91)), built on React Email, which becomes an optional peer dependency (`@react-email/components`). The app entry point doesn't load it.
|
|
10
|
+
- `emailTheme(brand?)` resolves a `BrandDefinition` to literal light-appearance colours and font stacks, as `tokens.css` does. Derived tints are computed in JS, and `oklch()`, `oklab()`, `hsl()` and `rgb()` convert to hex.
|
|
11
|
+
- `EmailShell`, `EmailHeading`, `EmailText`, `EmailButton`, `EmailLink` and `EmailCode` lay out in tables, with spacing on cells so Outlook for Windows keeps it.
|
|
12
|
+
- `renderEmail` returns the HTML and its plain-text alternative.
|
|
13
|
+
- `VerifyEmail` is the first template: a code, a link or both. See [Transactional email](docs/email.md).
|
|
53
14
|
|
|
54
15
|
## 0.11.0 (2026-10-20)
|
|
55
16
|
|
package/DESIGN.md
CHANGED
|
@@ -27,7 +27,7 @@ Every component follows these rules. New props must fit them, and the code revie
|
|
|
27
27
|
- Tables align columns with `start | end`, not `left | right`.
|
|
28
28
|
- **Tone.**
|
|
29
29
|
- Status uses `Tone` (`neutral | info | success | warning | danger`).
|
|
30
|
-
- Section surfaces use `tone: "default" | "muted" | "inverse"`. Promotional bands (CallToAction, Hero and Banner) also take `"accent"`: the brand's accent fill, which is its accent gradient when it defines one, with on-accent text. Button and ActionLink take the same fill as `variant="accent"`. Each component offers only the tones it styles.
|
|
30
|
+
- Section surfaces use `tone: "default" | "muted" | "inverse"`. Promotional bands (CallToAction, Hero and Banner) also take `"accent"`: the brand's accent fill, which is its accent gradient when it defines one, with on-accent text. Button and ActionLink take the same fill as `variant="accent"`. The application bar (Navbar, and StackedShell through it) takes `tone: "default" | "inverse" | "accent"`; it has no muted tone. Each component offers only the tones it styles.
|
|
31
31
|
- A destructive action is `tone="danger"`, and a destructive item in a list is `danger: true`.
|
|
32
32
|
- Tone renders as `data-tone`.
|
|
33
33
|
- **State.** Busy work is `loading`. Empty content is `empty?: { title; description?; action? }`. Errors are `error` (string).
|
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ Tools: `search_components`, `get_component`, `get_build_packet`, `get_guide`, `l
|
|
|
50
50
|
|
|
51
51
|
## Changes and upgrades
|
|
52
52
|
|
|
53
|
-
See [CHANGELOG.md](CHANGELOG.md) for every release. [Theming](docs/theming.md) explains brands, appearance, density and the token scales. [Sign-in and registration flows](docs/auth-flows.md) maps each auth step to components, autocomplete values and security notes. Upgrading from 0.5 or earlier? [Migrating to 0.6](docs/migrating-to-0.6.md) lists every renamed prop.
|
|
53
|
+
See [CHANGELOG.md](CHANGELOG.md) for every release. [Theming](docs/theming.md) explains brands, appearance, density and the token scales. [Sign-in and registration flows](docs/auth-flows.md) maps each auth step to components, autocomplete values and security notes. [Transactional email](docs/email.md) renders branded emails, such as email verification, from `@tonycodes-ui/mortar/email`. Upgrading from 0.5 or earlier? [Migrating to 0.6](docs/migrating-to-0.6.md) lists every renamed prop.
|
|
54
54
|
|
|
55
55
|
## Local install
|
|
56
56
|
|