@thehammer/template-verification 0.1.0 → 0.1.1

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 CHANGED
@@ -6,6 +6,7 @@
6
6
  * recursive comparison page. Fetches nothing — the host calls `initVerification`
7
7
  * once with `data` and an optional `saveOverride` transport.
8
8
  */
9
+ import "./styles.css";
9
10
  export { initVerification, useVerification } from "./context";
10
11
  export type { InitVerificationConfig, Verification } from "./context";
11
12
  export { default as VerifiedField } from "./components/VerifiedField.vue";
@@ -13,12 +14,12 @@ export { default as VerificationChrome } from "./components/VerificationChrome.v
13
14
  export { default as ConfidenceIcon } from "./components/ConfidenceIcon.vue";
14
15
  export { default as VerificationModal } from "./components/VerificationModal.vue";
15
16
  export { default as ComparisonPage } from "./components/ComparisonPage.vue";
16
- export { bucketConfidence, STATUS_COLORS, STATUS_LABELS } from "./lib/confidence";
17
- export { resolveDataPoint, resolveCandidates, reasoningOf, citedTextOf, RESOLUTION_PRIORITY } from "./lib/resolveDataPoint";
17
+ export { bucketConfidence, STATUS_COLORS, STATUS_LABELS, } from "./lib/confidence";
18
+ export { resolveDataPoint, resolveCandidates, reasoningOf, citedTextOf, RESOLUTION_PRIORITY, } from "./lib/resolveDataPoint";
18
19
  export { hasDiscrepancy, candidatesDisagree } from "./lib/discrepancy";
19
20
  export { walkDataPoints } from "./lib/walk";
20
21
  export type { WalkedDataPoint } from "./lib/walk";
21
22
  export { groupSources, sourceRowLabel } from "./lib/sources";
22
23
  export type { SourceGroup } from "./lib/sources";
23
24
  export { CHROME_CLASS, ENABLED_STORAGE_KEY } from "./constants";
24
- export type { VerificationStatus, ResolvedSource, SourceChoice, VerificationSource, ExtractedCandidate, OverrideCandidate, ClaimCandidate, CandidateSet, DataPointAnchor, ResolvedValue, DataPointMeta, MetaCarrier, SaveOverrideArgs, SaveOverrideFn } from "./types";
25
+ export type { VerificationStatus, ResolvedSource, SourceChoice, VerificationSource, ExtractedCandidate, OverrideCandidate, ClaimCandidate, CandidateSet, DataPointAnchor, ResolvedValue, DataPointMeta, MetaCarrier, SaveOverrideArgs, SaveOverrideFn, } from "./types";
@@ -1,3 +1,4 @@
1
+ import type { PreviewFile } from "@thehammer/danx-ui";
1
2
  import type { VerificationSource } from "../types";
2
3
  /** A set of sources sharing one file identity, for grouped rendering in the modal. */
