@deepcitation/deepcitation-js 1.1.49 → 1.1.51

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.
Files changed (70) hide show
  1. package/README.md +73 -157
  2. package/lib/chunk-2HINOG74.js +3 -0
  3. package/lib/chunk-2HINOG74.js.map +1 -0
  4. package/lib/chunk-4UWAUWYL.cjs +3 -0
  5. package/lib/chunk-4UWAUWYL.cjs.map +1 -0
  6. package/lib/chunk-5XGN7UAV.js +2 -0
  7. package/lib/chunk-5XGN7UAV.js.map +1 -0
  8. package/lib/chunk-7TORYXU4.cjs +3 -0
  9. package/lib/chunk-7TORYXU4.cjs.map +1 -0
  10. package/lib/chunk-BDSA6VGC.js +125 -0
  11. package/lib/chunk-BDSA6VGC.js.map +1 -0
  12. package/lib/chunk-BEYJEW3Y.js +2 -0
  13. package/lib/chunk-BEYJEW3Y.js.map +1 -0
  14. package/lib/chunk-BWQLFMTV.js +2 -0
  15. package/lib/chunk-BWQLFMTV.js.map +1 -0
  16. package/lib/{chunk-F2MMVEVC.cjs → chunk-BYLIBOAU.cjs} +2 -1
  17. package/lib/chunk-BYLIBOAU.cjs.map +1 -0
  18. package/lib/chunk-DS6SOU4L.cjs +2 -0
  19. package/lib/chunk-DS6SOU4L.cjs.map +1 -0
  20. package/lib/{chunk-UUR2SQKU.cjs → chunk-HL3AXCDL.cjs} +2 -1
  21. package/lib/chunk-HL3AXCDL.cjs.map +1 -0
  22. package/lib/chunk-N7FTXSGM.js +3 -0
  23. package/lib/chunk-N7FTXSGM.js.map +1 -0
  24. package/lib/chunk-WS4CQVDI.cjs +125 -0
  25. package/lib/chunk-WS4CQVDI.cjs.map +1 -0
  26. package/lib/client/index.cjs +2 -1
  27. package/lib/client/index.cjs.map +1 -0
  28. package/lib/client/index.d.cts +58 -13
  29. package/lib/client/index.d.ts +58 -13
  30. package/lib/client/index.js +2 -1
  31. package/lib/client/index.js.map +1 -0
  32. package/lib/{index-fvVBZYVK.d.ts → index-BHjI8Bh1.d.cts} +61 -22
  33. package/lib/{index-fvVBZYVK.d.cts → index-BHjI8Bh1.d.ts} +61 -22
  34. package/lib/index.cjs +2 -1
  35. package/lib/index.cjs.map +1 -0
  36. package/lib/index.d.cts +137 -16
  37. package/lib/index.d.ts +137 -16
  38. package/lib/index.js +2 -1
  39. package/lib/index.js.map +1 -0
  40. package/lib/prompts/index.cjs +2 -1
  41. package/lib/prompts/index.cjs.map +1 -0
  42. package/lib/prompts/index.d.cts +177 -55
  43. package/lib/prompts/index.d.ts +177 -55
  44. package/lib/prompts/index.js +2 -1
  45. package/lib/prompts/index.js.map +1 -0
  46. package/lib/react/index.cjs +8 -5
  47. package/lib/react/index.cjs.map +1 -0
  48. package/lib/react/index.d.cts +348 -21
  49. package/lib/react/index.d.ts +348 -21
  50. package/lib/react/index.js +8 -5
  51. package/lib/react/index.js.map +1 -0
  52. package/lib/styles.css +1 -1
  53. package/lib/types/index.cjs +2 -1
  54. package/lib/types/index.cjs.map +1 -0
  55. package/lib/types/index.d.cts +1 -1
  56. package/lib/types/index.d.ts +1 -1
  57. package/lib/types/index.js +2 -1
  58. package/lib/types/index.js.map +1 -0
  59. package/lib/{utils-q6anRKO_.d.cts → utils-CCi9_JTv.d.cts} +5 -5
  60. package/lib/{utils-DuacFTtu.d.ts → utils-CoSP-i76.d.ts} +5 -5
  61. package/package.json +165 -152
  62. package/src/tailwind.css +5 -5
  63. package/lib/chunk-2PRW5PVT.cjs +0 -2
  64. package/lib/chunk-3XSZLKJW.js +0 -2
  65. package/lib/chunk-D2TKEF6D.cjs +0 -2
  66. package/lib/chunk-DHVODVIA.cjs +0 -71
  67. package/lib/chunk-HRCAI3NV.js +0 -1
  68. package/lib/chunk-ND6LFDGK.js +0 -71
  69. package/lib/chunk-O2XFH626.js +0 -1
  70. package/lib/chunk-PKXMJNRX.js +0 -2
