@tonycodes-ui/mortar 0.13.0 → 0.15.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 CHANGED
@@ -2,31 +2,16 @@
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.13.0 (2026-11-05)
5
+ ## 0.15.0 (2026-11-07)
6
6
 
7
7
  ### Added
8
8
 
9
- - **DataTable column priority and pinning for narrow screens** ([#77](https://github.com/tonycodes/mortar/issues/77)). `priority: "medium"` hides a column when the table is narrower than 480px and `priority: "low"` below 768px. This is the table's own width (a container query), so a table in a narrow panel collapses as it would on a phone. The first column always shows. A table with priorities keeps its truncated columns shrinking on narrow screens (down to 5rem) so the remaining columns fit instead of scrolling. `pin: "end"` keeps a column, such as row actions, at the trailing edge while the table scrolls sideways; its background follows the row's stripe, hover and selection. Tables without these props are unchanged.
10
- - **`mortar audit` flags raw HTML elements that a Mortar component replaces** (`raw-element`, [#76](https://github.com/tonycodes/mortar/issues/76)). In an app that uses Mortar, a raw `<table>` (use DataTable or Table), `<select>`, `<textarea>`, `<dialog>`, `<progress>` or `<input>` is an error, and a raw `<button>` is a warning. Each finding names the component to use and gives its file and line. Inputs are matched by `type`, so `hidden`, `file`, `range`, `color` and `image` inputs are not reported. HTML inside strings and template literals is ignored, including concise arrow returns, `case` and `throw`, and nested templates inside `${…}`. A backtick quoted inside `${…}` does not hide a later element. The mapping is read from a new `replaces` field on each component's contract in the catalogue, so new components extend it.
11
- - **Top navigation for application screens.** All additions are optional, and default markup is unchanged.
12
- - **Dropdown groups.** `Navbar` `items` and `StackedShell` `navigation` take a labelled group, `{ label, items }`, beside plain links. A group opens a panel of links (each with an optional description, icon and `current`), using the same flyout as MarketingHeader. A group holding the current page is marked current. On narrow screens it opens inside the folded menu, and choosing a link closes the menu.
13
- - **Bar tone.** `tone` on Navbar and StackedShell can be `"inverse"` (the other appearance, through the inverse remap) or `"accent"` (the brand's accent fill, or its gradient when it defines one). An accent bar has on-accent links and focus, an inverted primary action and outlined secondary ones. Dropdown panels keep the page's colours.
14
- - **Page tabs.** StackedShell `tabs` (`{ label, items }`) adds a second row of page tabs under the bar, rendered as a TabNav.
15
- - **Template.** A new application template, "Dashboard, top navigation" (`?recipe=stacked-dashboard`), composes StackedShell with all three.
16
- - **Split landing template** (`?recipe=split-landing`, [#68](https://github.com/tonycodes/mortar/issues/68)). A one-screen landing page composed only from public components: MarketingPage, a MarketingHeader with a tagline and the consumer's logo in the logo slot, a split Hero with an emphasised title, a Notice as supporting feedback, a NetworkIllustration, and an inline Footer. The CLI and MCP list it with the components it composes. Its browser test checks 320px reflow, 200% zoom, long text, keyboard order and visible focus in both themes, and that the emphasised phrase uses the green brand's link colour in light and dark. It also has a visual baseline.
17
- - **Docs: marketing surfaces and illustrations** ([theming](docs/theming.md#marketing-surfaces-and-illustrations)). Shows which existing tokens a branded landing page and its SVG read (canvas, text, borders, emphasis, accent and focus), and lists the supported extension points and what is not supported. No new tokens: every role already had one. [Mortar for coding agents](docs/agents.md#the-audit) and the agent skill now say that a clean audit is not proof that a page uses only Mortar components.
18
-
19
- ### Fixed
20
-
21
- - **Pinned DataTable cells keep the forced-colours highlight.** A selected or hovered pinned cell was specific enough to paint its own background over `Highlight`, so the text stayed `HighlightText` on `--m-selected`. Those backgrounds now sit below the forced-colours rule, and still cover the stripe in ordinary colours.
22
- - **Switch and Checkbox keep keyboard focus when their description comes and goes** ([#78](https://github.com/tonycodes/mortar/issues/78)). A description set in only one state (for example "Showing all 4 keys" when on) swapped the layout and remounted the input, so Space stopped working. Once a choice has had a description or error it keeps the described layout, and focus follows if the layout changes.
23
- - **MetricGroup no longer clips long values on phones** ([#81](https://github.com/tonycodes/mortar/issues/81)). Below 560px metrics still sit two to a row, but a value too wide for half a row (such as "Operational" at 320px) takes a row of its own, and a value wider than the row wraps.
24
- - **SegmentedControl no longer pushes the page sideways** ([#80](https://github.com/tonycodes/mortar/issues/80)). It is never wider than its container: options scroll inside the control, the selected option is scrolled into view on mount and on change, and the focus ring isn't clipped. Apps can drop local overflow wrappers.
25
- - **Accent navbar sunken contrast.** `Navbar` `tone="accent"` sets `--m-sunken` from `--m-accent-wash`, the same direction as an accent button's hover, so current items, avatars and hovers on the bar stay at least 4.5:1. A wash towards the on-accent text dropped the built-in green light bar to 4.2:1.
26
-
27
- ### Changed
28
-
29
- - **Brands under a strict Content Security Policy are documented** ([#82](https://github.com/tonycodes/mortar/issues/82)). `brandTokens` and `registerBrand` inject an inline `<style>`, which `style-src 'self'` blocks, silently dropping the brand. `docs/theming.md` now shows the CSP-safe path: generate the rule with `brandToCss` at build time, import it after Mortar's styles, and pass ThemeProvider the brand name only. It also covers the options for runtime tenant brands (`'unsafe-inline'`, a hash, or serving each tenant's rule as a stylesheet).
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
+ - `EmailCallout` (Mortar's tones), `EmailDivider` and `EmailSummary` (receipt items, cost lines and total, read as rows in plain text). The callout and summary follow the shell's `dir`.
14
+ - Templates: `VerifyEmail` (a code, a link or both), `MagicLink`, `PasswordReset`, `Invite`, `Receipt` and `Notification`. Each says why it was sent. See [Transactional email](docs/email.md).
30
15
 
31
16
  ## 0.11.0 (2026-10-20)
32
17
 
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