@tonycodes-ui/mortar 0.28.1 → 0.30.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,11 +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.28.1 (2026-11-15)
5
+ ## 0.30.0 (2026-11-26)
6
6
 
7
- ### Changed
7
+ ### Added
8
+
9
+ - add the charts entry, series palette and Sparkline
10
+
11
+ ### Fixed
8
12
 
9
- - wait up to 15 minutes for npm to serve a new version
13
+ - guard ticks, keep gaps, and restore MetricGroup's previous-value font
14
+ - centre a one-value sparkline and skip empty MetricGroup sparklines
10
15
 
11
16
  ## 0.11.0 (2026-10-20)
12
17
 
package/bin/mortar.mjs CHANGED
@@ -1,13 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  // mortar: the open, local agent tooling for the Mortar UI kit. An MCP server
3
3
  // (`mortar mcp`) and a CLI over the installed package's catalogue and docs.
4
- // No network, no account, no runtime dependencies.
4
+ // No account and no runtime dependencies. Only `audit --render` uses the
5
+ // network, to open the app pages it is given.
5
6
  import { readFileSync, existsSync } from "node:fs";
6
7
  import { join } from "node:path";
7
8
  import { loadData, GUIDES, PACKAGE_ROOT } from "../cli/data.mjs";
8
9
  import { searchComponents } from "../cli/search.mjs";
9
10
  import { componentDetail, buildPacket } from "../cli/packet.mjs";
10
11
  import { auditApp, RULES } from "../cli/audit.mjs";
12
+ import { parseUrls, renderAudit, RENDER_RULES } from "../cli/render.mjs";
11
13
 
12
14
  const HELP = `mortar — local agent tooling for the Mortar UI kit (@tonycodes-ui/mortar)
13
15
 
@@ -22,6 +24,8 @@ Usage:
22
24
  page templates
23
25
  mortar audit [path] Read-only audit of an app's Mortar usage
24
26
  (exits 1 when it finds errors)
27
+ --render <url[,url...]> Also open the running app's pages and
28
+ check what rendered (needs Playwright)
25
29
  mortar guide <topic> Print a guide: ${Object.keys(GUIDES).join(", ")}
26
30
  mortar kits Kits, categories and components
27
31
  mortar skill Print the agent skill (skills/mortar/SKILL.md)
@@ -34,7 +38,8 @@ Options:
34
38
  Add the MCP server to Claude Code:
35
39
  claude mcp add mortar -- npx -y @tonycodes-ui/mortar mcp
36
40
 
37
- Everything runs locally against the installed package. No account or network.`;
41
+ Everything runs locally against the installed package, with no account. Only
42
+ audit --render opens the URLs you pass it.`;
38
43
 
39
44
  function parseArgs(argv) {
40
45
  const positional = [];
@@ -198,6 +203,13 @@ async function main() {
198
203
  let report;
199
204
  try {
200
205
  report = await auditApp(rest[0] ?? ".", { data });
206
+ if (flags.render) {
207
+ const urls = parseUrls(flags.render);
208
+ const rendered = await renderAudit(urls, { appRoot: report.root });
209
+ report.findings.push(...rendered);
210
+ for (const f of rendered) report.summary[f.severity]++;
211
+ report.rendered = urls;
212
+ }
201
213
  } catch (error) {
202
214
  return fail(error.message);
203
215
  }
@@ -215,7 +227,7 @@ async function main() {
215
227
  }
216
228
  const s = report.summary;
217
229
  out(
218
- `\n${s.error} error${s.error === 1 ? "" : "s"}, ${s.warning} warning${s.warning === 1 ? "" : "s"}, ${s.info} info in ${s.files} files.`,
230
+ `\n${s.error} error${s.error === 1 ? "" : "s"}, ${s.warning} warning${s.warning === 1 ? "" : "s"}, ${s.info} info in ${s.files} files${report.rendered ? ` and ${report.rendered.length} rendered page${report.rendered.length === 1 ? "" : "s"}` : ""}.`,
219
231
  );
220
232
  }
221
233
  if (report.summary.error) process.exitCode = 1;
@@ -244,7 +256,7 @@ async function main() {
244
256
  : fail("skill not installed");
245
257
  }
246
258
  case "rules":
247
- for (const [id, text] of Object.entries(RULES))
259
+ for (const [id, text] of Object.entries({ ...RULES, ...RENDER_RULES }))
248
260
  out(`${id.padEnd(24)} ${text}`);
249
261
  return;
250
262
  default: