@reqvire-org/ads 0.3.27 → 0.3.28
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/dist/bootstrap-ds/scripts/build-mcp-previews.mjs +6 -7
- package/dist/mcp/preview-widget.bundle.js +6 -6
- package/dist/mcp/project-widget.bundle.js +13 -13
- package/dist/mcp/resource-loader.js +10 -1
- package/dist/mcp/server.mjs +7 -3
- package/dist/preview-builder.mjs +108 -0
- package/dist/preview-inputs.mjs +8 -1
- package/dist/scenario-groups.mjs +47 -0
- package/dist/scenarios-compiler.mjs +4 -3
- package/dist/scenarios-vite.mjs +13 -5
- package/dist/scenarios.mjs +4 -1
- package/dist/showcase/client.bundle.js +21 -21
- package/dist/showcase/navigation.js +13 -0
- package/dist/showcase/style.css +1 -0
- package/dist/skills/ads-break-ui/SKILL.md +1 -1
- package/dist/skills/ads-break-ui/references/runtimes.md +17 -0
- package/dist/skills/ads-break-ui/references/scenarios.md +19 -0
- package/dist/skills/ads-designer/SKILL.md +1 -1
- package/dist/skills/ads-designer/assets/bootstrap-ds/scripts/build-mcp-previews.mjs +6 -7
- package/dist/skills/ads-designer/references/runtimes.md +17 -0
- package/dist/skills/ads-designer/references/scenarios.md +19 -0
- package/dist/skills/ads-import/SKILL.md +1 -1
- package/dist/skills/ads-import/references/runtimes.md +17 -0
- package/dist/skills/ads-import/references/scenarios.md +19 -0
- package/dist/skills/ads-motion/SKILL.md +1 -1
- package/dist/skills/ads-motion/references/runtimes.md +17 -0
- package/dist/skills/ads-motion/references/scenarios.md +19 -0
- package/dist/skills/ads-port/SKILL.md +1 -1
- package/dist/skills/ads-port/references/runtimes.md +17 -0
- package/dist/skills/ads-port/references/scenarios.md +19 -0
- package/docs/ADS.md +12 -2
- package/docs/ARCHITECTURE.md +66 -3
- package/docs/BEHAVIORS.md +7 -0
- package/docs/CHANGELOG.md +17 -0
- package/docs/GUIDE.md +31 -0
- package/docs/MCP.md +60 -8
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Missing groups retain the original flat navigation, without a default heading. */
|
|
2
|
+
export function navigationGroups(entries) {
|
|
3
|
+
const ungrouped = [], named = new Map();
|
|
4
|
+
for (const entry of entries) {
|
|
5
|
+
if (!entry.group) { ungrouped.push(entry); continue; }
|
|
6
|
+
if (!named.has(entry.group)) named.set(entry.group, []);
|
|
7
|
+
named.get(entry.group).push(entry);
|
|
8
|
+
}
|
|
9
|
+
return [
|
|
10
|
+
...(ungrouped.length ? [{ label: null, entries: ungrouped }] : []),
|
|
11
|
+
...[...named].sort(([left], [right]) => left.localeCompare(right)).map(([label, entries]) => ({ label, entries })),
|
|
12
|
+
];
|
|
13
|
+
}
|
package/dist/showcase/style.css
CHANGED
|
@@ -6,4 +6,5 @@ header{height:52px;display:flex;flex:none;border-bottom:1px solid var(--frame-li
|
|
|
6
6
|
main{flex:1;min-height:0;display:flex}#sidebar{width:var(--pane-width);flex:none;border-right:1px solid var(--frame-line);overflow-y:auto;background:var(--frame-bg)}#entries{display:flex;flex-direction:column;gap:4px;padding:8px}#entries a{flex:none;padding:8px;border:1px solid transparent;border-radius:4px;text-decoration:none;overflow-wrap:anywhere}#entries a:hover,#entries a[aria-current="page"]{border-color:var(--frame-line)}#entries a[aria-current="page"]{font-weight:600}
|
|
7
7
|
#preview{position:relative;flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}#frame-slot{flex:1;min-height:0;min-width:0}iframe{display:block;width:100%;height:100%;border:0}#status{position:absolute;z-index:1;inset:12px 12px auto;margin:0;padding:12px 16px;border:1px solid var(--frame-line);border-radius:4px;background:var(--frame-bg);white-space:pre-wrap;overflow-wrap:anywhere;max-height:30vh;overflow:auto}#status[data-error="true"]{color:CanvasText;background:Canvas;border-color:GrayText}#loader{position:absolute;inset:0;z-index:2;display:grid;place-items:center;background:var(--frame-bg)}.spinner{width:24px;height:24px;border:2px solid var(--frame-line);border-top-color:var(--frame-ink);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation:none}}[hidden],.collapsed #sidebar{display:none!important}@media(max-width:760px){#title{display:none}}
|
|
8
8
|
/* The capture host keeps the same MCP client/bridge and gives the App the exact requested viewport. */
|
|
9
|
+
.entry-group{min-width:0}.entry-group summary{cursor:pointer;padding:8px;font-weight:600;overflow-wrap:anywhere}.entry-group summary:focus-visible{outline:2px solid var(--frame-ink);outline-offset:-2px}.entry-group>div{display:flex;flex-direction:column;gap:4px;padding-inline-start:8px}
|
|
9
10
|
:root[data-capture="true"] #header,:root[data-capture="true"] #sidebar{display:none!important}
|
|
@@ -76,7 +76,7 @@ website/MCP App use, owner selection, or `component-dependency`,
|
|
|
76
76
|
[layer responsibilities and contracts](references/layers.md), also served as
|
|
77
77
|
`ads://guides/layers`. Preserve public APIs and documented non-state styling hooks.
|
|
78
78
|
|
|
79
|
-
For parent/child `covers`, conditional-control review, reference comparisons,
|
|
79
|
+
For folder-group navigation, parent/child `covers`, conditional-control review, reference comparisons,
|
|
80
80
|
public style-helper use, native slot/selector composition, fragment navigation,
|
|
81
81
|
or `scenario-render` / `showcase-control` / `showcase-class` findings, read [scenario contracts](references/scenarios.md). Its verification
|
|
82
82
|
examples explain API visibility, reference baselines and state-transition checks.
|
|
@@ -93,6 +93,23 @@ commands with the appropriate Bun flags. The MCP process and agent shell may
|
|
|
93
93
|
have different PATHs; use these reported values instead of scanning the machine
|
|
94
94
|
or installing another runtime without evidence.
|
|
95
95
|
|
|
96
|
+
For incremental preview compilation, the project adapter passes
|
|
97
|
+
`createVitePreviewBuilder({ build, configure })` from
|
|
98
|
+
`@reqvire-org/ads/scenarios/vite` as `runScenarioCompiler`'s `buildGraph`.
|
|
99
|
+
`configure(entries, options)` returns the existing Vite configuration, including
|
|
100
|
+
framework/Linaria plugins, aliases and entries. The helper retains a watched
|
|
101
|
+
Rollup graph, captures private output, tracks dependencies and closes with the
|
|
102
|
+
compiler. Existing custom adapters still work; they must adopt the helper to gain
|
|
103
|
+
incremental transforms. Upgrade the project dependency and restart the builder.
|
|
104
|
+
Keep the full validation callback and production build behavior.
|
|
105
|
+
|
|
106
|
+
The App preserves selected form/scroll state across accepted unrelated graph
|
|
107
|
+
updates, reruns audits and remounts when its own module/style/asset closure changes.
|
|
108
|
+
Do not promise component-level HMR. Guarded edits select affected behavior owners
|
|
109
|
+
from their input dependencies and run their registered checks; project scripts
|
|
110
|
+
remain as configured and releases run the complete suite. Incremental compilation
|
|
111
|
+
alone does not make arbitrary lint/typecheck/test scripts incremental.
|
|
112
|
+
|
|
96
113
|
Preview watching excludes standard output trees by default, including nested
|
|
97
114
|
Cargo `target/` directories, without allocating watches inside them. Explicit
|
|
98
115
|
`sourceDir` and `dsDir` take priority over those default output names. Register
|
|
@@ -23,6 +23,25 @@ on-demand element screenshots. It grants no render/behavior coverage and no extr
|
|
|
23
23
|
styling permission. Use [captures.md](captures.md) for current/candidate review,
|
|
24
24
|
target selection, resource reads and storage lifecycle.
|
|
25
25
|
|
|
26
|
+
## Folder-derived showcase groups
|
|
27
|
+
|
|
28
|
+
Components, patterns and compositions use container folders to organize
|
|
29
|
+
navigation: `components/Forms/Input/Input.ads.scenario.tsx` appears under
|
|
30
|
+
**Forms** when `Forms/` contains only real directories. Hidden entries are ignored;
|
|
31
|
+
a regular file such as `index.ts` or `README.md`, or a symlink, prevents that
|
|
32
|
+
container from becoming a group. An owner's own directory and layer root never
|
|
33
|
+
form a group. Nested containers produce one path label: **Forms / Selection**.
|
|
34
|
+
Folder spelling and case are preserved: `form-controls/` displays `form-controls`.
|
|
35
|
+
|
|
36
|
+
Folders are the only grouping source. Do not add `group` metadata to a scenario
|
|
37
|
+
or owner contract. MCP's optional `group` field is computed discovery output;
|
|
38
|
+
`ads_scenarios(query: "Forms")` searches it along with existing scenario fields.
|
|
39
|
+
Use returned IDs with `ads_show_scenario`; `ads_catalog` previews, `ads_units` and
|
|
40
|
+
source resources retain the actual nested owner paths. Ungrouped entries remain
|
|
41
|
+
visible with no Default heading. Flat layouts keep working; tokens retain their
|
|
42
|
+
categories. When moving an owner, update its imports/public exports and any
|
|
43
|
+
references to changed path-derived scenario, behavior or capture IDs.
|
|
44
|
+
|
|
26
45
|
## Fragment links inside Apps
|
|
27
46
|
|
|
28
47
|
Keep intended `href="#"` and named fragments in the project API and fixtures.
|
|
@@ -107,7 +107,7 @@ website/MCP App use, owner selection, or `component-dependency`,
|
|
|
107
107
|
[layer responsibilities and contracts](references/layers.md), also served as
|
|
108
108
|
`ads://guides/layers`. Preserve public APIs and documented non-state styling hooks.
|
|
109
109
|
|
|
110
|
-
For parent/child `covers`, conditional-control review, reference comparisons,
|
|
110
|
+
For folder-group navigation, parent/child `covers`, conditional-control review, reference comparisons,
|
|
111
111
|
public style-helper use, native slot/selector composition, fragment navigation,
|
|
112
112
|
or `scenario-render` / `showcase-control` / `showcase-class` findings, read [scenario contracts](references/scenarios.md). Its verification
|
|
113
113
|
examples explain API visibility, reference baselines and state-transition checks.
|
|
@@ -7,7 +7,7 @@ import wyw from "@wyw-in-js/vite";
|
|
|
7
7
|
import { linariaTagResolver } from "@reqvire-org/ads/linaria";
|
|
8
8
|
import react from "@vitejs/plugin-react";
|
|
9
9
|
import { runScenarioCompiler } from "@reqvire-org/ads/scenarios/compiler";
|
|
10
|
-
import {
|
|
10
|
+
import { createVitePreviewBuilder, previewEntriesPlugin } from "@reqvire-org/ads/scenarios/vite";
|
|
11
11
|
|
|
12
12
|
const root = path.resolve(import.meta.dirname, "..");
|
|
13
13
|
const runScript = promisify(execFile);
|
|
@@ -20,15 +20,14 @@ await runScenarioCompiler(root, {
|
|
|
20
20
|
try { await runScript(manager, [...(manager === "bun" ? ["--bun"] : []), "run", "lint"], { cwd: root }); }
|
|
21
21
|
catch (error) { throw new Error([error.stdout, error.stderr].map(value => value?.toString() ?? "").join("\n") || error.message); }
|
|
22
22
|
},
|
|
23
|
-
|
|
23
|
+
buildGraph: createVitePreviewBuilder({ build, configure(entries, options) {
|
|
24
24
|
const mount = path.join(options.dsRoot, "showcase/mcp/main.tsx");
|
|
25
|
-
|
|
26
|
-
plugins: [previewEntriesPlugin(entries.map(entry => ({ ...entry, root })), mount), wyw({ tagResolver: linariaTagResolver, include: ["**/*.{ts,tsx}"], exclude: ["**/node_modules/**"] }), react()
|
|
25
|
+
return { configFile: false, root, base: "./", publicDir: false,
|
|
26
|
+
plugins: [previewEntriesPlugin(entries.map(entry => ({ ...entry, root })), mount), wyw({ tagResolver: linariaTagResolver, include: ["**/*.{ts,tsx}"], exclude: ["**/node_modules/**"] }), react()],
|
|
27
27
|
resolve: { alias: { "@ds": path.join(options.dsRoot, options.config.publicEntry) } },
|
|
28
28
|
worker: { format: "iife" },
|
|
29
29
|
build: { write: false, cssCodeSplit: true, assetsInlineLimit: 0, modulePreload: false,
|
|
30
30
|
rollupOptions: { preserveEntrySignatures: "strict", input: Object.fromEntries(entries.map((_entry, index) => [`scenario-${index}`, `ads-preview-entry:${index}`])) } },
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
},
|
|
31
|
+
};
|
|
32
|
+
} }),
|
|
34
33
|
});
|
|
@@ -93,6 +93,23 @@ commands with the appropriate Bun flags. The MCP process and agent shell may
|
|
|
93
93
|
have different PATHs; use these reported values instead of scanning the machine
|
|
94
94
|
or installing another runtime without evidence.
|
|
95
95
|
|
|
96
|
+
For incremental preview compilation, the project adapter passes
|
|
97
|
+
`createVitePreviewBuilder({ build, configure })` from
|
|
98
|
+
`@reqvire-org/ads/scenarios/vite` as `runScenarioCompiler`'s `buildGraph`.
|
|
99
|
+
`configure(entries, options)` returns the existing Vite configuration, including
|
|
100
|
+
framework/Linaria plugins, aliases and entries. The helper retains a watched
|
|
101
|
+
Rollup graph, captures private output, tracks dependencies and closes with the
|
|
102
|
+
compiler. Existing custom adapters still work; they must adopt the helper to gain
|
|
103
|
+
incremental transforms. Upgrade the project dependency and restart the builder.
|
|
104
|
+
Keep the full validation callback and production build behavior.
|
|
105
|
+
|
|
106
|
+
The App preserves selected form/scroll state across accepted unrelated graph
|
|
107
|
+
updates, reruns audits and remounts when its own module/style/asset closure changes.
|
|
108
|
+
Do not promise component-level HMR. Guarded edits select affected behavior owners
|
|
109
|
+
from their input dependencies and run their registered checks; project scripts
|
|
110
|
+
remain as configured and releases run the complete suite. Incremental compilation
|
|
111
|
+
alone does not make arbitrary lint/typecheck/test scripts incremental.
|
|
112
|
+
|
|
96
113
|
Preview watching excludes standard output trees by default, including nested
|
|
97
114
|
Cargo `target/` directories, without allocating watches inside them. Explicit
|
|
98
115
|
`sourceDir` and `dsDir` take priority over those default output names. Register
|
|
@@ -23,6 +23,25 @@ on-demand element screenshots. It grants no render/behavior coverage and no extr
|
|
|
23
23
|
styling permission. Use [captures.md](captures.md) for current/candidate review,
|
|
24
24
|
target selection, resource reads and storage lifecycle.
|
|
25
25
|
|
|
26
|
+
## Folder-derived showcase groups
|
|
27
|
+
|
|
28
|
+
Components, patterns and compositions use container folders to organize
|
|
29
|
+
navigation: `components/Forms/Input/Input.ads.scenario.tsx` appears under
|
|
30
|
+
**Forms** when `Forms/` contains only real directories. Hidden entries are ignored;
|
|
31
|
+
a regular file such as `index.ts` or `README.md`, or a symlink, prevents that
|
|
32
|
+
container from becoming a group. An owner's own directory and layer root never
|
|
33
|
+
form a group. Nested containers produce one path label: **Forms / Selection**.
|
|
34
|
+
Folder spelling and case are preserved: `form-controls/` displays `form-controls`.
|
|
35
|
+
|
|
36
|
+
Folders are the only grouping source. Do not add `group` metadata to a scenario
|
|
37
|
+
or owner contract. MCP's optional `group` field is computed discovery output;
|
|
38
|
+
`ads_scenarios(query: "Forms")` searches it along with existing scenario fields.
|
|
39
|
+
Use returned IDs with `ads_show_scenario`; `ads_catalog` previews, `ads_units` and
|
|
40
|
+
source resources retain the actual nested owner paths. Ungrouped entries remain
|
|
41
|
+
visible with no Default heading. Flat layouts keep working; tokens retain their
|
|
42
|
+
categories. When moving an owner, update its imports/public exports and any
|
|
43
|
+
references to changed path-derived scenario, behavior or capture IDs.
|
|
44
|
+
|
|
26
45
|
## Fragment links inside Apps
|
|
27
46
|
|
|
28
47
|
Keep intended `href="#"` and named fragments in the project API and fixtures.
|
|
@@ -71,7 +71,7 @@ website/MCP App use, owner selection, or `component-dependency`,
|
|
|
71
71
|
[layer responsibilities and contracts](references/layers.md), also served as
|
|
72
72
|
`ads://guides/layers`. Preserve public APIs and documented non-state styling hooks.
|
|
73
73
|
|
|
74
|
-
For parent/child `covers`, conditional-control review, reference comparisons,
|
|
74
|
+
For folder-group navigation, parent/child `covers`, conditional-control review, reference comparisons,
|
|
75
75
|
public style-helper use, native slot/selector composition, fragment navigation,
|
|
76
76
|
or `scenario-render` / `showcase-control` / `showcase-class` findings, read [scenario contracts](references/scenarios.md). Its verification
|
|
77
77
|
examples explain API visibility, reference baselines and state-transition checks.
|
|
@@ -93,6 +93,23 @@ commands with the appropriate Bun flags. The MCP process and agent shell may
|
|
|
93
93
|
have different PATHs; use these reported values instead of scanning the machine
|
|
94
94
|
or installing another runtime without evidence.
|
|
95
95
|
|
|
96
|
+
For incremental preview compilation, the project adapter passes
|
|
97
|
+
`createVitePreviewBuilder({ build, configure })` from
|
|
98
|
+
`@reqvire-org/ads/scenarios/vite` as `runScenarioCompiler`'s `buildGraph`.
|
|
99
|
+
`configure(entries, options)` returns the existing Vite configuration, including
|
|
100
|
+
framework/Linaria plugins, aliases and entries. The helper retains a watched
|
|
101
|
+
Rollup graph, captures private output, tracks dependencies and closes with the
|
|
102
|
+
compiler. Existing custom adapters still work; they must adopt the helper to gain
|
|
103
|
+
incremental transforms. Upgrade the project dependency and restart the builder.
|
|
104
|
+
Keep the full validation callback and production build behavior.
|
|
105
|
+
|
|
106
|
+
The App preserves selected form/scroll state across accepted unrelated graph
|
|
107
|
+
updates, reruns audits and remounts when its own module/style/asset closure changes.
|
|
108
|
+
Do not promise component-level HMR. Guarded edits select affected behavior owners
|
|
109
|
+
from their input dependencies and run their registered checks; project scripts
|
|
110
|
+
remain as configured and releases run the complete suite. Incremental compilation
|
|
111
|
+
alone does not make arbitrary lint/typecheck/test scripts incremental.
|
|
112
|
+
|
|
96
113
|
Preview watching excludes standard output trees by default, including nested
|
|
97
114
|
Cargo `target/` directories, without allocating watches inside them. Explicit
|
|
98
115
|
`sourceDir` and `dsDir` take priority over those default output names. Register
|
|
@@ -23,6 +23,25 @@ on-demand element screenshots. It grants no render/behavior coverage and no extr
|
|
|
23
23
|
styling permission. Use [captures.md](captures.md) for current/candidate review,
|
|
24
24
|
target selection, resource reads and storage lifecycle.
|
|
25
25
|
|
|
26
|
+
## Folder-derived showcase groups
|
|
27
|
+
|
|
28
|
+
Components, patterns and compositions use container folders to organize
|
|
29
|
+
navigation: `components/Forms/Input/Input.ads.scenario.tsx` appears under
|
|
30
|
+
**Forms** when `Forms/` contains only real directories. Hidden entries are ignored;
|
|
31
|
+
a regular file such as `index.ts` or `README.md`, or a symlink, prevents that
|
|
32
|
+
container from becoming a group. An owner's own directory and layer root never
|
|
33
|
+
form a group. Nested containers produce one path label: **Forms / Selection**.
|
|
34
|
+
Folder spelling and case are preserved: `form-controls/` displays `form-controls`.
|
|
35
|
+
|
|
36
|
+
Folders are the only grouping source. Do not add `group` metadata to a scenario
|
|
37
|
+
or owner contract. MCP's optional `group` field is computed discovery output;
|
|
38
|
+
`ads_scenarios(query: "Forms")` searches it along with existing scenario fields.
|
|
39
|
+
Use returned IDs with `ads_show_scenario`; `ads_catalog` previews, `ads_units` and
|
|
40
|
+
source resources retain the actual nested owner paths. Ungrouped entries remain
|
|
41
|
+
visible with no Default heading. Flat layouts keep working; tokens retain their
|
|
42
|
+
categories. When moving an owner, update its imports/public exports and any
|
|
43
|
+
references to changed path-derived scenario, behavior or capture IDs.
|
|
44
|
+
|
|
26
45
|
## Fragment links inside Apps
|
|
27
46
|
|
|
28
47
|
Keep intended `href="#"` and named fragments in the project API and fixtures.
|
|
@@ -93,7 +93,7 @@ website/MCP App use, owner selection, or `component-dependency`,
|
|
|
93
93
|
[layer responsibilities and contracts](references/layers.md), also served as
|
|
94
94
|
`ads://guides/layers`. Preserve public APIs and documented non-state styling hooks.
|
|
95
95
|
|
|
96
|
-
For parent/child `covers`, conditional-control review, reference comparisons,
|
|
96
|
+
For folder-group navigation, parent/child `covers`, conditional-control review, reference comparisons,
|
|
97
97
|
public style-helper use, native slot/selector composition, fragment navigation,
|
|
98
98
|
or `scenario-render` / `showcase-control` / `showcase-class` findings, read [scenario contracts](references/scenarios.md). Its verification
|
|
99
99
|
examples explain API visibility, reference baselines and state-transition checks.
|
|
@@ -93,6 +93,23 @@ commands with the appropriate Bun flags. The MCP process and agent shell may
|
|
|
93
93
|
have different PATHs; use these reported values instead of scanning the machine
|
|
94
94
|
or installing another runtime without evidence.
|
|
95
95
|
|
|
96
|
+
For incremental preview compilation, the project adapter passes
|
|
97
|
+
`createVitePreviewBuilder({ build, configure })` from
|
|
98
|
+
`@reqvire-org/ads/scenarios/vite` as `runScenarioCompiler`'s `buildGraph`.
|
|
99
|
+
`configure(entries, options)` returns the existing Vite configuration, including
|
|
100
|
+
framework/Linaria plugins, aliases and entries. The helper retains a watched
|
|
101
|
+
Rollup graph, captures private output, tracks dependencies and closes with the
|
|
102
|
+
compiler. Existing custom adapters still work; they must adopt the helper to gain
|
|
103
|
+
incremental transforms. Upgrade the project dependency and restart the builder.
|
|
104
|
+
Keep the full validation callback and production build behavior.
|
|
105
|
+
|
|
106
|
+
The App preserves selected form/scroll state across accepted unrelated graph
|
|
107
|
+
updates, reruns audits and remounts when its own module/style/asset closure changes.
|
|
108
|
+
Do not promise component-level HMR. Guarded edits select affected behavior owners
|
|
109
|
+
from their input dependencies and run their registered checks; project scripts
|
|
110
|
+
remain as configured and releases run the complete suite. Incremental compilation
|
|
111
|
+
alone does not make arbitrary lint/typecheck/test scripts incremental.
|
|
112
|
+
|
|
96
113
|
Preview watching excludes standard output trees by default, including nested
|
|
97
114
|
Cargo `target/` directories, without allocating watches inside them. Explicit
|
|
98
115
|
`sourceDir` and `dsDir` take priority over those default output names. Register
|
|
@@ -23,6 +23,25 @@ on-demand element screenshots. It grants no render/behavior coverage and no extr
|
|
|
23
23
|
styling permission. Use [captures.md](captures.md) for current/candidate review,
|
|
24
24
|
target selection, resource reads and storage lifecycle.
|
|
25
25
|
|
|
26
|
+
## Folder-derived showcase groups
|
|
27
|
+
|
|
28
|
+
Components, patterns and compositions use container folders to organize
|
|
29
|
+
navigation: `components/Forms/Input/Input.ads.scenario.tsx` appears under
|
|
30
|
+
**Forms** when `Forms/` contains only real directories. Hidden entries are ignored;
|
|
31
|
+
a regular file such as `index.ts` or `README.md`, or a symlink, prevents that
|
|
32
|
+
container from becoming a group. An owner's own directory and layer root never
|
|
33
|
+
form a group. Nested containers produce one path label: **Forms / Selection**.
|
|
34
|
+
Folder spelling and case are preserved: `form-controls/` displays `form-controls`.
|
|
35
|
+
|
|
36
|
+
Folders are the only grouping source. Do not add `group` metadata to a scenario
|
|
37
|
+
or owner contract. MCP's optional `group` field is computed discovery output;
|
|
38
|
+
`ads_scenarios(query: "Forms")` searches it along with existing scenario fields.
|
|
39
|
+
Use returned IDs with `ads_show_scenario`; `ads_catalog` previews, `ads_units` and
|
|
40
|
+
source resources retain the actual nested owner paths. Ungrouped entries remain
|
|
41
|
+
visible with no Default heading. Flat layouts keep working; tokens retain their
|
|
42
|
+
categories. When moving an owner, update its imports/public exports and any
|
|
43
|
+
references to changed path-derived scenario, behavior or capture IDs.
|
|
44
|
+
|
|
26
45
|
## Fragment links inside Apps
|
|
27
46
|
|
|
28
47
|
Keep intended `href="#"` and named fragments in the project API and fixtures.
|
|
@@ -80,7 +80,7 @@ website/MCP App use, owner selection, or `component-dependency`,
|
|
|
80
80
|
[layer responsibilities and contracts](references/layers.md), also served as
|
|
81
81
|
`ads://guides/layers`. Preserve public APIs and documented non-state styling hooks.
|
|
82
82
|
|
|
83
|
-
For parent/child `covers`, conditional-control review, reference comparisons,
|
|
83
|
+
For folder-group navigation, parent/child `covers`, conditional-control review, reference comparisons,
|
|
84
84
|
public style-helper use, native slot/selector composition, fragment navigation,
|
|
85
85
|
or `scenario-render` / `showcase-control` / `showcase-class` findings, read [scenario contracts](references/scenarios.md). Its verification
|
|
86
86
|
examples explain API visibility, reference baselines and state-transition checks.
|
|
@@ -93,6 +93,23 @@ commands with the appropriate Bun flags. The MCP process and agent shell may
|
|
|
93
93
|
have different PATHs; use these reported values instead of scanning the machine
|
|
94
94
|
or installing another runtime without evidence.
|
|
95
95
|
|
|
96
|
+
For incremental preview compilation, the project adapter passes
|
|
97
|
+
`createVitePreviewBuilder({ build, configure })` from
|
|
98
|
+
`@reqvire-org/ads/scenarios/vite` as `runScenarioCompiler`'s `buildGraph`.
|
|
99
|
+
`configure(entries, options)` returns the existing Vite configuration, including
|
|
100
|
+
framework/Linaria plugins, aliases and entries. The helper retains a watched
|
|
101
|
+
Rollup graph, captures private output, tracks dependencies and closes with the
|
|
102
|
+
compiler. Existing custom adapters still work; they must adopt the helper to gain
|
|
103
|
+
incremental transforms. Upgrade the project dependency and restart the builder.
|
|
104
|
+
Keep the full validation callback and production build behavior.
|
|
105
|
+
|
|
106
|
+
The App preserves selected form/scroll state across accepted unrelated graph
|
|
107
|
+
updates, reruns audits and remounts when its own module/style/asset closure changes.
|
|
108
|
+
Do not promise component-level HMR. Guarded edits select affected behavior owners
|
|
109
|
+
from their input dependencies and run their registered checks; project scripts
|
|
110
|
+
remain as configured and releases run the complete suite. Incremental compilation
|
|
111
|
+
alone does not make arbitrary lint/typecheck/test scripts incremental.
|
|
112
|
+
|
|
96
113
|
Preview watching excludes standard output trees by default, including nested
|
|
97
114
|
Cargo `target/` directories, without allocating watches inside them. Explicit
|
|
98
115
|
`sourceDir` and `dsDir` take priority over those default output names. Register
|
|
@@ -23,6 +23,25 @@ on-demand element screenshots. It grants no render/behavior coverage and no extr
|
|
|
23
23
|
styling permission. Use [captures.md](captures.md) for current/candidate review,
|
|
24
24
|
target selection, resource reads and storage lifecycle.
|
|
25
25
|
|
|
26
|
+
## Folder-derived showcase groups
|
|
27
|
+
|
|
28
|
+
Components, patterns and compositions use container folders to organize
|
|
29
|
+
navigation: `components/Forms/Input/Input.ads.scenario.tsx` appears under
|
|
30
|
+
**Forms** when `Forms/` contains only real directories. Hidden entries are ignored;
|
|
31
|
+
a regular file such as `index.ts` or `README.md`, or a symlink, prevents that
|
|
32
|
+
container from becoming a group. An owner's own directory and layer root never
|
|
33
|
+
form a group. Nested containers produce one path label: **Forms / Selection**.
|
|
34
|
+
Folder spelling and case are preserved: `form-controls/` displays `form-controls`.
|
|
35
|
+
|
|
36
|
+
Folders are the only grouping source. Do not add `group` metadata to a scenario
|
|
37
|
+
or owner contract. MCP's optional `group` field is computed discovery output;
|
|
38
|
+
`ads_scenarios(query: "Forms")` searches it along with existing scenario fields.
|
|
39
|
+
Use returned IDs with `ads_show_scenario`; `ads_catalog` previews, `ads_units` and
|
|
40
|
+
source resources retain the actual nested owner paths. Ungrouped entries remain
|
|
41
|
+
visible with no Default heading. Flat layouts keep working; tokens retain their
|
|
42
|
+
categories. When moving an owner, update its imports/public exports and any
|
|
43
|
+
references to changed path-derived scenario, behavior or capture IDs.
|
|
44
|
+
|
|
26
45
|
## Fragment links inside Apps
|
|
27
46
|
|
|
28
47
|
Keep intended `href="#"` and named fragments in the project API and fixtures.
|
package/docs/ADS.md
CHANGED
|
@@ -67,8 +67,10 @@ the built-in client. Its tooling CSS is separate from the project style contract
|
|
|
67
67
|
The shared resource compiler builds one graph for all discovered scenarios on
|
|
68
68
|
first demand. Selections reuse the App and load their dependency closure. The
|
|
69
69
|
project's `mountScenario(Scenario, container)` adapter returns an unmount callback
|
|
70
|
-
that releases owned roots, listeners, timers, portals and workers. Switching
|
|
71
|
-
|
|
70
|
+
that releases owned roots, listeners, timers, portals and workers. Switching a
|
|
71
|
+
scenario or changing its compiled dependency closure resets its state. Successful
|
|
72
|
+
unrelated graph updates
|
|
73
|
+
preserve its mounted state while retaining unchanged shared modules.
|
|
72
74
|
Host context selects the project theme; it does not replace the project's skin.
|
|
73
75
|
|
|
74
76
|
|
|
@@ -95,6 +97,14 @@ design-system/
|
|
|
95
97
|
main.tsx
|
|
96
98
|
```
|
|
97
99
|
|
|
100
|
+
Container folders above owners organize component/pattern/composition navigation.
|
|
101
|
+
A group folder has only real-directory children (hidden entries ignored); its exact
|
|
102
|
+
folder name supplies the label. Owner folders and layer roots never become groups.
|
|
103
|
+
Direct regular files or symlinks disqualify a container. Nested groups use one path
|
|
104
|
+
label; ungrouped entries have no Default heading. `group` is derived MCP output,
|
|
105
|
+
not scenario/owner metadata. Move complete owners to change groups and update
|
|
106
|
+
path-based references. Grouping does not alter architecture or coverage rules.
|
|
107
|
+
|
|
98
108
|
Private controllers remain in that component/pattern owner. Shared controllers use
|
|
99
109
|
`controllers/<Name>/` with an index or same-name runtime entry and independently
|
|
100
110
|
guarded public re-exports. They may use the configured framework and declared
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -403,15 +403,78 @@ appearance, keyboard behavior or visual parity; browser checks remain necessary.
|
|
|
403
403
|
The skill-local [scenario guide](../skills/ads-designer/references/scenarios.md)
|
|
404
404
|
explains evidence, limits and diagnostics.
|
|
405
405
|
|
|
406
|
+
### Folder-derived navigation
|
|
407
|
+
|
|
408
|
+
The filesystem is the only grouping source. A nonempty container above an owner,
|
|
409
|
+
whose non-hidden children are all real directories, supplies its exact folder
|
|
410
|
+
name. An owner directory and layer root never become groups; a direct file or
|
|
411
|
+
symlink disqualifies a container. Nested qualifying containers form a path label
|
|
412
|
+
such as `Forms / Selection`. Flat owners stay ungrouped with no Default heading.
|
|
413
|
+
This applies to components, patterns and compositions; token categories remain
|
|
414
|
+
unchanged. Move owners to reorganize groups, updating imports and path-derived
|
|
415
|
+
identities where needed. No scenario/owner metadata can override the folder rule.
|
|
416
|
+
|
|
417
|
+
Discovery adds an optional derived `group` to scenario results. One registry feeds
|
|
418
|
+
`ads_scenarios`, its searchable group labels, `ads://project/scenarios` and the
|
|
419
|
+
showcase. The browser only groups those results; it does not scan folders or own a
|
|
420
|
+
second taxonomy. Directory entries participate in discovery and build freshness,
|
|
421
|
+
so adding/removing a non-source file also updates grouping without a TSX edit.
|
|
422
|
+
Public catalogue preview IDs, edit-unit ownership and compiled
|
|
423
|
+
resource selection continue to use the real owner/scenario paths. Grouping grants
|
|
424
|
+
no API visibility, render coverage, styling permission or runtime behavior.
|
|
425
|
+
|
|
426
|
+
### Incremental compilation and refresh
|
|
427
|
+
|
|
428
|
+
`runScenarioCompiler` owns scheduling, validation, freshness and publication.
|
|
429
|
+
The project's `createVitePreviewBuilder({ build, configure })` adapter owns its
|
|
430
|
+
framework and Linaria configuration. During a watched session it retains one
|
|
431
|
+
Vite/Rollup graph, reusing unchanged module transforms and rebuilding dependencies
|
|
432
|
+
that changed. An entry-list or project-configuration change creates a fresh graph.
|
|
433
|
+
Existing custom adapters retain their behavior until they adopt this helper;
|
|
434
|
+
one-shot production/library builds keep their own compiler and optimization.
|
|
435
|
+
|
|
436
|
+
```mermaid
|
|
437
|
+
flowchart LR
|
|
438
|
+
Edit[Source edit] --> Registry[Refresh scenario registry]
|
|
439
|
+
Registry --> Validate[Validate project]
|
|
440
|
+
Registry --> Compile[Update persistent Vite graph]
|
|
441
|
+
Validate --> Publish[Check source revision and publish atomically]
|
|
442
|
+
Compile --> Publish
|
|
443
|
+
Publish --> App[Compare selected dependency closure]
|
|
444
|
+
App --> Keep[Unchanged: keep mounted view]
|
|
445
|
+
App --> Mount[Changed: remount selected view]
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
Watch output is private scratch data under `.ds/incremental/`, not a successful
|
|
449
|
+
published build. Both validation and compilation must succeed against unchanged
|
|
450
|
+
source before the scheduler publishes immutable resources. Failed/superseded work
|
|
451
|
+
retains the previous preview with stale diagnostics. Files outside Rollup's module
|
|
452
|
+
graph still cause validation and build reconciliation. Normal compiler shutdown
|
|
453
|
+
closes its Vite watcher and removes its scratch directory.
|
|
454
|
+
|
|
455
|
+
A successful global revision does not require remounting an unchanged selected
|
|
456
|
+
view. The App compares its static module/style/asset closure, retains DOM/form/
|
|
457
|
+
scroll state when that closure matches, and reruns token/paint audits against the
|
|
458
|
+
accepted manifest. A changed selected closure remounts through the project's
|
|
459
|
+
adapter. Native ESM resources still obey digest checks and the existing bounded
|
|
460
|
+
revision lifecycle; this is state-preserving refresh, not component-level HMR.
|
|
461
|
+
|
|
462
|
+
Incremental compilation is separate from test selection. Preview refresh runs the
|
|
463
|
+
adapter's validation callback. Guarded mutations select affected behavior owners
|
|
464
|
+
by registered input dependencies, then execute their registered checks. A shared
|
|
465
|
+
foundation change can select every owner. Configured project checks still run as
|
|
466
|
+
authored; releases run the full test suite. ADS does not claim per-test-case
|
|
467
|
+
selection or skip validation because a module transform was cached.
|
|
468
|
+
|
|
406
469
|
After source changes, validation and compilation must both succeed before a new
|
|
407
470
|
graph becomes current. MCP announces build/resource updates.
|
|
408
471
|
Build success records the project input digest captured before compilation;
|
|
409
472
|
status reads independently verify that digest and the output bytes. Guarded
|
|
410
473
|
publication invalidates the compiler explicitly. Content reconciliation recovers
|
|
411
474
|
missed atomic file replacements, so OS watch delivery cannot establish freshness.
|
|
412
|
-
The built-in client refreshes discovery and sends the current selection to the
|
|
413
|
-
|
|
414
|
-
visible stale diagnostics. Invalid scenario metadata at startup and later source
|
|
475
|
+
The built-in client refreshes discovery and sends the current selection to the
|
|
476
|
+
existing App. Its loader retains or remounts that view according to its dependency
|
|
477
|
+
closure. Failed builds retain the previous view with visible stale diagnostics. Invalid scenario metadata at startup and later source
|
|
415
478
|
failures stay in the watcher's recoverable diagnostic path. Fixing source triggers validation again.
|
|
416
479
|
If the compiler process exits, the next preview request starts one fresh child;
|
|
417
480
|
MCP inspection remains available. Each child generation has its own status report,
|
package/docs/BEHAVIORS.md
CHANGED
|
@@ -365,6 +365,13 @@ computed imports remain conservative. Barrel source changes still invalidate
|
|
|
365
365
|
dependents. ADS caches source parsing, resolution and digests within an inspection
|
|
366
366
|
only; later runs read current source again.
|
|
367
367
|
|
|
368
|
+
Test selection is at owner-contract granularity: when a registered check's input
|
|
369
|
+
dependencies intersect changed files, that owner is selected and its registered
|
|
370
|
+
checks run. A shared token/foundation edit can affect every owner. Project check
|
|
371
|
+
scripts still run as configured; ordinary live preview does not automatically run
|
|
372
|
+
browser checks and release validation runs the full suite. Persistent Vite
|
|
373
|
+
compilation and retained preview state do not imply per-test-case execution caches.
|
|
374
|
+
|
|
368
375
|
Guarded mutations execute affected registered behavior contracts after core,
|
|
369
376
|
Oxlint and configured project checks, before writing source. Imported shared
|
|
370
377
|
controller changes also select dependent contracts conservatively. Rejected and
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.28
|
|
4
|
+
|
|
5
|
+
- Group component, pattern and composition showcase navigation using folder
|
|
6
|
+
containers only. Preserve exact folder names; reject metadata overrides and
|
|
7
|
+
retain flat navigation without a Default heading. Search derived groups through
|
|
8
|
+
MCP while keeping preview IDs, edit ownership and source reads aligned. Track
|
|
9
|
+
container structure in discovery and build freshness, including non-source files.
|
|
10
|
+
- Add an opt-in persistent Vite preview builder and adopt it in the starter.
|
|
11
|
+
Reuse unaffected module transforms and retain mounted preview state when its
|
|
12
|
+
dependency closure is unchanged; keep validation and atomic source checks.
|
|
13
|
+
- Inline focused HTML without interpreting framework JavaScript strings as
|
|
14
|
+
document stylesheet links.
|
|
15
|
+
|
|
16
|
+
- Preserve transition-family properties when probing token samples. Other probes
|
|
17
|
+
still disable transitions to avoid measuring intermediate values, and every
|
|
18
|
+
probe restores the original document and sample styles.
|
|
19
|
+
|
|
3
20
|
## 0.3.27
|
|
4
21
|
|
|
5
22
|
- Bound the release suite to two test workers to avoid memory contention while
|
package/docs/GUIDE.md
CHANGED
|
@@ -511,6 +511,37 @@ export default function Scenario() { return <Button>{fixture.label}</Button>; }
|
|
|
511
511
|
```
|
|
512
512
|
|
|
513
513
|
IDs derive from filenames; do not maintain another registry or hand-assigned IDs.
|
|
514
|
+
Showcase groups come only from folders. A folder above an owner becomes a group
|
|
515
|
+
when its non-hidden children are all real directories:
|
|
516
|
+
|
|
517
|
+
```text
|
|
518
|
+
components/
|
|
519
|
+
Forms/ # group: Forms
|
|
520
|
+
Input/
|
|
521
|
+
Input.ads.scenario.tsx
|
|
522
|
+
Select/
|
|
523
|
+
Select.ads.scenario.tsx
|
|
524
|
+
Switch/ # ungrouped owner
|
|
525
|
+
Switch.ads.scenario.tsx
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
The folder name is the group name, with spelling and case unchanged:
|
|
529
|
+
`form-controls/` displays as `form-controls`. The owner's own directory and the
|
|
530
|
+
layer root are never groups. The same convention applies to `patterns/` and
|
|
531
|
+
`composition/`. Nested containers appear as one label, such as
|
|
532
|
+
`Forms / Selection`. A regular file (`index.ts`, `README.md`, etc.) or a symbolic
|
|
533
|
+
link prevents that container from becoming a group. Hidden entries are ignored.
|
|
534
|
+
|
|
535
|
+
There is no grouping metadata, tag list or grouping registry. Do not add `group`
|
|
536
|
+
to the scenario export or owner contract. The optional `group` in MCP discovery
|
|
537
|
+
results is computed from folders; it is not authoring input. Change a group by
|
|
538
|
+
moving complete owner directories and updating imports, exports and any scenario,
|
|
539
|
+
behavior or capture references whose path-derived IDs change.
|
|
540
|
+
|
|
541
|
+
Ungrouped entries remain directly visible without a Default heading. Named groups
|
|
542
|
+
are collapsible and sorted alphabetically within each layer. Existing flat
|
|
543
|
+
projects continue to work without moving files. Tokens retain their categories.
|
|
544
|
+
|
|
514
545
|
Token scenarios live beside foundation CSS under the configured token directory.
|
|
515
546
|
The starter includes `tokens/Foundation.ads.scenario.tsx` and its local fixture for
|
|
516
547
|
a project-owned token review renderer. Keep its presentation in development-only `review/`:
|