@reqvire-org/ads 0.3.31 → 0.3.32
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/mcp/apps.mjs +3 -1
- package/dist/mcp/mutations.mjs +2 -1
- package/dist/showcase/client.bundle.js +21 -21
- package/dist/showcase/index.html +1 -1
- package/dist/showcase/style.css +4 -0
- package/dist/units.mjs +7 -1
- package/dist/validation-inputs.mjs +11 -1
- package/docs/CHANGELOG.md +12 -0
- package/docs/GUIDE.md +2 -0
- package/package.json +1 -1
package/dist/showcase/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<button data-section="patterns"><svg viewBox="0 0 16 16"><rect x="2" y="2" width="5" height="5"/><rect x="10" y="2" width="4" height="5"/><rect x="2" y="10" width="5" height="4"/><rect x="10" y="10" width="4" height="4"/></svg>Patterns</button>
|
|
11
11
|
<button data-section="composition"><svg viewBox="0 0 16 16"><path d="M2 2h4v4H2zM10 2h4v4h-4zM2 10h4v4H2zM10 10h4v4h-4z"/></svg>Composition</button>
|
|
12
12
|
</nav>
|
|
13
|
-
<div class="actions"><button id="preview-status" data-phase="opening" aria-label="Preview status: Connecting to ADS MCP…" title="Connecting to ADS MCP…" popovertarget="status-details"><span class="status-dot" aria-hidden="true"></span></button><div id="status-details" popover><p id="status" role="status">Connecting to ADS MCP…</p></div><button id="theme" aria-label="Use dark theme" title="Use dark theme"><svg viewBox="0 0 16 16"><path d="M13.5 9a5.5 5.5 0 0 1-6.5-6.5A5.5 5.5 0 1 0 13.5 9Z"/></svg></button><button id="minimize" aria-label="Minimize showcase menu" title="Minimize showcase menu (refresh to restore)"><svg viewBox="0 0 16 16"><path d="m4 10 4-4 4 4"/></svg></button></div>
|
|
13
|
+
<div class="actions"><button id="preview-status" data-phase="opening" aria-label="Preview status: Connecting to ADS MCP…" title="Connecting to ADS MCP…" popovertarget="status-details"><span class="status-dot" aria-hidden="true"></span></button><div id="status-details" popover><p id="status" role="status">Connecting to ADS MCP…</p></div><button id="viewport" aria-label="Phone viewport" aria-pressed="false" aria-controls="frame-slot" title="Preview at phone width (390 px)"><svg viewBox="0 0 16 16" aria-hidden="true"><rect x="4" y="1" width="8" height="14" rx="1.5"/><path d="M7 12.5h2"/></svg></button><button id="theme" aria-label="Use dark theme" title="Use dark theme"><svg viewBox="0 0 16 16"><path d="M13.5 9a5.5 5.5 0 0 1-6.5-6.5A5.5 5.5 0 1 0 13.5 9Z"/></svg></button><button id="minimize" aria-label="Minimize showcase menu" title="Minimize showcase menu (refresh to restore)"><svg viewBox="0 0 16 16"><path d="m4 10 4-4 4 4"/></svg></button></div>
|
|
14
14
|
</header>
|
|
15
15
|
<main><aside id="sidebar"><nav id="entries" aria-label="Tokens"></nav></aside><section id="preview" aria-label="Preview"><div id="loader" role="status" aria-label="Loading preview" hidden><span class="spinner" aria-hidden="true"></span></div><div id="frame-slot"></div></section></main>
|
|
16
16
|
<script type="module" src="/client.js"></script>
|
package/dist/showcase/style.css
CHANGED
|
@@ -12,3 +12,7 @@ main{flex:1;min-height:0;display:flex}#sidebar{width:var(--pane-width);flex:none
|
|
|
12
12
|
|
|
13
13
|
/* A different selection loads in the preview pane; edits keep using the header ring. */
|
|
14
14
|
#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}}
|
|
15
|
+
|
|
16
|
+
/* A real iframe viewport keeps phone previews responsive without changing the app host. */
|
|
17
|
+
:root[data-viewport="phone"] #frame-slot{width:min(390px,100%);margin-inline:auto}
|
|
18
|
+
#viewport[aria-pressed="true"]{background:var(--frame-ink);color:var(--frame-bg)}
|
package/dist/units.mjs
CHANGED
|
@@ -20,7 +20,13 @@ export function configurationFiles(options) {
|
|
|
20
20
|
}
|
|
21
21
|
const resolve = importResolver(options), visited = new Set();
|
|
22
22
|
function visit(file, entrypoint = false, typeConfig = false) {
|
|
23
|
-
if (!isInside(root, file) || file === root || /(?:^|[\\/])(?:node_modules|\.git|\.ds|dist)(?:[\\/]|$)/.test(path.relative(root, file)) || visited.has(file)
|
|
23
|
+
if (!isInside(root, file) || file === root || /(?:^|[\\/])(?:node_modules|\.git|\.ds|dist)(?:[\\/]|$)/.test(path.relative(root, file)) || visited.has(file)) return;
|
|
24
|
+
if (!existsSync(file)) {
|
|
25
|
+
// A proposed package script can refer to a live input that has not yet
|
|
26
|
+
// entered the isolated candidate. Keep its path so it can be copied.
|
|
27
|
+
if (entrypoint) files.add(slash(path.relative(root, file)));
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
24
30
|
// Registering a test command must not reassign its colocated checks or
|
|
25
31
|
// fixtures to configuration. Those remain in the behavior owner's patch.
|
|
26
32
|
if (isInside(dsRoot, file) && isDevelopmentFile(file, options)) return;
|
|
@@ -96,7 +96,17 @@ export function validationInputFiles(options, extraFiles = [], {maxFiles=Infinit
|
|
|
96
96
|
}
|
|
97
97
|
if (!/^[a-z][\w+.-]*:/i.test(specifier)) for (const dependency of resolve(specifier,file)) {
|
|
98
98
|
const target=existsSync(dependency) ? realpathSync(dependency) : dependency;
|
|
99
|
-
if (!target.split(path.sep).includes("node_modules"))
|
|
99
|
+
if (!target.split(path.sep).includes("node_modules")) {
|
|
100
|
+
visit(target);
|
|
101
|
+
// TypeScript may resolve a JavaScript import to its declaration.
|
|
102
|
+
// Candidate builds need the runtime beside that declaration too,
|
|
103
|
+
// including its own imports and asset references.
|
|
104
|
+
const extension = /\.d\.(ts|mts|cts)$/.exec(target)?.[1];
|
|
105
|
+
if (extension) {
|
|
106
|
+
const runtime = target.replace(/\.d\.(?:ts|mts|cts)$/, extension === "mts" ? ".mjs" : extension === "cts" ? ".cjs" : ".js");
|
|
107
|
+
if (existsSync(runtime)) visit(runtime);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
100
110
|
}
|
|
101
111
|
}
|
|
102
112
|
for (const asset of refs.assets) local(asset);
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.32
|
|
4
|
+
|
|
5
|
+
- Add a phone-width showcase toggle for components, patterns and compositions.
|
|
6
|
+
Preserve mounted example state and shareable viewport links; collapse the
|
|
7
|
+
catalogue automatically on narrow browsers without changing the app host.
|
|
8
|
+
- Allow self-contained data/blob widget frames inside sandboxed Apps while
|
|
9
|
+
retaining external frame restrictions and parent-document isolation.
|
|
10
|
+
- Copy JavaScript runtimes alongside resolved declarations and include newly
|
|
11
|
+
selected package-command entrypoints and dependencies in mutation candidates.
|
|
12
|
+
- Ignore local Claude Code configuration and installed skill copies; the
|
|
13
|
+
canonical distributed skills remain in `skills/`.
|
|
14
|
+
|
|
3
15
|
## 0.3.31
|
|
4
16
|
|
|
5
17
|
- Allow the Bun-only package smoke case one minute for cold candidate/browser
|
package/docs/GUIDE.md
CHANGED
|
@@ -577,6 +577,8 @@ classes or native widget replicas. Reusable review layouts are public project
|
|
|
577
577
|
patterns; the outer browser shell is tooling UI. Full-app integration harnesses
|
|
578
578
|
belong in application tests. See the [contract](ADS.md#showcase-contract).
|
|
579
579
|
|
|
580
|
+
The showcase header's **Phone viewport** toggle constrains the real preview iframe to 390 CSS pixels (or the available width on a narrower screen). It is available for patterns and compositions as well as components, keeps the mounted example and its state, and does not change the selected application host. Use it to review a responsive web shell at phone width independently of a native mobile app shell. `?viewport=phone` preserves this preview choice in a link; toggle it off to follow the available browser width. On phone browsers the catalogue starts collapsed, leaving the available width to the preview; the navigation button can reopen it. Automated captures retain their exact requested viewport.
|
|
581
|
+
|
|
580
582
|
For this checkout, `npm run dev:showcase` builds the tool and launches its client;
|
|
581
583
|
`npm run build:showcase` compiles scenario artifacts for verification. Use `bun
|
|
582
584
|
run` with the same script names. These commands do not install a UI catalogue.
|