@e-llm-studio/citation 0.0.211 → 0.0.213
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 +340 -0
- package/dist/assests/icons/CitationsIcon.js +2 -0
- package/dist/assests/icons/CitationsIcon.js.map +1 -0
- package/dist/assests/icons/CitationsSparkleIcon.js +2 -0
- package/dist/assests/icons/CitationsSparkleIcon.js.map +1 -0
- package/dist/assests/svg/NeuralNetworkIcon.js +2 -0
- package/dist/assests/svg/NeuralNetworkIcon.js.map +1 -0
- package/dist/cjs/assests/icons/CitationsIcon.js +2 -0
- package/dist/cjs/assests/icons/CitationsIcon.js.map +1 -0
- package/dist/cjs/assests/icons/CitationsSparkleIcon.js +2 -0
- package/dist/cjs/assests/icons/CitationsSparkleIcon.js.map +1 -0
- package/dist/cjs/assests/svg/NeuralNetworkIcon.js +2 -0
- package/dist/cjs/assests/svg/NeuralNetworkIcon.js.map +1 -0
- package/dist/cjs/features/CitationRenderer/CitationRenderer.js +1 -1
- package/dist/cjs/features/CitationRenderer/MarkdownRenderer.js +1 -1
- package/dist/cjs/features/CitationRenderer/MarkdownRenderer.module.css.js +1 -1
- package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js +1 -1
- package/dist/cjs/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
- package/dist/cjs/features/CognitiveCompare/hooks/useStyles.js +1 -1
- package/dist/cjs/features/GptWebCitation/GptWebCitation.js +2 -0
- package/dist/cjs/features/GptWebCitation/GptWebCitation.js.map +1 -0
- package/dist/cjs/features/GptWebCitation/GptWebCitation.module.css.js +2 -0
- package/dist/cjs/features/GptWebCitation/GptWebCitation.module.css.js.map +1 -0
- package/dist/cjs/features/GptWebCitation/GptWebCitationImageCitation.js +2 -0
- package/dist/cjs/features/GptWebCitation/GptWebCitationImageCitation.js.map +1 -0
- package/dist/cjs/features/GptWebCitation/GptWebCitationImageFullScreenView.js +2 -0
- package/dist/cjs/features/GptWebCitation/GptWebCitationImageFullScreenView.js.map +1 -0
- package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js +2 -0
- package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js.map +1 -0
- package/dist/cjs/features/GptWebCitation/GptWebCitationSkeleton.js +2 -0
- package/dist/cjs/features/GptWebCitation/GptWebCitationSkeleton.js.map +1 -0
- package/dist/cjs/features/GptWebCitation/utils/citationData.utils.js +2 -0
- package/dist/cjs/features/GptWebCitation/utils/citationData.utils.js.map +1 -0
- package/dist/cjs/features/InstantLearningCitation/CongnitiveDecisioningComponent.js +2 -0
- package/dist/cjs/features/InstantLearningCitation/CongnitiveDecisioningComponent.js.map +1 -0
- package/dist/cjs/features/InstantLearningCitation/HistorySkeleton.js +2 -0
- package/dist/cjs/features/InstantLearningCitation/HistorySkeleton.js.map +1 -0
- package/dist/cjs/features/InstantLearningCitation/InstantLearningCitation.js +2 -0
- package/dist/cjs/features/InstantLearningCitation/InstantLearningCitation.js.map +1 -0
- package/dist/cjs/features/InstantLearningCitation/InstantLearningCitationComponent.js +2 -0
- package/dist/cjs/features/InstantLearningCitation/InstantLearningCitationComponent.js.map +1 -0
- package/dist/cjs/features/InstantLearningCitation/OverrideTimeline.js +2 -0
- package/dist/cjs/features/InstantLearningCitation/OverrideTimeline.js.map +1 -0
- package/dist/cjs/features/InstantLearningCitation/RuleConditionBlock.js +2 -0
- package/dist/cjs/features/InstantLearningCitation/RuleConditionBlock.js.map +1 -0
- package/dist/cjs/features/InstantLearningCitation/RuleContentComponent.js +2 -0
- package/dist/cjs/features/InstantLearningCitation/RuleContentComponent.js.map +1 -0
- package/dist/cjs/features/InstantLearningCitation/css/CongnitiveDecisioning.module.css.js +2 -0
- package/dist/cjs/features/InstantLearningCitation/css/CongnitiveDecisioning.module.css.js.map +1 -0
- package/dist/cjs/features/InstantLearningCitation/css/Override.module.css.js +2 -0
- package/dist/cjs/features/InstantLearningCitation/css/Override.module.css.js.map +1 -0
- package/dist/cjs/features/InstantLearningCitation/css/RuleAccordian.module.css.js +2 -0
- package/dist/cjs/features/InstantLearningCitation/css/RuleAccordian.module.css.js.map +1 -0
- package/dist/cjs/features/InstantLearningCitation/css/common.module.css.js +2 -0
- package/dist/cjs/features/InstantLearningCitation/css/common.module.css.js.map +1 -0
- package/dist/cjs/features/InstantLearningCitation/types/Types.js +2 -0
- package/dist/cjs/features/InstantLearningCitation/types/Types.js.map +1 -0
- package/dist/cjs/features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js +1 -1
- package/dist/cjs/features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.module.css.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/features/CitationRenderer/CitationRenderer.js +1 -1
- package/dist/features/CitationRenderer/MarkdownRenderer.js +1 -1
- package/dist/features/CitationRenderer/MarkdownRenderer.module.css.js +1 -1
- package/dist/features/CognitiveCompare/CognitiveCompare.js +1 -1
- package/dist/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
- package/dist/features/CognitiveCompare/hooks/useStyles.js +1 -1
- package/dist/features/GptWebCitation/GptWebCitation.js +2 -0
- package/dist/features/GptWebCitation/GptWebCitation.js.map +1 -0
- package/dist/features/GptWebCitation/GptWebCitation.module.css.js +2 -0
- package/dist/features/GptWebCitation/GptWebCitation.module.css.js.map +1 -0
- package/dist/features/GptWebCitation/GptWebCitationImageCitation.js +2 -0
- package/dist/features/GptWebCitation/GptWebCitationImageCitation.js.map +1 -0
- package/dist/features/GptWebCitation/GptWebCitationImageFullScreenView.js +2 -0
- package/dist/features/GptWebCitation/GptWebCitationImageFullScreenView.js.map +1 -0
- package/dist/features/GptWebCitation/GptWebCitationMarkdown.js +2 -0
- package/dist/features/GptWebCitation/GptWebCitationMarkdown.js.map +1 -0
- package/dist/features/GptWebCitation/GptWebCitationSkeleton.js +2 -0
- package/dist/features/GptWebCitation/GptWebCitationSkeleton.js.map +1 -0
- package/dist/features/GptWebCitation/utils/citationData.utils.js +2 -0
- package/dist/features/GptWebCitation/utils/citationData.utils.js.map +1 -0
- package/dist/features/InstantLearningCitation/CongnitiveDecisioningComponent.js +2 -0
- package/dist/features/InstantLearningCitation/CongnitiveDecisioningComponent.js.map +1 -0
- package/dist/features/InstantLearningCitation/HistorySkeleton.js +2 -0
- package/dist/features/InstantLearningCitation/HistorySkeleton.js.map +1 -0
- package/dist/features/InstantLearningCitation/InstantLearningCitation.js +2 -0
- package/dist/features/InstantLearningCitation/InstantLearningCitation.js.map +1 -0
- package/dist/features/InstantLearningCitation/InstantLearningCitationComponent.js +2 -0
- package/dist/features/InstantLearningCitation/InstantLearningCitationComponent.js.map +1 -0
- package/dist/features/InstantLearningCitation/OverrideTimeline.js +2 -0
- package/dist/features/InstantLearningCitation/OverrideTimeline.js.map +1 -0
- package/dist/features/InstantLearningCitation/RuleConditionBlock.js +2 -0
- package/dist/features/InstantLearningCitation/RuleConditionBlock.js.map +1 -0
- package/dist/features/InstantLearningCitation/RuleContentComponent.js +2 -0
- package/dist/features/InstantLearningCitation/RuleContentComponent.js.map +1 -0
- package/dist/features/InstantLearningCitation/css/CongnitiveDecisioning.module.css.js +2 -0
- package/dist/features/InstantLearningCitation/css/CongnitiveDecisioning.module.css.js.map +1 -0
- package/dist/features/InstantLearningCitation/css/Override.module.css.js +2 -0
- package/dist/features/InstantLearningCitation/css/Override.module.css.js.map +1 -0
- package/dist/features/InstantLearningCitation/css/RuleAccordian.module.css.js +2 -0
- package/dist/features/InstantLearningCitation/css/RuleAccordian.module.css.js.map +1 -0
- package/dist/features/InstantLearningCitation/css/common.module.css.js +2 -0
- package/dist/features/InstantLearningCitation/css/common.module.css.js.map +1 -0
- package/dist/features/InstantLearningCitation/types/Types.js +2 -0
- package/dist/features/InstantLearningCitation/types/Types.js.map +1 -0
- package/dist/features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js +1 -1
- package/dist/features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.module.css.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/src/assests/icons/CitationsIcon.d.ts +2 -0
- package/dist/types/src/assests/icons/CitationsIcon.d.ts.map +1 -0
- package/dist/types/src/assests/icons/CitationsSparkleIcon.d.ts +10 -0
- package/dist/types/src/assests/icons/CitationsSparkleIcon.d.ts.map +1 -0
- package/dist/types/src/assests/svg/NeuralNetworkIcon.d.ts +9 -0
- package/dist/types/src/assests/svg/NeuralNetworkIcon.d.ts.map +1 -0
- package/dist/types/src/features/CitationRenderer/CitationRenderer.d.ts.map +1 -1
- package/dist/types/src/features/CitationRenderer/MarkdownRenderer.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +6 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts +0 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useStyles.d.ts +3 -2
- package/dist/types/src/features/CognitiveCompare/hooks/useStyles.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts +5 -0
- package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts.map +1 -0
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts +8 -0
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts.map +1 -0
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageFullScreenView.d.ts +8 -0
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageFullScreenView.d.ts.map +1 -0
- package/dist/types/src/features/GptWebCitation/GptWebCitationMarkdown.d.ts +9 -0
- package/dist/types/src/features/GptWebCitation/GptWebCitationMarkdown.d.ts.map +1 -0
- package/dist/types/src/features/GptWebCitation/GptWebCitationSkeleton.d.ts +3 -0
- package/dist/types/src/features/GptWebCitation/GptWebCitationSkeleton.d.ts.map +1 -0
- package/dist/types/src/features/GptWebCitation/GptWebCitationTest.d.ts +4 -0
- package/dist/types/src/features/GptWebCitation/GptWebCitationTest.d.ts.map +1 -0
- package/dist/types/src/features/GptWebCitation/WebCitationSampleResponse.d.ts +4 -0
- package/dist/types/src/features/GptWebCitation/WebCitationSampleResponse.d.ts.map +1 -0
- package/dist/types/src/features/GptWebCitation/types.d.ts +112 -0
- package/dist/types/src/features/GptWebCitation/types.d.ts.map +1 -0
- package/dist/types/src/features/GptWebCitation/utils/citationData.utils.d.ts +8 -0
- package/dist/types/src/features/GptWebCitation/utils/citationData.utils.d.ts.map +1 -0
- package/dist/types/src/features/InstantLearningCitation/CongnitiveDecisioningComponent.d.ts +5 -0
- package/dist/types/src/features/InstantLearningCitation/CongnitiveDecisioningComponent.d.ts.map +1 -0
- package/dist/types/src/features/InstantLearningCitation/HistorySkeleton.d.ts +10 -0
- package/dist/types/src/features/InstantLearningCitation/HistorySkeleton.d.ts.map +1 -0
- package/dist/types/src/features/InstantLearningCitation/InstantLearningCitation.d.ts +2 -0
- package/dist/types/src/features/InstantLearningCitation/InstantLearningCitation.d.ts.map +1 -0
- package/dist/types/src/features/InstantLearningCitation/InstantLearningCitationComponent.d.ts +10 -0
- package/dist/types/src/features/InstantLearningCitation/InstantLearningCitationComponent.d.ts.map +1 -0
- package/dist/types/src/features/InstantLearningCitation/InstantLearningCitationTest.d.ts +4 -0
- package/dist/types/src/features/InstantLearningCitation/InstantLearningCitationTest.d.ts.map +1 -0
- package/dist/types/src/features/InstantLearningCitation/OverrideTimeline.d.ts +13 -0
- package/dist/types/src/features/InstantLearningCitation/OverrideTimeline.d.ts.map +1 -0
- package/dist/types/src/features/InstantLearningCitation/RuleConditionBlock.d.ts +13 -0
- package/dist/types/src/features/InstantLearningCitation/RuleConditionBlock.d.ts.map +1 -0
- package/dist/types/src/features/InstantLearningCitation/RuleContentComponent.d.ts +5 -0
- package/dist/types/src/features/InstantLearningCitation/RuleContentComponent.d.ts.map +1 -0
- package/dist/types/src/features/InstantLearningCitation/SlashLoader.d.ts +12 -0
- package/dist/types/src/features/InstantLearningCitation/SlashLoader.d.ts.map +1 -0
- package/dist/types/src/features/InstantLearningCitation/types/Types.d.ts +350 -0
- package/dist/types/src/features/InstantLearningCitation/types/Types.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +12 -1
package/README.md
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
- [CognitiveDecisioningCard](#cognitivedecisioningcard) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/CognitiveDecisioning/CognitiveDecisioningReadme.md)
|
|
14
14
|
- [CognitiveCompare](#cognitivecompare) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/new-compare-ui/citation/src/features/CognitiveCompare/README.md)
|
|
15
15
|
- [CognitiveInternalGPTReasoning](#cognitiveinternalgptreasoning) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/CognitiveInternalgptReasoning/README.md)
|
|
16
|
+
- [GptWebCitation](#gptwebcitation)
|
|
16
17
|
- [CodeCitation](#codecitation) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/CodeCitation/README.md)
|
|
17
18
|
- [ChatDrawer](#chatdrawer) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/ChatDrawer/ChatDrawerReadme.md)
|
|
18
19
|
- [CitationsViewer](#citationsviewer) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/CitationViewer/CitationViewerReadme.md)
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
- [VideoCitationContent](#videocitationcontent) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/RequirementAiCitations/RequirementAiCitationsReadme.md)
|
|
22
23
|
- [MarkdownWithImageCitation](#markdownwithimagecitation) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/MarkdownWithImageCitation/README.md)
|
|
23
24
|
- [ScannedDocCitation](#scanneddoccitation) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/ScannedDocCitation/README.md)
|
|
25
|
+
- [InstantLearningCitationComponent](#instantlearningcitationcomponent)
|
|
24
26
|
- [Other Components](#other-components)
|
|
25
27
|
- [Bookemon](#bookemon) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/Bookemon/BookemonReadme.md)
|
|
26
28
|
- [DatagestMon](#datagestmon) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/DatagestMon/README.md)
|
|
@@ -672,6 +674,275 @@ const reasoningData = {
|
|
|
672
674
|
|
|
673
675
|
---
|
|
674
676
|
|
|
677
|
+
## GptWebCitation
|
|
678
|
+
|
|
679
|
+
### Overview
|
|
680
|
+
|
|
681
|
+
`GptWebCitation` is a composite React component that wraps the GPT reasoning citation (`CognitiveInternalgptCoreComponent`) and adds an optional **Web Citation** view. Users can toggle between GPT and web-based citations without modifying the underlying GPT citation code.
|
|
682
|
+
|
|
683
|
+
In **GPT view**, the component renders the standard GPT citation panel with a **View Web Citation** button on the left and the document source link on the right (inside the GPT citation footer). In **Web Citation view**, it shows a web snapshot (image or markdown content) with highlight navigation, relevance score, and a **View GPT Citation** toggle to switch back.
|
|
684
|
+
|
|
685
|
+
### Features
|
|
686
|
+
|
|
687
|
+
- **Dual citation views** — Toggle between GPT reasoning and web-based citation
|
|
688
|
+
- **Non-invasive GPT integration** — Wraps `CognitiveInternalgptCoreComponent` via props; no changes to GPT citation code required
|
|
689
|
+
- **Image & markdown web citations** — Supports screenshot snapshots (`imageMetadata.signed_url`) or HTML/markdown content
|
|
690
|
+
- **Highlight pagination** — Navigate between highlighted anchors in web citation markdown
|
|
691
|
+
- **Relevance score badge** — Auto-extracted from web citation content (e.g. "decision strength is 85%")
|
|
692
|
+
- **Loading skeleton** — Built-in loading state while web citation is being generated
|
|
693
|
+
- **Expand screenshot button** — Optional full-screen image view (`showExpandImageButton`)
|
|
694
|
+
- **Style overrides** — Customize layout via the `styles` prop without editing component internals
|
|
695
|
+
|
|
696
|
+
### Installation / Import
|
|
697
|
+
|
|
698
|
+
```tsx
|
|
699
|
+
import GptWebCitation from '@e-llm-studio/citation/GptWebCitation';
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
### Usage 1: Basic GPT + Web Citation Toggle
|
|
703
|
+
|
|
704
|
+
```tsx
|
|
705
|
+
import { useState } from 'react';
|
|
706
|
+
import { ChevronDown, ChevronUp, Maximize2, X } from 'lucide-react';
|
|
707
|
+
import GptWebCitation from '@e-llm-studio/citation/GptWebCitation';
|
|
708
|
+
|
|
709
|
+
const gptCitation = {
|
|
710
|
+
item: {
|
|
711
|
+
confidence_score: 100,
|
|
712
|
+
text: 'Standard financial data interpretation patterns.',
|
|
713
|
+
dataSource:
|
|
714
|
+
'Title: Commodity Market Analysis\n\n- <highlight>Verify the most recent timestamp in search results.</highlight>\n- Analyze safe-haven asset demand and geopolitical triggers.',
|
|
715
|
+
paraphrase: 'Market interpretation patterns for commodity price reporting.',
|
|
716
|
+
},
|
|
717
|
+
headerTitle: 'Summary Citations',
|
|
718
|
+
index: 0,
|
|
719
|
+
iconsConfig: {
|
|
720
|
+
ChevronDownIcon: ChevronDown,
|
|
721
|
+
ChevronUpIcon: ChevronUp,
|
|
722
|
+
MaximizeIcon: Maximize2,
|
|
723
|
+
CloseIcon: X,
|
|
724
|
+
},
|
|
725
|
+
DocumentTitle: 'Source : Employee Handbook - Code of Conduct Section.pdf',
|
|
726
|
+
previewCallback: () => window.open('/preview/document'),
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
function CitationPanel() {
|
|
730
|
+
const [showWebCitation, setShowWebCitation] = useState(false);
|
|
731
|
+
const [webCitationData, setWebCitationData] = useState(undefined);
|
|
732
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
733
|
+
|
|
734
|
+
const handleGenerateWebCitation = async () => {
|
|
735
|
+
setShowWebCitation(true);
|
|
736
|
+
setIsLoading(true);
|
|
737
|
+
|
|
738
|
+
const response = await fetch('/api/web-citation/generate');
|
|
739
|
+
const data = await response.json();
|
|
740
|
+
|
|
741
|
+
setWebCitationData(data);
|
|
742
|
+
setIsLoading(false);
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
return (
|
|
746
|
+
<GptWebCitation
|
|
747
|
+
gptCitation={gptCitation}
|
|
748
|
+
isWebCitation={true}
|
|
749
|
+
webCitationData={webCitationData}
|
|
750
|
+
showWebCitation={showWebCitation}
|
|
751
|
+
isWebCitationLoading={isLoading}
|
|
752
|
+
onGenerateWebCitation={handleGenerateWebCitation}
|
|
753
|
+
onToggleCitationView={() => setShowWebCitation((prev) => !prev)}
|
|
754
|
+
/>
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
```
|
|
758
|
+
|
|
759
|
+
### Usage 2: Web Citation API Response Shape
|
|
760
|
+
|
|
761
|
+
Pass the API response from your web citation service as `webCitationData`:
|
|
762
|
+
|
|
763
|
+
```tsx
|
|
764
|
+
const webCitationData = {
|
|
765
|
+
citationId: '550e8400-e29b-41d4-a716-446655440061',
|
|
766
|
+
content:
|
|
767
|
+
'The decision strength is 85% because:<ol><li>The exact <a href="https://example.com/article">valuation of SpaceX</a> fluctuates between sources.</li></ol>',
|
|
768
|
+
citationType: 'web',
|
|
769
|
+
citationUrl: 'https://example.com/article',
|
|
770
|
+
imageMetadata: {
|
|
771
|
+
signed_url: 'https://storage.example.com/image_citations/screenshot.png',
|
|
772
|
+
blob_path: 'image_citations/screenshot.png',
|
|
773
|
+
gs_uri: 'gs://bucket/image_citations/screenshot.png',
|
|
774
|
+
},
|
|
775
|
+
};
|
|
776
|
+
|
|
777
|
+
<GptWebCitation
|
|
778
|
+
gptCitation={gptCitation}
|
|
779
|
+
isWebCitation={true}
|
|
780
|
+
webCitationData={webCitationData}
|
|
781
|
+
showWebCitation={true}
|
|
782
|
+
/>
|
|
783
|
+
```
|
|
784
|
+
|
|
785
|
+
When `imageMetadata.signed_url` is present, the component renders a screenshot snapshot. Otherwise it falls back to rendering the `content` field as markdown/HTML.
|
|
786
|
+
|
|
787
|
+
### Usage 3: GPT-Only Mode (No Web Citation)
|
|
788
|
+
|
|
789
|
+
Set `isWebCitation={false}` to render only the GPT citation with no toggle button:
|
|
790
|
+
|
|
791
|
+
```tsx
|
|
792
|
+
<GptWebCitation
|
|
793
|
+
gptCitation={gptCitation}
|
|
794
|
+
isWebCitation={false}
|
|
795
|
+
/>
|
|
796
|
+
```
|
|
797
|
+
|
|
798
|
+
### Usage 4: Hide Expand Buttons
|
|
799
|
+
|
|
800
|
+
Hide the web citation screenshot expand button:
|
|
801
|
+
|
|
802
|
+
```tsx
|
|
803
|
+
<GptWebCitation
|
|
804
|
+
gptCitation={gptCitation}
|
|
805
|
+
isWebCitation={true}
|
|
806
|
+
webCitationData={webCitationData}
|
|
807
|
+
showWebCitation={true}
|
|
808
|
+
showExpandImageButton={false}
|
|
809
|
+
/>
|
|
810
|
+
```
|
|
811
|
+
|
|
812
|
+
Hide the GPT citation header maximize/expand icon:
|
|
813
|
+
|
|
814
|
+
```tsx
|
|
815
|
+
<GptWebCitation
|
|
816
|
+
gptCitation={gptCitation}
|
|
817
|
+
isWebCitation={true}
|
|
818
|
+
showGptMaximizeButton={false}
|
|
819
|
+
/>
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
You can also use `gptCitation.disableMaximize: true` directly on the GPT config.
|
|
823
|
+
|
|
824
|
+
### Usage 5: Custom Styling via Props (matched heights)
|
|
825
|
+
|
|
826
|
+
Layout, borders, and heights for **both GPT and web views** can be controlled from the parent without modifying component internals:
|
|
827
|
+
|
|
828
|
+
```tsx
|
|
829
|
+
const sharedPanelHeight = '520px';
|
|
830
|
+
const sharedContentHeight = '384px';
|
|
831
|
+
|
|
832
|
+
<GptWebCitation
|
|
833
|
+
gptCitation={{
|
|
834
|
+
...gptCitation,
|
|
835
|
+
bodyHeight: sharedContentHeight,
|
|
836
|
+
}}
|
|
837
|
+
isWebCitation={true}
|
|
838
|
+
webCitationData={webCitationData}
|
|
839
|
+
showGptMaximizeButton={true}
|
|
840
|
+
styles={{
|
|
841
|
+
container: { maxWidth: 900 },
|
|
842
|
+
gptCitation: {
|
|
843
|
+
wrapper: {
|
|
844
|
+
minHeight: sharedPanelHeight,
|
|
845
|
+
border: '1px solid #e5e7eb',
|
|
846
|
+
borderRadius: 8,
|
|
847
|
+
},
|
|
848
|
+
footerAction: { left: '1.5rem' },
|
|
849
|
+
toggleButton: { minWidth: 180, fontSize: 14 },
|
|
850
|
+
},
|
|
851
|
+
webCitation: {
|
|
852
|
+
panel: {
|
|
853
|
+
minHeight: sharedPanelHeight,
|
|
854
|
+
border: '1px solid #e5e7eb',
|
|
855
|
+
borderRadius: 8,
|
|
856
|
+
},
|
|
857
|
+
header: { padding: '8px 16px' },
|
|
858
|
+
content: {
|
|
859
|
+
minHeight: sharedContentHeight,
|
|
860
|
+
maxHeight: sharedContentHeight,
|
|
861
|
+
overflowY: 'auto',
|
|
862
|
+
},
|
|
863
|
+
footer: { padding: '8px 16px' },
|
|
864
|
+
toggleButton: { minWidth: 180, fontSize: 14 },
|
|
865
|
+
learnedFrom: { fontSize: 13 },
|
|
866
|
+
},
|
|
867
|
+
}}
|
|
868
|
+
/>
|
|
869
|
+
```
|
|
870
|
+
|
|
871
|
+
#### Style keys
|
|
872
|
+
|
|
873
|
+
| Key | Applies to | Description |
|
|
874
|
+
|-----|------------|-------------|
|
|
875
|
+
| `container` | Both views | Shared outer wrapper (`overlay` in GPT view, merged into web `panel`) |
|
|
876
|
+
| `gptCitation.wrapper` | GPT view | Border card around GPT citation (left/right borders restored here) |
|
|
877
|
+
| `gptCitation.footerAction` | GPT view | View Web Citation button row in footer |
|
|
878
|
+
| `gptCitation.toggleButton` | GPT view | View Web Citation button styles |
|
|
879
|
+
| `webCitation.panel` | Web view | Outer web citation card |
|
|
880
|
+
| `webCitation.header` | Web view | Source label + pagination + score badge row |
|
|
881
|
+
| `webCitation.content` | Web view | Main content area (markdown, image, skeleton) |
|
|
882
|
+
| `webCitation.footer` | Web view | View GPT Citation + Learned From row |
|
|
883
|
+
| `webCitation.toggleButton` | Web view | View GPT Citation button styles |
|
|
884
|
+
| `webCitation.learnedFrom` | Web view | "Learned From …" text styles |
|
|
885
|
+
|
|
886
|
+
Legacy flat keys (`gptCitationWrapper`, `footerAction`, `webCitationButton`) still work for backward compatibility.
|
|
887
|
+
|
|
888
|
+
### Props
|
|
889
|
+
|
|
890
|
+
| Prop | Type | Default | Description |
|
|
891
|
+
|------|------|---------|-------------|
|
|
892
|
+
| `gptCitation` | `IGptCitationConfig` | **required** | GPT citation config passed to `CognitiveInternalgptCoreComponent` (`item`, `headerTitle`, `iconsConfig`, `DocumentTitle`, `previewCallback`, etc.) |
|
|
893
|
+
| `isWebCitation` | `boolean` | `false` | When `true`, enables web citation toggle and web view. When `false`, only GPT citation is shown. |
|
|
894
|
+
| `webCitationData` | `IWebCitationApiResponse` | — | Web citation API response (content, image snapshot, URL) |
|
|
895
|
+
| `showWebCitation` | `boolean` | — | Controls which view is active. Omit for uncontrolled internal state. |
|
|
896
|
+
| `onGenerateWebCitation` | `() => void` | — | Called when user clicks **View Web Citation** and no cached web data exists yet |
|
|
897
|
+
| `isWebCitationLoading` | `boolean` | `false` | Parent-controlled loading state while web citation is being fetched |
|
|
898
|
+
| `onToggleCitationView` | `() => void` | — | Called when user toggles between GPT and web views |
|
|
899
|
+
| `showExpandImageButton` | `boolean` | `true` | Show/hide the full-screen expand button on web citation image snapshots |
|
|
900
|
+
| `showGptMaximizeButton` | `boolean` | `true` | Show/hide the GPT citation header maximize/expand icon (`gptCitation.disableMaximize: true` when `false`) |
|
|
901
|
+
| `topic` | `string` | auto | Override topic label in web citation header (auto-extracted from content if omitted) |
|
|
902
|
+
| `sourceLabel` | `string` | auto | Override header source label in web view |
|
|
903
|
+
| `relevanceScore` | `number` | auto | Override relevance/decision strength score (auto-extracted from content if omitted) |
|
|
904
|
+
| `learnedFrom` | `string` | auto | Site name shown in web citation footer (auto-extracted from `citationUrl` if omitted) |
|
|
905
|
+
| `styles` | `IGptWebCitationStyleOverrides` | — | Style overrides for GPT and web citation views (see Usage 5) |
|
|
906
|
+
|
|
907
|
+
### `IGptCitationConfig` (gptCitation prop)
|
|
908
|
+
|
|
909
|
+
| Field | Type | Description |
|
|
910
|
+
|-------|------|-------------|
|
|
911
|
+
| `item` | `INonReasoningSource` | GPT reasoning data (`dataSource`, `confidence_score`, highlights, etc.) |
|
|
912
|
+
| `headerTitle` | `string` | Panel header title |
|
|
913
|
+
| `index` | `number` | Citation index |
|
|
914
|
+
| `iconsConfig` | `object` | Icon components (`ChevronDownIcon`, `ChevronUpIcon`, `MaximizeIcon`, `CloseIcon`) |
|
|
915
|
+
| `DocumentTitle` | `string` | Source document label shown in the GPT footer (right side) |
|
|
916
|
+
| `previewCallback` | `() => void` | Called when the source link is clicked |
|
|
917
|
+
| `bodyHeight` | `string` | Optional fixed GPT content body height (use with `styles.webCitation.content` to match web view height) |
|
|
918
|
+
| `disableMaximize` | `boolean` | Disable GPT header fullscreen maximize button (or use `showGptMaximizeButton={false}`) |
|
|
919
|
+
|
|
920
|
+
### `IWebCitationApiResponse` (webCitationData prop)
|
|
921
|
+
|
|
922
|
+
| Field | Type | Description |
|
|
923
|
+
|-------|------|-------------|
|
|
924
|
+
| `citationId` | `string` | Unique citation identifier |
|
|
925
|
+
| `content` | `string` | HTML/markdown web citation content |
|
|
926
|
+
| `citationType` | `string` | Citation type (e.g. `"web"`) |
|
|
927
|
+
| `citationUrl` | `string` | Original source URL |
|
|
928
|
+
| `imageMetadata` | `object` | Image snapshot metadata |
|
|
929
|
+
| `imageMetadata.signed_url` | `string` | Signed URL for screenshot image (preferred) |
|
|
930
|
+
| `imageMetadata.gs_uri` | `string` | GCS URI fallback for image |
|
|
931
|
+
| `db` | `object` | Database metadata (`citation_id`, `blob_path`) |
|
|
932
|
+
|
|
933
|
+
### View Behavior
|
|
934
|
+
|
|
935
|
+
| State | What renders |
|
|
936
|
+
|-------|--------------|
|
|
937
|
+
| `isWebCitation={false}` | GPT citation only |
|
|
938
|
+
| `isWebCitation={true}`, `showWebCitation={false}` | GPT citation + **View Web Citation** button (left footer) + source link (right footer) |
|
|
939
|
+
| `isWebCitation={true}`, `showWebCitation={true}` | Web citation panel with snapshot/markdown, highlight nav, and **View GPT Citation** button |
|
|
940
|
+
|
|
941
|
+
### Local Test Component
|
|
942
|
+
|
|
943
|
+
A test harness is available at `src/features/GptWebCitation/GptWebCitationTest.tsx`. Run the citation dev server with `GptWebCitationTest` mounted in `src/index.tsx` to preview the component interactively.
|
|
944
|
+
|
|
945
|
+
---
|
|
675
946
|
|
|
676
947
|
## CodeCitation
|
|
677
948
|
|
|
@@ -1558,6 +1829,75 @@ interface ScannedDocCitationProps {
|
|
|
1558
1829
|
|
|
1559
1830
|
> **Note:** Coordinates in `highlighted_coordinates` are already normalized (0–1) by the backend. No pixel conversion needed before passing them to the component.
|
|
1560
1831
|
|
|
1832
|
+
---
|
|
1833
|
+
|
|
1834
|
+
## InstantLearningCitationComponent
|
|
1835
|
+
|
|
1836
|
+
### Overview
|
|
1837
|
+
|
|
1838
|
+
`InstantLearningCitationComponent` renders markdown content with embedded Instant Learning (IL) citation links. Each citation link is resolved against a provided metadata array and rendered as an expandable inline pill backed by `InstantLearningCitation`. It also supports streaming mode, optional text highlighting, and custom `<details>`/`<summary>` popup patterns.
|
|
1839
|
+
|
|
1840
|
+
### Features
|
|
1841
|
+
|
|
1842
|
+
- **Inline IL citation pills** — Citation links in markdown are replaced with expandable `CitationRenderer` pills that open a full IL citation card
|
|
1843
|
+
- **Streaming support** — Shows a slash-loader animation in place of citation pills while the response is still generating
|
|
1844
|
+
- **Text highlighting** — Highlights a specific phrase in yellow across all rendered text nodes
|
|
1845
|
+
- **Custom `<details>` rendering** — Handles inline, block, and target `<details>` patterns with animated popup regions
|
|
1846
|
+
|
|
1847
|
+
### Usage
|
|
1848
|
+
|
|
1849
|
+
```tsx
|
|
1850
|
+
import InstantLearningCitationComponent from '@e-llm-studio/citation/InstantLearningCitation'
|
|
1851
|
+
|
|
1852
|
+
<InstantLearningCitationComponent
|
|
1853
|
+
value={MARKDOWN_VALUE}
|
|
1854
|
+
citations={CITATIONS_METADATA}
|
|
1855
|
+
onCitationToggle={(keys, adId, isOpen) => console.log({ keys, adId, isOpen })}
|
|
1856
|
+
isStreaming={false}
|
|
1857
|
+
/>
|
|
1858
|
+
```
|
|
1859
|
+
|
|
1860
|
+
Citation links in the markdown must follow this format:
|
|
1861
|
+
```
|
|
1862
|
+
[LinkText](doc_id=learnings_doc?citationNumber=1&citation_type=IL&citationSource=L1)
|
|
1863
|
+
```
|
|
1864
|
+
|
|
1865
|
+
The `citationNumber` value is matched against `customMetaData.citation_number` in the `citations` array. When `citation_type=IL` and `il_learning` data is present, the link renders as an IL pill; otherwise it falls back to a plain anchor.
|
|
1866
|
+
|
|
1867
|
+
**With streaming:**
|
|
1868
|
+
```tsx
|
|
1869
|
+
<InstantLearningCitationComponent
|
|
1870
|
+
value={streamingMarkdown}
|
|
1871
|
+
citations={citations}
|
|
1872
|
+
onCitationToggle={handleToggle}
|
|
1873
|
+
isStreaming={true}
|
|
1874
|
+
/>
|
|
1875
|
+
```
|
|
1876
|
+
|
|
1877
|
+
**With text highlighting:**
|
|
1878
|
+
```tsx
|
|
1879
|
+
<InstantLearningCitationComponent
|
|
1880
|
+
value={markdownContent}
|
|
1881
|
+
citations={citations}
|
|
1882
|
+
onCitationToggle={handleToggle}
|
|
1883
|
+
highlightedText="Testability"
|
|
1884
|
+
/>
|
|
1885
|
+
```
|
|
1886
|
+
|
|
1887
|
+
### Props
|
|
1888
|
+
|
|
1889
|
+
| Prop | Type | Required | Description |
|
|
1890
|
+
|------|------|----------|-------------|
|
|
1891
|
+
| `value` | `string` | ✅ | Markdown content to render, may include IL citation links and `<details>`/`<summary>` tags |
|
|
1892
|
+
| `citations` | `any[]` | ❌ | Citation metadata array; each item matched by `customMetaData.citation_number`. For IL pills, `citation_type` must be `"IL"` and `il_learning` must be present |
|
|
1893
|
+
| `onCitationToggle` | `(keys: string[], adId: string, isOpen: boolean) => void` | ✅ | Fired when a citation pill is opened or closed |
|
|
1894
|
+
| `isStreaming` | `boolean` | ❌ | When `true`, renders an animated slash-loader instead of citation pills (default: `false`) |
|
|
1895
|
+
| `highlightedText` | `string` | ❌ | Phrase to highlight in yellow across all rendered paragraph, list, and code text |
|
|
1896
|
+
| `readOnly` | `boolean` | ❌ | Reserved for future editor integration (default: `false`) |
|
|
1897
|
+
| `height` | `string \| number` | ❌ | Optional container height |
|
|
1898
|
+
|
|
1899
|
+
---
|
|
1900
|
+
|
|
1561
1901
|
# Other Components
|
|
1562
1902
|
## Bookemon
|
|
1563
1903
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as C}from"tslib";import{jsxs as L,jsx as e}from"react/jsx-runtime";var l=function(){return L("svg",C({width:"17",height:"17",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e("mask",C({id:"mask0_4886_55256",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"17",height:"17"},{children:e("path",{d:"M19.0938 0H0V19.0938H19.0938V0Z",fill:"white"})})),L("g",C({mask:"url(#mask0_4886_55256)"},{children:[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5212 5.96804L7.61369 4.70775C7.54726 4.67893 7.47562 4.66406 7.40321 4.66406C7.3308 4.66406 7.25916 4.67893 7.19274 4.70775L0.317889 7.6872C0.22343 7.7283 0.143028 7.79608 0.0865557 7.88222C0.0300834 7.96837 0 8.06914 0 8.17215C0 8.27515 0.0300834 8.37592 0.0865557 8.46208C0.143028 8.54822 0.22343 8.616 0.317889 8.65709L1.26239 9.06642V14.9798C0.98732 15.1015 0.762419 15.3139 0.625371 15.5817C0.488323 15.8494 0.447455 16.1561 0.509616 16.4504C0.571777 16.7446 0.733191 17.0086 0.966805 17.198C1.20043 17.3874 1.49204 17.4908 1.79281 17.4908C2.09357 17.4908 2.38519 17.3874 2.61881 17.198C2.85243 17.0086 3.01384 16.7446 3.076 16.4504C3.13816 16.1561 3.0973 15.8494 2.96024 15.5817C2.8232 15.3139 2.5983 15.1015 2.32323 14.9798V9.5254L7.19168 11.6355C7.2581 11.6643 7.32975 11.6792 7.40215 11.6792C7.47456 11.6792 7.5462 11.6643 7.61263 11.6355L13.4019 9.12738L13.2046 8.52148C13.1293 8.29038 13.0136 8.07405 12.8646 7.88202C12.6048 7.54667 12.2513 7.29603 11.8489 7.16188L10.9461 6.86838L10.8098 6.82405C10.7985 6.82004 10.7873 6.81553 10.7766 6.81058C10.7194 6.78443 10.6691 6.74547 10.6293 6.69671C10.5235 6.5838 10.4578 6.42666 10.4578 6.2529C10.4578 6.15024 10.4806 6.0534 10.5212 5.96804ZM3.12071 11.3129L3.126 13.8302C3.126 13.9445 3.16311 14.057 3.23176 14.1485L3.65483 13.8291C3.23282 14.1485 3.23388 14.1506 3.23388 14.1506L3.236 14.1527L3.24129 14.159L3.25715 14.1802C3.33516 14.2738 3.41851 14.3628 3.50676 14.4468C3.74063 14.668 3.99732 14.8637 4.27251 15.0306C4.95682 15.4526 5.99017 15.8609 7.40321 15.8609C8.81625 15.8609 9.84962 15.4526 10.5371 15.0316C10.8119 14.8638 11.0685 14.6677 11.3028 14.4468C11.3714 14.3823 11.437 14.315 11.4995 14.2447L11.5535 14.1813L11.5694 14.1612L11.5747 14.1538L11.5779 14.1517V14.1496L11.1569 13.8291L11.5789 14.1496C11.6485 14.0573 11.6861 13.9447 11.6857 13.8291V11.3119L8.13829 12.8487C7.90609 12.9492 7.65573 13.0011 7.40269 13.0011C7.14963 13.0011 6.89928 12.9492 6.66707 12.8487L3.12071 11.3129Z",fill:"#1A847C"}),e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.4501 6.61071C12.8123 6.73144 13.1305 6.95703 13.3643 7.25884C13.4985 7.43167 13.6025 7.62636 13.6704 7.83435L13.9744 8.76888C13.9991 8.83899 14.0444 8.90001 14.1043 8.94398C14.1642 8.98795 14.236 9.01278 14.3103 9.01527C14.3846 9.01776 14.4579 8.99782 14.5206 8.95795C14.5834 8.91808 14.6326 8.86025 14.6619 8.79196L14.6708 8.76888L14.9748 7.83435C15.0696 7.55037 15.2292 7.29237 15.441 7.0808C15.6528 6.86923 15.911 6.70991 16.195 6.61547L17.1302 6.31142C17.2021 6.28586 17.2642 6.23871 17.3082 6.17643C17.352 6.11416 17.3756 6.03982 17.3756 5.9636C17.3756 5.88739 17.352 5.81304 17.3082 5.75076C17.2642 5.68849 17.2021 5.64133 17.1302 5.61578L17.1113 5.61103L16.1767 5.30699C15.8925 5.21263 15.6342 5.05335 15.4223 4.84177C15.2104 4.6302 15.0506 4.37214 14.9558 4.08809L14.6524 3.15356C14.6271 3.0813 14.5801 3.01867 14.5176 2.97436C14.4552 2.93006 14.3805 2.90625 14.3039 2.90625C14.2273 2.90625 14.1527 2.93006 14.0903 2.97436C14.0278 3.01867 13.9807 3.0813 13.9554 3.15356L13.6514 4.08809L13.6439 4.11117C13.5488 4.38807 13.3919 4.63967 13.185 4.84686C12.9782 5.05406 12.7269 5.21142 12.4501 5.30699L11.5149 5.61103C11.4431 5.63659 11.381 5.68374 11.3371 5.74601C11.2931 5.80829 11.2695 5.88264 11.2695 5.95885C11.2695 6.03506 11.2931 6.10941 11.3371 6.17168C11.381 6.23396 11.4431 6.28111 11.5149 6.30667L12.4501 6.61071Z",fill:"#1A847C"}),e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.0656 9.67712L18.5854 9.84539L18.5955 9.84815C18.6355 9.86221 18.6703 9.88828 18.6949 9.92299C18.7195 9.9576 18.7326 9.99907 18.7326 10.0415C18.7326 10.084 18.7195 10.1254 18.6949 10.16C18.6703 10.1947 18.6355 10.2208 18.5955 10.2349L18.0765 10.4031C17.9186 10.4558 17.7752 10.5445 17.6575 10.6621C17.5399 10.7797 17.4512 10.9232 17.3986 11.081L17.2296 11.5994C17.2155 11.6395 17.1894 11.6742 17.1548 11.6988C17.1201 11.7233 17.0787 11.7366 17.0362 11.7366C16.9938 11.7366 16.9523 11.7233 16.9177 11.6988C16.8831 11.6742 16.8569 11.6395 16.8429 11.5994L16.6746 11.081C16.6221 10.9227 16.5335 10.7788 16.4157 10.6608C16.2979 10.5428 16.1542 10.4539 15.996 10.4011L15.477 10.2322C15.4369 10.2181 15.4021 10.192 15.3776 10.1574C15.353 10.1227 15.3398 10.0813 15.3398 10.0388C15.3398 9.99631 15.353 9.95493 15.3776 9.92023C15.4021 9.88561 15.4369 9.85945 15.477 9.84539L15.996 9.67712C16.152 9.6232 16.2934 9.53395 16.4092 9.41631C16.525 9.29876 16.6121 9.15603 16.6637 8.99924L16.832 8.48088C16.8461 8.4408 16.8722 8.40607 16.9069 8.38151C16.9415 8.35695 16.9829 8.34375 17.0254 8.34375C17.0678 8.34375 17.1093 8.35695 17.1439 8.38151C17.1785 8.40607 17.2047 8.4408 17.2187 8.48088L17.3884 8.99924C17.4409 9.15701 17.5295 9.30045 17.647 9.41809C17.7646 9.53573 17.9078 9.62444 18.0656 9.67712Z",fill:"#1A847C"})]}))]}))};export{l as CitationIcon};
|
|
2
|
+
//# sourceMappingURL=CitationsIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitationsIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as i}from"tslib";import{jsx as t,jsxs as e}from"react/jsx-runtime";var l=function(l){var r=l.color,C=void 0===r?"#7b39ed":r,n=l.width,o=void 0===n?14:n,d=l.height,h=void 0===d?14:d,s=l.style;return t("span",i({style:i({display:"inline-flex",alignItems:"center",marginLeft:"4px"},s)},{children:e("svg",i({width:o,height:h,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t("path",{d:"M12.9975 5.40607C12.8868 4.86464 12.1132 4.86464 12.0025 5.40607C11.3236 8.72775 8.72775 11.3236 5.40607 12.0025C4.86464 12.1132 4.86464 12.8868 5.40607 12.9975C8.72775 13.6764 11.3236 16.2723 12.0025 19.5939C12.1132 20.1354 12.8868 20.1354 12.9975 19.5939C13.6764 16.2723 16.2723 13.6764 19.5939 12.9975C20.1354 12.8868 20.1354 12.1132 19.5939 12.0025C16.2723 11.3236 13.6764 8.72775 12.9975 5.40607Z",fill:C}),t("path",{d:"M3.7829 0.026852C3.77558 -0.00895077 3.72442 -0.00895062 3.7171 0.0268522C3.33729 1.88509 1.88509 3.33729 0.0268517 3.7171C-0.00895119 3.72442 -0.00895119 3.77558 0.0268517 3.7829C1.88509 4.16271 3.33729 5.61491 3.7171 7.47315C3.72442 7.50895 3.77558 7.50895 3.7829 7.47315C4.16271 5.61491 5.61491 4.16271 7.47315 3.7829C7.50895 3.77558 7.50895 3.72442 7.47315 3.7171C5.61491 3.33729 4.16271 1.88509 3.7829 0.026852Z",fill:C})]}))}))};export{l as CitationLinkSparkleIcon};
|
|
2
|
+
//# sourceMappingURL=CitationsSparkleIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitationsSparkleIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as C}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";var e=function(e){var i=e.className,t=e.size,a=void 0===t?24:t,n=e.color,s=void 0===n?"currentColor":n,d=e["aria-hidden"];return r("svg",C({xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 16 16",fill:"none","aria-hidden":void 0===d||d,className:i},{children:[o("path",{d:"M14.3327 7.9974C14.3327 8.21627 14.2896 8.43299 14.2058 8.6352C14.1221 8.83741 13.9993 9.02114 13.8445 9.17591C13.6898 9.33067 13.506 9.45344 13.3038 9.5372C13.1016 9.62095 12.8849 9.66406 12.666 9.66406C12.4471 9.66406 12.2304 9.62095 12.0282 9.5372C11.826 9.45344 11.6423 9.33067 11.4875 9.17591C11.3327 9.02114 11.21 8.83741 11.1262 8.6352C11.0425 8.43299 10.9993 8.21627 10.9993 7.9974C10.9993 7.55537 11.1749 7.13145 11.4875 6.81888C11.8001 6.50632 12.224 6.33073 12.666 6.33073C13.108 6.33073 13.532 6.50632 13.8445 6.81888C14.1571 7.13145 14.3327 7.55537 14.3327 7.9974ZM8.99935 2.66406C8.99935 2.92928 8.89399 3.18363 8.70646 3.37117C8.51892 3.55871 8.26457 3.66406 7.99935 3.66406C7.73413 3.66406 7.47978 3.55871 7.29224 3.37117C7.10471 3.18363 6.99935 2.92928 6.99935 2.66406C6.99935 2.39885 7.10471 2.14449 7.29224 1.95696C7.47978 1.76942 7.73413 1.66406 7.99935 1.66406C8.26457 1.66406 8.51892 1.76942 8.70646 1.95696C8.89399 2.14449 8.99935 2.39885 8.99935 2.66406ZM8.33268 7.66406C8.33268 7.79538 8.30682 7.92542 8.25656 8.04675C8.20631 8.16807 8.13265 8.27831 8.03979 8.37117C7.94693 8.46403 7.83669 8.53769 7.71537 8.58794C7.59404 8.6382 7.464 8.66406 7.33268 8.66406C7.20136 8.66406 7.07132 8.6382 6.95 8.58794C6.82867 8.53769 6.71843 8.46403 6.62558 8.37117C6.53272 8.27831 6.45906 8.16807 6.4088 8.04675C6.35855 7.92542 6.33268 7.79538 6.33268 7.66406C6.33268 7.39885 6.43804 7.14449 6.62558 6.95696C6.81311 6.76942 7.06747 6.66406 7.33268 6.66406C7.5979 6.66406 7.85225 6.76942 8.03979 6.95696C8.22733 7.144449 8.33268 7.39885 8.33268 7.66406ZM4.33268 4.9974C4.33268 5.35102 4.19221 5.69016 3.94216 5.9402C3.69211 6.19025 3.35297 6.33073 2.99935 6.33073C2.64573 6.33073 2.30659 6.19025 2.05654 5.9402C1.80649 5.69016 1.66602 5.35102 1.66602 4.9974C1.66602 4.64377 1.80649 4.30464 2.05654 4.05459C2.30659 3.80454 2.64573 3.66406 2.99935 3.66406C3.35297 3.66406 3.69211 3.80454 3.94216 4.05459C4.19221 4.30464 4.33268 4.64377 4.33268 4.9974ZM6.99935 12.9974C6.99935 13.351 6.85887 13.6902 6.60882 13.9402C6.35878 14.1903 6.01964 14.3307 5.66602 14.3307C5.31239 14.3307 4.97326 14.1903 4.72321 13.9402C4.47316 13.6902 4.33268 13.351 4.33268 12.9974C4.33268 12.6438 4.47316 12.3046 4.72321 12.0546C4.97326 11.8045 5.31239 11.6641 5.66602 11.6641C6.01964 11.6641 6.35878 11.8045 6.60882 12.0546C6.85887 12.3046 6.99935 12.6438 6.99935 12.9974Z",stroke:s}),o("path",{d:"M9.00065 3.33333L11.6673 6.66667M9.66732 10.3333L7.00065 12.3333M5.33398 11.6667L3.33398 6.33333M4.20932 4.436L7.00065 3M8.33398 7.66667L11.004 7.896M8.00065 3.66667L7.33398 6.66667",stroke:s,strokeWidth:"0.666667",strokeLinecap:"round",strokeLinejoin:"round"})]}))};export{e as default};
|
|
2
|
+
//# sourceMappingURL=NeuralNetworkIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeuralNetworkIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var C=require("tslib"),e=require("react/jsx-runtime");exports.CitationIcon=function(){return e.jsxs("svg",C.__assign({width:"17",height:"17",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("mask",C.__assign({id:"mask0_4886_55256",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"17",height:"17"},{children:e.jsx("path",{d:"M19.0938 0H0V19.0938H19.0938V0Z",fill:"white"})})),e.jsxs("g",C.__assign({mask:"url(#mask0_4886_55256)"},{children:[e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5212 5.96804L7.61369 4.70775C7.54726 4.67893 7.47562 4.66406 7.40321 4.66406C7.3308 4.66406 7.25916 4.67893 7.19274 4.70775L0.317889 7.6872C0.22343 7.7283 0.143028 7.79608 0.0865557 7.88222C0.0300834 7.96837 0 8.06914 0 8.17215C0 8.27515 0.0300834 8.37592 0.0865557 8.46208C0.143028 8.54822 0.22343 8.616 0.317889 8.65709L1.26239 9.06642V14.9798C0.98732 15.1015 0.762419 15.3139 0.625371 15.5817C0.488323 15.8494 0.447455 16.1561 0.509616 16.4504C0.571777 16.7446 0.733191 17.0086 0.966805 17.198C1.20043 17.3874 1.49204 17.4908 1.79281 17.4908C2.09357 17.4908 2.38519 17.3874 2.61881 17.198C2.85243 17.0086 3.01384 16.7446 3.076 16.4504C3.13816 16.1561 3.0973 15.8494 2.96024 15.5817C2.8232 15.3139 2.5983 15.1015 2.32323 14.9798V9.5254L7.19168 11.6355C7.2581 11.6643 7.32975 11.6792 7.40215 11.6792C7.47456 11.6792 7.5462 11.6643 7.61263 11.6355L13.4019 9.12738L13.2046 8.52148C13.1293 8.29038 13.0136 8.07405 12.8646 7.88202C12.6048 7.54667 12.2513 7.29603 11.8489 7.16188L10.9461 6.86838L10.8098 6.82405C10.7985 6.82004 10.7873 6.81553 10.7766 6.81058C10.7194 6.78443 10.6691 6.74547 10.6293 6.69671C10.5235 6.5838 10.4578 6.42666 10.4578 6.2529C10.4578 6.15024 10.4806 6.0534 10.5212 5.96804ZM3.12071 11.3129L3.126 13.8302C3.126 13.9445 3.16311 14.057 3.23176 14.1485L3.65483 13.8291C3.23282 14.1485 3.23388 14.1506 3.23388 14.1506L3.236 14.1527L3.24129 14.159L3.25715 14.1802C3.33516 14.2738 3.41851 14.3628 3.50676 14.4468C3.74063 14.668 3.99732 14.8637 4.27251 15.0306C4.95682 15.4526 5.99017 15.8609 7.40321 15.8609C8.81625 15.8609 9.84962 15.4526 10.5371 15.0316C10.8119 14.8638 11.0685 14.6677 11.3028 14.4468C11.3714 14.3823 11.437 14.315 11.4995 14.2447L11.5535 14.1813L11.5694 14.1612L11.5747 14.1538L11.5779 14.1517V14.1496L11.1569 13.8291L11.5789 14.1496C11.6485 14.0573 11.6861 13.9447 11.6857 13.8291V11.3119L8.13829 12.8487C7.90609 12.9492 7.65573 13.0011 7.40269 13.0011C7.14963 13.0011 6.89928 12.9492 6.66707 12.8487L3.12071 11.3129Z",fill:"#1A847C"}),e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.4501 6.61071C12.8123 6.73144 13.1305 6.95703 13.3643 7.25884C13.4985 7.43167 13.6025 7.62636 13.6704 7.83435L13.9744 8.76888C13.9991 8.83899 14.0444 8.90001 14.1043 8.94398C14.1642 8.98795 14.236 9.01278 14.3103 9.01527C14.3846 9.01776 14.4579 8.99782 14.5206 8.95795C14.5834 8.91808 14.6326 8.86025 14.6619 8.79196L14.6708 8.76888L14.9748 7.83435C15.0696 7.55037 15.2292 7.29237 15.441 7.0808C15.6528 6.86923 15.911 6.70991 16.195 6.61547L17.1302 6.31142C17.2021 6.28586 17.2642 6.23871 17.3082 6.17643C17.352 6.11416 17.3756 6.03982 17.3756 5.9636C17.3756 5.88739 17.352 5.81304 17.3082 5.75076C17.2642 5.68849 17.2021 5.64133 17.1302 5.61578L17.1113 5.61103L16.1767 5.30699C15.8925 5.21263 15.6342 5.05335 15.4223 4.84177C15.2104 4.6302 15.0506 4.37214 14.9558 4.08809L14.6524 3.15356C14.6271 3.0813 14.5801 3.01867 14.5176 2.97436C14.4552 2.93006 14.3805 2.90625 14.3039 2.90625C14.2273 2.90625 14.1527 2.93006 14.0903 2.97436C14.0278 3.01867 13.9807 3.0813 13.9554 3.15356L13.6514 4.08809L13.6439 4.11117C13.5488 4.38807 13.3919 4.63967 13.185 4.84686C12.9782 5.05406 12.7269 5.21142 12.4501 5.30699L11.5149 5.61103C11.4431 5.63659 11.381 5.68374 11.3371 5.74601C11.2931 5.80829 11.2695 5.88264 11.2695 5.95885C11.2695 6.03506 11.2931 6.10941 11.3371 6.17168C11.381 6.23396 11.4431 6.28111 11.5149 6.30667L12.4501 6.61071Z",fill:"#1A847C"}),e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.0656 9.67712L18.5854 9.84539L18.5955 9.84815C18.6355 9.86221 18.6703 9.88828 18.6949 9.92299C18.7195 9.9576 18.7326 9.99907 18.7326 10.0415C18.7326 10.084 18.7195 10.1254 18.6949 10.16C18.6703 10.1947 18.6355 10.2208 18.5955 10.2349L18.0765 10.4031C17.9186 10.4558 17.7752 10.5445 17.6575 10.6621C17.5399 10.7797 17.4512 10.9232 17.3986 11.081L17.2296 11.5994C17.2155 11.6395 17.1894 11.6742 17.1548 11.6988C17.1201 11.7233 17.0787 11.7366 17.0362 11.7366C16.9938 11.7366 16.9523 11.7233 16.9177 11.6988C16.8831 11.6742 16.8569 11.6395 16.8429 11.5994L16.6746 11.081C16.6221 10.9227 16.5335 10.7788 16.4157 10.6608C16.2979 10.5428 16.1542 10.4539 15.996 10.4011L15.477 10.2322C15.4369 10.2181 15.4021 10.192 15.3776 10.1574C15.353 10.1227 15.3398 10.0813 15.3398 10.0388C15.3398 9.99631 15.353 9.95493 15.3776 9.92023C15.4021 9.88561 15.4369 9.85945 15.477 9.84539L15.996 9.67712C16.152 9.6232 16.2934 9.53395 16.4092 9.41631C16.525 9.29876 16.6121 9.15603 16.6637 8.99924L16.832 8.48088C16.8461 8.4408 16.8722 8.40607 16.9069 8.38151C16.9415 8.35695 16.9829 8.34375 17.0254 8.34375C17.0678 8.34375 17.1093 8.35695 17.1439 8.38151C17.1785 8.40607 17.2047 8.4408 17.2187 8.48088L17.3884 8.99924C17.4409 9.15701 17.5295 9.30045 17.647 9.41809C17.7646 9.53573 17.9078 9.62444 18.0656 9.67712Z",fill:"#1A847C"})]}))]}))};
|
|
2
|
+
//# sourceMappingURL=CitationsIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitationsIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime");exports.CitationLinkSparkleIcon=function(s){var t=s.color,n=void 0===t?"#7b39ed":t,r=s.width,l=void 0===r?14:r,C=s.height,a=void 0===C?14:C,o=s.style;return i.jsx("span",e.__assign({style:e.__assign({display:"inline-flex",alignItems:"center",marginLeft:"4px"},o)},{children:i.jsxs("svg",e.__assign({width:l,height:a,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i.jsx("path",{d:"M12.9975 5.40607C12.8868 4.86464 12.1132 4.86464 12.0025 5.40607C11.3236 8.72775 8.72775 11.3236 5.40607 12.0025C4.86464 12.1132 4.86464 12.8868 5.40607 12.9975C8.72775 13.6764 11.3236 16.2723 12.0025 19.5939C12.1132 20.1354 12.8868 20.1354 12.9975 19.5939C13.6764 16.2723 16.2723 13.6764 19.5939 12.9975C20.1354 12.8868 20.1354 12.1132 19.5939 12.0025C16.2723 11.3236 13.6764 8.72775 12.9975 5.40607Z",fill:n}),i.jsx("path",{d:"M3.7829 0.026852C3.77558 -0.00895077 3.72442 -0.00895062 3.7171 0.0268522C3.33729 1.88509 1.88509 3.33729 0.0268517 3.7171C-0.00895119 3.72442 -0.00895119 3.77558 0.0268517 3.7829C1.88509 4.16271 3.33729 5.61491 3.7171 7.47315C3.72442 7.50895 3.77558 7.50895 3.7829 7.47315C4.16271 5.61491 5.61491 4.16271 7.47315 3.7829C7.50895 3.77558 7.50895 3.72442 7.47315 3.7171C5.61491 3.33729 4.16271 1.88509 3.7829 0.026852Z",fill:n})]}))}))};
|
|
2
|
+
//# sourceMappingURL=CitationsSparkleIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitationsSparkleIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var C=require("tslib"),e=require("react/jsx-runtime");exports.default=function(r){var s=r.className,i=r.size,t=void 0===i?24:i,o=r.color,n=void 0===o?"currentColor":o,a=r["aria-hidden"],d=void 0===a||a;return e.jsxs("svg",C.__assign({xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 16 16",fill:"none","aria-hidden":d,className:s},{children:[e.jsx("path",{d:"M14.3327 7.9974C14.3327 8.21627 14.2896 8.43299 14.2058 8.6352C14.1221 8.83741 13.9993 9.02114 13.8445 9.17591C13.6898 9.33067 13.506 9.45344 13.3038 9.5372C13.1016 9.62095 12.8849 9.66406 12.666 9.66406C12.4471 9.66406 12.2304 9.62095 12.0282 9.5372C11.826 9.45344 11.6423 9.33067 11.4875 9.17591C11.3327 9.02114 11.21 8.83741 11.1262 8.6352C11.0425 8.43299 10.9993 8.21627 10.9993 7.9974C10.9993 7.55537 11.1749 7.13145 11.4875 6.81888C11.8001 6.50632 12.224 6.33073 12.666 6.33073C13.108 6.33073 13.532 6.50632 13.8445 6.81888C14.1571 7.13145 14.3327 7.55537 14.3327 7.9974ZM8.99935 2.66406C8.99935 2.92928 8.89399 3.18363 8.70646 3.37117C8.51892 3.55871 8.26457 3.66406 7.99935 3.66406C7.73413 3.66406 7.47978 3.55871 7.29224 3.37117C7.10471 3.18363 6.99935 2.92928 6.99935 2.66406C6.99935 2.39885 7.10471 2.14449 7.29224 1.95696C7.47978 1.76942 7.73413 1.66406 7.99935 1.66406C8.26457 1.66406 8.51892 1.76942 8.70646 1.95696C8.89399 2.14449 8.99935 2.39885 8.99935 2.66406ZM8.33268 7.66406C8.33268 7.79538 8.30682 7.92542 8.25656 8.04675C8.20631 8.16807 8.13265 8.27831 8.03979 8.37117C7.94693 8.46403 7.83669 8.53769 7.71537 8.58794C7.59404 8.6382 7.464 8.66406 7.33268 8.66406C7.20136 8.66406 7.07132 8.6382 6.95 8.58794C6.82867 8.53769 6.71843 8.46403 6.62558 8.37117C6.53272 8.27831 6.45906 8.16807 6.4088 8.04675C6.35855 7.92542 6.33268 7.79538 6.33268 7.66406C6.33268 7.39885 6.43804 7.14449 6.62558 6.95696C6.81311 6.76942 7.06747 6.66406 7.33268 6.66406C7.5979 6.66406 7.85225 6.76942 8.03979 6.95696C8.22733 7.144449 8.33268 7.39885 8.33268 7.66406ZM4.33268 4.9974C4.33268 5.35102 4.19221 5.69016 3.94216 5.9402C3.69211 6.19025 3.35297 6.33073 2.99935 6.33073C2.64573 6.33073 2.30659 6.19025 2.05654 5.9402C1.80649 5.69016 1.66602 5.35102 1.66602 4.9974C1.66602 4.64377 1.80649 4.30464 2.05654 4.05459C2.30659 3.80454 2.64573 3.66406 2.99935 3.66406C3.35297 3.66406 3.69211 3.80454 3.94216 4.05459C4.19221 4.30464 4.33268 4.64377 4.33268 4.9974ZM6.99935 12.9974C6.99935 13.351 6.85887 13.6902 6.60882 13.9402C6.35878 14.1903 6.01964 14.3307 5.66602 14.3307C5.31239 14.3307 4.97326 14.1903 4.72321 13.9402C4.47316 13.6902 4.33268 13.351 4.33268 12.9974C4.33268 12.6438 4.47316 12.3046 4.72321 12.0546C4.97326 11.8045 5.31239 11.6641 5.66602 11.6641C6.01964 11.6641 6.35878 11.8045 6.60882 12.0546C6.85887 12.3046 6.99935 12.6438 6.99935 12.9974Z",stroke:n}),e.jsx("path",{d:"M9.00065 3.33333L11.6673 6.66667M9.66732 10.3333L7.00065 12.3333M5.33398 11.6667L3.33398 6.33333M4.20932 4.436L7.00065 3M8.33398 7.66667L11.004 7.896M8.00065 3.66667L7.33398 6.66667",stroke:n,strokeWidth:"0.666667",strokeLinecap:"round",strokeLinejoin:"round"})]}))};
|
|
2
|
+
//# sourceMappingURL=NeuralNetworkIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeuralNetworkIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),e=require("react/jsx-runtime"),n=require("react"),i=require("./CitationRenderer.module.css.js");exports.default=function(o){var a=o.inLineCitation,s=o.citationTitle,r=o.citationIcon,l=o.chevronUpComponent,c=o.chevronDownComponent,u=o.additionalCallbackForPillButton,d=o.citationComponent,p=o.styles,v=void 0===p?{}:p,f=o.isOpen,_=o.onToggle,m=n.useState(!1),C=m[0],g=m[1],j=void 0!==f?f:C;return e.jsxs(e.Fragment,{children:[e.jsxs("span",t.__assign({onClick:function(t){return function(t){t.preventDefault(),t.stopPropagation(),u&&u(),_?_():void 0===f&&g(function(t){return!t})}(t)},className:i.default.pillButton,style:v.pillButton},{children:[r
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),e=require("react/jsx-runtime"),n=require("react"),i=require("./CitationRenderer.module.css.js");exports.default=function(o){var a=o.inLineCitation,s=o.citationTitle,r=o.citationIcon,l=o.chevronUpComponent,c=o.chevronDownComponent,u=o.additionalCallbackForPillButton,d=o.citationComponent,p=o.styles,v=void 0===p?{}:p,f=o.isOpen,_=o.onToggle,m=n.useState(!1),C=m[0],g=m[1],j=void 0!==f?f:C;return e.jsxs(e.Fragment,{children:[e.jsxs("span",t.__assign({onClick:function(t){return function(t){t.preventDefault(),t.stopPropagation(),u&&u(),_?_():void 0===f&&g(function(t){return!t})}(t)},className:i.default.pillButton,style:v.pillButton},{children:[r&&r,s&&e.jsx("span",t.__assign({style:v.citationTitle},{children:s})),a&&(j?l:c)]})),a&&j&&e.jsx("div",t.__assign({className:i.default.citationWrapper,style:v.citationWrapper},{children:e.jsx("div",t.__assign({className:i.default.citationContent,style:v.citationContent},{children:d}))}))]})};
|
|
2
2
|
//# sourceMappingURL=CitationRenderer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),n=require("react-markdown"),i=require("rehype-raw"),a=require("remark-gfm"),l=require("unist-util-visit"),s=require("./MarkdownRenderer.module.css.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=u(r),c=u(n),d=u(i),p=u(a);function f(){return function(t){l.visit(t,"text",function(t,r,n){var i;if(n&&"string"==typeof t.value&&t.value.includes("✓")){for(var a=t.value.split("✓"),l=[],u=0;u<a.length;u++){var o=a[u];o&&l.push({type:"text",value:o}),u<a.length-1&&l.push({type:"element",tagName:"span",properties:{"data-green-check":"true",className:[s.default.checkGreen]},children:[{type:"text",value:"✓"}]})}return(i=n.children).splice.apply(i,e.__spreadArray([r,1],l,!1)),r+l.length}})}}function m(){return function(e){l.visit(e,"element",function(e,t,r){if(r&&"p"===e.tagName)return e.children&&1===e.children.length&&"element"===e.children[0].type&&"details"===e.children[0].tagName?(r.children.splice(t,1,e.children[0]),t):void 0})}}var v=function(e){var t;return"text"===(null==e?void 0:e.type)&&/^\s*$/.test(null!==(t=e.value)&&void 0!==t?t:"")};function g(){return function(e){l.visit(e,"element",function(e){var t,r;if("details"===e.tagName&&"data-target"in(e.properties||{})){var n=e.children||[],i=0;"element"===(null===(t=n[0])||void 0===t?void 0:t.type)&&"summary"===(null===(r=n[0])||void 0===r?void 0:r.tagName)&&(i=1);var a=n.slice(i),l=a.filter(function(e){return!v(e)});if((1!==l.length||"element"!==l[0].type||!l[0].properties||!("data-popup"in l[0].properties)&&void 0===l[0].properties["data-popup"])&&!l.some(function(e){return"element"===(null==e?void 0:e.type)&&(null==e?void 0:e.properties)&&("data-popup"in e.properties||void 0!==e.properties["data-popup"])})){var s={type:"element",tagName:"div",properties:{"data-popup":""},children:a};e.children=n.slice(0,i).concat([s])}}})}}function h(){return function(e){l.visit(e,"element",function(e){var t,r;if("details"===e.tagName){var n=e.properties||{};if(!("data-inline"in n)&&!("data-target"in n)){var i=e.children||[],a=0;"element"===(null===(t=i[0])||void 0===t?void 0:t.type)&&"summary"===(null===(r=i[0])||void 0===r?void 0:r.tagName)&&(a=1);var l=i.slice(a),s=l.filter(function(e){return!v(e)});if((1!==s.length||"element"!==s[0].type||!s[0].properties||!("data-popup"in s[0].properties)&&void 0===s[0].properties["data-popup"])&&!s.some(function(e){return"element"===(null==e?void 0:e.type)&&(null==e?void 0:e.properties)&&("data-popup"in e.properties||void 0!==e.properties["data-popup"])})){var u={type:"element",tagName:"div",properties:{"data-popup":""},children:l};e.children=i.slice(0,a).concat([u])}}}})}}var y=function(r,n,i){if(!n||!n.trim())return r;var a=new RegExp("(".concat(n.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),")"),"gi");return r.split(a).map(function(r,n){return a.test(r)?t.jsx("mark",e.__assign({className:s.default.customHighlight,id:"customHighlight",style:i},{children:r}),n):r})};exports.default=function(n){var i=n.value,a=n.highlightedText,l=n.scrollTo,u=n.styles,v=void 0===u?{}:u,_=o.default.useRef(null),x=o.default.useRef(null);r.useEffect(function(){if(a){var e=setTimeout(function(){if(x.current){var e=x.current.querySelector("#customHighlight");e&&e.scrollIntoView({behavior:"smooth",block:l||"center"})}},225);return function(){return clearTimeout(e)}}},[a,i]);return t.jsx("div",e.__assign({ref:_,className:s.default.containerWrapper,style:v.containerWrapper},{children:t.jsx("div",e.__assign({className:s.default.mainCard,style:v.mainCard},{children:t.jsx("div",e.__assign({ref:x,className:s.default.scrollArea,style:v.scrollArea},{children:t.jsx(c.default,e.__assign({remarkPlugins:[p.default],rehypePlugins:[d.default,m,f,g,h],components:{details:function(r){r.node;var n=e.__rest(r,["node"]),i=!!n["data-inline"],a=!!n["data-target"],l=s.default.detailsBlock,u=v.detailsBlock;return i&&(l=s.default.detailsInline,u=v.detailsInline),a&&(l=s.default.detailsTarget,u=v.detailsTarget),t.jsxs("details",e.__assign({},n,{className:l,style:e.__assign(e.__assign({},u),n.style),onToggle:function(e){e.stopPropagation(),i&&function(e){var t=e.currentTarget,r=t.getAttribute("data-inline");if(r&&_.current){var n=_.current.querySelector('details[data-target="'.concat(r,'"]'));n&&(n.open=t.open)}}(e)}},{children:[a&&t.jsx("summary",{className:s.default.targetDummySummary,"aria-hidden":"true"}),n.children]}))},summary:function(r){r.node;var n=e.__rest(r,["node"]);return t.jsx("summary",e.__assign({className:s.default.summary,style:v.summary,onClick:function(e){return e.stopPropagation()}},n,{children:n.children}))},ul:function(r){return t.jsx("ul",e.__assign({className:s.default.list,style:v.list},r))},ol:function(r){return t.jsx("ol",e.__assign({className:s.default.list,style:v.list},r))},div:function(r){var n=r.node,i=e.__rest(r,["node"]),a=(null==n?void 0:n.properties)&&"data-popup"in n.properties;return t.jsx("div",e.__assign({},i,{className:a?s.default.popup:i.className,style:a?v.popup:i.style}))},span:function(r){var n,i=r.node,a=e.__rest(r,["node"]);return"true"===(null===(n=null==i?void 0:i.properties)||void 0===n?void 0:n["data-green-check"])?t.jsx("span",e.__assign({},a,{style:v.checkGreen})):t.jsx("span",e.__assign({},a))},p:function(e){var r=e.children,n=Array.isArray(r)?r:[r];return t.jsx("p",{children:n.map(function(e,r){return"string"==typeof e?y(e,a,v.customHighlight):t.jsx(o.default.Fragment,{children:e},r)})})},li:function(r){var n=r.children;return t.jsx("li",e.__assign({style:{marginBottom:"4px"}},{children:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),n=require("react-markdown"),i=require("rehype-raw"),a=require("remark-gfm"),l=require("unist-util-visit"),s=require("./MarkdownRenderer.module.css.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=u(r),c=u(n),d=u(i),p=u(a);function f(){return function(t){l.visit(t,"text",function(t,r,n){var i;if(n&&"string"==typeof t.value&&t.value.includes("✓")){for(var a=t.value.split("✓"),l=[],u=0;u<a.length;u++){var o=a[u];o&&l.push({type:"text",value:o}),u<a.length-1&&l.push({type:"element",tagName:"span",properties:{"data-green-check":"true",className:[s.default.checkGreen]},children:[{type:"text",value:"✓"}]})}return(i=n.children).splice.apply(i,e.__spreadArray([r,1],l,!1)),r+l.length}})}}function m(){return function(e){l.visit(e,"element",function(e,t,r){if(r&&"p"===e.tagName)return e.children&&1===e.children.length&&"element"===e.children[0].type&&"details"===e.children[0].tagName?(r.children.splice(t,1,e.children[0]),t):void 0})}}var v=function(e){var t;return"text"===(null==e?void 0:e.type)&&/^\s*$/.test(null!==(t=e.value)&&void 0!==t?t:"")};function g(){return function(e){l.visit(e,"element",function(e){var t,r;if("details"===e.tagName&&"data-target"in(e.properties||{})){var n=e.children||[],i=0;"element"===(null===(t=n[0])||void 0===t?void 0:t.type)&&"summary"===(null===(r=n[0])||void 0===r?void 0:r.tagName)&&(i=1);var a=n.slice(i),l=a.filter(function(e){return!v(e)});if((1!==l.length||"element"!==l[0].type||!l[0].properties||!("data-popup"in l[0].properties)&&void 0===l[0].properties["data-popup"])&&!l.some(function(e){return"element"===(null==e?void 0:e.type)&&(null==e?void 0:e.properties)&&("data-popup"in e.properties||void 0!==e.properties["data-popup"])})){var s={type:"element",tagName:"div",properties:{"data-popup":""},children:a};e.children=n.slice(0,i).concat([s])}}})}}function h(){return function(e){l.visit(e,"element",function(e){var t,r;if("details"===e.tagName){var n=e.properties||{};if(!("data-inline"in n)&&!("data-target"in n)){var i=e.children||[],a=0;"element"===(null===(t=i[0])||void 0===t?void 0:t.type)&&"summary"===(null===(r=i[0])||void 0===r?void 0:r.tagName)&&(a=1);var l=i.slice(a),s=l.filter(function(e){return!v(e)});if((1!==s.length||"element"!==s[0].type||!s[0].properties||!("data-popup"in s[0].properties)&&void 0===s[0].properties["data-popup"])&&!s.some(function(e){return"element"===(null==e?void 0:e.type)&&(null==e?void 0:e.properties)&&("data-popup"in e.properties||void 0!==e.properties["data-popup"])})){var u={type:"element",tagName:"div",properties:{"data-popup":""},children:l};e.children=i.slice(0,a).concat([u])}}}})}}var y=function(r,n,i){if(!n||!n.trim())return r;var a=new RegExp("(".concat(n.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),")"),"gi");return r.split(a).map(function(r,n){return a.test(r)?t.jsx("mark",e.__assign({className:s.default.customHighlight,id:"customHighlight",style:i},{children:r}),n):r})};exports.default=function(n){var i=n.value,a=n.highlightedText,l=n.scrollTo,u=n.styles,v=void 0===u?{}:u,_=o.default.useRef(null),x=o.default.useRef(null);r.useEffect(function(){if(a){var e=setTimeout(function(){if(x.current){var e=x.current.querySelector("#customHighlight");e&&e.scrollIntoView({behavior:"smooth",block:l||"center"})}},225);return function(){return clearTimeout(e)}}},[a,i]);return t.jsx("div",e.__assign({ref:_,className:s.default.containerWrapper,style:v.containerWrapper},{children:t.jsx("div",e.__assign({className:s.default.mainCard,style:v.mainCard},{children:t.jsx("div",e.__assign({ref:x,className:s.default.scrollArea,style:v.scrollArea},{children:t.jsx(c.default,e.__assign({remarkPlugins:[p.default],rehypePlugins:[d.default,m,f,g,h],components:{details:function(r){r.node;var n=e.__rest(r,["node"]),i=!!n["data-inline"],a=!!n["data-target"],l=s.default.detailsBlock,u=v.detailsBlock;return i&&(l=s.default.detailsInline,u=v.detailsInline),a&&(l=s.default.detailsTarget,u=v.detailsTarget),t.jsxs("details",e.__assign({},n,{className:l,style:e.__assign(e.__assign({},u),n.style),onToggle:function(e){e.stopPropagation(),i&&function(e){var t=e.currentTarget,r=t.getAttribute("data-inline");if(r&&_.current){var n=_.current.querySelector('details[data-target="'.concat(r,'"]'));n&&(n.open=t.open)}}(e)}},{children:[a&&t.jsx("summary",{className:s.default.targetDummySummary,"aria-hidden":"true"}),n.children]}))},summary:function(r){r.node;var n=e.__rest(r,["node"]);return t.jsx("summary",e.__assign({className:s.default.summary,style:v.summary,onClick:function(e){return e.stopPropagation()}},n,{children:n.children}))},ul:function(r){return t.jsx("ul",e.__assign({className:s.default.list,style:v.list},r))},ol:function(r){return t.jsx("ol",e.__assign({className:s.default.list,style:v.list},r))},div:function(r){var n=r.node,i=e.__rest(r,["node"]),a=(null==n?void 0:n.properties)&&"data-popup"in n.properties;return t.jsx("div",e.__assign({},i,{className:a?s.default.popup:i.className,style:a?v.popup:i.style}))},span:function(r){var n,i=r.node,a=e.__rest(r,["node"]);return"true"===(null===(n=null==i?void 0:i.properties)||void 0===n?void 0:n["data-green-check"])?t.jsx("span",e.__assign({},a,{style:v.checkGreen})):t.jsx("span",e.__assign({},a))},p:function(e){var r=e.children,n=Array.isArray(r)?r:[r];return t.jsx("p",{children:n.map(function(e,r){return"string"==typeof e?y(e,a,v.customHighlight):t.jsx(o.default.Fragment,{children:e},r)})})},li:function(r){var n=r.children;try{var i=null==n?[]:Array.isArray(n)?n:[n];return t.jsx("li",e.__assign({style:{marginBottom:"4px"}},{children:null==i?void 0:i.map(function(e,r){return"string"==typeof e?y(e,a,v.customHighlight):t.jsx(o.default.Fragment,{children:e},r)})}))}catch(e){return console.error("Error rendering <li>:",e),t.jsx("li",{children:n})}},code:function(r){var n=r.children,i=e.__rest(r,["children"]);return t.jsx("code",e.__assign({},i,{children:n.map(function(e){return"string"==typeof e?y(e,a,v.customHighlight):e})}))}}},{children:i}))}))}))}))};
|
|
2
2
|
//# sourceMappingURL=MarkdownRenderer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const r=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;r&&e.setAttribute("nonce",r),e.appendChild(document.createTextNode(".MarkdownRenderer-module_containerWrapper__tpDPF{display:flex;gap:16px;height:42vh!important}.MarkdownRenderer-module_mainCard__UA4RV{background-color:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 1px 2px 0 #0000000d;flex:1;height:42vh;padding:20px}.MarkdownRenderer-module_scrollArea__vtj12{height:100%;overflow-y:auto;padding-right:8px}.MarkdownRenderer-module_checkGreen__gcFyY{color:#16a34a!important;display:inline-block;font-weight:500;margin-right:4px;vertical-align:middle}.MarkdownRenderer-module_list__K9Pvu{list-style-type:decimal;margin:4px 0;padding-left:20px}.MarkdownRenderer-module_customHighlight__zse-n{background-color:#fef08a;border-radius:4px;color:#374151;padding:2px 4px}.MarkdownRenderer-module_detailsInline__jjTzb{border-radius:8px;display:inline-block;margin:4px 0;position:relative;vertical-align:middle}.MarkdownRenderer-module_detailsInline__jjTzb>:not(summary){display:none!important}.MarkdownRenderer-module_detailsTarget__Y-duI{display:block;margin:8px 0}.MarkdownRenderer-module_detailsBlock__NfeQe{border-radius:8px;margin:4px 0;position:relative;width:100%}.MarkdownRenderer-module_summary__SpV4s{align-items:center;color:#19213d;cursor:pointer;display:inline-flex;font-weight:500;gap:4px;padding:4px 0;user-select:none}.MarkdownRenderer-module_summary__SpV4s:hover{opacity:.9}.MarkdownRenderer-module_detailsBlock__NfeQe summary::-webkit-details-marker,.MarkdownRenderer-module_detailsInline__jjTzb summary::-webkit-details-marker,.MarkdownRenderer-module_detailsTarget__Y-duI summary::-webkit-details-marker{display:none}.MarkdownRenderer-module_targetDummySummary__aQ8E5{display:none!important}.MarkdownRenderer-module_popup__OhFrR{background:#6d28d91a;border:1px solid #6d28d9;border-radius:10px;box-shadow:0 8px 24px #0000000f;color:#6d28d9;display:block;font-size:12px;line-height:1.35;margin-top:6px;padding:12px;transition:opacity .2s ease,transform .2s ease}.MarkdownRenderer-module_detailsTarget__Y-duI .MarkdownRenderer-module_popup__OhFrR{opacity:0;transform:translateY(-4px)}.MarkdownRenderer-module_detailsTarget__Y-duI[open] .MarkdownRenderer-module_popup__OhFrR{opacity:1;transform:translateY(0)}.MarkdownRenderer-module_popup__OhFrR .MarkdownRenderer-module_popup__OhFrR{background:#0000!important;border:none!important;box-shadow:none!important;color:inherit!important;padding:0!important}"));const d=document.head||document.getElementsByTagName("head")[0]||document.documentElement;d&&d.appendChild(e)}(),exports.default={containerWrapper:"MarkdownRenderer-module_containerWrapper__tpDPF",mainCard:"MarkdownRenderer-module_mainCard__UA4RV",scrollArea:"MarkdownRenderer-module_scrollArea__vtj12",checkGreen:"MarkdownRenderer-module_checkGreen__gcFyY",list:"MarkdownRenderer-module_list__K9Pvu",customHighlight:"MarkdownRenderer-module_customHighlight__zse-n",detailsInline:"MarkdownRenderer-module_detailsInline__jjTzb",detailsTarget:"MarkdownRenderer-module_detailsTarget__Y-duI",detailsBlock:"MarkdownRenderer-module_detailsBlock__NfeQe",summary:"MarkdownRenderer-module_summary__SpV4s",targetDummySummary:"MarkdownRenderer-module_targetDummySummary__aQ8E5",popup:"MarkdownRenderer-module_popup__OhFrR"};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const r=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;r&&e.setAttribute("nonce",r),e.appendChild(document.createTextNode(".MarkdownRenderer-module_containerWrapper__tpDPF{display:flex;gap:16px;height:42vh!important}.MarkdownRenderer-module_mainCard__UA4RV{background-color:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 1px 2px 0 #0000000d;flex:1;height:42vh;padding:20px}.MarkdownRenderer-module_scrollArea__vtj12{height:100%;overflow-y:auto;padding-right:8px}.MarkdownRenderer-module_scrollArea__vtj12 h2{font-size:1.5em;font-weight:700}.MarkdownRenderer-module_scrollArea__vtj12 h3{font-size:1.17em;font-weight:700}.MarkdownRenderer-module_checkGreen__gcFyY{color:#16a34a!important;display:inline-block;font-weight:500;margin-right:4px;vertical-align:middle}.MarkdownRenderer-module_list__K9Pvu{list-style-type:decimal;margin:4px 0;padding-left:20px}.MarkdownRenderer-module_customHighlight__zse-n{background-color:#fef08a;border-radius:4px;color:#374151;padding:2px 4px}.MarkdownRenderer-module_detailsInline__jjTzb{border-radius:8px;display:inline-block;margin:4px 0;position:relative;vertical-align:middle}.MarkdownRenderer-module_detailsInline__jjTzb>:not(summary){display:none!important}.MarkdownRenderer-module_detailsTarget__Y-duI{display:block;margin:8px 0}.MarkdownRenderer-module_detailsBlock__NfeQe{border-radius:8px;margin:4px 0;position:relative;width:100%}.MarkdownRenderer-module_summary__SpV4s{align-items:center;color:#19213d;cursor:pointer;display:inline-flex;font-weight:500;gap:4px;padding:4px 0;user-select:none}.MarkdownRenderer-module_summary__SpV4s:hover{opacity:.9}.MarkdownRenderer-module_detailsBlock__NfeQe summary::-webkit-details-marker,.MarkdownRenderer-module_detailsInline__jjTzb summary::-webkit-details-marker,.MarkdownRenderer-module_detailsTarget__Y-duI summary::-webkit-details-marker{display:none}.MarkdownRenderer-module_targetDummySummary__aQ8E5{display:none!important}.MarkdownRenderer-module_popup__OhFrR{background:#6d28d91a;border:1px solid #6d28d9;border-radius:10px;box-shadow:0 8px 24px #0000000f;color:#6d28d9;display:block;font-size:12px;line-height:1.35;margin-top:6px;padding:12px;transition:opacity .2s ease,transform .2s ease}.MarkdownRenderer-module_detailsTarget__Y-duI .MarkdownRenderer-module_popup__OhFrR{opacity:0;transform:translateY(-4px)}.MarkdownRenderer-module_detailsTarget__Y-duI[open] .MarkdownRenderer-module_popup__OhFrR{opacity:1;transform:translateY(0)}.MarkdownRenderer-module_popup__OhFrR .MarkdownRenderer-module_popup__OhFrR{background:#0000!important;border:none!important;box-shadow:none!important;color:inherit!important;padding:0!important}"));const d=document.head||document.getElementsByTagName("head")[0]||document.documentElement;d&&d.appendChild(e)}(),exports.default={containerWrapper:"MarkdownRenderer-module_containerWrapper__tpDPF",mainCard:"MarkdownRenderer-module_mainCard__UA4RV",scrollArea:"MarkdownRenderer-module_scrollArea__vtj12",checkGreen:"MarkdownRenderer-module_checkGreen__gcFyY",list:"MarkdownRenderer-module_list__K9Pvu",customHighlight:"MarkdownRenderer-module_customHighlight__zse-n",detailsInline:"MarkdownRenderer-module_detailsInline__jjTzb",detailsTarget:"MarkdownRenderer-module_detailsTarget__Y-duI",detailsBlock:"MarkdownRenderer-module_detailsBlock__NfeQe",summary:"MarkdownRenderer-module_summary__SpV4s",targetDummySummary:"MarkdownRenderer-module_targetDummySummary__aQ8E5",popup:"MarkdownRenderer-module_popup__OhFrR"};
|
|
2
2
|
//# sourceMappingURL=MarkdownRenderer.module.css.js.map
|