@@ -1,6 +1,6 @@
1
- import { C as Citation, V as Verification, g as SearchStatus, a as CitationStatus, S as SourceType } from '../index-fvVBZYVK.js';
2
- export { C as CITATION_X_PADDING, c as CITATION_Y_PADDING, h as classNames, b as generateCitationInstanceId, g as generateCitationKey, d as getCitationDisplayText, f as getCitationKeySpanText, e as getCitationNumber, i as isUrlCitation } from '../utils-DuacFTtu.js';
1
+ import { C as Citation, V as Verification, a as CitationStatus, g as SearchStatus, i as SourceType, e as SearchAttempt } from '../index-BHjI8Bh1.js';
3
2
  import React$1 from 'react';
3
+ export { C as CITATION_X_PADDING, a as CITATION_Y_PADDING, d as classNames, g as generateCitationInstanceId, b as generateCitationKey, e as getCitationAnchorText, f as getCitationDisplayText, h as getCitationNumber, i as isUrlCitation } from '../utils-CoSP-i76.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
 
6
6
  /**
@@ -14,27 +14,29 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
14
14
  * | `superscript` | Small raised text like footnotes¹ |
15
15
  * | `minimal` | Compact text with indicator, truncated |
16
16
  * | `source` | Source chip showing name + count (ChatGPT-style) |
17
+ * | `linter` | Inline text with semantic underlines (solid/dashed/wavy) |
17
18
  */
18
- type CitationVariant = "chip" | "brackets" | "text" | "superscript" | "minimal" | "source";
19
+ type CitationVariant = "chip" | "brackets" | "text" | "superscript" | "minimal" | "source" | "linter";
19
20
  /**
20
21
  * Content to display in the citation.
21
22
  *
22
23
  * | Content | Description |
23
24
  * |---------------|------------------------------------------------|
24
- * | `keySpan` | Descriptive text (e.g., "Revenue Growth") |
25
+ * | `anchorText` | Descriptive text (e.g., "Revenue Growth") |
25
26
  * | `number` | Citation number (e.g., "1", "2", "3") |
26
27
  * | `indicator` | Only the status icon (✓/⚠), no text |
27
28
  * | `source` | Source name with count (e.g., "Wikipedia +2") |
28
29
  *
29
30
  * Default content per variant:
30
- * - `chip` → `keySpan`
31
- * - `brackets` → `keySpan`
32
- * - `text` → `keySpan`
31
+ * - `chip` → `anchorText`
32
+ * - `brackets` → `anchorText`
33
+ * - `text` → `anchorText`
34
+ * - `linter` → `anchorText`
33
35
  * - `superscript` → `number`
34
36
  * - `minimal` → `number`
35
37
  * - `source` → `source`
36
38
  */
37
- type CitationContent = "keySpan" | "number" | "indicator" | "source";
39
+ type CitationContent = "anchorText" | "number" | "indicator" | "source";
38
40
  /**
39
41
  * URL fetch/access status for URL citations.
40
42
  * Covers HTTP accessibility and redirect scenarios.
@@ -160,20 +162,27 @@ interface BaseCitationProps {
160
162
  /**
161
163
  * What content to display in the citation.
162
164
  * If not specified, defaults based on variant:
163
- * - `chip` → `keySpan`
165
+ * - `chip` → `anchorText`
164
166
  * - `brackets` → `number`
165
- * - `text` → `keySpan`
167
+ * - `text` → `anchorText`
166
168
  * - `superscript` → `number`
167
169
  * - `minimal` → `number`
168
170
  */
