@fasl-work/caos-app-shell 0.12.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.
@@ -9,7 +9,7 @@
9
9
  // Options:
10
10
  // --base-path /Repo/ the site's base path with --serve (a project page); default /
11
11
  // --routes /,/methodology the routes; default: read from the header navigation
12
- // --workbench / the routes that carry the case workbench; default /
12
+ // --workbench /app the routes that carry the case workbench; default /app
13
13
  // --sizes 390x844,...,2560x1440 --themes light,dark --langs en,es
14
14
  // --case-sample id1,id2 cases walked outside the primary mode; default the first and the last
15
15
  // --single-case the workbench has one case and no case control
package/dist/chart.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useShellLang, useThemeStore, useStageSize, pick, resolveToken, NBSP, formatNumber, formatTicks } from './chunk-DX36XRD5.js';
2
- import './chunk-X6Y5CDUD.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,7 +1,9 @@
1
1
  // src/shell/routes.ts
2
+ var LANDING_ROUTE = "/introduction";
3
+ var APP_ROUTE = "/app";
2
4
  var STANDARD_ROUTES = [
3
- { path: "/", en: "App", es: "App" },
4
- { path: "/introduction", en: "Introduction", es: "Introducci\xF3n" },
5
+ { path: APP_ROUTE, en: "App", es: "App" },
6
+ { path: LANDING_ROUTE, en: "Introduction", es: "Introducci\xF3n" },
5
7
  { path: "/methodology", en: "Methodology", es: "Metodolog\xEDa" },
6
8
  { path: "/implementation", en: "Implementation", es: "Implementaci\xF3n" },
7
9
  { path: "/experiments", en: "Experiments", es: "Experimentos" },
@@ -13,4 +15,4 @@ var THEME_STORAGE_KEY = "caos.theme";
13
15
  var LANG_STORAGE_KEY = "caos.lang";
14
16
  var THEME_BOOT_SCRIPT = `(function(){try{var t=localStorage.getItem('${THEME_STORAGE_KEY}');if(t!=='light'&&t!=='dark'){t=matchMedia('(prefers-color-scheme: light)').matches?'light':'dark'}document.documentElement.dataset.theme=t;var l=localStorage.getItem('${LANG_STORAGE_KEY}');document.documentElement.lang=l==='es'?'es':'en'}catch(e){document.documentElement.dataset.theme='dark'}})();`;
15
17
 
16
- export { LANG_STORAGE_KEY, STANDARD_ROUTES, THEME_BOOT_SCRIPT, THEME_STORAGE_KEY };
18
+ export { APP_ROUTE, LANDING_ROUTE, LANG_STORAGE_KEY, STANDARD_ROUTES, THEME_BOOT_SCRIPT, THEME_STORAGE_KEY };
@@ -1,4 +1,4 @@
1
- import { LANG_STORAGE_KEY, THEME_STORAGE_KEY } from './chunk-X6Y5CDUD.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 AppShell, a as ArchTab, b as ArchitectureConfig, c as ArchitectureModal, L as LANG_STORAGE_KEY, S as STANDARD_ROUTES, d as ShellConfig, e as ShellRoute, T as THEME_BOOT_SCRIPT, f as THEME_STORAGE_KEY, v as validateArchitectureConfig } from './keys-CnvqkckF.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';
@@ -7,6 +7,20 @@ export { N as NBSP, a as NOT_AVAILABLE, b as SCIENTIFIC_BELOW, c as SHELL_TOKENS
7
7
  import { L as Lang, B as BiText } from './text-BlY47nIt.js';
8
8
  export { p as pick, u as useLangStore, a as useShellLang } from './text-BlY47nIt.js';
9
9
 
10
+ /**
11
+ * The landing route of a product (shell 0.13.0, Felipe 2026-10-13: "the shell and the apps must land at the Introduction,
12
+ * executive view"). Mount it on the root path and on the catch-all path:
13
+ *
14
+ * <Route path="/" element={<Landing />} />
15
+ * <Route path="/app" element={<App />} />
16
+ * <Route path="*" element={<Landing />} />
17
+ *
18
+ * The root and any unknown entry open the Introduction, whose executive view is its first and default view. An old link
19
+ * to the App, which was the root (`/?case=B2`, with a query string or a hash), is forwarded to the App route with the query
20
+ * string and the hash kept, so a link in a paper or a bookmark still reaches its case.
21
+ */
22
+ declare function Landing(): react.JSX.Element;
23
+
10
24
  /** One authenticated workbench destination rendered by the shared responsive navigation frame. */
11
25
  interface WorkbenchRoute {
12
26
  path: string;
@@ -392,9 +406,10 @@ declare function ReferenceList({ ids, heading }: {
392
406
 
393
407
  /**
394
408
  * A documentation route (Introduction, Methodology, Implementation, Experiments, Benchmark): the page head with
395
- * its title and lede, then sections. `wide` for a route with a sub-tab rail (ADR-0071 rule 2, amended
396
- * 2026-09-04); a single prose column keeps the reading width and is centred (ADR-0017 §1). Text takes the full width
397
- * 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).
398
413
  */
399
414
  /**
400
415
  * The areas a section may declare, per documentation route (ADR-0017 section 2.1). The gate's table (`gate/areas.mjs`)
@@ -410,6 +425,7 @@ declare const DOC_AREAS: {
410
425
  interface DocPageProps {
411
426
  title: BiText;
412
427
  lede: ReactNode;
428
+ /** Kept for compatibility (0.13.1): every documentation route is full width, so this changes nothing. */
413
429
  wide?: boolean;
414
430
  /**
415
431
  * The required areas this page cannot carry, each with the reason (ADR-0017 section 2.1): rendered as
@@ -422,7 +438,7 @@ interface DocPageProps {
422
438
  }>;
423
439
  children: ReactNode;
424
440
  }
425
- declare function DocPage({ title, lede, wide, floorWaivers, children }: DocPageProps): react.JSX.Element;
441
+ declare function DocPage({ title, lede, floorWaivers, children }: DocPageProps): react.JSX.Element;
426
442
  interface DocSectionProps {
427
443
  title: BiText;
428
444
  id?: string;
@@ -472,88 +488,170 @@ interface ExecutiveViewProps {
472
488
  data: unknown;
473
489
  /** Where the product's site is served from; the illustration files are fetched from here (default `/`; a Pages site passes its base URL). */
474
490
  base?: string;
491
+ /** Opens the technical view of the Introduction (default: selects the sibling tab `technical` of the tab that holds the view). */
492
+ onOpenTechnical?: () => void;
475
493
  }
476
494
  /**
477
- * The executive view of an Introduction (CAOS_MANAGE conventions/problem-context-first.md, Felipe 2026-10-12): the four
478
- * sections of the executive-pitch rubric in order, the three illustrations in their places, the sources as numbered
479
- * notes. A product fills `content/executive.json`; it does not design this view, so the component takes no children.
480
- * Invalid data renders an error state that lists each field path, never a blank.
495
+ * The executive view of an Introduction (CAOS_MANAGE conventions/problem-context-first.md, Felipe 2026-10-12 and
496
+ * 2026-10-13): the industry's problem framed for a decision maker. Above the sub-tabs, the landing block (the title, the key
497
+ * statement, two or three headline figures); then the five sections of `EXEC_SECTION_DEFS` as the sub-tabs of `SubTabs`, the
498
+ * first selected, each opening with its key message line; below them the numbered linked sources and two onward links (the
499
+ * technical view, the App). General, never a client, never a pitch. A product fills `content/executive.json`; it does not
500
+ * design this view, so the component takes no children. Invalid data renders an error state that lists each field path,
501
+ * never a blank.
481
502
  */
482
- declare function ExecutiveView({ data, base }: ExecutiveViewProps): react.JSX.Element;
503
+ declare function ExecutiveView({ data, base, onOpenTechnical }: ExecutiveViewProps): react.JSX.Element;
483
504
 
484
505
  /**
485
- * The executive view standard (CAOS_MANAGE conventions/problem-context-first.md, Felipe 2026-10-12): the types of the
486
- * data file `content/executive.json`, its validator and its writing limits. The structure lives ONLY in
487
- * `executive.schema.json` (this module interprets it); the rules a schema cannot say (the limits, the 4 C's, the
488
- * sources by field) are here. `gate/areas.mjs` keeps the same limits for the rendered page; a unit test keeps them equal.
489
- */
490
- declare const EXECUTIVE_SCHEMA_VERSION = "1.0.0";
491
- /**
492
- * The names of the 4 C's, in the order of the 4Cs Positioning section. EMPTY ON PURPOSE: the names and the order are
493
- * Felipe's to give (problem-context-first.md, open item). While it is empty `four_cs` must be absent from every data
494
- * file and section 3 renders its declared pending state; once it holds 4 names `four_cs` is required in that order.
506
+ * The executive view standard (CAOS_MANAGE conventions/problem-context-first.md, Felipe 2026-10-12 and 2026-10-13): the
507
+ * types of the data file `content/executive.json`, its validator, its floors and its writing limits. The structure lives
508
+ * ONLY in `executive.schema.json` (this module interprets it); the rules a schema cannot say (the limits, the 4 C's, the
509
+ * sources by id, the owners that are roles, the wording) are here. `gate/areas.mjs` keeps the same limits and floors for
510
+ * the rendered page; a unit test keeps them equal.
495
511
  */
496
- declare const FOUR_CS: readonly string[];
512
+ declare const EXECUTIVE_SCHEMA_VERSION = "2.0.0";
497
513
  interface BiTextValue {
498
514
  en: string;
499
515
  es: string;
500
516
  }
517
+ interface FourC {
518
+ name: BiTextValue;
519
+ definition: BiTextValue;
520
+ }
521
+ /**
522
+ * The 4 C's of the proposal (sub-tab 5), in order, with the names and definitions Felipe gave on 2026-10-13 (verbatim,
523
+ * English and Spanish). `proposal.four_cs` is required in every data file with exactly these four rows in this order, each
524
+ * `c` equal to the name and each with what the C means for the proposal (`applies`); the view shows the definition in small
525
+ * type beside the name. `gate/areas.mjs` EXEC_FOUR_CS holds the same values; a unit test keeps them equal.
526
+ */
527
+ declare const FOUR_CS: readonly FourC[];
528
+ type Direction = 'rising' | 'easing' | 'steady';
529
+ type TrendKind = 'regulatory' | 'technological' | 'market' | 'practice';
530
+ type Horizon = 'now' | 'two_years' | 'ten_years';
531
+ type Confidence = 'low' | 'medium' | 'high';
501
532
  interface ExecutiveFigure {
533
+ heading: BiTextValue;
502
534
  value: BiTextValue;
503
535
  unit: BiTextValue;
504
- }
505
- interface ExecutiveOutcome {
506
- capability: BiTextValue;
507
- outcome: BiTextValue;
508
- proof: ExecutiveFigure & {
509
- statement: BiTextValue;
510
- };
536
+ /** The id of an entry of `sources`. */
537
+ source: string;
511
538
  }
512
539
  interface ExecutiveIllustration {
513
540
  /** The SVG file (a path under the site root), or one per language. */
514
541
  file: string | BiTextValue;
515
542
  caption: BiTextValue;
516
543
  }
544
+ interface ExecutiveSource {
545
+ id: string;
546
+ /** The publication, in plain words. */
547
+ title: BiTextValue;
548
+ /** The page or document itself: an https link. */
549
+ url: string;
550
+ /** At most one sentence (for example a page number). */
551
+ note?: BiTextValue;
552
+ }
517
553
  interface ExecutiveData {
518
- executive: BiTextValue;
519
- organisation: BiTextValue;
520
- initiative: BiTextValue;
521
- why_now: {
522
- figure: ExecutiveFigure;
523
- deadline: BiTextValue;
554
+ title: BiTextValue;
555
+ key_statement: BiTextValue;
556
+ headline_figures: ExecutiveFigure[];
557
+ pain: {
558
+ key_message: BiTextValue;
559
+ paragraphs: BiTextValue[];
560
+ bearers: Array<{
561
+ who: BiTextValue;
562
+ cost: BiTextValue;
563
+ measure: BiTextValue;
564
+ }>;
565
+ figures: ExecutiveFigure[];
566
+ causes: Array<{
567
+ cause: BiTextValue;
568
+ weight: number;
569
+ }>;
570
+ };
571
+ context: {
572
+ key_message: BiTextValue;
573
+ paragraphs: BiTextValue[];
574
+ setting: BiTextValue;
575
+ forces: Array<{
576
+ force: BiTextValue;
577
+ direction: Direction;
578
+ }>;
579
+ evidence: Array<{
580
+ statement: BiTextValue;
581
+ source: string;
582
+ }>;
583
+ };
584
+ situation: {
585
+ key_message: BiTextValue;
586
+ roles: Array<{
587
+ role: BiTextValue;
588
+ decides: BiTextValue;
589
+ needs: BiTextValue;
590
+ }>;
591
+ interaction: BiTextValue;
592
+ state_of_the_art: Array<{
593
+ approach: BiTextValue;
594
+ achieves: BiTextValue;
595
+ falls_short: BiTextValue;
596
+ source: string;
597
+ }>;
598
+ status: {
599
+ heading: BiTextValue;
600
+ value: BiTextValue;
601
+ unit: BiTextValue;
602
+ date: BiTextValue;
603
+ source: string;
604
+ };
605
+ };
606
+ trends: {
607
+ key_message: BiTextValue;
608
+ items: Array<{
609
+ trend: BiTextValue;
610
+ kind: TrendKind;
611
+ direction: Direction;
612
+ horizon: Horizon;
613
+ signal: {
614
+ statement: BiTextValue;
615
+ source: string;
616
+ };
617
+ effect: BiTextValue;
618
+ confidence: Confidence;
619
+ }>;
620
+ };
621
+ proposal: {
622
+ key_message: BiTextValue;
623
+ paragraphs: BiTextValue[];
624
+ four_cs: Array<{
625
+ c: BiTextValue;
626
+ applies: BiTextValue;
627
+ }>;
628
+ actions: Array<{
629
+ action: BiTextValue;
630
+ owner: BiTextValue;
631
+ horizon: BiTextValue;
632
+ check: BiTextValue;
633
+ }>;
634
+ risks: BiTextValue[];
635
+ unknowns: BiTextValue[];
636
+ handoff?: BiTextValue;
524
637
  };
525
- vision: BiTextValue;
526
- outcomes: ExecutiveOutcome[];
527
- four_cs?: Array<{
528
- c: BiTextValue;
529
- exec_problem: BiTextValue;
530
- }>;
531
- dialogue: Array<{
532
- question: BiTextValue;
533
- answer: BiTextValue;
534
- }>;
535
638
  illustrations: {
536
- initiative: ExecutiveIllustration;
537
- problem: ExecutiveIllustration;
538
- solution: ExecutiveIllustration;
639
+ pain: ExecutiveIllustration;
640
+ situation: ExecutiveIllustration;
641
+ proposal: ExecutiveIllustration;
539
642
  };
540
- sources: Array<{
541
- field: string;
542
- source: BiTextValue;
543
- }>;
643
+ sources: ExecutiveSource[];
544
644
  }
545
645
  interface ExecutiveProblem {
546
- /** The field path, for example `outcomes[1].proof.unit` (empty for the document itself). */
646
+ /** The field path, for example `pain.bearers[1].cost.en` (empty for the document itself). */
547
647
  path: string;
548
648
  message: string;
549
649
  }
550
650
  /**
551
651
  * Validates a product's `content/executive.json` against `executive.schema.json` and the rules on top of it. Pure; an
552
- * empty array means valid. `fourCs` is the set of names the 4Cs Positioning section expects (default `FOUR_CS`).
652
+ * empty array means valid.
553
653
  */
554
- declare function validateExecutive(data: unknown, opts?: {
555
- fourCs?: readonly string[];
556
- }): ExecutiveProblem[];
654
+ declare function validateExecutive(data: unknown): ExecutiveProblem[];
557
655
 
558
656
  interface QuestionProps {
559
657
  /** The business question the executive would ask. */
@@ -1006,4 +1104,4 @@ interface ViewsRowProps {
1006
1104
  */
1007
1105
  declare function ViewsRow({ children, shares }: ViewsRowProps): react.JSX.Element;
1008
1106
 
1009
- export { BREAKPOINTS, BarChart, type BarChartProps, type BarDatum, BiText, Callout, type CaseDef, type CaseGroup, type CaseKind, CaseSelector, type CaseSelectorProps, type CaseSelectorText, CaseWorkbench, type CaseWorkbenchProps, ChipGroup, type ChipGroupProps, type ChipOption, type Citation, CitationsProvider, Cite, DOC_AREAS, DocPage, type DocPageProps, DocReferences, DocRefsScope, DocSection, type DocSectionProps, EXECUTIVE_SCHEMA_VERSION, Equation, type ExecutiveData, type ExecutiveProblem, ExecutiveView, type ExecutiveViewProps, FOUR_CS, Figure, type FittedLabel, FocusShell, type FocusShellProps, FormatOptions, Gauge, type GaugeProps, type GaugeZone, Glossary, type GlossaryEntry, InlineMath, Knob, type KnobProps, type Lane, LaneBadge, Lang, LanguageToggle, MAX_PEER_TABS, MAX_WORKBENCH_GROUPS, PanelBoundary, type PausedVizController, PlotCard, type PlotCardProps, type Provenance, Question, type QuestionProps, type RailSection, Readout, type ReadoutItem, type ReadoutProps, ReferenceList, Refs, Stage, type StageSize, Stat, type StatProps, type SubTabDef, SubTabs, type SubTabsProps, SurfacePage, type SurfacePageProps, type TabDef, type TabGroupDef, TabGroups, type TabGroupsProps, Tabs, type TabsProps, type Theme, ThemeToggle, type Tone, type UsePausedVizOptions, VariantBar, type VariantBarProps, type VariantDef, Verdict, type VerdictProps, ViewsRow, type ViewsRowProps, type VizFrame, type VizLoop, type VizLoopDeps, type VizLoopOptions, type WorkbenchGroup, WorkbenchLayout, type WorkbenchLayoutProps, type WorkbenchRoute, WorkbenchShell, type WorkbenchShellProps, type WorkbenchState, WorkbenchStateContext, applyTheme, caseKind, caseTooltip, casesInSource, createVizLoop, firstAppearance, fitLabel, fontFamily, groupByCategory, isStale, makeStateKey, niceStep, niceTicks, readCaseParam, readTheme, replaceQueryParam, sourcesPresent, textWidth, usePausedViz, useStageSize, useThemeStore, useUrlView, useWorkbenchState, validateExecutive, viewParamOf, widestLabel, withCaseParam };
1107
+ export { BREAKPOINTS, BarChart, type BarChartProps, type BarDatum, BiText, Callout, type CaseDef, type CaseGroup, type CaseKind, CaseSelector, type CaseSelectorProps, type CaseSelectorText, CaseWorkbench, type CaseWorkbenchProps, ChipGroup, type ChipGroupProps, type ChipOption, type Citation, CitationsProvider, Cite, DOC_AREAS, DocPage, type DocPageProps, DocReferences, DocRefsScope, DocSection, type DocSectionProps, EXECUTIVE_SCHEMA_VERSION, Equation, type ExecutiveData, type ExecutiveProblem, ExecutiveView, type ExecutiveViewProps, FOUR_CS, Figure, type FittedLabel, FocusShell, type FocusShellProps, FormatOptions, Gauge, type GaugeProps, type GaugeZone, Glossary, type GlossaryEntry, InlineMath, Knob, type KnobProps, Landing, type Lane, LaneBadge, Lang, LanguageToggle, MAX_PEER_TABS, MAX_WORKBENCH_GROUPS, PanelBoundary, type PausedVizController, PlotCard, type PlotCardProps, type Provenance, Question, type QuestionProps, type RailSection, Readout, type ReadoutItem, type ReadoutProps, ReferenceList, Refs, Stage, type StageSize, Stat, type StatProps, type SubTabDef, SubTabs, type SubTabsProps, SurfacePage, type SurfacePageProps, type TabDef, type TabGroupDef, TabGroups, type TabGroupsProps, Tabs, type TabsProps, type Theme, ThemeToggle, type Tone, type UsePausedVizOptions, VariantBar, type VariantBarProps, type VariantDef, Verdict, type VerdictProps, ViewsRow, type ViewsRowProps, type VizFrame, type VizLoop, type VizLoopDeps, type VizLoopOptions, type WorkbenchGroup, WorkbenchLayout, type WorkbenchLayoutProps, type WorkbenchRoute, WorkbenchShell, type WorkbenchShellProps, type WorkbenchState, WorkbenchStateContext, applyTheme, caseKind, caseTooltip, casesInSource, createVizLoop, firstAppearance, fitLabel, fontFamily, groupByCategory, isStale, makeStateKey, niceStep, niceTicks, readCaseParam, readTheme, replaceQueryParam, sourcesPresent, textWidth, usePausedViz, useStageSize, useThemeStore, useUrlView, useWorkbenchState, validateExecutive, viewParamOf, widestLabel, withCaseParam };