3
4
  export interface SourceGroup {
@@ -5,6 +6,13 @@ export interface SourceGroup {
5
6
  fileLabel: string;
6
7
  /** A view/download URL when the host resolved one; the group links only when set. */
7
8
  fileUrl?: string;
9
+ /**
10
+ * The resolved StoredFile (danx-ui `PreviewFile`-shaped), when the host resolved
11
+ * one — renders a real `DanxFile` thumbnail + `DanxFileViewer` preview. Falls back
12
+ * to the plain `fileLabel`/`fileUrl` text link when absent (host predates file
13
+ * resolution, or the source has no linked file).
14
+ */
15
+ file?: PreviewFile | null;
8
16
  /** The sources belonging to this file. */
9
17
  sources: VerificationSource[];
10
18
  }
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- @media print{.tv-chrome{display:none!important}}
1
+ /*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-600:oklch(57.7% .245 27.325);--color-amber-600:oklch(66.6% .179 58.318);--color-yellow-500:oklch(79.5% .184 86.047);--color-green-600:oklch(62.7% .194 149.214);--color-blue-600:oklch(54.6% .245 262.881);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--radius-lg:.5rem;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.fixed{position:fixed}.relative{position:relative}.right-4{right:calc(var(--spacing) * 4)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-16{bottom:calc(var(--spacing) * 16)}.z-50{z-index:50}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-4{margin-left:calc(var(--spacing) * 4)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-5{height:calc(var(--spacing) * 5)}.h-10{height:calc(var(--spacing) * 10)}.h-full{height:100%}.w-5{width:calc(var(--spacing) * 5)}.w-10{width:calc(var(--spacing) * 10)}.w-20{width:calc(var(--spacing) * 20)}.w-56{width:calc(var(--spacing) * 56)}.w-full{width:100%}.flex-1{flex:1}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-white{background-color:var(--color-white)}.p-4{padding:calc(var(--spacing) * 4)}.px-2{padding-inline:calc(var(--spacing) * 2)}.py-1{padding-block:var(--spacing)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.font-mono{font-family:var(--font-mono)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-pre-line{white-space:pre-line}.text-amber-600{color:var(--color-amber-600)}.text-blue-600{color:var(--color-blue-600)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-green-600{color:var(--color-green-600)}.text-red-600{color:var(--color-red-600)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-gray-200{--tw-ring-color:var(--color-gray-200)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@media print{.tv-chrome{display:none!important}}
@@ -1,8 +1,8 @@
1
- import { ref as U, watch as ce, defineComponent as M, computed as v, openBlock as l, createElementBlock as s, normalizeClass as L, createElementVNode as n, toDisplayString as f, createCommentVNode as b, createBlock as W, unref as g, withCtx as X, createVNode as A, Fragment as V, renderList as T, createTextVNode as K, withDirectives as Z, vModelText as de, withKeys as ve, withModifiers as fe, renderSlot as pe, isRef as J, vModelCheckbox as me } from "vue";
2
- import { DanxDialog as ee, DanxIcon as _e, gearIcon as xe } from "@thehammer/danx-ui";
3
- const D = "tv-chrome", te = "template-verification:enabled";
1
+ import { ref as U, watch as pe, defineComponent as F, computed as c, openBlock as a, createElementBlock as s, normalizeClass as I, createElementVNode as n, toDisplayString as f, createCommentVNode as g, Fragment as O, createVNode as E, unref as y, withCtx as z, renderList as T, createTextVNode as q, createBlock as M, withDirectives as le, vModelText as me, withKeys as xe, withModifiers as _e, renderSlot as ye, isRef as ee, vModelCheckbox as he } from "vue";
2
+ import { DanxDialog as K, DanxFile as be, DanxFileViewer as ge, DanxIcon as we, gearIcon as ke } from "@thehammer/danx-ui";
3
+ const D = "tv-chrome", ae = "template-verification:enabled";
4
4
  let P = null;
5
- function ye(e) {
5
+ function Se(e) {
6
6
  var t;
7
7
  try {
8
8
  return ((t = globalThis.localStorage) == null ? void 0 : t.getItem(e)) ?? null;
@@ -10,20 +10,20 @@ function ye(e) {
10
10
  return null;
11
11
  }
12
12
  }
13
- function ge(e, t) {
14
- var a;
13
+ function $e(e, t) {
14
+ var l;
15
15
  try {
16
- (a = globalThis.localStorage) == null || a.setItem(e, t);
16
+ (l = globalThis.localStorage) == null || l.setItem(e, t);
17
17
  } catch {
18
18
  }
19
19
  }
20
- function he(e) {
21
- const t = ye(te);
20
+ function Ve(e) {
21
+ const t = Se(ae);
22
22
  return t === null ? e : t === "true";
23
23
  }
24
- function ae(e) {
25
- const t = U(he((e == null ? void 0 : e.defaultEnabled) ?? !1));
26
- return ce(t, (a) => ge(te, a ? "true" : "false")), {
24
+ function ne(e) {
25
+ const t = U(Ve((e == null ? void 0 : e.defaultEnabled) ?? !1));
26
+ return pe(t, (l) => $e(ae, l ? "true" : "false")), {
27
27
  enabled: t,
28
28
  data: (e == null ? void 0 : e.data) ?? {},
29
29
  saveOverride: e == null ? void 0 : e.saveOverride,
@@ -31,14 +31,14 @@ function ae(e) {
31
31
  comparisonOpen: U(!1)
32
32
  };
33
33
  }
34
- function ne() {
35
- return P || (P = ae()), P;
34
+ function se() {
35
+ return P || (P = ne()), P;
36
36
  }
37
- function At(e) {
38
- P = ae(e);
37
+ function jt(e) {
38
+ P = ne(e);
39
39
  }
40
- function Y() {
41
- const e = ne();
40
+ function J() {
41
+ const e = se();
42
42
  return {
43
43
  enabled: e.enabled,
44
44
  data: e.data,
@@ -49,84 +49,84 @@ function Y() {
49
49
  }
50
50
  };
51
51
  }
52
- function be() {
53
- return ne().comparisonOpen;
52
+ function Ce() {
53
+ return se().comparisonOpen;
54
54
  }
55
- function G(e) {
55
+ function Q(e) {
56
56
  return typeof e != "number" || Number.isNaN(e) ? "unverifiable" : e <= 2 ? "low" : e === 3 ? "medium" : "high";
57
57
  }
58
- const ke = {
58
+ const Oe = {
59
59
  high: "text-green-600",
60
60
  medium: "text-yellow-500",
61
61
  low: "text-red-600",
62
62
  unverifiable: "text-gray-400"
63
- }, we = {
63
+ }, Le = {
64
64
  high: "High",
65
65
  medium: "Medium",
66
66
  low: "Low",
67
67
  unverifiable: "Unverifiable"
68
- }, le = ["override", "extracted", "claim"];
69
- function H(e) {
70
- return e ? e.resolved && e.resolved.source && e.resolved.source !== "none" ? e.resolved : Se(e.candidates) : { value: null, source: "none" };
68
+ }, ie = ["override", "extracted", "claim"];
69
+ function W(e) {
70
+ return e ? e.resolved && e.resolved.source && e.resolved.source !== "none" ? e.resolved : Ie(e.candidates) : { value: null, source: "none" };
71
71
  }
72
- function Se(e) {
72
+ function Ie(e) {
73
73
  if (e)
74
- for (const t of le) {
75
- const a = e[t];
76
- if (a != null)
77
- return { value: a.value, source: t };
74
+ for (const t of ie) {
75
+ const l = e[t];
76
+ if (l != null)
77
+ return { value: l.value, source: t };
78
78
  }
79
79
  return { value: null, source: "none" };
80
80
  }
81
- function B(e) {
82
- var c, o;
83
- const t = (o = (c = e == null ? void 0 : e.candidates) == null ? void 0 : c.extracted) == null ? void 0 : o.reasoning;
81
+ function Y(e) {
82
+ var d, o;
83
+ const t = (o = (d = e == null ? void 0 : e.candidates) == null ? void 0 : d.extracted) == null ? void 0 : o.reasoning;
84
84
  if (t == null) return null;
85
- const a = String(t).trim();
86
- return a === "" ? null : a;
85
+ const l = String(t).trim();
86
+ return l === "" ? null : l;
87
87
  }
88
- function F(e) {
89
- var c, o;
90
- const t = (o = (c = e == null ? void 0 : e.candidates) == null ? void 0 : c.extracted) == null ? void 0 : o.cited_text;
88
+ function G(e) {
89
+ var d, o;
90
+ const t = (o = (d = e == null ? void 0 : e.candidates) == null ? void 0 : d.extracted) == null ? void 0 : o.cited_text;
91
91
  if (t == null) return null;
92
- const a = String(t).trim();
93
- return a === "" ? null : a;
92
+ const l = String(t).trim();
93
+ return l === "" ? null : l;
94
94
  }
95
- function se(e) {
96
- return e ? typeof e.discrepancy == "boolean" ? e.discrepancy : $e(e.candidates) : !1;
95
+ function oe(e) {
96
+ return e ? typeof e.discrepancy == "boolean" ? e.discrepancy : Ue(e.candidates) : !1;
97
97
  }
98
- function $e(e) {
98
+ function Ue(e) {
99
99
  if (!e) return !1;
100
- const t = le.map((a) => e[a]).filter((a) => a != null).map((a) => Ce(a.value));
100
+ const t = ie.map((l) => e[l]).filter((l) => l != null).map((l) => Ee(l.value));
101
101
  return t.length < 2 ? !1 : new Set(t).size > 1;
102
102
  }
103
- function Ce(e) {
103
+ function Ee(e) {
104
104
  return JSON.stringify(e ?? null);
105
105
  }
106
- function Ve(e, t, a) {
106
+ function Te(e, t, l) {
107
107
  var r;
108
- const c = (r = t.value) == null ? void 0 : r.anchor;
109
- if (!e.saveOverride || !c) return null;
108
+ const d = (r = t.value) == null ? void 0 : r.anchor;
109
+ if (!e.saveOverride || !d) return null;
110
110
  const o = e.saveOverride;
111
111
  return async (u, p) => {
112
- const _ = await o({
112
+ const h = await o({
113
113
  workflow_input_id: e.workflowInputId,
114
- object_ids: c.object_ids,
115
- field: c.field,
116
- field_path: c.field_path,
114
+ object_ids: d.object_ids,
115
+ field: d.field,
116
+ field_path: d.field_path,
117
117
  value: u,
118
118
  source_choice: p
119
119
  });
120
- return a(_), _;
120
+ return l(h), h;
121
121
  };
122
122
  }
123
- const Oe = ["data-status", "title"], Ie = {
123
+ const De = ["data-status", "title"], Ae = {
124
124
  class: "tv-confidence-glyph",
125
125
  "aria-hidden": "true"
126
- }, Le = {
126
+ }, Ne = {
127
127
  key: 0,
128
128
  class: "tv-confidence-label text-xs font-medium"
129
- }, j = /* @__PURE__ */ M({
129
+ }, R = /* @__PURE__ */ F({
130
130
  __name: "ConfidenceIcon",
131
131
  props: {
132
132
  confidence: {},
@@ -134,9 +134,9 @@ const Oe = ["data-status", "title"], Ie = {
134
134
  showLabel: { type: Boolean }
135
135
  },
136
136
  setup(e) {
137
- const t = e, a = v(
138
- () => t.status ?? G(t.confidence)
139
- ), c = {
137
+ const t = e, l = c(
138
+ () => t.status ?? Q(t.confidence)
139
+ ), d = {
140
140
  high: "✔",
141
141
  // check
142
142
  medium: "⚠",
@@ -144,53 +144,65 @@ const Oe = ["data-status", "title"], Ie = {
144
144
  low: "✕",
145
145
  // x
146
146
  unverifiable: "?"
147
- }, o = v(() => c[a.value]), r = v(() => ke[a.value]), u = v(() => we[a.value]);
148
- return (p, _) => (l(), s("span", {
149
- class: L(["tv-confidence-icon inline-flex items-center gap-1", r.value]),
150
- "data-status": a.value,
147
+ }, o = c(() => d[l.value]), r = c(() => Oe[l.value]), u = c(() => Le[l.value]);
148
+ return (p, h) => (a(), s("span", {
149
+ class: I(["tv-confidence-icon inline-flex items-center gap-1", r.value]),
150
+ "data-status": l.value,
151
151
  title: u.value
152
152
  }, [
153
- n("span", Ie, f(o.value), 1),
154
- e.showLabel ? (l(), s("span", Le, f(u.value), 1)) : b("", !0)
155
- ], 10, Oe));
153
+ n("span", Ae, f(o.value), 1),
154
+ e.showLabel ? (a(), s("span", Ne, f(u.value), 1)) : g("", !0)
155
+ ], 10, De));
156
156
  }
157
157
  });
158
- function oe(e) {
158
+ function re(e) {
159
159
  if (!e || e.length === 0) return [];
160
160
  const t = /* @__PURE__ */ new Map();
161
- for (const a of e) {
162
- const c = Ue(a);
163
- let o = t.get(c);
164
- o || (o = { fileLabel: Ee(a), fileUrl: a.file_url, sources: [] }, t.set(c, o)), !o.fileUrl && a.file_url && (o.fileUrl = a.file_url), o.sources.push(a);
161
+ for (const l of e) {
162
+ const d = Fe(l);
163
+ let o = t.get(d);
164
+ o || (o = {
165
+ fileLabel: Me(l),
166
+ fileUrl: l.file_url,
167
+ file: l.file,
168
+ sources: []
169
+ }, t.set(d, o)), !o.fileUrl && l.file_url && (o.fileUrl = l.file_url), !o.file && l.file && (o.file = l.file), o.sources.push(l);
165
170
  }
166
171
  return [...t.values()];
167
172
  }
168
- function Ue(e) {
173
+ function Fe(e) {
169
174
  const t = e.file_name ?? e.file_id ?? e.stored_file_id ?? e.source_id ?? e.id;
170
175
  return t != null ? String(t) : "__unknown__";
171
176
  }
172
- function Ee(e) {
173
- return e.file_name ? e.file_name : e.file_id !== void 0 && e.file_id !== null ? `File ${e.file_id}` : e.stored_file_id !== void 0 && e.stored_file_id !== null ? `File ${e.stored_file_id}` : e.source_type ? e.source_type : "Source";
177
+ function Me(e) {
178
+ var t;
179
+ return (t = e.file) != null && t.name ? e.file.name : e.file_name ? e.file_name : e.file_id !== void 0 && e.file_id !== null ? `File ${e.file_id}` : e.stored_file_id !== void 0 && e.stored_file_id !== null ? `File ${e.stored_file_id}` : e.source_type ? e.source_type : "Source";
174
180
  }
175
- function ie(e) {
181
+ function ue(e) {
176
182
  return e.page !== void 0 && e.page !== null ? `Page ${e.page}` : e.explanation ? String(e.explanation) : e.source_type ? String(e.source_type) : "Citation";
177
183
  }
178
- const Te = { class: "tv-modal flex flex-col gap-4 text-sm" }, Ae = { class: "tv-modal-resolved" }, De = { class: "flex items-center gap-2" }, Ne = { class: "tv-resolved-value font-semibold" }, Me = { class: "tv-resolved-source text-xs text-gray-500" }, Re = {
184
+ const Pe = { class: "tv-modal flex flex-col gap-4 text-sm" }, Re = { class: "tv-modal-resolved" }, je = { class: "flex items-center gap-2" }, Be = { class: "tv-resolved-value font-semibold" }, ze = { class: "tv-resolved-source text-xs text-gray-500" }, Ke = {
179
185
  key: 0,
180
186
  class: "tv-discrepancy text-xs font-medium text-amber-600"
181
- }, Pe = { class: "tv-modal-candidates" }, je = { class: "w-full" }, Be = { class: "py-1 pr-2 font-medium" }, Fe = { class: "py-1 pr-2" }, ze = { class: "py-1 text-xs text-gray-500" }, Ke = {
187
+ }, Ye = { class: "tv-modal-candidates" }, Ge = { class: "w-full" }, He = { class: "py-1 pr-2 font-medium" }, qe = { class: "py-1 pr-2" }, Je = { class: "py-1 text-xs text-gray-500" }, Qe = {
182
188
  key: 0,
183
189
  class: "tv-modal-provenance flex flex-col gap-1"
184
- }, Ye = { class: "tv-confidence-value" }, Ge = { class: "tv-reasoning whitespace-pre-line" }, He = { class: "tv-cited-text border-l-2 border-gray-200 pl-2 italic" }, qe = { class: "tv-modal-sources" }, Je = {
190
+ }, We = { class: "tv-confidence-value" }, Xe = { class: "tv-reasoning whitespace-pre-line" }, Ze = { class: "tv-cited-text border-l-2 border-gray-200 pl-2 italic" }, et = { class: "tv-modal-sources" }, tt = {
185
191
  key: 0,
186
192
  class: "tv-no-source text-gray-400"
187
- }, Qe = { class: "font-medium" }, We = ["href"], Xe = {
193
+ }, lt = {
188
194
  key: 1,
189
- class: "tv-source-name"
190
- }, Ze = { class: "ml-3 list-disc" }, et = {
195
+ class: "tv-source-grid flex flex-wrap gap-3 pt-1"
196
+ }, at = ["href"], nt = {
197
+ key: 2,
198
+ class: "tv-source-name text-xs text-gray-600"
199
+ }, st = ["title"], it = {
200
+ key: 3,
201
+ class: "tv-source-citations text-xs text-gray-400"
202
+ }, ot = {
191
203
  key: 1,
192
204
  class: "tv-modal-resolution flex flex-col gap-2 border-t border-gray-200 pt-3"
193
- }, tt = { class: "flex flex-wrap gap-2" }, at = ["disabled"], nt = ["disabled"], lt = { class: "flex items-center gap-2" }, st = ["disabled"], ot = /* @__PURE__ */ M({
205
+ }, rt = { class: "flex flex-wrap gap-2" }, ut = ["disabled"], ct = ["disabled"], dt = { class: "flex items-center gap-2" }, vt = ["disabled"], ft = /* @__PURE__ */ F({
194
206
  __name: "VerificationModal",
195
207
  props: {
196
208
  modelValue: { type: Boolean },
@@ -200,169 +212,231 @@ const Te = { class: "tv-modal flex flex-col gap-4 text-sm" }, Ae = { class: "tv-
200
212
  },
201
213
  emits: ["update:modelValue", "saved"],
202
214
  setup(e, { emit: t }) {
203
- const a = e, c = t, o = v({
204
- get: () => a.modelValue,
205
- set: (i) => c("update:modelValue", i)
206
- }), r = v(() => H(a.meta)), u = v(() => a.meta.candidates.extracted), p = v(() => a.meta.candidates.claim), _ = v(() => a.meta.candidates.override), k = v(() => {
207
- var i;
208
- return G((i = u.value) == null ? void 0 : i.confidence);
209
- }), m = v(() => B(a.meta)), d = v(() => F(a.meta)), $ = v(() => {
215
+ const l = e, d = t, o = c({
216
+ get: () => l.modelValue,
217
+ set: (i) => d("update:modelValue", i)
218
+ }), r = c(() => W(l.meta)), u = c(() => l.meta.candidates.extracted), p = c(() => l.meta.candidates.claim), h = c(() => l.meta.candidates.override), w = c(
219
+ () => {
220
+ var i;
221
+ return Q((i = u.value) == null ? void 0 : i.confidence);
222
+ }
223
+ ), x = c(() => Y(l.meta)), v = c(() => G(l.meta)), $ = c(() => {
210
224
  var i;
211
- return oe((i = u.value) == null ? void 0 : i.sources);
212
- }), O = v(() => {
225
+ return re((i = u.value) == null ? void 0 : i.sources);
226
+ }), L = c(
227
+ () => $.value.map((i) => i.file).filter((i) => !!i)
228
+ ), C = U(null), k = c({
229
+ get: () => C.value !== null,
230
+ set: (i) => {
231
+ i || (C.value = null);
232
+ }
233
+ });
234
+ function A(i) {
235
+ i.file && (C.value = i);
236
+ }
237
+ const j = c(() => {
213
238
  const i = [];
214
- return _.value && i.push({ source: "Override", value: _.value.value, detail: _.value.source_choice ? `via ${_.value.source_choice}` : void 0 }), u.value && i.push({ source: "Extracted", value: u.value.value, detail: E(u.value.confidence) }), p.value && i.push({ source: "Claim", value: p.value.value, detail: p.value.claim_set_label ?? void 0 }), i;
215
- }), I = U(""), x = U(!1);
216
- function E(i) {
239
+ return h.value && i.push({
240
+ source: "Override",
241
+ value: h.value.value,
242
+ detail: h.value.source_choice ? `via ${h.value.source_choice}` : void 0
243
+ }), u.value && i.push({
244
+ source: "Extracted",
245
+ value: u.value.value,
246
+ detail: S(u.value.confidence)
247
+ }), p.value && i.push({
248
+ source: "Claim",
249
+ value: p.value.value,
250
+ detail: p.value.claim_set_label ?? void 0
251
+ }), i;
252
+ }), N = U(""), _ = U(!1);
253
+ function S(i) {
217
254
  return i == null ? "Unverifiable" : `${i}/5`;
218
255
  }
219
- function R(i) {
256
+ function V(i) {
220
257
  return i == null ? "" : String(i);
221
258
  }
222
- async function N(i, y) {
223
- if (!(!a.save || x.value)) {
224
- x.value = !0;
259
+ async function B(i, b) {
260
+ if (!(!l.save || _.value)) {
261
+ _.value = !0;
225
262
  try {
226
- const w = await a.save(i, y);
227
- c("saved", w);
263
+ const m = await l.save(i, b);
264
+ d("saved", m);
228
265
  } finally {
229
- x.value = !1;
266
+ _.value = !1;
230
267
  }
231
268
  }
232
269
  }
233
- const h = () => {
270
+ const ce = () => {
234
271
  var i;
235
- return N(q((i = u.value) == null ? void 0 : i.value), "extracted");
236
- }, S = () => {
272
+ return B(X((i = u.value) == null ? void 0 : i.value), "extracted");
273
+ }, de = () => {
237
274
  var i;
238
- return N(q((i = p.value) == null ? void 0 : i.value), "claim");
239
- }, C = () => N(I.value, "custom");
240
- function q(i) {
275
+ return B(X((i = p.value) == null ? void 0 : i.value), "claim");
276
+ }, ve = () => B(N.value, "custom");
277
+ function X(i) {
241
278
  return i == null ? null : String(i);
242
279
  }
243
- return (i, y) => (l(), W(g(ee), {
244
- modelValue: o.value,
245
- "onUpdate:modelValue": y[1] || (y[1] = (w) => o.value = w),
246
- title: e.label || "Verification detail",
247
- "close-x": "",
248
- class: L(g(D))
249
- }, {
250
- default: X(() => [
251
- n("div", Te, [
252
- n("section", Ae, [
253
- y[2] || (y[2] = n("div", { class: "text-xs uppercase tracking-wide text-gray-500" }, "Resolved value", -1)),
254
- n("div", De, [
255
- n("span", Ne, f(R(r.value.value)), 1),
256
- n("span", Me, "(" + f(r.value.source) + ")", 1),
257
- A(j, {
258
- status: k.value,
259
- "show-label": ""
260
- }, null, 8, ["status"])
280
+ return (i, b) => (a(), s(O, null, [
281
+ E(y(K), {
282
+ modelValue: o.value,
283
+ "onUpdate:modelValue": b[1] || (b[1] = (m) => o.value = m),
284
+ title: e.label || "Verification detail",
285
+ "close-x": "",
286
+ class: I(y(D))
287
+ }, {
288
+ default: z(() => [
289
+ n("div", Pe, [
290
+ n("section", Re, [
291
+ b[3] || (b[3] = n("div", { class: "text-xs uppercase tracking-wide text-gray-500" }, " Resolved value ", -1)),
292
+ n("div", je, [
293
+ n("span", Be, f(V(r.value.value)), 1),
294
+ n("span", ze, "(" + f(r.value.source) + ")", 1),
295
+ E(R, {
296
+ status: w.value,
297
+ "show-label": ""
298
+ }, null, 8, ["status"])
299
+ ]),
300
+ e.meta.discrepancy ? (a(), s("div", Ke, " ⚠ Sources disagree ")) : g("", !0)
261
301
  ]),
262
- e.meta.discrepancy ? (l(), s("div", Re, " ⚠ Sources disagree ")) : b("", !0)
263
- ]),
264
- n("section", Pe, [
265
- y[3] || (y[3] = n("div", { class: "text-xs uppercase tracking-wide text-gray-500" }, "Candidates", -1)),
266
- n("table", je, [
267
- n("tbody", null, [
268
- (l(!0), s(V, null, T(O.value, (w) => (l(), s("tr", {
269
- key: w.source,
270
- class: "tv-candidate-row border-t border-gray-100"
302
+ n("section", Ye, [
303
+ b[4] || (b[4] = n("div", { class: "text-xs uppercase tracking-wide text-gray-500" }, " Candidates ", -1)),
304
+ n("table", Ge, [
305
+ n("tbody", null, [
306
+ (a(!0), s(O, null, T(j.value, (m) => (a(), s("tr", {
307
+ key: m.source,
308
+ class: "tv-candidate-row border-t border-gray-100"
309
+ }, [
310
+ n("td", He, f(m.source), 1),
311
+ n("td", qe, f(V(m.value)), 1),
312
+ n("td", Je, f(m.detail), 1)
313
+ ]))), 128))
314
+ ])
315
+ ])
316
+ ]),
317
+ u.value ? (a(), s("section", Qe, [
318
+ b[7] || (b[7] = n("div", { class: "text-xs uppercase tracking-wide text-gray-500" }, " Confidence ", -1)),
319
+ n("div", We, f(S(u.value.confidence)), 1),
320
+ x.value ? (a(), s(O, { key: 0 }, [
321
+ b[5] || (b[5] = n("div", { class: "text-xs uppercase tracking-wide text-gray-500" }, " Reasoning ", -1)),
322
+ n("p", Xe, f(x.value), 1)
323
+ ], 64)) : g("", !0),
324
+ v.value ? (a(), s(O, { key: 1 }, [
325
+ b[6] || (b[6] = n("div", { class: "text-xs uppercase tracking-wide text-gray-500" }, " Cited text ", -1)),
326
+ n("blockquote", Ze, [
327
+ q(f(v.value) + " ", 1),
328
+ n("span", {
329
+ class: I([
330
+ "tv-cited-verified ml-1 text-xs",
331
+ u.value.cited_text_verified ? "text-green-600" : "text-gray-400"
332
+ ])
333
+ }, f(u.value.cited_text_verified ? "✔ verified" : "unverified"), 3)
334
+ ])
335
+ ], 64)) : g("", !0)
336
+ ])) : g("", !0),
337
+ n("section", et, [
338
+ b[8] || (b[8] = n("div", { class: "text-xs uppercase tracking-wide text-gray-500" }, " Sources ", -1)),
339
+ $.value.length === 0 ? (a(), s("div", tt, " No source recorded ")) : (a(), s("div", lt, [
340
+ (a(!0), s(O, null, T($.value, (m) => (a(), s("div", {
341
+ key: m.fileLabel,
342
+ class: "tv-source-group flex w-20 flex-col items-center gap-1"
271
343
  }, [
272
- n("td", Be, f(w.source), 1),
273
- n("td", Fe, f(R(w.value)), 1),
274
- n("td", ze, f(w.detail), 1)
344
+ m.file ? (a(), M(y(be), {
345
+ key: 0,
346
+ file: m.file,
347
+ size: "sm",
348
+ class: "tv-source-thumb cursor-pointer",
349
+ onClick: (Z) => A(m)
350
+ }, null, 8, ["file", "onClick"])) : m.fileUrl ? (a(), s("a", {
351
+ key: 1,
352
+ href: m.fileUrl,
353
+ class: "tv-source-link text-blue-600 underline text-xs",
354
+ target: "_blank",
355
+ rel: "noopener"
356
+ }, f(m.fileLabel), 9, at)) : (a(), s("span", nt, f(m.fileLabel), 1)),
357
+ n("span", {
358
+ class: "tv-source-file-label w-full truncate text-center text-xs text-gray-500",
359
+ title: m.fileLabel
360
+ }, f(m.fileLabel), 9, st),
361
+ m.sources.length > 1 ? (a(), s("ul", it, [
362
+ (a(!0), s(O, null, T(m.sources, (Z, fe) => (a(), s("li", {
363
+ key: fe,
364
+ class: "tv-source-row"
365
+ }, f(y(ue)(Z)), 1))), 128))
366
+ ])) : g("", !0)
275
367
  ]))), 128))
276
- ])
277
- ])
278
- ]),
279
- u.value ? (l(), s("section", Ke, [
280
- y[6] || (y[6] = n("div", { class: "text-xs uppercase tracking-wide text-gray-500" }, "Confidence", -1)),
281
- n("div", Ye, f(E(u.value.confidence)), 1),
282
- m.value ? (l(), s(V, { key: 0 }, [
283
- y[4] || (y[4] = n("div", { class: "text-xs uppercase tracking-wide text-gray-500" }, "Reasoning", -1)),
284
- n("p", Ge, f(m.value), 1)
285
- ], 64)) : b("", !0),
286
- d.value ? (l(), s(V, { key: 1 }, [
287
- y[5] || (y[5] = n("div", { class: "text-xs uppercase tracking-wide text-gray-500" }, "Cited text", -1)),
288
- n("blockquote", He, [
289
- K(f(d.value) + " ", 1),
290
- n("span", {
291
- class: L(["tv-cited-verified ml-1 text-xs", u.value.cited_text_verified ? "text-green-600" : "text-gray-400"])
292
- }, f(u.value.cited_text_verified ? "✔ verified" : "unverified"), 3)
293
- ])
294
- ], 64)) : b("", !0)
295
- ])) : b("", !0),
296
- n("section", qe, [
297
- y[7] || (y[7] = n("div", { class: "text-xs uppercase tracking-wide text-gray-500" }, "Sources", -1)),
298
- $.value.length === 0 ? (l(), s("div", Je, "No source recorded")) : b("", !0),
299
- (l(!0), s(V, null, T($.value, (w) => (l(), s("div", {
300
- key: w.fileLabel,
301
- class: "tv-source-group"
302
- }, [
303
- n("div", Qe, [
304
- w.fileUrl ? (l(), s("a", {
368
+ ]))
369
+ ]),
370
+ e.save ? (a(), s("section", ot, [
371
+ b[9] || (b[9] = n("div", { class: "text-xs uppercase tracking-wide text-gray-500" }, " Resolve ", -1)),
372
+ n("div", rt, [
373
+ u.value ? (a(), s("button", {
305
374
  key: 0,
306
- href: w.fileUrl,
307
- class: "tv-source-link text-blue-600 underline",
308
- target: "_blank",
309
- rel: "noopener"
310
- }, f(w.fileLabel), 9, We)) : (l(), s("span", Xe, f(w.fileLabel), 1))
375
+ type: "button",
376
+ class: "tv-accept-extracted rounded border px-2 py-1",
377
+ disabled: _.value,
378
+ onClick: ce
379
+ }, " Accept extracted ", 8, ut)) : g("", !0),
380
+ p.value ? (a(), s("button", {
381
+ key: 1,
382
+ type: "button",
383
+ class: "tv-accept-claim rounded border px-2 py-1",
384
+ disabled: _.value,
385
+ onClick: de
386
+ }, " Accept claim ", 8, ct)) : g("", !0)
311
387
  ]),
312
- n("ul", Ze, [
313
- (l(!0), s(V, null, T(w.sources, (re, ue) => (l(), s("li", {
314
- key: ue,
315
- class: "tv-source-row text-xs text-gray-600"
316
- }, f(g(ie)(re)), 1))), 128))
388
+ n("div", dt, [
389
+ le(n("input", {
390
+ "onUpdate:modelValue": b[0] || (b[0] = (m) => N.value = m),
391
+ type: "text",
392
+ class: "tv-custom-input flex-1 rounded border px-2 py-1",
393
+ placeholder: "Type a custom value"
394
+ }, null, 512), [
395
+ [me, N.value]
396
+ ]),
397
+ n("button", {
398
+ type: "button",
399
+ class: "tv-accept-custom rounded border px-2 py-1",
400
+ disabled: _.value,
401
+ onClick: ve
402
+ }, " Type custom ", 8, vt)
317
403
  ])
318
- ]))), 128))
319
- ]),
320
- e.save ? (l(), s("section", et, [
321
- y[8] || (y[8] = n("div", { class: "text-xs uppercase tracking-wide text-gray-500" }, "Resolve", -1)),
322
- n("div", tt, [
323
- u.value ? (l(), s("button", {
324
- key: 0,
325
- type: "button",
326
- class: "tv-accept-extracted rounded border px-2 py-1",
327
- disabled: x.value,
328
- onClick: h
329
- }, "Accept extracted", 8, at)) : b("", !0),
330
- p.value ? (l(), s("button", {
331
- key: 1,
332
- type: "button",
333
- class: "tv-accept-claim rounded border px-2 py-1",
334
- disabled: x.value,
335
- onClick: S
336
- }, "Accept claim", 8, nt)) : b("", !0)
337
- ]),
338
- n("div", lt, [
339
- Z(n("input", {
340
- "onUpdate:modelValue": y[0] || (y[0] = (w) => I.value = w),
341
- type: "text",
342
- class: "tv-custom-input flex-1 rounded border px-2 py-1",
343
- placeholder: "Type a custom value"
344
- }, null, 512), [
345
- [de, I.value]
346
- ]),
347
- n("button", {
348
- type: "button",
349
- class: "tv-accept-custom rounded border px-2 py-1",
350
- disabled: x.value,
351
- onClick: C
352
- }, "Type custom", 8, st)
353
- ])
354
- ])) : b("", !0)
355
- ])
356
- ]),
357
- _: 1
358
- }, 8, ["modelValue", "title", "class"]));
404
+ ])) : g("", !0)
405
+ ])
406
+ ]),
407
+ _: 1
408
+ }, 8, ["modelValue", "title", "class"]),
409
+ C.value ? (a(), M(y(K), {
410
+ key: 0,
411
+ modelValue: k.value,
412
+ "onUpdate:modelValue": b[2] || (b[2] = (m) => k.value = m),
413
+ width: 90,
414
+ height: 90,
415
+ "close-x": "",
416
+ class: I(y(D))
417
+ }, {
418
+ default: z(() => [
419
+ C.value.file ? (a(), M(y(ge), {
420
+ key: 0,
421
+ file: C.value.file,
422
+ "related-files": L.value,
423
+ "children-label": "Pages",
424
+ continuous: "",
425
+ sidebar: "",
426
+ zoomable: "",
427
+ class: "h-full"
428
+ }, null, 8, ["file", "related-files"])) : g("", !0)
429
+ ]),
430
+ _: 1
431
+ }, 8, ["modelValue", "class"])) : g("", !0)
432
+ ], 64));
359
433
  }
360
- }), it = { class: "tv-field inline-flex items-center gap-1" }, rt = ["contenteditable", "data-editable"], ut = {
434
+ }), pt = { class: "tv-field inline-flex items-center gap-1" }, mt = ["contenteditable", "data-editable"], xt = {
361
435
  key: 0,
362
436
  class: "tv-discrepancy-indicator ml-0.5 text-amber-600",
363
437
  title: "Sources disagree",
364
438
  "aria-label": "discrepancy"
365
- }, Dt = /* @__PURE__ */ M({
439
+ }, Bt = /* @__PURE__ */ F({
366
440
  __name: "VerifiedField",
367
441
  props: {
368
442
  source: {},
@@ -371,251 +445,251 @@ const Te = { class: "tv-modal flex flex-col gap-4 text-sm" }, Ae = { class: "tv-
371
445
  format: { type: Function }
372
446
  },
373
447
  setup(e) {
374
- const t = e, a = Y(), c = v(() => a.enabled.value), o = U(null), r = v(() => {
375
- var h;
376
- return o.value ? o.value : t.source && t.field ? ((h = t.source.__meta) == null ? void 0 : h[t.field]) ?? null : null;
377
- }), u = v(() => H(r.value)), p = v(() => {
448
+ const t = e, l = J(), d = c(() => l.enabled.value), o = U(null), r = c(() => {
449
+ var _;
450
+ return o.value ? o.value : t.source && t.field ? ((_ = t.source.__meta) == null ? void 0 : _[t.field]) ?? null : null;
451
+ }), u = c(() => W(r.value)), p = c(() => {
378
452
  if (t.original !== void 0 && t.original !== null) return t.original;
379
453
  if (r.value) return u.value.value;
380
454
  if (t.source && t.field) return t.source[t.field];
381
- }), _ = v(() => {
382
- const h = p.value;
383
- return h == null ? "" : t.format ? t.format(h) : String(h);
384
- }), k = v(() => {
385
- var h, S, C;
386
- return G((C = (S = (h = r.value) == null ? void 0 : h.candidates) == null ? void 0 : S.extracted) == null ? void 0 : C.confidence);
387
- }), m = v(() => se(r.value)), d = v(() => c.value && !!r.value);
388
- function $(h) {
455
+ }), h = c(() => {
456
+ const _ = p.value;
457
+ return _ == null ? "" : t.format ? t.format(_) : String(_);
458
+ }), w = c(() => {
459
+ var _, S, V;
460
+ return Q((V = (S = (_ = r.value) == null ? void 0 : _.candidates) == null ? void 0 : S.extracted) == null ? void 0 : V.confidence);
461
+ }), x = c(() => oe(r.value)), v = c(() => d.value && !!r.value);
462
+ function $(_) {
389
463
  var S;
390
- o.value = h, (S = t.source) != null && S.__meta && t.field && (t.source.__meta[t.field] = h);
464
+ o.value = _, (S = t.source) != null && S.__meta && t.field && (t.source.__meta[t.field] = _);
391
465
  }
392
- const O = v(() => Ve(a, r, $)), I = v(() => !!O.value), x = U(!1), E = U(!1);
393
- function R() {
394
- r.value && (x.value = !0);
466
+ const L = c(() => Te(l, r, $)), C = c(() => !!L.value), k = U(!1), A = U(!1);
467
+ function j() {
468
+ r.value && (k.value = !0);
395
469
  }
396
- async function N(h) {
397
- E.value = !1;
398
- const C = (h.target.textContent ?? "").trim();
399
- !O.value || C === _.value || await O.value(C, "custom");
470
+ async function N(_) {
471
+ A.value = !1;
472
+ const V = (_.target.textContent ?? "").trim();
473
+ !L.value || V === h.value || await L.value(V, "custom");
400
474
  }
401
- return (h, S) => (l(), s("span", it, [
475
+ return (_, S) => (a(), s("span", pt, [
402
476
  n("span", {
403
477
  class: "tv-field-value",
404
- contenteditable: I.value,
405
- "data-editable": I.value ? "true" : "false",
406
- onFocus: S[0] || (S[0] = (C) => E.value = !0),
478
+ contenteditable: C.value,
479
+ "data-editable": C.value ? "true" : "false",
480
+ onFocus: S[0] || (S[0] = (V) => A.value = !0),
407
481
  onBlur: N,
408
- onKeydown: S[1] || (S[1] = ve(fe((C) => C.target.blur(), ["prevent"]), ["enter"]))
482
+ onKeydown: S[1] || (S[1] = xe(_e((V) => V.target.blur(), ["prevent"]), ["enter"]))
409
483
  }, [
410
- pe(h.$slots, "default", {
484
+ ye(_.$slots, "default", {
411
485
  value: p.value,
412
- formatted: _.value
486
+ formatted: h.value
413
487
  }, () => [
414
- K(f(_.value), 1)
488
+ q(f(h.value), 1)
415
489
  ])
416
- ], 40, rt),
417
- d.value ? (l(), s("button", {
490
+ ], 40, mt),
491
+ v.value ? (a(), s("button", {
418
492
  key: 0,
419
493
  type: "button",
420
- class: L(["tv-overlay ml-1 inline-flex items-center", g(D)]),
494
+ class: I(["tv-overlay ml-1 inline-flex items-center", y(D)]),
421
495
  title: "View verification detail",
422
- onClick: R
496
+ onClick: j
423
497
  }, [
424
- A(j, { status: k.value }, null, 8, ["status"]),
425
- m.value ? (l(), s("span", ut, "⚠")) : b("", !0)
426
- ], 2)) : b("", !0),
427
- r.value ? (l(), W(ot, {
498
+ E(R, { status: w.value }, null, 8, ["status"]),
499
+ x.value ? (a(), s("span", xt, "⚠")) : g("", !0)
500
+ ], 2)) : g("", !0),
501
+ r.value ? (a(), M(ft, {
428
502
  key: 1,
429
- modelValue: x.value,
430
- "onUpdate:modelValue": S[2] || (S[2] = (C) => x.value = C),
503
+ modelValue: k.value,
504
+ "onUpdate:modelValue": S[2] || (S[2] = (V) => k.value = V),
431
505
  meta: r.value,
432
506
  label: e.field,
433
- save: O.value
434
- }, null, 8, ["modelValue", "meta", "label", "save"])) : b("", !0)
507
+ save: L.value
508
+ }, null, 8, ["modelValue", "meta", "label", "save"])) : g("", !0)
435
509
  ]));
436
510
  }
437
- }), ct = /* @__PURE__ */ new Set(["name", "type"]);
438
- function dt(e, t = "") {
439
- const a = [];
440
- return z(e, t, a), a;
511
+ }), _t = /* @__PURE__ */ new Set(["name", "type"]);
512
+ function yt(e, t = "") {
513
+ const l = [];
514
+ return H(e, t, l), l;
441
515
  }
442
- function z(e, t, a) {
516
+ function H(e, t, l) {
443
517
  if (Array.isArray(e)) {
444
- e.forEach((r, u) => z(r, `${t}[${u}]`, a));
518
+ e.forEach((r, u) => H(r, `${t}[${u}]`, l));
445
519
  return;
446
520
  }
447
- if (!Q(e)) return;
521
+ if (!te(e)) return;
448
522
  const o = e.__meta ?? {};
449
523
  for (const [r, u] of Object.entries(e)) {
450
524
  if (r === "__meta") continue;
451
525
  const p = t ? `${t}.${r}` : r;
452
- if (Array.isArray(u) || Q(u)) {
453
- z(u, p, a);
526
+ if (Array.isArray(u) || te(u)) {
527
+ H(u, p, l);
454
528
  continue;
455
529
  }
456
- const _ = o[r];
457
- !_ && ct.has(r) || a.push({
530
+ const h = o[r];
531
+ !h && _t.has(r) || l.push({
458
532
  path: p,
459
533
  label: r,
460
- meta: _ ?? null,
534
+ meta: h ?? null,
461
535
  value: u,
462
- unanchored: !_
536
+ unanchored: !h
463
537
  });
464
538
  }
465
539
  }
466
- function Q(e) {
540
+ function te(e) {
467
541
  return typeof e == "object" && e !== null && !Array.isArray(e);
468
542
  }
469
- const vt = { class: "tv-comparison-page flex flex-col gap-4" }, ft = {
543
+ const ht = { class: "tv-comparison-page flex flex-col gap-4" }, bt = {
470
544
  key: 0,
471
545
  class: "tv-comparison-empty text-gray-400"
472
- }, pt = {
546
+ }, gt = {
473
547
  key: 1,
474
548
  class: "tv-anchored-group flex flex-col gap-3"
475
- }, mt = { class: "flex items-center gap-2" }, _t = { class: "tv-datapoint-path font-mono text-xs text-gray-500" }, xt = { class: "tv-datapoint-resolved font-medium" }, yt = {
549
+ }, wt = { class: "flex items-center gap-2" }, kt = { class: "tv-datapoint-path font-mono text-xs text-gray-500" }, St = { class: "tv-datapoint-resolved font-medium" }, $t = {
476
550
  key: 0,
477
551
  class: "tv-datapoint-discrepancy text-xs font-medium text-amber-600"
478
- }, gt = { class: "tv-datapoint-candidates ml-4 text-xs text-gray-600" }, ht = { class: "font-medium" }, bt = {
552
+ }, Vt = { class: "tv-datapoint-candidates ml-4 text-xs text-gray-600" }, Ct = { class: "font-medium" }, Ot = {
479
553
  key: 0,
480
554
  class: "tv-datapoint-reasoning ml-4 text-xs italic text-gray-500"
481
- }, kt = {
555
+ }, Lt = {
482
556
  key: 1,
483
557
  class: "tv-datapoint-cited ml-4 text-xs text-gray-500"
484
- }, wt = { class: "tv-datapoint-sources ml-4 text-xs text-gray-500" }, St = ["href"], $t = { key: 1 }, Ct = { class: "ml-1" }, Vt = {
558
+ }, It = { class: "tv-datapoint-sources ml-4 text-xs text-gray-500" }, Ut = ["href"], Et = { key: 1 }, Tt = { class: "ml-1" }, Dt = {
485
559
  key: 2,
486
560
  class: "tv-unanchored-group flex flex-col gap-1"
487
- }, Ot = { class: "tv-datapoint-path font-mono text-xs text-gray-500" }, It = { class: "tv-datapoint-value" }, Lt = /* @__PURE__ */ M({
561
+ }, At = { class: "tv-datapoint-path font-mono text-xs text-gray-500" }, Nt = { class: "tv-datapoint-value" }, Ft = /* @__PURE__ */ F({
488
562
  __name: "ComparisonPage",
489
563
  setup(e) {
490
- const t = Y(), a = v(() => dt(t.data)), c = v(() => a.value.filter((k) => !k.unanchored)), o = v(() => a.value.filter((k) => k.unanchored));
491
- function r(k) {
492
- const m = H(k).value;
493
- return m == null ? "" : String(m);
564
+ const t = J(), l = c(() => yt(t.data)), d = c(() => l.value.filter((w) => !w.unanchored)), o = c(() => l.value.filter((w) => w.unanchored));
565
+ function r(w) {
566
+ const x = W(w).value;
567
+ return x == null ? "" : String(x);
494
568
  }
495
- function u(k) {
496
- return k == null ? "" : String(k);
569
+ function u(w) {
570
+ return w == null ? "" : String(w);
497
571
  }
498
- function p(k) {
499
- var m, d, $;
500
- return ($ = (d = (m = k.meta) == null ? void 0 : m.candidates) == null ? void 0 : d.extracted) == null ? void 0 : $.confidence;
572
+ function p(w) {
573
+ var x, v, $;
574
+ return ($ = (v = (x = w.meta) == null ? void 0 : x.candidates) == null ? void 0 : v.extracted) == null ? void 0 : $.confidence;
501
575
  }
502
- function _(k) {
576
+ function h(w) {
503
577
  var $;
504
- const m = ($ = k.meta) == null ? void 0 : $.candidates;
505
- if (!m) return [];
506
- const d = [];
507
- return m.override && d.push({ source: "override", value: m.override.value }), m.extracted && d.push({ source: "extracted", value: m.extracted.value }), m.claim && d.push({ source: "claim", value: m.claim.value }), d;
578
+ const x = ($ = w.meta) == null ? void 0 : $.candidates;
579
+ if (!x) return [];
580
+ const v = [];
581
+ return x.override && v.push({ source: "override", value: x.override.value }), x.extracted && v.push({ source: "extracted", value: x.extracted.value }), x.claim && v.push({ source: "claim", value: x.claim.value }), v;
508
582
  }
509
- return (k, m) => (l(), s("div", vt, [
510
- m[1] || (m[1] = n("h2", { class: "tv-comparison-title text-lg font-semibold" }, "Verification comparison", -1)),
511
- a.value.length === 0 ? (l(), s("p", ft, " No data points to compare. ")) : b("", !0),
512
- c.value.length ? (l(), s("section", pt, [
513
- (l(!0), s(V, null, T(c.value, (d) => {
514
- var $, O, I;
515
- return l(), s("div", {
516
- key: d.path,
583
+ return (w, x) => (a(), s("div", ht, [
584
+ x[1] || (x[1] = n("h2", { class: "tv-comparison-title text-lg font-semibold" }, "Verification comparison", -1)),
585
+ l.value.length === 0 ? (a(), s("p", bt, " No data points to compare. ")) : g("", !0),
586
+ d.value.length ? (a(), s("section", gt, [
587
+ (a(!0), s(O, null, T(d.value, (v) => {
588
+ var $, L, C;
589
+ return a(), s("div", {
590
+ key: v.path,
517
591
  class: "tv-datapoint border-t border-gray-100 pt-2"
518
592
  }, [
519
- n("div", mt, [
520
- n("span", _t, f(d.path), 1),
521
- n("span", xt, f(r(d.meta)), 1),
522
- A(j, {
523
- confidence: p(d),
593
+ n("div", wt, [
594
+ n("span", kt, f(v.path), 1),
595
+ n("span", St, f(r(v.meta)), 1),
596
+ E(R, {
597
+ confidence: p(v),
524
598
  "show-label": ""
525
599
  }, null, 8, ["confidence"]),
526
- g(se)(d.meta) ? (l(), s("span", yt, "⚠ discrepancy")) : b("", !0)
600
+ y(oe)(v.meta) ? (a(), s("span", $t, "⚠ discrepancy")) : g("", !0)
527
601
  ]),
528
- n("ul", gt, [
529
- (l(!0), s(V, null, T(_(d), (x) => (l(), s("li", {
530
- key: x.source,
602
+ n("ul", Vt, [
603
+ (a(!0), s(O, null, T(h(v), (k) => (a(), s("li", {
604
+ key: k.source,
531
605
  class: "tv-candidate"
532
606
  }, [
533
- n("span", ht, f(x.source) + ":", 1),
534
- K(" " + f(u(x.value)), 1)
607
+ n("span", Ct, f(k.source) + ":", 1),
608
+ q(" " + f(u(k.value)), 1)
535
609
  ]))), 128))
536
610
  ]),
537
- g(B)(d.meta) ? (l(), s("p", bt, f(g(B)(d.meta)), 1)) : b("", !0),
538
- g(F)(d.meta) ? (l(), s("p", kt, " “" + f(g(F)(d.meta)) + "” ", 1)) : b("", !0),
539
- n("ul", wt, [
540
- (l(!0), s(V, null, T(g(oe)((I = (O = ($ = d.meta) == null ? void 0 : $.candidates) == null ? void 0 : O.extracted) == null ? void 0 : I.sources), (x, E) => (l(), s("li", {
541
- key: E,
611
+ y(Y)(v.meta) ? (a(), s("p", Ot, f(y(Y)(v.meta)), 1)) : g("", !0),
612
+ y(G)(v.meta) ? (a(), s("p", Lt, " “" + f(y(G)(v.meta)) + "” ", 1)) : g("", !0),
613
+ n("ul", It, [
614
+ (a(!0), s(O, null, T(y(re)((C = (L = ($ = v.meta) == null ? void 0 : $.candidates) == null ? void 0 : L.extracted) == null ? void 0 : C.sources), (k, A) => (a(), s("li", {
615
+ key: A,
542
616
  class: "tv-source-group"
543
617
  }, [
544
- x.fileUrl ? (l(), s("a", {
618
+ k.fileUrl ? (a(), s("a", {
545
619
  key: 0,
546
- href: x.fileUrl,
620
+ href: k.fileUrl,
547
621
  class: "tv-source-link text-blue-600 underline",
548
622
  target: "_blank",
549
623
  rel: "noopener"
550
- }, f(x.fileLabel), 9, St)) : (l(), s("span", $t, f(x.fileLabel), 1)),
551
- n("span", Ct, "(" + f(x.sources.map(g(ie)).join(", ")) + ")", 1)
624
+ }, f(k.fileLabel), 9, Ut)) : (a(), s("span", Et, f(k.fileLabel), 1)),
625
+ n("span", Tt, "(" + f(k.sources.map(y(ue)).join(", ")) + ")", 1)
552
626
  ]))), 128))
553
627
  ])
554
628
  ]);
555
629
  }), 128))
556
- ])) : b("", !0),
557
- o.value.length ? (l(), s("section", Vt, [
558
- m[0] || (m[0] = n("h3", { class: "tv-unanchored-title text-sm font-semibold text-gray-500" }, " Unanchored / not from source ", -1)),
559
- (l(!0), s(V, null, T(o.value, (d) => (l(), s("div", {
560
- key: d.path,
630
+ ])) : g("", !0),
631
+ o.value.length ? (a(), s("section", Dt, [
632
+ x[0] || (x[0] = n("h3", { class: "tv-unanchored-title text-sm font-semibold text-gray-500" }, " Unanchored / not from source ", -1)),
633
+ (a(!0), s(O, null, T(o.value, (v) => (a(), s("div", {
634
+ key: v.path,
561
635
  class: "tv-unanchored-datapoint flex items-center gap-2 text-sm"
562
636
  }, [
563
- n("span", Ot, f(d.path), 1),
564
- n("span", It, f(u(d.value)), 1),
565
- A(j, { status: "unverifiable" })
637
+ n("span", At, f(v.path), 1),
638
+ n("span", Nt, f(u(v.value)), 1),
639
+ E(R, { status: "unverifiable" })
566
640
  ]))), 128))
567
- ])) : b("", !0)
641
+ ])) : g("", !0)
568
642
  ]));
569
643
  }
570
- }), Ut = { class: "tv-enable-toggle flex items-center justify-between text-sm" }, Nt = /* @__PURE__ */ M({
644
+ }), Mt = { class: "tv-enable-toggle flex items-center justify-between text-sm" }, zt = /* @__PURE__ */ F({
571
645
  __name: "VerificationChrome",
572
646
  setup(e) {
573
- const { enabled: t, openComparison: a } = Y(), c = be(), o = U(!1);
647
+ const { enabled: t, openComparison: l } = J(), d = Ce(), o = U(!1);
574
648
  function r() {
575
- a(), o.value = !1;
649
+ l(), o.value = !1;
576
650
  }
577
- return (u, p) => (l(), s(V, null, [
651
+ return (u, p) => (a(), s(O, null, [
578
652
  n("button", {
579
653
  type: "button",
580
- class: L(["tv-settings-button fixed bottom-4 right-4 z-50 flex h-10 w-10 items-center justify-center rounded-full bg-gray-800 text-white shadow-lg", g(D)]),
654
+ class: I(["tv-settings-button fixed bottom-4 right-4 z-50 flex h-10 w-10 items-center justify-center rounded-full bg-gray-800 text-white shadow-lg", y(D)]),
581
655
  title: "Verification settings",
582
- onClick: p[0] || (p[0] = (_) => o.value = !o.value)
656
+ onClick: p[0] || (p[0] = (h) => o.value = !o.value)
583
657
  }, [
584
- A(g(_e), {
585
- icon: g(xe),
658
+ E(y(we), {
659
+ icon: y(ke),
586
660
  class: "h-5 w-5"
587
661
  }, null, 8, ["icon"])
588
662
  ], 2),
589
- o.value ? (l(), s("div", {
663
+ o.value ? (a(), s("div", {
590
664
  key: 0,
591
- class: L(["tv-settings-panel fixed bottom-16 right-4 z-50 flex w-56 flex-col gap-3 rounded-lg bg-white p-4 shadow-xl ring-1 ring-gray-200", g(D)])
665
+ class: I(["tv-settings-panel fixed bottom-16 right-4 z-50 flex w-56 flex-col gap-3 rounded-lg bg-white p-4 shadow-xl ring-1 ring-gray-200", y(D)])
592
666
  }, [
593
- n("label", Ut, [
667
+ n("label", Mt, [
594
668
  p[3] || (p[3] = n("span", null, "Verification overlay", -1)),
595
- Z(n("input", {
596
- "onUpdate:modelValue": p[1] || (p[1] = (_) => J(t) ? t.value = _ : null),
669
+ le(n("input", {
670
+ "onUpdate:modelValue": p[1] || (p[1] = (h) => ee(t) ? t.value = h : null),
597
671
  type: "checkbox",
598
672
  class: "tv-enable-checkbox"
599
673
  }, null, 512), [
600
- [me, g(t)]
674
+ [he, y(t)]
601
675
  ])
602
676
  ]),
603
677
  n("button", {
604
678
  type: "button",
605
- class: L(["tv-open-comparison rounded border px-2 py-1 text-sm", g(D)]),
679
+ class: I(["tv-open-comparison rounded border px-2 py-1 text-sm", y(D)]),
606
680
  onClick: r
607
681
  }, "Open comparison page", 2)
608
- ], 2)) : b("", !0),
609
- A(g(ee), {
610
- modelValue: g(c),
611
- "onUpdate:modelValue": p[2] || (p[2] = (_) => J(c) ? c.value = _ : null),
682
+ ], 2)) : g("", !0),
683
+ E(y(K), {
684
+ modelValue: y(d),
685
+ "onUpdate:modelValue": p[2] || (p[2] = (h) => ee(d) ? d.value = h : null),
612
686
  title: "Verification comparison",
613
687
  width: 80,
614
688
  "close-x": "",
615
- class: L(g(D))
689
+ class: I(y(D))
616
690
  }, {
617
- default: X(() => [
618
- A(Lt)
691
+ default: z(() => [
692
+ E(Ft)
619
693
  ]),
620
694
  _: 1
621
695
  }, 8, ["modelValue", "class"])
@@ -624,25 +698,25 @@ const vt = { class: "tv-comparison-page flex flex-col gap-4" }, ft = {
624
698
  });
625
699
  export {
626
700
  D as CHROME_CLASS,
627
- Lt as ComparisonPage,
628
- j as ConfidenceIcon,
629
- te as ENABLED_STORAGE_KEY,
630
- le as RESOLUTION_PRIORITY,
631
- ke as STATUS_COLORS,
632
- we as STATUS_LABELS,
633
- Nt as VerificationChrome,
634
- ot as VerificationModal,
635
- Dt as VerifiedField,
636
- G as bucketConfidence,
637
- $e as candidatesDisagree,
638
- F as citedTextOf,
639
- oe as groupSources,
640
- se as hasDiscrepancy,
641
- At as initVerification,
642
- B as reasoningOf,
643
- Se as resolveCandidates,
644
- H as resolveDataPoint,
645
- ie as sourceRowLabel,
646
- Y as useVerification,
647
- dt as walkDataPoints
701
+ Ft as ComparisonPage,
702
+ R as ConfidenceIcon,
703
+ ae as ENABLED_STORAGE_KEY,
704
+ ie as RESOLUTION_PRIORITY,
705
+ Oe as STATUS_COLORS,
706
+ Le as STATUS_LABELS,
707
+ zt as VerificationChrome,
708
+ ft as VerificationModal,
709
+ Bt as VerifiedField,
710
+ Q as bucketConfidence,
711
+ Ue as candidatesDisagree,
712
+ G as citedTextOf,
713
+ re as groupSources,
714
+ oe as hasDiscrepancy,
715
+ jt as initVerification,
716
+ Y as reasoningOf,
717
+ Ie as resolveCandidates,
718
+ W as resolveDataPoint,
719
+ ue as sourceRowLabel,
720
+ J as useVerification,
721
+ yt as walkDataPoints
648
722
  };
package/dist/types.d.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  * A rendered object node carries a `__meta` MAP keyed by leaf field name; each
8
8
  * entry is a {@link DataPointMeta} describing that one field's verification state.
9
9
  */
10
+ import type { PreviewFile } from "@thehammer/danx-ui";
10
11
  /** Status bucket derived from the integer 1-5 confidence (orthogonal to discrepancy). */
11
12
  export type VerificationStatus = "high" | "medium" | "low" | "unverifiable";
12
13
  /** The winning candidate key for a resolved data point, or `none` when no candidate exists. */
@@ -30,6 +31,13 @@ export interface VerificationSource {
30
31
  page?: number;
31
32
  file_url?: string;
32
33
  file_name?: string;
34
+ /**
35
+ * The resolved StoredFile behind `stored_file_id`, danx-ui `PreviewFile`-shaped
36
+ * (id/name/size/mime/url/thumb?). Present when the host resolved it (gpt-manager's
37
+ * `TemplateDataResource::sourceFilePayload`); null/absent when the source has no
38
+ * linked file. This is what the modal renders a real thumbnail/preview from.
39
+ */
40
+ file?: PreviewFile | null;
33
41
  }
34
42
  /** The extracted (pipeline) candidate — carries provenance: confidence, reasoning, citation. */
35
43
  export interface ExtractedCandidate {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/template-verification",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
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",
@@ -37,10 +37,12 @@
37
37
  "vue": "^3.4.0"
38
38
  },
39
39
  "devDependencies": {
40
+ "@tailwindcss/vite": "^4.0.0",
40
41
  "@thehammer/danx-ui": "^0.8.16",
41
42
  "@vitejs/plugin-vue": "^5.0.0",
42
43
  "@vue/test-utils": "^2.4.6",
43
44
  "happy-dom": "^20.3.9",
45
+ "tailwindcss": "^4.0.0",
44
46
  "typescript": "~5.4.0",
45
47
  "vite": "^5.4.0",
46
48
  "vitest": "^2.1.0",