@hirobius/design-system 0.19.1 → 0.21.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/AGENTS.md +123 -0
- package/CONSUMING.md +11 -6
- package/DESIGN.md +34 -21
- package/NOTICE.md +1 -1
- package/README.md +48 -13
- package/codemods/hds-prefix.mjs +231 -0
- package/codemods/jsx-fold.mjs +515 -0
- package/codemods/not-found-pattern.mjs +71 -0
- package/codemods/patterns-subpath.mjs +242 -81
- package/codemods/patterns-subpath.names.json +41 -15
- package/codemods/removed-0.20.json +194 -0
- package/codemods/tile-grid.mjs +283 -0
- package/codemods/unrewritable.mjs +291 -0
- package/dist/chunks/DemoStateContext-Cz5TmrYu.js +32 -0
- package/dist/chunks/empty-state-DNoThgfV.js +1227 -0
- package/dist/chunks/form-By82qZcC.js +66 -0
- package/dist/contexts.js +157 -78
- package/dist/fonts/geist-mono-400.woff2 +0 -0
- package/dist/fonts/satoshi-400.woff2 +0 -0
- package/dist/fonts/satoshi-500.woff2 +0 -0
- package/dist/fonts/satoshi-700.woff2 +0 -0
- package/dist/fonts.css +53 -0
- package/dist/form.js +1 -1
- package/dist/hirobius-ui.js +1600 -5354
- package/dist/manifest.js +12 -13
- package/dist/patterns.js +796 -510
- package/dist/styles.css +2 -2
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +165 -65
- package/dist/types/src/app/components/alert-dialog.d.ts +5 -0
- package/dist/types/src/app/components/asset-img.d.ts +1 -0
- package/dist/types/src/app/components/avatar-group.d.ts +2 -2
- package/dist/types/src/app/components/badge.d.ts +8 -3
- package/dist/types/src/app/components/blockquote.d.ts +2 -2
- package/dist/types/src/app/components/box-sx.d.ts +110 -13
- package/dist/types/src/app/components/box.d.ts +6 -3
- package/dist/types/src/app/components/breadcrumb.d.ts +0 -5
- package/dist/types/src/app/components/button.d.ts +35 -4
- package/dist/types/src/app/components/card.d.ts +10 -10
- package/dist/types/src/app/components/combobox.d.ts +47 -11
- package/dist/types/src/app/components/container.d.ts +2 -2
- package/dist/types/src/app/components/data-table-section.d.ts +2 -1
- package/dist/types/src/app/components/destructive-section.d.ts +1 -0
- package/dist/types/src/app/components/dialog.d.ts +8 -1
- package/dist/types/src/app/components/disclosure.d.ts +1 -5
- package/dist/types/src/app/components/error-pattern.d.ts +6 -1
- package/dist/types/src/app/components/field.d.ts +1 -2
- package/dist/types/src/app/components/form-actions.d.ts +1 -0
- package/dist/types/src/app/components/form-control.d.ts +10 -0
- package/dist/types/src/app/components/grid.d.ts +15 -6
- package/dist/types/src/app/components/hds-tooltip.d.ts +12 -2
- package/dist/types/src/app/components/icon.d.ts +1 -0
- package/dist/types/src/app/components/inline-code.d.ts +1 -2
- package/dist/types/src/app/components/input.d.ts +8 -5
- package/dist/types/src/app/components/kbd.d.ts +2 -2
- package/dist/types/src/app/components/metadata-list.d.ts +2 -2
- package/dist/types/src/app/components/metric-tiles.d.ts +1 -0
- package/dist/types/src/app/components/page-header.d.ts +0 -2
- package/dist/types/src/app/components/popover.d.ts +8 -0
- package/dist/types/src/app/components/progress.d.ts +33 -6
- package/dist/types/src/app/components/segmented-control.d.ts +2 -26
- package/dist/types/src/app/components/select.d.ts +10 -1
- package/dist/types/src/app/components/skeleton.d.ts +3 -4
- package/dist/types/src/app/components/spinner.d.ts +1 -2
- package/dist/types/src/app/components/stack.d.ts +4 -1
- package/dist/types/src/app/components/stat.d.ts +5 -5
- package/dist/types/src/app/components/status-list-item.d.ts +1 -2
- package/dist/types/src/app/components/status-tile.d.ts +3 -2
- package/dist/types/src/app/components/surface.d.ts +2 -3
- package/dist/types/src/app/components/switcher.d.ts +1 -1
- package/dist/types/src/app/components/table.d.ts +6 -15
- package/dist/types/src/app/components/tag.d.ts +0 -6
- package/dist/types/src/app/components/text.d.ts +54 -8
- package/dist/types/src/app/components/textarea.d.ts +1 -2
- package/dist/types/src/app/components/timestamp.d.ts +1 -0
- package/dist/types/src/app/components/toast.d.ts +1 -2
- package/dist/types/src/app/components/tooltip.d.ts +1 -1
- package/dist/types/src/app/context/DemoStateContext.d.ts +1 -1
- package/dist/types/src/app/context/RouterContext.d.ts +5 -5
- package/dist/types/src/app/data/manifest-types.d.ts +10 -5
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +45 -28
- package/dist/types/src/app/design-system/generated-token-values.d.ts +4 -0
- package/dist/types/src/app/design-system/tokens.d.ts +139 -18
- package/dist/types/src/icons.d.ts +1 -1
- package/dist/types/src/index.d.ts +76 -164
- package/dist/types/src/patterns.d.ts +20 -25
- package/dist/variables.css +47 -33
- package/docs/CONSUMING.md +80 -48
- package/hirobius.tokens.json +125 -88
- package/llms.txt +166 -59
- package/mcp/catalog.mjs +366 -0
- package/mcp/guide.mjs +315 -0
- package/mcp/hds-mcp.mjs +49 -0
- package/mcp/server.mjs +94 -0
- package/package.json +48 -27
- package/public/hds-manifest.json +2667 -6705
- package/public/llms/components.txt +45 -426
- package/public/llms/layout.txt +5 -5
- package/public/llms-full.txt +245 -506
- package/public/llms.txt +166 -59
- package/scripts/eslint-plugin-hds/index.d.mts +29 -0
- package/scripts/eslint-plugin-hds/index.mjs +55 -0
- package/scripts/eslint-plugin-hds/package.json +30 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-controls.mjs +47 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-hex.mjs +70 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-px-spacing.mjs +125 -0
- package/scripts/eslint-plugin-hds/rules/prefer-hds-layout-primitive.mjs +54 -0
- package/scripts/eslint-plugin-hds/rules/sx-token-first.mjs +111 -0
- package/scripts/eslint-plugin-hds/rules/utils.mjs +66 -0
- package/src/app/data/component-api.json +1082 -2913
- package/dist/chunks/LanguageContext-BxdCwiFg.js +0 -95
- package/dist/chunks/TokenDisplayContext-DKYJMVWk.js +0 -26
- package/dist/chunks/activity-feed-BGQ6v3wc.js +0 -22040
- package/dist/chunks/form-COP3vK9_.js +0 -66
- package/dist/types/src/app/components/activity-feed.d.ts +0 -73
- package/dist/types/src/app/components/app-shell.d.ts +0 -40
- package/dist/types/src/app/components/aspect-ratio.d.ts +0 -25
- package/dist/types/src/app/components/bleed.d.ts +0 -39
- package/dist/types/src/app/components/button-group.d.ts +0 -22
- package/dist/types/src/app/components/calendar.d.ts +0 -22
- package/dist/types/src/app/components/carousel.d.ts +0 -26
- package/dist/types/src/app/components/center.d.ts +0 -36
- package/dist/types/src/app/components/cinematic-link.d.ts +0 -18
- package/dist/types/src/app/components/circular-progress.d.ts +0 -28
- package/dist/types/src/app/components/cluster.d.ts +0 -39
- package/dist/types/src/app/components/command-palette.d.ts +0 -46
- package/dist/types/src/app/components/component-instance-matrix.d.ts +0 -27
- package/dist/types/src/app/components/context-menu.d.ts +0 -78
- package/dist/types/src/app/components/cover.d.ts +0 -43
- package/dist/types/src/app/components/date-input.d.ts +0 -31
- package/dist/types/src/app/components/date-range-input.d.ts +0 -34
- package/dist/types/src/app/components/date-time-input.d.ts +0 -30
- package/dist/types/src/app/components/doc-link-card.d.ts +0 -32
- package/dist/types/src/app/components/error-boundary.d.ts +0 -25
- package/dist/types/src/app/components/file-input.d.ts +0 -30
- package/dist/types/src/app/components/foundation-swatch.d.ts +0 -45
- package/dist/types/src/app/components/frame.d.ts +0 -38
- package/dist/types/src/app/components/heading-stack.d.ts +0 -52
- package/dist/types/src/app/components/history-card.d.ts +0 -12
- package/dist/types/src/app/components/hover-card.d.ts +0 -46
- package/dist/types/src/app/components/icon-button.d.ts +0 -22
- package/dist/types/src/app/components/image-lightbox.d.ts +0 -14
- package/dist/types/src/app/components/input-group.d.ts +0 -23
- package/dist/types/src/app/components/multi-selector.d.ts +0 -40
- package/dist/types/src/app/components/nav-group.d.ts +0 -29
- package/dist/types/src/app/components/nav-item.d.ts +0 -33
- package/dist/types/src/app/components/not-found-pattern.d.ts +0 -1
- package/dist/types/src/app/components/overflow-list.d.ts +0 -21
- package/dist/types/src/app/components/selectable-card.d.ts +0 -29
- package/dist/types/src/app/components/side-nav.d.ts +0 -23
- package/dist/types/src/app/components/sketch.d.ts +0 -19
- package/dist/types/src/app/components/stacked-card-rail.d.ts +0 -32
- package/dist/types/src/app/components/status-dot.d.ts +0 -25
- package/dist/types/src/app/components/stepper-field.d.ts +0 -12
- package/dist/types/src/app/components/stepper.d.ts +0 -33
- package/dist/types/src/app/components/text-lockup.d.ts +0 -38
- package/dist/types/src/app/components/tile-grid.d.ts +0 -17
- package/dist/types/src/app/components/time-input.d.ts +0 -24
- package/dist/types/src/app/components/toggle-button.d.ts +0 -32
- package/dist/types/src/app/components/token.d.ts +0 -90
- package/dist/types/src/app/components/tokenUtils.d.ts +0 -38
- package/dist/types/src/app/components/tokenizer.d.ts +0 -24
- package/dist/types/src/app/components/toolbar.d.ts +0 -36
- package/dist/types/src/app/components/top-nav.d.ts +0 -23
- package/dist/types/src/app/components/tree-list.d.ts +0 -30
- package/dist/types/src/app/data/nav-model.d.ts +0 -39
- package/dist/types/src/app/hooks/useFocusVisible.d.ts +0 -9
- package/dist/types/src/app/layouts/CaseStudyLayout.d.ts +0 -20
- package/dist/types/src/app/layouts/DocLayout.d.ts +0 -14
- package/dist/types/src/app/layouts/EmbeddedDocLayoutContext.d.ts +0 -6
- package/dist/types/src/app/layouts/HdsDocsShell.d.ts +0 -72
- package/dist/types/src/app/layouts/HdsSystemDocLayout.d.ts +0 -14
- package/dist/types/src/app/lib/hds-search.d.ts +0 -45
- package/dist/types/src/app/lib/nav-active.d.ts +0 -16
- package/dist/types/src/app/lib/navLevels.d.ts +0 -4
package/mcp/hds-mcp.mjs
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* hds-mcp — the `hds` MCP server over stdio, shipped in @hirobius/design-system.
|
|
4
|
+
*
|
|
5
|
+
* Run from an app that has the package installed: npx hds-mcp
|
|
6
|
+
* Without an install: npx -y -p @hirobius/design-system hds-mcp
|
|
7
|
+
*
|
|
8
|
+
* Reads the data the package already ships (public/hds-manifest.json,
|
|
9
|
+
* src/app/data/component-api.json) from its own install directory; it never
|
|
10
|
+
* touches the network or the caller's files. Messages are newline-delimited
|
|
11
|
+
* JSON-RPC 2.0 (the MCP stdio transport); logs go to stderr only.
|
|
12
|
+
*/
|
|
13
|
+
import { readFileSync } from 'node:fs';
|
|
14
|
+
import { dirname, join } from 'node:path';
|
|
15
|
+
import { createInterface } from 'node:readline';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
import { loadCatalog } from './catalog.mjs';
|
|
18
|
+
import { createServer } from './server.mjs';
|
|
19
|
+
|
|
20
|
+
const PKG_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
21
|
+
const { version } = JSON.parse(readFileSync(join(PKG_ROOT, 'package.json'), 'utf8'));
|
|
22
|
+
|
|
23
|
+
let catalog;
|
|
24
|
+
try {
|
|
25
|
+
catalog = loadCatalog(PKG_ROOT);
|
|
26
|
+
} catch (err) {
|
|
27
|
+
console.error(
|
|
28
|
+
`hds-mcp: could not read the design-system data under ${PKG_ROOT} (${err.message}).\n` +
|
|
29
|
+
' Reinstall @hirobius/design-system; in the hds repo run `node scripts/generate-component-api.mjs` first.',
|
|
30
|
+
);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const handle = createServer({ version, instructions: catalog.instructions, tools: catalog.tools });
|
|
35
|
+
|
|
36
|
+
const send = (msg) => process.stdout.write(`${JSON.stringify(msg)}\n`);
|
|
37
|
+
|
|
38
|
+
createInterface({ input: process.stdin }).on('line', (line) => {
|
|
39
|
+
if (!line.trim()) return;
|
|
40
|
+
let message;
|
|
41
|
+
try {
|
|
42
|
+
message = JSON.parse(line);
|
|
43
|
+
} catch {
|
|
44
|
+
send({ jsonrpc: '2.0', id: null, error: { code: -32700, message: 'Parse error' } });
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const response = handle(message);
|
|
48
|
+
if (response) send(response);
|
|
49
|
+
});
|
package/mcp/server.mjs
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `hds` MCP server's protocol layer: JSON-RPC 2.0 messages in, responses out.
|
|
3
|
+
*
|
|
4
|
+
* Interface: `createServer({ version, instructions, tools })` returns
|
|
5
|
+
* `handle(message)`, which takes one parsed JSON value and returns the response
|
|
6
|
+
* object, or `null` for a notification. It never throws: a message that is not a
|
|
7
|
+
* request object gets -32600, and anything unexpected inside gets -32603, so one
|
|
8
|
+
* bad line cannot stop the process. Transport (stdio framing) lives in hds-mcp.mjs, the
|
|
9
|
+
* tool behaviour in catalog.mjs; this module only speaks MCP.
|
|
10
|
+
*
|
|
11
|
+
* No dependency on @modelcontextprotocol/sdk: the server needs four methods
|
|
12
|
+
* (initialize, ping, tools/list, tools/call), and a zero-dependency module keeps
|
|
13
|
+
* the published package's install graph unchanged.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export const SERVER_NAME = 'hds';
|
|
17
|
+
|
|
18
|
+
/** Protocol versions this server can speak; it echoes the client's when it is one of these. */
|
|
19
|
+
const SUPPORTED_VERSIONS = ['2025-06-18', '2025-03-26', '2024-11-05'];
|
|
20
|
+
|
|
21
|
+
const rpcError = (id, code, message) => ({ jsonrpc: '2.0', id, error: { code, message } });
|
|
22
|
+
const rpcResult = (id, result) => ({ jsonrpc: '2.0', id, result });
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @param {{ version: string, instructions: string, tools: { name: string, description: string, inputSchema: object, run: (args: object) => unknown }[] }} options
|
|
26
|
+
*/
|
|
27
|
+
export function createServer({ version, instructions, tools }) {
|
|
28
|
+
const byName = new Map(tools.map((t) => [t.name, t]));
|
|
29
|
+
|
|
30
|
+
function dispatch(message) {
|
|
31
|
+
// MCP has no batches (removed in 2025-06-18), so an array is invalid like any non-object.
|
|
32
|
+
if (!message || typeof message !== 'object' || Array.isArray(message)) {
|
|
33
|
+
return rpcError(null, -32600, 'Invalid Request: expected one JSON-RPC request object');
|
|
34
|
+
}
|
|
35
|
+
const hasId = Object.prototype.hasOwnProperty.call(message, 'id');
|
|
36
|
+
const id = hasId ? message.id : null;
|
|
37
|
+
if (typeof message.method !== 'string') {
|
|
38
|
+
return hasId ? rpcError(id, -32600, 'Invalid Request: method must be a string') : null;
|
|
39
|
+
}
|
|
40
|
+
// A message without an `id` member is a notification; `id: null` is still a request.
|
|
41
|
+
if (!hasId) return null;
|
|
42
|
+
const { method } = message;
|
|
43
|
+
const params = message.params && typeof message.params === 'object' ? message.params : {};
|
|
44
|
+
|
|
45
|
+
switch (method) {
|
|
46
|
+
case 'initialize': {
|
|
47
|
+
const asked = params.protocolVersion;
|
|
48
|
+
return rpcResult(id, {
|
|
49
|
+
protocolVersion: SUPPORTED_VERSIONS.includes(asked) ? asked : SUPPORTED_VERSIONS[0],
|
|
50
|
+
capabilities: { tools: { listChanged: false } },
|
|
51
|
+
serverInfo: { name: SERVER_NAME, version },
|
|
52
|
+
instructions,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
case 'ping':
|
|
56
|
+
return rpcResult(id, {});
|
|
57
|
+
case 'tools/list':
|
|
58
|
+
return rpcResult(id, {
|
|
59
|
+
tools: tools.map(({ name, description, inputSchema }) => ({
|
|
60
|
+
name,
|
|
61
|
+
description,
|
|
62
|
+
inputSchema,
|
|
63
|
+
})),
|
|
64
|
+
});
|
|
65
|
+
case 'tools/call': {
|
|
66
|
+
const tool = typeof params.name === 'string' ? byName.get(params.name) : undefined;
|
|
67
|
+
if (!tool) return rpcError(id, -32602, `Unknown tool: ${params.name}`);
|
|
68
|
+
try {
|
|
69
|
+
const args =
|
|
70
|
+
params.arguments && typeof params.arguments === 'object' ? params.arguments : {};
|
|
71
|
+
const data = tool.run(args);
|
|
72
|
+
return rpcResult(id, { content: [{ type: 'text', text: JSON.stringify(data) }] });
|
|
73
|
+
} catch (err) {
|
|
74
|
+
// A tool-level failure is a result with isError, so the agent can read and recover.
|
|
75
|
+
return rpcResult(id, {
|
|
76
|
+
content: [{ type: 'text', text: JSON.stringify({ error: String(err.message) }) }],
|
|
77
|
+
isError: true,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
default:
|
|
82
|
+
return rpcError(id, -32601, `Method not found: ${method}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return function handle(message) {
|
|
87
|
+
try {
|
|
88
|
+
return dispatch(message);
|
|
89
|
+
} catch (err) {
|
|
90
|
+
const id = message && typeof message === 'object' && 'id' in message ? message.id : null;
|
|
91
|
+
return rpcError(id ?? null, -32603, `Internal error: ${err?.message ?? err}`);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
package/package.json
CHANGED
|
@@ -20,17 +20,12 @@
|
|
|
20
20
|
"author": "Adrian Milsap",
|
|
21
21
|
"license": "SEE LICENSE IN NOTICE.md",
|
|
22
22
|
"private": false,
|
|
23
|
-
"version": "0.
|
|
23
|
+
"version": "0.21.0",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=20",
|
|
26
26
|
"pnpm": ">=8"
|
|
27
27
|
},
|
|
28
28
|
"type": "module",
|
|
29
|
-
"typeCoverage": {
|
|
30
|
-
"ignoreFiles": [
|
|
31
|
-
"src/app/components/mobius-distortion.ts"
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
29
|
"module": "./dist/hirobius-ui.js",
|
|
35
30
|
"types": "./dist/types/src/index.d.ts",
|
|
36
31
|
"sideEffects": [
|
|
@@ -44,6 +39,7 @@
|
|
|
44
39
|
},
|
|
45
40
|
"./tokens.css": "./dist/tokens.css",
|
|
46
41
|
"./styles.css": "./dist/styles.css",
|
|
42
|
+
"./fonts.css": "./dist/fonts.css",
|
|
47
43
|
"./variables.css": "./dist/variables.css",
|
|
48
44
|
"./static.css": "./dist/static.css",
|
|
49
45
|
"./tokens": {
|
|
@@ -96,6 +92,10 @@
|
|
|
96
92
|
"import": "./dist/icons.js",
|
|
97
93
|
"default": "./dist/icons.js"
|
|
98
94
|
},
|
|
95
|
+
"./eslint-plugin": {
|
|
96
|
+
"types": "./scripts/eslint-plugin-hds/index.d.mts",
|
|
97
|
+
"default": "./scripts/eslint-plugin-hds/index.mjs"
|
|
98
|
+
},
|
|
99
99
|
"./package.json": "./package.json"
|
|
100
100
|
},
|
|
101
101
|
"files": [
|
|
@@ -112,7 +112,19 @@
|
|
|
112
112
|
"docs/CONSUMING.md",
|
|
113
113
|
"src/app/data/component-api.json",
|
|
114
114
|
"codemods/patterns-subpath.mjs",
|
|
115
|
-
"codemods/patterns-subpath.names.json"
|
|
115
|
+
"codemods/patterns-subpath.names.json",
|
|
116
|
+
"codemods/removed-0.20.json",
|
|
117
|
+
"codemods/hds-prefix.mjs",
|
|
118
|
+
"codemods/unrewritable.mjs",
|
|
119
|
+
"codemods/jsx-fold.mjs",
|
|
120
|
+
"codemods/not-found-pattern.mjs",
|
|
121
|
+
"codemods/tile-grid.mjs",
|
|
122
|
+
"AGENTS.md",
|
|
123
|
+
"mcp/",
|
|
124
|
+
"scripts/eslint-plugin-hds/index.mjs",
|
|
125
|
+
"scripts/eslint-plugin-hds/index.d.mts",
|
|
126
|
+
"scripts/eslint-plugin-hds/package.json",
|
|
127
|
+
"scripts/eslint-plugin-hds/rules/"
|
|
116
128
|
],
|
|
117
129
|
"publishConfig": {
|
|
118
130
|
"registry": "https://registry.npmjs.org",
|
|
@@ -146,26 +158,19 @@
|
|
|
146
158
|
},
|
|
147
159
|
"dependencies": {
|
|
148
160
|
"@radix-ui/react-alert-dialog": "^1.1.18",
|
|
149
|
-
"@radix-ui/react-aspect-ratio": "^1.1.11",
|
|
150
|
-
"@radix-ui/react-context-menu": "^2.3.2",
|
|
151
161
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
152
162
|
"@radix-ui/react-dropdown-menu": "^2.1.18",
|
|
153
|
-
"@radix-ui/react-hover-card": "^1.1.18",
|
|
154
163
|
"@radix-ui/react-popover": "^1.1.17",
|
|
155
164
|
"@radix-ui/react-select": "^2.3.1",
|
|
156
165
|
"@radix-ui/react-slot": "^1.2.4",
|
|
157
166
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
158
167
|
"@radix-ui/react-toast": "^1.2.17",
|
|
159
|
-
"@radix-ui/react-toggle": "^1.1.13",
|
|
160
168
|
"@radix-ui/react-toggle-group": "^1.1.13",
|
|
161
|
-
"@radix-ui/react-toolbar": "^1.1.14",
|
|
162
169
|
"@radix-ui/react-tooltip": "^1.1.8",
|
|
163
170
|
"class-variance-authority": "^0.7.1",
|
|
164
171
|
"clsx": "^2.1.1",
|
|
165
|
-
"date-fns": "^4.4.0",
|
|
166
172
|
"lucide-react": "0.487.0",
|
|
167
173
|
"motion": "12.23.24",
|
|
168
|
-
"react-day-picker": "^10.0.1",
|
|
169
174
|
"tailwind-merge": "^3.5.0"
|
|
170
175
|
},
|
|
171
176
|
"devDependencies": {
|
|
@@ -174,6 +179,7 @@
|
|
|
174
179
|
"@changesets/cli": "^2.27.10",
|
|
175
180
|
"@cyclonedx/cyclonedx-npm": "^4.2.1",
|
|
176
181
|
"@figma/code-connect": "^2.0.1",
|
|
182
|
+
"@guidepup/virtual-screen-reader": "^0.33.0",
|
|
177
183
|
"@hookform/resolvers": "^5.4.0",
|
|
178
184
|
"@lhci/cli": "0.15.1",
|
|
179
185
|
"@microsoft/api-extractor": "7.58.7",
|
|
@@ -190,7 +196,6 @@
|
|
|
190
196
|
"@testing-library/user-event": "^14.6.7",
|
|
191
197
|
"@types/react": "^18.3.0",
|
|
192
198
|
"@types/react-dom": "^18.3.0",
|
|
193
|
-
"@types/three": "^0.183.1",
|
|
194
199
|
"@typescript-eslint/eslint-plugin": "^8.59.1",
|
|
195
200
|
"@typescript-eslint/parser": "^8.59.1",
|
|
196
201
|
"@vitejs/plugin-react": "4.7.0",
|
|
@@ -210,7 +215,6 @@
|
|
|
210
215
|
"eslint-plugin-tailwindcss": "^3.18.3",
|
|
211
216
|
"express": "^5.2.1",
|
|
212
217
|
"fast-check": "^4.7.0",
|
|
213
|
-
"fuse.js": "^7.1.0",
|
|
214
218
|
"globals": "^17.6.0",
|
|
215
219
|
"husky": "^9.1.7",
|
|
216
220
|
"jscodeshift": "^17.3.0",
|
|
@@ -234,21 +238,23 @@
|
|
|
234
238
|
"storybook": "^8.6.18",
|
|
235
239
|
"style-dictionary": "^5.4.0",
|
|
236
240
|
"tailwindcss": "^4.2.4",
|
|
237
|
-
"three": "^0.183.2",
|
|
238
241
|
"type-coverage": "^2.29.7",
|
|
239
242
|
"typescript": "^6.0.2",
|
|
240
243
|
"vite": "6.4.2",
|
|
241
244
|
"vite-bundle-visualizer": "^1.2.1",
|
|
242
245
|
"vitest": "^4.1.0",
|
|
243
246
|
"yaml": "^2.8.1",
|
|
244
|
-
"zod": "^4.4.3"
|
|
245
|
-
"zustand": "^5.0.12"
|
|
247
|
+
"zod": "^4.4.3"
|
|
246
248
|
},
|
|
247
249
|
"lint-staged": {
|
|
248
250
|
"*.{ts,tsx,js,jsx,mjs,cjs,json,md,mdx,css,scss,html,yaml,yml}": "prettier --write"
|
|
249
251
|
},
|
|
250
252
|
"bin": {
|
|
251
|
-
"hds-patterns-subpath": "codemods/patterns-subpath.mjs"
|
|
253
|
+
"hds-patterns-subpath": "codemods/patterns-subpath.mjs",
|
|
254
|
+
"hds-prefix": "codemods/hds-prefix.mjs",
|
|
255
|
+
"hds-not-found-pattern": "codemods/not-found-pattern.mjs",
|
|
256
|
+
"hds-tile-grid": "codemods/tile-grid.mjs",
|
|
257
|
+
"hds-mcp": "mcp/hds-mcp.mjs"
|
|
252
258
|
},
|
|
253
259
|
"scripts": {
|
|
254
260
|
"_comment:a11y-high-value": "The following check:* validators are high-value accessibility checks that catch real violations (check:focus found 1 missing focus class). Kept dormant/manual-only to avoid pre-commit performance regression. Candidates to wire into pretest after CI stability review.",
|
|
@@ -264,13 +270,13 @@
|
|
|
264
270
|
"audit:sidecar": "node scripts/generate-security-posture.mjs",
|
|
265
271
|
"audit:style-dictionary": "bash scripts/poc/style-dictionary-poc/run.sh",
|
|
266
272
|
"build-storybook": "storybook build",
|
|
267
|
-
"build:lib": "vite build -c vite.config.lib.ts && pnpm build:types && node scripts/build-vars-css.mjs && node scripts/
|
|
273
|
+
"build:lib": "vite build -c vite.config.lib.ts && pnpm build:types && node scripts/build-vars-css.mjs && node scripts/build-fonts-css.mjs && node scripts/build-styles-css.mjs && node scripts/build-static-css.mjs",
|
|
268
274
|
"build:types": "tsc -p tsconfig.dts.json && node scripts/strip-dts-side-effects.mjs && node scripts/add-dts-extensions.mjs",
|
|
269
275
|
"catalog": "node scripts/generate-visual-catalog.mjs",
|
|
270
276
|
"changelog:generate": "node scripts/generate-changelog.mjs",
|
|
271
277
|
"changeset": "changeset",
|
|
272
278
|
"changeset:add": "changeset",
|
|
273
|
-
"changeset:version": "changeset version",
|
|
279
|
+
"changeset:version": "changeset version && node scripts/audit-component-integrity.mjs --api --update-baseline",
|
|
274
280
|
"check": "pnpm check:full",
|
|
275
281
|
"check:a11y": "pnpm lint --rule '{\"jsx-a11y/alt-text\":\"error\",\"jsx-a11y/img-redundant-alt\":\"error\"}'",
|
|
276
282
|
"check:attributions": "node scripts/check-attributions.mjs",
|
|
@@ -285,11 +291,13 @@
|
|
|
285
291
|
"check:dimensions": "node scripts/check-dimensions.mjs",
|
|
286
292
|
"check:doc-refs": "node scripts/check-link-integrity.mjs --doc-refs-only",
|
|
287
293
|
"check:docs": "node scripts/audit-component-integrity.mjs --docs && node scripts/check-token-descriptions.mjs --no-missing --quality",
|
|
294
|
+
"check:docs-guardrails": "node scripts/check-docs.mjs",
|
|
288
295
|
"check:exemptions": "node scripts/check-exemptions.mjs",
|
|
289
296
|
"check:fast": "node scripts/validate-manifest.mjs && node scripts/check-manifest-drift.mjs && node scripts/build-tokens.mjs && node scripts/verify-tokens.mjs && node scripts/audit-tokens.mjs --full && pnpm typecheck && node scripts/check-css-integrity.mjs && node scripts/audit-component-integrity.mjs --tokens && pnpm check:docs && node scripts/check-ref-forwarding.mjs && node scripts/check-hardcoded-spacing.mjs && node scripts/check-dimensions.mjs && node scripts/check-hardcoded-breakpoints.mjs && node scripts/check-typography-discipline.mjs && pnpm check:mojibake && node scripts/check-style-discipline.mjs --style-props-only && node scripts/check-tier-bypass.mjs && node scripts/check-link-integrity.mjs --doc-refs-only && node scripts/check-brand.mjs && node scripts/check-registry.mjs && node scripts/check-template-source-of-truth.mjs",
|
|
290
297
|
"check:figma-coverage": "node scripts/check-figma-coverage.mjs",
|
|
291
298
|
"check:figma-drift": "node scripts/check-figma-drift.mjs",
|
|
292
299
|
"check:figma-mapping": "node scripts/check-figma-mapping.mjs",
|
|
300
|
+
"check:figma-staging-urls": "node scripts/check-figma-staging-urls.mjs",
|
|
293
301
|
"check:focus": "node scripts/check-focus-states.mjs",
|
|
294
302
|
"check:font-files": "node scripts/check-typography-discipline.mjs --font-files-only",
|
|
295
303
|
"check:fonts": "node scripts/check-typography-discipline.mjs --fonts-only",
|
|
@@ -302,6 +310,7 @@
|
|
|
302
310
|
"check:knip": "knip",
|
|
303
311
|
"check:knip-ratchet": "knip --max-issues 60",
|
|
304
312
|
"check:layout-discipline": "node scripts/check-layout-discipline.mjs",
|
|
313
|
+
"check:layout-gap-vocabulary": "node scripts/check-layout-gap-vocabulary.mjs",
|
|
305
314
|
"check:licenses": "node scripts/check-licenses.mjs",
|
|
306
315
|
"check:lockfile": "pnpm install --frozen-lockfile --offline --prefer-offline --ignore-scripts --silent 2>/dev/null || (echo 'Lockfile drift: run pnpm install' && exit 1)",
|
|
307
316
|
"check:manifest-drift": "node scripts/check-manifest-drift.mjs",
|
|
@@ -322,6 +331,8 @@
|
|
|
322
331
|
"check:spacing": "node scripts/check-hardcoded-spacing.mjs",
|
|
323
332
|
"check:spacing-vocabulary": "node scripts/check-spacing-vocabulary.mjs",
|
|
324
333
|
"check:story-coverage": "node scripts/check-story-coverage.mjs",
|
|
334
|
+
"check:layout-contract": "node scripts/check-layout-contract.mjs",
|
|
335
|
+
"check:spacing-scale": "node scripts/check-tailwind-spacing-scale.mjs",
|
|
325
336
|
"check:storybook-axe": "node scripts/check-storybook-axe.mjs",
|
|
326
337
|
"check:style-props": "node scripts/check-style-discipline.mjs --style-props-only",
|
|
327
338
|
"check:sync-map": "node scripts/check-sync-map.mjs",
|
|
@@ -343,8 +354,12 @@
|
|
|
343
354
|
"closure:plan:check": "node scripts/generate-closure-plan.mjs --check",
|
|
344
355
|
"docs:api": "node scripts/generate-component-api.mjs",
|
|
345
356
|
"docs:changelogs": "node scripts/generate-component-changelogs.mjs",
|
|
357
|
+
"docs:build": "pnpm docs:prepare && pnpm --dir docs-site build",
|
|
358
|
+
"docs:components": "node scripts/generate-docs-components.mjs",
|
|
346
359
|
"docs:component": "node scripts/generate-component-page.mjs",
|
|
360
|
+
"docs:dev": "pnpm docs:prepare && pnpm --dir docs-site dev",
|
|
347
361
|
"docs:llms": "node scripts/generate-llms-txt.mjs",
|
|
362
|
+
"docs:prepare": "pnpm build:lib && pnpm docs:api && pnpm docs:components && pnpm --dir docs-site install --frozen-lockfile",
|
|
348
363
|
"docs:site": "node scripts/generate-component-page.mjs --all --clean",
|
|
349
364
|
"docs:site:inline": "node scripts/generate-component-page.mjs --all --clean --inline",
|
|
350
365
|
"docs:site:shots": "node scripts/generate-component-page.mjs --all --clean --shots",
|
|
@@ -368,8 +383,8 @@
|
|
|
368
383
|
"health-commit": "pnpm check:semantic-report && node scripts/print-health-commit.mjs",
|
|
369
384
|
"icons:sync": "node scripts/sync-icons.mjs",
|
|
370
385
|
"knip": "knip",
|
|
371
|
-
"lint": "eslint src scripts validators tests --max-warnings=0",
|
|
372
|
-
"lint:fix": "eslint src scripts validators tests --fix",
|
|
386
|
+
"lint": "eslint src scripts validators tests mcp --max-warnings=0",
|
|
387
|
+
"lint:fix": "eslint src scripts validators tests mcp --fix",
|
|
373
388
|
"llms:generate": "node scripts/generate-llms-txt.mjs",
|
|
374
389
|
"skill:generate": "node scripts/generate-consumer-skill.mjs",
|
|
375
390
|
"check:consumer-skill": "node scripts/generate-consumer-skill.mjs --check",
|
|
@@ -378,7 +393,7 @@
|
|
|
378
393
|
"prebuild-storybook": "node scripts/generate-component-api.mjs",
|
|
379
394
|
"prebuild:lib": "node scripts/generate-component-api.mjs",
|
|
380
395
|
"prestorybook": "node scripts/generate-component-api.mjs",
|
|
381
|
-
"pretest": "node scripts/validate-manifest.mjs && node scripts/check-manifest-drift.mjs && node scripts/check-manifest-schema-semver.mjs && node scripts/audit-component-integrity.mjs --completeness && node scripts/check-source-canon.mjs && node scripts/check-binding-drift.mjs && node scripts/check-registry.mjs && node scripts/check-tenant-tokens.mjs && node scripts/check-props-exports.mjs && knip --no-exit-code && node scripts/check-dark-alias-flip.mjs && node scripts/check-focus-states.mjs && node scripts/generate-staging-inventory.mjs --check && node scripts/generate-consumer-skill.mjs --check",
|
|
396
|
+
"pretest": "node scripts/validate-manifest.mjs && node scripts/check-manifest-drift.mjs && node scripts/check-manifest-schema-semver.mjs && node scripts/audit-component-integrity.mjs --completeness && node scripts/audit-component-integrity.mjs --api && node scripts/check-source-canon.mjs && node scripts/check-binding-drift.mjs && node scripts/check-registry.mjs && node scripts/check-tenant-tokens.mjs && node scripts/check-props-exports.mjs && knip --no-exit-code && node scripts/check-dark-alias-flip.mjs && node scripts/check-focus-states.mjs && node scripts/generate-staging-inventory.mjs --check && node scripts/generate-consumer-skill.mjs --check && node scripts/generate-agents-md.mjs --check && node scripts/check-deprecations.mjs && node scripts/upgrade/schema.mjs --check && node scripts/check-docs.mjs && node --test scripts/check-docs.selftest.mjs",
|
|
382
397
|
"pretypecheck": "node scripts/audit-tokens.mjs --report-only",
|
|
383
398
|
"preview:build": "vite build --config preview/vite.config.mjs",
|
|
384
399
|
"promote": "node scripts/promote.mjs",
|
|
@@ -387,6 +402,9 @@
|
|
|
387
402
|
"scaffold:component": "node scripts/scaffold-component.mjs",
|
|
388
403
|
"scaffold:tenant": "node scripts/scaffold-tenant.mjs",
|
|
389
404
|
"size-limit": "size-limit --config .size-limit.cjs",
|
|
405
|
+
"layout-contract:generate": "node scripts/generate-layout-contract.mjs",
|
|
406
|
+
"status:touch": "node scripts/status-touch.mjs",
|
|
407
|
+
"status:fold": "node scripts/status-fold.mjs",
|
|
390
408
|
"smoke:consumer": "node scripts/smoke-consumer.mjs && node scripts/check-published-types.mjs && node scripts/check-rsc-directives.mjs && node scripts/check-pack-contents.mjs",
|
|
391
409
|
"storybook": "storybook dev -p 6006",
|
|
392
410
|
"storybook:deploy": "node scripts/deploy-storybook.mjs",
|
|
@@ -399,7 +417,7 @@
|
|
|
399
417
|
"test:figma": "npx tsx scripts/figma-sync.ts",
|
|
400
418
|
"test:phase1": "node scripts/test-phase1.mjs",
|
|
401
419
|
"test:watch": "vitest",
|
|
402
|
-
"tokens": "node scripts/generate-manifest.mjs && node scripts/generate-component-api.mjs && node scripts/enrich-manifest.mjs && node scripts/build-tokens.mjs && node scripts/audit-tokens.mjs --forbidden && node scripts/check-typography-discipline.mjs --overrides-only && node scripts/build-handoff.mjs && node scripts/build-design-md.mjs && node scripts/generate-llms-txt.mjs && node scripts/generate-consumer-skill.mjs && node scripts/build-readme-counts.mjs",
|
|
420
|
+
"tokens": "node scripts/generate-manifest.mjs && node scripts/generate-component-api.mjs && node scripts/enrich-manifest.mjs && node scripts/build-tokens.mjs && node scripts/audit-tokens.mjs --forbidden && node scripts/check-typography-discipline.mjs --overrides-only && node scripts/build-handoff.mjs && node scripts/build-design-md.mjs && node scripts/generate-llms-txt.mjs && node scripts/generate-consumer-skill.mjs && node scripts/generate-agents-md.mjs && node scripts/build-readme-counts.mjs",
|
|
403
421
|
"tokens:audit": "node scripts/audit-component-integrity.mjs --tokens",
|
|
404
422
|
"tokens:build": "node scripts/build-hds-tokens.mjs",
|
|
405
423
|
"tokens:index": "node scripts/build-token-index.mjs",
|
|
@@ -411,6 +429,9 @@
|
|
|
411
429
|
"watch:guardrails": "nodemon --watch CLAUDE.md --watch .cursorrules --watch eslint.config.js --watch .github/workflows -e md,json,js,yml,yaml --exec \"node scripts/audit-guardrails.js\"",
|
|
412
430
|
"watch:metrics": "nodemon --watch src/app/components --watch src/app/pages --watch src/app/design-system --watch src/app/styles -e tsx,ts,css --exec \"node scripts/audit-tokens.mjs --full && node scripts/generate-manifest.mjs\"",
|
|
413
431
|
"consumer:usage": "node scripts/count-consumer-usage.mjs",
|
|
414
|
-
"
|
|
432
|
+
"upgrade:consumers": "node scripts/upgrade/consumers.mjs",
|
|
433
|
+
"codemod:names": "node scripts/build-codemod-pattern-names.mjs",
|
|
434
|
+
"agents:generate": "node scripts/generate-agents-md.mjs",
|
|
435
|
+
"check:agents-md": "node scripts/generate-agents-md.mjs --check"
|
|
415
436
|
}
|
|
416
437
|
}
|