foundry-design 0.2.0-beta.21 → 0.2.0-beta.23

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.
Files changed (41) hide show
  1. package/README.md +6 -4
  2. package/dist/delivery-capture.d.ts +8 -0
  3. package/dist/delivery-capture.d.ts.map +1 -0
  4. package/dist/delivery-capture.js +234 -0
  5. package/dist/delivery-capture.js.map +1 -0
  6. package/dist/delivery-export.d.ts +3 -1
  7. package/dist/delivery-export.d.ts.map +1 -1
  8. package/dist/delivery-export.js +172 -8
  9. package/dist/delivery-export.js.map +1 -1
  10. package/dist/doctor.d.ts +8 -1
  11. package/dist/doctor.d.ts.map +1 -1
  12. package/dist/doctor.js +110 -13
  13. package/dist/doctor.js.map +1 -1
  14. package/dist/index.js +51 -27
  15. package/dist/index.js.map +1 -1
  16. package/dist/indexer.d.ts.map +1 -1
  17. package/dist/indexer.js +9 -0
  18. package/dist/indexer.js.map +1 -1
  19. package/dist/installer.d.ts +2 -1
  20. package/dist/installer.d.ts.map +1 -1
  21. package/dist/installer.js +2 -1
  22. package/dist/installer.js.map +1 -1
  23. package/dist/release.d.ts +3 -3
  24. package/dist/release.js +1 -1
  25. package/dist/session-resume.d.ts +16 -0
  26. package/dist/session-resume.d.ts.map +1 -0
  27. package/dist/session-resume.js +30 -0
  28. package/dist/session-resume.js.map +1 -0
  29. package/dist/source-anchor.d.ts +8 -0
  30. package/dist/source-anchor.d.ts.map +1 -0
  31. package/dist/source-anchor.js +40 -0
  32. package/dist/source-anchor.js.map +1 -0
  33. package/dist/visual-check-capture.d.ts +8 -0
  34. package/dist/visual-check-capture.d.ts.map +1 -0
  35. package/dist/visual-check-capture.js +331 -0
  36. package/dist/visual-check-capture.js.map +1 -0
  37. package/dist/visual-check.d.ts +10 -0
  38. package/dist/visual-check.d.ts.map +1 -0
  39. package/dist/visual-check.js +411 -0
  40. package/dist/visual-check.js.map +1 -0
  41. package/package.json +6 -4
