@validation-os/dashboard 0.9.0 → 0.10.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 +141 -7
- package/dist/index.js +370 -75
- package/dist/index.js.map +1 -1
- package/dist/styles.css +135 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -295,21 +295,24 @@ interface NeedsHumanCounts {
|
|
|
295
295
|
declare function needsHumanCounts(ctx: RegisterContext): NeedsHumanCounts;
|
|
296
296
|
|
|
297
297
|
/**
|
|
298
|
-
* The dashboard's client-owned navigation state, across the
|
|
298
|
+
* The dashboard's client-owned navigation state, across the workflow
|
|
299
299
|
* altitudes plus the kept register tables (OPS-1298). One `<ValidationOSDashboard/>`
|
|
300
300
|
* mounts at a single host route and drives everything off the URL hash — there
|
|
301
301
|
* is no second entry point (OPS-1280).
|
|
302
302
|
*
|
|
303
|
-
* - `next`
|
|
304
|
-
* - `pipeline`
|
|
305
|
-
* - `
|
|
306
|
-
*
|
|
307
|
-
*
|
|
303
|
+
* - `next` — the front door ("what's my next move"); the default landing.
|
|
304
|
+
* - `pipeline` — the step-back portfolio pipeline.
|
|
305
|
+
* - `stage-grid` — the Lens × Stage heatmap (docs/stage-policy.md).
|
|
306
|
+
* - `records` — one register's browse table (the manual-override surface,
|
|
307
|
+
* kept from the original scheme).
|
|
308
|
+
* - `record` — the per-belief drill-in (full record page).
|
|
308
309
|
*/
|
|
309
310
|
type Route = {
|
|
310
311
|
name: "next";
|
|
311
312
|
} | {
|
|
312
313
|
name: "pipeline";
|
|
314
|
+
} | {
|
|
315
|
+
name: "stage-grid";
|
|
313
316
|
} | {
|
|
314
317
|
name: "records";
|
|
315
318
|
register: Collection;
|
|
@@ -1381,6 +1384,137 @@ interface NextMoveSurfaceProps {
|
|
|
1381
1384
|
}
|
|
1382
1385
|
declare function NextMoveSurface({ basePath, onNavigate }: NextMoveSurfaceProps): react.JSX.Element;
|
|
1383
1386
|
|
|
1387
|
+
/**
|
|
1388
|
+
* The Lens × Stage heatmap view-model (docs/stage-policy.md §The dashboard
|
|
1389
|
+
* surface) — pure, no React, no I/O, so the grid's shape and the drill-
|
|
1390
|
+
* through's Risk-ranked list are unit-tested at this seam (like
|
|
1391
|
+
* `pipeline.ts` / `journey.ts` / `next-move.ts`).
|
|
1392
|
+
*
|
|
1393
|
+
* The grid is the **filter**, Risk is the **rank**. Where the pipeline board
|
|
1394
|
+
* reads "where every belief stands" row-by-row, this reads the same beliefs
|
|
1395
|
+
* cross-tabbed by Lens (the actor — who the belief is about) × Stage (the
|
|
1396
|
+
* kind of response — engage / pay / scale / defend). The densest cell per
|
|
1397
|
+
* row is where that part of the business is — no flag, no declaration, the
|
|
1398
|
+
* density tells you. Click a cell → the assumptions in it, ranked by Risk.
|
|
1399
|
+
*
|
|
1400
|
+
* Pure and computed fresh on read (like `pipeline.ts`): it only reads numbers
|
|
1401
|
+
* already kept current (`derived.risk`), so it stays out of the OPS-1251
|
|
1402
|
+
* on-write recompute. The Lens list comes from the caller (the surface
|
|
1403
|
+
* supplies the workspace's configured vocabulary); the Stage list is fixed
|
|
1404
|
+
* (the four discovery stages — see `ontology.yaml §vocabularies.stage`).
|
|
1405
|
+
*/
|
|
1406
|
+
|
|
1407
|
+
/** The four discovery stages, in their canonical ordinal order (1→4). The
|
|
1408
|
+
* stored value is the name; the ordinal is for sort/display only. */
|
|
1409
|
+
declare const STAGE_ORDER: readonly ["Discovery", "Validation", "Scale", "Maturity"];
|
|
1410
|
+
type StageValue = (typeof STAGE_ORDER)[number];
|
|
1411
|
+
/** A short, plain-language gloss for each stage — the column header's
|
|
1412
|
+
* subtitle and the cell tooltip. Drawn from docs/stage-policy.md. */
|
|
1413
|
+
declare const STAGE_GLOSS: Record<StageValue, string>;
|
|
1414
|
+
/** One cell of the Lens × Stage grid. */
|
|
1415
|
+
interface StageGridCell {
|
|
1416
|
+
/** The Lens (row) this cell sits under. */
|
|
1417
|
+
lens: string;
|
|
1418
|
+
/** The Stage (column) this cell sits under — one of the four canonical
|
|
1419
|
+
* stages, or the `NO_STAGE` ("—") sentinel for records with no/invalid
|
|
1420
|
+
* Stage (the gate-leakage bucket, only emitted when needed). */
|
|
1421
|
+
stage: StageValue | typeof NO_STAGE;
|
|
1422
|
+
/** How many assumptions hold this Lens × Stage pair. */
|
|
1423
|
+
count: number;
|
|
1424
|
+
/** The assumptions in this cell, ranked by Risk (highest first). Empty
|
|
1425
|
+
* when `count` is 0. The rank is the cell's drill-through order. */
|
|
1426
|
+
assumptions: AnyRecord[];
|
|
1427
|
+
/** Density in [0, 1] — `count / maxCellCount` across the whole grid, for
|
|
1428
|
+
* the heatmap colour scale. 0 for an empty cell. */
|
|
1429
|
+
density: number;
|
|
1430
|
+
}
|
|
1431
|
+
/** The grid view-model — rows per Lens, columns per Stage, cells with counts
|
|
1432
|
+
* and Risk-ranked drill-through lists. */
|
|
1433
|
+
interface StageGridView {
|
|
1434
|
+
/** The Lens values, in first-appearance order (the configured vocabulary
|
|
1435
|
+
* order is the caller's job; the grid keeps the order it sees). Includes
|
|
1436
|
+
* a trailing "—" row for assumptions with no Lens set. */
|
|
1437
|
+
lenses: string[];
|
|
1438
|
+
/** The four stages in their canonical ordinal order. */
|
|
1439
|
+
stages: StageValue[];
|
|
1440
|
+
/** One cell per (lens, stage) pair, in row-major order: lens-first,
|
|
1441
|
+
* stage-within-lens. */
|
|
1442
|
+
cells: StageGridCell[];
|
|
1443
|
+
/** The maximum cell count across the grid — what `density` is normalised
|
|
1444
|
+
* against. 0 when the grid is empty. */
|
|
1445
|
+
maxCellCount: number;
|
|
1446
|
+
/** Total assumptions counted in the grid (every cell's count summed).
|
|
1447
|
+
* Equal to the input length minus any rows with neither Lens nor Stage
|
|
1448
|
+
* set, which fall in the "—" row / "—" cell. */
|
|
1449
|
+
total: number;
|
|
1450
|
+
}
|
|
1451
|
+
declare const NO_LENS = "\u2014";
|
|
1452
|
+
declare const NO_STAGE = "\u2014";
|
|
1453
|
+
/** A stage value from a record, validated against the fixed vocabulary.
|
|
1454
|
+
* Returns null for an empty or unrecognised value — the caller decides
|
|
1455
|
+
* whether to bucket those or drop them. */
|
|
1456
|
+
declare function stageOf(record: AnyRecord): StageValue | null;
|
|
1457
|
+
/** Sort a list of assumptions by Risk, highest first. Stable on tie by id —
|
|
1458
|
+
* matches the pipeline board's "riskiest first" convention. Pure: returns a
|
|
1459
|
+
* new array, leaves the input alone. */
|
|
1460
|
+
declare function rankByRisk(records: AnyRecord[]): AnyRecord[];
|
|
1461
|
+
/**
|
|
1462
|
+
* Build the Lens × Stage grid from the assumption register. Pure — no I/O,
|
|
1463
|
+
* no React. The Lens list is read off the records in first-appearance order
|
|
1464
|
+
* (the configured vocabulary order is the caller's concern; the grid keeps
|
|
1465
|
+
* what it sees, so a workspace with no Commercial-stage-4 bets simply shows
|
|
1466
|
+
* a 0 cell, never a missing row). A record with no Lens set falls into a
|
|
1467
|
+
* trailing "—" row; a record with no Stage set (or an unrecognised Stage)
|
|
1468
|
+
* falls into a trailing "—" column. The "—"/"—" cell holds the records the
|
|
1469
|
+
* gate would have caught — write-time enforcement is the gate's job, this
|
|
1470
|
+
* just surfaces them honestly.
|
|
1471
|
+
*
|
|
1472
|
+
* The "—" row and "—" column are **only emitted when needed** — i.e. when at
|
|
1473
|
+
* least one record has a missing Lens (resp. Stage). A clean register
|
|
1474
|
+
* renders a pure Lens × 4-Stage matrix; a register with gate-leakage gets
|
|
1475
|
+
* the diagnostic row/column added. This keeps the matrix rectangular and
|
|
1476
|
+
* matches the spec ("if a claim doesn't fit any stage, it falls out" — the
|
|
1477
|
+
* "—" column is a diagnostic, not a feature).
|
|
1478
|
+
*
|
|
1479
|
+
* Each cell's `assumptions` list is ranked by Risk (highest first), so the
|
|
1480
|
+
* drill-through reads "the riskiest belief in this cell" first — the grid is
|
|
1481
|
+
* the filter, Risk is the rank. `density` is `count / maxCellCount` across
|
|
1482
|
+
* the whole grid, for the heatmap colour scale; an empty cell reads 0.
|
|
1483
|
+
*/
|
|
1484
|
+
declare function buildStageGrid(assumptions: AnyRecord[]): StageGridView;
|
|
1485
|
+
/** The cell at a given (lens, stage) — null if no such cell (e.g. a stage
|
|
1486
|
+
* not in the canonical order). The "—" row / "—" column are addressable
|
|
1487
|
+
* with the `NO_LENS` / `NO_STAGE` sentinels. */
|
|
1488
|
+
declare function cellAt(view: StageGridView, lens: string, stage: StageValue | typeof NO_STAGE): StageGridCell | null;
|
|
1489
|
+
|
|
1490
|
+
/**
|
|
1491
|
+
* The Lens × Stage heatmap surface (docs/stage-policy.md §The dashboard
|
|
1492
|
+
* surface) — the workflow dashboard's portfolio lens, mounted alongside
|
|
1493
|
+
* `NextMoveSurface` and `PipelineSurface`. One row per Lens (the actor — who
|
|
1494
|
+
* the belief is about), one column per Stage (the kind of response — engage
|
|
1495
|
+
* / pay / scale / defend), each cell carrying its assumption count and a
|
|
1496
|
+
* heatmap colour by density. Click a cell → a drill-through drawer with the
|
|
1497
|
+
* assumptions in that cell, ranked by Risk (the grid is the filter, Risk is
|
|
1498
|
+
* the rank).
|
|
1499
|
+
*
|
|
1500
|
+
* No stage-flag selector, no "what stage am I" prompt, no per-stage
|
|
1501
|
+
* confidence model — the grid reads the business state off where the bets
|
|
1502
|
+
* cluster, and lets you drill into any cell ranked by Risk. The densest cell
|
|
1503
|
+
* per row is where that part of the business is; thin/empty cells are gaps
|
|
1504
|
+
* (Consumer × Maturity is honestly 0 — consumers don't drive defense bets).
|
|
1505
|
+
*
|
|
1506
|
+
* Lazy-loads the assumption register and derives everything through the pure
|
|
1507
|
+
* `buildStageGrid` view-model — no number is computed here (spec: explain
|
|
1508
|
+
* from inputs). Clicking a belief in the drill-through routes to that
|
|
1509
|
+
* belief's record page (OPS-1298), the review surface where step-in happens.
|
|
1510
|
+
*/
|
|
1511
|
+
interface StageGridSurfaceProps {
|
|
1512
|
+
basePath?: string;
|
|
1513
|
+
/** Navigate across the shell (belief → record). */
|
|
1514
|
+
onNavigate: (route: Route) => void;
|
|
1515
|
+
}
|
|
1516
|
+
declare function StageGridSurface({ basePath, onNavigate }: StageGridSurfaceProps): react.JSX.Element;
|
|
1517
|
+
|
|
1384
1518
|
interface ScoreImpactFormProps {
|
|
1385
1519
|
/** The assumption being weighted (its version guards the write). */
|
|
1386
1520
|
assumption: AnyRecord;
|
|
@@ -1803,4 +1937,4 @@ declare const REGISTER_GROUPS: {
|
|
|
1803
1937
|
registers: Collection[];
|
|
1804
1938
|
}[];
|
|
1805
1939
|
|
|
1806
|
-
export { type BacklinkItem, BeliefJourney, type BeliefJourneyProps, type BeliefVerdict, BeliefVerdicts, CONFLICT_MESSAGE, type CellKind, type ColdStart, type ColumnDef, ConfidenceCell, ConnectClaudeCode, type ConnectClaudeCodeProps, type ConnectCommandInput, type Counts, type CycleReadingView, type CycleView, DEFAULT_TOKEN_ENV, DIRECT_CYCLE_KEY, type DashboardConfig, type DetailRelationItem, type DetailRow, type DetailRowKind, type Draft, EditBeliefForm, type EditBeliefFormProps, EditFields, type ExperimentView, FIRST_RUN_LINE, type FieldEditor, FieldInput, type FieldKind, type FormField, type GlossaryTerm, GlossaryText, type GlossaryTextProps, type GroupBucket, type GroupByAxis, type HumanText, type JourneyColdState, type JourneyEventView, type JourneyView, type LinkArgs, type LinkChoice, type LinkifyNode, type LinkifyOptions, Markdown, type Meter, type MeterKind, type MovePresentation, type NeedsHumanByRegister, type NeedsHumanCounts, type NeighbourChip, type NestedGroup, type NextColdStart, type NextMoveRecords, NextMoveSurface, type NextMoveSurfaceProps, type OtherMover, type Pill, type PipelineColdStart, type PipelineRow, PipelineSurface, type PipelineView, REGISTER_GROUPS, REGISTER_ICON, REGISTER_LABEL, REGISTER_ORDER, REGISTER_SINGULAR, REGISTER_SUBTITLE, RISK_CRIT, RISK_WARN, RecordDrawer, type RecordDrawerProps, RecordForm, type RecordFormProps, RecordPage, type RecordPageModel, type RecordPageProps, type RecordTabId, RegisterBrowser, type RegisterBrowserProps, type RegisterContext, RegisterCounts, type RegisterCountsProps, RegisterTable, type RegisterTableProps, type RelatedSet, RelationEditor, type RelationEditorProps, type RelationPanel, type ResolvedBarLine, type ResolvedRow, type RiskBand, RiskBar, type Route, type SaveResult, type SavedView, type ScoreChip, ScoreImpactForm, type ScoreImpactFormProps, type ShapedRegister, SidebarNav, type SidebarNavProps, type SortSpec, Sparkline, type StageMeterInput, type StageMeterView, StatTile, StatusPill, type StepInForm, type StoryStepIn, SurfacePlaceholder, type SurfacePlaceholderProps, type TabDef, type TermPreview, type Tone, type Understanding, UnderstandingPanel, type UseCountsResult, type UseCreateResult, type UseLinkResult, type UseListResult, type UseNeedsHumanResult, type UseRecordResult, type UseSavedViewsResult, type UseUpdateResult, ValidationOSDashboard, type ValidationOSDashboardProps, type ViewDescriptor, WriteDecisionForm, type WriteDecisionFormProps, backlinkPanels, bodyPreview, buildCycles, buildJourney, buildPatch, buildPipeline, buildRecordPage, buildUnderstanding, cellValue, coldStartFor, columnsFor, composeConnectCommand, confidenceTone, configureRiskBands, defaultTabId, detailRows, dontConfuseWith, draftFrom, editableFields, emptyDraft, eventStepIn, eventTone, filterRecords, formFieldsFor, formatCount, formatRoute, formatSigned, formatValue, groupByAxesFor, groupRecords, hasEdits, headerPills, humanInputFields, interpretSave, journeyColdState, leadingMeters, linkChoicesFrom, linkify, missingRequired, movePresentation, needsHumanCounts, nestReadingsByPlan, ownerNames, parseRoute, primaryLabel, readingAssumptionChips, readingBeliefVerdicts, resolveBarLines, riskBand, riskFraction, riskLevel, scoreChip, shapeRegister, sortRecords, sparklinePath, stageMeters, statusTone, tabsFor, toCreatePayload, toGlossaryTerms, toNextMoveInput, toStageExperimentInput, useCounts, useCreate, useLink, useList, useNeedsHuman, useRecord, useSavedViews, useUpdate, weekOverWeekDelta };
|
|
1940
|
+
export { type BacklinkItem, BeliefJourney, type BeliefJourneyProps, type BeliefVerdict, BeliefVerdicts, CONFLICT_MESSAGE, type CellKind, type ColdStart, type ColumnDef, ConfidenceCell, ConnectClaudeCode, type ConnectClaudeCodeProps, type ConnectCommandInput, type Counts, type CycleReadingView, type CycleView, DEFAULT_TOKEN_ENV, DIRECT_CYCLE_KEY, type DashboardConfig, type DetailRelationItem, type DetailRow, type DetailRowKind, type Draft, EditBeliefForm, type EditBeliefFormProps, EditFields, type ExperimentView, FIRST_RUN_LINE, type FieldEditor, FieldInput, type FieldKind, type FormField, type GlossaryTerm, GlossaryText, type GlossaryTextProps, type GroupBucket, type GroupByAxis, type HumanText, type JourneyColdState, type JourneyEventView, type JourneyView, type LinkArgs, type LinkChoice, type LinkifyNode, type LinkifyOptions, Markdown, type Meter, type MeterKind, type MovePresentation, NO_LENS, NO_STAGE, type NeedsHumanByRegister, type NeedsHumanCounts, type NeighbourChip, type NestedGroup, type NextColdStart, type NextMoveRecords, NextMoveSurface, type NextMoveSurfaceProps, type OtherMover, type Pill, type PipelineColdStart, type PipelineRow, PipelineSurface, type PipelineView, REGISTER_GROUPS, REGISTER_ICON, REGISTER_LABEL, REGISTER_ORDER, REGISTER_SINGULAR, REGISTER_SUBTITLE, RISK_CRIT, RISK_WARN, RecordDrawer, type RecordDrawerProps, RecordForm, type RecordFormProps, RecordPage, type RecordPageModel, type RecordPageProps, type RecordTabId, RegisterBrowser, type RegisterBrowserProps, type RegisterContext, RegisterCounts, type RegisterCountsProps, RegisterTable, type RegisterTableProps, type RelatedSet, RelationEditor, type RelationEditorProps, type RelationPanel, type ResolvedBarLine, type ResolvedRow, type RiskBand, RiskBar, type Route, STAGE_GLOSS, STAGE_ORDER, type SaveResult, type SavedView, type ScoreChip, ScoreImpactForm, type ScoreImpactFormProps, type ShapedRegister, SidebarNav, type SidebarNavProps, type SortSpec, Sparkline, type StageGridCell, StageGridSurface, type StageGridSurfaceProps, type StageGridView, type StageMeterInput, type StageMeterView, type StageValue, StatTile, StatusPill, type StepInForm, type StoryStepIn, SurfacePlaceholder, type SurfacePlaceholderProps, type TabDef, type TermPreview, type Tone, type Understanding, UnderstandingPanel, type UseCountsResult, type UseCreateResult, type UseLinkResult, type UseListResult, type UseNeedsHumanResult, type UseRecordResult, type UseSavedViewsResult, type UseUpdateResult, ValidationOSDashboard, type ValidationOSDashboardProps, type ViewDescriptor, WriteDecisionForm, type WriteDecisionFormProps, backlinkPanels, bodyPreview, buildCycles, buildJourney, buildPatch, buildPipeline, buildRecordPage, buildStageGrid, buildUnderstanding, cellAt, cellValue, coldStartFor, columnsFor, composeConnectCommand, confidenceTone, configureRiskBands, defaultTabId, detailRows, dontConfuseWith, draftFrom, editableFields, emptyDraft, eventStepIn, eventTone, filterRecords, formFieldsFor, formatCount, formatRoute, formatSigned, formatValue, groupByAxesFor, groupRecords, hasEdits, headerPills, humanInputFields, interpretSave, journeyColdState, leadingMeters, linkChoicesFrom, linkify, missingRequired, movePresentation, needsHumanCounts, nestReadingsByPlan, ownerNames, parseRoute, primaryLabel, rankByRisk, readingAssumptionChips, readingBeliefVerdicts, resolveBarLines, riskBand, riskFraction, riskLevel, scoreChip, shapeRegister, sortRecords, sparklinePath, stageMeters, stageOf, statusTone, tabsFor, toCreatePayload, toGlossaryTerms, toNextMoveInput, toStageExperimentInput, useCounts, useCreate, useLink, useList, useNeedsHuman, useRecord, useSavedViews, useUpdate, weekOverWeekDelta };
|