169
171
  content?: CitationContent;
170
- /** Fallback display text when citation keySpan is empty */
172
+ /** Fallback display text when citation anchorText is empty */
171
173
  fallbackDisplay?: string | null;
172
174
  }
173
175
  /**
174
176
  * Visual style variants for URL citations.
177
+ *
178
+ * | Variant | Description |
179
+ * |-----------|----------------------------------------------------------|
180
+ * | `badge` | Clean bordered badge with favicon (default) |
181
+ * | `chip` | Pill/badge style with background color |
182
+ * | `inline` | Underlined inline link |
183
+ * | `bracket` | [text✓] with square brackets |
175
184
  */
176
- type UrlCitationVariant = "chip" | "inline" | "bracket";
185
+ type UrlCitationVariant = "badge" | "chip" | "inline" | "bracket";
177
186
  /**
178
187
  * Props for URL citation component
179
188
  */
@@ -244,7 +253,7 @@ interface CitationRenderProps {
244
253
  citationKey: string;
245
254
  /** Display text for the citation */
246
255
  displayText: string;
247
- /** Whether this is a merged keySpan display */
256
+ /** Whether this is a merged anchorText display */
248
257
  isMergedDisplay: boolean;
249
258
  }
250
259
  /**
@@ -569,6 +578,22 @@ type GroupCitationsBySource = (citations: CitationDrawerItem[]) => SourceCitatio
569
578
  * Extracts domain from URL for compact display.
570
579
  */
571
580
  declare function extractDomain(url: string): string;
581
+ /**
582
+ * Truncates a string to max length with ellipsis.
583
+ */
584
+ declare function truncateString(str: string, maxLength: number): string;
585
+ /**
586
+ * Get path from URL for display.
587
+ */
588
+ declare function getUrlPath(url: string): string;
589
+ /**
590
+ * Status indicator icons for URL fetch states.
591
+ */
592
+ declare const STATUS_ICONS: Record<UrlFetchStatus, {
593
+ icon: string;
594
+ label: string;
595
+ className: string;
596
+ }>;
572
597
  /**
573
598
  * Checks if status is a blocked status.
574
599
  */
@@ -589,6 +614,51 @@ declare function isRedirectedStatus(status: UrlFetchStatus): boolean;
589
614
  * Checks if URL was successfully verified.
590
615
  */
591
616
  declare function isVerifiedStatus(status: UrlFetchStatus): boolean;
617
+ /**
618
+ * URL Citation Component
619
+ *
620
+ * Displays a URL citation with compact domain display,
621
+ * verification status, and blocked/error indicators.
622
+ *
623
+ * @example
624
+ * ```tsx
625
+ * <UrlCitationComponent
626
+ * urlMeta={{
627
+ * url: "https://example.com/article",
628
+ * fetchStatus: "verified",
629
+ * }}
630
+ * />
631
+ * // Renders: [example.com ✓]
632
+ *
633
+ * <UrlCitationComponent
634
+ * urlMeta={{
635
+ * url: "https://protected-site.com/page",
636
+ * fetchStatus: "blocked_login",
637
+ * }}
638
+ * />
639
+ * // Renders: [protected-site.com 🔒]
640
+ * ```
641
+ */
642
+ declare const UrlCitationComponent: React$1.ForwardRefExoticComponent<UrlCitationProps & React$1.RefAttributes<HTMLSpanElement>>;
643
+ /**
644
+ * Memoized version for performance.
645
+ */
646
+ declare const MemoizedUrlCitationComponent: React$1.NamedExoticComponent<UrlCitationProps & React$1.RefAttributes<HTMLSpanElement>>;
647
+ /**
648
+ * Hook to parse URL and create UrlCitationMeta.
649
+ */
650
+ declare function useUrlMeta(url: string, fetchStatus?: UrlFetchStatus, additionalMeta?: Partial<UrlCitationMeta>): UrlCitationMeta;
651
+ /**
652
+ * Compact URL display utilities.
653
+ */
654
+ declare const urlDisplayUtils: {
655
+ extractDomain: typeof extractDomain;
656
+ truncateString: typeof truncateString;
657
+ getUrlPath: typeof getUrlPath;
658
+ isBlockedStatus: typeof isBlockedStatus;
659
+ isErrorStatus: typeof isErrorStatus;
660
+ isVerifiedStatus: typeof isVerifiedStatus;
661
+ };
592
662
 
