@reqvire-org/ads 0.0.0-stage → 0.2.9
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/LICENSE +21 -0
- package/README.md +284 -2
- package/dist/assets.mjs +52 -0
- package/dist/bootstrap-ds/ADS.md +203 -0
- package/dist/bootstrap-ds/README.md +98 -0
- package/dist/bootstrap-ds/biome.css.json +21 -0
- package/dist/bootstrap-ds/design-system/assets/brand/README.md +28 -0
- package/dist/bootstrap-ds/design-system/assets/fonts/.gitkeep +0 -0
- package/dist/bootstrap-ds/design-system/components/.gitkeep +0 -0
- package/dist/bootstrap-ds/design-system/composition/.gitkeep +0 -0
- package/dist/bootstrap-ds/design-system/index.ts +5 -0
- package/dist/bootstrap-ds/design-system/patterns/.gitkeep +0 -0
- package/dist/bootstrap-ds/design-system/showcase/mcp/index.html +1 -0
- package/dist/bootstrap-ds/design-system/showcase/mcp/main.tsx +8 -0
- package/dist/bootstrap-ds/design-system/styles.css +5 -0
- package/dist/bootstrap-ds/design-system/tokens/Foundation.fixture.ts +47 -0
- package/dist/bootstrap-ds/design-system/tokens/Foundation.scenario.tsx +14 -0
- package/dist/bootstrap-ds/design-system/tokens/base.css +27 -0
- package/dist/bootstrap-ds/design-system/tokens/colors.css +29 -0
- package/dist/bootstrap-ds/design-system/tokens/elevation.css +15 -0
- package/dist/bootstrap-ds/design-system/tokens/spacing.css +15 -0
- package/dist/bootstrap-ds/design-system/tokens/typography.css +13 -0
- package/dist/bootstrap-ds/ds.config.json +13 -0
- package/dist/bootstrap-ds/gitignore.template +8 -0
- package/dist/bootstrap-ds/package-lock.json +4660 -0
- package/dist/bootstrap-ds/package.json +41 -0
- package/dist/bootstrap-ds/scripts/build-mcp-previews.mjs +33 -0
- package/dist/bootstrap-ds/src/vite-env.d.ts +7 -0
- package/dist/bootstrap-ds/tsconfig.build.json +12 -0
- package/dist/bootstrap-ds/tsconfig.json +20 -0
- package/dist/bootstrap-ds/vite.config.ts +21 -0
- package/dist/boundaries.mjs +130 -0
- package/dist/brand-assets.mjs +82 -0
- package/dist/check.mjs +222 -0
- package/dist/cli.mjs +106 -0
- package/dist/config.mjs +181 -0
- package/dist/contracts/tokens.json +52 -0
- package/dist/html.mjs +30 -0
- package/dist/index.mjs +9 -0
- package/dist/init.mjs +194 -0
- package/dist/lint-config.mjs +40 -0
- package/dist/mcp/THIRD_PARTY_NOTICES.md +786 -0
- package/dist/mcp/apps.mjs +53 -0
- package/dist/mcp/build-status.mjs +164 -0
- package/dist/mcp/catalog.mjs +65 -0
- package/dist/mcp/context.mjs +69 -0
- package/dist/mcp/mutations.mjs +301 -0
- package/dist/mcp/patch.mjs +114 -0
- package/dist/mcp/preview-watch.mjs +169 -0
- package/dist/mcp/preview-widget.bundle.js +113 -0
- package/dist/mcp/project-widget.bundle.js +113 -0
- package/dist/mcp/prompts.mjs +28 -0
- package/dist/mcp/resource-loader.js +138 -0
- package/dist/mcp/sandbox-host.mjs +22 -0
- package/dist/mcp/server.mjs +377 -0
- package/dist/mcp/showcase-host.mjs +68 -0
- package/dist/mcp/skills.mjs +77 -0
- package/dist/mcp/widget.bundle.js +150 -0
- package/dist/oxlint.mjs +81 -0
- package/dist/preview-resources.mjs +198 -0
- package/dist/project-documents.mjs +27 -0
- package/dist/public-props.mjs +74 -0
- package/dist/scenarios-compiler.mjs +287 -0
- package/dist/scenarios-vite.d.mts +3 -0
- package/dist/scenarios-vite.mjs +71 -0
- package/dist/scenarios.mjs +212 -0
- package/dist/showcase/client.bundle.js +127 -0
- package/dist/showcase/index.html +17 -0
- package/dist/showcase/sandbox.js +30 -0
- package/dist/showcase/style.css +7 -0
- package/dist/showcase-coverage.mjs +118 -0
- package/dist/showcase.mjs +77 -0
- package/dist/skills/README.md +68 -0
- package/dist/skills/ads-assimilate/SKILL.md +292 -0
- package/dist/skills/ads-assimilate/agents/openai.yaml +4 -0
- package/dist/skills/ads-assimilate/references/cli.md +111 -0
- package/dist/skills/ads-assimilate/references/lint-and-docs.md +87 -0
- package/dist/skills/ads-assimilate/references/native-implementation.md +98 -0
- package/dist/skills/ads-assimilate/references/testing.md +107 -0
- package/dist/skills/ads-break-ui/LICENSE.upstream +21 -0
- package/dist/skills/ads-break-ui/README.md +16 -0
- package/dist/skills/ads-break-ui/SKILL.md +235 -0
- package/dist/skills/ads-break-ui/agents/openai.yaml +4 -0
- package/dist/skills/ads-break-ui/references/catalog.md +135 -0
- package/dist/skills/ads-break-ui/references/verification.md +48 -0
- package/dist/skills/ads-designer/LICENSE.upstream +21 -0
- package/dist/skills/ads-designer/README.md +19 -0
- package/dist/skills/ads-designer/SKILL.md +400 -0
- package/dist/skills/ads-designer/agents/openai.yaml +4 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/ADS.md +203 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/README.md +98 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/biome.css.json +21 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/brand/README.md +28 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/fonts/.gitkeep +0 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/.gitkeep +0 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/composition/.gitkeep +0 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/index.ts +5 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/patterns/.gitkeep +0 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/showcase/mcp/index.html +1 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/showcase/mcp/main.tsx +8 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/styles.css +5 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/Foundation.fixture.ts +47 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/Foundation.scenario.tsx +14 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/base.css +27 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/colors.css +29 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/elevation.css +15 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/spacing.css +15 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/typography.css +13 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/ds.config.json +13 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/gitignore.template +8 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/package-lock.json +4660 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/package.json +41 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/scripts/build-mcp-previews.mjs +33 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/src/vite-env.d.ts +7 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/tsconfig.build.json +12 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/tsconfig.json +20 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/vite.config.ts +21 -0
- package/dist/skills/ads-designer/references/cli.md +111 -0
- package/dist/skills/ads-designer/references/design-craft.md +65 -0
- package/dist/skills/ads-designer/references/mobile.md +73 -0
- package/dist/skills/ads-import/SKILL.md +335 -0
- package/dist/skills/ads-import/agents/openai.yaml +4 -0
- package/dist/skills/ads-import/references/branding.md +44 -0
- package/dist/skills/ads-import/references/cli.md +111 -0
- package/dist/skills/ads-import/references/implementation.md +111 -0
- package/dist/skills/ads-import/references/tokens.md +96 -0
- package/dist/skills/ads-motion/LICENSE.upstream +21 -0
- package/dist/skills/ads-motion/README.md +22 -0
- package/dist/skills/ads-motion/SKILL.md +217 -0
- package/dist/skills/ads-motion/agents/openai.yaml +4 -0
- package/dist/skills/ads-motion/references/audit.md +44 -0
- package/dist/skills/ads-motion/references/build.md +81 -0
- package/dist/skills/ads-motion/references/performance.md +55 -0
- package/dist/skills/ads-motion/references/review.md +35 -0
- package/dist/skills/ads-motion/references/verification.md +39 -0
- package/dist/token-policy.mjs +10 -0
- package/dist/tokens.mjs +142 -0
- package/dist/ui-framework.mjs +59 -0
- package/dist/units.mjs +168 -0
- package/docs/ADS.md +310 -0
- package/docs/ARCHITECTURE.md +311 -0
- package/docs/CHANGELOG.md +106 -0
- package/docs/GUIDE.md +722 -0
- package/docs/MCP.md +690 -0
- package/package.json +107 -4
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "native-design-system",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Private starter workspace for a project's local React design system.",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=22.12.0"
|
|
9
|
+
},
|
|
10
|
+
"sideEffects": [
|
|
11
|
+
"**/*.css"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"dev": "ads showcase",
|
|
15
|
+
"dev:showcase": "ads showcase",
|
|
16
|
+
"lint": "oxlint --deny-warnings src design-system && biome lint --config-path=biome.css.json .",
|
|
17
|
+
"typecheck": "tsc --noEmit",
|
|
18
|
+
"build": "npm run lint && npm run typecheck && npm run build:lib",
|
|
19
|
+
"build:lib": "vite build && tsc --project tsconfig.build.json",
|
|
20
|
+
"build:showcase": "node scripts/build-mcp-previews.mjs",
|
|
21
|
+
"preview": "ads showcase",
|
|
22
|
+
"preview:showcase": "ads showcase",
|
|
23
|
+
"build:mcp-previews": "node scripts/build-mcp-previews.mjs"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@biomejs/biome": "2.5.15",
|
|
27
|
+
"@babel/preset-react": "7.29.7",
|
|
28
|
+
"@babel/preset-typescript": "7.29.7",
|
|
29
|
+
"@linaria/atomic": "8.0.0",
|
|
30
|
+
"@types/node": "25.9.4",
|
|
31
|
+
"@types/react": "19.2.17",
|
|
32
|
+
"@types/react-dom": "19.2.3",
|
|
33
|
+
"@vitejs/plugin-react": "4.7.0",
|
|
34
|
+
"@wyw-in-js/vite": "2.1.3",
|
|
35
|
+
"oxlint": "1.72.0",
|
|
36
|
+
"react": "19.2.7",
|
|
37
|
+
"react-dom": "19.2.7",
|
|
38
|
+
"typescript": "5.9.3",
|
|
39
|
+
"vite": "6.4.3"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
3
|
+
import { execFile } from "node:child_process";
|
|
4
|
+
import { promisify } from "node:util";
|
|
5
|
+
import { build } from "vite";
|
|
6
|
+
import wyw from "@wyw-in-js/vite";
|
|
7
|
+
import react from "@vitejs/plugin-react";
|
|
8
|
+
import { runScenarioCompiler } from "@reqvire-org/ads/scenarios/compiler";
|
|
9
|
+
import { createPreviewResources, previewEntriesPlugin } from "@reqvire-org/ads/scenarios/vite";
|
|
10
|
+
|
|
11
|
+
const root = path.resolve(import.meta.dirname, "..");
|
|
12
|
+
const runScript = promisify(execFile);
|
|
13
|
+
const projectPackage = JSON.parse(readFileSync(path.join(root, "package.json"), "utf8"));
|
|
14
|
+
const manager = projectPackage.packageManager?.split("@")[0] ?? (existsSync(path.join(root, "bun.lock")) || existsSync(path.join(root, "bun.lockb")) ? "bun" : "npm");
|
|
15
|
+
await runScenarioCompiler(root, {
|
|
16
|
+
watched: process.argv.includes("--watch"),
|
|
17
|
+
compilerFiles: [import.meta.filename],
|
|
18
|
+
async validate() {
|
|
19
|
+
try { await runScript(manager, ["run", "lint"], { cwd: root }); }
|
|
20
|
+
catch (error) { throw new Error([error.stdout, error.stderr].map(value => value?.toString() ?? "").join("\n") || error.message); }
|
|
21
|
+
},
|
|
22
|
+
async buildGraph(entries, options, track) {
|
|
23
|
+
const mount = path.join(options.dsRoot, "showcase/mcp/main.tsx");
|
|
24
|
+
const output = await build({ configFile: false, root, base: "./", publicDir: false,
|
|
25
|
+
plugins: [previewEntriesPlugin(entries.map(entry => ({ ...entry, root })), mount), wyw({ include: ["**/*.{ts,tsx}"], exclude: ["**/node_modules/**"] }), react(), track],
|
|
26
|
+
resolve: { alias: { "@ds": path.join(options.dsRoot, options.config.publicEntry) } },
|
|
27
|
+
worker: { format: "iife" },
|
|
28
|
+
build: { write: false, cssCodeSplit: true, assetsInlineLimit: 0, modulePreload: false,
|
|
29
|
+
rollupOptions: { preserveEntrySignatures: "strict", input: Object.fromEntries(entries.map((_entry, index) => [`scenario-${index}`, `ads-preview-entry:${index}`])) } },
|
|
30
|
+
});
|
|
31
|
+
return createPreviewResources(output, options, entries);
|
|
32
|
+
},
|
|
33
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"noEmit": false,
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"emitDeclarationOnly": true,
|
|
7
|
+
"rootDir": "design-system",
|
|
8
|
+
"outDir": "dist"
|
|
9
|
+
},
|
|
10
|
+
"include": ["design-system/**/*.ts", "design-system/**/*.tsx"],
|
|
11
|
+
"exclude": ["design-system/showcase"]
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"isolatedModules": true,
|
|
9
|
+
"moduleDetection": "force",
|
|
10
|
+
"noEmit": true,
|
|
11
|
+
"jsx": "react-jsx",
|
|
12
|
+
"strict": true,
|
|
13
|
+
"noUnusedLocals": true,
|
|
14
|
+
"noUnusedParameters": true,
|
|
15
|
+
"noFallthroughCasesInSwitch": true,
|
|
16
|
+
"baseUrl": ".",
|
|
17
|
+
"paths": { "@ds": ["design-system/index.ts"] }
|
|
18
|
+
},
|
|
19
|
+
"include": ["src", "design-system", "vite.config.ts"]
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { defineConfig } from "vite";
|
|
3
|
+
import react from "@vitejs/plugin-react";
|
|
4
|
+
import wyw from "@wyw-in-js/vite";
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [wyw(), react()],
|
|
8
|
+
resolve: {
|
|
9
|
+
alias: { "@ds": path.resolve(import.meta.dirname, "design-system/index.ts") },
|
|
10
|
+
},
|
|
11
|
+
build: {
|
|
12
|
+
outDir: "dist",
|
|
13
|
+
lib: {
|
|
14
|
+
entry: path.resolve(import.meta.dirname, "design-system/index.ts"),
|
|
15
|
+
formats: ["es"],
|
|
16
|
+
fileName: () => "index.js",
|
|
17
|
+
cssFileName: "styles",
|
|
18
|
+
},
|
|
19
|
+
rollupOptions: { external: [/^react(?:\/.*)?$/, /^react-dom(?:\/.*)?$/] },
|
|
20
|
+
},
|
|
21
|
+
});
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Run ADS tooling through npx
|
|
2
|
+
|
|
3
|
+
Use npx for setup or ad hoc checks alongside this skill's research,
|
|
4
|
+
implementation, documentation, and verification workflow. ADS must be a project
|
|
5
|
+
development dependency, and its checks must run before the project's build.
|
|
6
|
+
Routine builds use the local CLI.
|
|
7
|
+
|
|
8
|
+
Select an actual published package/version or a real local tarball supplied by
|
|
9
|
+
the user or built from the tool checkout. Respect the project's installed
|
|
10
|
+
version. Confirm the selected published version supports the required features; use a
|
|
11
|
+
local tarball for unreleased changes. Never resolve an unrelated package with
|
|
12
|
+
bare `npx ds`. Read the actual version/help and use only supported commands.
|
|
13
|
+
|
|
14
|
+
## Published setup
|
|
15
|
+
|
|
16
|
+
Run **inside the receiving project**, where
|
|
17
|
+
`package.json` lives:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npx @reqvire-org/ads init --framework react
|
|
21
|
+
npm install
|
|
22
|
+
npm run build
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Use `--framework preact` for native Preact. A saved `framework` in
|
|
26
|
+
`ds.config.json` lets later init runs omit the flag; otherwise the choice is
|
|
27
|
+
required, including for an older config. Init preserves existing framework
|
|
28
|
+
tooling and rejects conflicting saved/JSX settings instead of converting it.
|
|
29
|
+
|
|
30
|
+
Use the confirmed package name/version if different. For an existing Bun
|
|
31
|
+
project, the same init command detects `packageManager` or `bun.lock`/`bun.lockb`;
|
|
32
|
+
then use `bun install` and `bun run build`. Node 22.12 or newer remains required.
|
|
33
|
+
Only use `--package-manager bun` when the project has no Bun marker yet or needs
|
|
34
|
+
an explicit override. Preserve its existing package-manager policy and lockfile.
|
|
35
|
+
|
|
36
|
+
`init` accepts no directory argument and requires an existing `package.json`.
|
|
37
|
+
For starting from zero, copy the bundled `ads-designer` application scaffold
|
|
38
|
+
first, then run init inside it. For an existing app, init preserves app files,
|
|
39
|
+
framework configuration, lockfiles, and build scripts. It adds only missing ADS
|
|
40
|
+
foundation files, config, development dependencies, and build checks. Existing
|
|
41
|
+
ADS values are reused; incomplete contracts need an explicit migration.
|
|
42
|
+
|
|
43
|
+
Init adds `lint:ds` and `assets:ds`, and runs checks then brand generation before
|
|
44
|
+
the existing `prebuild` hook without replacing the actual build command or
|
|
45
|
+
unrelated checks. It rejects conflicting custom scripts before writing.
|
|
46
|
+
It does not configure framework aliases, style
|
|
47
|
+
extraction, or application entry points; integrate these using the target's
|
|
48
|
+
framework and ADS contracts. Install dependencies, review the changes, and
|
|
49
|
+
commit the updated lockfile.
|
|
50
|
+
|
|
51
|
+
## Local checkout testing
|
|
52
|
+
|
|
53
|
+
If no published distribution exists, build and pack the tooling checkout with
|
|
54
|
+
`npm run build` and `npm run pack:tool`. Resolve its tarball to an absolute path.
|
|
55
|
+
From inside an existing test project:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
ads_tool_package="/absolute/path/to/reqvire-org-ads-0.3.0.tgz"
|
|
59
|
+
npx --yes --package "$ads_tool_package" ads --help
|
|
60
|
+
npx --yes --package "$ads_tool_package" ads init --framework react --tool-package "$ads_tool_package"
|
|
61
|
+
npm install
|
|
62
|
+
npm run build
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Use Bun's install/build commands for Bun projects. Keep npx options before
|
|
66
|
+
`ds`. `--tool-package` is optional local-testing/version-override support;
|
|
67
|
+
registry users do not need an archive. A `file:` dependency must remain
|
|
68
|
+
available wherever dependencies are installed. A published pinned version is
|
|
69
|
+
portable between machines.
|
|
70
|
+
|
|
71
|
+
## Checks and rules
|
|
72
|
+
|
|
73
|
+
For an initialized project, from its root:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
npx @reqvire-org/ads check
|
|
77
|
+
npx @reqvire-org/ads tokens --json
|
|
78
|
+
npx @reqvire-org/ads assets
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Use the selected real distribution; for a local tarball, invoke
|
|
82
|
+
`npx --yes --package "$ads_tool_package" ads check` instead. Other inspection
|
|
83
|
+
commands accept a directory; init deliberately does not.
|
|
84
|
+
|
|
85
|
+
Every normal build refreshes `.ds/oxlintrc.json`, runs `ads check`, executes
|
|
86
|
+
core/project Oxlint rules, then generates configured standard brand icons in
|
|
87
|
+
`.ds/assets/`. Set `assets.iconSource` to an SVG inside the ADS's `assets/brand/`,
|
|
88
|
+
relative to the ADS folder; no source means generation is a no-op. Integrate that
|
|
89
|
+
directory through the app's existing asset mount. Fixed token names and prefixes
|
|
90
|
+
are required; project values and artwork remain project-owned. Its paths reference the project and local tool;
|
|
91
|
+
builds do not depend on the initializing npx cache. Ignore `.ds/`. Register
|
|
92
|
+
component rules through the project's plugin adapter and `ds.config.json`, then
|
|
93
|
+
run its actual build. Use `lint-config` directly for custom pipeline integration
|
|
94
|
+
or debugging, not as a separate routine setup step.
|
|
95
|
+
|
|
96
|
+
Use ADS 0.3 or later for the shared-resource preview compiler. `mcp` starts stdio
|
|
97
|
+
plus its local website; `showcase` starts the browser-only MCP runtime. Open the existing runtime URL from `ads_status` when
|
|
98
|
+
connected; otherwise use `npm run dev:showcase` or the installed `ads showcase`.
|
|
99
|
+
The tool client discovers entries and renders MCP Apps. Init adds the launch
|
|
100
|
+
script but does not install the project preview compiler. Integrate its graph
|
|
101
|
+
compiler/mount adapter and configure `mcp.previewManifest` plus `mcp.previewWatch`;
|
|
102
|
+
then use the same foundation and Linaria extraction as the application. Source discovery,
|
|
103
|
+
selected component/pattern/style/brand imports, explicit theme-value imports, and
|
|
104
|
+
assimilation are agent workflows. There is no CLI `import` command. Core checks
|
|
105
|
+
do not copy source, import values, or establish behavior/motion parity; continue
|
|
106
|
+
project type checking, meaningful tests, and browser comparisons.
|
|
107
|
+
|
|
108
|
+
If no CLI distribution is available, continue with the target's existing
|
|
109
|
+
checks. `ads-designer` includes an empty scaffold for offline bootstrapping.
|
|
110
|
+
Install skills separately with `npx skills`; the tool does not install skills
|
|
111
|
+
or fetch an external UI catalogue.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Craft UI through the local ADS
|
|
2
|
+
|
|
3
|
+
Read the target component/pattern contract and inspect it in its real context.
|
|
4
|
+
Preserve the project's typography, density, spacing, icon vocabulary, and themes.
|
|
5
|
+
The upstream advice is a craft reference, not authorization to replace brand
|
|
6
|
+
values or add a new UI library.
|
|
7
|
+
|
|
8
|
+
## Shape the interaction
|
|
9
|
+
|
|
10
|
+
Make the primary action and current state legible. Components should expose
|
|
11
|
+
their supported hover, focus, active, selected, disabled, loading, and error
|
|
12
|
+
states through a coherent public API. Show those states in the real showcase;
|
|
13
|
+
don't approximate them with externally styled markup.
|
|
14
|
+
|
|
15
|
+
Keep ordinary button actions on click/release with keyboard equivalents. Early
|
|
16
|
+
press feedback can be visual without committing an action on pointer-down.
|
|
17
|
+
Check press cancellation, repeated activation, focus visibility, and disabled
|
|
18
|
+
states. Loading should communicate progress and settle on both success and
|
|
19
|
+
failure rather than leaving a control or notification indefinitely pending.
|
|
20
|
+
|
|
21
|
+
Dialogs, menus, and popovers need coherent focus, dismissal, portal/placement,
|
|
22
|
+
and scroll behavior. Read the existing primitive before implementing these again
|
|
23
|
+
in a caller. Tooltips should complement accessible labels; essential instructions
|
|
24
|
+
must remain available without hover. Match repeat tooltip behavior to the local
|
|
25
|
+
contract rather than adding a delay to every nearby trigger.
|
|
26
|
+
|
|
27
|
+
Transient feedback can use a local Toast if present. Persistent errors and
|
|
28
|
+
required decisions need the appropriate form, inline, or dialog surface. The
|
|
29
|
+
empty scaffold does not contain those components; add only what the task needs.
|
|
30
|
+
|
|
31
|
+
## Content, layout, and visual detail
|
|
32
|
+
|
|
33
|
+
Use the existing token scale for hierarchy and rhythm. Keep icon/text alignment,
|
|
34
|
+
button labels, truncation, contrast, and focus treatment consistent with the
|
|
35
|
+
owner. Stabilize a loading control's dimensions where content replacement would
|
|
36
|
+
otherwise cause distracting layout changes.
|
|
37
|
+
|
|
38
|
+
Check realistic long names, translated labels, unbroken identifiers, absent
|
|
39
|
+
descriptions, and empty/single/many states when they matter to the component.
|
|
40
|
+
Choose wrapping/truncation based on what users need to read or retrieve. Preserve
|
|
41
|
+
full accessible names when visual labels are shortened.
|
|
42
|
+
|
|
43
|
+
Support the actual container rather than assuming the viewport determines
|
|
44
|
+
available width. Flexible children often need a meaningful minimum-size policy;
|
|
45
|
+
don't hide overflow globally to conceal a broken layout. Use the owning pattern
|
|
46
|
+
for repeated compositions and keep showcase framing separate from component
|
|
47
|
+
appearance.
|
|
48
|
+
|
|
49
|
+
Use restrained motion when it explains a change. Timing and easing belong in
|
|
50
|
+
local tokens, with physical origins tied to the trigger. Check rapid reversal,
|
|
51
|
+
exit cleanup, and reduced motion. Established component-specific durations and
|
|
52
|
+
measured geometry can be deliberate choices; diagnose their effect before
|
|
53
|
+
changing them to a generic default.
|
|
54
|
+
|
|
55
|
+
## Document and verify
|
|
56
|
+
|
|
57
|
+
Keep typed props, examples, state behavior, token hooks, and important tradeoffs
|
|
58
|
+
in the item README. Record concrete upstream influences, authors, revision, and
|
|
59
|
+
applicable notices when importing or assimilating source. Do not describe an
|
|
60
|
+
adapted implementation as independent solely because it uses native primitives.
|
|
61
|
+
|
|
62
|
+
Run the actual project's checks after changes and inspect the real consumer
|
|
63
|
+
showcase. Verify keyboard/focus and supported themes alongside visual states.
|
|
64
|
+
Only introduce component-local lint for a demonstrated, statically provable
|
|
65
|
+
misuse; token and ownership checks remain general tooling concerns.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Mobile web within ADS ownership
|
|
2
|
+
|
|
3
|
+
Use the actual target framework and existing responsive behavior. Mobile polish
|
|
4
|
+
does not imply adopting iOS styling, a new font, fixed colors, or a native app
|
|
5
|
+
runtime. Read the app and item contracts before changing viewport/scroll policy.
|
|
6
|
+
|
|
7
|
+
## Input capabilities
|
|
8
|
+
|
|
9
|
+
Condition decorative hover effects on hover-capable, fine-pointer input when
|
|
10
|
+
that fits the control. Don't infer touch from viewport width alone: laptops can
|
|
11
|
+
have touch input, and phones can use external pointers. Keep keyboard focus
|
|
12
|
+
states available independently of hover.
|
|
13
|
+
|
|
14
|
+
Provide useful press feedback inside the primitive. Preserve click/release
|
|
15
|
+
activation, dragging out to cancel, pointer cancellation, and keyboard behavior.
|
|
16
|
+
Use gesture-specific touch-action only where the interaction requires it; broad
|
|
17
|
+
`touch-action: none` can block ordinary page scrolling. `manipulation` can suit
|
|
18
|
+
simple controls when compatible with the local policy.
|
|
19
|
+
|
|
20
|
+
Use the project's target-size tokens and check the actual hit area, including
|
|
21
|
+
small icon controls. Where a larger hit target is needed, give it a supported
|
|
22
|
+
owner-level treatment rather than inflating unrelated global density tokens.
|
|
23
|
+
Don't require hover for essential content or actions.
|
|
24
|
+
|
|
25
|
+
## Viewport and scrolling
|
|
26
|
+
|
|
27
|
+
The application owns viewport metadata, document/root scrolling, browser theme
|
|
28
|
+
metadata, and installable-app settings. Reusable components/patterns own local
|
|
29
|
+
layout and scroll behavior. Do not change application metadata as a side effect
|
|
30
|
+
of importing a control.
|
|
31
|
+
|
|
32
|
+
Choose `svh`, `dvh`, or existing viewport policy based on whether the surface
|
|
33
|
+
should remain stable or follow changing browser chrome. Check toolbars, drawers,
|
|
34
|
+
dialogs, and fixed notifications with the virtual keyboard and rotated viewport.
|
|
35
|
+
Safe-area treatment belongs to the owner of the screen edge; combine `env()`
|
|
36
|
+
insets with token-backed spacing where necessary, avoiding duplicate padding.
|
|
37
|
+
|
|
38
|
+
Contain scroll chaining only for surfaces that need an independent scrolling
|
|
39
|
+
region. Avoid globally disabling overscroll or hiding page overflow to work
|
|
40
|
+
around a local component problem. Preserve focus visibility and the ability to
|
|
41
|
+
reach the bottom of long content while the keyboard is open.
|
|
42
|
+
|
|
43
|
+
If application theme metadata is requested, derive it from the actual theme
|
|
44
|
+
rather than copying hardcoded light/dark colors from a reference. Keep browser
|
|
45
|
+
chrome and safe-area backgrounds consistent with the app's own surfaces.
|
|
46
|
+
|
|
47
|
+
## Forms and typography
|
|
48
|
+
|
|
49
|
+
Use appropriate input type, autocomplete, inputmode, and labels through the
|
|
50
|
+
existing public API. Those hints complement validation; application code still
|
|
51
|
+
owns domain constraints and error handling.
|
|
52
|
+
|
|
53
|
+
Check focus zoom in the supported mobile browsers. A 16px-or-larger computed
|
|
54
|
+
input font can avoid common iOS focus-zoom behavior; verify it on the relevant
|
|
55
|
+
device/browser and express any needed size through a local token or variant.
|
|
56
|
+
Do not disable user zoom to conceal a typography/layout issue. Preserve the
|
|
57
|
+
project's dense non-input typography unless the task calls for changing it.
|
|
58
|
+
|
|
59
|
+
Test realistic content, line wrapping, focus rings, and disabled/loading states.
|
|
60
|
+
Keep essential feedback visible during asynchronous operations. Read the local
|
|
61
|
+
Toast contract before assuming notification position, lifetime, or swipe rules.
|
|
62
|
+
|
|
63
|
+
## Validate honestly
|
|
64
|
+
|
|
65
|
+
Use narrow-container tests and browser touch emulation for early feedback.
|
|
66
|
+
Emulation does not prove virtual-keyboard, dynamic browser chrome, real-device
|
|
67
|
+
scroll physics, hover stickiness, or assistive-technology behavior. Test those on
|
|
68
|
+
real supported devices when available, and state any remaining limitation.
|
|
69
|
+
|
|
70
|
+
Verify keyboard use as well as touch, zoom/reflow, supported themes, safe areas,
|
|
71
|
+
orientation changes, reduced motion, and local scroll cancellation where
|
|
72
|
+
relevant. Keep mobile fixes in their owning layer and run the project's normal
|
|
73
|
+
lint/typecheck/build checks after implementation changes.
|