@godxjp/ui 32.8.0 → 32.9.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/DESIGN.md +10 -3
- package/README.md +5 -5
- package/agent/DESIGN.md +10 -3
- package/agent/START-HERE.md +9 -7
- package/agent/components/AppShell.json +1 -0
- package/agent/components/BlockEditor.json +1 -0
- package/agent/components/PageContainer.json +1 -0
- package/agent/components/SearchInput.json +1 -0
- package/agent/components/Topbar.json +2 -0
- package/agent/components/TopbarItem.json +1 -0
- package/agent/components/TopbarSearch.json +49 -0
- package/agent/components-index.json +5 -0
- package/agent/components.json +56 -0
- package/agent/index.json +7 -7
- package/agent/llms.txt +7 -7
- package/agent/tokens.json +38 -2
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.js +2 -0
- package/dist/components/layout/topbar-search.d.ts +12 -0
- package/dist/components/layout/topbar-search.js +87 -0
- package/dist/contracts/measurement.json +1 -1
- package/dist/i18n/messages/en.json +1 -0
- package/dist/i18n/messages/ja.json +1 -0
- package/dist/i18n/messages/vi.json +1 -0
- package/dist/props/components/layout.prop.d.ts +22 -0
- package/dist/props/registry.d.ts +9 -0
- package/dist/props/registry.js +16 -0
- package/dist/styles/card-layout.css +1 -1
- package/dist/styles/data-display-layout.css +19 -0
- package/dist/styles/layers.json +7 -1
- package/dist/styles/shell-layout.css +123 -2
- package/dist/styles.css +1 -1
- package/dist/tokens/components/card.css +3 -1
- package/dist/tokens/components/data-display.css +2 -0
- package/dist/tokens/components/shell.css +7 -0
- package/package.json +2 -2
- package/scripts/_agent-setup.mjs +10 -5
- package/scripts/cli.mjs +12 -6
- package/scripts/visual-audit.mjs +1367 -90
|
@@ -57,7 +57,9 @@
|
|
|
57
57
|
calc(var(--font-size-base) / var(--font-size-ratio))
|
|
58
58
|
);
|
|
59
59
|
--stat-card-label-font-weight: var(--font-weight-medium);
|
|
60
|
-
|
|
60
|
+
|
|
61
|
+
--stat-card-label-letter-spacing: normal;
|
|
62
|
+
--stat-card-label-letter-case: none;
|
|
61
63
|
--stat-card-value-font-size: var(
|
|
62
64
|
--font-size-2xl,
|
|
63
65
|
calc(
|
|
@@ -61,6 +61,8 @@
|
|
|
61
61
|
--prose-columns-gap: var(--space-6);
|
|
62
62
|
|
|
63
63
|
--block-editor-gutter-inline-size: calc(2 * var(--control-height-xs) + var(--space-2));
|
|
64
|
+
|
|
65
|
+
--block-editor-compact-gutter-inline-size: var(--block-editor-frame-padding);
|
|
64
66
|
--block-editor-min-height: var(--band-height-3xl);
|
|
65
67
|
|
|
66
68
|
--block-editor-frame-padding: var(--space-3);
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
--font-size-2xs,
|
|
7
7
|
calc(var(--font-size-base) / var(--font-size-ratio) / var(--font-size-ratio))
|
|
8
8
|
);
|
|
9
|
+
|
|
10
|
+
--sidebar-section-label-letter-case: none;
|
|
11
|
+
--sidebar-section-label-letter-spacing: normal;
|
|
9
12
|
--sidebar-product-tenant-font-size: var(
|
|
10
13
|
--font-size-2xs,
|
|
11
14
|
calc(var(--font-size-base) / var(--font-size-ratio) / var(--font-size-ratio))
|
|
@@ -157,6 +160,10 @@
|
|
|
157
160
|
|
|
158
161
|
--topbar-center-compact-display: none;
|
|
159
162
|
|
|
163
|
+
--topbar-search-min-text-inline-size: 8ch;
|
|
164
|
+
|
|
165
|
+
--topbar-search-inline-size: 16rem;
|
|
166
|
+
|
|
160
167
|
--topbar-item-padding-inline: var(--space-3);
|
|
161
168
|
|
|
162
169
|
--topbar-item-padding-inline-compact: var(--space-2);
|
package/package.json
CHANGED
package/scripts/_agent-setup.mjs
CHANGED
|
@@ -209,9 +209,13 @@ Follow this every time you create or change a page, component or form.
|
|
|
209
209
|
## After JSX
|
|
210
210
|
5. \`npx @godxjp/ui audit <files>\` — zero errors (a PostToolUse hook also runs it on each edit).
|
|
211
211
|
Run it from the package that owns the files; \`--help\` lists the flags.
|
|
212
|
-
6.
|
|
213
|
-
|
|
214
|
-
7.
|
|
212
|
+
6. \`npx @godxjp/ui visual-audit <url> <routes>\` — every route at 320 / 390 / 768 / 1024 / 1280 /
|
|
213
|
+
844×390; zero machine failures; "unmapped" is not a pass.
|
|
214
|
+
7. Inspect every screenshot at every width, region by region (top bar, header, body, aside/rail,
|
|
215
|
+
menus/drawers), including regions you must not change — defects there become issues.
|
|
216
|
+
8. No top-N, no round cap: stop at zero failures and a fully resolved checklist. Then report
|
|
217
|
+
"probes passed; independent acceptance pending" with the artifacts — never "done" on your own
|
|
218
|
+
review. Acceptance comes from someone who did not build it.
|
|
215
219
|
|
|
216
220
|
In a workspace, \`node_modules/@godxjp/ui\` may be hoisted to the repo root: read its files there,
|
|
217
221
|
or through the MCP (\`get_design\`, \`get_rule\`).
|
|
@@ -231,8 +235,9 @@ Before any JSX for a screen:
|
|
|
231
235
|
dashboard, approval-queue) — match its structure.
|
|
232
236
|
|
|
233
237
|
After building:
|
|
234
|
-
4. \`npx @godxjp/ui audit <files>\` — zero
|
|
235
|
-
5.
|
|
238
|
+
4. \`npx @godxjp/ui audit <files>\` and \`npx @godxjp/ui visual-audit <url> <routes>\` (6 widths) — zero.
|
|
239
|
+
5. Inspect every screenshot at every width, region by region; no top-N cap. Report "probes passed;
|
|
240
|
+
independent acceptance pending" — the builder never accepts its own screen.
|
|
236
241
|
|
|
237
242
|
Rules: \`node_modules/@godxjp/ui/docs/CONSUMER-RULES.md\`. Details: \`.claude/godxjp-ui-workflow.md\`.
|
|
238
243
|
<!-- godxjp-ui:end -->
|
package/scripts/cli.mjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* init-agent scaffold the agent forcing-kit (MCP + auto-audit hook + mandate)
|
|
5
5
|
* sync-rules write/refresh package-owned agent rules (--dry-run previews)
|
|
6
6
|
* audit static UI audit (regex over source)
|
|
7
|
-
* visual-audit runtime audit (Playwright
|
|
7
|
+
* visual-audit runtime audit (Playwright) against a running app, at six widths
|
|
8
8
|
* prune-css emit a stylesheet with only the CSS layers the app uses (gh#971)
|
|
9
9
|
* codemod v32 apply the mechanical half of the v32 upgrade (docs/migrations/v32.md)
|
|
10
10
|
*/
|
|
@@ -85,15 +85,21 @@ const HELP = {
|
|
|
85
85
|
--dry-run list every change without writing
|
|
86
86
|
What it cannot decide (a component move that changes props, an AppProvider that relied on the
|
|
87
87
|
old vi default) is printed as a "note" for you to finish.`,
|
|
88
|
-
"visual-audit": `godxjp-ui visual-audit [--format json] [--strict] <baseUrl> [route …]
|
|
88
|
+
"visual-audit": `godxjp-ui visual-audit [--format json] [--strict] [--widths WxH,…] <baseUrl> [route …]
|
|
89
89
|
|
|
90
|
-
Runtime audit (Playwright
|
|
90
|
+
Runtime audit (Playwright) against an app you are ALREADY running locally, at six widths.
|
|
91
91
|
baseUrl the running app, e.g. http://localhost:5173
|
|
92
92
|
route … paths appended to baseUrl (default "/")
|
|
93
|
+
--widths viewports to audit (default 320x900,390x844,768x1024,1024x900,1280x900,844x390;
|
|
94
|
+
a bare width uses height 900)
|
|
93
95
|
--strict exit non-zero on any finding, not only errors
|
|
94
|
-
--format json machine-readable findings
|
|
96
|
+
--format json machine-readable: findings (viewport, element, threshold + origin), unmapped
|
|
97
|
+
items (reviewer required), per-width rule status + reviewer checklist
|
|
95
98
|
--rules print the visual rule catalog as JSON and exit
|
|
96
|
-
|
|
99
|
+
Responsive probes C01–C12 are advisory; thresholds are repo-chosen unless marked WCAG. A clean
|
|
100
|
+
run ends "probes passed; independent acceptance pending" — the checklist still needs a reviewer.
|
|
101
|
+
Map your own components with data-audit-role (search, search-trigger, account-name, editor,
|
|
102
|
+
task-actions, rail-toggle, content-column, section-label, metadata). Needs the playwright peer.`,
|
|
97
103
|
};
|
|
98
104
|
|
|
99
105
|
const USAGE = `usage: godxjp-ui <command> [args]
|
|
@@ -103,7 +109,7 @@ commands:
|
|
|
103
109
|
sync-rules write/refresh package-owned agent rules (--dry-run previews)
|
|
104
110
|
audit static UI audit over source
|
|
105
111
|
audit-hook the per-edit audit hook (wired by init-agent)
|
|
106
|
-
visual-audit runtime audit (Playwright
|
|
112
|
+
visual-audit runtime audit (Playwright) against a running app, at six widths
|
|
107
113
|
prune-css emit a stylesheet with only the CSS layers your app uses
|
|
108
114
|
|
|
109
115
|
godxjp-ui <command> --help details and flags for one command`;
|