593
663
  /**
594
664
  * Props for the CitationComponent.
@@ -643,19 +713,21 @@ interface CitationComponentProps extends BaseCitationProps {
643
713
  * - `superscript`: Small raised text like footnotes¹
644
714
  * - `minimal`: Compact text with indicator, truncated
645
715
  * - `source`: ChatGPT-style source chip with name + count
716
+ * - `linter`: Inline text with semantic underlines (solid/dashed/wavy)
646
717
  */
647
718
  variant?: CitationVariant;
648
719
  /**
649
720
  * What content to display in the citation.
650
- * - `keySpan`: Descriptive text (e.g., "Revenue Growth")
721
+ * - `anchorText`: Descriptive text (e.g., "Revenue Growth")
651
722
  * - `number`: Citation number (e.g., "1", "2", "3")
652
723
  * - `indicator`: Only the status icon, no text
653
724
  * - `source`: Source name (e.g., "Wikipedia")
654
725
  *
655
726
  * Defaults based on variant:
656
- * - `chip` → `keySpan`
657
- * - `brackets` → `keySpan`
658
- * - `text` → `keySpan`
727
+ * - `chip` → `anchorText`
728
+ * - `brackets` → `anchorText`
729
+ * - `text` → `anchorText`
730
+ * - `linter` → `anchorText`
659
731
  * - `superscript` → `number`
660
732
  * - `minimal` → `number`
661
733
  * - `source` → `source`
@@ -692,6 +764,11 @@ interface CitationComponentProps extends BaseCitationProps {
692
764
  * Falls back to citation.faviconUrl if not provided.
693
765
  */
694
766
  faviconUrl?: string;
767
+ /**
768
+ * Whether to show the status indicator (checkmark, warning, spinner).
769
+ * Defaults to true. Set to false to hide the indicator.
770
+ */
771
+ showIndicator?: boolean;
695
772
  }
696
773
  /**
697
774
  * CitationComponent displays a citation with verification status.
@@ -773,21 +850,21 @@ declare const DeepCitationIcon: ({ className }: {
773
850
  }) => react_jsx_runtime.JSX.Element;
774
851
  /**
775
852
  * Check icon SVG (no dependencies)
776
- * Size is controlled by parent container - use size-2 or similar on wrapper
853
+ * Size is controlled by parent container - use size-4 or similar on wrapper
777
854
  */
778
855
  declare const CheckIcon: ({ className }: {
779
856
  className?: string;
780
857
  }) => react_jsx_runtime.JSX.Element;
781
858
  /**
782
859
  * Warning icon SVG (no dependencies)
783
- * Size is controlled by parent container - use size-2 or similar on wrapper
860
+ * Size is controlled by parent container - use size-4 or similar on wrapper
784
861
  */
785
862
  declare const WarningIcon: ({ className }: {
786
863
  className?: string;
787
864
  }) => react_jsx_runtime.JSX.Element;
788
865
  /**
789
866
  * Spinner component for loading/pending state
790
- * Size is controlled by parent container - use size-2 or similar on wrapper
867
+ * Size is controlled by parent container - use size-4 or similar on wrapper
791
868
  * Animation (animate-spin) should be applied to the wrapper
792
869
  */
