@aitrien/motifspec 1.23.1 → 1.24.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 -0
- package/README.md +2 -1
- package/dist/codex.css +1 -1
- package/dist/favicon.svg +1 -0
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +20 -2
- package/dist/tokens.json +20 -2
- package/docs/foundations/ornaments.md +4 -0
- package/docs/hugo.md +3 -1
- package/layouts/_partials/motifspec/favicon.html +5 -0
- package/package.json +2 -1
- package/scripts/lib.mjs +7 -0
- package/tokens/color.json +1 -1
- package/tokens/typography.json +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Every release of MotifSpec (named brand-codex until 1.10.0), newest first. Entries before 1.10.0 keep the names they were released under. Versions follow the rules in `CONVENTIONS.md`: renaming or removing a semantic token is major, adding tokens, components or icons is minor, and changing a value or fixing a description is a patch. `npm run build` fails if the version in `package.json` has no entry here.
|
|
4
4
|
|
|
5
|
+
## [1.24.0] - 2026-11-08
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- The mark: an acorn, drawn on the Yarndings 12 grid (a checked cup over a tapering nut), in `codex.glyphs.mark` on `font.family.ornament` as 12 rows of stitches. The validator checks its shape.
|
|
9
|
+
- `dist/favicon.svg` (npm: `@aitrien/motifspec/favicon.svg`), built from those rows with two stitches of margin, so each stitch is a whole pixel at 16, 32 and 48px. It is `color.ornament.rest` in each theme, whose description now names the mark.
|
|
10
|
+
- `motifspec/favicon.html`, which publishes it at `/cx/` and links it as the site's icon (`hugo.md`). motifspec.com uses it.
|
|
11
|
+
- The Ornaments page shows the mark at 16, 32, 48 and 96px.
|
|
12
|
+
|
|
5
13
|
## [1.23.1] - 2026-11-06
|
|
6
14
|
|
|
7
15
|
### Changed
|
package/README.md
CHANGED
|
@@ -82,6 +82,7 @@ Pin an exact version, as a Hugo site pins a tag: the version you install is the
|
|
|
82
82
|
| `@aitrien/motifspec/theme-init.js` | Inline it in `<head>` before the stylesheet so a stored theme applies before first paint. |
|
|
83
83
|
| `@aitrien/motifspec/plate.js`, `backdrop.html`, `backdrop-foot.html`, `backdrop-side.html` | The contour backdrop and its motion (`backdrop.md`). |
|
|
84
84
|
| `@aitrien/motifspec/icons.svg` | The icon sprite. Inline it once in `<body>`. |
|
|
85
|
+
| `@aitrien/motifspec/favicon.svg` | The mark, the acorn, as a favicon: link it with `<link rel="icon" type="image/svg+xml">`. It is `color.ornament.rest` in each theme. |
|
|
85
86
|
| `@aitrien/motifspec/tokens.js`, `tokens.json` | Every token with its value, tier and CSS name, for build tools. |
|
|
86
87
|
| `@aitrien/motifspec/check` | `checkText` and `checkProject` from the rule checker. |
|
|
87
88
|
| `@aitrien/motifspec/fonts/*` | The WOFF2 files, for preloading. |
|
|
@@ -174,7 +175,7 @@ site/ motifspec.com: a Hugo site whose pages are made from this RE
|
|
|
174
175
|
mcp/ The MCP server (server.mjs), its Lambda handler, bundle step and tests
|
|
175
176
|
infra/mcp.yml The server's AWS stack and deploy role (CloudFormation, applied by hand)
|
|
176
177
|
hugo.toml, go.mod Hugo module definition and its mounts
|
|
177
|
-
dist/ Generated: tokens.css, components in codex.css, chroma.css, fonts.css, icons.svg (sprite), tokens.json, tokens.js (ES module export), codex.js and theme-init.js (behaviour), backdrop.html, backdrop-foot.html and backdrop-side.html, plate.html and plate.js (backdrop and specimen plate), contrast.md
|
|
178
|
+
dist/ Generated: tokens.css, components in codex.css, chroma.css, fonts.css, icons.svg (sprite), tokens.json, tokens.js (ES module export), codex.js and theme-init.js (behaviour), backdrop.html, backdrop-foot.html and backdrop-side.html, plate.html and plate.js (backdrop and specimen plate), favicon.svg (the mark), contrast.md
|
|
178
179
|
```
|
|
179
180
|
|
|
180
181
|
## Commands
|
package/dist/codex.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
|
|
3
3
|
@font-face { font-family: "Yarndings 12"; src: url("../fonts/yarndings-12-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: block; }
|
|
4
4
|
|
|
5
|
-
/* MotifSpec 1.
|
|
5
|
+
/* MotifSpec 1.24.0 — generated from tokens/*.json. Do not edit.
|
|
6
6
|
Themes: semantic colours use light-dark(); color-scheme follows the system unless
|
|
7
7
|
<html data-theme="light|dark"> pins it. --cx-primitive-* are for this file only. */
|
|
8
8
|
:root {
|
package/dist/favicon.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 16 16" shape-rendering="crispEdges"><title>acorn</title><style>path{fill:#208347}@media (prefers-color-scheme:dark){path{fill:#7dbc8e}}</style><path d="M5 0h2v1h-2zM5 1h2v1h-2zM2 2h8v1h-8zM1 3h2v1h-2zM4 3h1v1h-1zM7 3h1v1h-1zM9 3h2v1h-2zM1 4h1v1h-1zM3 4h1v1h-1zM5 4h2v1h-2zM8 4h1v1h-1zM10 4h1v1h-1zM1 5h10v1h-10zM2 6h8v1h-8zM2 7h8v1h-8zM2 8h8v1h-8zM3 9h6v1h-6zM4 10h4v1h-4zM5 11h2v1h-2z"/></svg>
|
package/dist/tokens.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* MotifSpec 1.
|
|
1
|
+
/* MotifSpec 1.24.0 — generated from tokens/*.json. Do not edit.
|
|
2
2
|
Themes: semantic colours use light-dark(); color-scheme follows the system unless
|
|
3
3
|
<html data-theme="light|dark"> pins it. --cx-primitive-* are for this file only. */
|
|
4
4
|
:root {
|
package/dist/tokens.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by npm run build. Do not edit.
|
|
2
|
-
export const version = "1.
|
|
2
|
+
export const version = "1.24.0";
|
|
3
3
|
export const changelog = "https://github.com/Aitrien/motifspec/blob/main/CHANGELOG.md";
|
|
4
4
|
export const showcase = "https://motifspec.com";
|
|
5
5
|
export const tokens = [
|
|
@@ -936,7 +936,7 @@ export const tokens = [
|
|
|
936
936
|
"referencesDark": "primitive.color.sap.400",
|
|
937
937
|
"value": "#208347",
|
|
938
938
|
"valueDark": "#7dbc8e",
|
|
939
|
-
"description": "Yarndings ornaments and the specimen plate's contour lines. Decorative only: always aria-hidden, never carries meaning.",
|
|
939
|
+
"description": "Yarndings ornaments, the mark (the favicon) and the specimen plate's contour lines. Decorative only: always aria-hidden, never carries meaning.",
|
|
940
940
|
"pairsWith": [
|
|
941
941
|
{
|
|
942
942
|
"token": "color.surface.base",
|
|
@@ -3167,6 +3167,24 @@ export const tokens = [
|
|
|
3167
3167
|
"end-mark": "flower (after an article's last sentence)",
|
|
3168
3168
|
"empty-state": "sprout (404 and empty lists)"
|
|
3169
3169
|
},
|
|
3170
|
+
"mark": {
|
|
3171
|
+
"name": "acorn",
|
|
3172
|
+
"use": "An acorn on the same 12-stitch grid as the glyphs: a checked cup over a tapering nut. It is every site's favicon, from `motifspec/favicon.html` in Hugo or `favicon.svg` from npm, in `color.ornament.rest` for each theme. Use those; never redraw or recolour it.",
|
|
3173
|
+
"stitches": [
|
|
3174
|
+
".....##.....",
|
|
3175
|
+
".....##.....",
|
|
3176
|
+
"..########..",
|
|
3177
|
+
".##.#..#.##.",
|
|
3178
|
+
".#.#.##.#.#.",
|
|
3179
|
+
".##########.",
|
|
3180
|
+
"..########..",
|
|
3181
|
+
"..########..",
|
|
3182
|
+
"..########..",
|
|
3183
|
+
"...######...",
|
|
3184
|
+
"....####....",
|
|
3185
|
+
".....##....."
|
|
3186
|
+
]
|
|
3187
|
+
},
|
|
3170
3188
|
"forbidden": {
|
|
3171
3189
|
"chars": "uvwxyz[]{}",
|
|
3172
3190
|
"reason": "Faces, a robot, hearts and animals read as emoji. Never use them."
|
package/dist/tokens.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.24.0",
|
|
3
3
|
"changelog": "https://github.com/Aitrien/motifspec/blob/main/CHANGELOG.md",
|
|
4
4
|
"showcase": "https://motifspec.com",
|
|
5
5
|
"tokens": [
|
|
@@ -936,7 +936,7 @@
|
|
|
936
936
|
"referencesDark": "primitive.color.sap.400",
|
|
937
937
|
"value": "#208347",
|
|
938
938
|
"valueDark": "#7dbc8e",
|
|
939
|
-
"description": "Yarndings ornaments and the specimen plate's contour lines. Decorative only: always aria-hidden, never carries meaning.",
|
|
939
|
+
"description": "Yarndings ornaments, the mark (the favicon) and the specimen plate's contour lines. Decorative only: always aria-hidden, never carries meaning.",
|
|
940
940
|
"pairsWith": [
|
|
941
941
|
{
|
|
942
942
|
"token": "color.surface.base",
|
|
@@ -3167,6 +3167,24 @@
|
|
|
3167
3167
|
"end-mark": "flower (after an article's last sentence)",
|
|
3168
3168
|
"empty-state": "sprout (404 and empty lists)"
|
|
3169
3169
|
},
|
|
3170
|
+
"mark": {
|
|
3171
|
+
"name": "acorn",
|
|
3172
|
+
"use": "An acorn on the same 12-stitch grid as the glyphs: a checked cup over a tapering nut. It is every site's favicon, from `motifspec/favicon.html` in Hugo or `favicon.svg` from npm, in `color.ornament.rest` for each theme. Use those; never redraw or recolour it.",
|
|
3173
|
+
"stitches": [
|
|
3174
|
+
".....##.....",
|
|
3175
|
+
".....##.....",
|
|
3176
|
+
"..########..",
|
|
3177
|
+
".##.#..#.##.",
|
|
3178
|
+
".#.#.##.#.#.",
|
|
3179
|
+
".##########.",
|
|
3180
|
+
"..########..",
|
|
3181
|
+
"..########..",
|
|
3182
|
+
"..########..",
|
|
3183
|
+
"...######...",
|
|
3184
|
+
"....####....",
|
|
3185
|
+
".....##....."
|
|
3186
|
+
]
|
|
3187
|
+
},
|
|
3170
3188
|
"forbidden": {
|
|
3171
3189
|
"chars": "uvwxyz[]{}",
|
|
3172
3190
|
"reason": "Faces, a robot, hearts and animals read as emoji. Never use them."
|
|
@@ -16,6 +16,10 @@ The system's own ornaments always use these glyphs.
|
|
|
16
16
|
|
|
17
17
|
*Generated from `tokens/typography.json`: approved glyphs.*
|
|
18
18
|
|
|
19
|
+
## The mark
|
|
20
|
+
|
|
21
|
+
*Generated from `tokens/typography.json`: the mark.*
|
|
22
|
+
|
|
19
23
|
## Never used
|
|
20
24
|
|
|
21
25
|
*Generated from `tokens/typography.json`: forbidden glyphs.*
|
package/docs/hugo.md
CHANGED
|
@@ -29,7 +29,8 @@ Pin a release with `hugo mod get github.com/aitrien/motifspec@vX.Y.Z`. The modul
|
|
|
29
29
|
<meta charset="utf-8">
|
|
30
30
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
31
31
|
{{ partial "motifspec/head.html" . }}
|
|
32
|
-
{{
|
|
32
|
+
{{ partial "motifspec/favicon.html" . }}
|
|
33
|
+
{{/* the site's own <title> and meta description */}}
|
|
33
34
|
</head>
|
|
34
35
|
<body class="cx-backdrop-page">
|
|
35
36
|
{{ partial "motifspec/body-start.html" . }}
|
|
@@ -45,6 +46,7 @@ Pin a release with `hugo mod get github.com/aitrien/motifspec@vX.Y.Z`. The modul
|
|
|
45
46
|
| Partial | What it writes |
|
|
46
47
|
|---|---|
|
|
47
48
|
| `motifspec/head.html` | The stored-theme snippet, font preloads, `codex.css` and `codex.js`, in that order. |
|
|
49
|
+
| `motifspec/favicon.html` | The mark, the acorn, as the site's favicon: `dist/favicon.svg`, published at `/cx/` and fingerprinted. It is `color.ornament.rest` in each theme. |
|
|
48
50
|
| `motifspec/body-start.html` | Call with the page. On the home page, the head of the backdrop (on a documentation site's other pages, the side); then the icon sprite and the skip link to `#main`. |
|
|
49
51
|
| `motifspec/site-header.html` | `site-header.md`: wordmark from `site.Title` and `site.Params.role`, nav from `site.Menus.main` and the theme toggle. A menu entry is current when its `identifier` is the page's section; one whose URL starts with `http` gets the outward arrow. With `params.motifspec.search = true`, search comes first (`search.md`); with `params.motifspec.version` (and `changelog`, a URL), the version comes before the theme toggle. With `params.motifspec.layout = "documentation"`, it adds "On this page" and the menu, which take over below `size.breakpoint.lg` (`site-header.md`, In a documentation site). |
|
|
50
52
|
| `motifspec/body-end.html` | The foot of the backdrop, behind the footer, and `plate.js`, which settles the home page's contours and lets the pointer warm them. |
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{{- /* hugo.md: the mark as the site's favicon. dist/favicon.svg is built from codex.glyphs.mark in the pinned
|
|
2
|
+
release's color.accent.fill.rest, light and dark. Call it in <head> after head.html. */ -}}
|
|
3
|
+
{{- with resources.Get "motifspec/favicon.svg" | resources.Copy "cx/favicon.svg" | fingerprint }}
|
|
4
|
+
<link rel="icon" href="{{ .RelPermalink }}" type="image/svg+xml">
|
|
5
|
+
{{- end }}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aitrien/motifspec",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.24.0",
|
|
4
4
|
"description": "Liam Marshall's design system: DTCG tokens and layered component rules that AI assistants read a layer at a time, with generated CSS, Hugo templates and a rule checker.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"./backdrop-foot.html": "./dist/backdrop-foot.html",
|
|
50
50
|
"./backdrop-side.html": "./dist/backdrop-side.html",
|
|
51
51
|
"./icons.svg": "./dist/icons.svg",
|
|
52
|
+
"./favicon.svg": "./dist/favicon.svg",
|
|
52
53
|
"./tokens.js": "./dist/tokens.js",
|
|
53
54
|
"./tokens.json": "./dist/tokens.json",
|
|
54
55
|
"./check": "./scripts/check.mjs",
|
package/scripts/lib.mjs
CHANGED
|
@@ -148,6 +148,13 @@ export function validate(tokens) {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
// ------------------------------------------------------------------ contrast (WCAG 2.x)
|
|
151
|
+
// The mark's stitches (rows of "#" and ".") as one SVG path on a one-unit-per-stitch grid: a rectangle per run.
|
|
152
|
+
export function stitchPath(rows) {
|
|
153
|
+
const d = [];
|
|
154
|
+
rows.forEach((r, y) => { for (const m of r.matchAll(/#+/g)) d.push(`M${m.index} ${y}h${m[0].length}v1h-${m[0].length}z`); });
|
|
155
|
+
return d.join('');
|
|
156
|
+
}
|
|
157
|
+
|
|
151
158
|
export const hexOf = (c) => c.hex ?? '#' + c.components.map((x) => Math.round(x * 255).toString(16).padStart(2, '0')).join('');
|
|
152
159
|
function luminance(c) {
|
|
153
160
|
const [r, g, b] = c.components.map((x) => (x <= 0.04045 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4));
|
package/tokens/color.json
CHANGED
|
@@ -1267,7 +1267,7 @@
|
|
|
1267
1267
|
"ornament": {
|
|
1268
1268
|
"rest": {
|
|
1269
1269
|
"$value": "{primitive.color.sap.600}",
|
|
1270
|
-
"$description": "Yarndings ornaments and the specimen plate's contour lines. Decorative only: always aria-hidden, never carries meaning.",
|
|
1270
|
+
"$description": "Yarndings ornaments, the mark (the favicon) and the specimen plate's contour lines. Decorative only: always aria-hidden, never carries meaning.",
|
|
1271
1271
|
"$extensions": {
|
|
1272
1272
|
"codex.modes": {
|
|
1273
1273
|
"dark": "{primitive.color.sap.400}"
|
package/tokens/typography.json
CHANGED
|
@@ -731,6 +731,24 @@
|
|
|
731
731
|
"end-mark": "flower (after an article's last sentence)",
|
|
732
732
|
"empty-state": "sprout (404 and empty lists)"
|
|
733
733
|
},
|
|
734
|
+
"mark": {
|
|
735
|
+
"name": "acorn",
|
|
736
|
+
"use": "An acorn on the same 12-stitch grid as the glyphs: a checked cup over a tapering nut. It is every site's favicon, from `motifspec/favicon.html` in Hugo or `favicon.svg` from npm, in `color.ornament.rest` for each theme. Use those; never redraw or recolour it.",
|
|
737
|
+
"stitches": [
|
|
738
|
+
".....##.....",
|
|
739
|
+
".....##.....",
|
|
740
|
+
"..########..",
|
|
741
|
+
".##.#..#.##.",
|
|
742
|
+
".#.#.##.#.#.",
|
|
743
|
+
".##########.",
|
|
744
|
+
"..########..",
|
|
745
|
+
"..########..",
|
|
746
|
+
"..########..",
|
|
747
|
+
"...######...",
|
|
748
|
+
"....####....",
|
|
749
|
+
".....##....."
|
|
750
|
+
]
|
|
751
|
+
},
|
|
734
752
|
"forbidden": {
|
|
735
753
|
"chars": "uvwxyz[]{}",
|
|
736
754
|
"reason": "Faces, a robot, hearts and animals read as emoji. Never use them."
|