@tonycodes-ui/mortar 0.15.0 → 0.16.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/docs/agents.md CHANGED
@@ -63,7 +63,7 @@ In a project without Mortar installed, `npx -y @tonycodes-ui/mortar mcp` downloa
63
63
  | `search_components` | `query`, optional `kit`, `category`, `limit` | Ranked components: name, kit, category, description, capabilities. |
64
64
  | `get_component` | `name` | The full contract: props with types, required flags and defaults; usage, avoid and accessibility notes; the components it renders; its `data-m-component` marker; tested states; page templates; a JSX example; the import line. |
65
65
  | `get_build_packet` | `components` and/or `brief` | The chosen components (for a brief, with the reason for each, starting from the purpose shell), their dependency closure, install, CSS and ThemeProvider setup, the import line, the design principles and API conventions, and matching page templates. |
66
- | `get_guide` | `topic` | A guide as markdown: `design`, `conventions`, `theming`, `auth-flows`, `migrating-0.6`, `contributing`, `testing` or `agents`. |
66
+ | `get_guide` | `topic` | A guide as markdown: `design`, `conventions`, `theming`, `auth-flows`, `email`, `migrating-0.6`, `contributing`, `testing` or `agents`. |
67
67
  | `list_kits` | none | Kits → categories → components, and the page templates. |
68
68
  | `audit_app` | `path` | A read-only audit of an application: findings with file, line, rule, message and a suggested fix. |
69
69
 
@@ -100,13 +100,15 @@ Add `--json` for machine-readable output. `mortar audit` exits with status 1 whe
100
100
  | `not-installed` | error | Mortar imported but not in node_modules |
101
101
  | `version-mismatch` | error | The installed version does not satisfy the package.json range |
102
102
  | `unknown-export` | error | A named import the installed version does not export, with the replacement for names removed in 0.6 |
103
- | `deep-import` | error | Imports or aliases into the package's `src` or `dist` |
103
+ | `deep-import` | error | Imports or aliases into the package's `src` or `dist`, or an entry other than the package, `/styles.css`, `/brand` and `/email` |
104
104
  | `unknown-prop` | error | A prop the component's contract does not declare, with the 0.6 rename where there is one |
105
105
  | `invalid-value` | error | A literal outside the prop's declared union, such as `layout="centered"` (now `center`) |
106
106
  | `css-override` | error | Consumer CSS selecting Mortar's `.m-*` classes or `[data-m-component]` |
107
107
  | `class-override` | error | A Tailwind arbitrary variant that targets `.m-*` classes, such as `[&_.m-button]:rounded-none` |
108
108
  | `local-copy` | error | A copy of a Mortar source file, or code rendering Mortar's component marker |
109
109
  | `raw-element` | error | A raw `<table>`, `<select>`, `<textarea>`, `<dialog>`, `<progress>` or `<input>` (by type; not `hidden`, `file`, `range`, `color` or `image`) anywhere in an app that uses Mortar, naming the component to use instead. A raw `<button>` is a warning. The mapping comes from each contract's `replaces` field, so new components extend it |
110
+ | `email-app-import` | error | In an email (a file importing `@tonycodes-ui/mortar/email` or React Email), an app component or `styles.css`, naming the email component to use. Raw elements in emails are not reported: email layout is tables |
111
+ | `email-peer-missing` | error | `@tonycodes-ui/mortar/email` is imported but `@react-email/components` is not in package.json |
110
112
  | `missing-styles` | error | No import of `@tonycodes-ui/mortar/styles.css` |
111
113
  | `styles-order` | warning | Mortar's styles imported before Tailwind |
112
114
  | `missing-theme-provider` | warning | Mortar components rendered without a `ThemeProvider` |
package/docs/email.md CHANGED
@@ -114,3 +114,13 @@ Send a password reset only to an address that has an account, and show the same
114
114
  - Don't rely on hover, scripts or forms. Email clients remove them.
115
115
  - Keep each email under about 100 KB of HTML. Gmail clips longer messages behind a "View entire message" link.
116
116
  - Before a release, check new emails in real clients (Gmail, Outlook for Windows, Apple Mail) with a service such as Litmus or Email on Acid.
117
+
118
+ ## Checks
119
+
120
+ `npx mortar audit` (or the MCP `audit_app` tool) treats a file that imports `@tonycodes-ui/mortar/email` or React Email as an email:
121
+
122
+ - **`email-app-import`** reports an app component or `styles.css` imported into an email, and names the email component to use (`Button` → `EmailButton`, `Notice` → `EmailCallout`, `OrderSummary` → `EmailSummary`).
123
+ - **`email-peer-missing`** reports a project that imports the email entry without `@react-email/components` in its package.json.
124
+ - Named imports from `@tonycodes-ui/mortar/email` are checked against what it exports.
125
+ - Raw `<table>` and other elements in an email are not reported, because email layout is tables.
126
+ - A service that only sends email isn't asked for `styles.css` or a ThemeProvider.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonycodes-ui/mortar",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "Mortar: a shared design foundation, application and marketing UI for React and Tailwind.",
5
5
  "type": "module",
6
6
  "files": [
@@ -12,8 +12,9 @@ Mortar is an MIT React 19 + Tailwind 4 UI kit. Its agent tooling ships in the pa
12
12
  1. **Discover.** Before writing UI, call `search_components` (or `list_kits`) for what the brief needs. Without the MCP server, run `npx mortar search "<need>"`.
13
13
  2. **Packet.** Call `get_build_packet` with the chosen components or the brief (`npx mortar packet <Name…> --json`, or `--brief "…"`). Start composing when the packet answers the brief; read extra source or guides only for a specific gap (`get_component`, `get_guide`).
14
14
  3. **Compose** following the defaults below.
15
- 4. **Audit.** Run `audit_app` on the application (`npx mortar audit`), fix every error and review the warnings, then rerun it with the app's build and typecheck.
16
- 5. **Verify** in a browser and report the actual results.
15
+ 4. **Emails.** Build transactional emails from `@tonycodes-ui/mortar/email` (`get_guide email`), never from the app components.
16
+ 5. **Audit.** Run `audit_app` on the application (`npx mortar audit`), fix every error and review the warnings, then rerun it with the app's build and typecheck.
17
+ 6. **Verify** in a browser and report the actual results.
17
18
 
18
19
  ## Defaults
19
20