@reqvire-org/ads 0.3.43 → 0.3.44
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 +5 -1
- package/dist/assets.mjs +48 -2
- package/dist/bootstrap-ds/ADS.md +2 -2
- package/dist/bootstrap-ds/README.md +6 -4
- package/dist/bootstrap-ds/design-system/assets/brand/README.md +26 -19
- package/dist/bootstrap-ds/design-system/assets/brand/app-icon.svg +4 -0
- package/dist/bootstrap-ds/design-system/assets/brand/logo.dark.svg +6 -0
- package/dist/bootstrap-ds/design-system/assets/brand/logo.svg +6 -0
- package/dist/bootstrap-ds/design-system/components/Content/Logo/Logo.ads.fixture.ts +1 -0
- package/dist/bootstrap-ds/design-system/components/Content/Logo/Logo.ads.scenario.tsx +12 -0
- package/dist/bootstrap-ds/design-system/components/Content/Logo/Logo.tsx +41 -0
- package/dist/bootstrap-ds/design-system/components/Content/Logo/README.md +10 -0
- package/dist/bootstrap-ds/design-system/index.ts +1 -0
- package/dist/bootstrap-ds/design-system/review/brand-preview/BrandPreview.tsx +115 -0
- package/dist/bootstrap-ds/design-system/review/index.ts +1 -0
- package/dist/bootstrap-ds/design-system/tokens/Brand.ads.fixture.ts +12 -0
- package/dist/bootstrap-ds/design-system/tokens/Brand.ads.scenario.tsx +4 -0
- package/dist/bootstrap-ds/ds.config.json +2 -1
- package/dist/bootstrap-ds-preact/ds.config.json +2 -1
- package/dist/brand-assets.mjs +136 -3
- package/dist/check.mjs +4 -2
- package/dist/config.mjs +49 -1
- package/dist/init.mjs +3 -2
- package/dist/mcp/preview-widget.bundle.js +1 -1
- package/dist/mcp/project-widget.bundle.js +1 -1
- package/dist/mcp/server.mjs +5 -2
- package/dist/preview-bun.mjs +4 -2
- package/dist/preview-resources.mjs +1 -1
- package/dist/scenarios.mjs +11 -4
- package/dist/skills/ads-designer/SKILL.md +9 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/ADS.md +2 -2
- package/dist/skills/ads-designer/assets/bootstrap-ds/README.md +6 -4
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/brand/README.md +26 -19
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/brand/app-icon.svg +4 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/brand/logo.dark.svg +6 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/assets/brand/logo.svg +6 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/Content/Logo/Logo.ads.fixture.ts +1 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/Content/Logo/Logo.ads.scenario.tsx +12 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/Content/Logo/Logo.tsx +41 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/components/Content/Logo/README.md +10 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/index.ts +1 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/review/brand-preview/BrandPreview.tsx +115 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/review/index.ts +1 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/Brand.ads.fixture.ts +12 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/Brand.ads.scenario.tsx +4 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/ds.config.json +2 -1
- package/dist/skills/ads-designer/assets/bootstrap-ds-preact/ds.config.json +2 -1
- package/dist/skills/ads-designer/references/branding.md +89 -0
- package/dist/skills/ads-import/references/branding.md +10 -3
- package/dist/token-fixtures.mjs +2 -2
- package/docs/ADS.md +5 -2
- package/docs/CHANGELOG.md +35 -12
- package/docs/GUIDE.md +41 -1
- package/package.json +1 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { css, cx } from "@linaria/atomic";
|
|
2
|
+
|
|
3
|
+
export interface BrandArtwork {
|
|
4
|
+
name: string;
|
|
5
|
+
use: string;
|
|
6
|
+
/** The default (light theme) artwork's URL. */
|
|
7
|
+
src: string;
|
|
8
|
+
/** Its dark-theme variant, `<name>.dark.svg`, when it has one. */
|
|
9
|
+
darkSrc?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface BrandPreviewProps {
|
|
12
|
+
title: string;
|
|
13
|
+
artwork: readonly BrandArtwork[];
|
|
14
|
+
/** The `assets.iconSource` master, shown at the generated web icon sizes. */
|
|
15
|
+
icon?: { name: string; src: string; sizes: readonly number[] };
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const page = css`
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
gap: var(--space-12);
|
|
22
|
+
padding: var(--space-8);
|
|
23
|
+
`;
|
|
24
|
+
const heading = css`
|
|
25
|
+
margin: 0;
|
|
26
|
+
font-size: var(--text-base);
|
|
27
|
+
font-weight: var(--weight-semibold);
|
|
28
|
+
color: var(--text-body);
|
|
29
|
+
`;
|
|
30
|
+
const grid = css`
|
|
31
|
+
display: grid;
|
|
32
|
+
grid-template-columns: repeat(auto-fill, minmax(calc(var(--space-16) * 8), 1fr));
|
|
33
|
+
gap: var(--space-8);
|
|
34
|
+
`;
|
|
35
|
+
const tile = css`
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
gap: var(--space-4);
|
|
39
|
+
padding: var(--space-8);
|
|
40
|
+
border: var(--border-w) solid var(--border-default);
|
|
41
|
+
border-radius: var(--radius-md);
|
|
42
|
+
background: var(--bg-surface);
|
|
43
|
+
`;
|
|
44
|
+
const stage = css`
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
min-height: calc(var(--space-16) * 3);
|
|
49
|
+
`;
|
|
50
|
+
const art = css`
|
|
51
|
+
max-width: 100%;
|
|
52
|
+
max-height: calc(var(--space-16) * 3);
|
|
53
|
+
`;
|
|
54
|
+
const label = css`
|
|
55
|
+
font-size: var(--text-sm);
|
|
56
|
+
color: var(--text-muted);
|
|
57
|
+
overflow-wrap: anywhere;
|
|
58
|
+
`;
|
|
59
|
+
// Paired artwork shows the variant of the current theme, as the UI does.
|
|
60
|
+
const light = css`:root[data-theme="dark"] & { display: none; }`;
|
|
61
|
+
const dark = css`
|
|
62
|
+
display: none;
|
|
63
|
+
:root[data-theme="dark"] & { display: block; }
|
|
64
|
+
`;
|
|
65
|
+
const icons = css`
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-wrap: wrap;
|
|
68
|
+
align-items: flex-end;
|
|
69
|
+
gap: var(--space-8);
|
|
70
|
+
`;
|
|
71
|
+
const iconTile = css`
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
align-items: center;
|
|
75
|
+
gap: var(--space-2);
|
|
76
|
+
`;
|
|
77
|
+
// Small sizes show at their real pixels; large ones are scaled down to fit the tile.
|
|
78
|
+
const iconImage = css`
|
|
79
|
+
max-width: calc(var(--space-16) * 4);
|
|
80
|
+
max-height: calc(var(--space-16) * 4);
|
|
81
|
+
`;
|
|
82
|
+
|
|
83
|
+
/** Development-only review of the brand artwork and the app icon at its generated sizes. */
|
|
84
|
+
export function BrandPreview({ title, artwork, icon }: BrandPreviewProps) {
|
|
85
|
+
return (
|
|
86
|
+
<section aria-label={title} className={cx("ux-brand-preview", page)}>
|
|
87
|
+
<h1 className={heading}>{title}</h1>
|
|
88
|
+
<div className={grid}>
|
|
89
|
+
{artwork.map(item => (
|
|
90
|
+
<article key={item.name} className={tile} aria-label={item.name}>
|
|
91
|
+
<div className={stage}>
|
|
92
|
+
<img className={cx(art, item.darkSrc ? light : undefined)} src={item.src} alt="" />
|
|
93
|
+
{item.darkSrc ? <img className={cx(art, dark)} src={item.darkSrc} alt="" /> : null}
|
|
94
|
+
</div>
|
|
95
|
+
<code className={label}>{item.darkSrc ? `${item.name} · ${item.name.replace(/\.svg$/, ".dark.svg")}` : item.name}</code>
|
|
96
|
+
<small className={label}>{item.use}</small>
|
|
97
|
+
</article>
|
|
98
|
+
))}
|
|
99
|
+
</div>
|
|
100
|
+
{icon ? (
|
|
101
|
+
<div className={tile} aria-label="App icon">
|
|
102
|
+
<div className={icons}>
|
|
103
|
+
{icon.sizes.map(size => (
|
|
104
|
+
<div key={size} className={iconTile}>
|
|
105
|
+
<img className={iconImage} src={icon.src} alt="" width={size} height={size} />
|
|
106
|
+
<small className={label}>{size}px</small>
|
|
107
|
+
</div>
|
|
108
|
+
))}
|
|
109
|
+
</div>
|
|
110
|
+
<code className={label}>{icon.name}</code>
|
|
111
|
+
</div>
|
|
112
|
+
) : null}
|
|
113
|
+
</section>
|
|
114
|
+
);
|
|
115
|
+
}
|
package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/Brand.ads.fixture.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Branding
|
|
2
|
+
|
|
3
|
+
Brand identity is token values plus artwork. ADS fixes where each lives and checks
|
|
4
|
+
that it stays complete; the project chooses the look.
|
|
5
|
+
|
|
6
|
+
## Token values
|
|
7
|
+
|
|
8
|
+
Change values in the existing token files, never names: `--accent`,
|
|
9
|
+
`--font-sans`, `--radius-md` and the other shared roles keep their meaning across
|
|
10
|
+
projects. `--brand-*` and other foreign prefixes fail checks. Theme variants
|
|
11
|
+
redefine the same names under `:root[data-theme="dark"]`. Components read shared
|
|
12
|
+
roles, so a brand change is a token change.
|
|
13
|
+
|
|
14
|
+
## Artwork
|
|
15
|
+
|
|
16
|
+
Keep every original SVG in `assets/brand/`. Fixed colors are allowed inside the
|
|
17
|
+
artwork; component styles still use tokens.
|
|
18
|
+
|
|
19
|
+
- **Document it.** `assets/brand/README.md` names each file, what it is for, the
|
|
20
|
+
backgrounds it suits, its credits and its license. `ads check` warns about an
|
|
21
|
+
undescribed file (`brand-readme`) and a README without a license
|
|
22
|
+
(`brand-license`).
|
|
23
|
+
- **Pair light and dark variants by name.** `logo.svg` is the default (light
|
|
24
|
+
theme); `logo.dark.svg` is the same artwork for dark backgrounds. The component
|
|
25
|
+
that shows it renders both and hides one with a `:root[data-theme="dark"] &`
|
|
26
|
+
selector, so the theme switch needs no script.
|
|
27
|
+
- **Show it in a component.** A logo appears in the UI through a project
|
|
28
|
+
component (the starter's `components/Content/Logo`) that imports the SVG with
|
|
29
|
+
`?url`. Artwork that nothing uses is reported (`brand-unused`).
|
|
30
|
+
- **Preview it.** A brand scenario in the token folder (the starter's
|
|
31
|
+
`tokens/Brand.ads.scenario.tsx`, rendered by the review `BrandPreview`) shows
|
|
32
|
+
every artwork on light and dark surfaces and the app icon at its sizes. Artwork
|
|
33
|
+
missing from it is reported (`brand-preview`).
|
|
34
|
+
|
|
35
|
+
## Web icons
|
|
36
|
+
|
|
37
|
+
Set one square SVG master as `assets.iconSource`. Every build's `ads assets`
|
|
38
|
+
writes `favicon.svg`, `favicon.ico`, `apple-touch-icon.png`, `icon-192.png` and
|
|
39
|
+
`icon-512.png` to ignored `.ds/assets/`; the application's bundler serves them and
|
|
40
|
+
keeps the manifest.
|
|
41
|
+
|
|
42
|
+
## Committed targets
|
|
43
|
+
|
|
44
|
+
Native launchers, tray icons and upload exports must exist without running ADS
|
|
45
|
+
(a Rust `include_image!`, a Tauri bundle, a file uploaded by hand). Declare them in
|
|
46
|
+
`assets.targets`; each renders one master to a project path that is committed:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{ "assets": { "targets": [
|
|
50
|
+
{ "from": "assets/brand/app-icon.svg", "to": "app/icons/icon.svg" },
|
|
51
|
+
{ "from": "assets/brand/app-icon.svg", "to": "app/icons/128x128.png", "size": 128 },
|
|
52
|
+
{ "from": "assets/brand/banner.svg", "to": "exports/banner.png", "width": 1200, "height": 630 },
|
|
53
|
+
{ "from": "assets/brand/app-icon.svg", "to": "exports/upload.png", "size": 1024, "background": "#FFFFFF" },
|
|
54
|
+
{ "from": "assets/brand/app-icon.svg", "to": "app/icons/icon.ico", "sizes": [16, 32, 48, 256] },
|
|
55
|
+
{ "from": "assets/brand/app-icon.svg", "to": "app/icons/icon.icns", "sizes": [16, 32, 64, 128, 256, 512, 1024] }
|
|
56
|
+
] } }
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The output extension selects the format: `.svg` copies the master, `.png` renders
|
|
60
|
+
one `size` or a `width` × `height` (artwork of another shape is centred),
|
|
61
|
+
`.ico` and `.icns` bundle several `sizes`. `background` fills transparency, for
|
|
62
|
+
platforms that turn transparent corners black.
|
|
63
|
+
|
|
64
|
+
`ads assets` renders only targets whose master or settings changed and records
|
|
65
|
+
each output in the committed `assets/generated.json`. `ads check` fails
|
|
66
|
+
(`brand-output-stale`) when an output is missing, was changed by hand, or no
|
|
67
|
+
longer matches its master or settings. It compares recorded hashes and renders
|
|
68
|
+
nothing, so it is fast and gives the same answer on every machine. Commit the
|
|
69
|
+
outputs and `assets/generated.json` together.
|
|
70
|
+
|
|
71
|
+
## Glyph sets
|
|
72
|
+
|
|
73
|
+
UI icons drawn as SVG (one `currentColor` stroke each) live in their own folder,
|
|
74
|
+
for example `assets/glyphs/`, with their license file. `assets.glyphs` turns them
|
|
75
|
+
into one typed module:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{ "assets": { "glyphs": {
|
|
79
|
+
"source": "assets/glyphs",
|
|
80
|
+
"output": "components/Content/Icon/glyphs.ts",
|
|
81
|
+
"attributes": { "fill": "none", "stroke": "currentColor", "stroke-width": "1.5" }
|
|
82
|
+
} } }
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Each file becomes `glyphs[name]` with `attributes` added where its `<svg>` does not
|
|
86
|
+
set them. `aliases.json` in the folder maps extra names to existing glyphs
|
|
87
|
+
(`glyphAliases`); a file named like an alias is skipped. `ads assets` writes the
|
|
88
|
+
module; `ads check` fails (`brand-output-stale`) when it is out of date. The icon
|
|
89
|
+
component and its catalogue scenario read `glyphs` and `glyphAliases`.
|
|
@@ -10,9 +10,12 @@ icon-source setting. Resolve named assets, or ask which discovered variants to
|
|
|
10
10
|
import when selection is missing. Preserve the receiving project's artwork and
|
|
11
11
|
icon source unless replacing them is part of the request.
|
|
12
12
|
|
|
13
|
-
Copy selected masters into `design-system/assets/brand
|
|
13
|
+
Copy selected masters into `design-system/assets/brand/`, with their dark-theme
|
|
14
|
+
variants (`<name>.dark.svg`) when the source pairs them. Update its local README
|
|
14
15
|
with usage, suitable backgrounds, source repository/file links and revision,
|
|
15
|
-
authors, credits, and applicable license notices
|
|
16
|
+
authors, credits, and applicable license notices, and add each imported file to the
|
|
17
|
+
destination's brand scenario (`brand: true` in the token folder). `ads check` warns
|
|
18
|
+
about artwork that is undescribed, unlicensed, unpreviewed or unused. Keep fixed colors and geometry
|
|
16
19
|
in original SVG artwork. Licensed fonts needed by an explicit theme import live
|
|
17
20
|
in `assets/fonts/`; declarations use `tokens/fonts.css`.
|
|
18
21
|
|
|
@@ -27,7 +30,11 @@ When the selected artwork should supply the app icon, set only
|
|
|
27
30
|
for example `assets/brand/app-icon.svg`. The source must be an SVG inside
|
|
28
31
|
`assets/brand/`. Use the real installed tool's `ads assets` command to generate
|
|
29
32
|
favicon SVG/ICO, an Apple touch icon, and 192/512px icons in ignored `.ds/assets/`.
|
|
30
|
-
|
|
33
|
+
Web icons need no further configuration. Committed native or upload outputs
|
|
34
|
+
(`assets.targets`) and glyph sets (`assets.glyphs`) belong to the destination: add
|
|
35
|
+
targets for imported artwork only when requested, run `ads assets`, and commit the
|
|
36
|
+
outputs with `assets/generated.json`. Never copy the source's generated files or
|
|
37
|
+
its target list.
|
|
31
38
|
|
|
32
39
|
Integrate that generated directory into the target's existing asset mount/copy
|
|
33
40
|
step without replacing unrelated public assets. Duplicate final output paths
|
package/dist/token-fixtures.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { textDiff } from "./mcp/text-diff.mjs";
|
|
|
8
8
|
export function reconcileTokenSamples(options, {id, bindings = []}) {
|
|
9
9
|
if (bindings.length && !validTokenSamples(bindings)) throw new Error("Bindings need distinct {token, property, probe} CSS samples.");
|
|
10
10
|
const inventory = inspectTokens(options.root), registry = inspectScenarios(options), units = inspectUnits(options);
|
|
11
|
-
const scenario = registry.scenarios.find(entry => entry.id === id && entry.kind === "tokens");
|
|
11
|
+
const scenario = registry.scenarios.find(entry => entry.id === id && entry.kind === "tokens" && !entry.brand);
|
|
12
12
|
if (!scenario) throw new Error("Select an exact token scenario ID from ads_scenarios.");
|
|
13
13
|
const owner = units.owner(units.relative(scenario.file));
|
|
14
14
|
const owned = new Set(inventory.tokens.filter(token => token.owner === owner).map(token => token.name));
|
|
@@ -17,7 +17,7 @@ export function reconcileTokenSamples(options, {id, bindings = []}) {
|
|
|
17
17
|
const samples = new Map(scenario.samples.filter(sample => owned.has(sample.token)).map(sample => [`${sample.token}:${sample.property}`, sample]));
|
|
18
18
|
for (const sample of bindings) samples.set(`${sample.token}:${sample.property}`, sample);
|
|
19
19
|
if (!samples.size) throw new Error("A token scenario needs at least one real sample; supply a binding or remove the obsolete scenario with an owner patch.");
|
|
20
|
-
const represented = new Set(registry.scenarios.filter(entry => entry.kind === "tokens" && entry.id !== id).flatMap(entry => entry.samples.map(sample => sample.token)));
|
|
20
|
+
const represented = new Set(registry.scenarios.filter(entry => entry.kind === "tokens" && entry.id !== id).flatMap(entry => (entry.samples ?? []).map(sample => sample.token)));
|
|
21
21
|
for (const sample of samples.values()) represented.add(sample.token);
|
|
22
22
|
const unresolved = [...owned].filter(name => !represented.has(name));
|
|
23
23
|
const source = tokenSampleSource(options,scenario);
|
package/docs/ADS.md
CHANGED
|
@@ -321,8 +321,11 @@ still checks the effects and accessibility of permitted defaults.
|
|
|
321
321
|
|
|
322
322
|
|
|
323
323
|
Store original branding and its usage, credits, and licenses in
|
|
324
|
-
`assets/brand/`, and fonts in `assets/fonts/`. Configure generated icons
|
|
325
|
-
|
|
324
|
+
`assets/brand/`, and fonts in `assets/fonts/`. Configure generated web icons,
|
|
325
|
+
committed targets (`assets.targets`), glyph sets (`assets.glyphs`) and asset
|
|
326
|
+
mounts as described in the [branding guide](GUIDE.md#branding); `ads check` fails
|
|
327
|
+
on stale committed outputs and warns about undescribed, unlicensed, unpreviewed or
|
|
328
|
+
unused artwork.
|
|
326
329
|
|
|
327
330
|
Before importing, compare the selected source and its dependencies with the
|
|
328
331
|
destination's framework, public APIs, shared tokens, styling ownership and
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,34 +1,57 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.3.
|
|
3
|
+
## 0.3.44
|
|
4
4
|
|
|
5
5
|
<!-- ads-local-tests:start -->
|
|
6
|
-
Local verification: **
|
|
7
|
-
Tested commit: `
|
|
8
|
-
Completed 2026-10-
|
|
6
|
+
Local verification: **633/633 passed** with `ADS_TEST_BUN=1 npm test`.
|
|
7
|
+
Tested commit: `25adabb839e2bdf081047489f991b8bbe346a0ca`; Node v24.13.0, Bun 1.4.1.
|
|
8
|
+
Completed 2026-10-29T20:12:16.640Z (1076 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.44",
|
|
14
|
+
"commit": "25adabb839e2bdf081047489f991b8bbe346a0ca",
|
|
15
|
+
"sourceSha256": "c55def6d682c9663ae3452b30d13730cf5601325b63f02877e794f58401d91a8",
|
|
16
16
|
"command": "ADS_TEST_BUN=1 npm test",
|
|
17
17
|
"result": "pass",
|
|
18
|
-
"tests":
|
|
19
|
-
"pass":
|
|
18
|
+
"tests": 633,
|
|
19
|
+
"pass": 633,
|
|
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-29T20:12:16.640Z",
|
|
26
|
+
"durationMs": 1076386,
|
|
27
|
+
"logSha256": "054231c8182cca1fa2ad782d15be708f5f8bf109754dfe45c459dbefc47ddc94"
|
|
28
28
|
}
|
|
29
29
|
-->
|
|
30
30
|
<!-- ads-local-tests:end -->
|
|
31
31
|
|
|
32
|
+
- Committed brand targets: `assets.targets` renders SVG masters from
|
|
33
|
+
`assets/brand/` to project paths as SVG copies, PNGs (square or width × height,
|
|
34
|
+
optional background), ICO and ICNS files, for native launchers, tray icons and
|
|
35
|
+
upload exports. `ads assets` re-renders only what changed and records each output
|
|
36
|
+
in the committed `assets/generated.json`; `ads check` fails (`brand-output-stale`)
|
|
37
|
+
on missing, hand-edited or outdated outputs by comparing hashes, without rendering.
|
|
38
|
+
- Glyph sets: `assets.glyphs` turns a folder of UI icon SVGs (and `aliases.json`)
|
|
39
|
+
into one typed module with default root attributes, kept fresh the same way.
|
|
40
|
+
- Brand checks warn about artwork that is undescribed in `assets/brand/README.md`,
|
|
41
|
+
unlicensed, missing from a brand preview or unused.
|
|
42
|
+
- Brand previews: a token-folder scenario marked `brand: true` previews artwork
|
|
43
|
+
without token samples and is not audited as tokens. Previews may import the ADS's
|
|
44
|
+
own `assets/` files. Scenario metadata reads `true`/`false` literals.
|
|
45
|
+
- Fix the Bun preview compiler giving a `?raw` import the URL of the same file when
|
|
46
|
+
another preview imports it with `?url` (a brand preview and a component reading
|
|
47
|
+
the SVG's geometry).
|
|
48
|
+
- The starter has placeholder brand artwork (a logo with its `logo.dark.svg`
|
|
49
|
+
variant and an app icon set as `assets.iconSource`), a `Logo` component that
|
|
50
|
+
switches artwork by theme, and a Brand preview rendered by the review
|
|
51
|
+
`BrandPreview`. The branding guide is served as `ads://guides/branding`.
|
|
52
|
+
|
|
53
|
+
## 0.3.43
|
|
54
|
+
|
|
32
55
|
- The starter is a base to build on: two token groups (Color; Space, type &
|
|
33
56
|
motion) shown as tiles with live values, `Button` and `TextField` in two
|
|
34
57
|
component groups, a `SearchBar` pattern and a `SearchPage` composition, with
|
package/docs/GUIDE.md
CHANGED
|
@@ -639,7 +639,16 @@ custom styling; the frame pattern uses `--ux-*`. Branding never assigns
|
|
|
639
639
|
component state variables.
|
|
640
640
|
|
|
641
641
|
Keep original SVG artwork and a usage/credits/license README in
|
|
642
|
-
`design-system/assets/brand/`, and font files in `assets/fonts/`.
|
|
642
|
+
`design-system/assets/brand/`, and font files in `assets/fonts/`. `ads check` warns
|
|
643
|
+
when artwork is undescribed in that README (`brand-readme`), the README states no
|
|
644
|
+
license (`brand-license`), artwork is missing from a brand scenario
|
|
645
|
+
(`brand-preview`), or nothing uses it (`brand-unused`). Name a dark-theme variant
|
|
646
|
+
`<name>.dark.svg`; the component showing it renders both and hides one with a
|
|
647
|
+
`:root[data-theme="dark"] &` selector. A token-folder scenario marked `brand: true`
|
|
648
|
+
(the starter's `tokens/Brand.ads.scenario.tsx` with the review `BrandPreview`)
|
|
649
|
+
previews every artwork in the current theme and the app icon at its sizes; it has
|
|
650
|
+
no token samples. The [branding guide](../skills/ads-designer/references/branding.md)
|
|
651
|
+
(`ads://guides/branding`) covers the whole flow. Font declarations
|
|
643
652
|
belong in optional `tokens/fonts.css`, imported first. The foundation entry is
|
|
644
653
|
import-only: fonts (when present), colors, typography, spacing, elevation, base.
|
|
645
654
|
Fixed artwork colors and geometry are permitted inside SVG assets; they do not
|
|
@@ -677,6 +686,37 @@ resolver. With no `iconSource`, it succeeds without writing. All images render
|
|
|
677
686
|
before generated files are replaced, so invalid artwork leaves prior outputs
|
|
678
687
|
intact. Sources, duplicate output mounts, and symlinked write paths are checked.
|
|
679
688
|
|
|
689
|
+
### Committed targets and glyph sets
|
|
690
|
+
|
|
691
|
+
Native launchers, tray icons and upload exports must exist without running ADS, so
|
|
692
|
+
they are committed. `assets.targets` lists them; each renders one master from
|
|
693
|
+
`assets/brand/` to a project path, the extension choosing the format:
|
|
694
|
+
|
|
695
|
+
```json
|
|
696
|
+
{ "assets": { "targets": [
|
|
697
|
+
{ "from": "assets/brand/app-icon.svg", "to": "app/icons/icon.svg" },
|
|
698
|
+
{ "from": "assets/brand/app-icon.svg", "to": "app/icons/128x128.png", "size": 128 },
|
|
699
|
+
{ "from": "assets/brand/banner.svg", "to": "exports/banner.png", "width": 1200, "height": 630 },
|
|
700
|
+
{ "from": "assets/brand/app-icon.svg", "to": "exports/upload.png", "size": 1024, "background": "#FFFFFF" },
|
|
701
|
+
{ "from": "assets/brand/app-icon.svg", "to": "app/icons/icon.ico", "sizes": [16, 32, 48, 256] },
|
|
702
|
+
{ "from": "assets/brand/app-icon.svg", "to": "app/icons/icon.icns", "sizes": [16, 32, 64, 128, 256, 512, 1024] }
|
|
703
|
+
] } }
|
|
704
|
+
```
|
|
705
|
+
|
|
706
|
+
`.svg` copies the master; `.png` renders one `size` or a `width` × `height`
|
|
707
|
+
(other shapes are centred); `.ico` and `.icns` bundle `sizes`; `background` fills
|
|
708
|
+
transparency. `ads assets` re-renders only targets whose master or settings changed
|
|
709
|
+
and records every output's master hash, settings and output hash in the committed
|
|
710
|
+
`assets/generated.json`. `ads check` fails (`brand-output-stale`) when an output is
|
|
711
|
+
missing, edited by hand, or out of date, by comparing those hashes; it renders
|
|
712
|
+
nothing. Commit outputs and the manifest together.
|
|
713
|
+
|
|
714
|
+
`assets.glyphs` turns a folder of UI icon SVGs into one typed module:
|
|
715
|
+
`{ "source": "assets/glyphs", "output": "components/Content/Icon/glyphs.ts",
|
|
716
|
+
"attributes": { "fill": "none", "stroke": "currentColor" } }`. Each SVG becomes
|
|
717
|
+
`glyphs[name]` with missing root attributes added; `aliases.json` beside them
|
|
718
|
+
becomes `glyphAliases`. `ads assets` writes it and `ads check` fails when it is stale.
|
|
719
|
+
|
|
680
720
|
Initialized builds run:
|
|
681
721
|
|
|
682
722
|
```text
|