@deepcitation/deepcitation-js 1.1.28 → 1.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chunk-4HRWJSX6.cjs +1 -0
- package/lib/chunk-67NZP2UZ.js +2 -0
- package/lib/chunk-CQF2MESM.cjs +2 -0
- package/lib/chunk-ETIDLMKZ.js +1 -0
- package/lib/client/index.cjs +1 -1
- package/lib/client/index.js +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +49 -25
- package/lib/index.d.ts +49 -25
- package/lib/index.js +1 -1
- package/lib/react/index.cjs +3 -3
- package/lib/react/index.d.cts +466 -0
- package/lib/react/index.d.ts +466 -0
- package/lib/react/index.js +3 -3
- package/lib/utils-CSqRI6NU.d.cts +45 -0
- package/lib/utils-D_wxy_ni.d.ts +45 -0
- package/package.json +1 -1
- package/lib/chunk-DEUSSEFH.js +0 -2
- package/lib/chunk-J7U6YFOI.cjs +0 -2
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
import { Citation, Verification, SearchStatus, CitationStatus } from '../types/index.cjs';
|
|
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 } from '../utils-CSqRI6NU.cjs';
|
|
3
|
+
import React$1 from 'react';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Visual style variants for citations.
|
|
8
|
+
*
|
|
9
|
+
* | Variant | Description |
|
|
10
|
+
* |---------------|------------------------------------------------|
|
|
11
|
+
* | `chip` | Pill/badge style with background color |
|
|
12
|
+
* | `brackets` | [text✓] with square brackets (default) |
|
|
13
|
+
* | `text` | Plain text, inherits parent styling |
|
|
14
|
+
* | `superscript` | Small raised text like footnotes¹ |
|
|
15
|
+
* | `minimal` | Compact text with indicator, truncated |
|
|
16
|
+
*/
|
|
17
|
+
type CitationVariant = "chip" | "brackets" | "text" | "superscript" | "minimal";
|
|
18
|
+
/**
|
|
19
|
+
* Content to display in the citation.
|
|
20
|
+
*
|
|
21
|
+
* | Content | Description |
|
|
22
|
+
* |---------------|------------------------------------------------|
|
|
23
|
+
* | `keySpan` | Descriptive text (e.g., "Revenue Growth") |
|
|
24
|
+
* | `number` | Citation number (e.g., "1", "2", "3") |
|
|
25
|
+
* | `indicator` | Only the status icon (✓/⚠), no text |
|
|
26
|
+
*
|
|
27
|
+
* Default content per variant:
|
|
28
|
+
* - `chip` → `keySpan`
|
|
29
|
+
* - `brackets` → `number`
|
|
30
|
+
* - `text` → `keySpan`
|
|
31
|
+
* - `superscript` → `number`
|
|
32
|
+
* - `minimal` → `number`
|
|
33
|
+
*/
|
|
34
|
+
type CitationContent = "keySpan" | "number" | "indicator";
|
|
35
|
+
/**
|
|
36
|
+
* URL fetch status for URL citations.
|
|
37
|
+
*/
|
|
38
|
+
type UrlFetchStatus = "verified" | "partial" | "pending" | "blocked_antibot" | "blocked_login" | "blocked_paywall" | "blocked_geo" | "blocked_rate_limit" | "error_timeout" | "error_not_found" | "error_server" | "error_network" | "unknown";
|
|
39
|
+
/**
|
|
40
|
+
* URL citation metadata.
|
|
41
|
+
*/
|
|
42
|
+
interface UrlCitationMeta {
|
|
43
|
+
/** The full URL */
|
|
44
|
+
url: string;
|
|
45
|
+
/** Display domain (e.g., "example.com") */
|
|
46
|
+
domain?: string;
|
|
47
|
+
/** Page title if fetched */
|
|
48
|
+
title?: string;
|
|
49
|
+
/** Fetch/verification status */
|
|
50
|
+
fetchStatus: UrlFetchStatus;
|
|
51
|
+
/** When the URL was last verified */
|
|
52
|
+
verifiedAt?: Date | string;
|
|
53
|
+
/** HTTP status code if available */
|
|
54
|
+
httpStatus?: number;
|
|
55
|
+
/** Error message if applicable */
|
|
56
|
+
errorMessage?: string;
|
|
57
|
+
/** Favicon URL if available */
|
|
58
|
+
faviconUrl?: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Style configuration for the citation component.
|
|
62
|
+
* All properties are optional class name strings.
|
|
63
|
+
*/
|
|
64
|
+
interface CitationStyles {
|
|
65
|
+
/** Container wrapper class */
|
|
66
|
+
container?: string;
|
|
67
|
+
/** Citation number bracket wrapper */
|
|
68
|
+
bracketWrapper?: string;
|
|
69
|
+
/** Inner bracket content */
|
|
70
|
+
bracketContent?: string;
|
|
71
|
+
/** Citation text/number itself */
|
|
72
|
+
citationText?: string;
|
|
73
|
+
/** Verified status indicator */
|
|
74
|
+
verifiedIcon?: string;
|
|
75
|
+
/** Partial match indicator */
|
|
76
|
+
partialIcon?: string;
|
|
77
|
+
/** Pending/loading state */
|
|
78
|
+
pendingText?: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* State classes applied based on citation verification status
|
|
82
|
+
*/
|
|
83
|
+
interface CitationStateClasses {
|
|
84
|
+
/** Applied when citation is verified (found in document) */
|
|
85
|
+
verified?: string;
|
|
86
|
+
/** Applied when citation is a miss (not found) */
|
|
87
|
+
miss?: string;
|
|
88
|
+
/** Applied when citation is a partial match */
|
|
89
|
+
partial?: string;
|
|
90
|
+
/** Applied when citation verification is pending */
|
|
91
|
+
pending?: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Cursor classes for different zoom states
|
|
95
|
+
*/
|
|
96
|
+
interface CitationCursorClasses {
|
|
97
|
+
zoomIn?: string;
|
|
98
|
+
zoomOut?: string;
|
|
99
|
+
pointer?: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Props for the base CitationComponent
|
|
103
|
+
*/
|
|
104
|
+
interface BaseCitationProps {
|
|
105
|
+
/** The citation data to display */
|
|
106
|
+
citation: Citation;
|
|
107
|
+
/** Child content to render before the citation bracket */
|
|
108
|
+
children?: React.ReactNode;
|
|
109
|
+
/** Additional class name for the container */
|
|
110
|
+
className?: string;
|
|
111
|
+
/** Class name for controlling inner content width */
|
|
112
|
+
innerWidthClassName?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Visual style variant for the citation.
|
|
115
|
+
* @default "brackets"
|
|
116
|
+
*/
|
|
117
|
+
variant?: CitationVariant;
|
|
118
|
+
/**
|
|
119
|
+
* What content to display in the citation.
|
|
120
|
+
* If not specified, defaults based on variant:
|
|
121
|
+
* - `chip` → `keySpan`
|
|
122
|
+
* - `brackets` → `number`
|
|
123
|
+
* - `text` → `keySpan`
|
|
124
|
+
* - `superscript` → `number`
|
|
125
|
+
* - `minimal` → `number`
|
|
126
|
+
*/
|
|
127
|
+
content?: CitationContent;
|
|
128
|
+
/** Fallback display text when citation keySpan is empty */
|
|
129
|
+
fallbackDisplay?: string | null;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Visual style variants for URL citations.
|
|
133
|
+
*/
|
|
134
|
+
type UrlCitationVariant = "chip" | "inline" | "bracket";
|
|
135
|
+
/**
|
|
136
|
+
* Props for URL citation component
|
|
137
|
+
*/
|
|
138
|
+
interface UrlCitationProps extends Omit<BaseCitationProps, "citation" | "variant"> {
|
|
139
|
+
/** Visual style variant for the URL citation */
|
|
140
|
+
variant?: UrlCitationVariant;
|
|
141
|
+
/** URL metadata including fetch status */
|
|
142
|
+
urlMeta: UrlCitationMeta;
|
|
143
|
+
/** The citation data (optional, will be derived from urlMeta if not provided) */
|
|
144
|
+
citation?: Citation;
|
|
145
|
+
/** Whether to show the full URL on hover */
|
|
146
|
+
showFullUrlOnHover?: boolean;
|
|
147
|
+
/** Whether to show favicon */
|
|
148
|
+
showFavicon?: boolean;
|
|
149
|
+
/** Whether to show the page title instead of domain */
|
|
150
|
+
showTitle?: boolean;
|
|
151
|
+
/** Maximum characters for truncated display */
|
|
152
|
+
maxDisplayLength?: number;
|
|
153
|
+
/** Custom render for the blocked status indicator */
|
|
154
|
+
renderBlockedIndicator?: (status: UrlFetchStatus, errorMessage?: string) => React.ReactNode;
|
|
155
|
+
/** Click handler for the URL */
|
|
156
|
+
onUrlClick?: (url: string, event: React.MouseEvent) => void;
|
|
157
|
+
/** Event handlers for citation interactions */
|
|
158
|
+
eventHandlers?: CitationEventHandlers;
|
|
159
|
+
/** Whether tooltips should be prevented */
|
|
160
|
+
preventTooltips?: boolean;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Extended props for the citation content renderer
|
|
164
|
+
*/
|
|
165
|
+
interface CitationContentProps extends BaseCitationProps {
|
|
166
|
+
/** Unique key for this citation */
|
|
167
|
+
citationKey: string;
|
|
168
|
+
/** Unique instance ID for this citation render */
|
|
169
|
+
citationInstanceId: string;
|
|
170
|
+
/** Found citation highlight data */
|
|
171
|
+
verification: Verification | null | undefined;
|
|
172
|
+
/** Search status */
|
|
173
|
+
searchStatus: SearchStatus | undefined | null;
|
|
174
|
+
/** Actual page number where citation was found */
|
|
175
|
+
actualPageNumber?: number | null;
|
|
176
|
+
/** Page number from citation data */
|
|
177
|
+
citationPageNumber?: number | null;
|
|
178
|
+
/** Unique highlight ID */
|
|
179
|
+
highlightId?: string;
|
|
180
|
+
/** Citation verification status */
|
|
181
|
+
status: CitationStatus;
|
|
182
|
+
/** Whether tooltips should be suppressed */
|
|
183
|
+
preventTooltips?: boolean;
|
|
184
|
+
/** Whether on mobile device */
|
|
185
|
+
isMobile?: boolean;
|
|
186
|
+
/** Style configuration */
|
|
187
|
+
styles?: CitationStyles;
|
|
188
|
+
/** State-based classes */
|
|
189
|
+
stateClasses?: CitationStateClasses;
|
|
190
|
+
/** Cursor classes */
|
|
191
|
+
cursorClasses?: CitationCursorClasses;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Render props for custom citation rendering
|
|
195
|
+
*/
|
|
196
|
+
interface CitationRenderProps {
|
|
197
|
+
/** The citation data */
|
|
198
|
+
citation: Citation;
|
|
199
|
+
/** Citation verification status */
|
|
200
|
+
status: CitationStatus;
|
|
201
|
+
/** The citation key */
|
|
202
|
+
citationKey: string;
|
|
203
|
+
/** Display text for the citation */
|
|
204
|
+
displayText: string;
|
|
205
|
+
/** Whether this is a merged keySpan display */
|
|
206
|
+
isMergedDisplay: boolean;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Event handlers for citation interactions
|
|
210
|
+
*/
|
|
211
|
+
interface CitationEventHandlers {
|
|
212
|
+
/** Called when mouse enters citation */
|
|
213
|
+
onMouseEnter?: (citation: Citation, citationKey: string) => void;
|
|
214
|
+
/** Called when mouse leaves citation */
|
|
215
|
+
onMouseLeave?: (citation: Citation, citationKey: string) => void;
|
|
216
|
+
/** Called when citation is clicked */
|
|
217
|
+
onClick?: (citation: Citation, citationKey: string, event: React.MouseEvent | React.TouchEvent) => void;
|
|
218
|
+
/** Called on touch end (mobile) */
|
|
219
|
+
onTouchEnd?: (citation: Citation, citationKey: string, event: React.TouchEvent) => void;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Context provided to behavior handlers for making decisions.
|
|
223
|
+
*/
|
|
224
|
+
interface CitationBehaviorContext {
|
|
225
|
+
/** The citation data */
|
|
226
|
+
citation: Citation;
|
|
227
|
+
/** Unique key for this citation */
|
|
228
|
+
citationKey: string;
|
|
229
|
+
/** Verification result if available */
|
|
230
|
+
verification: Verification | null;
|
|
231
|
+
/** Whether the popover is currently pinned open */
|
|
232
|
+
isTooltipExpanded: boolean;
|
|
233
|
+
/** Whether the full-size image overlay is currently open */
|
|
234
|
+
isImageExpanded: boolean;
|
|
235
|
+
/** Whether a verification image is available */
|
|
236
|
+
hasImage: boolean;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Actions that can be performed by the citation component.
|
|
240
|
+
* These are returned by behavior handlers to control component state.
|
|
241
|
+
*/
|
|
242
|
+
interface CitationBehaviorActions {
|
|
243
|
+
/** Pin or unpin the popover (keeps it visible without hover) */
|
|
244
|
+
setTooltipExpanded?: boolean;
|
|
245
|
+
/** Open or close the full-size image overlay */
|
|
246
|
+
setImageExpanded?: boolean | string;
|
|
247
|
+
/** Expand or collapse the search phrases list (for miss/partial states) */
|
|
248
|
+
setPhrasesExpanded?: boolean;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Configuration for click behavior.
|
|
252
|
+
* Return actions to perform, or `false` to prevent default behavior.
|
|
253
|
+
*/
|
|
254
|
+
type CitationClickBehavior = (context: CitationBehaviorContext, event: React.MouseEvent | React.TouchEvent) => CitationBehaviorActions | false | void;
|
|
255
|
+
/**
|
|
256
|
+
* Configuration for hover behavior.
|
|
257
|
+
*/
|
|
258
|
+
interface CitationHoverBehavior {
|
|
259
|
+
/** Called when mouse enters the citation */
|
|
260
|
+
onEnter?: (context: CitationBehaviorContext) => void;
|
|
261
|
+
/** Called when mouse leaves the citation */
|
|
262
|
+
onLeave?: (context: CitationBehaviorContext) => void;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Configuration for customizing default citation behaviors.
|
|
266
|
+
*
|
|
267
|
+
* When you provide `onClick` or `onHover`, they REPLACE the corresponding default behaviors.
|
|
268
|
+
* Use `eventHandlers` for side effects that should run alongside defaults.
|
|
269
|
+
*
|
|
270
|
+
* @example Custom click behavior (replaces default)
|
|
271
|
+
* ```tsx
|
|
272
|
+
* <CitationComponent
|
|
273
|
+
* citation={citation}
|
|
274
|
+
* verification={verification}
|
|
275
|
+
* behaviorConfig={{
|
|
276
|
+
* onClick: (context, event) => {
|
|
277
|
+
* if (context.hasImage) {
|
|
278
|
+
* return { setImageExpanded: true };
|
|
279
|
+
* }
|
|
280
|
+
* }
|
|
281
|
+
* }}
|
|
282
|
+
* />
|
|
283
|
+
* ```
|
|
284
|
+
*
|
|
285
|
+
* @example Disable click behavior entirely
|
|
286
|
+
* ```tsx
|
|
287
|
+
* <CitationComponent
|
|
288
|
+
* citation={citation}
|
|
289
|
+
* verification={verification}
|
|
290
|
+
* behaviorConfig={{ onClick: () => false }}
|
|
291
|
+
* />
|
|
292
|
+
* ```
|
|
293
|
+
*/
|
|
294
|
+
interface CitationBehaviorConfig {
|
|
295
|
+
/**
|
|
296
|
+
* Custom click behavior handler. When provided, REPLACES the default click behavior.
|
|
297
|
+
*
|
|
298
|
+
* Return values:
|
|
299
|
+
* - `CitationBehaviorActions`: Apply specific state changes
|
|
300
|
+
* - `false`: Prevent any state changes
|
|
301
|
+
* - `void`/`undefined`: No state changes
|
|
302
|
+
*/
|
|
303
|
+
onClick?: CitationClickBehavior;
|
|
304
|
+
/**
|
|
305
|
+
* Custom hover behavior handlers. When provided, REPLACE the default hover behavior.
|
|
306
|
+
*/
|
|
307
|
+
onHover?: CitationHoverBehavior;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Props for the tooltip wrapper component
|
|
311
|
+
*/
|
|
312
|
+
interface CitationTooltipProps {
|
|
313
|
+
children: React.ReactNode;
|
|
314
|
+
citation: Citation;
|
|
315
|
+
verification?: Verification | null;
|
|
316
|
+
shouldShowTooltip: boolean;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Extracts domain from URL for compact display.
|
|
321
|
+
*/
|
|
322
|
+
declare function extractDomain(url: string): string;
|
|
323
|
+
/**
|
|
324
|
+
* Checks if status is a blocked status.
|
|
325
|
+
*/
|
|
326
|
+
declare function isBlockedStatus(status: UrlFetchStatus): boolean;
|
|
327
|
+
/**
|
|
328
|
+
* Checks if status is an error status.
|
|
329
|
+
*/
|
|
330
|
+
declare function isErrorStatus(status: UrlFetchStatus): boolean;
|
|
331
|
+
/**
|
|
332
|
+
* Checks if URL was successfully verified.
|
|
333
|
+
*/
|
|
334
|
+
declare function isVerifiedStatus(status: UrlFetchStatus): boolean;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Props for the CitationComponent.
|
|
338
|
+
*
|
|
339
|
+
* ## Behavior
|
|
340
|
+
*
|
|
341
|
+
* Default interaction pattern:
|
|
342
|
+
* - **Hover**: Shows popover with verification image/details
|
|
343
|
+
* - **Click**: Opens full-size image overlay (zoom)
|
|
344
|
+
* - **Escape / Click outside / Click overlay**: Closes image overlay
|
|
345
|
+
*
|
|
346
|
+
* Custom behavior:
|
|
347
|
+
* - Use `behaviorConfig.onClick` to replace the default click behavior
|
|
348
|
+
* - Use `eventHandlers.onClick` to add side effects (disables default)
|
|
349
|
+
*
|
|
350
|
+
* @example Default usage
|
|
351
|
+
* ```tsx
|
|
352
|
+
* <CitationComponent
|
|
353
|
+
* citation={citation}
|
|
354
|
+
* verification={verification}
|
|
355
|
+
* />
|
|
356
|
+
* ```
|
|
357
|
+
*
|
|
358
|
+
* @example Custom click behavior
|
|
359
|
+
* ```tsx
|
|
360
|
+
* <CitationComponent
|
|
361
|
+
* citation={citation}
|
|
362
|
+
* verification={verification}
|
|
363
|
+
* behaviorConfig={{
|
|
364
|
+
* onClick: (context) => {
|
|
365
|
+
* // Custom action
|
|
366
|
+
* console.log('Clicked:', context.citationKey);
|
|
367
|
+
* return { setImageExpanded: true };
|
|
368
|
+
* }
|
|
369
|
+
* }}
|
|
370
|
+
* />
|
|
371
|
+
* ```
|
|
372
|
+
*/
|
|
373
|
+
interface CitationComponentProps extends BaseCitationProps {
|
|
374
|
+
/** Verification result from the DeepCitation API */
|
|
375
|
+
verification?: Verification | null;
|
|
376
|
+
/**
|
|
377
|
+
* Explicitly show loading spinner. When true, displays spinner regardless
|
|
378
|
+
* of verification status. Use this when verification is in-flight.
|
|
379
|
+
*/
|
|
380
|
+
isLoading?: boolean;
|
|
381
|
+
/**
|
|
382
|
+
* Visual style variant for the citation.
|
|
383
|
+
* - `chip`: Pill/badge style with background color
|
|
384
|
+
* - `brackets`: [text✓] with square brackets (default)
|
|
385
|
+
* - `text`: Plain text, inherits parent styling
|
|
386
|
+
* - `superscript`: Small raised text like footnotes¹
|
|
387
|
+
* - `minimal`: Compact text with indicator, truncated
|
|
388
|
+
*/
|
|
389
|
+
variant?: CitationVariant;
|
|
390
|
+
/**
|
|
391
|
+
* What content to display in the citation.
|
|
392
|
+
* - `keySpan`: Descriptive text (e.g., "Revenue Growth")
|
|
393
|
+
* - `number`: Citation number (e.g., "1", "2", "3")
|
|
394
|
+
* - `indicator`: Only the status icon, no text
|
|
395
|
+
*
|
|
396
|
+
* Defaults based on variant:
|
|
397
|
+
* - `chip` → `keySpan`
|
|
398
|
+
* - `brackets` → `keySpan`
|
|
399
|
+
* - `text` → `keySpan`
|
|
400
|
+
* - `superscript` → `number`
|
|
401
|
+
* - `minimal` → `number`
|
|
402
|
+
*/
|
|
403
|
+
content?: CitationContent;
|
|
404
|
+
/** Event handlers for citation interactions */
|
|
405
|
+
eventHandlers?: CitationEventHandlers;
|
|
406
|
+
/**
|
|
407
|
+
* Configuration for customizing default click/hover behaviors.
|
|
408
|
+
* Providing onClick REPLACES the default click behavior.
|
|
409
|
+
*/
|
|
410
|
+
behaviorConfig?: CitationBehaviorConfig;
|
|
411
|
+
/** Enable mobile touch handlers */
|
|
412
|
+
isMobile?: boolean;
|
|
413
|
+
/** Custom render function for the status indicator */
|
|
414
|
+
renderIndicator?: (status: CitationStatus) => React$1.ReactNode;
|
|
415
|
+
/** Custom render function for entire citation content */
|
|
416
|
+
renderContent?: (props: CitationRenderProps) => React$1.ReactNode;
|
|
417
|
+
/** Position of popover. Use "hidden" to disable. */
|
|
418
|
+
popoverPosition?: "top" | "bottom" | "hidden";
|
|
419
|
+
/** Custom render function for popover content */
|
|
420
|
+
renderPopoverContent?: (props: {
|
|
421
|
+
citation: BaseCitationProps["citation"];
|
|
422
|
+
verification: Verification | null;
|
|
423
|
+
status: CitationStatus;
|
|
424
|
+
}) => React$1.ReactNode;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* CitationComponent displays a citation with verification status.
|
|
428
|
+
*
|
|
429
|
+
* ## Interaction Pattern
|
|
430
|
+
*
|
|
431
|
+
* - **Hover**: Shows popover with verification image or details
|
|
432
|
+
* - **Click**: Opens full-size image overlay (if image available)
|
|
433
|
+
* - **Escape / Click overlay**: Closes the image overlay
|
|
434
|
+
*
|
|
435
|
+
* ## Customization
|
|
436
|
+
*
|
|
437
|
+
* Use `behaviorConfig.onClick` to completely replace the click behavior,
|
|
438
|
+
* or `eventHandlers.onClick` to add side effects (which disables defaults).
|
|
439
|
+
*/
|
|
440
|
+
declare const CitationComponent: React$1.ForwardRefExoticComponent<CitationComponentProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
441
|
+
declare const MemoizedCitationComponent: React$1.NamedExoticComponent<CitationComponentProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* DeepCitation icon SVG (no dependencies)
|
|
445
|
+
*/
|
|
446
|
+
declare const DeepCitationIcon: ({ className }: {
|
|
447
|
+
className?: string;
|
|
448
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
449
|
+
/**
|
|
450
|
+
* Check icon SVG (no dependencies)
|
|
451
|
+
*/
|
|
452
|
+
declare const CheckIcon: ({ className }: {
|
|
453
|
+
className?: string;
|
|
454
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
455
|
+
/**
|
|
456
|
+
* Warning icon SVG (no dependencies)
|
|
457
|
+
*/
|
|
458
|
+
declare const WarningIcon: ({ className }: {
|
|
459
|
+
className?: string;
|
|
460
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
461
|
+
/** Spinner component for loading/pending state */
|
|
462
|
+
declare const SpinnerIcon: ({ className }: {
|
|
463
|
+
className?: string;
|
|
464
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
465
|
+
|
|
466
|
+
export { CheckIcon, type CitationBehaviorActions, type CitationBehaviorConfig, type CitationBehaviorContext, type CitationClickBehavior, CitationComponent, type CitationComponentProps, type CitationContent, type CitationContentProps, type CitationCursorClasses, type CitationEventHandlers, type CitationHoverBehavior, type CitationRenderProps, type CitationStateClasses, type CitationStyles, type CitationTooltipProps, type CitationVariant, type CitationVariant as CitationVariantType, DeepCitationIcon, MemoizedCitationComponent, SpinnerIcon, type UrlCitationMeta, type UrlCitationProps, type UrlCitationVariant, type UrlFetchStatus, WarningIcon, extractDomain, isBlockedStatus, isErrorStatus, isVerifiedStatus };
|