793
870
  declare const SpinnerIcon: ({ className }: {
@@ -814,6 +891,13 @@ declare const ExternalLinkIcon: ({ className }: {
814
891
  declare const CloseIcon: ({ className }: {
815
892
  className?: string;
816
893
  }) => react_jsx_runtime.JSX.Element;
894
+ /**
895
+ * Lock icon for restricted/paywall content
896
+ * Size is controlled by parent container
897
+ */
898
+ declare const LockIcon: ({ className }: {
899
+ className?: string;
900
+ }) => react_jsx_runtime.JSX.Element;
817
901
 
818
902
  /**
819
903
  * Detects source type from URL domain.
@@ -963,4 +1047,247 @@ declare function useCitationDrawer(): {
963
1047
  setCitations: (items: CitationDrawerItem[]) => void;
964
1048
  };
965
1049
 
966
- export { CheckIcon, type CitationBehaviorActions, type CitationBehaviorConfig, type CitationBehaviorContext, type CitationClickBehavior, CitationComponent, type CitationComponentProps, type CitationContent, type CitationContentProps, type CitationCursorClasses, CitationDrawer, type CitationDrawerItem, CitationDrawerItemComponent, type CitationDrawerItemProps, type CitationDrawerProps, type CitationEventHandlers, type CitationHoverBehavior, CitationOverlayProvider, type CitationRenderProps, type CitationStateClasses, type CitationStyles, type CitationTooltipProps, type CitationVariant, type CitationVariant as CitationVariantType, CloseIcon, type ContentMatchStatus, DeepCitationIcon, ExternalLinkIcon, type GroupCitationsBySource, LinkIcon, MemoizedCitationComponent, MemoizedSourcesListComponent, MemoizedSourcesListItem, MemoizedSourcesTrigger, type SourceChipProps, type SourceCitationGroup, SourcesListComponent, type SourcesListHeaderConfig, SourcesListItem, type SourcesListItemProps, type SourcesListProps, type SourcesListVariant, SourcesTrigger, type SourcesTriggerProps, SpinnerIcon, type UrlCitationMeta, type UrlCitationProps, type UrlCitationVariant, type UrlFetchStatus, type UrlVerificationMeta, WarningIcon, detectSourceType, extractDomain, getPlatformName, groupCitationsBySource, isAccessibleStatus, isBlockedStatus, isErrorStatus, isRedirectedStatus, isVerifiedStatus, sourceCitationsToListItems, useCitationDrawer, useCitationOverlay, useHasCitationOverlayProvider, useSourcesList };
1050
+ interface PrefetchedPopoverImageProps {
1051
+ /** Whether the popover (and image) should be visible */
1052
+ isVisible: boolean;
1053
+ /** Base64 image source (data URI) */
1054
+ src: string;
1055
+ /** Alt text for accessibility */
1056
+ alt: string;
1057
+ /** Optional click handler for the image */
1058
+ onClick?: () => void;
1059
+ /** Optional className for the container */
1060
+ className?: string;
1061
+ /** Image style constraints */
1062
+ imageStyle?: React$1.CSSProperties;
1063
+ }
1064
+ /**
1065
+ * Renders an image that's pre-rendered in the background before being shown.
1066
+ *
1067
+ * Uses React 19.2's Activity component to keep the image rendered but hidden,
1068
+ * so when the user hovers, the image appears instantly without a loading flash.
1069
+ *
1070
+ * @example
1071
+ * ```tsx
1072
+ * <PrefetchedPopoverImage
1073
+ * isVisible={isHovering}
1074
+ * src={verification.verificationImageBase64}
1075
+ * alt="Citation verification"
1076
+ * onClick={() => setExpandedImageSrc(src)}
1077
+ * />
1078
+ * ```
1079
+ */
1080
+ declare function PrefetchedPopoverImage({ isVisible, src, alt, onClick, className, imageStyle, }: PrefetchedPopoverImageProps): react_jsx_runtime.JSX.Element;
1081
+ /**
1082
+ * Memoized version of PrefetchedPopoverImage.
1083
+ * Use this when the parent re-renders frequently.
1084
+ */
1085
+ declare const MemoizedPrefetchedPopoverImage: React$1.MemoExoticComponent<typeof PrefetchedPopoverImage>;
1086
+ /**
1087
+ * Hook to prefetch an image into browser cache.
1088
+ * This is a simpler alternative when Activity isn't available or needed.
1089
+ *
1090
+ * @example
1091
+ * ```tsx
1092
+ * const prefetchImage = usePrefetchImage();
1093
+ *
1094
+ * // Prefetch when verification arrives
1095
+ * useEffect(() => {
1096
+ * if (verification?.verificationImageBase64) {
1097
+ * prefetchImage(verification.verificationImageBase64);
1098
+ * }
1099
+ * }, [verification?.verificationImageBase64]);
1100
+ * ```
1101
+ */
1102
+ declare function usePrefetchImage(): (src: string) => Promise<void>;
1103
+ /**
1104
+ * Prefetches multiple images concurrently.
1105
+ * Useful for batch prefetching all verification images.
1106
+ *
1107
+ * @example
1108
+ * ```tsx
1109
+ * // Prefetch all images when verifications load
1110
+ * useEffect(() => {
1111
+ * const srcs = verifications
1112
+ * .filter(v => v.verificationImageBase64)
1113
+ * .map(v => v.verificationImageBase64!);
1114
+ * prefetchImages(srcs);
1115
+ * }, [verifications]);
1116
+ * ```
1117
+ */
1118
+ declare function prefetchImages(srcs: string[]): Promise<void[]>;
1119
+
1120
+ type DiffDisplayMode = "auto" | "inline" | "split";
1121
+ interface SplitDiffDisplayProps {
1122
+ /** The expected/claimed text from the AI */
1123
+ expected: string;
1124
+ /** The actual text found in the source */
1125
+ actual: string;
1126
+ /** Optional label for the diff section */
1127
+ label?: string;
1128
+ /** Additional class name */
1129
+ className?: string;
1130
+ /** Sanitize function for text preprocessing */
1131
+ sanitize?: (text: string) => string;
1132
+ /** Display mode: auto (smart), inline (word diff), or split (two-row) */
1133
+ mode?: DiffDisplayMode;
1134
+ /** Show a match quality indicator bar */
1135
+ showMatchQuality?: boolean;
1136
+ /** Maximum characters before collapsing with "Show more" */
1137
+ maxCollapsedLength?: number;
1138
+ /** Expected anchorText to highlight within expected text */
1139
+ anchorTextExpected?: string;
1140
+ /** Found anchorText to highlight within actual text */
1141
+ anchorTextFound?: string;
1142
+ /** Verification status for contextual messages */
1143
+ status?: SearchStatus | null;
1144
+ /** Similarity score (0-1), calculated if not provided */
1145
+ similarity?: number;
1146
+ }
1147
+ /**
1148
+ * Get a human-readable status message for the verification status
1149
+ */
1150
+ declare function getContextualStatusMessage(status: SearchStatus | null | undefined, expectedPage?: number | null, actualPage?: number | null): string;
1151
+ interface MatchQualityBarProps {
1152
+ similarity: number;
1153
+ className?: string;
1154
+ }
1155
+ declare const MatchQualityBar: React$1.FC<MatchQualityBarProps>;
1156
+ interface CollapsibleTextProps {
1157
+ text: string;
1158
+ maxLength: number;
1159
+ className?: string;
1160
+ anchorText?: string;
1161
+ anchorTextClass?: string;
1162
+ }
1163
+ declare const CollapsibleText: React$1.FC<CollapsibleTextProps>;
1164
+ /**
1165
+ * SplitDiffDisplay - Enhanced diff display with split view mode
1166
+ *
1167
+ * Features:
1168
+ * - Auto mode: intelligently chooses inline or split based on similarity
1169
+ * - Split view: clear two-row Expected/Found layout for high-variance diffs
1170
+ * - KeySpan highlighting: underlines matching portions
1171
+ * - Match quality bar: visual similarity indicator
1172
+ * - Collapsible text: truncates long text with expand option
1173
+ */
1174
+ declare const SplitDiffDisplay: React$1.FC<SplitDiffDisplayProps>;
1175
+
1176
+ interface VerificationTabsProps {
1177
+ expected: string;
1178
+ actual: string;
1179
+ label?: string;
1180
+ renderCopyButton?: (text: string, position: "expected" | "found") => React$1.ReactNode;
1181
+ emptyText?: string;
1182
+ /** Verification status for contextual messages */
1183
+ status?: SearchStatus | null;
1184
+ /** Expected anchorText to highlight */
1185
+ anchorText?: string;
1186
+ /** Found anchorText to highlight */
1187
+ verifiedKeySpan?: string;
1188
+ /** Default display mode */
1189
+ defaultMode?: DiffDisplayMode;
1190
+ /** Expected page number (for status messages) */
1191
+ expectedPage?: number | null;
1192
+ /** Actual page number found (for status messages) */
1193
+ actualPage?: number | null;
1194
+ /** Show match quality indicator */
1195
+ showMatchQuality?: boolean;
1196
+ /** Maximum length before collapsing text */
1197
+ maxCollapsedLength?: number;
1198
+ }
1199
+ declare const VerificationTabs: React$1.FC<VerificationTabsProps>;
1200
+
1201
+ type DiffBlockType = "modified" | "added" | "removed" | "unchanged";
1202
+ interface DiffPart {
1203
+ value: string;
1204
+ added?: boolean;
1205
+ removed?: boolean;
1206
+ }
1207
+ interface DiffBlock {
1208
+ type: DiffBlockType;
1209
+ parts: DiffPart[];
1210
+ }
1211
+ declare const useSmartDiff: (expected?: string, actual?: string) => {
1212
+ diffResult: DiffBlock[];
1213
+ hasDiff: boolean;
1214
+ similarity: number;
1215
+ isHighVariance: boolean;
1216
+ };
1217
+
1218
+ interface VerificationLogProps {
1219
+ /** Array of search attempts from verification */
1220
+ searchAttempts: SearchAttempt[];
1221
+ /** Overall verification status */
1222
+ status?: SearchStatus | null;
1223
+ /** Expected page number from citation */
1224
+ expectedPage?: number;
1225
+ /** Expected line number from citation */
1226
+ expectedLine?: number;
1227
+ /** Page where match was found */
1228
+ foundPage?: number;
1229
+ /** Line where match was found */
1230
+ foundLine?: number;
1231
+ /** Whether the log is expanded (controlled) */
1232
+ isExpanded?: boolean;
1233
+ /** Callback when expansion state changes */
1234
+ onExpandChange?: (expanded: boolean) => void;
1235
+ /** Full phrase from citation (for audit display) */
1236
+ fullPhrase?: string;
1237
+ /** Anchor text from citation (for audit display) */
1238
+ anchorText?: string;
1239
+ }
1240
+ interface StatusHeaderProps {
1241
+ /** Verification status */
1242
+ status?: SearchStatus | null;
1243
+ /** Page where match was found */
1244
+ foundPage?: number;
1245
+ /** Expected page from citation */
1246
+ expectedPage?: number;
1247
+ /** Whether this is a compact header (for success states) */
1248
+ compact?: boolean;
1249
+ /** Anchor text to display in the header (for combined layout) */
1250
+ anchorText?: string;
1251
+ /** Full phrase for quote box (when using combined layout) */
1252
+ fullPhrase?: string;
1253
+ }
1254
+ interface QuoteBoxProps {
1255
+ /** The phrase to display */
1256
+ phrase: string;
1257
+ /** Maximum length before truncation */
1258
+ maxLength?: number;
1259
+ }
1260
+ /**
1261
+ * Header bar showing verification status with icon and text.
1262
+ *
1263
+ * shadcn HoverCard style:
1264
+ * - Clean white/dark background (no colored header backgrounds)
1265
+ * - Colored icon only indicates status
1266
+ * - Subtle ring border for elevation
1267
+ * - Page badge uses arrow format for location differences (Pg 5 → 7)
1268
+ */
1269
+ declare function StatusHeader({ status, foundPage, expectedPage, compact, anchorText, fullPhrase }: StatusHeaderProps): react_jsx_runtime.JSX.Element;
1270
+ /**
1271
+ * Styled quote box for displaying the phrase being verified.
1272
+ * Issue #7: Removed serif/italic for modern UI consistency.
1273
+ * Uses left border accent (which aligns with shadcn patterns).
1274
+ */
1275
+ declare function QuoteBox({ phrase, maxLength }: QuoteBoxProps): react_jsx_runtime.JSX.Element;
1276
+ /**
1277
+ * Collapsible verification log showing search attempt timeline.
1278
+ * Displays a summary header that can be clicked to expand the full log.
1279
+ */
1280
+ declare function VerificationLog({ searchAttempts, status, expectedPage, expectedLine, foundPage, foundLine, isExpanded: controlledIsExpanded, onExpandChange, fullPhrase, anchorText, }: VerificationLogProps): react_jsx_runtime.JSX.Element | null;
1281
+ interface AttemptingToVerifyProps {
1282
+ /** The anchor text or key phrase being verified */
1283
+ anchorText?: string;
1284
+ /** The full phrase being searched */
1285
+ fullPhrase?: string;
1286
+ }
1287
+ /**
1288
+ * Section showing what citation is being verified.
1289
+ * Displays the anchor text and quote box being searched.
1290
+ */
1291
+ declare function AttemptingToVerify({ anchorText, fullPhrase }: AttemptingToVerifyProps): react_jsx_runtime.JSX.Element;
1292
+
1293
+ export { AttemptingToVerify, type AttemptingToVerifyProps, CheckIcon, type CitationBehaviorActions, type CitationBehaviorConfig, type CitationBehaviorContext, type CitationClickBehavior, CitationComponent, type CitationComponentProps, type CitationContent, type CitationContentProps, type CitationCursorClasses, CitationDrawer, type CitationDrawerItem, CitationDrawerItemComponent, type CitationDrawerItemProps, type CitationDrawerProps, type CitationEventHandlers, type CitationHoverBehavior, CitationOverlayProvider, type CitationRenderProps, type CitationStateClasses, type CitationStyles, type CitationTooltipProps, type CitationVariant, type CitationVariant as CitationVariantType, CloseIcon, CollapsibleText, type ContentMatchStatus, DeepCitationIcon, type DiffBlock, type DiffBlockType, type DiffDisplayMode, type DiffPart, ExternalLinkIcon, type GroupCitationsBySource, LinkIcon, LockIcon, MatchQualityBar, MemoizedCitationComponent, MemoizedPrefetchedPopoverImage, MemoizedSourcesListComponent, MemoizedSourcesListItem, MemoizedSourcesTrigger, MemoizedUrlCitationComponent, PrefetchedPopoverImage, QuoteBox, type QuoteBoxProps, type SourceChipProps, type SourceCitationGroup, SourcesListComponent, type SourcesListHeaderConfig, SourcesListItem, type SourcesListItemProps, type SourcesListProps, type SourcesListVariant, SourcesTrigger, type SourcesTriggerProps, SpinnerIcon, SplitDiffDisplay, type SplitDiffDisplayProps, StatusHeader, type StatusHeaderProps, STATUS_ICONS as URL_STATUS_ICONS, UrlCitationComponent, type UrlCitationMeta, type UrlCitationProps, type UrlCitationVariant, type UrlFetchStatus, type UrlVerificationMeta, VerificationLog, type VerificationLogProps, VerificationTabs, WarningIcon, detectSourceType, extractDomain, getContextualStatusMessage, getPlatformName, groupCitationsBySource, isAccessibleStatus, isBlockedStatus, isErrorStatus, isRedirectedStatus, isVerifiedStatus, prefetchImages, sourceCitationsToListItems, urlDisplayUtils, useCitationDrawer, useCitationOverlay, useHasCitationOverlayProvider, usePrefetchImage, useSmartDiff, useSourcesList, useUrlMeta };