@godxjp/ui 31.14.0 → 31.16.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/agent/START-HERE.md +5 -5
- package/agent/components/TextDiff.json +86 -0
- package/agent/components/Timeline.json +4 -3
- package/agent/components/Tree.json +22 -1
- package/agent/components-index.json +7 -2
- package/agent/components.json +112 -4
- package/agent/index.json +6 -6
- package/agent/llms.txt +6 -6
- package/agent/tokens.json +42 -0
- package/dist/components/data-display/index.d.ts +3 -1
- package/dist/components/data-display/index.js +4 -0
- package/dist/components/data-display/text-diff.d.ts +45 -0
- package/dist/components/data-display/text-diff.js +240 -0
- package/dist/components/data-display/timeline.d.ts +12 -2
- package/dist/components/data-display/timeline.js +6 -2
- package/dist/components/data-display/tree.d.ts +1 -1
- package/dist/components/data-display/tree.js +147 -0
- package/dist/contracts/measurement.json +1 -1
- package/dist/i18n/messages/en.json +18 -1
- package/dist/i18n/messages/ja.json +15 -1
- package/dist/i18n/messages/vi.json +15 -1
- package/dist/props/components/data-display.prop.d.ts +83 -1
- package/dist/props/registry.d.ts +88 -0
- package/dist/props/registry.js +109 -0
- package/dist/styles/data-display-layout.css +92 -1
- package/dist/styles/layers.json +6 -1
- package/dist/tokens/components/data-display.css +8 -0
- package/dist/tokens/components/tree.css +3 -0
- package/docs/FRAME-COVERAGE-REPORT.md +3 -2
- package/docs/data-display/text-diff.tsx +89 -0
- package/docs/data-display/timeline.tsx +28 -0
- package/docs/data-display/tree.tsx +82 -0
- package/docs/i18n/messages/en.json +41 -0
- package/docs/i18n/messages/ja.json +41 -0
- package/docs/i18n/messages/vi.json +41 -0
- package/package.json +2 -2
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.
|
|
6
|
+
**This catalog describes `@godxjp/ui` 31.16.0.** 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.
|
|
@@ -47,7 +47,7 @@ Then ask it: `search_components`, `get_component`, `get_tokens`, `get_rule`, `li
|
|
|
47
47
|
task is a task** — "build a settings page", "confirm a destructive delete", "a list page with
|
|
48
48
|
filters" — start HERE, not at the components. Then fetch `patterns/<name>.json` for complete,
|
|
49
49
|
copy-paste-ready code. A component index answers "does X exist"; it cannot answer "build Y".
|
|
50
|
-
1. `components-index.json` — 48 KB, all
|
|
50
|
+
1. `components-index.json` — 48 KB, all 179 components as name + group +
|
|
51
51
|
tagline. Read this when you already know the SHAPE you need. Each entry may carry `absorbed`:
|
|
52
52
|
names that **do not exist** and map to it — `Combobox`, `Autocomplete`, `CountrySelect` and
|
|
53
53
|
`SearchSelect` are all `Select`. If you are about to hand-roll something, search this field
|
|
@@ -56,10 +56,10 @@ Then ask it: `search_components`, `get_component`, `get_tokens`, `get_rule`, `li
|
|
|
56
56
|
its `importPath`, and its examples. Fetch only the handful you picked in step 1.
|
|
57
57
|
3. `rules.json` — 50 cardinal rules. The ones about raw HTML and hardcoded colour are not
|
|
58
58
|
style advice.
|
|
59
|
-
4. `tokens.json` —
|
|
59
|
+
4. `tokens.json` — 2126 design tokens, each tagged with its `tier`. **If you were handed a
|
|
60
60
|
brand, read the 211 `foundation` entries first** — `--primary`, `--background`,
|
|
61
61
|
`--radius`, `--font-size-base` are the handful everything else derives from. The
|
|
62
|
-
|
|
62
|
+
1811 `component` entries are per-part knobs; reach for one only when a role is
|
|
63
63
|
right everywhere except one component.
|
|
64
64
|
5. `anti-ai-tells.json` — 26 shapes that make generated UI look generated, each with the
|
|
65
65
|
fix. Read before you reach for a gradient hero or a wall of coloured chips.
|
|
@@ -145,7 +145,7 @@ has stopped following the brand.
|
|
|
145
145
|
|---|---|---|---|
|
|
146
146
|
| `foundation` | 211 | the seeds — `--primary`, `--background`, `--foreground`, `--radius`, `--font-size-base`, `--shadow-color`. Everything below is derived from these | **yes — this is the main road.** Handed a brand colour, this is where it goes: `:root { --primary: <H> <S>% <L>%; }` (HSL components, no `hsl()` wrapper) |
|
|
147
147
|
| `semantic` | 104 | named roles that follow the seeds — `--ring`, `--text-link`, `--primary-hover`, `--overlay-background` | only when the seed is right and ONE role must differ. That role then stops following a later brand change |
|
|
148
|
-
| `component` |
|
|
148
|
+
| `component` | 1811 | per-part knobs, `--{component}-{part}-{property}` | rarely. Most are declared `initial` with the real default at the call site — deliberate, so a scoped override re-resolves instead of freezing at `:root` |
|
|
149
149
|
|
|
150
150
|
A token whose `value` is `initial` is not empty and not broken: `initial` is the guaranteed-invalid
|
|
151
151
|
value, so the real default is computed where the element paints it. Set it and yours wins.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"example": "import { TextDiff } from \"@godxjp/ui/data-display\";\n\n<TextDiff before={row.previous_original} after={original} lang=\"ja\" />\n\n<TextDiff mode=\"split\" granularity=\"line\" before={previousBody} after={body} />",
|
|
3
|
+
"group": "data-display",
|
|
4
|
+
"importPath": "@godxjp/ui/data-display",
|
|
5
|
+
"name": "TextDiff",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"description": "The earlier text (the original a translation was written against, the saved version).",
|
|
9
|
+
"name": "before",
|
|
10
|
+
"required": true,
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"description": "The current text.",
|
|
15
|
+
"name": "after",
|
|
16
|
+
"required": true,
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"defaultValue": "\"inline\"",
|
|
21
|
+
"description": "inline — one flow with removals and additions in place (GitHub's unified view). split — two columns, before | after, with changed hunks aligned row by row and localized column headings.",
|
|
22
|
+
"name": "mode",
|
|
23
|
+
"type": "\"inline\" | \"split\""
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"defaultValue": "\"auto\"",
|
|
27
|
+
"description": "The unit a change is measured in. auto = Intl.Segmenter words, with Han/Hiragana/Katakana/Hangul runs cut per character (no spaces to split on, and a dictionary word boundary moves when one particle changes). word = Intl.Segmenter words in `lang`. char = one grapheme cluster per token. line = whole lines.",
|
|
28
|
+
"name": "granularity",
|
|
29
|
+
"type": "\"auto\" | \"word\" | \"char\" | \"line\""
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"defaultValue": "true",
|
|
33
|
+
"description": "Fold long unchanged runs of lines behind a localized 'show N unchanged lines' button.",
|
|
34
|
+
"name": "collapseUnchanged",
|
|
35
|
+
"type": "boolean"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"defaultValue": "2",
|
|
39
|
+
"description": "Unchanged lines kept visible beside each change when folding (git's -U<n>).",
|
|
40
|
+
"name": "contextLines",
|
|
41
|
+
"type": "number"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"defaultValue": "4000000",
|
|
45
|
+
"description": "LCS cost cap (tokens before × tokens after). Past it the changed middle is one removal plus one addition instead of freezing the tab.",
|
|
46
|
+
"name": "maxCells",
|
|
47
|
+
"type": "number"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"description": "Heading of the before column in split mode. Default: localized 'Before'.",
|
|
51
|
+
"name": "beforeLabel",
|
|
52
|
+
"type": "ReactNode"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"description": "Heading of the after column in split mode. Default: localized 'After'.",
|
|
56
|
+
"name": "afterLabel",
|
|
57
|
+
"type": "ReactNode"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"description": "BCP-47 language of the text — set on the element (screen-reader pronunciation, CJK font selection) and used as the Intl.Segmenter locale.",
|
|
61
|
+
"name": "lang",
|
|
62
|
+
"type": "string"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"related": [
|
|
66
|
+
"CodeBlock — shows ONE preformatted text; TextDiff shows how two versions differ.",
|
|
67
|
+
"Text — `delete` / `mark` style a run you already chose; TextDiff decides the runs and announces them.",
|
|
68
|
+
"Timeline — the list of revisions; TextDiff is what one revision changed."
|
|
69
|
+
],
|
|
70
|
+
"rules": [],
|
|
71
|
+
"storyPath": "data-display/TextDiff.stories.tsx",
|
|
72
|
+
"tagline": "What changed between two versions of a text — removed runs in <del>, added runs in <ins>, inline or side by side, per line / word / character, with CJK cut per character and long unchanged runs folded.",
|
|
73
|
+
"usage": [
|
|
74
|
+
"DO import from `@godxjp/ui/data-display`: `import { TextDiff } from \"@godxjp/ui/data-display\";`",
|
|
75
|
+
"DO pass the two raw strings — the component tokenizes, diffs (LCS) and renders. Use the exported `diffText(before, after, { granularity, lang })` only when you need the runs themselves (a change count, a plain-text export).",
|
|
76
|
+
"DO pass `lang` for the text's language, not the UI's: a Japanese original in an English UI still needs lang=\"ja\".",
|
|
77
|
+
"DO use mode=\"split\" when there is room for two columns and the texts are long; inline for a drawer, a list row or a narrow panel.",
|
|
78
|
+
"DON'T hand-roll a diff from `Text delete` / `Text mark` — those carry no spoken start/end label, so a screen reader reads the old and new words run together.",
|
|
79
|
+
"DON'T colour a run without its mark: removals are struck through and additions underlined, plus a visually hidden start/end label — colour is never the only carrier (WCAG 1.4.1)."
|
|
80
|
+
],
|
|
81
|
+
"useCases": [
|
|
82
|
+
"A translation drawer: what changed in the original since this translation was written (old original → current original).",
|
|
83
|
+
"A document or wiki page revision history: one revision against the previous one.",
|
|
84
|
+
"A settings or template audit log: the previous value of a long text field against the new one."
|
|
85
|
+
]
|
|
86
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"example": "import { Timeline } from \"@godxjp/ui/data-display\";\n\n// Default icon variant\n<Timeline items={[\n { title: \"注文受付\", time: \"2024-06-01 10:00\" },\n { title: \"発送準備中\", time: \"2024-06-01 14:00\" },\n { title: \"配送中\", current: true },\n]} />\n\n// Numbered route stepper (Pattern A)\n<Timeline variant=\"ordinal\" items={[\n { title: \"集荷\", location: \"東京 → 名古屋\", status: \"pending\" },\n { title: \"幹線輸送\", location: \"名古屋 → 大阪\", status: \"pending\" },\n]} />\n\n// Status tracker (Pattern B): done → check, current → dot, pending → number\n<Timeline variant=\"status\" items={[\n { title: \"請求書を発行\", status: \"done\" },\n { title: \"承認待ち\", status: \"current\" },\n { title: \"消費税を計上\", status: \"pending\" },\n]} />",
|
|
2
|
+
"example": "import { Timeline } from \"@godxjp/ui/data-display\";\nimport { ArrowRightLeft, MessageSquare } from \"lucide-react\";\n\n// Default icon variant\n<Timeline items={[\n { title: \"注文受付\", time: \"2024-06-01 10:00\" },\n { title: \"発送準備中\", time: \"2024-06-01 14:00\" },\n { title: \"配送中\", current: true },\n]} />\n\n// Numbered route stepper (Pattern A)\n<Timeline variant=\"ordinal\" items={[\n { title: \"集荷\", location: \"東京 → 名古屋\", status: \"pending\" },\n { title: \"幹線輸送\", location: \"名古屋 → 大阪\", status: \"pending\" },\n]} />\n\n// Activity log / issue history: neutral dots, no status prefix (gh#1092)\n<Timeline density=\"compact\" items={[\n { title: \"Aki がステータスを変更 未対応 → 処理中\", time: \"10/01 08:12\", status: \"log\", icon: ArrowRightLeft },\n { title: \"Ken がコメント\", time: \"10/01 09:30\", status: \"log\", icon: MessageSquare },\n]} />\n\n// Status tracker (Pattern B): done → check, current → dot, pending → number\n<Timeline variant=\"status\" items={[\n { title: \"請求書を発行\", status: \"done\" },\n { title: \"承認待ち\", status: \"current\" },\n { title: \"消費税を計上\", status: \"pending\" },\n]} />",
|
|
3
3
|
"group": "data-display",
|
|
4
4
|
"importPath": "@godxjp/ui/data-display",
|
|
5
5
|
"name": "Timeline",
|
|
6
6
|
"props": [
|
|
7
7
|
{
|
|
8
|
-
"description": "Array of `{ title, location?, time?, note?, current?, status?, icon? }`. `status` is
|
|
8
|
+
"description": "Array of `{ title, location?, time?, note?, current?, status?, icon? }`. `status` is 'done' | 'current' | 'pending' | 'log'; `current: true` is shorthand for `status: 'current'`. 'log' (gh#1092) is an activity-log / history row: the neutral dot + hairline rail `pending` draws, and NO sr-only status prefix (antd's `color=\"gray\"` item). `icon` (a LucideIcon) overrides the auto-glyph for that item.",
|
|
9
9
|
"name": "items",
|
|
10
10
|
"required": true,
|
|
11
11
|
"type": "TimelineItem[]"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"rules": [],
|
|
31
31
|
"storyPath": "data-display/Timeline.stories.tsx",
|
|
32
|
-
"tagline": "Vertical event list with an icon rail. Current item gets a highlighted glyph. `variant` switches the rail to numbered (ordinal) or status-driven glyphs, and each item carries a
|
|
32
|
+
"tagline": "Vertical event list with an icon rail. Current item gets a highlighted glyph. `variant` switches the rail to numbered (ordinal) or status-driven glyphs, and each item carries a `status` (done/current/pending, or `log` for an activity-log entry with no status semantics) plus an optional per-item `icon`. The whole progress column is ONE hue: done dot, current dot and travelled line all paint `--primary`, exactly as `Steps` paints `finish` and `process`.",
|
|
33
33
|
"usage": [
|
|
34
34
|
"DO pass an array of `TimelineItem` objects to `items`. Each item is `{ title, location?, time?, note?, current?, status?, icon? }`. All fields except `title` are optional. The only other props are `variant` and `density`.",
|
|
35
35
|
"DO mark the in-progress event with `current: true` (or `status: 'current'`). In the default `variant='icon'`, the current item renders a `Plane` icon and every other item a `CheckCircle2`. Use `variant='ordinal'` for a numbered route stepper (1,2,3…) or `variant='status'` for a done→check / current→dot / pending→number tracker. Pass `status: 'done' | 'current' | 'pending'` per item to drive colour and (in the status variant) the glyph; pass `icon` (a LucideIcon) to override the glyph for a single item.",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"DO NOT use Timeline for user-facing wizard progress (steps the user must complete in order) — use `Steps` for that. Timeline is read-only historical/status display; it has no interactive state, no `onClick`, and no concept of 'go to step'.",
|
|
40
40
|
"DO wrap Timeline in `<CardContent>` when placing it inside a `Card` — bare `Card` has no inner padding, so the rail will render flush against the card edge without `CardContent`.",
|
|
41
41
|
"THE PROGRESS COLUMN IS ONE HUE (gh#731). The done dot, the current dot and the travelled line all default to `hsl(var(--primary))` — the same contract `Steps` uses for `finish` + `process`, and antd's (only `error` leaves the primary hue). The current item is told apart by a ring (`--timeline-dot-current-ring-width`, `--steps-dot-process-ring-width`'s value), by `aria-current=\"step\"` + a localized sr-only prefix, and by a different glyph — never by a second colour role. Re-theme `--primary` and the whole rail follows. Measured light: done 2.18:1 → 6.31:1 against the card, glyph 6.31:1 on the fill; dark 7.22:1 → 9.84:1, glyph 10.72:1.",
|
|
42
|
+
"DO use `status: 'log'` for every row of an activity log / issue history / audit trail (gh#1092). Those rows already HAPPENED and are not steps: `done` paints them primary and prefixes 「Completed:」, `pending` reads 「Upcoming:」 to a screen reader. `log` draws the quiet neutral dot (a plain pip, or the item's `icon`) and hairline rail, with no prefix — antd's gray item.",
|
|
42
43
|
"DON'T expect `--success` on a `status: 'done'` item — `done | current | pending` is POSITION IN A SEQUENCE, not status, and Timeline has no `tone` axis. Put a real status on the item's `title` or `note` with a `<Badge tone=\"success\">`, which is the surface that owns the status green.",
|
|
43
44
|
"TO RESTORE the pre-27.9 green/violet pairing, set the done dot's fill AND its ink together in your theme (global or `[data-tenant]`) — the two roles have opposite ink polarity, so the fill alone leaves a near-white glyph on 若竹 green at 2.18:1 (gh#643): `--timeline-dot-done-background: hsl(var(--success)); --timeline-dot-done-foreground: hsl(var(--success-foreground));`. `--timeline-dot-current-background` and `--timeline-line-completed-background` retint the other two surfaces the same way."
|
|
44
45
|
],
|
|
@@ -90,6 +90,27 @@
|
|
|
90
90
|
"name": "loadData",
|
|
91
91
|
"type": "(node: TreeNodeProp) => void | Promise<void>"
|
|
92
92
|
},
|
|
93
|
+
{
|
|
94
|
+
"defaultValue": "false",
|
|
95
|
+
"description": "Move nodes by dragging (antd `draggable`, gh#1093). Dropping on a row's upper / lower quarter lands in the gap before / after it, the middle files it inside. The tree never edits `treeData` — it reports the move via `onDrop` and you persist it. Keyboard equivalent (WCAG 2.5.7): Alt+↑ / Alt+↓ move past the previous / next sibling, Alt+← outdents (after the parent), Alt+→ indents (into the previous sibling, as its last child); every move is announced in a live region and described on the tree. A node never drops into itself or its own subtree.",
|
|
96
|
+
"name": "draggable",
|
|
97
|
+
"type": "boolean"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"description": "Per-node drag gate (antd `draggable.nodeDraggable`). Disabled nodes never drag.",
|
|
101
|
+
"name": "allowDrag",
|
|
102
|
+
"type": "(node: TreeNodeProp) => boolean"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"description": "Per-target drop gate (antd `allowDrop`), asked for pointer AND keyboard moves. Use it for your own rules (max depth, no leaf parents); the self/subtree cycle is already refused.",
|
|
106
|
+
"name": "allowDrop",
|
|
107
|
+
"type": "(info: { dragNode: TreeNodeProp; dropNode: TreeNodeProp; dropPosition: -1 | 0 | 1 }) => boolean"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"description": "A committed move (antd `onDrop`). `dropPosition` is RELATIVE to `node` — -1 before, 0 inside, 1 after (antd reports an absolute index that every antd demo converts back to this). `dropToGap` is true for before/after (sibling of `node`), false for inside (child of `node`). Update `treeData` here.",
|
|
111
|
+
"name": "onDrop",
|
|
112
|
+
"type": "(info: { dragNode: TreeNodeProp; node: TreeNodeProp; dropPosition: -1 | 0 | 1; dropToGap: boolean }) => void"
|
|
113
|
+
},
|
|
93
114
|
{
|
|
94
115
|
"description": "Render a node's title yourself (antd `titleRender`).",
|
|
95
116
|
"name": "titleRender",
|
|
@@ -179,7 +200,7 @@
|
|
|
179
200
|
45
|
|
180
201
|
],
|
|
181
202
|
"storyPath": "data-display/Tree.stories.tsx",
|
|
182
|
-
"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
|
|
203
|
+
"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.",
|
|
183
204
|
"usage": [
|
|
184
205
|
"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.",
|
|
185
206
|
"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.",
|
|
@@ -251,6 +251,11 @@
|
|
|
251
251
|
"name": "Swatch",
|
|
252
252
|
"tagline": "A READ-ONLY sample of ONE colour a person chose — a brand's primary_color, a calendar category, a tag tint. The colour is a VALUE on the element, never a token in a stylesheet."
|
|
253
253
|
},
|
|
254
|
+
{
|
|
255
|
+
"group": "data-display",
|
|
256
|
+
"name": "TextDiff",
|
|
257
|
+
"tagline": "What changed between two versions of a text — removed runs in <del>, added runs in <ins>, inline or side by side, per line / word / character, with CJK cut per character and long unchanged runs folded."
|
|
258
|
+
},
|
|
254
259
|
{
|
|
255
260
|
"group": "data-display",
|
|
256
261
|
"name": "FeatureList",
|
|
@@ -304,7 +309,7 @@
|
|
|
304
309
|
{
|
|
305
310
|
"group": "data-display",
|
|
306
311
|
"name": "Timeline",
|
|
307
|
-
"tagline": "Vertical event list with an icon rail. Current item gets a highlighted glyph. `variant` switches the rail to numbered (ordinal) or status-driven glyphs, and each item carries a
|
|
312
|
+
"tagline": "Vertical event list with an icon rail. Current item gets a highlighted glyph. `variant` switches the rail to numbered (ordinal) or status-driven glyphs, and each item carries a `status` (done/current/pending, or `log` for an activity-log entry with no status semantics) plus an optional per-item `icon`. The whole progress column is ONE hue: done dot, current dot and travelled line all paint `--primary`, exactly as `Steps` paints `finish` and `process`."
|
|
308
313
|
},
|
|
309
314
|
{
|
|
310
315
|
"group": "data-display",
|
|
@@ -585,7 +590,7 @@
|
|
|
585
590
|
{
|
|
586
591
|
"group": "data-display",
|
|
587
592
|
"name": "Tree",
|
|
588
|
-
"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
|
|
593
|
+
"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."
|
|
589
594
|
},
|
|
590
595
|
{
|
|
591
596
|
"group": "feedback",
|
package/agent/components.json
CHANGED
|
@@ -4209,6 +4209,92 @@
|
|
|
4209
4209
|
"A table cell whose column is 'colour' — one sample per row, named by the row header."
|
|
4210
4210
|
]
|
|
4211
4211
|
},
|
|
4212
|
+
{
|
|
4213
|
+
"example": "import { TextDiff } from \"@godxjp/ui/data-display\";\n\n<TextDiff before={row.previous_original} after={original} lang=\"ja\" />\n\n<TextDiff mode=\"split\" granularity=\"line\" before={previousBody} after={body} />",
|
|
4214
|
+
"group": "data-display",
|
|
4215
|
+
"importPath": "@godxjp/ui/data-display",
|
|
4216
|
+
"name": "TextDiff",
|
|
4217
|
+
"props": [
|
|
4218
|
+
{
|
|
4219
|
+
"description": "The earlier text (the original a translation was written against, the saved version).",
|
|
4220
|
+
"name": "before",
|
|
4221
|
+
"required": true,
|
|
4222
|
+
"type": "string"
|
|
4223
|
+
},
|
|
4224
|
+
{
|
|
4225
|
+
"description": "The current text.",
|
|
4226
|
+
"name": "after",
|
|
4227
|
+
"required": true,
|
|
4228
|
+
"type": "string"
|
|
4229
|
+
},
|
|
4230
|
+
{
|
|
4231
|
+
"defaultValue": "\"inline\"",
|
|
4232
|
+
"description": "inline — one flow with removals and additions in place (GitHub's unified view). split — two columns, before | after, with changed hunks aligned row by row and localized column headings.",
|
|
4233
|
+
"name": "mode",
|
|
4234
|
+
"type": "\"inline\" | \"split\""
|
|
4235
|
+
},
|
|
4236
|
+
{
|
|
4237
|
+
"defaultValue": "\"auto\"",
|
|
4238
|
+
"description": "The unit a change is measured in. auto = Intl.Segmenter words, with Han/Hiragana/Katakana/Hangul runs cut per character (no spaces to split on, and a dictionary word boundary moves when one particle changes). word = Intl.Segmenter words in `lang`. char = one grapheme cluster per token. line = whole lines.",
|
|
4239
|
+
"name": "granularity",
|
|
4240
|
+
"type": "\"auto\" | \"word\" | \"char\" | \"line\""
|
|
4241
|
+
},
|
|
4242
|
+
{
|
|
4243
|
+
"defaultValue": "true",
|
|
4244
|
+
"description": "Fold long unchanged runs of lines behind a localized 'show N unchanged lines' button.",
|
|
4245
|
+
"name": "collapseUnchanged",
|
|
4246
|
+
"type": "boolean"
|
|
4247
|
+
},
|
|
4248
|
+
{
|
|
4249
|
+
"defaultValue": "2",
|
|
4250
|
+
"description": "Unchanged lines kept visible beside each change when folding (git's -U<n>).",
|
|
4251
|
+
"name": "contextLines",
|
|
4252
|
+
"type": "number"
|
|
4253
|
+
},
|
|
4254
|
+
{
|
|
4255
|
+
"defaultValue": "4000000",
|
|
4256
|
+
"description": "LCS cost cap (tokens before × tokens after). Past it the changed middle is one removal plus one addition instead of freezing the tab.",
|
|
4257
|
+
"name": "maxCells",
|
|
4258
|
+
"type": "number"
|
|
4259
|
+
},
|
|
4260
|
+
{
|
|
4261
|
+
"description": "Heading of the before column in split mode. Default: localized 'Before'.",
|
|
4262
|
+
"name": "beforeLabel",
|
|
4263
|
+
"type": "ReactNode"
|
|
4264
|
+
},
|
|
4265
|
+
{
|
|
4266
|
+
"description": "Heading of the after column in split mode. Default: localized 'After'.",
|
|
4267
|
+
"name": "afterLabel",
|
|
4268
|
+
"type": "ReactNode"
|
|
4269
|
+
},
|
|
4270
|
+
{
|
|
4271
|
+
"description": "BCP-47 language of the text — set on the element (screen-reader pronunciation, CJK font selection) and used as the Intl.Segmenter locale.",
|
|
4272
|
+
"name": "lang",
|
|
4273
|
+
"type": "string"
|
|
4274
|
+
}
|
|
4275
|
+
],
|
|
4276
|
+
"related": [
|
|
4277
|
+
"CodeBlock — shows ONE preformatted text; TextDiff shows how two versions differ.",
|
|
4278
|
+
"Text — `delete` / `mark` style a run you already chose; TextDiff decides the runs and announces them.",
|
|
4279
|
+
"Timeline — the list of revisions; TextDiff is what one revision changed."
|
|
4280
|
+
],
|
|
4281
|
+
"rules": [],
|
|
4282
|
+
"storyPath": "data-display/TextDiff.stories.tsx",
|
|
4283
|
+
"tagline": "What changed between two versions of a text — removed runs in <del>, added runs in <ins>, inline or side by side, per line / word / character, with CJK cut per character and long unchanged runs folded.",
|
|
4284
|
+
"usage": [
|
|
4285
|
+
"DO import from `@godxjp/ui/data-display`: `import { TextDiff } from \"@godxjp/ui/data-display\";`",
|
|
4286
|
+
"DO pass the two raw strings — the component tokenizes, diffs (LCS) and renders. Use the exported `diffText(before, after, { granularity, lang })` only when you need the runs themselves (a change count, a plain-text export).",
|
|
4287
|
+
"DO pass `lang` for the text's language, not the UI's: a Japanese original in an English UI still needs lang=\"ja\".",
|
|
4288
|
+
"DO use mode=\"split\" when there is room for two columns and the texts are long; inline for a drawer, a list row or a narrow panel.",
|
|
4289
|
+
"DON'T hand-roll a diff from `Text delete` / `Text mark` — those carry no spoken start/end label, so a screen reader reads the old and new words run together.",
|
|
4290
|
+
"DON'T colour a run without its mark: removals are struck through and additions underlined, plus a visually hidden start/end label — colour is never the only carrier (WCAG 1.4.1)."
|
|
4291
|
+
],
|
|
4292
|
+
"useCases": [
|
|
4293
|
+
"A translation drawer: what changed in the original since this translation was written (old original → current original).",
|
|
4294
|
+
"A document or wiki page revision history: one revision against the previous one.",
|
|
4295
|
+
"A settings or template audit log: the previous value of a long text field against the new one."
|
|
4296
|
+
]
|
|
4297
|
+
},
|
|
4212
4298
|
{
|
|
4213
4299
|
"docPath": "data-display/feature-list.tsx",
|
|
4214
4300
|
"example": "import { FeatureList } from \"@godxjp/ui/data-display\";\n\n<FeatureList\n items={[\n { state: \"included\", label: \"SSO\", description: \"SAML と OIDC\" },\n { state: \"limited\", label: \"API 呼び出し\", description: \"月 10,000 回まで\" },\n { state: \"excluded\", label: \"監査ログのエクスポート\" },\n ]}\n/>",
|
|
@@ -4959,13 +5045,13 @@
|
|
|
4959
5045
|
]
|
|
4960
5046
|
},
|
|
4961
5047
|
{
|
|
4962
|
-
"example": "import { Timeline } from \"@godxjp/ui/data-display\";\n\n// Default icon variant\n<Timeline items={[\n { title: \"注文受付\", time: \"2024-06-01 10:00\" },\n { title: \"発送準備中\", time: \"2024-06-01 14:00\" },\n { title: \"配送中\", current: true },\n]} />\n\n// Numbered route stepper (Pattern A)\n<Timeline variant=\"ordinal\" items={[\n { title: \"集荷\", location: \"東京 → 名古屋\", status: \"pending\" },\n { title: \"幹線輸送\", location: \"名古屋 → 大阪\", status: \"pending\" },\n]} />\n\n// Status tracker (Pattern B): done → check, current → dot, pending → number\n<Timeline variant=\"status\" items={[\n { title: \"請求書を発行\", status: \"done\" },\n { title: \"承認待ち\", status: \"current\" },\n { title: \"消費税を計上\", status: \"pending\" },\n]} />",
|
|
5048
|
+
"example": "import { Timeline } from \"@godxjp/ui/data-display\";\nimport { ArrowRightLeft, MessageSquare } from \"lucide-react\";\n\n// Default icon variant\n<Timeline items={[\n { title: \"注文受付\", time: \"2024-06-01 10:00\" },\n { title: \"発送準備中\", time: \"2024-06-01 14:00\" },\n { title: \"配送中\", current: true },\n]} />\n\n// Numbered route stepper (Pattern A)\n<Timeline variant=\"ordinal\" items={[\n { title: \"集荷\", location: \"東京 → 名古屋\", status: \"pending\" },\n { title: \"幹線輸送\", location: \"名古屋 → 大阪\", status: \"pending\" },\n]} />\n\n// Activity log / issue history: neutral dots, no status prefix (gh#1092)\n<Timeline density=\"compact\" items={[\n { title: \"Aki がステータスを変更 未対応 → 処理中\", time: \"10/01 08:12\", status: \"log\", icon: ArrowRightLeft },\n { title: \"Ken がコメント\", time: \"10/01 09:30\", status: \"log\", icon: MessageSquare },\n]} />\n\n// Status tracker (Pattern B): done → check, current → dot, pending → number\n<Timeline variant=\"status\" items={[\n { title: \"請求書を発行\", status: \"done\" },\n { title: \"承認待ち\", status: \"current\" },\n { title: \"消費税を計上\", status: \"pending\" },\n]} />",
|
|
4963
5049
|
"group": "data-display",
|
|
4964
5050
|
"importPath": "@godxjp/ui/data-display",
|
|
4965
5051
|
"name": "Timeline",
|
|
4966
5052
|
"props": [
|
|
4967
5053
|
{
|
|
4968
|
-
"description": "Array of `{ title, location?, time?, note?, current?, status?, icon? }`. `status` is
|
|
5054
|
+
"description": "Array of `{ title, location?, time?, note?, current?, status?, icon? }`. `status` is 'done' | 'current' | 'pending' | 'log'; `current: true` is shorthand for `status: 'current'`. 'log' (gh#1092) is an activity-log / history row: the neutral dot + hairline rail `pending` draws, and NO sr-only status prefix (antd's `color=\"gray\"` item). `icon` (a LucideIcon) overrides the auto-glyph for that item.",
|
|
4969
5055
|
"name": "items",
|
|
4970
5056
|
"required": true,
|
|
4971
5057
|
"type": "TimelineItem[]"
|
|
@@ -4989,7 +5075,7 @@
|
|
|
4989
5075
|
],
|
|
4990
5076
|
"rules": [],
|
|
4991
5077
|
"storyPath": "data-display/Timeline.stories.tsx",
|
|
4992
|
-
"tagline": "Vertical event list with an icon rail. Current item gets a highlighted glyph. `variant` switches the rail to numbered (ordinal) or status-driven glyphs, and each item carries a
|
|
5078
|
+
"tagline": "Vertical event list with an icon rail. Current item gets a highlighted glyph. `variant` switches the rail to numbered (ordinal) or status-driven glyphs, and each item carries a `status` (done/current/pending, or `log` for an activity-log entry with no status semantics) plus an optional per-item `icon`. The whole progress column is ONE hue: done dot, current dot and travelled line all paint `--primary`, exactly as `Steps` paints `finish` and `process`.",
|
|
4993
5079
|
"usage": [
|
|
4994
5080
|
"DO pass an array of `TimelineItem` objects to `items`. Each item is `{ title, location?, time?, note?, current?, status?, icon? }`. All fields except `title` are optional. The only other props are `variant` and `density`.",
|
|
4995
5081
|
"DO mark the in-progress event with `current: true` (or `status: 'current'`). In the default `variant='icon'`, the current item renders a `Plane` icon and every other item a `CheckCircle2`. Use `variant='ordinal'` for a numbered route stepper (1,2,3…) or `variant='status'` for a done→check / current→dot / pending→number tracker. Pass `status: 'done' | 'current' | 'pending'` per item to drive colour and (in the status variant) the glyph; pass `icon` (a LucideIcon) to override the glyph for a single item.",
|
|
@@ -4999,6 +5085,7 @@
|
|
|
4999
5085
|
"DO NOT use Timeline for user-facing wizard progress (steps the user must complete in order) — use `Steps` for that. Timeline is read-only historical/status display; it has no interactive state, no `onClick`, and no concept of 'go to step'.",
|
|
5000
5086
|
"DO wrap Timeline in `<CardContent>` when placing it inside a `Card` — bare `Card` has no inner padding, so the rail will render flush against the card edge without `CardContent`.",
|
|
5001
5087
|
"THE PROGRESS COLUMN IS ONE HUE (gh#731). The done dot, the current dot and the travelled line all default to `hsl(var(--primary))` — the same contract `Steps` uses for `finish` + `process`, and antd's (only `error` leaves the primary hue). The current item is told apart by a ring (`--timeline-dot-current-ring-width`, `--steps-dot-process-ring-width`'s value), by `aria-current=\"step\"` + a localized sr-only prefix, and by a different glyph — never by a second colour role. Re-theme `--primary` and the whole rail follows. Measured light: done 2.18:1 → 6.31:1 against the card, glyph 6.31:1 on the fill; dark 7.22:1 → 9.84:1, glyph 10.72:1.",
|
|
5088
|
+
"DO use `status: 'log'` for every row of an activity log / issue history / audit trail (gh#1092). Those rows already HAPPENED and are not steps: `done` paints them primary and prefixes 「Completed:」, `pending` reads 「Upcoming:」 to a screen reader. `log` draws the quiet neutral dot (a plain pip, or the item's `icon`) and hairline rail, with no prefix — antd's gray item.",
|
|
5002
5089
|
"DON'T expect `--success` on a `status: 'done'` item — `done | current | pending` is POSITION IN A SEQUENCE, not status, and Timeline has no `tone` axis. Put a real status on the item's `title` or `note` with a `<Badge tone=\"success\">`, which is the surface that owns the status green.",
|
|
5003
5090
|
"TO RESTORE the pre-27.9 green/violet pairing, set the done dot's fill AND its ink together in your theme (global or `[data-tenant]`) — the two roles have opposite ink polarity, so the fill alone leaves a near-white glyph on 若竹 green at 2.18:1 (gh#643): `--timeline-dot-done-background: hsl(var(--success)); --timeline-dot-done-foreground: hsl(var(--success-foreground));`. `--timeline-dot-current-background` and `--timeline-line-completed-background` retint the other two surfaces the same way."
|
|
5004
5091
|
],
|
|
@@ -11130,6 +11217,27 @@
|
|
|
11130
11217
|
"name": "loadData",
|
|
11131
11218
|
"type": "(node: TreeNodeProp) => void | Promise<void>"
|
|
11132
11219
|
},
|
|
11220
|
+
{
|
|
11221
|
+
"defaultValue": "false",
|
|
11222
|
+
"description": "Move nodes by dragging (antd `draggable`, gh#1093). Dropping on a row's upper / lower quarter lands in the gap before / after it, the middle files it inside. The tree never edits `treeData` — it reports the move via `onDrop` and you persist it. Keyboard equivalent (WCAG 2.5.7): Alt+↑ / Alt+↓ move past the previous / next sibling, Alt+← outdents (after the parent), Alt+→ indents (into the previous sibling, as its last child); every move is announced in a live region and described on the tree. A node never drops into itself or its own subtree.",
|
|
11223
|
+
"name": "draggable",
|
|
11224
|
+
"type": "boolean"
|
|
11225
|
+
},
|
|
11226
|
+
{
|
|
11227
|
+
"description": "Per-node drag gate (antd `draggable.nodeDraggable`). Disabled nodes never drag.",
|
|
11228
|
+
"name": "allowDrag",
|
|
11229
|
+
"type": "(node: TreeNodeProp) => boolean"
|
|
11230
|
+
},
|
|
11231
|
+
{
|
|
11232
|
+
"description": "Per-target drop gate (antd `allowDrop`), asked for pointer AND keyboard moves. Use it for your own rules (max depth, no leaf parents); the self/subtree cycle is already refused.",
|
|
11233
|
+
"name": "allowDrop",
|
|
11234
|
+
"type": "(info: { dragNode: TreeNodeProp; dropNode: TreeNodeProp; dropPosition: -1 | 0 | 1 }) => boolean"
|
|
11235
|
+
},
|
|
11236
|
+
{
|
|
11237
|
+
"description": "A committed move (antd `onDrop`). `dropPosition` is RELATIVE to `node` — -1 before, 0 inside, 1 after (antd reports an absolute index that every antd demo converts back to this). `dropToGap` is true for before/after (sibling of `node`), false for inside (child of `node`). Update `treeData` here.",
|
|
11238
|
+
"name": "onDrop",
|
|
11239
|
+
"type": "(info: { dragNode: TreeNodeProp; node: TreeNodeProp; dropPosition: -1 | 0 | 1; dropToGap: boolean }) => void"
|
|
11240
|
+
},
|
|
11133
11241
|
{
|
|
11134
11242
|
"description": "Render a node's title yourself (antd `titleRender`).",
|
|
11135
11243
|
"name": "titleRender",
|
|
@@ -11219,7 +11327,7 @@
|
|
|
11219
11327
|
45
|
|
11220
11328
|
],
|
|
11221
11329
|
"storyPath": "data-display/Tree.stories.tsx",
|
|
11222
|
-
"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
|
|
11330
|
+
"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.",
|
|
11223
11331
|
"usage": [
|
|
11224
11332
|
"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.",
|
|
11225
11333
|
"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.",
|
package/agent/index.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"counts": {
|
|
3
3
|
"anti-ai-tells": 26,
|
|
4
|
-
"components":
|
|
4
|
+
"components": 179,
|
|
5
5
|
"patterns": 21,
|
|
6
6
|
"rules": 50,
|
|
7
|
-
"tokens":
|
|
7
|
+
"tokens": 2126,
|
|
8
8
|
"vocabulary": 14
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"file": "components-index.json",
|
|
13
|
-
"note": "48 KB — name + group + tagline for all
|
|
13
|
+
"note": "48 KB — name + group + tagline for all 179. FETCH THIS FIRST, then fetch only the components you chose.",
|
|
14
14
|
"url": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
@@ -48,19 +48,19 @@
|
|
|
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.
|
|
51
|
+
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v31.16.0/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",
|
|
55
55
|
"tokenTiers": {
|
|
56
56
|
"component": "per-part knobs, --{component}-{part}-{property}; usually leave these alone",
|
|
57
57
|
"counts": {
|
|
58
|
-
"component":
|
|
58
|
+
"component": 1811,
|
|
59
59
|
"foundation": 211,
|
|
60
60
|
"semantic": 104
|
|
61
61
|
},
|
|
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.
|
|
65
|
+
"version": "31.16.0"
|
|
66
66
|
}
|
package/agent/llms.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @godxjp/ui
|
|
2
2
|
|
|
3
|
-
> A Japanese-enterprise React design system:
|
|
4
|
-
> 50 cardinal rules. This file is the entry point for AI agents. Catalog version 31.
|
|
3
|
+
> A Japanese-enterprise React design system: 179 components, 2126 design tokens,
|
|
4
|
+
> 50 cardinal rules. This file is the entry point for AI agents. Catalog version 31.16.0.
|
|
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.
|
|
7
|
+
(`npx @godxjp/ui-mcp@31.16.0`). It is searchable and version-locked. These files exist for agents
|
|
8
8
|
that can only fetch URLs.
|
|
9
9
|
|
|
10
10
|
## Start
|
|
@@ -15,10 +15,10 @@ that can only fetch URLs.
|
|
|
15
15
|
## Catalog
|
|
16
16
|
|
|
17
17
|
- [patterns-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/patterns-index.json): 21 whole-task patterns (name, tagline, tags). Start here when the task is a TASK — "build a settings page" — then fetch `patterns/<name>.json` for complete code.
|
|
18
|
-
- [components-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json): 48 KB — all
|
|
18
|
+
- [components-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json): 48 KB — all 179 components as name, group, tagline, plus `absorbed`: the names that do NOT exist and map to it (`Combobox` → `Select`).
|
|
19
19
|
- [components/<Name>.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components/Select.json): one file per component (1 KB–36 KB, median 6 KB). Read the index, then fetch only the ones you chose — this is the selective route, and the reason you do not need the blob.
|
|
20
20
|
- [components.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components.json): 1.2 MB — every entry in one file. Most URL fetchers truncate a response this size without saying so; prefer the per-component files.
|
|
21
|
-
- [tokens.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json): every design token with its value, the reason it exists, and its `tier` — 211 `foundation` seeds (`--primary`, `--background`, `--radius`: set these when you are handed a brand), 104 `semantic` roles,
|
|
21
|
+
- [tokens.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json): every design token with its value, the reason it exists, and its `tier` — 211 `foundation` seeds (`--primary`, `--background`, `--radius`: set these when you are handed a brand), 104 `semantic` roles, 1811 `component` knobs.
|
|
22
22
|
- [vocabulary.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/vocabulary.json): the controlled prop vocabulary — which prop name means what, across every component.
|
|
23
23
|
- [rules.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/rules.json): 50 cardinal rules.
|
|
24
24
|
- [anti-ai-tells.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/anti-ai-tells.json): 26 shapes that make generated UI look generated, each with its fix.
|
|
@@ -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.
|
|
29
|
+
the tag: `.../godx-jp/godxjp-ui/v31.16.0/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.
|
package/agent/tokens.json
CHANGED
|
@@ -5651,6 +5651,36 @@
|
|
|
5651
5651
|
"tier": "component",
|
|
5652
5652
|
"value": "initial"
|
|
5653
5653
|
},
|
|
5654
|
+
{
|
|
5655
|
+
"description": "TextDiff (gh#1096) — the grounds under a removed and an added run. The INK stays the text colour: the mark that carries the meaning is the strike-through / underline plus a spoken label, so the tint only has to separate the run from its neighbours. The grounds read the status surface role (gh#866) and fall back to the tone at these alphas.",
|
|
5656
|
+
"name": "--text-diff-removed-background-alpha",
|
|
5657
|
+
"tier": "component",
|
|
5658
|
+
"value": "0.12"
|
|
5659
|
+
},
|
|
5660
|
+
{
|
|
5661
|
+
"description": "Data-display component tokens — small-by-design text knobs (rule #45/#46).",
|
|
5662
|
+
"name": "--text-diff-added-background-alpha",
|
|
5663
|
+
"tier": "component",
|
|
5664
|
+
"value": "0.16"
|
|
5665
|
+
},
|
|
5666
|
+
{
|
|
5667
|
+
"description": "The underline/strike weight — the resting hairline, so it survives forced-colors as ink.",
|
|
5668
|
+
"name": "--text-diff-mark-line-width",
|
|
5669
|
+
"tier": "component",
|
|
5670
|
+
"value": "var(--stroke-hairline)"
|
|
5671
|
+
},
|
|
5672
|
+
{
|
|
5673
|
+
"description": "Space between the before and after columns in split mode, and around a folded run.",
|
|
5674
|
+
"name": "--text-diff-space-gap",
|
|
5675
|
+
"tier": "component",
|
|
5676
|
+
"value": "var(--space-3)"
|
|
5677
|
+
},
|
|
5678
|
+
{
|
|
5679
|
+
"description": "Data-display component tokens — small-by-design text knobs (rule #45/#46).",
|
|
5680
|
+
"name": "--text-diff-space-inset",
|
|
5681
|
+
"tier": "component",
|
|
5682
|
+
"value": "var(--space-2)"
|
|
5683
|
+
},
|
|
5654
5684
|
{
|
|
5655
5685
|
"description": "Timeline accents — `initial` so the dot/line role defaults re-resolve under a scoped theme. ONE HUE down the whole progress column (gh#731): done, current and the travelled line all default to hsl(var(--primary)), the way Steps paints `finish` and `process`; current is told apart by its ring, not by a second role. To restore the pre-27.9 green/violet pairing, set the done dot's FILL and its INK together — the two roles have opposite ink polarity, so the fill alone leaves a near-white glyph on 若竹 green at 2.19:1 (gh#643): --timeline-dot-done-background: hsl(var(--success)); --timeline-dot-done-foreground: hsl(var(--success-foreground));",
|
|
5656
5686
|
"name": "--timeline-dot-done-background",
|
|
@@ -12317,6 +12347,18 @@
|
|
|
12317
12347
|
"tier": "component",
|
|
12318
12348
|
"value": "initial"
|
|
12319
12349
|
},
|
|
12350
|
+
{
|
|
12351
|
+
"description": "Drop indicator of a `draggable` tree (gh#1093): the gap line / inside frame. A role mirror, so `initial` with the role at the call site. Documented defaults: --tree-drop-indicator-color = hsl(var(--primary)); --tree-drop-indicator-width = var(--stroke-md).",
|
|
12352
|
+
"name": "--tree-drop-indicator-color",
|
|
12353
|
+
"tier": "component",
|
|
12354
|
+
"value": "initial"
|
|
12355
|
+
},
|
|
12356
|
+
{
|
|
12357
|
+
"description": "TREE — the standalone, on-page WAI-ARIA \"Tree View\" (`src/components/data-display/tree.tsx`). Every value the tree paints is a knob (cardinal rule #45), and the defaults are the QUIETEST reading (#44): no rails, a muted disclosure glyph, a selected band that tints rather than inverts. A service retunes the whole outline in one place instead of forking a row. ROLE-MIRROR KNOBS ARE `initial`, WITH THE DEFAULT AT THE CALL SITE. A knob whose default is a role token or a RE-SCOPED tier may not be bound at `:root` — CSS substitutes the `var()` where it is DECLARED, so the value would freeze at `:root` and a scoped `[data-tenant]` / `.dark` / a shell that re-scopes `--control-height` would never reach it. @see docs/TOKENS.md · \"Role-mirror knobs MUST be `initial`\".",
|
|
12358
|
+
"name": "--tree-drop-indicator-width",
|
|
12359
|
+
"tier": "component",
|
|
12360
|
+
"value": "initial"
|
|
12361
|
+
},
|
|
12320
12362
|
{
|
|
12321
12363
|
"description": "Width of the indeterminate bar shown while `loadData` resolves a branch. A fraction, not a length: it has to read as \"part of a row\" at every row width and every density.",
|
|
12322
12364
|
"name": "--tree-loading-bar-inline-size",
|
|
@@ -31,6 +31,8 @@ export { EmptyState } from "./empty-state.js";
|
|
|
31
31
|
export { Progress } from "./progress.js";
|
|
32
32
|
export { CodeBlock } from "./code-block.js";
|
|
33
33
|
export type { CodeBlockProp, CodeBlockProps } from "./code-block.js";
|
|
34
|
+
export { TextDiff, diffText, tokenizeText } from "./text-diff.js";
|
|
35
|
+
export type { TextDiffGranularity, TextDiffProp, TextDiffProps, TextDiffSegment, } from "./text-diff.js";
|
|
34
36
|
export { Prose } from "./prose.js";
|
|
35
37
|
export type { ProseProp, ProseProps } from "./prose.js";
|
|
36
38
|
export type { ProgressProps, ProgressSegment, ProgressTone } from "./progress.js";
|
|
@@ -52,7 +54,7 @@ export type { RangeTimelineProps, RangeTimelineRow } from "./range-timeline.js";
|
|
|
52
54
|
export { ChatBubble, ChatBubbleList } from "./chat-bubble.js";
|
|
53
55
|
export type { ChatBubbleListProp, ChatBubbleListProps, ChatBubblePlacementProp, ChatBubbleProp, ChatBubbleProps, ChatBubbleToneProp, ChatBubbleTypingProp, ChatBubbleVariantProp, ChatMessageProp, } from "./chat-bubble.js";
|
|
54
56
|
export { Tree } from "./tree.js";
|
|
55
|
-
export type { TreeNodeProp, TreeProp, TreeProps } from "./tree.js";
|
|
57
|
+
export type { TreeAllowDropInfoProp, TreeDropInfoProp, TreeDropPositionProp, TreeNodeProp, TreeProp, TreeProps, } from "./tree.js";
|
|
56
58
|
export { OrgChart } from "./org-chart.js";
|
|
57
59
|
export type { OrgChartNodeProp, OrgChartNodeVariantProp, OrgChartProp, OrgChartProps, } from "./org-chart.js";
|
|
58
60
|
export { Welcome } from "./welcome.js";
|
|
@@ -31,6 +31,7 @@ import { DataTable, flexRender } from "./data-table.js";
|
|
|
31
31
|
import { EmptyState } from "./empty-state.js";
|
|
32
32
|
import { Progress } from "./progress.js";
|
|
33
33
|
import { CodeBlock } from "./code-block.js";
|
|
34
|
+
import { TextDiff, diffText, tokenizeText } from "./text-diff.js";
|
|
34
35
|
import { Prose } from "./prose.js";
|
|
35
36
|
import { Timeline } from "./timeline.js";
|
|
36
37
|
import { TimelineGrid } from "./timeline-grid.js";
|
|
@@ -134,6 +135,7 @@ export {
|
|
|
134
135
|
TableHead,
|
|
135
136
|
TableHeader,
|
|
136
137
|
TableRow,
|
|
138
|
+
TextDiff,
|
|
137
139
|
ThoughtChain,
|
|
138
140
|
ThoughtChainItem,
|
|
139
141
|
Thumbnail,
|
|
@@ -141,6 +143,8 @@ export {
|
|
|
141
143
|
TimelineGrid,
|
|
142
144
|
Tree,
|
|
143
145
|
Welcome,
|
|
146
|
+
diffText,
|
|
144
147
|
flexRender,
|
|
148
|
+
tokenizeText,
|
|
145
149
|
useCarousel
|
|
146
150
|
};
|