@reqvire-org/ads 0.3.44 → 0.3.45
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 +27 -9
- package/dist/assets.mjs +4 -4
- package/dist/brand-assets.mjs +41 -7
- package/dist/cli.mjs +21 -9
- package/dist/config.mjs +19 -10
- package/dist/create.mjs +48 -0
- package/dist/image-size.mjs +28 -0
- package/dist/index.mjs +1 -0
- package/dist/init.mjs +4 -5
- package/dist/mcp/preview-widget.bundle.js +1 -1
- package/dist/mcp/project-widget.bundle.js +1 -1
- package/dist/mcp/server.mjs +3 -4
- package/dist/mcp/skills.mjs +1 -1
- package/dist/preview-resources.mjs +1 -1
- 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 +22 -22
- package/dist/showcase/draft-navigation.js +1 -1
- package/dist/showcase/index.html +1 -0
- package/dist/skills/ads-break-ui/SKILL.md +1 -1
- package/dist/skills/ads-designer/README.md +2 -2
- package/dist/skills/ads-designer/SKILL.md +37 -56
- package/dist/skills/ads-designer/references/branding.md +24 -9
- package/dist/skills/ads-designer/references/cli.md +5 -4
- 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/cli.md +5 -4
- package/dist/skills/ads-motion/SKILL.md +1 -1
- package/dist/skills/ads-port/SKILL.md +1 -1
- package/dist/skills/ads-port/references/cli.md +5 -4
- package/dist/{bootstrap-ds → starters/react}/README.md +13 -19
- package/dist/{skills/ads-designer/assets/bootstrap-ds → starters/react}/design-system/assets/brand/README.md +1 -1
- 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}/tsconfig.build.json +2 -1
- package/dist/task-cache.mjs +1 -1
- package/dist/token-fixtures.mjs +1 -1
- package/dist/units.mjs +6 -6
- package/dist/validation.mjs +1 -1
- package/docs/ADS.md +4 -4
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CHANGELOG.md +36 -12
- package/docs/GUIDE.md +25 -22
- package/package.json +3 -5
- package/dist/bootstrap-ds/design-system/assets/brand/README.md +0 -36
- package/dist/bootstrap-ds/design-system/tokens/Brand.ads.fixture.ts +0 -12
- package/dist/bootstrap-ds/tsconfig.build.json +0 -19
- 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/Button.tsx +0 -49
- 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/review/token-preview/TokenPreview.tsx +0 -119
- 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/Color.ads.scenario.tsx +0 -4
- 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/SpaceTypeMotion.ads.scenario.tsx +0 -4
- 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/review/token-preview/TokenPreview.tsx +0 -119
- 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/review/token-preview/TokenPreview.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}/ds.config.json +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/Button.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/components/Forms/TextField/TextField.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/index.ts +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/index.ts +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/review/token-preview/TokenPreview.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.fixture.ts +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/tokens/Color.ads.scenario.tsx +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/tokens/SpaceTypeMotion.ads.fixture.ts +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/tokens/SpaceTypeMotion.ads.scenario.tsx +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/tokens/base.css +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/tokens/colors.css +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/tokens/elevation.css +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/tokens/spacing.css +0 -0
- /package/dist/{bootstrap-ds → starters/react}/design-system/tokens/typography.css +0 -0
- /package/dist/{bootstrap-ds → starters/react}/ds.config.json +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
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,34 +1,58 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.3.
|
|
3
|
+
## 0.3.45
|
|
4
4
|
|
|
5
5
|
<!-- ads-local-tests:start -->
|
|
6
|
-
Local verification: **
|
|
7
|
-
Tested commit: `
|
|
8
|
-
Completed 2026-10-
|
|
6
|
+
Local verification: **635/635 passed** with `ADS_TEST_BUN=1 npm test`.
|
|
7
|
+
Tested commit: `b398b326316893474e4196d87d360f8bf16d6711`; Node v24.13.0, Bun 1.4.1.
|
|
8
|
+
Completed 2026-10-29T21:08:14.889Z (1016 seconds).
|
|
9
9
|
|
|
10
10
|
<!-- ads-local-test-proof
|
|
11
11
|
{
|
|
12
12
|
"schema": 1,
|
|
13
|
-
"version": "0.3.
|
|
14
|
-
"commit": "
|
|
15
|
-
"sourceSha256": "
|
|
13
|
+
"version": "0.3.45",
|
|
14
|
+
"commit": "b398b326316893474e4196d87d360f8bf16d6711",
|
|
15
|
+
"sourceSha256": "4e75c6664215068b6fdcb8713ed6b80692b37352a7da1725d609837324f08cf0",
|
|
16
16
|
"command": "ADS_TEST_BUN=1 npm test",
|
|
17
17
|
"result": "pass",
|
|
18
|
-
"tests":
|
|
19
|
-
"pass":
|
|
18
|
+
"tests": 635,
|
|
19
|
+
"pass": 635,
|
|
20
20
|
"fail": 0,
|
|
21
21
|
"cancelled": 0,
|
|
22
22
|
"skipped": 0,
|
|
23
23
|
"node": "v24.13.0",
|
|
24
24
|
"bun": "1.4.1",
|
|
25
|
-
"completedAt": "2026-10-
|
|
26
|
-
"durationMs":
|
|
27
|
-
"logSha256": "
|
|
25
|
+
"completedAt": "2026-10-29T21:08:14.889Z",
|
|
26
|
+
"durationMs": 1015884,
|
|
27
|
+
"logSha256": "eb24fad299567e04233509af761e839939d850d4fc2b2323491dd662f2754945"
|
|
28
28
|
}
|
|
29
29
|
-->
|
|
30
30
|
<!-- ads-local-tests:end -->
|
|
31
31
|
|
|
32
|
+
- `ads create <folder> --framework react|preact` creates a new design-system project
|
|
33
|
+
from the starter shipped in the same ADS version, so the project always matches
|
|
34
|
+
the tool that checks it. It names the package (`--name`, default the folder name),
|
|
35
|
+
adapts scripts and lockfile for Bun (`--package-manager bun`), then runs init. A
|
|
36
|
+
folder must be new or empty; a failed creation leaves it as it was.
|
|
37
|
+
- The starters moved to `starters/react` and `starters/preact` (the files that
|
|
38
|
+
replace React's) and ship only in the npm package. The `ads-designer` skill no
|
|
39
|
+
longer carries a copy: it creates projects with `ads create`.
|
|
40
|
+
- Fix the starter's declaration build (`tsconfig.build.json`) not resolving `?url`
|
|
41
|
+
artwork imports.
|
|
42
|
+
- Brand is the showcase's first section. Brand previews live in `brand/`, grouped
|
|
43
|
+
by folder like components (`brand/<Group>/<Name>`), open as ordinary scenarios
|
|
44
|
+
and have no token samples. This replaces 0.3.44's `brand: true` token-folder
|
|
45
|
+
scenarios: move them to `brand/` and drop the flag. The starter previews its logo
|
|
46
|
+
(`brand/Identity/Logo`) and app icon (`brand/Icons/AppIcon`).
|
|
47
|
+
- Brand artwork may be finished PNG, JPEG or WebP images and delivered `.ico` or
|
|
48
|
+
`.icns` files, mixed with SVG masters. A target with the same extension and no
|
|
49
|
+
sizes copies the file as supplied; rendering from a finished image never enlarges
|
|
50
|
+
it (`ads check` and `ads assets` name both sizes). `assets.iconSource` may be a
|
|
51
|
+
square PNG, JPEG or WebP of at least 512 px; only an SVG master also writes
|
|
52
|
+
`favicon.svg`. A target naming a missing master is reported instead of failing.
|
|
53
|
+
|
|
54
|
+
## 0.3.44
|
|
55
|
+
|
|
32
56
|
- Committed brand targets: `assets.targets` renders SVG masters from
|
|
33
57
|
`assets/brand/` to project paths as SVG copies, PNGs (square or width × height,
|
|
34
58
|
optional background), ICO and ICNS files, for native launchers, tray icons and
|
package/docs/GUIDE.md
CHANGED
|
@@ -126,9 +126,9 @@ project's existing build:
|
|
|
126
126
|
result. Static source checks do not establish complete extraction or
|
|
127
127
|
unused-style removal.
|
|
128
128
|
|
|
129
|
-
The [starter's dependencies](https://github.com/reqvire-org/ads/blob/main/
|
|
130
|
-
[entry build](https://github.com/reqvire-org/ads/blob/main/
|
|
131
|
-
and [preview compiler](https://github.com/reqvire-org/ads/blob/main/
|
|
129
|
+
The [starter's dependencies](https://github.com/reqvire-org/ads/blob/main/starters/react/package.json),
|
|
130
|
+
[entry build](https://github.com/reqvire-org/ads/blob/main/starters/react/vite.config.ts),
|
|
131
|
+
and [preview compiler](https://github.com/reqvire-org/ads/blob/main/starters/react/scripts/build-mcp-previews.mjs)
|
|
132
132
|
provide the React/Vite setup. Merge the needed integration into an existing
|
|
133
133
|
project instead of replacing its configuration.
|
|
134
134
|
|
|
@@ -161,11 +161,11 @@ namespace is also recognized by guards. See the [Preact upgrade guide](https://p
|
|
|
161
161
|
|
|
162
162
|
The [working example](https://github.com/reqvire-org/ads/tree/main/design-system)
|
|
163
163
|
and its [compiler adapter](https://github.com/reqvire-org/ads/blob/main/scripts/build-mcp-previews.mjs)
|
|
164
|
-
show the native setup. A new Preact project
|
|
165
|
-
`
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
164
|
+
show the native setup. A new Preact project comes from
|
|
165
|
+
`ads create <folder> --framework preact`: the React starter with
|
|
166
|
+
`starters/preact/` applied, which replaces the runtime dependencies, JSX settings,
|
|
167
|
+
framework transform, mount adapter, review renderers' hooks and types, and
|
|
168
|
+
`framework` field together, then init. For a Preact app without a saved framework, run
|
|
169
169
|
`ads init --framework preact`; newly generated foundation scenarios use native
|
|
170
170
|
hooks. Init preserves the application's compiler, dependencies and mount adapter.
|
|
171
171
|
|
|
@@ -196,14 +196,13 @@ For a Bun-managed project, use
|
|
|
196
196
|
`bunx @reqvire-org/ads init --framework react`, followed by `bun install`
|
|
197
197
|
and `bun --bun run build`. Node is unnecessary. No archive or directory argument is needed for a published
|
|
198
198
|
release. `init` requires an existing project; it does not create an application.
|
|
199
|
-
For starting from zero,
|
|
200
|
-
TypeScript/Linaria
|
|
201
|
-
(
|
|
202
|
-
inside it when a tool distribution is available.
|
|
199
|
+
For starting from zero, `ads create <folder> --framework react|preact` copies the
|
|
200
|
+
TypeScript/Linaria starter shipped in the same ADS version into a new or empty
|
|
201
|
+
folder (`--name`, `--package-manager bun`), then runs init.
|
|
203
202
|
|
|
204
203
|
Choose `--framework react` or `--framework preact` when the project has no saved
|
|
205
204
|
framework. Init persists it as `framework` in `ds.config.json`. Subsequent runs
|
|
206
|
-
reuse the saved value
|
|
205
|
+
reuse the saved value; a project from `ads create` already declares its framework.
|
|
207
206
|
There is no implicit framework detection or default for initialization.
|
|
208
207
|
|
|
209
208
|
A conflicting flag stops init before writes. Init also checks available
|
|
@@ -638,16 +637,19 @@ reserves `--showcase-*` for showcase boundaries. Fixture files still define no
|
|
|
638
637
|
custom styling; the frame pattern uses `--ux-*`. Branding never assigns
|
|
639
638
|
component state variables.
|
|
640
639
|
|
|
641
|
-
Keep original SVG
|
|
640
|
+
Keep original artwork (SVG masters, finished PNG/JPEG/WebP images, delivered
|
|
641
|
+
`.ico`/`.icns` files, in any mix) and a usage/credits/license README in
|
|
642
642
|
`design-system/assets/brand/`, and font files in `assets/fonts/`. `ads check` warns
|
|
643
643
|
when artwork is undescribed in that README (`brand-readme`), the README states no
|
|
644
|
-
license (`brand-license`), artwork is missing from a
|
|
644
|
+
license (`brand-license`), artwork is missing from a Brand preview
|
|
645
645
|
(`brand-preview`), or nothing uses it (`brand-unused`). Name a dark-theme variant
|
|
646
646
|
`<name>.dark.svg`; the component showing it renders both and hides one with a
|
|
647
|
-
`:root[data-theme="dark"] &` selector.
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
647
|
+
`:root[data-theme="dark"] &` selector. Brand previews are the showcase's first
|
|
648
|
+
section, **Brand**: scenarios in `brand/`, grouped by folder like components (the
|
|
649
|
+
starter's `brand/Identity/Logo` and `brand/Icons/AppIcon` with the review
|
|
650
|
+
`BrandPreview`). They show artwork in the current theme and the app icon at its
|
|
651
|
+
sizes, and have no token samples. A finished image renders only at or below its own
|
|
652
|
+
pixel size; ADS never enlarges it. The [branding guide](../skills/ads-designer/references/branding.md)
|
|
651
653
|
(`ads://guides/branding`) covers the whole flow. Font declarations
|
|
652
654
|
belong in optional `tokens/fonts.css`, imported first. The foundation entry is
|
|
653
655
|
import-only: fonts (when present), colors, typography, spacing, elevation, base.
|
|
@@ -662,14 +664,15 @@ values and missing token references fail checks there too. Move component-specif
|
|
|
662
664
|
repairs into their Linaria owner; see the [foundation contract](ADS.md#shared-token-contract).
|
|
663
665
|
|
|
664
666
|
|
|
665
|
-
Select one
|
|
667
|
+
Select one square master, an SVG or a PNG/JPEG/WebP of at least 512 px, with an
|
|
668
|
+
ADS-relative path:
|
|
666
669
|
|
|
667
670
|
```json
|
|
668
671
|
{ "assets": { "iconSource": "assets/brand/app-icon.svg" } }
|
|
669
672
|
```
|
|
670
673
|
|
|
671
|
-
Merge this into `ds.config.json`; the source must be
|
|
672
|
-
`
|
|
674
|
+
Merge this into `ds.config.json`; the source must be inside `assets/brand/`.
|
|
675
|
+
`favicon.svg` is written only for an SVG master. `ads assets` generates these files in ignored `.ds/assets/`:
|
|
673
676
|
|
|
674
677
|
| Output | Size |
|
|
675
678
|
|--------|------|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reqvire-org/ads",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.45",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A design system your agent can see and shape. Your components. Your look. Your code.",
|
|
6
6
|
"repository": {
|
|
@@ -32,13 +32,11 @@
|
|
|
32
32
|
"build:showcase": "npm run build:tool && bun dist/cli.mjs compile .",
|
|
33
33
|
"build:mcp-previews": "bun dist/cli.mjs compile .",
|
|
34
34
|
"generate:icons": "node scripts/generate-icons.mjs",
|
|
35
|
-
"sync:skill-starter": "node scripts/sync-skill-starter.mjs",
|
|
36
|
-
"check:skill-starter": "node scripts/sync-skill-starter.mjs --check",
|
|
37
35
|
"sync:skill-references": "node scripts/sync-skill-references.mjs",
|
|
38
36
|
"check:skill-references": "node scripts/sync-skill-references.mjs --check",
|
|
39
37
|
"lint": "npm run lint:tool",
|
|
40
|
-
"lint:tool": "npm run check:skill-
|
|
41
|
-
"lint:project": "npm run lint:ds && npm run lint:style
|
|
38
|
+
"lint:tool": "npm run check:skill-references && oxlint --deny-warnings src preview-client showcase-client mcp-explorer tests/*.test.mjs tests/helpers scripts/build-ads-tool.mjs scripts/pack-ads-tool.mjs scripts/sync-skill-references.mjs scripts/local-test-proof.mjs",
|
|
39
|
+
"lint:project": "npm run lint:ds && npm run lint:style",
|
|
42
40
|
"lint:ds": "bun dist/cli.mjs check",
|
|
43
41
|
"lint:style": "biome lint --config-path=biome.css.json .",
|
|
44
42
|
"preview": "bun dist/cli.mjs showcase",
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Project branding
|
|
2
|
-
|
|
3
|
-
The starter's placeholder artwork. Replace each file with the product's own and keep this
|
|
4
|
-
table current: `ads check` warns about artwork that is undescribed, unlicensed, unused or
|
|
5
|
-
missing from the brand scenario (`tokens/Brand.ads.scenario.tsx`).
|
|
6
|
-
|
|
7
|
-
| File | Use | Backgrounds |
|
|
8
|
-
|---|---|---|
|
|
9
|
-
| `logo.svg` | Logo in the UI (`components/Content/Logo`), light theme | Light surfaces |
|
|
10
|
-
| `logo.dark.svg` | The same logo for the dark theme | Dark surfaces |
|
|
11
|
-
| `app-icon.svg` | Master for web icons (`assets.iconSource`) and any `assets.targets` | Any; it has its own fill and padding |
|
|
12
|
-
|
|
13
|
-
License: placeholder artwork made for the ADS starter, free to use, change or remove
|
|
14
|
-
(MIT, like ADS). Record the real artwork's credits and license here when it replaces this.
|
|
15
|
-
|
|
16
|
-
## How branding works
|
|
17
|
-
|
|
18
|
-
UI branding uses the project-owned shared roles in `tokens/`: change values such as
|
|
19
|
-
`--accent`, `--font-sans`, and `--radius-md`. Components own `--ds-*` variables;
|
|
20
|
-
patterns and development review helpers own `--ux-*`; the showcase owns
|
|
21
|
-
`--showcase-*`. Do not introduce a brand-prefixed token vocabulary or override
|
|
22
|
-
component state variables.
|
|
23
|
-
|
|
24
|
-
Name a dark-theme variant `<name>.dark.svg`; the component showing the artwork renders
|
|
25
|
-
both and the theme picks one. Fixed colors belong inside the artwork only.
|
|
26
|
-
|
|
27
|
-
Put licensed font files in `assets/fonts/` and their declarations in
|
|
28
|
-
`tokens/fonts.css`. Keep that optional import first in `styles.css`.
|
|
29
|
-
|
|
30
|
-
`assets.iconSource` (here `assets/brand/app-icon.svg`) makes every build generate
|
|
31
|
-
`favicon.svg`, `favicon.ico` (16/32/48), `apple-touch-icon.png` (180), `icon-192.png` and
|
|
32
|
-
`icon-512.png` in ignored `.ds/assets/`; mount that folder through the application's
|
|
33
|
-
bundler and keep the manifest in the application. Native launchers, tray icons and
|
|
34
|
-
upload exports are committed `assets.targets` (PNG, ICO, ICNS or SVG copies), kept
|
|
35
|
-
fresh by `ads assets` and checked by `ads check`. Edit the masters here, never
|
|
36
|
-
generated files. See the [branding guide](https://github.com/reqvire-org/ads/blob/main/skills/ads-designer/references/branding.md).
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import logo from "../assets/brand/logo.svg?url";
|
|
2
|
-
import logoDark from "../assets/brand/logo.dark.svg?url";
|
|
3
|
-
import appIcon from "../assets/brand/app-icon.svg?url";
|
|
4
|
-
|
|
5
|
-
export const fixture = {
|
|
6
|
-
title: "Brand",
|
|
7
|
-
artwork: [
|
|
8
|
-
{ name: "logo.svg", use: "Logo in the UI (Logo component)", src: logo, darkSrc: logoDark },
|
|
9
|
-
{ name: "app-icon.svg", use: "Master for the web icons and committed targets", src: appIcon },
|
|
10
|
-
],
|
|
11
|
-
icon: { name: "app-icon.svg", src: appIcon, sizes: [16, 32, 48, 180, 192, 512] },
|
|
12
|
-
} as const;
|
|
@@ -1,19 +0,0 @@
|
|
|
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": [
|
|
11
|
-
"design-system/index.ts"
|
|
12
|
-
],
|
|
13
|
-
"exclude": [
|
|
14
|
-
"design-system/showcase",
|
|
15
|
-
"design-system/review",
|
|
16
|
-
"design-system/composition",
|
|
17
|
-
"**/*.ads.*"
|
|
18
|
-
]
|
|
19
|
-
}
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
# Design-system contract
|
|
2
|
-
|
|
3
|
-
This is the local contract for the copied starter. The project owns its source,
|
|
4
|
-
token values, and branding. Tool updates preserve those values and customized
|
|
5
|
-
code; source and theme imports are explicit operations.
|
|
6
|
-
|
|
7
|
-
For the architectural rationale, see the
|
|
8
|
-
[ADS architecture](https://github.com/reqvire-org/ads/blob/main/docs/ARCHITECTURE.md).
|
|
9
|
-
The rules and commands needed to use this starter are included locally.
|
|
10
|
-
|
|
11
|
-
## Ownership
|
|
12
|
-
|
|
13
|
-
| Layer | Owns | Location |
|
|
14
|
-
|-------|------|----------|
|
|
15
|
-
| Tokens | Colors, typography, spacing, radii, motion, elevation | `tokens/` |
|
|
16
|
-
| Primitives | Generic controls, states, interaction and accessibility | `components/` |
|
|
17
|
-
| Patterns | Reusable layout and composition | `patterns/` |
|
|
18
|
-
| Scenarios | Colocated development entries and inputs | Beside their owner; larger entries in `composition/` |
|
|
19
|
-
| Showcase host | Navigation and MCP client | Packaged ADS tooling |
|
|
20
|
-
| Preview compiler adapter | Framework mount/unmount and foundation imports | `showcase/mcp/` |
|
|
21
|
-
| Application | Domain data, routing, effects and callbacks | Consuming application |
|
|
22
|
-
|
|
23
|
-
The starter declares React in `ds.config.json`. Keep that choice, JSX, runtime
|
|
24
|
-
dependencies and the preview mount adapter consistent. Init records a choice for
|
|
25
|
-
an unconfigured project; it does not convert copied React source to Preact.
|
|
26
|
-
|
|
27
|
-
The starter has one example of each layer (Button, Logo, TextField, SearchBar,
|
|
28
|
-
SearchPage) and placeholder brand artwork. Rename, restyle or replace them; add only what the product needs.
|
|
29
|
-
Keep the ADS in root `design-system/`, beside application `src/`.
|
|
30
|
-
Keep public exports in `design-system/index.ts`; consumers use its `@ds` alias.
|
|
31
|
-
`styles.css` is the foundation CSS entry and contains token imports only.
|
|
32
|
-
|
|
33
|
-
## Visual and interaction policy
|
|
34
|
-
|
|
35
|
-
Use semantic CSS tokens for visual values. Raw values belong in the token files.
|
|
36
|
-
Projects sharing this ADS use the same token names, meanings, and value types;
|
|
37
|
-
their concrete values and theme overrides can differ. Reuse existing local values
|
|
38
|
-
when importing components/patterns. Existing font, text, spacing and other roles
|
|
39
|
-
take precedence over divergent upstream constants. Add genuinely missing shared
|
|
40
|
-
decisions, and import source token values only when adopting that theme is requested.
|
|
41
|
-
Shared token names and prefixes follow the ADS contract. All design values live
|
|
42
|
-
in the shared foundation; reuse meaningful project roles before adding new ones.
|
|
43
|
-
Components own `--ds-*` mappings and runtime mechanics, patterns own `--ux-*`, and
|
|
44
|
-
the showcase owns `--showcase-*`. These variables consume shared Data; they do
|
|
45
|
-
not create independent token catalogues. Private value sheets and namespace
|
|
46
|
-
registrations are not supported. Shared token files cannot assign runtime state
|
|
47
|
-
variables. Every shared token needs a real sample in a shared token scenario.
|
|
48
|
-
|
|
49
|
-
Foundation roles are enforced by `foundation-role`, `foundation-selector` and
|
|
50
|
-
`foundation-import`, alongside the regular token checks. Shared definitions
|
|
51
|
-
belong on the document root or explicit root themes; ordinary declarations belong
|
|
52
|
-
in `base.css`, and font-face descriptors in optional `fonts.css`. The entry imports
|
|
53
|
-
canonical sheets; those sheets cannot import another styling layer. Component
|
|
54
|
-
classes, IDs, data/ARIA hooks, contextual selectors, keyframes and scoped UI rules
|
|
55
|
-
are rejected in the foundation, including nested functional selectors. Raw visual
|
|
56
|
-
values and undefined token references are checked in native defaults too; literal
|
|
57
|
-
font-face metadata keeps its separate asset role.
|
|
58
|
-
|
|
59
|
-
`base.css` has three closed roles:
|
|
60
|
-
|
|
61
|
-
- Document defaults: root/body typography, canvas colors and theme behavior,
|
|
62
|
-
global text selection and document scrollbars.
|
|
63
|
-
- Native resets: permitted normalization properties and values, such as zero
|
|
64
|
-
spacing, inherited control typography, list resets and responsive replaced media.
|
|
65
|
-
- Global accessibility: universal `:focus-visible` outline rules, and reduced-motion
|
|
66
|
-
overrides inside `@media (prefers-reduced-motion: reduce)`.
|
|
67
|
-
|
|
68
|
-
The `foundation-role` check validates every selector branch, property and value.
|
|
69
|
-
Native selectors are not a bypass: token-backed button backgrounds, flex/grid
|
|
70
|
-
layout, component-specific focus rules and hover/disabled skins are rejected.
|
|
71
|
-
Shared token definitions belong in value sheets, not `base.css`. No project token
|
|
72
|
-
names are embedded in this policy. A zero-specificity `:where()` wrapper does not
|
|
73
|
-
change ownership. Put component design and animation in Linaria owners, and
|
|
74
|
-
scenario layout variations in typed review-helper props. Browser review
|
|
75
|
-
still checks the effects and accessibility of permitted defaults.
|
|
76
|
-
|
|
77
|
-
Own primitive markup, focus, hover, selected, disabled, loading, and motion in
|
|
78
|
-
the primitive. Use typed props for variations. Keep reusable structure and skin
|
|
79
|
-
in colocated Linaria blocks using `css` and `cx` from `@linaria/atomic`.
|
|
80
|
-
Linaria is required for component and pattern styling. This starter already
|
|
81
|
-
configures extraction in both builds; `ads init` does not install or configure it.
|
|
82
|
-
|
|
83
|
-
Use `ads-*` classes and `--ds-*` variables for primitives, and `ux-*` for patterns,
|
|
84
|
-
including the ADS-owned frame. Scenario files define no CSS or custom
|
|
85
|
-
class names and must not target component internals. Avoid inline visual styles and arbitrary visual
|
|
86
|
-
string props. Omit `style` from inherited DOM prop types. Document narrow measured
|
|
87
|
-
geometry exceptions if a component needs them.
|
|
88
|
-
|
|
89
|
-
Use semantic HTML and test relevant keyboard/focus behavior. Motion should
|
|
90
|
-
consume duration/easing tokens and respect reduced motion. Brand changes belong
|
|
91
|
-
in tokens or documented component hooks. The starter uses system fonts and has
|
|
92
|
-
no icon component; add a shared icon primitive when it is needed.
|
|
93
|
-
|
|
94
|
-
## Showcase
|
|
95
|
-
|
|
96
|
-
The showcase is a minimal shell plus an MCP client and Apps host, shipped with
|
|
97
|
-
ADS tooling. It discovers token/component/pattern/composition
|
|
98
|
-
scenarios from MCP tool results, invokes preview tools and responds to resource
|
|
99
|
-
notifications. The project does not author a second catalogue or browser app.
|
|
100
|
-
|
|
101
|
-
`ads mcp` starts the loopback website alongside stdio. Open the URL returned by
|
|
102
|
-
`ads_status`. Without an agent connection, `ads showcase` starts the same runtime
|
|
103
|
-
for browser use. Both transports share one configured preview compiler.
|
|
104
|
-
|
|
105
|
-
The shell owns section tabs, collapsible navigation, theme controls and the App
|
|
106
|
-
slot. Components, patterns, token values, scenarios, fixtures and their Linaria
|
|
107
|
-
styles remain project-owned. Only the sandboxed App loads and applies project
|
|
108
|
-
runtime, CSS and fonts, through MCP resources. App presentation comes from the
|
|
109
|
-
selected compiled scenario; reusable review layouts live in development-only `review/` through its separate public entry. Do not recreate
|
|
110
|
-
production widgets inside the client or scenario.
|
|
111
|
-
|
|
112
|
-
There are four sections: Tokens, Components, Patterns and Composition. There are
|
|
113
|
-
no required `TokensPage`/`ComponentsPage`/`PatternsPage`/`CompositionPage` files.
|
|
114
|
-
Legacy custom browsing pages remain checked when present, but new projects use
|
|
115
|
-
the built-in client. Its tooling CSS is separate from the project style contract.
|
|
116
|
-
|
|
117
|
-
The shared resource compiler builds one graph for all discovered scenarios on
|
|
118
|
-
first demand. Selections reuse the App and load their dependency closure. The
|
|
119
|
-
project's `mountScenario(Scenario, container)` adapter returns an unmount callback
|
|
120
|
-
that releases owned roots, listeners, timers, portals and workers. Switching or
|
|
121
|
-
rebuilding a scenario resets its state while retaining unchanged shared modules.
|
|
122
|
-
Host context selects the project theme; it does not replace the project's skin.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
Colocate development entries and fixture inputs:
|
|
126
|
-
|
|
127
|
-
```text
|
|
128
|
-
design-system/
|
|
129
|
-
tokens/
|
|
130
|
-
typography.css
|
|
131
|
-
Typography.ads.scenario.tsx
|
|
132
|
-
Typography.ads.fixture.ts
|
|
133
|
-
components/core/Button/
|
|
134
|
-
Button.tsx
|
|
135
|
-
Button.ads.scenario.tsx
|
|
136
|
-
Button.ads.fixture.ts
|
|
137
|
-
patterns/Editor/
|
|
138
|
-
Editor.tsx
|
|
139
|
-
Editor.ads.scenario.tsx
|
|
140
|
-
Editor.ads.fixture.ts
|
|
141
|
-
composition/Workspace/
|
|
142
|
-
Workspace.ads.scenario.tsx
|
|
143
|
-
Workspace.ads.fixture.ts
|
|
144
|
-
showcase/mcp/ Project compiler adapter
|
|
145
|
-
main.tsx
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Use `<Owner>.ads.scenario.tsx` and `<Owner>.ads.fixture.ts` for new entries.
|
|
149
|
-
The scenario exports a default independently mountable view and literal metadata
|
|
150
|
-
`export const scenario = { title: "Button states", covers: ["Button"] };`.
|
|
151
|
-
Token entries under the configured token directory declare
|
|
152
|
-
`export const scenario = { title: fixture.title, covers: ["TokenSamples"], samples: fixture.samples };`.
|
|
153
|
-
`TokenSamples` is any project-owned development-only review renderer, not a required name.
|
|
154
|
-
Its colocated fixture declares literal `samples: [{ token, property, probe }]`.
|
|
155
|
-
Each token must exist and have sample coverage; duplicate bindings, missing probes,
|
|
156
|
-
empty covers and value-only inspectors fail. The default entry passes the declared
|
|
157
|
-
samples to a rendered public review renderer's `samples` prop. No token-name/property mapping
|
|
158
|
-
or sample values are embedded in the tool. Display values come from foundation CSS;
|
|
159
|
-
probes are isolated verification inputs owned by the fixture.
|
|
160
|
-
|
|
161
|
-
The renderer marks the actual styled element with `data-ads-token` and
|
|
162
|
-
`data-ads-property`. In a browser, the App validates the declared property/value and
|
|
163
|
-
probe using `CSS.supports`, checks the sample is rendered, then temporarily changes
|
|
164
|
-
that token to its fixture probe. Its computed sample property must respond. Values
|
|
165
|
-
are restored before yielding to painting; hardcoded lookalikes fail. Source gates
|
|
166
|
-
prove the contract structure, not successful rendering. The browser check covers
|
|
167
|
-
the mounted scenario and theme; visual quality and other states still need review.
|
|
168
|
-
|
|
169
|
-
It imports real public UI through `@ds` and its local fixture. The adapter supplies
|
|
170
|
-
initial state, callbacks and simulated services. The default entry needs no
|
|
171
|
-
mandatory caller inputs or prior page initialization. Related parts may share a
|
|
172
|
-
scenario containing their required public parent. Larger composition scenarios
|
|
173
|
-
reuse production screen patterns; that screen reuse remains skill guidance.
|
|
174
|
-
|
|
175
|
-
IDs derive from the ADS-relative path: `components/core/Button/Button.ads.scenario.tsx` and
|
|
176
|
-
`components/core/Button.ads.scenario.tsx` both identify `components/core/Button`.
|
|
177
|
-
Use one form per owner. Renaming moves the ID. No manually assigned ID or parallel
|
|
178
|
-
registry is maintained. New fixture files use `<Owner>.ads.fixture.ts`; extra development
|
|
179
|
-
adapters use `<Owner>.ads.helpers.ts`. An empty fixture is valid without inputs.
|
|
180
|
-
Keep all `.ads.` files outside production imports and exports.
|
|
181
|
-
|
|
182
|
-
`scenario-contract`, `scenario-render` and `scenario-coverage` checks require valid
|
|
183
|
-
entries and reachable public render references for every public renderable
|
|
184
|
-
component/pattern, including unused exports and Linaria styled exports. Types, constants and utility functions
|
|
185
|
-
are excluded. Coverage is a static source policy; it does not prove runtime
|
|
186
|
-
mounting, correct props, every branch/state or visual parity. The older
|
|
187
|
-
`showcase-coverage` policy also checks application render references.
|
|
188
|
-
|
|
189
|
-
`token-scenario-reference` rejects undeclared token names in metadata and reachable
|
|
190
|
-
inputs. `token-scenario-render` rejects claimed tokens with no reachable input
|
|
191
|
-
reference; `token-scenario-coverage` requires every discovered shared token
|
|
192
|
-
to have coverage. A new or removed token therefore needs a scenario/fixture
|
|
193
|
-
update. All three are errors in `ads check`, run by `lint:ds` and the build.
|
|
194
|
-
Coverage is static reachability, not proof that every branch actually renders
|
|
195
|
-
or applies the right CSS property. Browser review still verifies the samples.
|
|
196
|
-
|
|
197
|
-
Scenarios and fixture helpers are development-only wherever colocated. Runtime
|
|
198
|
-
source and the public barrel cannot import or re-export them. Showcase/scenario
|
|
199
|
-
code defines no CSS, custom classes or standalone native controls; use public ADS
|
|
200
|
-
APIs. A single direct native child can supply semantics to a public runtime slot
|
|
201
|
-
when source tracing proves that owner clones the exact child with its own props.
|
|
202
|
-
An `asChild` flag alone is not evidence; scenario styling remains forbidden.
|
|
203
|
-
Neither ADS implementations nor scenarios import application code. Live business
|
|
204
|
-
data belongs to application adapters; ADS receives inputs or injected callbacks.
|
|
205
|
-
Direct global `fetch`, XHR, WebSocket and EventSource use is rejected. Renderer
|
|
206
|
-
workers, lazy imports and injected services remain supported; custom HTTP clients
|
|
207
|
-
and computed API access need project checks and review.
|
|
208
|
-
|
|
209
|
-
Tests may import local fixtures. Load real foundation CSS in DOM/browser tests
|
|
210
|
-
instead of assigning shared tokens in JavaScript. Full application harnesses
|
|
211
|
-
belong in application test support. Run ADS/project checks before application,
|
|
212
|
-
preview builds; review meaningful states in both themes and sizes.
|
|
213
|
-
|
|
214
|
-
## Branding
|
|
215
|
-
|
|
216
|
-
Keep original artwork, variants, usage, credits, and licenses in
|
|
217
|
-
`design-system/assets/brand/`. This starter has only guidance there, no artwork.
|
|
218
|
-
Font assets belong in `assets/fonts/`; add optional `tokens/fonts.css` first in
|
|
219
|
-
the import-only foundation entry. The fixed import order is fonts (when
|
|
220
|
-
present), colors, typography, spacing, elevation, base.
|
|
221
|
-
|
|
222
|
-
Select an SVG with `assets.iconSource` in `ds.config.json`, relative to the ADS
|
|
223
|
-
folder. Initialized builds run checks and Oxlint, then `ads assets`, then existing
|
|
224
|
-
build steps. Standard icons go into ignored `.ds/assets/`; integrate that
|
|
225
|
-
directory with the application's asset mount and reject duplicate paths.
|
|
226
|
-
Application metadata and custom platform exports remain project-owned. See
|
|
227
|
-
[brand guidance](design-system/assets/brand/README.md).
|
|
228
|
-
|
|
229
|
-
## Component guides and rules
|
|
230
|
-
|
|
231
|
-
Keep detailed API, examples, interactions, token hooks, tests, and source credits
|
|
232
|
-
in a README beside the component. When adapting another library, record its
|
|
233
|
-
version, author, links, concrete influences, and agreed differences. Shared
|
|
234
|
-
architecture belongs here rather than duplicating each component contract.
|
|
235
|
-
|
|
236
|
-
General Oxlint and Biome CSS checks are included. They do not enforce the entire
|
|
237
|
-
ownership or token contract. Add component-local lint only for concrete,
|
|
238
|
-
statically provable misuse; register tooling centrally and keep it outside the
|
|
239
|
-
runtime barrel. Core checks must work without any particular component library.
|
|
240
|
-
Use configured token and ownership guards as the system grows; bring applicable
|
|
241
|
-
component-specific rules with an external item and register them in project
|
|
242
|
-
tooling. Configure project plugins, rules, and scoped `oxlint.overrides` in
|
|
243
|
-
`ds.config.json`. Overrides configure Oxlint, not independent `ads check` policies.
|
|
244
|
-
Use explicit `boundaries` for documented renderer properties and non-state hooks.
|
|
245
|
-
|
|
246
|
-
## Verification
|
|
247
|
-
|
|
248
|
-
Run `npm run build` after adding or changing components. Add meaningful tests
|
|
249
|
-
for stateful behavior, accessibility, gestures, or async lifecycle where needed.
|
|
250
|
-
Run `npm run dev` to inspect the real showcase. A screenshot alone does not
|
|
251
|
-
verify interaction or animation. Generated output and dependencies are not source.
|
|
252
|
-
|
|
253
|
-
Shared behavior may live in `controllers/<Name>/`; private controllers stay with
|
|
254
|
-
their component/pattern. Use the configured framework and declared dependencies.
|
|
255
|
-
Behavior contracts/checks are development-only, and scenario `exercises` links
|
|
256
|
-
public hooks to demonstrations separately from rendered `covers`. Read the
|
|
257
|
-
installed ADS package's `docs/BEHAVIORS.md` or MCP `ads://guides/behaviors` before
|
|
258
|
-
registering guarantees, profiles and verification.
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
# Starter native design system
|
|
2
|
-
|
|
3
|
-
This private React or Preact TypeScript workspace contains semantic CSS tokens, a project-owned
|
|
4
|
-
token review renderer, a public barrel, Linaria extraction and a preview compiler
|
|
5
|
-
adapter, plus one example of each layer to build on: two token groups (Color; Space, type &
|
|
6
|
-
motion) and a Brand preview, components in three groups (`components/Actions/Button`,
|
|
7
|
-
`components/Content/Logo`, `components/Forms/TextField`), one pattern
|
|
8
|
-
(`patterns/Search/SearchBar`) and one composition (`composition/Search/SearchPage`),
|
|
9
|
-
plus placeholder brand artwork in `assets/brand/` (a logo with its dark-theme
|
|
10
|
-
variant, and the app icon that `assets.iconSource` names). Rename, restyle or
|
|
11
|
-
replace them as the product's own; it has no fonts. The minimal showcase shell and MCP client
|
|
12
|
-
come from ADS tooling.
|
|
13
|
-
|
|
14
|
-
Read the local [contract](ADS.md) and the
|
|
15
|
-
[architecture](https://github.com/reqvire-org/ads/blob/main/docs/ARCHITECTURE.md).
|
|
16
|
-
|
|
17
|
-
## Start
|
|
18
|
-
|
|
19
|
-
Copy the contents of `bootstrap-ds/`, including dotfiles, into a new project.
|
|
20
|
-
It is the React starter. For Preact, then copy `bootstrap-ds-preact/` over it
|
|
21
|
-
(its package, compiler settings, scenario mount, token preview and scenario
|
|
22
|
-
types) and delete the React `package-lock.json`. The installed `ads-designer`
|
|
23
|
-
skill contains the same files in `assets/bootstrap-ds/` and
|
|
24
|
-
`assets/bootstrap-ds-preact/`. Set the project name in `package.json`. Install Bun 1.4.1+ for ADS tooling and previews. The application can keep its
|
|
25
|
-
Node/npm build pipeline. Use a current ADS release.
|
|
26
|
-
|
|
27
|
-
```sh
|
|
28
|
-
npx @reqvire-org/ads init --framework react # or preact
|
|
29
|
-
npm install
|
|
30
|
-
npm run build
|
|
31
|
-
npm run dev:showcase
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
For unreleased tooling, run init using the real local package:
|
|
35
|
-
|
|
36
|
-
```sh
|
|
37
|
-
ads_tool_package="/absolute/path/to/reqvire-org-ads-0.3.1.tgz"
|
|
38
|
-
npx --yes --package "$ads_tool_package" ads init --framework react --tool-package "$ads_tool_package"
|
|
39
|
-
npm install
|
|
40
|
-
npm run build
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
For a new Bun workspace, declare Bun in `packageManager`, omit the copied npm
|
|
44
|
-
lockfile and translate nested npm scripts to `bun --bun run`. Initialize with
|
|
45
|
-
`bunx @reqvire-org/ads init`. Init detects existing
|
|
46
|
-
Bun projects and preserves their scripts/lockfiles. Use `bun install` and
|
|
47
|
-
`bun --bun run build`/`bun --bun run dev:showcase`. Node is unnecessary with Bun
|
|
48
|
-
1.4.1+. ADS supplies its Bun preview compiler independently of the project build.
|
|
49
|
-
|
|
50
|
-
For an existing application, merge only the ADS source and required extraction,
|
|
51
|
-
aliases and preview adapter. Preserve its framework, entry points and build.
|
|
52
|
-
Each starter declares its framework in `ds.config.json`. For an existing app
|
|
53
|
-
without a saved ADS framework, use `ads init --framework react` or
|
|
54
|
-
`--framework preact`. Init records that choice and adds that framework's token
|
|
55
|
-
preview and scenario mount without migrating the app or rewriting its compiler. Subsequent init runs reuse the saved choice.
|
|
56
|
-
Init adds missing foundation files and connects architectural checks; it does
|
|
57
|
-
not configure Linaria or generate product component source. Generated `.ds/` files are
|
|
58
|
-
ignored; original artwork and provenance belong in `assets/brand/`.
|
|
59
|
-
|
|
60
|
-
## Inspect and add UI
|
|
61
|
-
|
|
62
|
-
When an agent already runs `ads mcp`, open its `ads_status.showcaseUrl`. MCP starts
|
|
63
|
-
the website automatically. Otherwise `npm run dev:showcase` runs `ads showcase`; give it a port the ADS MCP
|
|
64
|
-
does not use, since both serve a showcase.
|
|
65
|
-
Its shell is minimal: tabs, collapsible left menu, theme switch and App slot.
|
|
66
|
-
Its MCP client discovers entries, invokes preview tools and follows notifications.
|
|
67
|
-
There are no required TokensPage/ComponentsPage/PatternsPage/CompositionPage
|
|
68
|
-
files, and no separate project browser app to implement or rebuild.
|
|
69
|
-
|
|
70
|
-
The `tokens/Color.ads.scenario.tsx` and `tokens/SpaceTypeMotion.ads.scenario.tsx`
|
|
71
|
-
groups and their colocated fixtures visually demonstrate all starter token values,
|
|
72
|
-
one tile per token with its current value. The fixture owns `{ token, property, probe }` bindings;
|
|
73
|
-
the development-only `TokenPreview` renderer, exported through `@ds/review`, owns their presentation and applies the real CSS
|
|
74
|
-
variables. Add/remove samples alongside token definitions. `ads check` rejects
|
|
75
|
-
missing coverage and invented names; the App verifies the declared CSS bindings
|
|
76
|
-
in the browser. Extend or replace the project-owned review renderer as your tokens evolve.
|
|
77
|
-
`ads_prepare_token_samples` can prepare a fixture patch from explicit project
|
|
78
|
-
property/probe bindings. It preserves existing samples and reports unmapped tokens;
|
|
79
|
-
it does not guess how a new value should look. Design values belong in the shared
|
|
80
|
-
foundation. Component/pattern variables map shared roles; they do not define
|
|
81
|
-
independent token catalogues. See [ADS.md](ADS.md).
|
|
82
|
-
|
|
83
|
-
Create a component under `design-system/components/`, export it through `@ds`,
|
|
84
|
-
and colocate `<Owner>.ads.scenario.tsx` plus `<Owner>.ads.fixture.ts`. Reusable compositions belong under `patterns/`; larger
|
|
85
|
-
scenarios live under `composition/`. Each entry mounts independently with its
|
|
86
|
-
fixture inputs and state/callback adapter. Use public ADS APIs and owned Linaria
|
|
87
|
-
styles, keeping business data/services in the application.
|
|
88
|
-
|
|
89
|
-
`ds.config.json` selects ADS's native Bun compiler. MCP prewarms discovered
|
|
90
|
-
views sequentially, prioritizes foreground selections, and watches owner code,
|
|
91
|
-
styles, fixtures and assets. The App loads the selected dependency closure and
|
|
92
|
-
reuses unchanged runtime/CSS/font resources across selections. The MCP client
|
|
93
|
-
refreshes successful revisions inside that App; failures show diagnostics and
|
|
94
|
-
stale retained output. Changing a selected view's dependency closure unmounts its previous state;
|
|
95
|
-
background warming retains unchanged mounted views. `showcase/mcp/main.tsx` exports `mountScenario(Scenario, container)` and
|
|
96
|
-
returns an unmount callback; it is not the shell. Keep the saved `framework`,
|
|
97
|
-
compiler and mount adapter consistent.
|
|
98
|
-
Managed sessions own their graph output; standalone prebuilds cannot replace it.
|
|
99
|
-
Verified generated graph snapshots preserve warm-start reuse across sessions.
|
|
100
|
-
|
|
101
|
-
The application and previews use the same foundation CSS and Linaria pipeline.
|
|
102
|
-
The source barrel loads the foundation once. The private `build:lib` script uses
|
|
103
|
-
Vite library mode plus declarations as a source compile check; this is not a
|
|
104
|
-
published UI library. General CSS checks use pinned Biome; architectural and
|
|
105
|
-
registered component checks come from initialized ADS tooling.
|
|
106
|
-
|
|
107
|
-
Detailed public API, behavior, tokens, tests, credits and notices belong in each
|
|
108
|
-
owner's local README. The starter values and system fonts are defaults; the
|
|
109
|
-
receiving project owns their identity. Import/adapt additional source explicitly
|
|
110
|
-
from a user-selected external repository, preserving revisions and licenses.
|
|
111
|
-
|
|
112
|
-
## Validation
|
|
113
|
-
|
|
114
|
-
`npm run build` runs lint, type checking and the public-source compile check.
|
|
115
|
-
`npm run build:showcase` optionally prebuilds the shared preview graph; normal
|
|
116
|
-
inspection builds it automatically, then loads selected entries. Browser review
|
|
117
|
-
still checks layout, accessibility, keyboard/focus, states, themes and motion. A clean
|
|
118
|
-
build or delivered HTML alone does not establish those behaviors.
|
|
119
|
-
Opt-in MCP editing uses owner Git patches. `ads_prepare_patch` creates a temporary
|
|
120
|
-
owner draft/diff; `ads_apply_transaction` validates bounded coupled owner patches
|
|
121
|
-
against one final candidate. Preparation changes no live source. Keep all guards
|
|
122
|
-
and review the rendered result after applying.
|