@thehammer/template-verification 0.1.1 → 0.1.2

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.
@@ -13,7 +13,13 @@ import type { VerificationStatus } from "../types";
13
13
  * reintroduce string matching here — bucket the integer.
14
14
  */
15
15
  export declare function bucketConfidence(confidence?: number | null): VerificationStatus;
16
- /** Tailwind/text color token per status, for the icon + label. */
16
+ /**
17
+ * Tailwind pill-badge classes per status (bg tint + text + ring), for
18
+ * ConfidenceIcon's soft-badge treatment. Each value's color family (green/
19
+ * yellow/red/gray) is load-bearing — ConfidenceIcon.test.ts asserts the
20
+ * rendered class list CONTAINS that literal color word, so any restyle must
21
+ * keep the same family per status even if the shade/utility changes.
22
+ */
17
23
  export declare const STATUS_COLORS: Record<VerificationStatus, string>;
18
24
  /** Human-readable status label. */
19
25
  export declare const STATUS_LABELS: Record<VerificationStatus, string>;
package/dist/style.css CHANGED
@@ -1 +1 @@
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
+ /*! 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-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--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;--tw-duration:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}}@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-50:oklch(97.1% .013 17.38);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-green-50:oklch(98.2% .018 155.826);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-blue-600:oklch(54.6% .245 262.881);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--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-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--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-wider:.05em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--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{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-top-1\.5{top:calc(var(--spacing) * -1.5)}.-right-1\.5{right:calc(var(--spacing) * -1.5)}.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}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.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}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-10{height:calc(var(--spacing) * 10)}.h-16{height:calc(var(--spacing) * 16)}.h-full{height:100%}.w-5{width:calc(var(--spacing) * 5)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-56{width:calc(var(--spacing) * 56)}.w-full{width:100%}.min-w-\[1rem\]{min-width:1rem}.flex-1{flex:1}.shrink-0{flex-shrink:0}.cursor-pointer{cursor:pointer}.grid-cols-\[repeat\(auto-fill\,minmax\(4\.5rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(4.5rem,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.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)}.gap-5{gap:calc(var(--spacing) * 5)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-gray-100>:not(:last-child)){border-color:var(--color-gray-100)}.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)}.rounded-md{border-radius:var(--radius-md)}.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)}.border-gray-300{border-color:var(--color-gray-300)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-green-50{background-color:var(--color-green-50)}.bg-red-50{background-color:var(--color-red-50)}.bg-white{background-color:var(--color-white)}.bg-yellow-50{background-color:var(--color-yellow-50)}.p-1{padding:var(--spacing)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.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))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.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-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.whitespace-pre-line{white-space:pre-line}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.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-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-red-700{color:var(--color-red-700)}.text-white{color:var(--color-white)}.text-yellow-700{color:var(--color-yellow-700)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.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-amber-600\/20{--tw-ring-color:#dd740033}@supports (color:color-mix(in lab,red,red)){.ring-amber-600\/20{--tw-ring-color:color-mix(in oklab, var(--color-amber-600) 20%, transparent)}}.ring-gray-200{--tw-ring-color:var(--color-gray-200)}.ring-gray-400\/20{--tw-ring-color:#99a1af33}@supports (color:color-mix(in lab,red,red)){.ring-gray-400\/20{--tw-ring-color:color-mix(in oklab, var(--color-gray-400) 20%, transparent)}}.ring-green-600\/20{--tw-ring-color:#00a54433}@supports (color:color-mix(in lab,red,red)){.ring-green-600\/20{--tw-ring-color:color-mix(in oklab, var(--color-green-600) 20%, transparent)}}.ring-red-600\/20{--tw-ring-color:#e4001433}@supports (color:color-mix(in lab,red,red)){.ring-red-600\/20{--tw-ring-color:color-mix(in oklab, var(--color-red-600) 20%, transparent)}}.ring-yellow-600\/20{--tw-ring-color:#cd890033}@supports (color:color-mix(in lab,red,red)){.ring-yellow-600\/20{--tw-ring-color:color-mix(in oklab, var(--color-yellow-600) 20%, transparent)}}.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,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px 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)}.hover\:ring-gray-300:hover{--tw-ring-color:var(--color-gray-300)}}.focus\:border-gray-400:focus{border-color:var(--color-gray-400)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + 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)}.focus\:ring-gray-200:focus{--tw-ring-color:var(--color-gray-200)}}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@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}@property --tw-duration{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@media print{.tv-chrome{display:none!important}}
@@ -1,8 +1,8 @@
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
- let P = null;
5
- function Se(e) {
1
+ import { ref as U, watch as me, defineComponent as P, computed as d, openBlock as l, createElementBlock as i, normalizeClass as I, createElementVNode as a, toDisplayString as p, createCommentVNode as h, Fragment as O, createVNode as D, unref as x, withCtx as j, createTextVNode as E, renderList as T, createBlock as F, withDirectives as le, vModelText as xe, withKeys as ge, withModifiers as ye, renderSlot as _e, isRef as te, vModelCheckbox as be } from "vue";
2
+ import { DanxDialog as G, DanxFile as he, DanxButton as Y, DanxFileViewer as we, DanxIcon as ke, gearIcon as Se } from "@thehammer/danx-ui";
3
+ const A = "tv-chrome", ae = "template-verification:enabled";
4
+ let R = null;
5
+ function $e(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 Se(e) {
10
10
  return null;
11
11
  }
12
12
  }
13
- function $e(e, t) {
14
- var l;
13
+ function Ve(e, t) {
14
+ var n;
15
15
  try {
16
- (l = globalThis.localStorage) == null || l.setItem(e, t);
16
+ (n = globalThis.localStorage) == null || n.setItem(e, t);
17
17
  } catch {
18
18
  }
19
19
  }
20
- function Ve(e) {
21
- const t = Se(ae);
20
+ function Ce(e) {
21
+ const t = $e(ae);
22
22
  return t === null ? e : t === "true";
23
23
  }
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")), {
24
+ function se(e) {
25
+ const t = U(Ce((e == null ? void 0 : e.defaultEnabled) ?? !1));
26
+ return me(t, (n) => Ve(ae, n ? "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 ne(e) {
31
31
  comparisonOpen: U(!1)
32
32
  };
33
33
  }
34
- function se() {
35
- return P || (P = ne()), P;
34
+ function ie() {
35
+ return R || (R = se()), R;
36
36
  }
37
- function jt(e) {
38
- P = ne(e);
37
+ function Bt(e) {
38
+ R = se(e);
39
39
  }
40
- function J() {
41
- const e = se();
40
+ function Q() {
41
+ const e = ie();
42
42
  return {
43
43
  enabled: e.enabled,
44
44
  data: e.data,
@@ -49,84 +49,84 @@ function J() {
49
49
  }
50
50
  };
51
51
  }
52
- function Ce() {
53
- return se().comparisonOpen;
52
+ function Oe() {
53
+ return ie().comparisonOpen;
54
54
  }
55
- function Q(e) {
55
+ function W(e) {
56
56
  return typeof e != "number" || Number.isNaN(e) ? "unverifiable" : e <= 2 ? "low" : e === 3 ? "medium" : "high";
57
57
  }
58
- const Oe = {
59
- high: "text-green-600",
60
- medium: "text-yellow-500",
61
- low: "text-red-600",
62
- unverifiable: "text-gray-400"
63
- }, Le = {
58
+ const Le = {
59
+ high: "bg-green-50 text-green-700 ring-1 ring-inset ring-green-600/20",
60
+ medium: "bg-yellow-50 text-yellow-700 ring-1 ring-inset ring-yellow-600/20",
61
+ low: "bg-red-50 text-red-700 ring-1 ring-inset ring-red-600/20",
62
+ unverifiable: "bg-gray-50 text-gray-500 ring-1 ring-inset ring-gray-400/20"
63
+ }, Ie = {
64
64
  high: "High",
65
65
  medium: "Medium",
66
66
  low: "Low",
67
67
  unverifiable: "Unverifiable"
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" };
68
+ }, re = ["override", "extracted", "claim"];
69
+ function X(e) {
70
+ return e ? e.resolved && e.resolved.source && e.resolved.source !== "none" ? e.resolved : Ue(e.candidates) : { value: null, source: "none" };
71
71
  }
72
- function Ie(e) {
72
+ function Ue(e) {
73
73
  if (e)
74
- for (const t of ie) {
75
- const l = e[t];
76
- if (l != null)
77
- return { value: l.value, source: t };
74
+ for (const t of re) {
75
+ const n = e[t];
76
+ if (n != null)
77
+ return { value: n.value, source: t };
78
78
  }
79
79
  return { value: null, source: "none" };
80
80
  }
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;
81
+ function H(e) {
82
+ var f, r;
83
+ const t = (r = (f = e == null ? void 0 : e.candidates) == null ? void 0 : f.extracted) == null ? void 0 : r.reasoning;
84
84
  if (t == null) return null;
85
- const l = String(t).trim();
86
- return l === "" ? null : l;
85
+ const n = String(t).trim();
86
+ return n === "" ? null : n;
87
87
  }
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;
88
+ function q(e) {
89
+ var f, r;
90
+ const t = (r = (f = e == null ? void 0 : e.candidates) == null ? void 0 : f.extracted) == null ? void 0 : r.cited_text;
91
91
  if (t == null) return null;
92
- const l = String(t).trim();
93
- return l === "" ? null : l;
92
+ const n = String(t).trim();
93
+ return n === "" ? null : n;
94
94
  }
95
95
  function oe(e) {
96
- return e ? typeof e.discrepancy == "boolean" ? e.discrepancy : Ue(e.candidates) : !1;
96
+ return e ? typeof e.discrepancy == "boolean" ? e.discrepancy : De(e.candidates) : !1;
97
97
  }
98
- function Ue(e) {
98
+ function De(e) {
99
99
  if (!e) return !1;
100
- const t = ie.map((l) => e[l]).filter((l) => l != null).map((l) => Ee(l.value));
100
+ const t = re.map((n) => e[n]).filter((n) => n != null).map((n) => Ee(n.value));
101
101
  return t.length < 2 ? !1 : new Set(t).size > 1;
102
102
  }
103
103
  function Ee(e) {
104
104
  return JSON.stringify(e ?? null);
105
105
  }
106
- function Te(e, t, l) {
107
- var r;
108
- const d = (r = t.value) == null ? void 0 : r.anchor;
109
- if (!e.saveOverride || !d) return null;
110
- const o = e.saveOverride;
111
- return async (u, p) => {
112
- const h = await o({
106
+ function Te(e, t, n) {
107
+ var o;
108
+ const f = (o = t.value) == null ? void 0 : o.anchor;
109
+ if (!e.saveOverride || !f) return null;
110
+ const r = e.saveOverride;
111
+ return async (c, g) => {
112
+ const b = await r({
113
113
  workflow_input_id: e.workflowInputId,
114
- object_ids: d.object_ids,
115
- field: d.field,
116
- field_path: d.field_path,
117
- value: u,
118
- source_choice: p
114
+ object_ids: f.object_ids,
115
+ field: f.field,
116
+ field_path: f.field_path,
117
+ value: c,
118
+ source_choice: g
119
119
  });
120
- return l(h), h;
120
+ return n(b), b;
121
121
  };
122
122
  }
123
- const De = ["data-status", "title"], Ae = {
123
+ const Ae = ["data-status", "title"], Ne = {
124
124
  class: "tv-confidence-glyph",
125
125
  "aria-hidden": "true"
126
- }, Ne = {
126
+ }, je = {
127
127
  key: 0,
128
- class: "tv-confidence-label text-xs font-medium"
129
- }, R = /* @__PURE__ */ F({
128
+ class: "tv-confidence-label"
129
+ }, z = /* @__PURE__ */ P({
130
130
  __name: "ConfidenceIcon",
131
131
  props: {
132
132
  confidence: {},
@@ -134,9 +134,9 @@ const De = ["data-status", "title"], Ae = {
134
134
  showLabel: { type: Boolean }
135
135
  },
136
136
  setup(e) {
137
- const t = e, l = c(
138
- () => t.status ?? Q(t.confidence)
139
- ), d = {
137
+ const t = e, n = d(
138
+ () => t.status ?? W(t.confidence)
139
+ ), f = {
140
140
  high: "✔",
141
141
  // check
142
142
  medium: "⚠",
@@ -144,29 +144,29 @@ const De = ["data-status", "title"], Ae = {
144
144
  low: "✕",
145
145
  // x
146
146
  unverifiable: "?"
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
- title: u.value
147
+ }, r = d(() => f[n.value]), o = d(() => Le[n.value]), c = d(() => Ie[n.value]);
148
+ return (g, b) => (l(), i("span", {
149
+ class: I(["tv-confidence-icon inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-semibold leading-none", o.value]),
150
+ "data-status": n.value,
151
+ title: c.value
152
152
  }, [
153
- n("span", Ae, f(o.value), 1),
154
- e.showLabel ? (a(), s("span", Ne, f(u.value), 1)) : g("", !0)
155
- ], 10, De));
153
+ a("span", Ne, p(r.value), 1),
154
+ e.showLabel ? (l(), i("span", je, p(c.value), 1)) : h("", !0)
155
+ ], 10, Ae));
156
156
  }
157
157
  });
158
- function re(e) {
158
+ function ue(e) {
159
159
  if (!e || e.length === 0) return [];
160
160
  const t = /* @__PURE__ */ new Map();
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,
161
+ for (const n of e) {
162
+ const f = Fe(n);
163
+ let r = t.get(f);
164
+ r || (r = {
165
+ fileLabel: Me(n),
166
+ fileUrl: n.file_url,
167
+ file: n.file,
168
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);
169
+ }, t.set(f, r)), !r.fileUrl && n.file_url && (r.fileUrl = n.file_url), !r.file && n.file && (r.file = n.file), r.sources.push(n);
170
170
  }
171
171
  return [...t.values()];
172
172
  }
@@ -178,31 +178,34 @@ function Me(e) {
178
178
  var t;
179
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";
180
180
  }
181
- function ue(e) {
181
+ function ce(e) {
182
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";
183
183
  }
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 = {
184
+ const Pe = { class: "tv-modal flex flex-col gap-5 p-4 text-sm text-gray-700" }, Re = { class: "tv-modal-resolved rounded-lg border border-gray-200 bg-gray-50 p-3" }, ze = { class: "mt-1.5 flex flex-wrap items-center gap-2" }, Be = { class: "tv-resolved-value text-lg font-semibold leading-tight text-gray-900" }, Ke = { class: "mt-1 font-mono text-[11px] text-gray-400" }, Ye = { class: "tv-resolved-source" }, Ge = {
185
185
  key: 0,
186
- class: "tv-discrepancy text-xs font-medium text-amber-600"
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 = {
186
+ class: "tv-discrepancy mt-2 inline-flex items-center gap-1 rounded-full bg-amber-50 px-2 py-0.5 text-[11px] font-medium text-amber-700 ring-1 ring-inset ring-amber-600/20"
187
+ }, He = { class: "tv-modal-candidates" }, qe = { class: "mt-1.5 divide-y divide-gray-100 rounded-lg border border-gray-200" }, Je = { class: "w-20 shrink-0 text-xs font-medium text-gray-500" }, Qe = { class: "flex-1 truncate font-mono text-sm text-gray-800" }, We = { class: "shrink-0 text-[11px] text-gray-400" }, Xe = {
188
188
  key: 0,
189
- class: "tv-modal-provenance flex flex-col gap-1"
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 = {
189
+ class: "tv-modal-provenance flex flex-col gap-2 rounded-lg border border-gray-200 p-3"
190
+ }, Ze = { class: "flex items-center justify-between" }, et = { class: "tv-confidence-value font-mono text-sm font-semibold text-gray-800" }, tt = { class: "tv-reasoning whitespace-pre-line text-sm leading-relaxed text-gray-600" }, nt = { class: "tv-cited-text rounded-md border-l-2 border-gray-300 bg-gray-50 py-1.5 pl-3 pr-2 text-sm italic leading-relaxed text-gray-600" }, lt = { class: "tv-modal-sources" }, at = {
191
191
  key: 0,
192
- class: "tv-no-source text-gray-400"
193
- }, lt = {
192
+ class: "tv-no-source mt-1.5 text-sm text-gray-400"
193
+ }, st = {
194
194
  key: 1,
195
- class: "tv-source-grid flex flex-wrap gap-3 pt-1"
196
- }, at = ["href"], nt = {
195
+ class: "tv-source-grid mt-2 grid grid-cols-[repeat(auto-fill,minmax(4.5rem,1fr))] items-start gap-3"
196
+ }, it = { class: "relative" }, rt = ["href"], ot = {
197
197
  key: 2,
198
- class: "tv-source-name text-xs text-gray-600"
199
- }, st = ["title"], it = {
198
+ class: "tv-source-name flex h-16 w-16 items-center justify-center rounded-md bg-gray-50 p-1 text-center text-[11px] leading-tight text-gray-500 ring-1 ring-gray-200"
199
+ }, ut = {
200
200
  key: 3,
201
- class: "tv-source-citations text-xs text-gray-400"
202
- }, ot = {
201
+ class: "tv-source-count pointer-events-none absolute -right-1.5 -top-1.5 flex h-4 min-w-[1rem] items-center justify-center rounded-full bg-gray-700 px-1 text-[9px] font-semibold text-white"
202
+ }, ct = ["title"], dt = {
203
+ key: 0,
204
+ class: "tv-source-citations flex flex-wrap justify-center gap-1"
205
+ }, ft = {
203
206
  key: 1,
204
- class: "tv-modal-resolution flex flex-col gap-2 border-t border-gray-200 pt-3"
205
- }, rt = { class: "flex flex-wrap gap-2" }, ut = ["disabled"], ct = ["disabled"], dt = { class: "flex items-center gap-2" }, vt = ["disabled"], ft = /* @__PURE__ */ F({
207
+ class: "tv-modal-resolution flex flex-col gap-2 border-t border-gray-200 pt-4"
208
+ }, vt = { class: "flex flex-wrap gap-2" }, pt = { class: "flex items-center gap-2" }, mt = /* @__PURE__ */ P({
206
209
  __name: "VerificationModal",
207
210
  props: {
208
211
  modelValue: { type: Boolean },
@@ -212,211 +215,235 @@ const Pe = { class: "tv-modal flex flex-col gap-4 text-sm" }, Re = { class: "tv-
212
215
  },
213
216
  emits: ["update:modelValue", "saved"],
214
217
  setup(e, { emit: t }) {
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(
218
+ const n = e, f = t, r = d({
219
+ get: () => n.modelValue,
220
+ set: (s) => f("update:modelValue", s)
221
+ }), o = d(() => X(n.meta)), c = d(() => n.meta.candidates.extracted), g = d(() => n.meta.candidates.claim), b = d(() => n.meta.candidates.override), w = d(
219
222
  () => {
220
- var i;
221
- return Q((i = u.value) == null ? void 0 : i.confidence);
223
+ var s;
224
+ return W((s = c.value) == null ? void 0 : s.confidence);
222
225
  }
223
- ), x = c(() => Y(l.meta)), v = c(() => G(l.meta)), $ = c(() => {
224
- var i;
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({
226
+ ), y = d(() => H(n.meta)), v = d(() => q(n.meta)), $ = d(() => {
227
+ var s;
228
+ return ue((s = c.value) == null ? void 0 : s.sources);
229
+ }), L = d(
230
+ () => $.value.map((s) => s.file).filter((s) => !!s)
231
+ ), C = U(null), k = d({
229
232
  get: () => C.value !== null,
230
- set: (i) => {
231
- i || (C.value = null);
233
+ set: (s) => {
234
+ s || (C.value = null);
232
235
  }
233
236
  });
234
- function A(i) {
235
- i.file && (C.value = i);
237
+ function N(s) {
238
+ s.file && (C.value = s);
236
239
  }
237
- const j = c(() => {
238
- const i = [];
239
- return h.value && i.push({
240
+ const B = d(() => {
241
+ const s = [];
242
+ return b.value && s.push({
240
243
  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
+ value: b.value.value,
245
+ detail: b.value.source_choice ? `via ${b.value.source_choice}` : void 0
246
+ }), c.value && s.push({
244
247
  source: "Extracted",
245
- value: u.value.value,
246
- detail: S(u.value.confidence)
247
- }), p.value && i.push({
248
+ value: c.value.value,
249
+ detail: S(c.value.confidence)
250
+ }), g.value && s.push({
248
251
  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) {
254
- return i == null ? "Unverifiable" : `${i}/5`;
252
+ value: g.value.value,
253
+ detail: g.value.claim_set_label ?? void 0
254
+ }), s;
255
+ }), M = U(""), _ = U(!1);
256
+ function S(s) {
257
+ return s == null ? "Unverifiable" : `${s}/5`;
255
258
  }
256
- function V(i) {
257
- return i == null ? "" : String(i);
259
+ function V(s) {
260
+ return s == null ? "" : String(s);
258
261
  }
259
- async function B(i, b) {
260
- if (!(!l.save || _.value)) {
262
+ async function K(s, u) {
263
+ if (!(!n.save || _.value)) {
261
264
  _.value = !0;
262
265
  try {
263
- const m = await l.save(i, b);
264
- d("saved", m);
266
+ const m = await n.save(s, u);
267
+ f("saved", m);
265
268
  } finally {
266
269
  _.value = !1;
267
270
  }
268
271
  }
269
272
  }
270
- const ce = () => {
271
- var i;
272
- return B(X((i = u.value) == null ? void 0 : i.value), "extracted");
273
- }, de = () => {
274
- var i;
275
- return B(X((i = p.value) == null ? void 0 : i.value), "claim");
276
- }, ve = () => B(N.value, "custom");
277
- function X(i) {
278
- return i == null ? null : String(i);
273
+ const de = () => {
274
+ var s;
275
+ return K(Z((s = c.value) == null ? void 0 : s.value), "extracted");
276
+ }, fe = () => {
277
+ var s;
278
+ return K(Z((s = g.value) == null ? void 0 : s.value), "claim");
279
+ }, ve = () => K(M.value, "custom");
280
+ function Z(s) {
281
+ return s == null ? null : String(s);
279
282
  }
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),
283
+ return (s, u) => (l(), i(O, null, [
284
+ D(x(G), {
285
+ modelValue: r.value,
286
+ "onUpdate:modelValue": u[1] || (u[1] = (m) => r.value = m),
284
287
  title: e.label || "Verification detail",
285
288
  "close-x": "",
286
- class: I(y(D))
289
+ class: I(x(A))
287
290
  }, {
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, {
291
+ default: j(() => [
292
+ a("div", Pe, [
293
+ a("section", Re, [
294
+ u[4] || (u[4] = a("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Resolved value ", -1)),
295
+ a("div", ze, [
296
+ a("span", Be, p(V(o.value.value) || "—"), 1),
297
+ D(z, {
296
298
  status: w.value,
297
299
  "show-label": ""
298
300
  }, null, 8, ["status"])
299
301
  ]),
300
- e.meta.discrepancy ? (a(), s("div", Ke, " ⚠ Sources disagree ")) : g("", !0)
302
+ a("div", Ke, [
303
+ u[3] || (u[3] = E(" source: ", -1)),
304
+ a("span", Ye, p(o.value.source), 1)
305
+ ]),
306
+ e.meta.discrepancy ? (l(), i("div", Ge, " ⚠ Sources disagree ")) : h("", !0)
301
307
  ]),
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
- ])
308
+ a("section", He, [
309
+ u[5] || (u[5] = a("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Candidates ", -1)),
310
+ a("div", qe, [
311
+ (l(!0), i(O, null, T(B.value, (m) => (l(), i("div", {
312
+ key: m.source,
313
+ class: "tv-candidate-row flex items-center gap-3 px-3 py-2"
314
+ }, [
315
+ a("span", Je, p(m.source), 1),
316
+ a("span", Qe, p(V(m.value)), 1),
317
+ a("span", We, p(m.detail), 1)
318
+ ]))), 128))
315
319
  ])
316
320
  ]),
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", {
321
+ c.value ? (l(), i("section", Xe, [
322
+ a("div", Ze, [
323
+ u[6] || (u[6] = a("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Confidence ", -1)),
324
+ a("div", et, p(S(c.value.confidence)), 1)
325
+ ]),
326
+ y.value ? (l(), i(O, { key: 0 }, [
327
+ u[7] || (u[7] = a("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Reasoning ", -1)),
328
+ a("p", tt, p(y.value), 1)
329
+ ], 64)) : h("", !0),
330
+ v.value ? (l(), i(O, { key: 1 }, [
331
+ u[8] || (u[8] = a("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Cited text ", -1)),
332
+ a("blockquote", nt, [
333
+ E(p(v.value) + " ", 1),
334
+ a("span", {
329
335
  class: I([
330
- "tv-cited-verified ml-1 text-xs",
331
- u.value.cited_text_verified ? "text-green-600" : "text-gray-400"
336
+ "tv-cited-verified ml-1 not-italic text-[11px] font-medium",
337
+ c.value.cited_text_verified ? "text-green-600" : "text-gray-400"
332
338
  ])
333
- }, f(u.value.cited_text_verified ? "✔ verified" : "unverified"), 3)
339
+ }, p(c.value.cited_text_verified ? "✔ verified" : "unverified"), 3)
334
340
  ])
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
+ ], 64)) : h("", !0)
342
+ ])) : h("", !0),
343
+ a("section", lt, [
344
+ u[9] || (u[9] = a("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Sources ", -1)),
345
+ $.value.length === 0 ? (l(), i("div", at, " No source recorded ")) : (l(), i("div", st, [
346
+ (l(!0), i(O, null, T($.value, (m) => (l(), i("div", {
341
347
  key: m.fileLabel,
342
- class: "tv-source-group flex w-20 flex-col items-center gap-1"
348
+ class: "tv-source-group flex flex-col items-center gap-1"
343
349
  }, [
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",
350
+ a("div", it, [
351
+ m.file ? (l(), F(x(he), {
352
+ key: 0,
353
+ file: m.file,
354
+ size: "sm",
355
+ class: "tv-source-thumb cursor-pointer rounded-md ring-1 ring-gray-200 transition duration-150 hover:-translate-y-0.5 hover:shadow-md hover:ring-gray-300",
356
+ onClick: (ee) => N(m)
357
+ }, null, 8, ["file", "onClick"])) : m.fileUrl ? (l(), i("a", {
358
+ key: 1,
359
+ href: m.fileUrl,
360
+ class: "tv-source-link flex h-16 w-16 items-center justify-center rounded-md bg-gray-50 p-1 text-center text-[11px] font-medium leading-tight text-blue-600 underline ring-1 ring-gray-200",
361
+ target: "_blank",
362
+ rel: "noopener"
363
+ }, p(m.fileLabel), 9, rt)) : (l(), i("span", ot, p(m.fileLabel), 1)),
364
+ m.sources.length > 1 ? (l(), i("span", ut, "×" + p(m.sources.length), 1)) : h("", !0)
365
+ ]),
366
+ a("span", {
367
+ class: "tv-source-file-label w-full truncate text-center text-[11px] text-gray-500",
359
368
  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)
369
+ }, p(m.fileLabel), 9, ct),
370
+ m.sources.length > 1 ? (l(), i("ul", dt, [
371
+ (l(!0), i(O, null, T(m.sources, (ee, pe) => (l(), i("li", {
372
+ key: pe,
373
+ class: "tv-source-row rounded bg-gray-100 px-1 py-0.5 font-mono text-[10px] text-gray-500"
374
+ }, p(x(ce)(ee)), 1))), 128))
375
+ ])) : h("", !0)
367
376
  ]))), 128))
368
377
  ]))
369
378
  ]),
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", {
379
+ e.save ? (l(), i("section", ft, [
380
+ u[13] || (u[13] = a("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Resolve ", -1)),
381
+ a("div", vt, [
382
+ c.value ? (l(), F(x(Y), {
374
383
  key: 0,
375
- type: "button",
376
- class: "tv-accept-extracted rounded border px-2 py-1",
384
+ variant: "info",
385
+ size: "sm",
386
+ class: "tv-accept-extracted",
377
387
  disabled: _.value,
378
- onClick: ce
379
- }, " Accept extracted ", 8, ut)) : g("", !0),
380
- p.value ? (a(), s("button", {
388
+ onClick: de
389
+ }, {
390
+ default: j(() => [...u[10] || (u[10] = [
391
+ E("Accept extracted", -1)
392
+ ])]),
393
+ _: 1
394
+ }, 8, ["disabled"])) : h("", !0),
395
+ g.value ? (l(), F(x(Y), {
381
396
  key: 1,
382
- type: "button",
383
- class: "tv-accept-claim rounded border px-2 py-1",
397
+ variant: "muted",
398
+ size: "sm",
399
+ class: "tv-accept-claim",
384
400
  disabled: _.value,
385
- onClick: de
386
- }, " Accept claim ", 8, ct)) : g("", !0)
401
+ onClick: fe
402
+ }, {
403
+ default: j(() => [...u[11] || (u[11] = [
404
+ E("Accept claim", -1)
405
+ ])]),
406
+ _: 1
407
+ }, 8, ["disabled"])) : h("", !0)
387
408
  ]),
388
- n("div", dt, [
389
- le(n("input", {
390
- "onUpdate:modelValue": b[0] || (b[0] = (m) => N.value = m),
409
+ a("div", pt, [
410
+ le(a("input", {
411
+ "onUpdate:modelValue": u[0] || (u[0] = (m) => M.value = m),
391
412
  type: "text",
392
- class: "tv-custom-input flex-1 rounded border px-2 py-1",
413
+ class: "tv-custom-input flex-1 rounded-md border border-gray-300 px-2 py-1.5 text-sm text-gray-800 outline-none transition focus:border-gray-400 focus:ring-2 focus:ring-gray-200",
393
414
  placeholder: "Type a custom value"
394
415
  }, null, 512), [
395
- [me, N.value]
416
+ [xe, M.value]
396
417
  ]),
397
- n("button", {
398
- type: "button",
399
- class: "tv-accept-custom rounded border px-2 py-1",
418
+ D(x(Y), {
419
+ variant: "success",
420
+ size: "sm",
421
+ class: "tv-accept-custom",
400
422
  disabled: _.value,
401
423
  onClick: ve
402
- }, " Type custom ", 8, vt)
424
+ }, {
425
+ default: j(() => [...u[12] || (u[12] = [
426
+ E("Type custom", -1)
427
+ ])]),
428
+ _: 1
429
+ }, 8, ["disabled"])
403
430
  ])
404
- ])) : g("", !0)
431
+ ])) : h("", !0)
405
432
  ])
406
433
  ]),
407
434
  _: 1
408
435
  }, 8, ["modelValue", "title", "class"]),
409
- C.value ? (a(), M(y(K), {
436
+ C.value ? (l(), F(x(G), {
410
437
  key: 0,
411
438
  modelValue: k.value,
412
- "onUpdate:modelValue": b[2] || (b[2] = (m) => k.value = m),
439
+ "onUpdate:modelValue": u[2] || (u[2] = (m) => k.value = m),
413
440
  width: 90,
414
441
  height: 90,
415
442
  "close-x": "",
416
- class: I(y(D))
443
+ class: I(x(A))
417
444
  }, {
418
- default: z(() => [
419
- C.value.file ? (a(), M(y(ge), {
445
+ default: j(() => [
446
+ C.value.file ? (l(), F(x(we), {
420
447
  key: 0,
421
448
  file: C.value.file,
422
449
  "related-files": L.value,
@@ -425,18 +452,18 @@ const Pe = { class: "tv-modal flex flex-col gap-4 text-sm" }, Re = { class: "tv-
425
452
  sidebar: "",
426
453
  zoomable: "",
427
454
  class: "h-full"
428
- }, null, 8, ["file", "related-files"])) : g("", !0)
455
+ }, null, 8, ["file", "related-files"])) : h("", !0)
429
456
  ]),
430
457
  _: 1
431
- }, 8, ["modelValue", "class"])) : g("", !0)
458
+ }, 8, ["modelValue", "class"])) : h("", !0)
432
459
  ], 64));
433
460
  }
434
- }), pt = { class: "tv-field inline-flex items-center gap-1" }, mt = ["contenteditable", "data-editable"], xt = {
461
+ }), xt = { class: "tv-field inline-flex items-center gap-1" }, gt = ["contenteditable", "data-editable"], yt = {
435
462
  key: 0,
436
463
  class: "tv-discrepancy-indicator ml-0.5 text-amber-600",
437
464
  title: "Sources disagree",
438
465
  "aria-label": "discrepancy"
439
- }, Bt = /* @__PURE__ */ F({
466
+ }, Kt = /* @__PURE__ */ P({
440
467
  __name: "VerifiedField",
441
468
  props: {
442
469
  source: {},
@@ -445,251 +472,251 @@ const Pe = { class: "tv-modal flex flex-col gap-4 text-sm" }, Re = { class: "tv-
445
472
  format: { type: Function }
446
473
  },
447
474
  setup(e) {
448
- const t = e, l = J(), d = c(() => l.enabled.value), o = U(null), r = c(() => {
475
+ const t = e, n = Q(), f = d(() => n.enabled.value), r = U(null), o = d(() => {
449
476
  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(() => {
477
+ return r.value ? r.value : t.source && t.field ? ((_ = t.source.__meta) == null ? void 0 : _[t.field]) ?? null : null;
478
+ }), c = d(() => X(o.value)), g = d(() => {
452
479
  if (t.original !== void 0 && t.original !== null) return t.original;
453
- if (r.value) return u.value.value;
480
+ if (o.value) return c.value.value;
454
481
  if (t.source && t.field) return t.source[t.field];
455
- }), h = c(() => {
456
- const _ = p.value;
482
+ }), b = d(() => {
483
+ const _ = g.value;
457
484
  return _ == null ? "" : t.format ? t.format(_) : String(_);
458
- }), w = c(() => {
485
+ }), w = d(() => {
459
486
  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);
487
+ return W((V = (S = (_ = o.value) == null ? void 0 : _.candidates) == null ? void 0 : S.extracted) == null ? void 0 : V.confidence);
488
+ }), y = d(() => oe(o.value)), v = d(() => f.value && !!o.value);
462
489
  function $(_) {
463
490
  var S;
464
- o.value = _, (S = t.source) != null && S.__meta && t.field && (t.source.__meta[t.field] = _);
491
+ r.value = _, (S = t.source) != null && S.__meta && t.field && (t.source.__meta[t.field] = _);
465
492
  }
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);
493
+ const L = d(() => Te(n, o, $)), C = d(() => !!L.value), k = U(!1), N = U(!1);
494
+ function B() {
495
+ o.value && (k.value = !0);
469
496
  }
470
- async function N(_) {
471
- A.value = !1;
497
+ async function M(_) {
498
+ N.value = !1;
472
499
  const V = (_.target.textContent ?? "").trim();
473
- !L.value || V === h.value || await L.value(V, "custom");
500
+ !L.value || V === b.value || await L.value(V, "custom");
474
501
  }
475
- return (_, S) => (a(), s("span", pt, [
476
- n("span", {
502
+ return (_, S) => (l(), i("span", xt, [
503
+ a("span", {
477
504
  class: "tv-field-value",
478
505
  contenteditable: C.value,
479
506
  "data-editable": C.value ? "true" : "false",
480
- onFocus: S[0] || (S[0] = (V) => A.value = !0),
481
- onBlur: N,
482
- onKeydown: S[1] || (S[1] = xe(_e((V) => V.target.blur(), ["prevent"]), ["enter"]))
507
+ onFocus: S[0] || (S[0] = (V) => N.value = !0),
508
+ onBlur: M,
509
+ onKeydown: S[1] || (S[1] = ge(ye((V) => V.target.blur(), ["prevent"]), ["enter"]))
483
510
  }, [
484
- ye(_.$slots, "default", {
485
- value: p.value,
486
- formatted: h.value
511
+ _e(_.$slots, "default", {
512
+ value: g.value,
513
+ formatted: b.value
487
514
  }, () => [
488
- q(f(h.value), 1)
515
+ E(p(b.value), 1)
489
516
  ])
490
- ], 40, mt),
491
- v.value ? (a(), s("button", {
517
+ ], 40, gt),
518
+ v.value ? (l(), i("button", {
492
519
  key: 0,
493
520
  type: "button",
494
- class: I(["tv-overlay ml-1 inline-flex items-center", y(D)]),
521
+ class: I(["tv-overlay ml-1 inline-flex items-center", x(A)]),
495
522
  title: "View verification detail",
496
- onClick: j
523
+ onClick: B
497
524
  }, [
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, {
525
+ D(z, { status: w.value }, null, 8, ["status"]),
526
+ y.value ? (l(), i("span", yt, "⚠")) : h("", !0)
527
+ ], 2)) : h("", !0),
528
+ o.value ? (l(), F(mt, {
502
529
  key: 1,
503
530
  modelValue: k.value,
504
531
  "onUpdate:modelValue": S[2] || (S[2] = (V) => k.value = V),
505
- meta: r.value,
532
+ meta: o.value,
506
533
  label: e.field,
507
534
  save: L.value
508
- }, null, 8, ["modelValue", "meta", "label", "save"])) : g("", !0)
535
+ }, null, 8, ["modelValue", "meta", "label", "save"])) : h("", !0)
509
536
  ]));
510
537
  }
511
538
  }), _t = /* @__PURE__ */ new Set(["name", "type"]);
512
- function yt(e, t = "") {
513
- const l = [];
514
- return H(e, t, l), l;
539
+ function bt(e, t = "") {
540
+ const n = [];
541
+ return J(e, t, n), n;
515
542
  }
516
- function H(e, t, l) {
543
+ function J(e, t, n) {
517
544
  if (Array.isArray(e)) {
518
- e.forEach((r, u) => H(r, `${t}[${u}]`, l));
545
+ e.forEach((o, c) => J(o, `${t}[${c}]`, n));
519
546
  return;
520
547
  }
521
- if (!te(e)) return;
522
- const o = e.__meta ?? {};
523
- for (const [r, u] of Object.entries(e)) {
524
- if (r === "__meta") continue;
525
- const p = t ? `${t}.${r}` : r;
526
- if (Array.isArray(u) || te(u)) {
527
- H(u, p, l);
548
+ if (!ne(e)) return;
549
+ const r = e.__meta ?? {};
550
+ for (const [o, c] of Object.entries(e)) {
551
+ if (o === "__meta") continue;
552
+ const g = t ? `${t}.${o}` : o;
553
+ if (Array.isArray(c) || ne(c)) {
554
+ J(c, g, n);
528
555
  continue;
529
556
  }
530
- const h = o[r];
531
- !h && _t.has(r) || l.push({
532
- path: p,
533
- label: r,
534
- meta: h ?? null,
535
- value: u,
536
- unanchored: !h
557
+ const b = r[o];
558
+ !b && _t.has(o) || n.push({
559
+ path: g,
560
+ label: o,
561
+ meta: b ?? null,
562
+ value: c,
563
+ unanchored: !b
537
564
  });
538
565
  }
539
566
  }
540
- function te(e) {
567
+ function ne(e) {
541
568
  return typeof e == "object" && e !== null && !Array.isArray(e);
542
569
  }
543
- const ht = { class: "tv-comparison-page flex flex-col gap-4" }, bt = {
570
+ const ht = { class: "tv-comparison-page flex flex-col gap-4" }, wt = {
544
571
  key: 0,
545
572
  class: "tv-comparison-empty text-gray-400"
546
- }, gt = {
573
+ }, kt = {
547
574
  key: 1,
548
575
  class: "tv-anchored-group flex flex-col gap-3"
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 = {
576
+ }, St = { class: "flex items-center gap-2" }, $t = { class: "tv-datapoint-path font-mono text-xs text-gray-500" }, Vt = { class: "tv-datapoint-resolved font-medium" }, Ct = {
550
577
  key: 0,
551
578
  class: "tv-datapoint-discrepancy text-xs font-medium text-amber-600"
552
- }, Vt = { class: "tv-datapoint-candidates ml-4 text-xs text-gray-600" }, Ct = { class: "font-medium" }, Ot = {
579
+ }, Ot = { class: "tv-datapoint-candidates ml-4 text-xs text-gray-600" }, Lt = { class: "font-medium" }, It = {
553
580
  key: 0,
554
581
  class: "tv-datapoint-reasoning ml-4 text-xs italic text-gray-500"
555
- }, Lt = {
582
+ }, Ut = {
556
583
  key: 1,
557
584
  class: "tv-datapoint-cited ml-4 text-xs text-gray-500"
558
- }, It = { class: "tv-datapoint-sources ml-4 text-xs text-gray-500" }, Ut = ["href"], Et = { key: 1 }, Tt = { class: "ml-1" }, Dt = {
585
+ }, Dt = { class: "tv-datapoint-sources ml-4 text-xs text-gray-500" }, Et = ["href"], Tt = { key: 1 }, At = { class: "ml-1" }, Nt = {
559
586
  key: 2,
560
587
  class: "tv-unanchored-group flex flex-col gap-1"
561
- }, At = { class: "tv-datapoint-path font-mono text-xs text-gray-500" }, Nt = { class: "tv-datapoint-value" }, Ft = /* @__PURE__ */ F({
588
+ }, jt = { class: "tv-datapoint-path font-mono text-xs text-gray-500" }, Ft = { class: "tv-datapoint-value" }, Mt = /* @__PURE__ */ P({
562
589
  __name: "ComparisonPage",
563
590
  setup(e) {
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);
591
+ const t = Q(), n = d(() => bt(t.data)), f = d(() => n.value.filter((w) => !w.unanchored)), r = d(() => n.value.filter((w) => w.unanchored));
592
+ function o(w) {
593
+ const y = X(w).value;
594
+ return y == null ? "" : String(y);
568
595
  }
569
- function u(w) {
596
+ function c(w) {
570
597
  return w == null ? "" : String(w);
571
598
  }
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;
599
+ function g(w) {
600
+ var y, v, $;
601
+ return ($ = (v = (y = w.meta) == null ? void 0 : y.candidates) == null ? void 0 : v.extracted) == null ? void 0 : $.confidence;
575
602
  }
576
- function h(w) {
603
+ function b(w) {
577
604
  var $;
578
- const x = ($ = w.meta) == null ? void 0 : $.candidates;
579
- if (!x) return [];
605
+ const y = ($ = w.meta) == null ? void 0 : $.candidates;
606
+ if (!y) return [];
580
607
  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;
608
+ return y.override && v.push({ source: "override", value: y.override.value }), y.extracted && v.push({ source: "extracted", value: y.extracted.value }), y.claim && v.push({ source: "claim", value: y.claim.value }), v;
582
609
  }
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) => {
610
+ return (w, y) => (l(), i("div", ht, [
611
+ y[1] || (y[1] = a("h2", { class: "tv-comparison-title text-lg font-semibold" }, "Verification comparison", -1)),
612
+ n.value.length === 0 ? (l(), i("p", wt, " No data points to compare. ")) : h("", !0),
613
+ f.value.length ? (l(), i("section", kt, [
614
+ (l(!0), i(O, null, T(f.value, (v) => {
588
615
  var $, L, C;
589
- return a(), s("div", {
616
+ return l(), i("div", {
590
617
  key: v.path,
591
618
  class: "tv-datapoint border-t border-gray-100 pt-2"
592
619
  }, [
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),
620
+ a("div", St, [
621
+ a("span", $t, p(v.path), 1),
622
+ a("span", Vt, p(o(v.meta)), 1),
623
+ D(z, {
624
+ confidence: g(v),
598
625
  "show-label": ""
599
626
  }, null, 8, ["confidence"]),
600
- y(oe)(v.meta) ? (a(), s("span", $t, "⚠ discrepancy")) : g("", !0)
627
+ x(oe)(v.meta) ? (l(), i("span", Ct, "⚠ discrepancy")) : h("", !0)
601
628
  ]),
602
- n("ul", Vt, [
603
- (a(!0), s(O, null, T(h(v), (k) => (a(), s("li", {
629
+ a("ul", Ot, [
630
+ (l(!0), i(O, null, T(b(v), (k) => (l(), i("li", {
604
631
  key: k.source,
605
632
  class: "tv-candidate"
606
633
  }, [
607
- n("span", Ct, f(k.source) + ":", 1),
608
- q(" " + f(u(k.value)), 1)
634
+ a("span", Lt, p(k.source) + ":", 1),
635
+ E(" " + p(c(k.value)), 1)
609
636
  ]))), 128))
610
637
  ]),
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,
638
+ x(H)(v.meta) ? (l(), i("p", It, p(x(H)(v.meta)), 1)) : h("", !0),
639
+ x(q)(v.meta) ? (l(), i("p", Ut, " “" + p(x(q)(v.meta)) + "” ", 1)) : h("", !0),
640
+ a("ul", Dt, [
641
+ (l(!0), i(O, null, T(x(ue)((C = (L = ($ = v.meta) == null ? void 0 : $.candidates) == null ? void 0 : L.extracted) == null ? void 0 : C.sources), (k, N) => (l(), i("li", {
642
+ key: N,
616
643
  class: "tv-source-group"
617
644
  }, [
618
- k.fileUrl ? (a(), s("a", {
645
+ k.fileUrl ? (l(), i("a", {
619
646
  key: 0,
620
647
  href: k.fileUrl,
621
648
  class: "tv-source-link text-blue-600 underline",
622
649
  target: "_blank",
623
650
  rel: "noopener"
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)
651
+ }, p(k.fileLabel), 9, Et)) : (l(), i("span", Tt, p(k.fileLabel), 1)),
652
+ a("span", At, "(" + p(k.sources.map(x(ce)).join(", ")) + ")", 1)
626
653
  ]))), 128))
627
654
  ])
628
655
  ]);
629
656
  }), 128))
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", {
657
+ ])) : h("", !0),
658
+ r.value.length ? (l(), i("section", Nt, [
659
+ y[0] || (y[0] = a("h3", { class: "tv-unanchored-title text-sm font-semibold text-gray-500" }, " Unanchored / not from source ", -1)),
660
+ (l(!0), i(O, null, T(r.value, (v) => (l(), i("div", {
634
661
  key: v.path,
635
662
  class: "tv-unanchored-datapoint flex items-center gap-2 text-sm"
636
663
  }, [
637
- n("span", At, f(v.path), 1),
638
- n("span", Nt, f(u(v.value)), 1),
639
- E(R, { status: "unverifiable" })
664
+ a("span", jt, p(v.path), 1),
665
+ a("span", Ft, p(c(v.value)), 1),
666
+ D(z, { status: "unverifiable" })
640
667
  ]))), 128))
641
- ])) : g("", !0)
668
+ ])) : h("", !0)
642
669
  ]));
643
670
  }
644
- }), Mt = { class: "tv-enable-toggle flex items-center justify-between text-sm" }, zt = /* @__PURE__ */ F({
671
+ }), Pt = { class: "tv-enable-toggle flex items-center justify-between text-sm" }, Yt = /* @__PURE__ */ P({
645
672
  __name: "VerificationChrome",
646
673
  setup(e) {
647
- const { enabled: t, openComparison: l } = J(), d = Ce(), o = U(!1);
648
- function r() {
649
- l(), o.value = !1;
674
+ const { enabled: t, openComparison: n } = Q(), f = Oe(), r = U(!1);
675
+ function o() {
676
+ n(), r.value = !1;
650
677
  }
651
- return (u, p) => (a(), s(O, null, [
652
- n("button", {
678
+ return (c, g) => (l(), i(O, null, [
679
+ a("button", {
653
680
  type: "button",
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)]),
681
+ 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", x(A)]),
655
682
  title: "Verification settings",
656
- onClick: p[0] || (p[0] = (h) => o.value = !o.value)
683
+ onClick: g[0] || (g[0] = (b) => r.value = !r.value)
657
684
  }, [
658
- E(y(we), {
659
- icon: y(ke),
685
+ D(x(ke), {
686
+ icon: x(Se),
660
687
  class: "h-5 w-5"
661
688
  }, null, 8, ["icon"])
662
689
  ], 2),
663
- o.value ? (a(), s("div", {
690
+ r.value ? (l(), i("div", {
664
691
  key: 0,
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)])
692
+ 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", x(A)])
666
693
  }, [
667
- n("label", Mt, [
668
- p[3] || (p[3] = n("span", null, "Verification overlay", -1)),
669
- le(n("input", {
670
- "onUpdate:modelValue": p[1] || (p[1] = (h) => ee(t) ? t.value = h : null),
694
+ a("label", Pt, [
695
+ g[3] || (g[3] = a("span", null, "Verification overlay", -1)),
696
+ le(a("input", {
697
+ "onUpdate:modelValue": g[1] || (g[1] = (b) => te(t) ? t.value = b : null),
671
698
  type: "checkbox",
672
699
  class: "tv-enable-checkbox"
673
700
  }, null, 512), [
674
- [he, y(t)]
701
+ [be, x(t)]
675
702
  ])
676
703
  ]),
677
- n("button", {
704
+ a("button", {
678
705
  type: "button",
679
- class: I(["tv-open-comparison rounded border px-2 py-1 text-sm", y(D)]),
680
- onClick: r
706
+ class: I(["tv-open-comparison rounded border px-2 py-1 text-sm", x(A)]),
707
+ onClick: o
681
708
  }, "Open comparison page", 2)
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),
709
+ ], 2)) : h("", !0),
710
+ D(x(G), {
711
+ modelValue: x(f),
712
+ "onUpdate:modelValue": g[2] || (g[2] = (b) => te(f) ? f.value = b : null),
686
713
  title: "Verification comparison",
687
714
  width: 80,
688
715
  "close-x": "",
689
- class: I(y(D))
716
+ class: I(x(A))
690
717
  }, {
691
- default: z(() => [
692
- E(Ft)
718
+ default: j(() => [
719
+ D(Mt)
693
720
  ]),
694
721
  _: 1
695
722
  }, 8, ["modelValue", "class"])
@@ -697,26 +724,26 @@ const ht = { class: "tv-comparison-page flex flex-col gap-4" }, bt = {
697
724
  }
698
725
  });
699
726
  export {
700
- D as CHROME_CLASS,
701
- Ft as ComparisonPage,
702
- R as ConfidenceIcon,
727
+ A as CHROME_CLASS,
728
+ Mt as ComparisonPage,
729
+ z as ConfidenceIcon,
703
730
  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,
731
+ re as RESOLUTION_PRIORITY,
732
+ Le as STATUS_COLORS,
733
+ Ie as STATUS_LABELS,
734
+ Yt as VerificationChrome,
735
+ mt as VerificationModal,
736
+ Kt as VerifiedField,
737
+ W as bucketConfidence,
738
+ De as candidatesDisagree,
739
+ q as citedTextOf,
740
+ ue as groupSources,
714
741
  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
742
+ Bt as initVerification,
743
+ H as reasoningOf,
744
+ Ue as resolveCandidates,
745
+ X as resolveDataPoint,
746
+ ce as sourceRowLabel,
747
+ Q as useVerification,
748
+ bt as walkDataPoints
722
749
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/template-verification",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
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",