@godxjp/ui 32.11.1 → 32.12.1
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/DESIGN.md +1 -1
- package/agent/DESIGN.md +1 -1
- package/agent/START-HERE.md +1 -1
- package/agent/components/Tree.json +1 -1
- package/agent/components.json +1 -1
- package/agent/index.json +2 -2
- package/agent/llms.txt +3 -3
- package/dist/components/data-display/tree.js +36 -7
- package/dist/contracts/measurement.json +1 -1
- package/dist/styles/layers.json +1 -1
- package/dist/styles/layout.css +2 -1
- package/dist/styles/navigation-layout.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- package/scripts/cli.mjs +6 -1
- package/scripts/visual-audit.mjs +260 -11
package/DESIGN.md
CHANGED
|
@@ -202,7 +202,7 @@ A list whose rows are decisions. Show requester, target, reason, submitted time;
|
|
|
202
202
|
|
|
203
203
|
1. Pick the archetype, call `get_exemplar` and build from that screen, not from memory.
|
|
204
204
|
2. `npx @godxjp/ui audit <files>` — zero errors.
|
|
205
|
-
3. `npx @godxjp/ui visual-audit <url> <routes>` — runs every route at 320, 390, 768, 1024, 1280 and 844×390 (landscape phone) and measures what a screenshot glance misses: clipped or squeezed controls (WCAG 1.4.10 has two halves — no two-way scrolling AND no lost information; page overflow alone checks only the first), compact search, avatar-only identity, editor inset, action count and target size, rail and search keylines, tiny tracked capitals. Zero machine failures at every width; an "unmapped" result is not a pass. Signed-in routes: `--storage-state state.json` (Playwright storageState).
|
|
205
|
+
3. `npx @godxjp/ui visual-audit <url> <routes>` — runs every route at 320, 390, 768, 1024, 1280 and 844×390 (landscape phone) and measures what a screenshot glance misses: clipped or squeezed controls (WCAG 1.4.10 has two halves — no two-way scrolling AND no lost information; page overflow alone checks only the first), compact search, avatar-only identity, editor inset, action count and target size, rail and search keylines, tiny tracked capitals. Zero machine failures at every width; an "unmapped" result is not a pass. Signed-in routes: `--storage-state state.json` (Playwright storageState). WCAG 1.4.12 / 1.4.4 cells: `--text-spacing` / `--text-zoom 200` (add `--screenshots DIR`) — each reports its geometry delta against the base render, and a zero delta is "override not applied", not a pass.
|
|
206
206
|
4. Inspect every screenshot at every width, region by region — top bar, page header, body, aside or rail, menus and drawers — against the checklist the report prints. A region you were told not to change is still inspected; a defect there becomes an issue, not a silent pass.
|
|
207
207
|
5. No top-N and no round cap. Stop only when every width has zero machine failures and every checklist row is pass or a written N/A.
|
|
208
208
|
6. The builder does not accept its own screen. Report "probes passed; independent acceptance pending" with the report JSON, the screenshots per width and the checklist; acceptance comes from someone who did not build it (a person, or a separate agent given only the build and the artifacts). Never call a screen done on self-review.
|
package/agent/DESIGN.md
CHANGED
|
@@ -202,7 +202,7 @@ A list whose rows are decisions. Show requester, target, reason, submitted time;
|
|
|
202
202
|
|
|
203
203
|
1. Pick the archetype, call `get_exemplar` and build from that screen, not from memory.
|
|
204
204
|
2. `npx @godxjp/ui audit <files>` — zero errors.
|
|
205
|
-
3. `npx @godxjp/ui visual-audit <url> <routes>` — runs every route at 320, 390, 768, 1024, 1280 and 844×390 (landscape phone) and measures what a screenshot glance misses: clipped or squeezed controls (WCAG 1.4.10 has two halves — no two-way scrolling AND no lost information; page overflow alone checks only the first), compact search, avatar-only identity, editor inset, action count and target size, rail and search keylines, tiny tracked capitals. Zero machine failures at every width; an "unmapped" result is not a pass. Signed-in routes: `--storage-state state.json` (Playwright storageState).
|
|
205
|
+
3. `npx @godxjp/ui visual-audit <url> <routes>` — runs every route at 320, 390, 768, 1024, 1280 and 844×390 (landscape phone) and measures what a screenshot glance misses: clipped or squeezed controls (WCAG 1.4.10 has two halves — no two-way scrolling AND no lost information; page overflow alone checks only the first), compact search, avatar-only identity, editor inset, action count and target size, rail and search keylines, tiny tracked capitals. Zero machine failures at every width; an "unmapped" result is not a pass. Signed-in routes: `--storage-state state.json` (Playwright storageState). WCAG 1.4.12 / 1.4.4 cells: `--text-spacing` / `--text-zoom 200` (add `--screenshots DIR`) — each reports its geometry delta against the base render, and a zero delta is "override not applied", not a pass.
|
|
206
206
|
4. Inspect every screenshot at every width, region by region — top bar, page header, body, aside or rail, menus and drawers — against the checklist the report prints. A region you were told not to change is still inspected; a defect there becomes an issue, not a silent pass.
|
|
207
207
|
5. No top-N and no round cap. Stop only when every width has zero machine failures and every checklist row is pass or a written N/A.
|
|
208
208
|
6. The builder does not accept its own screen. Report "probes passed; independent acceptance pending" with the report JSON, the screenshots per width and the checklist; acceptance comes from someone who did not build it (a person, or a separate agent given only the build and the artifacts). Never call a screen done on self-review.
|
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` 32.
|
|
6
|
+
**This catalog describes `@godxjp/ui` 32.12.1.** 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.
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
"tagline": "The standalone WAI-ARIA tree view on a page (antd `Tree` / `DirectoryTree`) — nested `treeData`, a disclosure triangle per branch, roving-tabindex arrow navigation, optional tri-state checkboxes, async `loadData` and `draggable` reorder/reparent (antd `onDrop`). Reach for it whenever nodes expand, collapse or are navigated by keyboard; TreeSelect is the same hierarchy inside a Popover.",
|
|
210
210
|
"usage": [
|
|
211
211
|
"DO name the tree — pass `aria-label` (through your own `t()`) or `aria-labelledby`. A tree with no name is an unlabelled landmark for every screen reader user.",
|
|
212
|
-
"DO rely on Tree for a cut label (gh#1308): a label that is actually truncated gets its full text as a `title` and unfolds while its row holds keyboard focus (not in a windowed tree, whose rows share one height — the `title` stays). No `titleRender` wrapper with a hand-set `title` is needed; one you set is kept.",
|
|
212
|
+
"DO rely on Tree for a cut label (gh#1308): a label that is actually truncated gets its full text as a `title` and unfolds while its row holds keyboard focus (not in a windowed tree, whose rows share one height — the `title` stays). It is re-measured when a label's box, the tree's width or the loaded fonts change — text spacing (WCAG 1.4.12) or a late web font included (gh#1318). No `titleRender` wrapper with a hand-set `title` is needed; one you set is kept.",
|
|
213
213
|
"DO keep SELECTION and CHECKS apart: `value`/`onValueChange` is which node is open in the detail pane; `checkedValues`/`onCheckedValuesChange` is which nodes are ticked. They are two axes, exactly as in antd — never drive one from the other.",
|
|
214
214
|
"DO keep SELECTION and EXPANSION apart too — this is the THIRD axis and the one gh#910 tripped on. `onValueChange` says which node a detail pane should show; `onExpandedValuesChange` says which branches are unfolded. A sibling pane listens to the first and ignores the second, so unfolding a branch cannot reload it. If your pane reloads when a branch opens, it is being driven from the wrong event — not from a missing feature.",
|
|
215
215
|
"DO let the keyboard work: the tree ships the full APG contract (Up/Down through visible nodes, Right expands then descends, Left collapses then climbs, Home/End, Enter/Space, `*` to expand the current level, type-ahead). Do not add your own key handling on top.",
|
package/agent/components.json
CHANGED
|
@@ -11433,7 +11433,7 @@
|
|
|
11433
11433
|
"tagline": "The standalone WAI-ARIA tree view on a page (antd `Tree` / `DirectoryTree`) — nested `treeData`, a disclosure triangle per branch, roving-tabindex arrow navigation, optional tri-state checkboxes, async `loadData` and `draggable` reorder/reparent (antd `onDrop`). Reach for it whenever nodes expand, collapse or are navigated by keyboard; TreeSelect is the same hierarchy inside a Popover.",
|
|
11434
11434
|
"usage": [
|
|
11435
11435
|
"DO name the tree — pass `aria-label` (through your own `t()`) or `aria-labelledby`. A tree with no name is an unlabelled landmark for every screen reader user.",
|
|
11436
|
-
"DO rely on Tree for a cut label (gh#1308): a label that is actually truncated gets its full text as a `title` and unfolds while its row holds keyboard focus (not in a windowed tree, whose rows share one height — the `title` stays). No `titleRender` wrapper with a hand-set `title` is needed; one you set is kept.",
|
|
11436
|
+
"DO rely on Tree for a cut label (gh#1308): a label that is actually truncated gets its full text as a `title` and unfolds while its row holds keyboard focus (not in a windowed tree, whose rows share one height — the `title` stays). It is re-measured when a label's box, the tree's width or the loaded fonts change — text spacing (WCAG 1.4.12) or a late web font included (gh#1318). No `titleRender` wrapper with a hand-set `title` is needed; one you set is kept.",
|
|
11437
11437
|
"DO keep SELECTION and CHECKS apart: `value`/`onValueChange` is which node is open in the detail pane; `checkedValues`/`onCheckedValuesChange` is which nodes are ticked. They are two axes, exactly as in antd — never drive one from the other.",
|
|
11438
11438
|
"DO keep SELECTION and EXPANSION apart too — this is the THIRD axis and the one gh#910 tripped on. `onValueChange` says which node a detail pane should show; `onExpandedValuesChange` says which branches are unfolded. A sibling pane listens to the first and ignores the second, so unfolding a branch cannot reload it. If your pane reloads when a branch opens, it is being driven from the wrong event — not from a missing feature.",
|
|
11439
11439
|
"DO let the keyboard work: the tree ships the full APG contract (Up/Down through visible nodes, Right expands then descends, Left collapses then climbs, Home/End, Enter/Space, `*` to expand the current level, type-ahead). Do not add your own key handling on top.",
|
package/agent/index.json
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"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.",
|
|
55
55
|
"read": {
|
|
56
56
|
"live": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/index.json",
|
|
57
|
-
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v32.
|
|
57
|
+
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v32.12.1/agent/index.json"
|
|
58
58
|
},
|
|
59
59
|
"source": "mcp/src/data — the same data @godxjp/ui-mcp serves — plus the foundation and semantic token tiers, read from src/tokens/*.css",
|
|
60
60
|
"start": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/START-HERE.md",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"foundation": "the seeds a consumer is invited to set — --primary, --background, --radius",
|
|
69
69
|
"semantic": "named roles that follow the seeds — --ring, --text-link, --overlay-background"
|
|
70
70
|
},
|
|
71
|
-
"version": "32.
|
|
71
|
+
"version": "32.12.1"
|
|
72
72
|
}
|
package/agent/llms.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @godxjp/ui
|
|
2
2
|
|
|
3
3
|
> A Japanese-enterprise React design system: 162 components, 2204 design tokens,
|
|
4
|
-
> 43 cardinal rules. This file is the entry point for AI agents. Catalog version 32.
|
|
4
|
+
> 43 cardinal rules. This file is the entry point for AI agents. Catalog version 32.12.1.
|
|
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@32.
|
|
7
|
+
(`npx @godxjp/ui-mcp@32.12.1`). It is searchable and version-locked. These files exist for agents
|
|
8
8
|
that can only fetch URLs.
|
|
9
9
|
|
|
10
10
|
## Start
|
|
@@ -27,7 +27,7 @@ that can only fetch URLs.
|
|
|
27
27
|
## Pinning
|
|
28
28
|
|
|
29
29
|
Every URL above tracks `main`. To pin to the release a project actually installed, swap `main` for
|
|
30
|
-
the tag: `.../godx-jp/godxjp-ui/v32.
|
|
30
|
+
the tag: `.../godx-jp/godxjp-ui/v32.12.1/agent/...`. A catalog that does not match the installed
|
|
31
31
|
package describes props that are absent, or hides props that are present, and says nothing either way.
|
|
32
32
|
|
|
33
33
|
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.
|
|
@@ -297,21 +297,50 @@ function TreeRoot({
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
}, []);
|
|
300
|
-
React.
|
|
301
|
-
|
|
302
|
-
});
|
|
300
|
+
const resizeObserver = React.useRef(null);
|
|
301
|
+
const observedLabels = React.useRef(/* @__PURE__ */ new Set());
|
|
303
302
|
React.useEffect(() => {
|
|
304
303
|
const tree = treeRef.current;
|
|
305
|
-
if (!tree
|
|
306
|
-
const
|
|
307
|
-
|
|
304
|
+
if (!tree) return;
|
|
305
|
+
const fonts = typeof document === "undefined" ? void 0 : document.fonts;
|
|
306
|
+
let live = true;
|
|
307
|
+
void fonts?.ready.then(() => {
|
|
308
|
+
if (live) markTruncatedLabels();
|
|
309
|
+
});
|
|
310
|
+
fonts?.addEventListener?.("loadingdone", markTruncatedLabels);
|
|
311
|
+
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(markTruncatedLabels);
|
|
312
|
+
resizeObserver.current = observer;
|
|
313
|
+
observer?.observe(tree);
|
|
308
314
|
const refold = () => requestAnimationFrame(markTruncatedLabels);
|
|
309
315
|
tree.addEventListener("focusout", refold);
|
|
316
|
+
const observed = observedLabels.current;
|
|
310
317
|
return () => {
|
|
311
|
-
|
|
318
|
+
live = false;
|
|
319
|
+
fonts?.removeEventListener?.("loadingdone", markTruncatedLabels);
|
|
320
|
+
observer?.disconnect();
|
|
321
|
+
resizeObserver.current = null;
|
|
322
|
+
observed.clear();
|
|
312
323
|
tree.removeEventListener("focusout", refold);
|
|
313
324
|
};
|
|
314
325
|
}, [markTruncatedLabels]);
|
|
326
|
+
React.useEffect(() => {
|
|
327
|
+
markTruncatedLabels();
|
|
328
|
+
const observer = resizeObserver.current;
|
|
329
|
+
const tree = treeRef.current;
|
|
330
|
+
if (!observer || !tree) return;
|
|
331
|
+
const observed = observedLabels.current;
|
|
332
|
+
const rendered = new Set(tree.querySelectorAll(".ui-tree-label"));
|
|
333
|
+
for (const label of observed) {
|
|
334
|
+
if (rendered.has(label)) continue;
|
|
335
|
+
observer.unobserve(label);
|
|
336
|
+
observed.delete(label);
|
|
337
|
+
}
|
|
338
|
+
for (const label of rendered) {
|
|
339
|
+
if (observed.has(label)) continue;
|
|
340
|
+
observer.observe(label);
|
|
341
|
+
observed.add(label);
|
|
342
|
+
}
|
|
343
|
+
});
|
|
315
344
|
const nodeRefs = React.useRef(/* @__PURE__ */ new Map());
|
|
316
345
|
const pendingFocus = React.useRef(null);
|
|
317
346
|
React.useEffect(() => {
|
|
@@ -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": "32.
|
|
3
|
+
"version": "32.12.1",
|
|
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,
|
package/dist/styles/layers.json
CHANGED
package/dist/styles/layout.css
CHANGED