@reqvire-org/ads 0.3.44 → 0.3.46
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/README.md +29 -9
- package/dist/a11y.mjs +100 -0
- package/dist/assets.mjs +29 -5
- package/dist/brand-assets.mjs +41 -7
- package/dist/capture/worker.mjs +1 -1
- package/dist/capture-store.mjs +2 -1
- package/dist/capture.mjs +5 -2
- package/dist/check.mjs +2 -1
- package/dist/cli.mjs +33 -9
- package/dist/config.mjs +22 -10
- package/dist/contracts/tokens.json +1 -1
- package/dist/create.mjs +48 -0
- package/dist/design-values.mjs +8 -2
- package/dist/foundation.mjs +3 -0
- package/dist/image-size.mjs +28 -0
- package/dist/index.mjs +1 -0
- package/dist/init.mjs +4 -5
- package/dist/mcp/apps.mjs +1 -1
- package/dist/mcp/preview-widget.bundle.js +19 -13
- package/dist/mcp/project-widget.bundle.js +26 -26
- package/dist/mcp/server.mjs +6 -5
- package/dist/mcp/skills.mjs +1 -1
- package/dist/mcp/widget.bundle.js +15 -15
- package/dist/preview-resources.mjs +2 -2
- package/dist/scenario-groups.mjs +2 -2
- package/dist/scenario-registry.mjs +3 -3
- package/dist/scenarios-compiler.mjs +1 -1
- package/dist/scenarios.mjs +6 -11
- package/dist/showcase/client.bundle.js +27 -27
- package/dist/showcase/draft-navigation.js +1 -1
- package/dist/showcase/index.html +2 -1
- package/dist/skills/ads-break-ui/SKILL.md +1 -1
- package/dist/skills/ads-break-ui/references/captures.md +3 -2
- package/dist/skills/ads-break-ui/references/design-data.md +89 -0
- package/dist/skills/ads-designer/README.md +2 -2
- package/dist/skills/ads-designer/SKILL.md +47 -56
- package/dist/skills/ads-designer/references/accessibility.md +43 -0
- package/dist/skills/ads-designer/references/branding.md +52 -9
- package/dist/skills/ads-designer/references/captures.md +3 -2
- package/dist/skills/ads-designer/references/cli.md +5 -4
- package/dist/skills/ads-designer/references/design-data.md +89 -0
- package/dist/skills/ads-import/SKILL.md +1 -1
- package/dist/skills/ads-import/references/branding.md +4 -3
- package/dist/skills/ads-import/references/captures.md +3 -2
- package/dist/skills/ads-import/references/cli.md +5 -4
- package/dist/skills/ads-import/references/design-data.md +89 -0
- package/dist/skills/ads-motion/SKILL.md +1 -1
- package/dist/skills/ads-motion/references/build.md +33 -0
- package/dist/skills/ads-motion/references/captures.md +3 -2
- package/dist/skills/ads-motion/references/design-data.md +89 -0
- package/dist/skills/ads-motion/references/motion-review.md +2 -2
- package/dist/skills/ads-port/SKILL.md +1 -1
- package/dist/skills/ads-port/references/captures.md +3 -2
- package/dist/skills/ads-port/references/cli.md +5 -4
- package/dist/skills/ads-port/references/design-data.md +89 -0
- package/dist/starters/preact/design-system/components/Layout/Grid/Grid.tsx +76 -0
- package/dist/{skills/ads-designer/assets/bootstrap-ds-preact → starters/preact}/design-system/review/token-preview/TokenPreview.tsx +10 -1
- package/dist/starters/preact/ds.config.json +32 -0
- package/dist/{bootstrap-ds → starters/react}/README.md +65 -24
- package/dist/{skills/ads-designer/assets/bootstrap-ds → starters/react}/design-system/assets/brand/README.md +1 -1
- package/dist/starters/react/design-system/assets/glyphs/README.md +12 -0
- package/dist/starters/react/design-system/assets/glyphs/aliases.json +1 -0
- package/dist/starters/react/design-system/assets/glyphs/check.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/chevron-down.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/chevron-right.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/close.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/external-link.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/info.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/menu.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/plus.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/search.svg +1 -0
- package/dist/starters/react/design-system/assets/glyphs/warning.svg +1 -0
- package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.fixture.ts +7 -0
- package/dist/{bootstrap-ds/design-system/tokens/Brand.ads.scenario.tsx → starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.scenario.tsx} +2 -2
- package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.fixture.ts +7 -0
- package/dist/{skills/ads-designer/assets/bootstrap-ds/design-system/tokens/Brand.ads.scenario.tsx → starters/react/design-system/brand/Identity/Logo/Logo.ads.scenario.tsx} +2 -2
- package/dist/{skills/ads-designer/assets/bootstrap-ds → starters/react}/design-system/components/Actions/Button/Button.tsx +11 -4
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.fixture.ts +9 -0
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.scenario.tsx +16 -0
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +44 -0
- package/dist/starters/react/design-system/components/Actions/IconButton/README.md +14 -0
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.fixture.ts +1 -0
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.scenario.tsx +15 -0
- package/dist/starters/react/design-system/components/Content/Icon/Icon.tsx +42 -0
- package/dist/starters/react/design-system/components/Content/Icon/README.md +16 -0
- package/dist/starters/react/design-system/components/Content/Icon/glyphs.ts +17 -0
- package/dist/{bootstrap-ds → starters/react}/design-system/components/Forms/TextField/TextField.tsx +9 -5
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.fixture.ts +12 -0
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.scenario.tsx +17 -0
- package/dist/starters/react/design-system/components/Layout/Grid/Grid.tsx +75 -0
- package/dist/starters/react/design-system/components/Layout/Grid/README.md +21 -0
- package/dist/{bootstrap-ds → starters/react}/design-system/index.ts +3 -0
- package/dist/starters/react/design-system/review/grid-cell/GridCell.tsx +18 -0
- package/dist/{bootstrap-ds → starters/react}/design-system/review/index.ts +1 -0
- package/dist/{skills/ads-designer/assets/bootstrap-ds → starters/react}/design-system/review/token-preview/TokenPreview.tsx +10 -1
- package/dist/starters/react/design-system/tokens/Color.ads.fixture.ts +124 -0
- package/dist/starters/react/design-system/tokens/Layout.ads.fixture.ts +23 -0
- package/dist/{bootstrap-ds/design-system/tokens/SpaceTypeMotion.ads.scenario.tsx → starters/react/design-system/tokens/Layout.ads.scenario.tsx} +1 -1
- package/dist/starters/react/design-system/tokens/Motion.ads.fixture.ts +18 -0
- package/dist/{skills/ads-designer/assets/bootstrap-ds/design-system/tokens/SpaceTypeMotion.ads.scenario.tsx → starters/react/design-system/tokens/Motion.ads.scenario.tsx} +1 -1
- package/dist/starters/react/design-system/tokens/Shape.ads.fixture.ts +30 -0
- package/dist/{skills/ads-designer/assets/bootstrap-ds/design-system/tokens/Color.ads.scenario.tsx → starters/react/design-system/tokens/Shape.ads.scenario.tsx} +1 -1
- package/dist/starters/react/design-system/tokens/Space.ads.fixture.ts +37 -0
- package/dist/starters/react/design-system/tokens/Space.ads.scenario.tsx +4 -0
- package/dist/starters/react/design-system/tokens/Type.ads.fixture.ts +29 -0
- package/dist/starters/react/design-system/tokens/Type.ads.scenario.tsx +4 -0
- package/dist/{bootstrap-ds → starters/react}/design-system/tokens/base.css +6 -3
- package/dist/starters/react/design-system/tokens/colors.css +223 -0
- package/dist/starters/react/design-system/tokens/elevation.css +60 -0
- package/dist/starters/react/design-system/tokens/spacing.css +79 -0
- package/dist/starters/react/design-system/tokens/typography.css +31 -0
- package/dist/starters/react/ds.config.json +32 -0
- package/dist/{skills/ads-designer/assets/bootstrap-ds → starters/react}/tsconfig.build.json +2 -1
- package/dist/task-cache.mjs +1 -1
- package/dist/themes.mjs +106 -0
- package/dist/token-export.mjs +58 -0
- package/dist/token-fixtures.mjs +1 -1
- package/dist/token-quality.mjs +109 -0
- package/dist/tokens.mjs +9 -2
- package/dist/units.mjs +6 -6
- package/dist/validation.mjs +1 -1
- package/docs/ADS.md +38 -9
- package/docs/ARCHITECTURE.md +50 -5
- package/docs/CHANGELOG.md +88 -12
- package/docs/GUIDE.md +56 -25
- package/docs/MCP.md +13 -4
- package/package.json +3 -5
- package/dist/bootstrap-ds/design-system/assets/brand/README.md +0 -36
- package/dist/bootstrap-ds/design-system/components/Actions/Button/Button.tsx +0 -49
- package/dist/bootstrap-ds/design-system/review/token-preview/TokenPreview.tsx +0 -119
- package/dist/bootstrap-ds/design-system/tokens/Brand.ads.fixture.ts +0 -12
- package/dist/bootstrap-ds/design-system/tokens/Color.ads.fixture.ts +0 -18
- package/dist/bootstrap-ds/design-system/tokens/SpaceTypeMotion.ads.fixture.ts +0 -36
- package/dist/bootstrap-ds/design-system/tokens/colors.css +0 -29
- package/dist/bootstrap-ds/design-system/tokens/elevation.css +0 -15
- package/dist/bootstrap-ds/design-system/tokens/spacing.css +0 -15
- package/dist/bootstrap-ds/design-system/tokens/typography.css +0 -13
- package/dist/bootstrap-ds/ds.config.json +0 -20
- package/dist/bootstrap-ds/tsconfig.build.json +0 -19
- package/dist/bootstrap-ds-preact/design-system/review/token-preview/TokenPreview.tsx +0 -119
- package/dist/bootstrap-ds-preact/ds.config.json +0 -20
- package/dist/skills/ads-designer/assets/bootstrap-ds/ADS.md +0 -258
- package/dist/skills/ads-designer/assets/bootstrap-ds/README.md +0 -122
- package/dist/skills/ads-designer/assets/bootstrap-ds/biome.css.json +0 -21
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/brand/app-icon.svg +0 -4
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/brand/logo.dark.svg +0 -6
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/brand/logo.svg +0 -6
- 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/Actions/Button/Button.ads.fixture.ts +0 -1
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/Actions/Button/Button.ads.scenario.tsx +0 -13
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/Actions/Button/README.md +0 -12
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/Content/Logo/Logo.ads.fixture.ts +0 -1
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/Content/Logo/Logo.ads.scenario.tsx +0 -12
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/Content/Logo/Logo.tsx +0 -41
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/Content/Logo/README.md +0 -10
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/Forms/TextField/README.md +0 -14
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/Forms/TextField/TextField.ads.fixture.ts +0 -6
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +0 -13
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/Forms/TextField/TextField.tsx +0 -57
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/composition/Search/SearchPage/README.md +0 -4
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/composition/Search/SearchPage/SearchPage.ads.fixture.ts +0 -7
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/composition/Search/SearchPage/SearchPage.ads.scenario.tsx +0 -16
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/controllers/.gitkeep +0 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/index.ts +0 -8
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/patterns/Search/SearchBar/README.md +0 -12
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/patterns/Search/SearchBar/SearchBar.ads.fixture.ts +0 -1
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/patterns/Search/SearchBar/SearchBar.ads.scenario.tsx +0 -11
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/patterns/Search/SearchBar/SearchBar.tsx +0 -41
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/review/brand-preview/BrandPreview.tsx +0 -115
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/review/demo-frame/DemoFrame.tsx +0 -29
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/review/index.ts +0 -4
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/showcase/mcp/index.html +0 -1
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/showcase/mcp/main.tsx +0 -8
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/styles.css +0 -5
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/Brand.ads.fixture.ts +0 -12
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/Color.ads.fixture.ts +0 -18
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/SpaceTypeMotion.ads.fixture.ts +0 -36
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/base.css +0 -30
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/colors.css +0 -29
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/elevation.css +0 -15
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/spacing.css +0 -15
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/typography.css +0 -13
- package/dist/skills/ads-designer/assets/bootstrap-ds/ds.config.json +0 -20
- package/dist/skills/ads-designer/assets/bootstrap-ds/gitignore.template +0 -8
- package/dist/skills/ads-designer/assets/bootstrap-ds/package-lock.json +0 -4660
- package/dist/skills/ads-designer/assets/bootstrap-ds/package.json +0 -42
- package/dist/skills/ads-designer/assets/bootstrap-ds/scripts/build-mcp-previews.mjs +0 -3
- package/dist/skills/ads-designer/assets/bootstrap-ds/src/vite-env.d.ts +0 -7
- package/dist/skills/ads-designer/assets/bootstrap-ds/tsconfig.json +0 -35
- package/dist/skills/ads-designer/assets/bootstrap-ds/vite.config.ts +0 -23
- package/dist/skills/ads-designer/assets/bootstrap-ds-preact/design-system/review/demo-frame/DemoFrame.tsx +0 -29
- package/dist/skills/ads-designer/assets/bootstrap-ds-preact/design-system/review/screen-frame/ScreenFrame.tsx +0 -34
- package/dist/skills/ads-designer/assets/bootstrap-ds-preact/design-system/showcase/mcp/main.tsx +0 -6
- package/dist/skills/ads-designer/assets/bootstrap-ds-preact/ds.config.json +0 -20
- package/dist/skills/ads-designer/assets/bootstrap-ds-preact/package.json +0 -38
- package/dist/skills/ads-designer/assets/bootstrap-ds-preact/src/vite-env.d.ts +0 -7
- package/dist/skills/ads-designer/assets/bootstrap-ds-preact/tsconfig.json +0 -36
- package/dist/skills/ads-designer/assets/bootstrap-ds-preact/vite.config.ts +0 -23
- /package/dist/{bootstrap-ds-preact → starters/preact}/design-system/review/demo-frame/DemoFrame.tsx +0 -0
- /package/dist/{bootstrap-ds-preact → starters/preact}/design-system/review/screen-frame/ScreenFrame.tsx +0 -0
- /package/dist/{bootstrap-ds-preact → starters/preact}/design-system/showcase/mcp/main.tsx +0 -0
- /package/dist/{bootstrap-ds-preact → starters/preact}/package.json +0 -0
- /package/dist/{bootstrap-ds-preact → starters/preact}/src/vite-env.d.ts +0 -0
- /package/dist/{bootstrap-ds-preact → starters/preact}/tsconfig.json +0 -0
- /package/dist/{bootstrap-ds-preact → starters/preact}/vite.config.ts +0 -0
- /package/dist/{bootstrap-ds → starters/react}/ADS.md +0 -0
- /package/dist/{bootstrap-ds → starters/react}/biome.css.json +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/assets/brand/app-icon.svg +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/assets/brand/logo.dark.svg +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/assets/brand/logo.svg +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/assets/fonts/.gitkeep +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/components/Actions/Button/Button.ads.fixture.ts +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/components/Actions/Button/Button.ads.scenario.tsx +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/components/Actions/Button/README.md +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/components/Content/Logo/Logo.ads.fixture.ts +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/components/Content/Logo/Logo.ads.scenario.tsx +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/components/Content/Logo/Logo.tsx +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/components/Content/Logo/README.md +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/components/Forms/TextField/README.md +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/components/Forms/TextField/TextField.ads.fixture.ts +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/composition/Search/SearchPage/README.md +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/composition/Search/SearchPage/SearchPage.ads.fixture.ts +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/composition/Search/SearchPage/SearchPage.ads.scenario.tsx +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/controllers/.gitkeep +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/patterns/Search/SearchBar/README.md +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/patterns/Search/SearchBar/SearchBar.ads.fixture.ts +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/patterns/Search/SearchBar/SearchBar.ads.scenario.tsx +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/patterns/Search/SearchBar/SearchBar.tsx +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/review/brand-preview/BrandPreview.tsx +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/review/demo-frame/DemoFrame.tsx +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/review/screen-frame/ScreenFrame.tsx +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/showcase/mcp/index.html +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/showcase/mcp/main.tsx +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/styles.css +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/tokens/Color.ads.scenario.tsx +0 -0
- /package/dist/{bootstrap-ds → starters/react}/gitignore.template +0 -0
- /package/dist/{bootstrap-ds → starters/react}/package-lock.json +0 -0
- /package/dist/{bootstrap-ds → starters/react}/package.json +0 -0
- /package/dist/{bootstrap-ds → starters/react}/scripts/build-mcp-previews.mjs +0 -0
- /package/dist/{bootstrap-ds → starters/react}/src/vite-env.d.ts +0 -0
- /package/dist/{bootstrap-ds → starters/react}/tsconfig.json +0 -0
- /package/dist/{bootstrap-ds → starters/react}/vite.config.ts +0 -0
|
@@ -31,7 +31,7 @@ export function withDraftEntries(scenarios, categories, drafts, previews = new M
|
|
|
31
31
|
for (const draft of drafts) {
|
|
32
32
|
for (const unit of draft.units) {
|
|
33
33
|
const kind = unit.split("/")[0];
|
|
34
|
-
if (!["tokens", "components", "patterns", "composition"].includes(kind)) continue;
|
|
34
|
+
if (!["brand", "tokens", "components", "patterns", "composition"].includes(kind)) continue;
|
|
35
35
|
const owned = [...entries.values()].filter(item => owns(unit, item));
|
|
36
36
|
if (owned.length) for (const item of owned) attach(item, draft);
|
|
37
37
|
else entries.set(unit, { id: unit, unit, title: unit.split("/").at(-1), kind, draftOnly: true, pendingDraftScenario: true, drafts: [references.get(draft.id)] });
|
package/dist/showcase/index.html
CHANGED
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
<header id="header">
|
|
6
6
|
<div id="brand"><span class="mark">ADS</span><span id="title">Design System</span><button id="pane-toggle" aria-label="Hide navigation pane" aria-expanded="true" aria-controls="sidebar" title="Hide navigation pane"><svg viewBox="0 0 16 16"><path d="M10 4l-4 4 4 4"/></svg></button></div>
|
|
7
7
|
<nav id="sections" aria-label="Showcase sections">
|
|
8
|
+
<button data-section="brand" hidden><svg viewBox="0 0 16 16"><path d="M8 1.5 9.9 5.6l4.4.5-3.3 3 .9 4.4L8 11.3l-3.9 2.2.9-4.4-3.3-3 4.4-.5L8 1.5Z"/></svg>Brand</button>
|
|
8
9
|
<button data-section="tokens" aria-current="page"><svg viewBox="0 0 16 16"><path d="m8 2 6 3-6 3-6-3 6-3Zm-6 6 6 3 6-3M2 11l6 3 6-3"/></svg>Tokens</button>
|
|
9
10
|
<button data-section="components"><svg viewBox="0 0 16 16"><path d="m8 1 6 3.5v7L8 15l-6-3.5v-7L8 1Zm-6 3.5 6 3.5 6-3.5M8 8v7"/></svg>Components</button>
|
|
10
11
|
<button data-section="patterns"><svg viewBox="0 0 16 16"><rect x="2" y="2" width="5" height="5"/><rect x="10" y="2" width="4" height="5"/><rect x="2" y="10" width="5" height="4"/><rect x="10" y="10" width="4" height="4"/></svg>Patterns</button>
|
|
11
12
|
<button data-section="composition"><svg viewBox="0 0 16 16"><path d="M2 2h4v4H2zM10 2h4v4h-4zM2 10h4v4H2zM10 10h4v4h-4z"/></svg>Composition</button>
|
|
12
13
|
</nav>
|
|
13
|
-
<div class="actions"><button id="preview-status" data-phase="opening" aria-label="Preview status: Connecting to ADS MCP…" title="Connecting to ADS MCP…" popovertarget="status-details"><span class="status-dot" aria-hidden="true"></span></button><div id="status-details" popover><p id="status" role="status">Connecting to ADS MCP…</p><p id="warmup-status" hidden></p></div><button id="viewport" aria-label="Phone viewport" aria-pressed="false" aria-controls="frame-slot" title="Preview at phone width (390 px)"><svg viewBox="0 0 16 16" aria-hidden="true"><rect x="4" y="1" width="8" height="14" rx="1.5"/><path d="M7 12.5h2"/></svg></button><button id="theme" aria-label="Use dark theme" title="Use dark theme"><svg viewBox="0 0 16 16"><path d="M13.5 9a5.5 5.5 0 0 1-6.5-6.5A5.5 5.5 0 1 0 13.5 9Z"/></svg></button><button id="minimize" aria-label="Minimize showcase menu" title="Minimize showcase menu (refresh to restore)"><svg viewBox="0 0 16 16"><path d="m4 10 4-4 4 4"/></svg></button></div>
|
|
14
|
+
<div class="actions"><button id="preview-status" data-phase="opening" aria-label="Preview status: Connecting to ADS MCP…" title="Connecting to ADS MCP…" popovertarget="status-details"><span class="status-dot" aria-hidden="true"></span></button><div id="status-details" popover><p id="status" role="status">Connecting to ADS MCP…</p><p id="warmup-status" hidden></p></div><button id="viewport" aria-label="Phone viewport" aria-pressed="false" aria-controls="frame-slot" title="Preview at phone width (390 px)"><svg viewBox="0 0 16 16" aria-hidden="true"><rect x="4" y="1" width="8" height="14" rx="1.5"/><path d="M7 12.5h2"/></svg></button><button id="grid-overlay" aria-label="Show grid overlay" title="Show grid overlay" aria-pressed="false"><svg viewBox="0 0 16 16"><path d="M3 2v12M6.5 2v12M9.5 2v12M13 2v12"/></svg></button><button id="theme" aria-label="Use dark theme" title="Use dark theme"><svg viewBox="0 0 16 16"><path d="M13.5 9a5.5 5.5 0 0 1-6.5-6.5A5.5 5.5 0 1 0 13.5 9Z"/></svg></button><button id="minimize" aria-label="Minimize showcase menu" title="Minimize showcase menu (refresh to restore)"><svg viewBox="0 0 16 16"><path d="m4 10 4-4 4 4"/></svg></button></div>
|
|
14
15
|
</header>
|
|
15
16
|
<main>
|
|
16
17
|
<aside id="sidebar"><nav id="entries" aria-label="Tokens"></nav></aside>
|
|
@@ -157,7 +157,7 @@ production and scenario builds; never alias React to Preact just to shrink a
|
|
|
157
157
|
preview. Native Preact uses its own JSX transform, hooks and DOM events (live
|
|
158
158
|
text updates use `onInput`). Native SVG uses DOM names such as `stroke-width`,
|
|
159
159
|
not React presentation aliases. Keep Linaria extraction and the same public APIs.
|
|
160
|
-
|
|
160
|
+
`ads create` makes React or Preact projects; the tool repository's working
|
|
161
161
|
example uses Preact. Neither is a component dependency of the receiving project.
|
|
162
162
|
|
|
163
163
|
## Choose the work
|
|
@@ -23,8 +23,9 @@ ads_capture({
|
|
|
23
23
|
})
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
The ID above is illustrative; use one returned by discovery.
|
|
27
|
-
|
|
26
|
+
The ID above is illustrative; use one returned by discovery. `theme` names one of the
|
|
27
|
+
project's declared themes (`ads_status.themes`); the default is the first declared theme at
|
|
28
|
+
1280 × 800 CSS pixels. Capture uses the real sandboxed MCP App with the
|
|
28
29
|
requested viewport and excludes showcase navigation. The default image records
|
|
29
30
|
the complete widget viewport, including its current scroll/state; it does not
|
|
30
31
|
automatically stitch every scroll position into one image.
|
|
@@ -89,3 +89,92 @@ sample coverage in the shared directory. Preserve themes, units, public APIs and
|
|
|
89
89
|
behavior unless changing the visual policy was explicitly intended. Review a Git
|
|
90
90
|
diff and run core, project and browser checks. There is no compatibility mode that
|
|
91
91
|
keeps independent component token definitions valid.
|
|
92
|
+
|
|
93
|
+
## Accessibility and rhythm reviews
|
|
94
|
+
|
|
95
|
+
`ads check` reviews token values, in every theme (each `:root[data-theme=…]` scope,
|
|
96
|
+
resolving `var()` aliases there):
|
|
97
|
+
|
|
98
|
+
- `token-contrast` warns when the roles that meet on screen fall below WCAG 2.2 AA:
|
|
99
|
+
`--text-strong`, `--text-body`, `--text-muted`, `--text-link` and `--accent-text` on
|
|
100
|
+
`--bg-canvas`, `--bg-surface` and `--bg-hover`; `--accent-fg` on `--accent` and
|
|
101
|
+
`--accent-hover`; each status's `-fg` on its solid and `-text` on its `-bg` (4.5:1);
|
|
102
|
+
`--border-focus` and `--border-strong` on the canvas and surface (3:1). Pairs whose
|
|
103
|
+
tokens a project does not define are not reviewed; colors outside hex, rgb() and hsl()
|
|
104
|
+
are skipped.
|
|
105
|
+
- `token-rhythm` warns when a numbered spacing step leaves the scale `--space-N` = N × 2 px.
|
|
106
|
+
- `token-overlap-review` compares values only within a token family (`--radius-*` with
|
|
107
|
+
`--radius-*`): a radius equal to a spacing step is two scales meeting, not a duplicate.
|
|
108
|
+
|
|
109
|
+
Fix a contrast warning by choosing a different ramp step for the role, in the theme the
|
|
110
|
+
message names, rather than adding a one-off color.
|
|
111
|
+
|
|
112
|
+
## Exchange format
|
|
113
|
+
|
|
114
|
+
`ads tokens --format dtcg` prints the tokens as W3C Design Tokens (Community Group draft)
|
|
115
|
+
JSON: groups by family, typed `$value`s, `{group.token}` references for `var()` aliases.
|
|
116
|
+
Values the format cannot express (fluid `clamp()` sizes, layered shadows) keep their CSS in
|
|
117
|
+
`$extensions["org.reqvire.ads"].css`; other themes' values are in
|
|
118
|
+
`$extensions["org.reqvire.ads"].scopes`.
|
|
119
|
+
|
|
120
|
+
## Grid
|
|
121
|
+
|
|
122
|
+
The `--grid-*` tokens describe a column grid: `--grid-columns-sm/md/lg` (the starter's 4, 8
|
|
123
|
+
and 16), `--grid-gutter`, `--grid-gutter-narrow`, `--grid-gutter-condensed` and
|
|
124
|
+
`--grid-margin-sm/md/lg`, aliasing spacing steps. The starter's `Grid` switches columns by
|
|
125
|
+
container width (768 and 1024 px) with container queries, since CSS variables cannot be
|
|
126
|
+
breakpoints. The showcase's grid overlay draws these tokens over every preview at the same
|
|
127
|
+
widths; a project without them shows no overlay. Align text to a cell's edge, not its gutter.
|
|
128
|
+
|
|
129
|
+
## Color roles and states
|
|
130
|
+
|
|
131
|
+
Name roles by element and purpose, the same in every theme; only their values change. Point roles at ramp steps rather than raw colors, so a theme is a ramp swap:
|
|
132
|
+
|
|
133
|
+
- Layers: `--bg-canvas` → `--bg-surface` → `--bg-raised` (menus, popovers), with `--bg-field`
|
|
134
|
+
for inputs. In dark themes each layer up is one step lighter; in light themes surfaces stay
|
|
135
|
+
near white.
|
|
136
|
+
- States move along the ramp: hover one step, pressed or active two, selected a subtle accent
|
|
137
|
+
step (`--bg-selected`). Solid fills hover one step darker (`--accent-hover`).
|
|
138
|
+
- Disabled is always neutral (`--bg-disabled`, `--text-disabled`, `--border-disabled`) with no
|
|
139
|
+
hover or focus response; WCAG exempts it from contrast, so `token-contrast` skips it.
|
|
140
|
+
- `--bg-overlay` is the translucent scrim behind modals; `--bg-skeleton` fills loading
|
|
141
|
+
placeholders.
|
|
142
|
+
- Never signal state or status by color alone: pair it with text, an icon or a shape.
|
|
143
|
+
|
|
144
|
+
## Themes
|
|
145
|
+
|
|
146
|
+
Declare themes in `ds.config.json` (`themes: [{ name, scheme }]`, the first is the default).
|
|
147
|
+
A theme changes values, never names: give the default theme's values on `:root`, override
|
|
148
|
+
them under `[data-theme="<name>"]`, and keep roles aliasing ramp steps on
|
|
149
|
+
`:root, [data-theme]` so they re-resolve wherever a theme applies. Override a whole ramp in a
|
|
150
|
+
theme, not a few steps.
|
|
151
|
+
|
|
152
|
+
- `data-theme` on `<html>` themes the page; on any element it themes one section (a dark
|
|
153
|
+
hero in a light page). A themed section paints its own canvas and text (`base.css`).
|
|
154
|
+
- `scheme` sets `color-scheme`, so native controls and scrollbars match the theme.
|
|
155
|
+
- Add a theme for a real need: high contrast, a dimmed reading mode, a brand. Check it in the
|
|
156
|
+
showcase (the theme button steps through declared themes) and capture it by name.
|
|
157
|
+
- Runtime switching (user choice, `prefers-color-scheme`, remembering it) is application code.
|
|
158
|
+
|
|
159
|
+
## Spacing
|
|
160
|
+
|
|
161
|
+
`--space-N` is N × 2 px, from 2 to 160 px; the same values hold at every screen size, and a
|
|
162
|
+
layout steps down one or two sizes at narrow widths instead of scaling. Use the scale for
|
|
163
|
+
padding inside components and for gaps between them; a value off the scale needs a reason.
|
|
164
|
+
|
|
165
|
+
- Distance says how related things are: closer means more related. Group with space before
|
|
166
|
+
reaching for dividers, borders or cards.
|
|
167
|
+
- More space around an element gives it more importance. Sections can be dense, but leave the
|
|
168
|
+
page as a whole room to breathe.
|
|
169
|
+
- Parents own the space between their children (`gap`, stack tokens); a component carries no
|
|
170
|
+
outer margin, so it fits wherever it is placed.
|
|
171
|
+
- Horizontal layout follows the column grid; percentages are fine for splitting a region and
|
|
172
|
+
for minimum and maximum widths.
|
|
173
|
+
|
|
174
|
+
## Motion tokens
|
|
175
|
+
|
|
176
|
+
Six durations (`--dur-instant` 70 ms, `--dur-fast` 110, `--dur-moderate` 150, `--dur-normal`
|
|
177
|
+
240, `--dur-slow` 400, `--dur-slower` 700) and three curve pairs (standard, enter and exit, each everyday and
|
|
178
|
+
`-strong`). Every duration is 0 under `prefers-reduced-motion`. Pick by purpose, not by
|
|
179
|
+
number: the ads-motion skill's build guide maps each token to its use and gives the easing
|
|
180
|
+
rules.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Credits
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The local ADS workflow belongs to this repository.
|
|
4
4
|
Selected craft/mobile guidance adapts [Emil Kowalski's skills](https://github.com/emilkowalski/skills)
|
|
5
5
|
at revision `2d228630ba1446365f614a108cb8252f1feda202`:
|
|
6
6
|
|
|
@@ -22,4 +22,4 @@ boundaries, and design brief.
|
|
|
22
22
|
[LICENSE.upstream](LICENSE.upstream) retains the complete MIT license and
|
|
23
23
|
Copyright (c) 2026 Emil Kowalski for copied/adapted upstream guidance. Retain it
|
|
24
24
|
on redistribution of that material. It does not declare a license for unrelated
|
|
25
|
-
project source or the
|
|
25
|
+
project source or the starters that `ads create` copies.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ads-designer
|
|
3
|
-
description:
|
|
3
|
+
description: Create a new local React or Preact design system with `ads create`, or build UI using a project's existing design system. Covers shared token contracts, local ownership, public APIs, external source integration, showcase inspection, and validation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Choose the editing workflow
|
|
@@ -36,13 +36,13 @@ and memory limits in project configuration; verify real workloads under them.
|
|
|
36
36
|
Inspect the target before editing. Read its `README.md`, `docs/ARCHITECTURE.md`
|
|
37
37
|
and `docs/ADS.md` when present (or existing project guides), public exports, and relevant
|
|
38
38
|
component guides. Preserve its
|
|
39
|
-
framework and contracts. Starting from zero
|
|
40
|
-
|
|
39
|
+
framework and contracts. Starting from zero uses `ads create`, which copies the
|
|
40
|
+
starter shipped in the ADS package; no example repository is needed.
|
|
41
41
|
|
|
42
42
|
Linaria is required for ADS component and pattern styling. Preserve the target's
|
|
43
43
|
UI framework and integrate compatible Linaria extraction with both application
|
|
44
|
-
and preview builds.
|
|
45
|
-
`ads init` does not install or configure Linaria.
|
|
44
|
+
and preview builds. Projects from `ads create` (React or Preact) already configure it;
|
|
45
|
+
`ads init` does not install or configure Linaria. Create new projects with the
|
|
46
46
|
project's framework. Current core
|
|
47
47
|
guards inspect JS/TS/JSX, CSS, and imported Linaria templates, not Vue/Svelte
|
|
48
48
|
single-file components or general HTML component templates. Entry HTML mount
|
|
@@ -54,8 +54,7 @@ production and scenario builds; never alias React to Preact just to shrink a
|
|
|
54
54
|
preview. Native Preact uses its own JSX transform, hooks and DOM events (live
|
|
55
55
|
text updates use `onInput`). Native SVG uses DOM names such as `stroke-width`,
|
|
56
56
|
not React presentation aliases. Keep Linaria extraction and the same public APIs.
|
|
57
|
-
|
|
58
|
-
with `bootstrap-ds-preact/` copied over them); the tool repository's working
|
|
57
|
+
`ads create` makes a React or Preact project; the tool repository's working
|
|
59
58
|
example uses Preact. Neither is a component dependency of the receiving project.
|
|
60
59
|
|
|
61
60
|
When initializing a project without a saved framework, pass `--framework react`
|
|
@@ -185,58 +184,41 @@ artifact or unreported freshness does not establish current source. Fix reported
|
|
|
185
184
|
diagnostics in the owning source; notifications may not reach the agent.
|
|
186
185
|
When this skill is served over MCP, resolve relative references/assets from its
|
|
187
186
|
`SKILL.md` URI and fetch supporting files lazily. The host controls native skill
|
|
188
|
-
activation; ordinary resource reads do not establish it.
|
|
189
|
-
|
|
190
|
-
truncated model-visible text or binary snippets.
|
|
187
|
+
activation; ordinary resource reads do not establish it. Never rebuild a project
|
|
188
|
+
from skill text: new projects come from `ads create`.
|
|
191
189
|
|
|
192
190
|
## Start from zero
|
|
193
191
|
|
|
194
|
-
Create
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
dependency and connects ADS checks to the existing build. If no tool distribution
|
|
199
|
-
is available, the bundled files below still support bootstrapping and general
|
|
200
|
-
checks; do not fetch the unpublished package.
|
|
201
|
-
|
|
202
|
-
Read [assets/bootstrap-ds/README.md](assets/bootstrap-ds/README.md) and its
|
|
203
|
-
[contract](assets/bootstrap-ds/ADS.md). The scaffold contains semantic token
|
|
204
|
-
defaults, React or Preact TypeScript/Linaria configuration, general lint, a public
|
|
205
|
-
barrel, project-owned review renderers (token tiles, demo and screen frames), and a project preview compiler adapter. The browser shell is supplied by ADS tooling.
|
|
206
|
-
It has one example of each layer to build on: two token groups (Color; Space, type &
|
|
207
|
-
motion), two components in two groups (`components/Actions/Button`,
|
|
208
|
-
`components/Forms/TextField`), one pattern (`patterns/Search/SearchBar`) and one
|
|
209
|
-
composition (`composition/Search/SearchPage`). Treat them as the project's own: adapt or replace them
|
|
210
|
-
for the requested product. It has no vendored fonts or icons.
|
|
211
|
-
|
|
212
|
-
Resolve assets relative to this skill's `SKILL.md`, including after installation
|
|
213
|
-
by `npx skills`. In the tool checkout, root `bootstrap-ds/` is canonical.
|
|
214
|
-
For a new empty project, copy its **contents**, including dotfiles. For
|
|
215
|
-
Preact, copy `bootstrap-ds-preact/` over them and drop the React lockfile; never
|
|
216
|
-
port the React files by hand:
|
|
192
|
+
Create a new design-system project with the ADS CLI. It copies the starter that
|
|
193
|
+
ships in the same ADS package version, so the project always matches the tool that
|
|
194
|
+
checks it, then runs init (scripts, the tool as a development dependency, checks in
|
|
195
|
+
the build):
|
|
217
196
|
|
|
218
197
|
```sh
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
if [ "$framework" = preact ]; then
|
|
225
|
-
cp -a "$assets_dir/bootstrap-ds-preact/." "$target_dir/"
|
|
226
|
-
rm "$target_dir/package-lock.json"
|
|
227
|
-
fi
|
|
228
|
-
cd "$target_dir"
|
|
229
|
-
# Run ads init --framework "$framework" here when an actual tool distribution is available.
|
|
230
|
-
npm install
|
|
231
|
-
npm run build
|
|
198
|
+
npx @reqvire-org/ads@<version> create <folder> --framework react # or preact
|
|
199
|
+
# Bun: bunx @reqvire-org/ads@<version> create <folder> --framework preact --package-manager bun
|
|
200
|
+
cd <folder>
|
|
201
|
+
npm install # bun install
|
|
202
|
+
npm run build # bun run build
|
|
232
203
|
```
|
|
233
204
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
205
|
+
`--name` sets the package name (default: the folder name); the folder must be new
|
|
206
|
+
or empty. Use the latest published version unless the user names one; read
|
|
207
|
+
[references/cli.md](references/cli.md) for a local tarball (`--tool-package`).
|
|
208
|
+
Never copy starter files by hand or port React files to Preact.
|
|
209
|
+
|
|
210
|
+
The created project's `README.md` and `ADS.md` explain it. It has semantic token
|
|
211
|
+
foundation in six groups (Color ramps and AA-checked roles, Type, Space & sizing, Shape &
|
|
212
|
+
elevation, Motion, Layout) with light and dark themes declared in `ds.config.json`
|
|
213
|
+
(`[data-theme]` themes the page or one section; see `ads://guides/tokens`), React or Preact
|
|
214
|
+
TypeScript/Linaria configuration, general lint, a public barrel, project-owned
|
|
215
|
+
review renderers (token tiles, brand preview, demo and screen frames), placeholder
|
|
216
|
+
brand artwork with an app icon, a `Grid` (`GridItem`) on the grid tokens, an icon set with
|
|
217
|
+
`Icon` and `IconButton`, and one example of each layer: `Button`, `IconButton`, `Icon`,
|
|
218
|
+
`Logo`, `TextField` and `Grid` in four component groups, the `SearchBar` pattern and the
|
|
219
|
+
`SearchPage` composition. Treat them as the project's own: adapt or replace them
|
|
220
|
+
for the requested product. The browser shell is supplied by ADS tooling.
|
|
221
|
+
|
|
240
222
|
Initialize/install ADS before running `npm run dev:showcase` for visual inspection.
|
|
241
223
|
`dev:showcase` and the project's ADS MCP (`.mcp.json`) each serve a showcase:
|
|
242
224
|
give them different ports, or open the MCP's showcase instead of starting one.
|
|
@@ -246,8 +228,8 @@ server running.
|
|
|
246
228
|
For an existing app without an ADS, run init inside that app when the tool is
|
|
247
229
|
available, then integrate its local public alias, CSS entry, and Linaria
|
|
248
230
|
extraction with the existing framework. Init detects the package manager from
|
|
249
|
-
the app and preserves its scripts and lockfile.
|
|
250
|
-
|
|
231
|
+
the app and preserves its scripts and lockfile. Init adds only the foundation
|
|
232
|
+
(tokens, token groups, review renderer, scenario mount); copy no other starter files.
|
|
251
233
|
Inspect files before editing; preserve configuration and application entry
|
|
252
234
|
points. Never copy the standalone package/configuration over an existing app.
|
|
253
235
|
|
|
@@ -331,11 +313,20 @@ Committed native and export icons are `assets.targets` (SVG copy, PNG, ICO, ICNS
|
|
|
331
313
|
and UI icon sets are `assets.glyphs`; `ads assets` keeps them and the committed
|
|
332
314
|
`assets/generated.json` current, and `ads check` fails when they are stale. Describe
|
|
333
315
|
and license each artwork in `assets/brand/README.md`, pair dark-theme variants as
|
|
334
|
-
`<name>.dark.svg`, show them through a component, and preview them in
|
|
335
|
-
`brand
|
|
316
|
+
`<name>.dark.svg`, show them through a component, and preview them in the Brand
|
|
317
|
+
section (`brand/<Group>/<Name>` scenarios). Finished PNG/JPEG/WebP images and
|
|
318
|
+
delivered `.ico`/`.icns` files are artwork too; ADS never enlarges a finished
|
|
319
|
+
image. Read
|
|
336
320
|
[branding.md](references/branding.md) (`ads://guides/branding`) before changing
|
|
337
321
|
brand artwork, icon outputs or glyphs.
|
|
338
322
|
|
|
323
|
+
## Accessibility
|
|
324
|
+
|
|
325
|
+
Target WCAG 2.2 AA. `ads check` warns about contrast in every theme, target size, focus,
|
|
326
|
+
text resize, reduced motion, text spacing, image alternatives and keyboard reach (`a11y-*`
|
|
327
|
+
and `token-contrast`). Read [accessibility.md](references/accessibility.md)
|
|
328
|
+
(`ads://guides/accessibility`) for the rules and the practice no tool can check.
|
|
329
|
+
|
|
339
330
|
## Design craft and mobile behavior
|
|
340
331
|
|
|
341
332
|
For design direction, content/layout decisions, interface wording, component
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Accessibility
|
|
2
|
+
|
|
3
|
+
Target WCAG 2.2 AA. ADS checks what it can from
|
|
4
|
+
tokens and source; the rest is design and testing practice.
|
|
5
|
+
|
|
6
|
+
## What `ads check` reviews
|
|
7
|
+
|
|
8
|
+
All are warnings with the WCAG criterion in the message.
|
|
9
|
+
|
|
10
|
+
| Rule | What it reviews | WCAG |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| `token-contrast` | Text, link, accent and status text on their backgrounds (4.5:1); focus and control borders on canvas and surface (3:1); in every theme | 1.4.3, 1.4.11 |
|
|
13
|
+
| `a11y-target-size` | `--control-height-*` of at least 24 px (44 px where touch is common) | 2.5.8 |
|
|
14
|
+
| `a11y-focus` | `--focus-w` of at least 2 px, and a `:focus-visible` indicator in `base.css` | 2.4.7, 2.4.13 |
|
|
15
|
+
| `a11y-text-resize` | Font-size tokens in `rem`, so text follows the reader's browser font size | 1.4.4 |
|
|
16
|
+
| `a11y-reduced-motion` | Every non-zero `--dur-*` set to 0 under `prefers-reduced-motion`; infinite animations in components stopped there | 2.3.3, 2.2.2 |
|
|
17
|
+
| `a11y-text-spacing` | `--leading-normal` of at least 1.5; `--content-max` under 80 characters | 1.4.8, 1.4.12 |
|
|
18
|
+
| `a11y-image-alt` | `<img>` in components with `alt` (`alt=""` when decorative) | 1.1.1 |
|
|
19
|
+
| `a11y-keyboard` | No `onClick` on `div`, `span` and other non-interactive elements without `role`, `tabIndex` and a key handler; prefer `<button>` | 2.1.1 |
|
|
20
|
+
|
|
21
|
+
Fix a warning in its owner: choose a different ramp step or size token, add the missing
|
|
22
|
+
attribute, or move the interaction to a native control. Do not silence it with a one-off
|
|
23
|
+
value.
|
|
24
|
+
|
|
25
|
+
## What only design and testing establish
|
|
26
|
+
|
|
27
|
+
- **Color is never the only signal.** Pair status color with text or an icon; underline links
|
|
28
|
+
in running text.
|
|
29
|
+
- **Keyboard.** Every action is reachable and usable with the keyboard, in a logical reading
|
|
30
|
+
order; focus never gets trapped and is always visible.
|
|
31
|
+
- **Screen readers.** Visual meaning has a text equivalent: labels on inputs and icon-only
|
|
32
|
+
buttons (`aria-label`), live regions for status messages, headings in order.
|
|
33
|
+
- **Zoom and reflow.** Layouts still make sense at 200% zoom and on a 320 px wide viewport;
|
|
34
|
+
related content stays together when magnified.
|
|
35
|
+
- **Motion.** Nothing autoplays or flashes more than three times a second; long motion can be
|
|
36
|
+
paused.
|
|
37
|
+
- **Media.** Video and animation with meaningful audio have captions and transcripts.
|
|
38
|
+
- **Cognitive load.** Plain language, one task per view where possible, information kept
|
|
39
|
+
visible while the task needs it.
|
|
40
|
+
|
|
41
|
+
Test by using each new view with the keyboard only, with a screen reader (VoiceOver, NVDA or
|
|
42
|
+
Orca), at 200% zoom, and in both themes. Browser checks run against real previews (`ads
|
|
43
|
+
verify`) can assert focus order and accessible names for important flows.
|
|
@@ -27,16 +27,46 @@ artwork; component styles still use tokens.
|
|
|
27
27
|
- **Show it in a component.** A logo appears in the UI through a project
|
|
28
28
|
component (the starter's `components/Content/Logo`) that imports the SVG with
|
|
29
29
|
`?url`. Artwork that nothing uses is reported (`brand-unused`).
|
|
30
|
-
- **Preview it.**
|
|
31
|
-
`
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
- **Preview it.** Brand previews are the showcase's first section, **Brand**. They
|
|
31
|
+
live in `brand/`, grouped by folder like components: the starter has
|
|
32
|
+
`brand/Identity/Logo` and `brand/Icons/AppIcon`, rendered by the review
|
|
33
|
+
`BrandPreview` (artwork in the current theme, the app icon at its sizes). They
|
|
34
|
+
have no token samples. Artwork no preview shows is reported (`brand-preview`).
|
|
35
|
+
|
|
36
|
+
## SVG masters, finished images and icon files
|
|
37
|
+
|
|
38
|
+
`assets/brand/` holds SVG masters, finished images (PNG, JPEG, WebP) and finished
|
|
39
|
+
icon files (`.ico`, `.icns`), in any mix. Each file is artwork in its own right:
|
|
40
|
+
described, previewed and used like an SVG. SVG renders cleanly at any size; a
|
|
41
|
+
finished image renders only at or below its own pixel size, so supply it large (an
|
|
42
|
+
app icon of 1024 px); ADS never enlarges it. A finished icon file is only copied.
|
|
43
|
+
Prefer SVG masters when they exist; take finished images as delivered when that
|
|
44
|
+
is what the brand provides.
|
|
45
|
+
|
|
46
|
+
## Pictograms and illustrations
|
|
47
|
+
|
|
48
|
+
Pictograms are illustrations for empty states, onboarding and marketing surfaces, not UI
|
|
49
|
+
icons: never use one as an icon, a logo or a header lockup, and never use a UI glyph as an
|
|
50
|
+
illustration. Keep them as brand artwork in `assets/brand/pictograms/`, so the brand
|
|
51
|
+
checks (README, license, preview, use) cover them, and preview them in a `brand/Pictograms`
|
|
52
|
+
group.
|
|
53
|
+
|
|
54
|
+
- Show them at 48 px or larger, at their original proportions; never crop or stretch them.
|
|
55
|
+
- Keep clear space of at least a quarter of their size on every side, with or without a
|
|
56
|
+
container. Containers are a circle or a square only, with the pictogram optically
|
|
57
|
+
centered.
|
|
58
|
+
- Pair light and dark versions as `<name>.svg` and `<name>.dark.svg`, and show the one that
|
|
59
|
+
matches the background: light artwork on light surfaces, dark on dark. Avoid mid-tone
|
|
60
|
+
backgrounds and gradients behind them.
|
|
61
|
+
- A pictogram that carries meaning needs a text alternative; one that repeats nearby text is
|
|
62
|
+
decorative (`alt=""`).
|
|
34
63
|
|
|
35
64
|
## Web icons
|
|
36
65
|
|
|
37
|
-
Set one square
|
|
38
|
-
|
|
39
|
-
`icon-
|
|
66
|
+
Set one square master as `assets.iconSource`: an SVG, or a square PNG, JPEG or WebP
|
|
67
|
+
of at least 512 px. Every build's `ads assets` writes `favicon.ico`,
|
|
68
|
+
`apple-touch-icon.png`, `icon-192.png` and `icon-512.png`, plus `favicon.svg` from
|
|
69
|
+
an SVG master, to ignored `.ds/assets/`; the application's bundler serves them and
|
|
40
70
|
keeps the manifest.
|
|
41
71
|
|
|
42
72
|
## Committed targets
|
|
@@ -56,10 +86,13 @@ Native launchers, tray icons and upload exports must exist without running ADS
|
|
|
56
86
|
] } }
|
|
57
87
|
```
|
|
58
88
|
|
|
59
|
-
The output extension selects the format
|
|
89
|
+
The output extension selects the format. The same extension without sizes copies
|
|
90
|
+
the file as supplied (an SVG master, a finished PNG, a delivered `.ico`); `.png` renders
|
|
60
91
|
one `size` or a `width` × `height` (artwork of another shape is centred),
|
|
61
92
|
`.ico` and `.icns` bundle several `sizes`. `background` fills transparency, for
|
|
62
|
-
platforms that turn transparent corners black.
|
|
93
|
+
platforms that turn transparent corners black. Rendering takes SVG, PNG, JPEG or
|
|
94
|
+
WebP masters; a target that would enlarge a finished image fails `ads check` and
|
|
95
|
+
`ads assets` and names both sizes.
|
|
63
96
|
|
|
64
97
|
`ads assets` renders only targets whose master or settings changed and records
|
|
65
98
|
each output in the committed `assets/generated.json`. `ads check` fails
|
|
@@ -87,3 +120,13 @@ set them. `aliases.json` in the folder maps extra names to existing glyphs
|
|
|
87
120
|
(`glyphAliases`); a file named like an alias is skipped. `ads assets` writes the
|
|
88
121
|
module; `ads check` fails (`brand-output-stale`) when it is out of date. The icon
|
|
89
122
|
component and its catalogue scenario read `glyphs` and `glyphAliases`.
|
|
123
|
+
|
|
124
|
+
Keep every glyph on one `viewBox` (the starter uses 24 × 24) and draw in `currentColor`:
|
|
125
|
+
`ads check` warns about a different or missing viewBox (`glyph-viewbox`) and fixed fill or
|
|
126
|
+
stroke colors (`glyph-color`). Other products' logos keep their own colors: keep them as
|
|
127
|
+
brand artwork in `assets/brand/` and show them as images, not glyphs. The starter's `Icon` sizes glyphs with `--icon-sm/md/lg/xl`
|
|
128
|
+
(16/20/24/32 px; 16 beside body text), centers them beside text and hides decorative ones
|
|
129
|
+
from assistive technology; `label` names a meaningful one. Icons have no states of their
|
|
130
|
+
own: interactive icons go in `IconButton`, whose required `label` is its accessible name
|
|
131
|
+
and tooltip and whose background carries hover, pressed and disabled. `a11y-icon-label`
|
|
132
|
+
warns about icon-only buttons and links without a name.
|
|
@@ -23,8 +23,9 @@ ads_capture({
|
|
|
23
23
|
})
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
The ID above is illustrative; use one returned by discovery.
|
|
27
|
-
|
|
26
|
+
The ID above is illustrative; use one returned by discovery. `theme` names one of the
|
|
27
|
+
project's declared themes (`ads_status.themes`); the default is the first declared theme at
|
|
28
|
+
1280 × 800 CSS pixels. Capture uses the real sandboxed MCP App with the
|
|
28
29
|
requested viewport and excludes showcase navigation. The default image records
|
|
29
30
|
the complete widget viewport, including its current scroll/state; it does not
|
|
30
31
|
automatically stitch every scroll position into one image.
|
|
@@ -46,9 +46,10 @@ for MCP configuration and portable compiler/behavior commands.
|
|
|
46
46
|
Use `--package-manager bun` only for an explicit override. Preserve the project's
|
|
47
47
|
existing package-manager policy and lockfile.
|
|
48
48
|
|
|
49
|
-
`
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
`create <folder> --framework react|preact` starts from zero: it copies the starter
|
|
50
|
+
shipped in the same package version into a new or empty folder (`--name` sets the
|
|
51
|
+
package name, `--package-manager bun` adapts scripts and lockfile), then runs init.
|
|
52
|
+
`init` accepts no directory argument and requires an existing `package.json`. For an existing app, init preserves app files,
|
|
52
53
|
framework configuration, lockfiles, and build scripts. It adds only missing ADS
|
|
53
54
|
foundation files, config, development dependencies, and build checks. Existing
|
|
54
55
|
ADS values are reused; incomplete contracts need an explicit migration.
|
|
@@ -119,6 +120,6 @@ do not copy source, import values, or establish behavior/motion parity; continue
|
|
|
119
120
|
project type checking, meaningful tests, and browser comparisons.
|
|
120
121
|
|
|
121
122
|
If no CLI distribution is available, continue with the target's existing
|
|
122
|
-
checks
|
|
123
|
+
checks; creating a project needs the ADS package (`ads create`).
|
|
123
124
|
Install skills separately with `npx skills`; the tool does not install skills
|
|
124
125
|
or fetch an external UI catalogue.
|
|
@@ -89,3 +89,92 @@ sample coverage in the shared directory. Preserve themes, units, public APIs and
|
|
|
89
89
|
behavior unless changing the visual policy was explicitly intended. Review a Git
|
|
90
90
|
diff and run core, project and browser checks. There is no compatibility mode that
|
|
91
91
|
keeps independent component token definitions valid.
|
|
92
|
+
|
|
93
|
+
## Accessibility and rhythm reviews
|
|
94
|
+
|
|
95
|
+
`ads check` reviews token values, in every theme (each `:root[data-theme=…]` scope,
|
|
96
|
+
resolving `var()` aliases there):
|
|
97
|
+
|
|
98
|
+
- `token-contrast` warns when the roles that meet on screen fall below WCAG 2.2 AA:
|
|
99
|
+
`--text-strong`, `--text-body`, `--text-muted`, `--text-link` and `--accent-text` on
|
|
100
|
+
`--bg-canvas`, `--bg-surface` and `--bg-hover`; `--accent-fg` on `--accent` and
|
|
101
|
+
`--accent-hover`; each status's `-fg` on its solid and `-text` on its `-bg` (4.5:1);
|
|
102
|
+
`--border-focus` and `--border-strong` on the canvas and surface (3:1). Pairs whose
|
|
103
|
+
tokens a project does not define are not reviewed; colors outside hex, rgb() and hsl()
|
|
104
|
+
are skipped.
|
|
105
|
+
- `token-rhythm` warns when a numbered spacing step leaves the scale `--space-N` = N × 2 px.
|
|
106
|
+
- `token-overlap-review` compares values only within a token family (`--radius-*` with
|
|
107
|
+
`--radius-*`): a radius equal to a spacing step is two scales meeting, not a duplicate.
|
|
108
|
+
|
|
109
|
+
Fix a contrast warning by choosing a different ramp step for the role, in the theme the
|
|
110
|
+
message names, rather than adding a one-off color.
|
|
111
|
+
|
|
112
|
+
## Exchange format
|
|
113
|
+
|
|
114
|
+
`ads tokens --format dtcg` prints the tokens as W3C Design Tokens (Community Group draft)
|
|
115
|
+
JSON: groups by family, typed `$value`s, `{group.token}` references for `var()` aliases.
|
|
116
|
+
Values the format cannot express (fluid `clamp()` sizes, layered shadows) keep their CSS in
|
|
117
|
+
`$extensions["org.reqvire.ads"].css`; other themes' values are in
|
|
118
|
+
`$extensions["org.reqvire.ads"].scopes`.
|
|
119
|
+
|
|
120
|
+
## Grid
|
|
121
|
+
|
|
122
|
+
The `--grid-*` tokens describe a column grid: `--grid-columns-sm/md/lg` (the starter's 4, 8
|
|
123
|
+
and 16), `--grid-gutter`, `--grid-gutter-narrow`, `--grid-gutter-condensed` and
|
|
124
|
+
`--grid-margin-sm/md/lg`, aliasing spacing steps. The starter's `Grid` switches columns by
|
|
125
|
+
container width (768 and 1024 px) with container queries, since CSS variables cannot be
|
|
126
|
+
breakpoints. The showcase's grid overlay draws these tokens over every preview at the same
|
|
127
|
+
widths; a project without them shows no overlay. Align text to a cell's edge, not its gutter.
|
|
128
|
+
|
|
129
|
+
## Color roles and states
|
|
130
|
+
|
|
131
|
+
Name roles by element and purpose, the same in every theme; only their values change. Point roles at ramp steps rather than raw colors, so a theme is a ramp swap:
|
|
132
|
+
|
|
133
|
+
- Layers: `--bg-canvas` → `--bg-surface` → `--bg-raised` (menus, popovers), with `--bg-field`
|
|
134
|
+
for inputs. In dark themes each layer up is one step lighter; in light themes surfaces stay
|
|
135
|
+
near white.
|
|
136
|
+
- States move along the ramp: hover one step, pressed or active two, selected a subtle accent
|
|
137
|
+
step (`--bg-selected`). Solid fills hover one step darker (`--accent-hover`).
|
|
138
|
+
- Disabled is always neutral (`--bg-disabled`, `--text-disabled`, `--border-disabled`) with no
|
|
139
|
+
hover or focus response; WCAG exempts it from contrast, so `token-contrast` skips it.
|
|
140
|
+
- `--bg-overlay` is the translucent scrim behind modals; `--bg-skeleton` fills loading
|
|
141
|
+
placeholders.
|
|
142
|
+
- Never signal state or status by color alone: pair it with text, an icon or a shape.
|
|
143
|
+
|
|
144
|
+
## Themes
|
|
145
|
+
|
|
146
|
+
Declare themes in `ds.config.json` (`themes: [{ name, scheme }]`, the first is the default).
|
|
147
|
+
A theme changes values, never names: give the default theme's values on `:root`, override
|
|
148
|
+
them under `[data-theme="<name>"]`, and keep roles aliasing ramp steps on
|
|
149
|
+
`:root, [data-theme]` so they re-resolve wherever a theme applies. Override a whole ramp in a
|
|
150
|
+
theme, not a few steps.
|
|
151
|
+
|
|
152
|
+
- `data-theme` on `<html>` themes the page; on any element it themes one section (a dark
|
|
153
|
+
hero in a light page). A themed section paints its own canvas and text (`base.css`).
|
|
154
|
+
- `scheme` sets `color-scheme`, so native controls and scrollbars match the theme.
|
|
155
|
+
- Add a theme for a real need: high contrast, a dimmed reading mode, a brand. Check it in the
|
|
156
|
+
showcase (the theme button steps through declared themes) and capture it by name.
|
|
157
|
+
- Runtime switching (user choice, `prefers-color-scheme`, remembering it) is application code.
|
|
158
|
+
|
|
159
|
+
## Spacing
|
|
160
|
+
|
|
161
|
+
`--space-N` is N × 2 px, from 2 to 160 px; the same values hold at every screen size, and a
|
|
162
|
+
layout steps down one or two sizes at narrow widths instead of scaling. Use the scale for
|
|
163
|
+
padding inside components and for gaps between them; a value off the scale needs a reason.
|
|
164
|
+
|
|
165
|
+
- Distance says how related things are: closer means more related. Group with space before
|
|
166
|
+
reaching for dividers, borders or cards.
|
|
167
|
+
- More space around an element gives it more importance. Sections can be dense, but leave the
|
|
168
|
+
page as a whole room to breathe.
|
|
169
|
+
- Parents own the space between their children (`gap`, stack tokens); a component carries no
|
|
170
|
+
outer margin, so it fits wherever it is placed.
|
|
171
|
+
- Horizontal layout follows the column grid; percentages are fine for splitting a region and
|
|
172
|
+
for minimum and maximum widths.
|
|
173
|
+
|
|
174
|
+
## Motion tokens
|
|
175
|
+
|
|
176
|
+
Six durations (`--dur-instant` 70 ms, `--dur-fast` 110, `--dur-moderate` 150, `--dur-normal`
|
|
177
|
+
240, `--dur-slow` 400, `--dur-slower` 700) and three curve pairs (standard, enter and exit, each everyday and
|
|
178
|
+
`-strong`). Every duration is 0 under `prefers-reduced-motion`. Pick by purpose, not by
|
|
179
|
+
number: the ads-motion skill's build guide maps each token to its use and gives the easing
|
|
180
|
+
rules.
|
|
@@ -149,7 +149,7 @@ production and scenario builds; never alias React to Preact just to shrink a
|
|
|
149
149
|
preview. Native Preact uses its own JSX transform, hooks and DOM events (live
|
|
150
150
|
text updates use `onInput`). Native SVG uses DOM names such as `stroke-width`,
|
|
151
151
|
not React presentation aliases. Keep Linaria extraction and the same public APIs.
|
|
152
|
-
|
|
152
|
+
`ads create` makes React or Preact projects; the tool repository's working
|
|
153
153
|
example uses Preact. Neither is a component dependency of the receiving project.
|
|
154
154
|
|
|
155
155
|
ADS is tooling only. Components, patterns, themes and scenarios live in
|
|
@@ -14,7 +14,7 @@ Copy selected masters into `design-system/assets/brand/`, with their dark-theme
|
|
|
14
14
|
variants (`<name>.dark.svg`) when the source pairs them. Update its local README
|
|
15
15
|
with usage, suitable backgrounds, source repository/file links and revision,
|
|
16
16
|
authors, credits, and applicable license notices, and add each imported file to the
|
|
17
|
-
destination's
|
|
17
|
+
destination's Brand previews (`brand/`). `ads check` warns
|
|
18
18
|
about artwork that is undescribed, unlicensed, unpreviewed or unused. Keep fixed colors and geometry
|
|
19
19
|
in original SVG artwork. Licensed fonts needed by an explicit theme import live
|
|
20
20
|
in `assets/fonts/`; declarations use `tokens/fonts.css`.
|
|
@@ -27,8 +27,9 @@ to change destination token values during an asset-only import.
|
|
|
27
27
|
|
|
28
28
|
When the selected artwork should supply the app icon, set only
|
|
29
29
|
`assets.iconSource` in the target's `ds.config.json` to its ADS-relative path,
|
|
30
|
-
for example `assets/brand/app-icon.svg`. The source must be an SVG
|
|
31
|
-
|
|
30
|
+
for example `assets/brand/app-icon.svg`. The source must be an SVG, or a square
|
|
31
|
+
PNG/JPEG/WebP of at least 512 px, inside `assets/brand/`. Import finished images
|
|
32
|
+
and icon files as supplied; never trace or upscale them. Use the real installed tool's `ads assets` command to generate
|
|
32
33
|
favicon SVG/ICO, an Apple touch icon, and 192/512px icons in ignored `.ds/assets/`.
|
|
33
34
|
Web icons need no further configuration. Committed native or upload outputs
|
|
34
35
|
(`assets.targets`) and glyph sets (`assets.glyphs`) belong to the destination: add
|