designlang 12.0.0 → 12.2.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/.claude/launch.json +6 -0
- package/CHANGELOG.md +53 -0
- package/README.md +82 -476
- package/bin/design-extract.js +168 -0
- package/package.json +1 -1
- package/src/formatters/badge.js +90 -0
- package/src/formatters/battle.js +338 -0
- package/src/formatters/grade.js +404 -0
package/.claude/launch.json
CHANGED
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
"runtimeExecutable": "npm",
|
|
7
7
|
"runtimeArgs": ["--prefix", "website", "run", "dev"],
|
|
8
8
|
"port": 3000
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"name": "grade-preview",
|
|
12
|
+
"runtimeExecutable": "npx",
|
|
13
|
+
"runtimeArgs": ["--yes", "http-server", "design-extract-output", "-p", "4173", "-c-1", "--silent"],
|
|
14
|
+
"port": 4173
|
|
9
15
|
}
|
|
10
16
|
]
|
|
11
17
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [12.2.0] — 2026-05-02
|
|
4
|
+
|
|
5
|
+
**Battle cards + design score badges — distribution + virality on top of Grade.**
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **`designlang battle <urlA> <urlB>`** — head-to-head graded battle card.
|
|
10
|
+
Single shareable HTML pitting two sites against each other, dimension by
|
|
11
|
+
dimension, with a verdict line and a per-dimension bar table. Both sites
|
|
12
|
+
are extracted in parallel. Emits `*.battle.html`, `*.battle.md`, and
|
|
13
|
+
`*.battle.json`.
|
|
14
|
+
- **`designlang grade --badge`** — also emit `*.grade.svg`, a shields.io-style
|
|
15
|
+
SVG badge (`design · B · 87`) coloured by letter grade. Drop into any
|
|
16
|
+
README.
|
|
17
|
+
- **Live badge endpoint** at `https://designlang.app/badge/<host>.svg` (with
|
|
18
|
+
rewrites from `/badge/<host>` and `/api/badge/<host>`). Reuses the same
|
|
19
|
+
blob cache the `/api/extract` route writes to, so the first hit warms the
|
|
20
|
+
cache and every subsequent hit is served from edge cache in ~50ms. 6h
|
|
21
|
+
fresh / 24h stale-while-revalidate / 7d max — friendly to the GitHub image
|
|
22
|
+
proxy.
|
|
23
|
+
- New formatters: `src/formatters/battle.js`, `src/formatters/badge.js`,
|
|
24
|
+
with exports `formatBattle`, `formatBattleMarkdown`, `compareScores`,
|
|
25
|
+
`formatBadge`, `formatScoreBadge`.
|
|
26
|
+
- 13 new tests (battle markup, score comparison thresholds, SVG escaping,
|
|
27
|
+
grade-color mapping, missing-score handling).
|
|
28
|
+
|
|
29
|
+
Why this exists: the v12.1 Grade card was the differentiator. Battle is the
|
|
30
|
+
viral content layer ("Stripe vs Vercel — guess who lost"). The badge is the
|
|
31
|
+
distribution layer — every README that adopts it is a permanent backlink to
|
|
32
|
+
a public grade page.
|
|
33
|
+
|
|
34
|
+
## [12.1.0] — 2026-04-29
|
|
35
|
+
|
|
36
|
+
**Design Report Card — a shareable audit page, generated from any URL.**
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- **`designlang grade <url>`** — produces a standalone, self-contained HTML
|
|
41
|
+
"Design Report Card" alongside JSON and Markdown variants. Letter grade
|
|
42
|
+
(A–F) hero, eight scored dimensions with arc gauges, evidence pulled from
|
|
43
|
+
the audited site itself (palette swatches, type specimen, spacing rhythm),
|
|
44
|
+
and a strengths / what-to-fix ledger. Editorial layout, paper/ink theme
|
|
45
|
+
with a dark toggle, print-ready, OG-meta for shareable links.
|
|
46
|
+
- New formatter: **`src/formatters/grade.js`** with `formatGrade` (HTML) and
|
|
47
|
+
`formatGradeMarkdown` exports. Reuses the existing `scoreDesignSystem`
|
|
48
|
+
output — no scoring changes.
|
|
49
|
+
- Flags: `--format html|md|json|all`, `--open` to launch the report in your
|
|
50
|
+
browser when it finishes.
|
|
51
|
+
|
|
52
|
+
Why this exists: html.to.design, Locofy, Builder, Polypane all ship
|
|
53
|
+
extraction or layout cloning. None of them grade the design system itself
|
|
54
|
+
in a form you can post on Twitter or email to a client. This is that.
|
|
55
|
+
|
|
3
56
|
## [10.5.0] — 2026-04-22
|
|
4
57
|
|
|
5
58
|
**The states LLMs always botch.**
|