@fasl-work/caos-app-shell 0.13.0 → 0.13.1

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.
@@ -1,72 +1,72 @@
1
- #!/usr/bin/env node
2
- // caos-shell-gate: the measured web baseline of a CAOS product (ADR-0071, ADR-0017, ADR-0016, ADR-0078).
3
- // The checks and the traps each one embeds are listed in gate/run.mjs; the self-test (npm run test:gate in the
4
- // shell repository) plants one defect per check and requires each to fail.
5
- //
6
- // Usage:
7
- // npx caos-shell-gate --serve dist --expect-brand "Contraste" a Pages-faithful server over the build
8
- // npx caos-shell-gate --url https://contraste.fasl-work.com --expect-brand "Contraste" the deployed origin
9
- // Options:
10
- // --base-path /Repo/ the site's base path with --serve (a project page); default /
11
- // --routes /,/methodology the routes; default: read from the header navigation
12
- // --workbench /app the routes that carry the case workbench; default /app
13
- // --sizes 390x844,...,2560x1440 --themes light,dark --langs en,es
14
- // --case-sample id1,id2 cases walked outside the primary mode; default the first and the last
15
- // --single-case the workbench has one case and no case control
16
- // --idle-ms 3000 --settle-ms 15000 --text-floor 400 --instrument-min 0.5 --stage-fill-min 0.3 --stage-floor 140
17
- // --wide-font-sizes 390x844,1280x800 the sizes of the wide-font pass (G10); --no-wide-font skips it
18
- // --out gate-output report (gate-report.json), screenshots (shots/) and the capture index (index.html)
19
- // Needs `playwright` in the consuming project (optional peer dependency). Exit 1 on any failure, 2 on misuse.
20
-
21
- import { runGate } from '../gate/run.mjs';
22
-
23
- const FLAGS = new Set(['single-case', 'no-wide-font']);
24
- const args = {};
25
- const argv = process.argv.slice(2);
26
- for (let i = 0; i < argv.length; i += 1) {
27
- const a = argv[i];
28
- if (!a.startsWith('--')) continue;
29
- const key = a.slice(2);
30
- if (FLAGS.has(key)) args[key] = true;
31
- else args[key] = argv[i + 1];
32
- if (!FLAGS.has(key)) i += 1;
33
- }
34
- const num = (k) => (args[k] === undefined ? undefined : Number(args[k]));
35
- const options = {
36
- url: args.url,
37
- serve: args.serve,
38
- basePath: args['base-path'],
39
- expectBrand: args['expect-brand'],
40
- routes: args.routes,
41
- workbench: args.workbench,
42
- sizes: args.sizes,
43
- themes: args.themes,
44
- langs: args.langs,
45
- caseSample: args['case-sample'],
46
- singleCase: args['single-case'] === true,
47
- idleMs: num('idle-ms'),
48
- settleMs: num('settle-ms'),
49
- textFloor: num('text-floor'),
50
- instrumentMin: num('instrument-min'),
51
- stageFillMin: num('stage-fill-min'),
52
- stageFloor: num('stage-floor'),
53
- wideFontSizes: args['wide-font-sizes'],
54
- wideFont: args['no-wide-font'] === true ? false : undefined,
55
- out: args.out,
56
- };
57
- for (const k of Object.keys(options)) if (options[k] === undefined) delete options[k];
58
-
59
- let report;
60
- try {
61
- report = await runGate(options);
62
- } catch (e) {
63
- console.error(e.message);
64
- process.exit(2);
65
- }
66
- const shown = report.failures.slice(0, 80);
67
- for (const f of shown) console.log(`FAIL [${f.check}] ${f.route} ${f.mode}${f.trail ? ` (${f.trail})` : ''}: ${f.message}`);
68
- if (report.failures.length > shown.length) console.log(`... and ${report.failures.length - shown.length} more in ${options.out ?? 'gate-output'}/gate-report.json`);
69
- for (const w of report.waivers ?? []) console.log(`WAIVER ${w.route} (${w.lang}) ${w.floor}: ${w.reason}${w.valid ? '' : ' [refused]'}`);
70
- const counts = Object.entries(report.checks).map(([k, n]) => `${k} ${n}`).join(', ');
71
- console.log(report.ok ? `caos-shell-gate: OK, ${report.states} measured states` : `caos-shell-gate: ${report.failures.length} failure(s) in ${report.states} measured states (${counts})`);
72
- process.exit(report.ok ? 0 : 1);
1
+ #!/usr/bin/env node
2
+ // caos-shell-gate: the measured web baseline of a CAOS product (ADR-0071, ADR-0017, ADR-0016, ADR-0078).
3
+ // The checks and the traps each one embeds are listed in gate/run.mjs; the self-test (npm run test:gate in the
4
+ // shell repository) plants one defect per check and requires each to fail.
5
+ //
6
+ // Usage:
7
+ // npx caos-shell-gate --serve dist --expect-brand "Contraste" a Pages-faithful server over the build
8
+ // npx caos-shell-gate --url https://contraste.fasl-work.com --expect-brand "Contraste" the deployed origin
9
+ // Options:
10
+ // --base-path /Repo/ the site's base path with --serve (a project page); default /
11
+ // --routes /,/methodology the routes; default: read from the header navigation
12
+ // --workbench /app the routes that carry the case workbench; default /app
13
+ // --sizes 390x844,...,2560x1440 --themes light,dark --langs en,es
14
+ // --case-sample id1,id2 cases walked outside the primary mode; default the first and the last
15
+ // --single-case the workbench has one case and no case control
16
+ // --idle-ms 3000 --settle-ms 15000 --text-floor 400 --instrument-min 0.5 --stage-fill-min 0.3 --stage-floor 140
17
+ // --wide-font-sizes 390x844,1280x800 the sizes of the wide-font pass (G10); --no-wide-font skips it
18
+ // --out gate-output report (gate-report.json), screenshots (shots/) and the capture index (index.html)
19
+ // Needs `playwright` in the consuming project (optional peer dependency). Exit 1 on any failure, 2 on misuse.
20
+
21
+ import { runGate } from '../gate/run.mjs';
22
+
23
+ const FLAGS = new Set(['single-case', 'no-wide-font']);
24
+ const args = {};
25
+ const argv = process.argv.slice(2);
26
+ for (let i = 0; i < argv.length; i += 1) {
27
+ const a = argv[i];
28
+ if (!a.startsWith('--')) continue;
29
+ const key = a.slice(2);
30
+ if (FLAGS.has(key)) args[key] = true;
31
+ else args[key] = argv[i + 1];
32
+ if (!FLAGS.has(key)) i += 1;
33
+ }
34
+ const num = (k) => (args[k] === undefined ? undefined : Number(args[k]));
35
+ const options = {
36
+ url: args.url,
37
+ serve: args.serve,
38
+ basePath: args['base-path'],
39
+ expectBrand: args['expect-brand'],
40
+ routes: args.routes,
41
+ workbench: args.workbench,
42
+ sizes: args.sizes,
43
+ themes: args.themes,
44
+ langs: args.langs,
45
+ caseSample: args['case-sample'],
46
+ singleCase: args['single-case'] === true,
47
+ idleMs: num('idle-ms'),
48
+ settleMs: num('settle-ms'),
49
+ textFloor: num('text-floor'),
50
+ instrumentMin: num('instrument-min'),
51
+ stageFillMin: num('stage-fill-min'),
52
+ stageFloor: num('stage-floor'),
53
+ wideFontSizes: args['wide-font-sizes'],
54
+ wideFont: args['no-wide-font'] === true ? false : undefined,
55
+ out: args.out,
56
+ };
57
+ for (const k of Object.keys(options)) if (options[k] === undefined) delete options[k];
58
+
59
+ let report;
60
+ try {
61
+ report = await runGate(options);
62
+ } catch (e) {
63
+ console.error(e.message);
64
+ process.exit(2);
65
+ }
66
+ const shown = report.failures.slice(0, 80);
67
+ for (const f of shown) console.log(`FAIL [${f.check}] ${f.route} ${f.mode}${f.trail ? ` (${f.trail})` : ''}: ${f.message}`);
68
+ if (report.failures.length > shown.length) console.log(`... and ${report.failures.length - shown.length} more in ${options.out ?? 'gate-output'}/gate-report.json`);
69
+ for (const w of report.waivers ?? []) console.log(`WAIVER ${w.route} (${w.lang}) ${w.floor}: ${w.reason}${w.valid ? '' : ' [refused]'}`);
70
+ const counts = Object.entries(report.checks).map(([k, n]) => `${k} ${n}`).join(', ');
71
+ console.log(report.ok ? `caos-shell-gate: OK, ${report.states} measured states` : `caos-shell-gate: ${report.failures.length} failure(s) in ${report.states} measured states (${counts})`);
72
+ process.exit(report.ok ? 0 : 1);
package/dist/chart.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useShellLang, useThemeStore, useStageSize, pick, resolveToken, NBSP, formatNumber, formatTicks } from './chunk-3QYQCWSZ.js';
2
- import './chunk-YVVDBSAC.js';
1
+ import { useShellLang, useThemeStore, useStageSize, pick, resolveToken, NBSP, formatNumber, formatTicks } from './chunk-YECZXGVG.js';
2
+ import './chunk-33WTUQ7Q.js';
3
3
  import { useRef, useCallback, useState, useMemo, useEffect } from 'react';