@@ -0,0 +1,331 @@
1
+ import { execFile } from 'node:child_process';
2
+ import { createHash } from 'node:crypto';
3
+ import { promisify } from 'node:util';
4
+ export class UnsupportedVisualContextError extends Error {
5
+ }
6
+ // tsx/esbuild can preserve nested function names through a local __name helper.
7
+ // Keep that helper inside this evaluation, never on the project's global object.
8
+ function evaluateInPage(page, callback, argument) {
9
+ return page.evaluate(`(() => { const __name = (target) => target; return (${callback.toString()})(${JSON.stringify(argument)}); })()`);
10
+ }
11
+ export function validateVisualUrl(input) {
12
+ const url = new URL(input);
13
+ if (!['http:', 'https:'].includes(url.protocol) ||
14
+ !['localhost', '127.0.0.1', '[::1]'].includes(url.hostname) ||
15
+ url.username ||
16
+ url.password) {
17
+ throw new Error('Visual checks require an HTTP(S) loopback project URL without credentials.');
18
+ }
19
+ if ([...url.searchParams.keys()].some((key) => /token|secret|password|capability|session/i.test(key))) {
20
+ throw new Error('Register the product URL without session credentials or secret query parameters.');
21
+ }
22
+ return url;
23
+ }
24
+ export function screenConfigurationHash(screen) {
25
+ return createHash('sha256').update(JSON.stringify(screen)).digest('hex');
26
+ }
27
+ async function projectRevision(projectRoot) {
28
+ try {
29
+ const execute = promisify(execFile);
30
+ const { stdout: revision } = await execute('git', ['rev-parse', 'HEAD'], {
31
+ cwd: projectRoot,
32
+ timeout: 5000,
33
+ });
34
+ const { stdout: status } = await execute('git', ['status', '--porcelain', '--untracked-files=normal', '--', '.', ':!.foundry/visual-checks'], { cwd: projectRoot, timeout: 5000 });
35
+ return { sourceRevision: revision.trim(), sourceDirty: Boolean(status.trim()) };
36
+ }
37
+ catch {
38
+ return {};
39
+ }
40
+ }
41
+ async function applyHook(page, axis, value, hook) {
42
+ if (!hook) {
43
+ if (value !== 'current')
44
+ throw new UnsupportedVisualContextError(`${axis} “${value}” needs an explicit authored attribute or class hook.`);
45
+ return;
46
+ }
47
+ const result = await evaluateInPage(page, ({ hook, axis }) => {
48
+ const nodes = document.querySelectorAll(hook.selector);
49
+ if (nodes.length !== 1)
50
+ return `${axis} hook must resolve to exactly one target (found ${nodes.length}).`;
51
+ const target = nodes[0];
52
+ const styles = [];
53
+ function collect(rules) {
54
+ for (const rule of Array.from(rules)) {
55
+ if ('selectorText' in rule)
56
+ styles.push(rule.selectorText);
57
+ if ('cssRules' in rule)
58
+ collect(rule.cssRules);
59
+ }
60
+ }
61
+ for (const sheet of Array.from(document.styleSheets)) {
62
+ try {
63
+ collect(sheet.cssRules);
64
+ }
65
+ catch {
66
+ /* Cross-origin rules cannot prove an authored hook. */
67
+ }
68
+ }
69
+ const hookSelector = hook.attribute === 'class'
70
+ ? `.${CSS.escape(hook.value)}`
71
+ : `[${hook.attribute}="${CSS.escape(hook.value)}"]`;
72
+ const normalize = (selector) => selector.replace(/\[([^\]=]+)=['"]?([^\]'"\s]+)['"]?\]/g, '[$1="$2"]');
73
+ if (!styles.some((selector) => normalize(selector).includes(hookSelector))) {
74
+ return `No readable authored CSS selector was found for ${axis} ${hookSelector}.`;
75
+ }
76
+ if (hook.attribute === 'class')
77
+ target.classList.add(hook.value);
78
+ else
79
+ target.setAttribute(hook.attribute, hook.value);
80
+ return null;
81
+ }, { hook, axis });
82
+ if (result)
83
+ throw new UnsupportedVisualContextError(result);
84
+ }
85
+ async function stableGeometry(page, screen) {
86
+ const sample = () => evaluateInPage(page, ({ masks, targets }) => {
87
+ const masked = (node) => masks.some((selector) => node.matches(selector) || node.closest(selector));
88
+ const selectorFor = (node) => {
89
+ if (node.id && document.querySelectorAll(`#${CSS.escape(node.id)}`).length === 1)
90
+ return `#${CSS.escape(node.id)}`;
91
+ const path = [];
92
+ let cursor = node;
93
+ while (cursor && cursor !== document.documentElement) {
94
+ const parent = cursor.parentElement;
95
+ const position = parent ? Array.from(parent.children).indexOf(cursor) + 1 : 1;
96
+ path.unshift(`${cursor.tagName.toLowerCase()}:nth-child(${position})`);
97
+ cursor = parent;
98
+ }
99
+ return `html > ${path.join(' > ')}`;
100
+ };
101
+ const nodes = [
102
+ ...new Set(targets.length
103
+ ? targets.flatMap((selector) => Array.from(document.querySelectorAll(selector)))
104
+ : Array.from(document.body.querySelectorAll('*'))),
105
+ ];
106
+ const geometry = [];
107
+ const findings = [];
108
+ for (const node of nodes.slice(0, 2000)) {
109
+ if (masked(node))
110
+ continue;
111
+ const rect = node.getBoundingClientRect();
112
+ const style = getComputedStyle(node);
113
+ if (!rect.width ||
114
+ !rect.height ||
115
+ style.visibility === 'hidden' ||
116
+ style.display === 'none')
117
+ continue;
118
+ const selector = selectorFor(node);
119
+ const round = (value) => Math.round(value * 100) / 100;
120
+ geometry.push({
121
+ selector,
122
+ x: round(rect.x),
123
+ y: round(rect.y),
124
+ width: round(rect.width),
125
+ height: round(rect.height),
126
+ });
127
+ if (rect.right > innerWidth + 1 || rect.left < -1)
128
+ findings.push({
129
+ kind: 'horizontal-overflow',
130
+ selector,
131
+ message: 'Element extends beyond the horizontal viewport.',
132
+ });
133
+ if ((['hidden', 'clip'].includes(style.overflowX) &&
134
+ node.scrollWidth > node.clientWidth + 1) ||
135
+ (['hidden', 'clip'].includes(style.overflowY) &&
136
+ node.scrollHeight > node.clientHeight + 1))
137
+ findings.push({
138
+ kind: 'clipped-content',
139
+ selector,
140
+ message: 'Content exceeds a clipped element. This may be intentional.',
141
+ });
142
+ if (node.matches('button, a[href], input:not([type="hidden"]), select, textarea, [role="button"]')) {
143
+ if (rect.width < 44 || rect.height < 44)
144
+ findings.push({
145
+ kind: 'small-target',
146
+ selector,
147
+ message: `Interactive target measures ${round(rect.width)} × ${round(rect.height)}px; check whether a 44px target is appropriate.`,
148
+ });
149
+ const labelled = node
150
+ .getAttribute('aria-labelledby')
151
+ ?.split(/\s+/)
152
+ .map((id) => document.getElementById(id)?.textContent || '')
153
+ .join('');
154
+ const inputLabels = 'labels' in node
155
+ ? Array.from(node.labels ?? [])
156
+ .map((label) => label.textContent)
157
+ .join('')
158
+ : '';
159
+ const text = (node.getAttribute('aria-label') ||
160
+ labelled ||
161
+ inputLabels ||
162
+ node.textContent ||
163
+ node.getAttribute('title') ||
164
+ ('value' in node && node.matches('input[type="submit"],input[type="button"]')
165
+ ? String(node.value)
166
+ : '')).trim();
167
+ if (!text)
168
+ findings.push({
169
+ kind: 'missing-name',
170
+ selector,
171
+ message: 'No accessible name was found by the basic name check.',
172
+ });
173
+ }
174
+ if (node.matches('img') &&
175
+ !node.hasAttribute('alt') &&
176
+ node.getAttribute('role') !== 'presentation' &&
177
+ node.getAttribute('aria-hidden') !== 'true')
178
+ findings.push({
179
+ kind: 'missing-alt',
180
+ selector,
181
+ message: 'Image has no alt attribute.',
182
+ });
183
+ }
184
+ return { geometry, findings, truncated: nodes.length > 2000 };
185
+ }, { masks: screen.masks, targets: screen.targets });
186
+ let previous = '';
187
+ let stable = 0;
188
+ for (let attempt = 0; attempt < 25; attempt++) {
189
+ const value = await sample();
190
+ const signature = JSON.stringify(value.geometry);
191
+ stable = signature === previous ? stable + 1 : 0;
192
+ if (stable >= 3)
193
+ return value;
194
+ previous = signature;
195
+ await page.waitForTimeout(100);
196
+ }
197
+ throw new Error('Layout did not become stable. Mask dynamic content or fix the preview before capturing.');
198
+ }
199
+ export async function captureVisualScreen(browser, screen, projectRoot, screenshot) {
200
+ validateVisualUrl(screen.url);
201
+ const context = await browser.newContext({
202
+ viewport: screen.viewport,
203
+ deviceScaleFactor: 1,
204
+ reducedMotion: 'reduce',
205
+ locale: 'en-US',
206
+ timezoneId: 'UTC',
207
+ });
208
+ try {
209
+ await context.route('**/*', async (route) => {
210
+ if (route.request().isNavigationRequest()) {
211
+ try {
212
+ validateVisualUrl(route.request().url());
213
+ }
214
+ catch {
215
+ await route.abort('blockedbyclient');
216
+ return;
217
+ }
218
+ }
219
+ await route.continue();
220
+ });
221
+ const page = await context.newPage();
222
+ page.setDefaultTimeout(10000);
223
+ const response = await page.goto(screen.url, { waitUntil: 'domcontentloaded', timeout: 15000 });
224
+ if (!response?.ok())
225
+ throw new Error(`Preview returned HTTP ${response?.status() ?? 'no response'}.`);
226
+ validateVisualUrl(page.url());
227
+ // Client-rendered previews can mount after DOMContentLoaded (notably Storybook).
228
+ // Wait for the registered content before applying hooks or measuring its assets.
229
+ const selectors = new Set([
230
+ ...screen.targets,
231
+ ...screen.masks,
232
+ ...(screen.themeHook ? [screen.themeHook.selector] : []),
233
+ ...(screen.stateHook ? [screen.stateHook.selector] : []),
234
+ ]);
235
+ await Promise.all([...selectors].map(async (selector) => {
236
+ try {
237
+ await page.locator(selector).first().waitFor({ state: 'attached', timeout: 10000 });
238
+ }
239
+ catch {
240
+ throw new UnsupportedVisualContextError(`Registered selector did not become available: ${selector}`);
241
+ }
242
+ }));
243
+ await evaluateInPage(page, async () => {
244
+ await Promise.race([
245
+ document.fonts.ready,
246
+ new Promise((_, reject) => setTimeout(() => reject(new Error('Fonts did not finish loading.')), 10000)),
247
+ ]);
248
+ }, undefined);
249
+ await applyHook(page, 'Theme', screen.theme, screen.themeHook);
250
+ await applyHook(page, 'State', screen.state, screen.stateHook);
251
+ await page.addStyleTag({
252
+ content: '*,*::before,*::after{animation:none!important;transition:none!important;caret-color:transparent!important;scroll-behavior:auto!important}',
253
+ });
254
+ await evaluateInPage(page, async (masks) => {
255
+ // Force style/layout after authored hooks so newly requested fonts are included.
256
+ document.body.getBoundingClientRect();
257
+ const ready = async () => {
258
+ await document.fonts.ready;
259
+ const failedFonts = Array.from(document.fonts).filter((face) => face.status === 'error');
260
+ if (failedFonts.length)
261
+ throw new Error('A project font failed to load. Capture cannot verify the intended typography.');
262
+ await Promise.all(Array.from(document.images)
263
+ .filter((image) => {
264
+ const rect = image.getBoundingClientRect();
265
+ return (!masks.some((selector) => image.matches(selector) || image.closest(selector)) &&
266
+ rect.width > 0 &&
267
+ rect.height > 0 &&
268
+ rect.bottom > 0 &&
269
+ rect.top < innerHeight);
270
+ })
271
+ .map(async (image) => {
272
+ if (!image.complete)
273
+ await image.decode();
274
+ if (!image.naturalWidth)
275
+ throw new Error('A visible project image failed to load.');
276
+ }));
277
+ };
278
+ await Promise.race([
279
+ ready(),
280
+ new Promise((_, reject) => setTimeout(() => reject(new Error('Fonts or visible images did not become ready.')), 10000)),
281
+ ]);
282
+ }, screen.masks);
283
+ for (const selector of [...screen.targets, ...screen.masks]) {
284
+ if (!(await page.locator(selector).count()))
285
+ throw new UnsupportedVisualContextError(`Registered selector was not found: ${selector}`);
286
+ }
287
+ const measured = await stableGeometry(page, screen);
288
+ const bytes = await page.screenshot({
289
+ path: screenshot,
290
+ animations: 'disabled',
291
+ caret: 'hide',
292
+ mask: screen.masks.map((selector) => page.locator(selector)),
293
+ maskColor: '#808080',
294
+ fullPage: false,
295
+ });
296
+ const after = await stableGeometry(page, screen);
297
+ if (JSON.stringify(measured.geometry) !== JSON.stringify(after.geometry))
298
+ throw new Error('Layout changed during capture. The capture cannot be used as evidence.');
299
+ return {
300
+ version: 1,
301
+ screen,
302
+ configurationHash: screenConfigurationHash(screen),
303
+ createdAt: new Date().toISOString(),
304
+ ...(await projectRevision(projectRoot)),
305
+ browser: browser.version(),
306
+ platform: `${process.platform}/${process.arch}`,
307
+ deviceScaleFactor: 1,
308
+ motion: 'reduced; CSS animations and transitions disabled',
309
+ screenshot,
310
+ screenshotHash: createHash('sha256').update(bytes).digest('hex'),
311
+ geometry: measured.geometry,
312
+ findings: measured.findings,
313
+ evidence: [
314
+ 'Waited for registered targets, masks and authored hook elements before capture.',
315
+ 'Waited for document.fonts.ready.',
316
+ 'Geometry stable across four samples before and after capture.',
317
+ 'Fresh isolated browser context; locale en-US, timezone UTC.',
318
+ 'Basic overflow, clipping, target-size and name/alt checks only; not a complete accessibility audit.',
319
+ ...(measured.truncated
320
+ ? [
321
+ 'Geometry checks limited to the first 2000 elements. Register explicit targets to narrow this screen.',
322
+ ]
323
+ : []),
324
+ ],
325
+ };
326
+ }
327
+ finally {
328
+ await context.close();
329
+ }
330
+ }
331
+ //# sourceMappingURL=visual-check-capture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visual-check-capture.js","sourceRoot":"","sources":["../src/visual-check-capture.ts"],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AAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACjD,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC;YACtE,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;QAC5F,OAAO;YACL,OAAO,EAAE,CAAC;YACV,MAAM;YACN,iBAAiB,EAAE,uBAAuB,CAAC,MAAM,CAAC;YAClD,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,GAAG,CAAC,MAAM,eAAe,CAAC,WAAW,CAAC,CAAC;YACvC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE;YAC1B,QAAQ,EAAE,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE;YAC/C,iBAAiB,EAAE,CAAC;YACpB,MAAM,EAAE,kDAAkD;YAC1D,UAAU;YACV,cAAc,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YAChE,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,QAAQ,EAAE;gBACR,iFAAiF;gBACjF,kCAAkC;gBAClC,+DAA+D;gBAC/D,6DAA6D;gBAC7D,qGAAqG;gBACrG,GAAG,CAAC,QAAQ,CAAC,SAAS;oBACpB,CAAC,CAAC;wBACE,sGAAsG;qBACvG;oBACH,CAAC,CAAC,EAAE,CAAC;aACR;SACF,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;AACH,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type VisualCapture, type VisualCheckReport, type VisualCheckResult, type VisualScreen } from 'foundry-design-protocol';
2
+ export declare function registerVisualScreen(projectRoot: string, input: unknown): Promise<VisualScreen>;
3
+ export declare function visualCheckExitCode(results: VisualCheckResult[]): VisualCheckReport['exitCode'];
4
+ export declare function compareVisualCaptures(baseline: VisualCapture, current: VisualCapture, baselineImage: string, currentImage: string, diffImage: string): Promise<Pick<VisualCheckResult, 'status' | 'reason' | 'changedPixels' | 'totalPixels' | 'changedRatio' | 'geometryChanges' | 'newFindings'>>;
5
+ export declare function renderVisualCheckHtml(report: VisualCheckReport): string;
6
+ export declare function runVisualChecks(projectRoot: string, name?: string): Promise<VisualCheckReport>;
7
+ export declare function approveVisualBaseline(projectRoot: string, runId: string, name: string): Promise<string>;
8
+ export declare function listVisualCheckReports(projectRoot: string): Promise<VisualCheckReport[]>;
9
+ export declare function runVisualCheckCli(args: string[], projectRoot: string): Promise<number>;
10
+ //# sourceMappingURL=visual-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visual-check.d.ts","sourceRoot":"","sources":["../src/visual-check.ts"],"names":[],"mappings":"AAgBA,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EAEtB,KAAK,YAAY,EAClB,MAAM,yBAAyB,CAAC;AAkGjC,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,YAAY,CAAC,CAcvB;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAS/F;AAMD,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,aAAa,EACtB,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,GAChB,OAAO,CACR,IAAI,CACF,iBAAiB,EACf,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,aAAa,GACb,cAAc,GACd,iBAAiB,GACjB,aAAa,CAChB,CACF,CA4FA;AAUD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAOvE;AAED,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,iBAAiB,CAAC,CAkG5B;AAED,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,CA0CjB;AAED,wBAAsB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAmB9F;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiF5F"}