@godxjp/ui 31.28.0 → 31.28.2
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/agent/START-HERE.md +1 -1
- package/agent/components/Prose.json +1 -1
- package/agent/components.json +1 -1
- package/agent/index.json +2 -2
- package/agent/llms.txt +3 -3
- package/dist/contracts/measurement.json +1 -1
- package/dist/styles/data-display-layout.css +25 -10
- package/dist/styles/layers.json +1 -1
- package/docs/FORMS.md +5 -0
- package/package.json +2 -6
package/agent/START-HERE.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
You are about to write code against a design system you did not author. This file is the whole
|
|
4
4
|
contract. Read it before you write JSX.
|
|
5
5
|
|
|
6
|
-
**This catalog describes `@godxjp/ui` 31.28.
|
|
6
|
+
**This catalog describes `@godxjp/ui` 31.28.2.** If the project you are editing has a different
|
|
7
7
|
version in its `package.json`, read the pinned catalog for THAT version instead
|
|
8
8
|
(`…/v<their-version>/agent/…`). A catalog newer than the installed package describes props that do
|
|
9
9
|
not exist yet; older, and it hides props that do. Neither failure announces itself.
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"DO import from `@godxjp/ui/data-display`: `import { Prose } from \"@godxjp/ui/data-display\";`",
|
|
52
52
|
"DO wrap the OUTPUT of your Markdown pipeline (react-markdown + remark-gfm + rehype-sanitize), a sanitised CMS string via `dangerouslySetInnerHTML`, or plain JSX. Prose styles descendants: h1..h4, p, ul/ol/li, blockquote, code, pre, table/th/td, a, img, hr.",
|
|
53
53
|
"DO keep soft line breaks the pipeline's job (remark-breaks or the renderer's `breaks` option). Prose does not turn single newlines into `<br>`; it is typography, not parsing.",
|
|
54
|
-
"DON'T restate the heading scale, table cell measures or list rhythm with `[&_h1]:text-lg [&_td]:border …` utilities: they copy token values and never follow a retune. Prose reads --heading-h1..h4, --table-cell-padding-* and --prose-* directly.",
|
|
54
|
+
"DON'T restate the heading scale, table cell measures or list rhythm with `[&_h1]:text-lg [&_td]:border …` utilities: they copy token values and never follow a retune. Prose reads --heading-h1..h4, --table-cell-padding-* and --prose-* directly. Its long-form scale keeps every level h1–h6 at or above body size: h1–h3 step down in size, h4–h6 sit at body size in bold (h6 muted), so a host that shifts body headings down one level (page title = the one h1) keeps readable section titles.",
|
|
55
55
|
"DO tune the link through --prose-link-color and --prose-link-decoration-line (gh#717). The ink defaults to hsl(var(--primary)) resolved at the anchor, so a scoped [data-tenant] re-tint reaches it; the resting underline defaults to `underline` and is a SEPARATE knob from --text-link-decoration-line, because Prose is running text and there the underline is a WCAG 1.4.1 requirement, not a taste.",
|
|
56
56
|
"DO style a state your own renderer knows about by marking the anchor and selecting it: `a[data-unresolved]` (a wiki link whose target does not exist yet), then re-declare --prose-link-color inside that selector. Prose writes data-* on its ROOT ONLY — never on a descendant — so every data-* on an `a` inside it is yours and stays selectable. That is a promise held by a test (prose-link-717.test.tsx), not a coincidence; there is no prop for it, the same way `TableRow data-expanded-row` is an attribute rather than an API.",
|
|
57
57
|
"DON'T sanitise inside Prose: it renders whatever HTML it is given. Sanitise before (rehype-sanitize, or the server).",
|
package/agent/components.json
CHANGED
|
@@ -5393,7 +5393,7 @@
|
|
|
5393
5393
|
"DO import from `@godxjp/ui/data-display`: `import { Prose } from \"@godxjp/ui/data-display\";`",
|
|
5394
5394
|
"DO wrap the OUTPUT of your Markdown pipeline (react-markdown + remark-gfm + rehype-sanitize), a sanitised CMS string via `dangerouslySetInnerHTML`, or plain JSX. Prose styles descendants: h1..h4, p, ul/ol/li, blockquote, code, pre, table/th/td, a, img, hr.",
|
|
5395
5395
|
"DO keep soft line breaks the pipeline's job (remark-breaks or the renderer's `breaks` option). Prose does not turn single newlines into `<br>`; it is typography, not parsing.",
|
|
5396
|
-
"DON'T restate the heading scale, table cell measures or list rhythm with `[&_h1]:text-lg [&_td]:border …` utilities: they copy token values and never follow a retune. Prose reads --heading-h1..h4, --table-cell-padding-* and --prose-* directly.",
|
|
5396
|
+
"DON'T restate the heading scale, table cell measures or list rhythm with `[&_h1]:text-lg [&_td]:border …` utilities: they copy token values and never follow a retune. Prose reads --heading-h1..h4, --table-cell-padding-* and --prose-* directly. Its long-form scale keeps every level h1–h6 at or above body size: h1–h3 step down in size, h4–h6 sit at body size in bold (h6 muted), so a host that shifts body headings down one level (page title = the one h1) keeps readable section titles.",
|
|
5397
5397
|
"DO tune the link through --prose-link-color and --prose-link-decoration-line (gh#717). The ink defaults to hsl(var(--primary)) resolved at the anchor, so a scoped [data-tenant] re-tint reaches it; the resting underline defaults to `underline` and is a SEPARATE knob from --text-link-decoration-line, because Prose is running text and there the underline is a WCAG 1.4.1 requirement, not a taste.",
|
|
5398
5398
|
"DO style a state your own renderer knows about by marking the anchor and selecting it: `a[data-unresolved]` (a wiki link whose target does not exist yet), then re-declare --prose-link-color inside that selector. Prose writes data-* on its ROOT ONLY — never on a descendant — so every data-* on an `a` inside it is yours and stays selectable. That is a promise held by a test (prose-link-717.test.tsx), not a coincidence; there is no prop for it, the same way `TableRow data-expanded-row` is an attribute rather than an API.",
|
|
5399
5399
|
"DON'T sanitise inside Prose: it renders whatever HTML it is given. Sanitise before (rehype-sanitize, or the server).",
|
package/agent/index.json
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"note": "Pin to the tag that matches the @godxjp/ui version you installed. A catalog newer than your package describes props you do not have; older, and it hides props you do.",
|
|
49
49
|
"read": {
|
|
50
50
|
"live": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/index.json",
|
|
51
|
-
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v31.28.
|
|
51
|
+
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v31.28.2/agent/index.json"
|
|
52
52
|
},
|
|
53
53
|
"source": "mcp/src/data — the same data @godxjp/ui-mcp serves — plus the foundation and semantic token tiers, read from src/tokens/*.css",
|
|
54
54
|
"start": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/START-HERE.md",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"foundation": "the seeds a consumer is invited to set — --primary, --background, --radius",
|
|
63
63
|
"semantic": "named roles that follow the seeds — --ring, --text-link, --overlay-background"
|
|
64
64
|
},
|
|
65
|
-
"version": "31.28.
|
|
65
|
+
"version": "31.28.2"
|
|
66
66
|
}
|
package/agent/llms.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @godxjp/ui
|
|
2
2
|
|
|
3
3
|
> A Japanese-enterprise React design system: 184 components, 2155 design tokens,
|
|
4
|
-
> 50 cardinal rules. This file is the entry point for AI agents. Catalog version 31.28.
|
|
4
|
+
> 50 cardinal rules. This file is the entry point for AI agents. Catalog version 31.28.2.
|
|
5
5
|
|
|
6
6
|
If your client can run a process, do not read these files — run the MCP server instead
|
|
7
|
-
(`npx @godxjp/ui-mcp@31.28.
|
|
7
|
+
(`npx @godxjp/ui-mcp@31.28.2`). It is searchable and version-locked. These files exist for agents
|
|
8
8
|
that can only fetch URLs.
|
|
9
9
|
|
|
10
10
|
## Start
|
|
@@ -26,7 +26,7 @@ that can only fetch URLs.
|
|
|
26
26
|
## Pinning
|
|
27
27
|
|
|
28
28
|
Every URL above tracks `main`. To pin to the release a project actually installed, swap `main` for
|
|
29
|
-
the tag: `.../godx-jp/godxjp-ui/v31.28.
|
|
29
|
+
the tag: `.../godx-jp/godxjp-ui/v31.28.2/agent/...`. A catalog that does not match the installed
|
|
30
30
|
package describes props that are absent, or hides props that are present, and says nothing either way.
|
|
31
31
|
|
|
32
32
|
Pinned catalogs only exist for releases whose tag actually contains `agent/`. If `…/v<version>/agent/index.json` returns 404, that release predates this catalog: read `…/main/…` instead and compare `index.json` → `version` against the package you have, so you at least know which way it drifted.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$comment": "AUTO-GENERATED by scripts/gen-measurement-contract.mjs — do not edit. Read this instead of guessing: docs/MEASUREMENT-CONTRACT.md.",
|
|
3
|
-
"version": "31.28.
|
|
3
|
+
"version": "31.28.2",
|
|
4
4
|
"targetSize": {
|
|
5
5
|
"standard": "WCAG 2.2 SC 2.5.8 Target Size (Minimum), level AA — 24×24 CSS px",
|
|
6
6
|
"min": 24,
|
|
@@ -1309,17 +1309,17 @@
|
|
|
1309
1309
|
margin-block-start: var(--prose-space-block);
|
|
1310
1310
|
}
|
|
1311
1311
|
|
|
1312
|
-
.ui-prose :is(h1, h2, h3, h4) {
|
|
1312
|
+
.ui-prose :is(h1, h2, h3, h4, h5, h6) {
|
|
1313
1313
|
font-weight: var(--font-weight-semibold);
|
|
1314
1314
|
line-height: var(--line-height-tight);
|
|
1315
1315
|
text-wrap: balance;
|
|
1316
1316
|
}
|
|
1317
1317
|
|
|
1318
|
-
.ui-prose > :is(h1, h2, h3, h4) + * {
|
|
1318
|
+
.ui-prose > :is(h1, h2, h3, h4, h5, h6) + * {
|
|
1319
1319
|
margin-block-start: var(--prose-space-block);
|
|
1320
1320
|
}
|
|
1321
1321
|
|
|
1322
|
-
.ui-prose > * + :is(h1, h2, h3, h4) {
|
|
1322
|
+
.ui-prose > * + :is(h1, h2, h3, h4, h5, h6) {
|
|
1323
1323
|
margin-block-start: var(--prose-heading-space-block-start);
|
|
1324
1324
|
}
|
|
1325
1325
|
|
|
@@ -1341,14 +1341,23 @@
|
|
|
1341
1341
|
}
|
|
1342
1342
|
|
|
1343
1343
|
.ui-prose h3 {
|
|
1344
|
-
font-size: var(--heading-h3, var(--font-size-
|
|
1344
|
+
font-size: var(--heading-h3, calc(var(--prose-font-size) * var(--font-size-ratio)));
|
|
1345
1345
|
}
|
|
1346
1346
|
|
|
1347
1347
|
.ui-prose h4 {
|
|
1348
|
-
font-size: var(
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1348
|
+
font-size: var(--heading-h4, var(--prose-font-size));
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
.ui-prose :is(h5, h6) {
|
|
1352
|
+
font-size: var(--prose-font-size);
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
.ui-prose :is(h4, h5, h6) {
|
|
1356
|
+
font-weight: var(--font-weight-bold);
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
.ui-prose h6 {
|
|
1360
|
+
color: hsl(var(--muted-foreground));
|
|
1352
1361
|
}
|
|
1353
1362
|
|
|
1354
1363
|
.ui-prose :is(ul, ol) {
|
|
@@ -1434,8 +1443,14 @@
|
|
|
1434
1443
|
padding-block: var(--callout-space-inset-block);
|
|
1435
1444
|
padding-inline: var(--callout-space-inset-inline);
|
|
1436
1445
|
border-inline-start: var(--callout-rail-width) solid hsl(var(--info));
|
|
1437
|
-
border-start-end-radius: var(
|
|
1438
|
-
|
|
1446
|
+
border-start-end-radius: var(
|
|
1447
|
+
--callout-radius,
|
|
1448
|
+
var(--alert-radius, var(--card-radius, calc(var(--radius) * var(--radius-ratio))))
|
|
1449
|
+
);
|
|
1450
|
+
border-end-end-radius: var(
|
|
1451
|
+
--callout-radius,
|
|
1452
|
+
var(--alert-radius, var(--card-radius, calc(var(--radius) * var(--radius-ratio))))
|
|
1453
|
+
);
|
|
1439
1454
|
background-color: var(--surface-info, hsl(var(--info) / var(--alert-bg-alpha)));
|
|
1440
1455
|
}
|
|
1441
1456
|
|
package/dist/styles/layers.json
CHANGED
package/docs/FORMS.md
CHANGED
|
@@ -10,6 +10,11 @@ All forms in admin apps **must** use:
|
|
|
10
10
|
|
|
11
11
|
Import from `@godxjp/ui/form` — **never** call `useForm()` without `zodResolver`.
|
|
12
12
|
|
|
13
|
+
Install all three with the kit: `npm i @godxjp/ui react-hook-form zod @hookform/resolvers`.
|
|
14
|
+
`@hookform/resolvers` is deliberately **not** a declared peer, so npm will not check its version
|
|
15
|
+
for you: keep it at ^5.2 (the first line with Zod 4 support). Declaring it made a plain
|
|
16
|
+
`npm install @godxjp/ui` fail with ERESOLVE, because npm walks its own optional peers (gh#1111).
|
|
17
|
+
|
|
13
18
|
## Quick start
|
|
14
19
|
|
|
15
20
|
```tsx
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@godxjp/ui",
|
|
3
|
-
"version": "31.28.
|
|
4
|
-
"godxUiMcp": "31.28.
|
|
3
|
+
"version": "31.28.2",
|
|
4
|
+
"godxUiMcp": "31.28.2",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -438,7 +438,6 @@
|
|
|
438
438
|
"check:frame-token-scope": "node scripts/check-frame-token-scope.mjs"
|
|
439
439
|
},
|
|
440
440
|
"peerDependencies": {
|
|
441
|
-
"@hookform/resolvers": "^5.2.0",
|
|
442
441
|
"@tanstack/react-query": ">=5.0.0",
|
|
443
442
|
"playwright": "*",
|
|
444
443
|
"react": ">=19.0.0",
|
|
@@ -450,9 +449,6 @@
|
|
|
450
449
|
"zod": "^4.4.0"
|
|
451
450
|
},
|
|
452
451
|
"peerDependenciesMeta": {
|
|
453
|
-
"@hookform/resolvers": {
|
|
454
|
-
"optional": true
|
|
455
|
-
},
|
|
456
452
|
"@tanstack/react-query": {
|
|
457
453
|
"optional": true
|
|
458
454
|
},
|