@fasl-work/caos-app-shell 0.7.2 → 0.8.0
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/README.md +34 -14
- package/bin/caos-shell-gate.mjs +5 -2
- package/dist/chart.d.ts +28 -3
- package/dist/chart.js +59 -23
- package/dist/{chunk-LOSSTLPP.js → chunk-ZLJCB7DD.js} +43 -4
- package/dist/index.d.ts +248 -111
- package/dist/index.js +308 -22
- package/dist/{tokens-CSV0MOgR.d.ts → tokens-DkyEXX5g.d.ts} +21 -4
- package/gate/inpage.mjs +253 -8
- package/gate/run.mjs +126 -9
- package/package.json +1 -1
- package/reserved-classes.json +239 -3
- package/styles.css +445 -367
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ export { A as AppShell, a as ArchTab, b as ArchitectureConfig, c as Architecture
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode, Component, ErrorInfo } from 'react';
|
|
4
4
|
import * as zustand from 'zustand';
|
|
5
|
-
import { F as FormatOptions } from './tokens-
|
|
6
|
-
export { N as
|
|
5
|
+
import { F as FormatOptions } from './tokens-DkyEXX5g.js';
|
|
6
|
+
export { N as NBSP, a as NOT_AVAILABLE, b as SCIENTIFIC_BELOW, c as SHELL_TOKENS, S as ShellColorToken, d as ShellToken, f as formatNumber, e as formatTicks, r as resolveToken, u as useFormat, g as useThemeTokens } from './tokens-DkyEXX5g.js';
|
|
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
|
|
|
@@ -397,33 +397,62 @@ interface DocSectionProps {
|
|
|
397
397
|
/** One section of a documentation route, ending in its own references. */
|
|
398
398
|
declare function DocSection({ title, id, refs, noRefsReason, children }: DocSectionProps): react.JSX.Element;
|
|
399
399
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
/** The
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
400
|
+
interface SurfacePageProps {
|
|
401
|
+
/** The route's heading; omit it when the header's active route already names the surface. */
|
|
402
|
+
title?: BiText;
|
|
403
|
+
/** One line under the title: what the surface is for. */
|
|
404
|
+
lede?: ReactNode;
|
|
405
|
+
/** Controls that act on the whole surface (a source picker, an export button), at the right of the head. */
|
|
406
|
+
actions?: ReactNode;
|
|
407
|
+
/** The surface's views: one row of at most six (ADR-0071 rule 5); the open one is held in the URL. */
|
|
408
|
+
tabs?: TabDef[];
|
|
409
|
+
/** Controlled selection, when the product holds it itself. */
|
|
410
|
+
value?: string;
|
|
411
|
+
onChange?: (id: string) => void;
|
|
412
|
+
/** The query parameter that holds the open view (default `view`); `false` keeps it out of the URL. */
|
|
413
|
+
deepLinkView?: boolean | string;
|
|
414
|
+
ariaLabel?: BiText;
|
|
415
|
+
/** Mark the body as the instrument, so the gate measures what is drawn in it (ADR-0071 rule 8). */
|
|
416
|
+
instrument?: boolean;
|
|
417
|
+
/** The body when there are no tabs: it fills the viewport. */
|
|
418
|
+
children?: ReactNode;
|
|
417
419
|
}
|
|
418
420
|
/**
|
|
419
|
-
* The
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
* can check that it covers at least half of the viewport (rule 8). Pair with `ShellConfig.contain`.
|
|
421
|
+
* The third route type, beside the workbench (`WorkbenchLayout`, a rail and an instrument for one case) and the
|
|
422
|
+
* document (`DocPage`, a scrolling reading column): a SURFACE fills the viewport with views that are not one case's,
|
|
423
|
+
* such as a hub, an explorer or a console. Under `ShellConfig.contain` its head and tab row keep their height and the
|
|
424
|
+
* open panel scrolls inside; below 900 px the document scrolls. The containment fifteen to nineteen products wrote for
|
|
425
|
+
* themselves (CAOS_MANAGE audit 2026-10-07, section 3), owned here so no product writes it again.
|
|
425
426
|
*/
|
|
426
|
-
declare function
|
|
427
|
+
declare function SurfacePage({ title, lede, actions, tabs, value, onChange, deepLinkView, ariaLabel, instrument, children }: SurfacePageProps): react.JSX.Element;
|
|
428
|
+
|
|
429
|
+
/** Writes one query parameter with replaceState, keeping the router's history state (React Router keeps its entry
|
|
430
|
+
* key and index there; replacing it with null broke the index the back button relies on). */
|
|
431
|
+
declare function replaceQueryParam(param: string, value: string): void;
|
|
432
|
+
/**
|
|
433
|
+
* The open view of a tab row, held in the URL (`?view=` by default) so a reader can share it and a reload keeps it.
|
|
434
|
+
* Returns the id to show and the selector to call. Controlled when `value` is given: the product holds the state and
|
|
435
|
+
* the URL is left alone. An id in the URL that names no tab of this row is ignored.
|
|
436
|
+
*/
|
|
437
|
+
declare function useUrlView(ids: string[], param: string | null, value?: string, onChange?: (id: string) => void): [string | undefined, (id: string) => void];
|
|
438
|
+
/** The parameter name from a `deepLinkView` option: `true` or absent is `view`, a string names it, `false` is none. */
|
|
439
|
+
declare function viewParamOf(option: boolean | string | undefined): string | null;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* The one set of widths the stylesheet changes layout at (styles.css header), for code that must agree with it (a
|
|
443
|
+
* drawing that chooses a compact form, a test that sizes a viewport). CSS media queries cannot read custom
|
|
444
|
+
* properties, so the numbers are written in both places and a unit test keeps them equal.
|
|
445
|
+
*/
|
|
446
|
+
declare const BREAKPOINTS: {
|
|
447
|
+
/** A phone: the brand keeps only its mark; the header drops its separators. */
|
|
448
|
+
readonly phone: 480;
|
|
449
|
+
/** The compact header, single-column grids, the vertical sub-tab list as a row. */
|
|
450
|
+
readonly compact: 760;
|
|
451
|
+
/** The workbench stacks its rail over the instrument and the contained document scrolls. */
|
|
452
|
+
readonly stack: 900;
|
|
453
|
+
/** The gate's large screen: the viewport rules of ADR-0071 are measured from here up. */
|
|
454
|
+
readonly large: 1280;
|
|
455
|
+
};
|
|
427
456
|
|
|
428
457
|
/** Where a value on screen came from: observed data, a generator, or a published reference. */
|
|
429
458
|
type Provenance = 'real' | 'synthetic' | 'published';
|
|
@@ -457,90 +486,6 @@ declare function LaneBadge({ lane, provenance, label }: {
|
|
|
457
486
|
label?: BiText;
|
|
458
487
|
}): react.JSX.Element;
|
|
459
488
|
|
|
460
|
-
/** One configured regime of a case: a full parameter vector, never a cosmetic label (ADR-0016 §9). */
|
|
461
|
-
interface VariantDef {
|
|
462
|
-
id: string;
|
|
463
|
-
label: BiText;
|
|
464
|
-
/** One line: what this regime shows. */
|
|
465
|
-
note?: BiText;
|
|
466
|
-
/** The lane of this variant's result, when it differs from the bar's. */
|
|
467
|
-
lane?: Lane;
|
|
468
|
-
disabled?: boolean;
|
|
469
|
-
}
|
|
470
|
-
interface VariantBarProps {
|
|
471
|
-
variants: VariantDef[];
|
|
472
|
-
activeId: string;
|
|
473
|
-
onSelect: (id: string) => void;
|
|
474
|
-
title?: BiText;
|
|
475
|
-
lane?: Lane;
|
|
476
|
-
}
|
|
477
|
-
/** The regimes of the selected case on ONE scrollable row (ADR-0071 rule 4), the active regime's lane, and the
|
|
478
|
-
* one-line note of what it shows. Selecting a regime must change every view of the case. */
|
|
479
|
-
declare function VariantBar({ variants, activeId, onSelect, title, lane }: VariantBarProps): react.JSX.Element;
|
|
480
|
-
|
|
481
|
-
/** One group of views of the selected case, named for the question the user is asking (ADR-0071 rule 5). */
|
|
482
|
-
interface WorkbenchGroup {
|
|
483
|
-
id: string;
|
|
484
|
-
label: BiText;
|
|
485
|
-
/** Which lane produced this group's views, and what data they rest on. Each view shows its own badges (PlotCard,
|
|
486
|
-
* Readout); these are written on the panel as `data-lane` and `data-provenance`. */
|
|
487
|
-
lane?: Lane;
|
|
488
|
-
provenance?: Provenance;
|
|
489
|
-
content: ReactNode;
|
|
490
|
-
}
|
|
491
|
-
interface CaseWorkbenchProps {
|
|
492
|
-
/** The selected case (written as `data-case`). */
|
|
493
|
-
caseId: string;
|
|
494
|
-
/** The case picker, shown first in the rail. Omit only for a workbench with a single case. */
|
|
495
|
-
cases?: CaseSelectorProps;
|
|
496
|
-
/** The data source of the case (for example `real` or `synthetic`), written as `data-source`. */
|
|
497
|
-
source?: string;
|
|
498
|
-
/** Every control value of the instrument; with the case and variant it forms the state key (S10). */
|
|
499
|
-
controls?: Record<string, unknown>;
|
|
500
|
-
/** A workbench whose views have no live control declares it, so the reactivity gate does not expect one. */
|
|
501
|
-
replayOnly?: boolean;
|
|
502
|
-
/** The regimes of the case, shown in the rail under the case picker; omit only for a case with no meaningful
|
|
503
|
-
* parametric or temporal family. */
|
|
504
|
-
variants?: VariantBarProps;
|
|
505
|
-
/** The rest of the rail: the case's parameters (Knob, ChipGroup) and its live values (Readout, Gauge, Verdict),
|
|
506
|
-
* as one node or as sections shown one at a time (ADR-0071 rule 6). */
|
|
507
|
-
rail?: ReactNode | RailSection[];
|
|
508
|
-
railLabel?: BiText;
|
|
509
|
-
/** The instrument: the case's own question groups (for example Model, Validation, Impact, Findings). */
|
|
510
|
-
groups: WorkbenchGroup[];
|
|
511
|
-
/** The comparison across the case's variants (one metric per regime; selecting one loads it). */
|
|
512
|
-
compare?: {
|
|
513
|
-
label?: BiText;
|
|
514
|
-
lane?: Lane;
|
|
515
|
-
provenance?: Provenance;
|
|
516
|
-
content: ReactNode;
|
|
517
|
-
};
|
|
518
|
-
/** The deep write-up of the case: problem, variables, equations, assumptions, what each variant shows, how to read
|
|
519
|
-
* the views (ADR-0016 s9.B). Always present. */
|
|
520
|
-
context: {
|
|
521
|
-
label?: BiText;
|
|
522
|
-
content: ReactNode;
|
|
523
|
-
};
|
|
524
|
-
/** Controlled group selection (for example held in the URL). */
|
|
525
|
-
group?: string;
|
|
526
|
-
onGroupChange?: (id: string) => void;
|
|
527
|
-
ariaLabel?: BiText;
|
|
528
|
-
}
|
|
529
|
-
declare const MAX_WORKBENCH_GROUPS = 6;
|
|
530
|
-
/**
|
|
531
|
-
* The App route of a product (ADR-0016 s9, ADR-0071 as amended 2026-10-04): the control rail beside the instrument on
|
|
532
|
-
* the full viewport. The rail holds, in order, the case picker, the variants of the case, and the product's
|
|
533
|
-
* parameters and live values; the instrument holds ONE row of at most six question groups in a fixed order (the
|
|
534
|
-
* instrument groups, the variant comparison, the context write-up) and the open group's views, which take the
|
|
535
|
-
* height that row leaves. Pickers, parameters and numbers sit in the rail so the drawing keeps the instrument
|
|
536
|
-
* (rule 8: at least half the viewport is drawn).
|
|
537
|
-
*
|
|
538
|
-
* It provides the selection's state key to every `PlotCard` and `Readout` in the rail and the instrument, so a view
|
|
539
|
-
* still showing data for an earlier selection says so, and it writes `data-case`, `data-variant`, `data-source` and
|
|
540
|
-
* `data-state-key` on the instrument so the gate can check that the instrument shows what was asked for.
|
|
541
|
-
*/
|
|
542
|
-
declare function CaseWorkbench(props: CaseWorkbenchProps): react.JSX.Element;
|
|
543
|
-
|
|
544
489
|
type Tone = 'good' | 'warn' | 'bad' | 'accent' | 'neutral';
|
|
545
490
|
interface ReadoutItem {
|
|
546
491
|
label: BiText;
|
|
@@ -627,6 +572,198 @@ interface PlotCardProps {
|
|
|
627
572
|
* protected by an error boundary, so one failing chart never blanks the page (failure class 20). */
|
|
628
573
|
declare function PlotCard({ title, lane, provenance, dataKey, actions, note, fill, children }: PlotCardProps): react.JSX.Element;
|
|
629
574
|
|
|
575
|
+
interface BarDatum {
|
|
576
|
+
id: string;
|
|
577
|
+
label: BiText;
|
|
578
|
+
/** `null` or `undefined` shows "not available" at the zero line, never a bar of zero. */
|
|
579
|
+
value: number | null | undefined;
|
|
580
|
+
/** An explicit colour by meaning; otherwise the accent, or faint beside a highlighted bar. */
|
|
581
|
+
tone?: Tone;
|
|
582
|
+
/** The bar the reader is on (the selected variant, the case asked about). */
|
|
583
|
+
highlight?: boolean;
|
|
584
|
+
/** One line shown as the bar's title. */
|
|
585
|
+
hint?: BiText;
|
|
586
|
+
}
|
|
587
|
+
interface BarChartProps {
|
|
588
|
+
/** The chart's accessible name. */
|
|
589
|
+
title: BiText;
|
|
590
|
+
data: BarDatum[];
|
|
591
|
+
/** The value axis: its title, unit and number format; `range` fixes the domain (it always includes zero). */
|
|
592
|
+
axis: {
|
|
593
|
+
label: BiText;
|
|
594
|
+
unit?: BiText;
|
|
595
|
+
format?: FormatOptions;
|
|
596
|
+
range?: [number, number];
|
|
597
|
+
};
|
|
598
|
+
/** Horizontal bars (the default) give every category label its own line, so long labels never collide;
|
|
599
|
+
* vertical bars suit a few short categories. */
|
|
600
|
+
orientation?: 'horizontal' | 'vertical';
|
|
601
|
+
/** Write each value at its bar (default true). */
|
|
602
|
+
values?: boolean;
|
|
603
|
+
/** A vertical chart's height in pixels (default 240), or `fill` to take its container's height (inside a filling
|
|
604
|
+
* PlotCard). A horizontal chart takes the height its rows need, or fills and spaces its rows when `fill`. */
|
|
605
|
+
height?: number | 'fill';
|
|
606
|
+
/** Called with a bar's id when it is clicked or chosen with the keyboard. */
|
|
607
|
+
onSelect?: (id: string) => void;
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* The house categorical chart (CAOS_MANAGE audit 2026-10-07: every product hand-drew its bar charts with fixed margins,
|
|
611
|
+
* the product template included). Margins are measured from the labels in the page's font; a category label is broken
|
|
612
|
+
* over two lines at a word and only then shortened, with the whole label as its title; ticks are round and share one
|
|
613
|
+
* notation; values are written in the interface language. It renders once its box has a width and declares
|
|
614
|
+
* `data-chart`, which the gate's text check (G10) measures.
|
|
615
|
+
*/
|
|
616
|
+
declare function BarChart({ title, data, axis, orientation, values, height, onSelect }: BarChartProps): react.JSX.Element;
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Text that fits the drawing it labels, measured in the font the page renders.
|
|
620
|
+
*
|
|
621
|
+
* Products drew their axes and labels with fixed margins and a fixed width per character. The Linux fonts (DejaVu
|
|
622
|
+
* Sans) are wider than the Windows ones and Spanish labels are longer than English ones, so a column sized for one
|
|
623
|
+
* ran its labels out of the drawing in the other (CAOS_Fragmenta 0.05.000: "Tamaño medio clásico, limitado al bloque
|
|
624
|
+
* in situ" read "dio clásico, limitado al bloque in situ"; its deploy gate failed on Linux). Here a label is measured
|
|
625
|
+
* with the canvas text metrics of the page's own font (`--font-sans`, which the gate's wide-font pass replaces),
|
|
626
|
+
* broken over two lines at a word when it does not fit, and only then shortened with an ellipsis, so the drawing can
|
|
627
|
+
* give the whole label as its title. Ported from CAOS_Fragmenta `viz/text.ts` (0.07.000).
|
|
628
|
+
*/
|
|
629
|
+
/** The page's sans-serif stack as the shell token resolves it. */
|
|
630
|
+
declare function fontFamily(): string;
|
|
631
|
+
/** The width of one line of text at a font size, in CSS pixels; outside a browser, an estimate on the wide side. */
|
|
632
|
+
declare function textWidth(text: string, px: number, weight?: number): number;
|
|
633
|
+
/** The widest a set of labels needs, each on one line. */
|
|
634
|
+
declare function widestLabel(labels: readonly string[], px: number, weight?: number): number;
|
|
635
|
+
interface FittedLabel {
|
|
636
|
+
/** One or two lines; the last is shortened with an ellipsis only when the lines allowed are not enough. */
|
|
637
|
+
lines: string[];
|
|
638
|
+
/** Whether the label was shortened, so the drawing gives the whole label as its title. */
|
|
639
|
+
shortened: boolean;
|
|
640
|
+
}
|
|
641
|
+
/** A label in at most `maxLines` lines of `width` pixels: whole when it fits, broken at a word, shortened last. */
|
|
642
|
+
declare function fitLabel(label: string, width: number, px: number, maxLines?: 1 | 2): FittedLabel;
|
|
643
|
+
/** The 1, 2, 2.5 or 5 times a power of ten at or above `x`. */
|
|
644
|
+
declare function niceStep(x: number): number;
|
|
645
|
+
/**
|
|
646
|
+
* Round ticks covering [lo, hi], as many as leave room for labels about `labelSize` pixels along an axis of `room`
|
|
647
|
+
* pixels (at least two, at most `most`). The first tick is at or below `lo` and the last at or above `hi`, so a bar
|
|
648
|
+
* or a point never runs past the last labelled value.
|
|
649
|
+
*/
|
|
650
|
+
declare function niceTicks(lo: number, hi: number, room: number, labelSize: number, most?: number): number[];
|
|
651
|
+
|
|
652
|
+
/** One section of the control rail. A rail whose content does not fit is SPLIT into sections, one shown at a
|
|
653
|
+
* time, never scrolled (ADR-0071 rule 6: a panel must show its own controls). */
|
|
654
|
+
interface RailSection {
|
|
655
|
+
id: string;
|
|
656
|
+
label: BiText;
|
|
657
|
+
content: ReactNode;
|
|
658
|
+
}
|
|
659
|
+
interface WorkbenchLayoutProps {
|
|
660
|
+
/** The control rail: case and variant pickers, parameters, the live readout. Either one node or sections. */
|
|
661
|
+
rail: ReactNode | RailSection[];
|
|
662
|
+
/** Shown above the rail (and above its sections): the case and variant pickers, which every section shares. */
|
|
663
|
+
railHead?: ReactNode;
|
|
664
|
+
/** The instrument: the views of the selected case. It takes the rest of the viewport (ADR-0071 rules 2, 8). */
|
|
665
|
+
children: ReactNode;
|
|
666
|
+
/** Accessible name of the rail. */
|
|
667
|
+
railLabel?: BiText;
|
|
668
|
+
className?: string;
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* The App route of a CAOS product: a sized control rail beside the instrument, on the full viewport.
|
|
672
|
+
*
|
|
673
|
+
* Renders `.page-body.wide.caos-wb`: no reading-width cap (a workbench is not prose, ADR-0071 rule 2),
|
|
674
|
+
* `min-width: 0` down the tree so no row pushes the page wider than the screen (rule 3), a rail with an
|
|
675
|
+
* explicit width that never scrolls (rule 6), and an instrument marked `data-instrument` so the measured gate
|
|
676
|
+
* can check that it covers at least half of the viewport (rule 8). Pair with `ShellConfig.contain`.
|
|
677
|
+
*/
|
|
678
|
+
declare function WorkbenchLayout({ rail, railHead, children, railLabel, className }: WorkbenchLayoutProps): react.JSX.Element;
|
|
679
|
+
|
|
680
|
+
/** One configured regime of a case: a full parameter vector, never a cosmetic label (ADR-0016 §9). */
|
|
681
|
+
interface VariantDef {
|
|
682
|
+
id: string;
|
|
683
|
+
label: BiText;
|
|
684
|
+
/** One line: what this regime shows. */
|
|
685
|
+
note?: BiText;
|
|
686
|
+
/** The lane of this variant's result, when it differs from the bar's. */
|
|
687
|
+
lane?: Lane;
|
|
688
|
+
disabled?: boolean;
|
|
689
|
+
}
|
|
690
|
+
interface VariantBarProps {
|
|
691
|
+
variants: VariantDef[];
|
|
692
|
+
activeId: string;
|
|
693
|
+
onSelect: (id: string) => void;
|
|
694
|
+
title?: BiText;
|
|
695
|
+
lane?: Lane;
|
|
696
|
+
}
|
|
697
|
+
/** The regimes of the selected case on ONE scrollable row (ADR-0071 rule 4), the active regime's lane, and the
|
|
698
|
+
* one-line note of what it shows. Selecting a regime must change every view of the case. */
|
|
699
|
+
declare function VariantBar({ variants, activeId, onSelect, title, lane }: VariantBarProps): react.JSX.Element;
|
|
700
|
+
|
|
701
|
+
/** One group of views of the selected case, named for the question the user is asking (ADR-0071 rule 5). */
|
|
702
|
+
interface WorkbenchGroup {
|
|
703
|
+
id: string;
|
|
704
|
+
label: BiText;
|
|
705
|
+
/** Which lane produced this group's views, and what data they rest on. Each view shows its own badges (PlotCard,
|
|
706
|
+
* Readout); these are written on the panel as `data-lane` and `data-provenance`. */
|
|
707
|
+
lane?: Lane;
|
|
708
|
+
provenance?: Provenance;
|
|
709
|
+
content: ReactNode;
|
|
710
|
+
}
|
|
711
|
+
interface CaseWorkbenchProps {
|
|
712
|
+
/** The selected case (written as `data-case`). */
|
|
713
|
+
caseId: string;
|
|
714
|
+
/** The case picker, shown first in the rail. Omit only for a workbench with a single case. */
|
|
715
|
+
cases?: CaseSelectorProps;
|
|
716
|
+
/** The data source of the case (for example `real` or `synthetic`), written as `data-source`. */
|
|
717
|
+
source?: string;
|
|
718
|
+
/** Every control value of the instrument; with the case and variant it forms the state key (S10). */
|
|
719
|
+
controls?: Record<string, unknown>;
|
|
720
|
+
/** A workbench whose views have no live control declares it, so the reactivity gate does not expect one. */
|
|
721
|
+
replayOnly?: boolean;
|
|
722
|
+
/** The regimes of the case, shown in the rail under the case picker; omit only for a case with no meaningful
|
|
723
|
+
* parametric or temporal family. */
|
|
724
|
+
variants?: VariantBarProps;
|
|
725
|
+
/** The rest of the rail: the case's parameters (Knob, ChipGroup) and its live values (Readout, Gauge, Verdict),
|
|
726
|
+
* as one node or as sections shown one at a time (ADR-0071 rule 6). */
|
|
727
|
+
rail?: ReactNode | RailSection[];
|
|
728
|
+
railLabel?: BiText;
|
|
729
|
+
/** The instrument: the case's own question groups (for example Model, Validation, Impact, Findings). */
|
|
730
|
+
groups: WorkbenchGroup[];
|
|
731
|
+
/** The comparison across the case's variants (one metric per regime; selecting one loads it). */
|
|
732
|
+
compare?: {
|
|
733
|
+
label?: BiText;
|
|
734
|
+
lane?: Lane;
|
|
735
|
+
provenance?: Provenance;
|
|
736
|
+
content: ReactNode;
|
|
737
|
+
};
|
|
738
|
+
/** The deep write-up of the case: problem, variables, equations, assumptions, what each variant shows, how to read
|
|
739
|
+
* the views (ADR-0016 s9.B). Always present. */
|
|
740
|
+
context: {
|
|
741
|
+
label?: BiText;
|
|
742
|
+
content: ReactNode;
|
|
743
|
+
};
|
|
744
|
+
/** Controlled group selection, when the product holds it itself. */
|
|
745
|
+
group?: string;
|
|
746
|
+
onGroupChange?: (id: string) => void;
|
|
747
|
+
/** The query parameter that holds the open group, so a view can be shared and reloaded (default `view`); `false`
|
|
748
|
+
* keeps it out of the URL. Ignored when `group` is controlled. */
|
|
749
|
+
deepLinkView?: boolean | string;
|
|
750
|
+
ariaLabel?: BiText;
|
|
751
|
+
}
|
|
752
|
+
declare const MAX_WORKBENCH_GROUPS = 6;
|
|
753
|
+
/**
|
|
754
|
+
* The App route of a product (ADR-0016 s9, ADR-0071 as amended 2026-10-04): the control rail beside the instrument on
|
|
755
|
+
* the full viewport. The rail holds, in order, the case picker, the variants of the case, and the product's
|
|
756
|
+
* parameters and live values; the instrument holds ONE row of at most six question groups in a fixed order (the
|
|
757
|
+
* instrument groups, the variant comparison, the context write-up) and the open group's views, which take the
|
|
758
|
+
* height that row leaves. Pickers, parameters and numbers sit in the rail so the drawing keeps the instrument
|
|
759
|
+
* (rule 8: at least half the viewport is drawn).
|
|
760
|
+
*
|
|
761
|
+
* It provides the selection's state key to every `PlotCard` and `Readout` in the rail and the instrument, so a view
|
|
762
|
+
* still showing data for an earlier selection says so, and it writes `data-case`, `data-variant`, `data-source` and
|
|
763
|
+
* `data-state-key` on the instrument so the gate can check that the instrument shows what was asked for.
|
|
764
|
+
*/
|
|
765
|
+
declare function CaseWorkbench(props: CaseWorkbenchProps): react.JSX.Element;
|
|
766
|
+
|
|
630
767
|
interface KnobProps {
|
|
631
768
|
/** Stable id, written as `data-control` so the gate can enumerate and move every control. */
|
|
632
769
|
id: string;
|
|
@@ -686,4 +823,4 @@ declare function Stage({ label, children, className }: {
|
|
|
686
823
|
className?: string;
|
|
687
824
|
}): react.JSX.Element;
|
|
688
825
|
|
|
689
|
-
export { 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, DocPage, DocSection, type DocSectionProps, Equation, Figure, FocusShell, type FocusShellProps, FormatOptions, Gauge, type GaugeProps, type GaugeZone, InlineMath, Knob, type KnobProps, type Lane, LaneBadge, Lang, LanguageToggle, MAX_PEER_TABS, MAX_WORKBENCH_GROUPS, PanelBoundary, type PausedVizController, PlotCard, type PlotCardProps, type Provenance, type RailSection, Readout, type ReadoutItem, type ReadoutProps, ReferenceList, Refs, Stage, type StageSize, type SubTabDef, SubTabs, type SubTabsProps, 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, 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, groupByCategory, isStale, makeStateKey, readCaseParam, readTheme, sourcesPresent, usePausedViz, useStageSize, useThemeStore, useWorkbenchState, withCaseParam };
|
|
826
|
+
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, DocPage, DocSection, type DocSectionProps, Equation, Figure, type FittedLabel, FocusShell, type FocusShellProps, FormatOptions, Gauge, type GaugeProps, type GaugeZone, InlineMath, Knob, type KnobProps, type Lane, LaneBadge, Lang, LanguageToggle, MAX_PEER_TABS, MAX_WORKBENCH_GROUPS, PanelBoundary, type PausedVizController, PlotCard, type PlotCardProps, type Provenance, type RailSection, Readout, type ReadoutItem, type ReadoutProps, ReferenceList, Refs, Stage, type StageSize, 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, 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, fitLabel, fontFamily, groupByCategory, isStale, makeStateKey, niceStep, niceTicks, readCaseParam, readTheme, replaceQueryParam, sourcesPresent, textWidth, usePausedViz, useStageSize, useThemeStore, useUrlView, useWorkbenchState, viewParamOf, widestLabel, withCaseParam };
|