@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 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.
@@ -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.11.1.** If the project you are editing has a different
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.",
@@ -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.11.1/agent/index.json"
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.11.1"
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.11.1.
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.11.1`). It is searchable and version-locked. These files exist for agents
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.11.1/agent/...`. A catalog that does not match the installed
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.useEffect(() => {
301
- markTruncatedLabels();
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 || typeof ResizeObserver === "undefined") return;
306
- const observer = new ResizeObserver(markTruncatedLabels);
307
- observer.observe(tree);
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
- observer.disconnect();
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.11.1",
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,
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "32.11.1",
2
+ "version": "32.12.1",
3
3
  "generatedBy": "scripts/gen-style-layers.mjs — do not edit by hand; run `pnpm gen:style-layers`",
4
4
  "base": "base.css",
5
5
  "fonts": "fonts.css",
@@ -1273,7 +1273,8 @@
1273
1273
  h6,
1274
1274
  .ui-page-title,
1275
1275
  .ui-empty-state-title,
1276
- .ui-empty-state-description
1276
+ .ui-empty-state-description,
1277
+ .ui-breadcrumb-item
1277
1278
  ):lang(ja) {
1278
1279
  word-break: auto-phrase;
1279
1280
  line-break: strict;
@@ -769,7 +769,7 @@
769
769
  }
770
770
 
771
771
  .ui-dropdown-menu-content {
772
- max-height: var(--radix-dropdown-menu-content-available-height);
772
+ max-height: 100dvh;
773
773
  overflow-x: hidden;
774
774
  overflow-y: auto;
775
775
  }