@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 +8 -3
- package/bin/mortar.mjs +16 -4
- package/catalog.json +735 -358
- package/cli/audit.mjs +24 -9
- package/cli/data.mjs +10 -0
- package/cli/packet.mjs +41 -3
- package/cli/render.mjs +315 -0
- package/cli/tools.mjs +24 -2
- package/dist/agent-data.json +1 -1
- package/dist/application.d.ts +4 -33
- package/dist/application.js +4 -57
- package/dist/chart-core.d.ts +30 -0
- package/dist/chart-core.js +100 -0
- package/dist/charts.d.ts +3 -0
- package/dist/charts.js +3 -0
- package/dist/data-grid.d.ts +2 -0
- package/dist/data-grid.js +4 -0
- package/dist/grid.d.ts +102 -0
- package/dist/grid.js +371 -0
- package/dist/sparkline.d.ts +28 -0
- package/dist/sparkline.js +31 -0
- package/dist/table-core.d.ts +54 -0
- package/dist/table-core.js +59 -0
- package/docs/agents.md +17 -1
- package/docs/charts.md +68 -0
- package/docs/data-grid.md +155 -0
- package/package.json +21 -3
- package/skills/mortar/SKILL.md +1 -1
- package/src/application.css +6 -1
- package/src/application.tsx +25 -114
- package/src/chart-core.ts +113 -0
- package/src/charts.css +58 -0
- package/src/charts.ts +6 -0
- package/src/data-grid.ts +13 -0
- package/src/data.css +64 -1
- package/src/foundation.css +3 -1
- package/src/grid.tsx +906 -0
- package/src/sparkline.tsx +124 -0
- package/src/table-core.tsx +128 -0
- package/src/tokens.css +26 -0
- package/styles.css +1 -0
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.
|
|
5
|
+
## 0.30.0 (2026-11-26)
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- add the charts entry, series palette and Sparkline
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
8
12
|
|
|
9
|
-
-
|
|
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
|
|
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
|
|
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:
|