4
4
  import uPlot from 'uplot';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { LANG_STORAGE_KEY, THEME_STORAGE_KEY } from './chunk-YVVDBSAC.js';
1
+ import { LANG_STORAGE_KEY, THEME_STORAGE_KEY } from './chunk-33WTUQ7Q.js';
2
2
  import { create } from 'zustand';
3
3
  import { useMemo, useState, useRef, useCallback, useEffect } from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as APP_ROUTE, a as AppShell, b as ArchTab, c as ArchitectureConfig, d as ArchitectureModal, L as LANDING_ROUTE, e as LANG_STORAGE_KEY, S as STANDARD_ROUTES, f as ShellConfig, g as ShellRoute, T as THEME_BOOT_SCRIPT, h as THEME_STORAGE_KEY, v as validateArchitectureConfig } from './keys-CTQZafOf.js';
1
+ export { A as APP_ROUTE, a as AppShell, b as ArchTab, c as ArchitectureConfig, d as ArchitectureModal, L as LANDING_ROUTE, e as LANG_STORAGE_KEY, S as STANDARD_ROUTES, f as ShellConfig, g as ShellRoute, T as THEME_BOOT_SCRIPT, h as THEME_STORAGE_KEY, v as validateArchitectureConfig } from './keys-DDQGijwQ.js';
2
2
  import * as react from 'react';
