@thehammer/template-verification 0.2.3 → 0.2.4

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.
@@ -1,7 +1,7 @@
1
- import { ref as U, watch as ce, defineComponent as H, computed as d, openBlock as l, createElementBlock as o, normalizeClass as R, createElementVNode as i, toDisplayString as m, createCommentVNode as b, createBlock as N, unref as r, withCtx as I, createTextVNode as T, createVNode as D, Fragment as L, renderList as P, withKeys as Ue, withModifiers as Ne, renderSlot as Re, withDirectives as Ae, isRef as ge, vModelCheckbox as Le } from "vue";
2
- import { DanxChip as J, CodeViewer as xe, useToast as _e, DanxDialog as re, DanxProgressBar as we, DanxAlert as ye, DanxTabs as je, MarkdownEditor as Ee, DanxFileViewer as be, DanxButton as se, DanxInput as ze, DanxSkeleton as Pe, DanxTooltip as Me, DanxIcon as Be, gearIcon as Fe, DanxBadge as qe, DanxToastContainer as Ye } from "@thehammer/danx-ui";
3
- const z = "tv-chrome", ke = "template-verification:enabled";
4
- let te = null;
1
+ import { ref as U, watch as ve, defineComponent as H, computed as d, openBlock as l, createElementBlock as o, normalizeClass as R, createElementVNode as i, toDisplayString as m, createCommentVNode as b, createBlock as N, unref as r, withCtx as I, createTextVNode as T, createVNode as D, Fragment as L, renderList as P, withKeys as Ne, withModifiers as te, renderSlot as Re, withDirectives as Ae, isRef as xe, vModelCheckbox as Le } from "vue";
2
+ import { DanxChip as J, CodeViewer as ye, useToast as we, DanxDialog as ie, DanxProgressBar as ke, DanxAlert as be, DanxTabs as je, MarkdownEditor as Ee, DanxFileViewer as he, DanxButton as re, DanxInput as ze, DanxSkeleton as Pe, DanxTooltip as Me, DanxIcon as Be, gearIcon as Fe, DanxBadge as qe, DanxToastContainer as Ye } from "@thehammer/danx-ui";
3
+ const z = "tv-chrome", $e = "template-verification:enabled";
4
+ let ae = null;
5
5
  function Je(e) {
6
6
  var t;
7
7
  try {
@@ -18,14 +18,14 @@ function Ke(e, t) {
18
18
  }
19
19
  }
20
20
  function He(e) {
21
- const t = Je(ke);
21
+ const t = Je($e);
22
22
  return t === null ? e : t === "true";
23
23
  }
24
- function $e(e) {
24
+ function Se(e) {
25
25
  const t = U(He((e == null ? void 0 : e.defaultEnabled) ?? !1));
26
- return ce(
26
+ return ve(
27
27
  t,
28
- (a) => Ke(ke, a ? "true" : "false")
28
+ (a) => Ke($e, a ? "true" : "false")
29
29
  ), {
30
30
  enabled: t,
31
31
  data: (e == null ? void 0 : e.data) ?? {},
@@ -35,14 +35,14 @@ function $e(e) {
35
35
  comparisonOpen: U(!1)
36
36
  };
37
37
  }
38
- function Se() {
39
- return te || (te = $e()), te;
38
+ function Ce() {
39
+ return ae || (ae = Se()), ae;
40
40
  }
41
41
  function ha(e) {
42
- te = $e(e);
42
+ ae = Se(e);
43
43
  }
44
- function le() {
45
- const e = Se();
44
+ function ne() {
45
+ const e = Ce();
46
46
  return {
47
47
  enabled: e.enabled,
48
48
  data: e.data,
@@ -55,9 +55,9 @@ function le() {
55
55
  };
56
56
  }
57
57
  function Ge() {
58
- return Se().comparisonOpen;
58
+ return Ce().comparisonOpen;
59
59
  }
60
- function ve(e) {
60
+ function fe(e) {
61
61
  return typeof e != "number" || Number.isNaN(e) ? "unverifiable" : e <= 2 ? "low" : e === 3 ? "medium" : "high";
62
62
  }
63
63
  const Qe = {
@@ -65,66 +65,66 @@ const Qe = {
65
65
  medium: "bg-yellow-50 text-yellow-700 ring-1 ring-inset ring-yellow-600/20",
66
66
  low: "bg-red-50 text-red-700 ring-1 ring-inset ring-red-600/20",
67
67
  unverifiable: "bg-gray-50 text-gray-500 ring-1 ring-inset ring-gray-400/20"
68
- }, ae = {
68
+ }, le = {
69
69
  high: "High",
70
70
  medium: "Medium",
71
71
  low: "Low",
72
72
  unverifiable: "Unverifiable"
73
- }, Ce = ["override", "extracted", "claim"];
74
- function fe(e) {
73
+ }, Ve = ["override", "extracted", "claim"];
74
+ function pe(e) {
75
75
  return e ? e.resolved && e.resolved.source && e.resolved.source !== "none" ? e.resolved : We(e.candidates) : { value: null, source: "none" };
76
76
  }
77
77
  function We(e) {
78
78
  if (e)
79
- for (const t of Ce) {
79
+ for (const t of Ve) {
80
80
  const a = e[t];
81
81
  if (a != null)
82
82
  return { value: a.value, source: t };
83
83
  }
84
84
  return { value: null, source: "none" };
85
85
  }
86
- function ie(e) {
86
+ function oe(e) {
87
87
  var g, p;
88
88
  const t = (p = (g = e == null ? void 0 : e.candidates) == null ? void 0 : g.extracted) == null ? void 0 : p.reasoning;
89
89
  if (t == null) return null;
90
90
  const a = String(t).trim();
91
91
  return a === "" ? null : a;
92
92
  }
93
- function oe(e) {
93
+ function ue(e) {
94
94
  var g, p;
95
95
  const t = (p = (g = e == null ? void 0 : e.candidates) == null ? void 0 : g.extracted) == null ? void 0 : p.cited_text;
96
96
  if (t == null) return null;
97
97
  const a = String(t).trim();
98
98
  return a === "" ? null : a;
99
99
  }
100
- function Ve(e) {
100
+ function De(e) {
101
101
  return e ? typeof e.discrepancy == "boolean" ? e.discrepancy : Xe(e.candidates) : !1;
102
102
  }
103
103
  function Xe(e) {
104
104
  if (!e) return !1;
105
- const t = Ce.map((a) => e[a]).filter((a) => a != null).map((a) => Ze(a.value));
105
+ const t = Ve.map((a) => e[a]).filter((a) => a != null).map((a) => Ze(a.value));
106
106
  return t.length < 2 ? !1 : new Set(t).size > 1;
107
107
  }
108
108
  function Ze(e) {
109
109
  return JSON.stringify(e ?? null);
110
110
  }
111
111
  const et = /* @__PURE__ */ new Set(["name", "type"]);
112
- function De(e, t = "") {
112
+ function Oe(e, t = "") {
113
113
  const a = [];
114
- return ue(e, t, a), a;
114
+ return de(e, t, a), a;
115
115
  }
116
- function ue(e, t, a) {
116
+ function de(e, t, a) {
117
117
  if (Array.isArray(e)) {
118
- e.forEach((n, y) => ue(n, `${t}[${y}]`, a));
118
+ e.forEach((n, y) => de(n, `${t}[${y}]`, a));
119
119
  return;
120
120
  }
121
- if (!he(e)) return;
121
+ if (!_e(e)) return;
122
122
  const p = e.__meta ?? {};
123
123
  for (const [n, y] of Object.entries(e)) {
124
124
  if (n === "__meta") continue;
125
125
  const s = t ? `${t}.${n}` : n;
126
- if (Array.isArray(y) || he(y)) {
127
- ue(y, s, a);
126
+ if (Array.isArray(y) || _e(y)) {
127
+ de(y, s, a);
128
128
  continue;
129
129
  }
130
130
  const h = p[n];
@@ -137,17 +137,17 @@ function ue(e, t, a) {
137
137
  });
138
138
  }
139
139
  }
140
- function he(e) {
140
+ function _e(e) {
141
141
  return typeof e == "object" && e !== null && !Array.isArray(e);
142
142
  }
143
- function Oe(e) {
143
+ function Ie(e) {
144
144
  var a;
145
145
  if (e.candidates.override) return !1;
146
146
  const t = (a = e.candidates.extracted) == null ? void 0 : a.confidence;
147
147
  return e.discrepancy || t == null || t <= 2;
148
148
  }
149
149
  function tt(e) {
150
- const t = De(e).filter(
150
+ const t = Oe(e).filter(
151
151
  (n) => n.meta !== null
152
152
  ), a = t.length;
153
153
  let g = 0, p = 0;
@@ -156,7 +156,7 @@ function tt(e) {
156
156
  g++;
157
157
  continue;
158
158
  }
159
- Oe(n.meta) && p++;
159
+ Ie(n.meta) && p++;
160
160
  }
161
161
  return {
162
162
  total: a,
@@ -188,7 +188,7 @@ const lt = ["data-status", "title"], nt = {
188
188
  }, st = {
189
189
  key: 0,
190
190
  class: "tv-confidence-label"
191
- }, de = /* @__PURE__ */ H({
191
+ }, ce = /* @__PURE__ */ H({
192
192
  __name: "ConfidenceIcon",
193
193
  props: {
194
194
  confidence: {},
@@ -197,7 +197,7 @@ const lt = ["data-status", "title"], nt = {
197
197
  },
198
198
  setup(e) {
199
199
  const t = e, a = d(
200
- () => t.status ?? ve(t.confidence)
200
+ () => t.status ?? fe(t.confidence)
201
201
  ), g = {
202
202
  high: "✔",
203
203
  // check
@@ -206,7 +206,7 @@ const lt = ["data-status", "title"], nt = {
206
206
  low: "✕",
207
207
  // x
208
208
  unverifiable: "?"
209
- }, p = d(() => g[a.value]), n = d(() => Qe[a.value]), y = d(() => ae[a.value]);
209
+ }, p = d(() => g[a.value]), n = d(() => Qe[a.value]), y = d(() => le[a.value]);
210
210
  return (s, h) => (l(), o("span", {
211
211
  class: R(["tv-confidence-icon inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-semibold leading-none", n.value]),
212
212
  "data-status": a.value,
@@ -228,7 +228,7 @@ async function rt(e, t) {
228
228
  );
229
229
  return (await n.json()).data ?? [];
230
230
  }
231
- function Ie(e) {
231
+ function Te(e) {
232
232
  var a, g, p;
233
233
  if (!e || e.length === 0) return [];
234
234
  const t = /* @__PURE__ */ new Map();
@@ -338,7 +338,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
338
338
  i("div", mt, [
339
339
  i("div", null, [
340
340
  h[1] || (h[1] = i("div", { class: "mb-1 text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Request ", -1)),
341
- D(r(xe), {
341
+ D(r(ye), {
342
342
  "model-value": n.value,
343
343
  format: "json",
344
344
  collapsible: "",
@@ -348,7 +348,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
348
348
  ]),
349
349
  i("div", null, [
350
350
  h[2] || (h[2] = i("div", { class: "mb-1 text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Response ", -1)),
351
- D(r(xe), {
351
+ D(r(ye), {
352
352
  "model-value": y.value,
353
353
  format: "json",
354
354
  collapsible: "",
@@ -408,15 +408,15 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
408
408
  },
409
409
  emits: ["update:modelValue", "saved"],
410
410
  setup(e, { emit: t }) {
411
- const a = e, g = t, p = le(), n = _e(), y = d({
411
+ const a = e, g = t, p = ne(), n = we(), y = d({
412
412
  get: () => a.modelValue,
413
413
  set: (v) => g("update:modelValue", v)
414
- }), s = d(() => fe(a.meta)), h = d(() => a.meta.candidates.extracted), $ = d(() => a.meta.candidates.claim), _ = d(() => a.meta.candidates.override), x = d(() => {
414
+ }), s = d(() => pe(a.meta)), h = d(() => a.meta.candidates.extracted), $ = d(() => a.meta.candidates.claim), _ = d(() => a.meta.candidates.override), x = d(() => {
415
415
  var v;
416
416
  return ((v = h.value) == null ? void 0 : v.confidence) ?? null;
417
- }), k = d(() => ve(x.value)), S = d(() => ie(a.meta)), A = d(() => oe(a.meta)), O = d(() => {
417
+ }), k = d(() => fe(x.value)), S = d(() => oe(a.meta)), A = d(() => ue(a.meta)), O = d(() => {
418
418
  var v;
419
- return Ie((v = h.value) == null ? void 0 : v.sources);
419
+ return Te((v = h.value) == null ? void 0 : v.sources);
420
420
  }), M = d(() => (a.meta.anchor.field_path || a.label || "Data point").split(".").map(
421
421
  (u) => u.replace(/\[\d+\]/g, "").replace(/_/g, " ").replace(/^\w/, (C) => C.toUpperCase())
422
422
  ).join(" › ")), B = {
@@ -484,10 +484,10 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
484
484
  title: "Extracted",
485
485
  variant: B[k.value],
486
486
  value: h.value.value,
487
- detail: x.value != null ? `Confidence ${x.value}/5 · ${ae[k.value]}` : "No confidence recorded",
487
+ detail: x.value != null ? `Confidence ${x.value}/5 · ${le[k.value]}` : "No confidence recorded",
488
488
  accept: a.save ? () => {
489
489
  var u;
490
- return ne(pe((u = h.value) == null ? void 0 : u.value), "extracted");
490
+ return se(me((u = h.value) == null ? void 0 : u.value), "extracted");
491
491
  } : void 0,
492
492
  winner: s.value.source === "extracted"
493
493
  }), $.value && v.push({
@@ -498,12 +498,12 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
498
498
  detail: $.value.claim_set_label ?? "Reference output",
499
499
  accept: a.save ? () => {
500
500
  var u;
501
- return ne(pe((u = $.value) == null ? void 0 : u.value), "claim");
501
+ return se(me((u = $.value) == null ? void 0 : u.value), "claim");
502
502
  } : void 0,
503
503
  winner: s.value.source === "claim"
504
504
  }), v;
505
505
  }), q = U(""), E = U(!1);
506
- async function ne(v, u) {
506
+ async function se(v, u) {
507
507
  if (!(!a.save || E.value)) {
508
508
  E.value = !0;
509
509
  try {
@@ -516,15 +516,15 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
516
516
  }
517
517
  }
518
518
  }
519
- const Te = () => ne(q.value, "custom");
520
- function pe(v) {
519
+ const Ue = () => se(q.value, "custom");
520
+ function me(v) {
521
521
  return v == null ? null : String(v);
522
522
  }
523
- function me(v) {
523
+ function ge(v) {
524
524
  return v == null ? "—" : String(v);
525
525
  }
526
526
  const Y = U(null), Z = U(!1), ee = U(null);
527
- return ce(
527
+ return ve(
528
528
  [j, y],
529
529
  async ([v, u]) => {
530
530
  if (!(v !== "audit" || !u || Y.value !== null || Z.value) && p.auditUrl) {
@@ -543,7 +543,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
543
543
  },
544
544
  { immediate: !0 }
545
545
  ), (v, u) => (l(), o(L, null, [
546
- D(r(re), {
546
+ D(r(ie), {
547
547
  modelValue: y.value,
548
548
  "onUpdate:modelValue": u[3] || (u[3] = (C) => y.value = C),
549
549
  title: M.value,
@@ -560,7 +560,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
560
560
  i("div", bt, [
561
561
  i("div", ht, [
562
562
  u[6] || (u[6] = i("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Resolved value ", -1)),
563
- i("div", _t, m(me(s.value.value)), 1),
563
+ i("div", _t, m(ge(s.value.value)), 1),
564
564
  i("div", wt, [
565
565
  u[5] || (u[5] = T(" source of truth: ", -1)),
566
566
  i("span", kt, m(s.value.source), 1)
@@ -569,7 +569,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
569
569
  i("div", $t, [
570
570
  u[7] || (u[7] = i("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Extraction confidence ", -1)),
571
571
  i("div", St, [
572
- x.value != null ? (l(), N(r(we), {
572
+ x.value != null ? (l(), N(r(ke), {
573
573
  key: 0,
574
574
  value: x.value,
575
575
  max: 5,
@@ -589,10 +589,10 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
589
589
  "text-red-600": k.value === "low",
590
590
  "text-gray-400": k.value === "unverifiable"
591
591
  }])
592
- }, m(r(ae)[k.value]), 3)
592
+ }, m(r(le)[k.value]), 3)
593
593
  ])
594
594
  ]),
595
- e.meta.discrepancy ? (l(), N(r(ye), {
595
+ e.meta.discrepancy ? (l(), N(r(be), {
596
596
  key: 0,
597
597
  variant: "warning",
598
598
  class: "tv-discrepancy"
@@ -635,7 +635,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
635
635
  }, 8, ["variant"])
636
636
  ])) : b("", !0),
637
637
  F.value.length ? (l(), o("div", It, [
638
- D(r(be), {
638
+ D(r(he), {
639
639
  file: F.value[0],
640
640
  "file-in-preview": Q.value,
641
641
  "onUpdate:fileInPreview": u[1] || (u[1] = (c) => Q.value = c),
@@ -650,7 +650,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
650
650
  ])) : (l(), o("div", Ut, " No source pages recorded for this data point ")),
651
651
  w.value.length ? (l(), o("div", Nt, [
652
652
  u[10] || (u[10] = i("span", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, "Full documents:", -1)),
653
- (l(!0), o(L, null, P(w.value, (c) => (l(), N(r(se), {
653
+ (l(!0), o(L, null, P(w.value, (c) => (l(), N(r(re), {
654
654
  key: String(c.id),
655
655
  size: "sm",
656
656
  variant: "info",
@@ -696,10 +696,10 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
696
696
  _: 1
697
697
  })) : b("", !0)
698
698
  ]),
699
- i("div", Et, m(me(c.value)), 1),
699
+ i("div", Et, m(ge(c.value)), 1),
700
700
  i("div", zt, m(c.detail), 1)
701
701
  ]),
702
- c.accept && !c.winner ? (l(), N(r(se), {
702
+ c.accept && !c.winner ? (l(), N(r(re), {
703
703
  key: 0,
704
704
  size: "sm",
705
705
  variant: c.variant,
@@ -723,13 +723,13 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
723
723
  placeholder: "Type the correct value…",
724
724
  disabled: E.value
725
725
  }, null, 8, ["modelValue", "disabled"]),
726
- D(r(se), {
726
+ D(r(re), {
727
727
  variant: "success",
728
728
  size: "sm",
729
729
  class: "tv-accept-custom",
730
730
  loading: E.value,
731
731
  disabled: !q.value,
732
- onClick: Te
732
+ onClick: Ue
733
733
  }, {
734
734
  default: I(() => [...u[13] || (u[13] = [
735
735
  T("Save custom value", -1)
@@ -743,7 +743,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
743
743
  key: c,
744
744
  shape: "rounded",
745
745
  class: "tv-audit-skeleton h-24 w-full"
746
- })), 64)) : ee.value ? (l(), N(r(ye), {
746
+ })), 64)) : ee.value ? (l(), N(r(be), {
747
747
  key: 1,
748
748
  variant: "danger",
749
749
  class: "tv-audit-error"
@@ -762,7 +762,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
762
762
  }),
763
763
  _: 1
764
764
  }, 8, ["modelValue", "title", "class"]),
765
- V.value ? (l(), N(r(re), {
765
+ V.value ? (l(), N(r(ie), {
766
766
  key: 0,
767
767
  modelValue: K.value,
768
768
  "onUpdate:modelValue": u[4] || (u[4] = (C) => K.value = C),
@@ -773,7 +773,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
773
773
  class: R(r(z))
774
774
  }, {
775
775
  default: I(() => [
776
- D(r(be), {
776
+ D(r(he), {
777
777
  file: V.value,
778
778
  downloadable: "",
779
779
  zoomable: "",
@@ -801,10 +801,10 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
801
801
  format: { type: Function }
802
802
  },
803
803
  setup(e) {
804
- const t = e, a = le(), g = d(() => a.enabled.value), p = U(null), n = d(() => {
804
+ const t = e, a = ne(), g = d(() => a.enabled.value), p = U(null), n = d(() => {
805
805
  var f;
806
806
  return p.value ? p.value : t.source && t.field ? ((f = t.source.__meta) == null ? void 0 : f[t.field]) ?? null : null;
807
- }), y = d(() => fe(n.value)), s = d(() => {
807
+ }), y = d(() => pe(n.value)), s = d(() => {
808
808
  if (t.original !== void 0 && t.original !== null)
809
809
  return t.original;
810
810
  if (n.value && y.value.value !== null && y.value.value !== void 0)
@@ -816,9 +816,9 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
816
816
  }), $ = d(
817
817
  () => {
818
818
  var f, w, V;
819
- return ve((V = (w = (f = n.value) == null ? void 0 : f.candidates) == null ? void 0 : w.extracted) == null ? void 0 : V.confidence);
819
+ return fe((V = (w = (f = n.value) == null ? void 0 : f.candidates) == null ? void 0 : w.extracted) == null ? void 0 : V.confidence);
820
820
  }
821
- ), _ = d(() => Ve(n.value)), x = d(() => {
821
+ ), _ = d(() => De(n.value)), x = d(() => {
822
822
  var f, w;
823
823
  return !!((w = (f = n.value) == null ? void 0 : f.candidates) != null && w.override);
824
824
  }), k = d(() => {
@@ -826,12 +826,12 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
826
826
  const f = (w = n.value) == null ? void 0 : w.candidates;
827
827
  return !!(f != null && f.override || f != null && f.extracted || f != null && f.claim);
828
828
  }), S = d(() => g.value && !!n.value), A = d(
829
- () => S.value && !!n.value && Oe(n.value)
829
+ () => S.value && !!n.value && Ie(n.value)
830
830
  ), O = d(() => {
831
831
  var W, q, E;
832
832
  const f = (q = (W = n.value) == null ? void 0 : W.candidates) == null ? void 0 : q.extracted;
833
833
  if (!f) return "No verification data";
834
- const w = [], V = ae[$.value];
834
+ const w = [], V = le[$.value];
835
835
  w.push(
836
836
  f.confidence != null ? `${V} (${f.confidence}/5)` : V
837
837
  );
@@ -863,7 +863,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
863
863
  "data-editable": j.value ? "true" : "false",
864
864
  onFocus: w[0] || (w[0] = (V) => X.value = !0),
865
865
  onBlur: Q,
866
- onKeydown: w[1] || (w[1] = Ue(Ne((V) => V.target.blur(), ["prevent"]), ["enter"])),
866
+ onKeydown: w[1] || (w[1] = Ne(te((V) => V.target.blur(), ["prevent"]), ["enter"])),
867
867
  onClick: w[2] || (w[2] = (V) => S.value && !k.value ? F() : void 0)
868
868
  }, [
869
869
  Re(f.$slots, "default", {
@@ -884,7 +884,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
884
884
  class: R(["tv-overlay inline-flex cursor-pointer items-center align-middle transition-transform duration-150 hover:scale-110", r(z)]),
885
885
  onClick: F
886
886
  }, [
887
- x.value ? (l(), o("span", Jt, "✔")) : (l(), N(de, {
887
+ x.value ? (l(), o("span", Jt, "✔")) : (l(), N(ce, {
888
888
  key: 0,
889
889
  status: $.value
890
890
  }, null, 8, ["status"])),
@@ -924,9 +924,9 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
924
924
  }, da = { class: "tv-datapoint-path font-mono text-xs text-gray-500" }, ca = { class: "tv-datapoint-value" }, va = /* @__PURE__ */ H({
925
925
  __name: "ComparisonPage",
926
926
  setup(e) {
927
- const t = le(), a = d(() => De(t.data)), g = d(() => a.value.filter(($) => !$.unanchored)), p = d(() => a.value.filter(($) => $.unanchored));
927
+ const t = ne(), a = d(() => Oe(t.data)), g = d(() => a.value.filter(($) => !$.unanchored)), p = d(() => a.value.filter(($) => $.unanchored));
928
928
  function n($) {
929
- const _ = fe($).value;
929
+ const _ = pe($).value;
930
930
  return _ == null ? "" : String(_);
931
931
  }
932
932
  function y($) {
@@ -956,11 +956,11 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
956
956
  i("div", Wt, [
957
957
  i("span", Xt, m(x.path), 1),
958
958
  i("span", Zt, m(n(x.meta)), 1),
959
- D(de, {
959
+ D(ce, {
960
960
  confidence: s(x),
961
961
  "show-label": ""
962
962
  }, null, 8, ["confidence"]),
963
- r(Ve)(x.meta) ? (l(), o("span", ea, "⚠ discrepancy")) : b("", !0)
963
+ r(De)(x.meta) ? (l(), o("span", ea, "⚠ discrepancy")) : b("", !0)
964
964
  ]),
965
965
  i("ul", ta, [
966
966
  (l(!0), o(L, null, P(h(x), (O) => (l(), o("li", {
@@ -971,10 +971,10 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
971
971
  T(" " + m(y(O.value)), 1)
972
972
  ]))), 128))
973
973
  ]),
974
- r(ie)(x.meta) ? (l(), o("p", la, m(r(ie)(x.meta)), 1)) : b("", !0),
975
- r(oe)(x.meta) ? (l(), o("p", na, " “" + m(r(oe)(x.meta)) + "” ", 1)) : b("", !0),
974
+ r(oe)(x.meta) ? (l(), o("p", la, m(r(oe)(x.meta)), 1)) : b("", !0),
975
+ r(ue)(x.meta) ? (l(), o("p", na, " “" + m(r(ue)(x.meta)) + "” ", 1)) : b("", !0),
976
976
  i("ul", sa, [
977
- (l(!0), o(L, null, P(r(Ie)((A = (S = (k = x.meta) == null ? void 0 : k.candidates) == null ? void 0 : S.extracted) == null ? void 0 : A.sources), (O, M) => (l(), o("li", {
977
+ (l(!0), o(L, null, P(r(Te)((A = (S = (k = x.meta) == null ? void 0 : k.candidates) == null ? void 0 : S.extracted) == null ? void 0 : A.sources), (O, M) => (l(), o("li", {
978
978
  key: M,
979
979
  class: "tv-source-group"
980
980
  }, [
@@ -999,7 +999,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
999
999
  }, [
1000
1000
  i("span", da, m(x.path), 1),
1001
1001
  i("span", ca, m(y(x.value)), 1),
1002
- D(de, { status: "unverifiable" })
1002
+ D(ce, { status: "unverifiable" })
1003
1003
  ]))), 128))
1004
1004
  ])) : b("", !0)
1005
1005
  ]));
@@ -1007,8 +1007,8 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
1007
1007
  }), fa = { class: "tv-enable-toggle flex items-center justify-between text-sm font-medium text-gray-700" }, pa = { class: "tv-progress-block" }, ma = { class: "mb-1 flex items-baseline justify-between" }, ga = { class: "tv-progress-count text-xs font-semibold text-gray-600" }, wa = /* @__PURE__ */ H({
1008
1008
  __name: "VerificationChrome",
1009
1009
  setup(e) {
1010
- const t = le(), { enabled: a, openComparison: g } = t, p = Ge(), n = _e(), y = U(!1), s = d(() => tt(t.data)), h = U(!1);
1011
- ce(
1010
+ const t = ne(), { enabled: a, openComparison: g } = t, p = Ge(), n = we(), y = U(!1), s = d(() => tt(t.data)), h = U(!1);
1011
+ ve(
1012
1012
  () => s.value.percent,
1013
1013
  (k) => {
1014
1014
  k === 100 && s.value.total > 0 && !h.value && (h.value = !0, n.success("All data points verified 🎯"));
@@ -1036,7 +1036,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
1036
1036
  type: "button",
1037
1037
  class: R(["tv-settings-button fixed bottom-4 right-4 z-50 flex h-11 w-11 items-center justify-center rounded-full bg-gray-900 text-white shadow-lg transition-transform hover:scale-105", r(z)]),
1038
1038
  title: "Verification",
1039
- onClick: S[0] || (S[0] = (A) => y.value = !y.value)
1039
+ onClick: S[0] || (S[0] = te((A) => y.value = !y.value, ["stop"]))
1040
1040
  }, [
1041
1041
  D(r(Be), {
1042
1042
  icon: r(Fe),
@@ -1056,7 +1056,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
1056
1056
  i("label", fa, [
1057
1057
  S[3] || (S[3] = i("span", null, "Verification overlay", -1)),
1058
1058
  Ae(i("input", {
1059
- "onUpdate:modelValue": S[1] || (S[1] = (A) => ge(a) ? a.value = A : null),
1059
+ "onUpdate:modelValue": S[1] || (S[1] = (A) => xe(a) ? a.value = A : null),
1060
1060
  type: "checkbox",
1061
1061
  class: "tv-enable-checkbox h-4 w-4 accent-gray-900"
1062
1062
  }, null, 512), [
@@ -1069,7 +1069,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
1069
1069
  S[4] || (S[4] = i("span", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, "Review progress", -1)),
1070
1070
  i("span", ga, m(s.value.verified) + " / " + m(s.value.total), 1)
1071
1071
  ]),
1072
- D(r(we), {
1072
+ D(r(ke), {
1073
1073
  value: s.value.verified,
1074
1074
  max: s.value.total,
1075
1075
  size: "md",
@@ -1084,7 +1084,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
1084
1084
  key: 0,
1085
1085
  type: "button",
1086
1086
  class: R(["tv-next-flagged flex items-center justify-between rounded-lg bg-amber-50 px-3 py-2 text-left text-xs font-medium text-amber-700 ring-1 ring-inset ring-amber-600/20 transition hover:bg-amber-100", r(z)]),
1087
- onClick: _
1087
+ onClick: te(_, ["stop"])
1088
1088
  }, [
1089
1089
  i("span", null, m(s.value.needsReview) + " need" + m(s.value.needsReview === 1 ? "s" : "") + " review", 1),
1090
1090
  S[5] || (S[5] = i("span", { "aria-hidden": "true" }, "→", -1))
@@ -1093,12 +1093,12 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
1093
1093
  i("button", {
1094
1094
  type: "button",
1095
1095
  class: R(["tv-open-comparison rounded-lg border border-gray-200 px-3 py-2 text-sm font-medium text-gray-600 transition hover:bg-gray-50", r(z)]),
1096
- onClick: x
1096
+ onClick: te(x, ["stop"])
1097
1097
  }, " Open comparison page ", 2)
1098
1098
  ], 2)) : b("", !0),
1099
- D(r(re), {
1099
+ D(r(ie), {
1100
1100
  modelValue: r(p),
1101
- "onUpdate:modelValue": S[2] || (S[2] = (A) => ge(p) ? p.value = A : null),
1101
+ "onUpdate:modelValue": S[2] || (S[2] = (A) => xe(p) ? p.value = A : null),
1102
1102
  title: "Verification comparison",
1103
1103
  width: 80,
1104
1104
  "close-x": "",
@@ -1118,26 +1118,26 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
1118
1118
  export {
1119
1119
  z as CHROME_CLASS,
1120
1120
  va as ComparisonPage,
1121
- de as ConfidenceIcon,
1122
- ke as ENABLED_STORAGE_KEY,
1123
- Ce as RESOLUTION_PRIORITY,
1121
+ ce as ConfidenceIcon,
1122
+ $e as ENABLED_STORAGE_KEY,
1123
+ Ve as RESOLUTION_PRIORITY,
1124
1124
  Qe as STATUS_COLORS,
1125
- ae as STATUS_LABELS,
1125
+ le as STATUS_LABELS,
1126
1126
  wa as VerificationChrome,
1127
1127
  qt as VerificationModal,
1128
1128
  _a as VerifiedField,
1129
- ve as bucketConfidence,
1129
+ fe as bucketConfidence,
1130
1130
  Xe as candidatesDisagree,
1131
- oe as citedTextOf,
1131
+ ue as citedTextOf,
1132
1132
  tt as computeProgress,
1133
1133
  rt as fetchDataPointAudit,
1134
- Ie as groupSources,
1135
- Ve as hasDiscrepancy,
1134
+ Te as groupSources,
1135
+ De as hasDiscrepancy,
1136
1136
  ha as initVerification,
1137
- ie as reasoningOf,
1137
+ oe as reasoningOf,
1138
1138
  We as resolveCandidates,
1139
- fe as resolveDataPoint,
1139
+ pe as resolveDataPoint,
1140
1140
  ut as sourceRowLabel,
1141
- le as useVerification,
1142
- De as walkDataPoints
1141
+ ne as useVerification,
1142
+ Oe as walkDataPoints
1143
1143
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/template-verification",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Read-write verification overlay for rendered template apps — per-data-point confidence, discrepancy, 3-source resolution (override > extracted > claim), inline edit, and a recursive comparison page. Consumes the host's __meta sidecar; fetches nothing.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@tailwindcss/vite": "^4.0.0",
43
- "@thehammer/danx-ui": "^0.8.16",
43
+ "@thehammer/danx-ui": "^0.8.17",
44
44
  "@vitejs/plugin-vue": "^5.0.0",
45
45
  "@vue/test-utils": "^2.4.6",
46
46
  "happy-dom": "^20.3.9",