@validation-os/dashboard 0.11.0 → 0.13.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 +13 -5
- package/dist/index.js +383 -240
- 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 = {
|
|
@@ -74,6 +74,24 @@ function isArchivedExperiment(e) {
|
|
|
74
74
|
function liveExperiments(experiments) {
|
|
75
75
|
return experiments.filter((e) => !isArchivedExperiment(e));
|
|
76
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
|
+
}
|
|
77
95
|
function str(v) {
|
|
78
96
|
return typeof v === "string" && v !== "" ? v : null;
|
|
79
97
|
}
|
|
@@ -1061,7 +1079,7 @@ function Meter({
|
|
|
1061
1079
|
}
|
|
1062
1080
|
|
|
1063
1081
|
// src/record-page.tsx
|
|
1064
|
-
import { useMemo, useState as
|
|
1082
|
+
import { useMemo, useState as useState6 } from "react";
|
|
1065
1083
|
import { REGISTERS } from "@validation-os/core";
|
|
1066
1084
|
|
|
1067
1085
|
// src/columns.ts
|
|
@@ -1103,10 +1121,17 @@ var COLUMNS = {
|
|
|
1103
1121
|
{ key: "Title", header: "Reading" },
|
|
1104
1122
|
{ key: "Source", header: "Source" },
|
|
1105
1123
|
{ key: "Date", header: "Date" },
|
|
1106
|
-
//
|
|
1107
|
-
//
|
|
1108
|
-
//
|
|
1109
|
-
//
|
|
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.
|
|
1110
1135
|
{
|
|
1111
1136
|
key: "body",
|
|
1112
1137
|
header: "Quote",
|
|
@@ -3037,12 +3062,59 @@ function needsHumanCounts(ctx) {
|
|
|
3037
3062
|
}
|
|
3038
3063
|
|
|
3039
3064
|
// src/markdown.tsx
|
|
3040
|
-
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,} *$/;
|
|
3041
3068
|
function Markdown({ text }) {
|
|
3042
3069
|
const trimmed = (text ?? "").trim();
|
|
3043
3070
|
if (!trimmed) return null;
|
|
3044
3071
|
return /* @__PURE__ */ jsx9("div", { className: "vos-md", children: renderBlocks(trimmed) });
|
|
3045
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
|
+
}
|
|
3046
3118
|
function renderBlocks(text) {
|
|
3047
3119
|
const lines = text.replace(/\r\n?/g, "\n").split("\n");
|
|
3048
3120
|
const out = [];
|
|
@@ -3068,6 +3140,11 @@ function renderBlocks(text) {
|
|
|
3068
3140
|
);
|
|
3069
3141
|
continue;
|
|
3070
3142
|
}
|
|
3143
|
+
if (HR_RE.test(line)) {
|
|
3144
|
+
out.push(/* @__PURE__ */ jsx9("hr", { className: "vos-md-hr" }, key++));
|
|
3145
|
+
i += 1;
|
|
3146
|
+
continue;
|
|
3147
|
+
}
|
|
3071
3148
|
const heading = line.match(/^(#{1,6})\s+(.*)$/);
|
|
3072
3149
|
if (heading) {
|
|
3073
3150
|
const level = heading[1].length;
|
|
@@ -3110,7 +3187,7 @@ function renderBlocks(text) {
|
|
|
3110
3187
|
continue;
|
|
3111
3188
|
}
|
|
3112
3189
|
const para = [];
|
|
3113
|
-
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])) {
|
|
3114
3191
|
para.push(lines[i]);
|
|
3115
3192
|
i += 1;
|
|
3116
3193
|
}
|
|
@@ -3202,6 +3279,11 @@ function headerPills(register, record, related = {}, options = {}) {
|
|
|
3202
3279
|
pills.push({ label: "Overdue", tone: "crit" });
|
|
3203
3280
|
} else if (register === "decisions") {
|
|
3204
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" });
|
|
3205
3287
|
}
|
|
3206
3288
|
return pills;
|
|
3207
3289
|
}
|
|
@@ -3293,7 +3375,10 @@ function leadingMeters(register, record) {
|
|
|
3293
3375
|
}
|
|
3294
3376
|
var HUMAN_FIELDS = {
|
|
3295
3377
|
assumptions: [{ key: "Scoring justification", label: "Scoring justification" }],
|
|
3296
|
-
|
|
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: [],
|
|
3297
3382
|
decisions: [
|
|
3298
3383
|
{ key: "Statement", label: "Statement" },
|
|
3299
3384
|
{ key: "Unanimity justification", label: "Unanimity justification" }
|
|
@@ -3316,14 +3401,27 @@ function readingBeliefVerdicts(reading, assumptions = []) {
|
|
|
3316
3401
|
assumptionId: b.assumptionId,
|
|
3317
3402
|
title: hit ? primaryLabel(hit) : b.assumptionId,
|
|
3318
3403
|
linked: hit != null,
|
|
3319
|
-
rung: b.Rung ?? null,
|
|
3320
3404
|
result: b.Result ?? null,
|
|
3321
3405
|
strength,
|
|
3322
|
-
magnitudeBand: b.magnitudeBand ?? null,
|
|
3323
3406
|
justification: typeof b["Grading justification"] === "string" ? b["Grading justification"] : ""
|
|
3324
3407
|
};
|
|
3325
3408
|
});
|
|
3326
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
|
+
}
|
|
3327
3425
|
function scoreChip(register, record) {
|
|
3328
3426
|
if (register === "assumptions") {
|
|
3329
3427
|
const c = derivedNum(record, "confidence") ?? 0;
|
|
@@ -3474,12 +3572,36 @@ function buildRecordPage(register, record, related = {}, options = {}) {
|
|
|
3474
3572
|
}
|
|
3475
3573
|
|
|
3476
3574
|
// src/belief-verdicts.tsx
|
|
3477
|
-
import { jsx as jsx10, jsxs as
|
|
3575
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3478
3576
|
function resultClass(result) {
|
|
3479
3577
|
if (result === "Validated") return "vos-pill vos-pill-good";
|
|
3480
3578
|
if (result === "Invalidated") return "vos-pill vos-pill-crit";
|
|
3481
3579
|
return "vos-pill vos-pill-neutral";
|
|
3482
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
|
+
}
|
|
3483
3605
|
function BeliefVerdicts({
|
|
3484
3606
|
reading,
|
|
3485
3607
|
assumptions,
|
|
@@ -3489,33 +3611,40 @@ function BeliefVerdicts({
|
|
|
3489
3611
|
if (verdicts.length === 0) {
|
|
3490
3612
|
return /* @__PURE__ */ jsx10("p", { className: "vos-hint", children: "This reading grades no beliefs yet." });
|
|
3491
3613
|
}
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
children:
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
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
|
+
] });
|
|
3515
3644
|
}
|
|
3516
3645
|
|
|
3517
3646
|
// src/record-page.tsx
|
|
3518
|
-
import { Fragment as Fragment8, jsx as jsx11, jsxs as
|
|
3647
|
+
import { Fragment as Fragment8, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3519
3648
|
var TAB_LABEL = {
|
|
3520
3649
|
overview: "Overview",
|
|
3521
3650
|
evidence: "Evidence",
|
|
@@ -3542,8 +3671,8 @@ function RecordPage({
|
|
|
3542
3671
|
decisions: useList("decisions", basePath),
|
|
3543
3672
|
glossary: useList("glossary", basePath)
|
|
3544
3673
|
};
|
|
3545
|
-
const [tab, setTab] =
|
|
3546
|
-
const [asOf] =
|
|
3674
|
+
const [tab, setTab] = useState6("overview");
|
|
3675
|
+
const [asOf] = useState6(() => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10));
|
|
3547
3676
|
const anyLoading = REGISTERS.some((r) => lists[r].loading && !lists[r].records);
|
|
3548
3677
|
const related = {
|
|
3549
3678
|
assumptions: lists.assumptions.records ?? [],
|
|
@@ -3584,9 +3713,9 @@ function RecordPage({
|
|
|
3584
3713
|
};
|
|
3585
3714
|
const terms = toGlossaryTerms(related.glossary ?? []);
|
|
3586
3715
|
const openTerm = (id) => onNavigate({ name: "record", id });
|
|
3587
|
-
const [editing, setEditing] =
|
|
3588
|
-
const [draft, setDraft] =
|
|
3589
|
-
const [baseline, setBaseline] =
|
|
3716
|
+
const [editing, setEditing] = useState6(false);
|
|
3717
|
+
const [draft, setDraft] = useState6({});
|
|
3718
|
+
const [baseline, setBaseline] = useState6(null);
|
|
3590
3719
|
const { save, saving, conflict, error: saveError, reset } = useUpdate(
|
|
3591
3720
|
register ?? backRegister,
|
|
3592
3721
|
basePath
|
|
@@ -3636,8 +3765,8 @@ function RecordPage({
|
|
|
3636
3765
|
onReload: reloadLatest,
|
|
3637
3766
|
onField: setField
|
|
3638
3767
|
};
|
|
3639
|
-
return /* @__PURE__ */
|
|
3640
|
-
/* @__PURE__ */
|
|
3768
|
+
return /* @__PURE__ */ jsxs11("div", { children: [
|
|
3769
|
+
/* @__PURE__ */ jsxs11("nav", { className: "vos-crumbs", "aria-label": "Breadcrumb", children: [
|
|
3641
3770
|
/* @__PURE__ */ jsx11(
|
|
3642
3771
|
"button",
|
|
3643
3772
|
{
|
|
@@ -3649,7 +3778,7 @@ function RecordPage({
|
|
|
3649
3778
|
/* @__PURE__ */ jsx11("span", { "aria-hidden": "true", children: "\u203A" }),
|
|
3650
3779
|
/* @__PURE__ */ jsx11("span", { className: "vos-rid", children: record ? formatValue(record.Title) : recordId })
|
|
3651
3780
|
] }),
|
|
3652
|
-
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: [
|
|
3653
3782
|
"Couldn't find a record with id ",
|
|
3654
3783
|
/* @__PURE__ */ jsx11("b", { children: recordId }),
|
|
3655
3784
|
"."
|
|
@@ -3695,15 +3824,15 @@ function RecordBody({
|
|
|
3695
3824
|
const description = typeof record.Description === "string" ? record.Description : "";
|
|
3696
3825
|
const bodyText = typeof record.body === "string" ? record.body : "";
|
|
3697
3826
|
const hasErrors = Object.keys(edit.errors).length > 0;
|
|
3698
|
-
return /* @__PURE__ */
|
|
3699
|
-
/* @__PURE__ */
|
|
3700
|
-
/* @__PURE__ */
|
|
3827
|
+
return /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
3828
|
+
/* @__PURE__ */ jsxs11("div", { className: "vos-head vos-record-head", children: [
|
|
3829
|
+
/* @__PURE__ */ jsxs11("div", { children: [
|
|
3701
3830
|
/* @__PURE__ */ jsx11("p", { className: "vos-drawer-eyebrow", children: REGISTER_SINGULAR[register] }),
|
|
3702
3831
|
/* @__PURE__ */ jsx11("h1", { children: page.title }),
|
|
3703
3832
|
/* @__PURE__ */ jsx11("div", { className: "vos-pill-row", children: page.pills.map((p, i) => /* @__PURE__ */ jsx11(PillView, { pill: p }, i)) })
|
|
3704
3833
|
] }),
|
|
3705
3834
|
/* @__PURE__ */ jsx11("div", { className: "vos-spacer" }),
|
|
3706
|
-
/* @__PURE__ */
|
|
3835
|
+
/* @__PURE__ */ jsxs11("span", { className: "vos-verbadge", children: [
|
|
3707
3836
|
"v",
|
|
3708
3837
|
formatValue(record.version)
|
|
3709
3838
|
] }),
|
|
@@ -3729,7 +3858,7 @@ function RecordBody({
|
|
|
3729
3858
|
},
|
|
3730
3859
|
t2
|
|
3731
3860
|
)) }),
|
|
3732
|
-
activeTab === "overview" ? /* @__PURE__ */
|
|
3861
|
+
activeTab === "overview" ? /* @__PURE__ */ jsxs11("div", { className: "vos-record-cols", children: [
|
|
3733
3862
|
/* @__PURE__ */ jsx11("section", { className: "vos-meter-grid", children: page.meters.map((m) => /* @__PURE__ */ jsx11(
|
|
3734
3863
|
MeterView,
|
|
3735
3864
|
{
|
|
@@ -3739,7 +3868,7 @@ function RecordBody({
|
|
|
3739
3868
|
},
|
|
3740
3869
|
m.key
|
|
3741
3870
|
)) }),
|
|
3742
|
-
edit.editing ? /* @__PURE__ */
|
|
3871
|
+
edit.editing ? /* @__PURE__ */ jsxs11("section", { className: "vos-record-editor", children: [
|
|
3743
3872
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Edit" }),
|
|
3744
3873
|
edit.conflict ? /* @__PURE__ */ jsx11(ConflictBanner, { message: edit.conflict, onReload: edit.onReload }) : null,
|
|
3745
3874
|
edit.saveError ? /* @__PURE__ */ jsx11("p", { role: "alert", className: "vos-error", children: edit.saveError }) : null,
|
|
@@ -3752,7 +3881,7 @@ function RecordBody({
|
|
|
3752
3881
|
onField: edit.onField
|
|
3753
3882
|
}
|
|
3754
3883
|
),
|
|
3755
|
-
/* @__PURE__ */
|
|
3884
|
+
/* @__PURE__ */ jsxs11("footer", { className: "vos-drawer-footer", children: [
|
|
3756
3885
|
/* @__PURE__ */ jsx11(
|
|
3757
3886
|
"button",
|
|
3758
3887
|
{
|
|
@@ -3775,8 +3904,8 @@ function RecordBody({
|
|
|
3775
3904
|
}
|
|
3776
3905
|
)
|
|
3777
3906
|
] })
|
|
3778
|
-
] }) : /* @__PURE__ */
|
|
3779
|
-
description ? /* @__PURE__ */
|
|
3907
|
+
] }) : /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
3908
|
+
description ? /* @__PURE__ */ jsxs11("section", { className: "vos-record-prose", children: [
|
|
3780
3909
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Description" }),
|
|
3781
3910
|
/* @__PURE__ */ jsx11("p", { children: /* @__PURE__ */ jsx11(
|
|
3782
3911
|
GlossaryText,
|
|
@@ -3788,11 +3917,17 @@ function RecordBody({
|
|
|
3788
3917
|
}
|
|
3789
3918
|
) })
|
|
3790
3919
|
] }) : null,
|
|
3791
|
-
bodyText ? /* @__PURE__ */
|
|
3920
|
+
bodyText ? /* @__PURE__ */ jsxs11("section", { className: "vos-record-prose", children: [
|
|
3792
3921
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: register === "readings" ? "Quote" : "Narrative" }),
|
|
3793
|
-
/* @__PURE__ */ jsx11(
|
|
3922
|
+
/* @__PURE__ */ jsx11(
|
|
3923
|
+
EvidenceBody,
|
|
3924
|
+
{
|
|
3925
|
+
text: bodyText,
|
|
3926
|
+
partLabel: register === "readings" ? "Finding" : "Part"
|
|
3927
|
+
}
|
|
3928
|
+
)
|
|
3794
3929
|
] }) : null,
|
|
3795
|
-
register === "readings" ? /* @__PURE__ */
|
|
3930
|
+
register === "readings" ? /* @__PURE__ */ jsxs11("section", { className: "vos-record-prose vos-verdicts-section", children: [
|
|
3796
3931
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Per-belief verdicts" }),
|
|
3797
3932
|
/* @__PURE__ */ jsx11(
|
|
3798
3933
|
BeliefVerdicts,
|
|
@@ -3803,12 +3938,12 @@ function RecordBody({
|
|
|
3803
3938
|
}
|
|
3804
3939
|
)
|
|
3805
3940
|
] }) : null,
|
|
3806
|
-
page.humanText.length ? /* @__PURE__ */
|
|
3807
|
-
/* @__PURE__ */
|
|
3941
|
+
page.humanText.length ? /* @__PURE__ */ jsxs11("section", { className: "vos-record-prose", children: [
|
|
3942
|
+
/* @__PURE__ */ jsxs11("h3", { className: "vos-section-title", children: [
|
|
3808
3943
|
"From a human ",
|
|
3809
3944
|
/* @__PURE__ */ jsx11("span", { className: "vos-hint", children: "\u2014 not computed" })
|
|
3810
3945
|
] }),
|
|
3811
|
-
page.humanText.map((h) => /* @__PURE__ */
|
|
3946
|
+
page.humanText.map((h) => /* @__PURE__ */ jsxs11("div", { className: "vos-human-field", children: [
|
|
3812
3947
|
/* @__PURE__ */ jsx11("div", { className: "vos-detail-k", children: h.label }),
|
|
3813
3948
|
/* @__PURE__ */ jsx11("p", { children: /* @__PURE__ */ jsx11(
|
|
3814
3949
|
GlossaryText,
|
|
@@ -3834,22 +3969,22 @@ function RecordBody({
|
|
|
3834
3969
|
}
|
|
3835
3970
|
) : null,
|
|
3836
3971
|
activeTab === "connections" ? /* @__PURE__ */ jsx11("div", { className: "vos-panels", children: page.panels.map((panel) => /* @__PURE__ */ jsx11(PanelView, { panel, onOpenRecord }, panel.id)) }) : null,
|
|
3837
|
-
activeTab === "history" ? /* @__PURE__ */
|
|
3838
|
-
/* @__PURE__ */
|
|
3972
|
+
activeTab === "history" ? /* @__PURE__ */ jsxs11("section", { className: "vos-detail-list", children: [
|
|
3973
|
+
/* @__PURE__ */ jsxs11("div", { className: "vos-detail-row", children: [
|
|
3839
3974
|
/* @__PURE__ */ jsx11("span", { className: "vos-detail-k", children: "Created" }),
|
|
3840
3975
|
/* @__PURE__ */ jsx11("span", { className: "vos-detail-v", children: formatValue(record.createdAt) })
|
|
3841
3976
|
] }),
|
|
3842
|
-
/* @__PURE__ */
|
|
3977
|
+
/* @__PURE__ */ jsxs11("div", { className: "vos-detail-row", children: [
|
|
3843
3978
|
/* @__PURE__ */ jsx11("span", { className: "vos-detail-k", children: "Last updated" }),
|
|
3844
3979
|
/* @__PURE__ */ jsx11("span", { className: "vos-detail-v", children: formatValue(record.updatedAt) })
|
|
3845
3980
|
] }),
|
|
3846
|
-
/* @__PURE__ */
|
|
3981
|
+
/* @__PURE__ */ jsxs11("div", { className: "vos-detail-row", children: [
|
|
3847
3982
|
/* @__PURE__ */ jsx11("span", { className: "vos-detail-k", children: "Version" }),
|
|
3848
3983
|
/* @__PURE__ */ jsx11("span", { className: "vos-detail-v", children: formatValue(record.version) })
|
|
3849
3984
|
] }),
|
|
3850
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." })
|
|
3851
3986
|
] }) : null,
|
|
3852
|
-
page.hasJourney && journey ? /* @__PURE__ */
|
|
3987
|
+
page.hasJourney && journey ? /* @__PURE__ */ jsxs11("section", { className: "vos-journey-host", children: [
|
|
3853
3988
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Validation journey" }),
|
|
3854
3989
|
/* @__PURE__ */ jsx11(
|
|
3855
3990
|
BeliefJourney,
|
|
@@ -3861,7 +3996,7 @@ function RecordBody({
|
|
|
3861
3996
|
onChanged: onJourneyChanged
|
|
3862
3997
|
}
|
|
3863
3998
|
)
|
|
3864
|
-
] }) : page.hasJourney ? /* @__PURE__ */
|
|
3999
|
+
] }) : page.hasJourney ? /* @__PURE__ */ jsxs11("section", { className: "vos-journey-host", children: [
|
|
3865
4000
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Validation journey" }),
|
|
3866
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." })
|
|
3867
4002
|
] }) : null
|
|
@@ -3874,7 +4009,7 @@ function ConflictBanner({
|
|
|
3874
4009
|
message,
|
|
3875
4010
|
onReload
|
|
3876
4011
|
}) {
|
|
3877
|
-
return /* @__PURE__ */
|
|
4012
|
+
return /* @__PURE__ */ jsxs11("div", { role: "alert", className: "vos-banner vos-banner-warn", children: [
|
|
3878
4013
|
/* @__PURE__ */ jsx11("div", { className: "vos-banner-body", children: /* @__PURE__ */ jsx11("span", { children: message }) }),
|
|
3879
4014
|
/* @__PURE__ */ jsx11("button", { type: "button", onClick: onReload, children: "Review the latest" })
|
|
3880
4015
|
] });
|
|
@@ -3884,12 +4019,12 @@ function MeterView({
|
|
|
3884
4019
|
assumption,
|
|
3885
4020
|
basePath
|
|
3886
4021
|
}) {
|
|
3887
|
-
const [why, setWhy] =
|
|
4022
|
+
const [why, setWhy] = useState6(false);
|
|
3888
4023
|
const textTone = meter.tone === "crit" ? "vos-text-crit" : meter.tone === "warn" ? "vos-text-warn" : "";
|
|
3889
|
-
return /* @__PURE__ */
|
|
3890
|
-
/* @__PURE__ */
|
|
4024
|
+
return /* @__PURE__ */ jsxs11("div", { className: "vos-meter", children: [
|
|
4025
|
+
/* @__PURE__ */ jsxs11("div", { className: "vos-meter-head", children: [
|
|
3891
4026
|
/* @__PURE__ */ jsx11("span", { className: "vos-meter-label", children: meter.label }),
|
|
3892
|
-
meter.hasWhy && assumption ? /* @__PURE__ */
|
|
4027
|
+
meter.hasWhy && assumption ? /* @__PURE__ */ jsxs11(
|
|
3893
4028
|
"button",
|
|
3894
4029
|
{
|
|
3895
4030
|
type: "button",
|
|
@@ -3903,10 +4038,10 @@ function MeterView({
|
|
|
3903
4038
|
}
|
|
3904
4039
|
) : null
|
|
3905
4040
|
] }),
|
|
3906
|
-
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: [
|
|
3907
4042
|
/* @__PURE__ */ jsx11("div", { className: `vos-meter-val ${textTone}`, children: formatSigned(Number(meter.value)) }),
|
|
3908
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 }) })
|
|
3909
|
-
] }) : /* @__PURE__ */
|
|
4044
|
+
] }) : /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
3910
4045
|
/* @__PURE__ */ jsx11("div", { className: `vos-meter-val ${textTone}`, children: Math.round(Number(meter.value)) }),
|
|
3911
4046
|
/* @__PURE__ */ jsx11("span", { className: "vos-risk-bar", children: /* @__PURE__ */ jsx11(
|
|
3912
4047
|
"i",
|
|
@@ -3930,8 +4065,8 @@ function PanelView({
|
|
|
3930
4065
|
panel,
|
|
3931
4066
|
onOpenRecord
|
|
3932
4067
|
}) {
|
|
3933
|
-
return /* @__PURE__ */
|
|
3934
|
-
/* @__PURE__ */
|
|
4068
|
+
return /* @__PURE__ */ jsxs11("section", { className: "vos-panel", children: [
|
|
4069
|
+
/* @__PURE__ */ jsxs11("h3", { className: "vos-panel-head", children: [
|
|
3935
4070
|
panel.label,
|
|
3936
4071
|
/* @__PURE__ */ jsx11("span", { className: "vos-group-n", children: panel.items.length })
|
|
3937
4072
|
] }),
|
|
@@ -3942,7 +4077,7 @@ function BacklinkRow({
|
|
|
3942
4077
|
item,
|
|
3943
4078
|
onOpenRecord
|
|
3944
4079
|
}) {
|
|
3945
|
-
return /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */
|
|
4080
|
+
return /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsxs11(
|
|
3946
4081
|
"button",
|
|
3947
4082
|
{
|
|
3948
4083
|
type: "button",
|
|
@@ -3950,7 +4085,7 @@ function BacklinkRow({
|
|
|
3950
4085
|
onClick: () => onOpenRecord(item.id),
|
|
3951
4086
|
children: [
|
|
3952
4087
|
/* @__PURE__ */ jsx11("span", { className: "vos-backlink-title", children: item.title }),
|
|
3953
|
-
/* @__PURE__ */
|
|
4088
|
+
/* @__PURE__ */ jsxs11("span", { className: `vos-chip ${PILL_CLASS3[item.chip.tone]}`, children: [
|
|
3954
4089
|
/* @__PURE__ */ jsx11("span", { className: "vos-chip-k", children: item.chip.label }),
|
|
3955
4090
|
item.chip.value
|
|
3956
4091
|
] })
|
|
@@ -3974,10 +4109,10 @@ function EvidenceTab({
|
|
|
3974
4109
|
);
|
|
3975
4110
|
const mine = (related.readings ?? []).filter((r) => r.experimentId === record.id);
|
|
3976
4111
|
const nested = nestReadingsByPlan(mine, [record]);
|
|
3977
|
-
return /* @__PURE__ */
|
|
3978
|
-
/* @__PURE__ */
|
|
4112
|
+
return /* @__PURE__ */ jsxs11("div", { className: "vos-record-cols", children: [
|
|
4113
|
+
/* @__PURE__ */ jsxs11("section", { children: [
|
|
3979
4114
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Bar lines" }),
|
|
3980
|
-
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: [
|
|
3981
4116
|
/* @__PURE__ */ jsx11("span", { className: "vos-bar-if", children: b.rightIf || "\u2014" }),
|
|
3982
4117
|
b.assumption ? /* @__PURE__ */ jsx11(
|
|
3983
4118
|
"button",
|
|
@@ -3997,9 +4132,9 @@ function EvidenceTab({
|
|
|
3997
4132
|
)
|
|
3998
4133
|
] }, i)) })
|
|
3999
4134
|
] }),
|
|
4000
|
-
/* @__PURE__ */
|
|
4135
|
+
/* @__PURE__ */ jsxs11("section", { children: [
|
|
4001
4136
|
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Readings" }),
|
|
4002
|
-
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(
|
|
4003
4138
|
"button",
|
|
4004
4139
|
{
|
|
4005
4140
|
type: "button",
|
|
@@ -4007,7 +4142,7 @@ function EvidenceTab({
|
|
|
4007
4142
|
onClick: () => onOpenRecord(r.id),
|
|
4008
4143
|
children: [
|
|
4009
4144
|
/* @__PURE__ */ jsx11("span", { className: "vos-backlink-title", children: formatValue(r.Title) }),
|
|
4010
|
-
/* @__PURE__ */
|
|
4145
|
+
/* @__PURE__ */ jsxs11("span", { className: "vos-chip vos-pill vos-pill-neutral", children: [
|
|
4011
4146
|
readingBeliefs(r).length,
|
|
4012
4147
|
" belief",
|
|
4013
4148
|
readingBeliefs(r).length === 1 ? "" : "s"
|
|
@@ -4020,10 +4155,10 @@ function EvidenceTab({
|
|
|
4020
4155
|
}
|
|
4021
4156
|
|
|
4022
4157
|
// src/register-browser.tsx
|
|
4023
|
-
import { useMemo as useMemo4, useState as
|
|
4158
|
+
import { useMemo as useMemo4, useState as useState11 } from "react";
|
|
4024
4159
|
|
|
4025
4160
|
// src/register-table.tsx
|
|
4026
|
-
import { jsx as jsx12, jsxs as
|
|
4161
|
+
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4027
4162
|
function RegisterTable({
|
|
4028
4163
|
register,
|
|
4029
4164
|
records,
|
|
@@ -4035,7 +4170,7 @@ function RegisterTable({
|
|
|
4035
4170
|
if (records.length === 0) {
|
|
4036
4171
|
return /* @__PURE__ */ jsx12("p", { className: "vos-empty", children: "No records yet." });
|
|
4037
4172
|
}
|
|
4038
|
-
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: [
|
|
4039
4174
|
/* @__PURE__ */ jsx12("thead", { children: /* @__PURE__ */ jsx12("tr", { children: columns.map((c) => /* @__PURE__ */ jsx12(
|
|
4040
4175
|
"th",
|
|
4041
4176
|
{
|
|
@@ -4100,7 +4235,7 @@ function Cell({
|
|
|
4100
4235
|
}
|
|
4101
4236
|
const text = headline && (raw === null || raw === void 0 || raw === "") ? primaryLabel(record) : formatValue(raw);
|
|
4102
4237
|
if (headline && chips && chips.length > 0) {
|
|
4103
|
-
return /* @__PURE__ */
|
|
4238
|
+
return /* @__PURE__ */ jsxs12("span", { className: "vos-ttl-wrap", children: [
|
|
4104
4239
|
/* @__PURE__ */ jsx12("span", { className: "vos-ttl", children: text }),
|
|
4105
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)) })
|
|
4106
4241
|
] });
|
|
@@ -4109,8 +4244,8 @@ function Cell({
|
|
|
4109
4244
|
}
|
|
4110
4245
|
|
|
4111
4246
|
// src/record-drawer.tsx
|
|
4112
|
-
import { useEffect as useEffect3, useState as
|
|
4113
|
-
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";
|
|
4114
4249
|
var DERIVED_SUB = {
|
|
4115
4250
|
confidence: "Signed average of concluded readings",
|
|
4116
4251
|
risk: "Impact \xD7 (1 \u2212 Confidence\u207A/100)",
|
|
@@ -4133,10 +4268,10 @@ function RecordDrawer({
|
|
|
4133
4268
|
related,
|
|
4134
4269
|
children
|
|
4135
4270
|
}) {
|
|
4136
|
-
const [editing, setEditing] =
|
|
4137
|
-
const [draft, setDraft] =
|
|
4138
|
-
const [baseline, setBaseline] =
|
|
4139
|
-
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);
|
|
4140
4275
|
const { save, saving, conflict, error: saveError, reset } = useUpdate(
|
|
4141
4276
|
register,
|
|
4142
4277
|
basePath
|
|
@@ -4183,19 +4318,19 @@ function RecordDrawer({
|
|
|
4183
4318
|
const setField = (key, value) => setDraft((d) => ({ ...d, [key]: value }));
|
|
4184
4319
|
const errors = editing ? draftErrors(register, draft) : {};
|
|
4185
4320
|
const hasErrors = Object.keys(errors).length > 0;
|
|
4186
|
-
return /* @__PURE__ */
|
|
4321
|
+
return /* @__PURE__ */ jsxs13(
|
|
4187
4322
|
DrawerShell,
|
|
4188
4323
|
{
|
|
4189
4324
|
open,
|
|
4190
4325
|
onClose,
|
|
4191
4326
|
ariaLabel: `${REGISTER_LABEL[register]} record`,
|
|
4192
4327
|
children: [
|
|
4193
|
-
/* @__PURE__ */
|
|
4194
|
-
/* @__PURE__ */
|
|
4328
|
+
/* @__PURE__ */ jsxs13("header", { className: "vos-drawer-header", children: [
|
|
4329
|
+
/* @__PURE__ */ jsxs13("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
4195
4330
|
/* @__PURE__ */ jsx13("p", { className: "vos-drawer-eyebrow", children: REGISTER_LABEL[register] }),
|
|
4196
4331
|
/* @__PURE__ */ jsx13("h2", { className: "vos-drawer-title", children: record ? primaryLabel(record) : loading ? "Loading\u2026" : "\u2014" })
|
|
4197
4332
|
] }),
|
|
4198
|
-
record ? /* @__PURE__ */
|
|
4333
|
+
record ? /* @__PURE__ */ jsxs13("span", { className: "vos-verbadge", children: [
|
|
4199
4334
|
"v",
|
|
4200
4335
|
formatValue(record.version)
|
|
4201
4336
|
] }) : null,
|
|
@@ -4228,10 +4363,10 @@ function RecordDrawer({
|
|
|
4228
4363
|
}
|
|
4229
4364
|
)
|
|
4230
4365
|
] }),
|
|
4231
|
-
/* @__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__ */
|
|
4232
|
-
derived ? /* @__PURE__ */
|
|
4233
|
-
/* @__PURE__ */
|
|
4234
|
-
/* @__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: [
|
|
4235
4370
|
"Derived",
|
|
4236
4371
|
/* @__PURE__ */ jsx13("span", { className: "vos-lock", children: "\u{1F512} computed on write \u2014 not editable" })
|
|
4237
4372
|
] }),
|
|
@@ -4259,7 +4394,7 @@ function RecordDrawer({
|
|
|
4259
4394
|
errors,
|
|
4260
4395
|
onField: setField
|
|
4261
4396
|
}
|
|
4262
|
-
) : /* @__PURE__ */
|
|
4397
|
+
) : /* @__PURE__ */ jsxs13(Fragment9, { children: [
|
|
4263
4398
|
/* @__PURE__ */ jsx13("div", { className: "vos-detail-list", children: rows.map((row) => /* @__PURE__ */ jsx13(
|
|
4264
4399
|
DetailRowView,
|
|
4265
4400
|
{
|
|
@@ -4268,11 +4403,17 @@ function RecordDrawer({
|
|
|
4268
4403
|
},
|
|
4269
4404
|
row.key
|
|
4270
4405
|
)) }),
|
|
4271
|
-
typeof record.body === "string" && record.body.trim() ? /* @__PURE__ */
|
|
4406
|
+
typeof record.body === "string" && record.body.trim() ? /* @__PURE__ */ jsxs13("section", { className: "vos-record-prose", children: [
|
|
4272
4407
|
/* @__PURE__ */ jsx13("div", { className: "vos-detail-k", children: register === "readings" ? "Quote" : "Narrative" }),
|
|
4273
|
-
/* @__PURE__ */ jsx13(
|
|
4408
|
+
/* @__PURE__ */ jsx13(
|
|
4409
|
+
EvidenceBody,
|
|
4410
|
+
{
|
|
4411
|
+
text: record.body,
|
|
4412
|
+
partLabel: register === "readings" ? "Finding" : "Part"
|
|
4413
|
+
}
|
|
4414
|
+
)
|
|
4274
4415
|
] }) : null,
|
|
4275
|
-
register === "readings" ? /* @__PURE__ */
|
|
4416
|
+
register === "readings" ? /* @__PURE__ */ jsxs13("section", { className: "vos-record-prose", children: [
|
|
4276
4417
|
/* @__PURE__ */ jsx13("div", { className: "vos-detail-k", children: "Per-belief verdicts" }),
|
|
4277
4418
|
/* @__PURE__ */ jsx13(
|
|
4278
4419
|
BeliefVerdicts,
|
|
@@ -4286,7 +4427,7 @@ function RecordDrawer({
|
|
|
4286
4427
|
] })
|
|
4287
4428
|
] }) }),
|
|
4288
4429
|
record && !loading && !error && !editing ? children : null,
|
|
4289
|
-
record && editing ? /* @__PURE__ */
|
|
4430
|
+
record && editing ? /* @__PURE__ */ jsxs13("footer", { className: "vos-drawer-footer", children: [
|
|
4290
4431
|
/* @__PURE__ */ jsx13(
|
|
4291
4432
|
"button",
|
|
4292
4433
|
{
|
|
@@ -4308,7 +4449,7 @@ function RecordDrawer({
|
|
|
4308
4449
|
children: saving ? "Saving\u2026" : "Save"
|
|
4309
4450
|
}
|
|
4310
4451
|
)
|
|
4311
|
-
] }) : record ? /* @__PURE__ */
|
|
4452
|
+
] }) : record ? /* @__PURE__ */ jsxs13("footer", { className: "vos-drawer-footer", children: [
|
|
4312
4453
|
record.id,
|
|
4313
4454
|
" \xB7 updated ",
|
|
4314
4455
|
formatValue(record.updatedAt)
|
|
@@ -4321,9 +4462,9 @@ function DetailRowView({
|
|
|
4321
4462
|
row,
|
|
4322
4463
|
onOpenRecord
|
|
4323
4464
|
}) {
|
|
4324
|
-
return /* @__PURE__ */
|
|
4465
|
+
return /* @__PURE__ */ jsxs13("div", { className: "vos-detail-row", children: [
|
|
4325
4466
|
/* @__PURE__ */ jsx13("span", { className: "vos-detail-k", children: row.label }),
|
|
4326
|
-
/* @__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: [
|
|
4327
4468
|
/* @__PURE__ */ jsx13("span", { className: "vos-bar-if", children: b.rightIf || "\u2014" }),
|
|
4328
4469
|
b.assumption ? /* @__PURE__ */ jsx13(
|
|
4329
4470
|
InlineLink,
|
|
@@ -4347,7 +4488,7 @@ function RelationLinks({
|
|
|
4347
4488
|
items,
|
|
4348
4489
|
onOpenRecord
|
|
4349
4490
|
}) {
|
|
4350
|
-
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: [
|
|
4351
4492
|
i > 0 ? ", " : null,
|
|
4352
4493
|
/* @__PURE__ */ jsx13(InlineLink, { id: item.id, title: item.title, onOpenRecord })
|
|
4353
4494
|
] }, item.id)) });
|
|
@@ -4381,10 +4522,10 @@ function DerivedCell({
|
|
|
4381
4522
|
toneClass = heroToneClass(derivedTone(field, num3));
|
|
4382
4523
|
display = field === "confidence" ? formatSigned(num3) : String(Math.round(num3));
|
|
4383
4524
|
}
|
|
4384
|
-
return /* @__PURE__ */
|
|
4385
|
-
/* @__PURE__ */
|
|
4525
|
+
return /* @__PURE__ */ jsxs13("div", { className: "vos-dcell", children: [
|
|
4526
|
+
/* @__PURE__ */ jsxs13("div", { className: "vos-dcell-k", children: [
|
|
4386
4527
|
derivedLabel(field),
|
|
4387
|
-
showWhy ? /* @__PURE__ */
|
|
4528
|
+
showWhy ? /* @__PURE__ */ jsxs13(
|
|
4388
4529
|
"button",
|
|
4389
4530
|
{
|
|
4390
4531
|
type: "button",
|
|
@@ -4406,14 +4547,14 @@ function ConflictBanner2({
|
|
|
4406
4547
|
message,
|
|
4407
4548
|
onReload
|
|
4408
4549
|
}) {
|
|
4409
|
-
return /* @__PURE__ */
|
|
4550
|
+
return /* @__PURE__ */ jsxs13("div", { role: "alert", className: "vos-banner vos-banner-warn", children: [
|
|
4410
4551
|
/* @__PURE__ */ jsx13("div", { className: "vos-banner-body", children: /* @__PURE__ */ jsx13("span", { children: message }) }),
|
|
4411
4552
|
/* @__PURE__ */ jsx13("button", { type: "button", onClick: onReload, children: "Review the latest" })
|
|
4412
4553
|
] });
|
|
4413
4554
|
}
|
|
4414
4555
|
|
|
4415
4556
|
// src/record-form.tsx
|
|
4416
|
-
import { useMemo as useMemo2, useState as
|
|
4557
|
+
import { useMemo as useMemo2, useState as useState8 } from "react";
|
|
4417
4558
|
|
|
4418
4559
|
// src/form-fields.ts
|
|
4419
4560
|
var ASSUMPTION_STATUS = ["Draft", "Live", "Invalidated"];
|
|
@@ -4515,7 +4656,7 @@ function toCreatePayload(register, draft) {
|
|
|
4515
4656
|
}
|
|
4516
4657
|
|
|
4517
4658
|
// src/record-form.tsx
|
|
4518
|
-
import { jsx as jsx14, jsxs as
|
|
4659
|
+
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4519
4660
|
function RecordForm({
|
|
4520
4661
|
register,
|
|
4521
4662
|
basePath,
|
|
@@ -4523,7 +4664,7 @@ function RecordForm({
|
|
|
4523
4664
|
onCancel
|
|
4524
4665
|
}) {
|
|
4525
4666
|
const fields = useMemo2(() => formFieldsFor(register), [register]);
|
|
4526
|
-
const [draft, setDraft] =
|
|
4667
|
+
const [draft, setDraft] = useState8(
|
|
4527
4668
|
() => emptyDraft(register)
|
|
4528
4669
|
);
|
|
4529
4670
|
const { create, saving, error } = useCreate(register, basePath);
|
|
@@ -4538,8 +4679,8 @@ function RecordForm({
|
|
|
4538
4679
|
} catch {
|
|
4539
4680
|
}
|
|
4540
4681
|
};
|
|
4541
|
-
return /* @__PURE__ */
|
|
4542
|
-
/* @__PURE__ */
|
|
4682
|
+
return /* @__PURE__ */ jsxs14("form", { onSubmit, className: "vos-form", children: [
|
|
4683
|
+
/* @__PURE__ */ jsxs14("div", { className: "vos-form-body", children: [
|
|
4543
4684
|
fields.map((field) => /* @__PURE__ */ jsx14(
|
|
4544
4685
|
Field,
|
|
4545
4686
|
{
|
|
@@ -4551,7 +4692,7 @@ function RecordForm({
|
|
|
4551
4692
|
)),
|
|
4552
4693
|
error ? /* @__PURE__ */ jsx14("p", { className: "vos-error", children: error }) : null
|
|
4553
4694
|
] }),
|
|
4554
|
-
/* @__PURE__ */
|
|
4695
|
+
/* @__PURE__ */ jsxs14("footer", { className: "vos-drawer-footer", children: [
|
|
4555
4696
|
/* @__PURE__ */ jsx14("button", { type: "button", onClick: onCancel, className: "vos-btn vos-btn-ghost vos-btn-sm", children: "Cancel" }),
|
|
4556
4697
|
/* @__PURE__ */ jsx14(
|
|
4557
4698
|
"button",
|
|
@@ -4572,8 +4713,8 @@ function Field({
|
|
|
4572
4713
|
onChange
|
|
4573
4714
|
}) {
|
|
4574
4715
|
const id = `field-${field.key}`;
|
|
4575
|
-
return /* @__PURE__ */
|
|
4576
|
-
/* @__PURE__ */
|
|
4716
|
+
return /* @__PURE__ */ jsxs14("div", { className: "vos-field", children: [
|
|
4717
|
+
/* @__PURE__ */ jsxs14("label", { htmlFor: id, className: FIELD_LABEL_CLASS, children: [
|
|
4577
4718
|
field.label,
|
|
4578
4719
|
field.required ? /* @__PURE__ */ jsx14("span", { className: "vos-req", children: " *" }) : null
|
|
4579
4720
|
] }),
|
|
@@ -4587,7 +4728,7 @@ function Field({
|
|
|
4587
4728
|
onChange: (e) => onChange(e.target.value),
|
|
4588
4729
|
className: FIELD_CONTROL_CLASS
|
|
4589
4730
|
}
|
|
4590
|
-
) : field.kind === "select" ? /* @__PURE__ */
|
|
4731
|
+
) : field.kind === "select" ? /* @__PURE__ */ jsxs14(
|
|
4591
4732
|
"select",
|
|
4592
4733
|
{
|
|
4593
4734
|
id,
|
|
@@ -4614,7 +4755,7 @@ function Field({
|
|
|
4614
4755
|
}
|
|
4615
4756
|
|
|
4616
4757
|
// src/relation-editor.tsx
|
|
4617
|
-
import { useMemo as useMemo3, useState as
|
|
4758
|
+
import { useMemo as useMemo3, useState as useState9 } from "react";
|
|
4618
4759
|
|
|
4619
4760
|
// src/link-choices.ts
|
|
4620
4761
|
import { RELATIONS } from "@validation-os/core";
|
|
@@ -4635,7 +4776,7 @@ function linkChoicesFrom(register) {
|
|
|
4635
4776
|
}
|
|
4636
4777
|
|
|
4637
4778
|
// src/relation-editor.tsx
|
|
4638
|
-
import { jsx as jsx15, jsxs as
|
|
4779
|
+
import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4639
4780
|
function RelationEditor({
|
|
4640
4781
|
register,
|
|
4641
4782
|
recordId,
|
|
@@ -4643,8 +4784,8 @@ function RelationEditor({
|
|
|
4643
4784
|
onLinked
|
|
4644
4785
|
}) {
|
|
4645
4786
|
const choices = useMemo3(() => linkChoicesFrom(register), [register]);
|
|
4646
|
-
const [relation, setRelation] =
|
|
4647
|
-
const [targetId, setTargetId] =
|
|
4787
|
+
const [relation, setRelation] = useState9("");
|
|
4788
|
+
const [targetId, setTargetId] = useState9("");
|
|
4648
4789
|
const { link, linking, error } = useLink(basePath);
|
|
4649
4790
|
const active = choices.find((c) => c.relation === relation) ?? null;
|
|
4650
4791
|
const { records } = useList(
|
|
@@ -4669,10 +4810,10 @@ function RelationEditor({
|
|
|
4669
4810
|
} catch {
|
|
4670
4811
|
}
|
|
4671
4812
|
};
|
|
4672
|
-
return /* @__PURE__ */
|
|
4813
|
+
return /* @__PURE__ */ jsxs15("section", { className: "vos-relation", children: [
|
|
4673
4814
|
/* @__PURE__ */ jsx15("h3", { className: "vos-sectitle", children: "Link a record" }),
|
|
4674
|
-
/* @__PURE__ */
|
|
4675
|
-
/* @__PURE__ */
|
|
4815
|
+
/* @__PURE__ */ jsxs15("div", { className: "vos-field-stack", children: [
|
|
4816
|
+
/* @__PURE__ */ jsxs15(
|
|
4676
4817
|
"select",
|
|
4677
4818
|
{
|
|
4678
4819
|
"aria-label": "Relation",
|
|
@@ -4688,7 +4829,7 @@ function RelationEditor({
|
|
|
4688
4829
|
]
|
|
4689
4830
|
}
|
|
4690
4831
|
),
|
|
4691
|
-
active ? /* @__PURE__ */
|
|
4832
|
+
active ? /* @__PURE__ */ jsxs15(
|
|
4692
4833
|
"select",
|
|
4693
4834
|
{
|
|
4694
4835
|
"aria-label": "Target record",
|
|
@@ -4718,7 +4859,7 @@ function RelationEditor({
|
|
|
4718
4859
|
}
|
|
4719
4860
|
|
|
4720
4861
|
// src/use-saved-views.ts
|
|
4721
|
-
import { useCallback as useCallback3, useEffect as useEffect4, useState as
|
|
4862
|
+
import { useCallback as useCallback3, useEffect as useEffect4, useState as useState10 } from "react";
|
|
4722
4863
|
var storageKey = (register) => `vos:saved-views:${register}`;
|
|
4723
4864
|
function read(register) {
|
|
4724
4865
|
if (typeof window === "undefined") return [];
|
|
@@ -4738,7 +4879,7 @@ function write(register, views) {
|
|
|
4738
4879
|
}
|
|
4739
4880
|
}
|
|
4740
4881
|
function useSavedViews(register) {
|
|
4741
|
-
const [views, setViews] =
|
|
4882
|
+
const [views, setViews] = useState10(() => read(register));
|
|
4742
4883
|
useEffect4(() => setViews(read(register)), [register]);
|
|
4743
4884
|
const save = useCallback3(
|
|
4744
4885
|
(name, descriptor) => {
|
|
@@ -4769,7 +4910,7 @@ function useSavedViews(register) {
|
|
|
4769
4910
|
}
|
|
4770
4911
|
|
|
4771
4912
|
// src/register-browser.tsx
|
|
4772
|
-
import { jsx as jsx16, jsxs as
|
|
4913
|
+
import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4773
4914
|
function contextNeeds(register) {
|
|
4774
4915
|
return {
|
|
4775
4916
|
experiments: register === "assumptions" || register === "readings",
|
|
@@ -4793,17 +4934,17 @@ function RegisterBrowser({
|
|
|
4793
4934
|
const experiments = useList("experiments", basePath, needs.experiments);
|
|
4794
4935
|
const readings = useList("readings", basePath, needs.readings);
|
|
4795
4936
|
const assumptions = useList("assumptions", basePath, needs.assumptions);
|
|
4796
|
-
const [descriptor, setDescriptor] =
|
|
4937
|
+
const [descriptor, setDescriptor] = useState11({});
|
|
4797
4938
|
const savedViews = useSavedViews(register);
|
|
4798
|
-
const [openId, setOpenId] =
|
|
4799
|
-
const [creating, setCreating] =
|
|
4939
|
+
const [openId, setOpenId] = useState11(null);
|
|
4940
|
+
const [creating, setCreating] = useState11(false);
|
|
4800
4941
|
const {
|
|
4801
4942
|
record,
|
|
4802
4943
|
loading: recordLoading,
|
|
4803
4944
|
error: recordError,
|
|
4804
4945
|
refresh: refreshRecord
|
|
4805
4946
|
} = useRecord(register, openId, basePath);
|
|
4806
|
-
const [asOf] =
|
|
4947
|
+
const [asOf] = useState11(() => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10));
|
|
4807
4948
|
const rows = records ?? [];
|
|
4808
4949
|
const prefiltered = useMemo4(() => {
|
|
4809
4950
|
return rows.filter((r) => {
|
|
@@ -4856,9 +4997,9 @@ function RegisterBrowser({
|
|
|
4856
4997
|
void _name;
|
|
4857
4998
|
setDescriptor(rest);
|
|
4858
4999
|
};
|
|
4859
|
-
return /* @__PURE__ */
|
|
4860
|
-
/* @__PURE__ */
|
|
4861
|
-
/* @__PURE__ */
|
|
5000
|
+
return /* @__PURE__ */ jsxs16("div", { children: [
|
|
5001
|
+
/* @__PURE__ */ jsxs16("div", { className: "vos-head", children: [
|
|
5002
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
4862
5003
|
/* @__PURE__ */ jsx16("h1", { children: REGISTER_LABEL[register] }),
|
|
4863
5004
|
subtitle ? /* @__PURE__ */ jsx16("p", { children: subtitle }) : null
|
|
4864
5005
|
] }),
|
|
@@ -4872,7 +5013,7 @@ function RegisterBrowser({
|
|
|
4872
5013
|
children: "\u21BB Refresh"
|
|
4873
5014
|
}
|
|
4874
5015
|
),
|
|
4875
|
-
/* @__PURE__ */
|
|
5016
|
+
/* @__PURE__ */ jsxs16(
|
|
4876
5017
|
"button",
|
|
4877
5018
|
{
|
|
4878
5019
|
type: "button",
|
|
@@ -4888,7 +5029,7 @@ function RegisterBrowser({
|
|
|
4888
5029
|
/* @__PURE__ */ jsx16("div", { className: "vos-tabs", role: "tablist", "aria-label": "Views", children: shaped.tabs.map((tab) => {
|
|
4889
5030
|
const active = tab.id === shaped.activeTabId;
|
|
4890
5031
|
const badge = badgeFor(tab);
|
|
4891
|
-
return /* @__PURE__ */
|
|
5032
|
+
return /* @__PURE__ */ jsxs16(
|
|
4892
5033
|
"button",
|
|
4893
5034
|
{
|
|
4894
5035
|
type: "button",
|
|
@@ -4915,9 +5056,9 @@ function RegisterBrowser({
|
|
|
4915
5056
|
onQuery: (query) => patch({ query })
|
|
4916
5057
|
}
|
|
4917
5058
|
),
|
|
4918
|
-
/* @__PURE__ */
|
|
5059
|
+
/* @__PURE__ */ jsxs16("div", { className: "vos-saved-views", children: [
|
|
4919
5060
|
/* @__PURE__ */ jsx16("span", { className: "vos-saved-label", children: "Saved views" }),
|
|
4920
|
-
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: [
|
|
4921
5062
|
/* @__PURE__ */ jsx16(
|
|
4922
5063
|
"button",
|
|
4923
5064
|
{
|
|
@@ -4948,7 +5089,7 @@ function RegisterBrowser({
|
|
|
4948
5089
|
}
|
|
4949
5090
|
)
|
|
4950
5091
|
] }),
|
|
4951
|
-
loading && !records ? /* @__PURE__ */
|
|
5092
|
+
loading && !records ? /* @__PURE__ */ jsxs16("p", { className: "vos-muted", children: [
|
|
4952
5093
|
"Loading ",
|
|
4953
5094
|
REGISTER_LABEL[register].toLowerCase(),
|
|
4954
5095
|
"\u2026"
|
|
@@ -4993,14 +5134,14 @@ function RegisterBrowser({
|
|
|
4993
5134
|
) : null
|
|
4994
5135
|
}
|
|
4995
5136
|
),
|
|
4996
|
-
/* @__PURE__ */
|
|
5137
|
+
/* @__PURE__ */ jsxs16(
|
|
4997
5138
|
DrawerShell,
|
|
4998
5139
|
{
|
|
4999
5140
|
open: creating,
|
|
5000
5141
|
onClose: () => setCreating(false),
|
|
5001
5142
|
ariaLabel: `New ${REGISTER_SINGULAR[register]} record`,
|
|
5002
5143
|
children: [
|
|
5003
|
-
/* @__PURE__ */ jsx16("header", { className: "vos-drawer-header", children: /* @__PURE__ */
|
|
5144
|
+
/* @__PURE__ */ jsx16("header", { className: "vos-drawer-header", children: /* @__PURE__ */ jsxs16("div", { children: [
|
|
5004
5145
|
/* @__PURE__ */ jsx16("p", { className: "vos-drawer-eyebrow", children: "New" }),
|
|
5005
5146
|
/* @__PURE__ */ jsx16("h2", { className: "vos-drawer-title", children: REGISTER_SINGULAR[register] })
|
|
5006
5147
|
] }) }),
|
|
@@ -5032,7 +5173,7 @@ function ViewControls({
|
|
|
5032
5173
|
}) {
|
|
5033
5174
|
const sortable = columnsFor(register);
|
|
5034
5175
|
const sort = descriptor.sort ?? null;
|
|
5035
|
-
return /* @__PURE__ */
|
|
5176
|
+
return /* @__PURE__ */ jsxs16("div", { className: "vos-view-controls", children: [
|
|
5036
5177
|
/* @__PURE__ */ jsx16(
|
|
5037
5178
|
"input",
|
|
5038
5179
|
{
|
|
@@ -5044,9 +5185,9 @@ function ViewControls({
|
|
|
5044
5185
|
"aria-label": "Filter records"
|
|
5045
5186
|
}
|
|
5046
5187
|
),
|
|
5047
|
-
axes.length ? /* @__PURE__ */
|
|
5188
|
+
axes.length ? /* @__PURE__ */ jsxs16("label", { className: "vos-control", children: [
|
|
5048
5189
|
/* @__PURE__ */ jsx16("span", { children: "Group" }),
|
|
5049
|
-
/* @__PURE__ */
|
|
5190
|
+
/* @__PURE__ */ jsxs16(
|
|
5050
5191
|
"select",
|
|
5051
5192
|
{
|
|
5052
5193
|
className: "vos-input",
|
|
@@ -5059,9 +5200,9 @@ function ViewControls({
|
|
|
5059
5200
|
}
|
|
5060
5201
|
)
|
|
5061
5202
|
] }) : null,
|
|
5062
|
-
/* @__PURE__ */
|
|
5203
|
+
/* @__PURE__ */ jsxs16("label", { className: "vos-control", children: [
|
|
5063
5204
|
/* @__PURE__ */ jsx16("span", { children: "Sort" }),
|
|
5064
|
-
/* @__PURE__ */
|
|
5205
|
+
/* @__PURE__ */ jsxs16(
|
|
5065
5206
|
"select",
|
|
5066
5207
|
{
|
|
5067
5208
|
className: "vos-input",
|
|
@@ -5098,8 +5239,8 @@ function ShapedBody({
|
|
|
5098
5239
|
if (shaped.nested) {
|
|
5099
5240
|
if (shaped.nested.length === 0)
|
|
5100
5241
|
return /* @__PURE__ */ jsx16("p", { className: "vos-empty", children: "No readings in this view." });
|
|
5101
|
-
return /* @__PURE__ */ jsx16("div", { className: "vos-groups", children: shaped.nested.map((group) => /* @__PURE__ */
|
|
5102
|
-
/* @__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: [
|
|
5103
5244
|
group.label,
|
|
5104
5245
|
/* @__PURE__ */ jsx16("span", { className: "vos-group-n", children: group.readings.length })
|
|
5105
5246
|
] }),
|
|
@@ -5118,8 +5259,8 @@ function ShapedBody({
|
|
|
5118
5259
|
if (shaped.groups) {
|
|
5119
5260
|
if (shaped.groups.length === 0)
|
|
5120
5261
|
return /* @__PURE__ */ jsx16("p", { className: "vos-empty", children: "No records in this view." });
|
|
5121
|
-
return /* @__PURE__ */ jsx16("div", { className: "vos-groups", children: shaped.groups.map((group) => /* @__PURE__ */
|
|
5122
|
-
/* @__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: [
|
|
5123
5264
|
group.label,
|
|
5124
5265
|
/* @__PURE__ */ jsx16("span", { className: "vos-group-n", children: group.records.length })
|
|
5125
5266
|
] }),
|
|
@@ -5148,9 +5289,9 @@ function ShapedBody({
|
|
|
5148
5289
|
}
|
|
5149
5290
|
|
|
5150
5291
|
// src/next-move-surface.tsx
|
|
5151
|
-
import { useMemo as useMemo5, useState as
|
|
5292
|
+
import { useMemo as useMemo5, useState as useState12 } from "react";
|
|
5152
5293
|
import { rankNextMoves as rankNextMoves2 } from "@validation-os/core/derivation";
|
|
5153
|
-
import { Fragment as Fragment10, jsx as jsx17, jsxs as
|
|
5294
|
+
import { Fragment as Fragment10, jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5154
5295
|
var STAGES = ["Framed", "Planned", "Tested", "Known"];
|
|
5155
5296
|
var MOVE_STAGE = {
|
|
5156
5297
|
"score-impact": 0,
|
|
@@ -5171,8 +5312,8 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5171
5312
|
const experiments = useList("experiments", basePath);
|
|
5172
5313
|
const readings = useList("readings", basePath);
|
|
5173
5314
|
const decisions = useList("decisions", basePath);
|
|
5174
|
-
const [why, setWhy] =
|
|
5175
|
-
const [stepIn, setStepIn] =
|
|
5315
|
+
const [why, setWhy] = useState12(false);
|
|
5316
|
+
const [stepIn, setStepIn] = useState12(null);
|
|
5176
5317
|
const lists = [assumptions, experiments, readings, decisions];
|
|
5177
5318
|
const loading = lists.some((l) => l.loading);
|
|
5178
5319
|
const error = lists.map((l) => l.error).find(Boolean) ?? null;
|
|
@@ -5211,7 +5352,7 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5211
5352
|
return /* @__PURE__ */ jsx17(NextMoveFrame, { children: /* @__PURE__ */ jsx17("div", { className: "vos-empty", children: "Reading your beliefs\u2026" }) });
|
|
5212
5353
|
}
|
|
5213
5354
|
if (error) {
|
|
5214
|
-
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: [
|
|
5215
5356
|
/* @__PURE__ */ jsx17("b", { children: "Couldn't load the workflow." }),
|
|
5216
5357
|
/* @__PURE__ */ jsx17("span", { children: error })
|
|
5217
5358
|
] }) }) });
|
|
@@ -5225,9 +5366,9 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5225
5366
|
};
|
|
5226
5367
|
const cold = coldStartFor(records);
|
|
5227
5368
|
if (cold.cold) {
|
|
5228
|
-
return /* @__PURE__ */
|
|
5369
|
+
return /* @__PURE__ */ jsxs17(NextMoveFrame, { children: [
|
|
5229
5370
|
/* @__PURE__ */ jsx17("div", { className: "vos-firstrun", children: FIRST_RUN_LINE }),
|
|
5230
|
-
/* @__PURE__ */
|
|
5371
|
+
/* @__PURE__ */ jsxs17("div", { className: "vos-card vos-cold vos-cold-next", children: [
|
|
5231
5372
|
/* @__PURE__ */ jsx17("span", { className: "vos-cold-eyebrow", children: cold.next.eyebrow }),
|
|
5232
5373
|
/* @__PURE__ */ jsx17("h2", { className: "vos-cold-headline", children: cold.next.headline }),
|
|
5233
5374
|
/* @__PURE__ */ jsx17("p", { className: "vos-cold-body", children: cold.next.body }),
|
|
@@ -5243,7 +5384,7 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5243
5384
|
] })
|
|
5244
5385
|
] });
|
|
5245
5386
|
}
|
|
5246
|
-
return /* @__PURE__ */ jsx17(NextMoveFrame, { children: /* @__PURE__ */
|
|
5387
|
+
return /* @__PURE__ */ jsx17(NextMoveFrame, { children: /* @__PURE__ */ jsxs17("div", { className: "vos-empty", children: [
|
|
5247
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",
|
|
5248
5389
|
" ",
|
|
5249
5390
|
/* @__PURE__ */ jsx17(
|
|
@@ -5264,9 +5405,9 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5264
5405
|
const onDeck = rest.filter((m) => m.assumptionId !== top.assumptionId).slice(0, 3);
|
|
5265
5406
|
const topPres = movePresentation(top.move);
|
|
5266
5407
|
const topTone = riskLevel(top.risk);
|
|
5267
|
-
return /* @__PURE__ */
|
|
5408
|
+
return /* @__PURE__ */ jsxs17(NextMoveFrame, { children: [
|
|
5268
5409
|
killMoves.length > 0 && !top.killLane ? /* @__PURE__ */ jsx17(KillBanner, { count: killMoves.length, onReview: () => startStepIn(killMoves[0]) }) : null,
|
|
5269
|
-
/* @__PURE__ */
|
|
5410
|
+
/* @__PURE__ */ jsxs17("div", { className: `vos-hero vos-card${top.killLane ? " vos-hero-kill" : ""}`, children: [
|
|
5270
5411
|
/* @__PURE__ */ jsx17("span", { className: "vos-hero-eyebrow", children: top.killLane ? "Kill lane \u2014 turning against you" : "Your next move" }),
|
|
5271
5412
|
/* @__PURE__ */ jsx17(
|
|
5272
5413
|
"button",
|
|
@@ -5278,7 +5419,7 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5278
5419
|
children: top.title
|
|
5279
5420
|
}
|
|
5280
5421
|
),
|
|
5281
|
-
/* @__PURE__ */
|
|
5422
|
+
/* @__PURE__ */ jsxs17("div", { className: "vos-riskchip", "aria-label": `Risk: ${RISK_PHRASE[topTone]}`, children: [
|
|
5282
5423
|
/* @__PURE__ */ jsx17("span", { className: "vos-risk-bar", "aria-hidden": "true", children: /* @__PURE__ */ jsx17(
|
|
5283
5424
|
"i",
|
|
5284
5425
|
{
|
|
@@ -5292,7 +5433,7 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5292
5433
|
/* @__PURE__ */ jsx17("button", { type: "button", className: "vos-why", onClick: () => setWhy((w) => !w), children: why ? "Hide details" : "Why this?" })
|
|
5293
5434
|
] }),
|
|
5294
5435
|
why ? /* @__PURE__ */ jsx17(WhyPanel, { top, ranked: moves }) : null,
|
|
5295
|
-
onDeck.length > 0 ? /* @__PURE__ */
|
|
5436
|
+
onDeck.length > 0 ? /* @__PURE__ */ jsxs17("section", { className: "vos-ondeck", children: [
|
|
5296
5437
|
/* @__PURE__ */ jsx17("h3", { className: "vos-sectitle", children: "On deck" }),
|
|
5297
5438
|
onDeck.map((m) => /* @__PURE__ */ jsx17(
|
|
5298
5439
|
OnDeckRow,
|
|
@@ -5341,8 +5482,8 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5341
5482
|
] });
|
|
5342
5483
|
}
|
|
5343
5484
|
function NextMoveFrame({ children }) {
|
|
5344
|
-
return /* @__PURE__ */
|
|
5345
|
-
/* @__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: [
|
|
5346
5487
|
/* @__PURE__ */ jsx17("h1", { children: "Next move" }),
|
|
5347
5488
|
/* @__PURE__ */ jsx17("p", { children: "The single next move to make \u2014 and what's on deck." })
|
|
5348
5489
|
] }) }),
|
|
@@ -5358,14 +5499,14 @@ function ActButton({
|
|
|
5358
5499
|
if (pres.steppable) {
|
|
5359
5500
|
return /* @__PURE__ */ jsx17("button", { type: "button", className: "vos-btn vos-hero-act", onClick: onStepIn, children: pres.cta });
|
|
5360
5501
|
}
|
|
5361
|
-
return /* @__PURE__ */
|
|
5502
|
+
return /* @__PURE__ */ jsxs17("div", { className: "vos-hero-agent", children: [
|
|
5362
5503
|
/* @__PURE__ */ jsx17("span", { className: "vos-agent-note", children: "\u{1F916} Claude Code runs this off the dashboard" }),
|
|
5363
5504
|
/* @__PURE__ */ jsx17("button", { type: "button", className: "vos-btn vos-btn-ghost vos-hero-act", onClick: onReview, children: "Review on the record \u2192" })
|
|
5364
5505
|
] });
|
|
5365
5506
|
}
|
|
5366
5507
|
function KillBanner({ count, onReview }) {
|
|
5367
|
-
return /* @__PURE__ */
|
|
5368
|
-
/* @__PURE__ */
|
|
5508
|
+
return /* @__PURE__ */ jsxs17("div", { className: "vos-banner vos-banner-crit", children: [
|
|
5509
|
+
/* @__PURE__ */ jsxs17("div", { className: "vos-banner-body", children: [
|
|
5369
5510
|
/* @__PURE__ */ jsx17("b", { children: count === 1 ? "A belief has fallen into the kill lane" : `${count} beliefs have fallen into the kill lane` }),
|
|
5370
5511
|
/* @__PURE__ */ jsx17("span", { children: "Confidence \u2264 \u221250 \u2014 the evidence is against it. Kill it or test it again." })
|
|
5371
5512
|
] }),
|
|
@@ -5379,27 +5520,27 @@ function OnDeckRow({
|
|
|
5379
5520
|
}) {
|
|
5380
5521
|
const pres = movePresentation(move.move);
|
|
5381
5522
|
const tone = riskLevel(move.risk);
|
|
5382
|
-
return /* @__PURE__ */
|
|
5523
|
+
return /* @__PURE__ */ jsxs17("div", { className: "vos-ondeck-row", children: [
|
|
5383
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}%` } }) }),
|
|
5384
5525
|
/* @__PURE__ */ jsx17("button", { type: "button", className: "vos-ondeck-title", onClick: onOpen, children: move.title }),
|
|
5385
5526
|
/* @__PURE__ */ jsx17("button", { type: "button", className: "vos-pill vos-pill-accent vos-ondeck-act", onClick: onAct, children: pres.pill })
|
|
5386
5527
|
] });
|
|
5387
5528
|
}
|
|
5388
5529
|
function WhyPanel({ top, ranked }) {
|
|
5389
|
-
return /* @__PURE__ */
|
|
5530
|
+
return /* @__PURE__ */ jsxs17("div", { className: "vos-why-panel vos-next-why", children: [
|
|
5390
5531
|
/* @__PURE__ */ jsx17("p", { className: "vos-why-reason", children: top.reason }),
|
|
5391
|
-
/* @__PURE__ */
|
|
5532
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
5392
5533
|
/* @__PURE__ */ jsx17("div", { className: "vos-why-section-title", children: "Where it sits" }),
|
|
5393
5534
|
/* @__PURE__ */ jsx17(StageStepper, { move: top.move })
|
|
5394
5535
|
] }),
|
|
5395
|
-
/* @__PURE__ */
|
|
5536
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
5396
5537
|
/* @__PURE__ */ jsx17("div", { className: "vos-why-section-title", children: "Why it's on top" }),
|
|
5397
|
-
/* @__PURE__ */
|
|
5538
|
+
/* @__PURE__ */ jsxs17("p", { className: "vos-why-formula", children: [
|
|
5398
5539
|
"Ranked by ",
|
|
5399
5540
|
/* @__PURE__ */ jsx17("b", { children: "Feasibility \xD7 Risk" }),
|
|
5400
5541
|
" \u2014 Risk ",
|
|
5401
5542
|
/* @__PURE__ */ jsx17("b", { children: Math.round(top.risk) }),
|
|
5402
|
-
top.feasibility ? /* @__PURE__ */
|
|
5543
|
+
top.feasibility ? /* @__PURE__ */ jsxs17(Fragment10, { children: [
|
|
5403
5544
|
" ",
|
|
5404
5545
|
"\xD7 Feasibility ",
|
|
5405
5546
|
/* @__PURE__ */ jsx17("b", { children: top.feasibility })
|
|
@@ -5408,9 +5549,9 @@ function WhyPanel({ top, ranked }) {
|
|
|
5408
5549
|
"."
|
|
5409
5550
|
] })
|
|
5410
5551
|
] }),
|
|
5411
|
-
/* @__PURE__ */
|
|
5552
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
5412
5553
|
/* @__PURE__ */ jsx17("div", { className: "vos-why-section-title", children: "The ranking" }),
|
|
5413
|
-
/* @__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: [
|
|
5414
5555
|
/* @__PURE__ */ jsx17("span", { className: "vos-why-rank-title", children: m.title }),
|
|
5415
5556
|
/* @__PURE__ */ jsx17("span", { className: "vos-why-rank-score", children: Math.round(m.score) })
|
|
5416
5557
|
] }, m.assumptionId)) })
|
|
@@ -5430,7 +5571,7 @@ function StageStepper({ move }) {
|
|
|
5430
5571
|
}
|
|
5431
5572
|
|
|
5432
5573
|
// src/stage-grid-surface.tsx
|
|
5433
|
-
import { useMemo as useMemo6, useState as
|
|
5574
|
+
import { useMemo as useMemo6, useState as useState13 } from "react";
|
|
5434
5575
|
|
|
5435
5576
|
// src/stage-grid-model.ts
|
|
5436
5577
|
var STAGE_ORDER = [
|
|
@@ -5538,12 +5679,12 @@ function cellAt(view, lens, stage) {
|
|
|
5538
5679
|
}
|
|
5539
5680
|
|
|
5540
5681
|
// src/stage-grid-surface.tsx
|
|
5541
|
-
import { jsx as jsx18, jsxs as
|
|
5682
|
+
import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5542
5683
|
function StageGridSurface({ basePath, onNavigate }) {
|
|
5543
5684
|
const assumptions = useList("assumptions", basePath);
|
|
5544
5685
|
const loading = assumptions.loading;
|
|
5545
5686
|
const error = assumptions.error;
|
|
5546
|
-
const [open, setOpen] =
|
|
5687
|
+
const [open, setOpen] = useState13(null);
|
|
5547
5688
|
const view = useMemo6(
|
|
5548
5689
|
() => buildStageGrid(assumptions.records ?? []),
|
|
5549
5690
|
[assumptions.records]
|
|
@@ -5554,7 +5695,7 @@ function StageGridSurface({ basePath, onNavigate }) {
|
|
|
5554
5695
|
return /* @__PURE__ */ jsx18(StageGridFrame, { children: /* @__PURE__ */ jsx18("div", { className: "vos-empty", children: "Reading where your bets cluster\u2026" }) });
|
|
5555
5696
|
}
|
|
5556
5697
|
if (error) {
|
|
5557
|
-
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: [
|
|
5558
5699
|
/* @__PURE__ */ jsx18("b", { children: "Couldn't load the grid." }),
|
|
5559
5700
|
/* @__PURE__ */ jsx18("span", { children: error })
|
|
5560
5701
|
] }) }) });
|
|
@@ -5566,9 +5707,9 @@ function StageGridSurface({ basePath, onNavigate }) {
|
|
|
5566
5707
|
decisions: []
|
|
5567
5708
|
});
|
|
5568
5709
|
if (cold.cold) {
|
|
5569
|
-
return /* @__PURE__ */
|
|
5710
|
+
return /* @__PURE__ */ jsxs18(StageGridFrame, { children: [
|
|
5570
5711
|
/* @__PURE__ */ jsx18("div", { className: "vos-firstrun", children: FIRST_RUN_LINE }),
|
|
5571
|
-
/* @__PURE__ */
|
|
5712
|
+
/* @__PURE__ */ jsxs18("div", { className: "vos-card vos-cold vos-cold-stage-grid", children: [
|
|
5572
5713
|
/* @__PURE__ */ jsx18("span", { className: "vos-cold-eyebrow", children: "No bets yet" }),
|
|
5573
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." }),
|
|
5574
5715
|
/* @__PURE__ */ jsx18(
|
|
@@ -5583,17 +5724,17 @@ function StageGridSurface({ basePath, onNavigate }) {
|
|
|
5583
5724
|
] })
|
|
5584
5725
|
] });
|
|
5585
5726
|
}
|
|
5586
|
-
return /* @__PURE__ */
|
|
5587
|
-
/* @__PURE__ */
|
|
5588
|
-
/* @__PURE__ */ jsx18("div", { className: "vos-stage-grid-scroll", children: /* @__PURE__ */
|
|
5589
|
-
/* @__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: [
|
|
5590
5731
|
/* @__PURE__ */ jsx18("th", { scope: "col", className: "vos-stage-grid-corner", children: "Lens \u2193 / Stage \u2192" }),
|
|
5591
|
-
view.stages.map((stage) => /* @__PURE__ */
|
|
5732
|
+
view.stages.map((stage) => /* @__PURE__ */ jsxs18("th", { scope: "col", className: "vos-stage-grid-col", children: [
|
|
5592
5733
|
/* @__PURE__ */ jsx18("span", { className: "vos-stage-grid-stagename", children: stage }),
|
|
5593
5734
|
/* @__PURE__ */ jsx18("span", { className: "vos-stage-grid-stagegloss", children: STAGE_GLOSS[stage] })
|
|
5594
5735
|
] }, stage))
|
|
5595
5736
|
] }) }),
|
|
5596
|
-
/* @__PURE__ */ jsx18("tbody", { children: view.lenses.map((lens) => /* @__PURE__ */
|
|
5737
|
+
/* @__PURE__ */ jsx18("tbody", { children: view.lenses.map((lens) => /* @__PURE__ */ jsxs18("tr", { children: [
|
|
5597
5738
|
/* @__PURE__ */ jsx18("th", { scope: "row", className: "vos-stage-grid-rowhead", children: lens }),
|
|
5598
5739
|
view.stages.map((stage) => {
|
|
5599
5740
|
const cell = cellAt(view, lens, stage);
|
|
@@ -5627,14 +5768,14 @@ function StageGridFrame({
|
|
|
5627
5768
|
onNavigate,
|
|
5628
5769
|
children
|
|
5629
5770
|
}) {
|
|
5630
|
-
return /* @__PURE__ */
|
|
5631
|
-
/* @__PURE__ */
|
|
5632
|
-
/* @__PURE__ */
|
|
5771
|
+
return /* @__PURE__ */ jsxs18("div", { children: [
|
|
5772
|
+
/* @__PURE__ */ jsxs18("div", { className: "vos-head", children: [
|
|
5773
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
5633
5774
|
/* @__PURE__ */ jsx18("h1", { children: "Lens \xD7 Stage \u2014 where your bets cluster" }),
|
|
5634
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." })
|
|
5635
5776
|
] }),
|
|
5636
5777
|
/* @__PURE__ */ jsx18("div", { className: "vos-spacer" }),
|
|
5637
|
-
total !== void 0 ? /* @__PURE__ */
|
|
5778
|
+
total !== void 0 ? /* @__PURE__ */ jsxs18("span", { className: "vos-hint vos-stage-grid-total", children: [
|
|
5638
5779
|
total,
|
|
5639
5780
|
" ",
|
|
5640
5781
|
total === 1 ? "belief" : "beliefs"
|
|
@@ -5696,17 +5837,17 @@ function CellDrawer({
|
|
|
5696
5837
|
onOpenRecord,
|
|
5697
5838
|
onNavigate
|
|
5698
5839
|
}) {
|
|
5699
|
-
return /* @__PURE__ */
|
|
5840
|
+
return /* @__PURE__ */ jsxs18(
|
|
5700
5841
|
DrawerShell,
|
|
5701
5842
|
{
|
|
5702
5843
|
open: cell !== null,
|
|
5703
5844
|
onClose,
|
|
5704
5845
|
ariaLabel: cell ? `${cell.lens} \xD7 ${cell.stage} \u2014 ${cell.count} ${cell.count === 1 ? "belief" : "beliefs"}` : "Cell drill-through",
|
|
5705
5846
|
children: [
|
|
5706
|
-
/* @__PURE__ */
|
|
5707
|
-
/* @__PURE__ */
|
|
5847
|
+
/* @__PURE__ */ jsxs18("header", { className: "vos-drawer-header", children: [
|
|
5848
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
5708
5849
|
/* @__PURE__ */ jsx18("p", { className: "vos-drawer-eyebrow", children: "Lens \xD7 Stage" }),
|
|
5709
|
-
/* @__PURE__ */
|
|
5850
|
+
/* @__PURE__ */ jsxs18("h2", { className: "vos-drawer-title", children: [
|
|
5710
5851
|
cell?.lens,
|
|
5711
5852
|
" \xD7 ",
|
|
5712
5853
|
cell?.stage
|
|
@@ -5783,7 +5924,7 @@ function formatRoute(route) {
|
|
|
5783
5924
|
}
|
|
5784
5925
|
|
|
5785
5926
|
// src/sidebar-nav.tsx
|
|
5786
|
-
import { jsx as jsx19, jsxs as
|
|
5927
|
+
import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5787
5928
|
function SidebarNav({
|
|
5788
5929
|
route,
|
|
5789
5930
|
onNavigate,
|
|
@@ -5792,12 +5933,12 @@ function SidebarNav({
|
|
|
5792
5933
|
registers
|
|
5793
5934
|
}) {
|
|
5794
5935
|
const activeRegister = route.name === "records" ? route.register : null;
|
|
5795
|
-
return /* @__PURE__ */
|
|
5796
|
-
/* @__PURE__ */
|
|
5936
|
+
return /* @__PURE__ */ jsxs19("nav", { className: "vos-nav", "aria-label": "Navigation", children: [
|
|
5937
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
5797
5938
|
/* @__PURE__ */ jsx19("div", { className: "vos-nav-group", children: "Workflow" }),
|
|
5798
5939
|
WORKFLOW_NAV.map((item) => {
|
|
5799
5940
|
const active = route.name === item.route;
|
|
5800
|
-
return /* @__PURE__ */
|
|
5941
|
+
return /* @__PURE__ */ jsxs19(
|
|
5801
5942
|
"button",
|
|
5802
5943
|
{
|
|
5803
5944
|
type: "button",
|
|
@@ -5814,11 +5955,11 @@ function SidebarNav({
|
|
|
5814
5955
|
);
|
|
5815
5956
|
})
|
|
5816
5957
|
] }),
|
|
5817
|
-
/* @__PURE__ */
|
|
5958
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
5818
5959
|
/* @__PURE__ */ jsx19("div", { className: "vos-nav-group", children: "Records" }),
|
|
5819
5960
|
registers.map((register) => {
|
|
5820
5961
|
const active = register === activeRegister;
|
|
5821
|
-
return /* @__PURE__ */
|
|
5962
|
+
return /* @__PURE__ */ jsxs19(
|
|
5822
5963
|
"button",
|
|
5823
5964
|
{
|
|
5824
5965
|
type: "button",
|
|
@@ -5847,12 +5988,12 @@ function SidebarNav({
|
|
|
5847
5988
|
}
|
|
5848
5989
|
|
|
5849
5990
|
// src/use-counts.ts
|
|
5850
|
-
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";
|
|
5851
5992
|
function useCounts(basePath = "/api") {
|
|
5852
|
-
const [counts, setCounts] =
|
|
5853
|
-
const [loading, setLoading] =
|
|
5854
|
-
const [error, setError] =
|
|
5855
|
-
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);
|
|
5856
5997
|
useEffect5(() => {
|
|
5857
5998
|
let live = true;
|
|
5858
5999
|
setLoading(true);
|
|
@@ -5880,7 +6021,7 @@ function useNeedsHuman(basePath = "/api") {
|
|
|
5880
6021
|
const assumptions = useList("assumptions", basePath);
|
|
5881
6022
|
const experiments = useList("experiments", basePath);
|
|
5882
6023
|
const decisions = useList("decisions", basePath);
|
|
5883
|
-
const [asOf] =
|
|
6024
|
+
const [asOf] = useState14(() => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10));
|
|
5884
6025
|
return useMemo7(() => {
|
|
5885
6026
|
const counts = needsHumanCounts({
|
|
5886
6027
|
asOf,
|
|
@@ -5892,12 +6033,13 @@ function useNeedsHuman(basePath = "/api") {
|
|
|
5892
6033
|
if (counts.killLane > 0) byRegister.assumptions = counts.killLane;
|
|
5893
6034
|
if (counts.overdue > 0) byRegister.experiments = counts.overdue;
|
|
5894
6035
|
if (counts.inTension > 0) byRegister.decisions = counts.inTension;
|
|
5895
|
-
|
|
6036
|
+
const liveExperimentCount = experiments.records ? liveExperiments(experiments.records).length : null;
|
|
6037
|
+
return { counts, byRegister, liveExperimentCount };
|
|
5896
6038
|
}, [asOf, assumptions.records, experiments.records, decisions.records]);
|
|
5897
6039
|
}
|
|
5898
6040
|
|
|
5899
6041
|
// src/dashboard-app.tsx
|
|
5900
|
-
import { jsx as jsx20, jsxs as
|
|
6042
|
+
import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5901
6043
|
function initialsOf(name) {
|
|
5902
6044
|
const parts = name.trim().split(/\s+/);
|
|
5903
6045
|
const first = parts[0]?.[0] ?? "";
|
|
@@ -5913,11 +6055,12 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
5913
6055
|
user,
|
|
5914
6056
|
registers = REGISTER_ORDER
|
|
5915
6057
|
} = config;
|
|
5916
|
-
const [route, setRoute] =
|
|
6058
|
+
const [route, setRoute] = useState15(
|
|
5917
6059
|
() => typeof window === "undefined" ? { name: "next" } : parseRoute(window.location.hash, registers)
|
|
5918
6060
|
);
|
|
5919
6061
|
const { counts } = useCounts(basePath);
|
|
5920
|
-
const { byRegister: needsHuman } = useNeedsHuman(basePath);
|
|
6062
|
+
const { byRegister: needsHuman, liveExperimentCount } = useNeedsHuman(basePath);
|
|
6063
|
+
const navCounts = counts && liveExperimentCount !== null ? { ...counts, experiments: liveExperimentCount } : counts;
|
|
5921
6064
|
useEffect6(() => {
|
|
5922
6065
|
if (typeof window === "undefined") return;
|
|
5923
6066
|
const onHash = () => setRoute(parseRoute(window.location.hash, registers));
|
|
@@ -5939,27 +6082,27 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
5939
6082
|
}, []);
|
|
5940
6083
|
const brandName = branding?.name ?? "Validation-OS";
|
|
5941
6084
|
const brandMark = branding?.initials ?? "V";
|
|
5942
|
-
return /* @__PURE__ */
|
|
5943
|
-
/* @__PURE__ */
|
|
6085
|
+
return /* @__PURE__ */ jsxs20("div", { className: "vos-app", children: [
|
|
6086
|
+
/* @__PURE__ */ jsxs20("div", { className: "vos-brand", children: [
|
|
5944
6087
|
/* @__PURE__ */ jsx20("span", { className: "vos-brand-dot", children: branding?.logoUrl ? /* @__PURE__ */ jsx20("img", { src: branding.logoUrl, alt: "" }) : brandMark }),
|
|
5945
6088
|
" ",
|
|
5946
6089
|
brandName
|
|
5947
6090
|
] }),
|
|
5948
|
-
/* @__PURE__ */
|
|
5949
|
-
backendLabel ? /* @__PURE__ */
|
|
6091
|
+
/* @__PURE__ */ jsxs20("div", { className: "vos-topbar", children: [
|
|
6092
|
+
backendLabel ? /* @__PURE__ */ jsxs20("div", { className: "vos-backend", children: [
|
|
5950
6093
|
/* @__PURE__ */ jsx20("span", { className: "vos-live-dot" }),
|
|
5951
6094
|
" Backend: ",
|
|
5952
6095
|
/* @__PURE__ */ jsx20("b", { children: backendLabel })
|
|
5953
6096
|
] }) : null,
|
|
5954
|
-
agentLabel ? /* @__PURE__ */
|
|
6097
|
+
agentLabel ? /* @__PURE__ */ jsxs20("span", { className: "vos-hint", children: [
|
|
5955
6098
|
"Agent: ",
|
|
5956
6099
|
/* @__PURE__ */ jsx20("b", { style: { color: "var(--vos-text)" }, children: agentLabel })
|
|
5957
6100
|
] }) : null,
|
|
5958
6101
|
/* @__PURE__ */ jsx20("div", { className: "vos-spacer" }),
|
|
5959
6102
|
/* @__PURE__ */ jsx20("button", { type: "button", className: "vos-iconbtn", onClick: toggleTheme, children: "\u25D0 Theme" }),
|
|
5960
|
-
user?.name ? /* @__PURE__ */
|
|
6103
|
+
user?.name ? /* @__PURE__ */ jsxs20("div", { className: "vos-user", children: [
|
|
5961
6104
|
/* @__PURE__ */ jsx20("span", { className: "vos-avatar", children: initialsOf(user.name) }),
|
|
5962
|
-
/* @__PURE__ */
|
|
6105
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
5963
6106
|
/* @__PURE__ */ jsx20("span", { className: "vos-user-name", children: user.name }),
|
|
5964
6107
|
user.caption ? /* @__PURE__ */ jsx20("small", { children: user.caption }) : null
|
|
5965
6108
|
] })
|
|
@@ -5970,7 +6113,7 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
5970
6113
|
{
|
|
5971
6114
|
route,
|
|
5972
6115
|
onNavigate: navigate,
|
|
5973
|
-
counts,
|
|
6116
|
+
counts: navCounts,
|
|
5974
6117
|
needsHuman,
|
|
5975
6118
|
registers
|
|
5976
6119
|
}
|
|
@@ -6030,15 +6173,15 @@ function composeConnectCommand(input) {
|
|
|
6030
6173
|
}
|
|
6031
6174
|
|
|
6032
6175
|
// src/connect-claude-code.tsx
|
|
6033
|
-
import { useState as
|
|
6034
|
-
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";
|
|
6035
6178
|
function ConnectClaudeCode({
|
|
6036
6179
|
apiBaseUrl,
|
|
6037
6180
|
tokenEnv,
|
|
6038
6181
|
mintToken
|
|
6039
6182
|
}) {
|
|
6040
|
-
const [state, setState] =
|
|
6041
|
-
const [copied, setCopied] =
|
|
6183
|
+
const [state, setState] = useState16({ phase: "idle" });
|
|
6184
|
+
const [copied, setCopied] = useState16(false);
|
|
6042
6185
|
async function generate() {
|
|
6043
6186
|
setState({ phase: "minting" });
|
|
6044
6187
|
setCopied(false);
|
|
@@ -6060,15 +6203,15 @@ function ConnectClaudeCode({
|
|
|
6060
6203
|
} catch {
|
|
6061
6204
|
}
|
|
6062
6205
|
}
|
|
6063
|
-
return /* @__PURE__ */
|
|
6064
|
-
/* @__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: [
|
|
6065
6208
|
/* @__PURE__ */ jsx21("h1", { children: "Connect Claude Code" }),
|
|
6066
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." })
|
|
6067
6210
|
] }) }),
|
|
6068
|
-
/* @__PURE__ */
|
|
6211
|
+
/* @__PURE__ */ jsxs21("ol", { className: "vos-hint", style: { lineHeight: 1.8 }, children: [
|
|
6069
6212
|
/* @__PURE__ */ jsx21("li", { children: "Generate your personal connection command below." }),
|
|
6070
6213
|
/* @__PURE__ */ jsx21("li", { children: "Paste it into a terminal in the workspace you'll run the skills in." }),
|
|
6071
|
-
/* @__PURE__ */
|
|
6214
|
+
/* @__PURE__ */ jsxs21("li", { children: [
|
|
6072
6215
|
"The command carries a token tied to ",
|
|
6073
6216
|
/* @__PURE__ */ jsx21("strong", { children: "you" }),
|
|
6074
6217
|
" \u2014 anything you write lands under your name. Don't share it."
|
|
@@ -6085,9 +6228,9 @@ function ConnectClaudeCode({
|
|
|
6085
6228
|
}
|
|
6086
6229
|
) : null,
|
|
6087
6230
|
state.phase === "error" ? /* @__PURE__ */ jsx21("p", { className: "vos-hint", role: "alert", children: state.message }) : null,
|
|
6088
|
-
state.phase === "ready" ? /* @__PURE__ */
|
|
6231
|
+
state.phase === "ready" ? /* @__PURE__ */ jsxs21("div", { children: [
|
|
6089
6232
|
/* @__PURE__ */ jsx21("pre", { className: "vos-code", "aria-label": "Connection command", children: state.command }),
|
|
6090
|
-
/* @__PURE__ */
|
|
6233
|
+
/* @__PURE__ */ jsxs21("div", { style: { display: "flex", gap: 8 }, children: [
|
|
6091
6234
|
/* @__PURE__ */ jsx21(
|
|
6092
6235
|
"button",
|
|
6093
6236
|
{
|
|
@@ -6105,14 +6248,14 @@ function ConnectClaudeCode({
|
|
|
6105
6248
|
}
|
|
6106
6249
|
|
|
6107
6250
|
// src/surface-placeholder.tsx
|
|
6108
|
-
import { jsx as jsx22, jsxs as
|
|
6251
|
+
import { jsx as jsx22, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6109
6252
|
function SurfacePlaceholder({
|
|
6110
6253
|
title,
|
|
6111
6254
|
subtitle,
|
|
6112
6255
|
detail
|
|
6113
6256
|
}) {
|
|
6114
|
-
return /* @__PURE__ */
|
|
6115
|
-
/* @__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: [
|
|
6116
6259
|
/* @__PURE__ */ jsx22("h1", { children: title }),
|
|
6117
6260
|
/* @__PURE__ */ jsx22("p", { children: subtitle })
|
|
6118
6261
|
] }) }),
|
|
@@ -6121,7 +6264,7 @@ function SurfacePlaceholder({
|
|
|
6121
6264
|
}
|
|
6122
6265
|
|
|
6123
6266
|
// src/register-counts.tsx
|
|
6124
|
-
import { jsx as jsx23, jsxs as
|
|
6267
|
+
import { jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6125
6268
|
function RegisterCounts({
|
|
6126
6269
|
counts,
|
|
6127
6270
|
caption,
|
|
@@ -6131,7 +6274,7 @@ function RegisterCounts({
|
|
|
6131
6274
|
const registers = REGISTER_ORDER.filter(
|
|
6132
6275
|
(r) => counts[r] !== void 0
|
|
6133
6276
|
);
|
|
6134
|
-
return /* @__PURE__ */
|
|
6277
|
+
return /* @__PURE__ */ jsxs23("section", { "aria-label": "Register counts", children: [
|
|
6135
6278
|
/* @__PURE__ */ jsx23("div", { className: "vos-tile-grid", children: registers.map((register) => /* @__PURE__ */ jsx23(
|
|
6136
6279
|
StatTile,
|
|
6137
6280
|
{
|