3
3
  import { ReactNode, Component, ErrorInfo } from 'react';
4
4
  import * as zustand from 'zustand';
@@ -406,9 +406,10 @@ declare function ReferenceList({ ids, heading }: {
406
406
 
407
407
  /**
408
408
  * A documentation route (Introduction, Methodology, Implementation, Experiments, Benchmark): the page head with
409
- * its title and lede, then sections. `wide` for a route with a sub-tab rail (ADR-0071 rule 2, amended
410
- * 2026-09-04); a single prose column keeps the reading width and is centred (ADR-0017 §1). Text takes the full width
411
- * of the column, and the references of its sections are listed once at the end of the page (ADR-0017 §4).
409
+ * its title and lede, then sections. Every documentation route takes the full width of the page, the Introduction
410
+ * included (Felipe, 2026-10-13: the Introduction did not use the full width while Methodology, Implementation,
411
+ * Experiments and Benchmark did; 0.13.1). `wide` is kept for compatibility and changes nothing. Text takes the full
412
+ * width of the column, and the references of its sections are listed once at the end of the page (ADR-0017 section 4).
412
413
  */
413
414
  /**
414
415
  * The areas a section may declare, per documentation route (ADR-0017 section 2.1). The gate's table (`gate/areas.mjs`)
@@ -424,6 +425,7 @@ declare const DOC_AREAS: {
424
425
  interface DocPageProps {
425
426
  title: BiText;
426
427
  lede: ReactNode;
428
+ /** Kept for compatibility (0.13.1): every documentation route is full width, so this changes nothing. */
427
429
  wide?: boolean;
428
430
  /**
429
431
  * The required areas this page cannot carry, each with the reason (ADR-0017 section 2.1): rendered as
@@ -436,7 +438,7 @@ interface DocPageProps {
436
438
  }>;
437
439
  children: ReactNode;
438
440
  }
439
- declare function DocPage({ title, lede, wide, floorWaivers, children }: DocPageProps): react.JSX.Element;
441
+ declare function DocPage({ title, lede, floorWaivers, children }: DocPageProps): react.JSX.Element;
440
442
  interface DocSectionProps {
441
443
  title: BiText;
442
444
  id?: string;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { useThemeStore, useShellLang, useLangStore, SHELL_TOKENS, pick, useStageSize, NOT_AVAILABLE, formatTicks, formatNumber, NBSP } from './chunk-3QYQCWSZ.js';
2
- export { NBSP, NOT_AVAILABLE, SCIENTIFIC_BELOW, SHELL_TOKENS, Stage, applyTheme, formatNumber, formatTicks, pick, readTheme, resolveToken, useFormat, useLangStore, useShellLang, useStageSize, useThemeStore, useThemeTokens } from './chunk-3QYQCWSZ.js';
3
- import { APP_ROUTE, LANDING_ROUTE } from './chunk-YVVDBSAC.js';
4
- export { APP_ROUTE, LANDING_ROUTE, LANG_STORAGE_KEY, STANDARD_ROUTES, THEME_BOOT_SCRIPT, THEME_STORAGE_KEY } from './chunk-YVVDBSAC.js';
1
+ import { useThemeStore, useShellLang, useLangStore, SHELL_TOKENS, pick, useStageSize, NOT_AVAILABLE, formatTicks, formatNumber, NBSP } from './chunk-YECZXGVG.js';
2
+ export { NBSP, NOT_AVAILABLE, SCIENTIFIC_BELOW, SHELL_TOKENS, Stage, applyTheme, formatNumber, formatTicks, pick, readTheme, resolveToken, useFormat, useLangStore, useShellLang, useStageSize, useThemeStore, useThemeTokens } from './chunk-YECZXGVG.js';
3
+ import { APP_ROUTE, LANDING_ROUTE } from './chunk-33WTUQ7Q.js';
4
+ export { APP_ROUTE, LANDING_ROUTE, LANG_STORAGE_KEY, STANDARD_ROUTES, THEME_BOOT_SCRIPT, THEME_STORAGE_KEY } from './chunk-33WTUQ7Q.js';
5
5
  import { createContext, Component, useState, useRef, useId, useEffect, useCallback, useContext, useMemo, useLayoutEffect, Children } from 'react';
6
6
  import { useInRouterContext, NavLink, useLocation, Navigate, Link } from 'react-router';
7
7
  import { Sun, Moon, Languages, Boxes, CodeXml, Globe, Briefcase, Info } from 'lucide-react';
@@ -1149,10 +1149,10 @@ var DOC_AREAS = {
1149
1149
  "/experiments": ["question", "metrics", "protocol", "datasets"],
1150
1150
  "/benchmark": ["results", "comparison", "robustness", "live", "provenance", "caveat"]
1151
1151
  };
1152
- function DocPage({ title, lede, wide, floorWaivers, children }) {
1152
+ function DocPage({ title, lede, floorWaivers, children }) {
1153
1153
  const lang = useShellLang();
1154
1154
  const waivers = (floorWaivers ?? []).map((w) => `${w.floor}: ${pick(w.reason, lang)}`).join("; ");
1155
- return /* @__PURE__ */ jsxs("div", { className: wide ? "page-body wide prose caos-doc" : "page-body prose caos-doc", "data-doc-page": "", "data-floor-waiver": waivers || void 0, children: [
1155
+ return /* @__PURE__ */ jsxs("div", { className: "page-body wide prose caos-doc", "data-doc-page": "", "data-floor-waiver": waivers || void 0, children: [
1156
1156
  /* @__PURE__ */ jsxs("div", { className: "page-head", children: [
1157
1157
  /* @__PURE__ */ jsx("h1", { children: pick(title, lang) }),
1158
1158
  /* @__PURE__ */ jsx("p", { className: "lede", children: lede })
@@ -115,9 +115,11 @@ declare const LANDING_ROUTE = "/introduction";
115
115
  /** The route of the App (the tool); it was the root before 0.13.0 (the `Landing` component forwards old links). */
116
116
  declare const APP_ROUTE = "/app";
117
117
  /**
118
- * The six routes every CAOS product carries, in this order (ADR-0016 s3, ADR-0069 s7, the product quality bar):
119
- * the Introduction (the landing, executive view first), the App (the tool) and the four other documentation routes. One
120
- * definition, so the header, the router and the gate read the same list and no product retypes it.
118
+ * The six routes every CAOS product carries, ALWAYS in this order (Felipe, 2026-10-13): App, Introduction,
119
+ * Methodology, Implementation, Experiments, Benchmark. The App stays the leftmost tab; the product lands on the
120
+ * Introduction (its executive view first) through `Landing`, which never changes the order (0.13.0 had moved the
121
+ * Introduction first; 0.13.1 restores the App). One definition, so the header, the router and the gate read the same
122
+ * list and no product retypes it.
121
123
  */
122
124
  declare const STANDARD_ROUTES: ShellRoute[];
123
125
 
package/dist/keys.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as APP_ROUTE, L as LANDING_ROUTE, e as LANG_STORAGE_KEY, S as STANDARD_ROUTES, T as THEME_BOOT_SCRIPT, h as THEME_STORAGE_KEY } from './keys-CTQZafOf.js';
1
+ export { A as APP_ROUTE, L as LANDING_ROUTE, e as LANG_STORAGE_KEY, S as STANDARD_ROUTES, T as THEME_BOOT_SCRIPT, h as THEME_STORAGE_KEY } from './keys-DDQGijwQ.js';
2
2
  import 'react';
3
3
  import './text-BlY47nIt.js';
4
4
  import 'zustand';
package/dist/keys.js CHANGED
@@ -1 +1 @@
1
- export { APP_ROUTE, LANDING_ROUTE, LANG_STORAGE_KEY, STANDARD_ROUTES, THEME_BOOT_SCRIPT, THEME_STORAGE_KEY } from './chunk-YVVDBSAC.js';
1
+ export { APP_ROUTE, LANDING_ROUTE, LANG_STORAGE_KEY, STANDARD_ROUTES, THEME_BOOT_SCRIPT, THEME_STORAGE_KEY } from './chunk-33WTUQ7Q.js';