@fasl-work/caos-app-shell 0.11.2 → 0.12.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/dist/index.d.ts +90 -2
- package/dist/index.js +525 -39
- package/gate/areas.mjs +134 -6
- package/gate/inpage.mjs +87 -1
- package/package.json +4 -2
- package/reserved-classes.json +48 -0
- package/src/content/executive.schema.json +141 -0
- package/styles.css +33 -0
package/dist/index.d.ts
CHANGED
|
@@ -401,7 +401,7 @@ declare function ReferenceList({ ids, heading }: {
|
|
|
401
401
|
* holds each area's rule; `test/docFloors.test.ts` keeps these names equal to that table's.
|
|
402
402
|
*/
|
|
403
403
|
declare const DOC_AREAS: {
|
|
404
|
-
readonly '/introduction': readonly ["
|
|
404
|
+
readonly '/introduction': readonly ["problem", "principles", "math", "pipeline", "honesty"];
|
|
405
405
|
readonly '/methodology': readonly ["method"];
|
|
406
406
|
readonly '/implementation': readonly ["architecture", "reproducibility", "engine", "lanes", "contract", "deployment"];
|
|
407
407
|
readonly '/experiments': readonly ["question", "metrics", "protocol", "datasets"];
|
|
@@ -467,6 +467,94 @@ interface StatProps {
|
|
|
467
467
|
*/
|
|
468
468
|
declare function Stat({ value, unit, source }: StatProps): react.JSX.Element;
|
|
469
469
|
|
|
470
|
+
interface ExecutiveViewProps {
|
|
471
|
+
/** The parsed `content/executive.json` of the product (validated against `executive.schema.json` in the page). */
|
|
472
|
+
data: unknown;
|
|
473
|
+
/** Where the product's site is served from; the illustration files are fetched from here (default `/`; a Pages site passes its base URL). */
|
|
474
|
+
base?: string;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
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.
|
|
481
|
+
*/
|
|
482
|
+
declare function ExecutiveView({ data, base }: ExecutiveViewProps): react.JSX.Element;
|
|
483
|
+
|
|
484
|
+
/**
|
|
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.
|
|
495
|
+
*/
|
|
496
|
+
declare const FOUR_CS: readonly string[];
|
|
497
|
+
interface BiTextValue {
|
|
498
|
+
en: string;
|
|
499
|
+
es: string;
|
|
500
|
+
}
|
|
501
|
+
interface ExecutiveFigure {
|
|
502
|
+
value: BiTextValue;
|
|
503
|
+
unit: BiTextValue;
|
|
504
|
+
}
|
|
505
|
+
interface ExecutiveOutcome {
|
|
506
|
+
capability: BiTextValue;
|
|
507
|
+
outcome: BiTextValue;
|
|
508
|
+
proof: ExecutiveFigure & {
|
|
509
|
+
statement: BiTextValue;
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
interface ExecutiveIllustration {
|
|
513
|
+
/** The SVG file (a path under the site root), or one per language. */
|
|
514
|
+
file: string | BiTextValue;
|
|
515
|
+
caption: BiTextValue;
|
|
516
|
+
}
|
|
517
|
+
interface ExecutiveData {
|
|
518
|
+
executive: BiTextValue;
|
|
519
|
+
organisation: BiTextValue;
|
|
520
|
+
initiative: BiTextValue;
|
|
521
|
+
why_now: {
|
|
522
|
+
figure: ExecutiveFigure;
|
|
523
|
+
deadline: BiTextValue;
|
|
524
|
+
};
|
|
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
|
+
illustrations: {
|
|
536
|
+
initiative: ExecutiveIllustration;
|
|
537
|
+
problem: ExecutiveIllustration;
|
|
538
|
+
solution: ExecutiveIllustration;
|
|
539
|
+
};
|
|
540
|
+
sources: Array<{
|
|
541
|
+
field: string;
|
|
542
|
+
source: BiTextValue;
|
|
543
|
+
}>;
|
|
544
|
+
}
|
|
545
|
+
interface ExecutiveProblem {
|
|
546
|
+
/** The field path, for example `outcomes[1].proof.unit` (empty for the document itself). */
|
|
547
|
+
path: string;
|
|
548
|
+
message: string;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* 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`).
|
|
553
|
+
*/
|
|
554
|
+
declare function validateExecutive(data: unknown, opts?: {
|
|
555
|
+
fourCs?: readonly string[];
|
|
556
|
+
}): ExecutiveProblem[];
|
|
557
|
+
|
|
470
558
|
interface QuestionProps {
|
|
471
559
|
/** The business question the executive would ask. */
|
|
472
560
|
question: ReactNode;
|
|
@@ -918,4 +1006,4 @@ interface ViewsRowProps {
|
|
|
918
1006
|
*/
|
|
919
1007
|
declare function ViewsRow({ children, shares }: ViewsRowProps): react.JSX.Element;
|
|
920
1008
|
|
|
921
|
-
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, Equation, 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, viewParamOf, widestLabel, withCaseParam };
|
|
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 };
|