@validation-os/dashboard 0.10.0 → 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 +20 -6
- package/dist/index.js +466 -269
- package/dist/index.js.map +1 -1
- package/dist/styles.css +145 -15
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
// src/dashboard-app.tsx
|
|
4
|
-
import { useCallback as useCallback5, useEffect as useEffect6, useState as
|
|
4
|
+
import { useCallback as useCallback5, useEffect as useEffect6, useState as useState15 } from "react";
|
|
5
5
|
|
|
6
6
|
// src/labels.ts
|
|
7
7
|
var REGISTER_LABEL = {
|
|
@@ -49,7 +49,6 @@ var REGISTER_GROUPS = [
|
|
|
49
49
|
];
|
|
50
50
|
var WORKFLOW_NAV = [
|
|
51
51
|
{ route: "next", label: "Next move", icon: "\u25C8", isDefault: true },
|
|
52
|
-
{ route: "stage-grid", label: "Lens \xD7 Stage", icon: "\u25A6" },
|
|
53
52
|
{ route: "pipeline", label: "Pipeline", icon: "\u25A4" }
|
|
54
53
|
];
|
|
55
54
|
|
|
@@ -75,6 +74,24 @@ function isArchivedExperiment(e) {
|
|
|
75
74
|
function liveExperiments(experiments) {
|
|
76
75
|
return experiments.filter((e) => !isArchivedExperiment(e));
|
|
77
76
|
}
|
|
77
|
+
function readingRung(r) {
|
|
78
|
+
const row = str(r.Rung);
|
|
79
|
+
if (row) return row;
|
|
80
|
+
for (const b of readingBeliefs(r)) {
|
|
81
|
+
const v = b.Rung;
|
|
82
|
+
if (typeof v === "string" && v !== "") return v;
|
|
83
|
+
}
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
function readingMagnitudeBand(r) {
|
|
87
|
+
const row = str(r.magnitudeBand);
|
|
88
|
+
if (row) return row;
|
|
89
|
+
for (const b of readingBeliefs(r)) {
|
|
90
|
+
const v = b.magnitudeBand;
|
|
91
|
+
if (typeof v === "string" && v !== "") return v;
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
78
95
|
function str(v) {
|
|
79
96
|
return typeof v === "string" && v !== "" ? v : null;
|
|
80
97
|
}
|
|
@@ -1062,7 +1079,7 @@ function Meter({
|
|
|
1062
1079
|
}
|
|
1063
1080
|
|
|
1064
1081
|
// src/record-page.tsx
|
|
1065
|
-
import { useMemo, useState as
|
|
1082
|
+
import { useMemo, useState as useState6 } from "react";
|
|
1066
1083
|
import { REGISTERS } from "@validation-os/core";
|
|
1067
1084
|
|
|
1068
1085
|
// src/columns.ts
|
|
@@ -1104,10 +1121,17 @@ var COLUMNS = {
|
|
|
1104
1121
|
{ key: "Title", header: "Reading" },
|
|
1105
1122
|
{ key: "Source", header: "Source" },
|
|
1106
1123
|
{ key: "Date", header: "Date" },
|
|
1107
|
-
//
|
|
1108
|
-
//
|
|
1109
|
-
//
|
|
1110
|
-
//
|
|
1124
|
+
// Rung + magnitude band are row-level attributes of the artifact (0.10): the
|
|
1125
|
+
// evidence tier and its intensity, one per reading, not per belief. They lead
|
|
1126
|
+
// the row's evidential weight, so each earns a column. Both helpers fall back
|
|
1127
|
+
// to a belief's value on pre-migration data so the columns are never blank
|
|
1128
|
+
// during the rollout.
|
|
1129
|
+
{ key: "Rung", header: "Rung", accessor: (r) => readingRung(r) },
|
|
1130
|
+
{ key: "magnitudeBand", header: "Band", accessor: (r) => readingMagnitudeBand(r) },
|
|
1131
|
+
// The row's per-belief Result / Strength stay in the reading detail's
|
|
1132
|
+
// verdict list (OPS-1305). The table previews the quote (`body`) so a row is
|
|
1133
|
+
// legible at a glance; assumption chips (see `readingAssumptionChips`)
|
|
1134
|
+
// disambiguate same-titled readings.
|
|
1111
1135
|
{
|
|
1112
1136
|
key: "body",
|
|
1113
1137
|
header: "Quote",
|
|
@@ -3038,12 +3062,59 @@ function needsHumanCounts(ctx) {
|
|
|
3038
3062
|
}
|
|
3039
3063
|
|
|
3040
3064
|
// src/markdown.tsx
|
|
3041
|
-
import {
|
|
3065
|
+
import { useState as useState5 } from "react";
|
|
3066
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3067
|
+
var HR_RE = /^ {0,3}([-*_])(?: *\1){2,} *$/;
|
|
3042
3068
|
function Markdown({ text }) {
|
|
3043
3069
|
const trimmed = (text ?? "").trim();
|
|
3044
3070
|
if (!trimmed) return null;
|
|
3045
3071
|
return /* @__PURE__ */ jsx9("div", { className: "vos-md", children: renderBlocks(trimmed) });
|
|
3046
3072
|
}
|
|
3073
|
+
function EvidenceBody({
|
|
3074
|
+
text,
|
|
3075
|
+
partLabel = "Part"
|
|
3076
|
+
}) {
|
|
3077
|
+
const [expanded, setExpanded] = useState5(false);
|
|
3078
|
+
const trimmed = (text ?? "").trim();
|
|
3079
|
+
const parts = trimmed ? splitOnRules(trimmed) : [];
|
|
3080
|
+
if (parts.length === 0) return null;
|
|
3081
|
+
if (parts.length === 1) return /* @__PURE__ */ jsx9(Markdown, { text: parts[0] });
|
|
3082
|
+
const hidden = parts.length - 1;
|
|
3083
|
+
const visible = expanded ? parts : parts.slice(0, 1);
|
|
3084
|
+
return /* @__PURE__ */ jsxs9("div", { className: "vos-evidence", children: [
|
|
3085
|
+
/* @__PURE__ */ jsx9("ol", { className: "vos-evidence-parts", children: visible.map((p, n) => /* @__PURE__ */ jsxs9("li", { className: "vos-evidence-part", children: [
|
|
3086
|
+
/* @__PURE__ */ jsxs9("span", { className: "vos-evidence-n", children: [
|
|
3087
|
+
partLabel,
|
|
3088
|
+
" ",
|
|
3089
|
+
n + 1,
|
|
3090
|
+
/* @__PURE__ */ jsxs9("span", { className: "vos-evidence-of", children: [
|
|
3091
|
+
" of ",
|
|
3092
|
+
parts.length
|
|
3093
|
+
] })
|
|
3094
|
+
] }),
|
|
3095
|
+
/* @__PURE__ */ jsx9(Markdown, { text: p })
|
|
3096
|
+
] }, n)) }),
|
|
3097
|
+
/* @__PURE__ */ jsx9(
|
|
3098
|
+
"button",
|
|
3099
|
+
{
|
|
3100
|
+
type: "button",
|
|
3101
|
+
className: "vos-btn vos-btn-ghost vos-btn-sm vos-evidence-more",
|
|
3102
|
+
onClick: () => setExpanded((e) => !e),
|
|
3103
|
+
"aria-expanded": expanded,
|
|
3104
|
+
children: expanded ? "Show less" : `Show full evidence \u2014 ${hidden} more ${partLabel.toLowerCase()}${hidden === 1 ? "" : "s"}`
|
|
3105
|
+
}
|
|
3106
|
+
)
|
|
3107
|
+
] });
|
|
3108
|
+
}
|
|
3109
|
+
function splitOnRules(text) {
|
|
3110
|
+
const lines = text.replace(/\r\n?/g, "\n").split("\n");
|
|
3111
|
+
const parts = [[]];
|
|
3112
|
+
for (const line of lines) {
|
|
3113
|
+
if (HR_RE.test(line)) parts.push([]);
|
|
3114
|
+
else parts[parts.length - 1].push(line);
|
|
3115
|
+
}
|
|
3116
|
+
return parts.map((p) => p.join("\n").trim()).filter((p) => p !== "");
|
|
3117
|
+
}
|
|
3047
3118
|
function renderBlocks(text) {
|
|
3048
3119
|
const lines = text.replace(/\r\n?/g, "\n").split("\n");
|
|
3049
3120
|
const out = [];
|
|
@@ -3069,6 +3140,11 @@ function renderBlocks(text) {
|
|
|
3069
3140
|
);
|
|
3070
3141
|
continue;
|
|
3071
3142
|
}
|
|
3143
|
+
if (HR_RE.test(line)) {
|
|
3144
|
+
out.push(/* @__PURE__ */ jsx9("hr", { className: "vos-md-hr" }, key++));
|
|
3145
|
+
i += 1;
|
|
3146
|
+
continue;
|
|
3147
|
+
}
|
|
3072
3148
|
const heading = line.match(/^(#{1,6})\s+(.*)$/);
|
|
3073
3149
|
if (heading) {
|
|
3074
3150
|
const level = heading[1].length;
|
|
@@ -3111,7 +3187,7 @@ function renderBlocks(text) {
|
|
|
3111
3187
|
continue;
|
|
3112
3188
|
}
|
|
3113
3189
|
const para = [];
|
|
3114
|
-
while (i < lines.length && lines[i].trim() !== "" && !/^```|^#{1,6}\s|^>\s?|^[-*+]\s+|^\d+\.\s+/.test(lines[i])) {
|
|
3190
|
+
while (i < lines.length && lines[i].trim() !== "" && !HR_RE.test(lines[i]) && !/^```|^#{1,6}\s|^>\s?|^[-*+]\s+|^\d+\.\s+/.test(lines[i])) {
|
|
3115
3191
|
para.push(lines[i]);
|
|
3116
3192
|
i += 1;
|
|
3117
3193
|
}
|
|
@@ -3203,6 +3279,11 @@ function headerPills(register, record, related = {}, options = {}) {
|
|
|
3203
3279
|
pills.push({ label: "Overdue", tone: "crit" });
|
|
3204
3280
|
} else if (register === "decisions") {
|
|
3205
3281
|
if (status === "Active") pills.push({ label: "Standing", tone: "good" });
|
|
3282
|
+
} else if (register === "readings") {
|
|
3283
|
+
const rung = readingRung(record);
|
|
3284
|
+
const band = readingMagnitudeBand(record);
|
|
3285
|
+
const label = [rung, band].filter(Boolean).join(" \xB7 ");
|
|
3286
|
+
if (label) pills.push({ label, tone: "accent" });
|
|
3206
3287
|
}
|
|
3207
3288
|
return pills;
|
|
3208
3289
|
}
|
|
@@ -3294,7 +3375,10 @@ function leadingMeters(register, record) {
|
|
|
3294
3375
|
}
|
|
3295
3376
|
var HUMAN_FIELDS = {
|
|
3296
3377
|
assumptions: [{ key: "Scoring justification", label: "Scoring justification" }],
|
|
3297
|
-
|
|
3378
|
+
// A reading's grading justification is per belief now (OPS-1305) — it renders
|
|
3379
|
+
// in the verdict cards (`BeliefVerdicts`), so surfacing a stale row-level copy
|
|
3380
|
+
// here too would double up. The row carries no other genuine human free-text.
|
|
3381
|
+
readings: [],
|
|
3298
3382
|
decisions: [
|
|
3299
3383
|
{ key: "Statement", label: "Statement" },
|
|
3300
3384
|
{ key: "Unanimity justification", label: "Unanimity justification" }
|
|
@@ -3317,14 +3401,27 @@ function readingBeliefVerdicts(reading, assumptions = []) {
|
|
|
3317
3401
|
assumptionId: b.assumptionId,
|
|
3318
3402
|
title: hit ? primaryLabel(hit) : b.assumptionId,
|
|
3319
3403
|
linked: hit != null,
|
|
3320
|
-
rung: b.Rung ?? null,
|
|
3321
3404
|
result: b.Result ?? null,
|
|
3322
3405
|
strength,
|
|
3323
|
-
magnitudeBand: b.magnitudeBand ?? null,
|
|
3324
3406
|
justification: typeof b["Grading justification"] === "string" ? b["Grading justification"] : ""
|
|
3325
3407
|
};
|
|
3326
3408
|
});
|
|
3327
3409
|
}
|
|
3410
|
+
function readingBeliefSummary(reading, assumptions = []) {
|
|
3411
|
+
const verdicts = readingBeliefVerdicts(reading, assumptions);
|
|
3412
|
+
let validated = 0;
|
|
3413
|
+
let invalidated = 0;
|
|
3414
|
+
for (const v of verdicts) {
|
|
3415
|
+
if (v.result === "Validated") validated += 1;
|
|
3416
|
+
else if (v.result === "Invalidated") invalidated += 1;
|
|
3417
|
+
}
|
|
3418
|
+
return {
|
|
3419
|
+
total: verdicts.length,
|
|
3420
|
+
validated,
|
|
3421
|
+
invalidated,
|
|
3422
|
+
inconclusive: verdicts.length - validated - invalidated
|
|
3423
|
+
};
|
|
3424
|
+
}
|
|
3328
3425
|
function scoreChip(register, record) {
|
|
3329
3426
|
if (register === "assumptions") {
|
|
3330
3427
|
const c = derivedNum(record, "confidence") ?? 0;
|
|
@@ -3475,12 +3572,36 @@ function buildRecordPage(register, record, related = {}, options = {}) {
|
|
|
3475
3572
|
}
|
|
3476
3573
|
|
|
3477
3574
|
// src/belief-verdicts.tsx
|
|
3478
|
-
import { jsx as jsx10, jsxs as
|
|
3575
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3479
3576
|
function resultClass(result) {
|
|
3480
3577
|
if (result === "Validated") return "vos-pill vos-pill-good";
|
|
3481
3578
|
if (result === "Invalidated") return "vos-pill vos-pill-crit";
|
|
3482
3579
|
return "vos-pill vos-pill-neutral";
|
|
3483
3580
|
}
|
|
3581
|
+
function verdictTone(result) {
|
|
3582
|
+
if (result === "Validated") return "is-good";
|
|
3583
|
+
if (result === "Invalidated") return "is-crit";
|
|
3584
|
+
return "is-neutral";
|
|
3585
|
+
}
|
|
3586
|
+
function VerdictTally({ summary }) {
|
|
3587
|
+
const parts = [
|
|
3588
|
+
{ n: summary.validated, label: "validated", cls: "vos-tally-good" },
|
|
3589
|
+
{ n: summary.inconclusive, label: "inconclusive", cls: "vos-tally-neutral" },
|
|
3590
|
+
{ n: summary.invalidated, label: "invalidated", cls: "vos-tally-crit" }
|
|
3591
|
+
].filter((p) => p.n > 0);
|
|
3592
|
+
return /* @__PURE__ */ jsxs10("p", { className: "vos-verdict-tally", children: [
|
|
3593
|
+
/* @__PURE__ */ jsxs10("span", { className: "vos-tally-total", children: [
|
|
3594
|
+
summary.total,
|
|
3595
|
+
" belief",
|
|
3596
|
+
summary.total === 1 ? "" : "s"
|
|
3597
|
+
] }),
|
|
3598
|
+
parts.map((p) => /* @__PURE__ */ jsxs10("span", { className: `vos-tally-part ${p.cls}`, children: [
|
|
3599
|
+
p.n,
|
|
3600
|
+
" ",
|
|
3601
|
+
p.label
|
|
3602
|
+
] }, p.label))
|
|
3603
|
+
] });
|
|
3604
|
+
}
|
|
3484
3605
|
function BeliefVerdicts({
|
|
3485
3606
|
reading,
|
|
3486
3607
|
assumptions,
|
|
@@ -3490,33 +3611,40 @@ function BeliefVerdicts({
|
|
|
3490
3611
|
if (verdicts.length === 0) {
|
|
3491
3612
|
return /* @__PURE__ */ jsx10("p", { className: "vos-hint", children: "This reading grades no beliefs yet." });
|
|
3492
3613
|
}
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
children:
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3614
|
+
const summary = readingBeliefSummary(reading, assumptions);
|
|
3615
|
+
return /* @__PURE__ */ jsxs10("div", { className: "vos-verdicts-wrap", children: [
|
|
3616
|
+
/* @__PURE__ */ jsx10(VerdictTally, { summary }),
|
|
3617
|
+
/* @__PURE__ */ jsx10("ul", { className: "vos-verdicts", children: verdicts.map((v) => /* @__PURE__ */ jsxs10(
|
|
3618
|
+
"li",
|
|
3619
|
+
{
|
|
3620
|
+
className: `vos-verdict ${verdictTone(v.result)}`,
|
|
3621
|
+
children: [
|
|
3622
|
+
/* @__PURE__ */ jsxs10("div", { className: "vos-verdict-head", children: [
|
|
3623
|
+
v.linked && onOpenRecord ? /* @__PURE__ */ jsx10(
|
|
3624
|
+
"button",
|
|
3625
|
+
{
|
|
3626
|
+
type: "button",
|
|
3627
|
+
className: "vos-inline-link vos-verdict-title",
|
|
3628
|
+
onClick: () => onOpenRecord(v.assumptionId),
|
|
3629
|
+
children: v.title
|
|
3630
|
+
}
|
|
3631
|
+
) : /* @__PURE__ */ jsx10("span", { className: "vos-verdict-title", children: v.title }),
|
|
3632
|
+
/* @__PURE__ */ jsx10("span", { className: resultClass(v.result), children: v.result ?? "Ungraded" })
|
|
3633
|
+
] }),
|
|
3634
|
+
v.strength !== null ? /* @__PURE__ */ jsx10("div", { className: "vos-verdict-meta", children: /* @__PURE__ */ jsxs10("span", { className: "vos-verdict-strength", children: [
|
|
3635
|
+
"Strength ",
|
|
3636
|
+
formatSigned(v.strength)
|
|
3637
|
+
] }) }) : null,
|
|
3638
|
+
v.justification ? /* @__PURE__ */ jsx10("p", { className: "vos-verdict-why", children: v.justification }) : null
|
|
3639
|
+
]
|
|
3640
|
+
},
|
|
3641
|
+
v.assumptionId
|
|
3642
|
+
)) })
|
|
3643
|
+
] });
|
|
3516
3644
|
}
|
|
3517
3645
|
|
|
3518
3646
|
// src/record-page.tsx
|
|
3519
|
-
import { Fragment as Fragment8, jsx as jsx11, jsxs as
|
|
3647
|
+
import { Fragment as Fragment8, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3520
3648
|
var TAB_LABEL = {
|
|
3521
3649
|
overview: "Overview",
|
|
3522
3650
|
evidence: "Evidence",
|
|
@@ -3543,8 +3671,8 @@ function RecordPage({
|
|
|
3543
3671
|
decisions: useList("decisions", basePath),
|
|
3544
3672
|
glossary: useList("glossary", basePath)
|
|
3545
3673
|
};
|
|
3546
|
-
const [tab, setTab] =
|
|
3547
|
-
const [asOf] =
|
|
3674
|
+
const [tab, setTab] = useState6("overview");
|
|
3675
|
+
const [asOf] = useState6(() => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10));
|
|
3548
3676
|
const anyLoading = REGISTERS.some((r) => lists[r].loading && !lists[r].records);
|
|
3549
3677
|
const related = {
|
|
3550
3678
|
assumptions: lists.assumptions.records ?? [],
|
|
@@ -3585,9 +3713,9 @@ function RecordPage({
|
|
|
3585
3713
|
};
|
|
3586
3714
|
const terms = toGlossaryTerms(related.glossary ?? []);
|
|
3587
3715
|
const openTerm = (id) => onNavigate({ name: "record", id });
|
|
3588
|
-
const [editing, setEditing] =
|
|
3589
|
-
const [draft, setDraft] =
|
|
3590
|
-
const [baseline, setBaseline] =
|
|
3716
|
+
const [editing, setEditing] = useState6(false);
|
|
3717
|
+
const [draft, setDraft] = useState6({});
|
|
3718
|
+
const [baseline, setBaseline] = useState6(null);
|
|
3591
3719
|
const { save, saving, conflict, error: saveError, reset } = useUpdate(
|
|
3592
3720
|
register ?? backRegister,
|
|
3593
3721
|
basePath
|
|
@@ -3637,8 +3765,8 @@ function RecordPage({
|
|
|
3637
3765
|
onReload: reloadLatest,
|
|
3638
3766
|
onField: setField
|
|
3639
3767
|
};
|
|
3640
|
-
return /* @__PURE__ */
|
|
3641
|
-
/* @__PURE__ */
|
|
3768
|
+
return /* @__PURE__ */ jsxs11("div", { children: [
|
|
3769
|
+
/* @__PURE__ */ jsxs11("nav", { className: "vos-crumbs", "aria-label": "Breadcrumb", children: [
|
|
3642
3770
|
/* @__PURE__ */ jsx11(
|
|
3643
3771
|
"button",
|
|
3644
3772
|
{
|
|
@@ -3650,7 +3778,7 @@ function RecordPage({
|
|
|
3650
3778
|
/* @__PURE__ */ jsx11("span", { "aria-hidden": "true", children: "\u203A" }),
|
|
3651
3779
|
/* @__PURE__ */ jsx11("span", { className: "vos-rid", children: record ? formatValue(record.Title) : recordId })
|
|
3652
3780
|
] }),
|
|
3653
|
-
anyLoading ? /* @__PURE__ */ jsx11("p", { className: "vos-muted", children: "Loading record\u2026" }) : !record || !register ? /* @__PURE__ */
|
|
3781
|
+
anyLoading ? /* @__PURE__ */ jsx11("p", { className: "vos-muted", children: "Loading record\u2026" }) : !record || !register ? /* @__PURE__ */ jsxs11("div", { className: "vos-empty", children: [
|
|
3654
3782
|
"Couldn't find a record with id ",
|
|
3655
3783
|
/* @__PURE__ */ jsx11("b", { children: recordId }),
|
|
3656
3784
|
"."
|
|
@@ -3696,15 +3824,15 @@ function RecordBody({
|
|
|
3696
3824
|
const description = typeof record.Description === "string" ? record.Description : "";
|
|
3697
3825
|
const bodyText = typeof record.body === "string" ? record.body : "";
|
|
3698
3826
|
const hasErrors = Object.keys(edit.errors).length > 0;
|
|
3699
|
-
return /* @__PURE__ */
|
|
3700
|
-
/* @__PURE__ */
|
|
3701
|
-
/* @__PURE__ */
|
|
3827
|
+
return /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
3828
|
+
/* @__PURE__ */ jsxs11("div", { className: "vos-head vos-record-head", children: [
|
|
3829
|
+
/* @__PURE__ */ jsxs11("div", { children: [
|
|
3702
3830
|
/* @__PURE__ */ jsx11("p", { className: "vos-drawer-eyebrow", children: REGISTER_SINGULAR[register] }),
|
|
3703
3831
|
/* @__PURE__ */ jsx11("h1", { children: page.title }),
|
|
3704
3832
|
/* @__PURE__ */ jsx11("div", { className: "vos-pill-row", children: page.pills.map((p, i) => /* @__PURE__ */ jsx11(PillView, { pill: p }, i)) })
|
|
3705
3833
|
] }),
|
|
3706
3834
|
/* @__PURE__ */ jsx11("div", { className: "vos-spacer" }),
|
|
3707
|
-
/* @__PURE__ */
|
|
3835
|
+
/* @__PURE__ */ jsxs11("span", { className: "vos-verbadge", children: [
|
|
3708
3836
|
"v",
|
|
3709
3837
|
formatValue(record.version)
|
|
3710
3838
|
] }),
|
|
@@ -3730,7 +3858,7 @@ function RecordBody({
|
|
|
3730
3858
|
},
|
|
3731
3859
|
t2
|
|
3732
3860
|
)) }),
|
|
3733
|
-
activeTab === "overview" ? /* @__PURE__ */
|
|
3861
|
+
activeTab === "overview" ? /* @__PURE__ */ jsxs11("div", { className: "vos-record-cols", children: [
|
|
3734
3862
|
/* @__PURE__ */ jsx11("section", { className: "vos-meter-grid", children: page.meters.map((m) => /* @__PURE__ */ jsx11(
|
|
3735
3863
|
MeterView,
|
|
3736
3864
|
{
|
|
@@ -3740,7 +3868,7 @@ function RecordBody({
|
|
|
3740
3868
|
},
|
|
3741
3869
|
m.key
|
|
3742
3870
|
)) }),
|
|
3743
|
-
edit.editing ? /* @__PURE__ */
|
|
3871
|
+
edit.editing ? /* @__PURE__ */ jsxs11("section", { className: "vos-record-editor", children: [
|
|
3744
3872
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Edit" }),
|
|
3745
3873
|
edit.conflict ? /* @__PURE__ */ jsx11(ConflictBanner, { message: edit.conflict, onReload: edit.onReload }) : null,
|
|
3746
3874
|
edit.saveError ? /* @__PURE__ */ jsx11("p", { role: "alert", className: "vos-error", children: edit.saveError }) : null,
|
|
@@ -3753,7 +3881,7 @@ function RecordBody({
|
|
|
3753
3881
|
onField: edit.onField
|
|
3754
3882
|
}
|
|
3755
3883
|
),
|
|
3756
|
-
/* @__PURE__ */
|
|
3884
|
+
/* @__PURE__ */ jsxs11("footer", { className: "vos-drawer-footer", children: [
|
|
3757
3885
|
/* @__PURE__ */ jsx11(
|
|
3758
3886
|
"button",
|
|
3759
3887
|
{
|
|
@@ -3776,8 +3904,8 @@ function RecordBody({
|
|
|
3776
3904
|
}
|
|
3777
3905
|
)
|
|
3778
3906
|
] })
|
|
3779
|
-
] }) : /* @__PURE__ */
|
|
3780
|
-
description ? /* @__PURE__ */
|
|
3907
|
+
] }) : /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
3908
|
+
description ? /* @__PURE__ */ jsxs11("section", { className: "vos-record-prose", children: [
|
|
3781
3909
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Description" }),
|
|
3782
3910
|
/* @__PURE__ */ jsx11("p", { children: /* @__PURE__ */ jsx11(
|
|
3783
3911
|
GlossaryText,
|
|
@@ -3789,11 +3917,17 @@ function RecordBody({
|
|
|
3789
3917
|
}
|
|
3790
3918
|
) })
|
|
3791
3919
|
] }) : null,
|
|
3792
|
-
bodyText ? /* @__PURE__ */
|
|
3920
|
+
bodyText ? /* @__PURE__ */ jsxs11("section", { className: "vos-record-prose", children: [
|
|
3793
3921
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: register === "readings" ? "Quote" : "Narrative" }),
|
|
3794
|
-
/* @__PURE__ */ jsx11(
|
|
3922
|
+
/* @__PURE__ */ jsx11(
|
|
3923
|
+
EvidenceBody,
|
|
3924
|
+
{
|
|
3925
|
+
text: bodyText,
|
|
3926
|
+
partLabel: register === "readings" ? "Finding" : "Part"
|
|
3927
|
+
}
|
|
3928
|
+
)
|
|
3795
3929
|
] }) : null,
|
|
3796
|
-
register === "readings" ? /* @__PURE__ */
|
|
3930
|
+
register === "readings" ? /* @__PURE__ */ jsxs11("section", { className: "vos-record-prose vos-verdicts-section", children: [
|
|
3797
3931
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Per-belief verdicts" }),
|
|
3798
3932
|
/* @__PURE__ */ jsx11(
|
|
3799
3933
|
BeliefVerdicts,
|
|
@@ -3804,12 +3938,12 @@ function RecordBody({
|
|
|
3804
3938
|
}
|
|
3805
3939
|
)
|
|
3806
3940
|
] }) : null,
|
|
3807
|
-
page.humanText.length ? /* @__PURE__ */
|
|
3808
|
-
/* @__PURE__ */
|
|
3941
|
+
page.humanText.length ? /* @__PURE__ */ jsxs11("section", { className: "vos-record-prose", children: [
|
|
3942
|
+
/* @__PURE__ */ jsxs11("h3", { className: "vos-section-title", children: [
|
|
3809
3943
|
"From a human ",
|
|
3810
3944
|
/* @__PURE__ */ jsx11("span", { className: "vos-hint", children: "\u2014 not computed" })
|
|
3811
3945
|
] }),
|
|
3812
|
-
page.humanText.map((h) => /* @__PURE__ */
|
|
3946
|
+
page.humanText.map((h) => /* @__PURE__ */ jsxs11("div", { className: "vos-human-field", children: [
|
|
3813
3947
|
/* @__PURE__ */ jsx11("div", { className: "vos-detail-k", children: h.label }),
|
|
3814
3948
|
/* @__PURE__ */ jsx11("p", { children: /* @__PURE__ */ jsx11(
|
|
3815
3949
|
GlossaryText,
|
|
@@ -3835,22 +3969,22 @@ function RecordBody({
|
|
|
3835
3969
|
}
|
|
3836
3970
|
) : null,
|
|
3837
3971
|
activeTab === "connections" ? /* @__PURE__ */ jsx11("div", { className: "vos-panels", children: page.panels.map((panel) => /* @__PURE__ */ jsx11(PanelView, { panel, onOpenRecord }, panel.id)) }) : null,
|
|
3838
|
-
activeTab === "history" ? /* @__PURE__ */
|
|
3839
|
-
/* @__PURE__ */
|
|
3972
|
+
activeTab === "history" ? /* @__PURE__ */ jsxs11("section", { className: "vos-detail-list", children: [
|
|
3973
|
+
/* @__PURE__ */ jsxs11("div", { className: "vos-detail-row", children: [
|
|
3840
3974
|
/* @__PURE__ */ jsx11("span", { className: "vos-detail-k", children: "Created" }),
|
|
3841
3975
|
/* @__PURE__ */ jsx11("span", { className: "vos-detail-v", children: formatValue(record.createdAt) })
|
|
3842
3976
|
] }),
|
|
3843
|
-
/* @__PURE__ */
|
|
3977
|
+
/* @__PURE__ */ jsxs11("div", { className: "vos-detail-row", children: [
|
|
3844
3978
|
/* @__PURE__ */ jsx11("span", { className: "vos-detail-k", children: "Last updated" }),
|
|
3845
3979
|
/* @__PURE__ */ jsx11("span", { className: "vos-detail-v", children: formatValue(record.updatedAt) })
|
|
3846
3980
|
] }),
|
|
3847
|
-
/* @__PURE__ */
|
|
3981
|
+
/* @__PURE__ */ jsxs11("div", { className: "vos-detail-row", children: [
|
|
3848
3982
|
/* @__PURE__ */ jsx11("span", { className: "vos-detail-k", children: "Version" }),
|
|
3849
3983
|
/* @__PURE__ */ jsx11("span", { className: "vos-detail-v", children: formatValue(record.version) })
|
|
3850
3984
|
] }),
|
|
3851
3985
|
/* @__PURE__ */ jsx11("p", { className: "vos-hint", children: "The full change trail lands here as the API exposes version history; this absorbs the retired provenance prose." })
|
|
3852
3986
|
] }) : null,
|
|
3853
|
-
page.hasJourney && journey ? /* @__PURE__ */
|
|
3987
|
+
page.hasJourney && journey ? /* @__PURE__ */ jsxs11("section", { className: "vos-journey-host", children: [
|
|
3854
3988
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Validation journey" }),
|
|
3855
3989
|
/* @__PURE__ */ jsx11(
|
|
3856
3990
|
BeliefJourney,
|
|
@@ -3862,7 +3996,7 @@ function RecordBody({
|
|
|
3862
3996
|
onChanged: onJourneyChanged
|
|
3863
3997
|
}
|
|
3864
3998
|
)
|
|
3865
|
-
] }) : page.hasJourney ? /* @__PURE__ */
|
|
3999
|
+
] }) : page.hasJourney ? /* @__PURE__ */ jsxs11("section", { className: "vos-journey-host", children: [
|
|
3866
4000
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Validation journey" }),
|
|
3867
4001
|
/* @__PURE__ */ jsx11("p", { className: "vos-hint", children: "The per-belief journey (Framed \u2192 Planned \u2192 Tested \u2192 Known) mounts here \u2014 built by the workflow-first map (OPS-1289). This page is its host." })
|
|
3868
4002
|
] }) : null
|
|
@@ -3875,7 +4009,7 @@ function ConflictBanner({
|
|
|
3875
4009
|
message,
|
|
3876
4010
|
onReload
|
|
3877
4011
|
}) {
|
|
3878
|
-
return /* @__PURE__ */
|
|
4012
|
+
return /* @__PURE__ */ jsxs11("div", { role: "alert", className: "vos-banner vos-banner-warn", children: [
|
|
3879
4013
|
/* @__PURE__ */ jsx11("div", { className: "vos-banner-body", children: /* @__PURE__ */ jsx11("span", { children: message }) }),
|
|
3880
4014
|
/* @__PURE__ */ jsx11("button", { type: "button", onClick: onReload, children: "Review the latest" })
|
|
3881
4015
|
] });
|
|
@@ -3885,12 +4019,12 @@ function MeterView({
|
|
|
3885
4019
|
assumption,
|
|
3886
4020
|
basePath
|
|
3887
4021
|
}) {
|
|
3888
|
-
const [why, setWhy] =
|
|
4022
|
+
const [why, setWhy] = useState6(false);
|
|
3889
4023
|
const textTone = meter.tone === "crit" ? "vos-text-crit" : meter.tone === "warn" ? "vos-text-warn" : "";
|
|
3890
|
-
return /* @__PURE__ */
|
|
3891
|
-
/* @__PURE__ */
|
|
4024
|
+
return /* @__PURE__ */ jsxs11("div", { className: "vos-meter", children: [
|
|
4025
|
+
/* @__PURE__ */ jsxs11("div", { className: "vos-meter-head", children: [
|
|
3892
4026
|
/* @__PURE__ */ jsx11("span", { className: "vos-meter-label", children: meter.label }),
|
|
3893
|
-
meter.hasWhy && assumption ? /* @__PURE__ */
|
|
4027
|
+
meter.hasWhy && assumption ? /* @__PURE__ */ jsxs11(
|
|
3894
4028
|
"button",
|
|
3895
4029
|
{
|
|
3896
4030
|
type: "button",
|
|
@@ -3904,10 +4038,10 @@ function MeterView({
|
|
|
3904
4038
|
}
|
|
3905
4039
|
) : null
|
|
3906
4040
|
] }),
|
|
3907
|
-
meter.value === null ? /* @__PURE__ */ jsx11("div", { className: "vos-meter-val vos-muted", children: "\u2014" }) : meter.kind === "pill" ? /* @__PURE__ */ jsx11("span", { className: PILL_CLASS3[meter.tone], children: meter.value }) : meter.kind === "signed" ? /* @__PURE__ */
|
|
4041
|
+
meter.value === null ? /* @__PURE__ */ jsx11("div", { className: "vos-meter-val vos-muted", children: "\u2014" }) : meter.kind === "pill" ? /* @__PURE__ */ jsx11("span", { className: PILL_CLASS3[meter.tone], children: meter.value }) : meter.kind === "signed" ? /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
3908
4042
|
/* @__PURE__ */ jsx11("div", { className: `vos-meter-val ${textTone}`, children: formatSigned(Number(meter.value)) }),
|
|
3909
4043
|
/* @__PURE__ */ jsx11("span", { className: "vos-track vos-signed", children: /* @__PURE__ */ jsx11(SignedFill, { value: Number(meter.value), min: meter.min ?? -100, max: meter.max ?? 100 }) })
|
|
3910
|
-
] }) : /* @__PURE__ */
|
|
4044
|
+
] }) : /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
3911
4045
|
/* @__PURE__ */ jsx11("div", { className: `vos-meter-val ${textTone}`, children: Math.round(Number(meter.value)) }),
|
|
3912
4046
|
/* @__PURE__ */ jsx11("span", { className: "vos-risk-bar", children: /* @__PURE__ */ jsx11(
|
|
3913
4047
|
"i",
|
|
@@ -3931,8 +4065,8 @@ function PanelView({
|
|
|
3931
4065
|
panel,
|
|
3932
4066
|
onOpenRecord
|
|
3933
4067
|
}) {
|
|
3934
|
-
return /* @__PURE__ */
|
|
3935
|
-
/* @__PURE__ */
|
|
4068
|
+
return /* @__PURE__ */ jsxs11("section", { className: "vos-panel", children: [
|
|
4069
|
+
/* @__PURE__ */ jsxs11("h3", { className: "vos-panel-head", children: [
|
|
3936
4070
|
panel.label,
|
|
3937
4071
|
/* @__PURE__ */ jsx11("span", { className: "vos-group-n", children: panel.items.length })
|
|
3938
4072
|
] }),
|
|
@@ -3943,7 +4077,7 @@ function BacklinkRow({
|
|
|
3943
4077
|
item,
|
|
3944
4078
|
onOpenRecord
|
|
3945
4079
|
}) {
|
|
3946
|
-
return /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */
|
|
4080
|
+
return /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsxs11(
|
|
3947
4081
|
"button",
|
|
3948
4082
|
{
|
|
3949
4083
|
type: "button",
|
|
@@ -3951,7 +4085,7 @@ function BacklinkRow({
|
|
|
3951
4085
|
onClick: () => onOpenRecord(item.id),
|
|
3952
4086
|
children: [
|
|
3953
4087
|
/* @__PURE__ */ jsx11("span", { className: "vos-backlink-title", children: item.title }),
|
|
3954
|
-
/* @__PURE__ */
|
|
4088
|
+
/* @__PURE__ */ jsxs11("span", { className: `vos-chip ${PILL_CLASS3[item.chip.tone]}`, children: [
|
|
3955
4089
|
/* @__PURE__ */ jsx11("span", { className: "vos-chip-k", children: item.chip.label }),
|
|
3956
4090
|
item.chip.value
|
|
3957
4091
|
] })
|
|
@@ -3975,10 +4109,10 @@ function EvidenceTab({
|
|
|
3975
4109
|
);
|
|
3976
4110
|
const mine = (related.readings ?? []).filter((r) => r.experimentId === record.id);
|
|
3977
4111
|
const nested = nestReadingsByPlan(mine, [record]);
|
|
3978
|
-
return /* @__PURE__ */
|
|
3979
|
-
/* @__PURE__ */
|
|
4112
|
+
return /* @__PURE__ */ jsxs11("div", { className: "vos-record-cols", children: [
|
|
4113
|
+
/* @__PURE__ */ jsxs11("section", { children: [
|
|
3980
4114
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Bar lines" }),
|
|
3981
|
-
bars.length === 0 ? /* @__PURE__ */ jsx11("p", { className: "vos-hint", children: "No pre-registered bars." }) : /* @__PURE__ */ jsx11("ul", { className: "vos-bars", children: bars.map((b, i) => /* @__PURE__ */
|
|
4115
|
+
bars.length === 0 ? /* @__PURE__ */ jsx11("p", { className: "vos-hint", children: "No pre-registered bars." }) : /* @__PURE__ */ jsx11("ul", { className: "vos-bars", children: bars.map((b, i) => /* @__PURE__ */ jsxs11("li", { className: "vos-bar-line", children: [
|
|
3982
4116
|
/* @__PURE__ */ jsx11("span", { className: "vos-bar-if", children: b.rightIf || "\u2014" }),
|
|
3983
4117
|
b.assumption ? /* @__PURE__ */ jsx11(
|
|
3984
4118
|
"button",
|
|
@@ -3998,9 +4132,9 @@ function EvidenceTab({
|
|
|
3998
4132
|
)
|
|
3999
4133
|
] }, i)) })
|
|
4000
4134
|
] }),
|
|
4001
|
-
/* @__PURE__ */
|
|
4135
|
+
/* @__PURE__ */ jsxs11("section", { children: [
|
|
4002
4136
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Readings" }),
|
|
4003
|
-
nested.length === 0 ? /* @__PURE__ */ jsx11("p", { className: "vos-hint", children: "No readings logged yet." }) : /* @__PURE__ */ jsx11("ul", { className: "vos-backlinks", children: nested[0].readings.map((r) => /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */
|
|
4137
|
+
nested.length === 0 ? /* @__PURE__ */ jsx11("p", { className: "vos-hint", children: "No readings logged yet." }) : /* @__PURE__ */ jsx11("ul", { className: "vos-backlinks", children: nested[0].readings.map((r) => /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsxs11(
|
|
4004
4138
|
"button",
|
|
4005
4139
|
{
|
|
4006
4140
|
type: "button",
|
|
@@ -4008,7 +4142,7 @@ function EvidenceTab({
|
|
|
4008
4142
|
onClick: () => onOpenRecord(r.id),
|
|
4009
4143
|
children: [
|
|
4010
4144
|
/* @__PURE__ */ jsx11("span", { className: "vos-backlink-title", children: formatValue(r.Title) }),
|
|
4011
|
-
/* @__PURE__ */
|
|
4145
|
+
/* @__PURE__ */ jsxs11("span", { className: "vos-chip vos-pill vos-pill-neutral", children: [
|
|
4012
4146
|
readingBeliefs(r).length,
|
|
4013
4147
|
" belief",
|
|
4014
4148
|
readingBeliefs(r).length === 1 ? "" : "s"
|
|
@@ -4021,10 +4155,10 @@ function EvidenceTab({
|
|
|
4021
4155
|
}
|
|
4022
4156
|
|
|
4023
4157
|
// src/register-browser.tsx
|
|
4024
|
-
import { useMemo as useMemo4, useState as
|
|
4158
|
+
import { useMemo as useMemo4, useState as useState11 } from "react";
|
|
4025
4159
|
|
|
4026
4160
|
// src/register-table.tsx
|
|
4027
|
-
import { jsx as jsx12, jsxs as
|
|
4161
|
+
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4028
4162
|
function RegisterTable({
|
|
4029
4163
|
register,
|
|
4030
4164
|
records,
|
|
@@ -4036,7 +4170,7 @@ function RegisterTable({
|
|
|
4036
4170
|
if (records.length === 0) {
|
|
4037
4171
|
return /* @__PURE__ */ jsx12("p", { className: "vos-empty", children: "No records yet." });
|
|
4038
4172
|
}
|
|
4039
|
-
return /* @__PURE__ */ jsx12("div", { className: "vos-card vos-table-scroll", children: /* @__PURE__ */
|
|
4173
|
+
return /* @__PURE__ */ jsx12("div", { className: "vos-card vos-table-scroll", children: /* @__PURE__ */ jsxs12("table", { className: "vos-table", children: [
|
|
4040
4174
|
/* @__PURE__ */ jsx12("thead", { children: /* @__PURE__ */ jsx12("tr", { children: columns.map((c) => /* @__PURE__ */ jsx12(
|
|
4041
4175
|
"th",
|
|
4042
4176
|
{
|
|
@@ -4101,7 +4235,7 @@ function Cell({
|
|
|
4101
4235
|
}
|
|
4102
4236
|
const text = headline && (raw === null || raw === void 0 || raw === "") ? primaryLabel(record) : formatValue(raw);
|
|
4103
4237
|
if (headline && chips && chips.length > 0) {
|
|
4104
|
-
return /* @__PURE__ */
|
|
4238
|
+
return /* @__PURE__ */ jsxs12("span", { className: "vos-ttl-wrap", children: [
|
|
4105
4239
|
/* @__PURE__ */ jsx12("span", { className: "vos-ttl", children: text }),
|
|
4106
4240
|
/* @__PURE__ */ jsx12("span", { className: "vos-reading-chips", children: chips.map((chip, n) => /* @__PURE__ */ jsx12("span", { className: "vos-chip vos-pill vos-pill-neutral", children: chip }, n)) })
|
|
4107
4241
|
] });
|
|
@@ -4110,8 +4244,8 @@ function Cell({
|
|
|
4110
4244
|
}
|
|
4111
4245
|
|
|
4112
4246
|
// src/record-drawer.tsx
|
|
4113
|
-
import { useEffect as useEffect3, useState as
|
|
4114
|
-
import { Fragment as Fragment9, jsx as jsx13, jsxs as
|
|
4247
|
+
import { useEffect as useEffect3, useState as useState7 } from "react";
|
|
4248
|
+
import { Fragment as Fragment9, jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4115
4249
|
var DERIVED_SUB = {
|
|
4116
4250
|
confidence: "Signed average of concluded readings",
|
|
4117
4251
|
risk: "Impact \xD7 (1 \u2212 Confidence\u207A/100)",
|
|
@@ -4134,10 +4268,10 @@ function RecordDrawer({
|
|
|
4134
4268
|
related,
|
|
4135
4269
|
children
|
|
4136
4270
|
}) {
|
|
4137
|
-
const [editing, setEditing] =
|
|
4138
|
-
const [draft, setDraft] =
|
|
4139
|
-
const [baseline, setBaseline] =
|
|
4140
|
-
const [why, setWhy] =
|
|
4271
|
+
const [editing, setEditing] = useState7(false);
|
|
4272
|
+
const [draft, setDraft] = useState7({});
|
|
4273
|
+
const [baseline, setBaseline] = useState7(null);
|
|
4274
|
+
const [why, setWhy] = useState7(false);
|
|
4141
4275
|
const { save, saving, conflict, error: saveError, reset } = useUpdate(
|
|
4142
4276
|
register,
|
|
4143
4277
|
basePath
|
|
@@ -4184,19 +4318,19 @@ function RecordDrawer({
|
|
|
4184
4318
|
const setField = (key, value) => setDraft((d) => ({ ...d, [key]: value }));
|
|
4185
4319
|
const errors = editing ? draftErrors(register, draft) : {};
|
|
4186
4320
|
const hasErrors = Object.keys(errors).length > 0;
|
|
4187
|
-
return /* @__PURE__ */
|
|
4321
|
+
return /* @__PURE__ */ jsxs13(
|
|
4188
4322
|
DrawerShell,
|
|
4189
4323
|
{
|
|
4190
4324
|
open,
|
|
4191
4325
|
onClose,
|
|
4192
4326
|
ariaLabel: `${REGISTER_LABEL[register]} record`,
|
|
4193
4327
|
children: [
|
|
4194
|
-
/* @__PURE__ */
|
|
4195
|
-
/* @__PURE__ */
|
|
4328
|
+
/* @__PURE__ */ jsxs13("header", { className: "vos-drawer-header", children: [
|
|
4329
|
+
/* @__PURE__ */ jsxs13("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
4196
4330
|
/* @__PURE__ */ jsx13("p", { className: "vos-drawer-eyebrow", children: REGISTER_LABEL[register] }),
|
|
4197
4331
|
/* @__PURE__ */ jsx13("h2", { className: "vos-drawer-title", children: record ? primaryLabel(record) : loading ? "Loading\u2026" : "\u2014" })
|
|
4198
4332
|
] }),
|
|
4199
|
-
record ? /* @__PURE__ */
|
|
4333
|
+
record ? /* @__PURE__ */ jsxs13("span", { className: "vos-verbadge", children: [
|
|
4200
4334
|
"v",
|
|
4201
4335
|
formatValue(record.version)
|
|
4202
4336
|
] }) : null,
|
|
@@ -4229,10 +4363,10 @@ function RecordDrawer({
|
|
|
4229
4363
|
}
|
|
4230
4364
|
)
|
|
4231
4365
|
] }),
|
|
4232
|
-
/* @__PURE__ */ jsx13("div", { className: "vos-drawer-body", children: loading ? /* @__PURE__ */ jsx13("p", { className: "vos-muted", children: "Loading record\u2026" }) : error ? /* @__PURE__ */ jsx13("p", { className: "vos-error", children: error }) : !record ? /* @__PURE__ */ jsx13("p", { className: "vos-muted", children: "No record." }) : /* @__PURE__ */
|
|
4233
|
-
derived ? /* @__PURE__ */
|
|
4234
|
-
/* @__PURE__ */
|
|
4235
|
-
/* @__PURE__ */
|
|
4366
|
+
/* @__PURE__ */ jsx13("div", { className: "vos-drawer-body", children: loading ? /* @__PURE__ */ jsx13("p", { className: "vos-muted", children: "Loading record\u2026" }) : error ? /* @__PURE__ */ jsx13("p", { className: "vos-error", children: error }) : !record ? /* @__PURE__ */ jsx13("p", { className: "vos-muted", children: "No record." }) : /* @__PURE__ */ jsxs13(Fragment9, { children: [
|
|
4367
|
+
derived ? /* @__PURE__ */ jsxs13("div", { children: [
|
|
4368
|
+
/* @__PURE__ */ jsxs13("div", { className: "vos-derived", children: [
|
|
4369
|
+
/* @__PURE__ */ jsxs13("div", { className: "vos-derived-head", children: [
|
|
4236
4370
|
"Derived",
|
|
4237
4371
|
/* @__PURE__ */ jsx13("span", { className: "vos-lock", children: "\u{1F512} computed on write \u2014 not editable" })
|
|
4238
4372
|
] }),
|
|
@@ -4260,7 +4394,7 @@ function RecordDrawer({
|
|
|
4260
4394
|
errors,
|
|
4261
4395
|
onField: setField
|
|
4262
4396
|
}
|
|
4263
|
-
) : /* @__PURE__ */
|
|
4397
|
+
) : /* @__PURE__ */ jsxs13(Fragment9, { children: [
|
|
4264
4398
|
/* @__PURE__ */ jsx13("div", { className: "vos-detail-list", children: rows.map((row) => /* @__PURE__ */ jsx13(
|
|
4265
4399
|
DetailRowView,
|
|
4266
4400
|
{
|
|
@@ -4269,11 +4403,17 @@ function RecordDrawer({
|
|
|
4269
4403
|
},
|
|
4270
4404
|
row.key
|
|
4271
4405
|
)) }),
|
|
4272
|
-
typeof record.body === "string" && record.body.trim() ? /* @__PURE__ */
|
|
4406
|
+
typeof record.body === "string" && record.body.trim() ? /* @__PURE__ */ jsxs13("section", { className: "vos-record-prose", children: [
|
|
4273
4407
|
/* @__PURE__ */ jsx13("div", { className: "vos-detail-k", children: register === "readings" ? "Quote" : "Narrative" }),
|
|
4274
|
-
/* @__PURE__ */ jsx13(
|
|
4408
|
+
/* @__PURE__ */ jsx13(
|
|
4409
|
+
EvidenceBody,
|
|
4410
|
+
{
|
|
4411
|
+
text: record.body,
|
|
4412
|
+
partLabel: register === "readings" ? "Finding" : "Part"
|
|
4413
|
+
}
|
|
4414
|
+
)
|
|
4275
4415
|
] }) : null,
|
|
4276
|
-
register === "readings" ? /* @__PURE__ */
|
|
4416
|
+
register === "readings" ? /* @__PURE__ */ jsxs13("section", { className: "vos-record-prose", children: [
|
|
4277
4417
|
/* @__PURE__ */ jsx13("div", { className: "vos-detail-k", children: "Per-belief verdicts" }),
|
|
4278
4418
|
/* @__PURE__ */ jsx13(
|
|
4279
4419
|
BeliefVerdicts,
|
|
@@ -4287,7 +4427,7 @@ function RecordDrawer({
|
|
|
4287
4427
|
] })
|
|
4288
4428
|
] }) }),
|
|
4289
4429
|
record && !loading && !error && !editing ? children : null,
|
|
4290
|
-
record && editing ? /* @__PURE__ */
|
|
4430
|
+
record && editing ? /* @__PURE__ */ jsxs13("footer", { className: "vos-drawer-footer", children: [
|
|
4291
4431
|
/* @__PURE__ */ jsx13(
|
|
4292
4432
|
"button",
|
|
4293
4433
|
{
|
|
@@ -4309,7 +4449,7 @@ function RecordDrawer({
|
|
|
4309
4449
|
children: saving ? "Saving\u2026" : "Save"
|
|
4310
4450
|
}
|
|
4311
4451
|
)
|
|
4312
|
-
] }) : record ? /* @__PURE__ */
|
|
4452
|
+
] }) : record ? /* @__PURE__ */ jsxs13("footer", { className: "vos-drawer-footer", children: [
|
|
4313
4453
|
record.id,
|
|
4314
4454
|
" \xB7 updated ",
|
|
4315
4455
|
formatValue(record.updatedAt)
|
|
@@ -4322,9 +4462,9 @@ function DetailRowView({
|
|
|
4322
4462
|
row,
|
|
4323
4463
|
onOpenRecord
|
|
4324
4464
|
}) {
|
|
4325
|
-
return /* @__PURE__ */
|
|
4465
|
+
return /* @__PURE__ */ jsxs13("div", { className: "vos-detail-row", children: [
|
|
4326
4466
|
/* @__PURE__ */ jsx13("span", { className: "vos-detail-k", children: row.label }),
|
|
4327
|
-
/* @__PURE__ */ jsx13("span", { className: "vos-detail-v", children: row.kind === "relation" ? row.items && row.items.length ? /* @__PURE__ */ jsx13(RelationLinks, { items: row.items, onOpenRecord }) : "\u2014" : row.kind === "owner" ? row.names && row.names.length ? row.names.join(", ") : "\u2014" : row.kind === "bar-lines" ? row.bars && row.bars.length ? /* @__PURE__ */ jsx13("ul", { className: "vos-bars", children: row.bars.map((b, i) => /* @__PURE__ */
|
|
4467
|
+
/* @__PURE__ */ jsx13("span", { className: "vos-detail-v", children: row.kind === "relation" ? row.items && row.items.length ? /* @__PURE__ */ jsx13(RelationLinks, { items: row.items, onOpenRecord }) : "\u2014" : row.kind === "owner" ? row.names && row.names.length ? row.names.join(", ") : "\u2014" : row.kind === "bar-lines" ? row.bars && row.bars.length ? /* @__PURE__ */ jsx13("ul", { className: "vos-bars", children: row.bars.map((b, i) => /* @__PURE__ */ jsxs13("li", { className: "vos-bar-line", children: [
|
|
4328
4468
|
/* @__PURE__ */ jsx13("span", { className: "vos-bar-if", children: b.rightIf || "\u2014" }),
|
|
4329
4469
|
b.assumption ? /* @__PURE__ */ jsx13(
|
|
4330
4470
|
InlineLink,
|
|
@@ -4348,7 +4488,7 @@ function RelationLinks({
|
|
|
4348
4488
|
items,
|
|
4349
4489
|
onOpenRecord
|
|
4350
4490
|
}) {
|
|
4351
|
-
return /* @__PURE__ */ jsx13("span", { className: "vos-detail-links", children: items.map((item, i) => /* @__PURE__ */
|
|
4491
|
+
return /* @__PURE__ */ jsx13("span", { className: "vos-detail-links", children: items.map((item, i) => /* @__PURE__ */ jsxs13("span", { children: [
|
|
4352
4492
|
i > 0 ? ", " : null,
|
|
4353
4493
|
/* @__PURE__ */ jsx13(InlineLink, { id: item.id, title: item.title, onOpenRecord })
|
|
4354
4494
|
] }, item.id)) });
|
|
@@ -4382,10 +4522,10 @@ function DerivedCell({
|
|
|
4382
4522
|
toneClass = heroToneClass(derivedTone(field, num3));
|
|
4383
4523
|
display = field === "confidence" ? formatSigned(num3) : String(Math.round(num3));
|
|
4384
4524
|
}
|
|
4385
|
-
return /* @__PURE__ */
|
|
4386
|
-
/* @__PURE__ */
|
|
4525
|
+
return /* @__PURE__ */ jsxs13("div", { className: "vos-dcell", children: [
|
|
4526
|
+
/* @__PURE__ */ jsxs13("div", { className: "vos-dcell-k", children: [
|
|
4387
4527
|
derivedLabel(field),
|
|
4388
|
-
showWhy ? /* @__PURE__ */
|
|
4528
|
+
showWhy ? /* @__PURE__ */ jsxs13(
|
|
4389
4529
|
"button",
|
|
4390
4530
|
{
|
|
4391
4531
|
type: "button",
|
|
@@ -4407,14 +4547,14 @@ function ConflictBanner2({
|
|
|
4407
4547
|
message,
|
|
4408
4548
|
onReload
|
|
4409
4549
|
}) {
|
|
4410
|
-
return /* @__PURE__ */
|
|
4550
|
+
return /* @__PURE__ */ jsxs13("div", { role: "alert", className: "vos-banner vos-banner-warn", children: [
|
|
4411
4551
|
/* @__PURE__ */ jsx13("div", { className: "vos-banner-body", children: /* @__PURE__ */ jsx13("span", { children: message }) }),
|
|
4412
4552
|
/* @__PURE__ */ jsx13("button", { type: "button", onClick: onReload, children: "Review the latest" })
|
|
4413
4553
|
] });
|
|
4414
4554
|
}
|
|
4415
4555
|
|
|
4416
4556
|
// src/record-form.tsx
|
|
4417
|
-
import { useMemo as useMemo2, useState as
|
|
4557
|
+
import { useMemo as useMemo2, useState as useState8 } from "react";
|
|
4418
4558
|
|
|
4419
4559
|
// src/form-fields.ts
|
|
4420
4560
|
var ASSUMPTION_STATUS = ["Draft", "Live", "Invalidated"];
|
|
@@ -4516,7 +4656,7 @@ function toCreatePayload(register, draft) {
|
|
|
4516
4656
|
}
|
|
4517
4657
|
|
|
4518
4658
|
// src/record-form.tsx
|
|
4519
|
-
import { jsx as jsx14, jsxs as
|
|
4659
|
+
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4520
4660
|
function RecordForm({
|
|
4521
4661
|
register,
|
|
4522
4662
|
basePath,
|
|
@@ -4524,7 +4664,7 @@ function RecordForm({
|
|
|
4524
4664
|
onCancel
|
|
4525
4665
|
}) {
|
|
4526
4666
|
const fields = useMemo2(() => formFieldsFor(register), [register]);
|
|
4527
|
-
const [draft, setDraft] =
|
|
4667
|
+
const [draft, setDraft] = useState8(
|
|
4528
4668
|
() => emptyDraft(register)
|
|
4529
4669
|
);
|
|
4530
4670
|
const { create, saving, error } = useCreate(register, basePath);
|
|
@@ -4539,8 +4679,8 @@ function RecordForm({
|
|
|
4539
4679
|
} catch {
|
|
4540
4680
|
}
|
|
4541
4681
|
};
|
|
4542
|
-
return /* @__PURE__ */
|
|
4543
|
-
/* @__PURE__ */
|
|
4682
|
+
return /* @__PURE__ */ jsxs14("form", { onSubmit, className: "vos-form", children: [
|
|
4683
|
+
/* @__PURE__ */ jsxs14("div", { className: "vos-form-body", children: [
|
|
4544
4684
|
fields.map((field) => /* @__PURE__ */ jsx14(
|
|
4545
4685
|
Field,
|
|
4546
4686
|
{
|
|
@@ -4552,7 +4692,7 @@ function RecordForm({
|
|
|
4552
4692
|
)),
|
|
4553
4693
|
error ? /* @__PURE__ */ jsx14("p", { className: "vos-error", children: error }) : null
|
|
4554
4694
|
] }),
|
|
4555
|
-
/* @__PURE__ */
|
|
4695
|
+
/* @__PURE__ */ jsxs14("footer", { className: "vos-drawer-footer", children: [
|
|
4556
4696
|
/* @__PURE__ */ jsx14("button", { type: "button", onClick: onCancel, className: "vos-btn vos-btn-ghost vos-btn-sm", children: "Cancel" }),
|
|
4557
4697
|
/* @__PURE__ */ jsx14(
|
|
4558
4698
|
"button",
|
|
@@ -4573,8 +4713,8 @@ function Field({
|
|
|
4573
4713
|
onChange
|
|
4574
4714
|
}) {
|
|
4575
4715
|
const id = `field-${field.key}`;
|
|
4576
|
-
return /* @__PURE__ */
|
|
4577
|
-
/* @__PURE__ */
|
|
4716
|
+
return /* @__PURE__ */ jsxs14("div", { className: "vos-field", children: [
|
|
4717
|
+
/* @__PURE__ */ jsxs14("label", { htmlFor: id, className: FIELD_LABEL_CLASS, children: [
|
|
4578
4718
|
field.label,
|
|
4579
4719
|
field.required ? /* @__PURE__ */ jsx14("span", { className: "vos-req", children: " *" }) : null
|
|
4580
4720
|
] }),
|
|
@@ -4588,7 +4728,7 @@ function Field({
|
|
|
4588
4728
|
onChange: (e) => onChange(e.target.value),
|
|
4589
4729
|
className: FIELD_CONTROL_CLASS
|
|
4590
4730
|
}
|
|
4591
|
-
) : field.kind === "select" ? /* @__PURE__ */
|
|
4731
|
+
) : field.kind === "select" ? /* @__PURE__ */ jsxs14(
|
|
4592
4732
|
"select",
|
|
4593
4733
|
{
|
|
4594
4734
|
id,
|
|
@@ -4615,7 +4755,7 @@ function Field({
|
|
|
4615
4755
|
}
|
|
4616
4756
|
|
|
4617
4757
|
// src/relation-editor.tsx
|
|
4618
|
-
import { useMemo as useMemo3, useState as
|
|
4758
|
+
import { useMemo as useMemo3, useState as useState9 } from "react";
|
|
4619
4759
|
|
|
4620
4760
|
// src/link-choices.ts
|
|
4621
4761
|
import { RELATIONS } from "@validation-os/core";
|
|
@@ -4636,7 +4776,7 @@ function linkChoicesFrom(register) {
|
|
|
4636
4776
|
}
|
|
4637
4777
|
|
|
4638
4778
|
// src/relation-editor.tsx
|
|
4639
|
-
import { jsx as jsx15, jsxs as
|
|
4779
|
+
import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4640
4780
|
function RelationEditor({
|
|
4641
4781
|
register,
|
|
4642
4782
|
recordId,
|
|
@@ -4644,8 +4784,8 @@ function RelationEditor({
|
|
|
4644
4784
|
onLinked
|
|
4645
4785
|
}) {
|
|
4646
4786
|
const choices = useMemo3(() => linkChoicesFrom(register), [register]);
|
|
4647
|
-
const [relation, setRelation] =
|
|
4648
|
-
const [targetId, setTargetId] =
|
|
4787
|
+
const [relation, setRelation] = useState9("");
|
|
4788
|
+
const [targetId, setTargetId] = useState9("");
|
|
4649
4789
|
const { link, linking, error } = useLink(basePath);
|
|
4650
4790
|
const active = choices.find((c) => c.relation === relation) ?? null;
|
|
4651
4791
|
const { records } = useList(
|
|
@@ -4670,10 +4810,10 @@ function RelationEditor({
|
|
|
4670
4810
|
} catch {
|
|
4671
4811
|
}
|
|
4672
4812
|
};
|
|
4673
|
-
return /* @__PURE__ */
|
|
4813
|
+
return /* @__PURE__ */ jsxs15("section", { className: "vos-relation", children: [
|
|
4674
4814
|
/* @__PURE__ */ jsx15("h3", { className: "vos-sectitle", children: "Link a record" }),
|
|
4675
|
-
/* @__PURE__ */
|
|
4676
|
-
/* @__PURE__ */
|
|
4815
|
+
/* @__PURE__ */ jsxs15("div", { className: "vos-field-stack", children: [
|
|
4816
|
+
/* @__PURE__ */ jsxs15(
|
|
4677
4817
|
"select",
|
|
4678
4818
|
{
|
|
4679
4819
|
"aria-label": "Relation",
|
|
@@ -4689,7 +4829,7 @@ function RelationEditor({
|
|
|
4689
4829
|
]
|
|
4690
4830
|
}
|
|
4691
4831
|
),
|
|
4692
|
-
active ? /* @__PURE__ */
|
|
4832
|
+
active ? /* @__PURE__ */ jsxs15(
|
|
4693
4833
|
"select",
|
|
4694
4834
|
{
|
|
4695
4835
|
"aria-label": "Target record",
|
|
@@ -4719,7 +4859,7 @@ function RelationEditor({
|
|
|
4719
4859
|
}
|
|
4720
4860
|
|
|
4721
4861
|
// src/use-saved-views.ts
|
|
4722
|
-
import { useCallback as useCallback3, useEffect as useEffect4, useState as
|
|
4862
|
+
import { useCallback as useCallback3, useEffect as useEffect4, useState as useState10 } from "react";
|
|
4723
4863
|
var storageKey = (register) => `vos:saved-views:${register}`;
|
|
4724
4864
|
function read(register) {
|
|
4725
4865
|
if (typeof window === "undefined") return [];
|
|
@@ -4739,7 +4879,7 @@ function write(register, views) {
|
|
|
4739
4879
|
}
|
|
4740
4880
|
}
|
|
4741
4881
|
function useSavedViews(register) {
|
|
4742
|
-
const [views, setViews] =
|
|
4882
|
+
const [views, setViews] = useState10(() => read(register));
|
|
4743
4883
|
useEffect4(() => setViews(read(register)), [register]);
|
|
4744
4884
|
const save = useCallback3(
|
|
4745
4885
|
(name, descriptor) => {
|
|
@@ -4770,7 +4910,7 @@ function useSavedViews(register) {
|
|
|
4770
4910
|
}
|
|
4771
4911
|
|
|
4772
4912
|
// src/register-browser.tsx
|
|
4773
|
-
import { jsx as jsx16, jsxs as
|
|
4913
|
+
import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4774
4914
|
function contextNeeds(register) {
|
|
4775
4915
|
return {
|
|
4776
4916
|
experiments: register === "assumptions" || register === "readings",
|
|
@@ -4782,7 +4922,9 @@ function RegisterBrowser({
|
|
|
4782
4922
|
register,
|
|
4783
4923
|
basePath,
|
|
4784
4924
|
subtitle,
|
|
4785
|
-
onOpenRecord
|
|
4925
|
+
onOpenRecord,
|
|
4926
|
+
lens,
|
|
4927
|
+
stage
|
|
4786
4928
|
}) {
|
|
4787
4929
|
const { records, loading, error, refresh: refreshList } = useList(
|
|
4788
4930
|
register,
|
|
@@ -4792,30 +4934,37 @@ function RegisterBrowser({
|
|
|
4792
4934
|
const experiments = useList("experiments", basePath, needs.experiments);
|
|
4793
4935
|
const readings = useList("readings", basePath, needs.readings);
|
|
4794
4936
|
const assumptions = useList("assumptions", basePath, needs.assumptions);
|
|
4795
|
-
const [descriptor, setDescriptor] =
|
|
4937
|
+
const [descriptor, setDescriptor] = useState11({});
|
|
4796
4938
|
const savedViews = useSavedViews(register);
|
|
4797
|
-
const [openId, setOpenId] =
|
|
4798
|
-
const [creating, setCreating] =
|
|
4939
|
+
const [openId, setOpenId] = useState11(null);
|
|
4940
|
+
const [creating, setCreating] = useState11(false);
|
|
4799
4941
|
const {
|
|
4800
4942
|
record,
|
|
4801
4943
|
loading: recordLoading,
|
|
4802
4944
|
error: recordError,
|
|
4803
4945
|
refresh: refreshRecord
|
|
4804
4946
|
} = useRecord(register, openId, basePath);
|
|
4805
|
-
const [asOf] =
|
|
4947
|
+
const [asOf] = useState11(() => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10));
|
|
4806
4948
|
const rows = records ?? [];
|
|
4949
|
+
const prefiltered = useMemo4(() => {
|
|
4950
|
+
return rows.filter((r) => {
|
|
4951
|
+
if (lens !== void 0 && (r.Lens ?? "") !== lens) return false;
|
|
4952
|
+
if (stage !== void 0 && (r.Stage ?? "") !== stage) return false;
|
|
4953
|
+
return true;
|
|
4954
|
+
});
|
|
4955
|
+
}, [rows, lens, stage]);
|
|
4807
4956
|
const ctx = {
|
|
4808
4957
|
asOf,
|
|
4809
|
-
assumptions: register === "assumptions" ?
|
|
4810
|
-
experiments: register === "experiments" ?
|
|
4811
|
-
readings: register === "readings" ?
|
|
4812
|
-
decisions: register === "decisions" ?
|
|
4958
|
+
assumptions: register === "assumptions" ? prefiltered : assumptions.records ?? [],
|
|
4959
|
+
experiments: register === "experiments" ? prefiltered : experiments.records ?? [],
|
|
4960
|
+
readings: register === "readings" ? prefiltered : readings.records ?? [],
|
|
4961
|
+
decisions: register === "decisions" ? prefiltered : []
|
|
4813
4962
|
};
|
|
4814
4963
|
const shaped = useMemo4(
|
|
4815
|
-
() => shapeRegister(register,
|
|
4964
|
+
() => shapeRegister(register, prefiltered, descriptor, ctx),
|
|
4816
4965
|
// ctx is derived from the same inputs; listing them keeps the memo honest.
|
|
4817
4966
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4818
|
-
[register,
|
|
4967
|
+
[register, prefiltered, descriptor, ctx.assumptions, ctx.experiments, ctx.readings, asOf]
|
|
4819
4968
|
);
|
|
4820
4969
|
const counts = needsHumanCounts(ctx);
|
|
4821
4970
|
const humanCount = {
|
|
@@ -4848,9 +4997,9 @@ function RegisterBrowser({
|
|
|
4848
4997
|
void _name;
|
|
4849
4998
|
setDescriptor(rest);
|
|
4850
4999
|
};
|
|
4851
|
-
return /* @__PURE__ */
|
|
4852
|
-
/* @__PURE__ */
|
|
4853
|
-
/* @__PURE__ */
|
|
5000
|
+
return /* @__PURE__ */ jsxs16("div", { children: [
|
|
5001
|
+
/* @__PURE__ */ jsxs16("div", { className: "vos-head", children: [
|
|
5002
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
4854
5003
|
/* @__PURE__ */ jsx16("h1", { children: REGISTER_LABEL[register] }),
|
|
4855
5004
|
subtitle ? /* @__PURE__ */ jsx16("p", { children: subtitle }) : null
|
|
4856
5005
|
] }),
|
|
@@ -4864,7 +5013,7 @@ function RegisterBrowser({
|
|
|
4864
5013
|
children: "\u21BB Refresh"
|
|
4865
5014
|
}
|
|
4866
5015
|
),
|
|
4867
|
-
/* @__PURE__ */
|
|
5016
|
+
/* @__PURE__ */ jsxs16(
|
|
4868
5017
|
"button",
|
|
4869
5018
|
{
|
|
4870
5019
|
type: "button",
|
|
@@ -4880,7 +5029,7 @@ function RegisterBrowser({
|
|
|
4880
5029
|
/* @__PURE__ */ jsx16("div", { className: "vos-tabs", role: "tablist", "aria-label": "Views", children: shaped.tabs.map((tab) => {
|
|
4881
5030
|
const active = tab.id === shaped.activeTabId;
|
|
4882
5031
|
const badge = badgeFor(tab);
|
|
4883
|
-
return /* @__PURE__ */
|
|
5032
|
+
return /* @__PURE__ */ jsxs16(
|
|
4884
5033
|
"button",
|
|
4885
5034
|
{
|
|
4886
5035
|
type: "button",
|
|
@@ -4907,9 +5056,9 @@ function RegisterBrowser({
|
|
|
4907
5056
|
onQuery: (query) => patch({ query })
|
|
4908
5057
|
}
|
|
4909
5058
|
),
|
|
4910
|
-
/* @__PURE__ */
|
|
5059
|
+
/* @__PURE__ */ jsxs16("div", { className: "vos-saved-views", children: [
|
|
4911
5060
|
/* @__PURE__ */ jsx16("span", { className: "vos-saved-label", children: "Saved views" }),
|
|
4912
|
-
savedViews.views.length === 0 ? /* @__PURE__ */ jsx16("span", { className: "vos-hint", children: "none yet" }) : savedViews.views.map((v) => /* @__PURE__ */
|
|
5061
|
+
savedViews.views.length === 0 ? /* @__PURE__ */ jsx16("span", { className: "vos-hint", children: "none yet" }) : savedViews.views.map((v) => /* @__PURE__ */ jsxs16("span", { className: "vos-saved-view", children: [
|
|
4913
5062
|
/* @__PURE__ */ jsx16(
|
|
4914
5063
|
"button",
|
|
4915
5064
|
{
|
|
@@ -4940,7 +5089,7 @@ function RegisterBrowser({
|
|
|
4940
5089
|
}
|
|
4941
5090
|
)
|
|
4942
5091
|
] }),
|
|
4943
|
-
loading && !records ? /* @__PURE__ */
|
|
5092
|
+
loading && !records ? /* @__PURE__ */ jsxs16("p", { className: "vos-muted", children: [
|
|
4944
5093
|
"Loading ",
|
|
4945
5094
|
REGISTER_LABEL[register].toLowerCase(),
|
|
4946
5095
|
"\u2026"
|
|
@@ -4985,14 +5134,14 @@ function RegisterBrowser({
|
|
|
4985
5134
|
) : null
|
|
4986
5135
|
}
|
|
4987
5136
|
),
|
|
4988
|
-
/* @__PURE__ */
|
|
5137
|
+
/* @__PURE__ */ jsxs16(
|
|
4989
5138
|
DrawerShell,
|
|
4990
5139
|
{
|
|
4991
5140
|
open: creating,
|
|
4992
5141
|
onClose: () => setCreating(false),
|
|
4993
5142
|
ariaLabel: `New ${REGISTER_SINGULAR[register]} record`,
|
|
4994
5143
|
children: [
|
|
4995
|
-
/* @__PURE__ */ jsx16("header", { className: "vos-drawer-header", children: /* @__PURE__ */
|
|
5144
|
+
/* @__PURE__ */ jsx16("header", { className: "vos-drawer-header", children: /* @__PURE__ */ jsxs16("div", { children: [
|
|
4996
5145
|
/* @__PURE__ */ jsx16("p", { className: "vos-drawer-eyebrow", children: "New" }),
|
|
4997
5146
|
/* @__PURE__ */ jsx16("h2", { className: "vos-drawer-title", children: REGISTER_SINGULAR[register] })
|
|
4998
5147
|
] }) }),
|
|
@@ -5024,7 +5173,7 @@ function ViewControls({
|
|
|
5024
5173
|
}) {
|
|
5025
5174
|
const sortable = columnsFor(register);
|
|
5026
5175
|
const sort = descriptor.sort ?? null;
|
|
5027
|
-
return /* @__PURE__ */
|
|
5176
|
+
return /* @__PURE__ */ jsxs16("div", { className: "vos-view-controls", children: [
|
|
5028
5177
|
/* @__PURE__ */ jsx16(
|
|
5029
5178
|
"input",
|
|
5030
5179
|
{
|
|
@@ -5036,9 +5185,9 @@ function ViewControls({
|
|
|
5036
5185
|
"aria-label": "Filter records"
|
|
5037
5186
|
}
|
|
5038
5187
|
),
|
|
5039
|
-
axes.length ? /* @__PURE__ */
|
|
5188
|
+
axes.length ? /* @__PURE__ */ jsxs16("label", { className: "vos-control", children: [
|
|
5040
5189
|
/* @__PURE__ */ jsx16("span", { children: "Group" }),
|
|
5041
|
-
/* @__PURE__ */
|
|
5190
|
+
/* @__PURE__ */ jsxs16(
|
|
5042
5191
|
"select",
|
|
5043
5192
|
{
|
|
5044
5193
|
className: "vos-input",
|
|
@@ -5051,9 +5200,9 @@ function ViewControls({
|
|
|
5051
5200
|
}
|
|
5052
5201
|
)
|
|
5053
5202
|
] }) : null,
|
|
5054
|
-
/* @__PURE__ */
|
|
5203
|
+
/* @__PURE__ */ jsxs16("label", { className: "vos-control", children: [
|
|
5055
5204
|
/* @__PURE__ */ jsx16("span", { children: "Sort" }),
|
|
5056
|
-
/* @__PURE__ */
|
|
5205
|
+
/* @__PURE__ */ jsxs16(
|
|
5057
5206
|
"select",
|
|
5058
5207
|
{
|
|
5059
5208
|
className: "vos-input",
|
|
@@ -5090,8 +5239,8 @@ function ShapedBody({
|
|
|
5090
5239
|
if (shaped.nested) {
|
|
5091
5240
|
if (shaped.nested.length === 0)
|
|
5092
5241
|
return /* @__PURE__ */ jsx16("p", { className: "vos-empty", children: "No readings in this view." });
|
|
5093
|
-
return /* @__PURE__ */ jsx16("div", { className: "vos-groups", children: shaped.nested.map((group) => /* @__PURE__ */
|
|
5094
|
-
/* @__PURE__ */
|
|
5242
|
+
return /* @__PURE__ */ jsx16("div", { className: "vos-groups", children: shaped.nested.map((group) => /* @__PURE__ */ jsxs16("section", { className: "vos-group", children: [
|
|
5243
|
+
/* @__PURE__ */ jsxs16("h3", { className: "vos-group-head", children: [
|
|
5095
5244
|
group.label,
|
|
5096
5245
|
/* @__PURE__ */ jsx16("span", { className: "vos-group-n", children: group.readings.length })
|
|
5097
5246
|
] }),
|
|
@@ -5110,8 +5259,8 @@ function ShapedBody({
|
|
|
5110
5259
|
if (shaped.groups) {
|
|
5111
5260
|
if (shaped.groups.length === 0)
|
|
5112
5261
|
return /* @__PURE__ */ jsx16("p", { className: "vos-empty", children: "No records in this view." });
|
|
5113
|
-
return /* @__PURE__ */ jsx16("div", { className: "vos-groups", children: shaped.groups.map((group) => /* @__PURE__ */
|
|
5114
|
-
/* @__PURE__ */
|
|
5262
|
+
return /* @__PURE__ */ jsx16("div", { className: "vos-groups", children: shaped.groups.map((group) => /* @__PURE__ */ jsxs16("section", { className: "vos-group", children: [
|
|
5263
|
+
/* @__PURE__ */ jsxs16("h3", { className: "vos-group-head", children: [
|
|
5115
5264
|
group.label,
|
|
5116
5265
|
/* @__PURE__ */ jsx16("span", { className: "vos-group-n", children: group.records.length })
|
|
5117
5266
|
] }),
|
|
@@ -5140,9 +5289,9 @@ function ShapedBody({
|
|
|
5140
5289
|
}
|
|
5141
5290
|
|
|
5142
5291
|
// src/next-move-surface.tsx
|
|
5143
|
-
import { useMemo as useMemo5, useState as
|
|
5292
|
+
import { useMemo as useMemo5, useState as useState12 } from "react";
|
|
5144
5293
|
import { rankNextMoves as rankNextMoves2 } from "@validation-os/core/derivation";
|
|
5145
|
-
import { Fragment as Fragment10, jsx as jsx17, jsxs as
|
|
5294
|
+
import { Fragment as Fragment10, jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5146
5295
|
var STAGES = ["Framed", "Planned", "Tested", "Known"];
|
|
5147
5296
|
var MOVE_STAGE = {
|
|
5148
5297
|
"score-impact": 0,
|
|
@@ -5163,8 +5312,8 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5163
5312
|
const experiments = useList("experiments", basePath);
|
|
5164
5313
|
const readings = useList("readings", basePath);
|
|
5165
5314
|
const decisions = useList("decisions", basePath);
|
|
5166
|
-
const [why, setWhy] =
|
|
5167
|
-
const [stepIn, setStepIn] =
|
|
5315
|
+
const [why, setWhy] = useState12(false);
|
|
5316
|
+
const [stepIn, setStepIn] = useState12(null);
|
|
5168
5317
|
const lists = [assumptions, experiments, readings, decisions];
|
|
5169
5318
|
const loading = lists.some((l) => l.loading);
|
|
5170
5319
|
const error = lists.map((l) => l.error).find(Boolean) ?? null;
|
|
@@ -5203,7 +5352,7 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5203
5352
|
return /* @__PURE__ */ jsx17(NextMoveFrame, { children: /* @__PURE__ */ jsx17("div", { className: "vos-empty", children: "Reading your beliefs\u2026" }) });
|
|
5204
5353
|
}
|
|
5205
5354
|
if (error) {
|
|
5206
|
-
return /* @__PURE__ */ jsx17(NextMoveFrame, { children: /* @__PURE__ */ jsx17("div", { className: "vos-banner vos-banner-crit", children: /* @__PURE__ */
|
|
5355
|
+
return /* @__PURE__ */ jsx17(NextMoveFrame, { children: /* @__PURE__ */ jsx17("div", { className: "vos-banner vos-banner-crit", children: /* @__PURE__ */ jsxs17("div", { className: "vos-banner-body", children: [
|
|
5207
5356
|
/* @__PURE__ */ jsx17("b", { children: "Couldn't load the workflow." }),
|
|
5208
5357
|
/* @__PURE__ */ jsx17("span", { children: error })
|
|
5209
5358
|
] }) }) });
|
|
@@ -5217,9 +5366,9 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5217
5366
|
};
|
|
5218
5367
|
const cold = coldStartFor(records);
|
|
5219
5368
|
if (cold.cold) {
|
|
5220
|
-
return /* @__PURE__ */
|
|
5369
|
+
return /* @__PURE__ */ jsxs17(NextMoveFrame, { children: [
|
|
5221
5370
|
/* @__PURE__ */ jsx17("div", { className: "vos-firstrun", children: FIRST_RUN_LINE }),
|
|
5222
|
-
/* @__PURE__ */
|
|
5371
|
+
/* @__PURE__ */ jsxs17("div", { className: "vos-card vos-cold vos-cold-next", children: [
|
|
5223
5372
|
/* @__PURE__ */ jsx17("span", { className: "vos-cold-eyebrow", children: cold.next.eyebrow }),
|
|
5224
5373
|
/* @__PURE__ */ jsx17("h2", { className: "vos-cold-headline", children: cold.next.headline }),
|
|
5225
5374
|
/* @__PURE__ */ jsx17("p", { className: "vos-cold-body", children: cold.next.body }),
|
|
@@ -5235,7 +5384,7 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5235
5384
|
] })
|
|
5236
5385
|
] });
|
|
5237
5386
|
}
|
|
5238
|
-
return /* @__PURE__ */ jsx17(NextMoveFrame, { children: /* @__PURE__ */
|
|
5387
|
+
return /* @__PURE__ */ jsx17(NextMoveFrame, { children: /* @__PURE__ */ jsxs17("div", { className: "vos-empty", children: [
|
|
5239
5388
|
"Nothing needs your attention right now \u2014 every belief is either resting on a decision or waiting on a test. Add a new belief from",
|
|
5240
5389
|
" ",
|
|
5241
5390
|
/* @__PURE__ */ jsx17(
|
|
@@ -5256,9 +5405,9 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5256
5405
|
const onDeck = rest.filter((m) => m.assumptionId !== top.assumptionId).slice(0, 3);
|
|
5257
5406
|
const topPres = movePresentation(top.move);
|
|
5258
5407
|
const topTone = riskLevel(top.risk);
|
|
5259
|
-
return /* @__PURE__ */
|
|
5408
|
+
return /* @__PURE__ */ jsxs17(NextMoveFrame, { children: [
|
|
5260
5409
|
killMoves.length > 0 && !top.killLane ? /* @__PURE__ */ jsx17(KillBanner, { count: killMoves.length, onReview: () => startStepIn(killMoves[0]) }) : null,
|
|
5261
|
-
/* @__PURE__ */
|
|
5410
|
+
/* @__PURE__ */ jsxs17("div", { className: `vos-hero vos-card${top.killLane ? " vos-hero-kill" : ""}`, children: [
|
|
5262
5411
|
/* @__PURE__ */ jsx17("span", { className: "vos-hero-eyebrow", children: top.killLane ? "Kill lane \u2014 turning against you" : "Your next move" }),
|
|
5263
5412
|
/* @__PURE__ */ jsx17(
|
|
5264
5413
|
"button",
|
|
@@ -5270,7 +5419,7 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5270
5419
|
children: top.title
|
|
5271
5420
|
}
|
|
5272
5421
|
),
|
|
5273
|
-
/* @__PURE__ */
|
|
5422
|
+
/* @__PURE__ */ jsxs17("div", { className: "vos-riskchip", "aria-label": `Risk: ${RISK_PHRASE[topTone]}`, children: [
|
|
5274
5423
|
/* @__PURE__ */ jsx17("span", { className: "vos-risk-bar", "aria-hidden": "true", children: /* @__PURE__ */ jsx17(
|
|
5275
5424
|
"i",
|
|
5276
5425
|
{
|
|
@@ -5284,7 +5433,7 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5284
5433
|
/* @__PURE__ */ jsx17("button", { type: "button", className: "vos-why", onClick: () => setWhy((w) => !w), children: why ? "Hide details" : "Why this?" })
|
|
5285
5434
|
] }),
|
|
5286
5435
|
why ? /* @__PURE__ */ jsx17(WhyPanel, { top, ranked: moves }) : null,
|
|
5287
|
-
onDeck.length > 0 ? /* @__PURE__ */
|
|
5436
|
+
onDeck.length > 0 ? /* @__PURE__ */ jsxs17("section", { className: "vos-ondeck", children: [
|
|
5288
5437
|
/* @__PURE__ */ jsx17("h3", { className: "vos-sectitle", children: "On deck" }),
|
|
5289
5438
|
onDeck.map((m) => /* @__PURE__ */ jsx17(
|
|
5290
5439
|
OnDeckRow,
|
|
@@ -5333,8 +5482,8 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5333
5482
|
] });
|
|
5334
5483
|
}
|
|
5335
5484
|
function NextMoveFrame({ children }) {
|
|
5336
|
-
return /* @__PURE__ */
|
|
5337
|
-
/* @__PURE__ */ jsx17("div", { className: "vos-head", children: /* @__PURE__ */
|
|
5485
|
+
return /* @__PURE__ */ jsxs17("div", { children: [
|
|
5486
|
+
/* @__PURE__ */ jsx17("div", { className: "vos-head", children: /* @__PURE__ */ jsxs17("div", { children: [
|
|
5338
5487
|
/* @__PURE__ */ jsx17("h1", { children: "Next move" }),
|
|
5339
5488
|
/* @__PURE__ */ jsx17("p", { children: "The single next move to make \u2014 and what's on deck." })
|
|
5340
5489
|
] }) }),
|
|
@@ -5350,14 +5499,14 @@ function ActButton({
|
|
|
5350
5499
|
if (pres.steppable) {
|
|
5351
5500
|
return /* @__PURE__ */ jsx17("button", { type: "button", className: "vos-btn vos-hero-act", onClick: onStepIn, children: pres.cta });
|
|
5352
5501
|
}
|
|
5353
|
-
return /* @__PURE__ */
|
|
5502
|
+
return /* @__PURE__ */ jsxs17("div", { className: "vos-hero-agent", children: [
|
|
5354
5503
|
/* @__PURE__ */ jsx17("span", { className: "vos-agent-note", children: "\u{1F916} Claude Code runs this off the dashboard" }),
|
|
5355
5504
|
/* @__PURE__ */ jsx17("button", { type: "button", className: "vos-btn vos-btn-ghost vos-hero-act", onClick: onReview, children: "Review on the record \u2192" })
|
|
5356
5505
|
] });
|
|
5357
5506
|
}
|
|
5358
5507
|
function KillBanner({ count, onReview }) {
|
|
5359
|
-
return /* @__PURE__ */
|
|
5360
|
-
/* @__PURE__ */
|
|
5508
|
+
return /* @__PURE__ */ jsxs17("div", { className: "vos-banner vos-banner-crit", children: [
|
|
5509
|
+
/* @__PURE__ */ jsxs17("div", { className: "vos-banner-body", children: [
|
|
5361
5510
|
/* @__PURE__ */ jsx17("b", { children: count === 1 ? "A belief has fallen into the kill lane" : `${count} beliefs have fallen into the kill lane` }),
|
|
5362
5511
|
/* @__PURE__ */ jsx17("span", { children: "Confidence \u2264 \u221250 \u2014 the evidence is against it. Kill it or test it again." })
|
|
5363
5512
|
] }),
|
|
@@ -5371,27 +5520,27 @@ function OnDeckRow({
|
|
|
5371
5520
|
}) {
|
|
5372
5521
|
const pres = movePresentation(move.move);
|
|
5373
5522
|
const tone = riskLevel(move.risk);
|
|
5374
|
-
return /* @__PURE__ */
|
|
5523
|
+
return /* @__PURE__ */ jsxs17("div", { className: "vos-ondeck-row", children: [
|
|
5375
5524
|
/* @__PURE__ */ jsx17("span", { className: "vos-risk-bar", "aria-hidden": "true", children: /* @__PURE__ */ jsx17("i", { className: `vos-fill-${tone}`, style: { width: `${riskFraction(move.risk) * 100}%` } }) }),
|
|
5376
5525
|
/* @__PURE__ */ jsx17("button", { type: "button", className: "vos-ondeck-title", onClick: onOpen, children: move.title }),
|
|
5377
5526
|
/* @__PURE__ */ jsx17("button", { type: "button", className: "vos-pill vos-pill-accent vos-ondeck-act", onClick: onAct, children: pres.pill })
|
|
5378
5527
|
] });
|
|
5379
5528
|
}
|
|
5380
5529
|
function WhyPanel({ top, ranked }) {
|
|
5381
|
-
return /* @__PURE__ */
|
|
5530
|
+
return /* @__PURE__ */ jsxs17("div", { className: "vos-why-panel vos-next-why", children: [
|
|
5382
5531
|
/* @__PURE__ */ jsx17("p", { className: "vos-why-reason", children: top.reason }),
|
|
5383
|
-
/* @__PURE__ */
|
|
5532
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
5384
5533
|
/* @__PURE__ */ jsx17("div", { className: "vos-why-section-title", children: "Where it sits" }),
|
|
5385
5534
|
/* @__PURE__ */ jsx17(StageStepper, { move: top.move })
|
|
5386
5535
|
] }),
|
|
5387
|
-
/* @__PURE__ */
|
|
5536
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
5388
5537
|
/* @__PURE__ */ jsx17("div", { className: "vos-why-section-title", children: "Why it's on top" }),
|
|
5389
|
-
/* @__PURE__ */
|
|
5538
|
+
/* @__PURE__ */ jsxs17("p", { className: "vos-why-formula", children: [
|
|
5390
5539
|
"Ranked by ",
|
|
5391
5540
|
/* @__PURE__ */ jsx17("b", { children: "Feasibility \xD7 Risk" }),
|
|
5392
5541
|
" \u2014 Risk ",
|
|
5393
5542
|
/* @__PURE__ */ jsx17("b", { children: Math.round(top.risk) }),
|
|
5394
|
-
top.feasibility ? /* @__PURE__ */
|
|
5543
|
+
top.feasibility ? /* @__PURE__ */ jsxs17(Fragment10, { children: [
|
|
5395
5544
|
" ",
|
|
5396
5545
|
"\xD7 Feasibility ",
|
|
5397
5546
|
/* @__PURE__ */ jsx17("b", { children: top.feasibility })
|
|
@@ -5400,9 +5549,9 @@ function WhyPanel({ top, ranked }) {
|
|
|
5400
5549
|
"."
|
|
5401
5550
|
] })
|
|
5402
5551
|
] }),
|
|
5403
|
-
/* @__PURE__ */
|
|
5552
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
5404
5553
|
/* @__PURE__ */ jsx17("div", { className: "vos-why-section-title", children: "The ranking" }),
|
|
5405
|
-
/* @__PURE__ */ jsx17("ol", { className: "vos-why-rank", children: ranked.slice(0, 6).map((m) => /* @__PURE__ */
|
|
5554
|
+
/* @__PURE__ */ jsx17("ol", { className: "vos-why-rank", children: ranked.slice(0, 6).map((m) => /* @__PURE__ */ jsxs17("li", { className: m.assumptionId === top.assumptionId ? "vos-why-rank-top" : "", children: [
|
|
5406
5555
|
/* @__PURE__ */ jsx17("span", { className: "vos-why-rank-title", children: m.title }),
|
|
5407
5556
|
/* @__PURE__ */ jsx17("span", { className: "vos-why-rank-score", children: Math.round(m.score) })
|
|
5408
5557
|
] }, m.assumptionId)) })
|
|
@@ -5422,7 +5571,7 @@ function StageStepper({ move }) {
|
|
|
5422
5571
|
}
|
|
5423
5572
|
|
|
5424
5573
|
// src/stage-grid-surface.tsx
|
|
5425
|
-
import { useMemo as useMemo6, useState as
|
|
5574
|
+
import { useMemo as useMemo6, useState as useState13 } from "react";
|
|
5426
5575
|
|
|
5427
5576
|
// src/stage-grid-model.ts
|
|
5428
5577
|
var STAGE_ORDER = [
|
|
@@ -5530,12 +5679,12 @@ function cellAt(view, lens, stage) {
|
|
|
5530
5679
|
}
|
|
5531
5680
|
|
|
5532
5681
|
// src/stage-grid-surface.tsx
|
|
5533
|
-
import { jsx as jsx18, jsxs as
|
|
5682
|
+
import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5534
5683
|
function StageGridSurface({ basePath, onNavigate }) {
|
|
5535
5684
|
const assumptions = useList("assumptions", basePath);
|
|
5536
5685
|
const loading = assumptions.loading;
|
|
5537
5686
|
const error = assumptions.error;
|
|
5538
|
-
const [open, setOpen] =
|
|
5687
|
+
const [open, setOpen] = useState13(null);
|
|
5539
5688
|
const view = useMemo6(
|
|
5540
5689
|
() => buildStageGrid(assumptions.records ?? []),
|
|
5541
5690
|
[assumptions.records]
|
|
@@ -5546,7 +5695,7 @@ function StageGridSurface({ basePath, onNavigate }) {
|
|
|
5546
5695
|
return /* @__PURE__ */ jsx18(StageGridFrame, { children: /* @__PURE__ */ jsx18("div", { className: "vos-empty", children: "Reading where your bets cluster\u2026" }) });
|
|
5547
5696
|
}
|
|
5548
5697
|
if (error) {
|
|
5549
|
-
return /* @__PURE__ */ jsx18(StageGridFrame, { children: /* @__PURE__ */ jsx18("div", { className: "vos-banner vos-banner-crit", children: /* @__PURE__ */
|
|
5698
|
+
return /* @__PURE__ */ jsx18(StageGridFrame, { children: /* @__PURE__ */ jsx18("div", { className: "vos-banner vos-banner-crit", children: /* @__PURE__ */ jsxs18("div", { className: "vos-banner-body", children: [
|
|
5550
5699
|
/* @__PURE__ */ jsx18("b", { children: "Couldn't load the grid." }),
|
|
5551
5700
|
/* @__PURE__ */ jsx18("span", { children: error })
|
|
5552
5701
|
] }) }) });
|
|
@@ -5558,9 +5707,9 @@ function StageGridSurface({ basePath, onNavigate }) {
|
|
|
5558
5707
|
decisions: []
|
|
5559
5708
|
});
|
|
5560
5709
|
if (cold.cold) {
|
|
5561
|
-
return /* @__PURE__ */
|
|
5710
|
+
return /* @__PURE__ */ jsxs18(StageGridFrame, { children: [
|
|
5562
5711
|
/* @__PURE__ */ jsx18("div", { className: "vos-firstrun", children: FIRST_RUN_LINE }),
|
|
5563
|
-
/* @__PURE__ */
|
|
5712
|
+
/* @__PURE__ */ jsxs18("div", { className: "vos-card vos-cold vos-cold-stage-grid", children: [
|
|
5564
5713
|
/* @__PURE__ */ jsx18("span", { className: "vos-cold-eyebrow", children: "No bets yet" }),
|
|
5565
5714
|
/* @__PURE__ */ jsx18("p", { className: "vos-cold-body", children: "The Lens \xD7 Stage grid reads your business state off where your bets cluster. Write your first belief and the grid fills in \u2014 the densest cell per row is where that part of the business is." }),
|
|
5566
5715
|
/* @__PURE__ */ jsx18(
|
|
@@ -5568,24 +5717,24 @@ function StageGridSurface({ basePath, onNavigate }) {
|
|
|
5568
5717
|
{
|
|
5569
5718
|
type: "button",
|
|
5570
5719
|
className: "vos-btn",
|
|
5571
|
-
onClick: () => onNavigate({ name: "records", register: "assumptions" }),
|
|
5720
|
+
onClick: () => onNavigate({ name: "records", register: "assumptions", view: "all" }),
|
|
5572
5721
|
children: "Write your first bet"
|
|
5573
5722
|
}
|
|
5574
5723
|
)
|
|
5575
5724
|
] })
|
|
5576
5725
|
] });
|
|
5577
5726
|
}
|
|
5578
|
-
return /* @__PURE__ */
|
|
5579
|
-
/* @__PURE__ */
|
|
5580
|
-
/* @__PURE__ */ jsx18("div", { className: "vos-stage-grid-scroll", children: /* @__PURE__ */
|
|
5581
|
-
/* @__PURE__ */ jsx18("thead", { children: /* @__PURE__ */
|
|
5727
|
+
return /* @__PURE__ */ jsxs18(StageGridFrame, { total: view.total, onRefresh: refresh, onNavigate, children: [
|
|
5728
|
+
/* @__PURE__ */ jsxs18("div", { className: "vos-card vos-stage-grid-card", children: [
|
|
5729
|
+
/* @__PURE__ */ jsx18("div", { className: "vos-stage-grid-scroll", children: /* @__PURE__ */ jsxs18("table", { className: "vos-stage-grid", role: "grid", "aria-label": "Lens \xD7 Stage heatmap", children: [
|
|
5730
|
+
/* @__PURE__ */ jsx18("thead", { children: /* @__PURE__ */ jsxs18("tr", { children: [
|
|
5582
5731
|
/* @__PURE__ */ jsx18("th", { scope: "col", className: "vos-stage-grid-corner", children: "Lens \u2193 / Stage \u2192" }),
|
|
5583
|
-
view.stages.map((stage) => /* @__PURE__ */
|
|
5732
|
+
view.stages.map((stage) => /* @__PURE__ */ jsxs18("th", { scope: "col", className: "vos-stage-grid-col", children: [
|
|
5584
5733
|
/* @__PURE__ */ jsx18("span", { className: "vos-stage-grid-stagename", children: stage }),
|
|
5585
5734
|
/* @__PURE__ */ jsx18("span", { className: "vos-stage-grid-stagegloss", children: STAGE_GLOSS[stage] })
|
|
5586
5735
|
] }, stage))
|
|
5587
5736
|
] }) }),
|
|
5588
|
-
/* @__PURE__ */ jsx18("tbody", { children: view.lenses.map((lens) => /* @__PURE__ */
|
|
5737
|
+
/* @__PURE__ */ jsx18("tbody", { children: view.lenses.map((lens) => /* @__PURE__ */ jsxs18("tr", { children: [
|
|
5589
5738
|
/* @__PURE__ */ jsx18("th", { scope: "row", className: "vos-stage-grid-rowhead", children: lens }),
|
|
5590
5739
|
view.stages.map((stage) => {
|
|
5591
5740
|
const cell = cellAt(view, lens, stage);
|
|
@@ -5607,7 +5756,8 @@ function StageGridSurface({ basePath, onNavigate }) {
|
|
|
5607
5756
|
{
|
|
5608
5757
|
cell: open,
|
|
5609
5758
|
onClose: () => setOpen(null),
|
|
5610
|
-
onOpenRecord: openRecord
|
|
5759
|
+
onOpenRecord: openRecord,
|
|
5760
|
+
onNavigate
|
|
5611
5761
|
}
|
|
5612
5762
|
)
|
|
5613
5763
|
] });
|
|
@@ -5615,16 +5765,17 @@ function StageGridSurface({ basePath, onNavigate }) {
|
|
|
5615
5765
|
function StageGridFrame({
|
|
5616
5766
|
total,
|
|
5617
5767
|
onRefresh,
|
|
5768
|
+
onNavigate,
|
|
5618
5769
|
children
|
|
5619
5770
|
}) {
|
|
5620
|
-
return /* @__PURE__ */
|
|
5621
|
-
/* @__PURE__ */
|
|
5622
|
-
/* @__PURE__ */
|
|
5771
|
+
return /* @__PURE__ */ jsxs18("div", { children: [
|
|
5772
|
+
/* @__PURE__ */ jsxs18("div", { className: "vos-head", children: [
|
|
5773
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
5623
5774
|
/* @__PURE__ */ jsx18("h1", { children: "Lens \xD7 Stage \u2014 where your bets cluster" }),
|
|
5624
5775
|
/* @__PURE__ */ jsx18("p", { children: "Every belief cross-tabbed by the actor it's about (Lens) and the kind of response it tests (Stage). The grid is the filter; Risk is the rank." })
|
|
5625
5776
|
] }),
|
|
5626
5777
|
/* @__PURE__ */ jsx18("div", { className: "vos-spacer" }),
|
|
5627
|
-
total !== void 0 ? /* @__PURE__ */
|
|
5778
|
+
total !== void 0 ? /* @__PURE__ */ jsxs18("span", { className: "vos-hint vos-stage-grid-total", children: [
|
|
5628
5779
|
total,
|
|
5629
5780
|
" ",
|
|
5630
5781
|
total === 1 ? "belief" : "beliefs"
|
|
@@ -5637,6 +5788,15 @@ function StageGridFrame({
|
|
|
5637
5788
|
onClick: onRefresh,
|
|
5638
5789
|
children: "\u21BB Refresh"
|
|
5639
5790
|
}
|
|
5791
|
+
) : null,
|
|
5792
|
+
onNavigate ? /* @__PURE__ */ jsx18(
|
|
5793
|
+
"button",
|
|
5794
|
+
{
|
|
5795
|
+
type: "button",
|
|
5796
|
+
className: "vos-btn vos-btn-ghost",
|
|
5797
|
+
onClick: () => onNavigate({ name: "records", register: "assumptions", view: "all" }),
|
|
5798
|
+
children: "View all \u2192"
|
|
5799
|
+
}
|
|
5640
5800
|
) : null
|
|
5641
5801
|
] }),
|
|
5642
5802
|
/* @__PURE__ */ jsx18("div", { className: "vos-stage-grid-host", children })
|
|
@@ -5674,24 +5834,41 @@ function StageCell({
|
|
|
5674
5834
|
function CellDrawer({
|
|
5675
5835
|
cell,
|
|
5676
5836
|
onClose,
|
|
5677
|
-
onOpenRecord
|
|
5837
|
+
onOpenRecord,
|
|
5838
|
+
onNavigate
|
|
5678
5839
|
}) {
|
|
5679
|
-
return /* @__PURE__ */
|
|
5840
|
+
return /* @__PURE__ */ jsxs18(
|
|
5680
5841
|
DrawerShell,
|
|
5681
5842
|
{
|
|
5682
5843
|
open: cell !== null,
|
|
5683
5844
|
onClose,
|
|
5684
5845
|
ariaLabel: cell ? `${cell.lens} \xD7 ${cell.stage} \u2014 ${cell.count} ${cell.count === 1 ? "belief" : "beliefs"}` : "Cell drill-through",
|
|
5685
5846
|
children: [
|
|
5686
|
-
/* @__PURE__ */
|
|
5687
|
-
/* @__PURE__ */
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5847
|
+
/* @__PURE__ */ jsxs18("header", { className: "vos-drawer-header", children: [
|
|
5848
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
5849
|
+
/* @__PURE__ */ jsx18("p", { className: "vos-drawer-eyebrow", children: "Lens \xD7 Stage" }),
|
|
5850
|
+
/* @__PURE__ */ jsxs18("h2", { className: "vos-drawer-title", children: [
|
|
5851
|
+
cell?.lens,
|
|
5852
|
+
" \xD7 ",
|
|
5853
|
+
cell?.stage
|
|
5854
|
+
] }),
|
|
5855
|
+
/* @__PURE__ */ jsx18("p", { className: "vos-hint", children: cell && cell.count > 0 ? `${cell.count} ${cell.count === 1 ? "belief" : "beliefs"}, ranked by Risk \u2014 riskiest first.` : "No beliefs in this cell." })
|
|
5692
5856
|
] }),
|
|
5693
|
-
|
|
5694
|
-
|
|
5857
|
+
cell && cell.stage !== "\u2014" && onNavigate && /* @__PURE__ */ jsx18(
|
|
5858
|
+
"button",
|
|
5859
|
+
{
|
|
5860
|
+
type: "button",
|
|
5861
|
+
className: "vos-btn vos-btn-secondary",
|
|
5862
|
+
onClick: () => onNavigate({
|
|
5863
|
+
name: "records",
|
|
5864
|
+
register: "assumptions",
|
|
5865
|
+
lens: cell.lens === "\u2014" ? void 0 : cell.lens,
|
|
5866
|
+
stage: cell.stage
|
|
5867
|
+
}),
|
|
5868
|
+
children: "Open in table \u2192"
|
|
5869
|
+
}
|
|
5870
|
+
)
|
|
5871
|
+
] }),
|
|
5695
5872
|
cell && cell.count > 0 ? /* @__PURE__ */ jsx18("div", { className: "vos-stage-grid-drawer-body", children: /* @__PURE__ */ jsx18(
|
|
5696
5873
|
RegisterTable,
|
|
5697
5874
|
{
|
|
@@ -5710,8 +5887,13 @@ var DEFAULT_ROUTE = { name: "next" };
|
|
|
5710
5887
|
function parseRoute(hash, registers) {
|
|
5711
5888
|
const h = hash.replace(/^#\/?/, "");
|
|
5712
5889
|
if (!h) return DEFAULT_ROUTE;
|
|
5713
|
-
const
|
|
5890
|
+
const [pathPart = "", queryPart = ""] = h.split("?");
|
|
5891
|
+
const parts = pathPart.split("/");
|
|
5714
5892
|
const head = parts[0] ?? "";
|
|
5893
|
+
const query = new URLSearchParams(queryPart ?? "");
|
|
5894
|
+
const lens = query.get("lens") ?? void 0;
|
|
5895
|
+
const stage = query.get("stage") ?? void 0;
|
|
5896
|
+
const view = query.get("view") ?? void 0;
|
|
5715
5897
|
if (head === "next") return { name: "next" };
|
|
5716
5898
|
if (head === "pipeline") return { name: "pipeline" };
|
|
5717
5899
|
if (head === "stage-grid") return { name: "stage-grid" };
|
|
@@ -5720,14 +5902,20 @@ function parseRoute(hash, registers) {
|
|
|
5720
5902
|
return id ? { name: "record", id } : DEFAULT_ROUTE;
|
|
5721
5903
|
}
|
|
5722
5904
|
if (registers.includes(head)) {
|
|
5723
|
-
return { name: "records", register: head };
|
|
5905
|
+
return { name: "records", register: head, lens, stage, view };
|
|
5724
5906
|
}
|
|
5725
5907
|
return DEFAULT_ROUTE;
|
|
5726
5908
|
}
|
|
5727
5909
|
function formatRoute(route) {
|
|
5728
5910
|
switch (route.name) {
|
|
5729
|
-
case "records":
|
|
5730
|
-
|
|
5911
|
+
case "records": {
|
|
5912
|
+
const q = new URLSearchParams();
|
|
5913
|
+
if (route.lens) q.set("lens", route.lens);
|
|
5914
|
+
if (route.stage) q.set("stage", route.stage);
|
|
5915
|
+
if (route.view) q.set("view", route.view);
|
|
5916
|
+
const qs = q.toString();
|
|
5917
|
+
return qs ? `${route.register}?${qs}` : route.register;
|
|
5918
|
+
}
|
|
5731
5919
|
case "record":
|
|
5732
5920
|
return `record/${route.id}`;
|
|
5733
5921
|
default:
|
|
@@ -5736,7 +5924,7 @@ function formatRoute(route) {
|
|
|
5736
5924
|
}
|
|
5737
5925
|
|
|
5738
5926
|
// src/sidebar-nav.tsx
|
|
5739
|
-
import { jsx as jsx19, jsxs as
|
|
5927
|
+
import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5740
5928
|
function SidebarNav({
|
|
5741
5929
|
route,
|
|
5742
5930
|
onNavigate,
|
|
@@ -5745,12 +5933,12 @@ function SidebarNav({
|
|
|
5745
5933
|
registers
|
|
5746
5934
|
}) {
|
|
5747
5935
|
const activeRegister = route.name === "records" ? route.register : null;
|
|
5748
|
-
return /* @__PURE__ */
|
|
5749
|
-
/* @__PURE__ */
|
|
5936
|
+
return /* @__PURE__ */ jsxs19("nav", { className: "vos-nav", "aria-label": "Navigation", children: [
|
|
5937
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
5750
5938
|
/* @__PURE__ */ jsx19("div", { className: "vos-nav-group", children: "Workflow" }),
|
|
5751
5939
|
WORKFLOW_NAV.map((item) => {
|
|
5752
5940
|
const active = route.name === item.route;
|
|
5753
|
-
return /* @__PURE__ */
|
|
5941
|
+
return /* @__PURE__ */ jsxs19(
|
|
5754
5942
|
"button",
|
|
5755
5943
|
{
|
|
5756
5944
|
type: "button",
|
|
@@ -5767,11 +5955,11 @@ function SidebarNav({
|
|
|
5767
5955
|
);
|
|
5768
5956
|
})
|
|
5769
5957
|
] }),
|
|
5770
|
-
/* @__PURE__ */
|
|
5958
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
5771
5959
|
/* @__PURE__ */ jsx19("div", { className: "vos-nav-group", children: "Records" }),
|
|
5772
5960
|
registers.map((register) => {
|
|
5773
5961
|
const active = register === activeRegister;
|
|
5774
|
-
return /* @__PURE__ */
|
|
5962
|
+
return /* @__PURE__ */ jsxs19(
|
|
5775
5963
|
"button",
|
|
5776
5964
|
{
|
|
5777
5965
|
type: "button",
|
|
@@ -5800,12 +5988,12 @@ function SidebarNav({
|
|
|
5800
5988
|
}
|
|
5801
5989
|
|
|
5802
5990
|
// src/use-counts.ts
|
|
5803
|
-
import { useCallback as useCallback4, useEffect as useEffect5, useMemo as useMemo7, useState as
|
|
5991
|
+
import { useCallback as useCallback4, useEffect as useEffect5, useMemo as useMemo7, useState as useState14 } from "react";
|
|
5804
5992
|
function useCounts(basePath = "/api") {
|
|
5805
|
-
const [counts, setCounts] =
|
|
5806
|
-
const [loading, setLoading] =
|
|
5807
|
-
const [error, setError] =
|
|
5808
|
-
const [tick, setTick] =
|
|
5993
|
+
const [counts, setCounts] = useState14(null);
|
|
5994
|
+
const [loading, setLoading] = useState14(true);
|
|
5995
|
+
const [error, setError] = useState14(null);
|
|
5996
|
+
const [tick, setTick] = useState14(0);
|
|
5809
5997
|
useEffect5(() => {
|
|
5810
5998
|
let live = true;
|
|
5811
5999
|
setLoading(true);
|
|
@@ -5833,7 +6021,7 @@ function useNeedsHuman(basePath = "/api") {
|
|
|
5833
6021
|
const assumptions = useList("assumptions", basePath);
|
|
5834
6022
|
const experiments = useList("experiments", basePath);
|
|
5835
6023
|
const decisions = useList("decisions", basePath);
|
|
5836
|
-
const [asOf] =
|
|
6024
|
+
const [asOf] = useState14(() => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10));
|
|
5837
6025
|
return useMemo7(() => {
|
|
5838
6026
|
const counts = needsHumanCounts({
|
|
5839
6027
|
asOf,
|
|
@@ -5845,12 +6033,13 @@ function useNeedsHuman(basePath = "/api") {
|
|
|
5845
6033
|
if (counts.killLane > 0) byRegister.assumptions = counts.killLane;
|
|
5846
6034
|
if (counts.overdue > 0) byRegister.experiments = counts.overdue;
|
|
5847
6035
|
if (counts.inTension > 0) byRegister.decisions = counts.inTension;
|
|
5848
|
-
|
|
6036
|
+
const liveExperimentCount = experiments.records ? liveExperiments(experiments.records).length : null;
|
|
6037
|
+
return { counts, byRegister, liveExperimentCount };
|
|
5849
6038
|
}, [asOf, assumptions.records, experiments.records, decisions.records]);
|
|
5850
6039
|
}
|
|
5851
6040
|
|
|
5852
6041
|
// src/dashboard-app.tsx
|
|
5853
|
-
import { jsx as jsx20, jsxs as
|
|
6042
|
+
import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5854
6043
|
function initialsOf(name) {
|
|
5855
6044
|
const parts = name.trim().split(/\s+/);
|
|
5856
6045
|
const first = parts[0]?.[0] ?? "";
|
|
@@ -5866,11 +6055,12 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
5866
6055
|
user,
|
|
5867
6056
|
registers = REGISTER_ORDER
|
|
5868
6057
|
} = config;
|
|
5869
|
-
const [route, setRoute] =
|
|
6058
|
+
const [route, setRoute] = useState15(
|
|
5870
6059
|
() => typeof window === "undefined" ? { name: "next" } : parseRoute(window.location.hash, registers)
|
|
5871
6060
|
);
|
|
5872
6061
|
const { counts } = useCounts(basePath);
|
|
5873
|
-
const { byRegister: needsHuman } = useNeedsHuman(basePath);
|
|
6062
|
+
const { byRegister: needsHuman, liveExperimentCount } = useNeedsHuman(basePath);
|
|
6063
|
+
const navCounts = counts && liveExperimentCount !== null ? { ...counts, experiments: liveExperimentCount } : counts;
|
|
5874
6064
|
useEffect6(() => {
|
|
5875
6065
|
if (typeof window === "undefined") return;
|
|
5876
6066
|
const onHash = () => setRoute(parseRoute(window.location.hash, registers));
|
|
@@ -5892,27 +6082,27 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
5892
6082
|
}, []);
|
|
5893
6083
|
const brandName = branding?.name ?? "Validation-OS";
|
|
5894
6084
|
const brandMark = branding?.initials ?? "V";
|
|
5895
|
-
return /* @__PURE__ */
|
|
5896
|
-
/* @__PURE__ */
|
|
6085
|
+
return /* @__PURE__ */ jsxs20("div", { className: "vos-app", children: [
|
|
6086
|
+
/* @__PURE__ */ jsxs20("div", { className: "vos-brand", children: [
|
|
5897
6087
|
/* @__PURE__ */ jsx20("span", { className: "vos-brand-dot", children: branding?.logoUrl ? /* @__PURE__ */ jsx20("img", { src: branding.logoUrl, alt: "" }) : brandMark }),
|
|
5898
6088
|
" ",
|
|
5899
6089
|
brandName
|
|
5900
6090
|
] }),
|
|
5901
|
-
/* @__PURE__ */
|
|
5902
|
-
backendLabel ? /* @__PURE__ */
|
|
6091
|
+
/* @__PURE__ */ jsxs20("div", { className: "vos-topbar", children: [
|
|
6092
|
+
backendLabel ? /* @__PURE__ */ jsxs20("div", { className: "vos-backend", children: [
|
|
5903
6093
|
/* @__PURE__ */ jsx20("span", { className: "vos-live-dot" }),
|
|
5904
6094
|
" Backend: ",
|
|
5905
6095
|
/* @__PURE__ */ jsx20("b", { children: backendLabel })
|
|
5906
6096
|
] }) : null,
|
|
5907
|
-
agentLabel ? /* @__PURE__ */
|
|
6097
|
+
agentLabel ? /* @__PURE__ */ jsxs20("span", { className: "vos-hint", children: [
|
|
5908
6098
|
"Agent: ",
|
|
5909
6099
|
/* @__PURE__ */ jsx20("b", { style: { color: "var(--vos-text)" }, children: agentLabel })
|
|
5910
6100
|
] }) : null,
|
|
5911
6101
|
/* @__PURE__ */ jsx20("div", { className: "vos-spacer" }),
|
|
5912
6102
|
/* @__PURE__ */ jsx20("button", { type: "button", className: "vos-iconbtn", onClick: toggleTheme, children: "\u25D0 Theme" }),
|
|
5913
|
-
user?.name ? /* @__PURE__ */
|
|
6103
|
+
user?.name ? /* @__PURE__ */ jsxs20("div", { className: "vos-user", children: [
|
|
5914
6104
|
/* @__PURE__ */ jsx20("span", { className: "vos-avatar", children: initialsOf(user.name) }),
|
|
5915
|
-
/* @__PURE__ */
|
|
6105
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
5916
6106
|
/* @__PURE__ */ jsx20("span", { className: "vos-user-name", children: user.name }),
|
|
5917
6107
|
user.caption ? /* @__PURE__ */ jsx20("small", { children: user.caption }) : null
|
|
5918
6108
|
] })
|
|
@@ -5923,20 +6113,27 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
5923
6113
|
{
|
|
5924
6114
|
route,
|
|
5925
6115
|
onNavigate: navigate,
|
|
5926
|
-
counts,
|
|
6116
|
+
counts: navCounts,
|
|
5927
6117
|
needsHuman,
|
|
5928
6118
|
registers
|
|
5929
6119
|
}
|
|
5930
6120
|
),
|
|
5931
|
-
/* @__PURE__ */ jsx20("main", { className: "vos-main", children: route.name === "records" ?
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
6121
|
+
/* @__PURE__ */ jsx20("main", { className: "vos-main", children: route.name === "records" ? (
|
|
6122
|
+
// The assumptions register renders the grid as its landing surface
|
|
6123
|
+
// (#assumptions with no query); cell-click and "view all" drill into
|
|
6124
|
+
// the filtered/unfiltered table by setting lens/stage/view on the route.
|
|
6125
|
+
route.register === "assumptions" && !route.lens && !route.stage && route.view !== "all" ? /* @__PURE__ */ jsx20(StageGridSurface, { basePath, onNavigate: navigate }, "stage-grid") : /* @__PURE__ */ jsx20(
|
|
6126
|
+
RegisterBrowser,
|
|
6127
|
+
{
|
|
6128
|
+
register: route.register,
|
|
6129
|
+
basePath,
|
|
6130
|
+
subtitle: REGISTER_SUBTITLE[route.register],
|
|
6131
|
+
onOpenRecord: (id) => navigate({ name: "record", id }),
|
|
6132
|
+
lens: route.lens,
|
|
6133
|
+
stage: route.stage
|
|
6134
|
+
},
|
|
6135
|
+
route.register + (route.lens ?? "") + (route.stage ?? "") + (route.view ?? "")
|
|
6136
|
+
)
|
|
5940
6137
|
) : route.name === "record" ? /* @__PURE__ */ jsx20(
|
|
5941
6138
|
RecordPage,
|
|
5942
6139
|
{
|
|
@@ -5976,15 +6173,15 @@ function composeConnectCommand(input) {
|
|
|
5976
6173
|
}
|
|
5977
6174
|
|
|
5978
6175
|
// src/connect-claude-code.tsx
|
|
5979
|
-
import { useState as
|
|
5980
|
-
import { jsx as jsx21, jsxs as
|
|
6176
|
+
import { useState as useState16 } from "react";
|
|
6177
|
+
import { jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5981
6178
|
function ConnectClaudeCode({
|
|
5982
6179
|
apiBaseUrl,
|
|
5983
6180
|
tokenEnv,
|
|
5984
6181
|
mintToken
|
|
5985
6182
|
}) {
|
|
5986
|
-
const [state, setState] =
|
|
5987
|
-
const [copied, setCopied] =
|
|
6183
|
+
const [state, setState] = useState16({ phase: "idle" });
|
|
6184
|
+
const [copied, setCopied] = useState16(false);
|
|
5988
6185
|
async function generate() {
|
|
5989
6186
|
setState({ phase: "minting" });
|
|
5990
6187
|
setCopied(false);
|
|
@@ -6006,15 +6203,15 @@ function ConnectClaudeCode({
|
|
|
6006
6203
|
} catch {
|
|
6007
6204
|
}
|
|
6008
6205
|
}
|
|
6009
|
-
return /* @__PURE__ */
|
|
6010
|
-
/* @__PURE__ */ jsx21("div", { className: "vos-head", children: /* @__PURE__ */
|
|
6206
|
+
return /* @__PURE__ */ jsxs21("div", { children: [
|
|
6207
|
+
/* @__PURE__ */ jsx21("div", { className: "vos-head", children: /* @__PURE__ */ jsxs21("div", { children: [
|
|
6011
6208
|
/* @__PURE__ */ jsx21("h1", { children: "Connect Claude Code" }),
|
|
6012
6209
|
/* @__PURE__ */ jsx21("p", { children: "Run the validation skills against this register from your own Claude Code \u2014 no repo, no keys to hunt down." })
|
|
6013
6210
|
] }) }),
|
|
6014
|
-
/* @__PURE__ */
|
|
6211
|
+
/* @__PURE__ */ jsxs21("ol", { className: "vos-hint", style: { lineHeight: 1.8 }, children: [
|
|
6015
6212
|
/* @__PURE__ */ jsx21("li", { children: "Generate your personal connection command below." }),
|
|
6016
6213
|
/* @__PURE__ */ jsx21("li", { children: "Paste it into a terminal in the workspace you'll run the skills in." }),
|
|
6017
|
-
/* @__PURE__ */
|
|
6214
|
+
/* @__PURE__ */ jsxs21("li", { children: [
|
|
6018
6215
|
"The command carries a token tied to ",
|
|
6019
6216
|
/* @__PURE__ */ jsx21("strong", { children: "you" }),
|
|
6020
6217
|
" \u2014 anything you write lands under your name. Don't share it."
|
|
@@ -6031,9 +6228,9 @@ function ConnectClaudeCode({
|
|
|
6031
6228
|
}
|
|
6032
6229
|
) : null,
|
|
6033
6230
|
state.phase === "error" ? /* @__PURE__ */ jsx21("p", { className: "vos-hint", role: "alert", children: state.message }) : null,
|
|
6034
|
-
state.phase === "ready" ? /* @__PURE__ */
|
|
6231
|
+
state.phase === "ready" ? /* @__PURE__ */ jsxs21("div", { children: [
|
|
6035
6232
|
/* @__PURE__ */ jsx21("pre", { className: "vos-code", "aria-label": "Connection command", children: state.command }),
|
|
6036
|
-
/* @__PURE__ */
|
|
6233
|
+
/* @__PURE__ */ jsxs21("div", { style: { display: "flex", gap: 8 }, children: [
|
|
6037
6234
|
/* @__PURE__ */ jsx21(
|
|
6038
6235
|
"button",
|
|
6039
6236
|
{
|
|
@@ -6051,14 +6248,14 @@ function ConnectClaudeCode({
|
|
|
6051
6248
|
}
|
|
6052
6249
|
|
|
6053
6250
|
// src/surface-placeholder.tsx
|
|
6054
|
-
import { jsx as jsx22, jsxs as
|
|
6251
|
+
import { jsx as jsx22, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6055
6252
|
function SurfacePlaceholder({
|
|
6056
6253
|
title,
|
|
6057
6254
|
subtitle,
|
|
6058
6255
|
detail
|
|
6059
6256
|
}) {
|
|
6060
|
-
return /* @__PURE__ */
|
|
6061
|
-
/* @__PURE__ */ jsx22("div", { className: "vos-head", children: /* @__PURE__ */
|
|
6257
|
+
return /* @__PURE__ */ jsxs22("div", { children: [
|
|
6258
|
+
/* @__PURE__ */ jsx22("div", { className: "vos-head", children: /* @__PURE__ */ jsxs22("div", { children: [
|
|
6062
6259
|
/* @__PURE__ */ jsx22("h1", { children: title }),
|
|
6063
6260
|
/* @__PURE__ */ jsx22("p", { children: subtitle })
|
|
6064
6261
|
] }) }),
|
|
@@ -6067,7 +6264,7 @@ function SurfacePlaceholder({
|
|
|
6067
6264
|
}
|
|
6068
6265
|
|
|
6069
6266
|
// src/register-counts.tsx
|
|
6070
|
-
import { jsx as jsx23, jsxs as
|
|
6267
|
+
import { jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6071
6268
|
function RegisterCounts({
|
|
6072
6269
|
counts,
|
|
6073
6270
|
caption,
|
|
@@ -6077,7 +6274,7 @@ function RegisterCounts({
|
|
|
6077
6274
|
const registers = REGISTER_ORDER.filter(
|
|
6078
6275
|
(r) => counts[r] !== void 0
|
|
6079
6276
|
);
|
|
6080
|
-
return /* @__PURE__ */
|
|
6277
|
+
return /* @__PURE__ */ jsxs23("section", { "aria-label": "Register counts", children: [
|
|
6081
6278
|
/* @__PURE__ */ jsx23("div", { className: "vos-tile-grid", children: registers.map((register) => /* @__PURE__ */ jsx23(
|
|
6082
6279
|
StatTile,
|
|
6083
6280
|
{
|