@e-llm-studio/citation 0.0.214 → 0.0.216
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/README.md +254 -38
- package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js +1 -1
- package/dist/cjs/features/GptWebCitation/GptWebCitation.js +1 -1
- package/dist/cjs/features/GptWebCitation/GptWebCitation.module.css.js +1 -1
- package/dist/cjs/features/GptWebCitation/GptWebCitationImageCitation.js +1 -1
- package/dist/cjs/features/GptWebCitation/GptWebCitationImageFullScreenView.js +1 -1
- package/dist/cjs/features/GptWebCitation/GptWebCitationSkeleton.js +1 -1
- package/dist/cjs/features/GptWebCitation/utils/citationData.utils.js +1 -1
- package/dist/cjs/features/GptWebCitation/utils/fixedHeight.utils.js +2 -0
- package/dist/cjs/features/GptWebCitation/utils/fixedHeight.utils.js.map +1 -0
- package/dist/cjs/features/GptWebCitation/utils/styleOverrides.utils.js +2 -0
- package/dist/cjs/features/GptWebCitation/utils/styleOverrides.utils.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/features/CognitiveCompare/CognitiveCompare.js +1 -1
- package/dist/features/GptWebCitation/GptWebCitation.js +1 -1
- package/dist/features/GptWebCitation/GptWebCitation.module.css.js +1 -1
- package/dist/features/GptWebCitation/GptWebCitationImageCitation.js +1 -1
- package/dist/features/GptWebCitation/GptWebCitationImageFullScreenView.js +1 -1
- package/dist/features/GptWebCitation/GptWebCitationSkeleton.js +1 -1
- package/dist/features/GptWebCitation/utils/citationData.utils.js +1 -1
- package/dist/features/GptWebCitation/utils/fixedHeight.utils.js +2 -0
- package/dist/features/GptWebCitation/utils/fixedHeight.utils.js.map +1 -0
- package/dist/features/GptWebCitation/utils/styleOverrides.utils.js +2 -0
- package/dist/features/GptWebCitation/utils/styleOverrides.utils.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/types/src/CognitiveCompareTest.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +1 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts +10 -0
- package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts +9 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageFullScreenView.d.ts +3 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageFullScreenView.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationSkeleton.d.ts +12 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationSkeleton.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationTest.d.ts +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationTest.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/WebCitationSampleResponse.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/types.d.ts +289 -18
- package/dist/types/src/features/GptWebCitation/types.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/utils/citationData.utils.d.ts +2 -0
- package/dist/types/src/features/GptWebCitation/utils/citationData.utils.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/utils/fixedHeight.utils.d.ts +10 -0
- package/dist/types/src/features/GptWebCitation/utils/fixedHeight.utils.d.ts.map +1 -0
- package/dist/types/src/features/GptWebCitation/utils/styleOverrides.utils.d.ts +6 -0
- package/dist/types/src/features/GptWebCitation/utils/styleOverrides.utils.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js +0 -2
- package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js.map +0 -1
- package/dist/features/GptWebCitation/GptWebCitationMarkdown.js +0 -2
- package/dist/features/GptWebCitation/GptWebCitationMarkdown.js.map +0 -1
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ElementType } from "react";
|
|
2
|
+
import { IGptWebCitationSkeletonStyles, IGptWebCitationVisitLinkStyles } from "./types";
|
|
3
|
+
export type GptWebCitationSkeletonStatus = "pending" | "error";
|
|
4
|
+
export interface GptWebCitationSkeletonProps {
|
|
5
|
+
status: GptWebCitationSkeletonStatus;
|
|
6
|
+
ExternalLinkIcon?: ElementType;
|
|
7
|
+
citationUrl?: string;
|
|
8
|
+
styles?: IGptWebCitationSkeletonStyles;
|
|
9
|
+
visitLinkStyles?: IGptWebCitationVisitLinkStyles;
|
|
10
|
+
isFixedHeight?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const GptWebCitationSkeleton: ({ status, ExternalLinkIcon, citationUrl, styles: styleOverrides, visitLinkStyles, isFixedHeight, }: GptWebCitationSkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
13
|
export default GptWebCitationSkeleton;
|
|
3
14
|
//# sourceMappingURL=GptWebCitationSkeleton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GptWebCitationSkeleton.d.ts","sourceRoot":"","sources":["../../../../../src/features/GptWebCitation/GptWebCitationSkeleton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GptWebCitationSkeleton.d.ts","sourceRoot":"","sources":["../../../../../src/features/GptWebCitation/GptWebCitationSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,6BAA6B,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AAIxF,MAAM,MAAM,4BAA4B,GAAG,SAAS,GAAG,OAAO,CAAC;AAE/D,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,4BAA4B,CAAC;IACrC,gBAAgB,CAAC,EAAE,WAAW,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,6BAA6B,CAAC;IACvC,eAAe,CAAC,EAAE,8BAA8B,CAAC;IACjD,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,QAAA,MAAM,sBAAsB,uGAOzB,2BAA2B,4CAqF7B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IGptWebCitationTestProps } from "./types";
|
|
2
|
-
declare const GptWebCitationTest: ({ gptCitation, isWebCitation, webCitationData: webCitationDataProp, sourceModel, learnedFrom, showWebCitation: showWebCitationProp, onGenerateWebCitation,
|
|
2
|
+
declare const GptWebCitationTest: ({ gptCitation, isWebCitation, webCitationData: webCitationDataProp, sourceModel, learnedFrom, showWebCitation: showWebCitationProp, onGenerateWebCitation, webCitationStatus: webCitationStatusProp, showExpandImageButton, showGptMaximizeButton, iconsConfig, isFixedHeight, styles, }: IGptWebCitationTestProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default GptWebCitationTest;
|
|
4
4
|
//# sourceMappingURL=GptWebCitationTest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GptWebCitationTest.d.ts","sourceRoot":"","sources":["../../../../../src/features/GptWebCitation/GptWebCitationTest.tsx"],"names":[],"mappings":"AAQA,OAAO,
|
|
1
|
+
{"version":3,"file":"GptWebCitationTest.d.ts","sourceRoot":"","sources":["../../../../../src/features/GptWebCitation/GptWebCitationTest.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAwB,wBAAwB,EAAE,MAAM,SAAS,CAAC;AA2BzE,QAAA,MAAM,kBAAkB,6RAcrB,wBAAwB,4CAoE1B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebCitationSampleResponse.d.ts","sourceRoot":"","sources":["../../../../../src/features/GptWebCitation/WebCitationSampleResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAGlD,eAAO,MAAM,4BAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"WebCitationSampleResponse.d.ts","sourceRoot":"","sources":["../../../../../src/features/GptWebCitation/WebCitationSampleResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAGlD,eAAO,MAAM,4BAA4B,EAAE,uBAmB1C,CAAA;AAGD,eAAO,MAAM,mCAAmC,EAAE,uBAGjD,CAAC"}
|
|
@@ -1,34 +1,60 @@
|
|
|
1
|
-
import { CSSProperties } from "react";
|
|
2
|
-
import type {
|
|
1
|
+
import { CSSProperties, ElementType } from "react";
|
|
2
|
+
import type { INonReasoningSource, NonWebReasoningIconsConfig } from "../CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent";
|
|
3
|
+
/** Database metadata returned with a web citation API response. */
|
|
3
4
|
export interface IGptWebCitationDbMetadata {
|
|
5
|
+
/** Citation identifier stored in the backend. */
|
|
4
6
|
citation_id?: string;
|
|
7
|
+
/** GCS/blob storage path for the citation screenshot. */
|
|
5
8
|
blob_path?: string;
|
|
6
9
|
}
|
|
10
|
+
/** Image snapshot metadata for a web citation (screenshot of the source page). */
|
|
7
11
|
export interface IGptWebCitationImageMetadata {
|
|
12
|
+
/** Preferred signed HTTPS URL for the screenshot image. */
|
|
8
13
|
signed_url?: string;
|
|
14
|
+
/** Blob path inside the citation storage bucket. */
|
|
9
15
|
blob_path?: string;
|
|
16
|
+
/** GCS URI fallback (`gs://...`) when a signed URL is not available. */
|
|
10
17
|
gs_uri?: string;
|
|
11
18
|
}
|
|
12
19
|
type GptWebCitationType = "web" | (string & {});
|
|
20
|
+
/**
|
|
21
|
+
* Web citation payload from your `get_citation` (or equivalent) API.
|
|
22
|
+
*
|
|
23
|
+
* When `imageMetadata.signed_url` is present, the component renders a screenshot.
|
|
24
|
+
* Otherwise it falls back to rendering `content` as HTML/markdown.
|
|
25
|
+
*/
|
|
13
26
|
export interface IWebCitationApiResponse {
|
|
27
|
+
/** Unique citation identifier. */
|
|
14
28
|
citationId?: string;
|
|
29
|
+
/** HTML/markdown explanation with optional `<highlight>` tags and anchor links. */
|
|
15
30
|
content?: string;
|
|
31
|
+
/** Citation type — use `"web"` for web citation toggle flows. */
|
|
16
32
|
citationType?: GptWebCitationType;
|
|
33
|
+
/** Optional status message from the API. */
|
|
17
34
|
message?: string;
|
|
18
35
|
userId?: string;
|
|
19
36
|
userName?: string;
|
|
20
37
|
userEmail?: string;
|
|
38
|
+
/** Original source URL shown in the visit-link footer. */
|
|
21
39
|
citationUrl?: string;
|
|
40
|
+
/** Highlighted source URL returned by the citation API (preferred for visit links). */
|
|
41
|
+
highlightedUrl?: string;
|
|
22
42
|
db?: IGptWebCitationDbMetadata;
|
|
23
43
|
imageMetadata?: IGptWebCitationImageMetadata;
|
|
24
44
|
}
|
|
45
|
+
/** Normalized display fields derived from {@link IWebCitationApiResponse}. */
|
|
25
46
|
export interface IGptWebCitationMappedData {
|
|
26
47
|
citationId?: string;
|
|
27
48
|
content: string;
|
|
28
49
|
citationType?: GptWebCitationType;
|
|
29
50
|
citationUrl?: string;
|
|
51
|
+
/** Highlighted source URL from the API (preferred over `defaultCitationUrl` for visit links). */
|
|
52
|
+
highlightedUrl?: string;
|
|
53
|
+
/** Topic label extracted from content (first anchor text) or overridden via props. */
|
|
30
54
|
topic: string;
|
|
55
|
+
/** Decision strength / relevance score parsed from content or overridden via props. */
|
|
31
56
|
relevanceScore: number;
|
|
57
|
+
/** Site name derived from `citationUrl` (e.g. `forbes.com` → `Forbes`). */
|
|
32
58
|
learnedFrom?: string;
|
|
33
59
|
web_citation_gcs_url?: string;
|
|
34
60
|
userId?: string;
|
|
@@ -37,28 +63,173 @@ export interface IGptWebCitationMappedData {
|
|
|
37
63
|
db?: IGptWebCitationDbMetadata;
|
|
38
64
|
imageMetadata?: IGptWebCitationImageMetadata;
|
|
39
65
|
}
|
|
66
|
+
/** Active citation panel: GPT reasoning or web snapshot/markdown. */
|
|
40
67
|
export type GptWebCitationView = "gpt" | "web";
|
|
41
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Web citation lifecycle status — set by the parent from their API call state.
|
|
70
|
+
*
|
|
71
|
+
* - `"pending"` — fetch in progress; shows loading skeleton (default).
|
|
72
|
+
* - `"success"` — fetch succeeded; renders screenshot when `webCitationData` has an image URL.
|
|
73
|
+
* - `"error"` — fetch failed or no preview; shows error skeleton.
|
|
74
|
+
*/
|
|
75
|
+
export type GptWebCitationStatus = "pending" | "success" | "error";
|
|
76
|
+
/**
|
|
77
|
+
* Configuration for the embedded GPT reasoning panel
|
|
78
|
+
* (`CognitiveInternalgptCoreComponent`).
|
|
79
|
+
*/
|
|
80
|
+
export interface IGptCitationConfig {
|
|
81
|
+
/**
|
|
82
|
+
* GPT reasoning source data — highlights, paraphrase, confidence score, etc.
|
|
83
|
+
* Passed to the underlying GPT citation core component.
|
|
84
|
+
*/
|
|
85
|
+
item: INonReasoningSource;
|
|
86
|
+
/** Panel header title (e.g. `"Summary Citations"`). */
|
|
87
|
+
headerTitle: string;
|
|
88
|
+
/** Zero-based citation index shown in the header. */
|
|
89
|
+
index?: number;
|
|
90
|
+
/**
|
|
91
|
+
* Icon component overrides for the GPT panel (chevrons, maximize, close).
|
|
92
|
+
* Supply React components compatible with your icon library version.
|
|
93
|
+
*/
|
|
94
|
+
iconsConfig?: NonWebReasoningIconsConfig;
|
|
95
|
+
/**
|
|
96
|
+
* Source document label in the GPT footer (right side).
|
|
97
|
+
* Hidden automatically when `isWebCitation` is true.
|
|
98
|
+
*/
|
|
99
|
+
DocumentTitle?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Called when the user clicks the GPT footer source link.
|
|
102
|
+
* Hidden automatically when `isWebCitation` is true.
|
|
103
|
+
*/
|
|
104
|
+
previewCallback?: () => void;
|
|
105
|
+
/**
|
|
106
|
+
* Fixed height for the GPT content body (e.g. `"384px"`).
|
|
107
|
+
* Pair with `styles.webCitation.content` to match web view height.
|
|
108
|
+
*/
|
|
109
|
+
bodyHeight?: string;
|
|
110
|
+
/** When true, hides the GPT header fullscreen/maximize button. */
|
|
111
|
+
disableMaximize?: boolean;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Icon overrides for the web citation screenshot view.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```tsx
|
|
118
|
+
* import { ExternalLink, Maximize2 } from "lucide-react";
|
|
119
|
+
*
|
|
120
|
+
* iconsConfig={{
|
|
121
|
+
* MaximizeIcon: Maximize2,
|
|
122
|
+
* ExternalLinkIcon: ExternalLink,
|
|
123
|
+
* }}
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
export type IGptWebCitationImageIconsConfig = {
|
|
127
|
+
/** Expand screenshot button icon. Falls back to `gptCitation.iconsConfig.MaximizeIcon`, then `Maximize2`. */
|
|
128
|
+
MaximizeIcon?: ElementType;
|
|
129
|
+
/** Visit-link icon in the screenshot footer. Defaults to `ExternalLink`. */
|
|
130
|
+
ExternalLinkIcon?: ElementType;
|
|
131
|
+
};
|
|
132
|
+
/** Style overrides for the GPT citation card and its footer toggle. */
|
|
42
133
|
export interface IGptWebCitationGptStyles {
|
|
43
|
-
/** Border
|
|
134
|
+
/** Border card around the GPT citation panel. */
|
|
44
135
|
wrapper?: CSSProperties;
|
|
45
|
-
/** View Web Citation button
|
|
136
|
+
/** Row overlay for the **View Web Citation** button in the GPT footer. */
|
|
46
137
|
footerAction?: CSSProperties;
|
|
47
|
-
/** View Web Citation
|
|
138
|
+
/** **View Web Citation** button styles. */
|
|
48
139
|
toggleButton?: CSSProperties;
|
|
49
140
|
}
|
|
141
|
+
/** Style overrides for the web citation card (header, content, footer). */
|
|
142
|
+
export interface IGptWebCitationVisitLinkStyles {
|
|
143
|
+
/** Visit link row container (hint + link). */
|
|
144
|
+
row?: CSSProperties;
|
|
145
|
+
/** Hint text beside the visit link (e.g. "to view details"). */
|
|
146
|
+
hint?: CSSProperties;
|
|
147
|
+
/** Visit link anchor/button styles. */
|
|
148
|
+
link?: CSSProperties;
|
|
149
|
+
}
|
|
150
|
+
/** Style overrides for the web citation screenshot view. */
|
|
151
|
+
export interface IGptWebCitationImageStyles {
|
|
152
|
+
/** Outer image citation wrapper. */
|
|
153
|
+
wrapper?: CSSProperties;
|
|
154
|
+
/** Center column that holds the viewport or loading skeleton. */
|
|
155
|
+
center?: CSSProperties;
|
|
156
|
+
/** Viewport around the scroll container and expand button. */
|
|
157
|
+
viewport?: CSSProperties;
|
|
158
|
+
/** Scrollable container around the screenshot. */
|
|
159
|
+
scrollContainer?: CSSProperties;
|
|
160
|
+
/** Screenshot `<img>` element. */
|
|
161
|
+
image?: CSSProperties;
|
|
162
|
+
/** Full-screen expand button. */
|
|
163
|
+
expandButton?: CSSProperties;
|
|
164
|
+
/** Visit link overrides for the screenshot footer. */
|
|
165
|
+
visitLink?: IGptWebCitationVisitLinkStyles;
|
|
166
|
+
/** Full-screen image viewer (portal overlay). */
|
|
167
|
+
fullScreen?: IGptWebCitationFullScreenStyles;
|
|
168
|
+
}
|
|
169
|
+
/** Style overrides for the full-screen screenshot viewer. */
|
|
170
|
+
export interface IGptWebCitationFullScreenStyles {
|
|
171
|
+
overlay?: CSSProperties;
|
|
172
|
+
content?: CSSProperties;
|
|
173
|
+
closeButton?: CSSProperties;
|
|
174
|
+
imageWrapper?: CSSProperties;
|
|
175
|
+
image?: CSSProperties;
|
|
176
|
+
}
|
|
177
|
+
/** Style overrides for pending/error loading skeletons. */
|
|
178
|
+
export interface IGptWebCitationSkeletonStyles {
|
|
179
|
+
/** Outer skeleton column wrapper. */
|
|
180
|
+
container?: CSSProperties;
|
|
181
|
+
/** Skeleton frame (gray background area). */
|
|
182
|
+
frame?: CSSProperties;
|
|
183
|
+
/** Shimmer animation overlay (pending state). */
|
|
184
|
+
shimmer?: CSSProperties;
|
|
185
|
+
pending?: {
|
|
186
|
+
content?: CSSProperties;
|
|
187
|
+
text?: CSSProperties;
|
|
188
|
+
actionRow?: CSSProperties;
|
|
189
|
+
actionHint?: CSSProperties;
|
|
190
|
+
};
|
|
191
|
+
error?: {
|
|
192
|
+
content?: CSSProperties;
|
|
193
|
+
title?: CSSProperties;
|
|
194
|
+
message?: CSSProperties;
|
|
195
|
+
actionGroup?: CSSProperties;
|
|
196
|
+
detailsToggle?: CSSProperties;
|
|
197
|
+
detailsMessage?: CSSProperties;
|
|
198
|
+
/** Glowing visit link in error state. Merged on top of `visitLink.link`. */
|
|
199
|
+
visitLinkGlow?: CSSProperties;
|
|
200
|
+
};
|
|
201
|
+
/** Visit link overrides inside skeleton states. */
|
|
202
|
+
visitLink?: IGptWebCitationVisitLinkStyles;
|
|
203
|
+
}
|
|
204
|
+
/** Style overrides for the web citation card (header, content, footer). */
|
|
50
205
|
export interface IGptWebCitationWebStyles {
|
|
51
|
-
/** Outer web citation card
|
|
206
|
+
/** Outer web citation card. */
|
|
52
207
|
panel?: CSSProperties;
|
|
208
|
+
/** Header row (source label, pagination, relevance badge). */
|
|
53
209
|
header?: CSSProperties;
|
|
210
|
+
/** Main content area (markdown, image, or loading skeleton). */
|
|
54
211
|
content?: CSSProperties;
|
|
212
|
+
/** Footer row (**View GPT Citation** + Learned From). */
|
|
55
213
|
footer?: CSSProperties;
|
|
56
|
-
/** View GPT Citation
|
|
214
|
+
/** **View GPT Citation** button styles. */
|
|
57
215
|
toggleButton?: CSSProperties;
|
|
216
|
+
/** "Learned From …" text styles. */
|
|
58
217
|
learnedFrom?: CSSProperties;
|
|
218
|
+
/** Shared visit link styles for image footer and skeleton states. */
|
|
219
|
+
visitLink?: IGptWebCitationVisitLinkStyles;
|
|
220
|
+
/** Screenshot image view styles. */
|
|
221
|
+
image?: IGptWebCitationImageStyles;
|
|
222
|
+
/** Pending/error skeleton styles. */
|
|
223
|
+
skeleton?: IGptWebCitationSkeletonStyles;
|
|
59
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
* Inline style overrides for GPT and web citation layouts.
|
|
227
|
+
*
|
|
228
|
+
* Use nested `gptCitation` / `webCitation` keys for view-specific styling.
|
|
229
|
+
* Legacy flat keys (`gptCitationWrapper`, `footerAction`, `webCitationButton`) still work.
|
|
230
|
+
*/
|
|
60
231
|
export interface IGptWebCitationStyleOverrides {
|
|
61
|
-
/** Shared outer wrapper applied in both GPT and web views */
|
|
232
|
+
/** Shared outer wrapper applied in both GPT and web views. */
|
|
62
233
|
container?: CSSProperties;
|
|
63
234
|
gptCitation?: IGptWebCitationGptStyles;
|
|
64
235
|
webCitation?: IGptWebCitationWebStyles;
|
|
@@ -69,32 +240,130 @@ export interface IGptWebCitationStyleOverrides {
|
|
|
69
240
|
/** @deprecated Use `gptCitation.toggleButton` or `webCitation.toggleButton` */
|
|
70
241
|
webCitationButton?: CSSProperties;
|
|
71
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* Props for {@link GptWebCitation} — composite GPT + optional web citation panel.
|
|
245
|
+
*
|
|
246
|
+
* The component is **presentational**: it does not fetch web citations.
|
|
247
|
+
* The parent owns `webCitationData`, loading state, and view toggling.
|
|
248
|
+
*
|
|
249
|
+
* @example Basic controlled usage
|
|
250
|
+
* ```tsx
|
|
251
|
+
* const [status, setStatus] = useState<GptWebCitationStatus>("pending");
|
|
252
|
+
*
|
|
253
|
+
* <GptWebCitation
|
|
254
|
+
* gptCitation={gptCitationConfig}
|
|
255
|
+
* defaultCitationUrl="https://example.com/article"
|
|
256
|
+
* isWebCitation
|
|
257
|
+
* webCitationData={data}
|
|
258
|
+
* webCitationStatus={status}
|
|
259
|
+
* showWebCitation={showWeb}
|
|
260
|
+
* onToggleCitationView={() => setShowWeb((v) => !v)}
|
|
261
|
+
* onGenerateWebCitation={fetchWebCitation}
|
|
262
|
+
* />
|
|
263
|
+
* ```
|
|
264
|
+
*
|
|
265
|
+
* @example GPT-only (no web toggle)
|
|
266
|
+
* ```tsx
|
|
267
|
+
* <GptWebCitation gptCitation={gptCitationConfig} isWebCitation={false} />
|
|
268
|
+
* ```
|
|
269
|
+
*/
|
|
72
270
|
export interface IGptWebCitationProps {
|
|
271
|
+
/**
|
|
272
|
+
* **Required.** GPT citation configuration forwarded to
|
|
273
|
+
* `CognitiveInternalgptCoreComponent`.
|
|
274
|
+
*/
|
|
73
275
|
gptCitation: IGptCitationConfig;
|
|
74
|
-
/**
|
|
276
|
+
/**
|
|
277
|
+
* Fallback source URL for visit links while web citation is pending or failed.
|
|
278
|
+
* Used when `webCitationData.highlightedUrl` is not yet available.
|
|
279
|
+
*/
|
|
280
|
+
defaultCitationUrl: string;
|
|
281
|
+
/**
|
|
282
|
+
* Enables the web citation toggle and web view.
|
|
283
|
+
* @default false — GPT citation only, no **View Web Citation** button.
|
|
284
|
+
*/
|
|
75
285
|
isWebCitation?: boolean;
|
|
286
|
+
/**
|
|
287
|
+
* Web citation API response (screenshot and/or markdown content).
|
|
288
|
+
* Omit until the parent has fetched or prefetched data.
|
|
289
|
+
*/
|
|
76
290
|
webCitationData?: IWebCitationApiResponse;
|
|
291
|
+
/**
|
|
292
|
+
* Overrides the topic label in the web citation header.
|
|
293
|
+
* Auto-extracted from `webCitationData.content` when omitted.
|
|
294
|
+
*/
|
|
77
295
|
topic?: string;
|
|
296
|
+
/** @deprecated Use `sourceLabel` instead. */
|
|
78
297
|
sourceModel?: string;
|
|
298
|
+
/**
|
|
299
|
+
* Overrides the header source label in web view
|
|
300
|
+
* (default: `Source: Web Citation > {topic}`).
|
|
301
|
+
*/
|
|
79
302
|
sourceLabel?: string;
|
|
303
|
+
/**
|
|
304
|
+
* Overrides the relevance / decision strength badge (%).
|
|
305
|
+
* Auto-parsed from content (e.g. "decision strength is 85%") when omitted.
|
|
306
|
+
*/
|
|
80
307
|
relevanceScore?: number;
|
|
308
|
+
/**
|
|
309
|
+
* Overrides the "Learned From …" site name in the web footer.
|
|
310
|
+
* Auto-derived from `citationUrl` when omitted.
|
|
311
|
+
*/
|
|
81
312
|
learnedFrom?: string;
|
|
82
|
-
/**
|
|
313
|
+
/**
|
|
314
|
+
* Controls which view is active.
|
|
315
|
+
* - `false` → GPT view (+ **View Web Citation** when `isWebCitation` is true)
|
|
316
|
+
* - `true` → Web citation panel
|
|
317
|
+
*
|
|
318
|
+
* Omit for uncontrolled internal state.
|
|
319
|
+
*/
|
|
83
320
|
showWebCitation?: boolean;
|
|
84
|
-
/**
|
|
321
|
+
/**
|
|
322
|
+
* Optional override for web citation lifecycle status from the parent's API call.
|
|
323
|
+
* When omitted, status is inferred from `webCitationData`:
|
|
324
|
+
* image URL → `"success"`, data without image → `"error"`, no data → `"pending"`.
|
|
325
|
+
* Pass `"pending"` explicitly while fetching (before image is available).
|
|
326
|
+
*/
|
|
327
|
+
webCitationStatus?: GptWebCitationStatus;
|
|
328
|
+
/**
|
|
329
|
+
* Called when the user clicks **View Web Citation**.
|
|
330
|
+
* Parent should start their fetch and update `webCitationStatus` / `webCitationData`.
|
|
331
|
+
*/
|
|
85
332
|
onGenerateWebCitation?: () => void;
|
|
86
|
-
/**
|
|
87
|
-
|
|
333
|
+
/**
|
|
334
|
+
* Called when the user toggles between GPT and web views.
|
|
335
|
+
* Required for controlled mode (`showWebCitation` is set by parent).
|
|
336
|
+
*/
|
|
88
337
|
onToggleCitationView?: () => void;
|
|
89
|
-
/**
|
|
338
|
+
/**
|
|
339
|
+
* Shows the fullscreen expand button on web citation screenshot images.
|
|
340
|
+
* @default true
|
|
341
|
+
*/
|
|
90
342
|
showExpandImageButton?: boolean;
|
|
91
343
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
344
|
+
* Shows the GPT citation header maximize/expand icon.
|
|
345
|
+
* When `false`, equivalent to `gptCitation.disableMaximize: true`.
|
|
346
|
+
* @default true (unless `gptCitation.disableMaximize` is set)
|
|
94
347
|
*/
|
|
95
348
|
showGptMaximizeButton?: boolean;
|
|
349
|
+
/**
|
|
350
|
+
* Icon overrides for the web citation screenshot view
|
|
351
|
+
* (expand button + visit link). See {@link IGptWebCitationImageIconsConfig}.
|
|
352
|
+
*/
|
|
353
|
+
iconsConfig?: IGptWebCitationImageIconsConfig;
|
|
354
|
+
/**
|
|
355
|
+
* When `true`, GPT and web citation panels share the same fixed height and width.
|
|
356
|
+
* Screenshot images use `object-fit: contain` within the content box.
|
|
357
|
+
* @default false
|
|
358
|
+
*/
|
|
359
|
+
isFixedHeight?: boolean;
|
|
360
|
+
/**
|
|
361
|
+
* Inline style overrides for GPT and web citation layouts.
|
|
362
|
+
* See {@link IGptWebCitationStyleOverrides}.
|
|
363
|
+
*/
|
|
96
364
|
styles?: IGptWebCitationStyleOverrides;
|
|
97
365
|
}
|
|
366
|
+
/** Props for the local `GptWebCitationTest` dev harness. */
|
|
98
367
|
export interface IGptWebCitationTestProps {
|
|
99
368
|
gptCitation?: IGptCitationConfig;
|
|
100
369
|
isWebCitation?: boolean;
|
|
@@ -103,9 +372,11 @@ export interface IGptWebCitationTestProps {
|
|
|
103
372
|
learnedFrom?: string;
|
|
104
373
|
showWebCitation?: boolean;
|
|
105
374
|
onGenerateWebCitation?: () => void;
|
|
106
|
-
|
|
375
|
+
webCitationStatus?: GptWebCitationStatus;
|
|
107
376
|
showExpandImageButton?: boolean;
|
|
108
377
|
showGptMaximizeButton?: boolean;
|
|
378
|
+
iconsConfig?: IGptWebCitationImageIconsConfig;
|
|
379
|
+
isFixedHeight?: boolean;
|
|
109
380
|
styles?: IGptWebCitationStyleOverrides;
|
|
110
381
|
}
|
|
111
382
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/GptWebCitation/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/GptWebCitation/types.ts"],"names":[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M,CAAC,EAAE,6BAA6B,CAAC;CACxC;AAED,4DAA4D;AAC5D,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,uBAAuB,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;IACzC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,WAAW,CAAC,EAAE,+BAA+B,CAAC;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,6BAA6B,CAAC;CACxC"}
|
|
@@ -3,6 +3,8 @@ export declare const sanitizeExternalUrl: (url?: string) => string | undefined;
|
|
|
3
3
|
export declare const extractRelevanceScoreFromContent: (content?: string) => number | undefined;
|
|
4
4
|
export declare const extractTopicFromContent: (content?: string) => string | undefined;
|
|
5
5
|
export declare const extractLearnedFromUrl: (citationUrl?: string) => string | undefined;
|
|
6
|
+
/** Visit link for pending/error skeletons: `highlightedUrl` wins, then `defaultCitationUrl`. */
|
|
7
|
+
export declare const resolveSkeletonVisitUrl: (highlightedUrl?: string, defaultCitationUrl?: string) => string | undefined;
|
|
6
8
|
export declare const getWebCitationImageUrl: (citationData?: IWebCitationApiResponse) => string | undefined;
|
|
7
9
|
export declare const mapCitationDataToDisplay: (citationData: IWebCitationApiResponse) => IGptWebCitationMappedData;
|
|
8
10
|
//# sourceMappingURL=citationData.utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"citationData.utils.d.ts","sourceRoot":"","sources":["../../../../../../src/features/GptWebCitation/utils/citationData.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,UAAU,CAAC;AASlB,eAAO,MAAM,mBAAmB,SAAU,MAAM,KAAG,MAAM,GAAG,SAgB3D,CAAC;AAEF,eAAO,MAAM,gCAAgC,aAAc,MAAM,KAAG,MAAM,GAAG,SAmB5E,CAAC;AAEF,eAAO,MAAM,uBAAuB,aAAc,MAAM,KAAG,MAAM,GAAG,SAWnE,CAAC;AAEF,eAAO,MAAM,qBAAqB,iBAClB,MAAM,KACnB,MAAM,GAAG,SAkBX,CAAC;AAEF,eAAO,MAAM,sBAAsB,kBAClB,uBAAuB,KACrC,MAAM,GAAG,SAQX,CAAC;AAEF,eAAO,MAAM,wBAAwB,iBACrB,uBAAuB,KACpC,
|
|
1
|
+
{"version":3,"file":"citationData.utils.d.ts","sourceRoot":"","sources":["../../../../../../src/features/GptWebCitation/utils/citationData.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,UAAU,CAAC;AASlB,eAAO,MAAM,mBAAmB,SAAU,MAAM,KAAG,MAAM,GAAG,SAgB3D,CAAC;AAEF,eAAO,MAAM,gCAAgC,aAAc,MAAM,KAAG,MAAM,GAAG,SAmB5E,CAAC;AAEF,eAAO,MAAM,uBAAuB,aAAc,MAAM,KAAG,MAAM,GAAG,SAWnE,CAAC;AAEF,eAAO,MAAM,qBAAqB,iBAClB,MAAM,KACnB,MAAM,GAAG,SAkBX,CAAC;AAEF,gGAAgG;AAChG,eAAO,MAAM,uBAAuB,oBACjB,MAAM,uBACF,MAAM,KAC1B,MAAM,GAAG,SACoE,CAAC;AAEjF,eAAO,MAAM,sBAAsB,kBAClB,uBAAuB,KACrC,MAAM,GAAG,SAQX,CAAC;AAEF,eAAO,MAAM,wBAAwB,iBACrB,uBAAuB,KACpC,yBAmBF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
export type GptWebCitationFixedHeightLayout = {
|
|
3
|
+
panelHeight: string;
|
|
4
|
+
gptBodyHeight: string;
|
|
5
|
+
contentHeight: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const resolveFixedHeightLayout: (bodyHeight?: string, hasToggleFooter?: boolean) => GptWebCitationFixedHeightLayout;
|
|
8
|
+
export declare const getFixedPanelStyle: (panelHeight: string) => CSSProperties;
|
|
9
|
+
export declare const getFixedWebContentStyle: () => CSSProperties;
|
|
10
|
+
//# sourceMappingURL=fixedHeight.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixedHeight.utils.d.ts","sourceRoot":"","sources":["../../../../../../src/features/GptWebCitation/utils/fixedHeight.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAK3C,MAAM,MAAM,+BAA+B,GAAG;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,wBAAwB,gBACtB,MAAM,gCAElB,+BAyBF,CAAC;AAEF,eAAO,MAAM,kBAAkB,gBAAiB,MAAM,KAAG,aASvD,CAAC;AAEH,eAAO,MAAM,uBAAuB,QAAO,aAOzC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
import type { IGptWebCitationVisitLinkStyles, IGptWebCitationWebStyles } from "../types";
|
|
3
|
+
export declare const resolveInlineStyle: (overrides?: CSSProperties) => CSSProperties | undefined;
|
|
4
|
+
export declare const mergeVisitLinkStyles: (shared?: IGptWebCitationVisitLinkStyles, specific?: IGptWebCitationVisitLinkStyles) => IGptWebCitationVisitLinkStyles;
|
|
5
|
+
export declare const resolveWebCitationVisitLinkStyles: (webStyles?: IGptWebCitationWebStyles, scope?: "image" | "skeleton") => IGptWebCitationVisitLinkStyles;
|
|
6
|
+
//# sourceMappingURL=styleOverrides.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleOverrides.utils.d.ts","sourceRoot":"","sources":["../../../../../../src/features/GptWebCitation/utils/styleOverrides.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,8BAA8B,EAC9B,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,kBAAkB,eACjB,aAAa,KACxB,aAAa,GAAG,SAIlB,CAAC;AAEF,eAAO,MAAM,oBAAoB,YACtB,8BAA8B,aAC5B,8BAA8B,KACxC,8BAID,CAAC;AAEH,eAAO,MAAM,iCAAiC,eAChC,wBAAwB,UAC5B,OAAO,GAAG,UAAU,mCAO7B,CAAC"}
|
|
@@ -36,6 +36,6 @@ export { IngestionStatusChip } from "./features/IngestionStatus/IngestionStatusC
|
|
|
36
36
|
export { ManageReminders } from "./features/ManageRemainders/ManageReminders";
|
|
37
37
|
export { default as GptWebCitation } from "./features/GptWebCitation/GptWebCitation";
|
|
38
38
|
export { default as InstantLearningCitationWrapper } from "./features/InstantLearningCitation/InstantLearningCitationComponent";
|
|
39
|
-
export { mapCitationDataToDisplay, getWebCitationImageUrl, extractTopicFromContent, extractRelevanceScoreFromContent, extractLearnedFromUrl, sanitizeExternalUrl, } from "./features/GptWebCitation/utils/citationData.utils";
|
|
40
|
-
export type { IGptWebCitationProps, IGptCitationConfig, IGptWebCitationStyleOverrides, IGptWebCitationGptStyles, IGptWebCitationWebStyles, GptWebCitationView, IWebCitationApiResponse, IGptWebCitationDbMetadata, IGptWebCitationImageMetadata, IGptWebCitationMappedData, } from "./features/GptWebCitation/types";
|
|
39
|
+
export { mapCitationDataToDisplay, getWebCitationImageUrl, resolveSkeletonVisitUrl, extractTopicFromContent, extractRelevanceScoreFromContent, extractLearnedFromUrl, sanitizeExternalUrl, } from "./features/GptWebCitation/utils/citationData.utils";
|
|
40
|
+
export type { IGptWebCitationProps, IGptCitationConfig, IGptWebCitationStyleOverrides, IGptWebCitationGptStyles, IGptWebCitationWebStyles, IGptWebCitationImageStyles, IGptWebCitationSkeletonStyles, IGptWebCitationVisitLinkStyles, IGptWebCitationFullScreenStyles, GptWebCitationView, GptWebCitationStatus, IWebCitationApiResponse, IGptWebCitationDbMetadata, IGptWebCitationImageMetadata, IGptWebCitationMappedData, IGptWebCitationImageIconsConfig, } from "./features/GptWebCitation/types";
|
|
41
41
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,iBAAiB,IAAI,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,kBAAkB,IAAI,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAC1G,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,iFAAiF,CAAC;AACtI,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,6DAA6D,CAAC;AA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",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),n=require("react"),t=require("react-markdown"),i=require("rehype-raw"),l=require("./utils/citationData.utils.js"),c=require("./GptWebCitation.module.css.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=a(t),u=a(i);exports.default=function(t){var i=t.content,a=t.activeHighlightIndex,o=t.onHighlightCountChange,h=n.useRef(null),d=n.useMemo(function(){var e,r=i.match(/id=["']highlighted-\d+["']/g);if(null==r?void 0:r.length)return r.length;var n=i.match(/<a\b[^>]*>/gi);return null!==(e=null==n?void 0:n.length)&&void 0!==e?e:0},[i]),f=n.useMemo(function(){return/id=["']highlighted-\d+["']/.test(i)},[i]);n.useEffect(function(){null==o||o(d)},[d,o]),n.useEffect(function(){var e;if(h.current){var r=h.current.querySelector("#highlighted-".concat(a));if(r)r.scrollIntoView({behavior:"smooth",block:"center"});else null===(e=h.current.querySelectorAll("a[href]")[a])||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})}},[a,i]);var g=n.useMemo(function(){var n=-1;return{span:function(n){n.node;var t=e.__rest(n,["node"]),i=t.id;if(null==i?void 0:i.startsWith("highlighted-")){var l=Number(i.replace("highlighted-",""))===a;return r.jsx("span",e.__assign({},t,{id:i,className:"".concat(c.default.highlight).concat(l?" ".concat(c.default.highlightActive):"")}))}return r.jsx("span",e.__assign({},t))},a:function(t){var i,s=t.children,u=t.href,o=t.title,h=t.className;if(!u)return r.jsx(r.Fragment,{children:s});n+=1;var d=!f&&n===a,g=null!==(i=l.sanitizeExternalUrl(u))&&void 0!==i?i:"#";return r.jsx("a",e.__assign({href:g,title:o,target:"_blank",rel:"noreferrer",className:"".concat(c.default.citationLink).concat(d?" ".concat(c.default.citationLinkActive):"").concat(h?" ".concat(h):"")},{children:s}))},code:function(n){var t=n.children,i=e.__rest(n,["children"]);return r.jsx("code",e.__assign({},i,{children:t}))},ol:function(n){var t=n.children,i=e.__rest(n,["children"]);return r.jsx("ol",e.__assign({},i,{children:t}))},ul:function(n){var t=n.children,i=e.__rest(n,["children"]);return r.jsx("ul",e.__assign({},i,{children:t}))},li:function(n){var t=n.children,i=e.__rest(n,["children"]);return r.jsx("li",e.__assign({},i,{children:t}))},p:function(n){var t=n.children,i=e.__rest(n,["children"]);return r.jsx("p",e.__assign({},i,{children:t}))}}},[a,f,i]);return r.jsx("div",e.__assign({ref:h,className:c.default.markdownBody},{children:r.jsx(s.default,e.__assign({rehypePlugins:[u.default],components:g},{children:i}))}))};
|
|
2
|
-
//# sourceMappingURL=GptWebCitationMarkdown.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GptWebCitationMarkdown.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__rest as r,__assign as n}from"tslib";import{jsx as t,Fragment as e}from"react/jsx-runtime";import{useRef as i,useMemo as c,useEffect as l}from"react";import o from"react-markdown";import a from"rehype-raw";import{sanitizeExternalUrl as h}from"./utils/citationData.utils.js";import u from"./GptWebCitation.module.css.js";var d=function(d){var f=d.content,s=d.activeHighlightIndex,v=d.onHighlightCountChange,m=i(null),g=c(function(){var r,n=f.match(/id=["']highlighted-\d+["']/g);if(null==n?void 0:n.length)return n.length;var t=f.match(/<a\b[^>]*>/gi);return null!==(r=null==t?void 0:t.length)&&void 0!==r?r:0},[f]),p=c(function(){return/id=["']highlighted-\d+["']/.test(f)},[f]);l(function(){null==v||v(g)},[g,v]),l(function(){var r;if(m.current){var n=m.current.querySelector("#highlighted-".concat(s));if(n)n.scrollIntoView({behavior:"smooth",block:"center"});else null===(r=m.current.querySelectorAll("a[href]")[s])||void 0===r||r.scrollIntoView({behavior:"smooth",block:"center"})}},[s,f]);var b=c(function(){var i=-1;return{span:function(e){e.node;var i=r(e,["node"]),c=i.id;if(null==c?void 0:c.startsWith("highlighted-")){var l=Number(c.replace("highlighted-",""))===s;return t("span",n({},i,{id:c,className:"".concat(u.highlight).concat(l?" ".concat(u.highlightActive):"")}))}return t("span",n({},i))},a:function(r){var c,l=r.children,o=r.href,a=r.title,d=r.className;if(!o)return t(e,{children:l});i+=1;var f=!p&&i===s,v=null!==(c=h(o))&&void 0!==c?c:"#";return t("a",n({href:v,title:a,target:"_blank",rel:"noreferrer",className:"".concat(u.citationLink).concat(f?" ".concat(u.citationLinkActive):"").concat(d?" ".concat(d):"")},{children:l}))},code:function(e){var i=e.children,c=r(e,["children"]);return t("code",n({},c,{children:i}))},ol:function(e){var i=e.children,c=r(e,["children"]);return t("ol",n({},c,{children:i}))},ul:function(e){var i=e.children,c=r(e,["children"]);return t("ul",n({},c,{children:i}))},li:function(e){var i=e.children,c=r(e,["children"]);return t("li",n({},c,{children:i}))},p:function(e){var i=e.children,c=r(e,["children"]);return t("p",n({},c,{children:i}))}}},[s,p,f]);return t("div",n({ref:m,className:u.markdownBody},{children:t(o,n({rehypePlugins:[a],components:b},{children:f}))}))};export{d as default};
|
|
2
|
-
//# sourceMappingURL=GptWebCitationMarkdown.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GptWebCitationMarkdown.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|