@e-llm-studio/citation 0.0.152 → 0.0.154
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 +145 -0
- package/dist/cjs/features/PdfViewer/PdfStyle.js +1 -1
- package/dist/cjs/features/PdfViewer/PdfToolbar.js +1 -1
- package/dist/cjs/features/PdfViewer/PdfViewer.js +1 -1
- package/dist/cjs/features/PdfViewer/usePdfHighlight.js +1 -1
- package/dist/features/PdfViewer/PdfStyle.js +1 -1
- package/dist/features/PdfViewer/PdfToolbar.js +1 -1
- package/dist/features/PdfViewer/PdfViewer.js +1 -1
- package/dist/features/PdfViewer/usePdfHighlight.js +1 -1
- package/dist/types/src/EmailCitationTest.d.ts +3 -0
- package/dist/types/src/EmailCitationTest.d.ts.map +1 -0
- package/dist/types/src/features/EmailCitation/EmailCitation.d.ts +43 -0
- package/dist/types/src/features/EmailCitation/EmailCitation.d.ts.map +1 -0
- package/dist/types/src/features/EmailCitation/components/EmailMetaDropdown.d.ts +10 -0
- package/dist/types/src/features/EmailCitation/components/EmailMetaDropdown.d.ts.map +1 -0
- package/dist/types/src/features/PdfViewer/PdfToolbar.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/PdfViewer.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/usePdfHighlight.d.ts +2 -1
- package/dist/types/src/features/PdfViewer/usePdfHighlight.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
- [BookCitation](#bookcitation) [<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/BookCitation/README.MD)
|
|
11
11
|
- [ChatCitation](#chatcitation) [<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/ChatCitation/ChatCitationReadme.md)
|
|
12
12
|
- [CitationRenderer](#citationrenderer) [<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/CitationRenderer/CitationRendererReadme.md)
|
|
13
|
+
- [EmailCitation](#emailcitation) [<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/EmailCitation/EmailCitation.md)
|
|
13
14
|
- [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
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)
|
|
15
16
|
- [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)
|
|
@@ -1705,6 +1706,150 @@ function App() {
|
|
|
1705
1706
|
|
|
1706
1707
|
---
|
|
1707
1708
|
|
|
1709
|
+
## EmailCitation
|
|
1710
|
+
|
|
1711
|
+
A composable React UI component for rendering email-style citations with rich formatting, attachments, and highlight/quote handling. Part of the `@e-llm-studio/citation` package, this component is designed to display email content (subject, sender, recipients, body, attachments, timestamps) in an expandable, accessible, and customizable way.
|
|
1712
|
+
|
|
1713
|
+
### Overview
|
|
1714
|
+
|
|
1715
|
+
`CitationEmailCard` is a React component that displays email citations with expandable content. It shows core metadata (sender, recipients, subject, date), email body with text highlighting, and attachments. Perfect for surfacing email evidence or correspondence in AI-assisted UIs.
|
|
1716
|
+
|
|
1717
|
+
### Features
|
|
1718
|
+
|
|
1719
|
+
- **Expandable card view** - Click to toggle between pill button and full email display
|
|
1720
|
+
- **Text highlighting** - Highlight specific passages based on citations
|
|
1721
|
+
- **Sender avatar** - Visual indicator with initials
|
|
1722
|
+
- **Recipient display** - Shows to/cc recipients with tooltip for full list
|
|
1723
|
+
- **Attachments section** - Expandable list of email attachments
|
|
1724
|
+
- **Relevance score badge** - Display citation relevance percentage
|
|
1725
|
+
- **Auto-scroll to highlights** - When expanded, scrolls to first highlighted text
|
|
1726
|
+
- **Clean email body rendering** - Removes artifacts and formatting noise
|
|
1727
|
+
- **Customizable icons** - Pass custom icon components to match your design system (no lucide-react dependency required)
|
|
1728
|
+
|
|
1729
|
+
### Installation / Import
|
|
1730
|
+
|
|
1731
|
+
The component is part of the main citation package:
|
|
1732
|
+
|
|
1733
|
+
```bash
|
|
1734
|
+
npm install @e-llm-studio/citation
|
|
1735
|
+
```
|
|
1736
|
+
|
|
1737
|
+
Import:
|
|
1738
|
+
|
|
1739
|
+
```ts
|
|
1740
|
+
import CitationEmailCard from "@e-llm-studio/citation/EmailCitation";
|
|
1741
|
+
```
|
|
1742
|
+
|
|
1743
|
+
### Basic Usage
|
|
1744
|
+
|
|
1745
|
+
The `CitationEmailCard` component exported from `EmailCitation.tsx` expects a small set of props (see Props below). Example usage that matches the component's API:
|
|
1746
|
+
|
|
1747
|
+
```tsx
|
|
1748
|
+
import React from "react";
|
|
1749
|
+
import CitationEmailCard from "@e-llm-studio/citation/EmailCitation";
|
|
1750
|
+
|
|
1751
|
+
const sample = {
|
|
1752
|
+
subject: "Update: Project timeline",
|
|
1753
|
+
from: "alice@example.com",
|
|
1754
|
+
from_name: "Alice Doe",
|
|
1755
|
+
from_email: "alice@example.com",
|
|
1756
|
+
to: "bob@example.com, carol@example.com",
|
|
1757
|
+
cc: null,
|
|
1758
|
+
date: "2026-03-10T14:23:00Z",
|
|
1759
|
+
body: "Hi team,\nPlease see the updated timeline below...",
|
|
1760
|
+
};
|
|
1761
|
+
|
|
1762
|
+
export default function Example() {
|
|
1763
|
+
return (
|
|
1764
|
+
<CitationEmailCard
|
|
1765
|
+
title="Project Update"
|
|
1766
|
+
relevance={87}
|
|
1767
|
+
email={sample}
|
|
1768
|
+
citations={[{ source_field: "subject", cited_text: "timeline" }]}
|
|
1769
|
+
attachments={[{ name: "timeline.pdf", type: "application/pdf" }]}
|
|
1770
|
+
toggleLabel="Source Email"
|
|
1771
|
+
/>
|
|
1772
|
+
);
|
|
1773
|
+
}
|
|
1774
|
+
```
|
|
1775
|
+
|
|
1776
|
+
### Props
|
|
1777
|
+
|
|
1778
|
+
This component exposes the following props (mirror of `CitationEmailCardProps` in source):
|
|
1779
|
+
|
|
1780
|
+
| Prop | Type | Required | Description |
|
|
1781
|
+
|---|---:|:---:|---|
|
|
1782
|
+
| `title` | `string` | No | Optional heading to show instead of the email subject. |
|
|
1783
|
+
| `relevance` | `number` | Yes | Relevance score shown in the header (percent). |
|
|
1784
|
+
| `email` | `CitationEmailData` | Yes | Email data object (see type below). |
|
|
1785
|
+
| `citations` | `CitationItem[]` | No | Array of citation items used to highlight parts of the email. |
|
|
1786
|
+
| `attachments` | `CitationAttachment[]` | No | Attachments to render in the attachments area. |
|
|
1787
|
+
| `toggleLabel` | `string` | No | Label for the trigger button (default: `Source Email`). |
|
|
1788
|
+
| `mailIcon` | `ReactNode` | No | Custom icon for the mail/toggle button (default: lucide Mail icon). |
|
|
1789
|
+
| `chevronUpIcon` | `ReactNode` | No | Custom icon for expand state (default: lucide ChevronUp icon). |
|
|
1790
|
+
| `chevronDownIcon` | `ReactNode` | No | Custom icon for collapse state (default: lucide ChevronDown icon). |
|
|
1791
|
+
| `paperclipIcon` | `ReactNode` | No | Custom icon for attachments button (default: lucide Paperclip icon). |
|
|
1792
|
+
| `fileTextIcon` | `ReactNode` | No | Custom icon for attachment files (default: lucide FileText icon with color). |
|
|
1793
|
+
| `downloadIcon` | `ReactNode` | No | Custom icon for download action (default: lucide Download icon). |
|
|
1794
|
+
|
|
1795
|
+
### Types (shape)
|
|
1796
|
+
|
|
1797
|
+
```ts
|
|
1798
|
+
// Attachment
|
|
1799
|
+
type CitationAttachment = { name: string; type?: string };
|
|
1800
|
+
|
|
1801
|
+
// Citation item (used to compute highlights)
|
|
1802
|
+
type CitationItem = { source_field: string; cited_text: string | string[] };
|
|
1803
|
+
|
|
1804
|
+
// Email data consumed by the component
|
|
1805
|
+
type CitationEmailData = {
|
|
1806
|
+
subject: string;
|
|
1807
|
+
from: string;
|
|
1808
|
+
from_name?: string;
|
|
1809
|
+
from_email: string;
|
|
1810
|
+
to: string; // comma separated list
|
|
1811
|
+
cc?: string | null;
|
|
1812
|
+
date: string; // ISO timestamp
|
|
1813
|
+
body: string; // plain text or HTML
|
|
1814
|
+
};
|
|
1815
|
+
```
|
|
1816
|
+
|
|
1817
|
+
### Advanced Usage: Custom Icons
|
|
1818
|
+
|
|
1819
|
+
If you're not using lucide-react or want to match your design system, pass custom icon components:
|
|
1820
|
+
|
|
1821
|
+
```tsx
|
|
1822
|
+
import React from "react";
|
|
1823
|
+
import CitationEmailCard from "@e-llm-studio/citation/EmailCitation";
|
|
1824
|
+
import { FaEnvelope, FaChevronUp, FaChevronDown, FaPaperclip, FaFile, FaDownload } from "react-icons/fa";
|
|
1825
|
+
|
|
1826
|
+
export default function CustomIconExample() {
|
|
1827
|
+
return (
|
|
1828
|
+
<CitationEmailCard
|
|
1829
|
+
title="Project Update"
|
|
1830
|
+
relevance={87}
|
|
1831
|
+
email={sample}
|
|
1832
|
+
// Pass your custom icons here
|
|
1833
|
+
mailIcon={<FaEnvelope size={14} color="#3B4EE8" />}
|
|
1834
|
+
chevronUpIcon={<FaChevronUp size={14} />}
|
|
1835
|
+
chevronDownIcon={<FaChevronDown size={14} />}
|
|
1836
|
+
paperclipIcon={<FaPaperclip size={14} />}
|
|
1837
|
+
fileTextIcon={<FaFile size={16} color="#B42318" />}
|
|
1838
|
+
downloadIcon={<FaDownload size={16} />}
|
|
1839
|
+
/>
|
|
1840
|
+
);
|
|
1841
|
+
}
|
|
1842
|
+
```
|
|
1843
|
+
|
|
1844
|
+
### Notes
|
|
1845
|
+
|
|
1846
|
+
- **Highlighting**: Provide `citations` with `source_field` values matching email fields ("subject", "to", "from", "body", "cc") to automatically highlight those passages.
|
|
1847
|
+
- **Date formatting**: Uses `Intl.DateTimeFormat` with US locale; customize via component modification if needed.
|
|
1848
|
+
- **Email body cleaning**: The component automatically strips artifacts, page numbers, and excessive whitespace from email bodies.
|
|
1849
|
+
- **Icon flexibility**: The component comes with lucide-react icons as defaults but is fully customizable. You can pass your own icons (Material-UI, Font Awesome, custom SVGs, etc.) via icon props to seamlessly integrate with your design system.
|
|
1850
|
+
|
|
1851
|
+
---
|
|
1852
|
+
|
|
1708
1853
|
## Development & Contribution
|
|
1709
1854
|
|
|
1710
1855
|
Contributions are welcome! This guide walks you through making changes to the citation library.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.pdfStyles={pdfViewer:{borderRadius:"12px",padding:"16px",width:"100%",height:"100%"},card:{border:"2px solid #E5E7EB",backgroundColor:"#FFFFFF",borderRadius:"12px",width:"100%"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative"},title:{fontSize:"14px",fontWeight:600,color:"#60A3F8",fontFamily:'Roboto, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif'},toolbar:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},button:{border:"1px solid #DFE5EC",borderRadius:"6px",padding:"4px 8px",fontSize:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.pdfStyles={pdfViewer:{borderRadius:"12px",padding:"16px",width:"100%",height:"100%"},card:{border:"2px solid #E5E7EB",backgroundColor:"#FFFFFF",borderRadius:"12px",width:"100%"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative"},title:{fontSize:"14px",fontWeight:600,color:"#60A3F8",fontFamily:'Roboto, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif'},toolbar:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},button:{border:"1px solid #DFE5EC",borderRadius:"6px",padding:"4px 8px",fontSize:"12px",cursor:"pointer",backgroundColor:"#FFFFFF"},buttonDisabled:{opacity:.4,cursor:"not-allowed"},counter:{fontSize:"13px",color:"#64748B",margin:"0 6px"},viewerWrapper:{height:"30rem",overflow:"auto",display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid #DEE4EB",borderRadius:"8px"},emptyState:{fontSize:"14px",color:"#EF4444"},pdfConatiner:{height:"100%",overflow:"auto",display:"flex",justifyContent:"center",alignItems:"center"}};
|
|
2
2
|
//# sourceMappingURL=PdfStyle.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),s=require("./PdfStyle.js"),t=require("../../assests/svg/PdfViewerIcons.js");exports.default=function(i){i.highlightIndex;var o=i.totalHighlights,l=i.controls,r=i.currentPosition,a=i.pdfName,d=i.onClose,c=i.pdfUrl,u=i.viewerRef,x=i.customStyles,g=i.customClasses,h=i.customIcons,p=l.ZoomInButton,f=l.ZoomOutButton,_=l.ZoomPopover,m=l.goToPrevious,j=l.goToNext,v=(null==g?void 0:g.actionButton)||"p-1 hover:bg-gray-200 rounded-md transition-colors";return n.jsxs("div",e.__assign({className:(null==g?void 0:g.header)||"flex items-center justify-between mb-3 bg-[#FAFAFA] border-b border-gray-100 rounded-t-xl",style:e.__assign(e.__assign({},s.pdfStyles.header),null==x?void 0:x.header)},{children:[n.jsxs("div",e.__assign({className:"flex items-center gap-3 min-w-0 flex-1"},{children:[n.jsx("div",e.__assign({style:e.__assign(e.__assign({},{borderRadius:"21px",border:"6px solid #E8F3FF",background:"#D5E8FF",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",boxSizing:"content-box"}),null==x?void 0:x.pdfIconWrapper)},{children:(null==h?void 0:h.pdfIcon)||n.jsx(t.DefaultPdfIcon,{})})),n.jsx("span",e.__assign({className:(null==g?void 0:g.pdfName)||"text-gray-800 text-sm truncate",style:e.__assign({fontWeight:500},null==x?void 0:x.pdfName)},{children:a}))]})),n.jsxs("div",e.__assign({className:"flex items-center gap-4 text-gray-600 flex-shrink-0"},{children:[n.jsxs("div",e.__assign({className:"flex items-center gap-1"},{children:[n.jsx(f,{}),n.jsx("div",e.__assign({className:"text-sm font-medium w-14 text-center"},{children:n.jsx(_,{})})),n.jsx(p,{})]})),!!o&&n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsxs("span",e.__assign({style:{fontSize:"14px",color:"#475467",fontWeight:500,lineHeight:1}},{children:[r," of ",o]})),n.jsx("button",e.__assign({style:{background:"none",border:"none",cursor:r<=1?"not-allowed":"pointer",padding:"2px 4px",color:r<=1?"#D0D5DD":"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px"},onClick:m,disabled:r<=1},{children:n.jsx("svg",e.__assign({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},{children:n.jsx("path",{d:"M2 8L6 4L10 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))})),n.jsx("button",e.__assign({style:{background:"none",border:"none",cursor:r===o?"not-allowed":"pointer",padding:"2px 4px",color:r===o?"#D0D5DD":"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px"},onClick:j,disabled:r===o},{children:n.jsx("svg",e.__assign({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},{children:n.jsx("path",{d:"M2 4L6 8L10 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))}))]})),n.jsx("div",{className:"w-px h-5 bg-gray-300 mx-1"}),n.jsxs("div",e.__assign({className:"flex items-center gap-2"},{children:[n.jsx("button",e.__assign({onClick:function(){var e=null==u?void 0:u.current;e&&(document.fullscreenElement?document.exitFullscreen():e.requestFullscreen().catch(function(e){console.error("Error attempting to enable fullscreen: ".concat(e.message))}))},className:v,title:"Full Screen"},{children:(null==h?void 0:h.fullScreenIcon)||n.jsx(t.DefaultFullScreenIcon,{})})),c&&n.jsx("a",e.__assign({href:c,target:"_blank",rel:"noopener noreferrer",className:v,title:"Open in new tab"},{children:(null==h?void 0:h.downloadIcon)||n.jsx(t.DefaultDownloadIcon,{})})),d&&n.jsx("button",e.__assign({onClick:d,className:"".concat(v," ml-1"),title:"Close"},{children:(null==h?void 0:h.closeIcon)||n.jsx(t.DefaultCloseIcon,{})}))]}))]}))]}))};
|
|
2
2
|
//# sourceMappingURL=PdfToolbar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("@react-pdf-viewer/core"),r=require("./PdfContainer.js"),s=require("./PdfToolbar.js"),o=require("./PdfStyle.js"),l=require("./usePdfHighlight.js");require("@react-pdf-viewer/zoom/lib/styles/index.css"),require("@react-pdf-viewer/page-navigation/lib/styles/index.css"),require("@react-pdf-viewer/core/lib/styles/index.css"),require("@react-pdf-viewer/search/lib/styles/index.css");var n=require("react");exports.default=function(a){var u=a.pdfUrl,c=a.highlightText,d=a.highlightPages,g=a.jumpToPageValue,f=void 0===g?0:g,h=a.pdfName,p=a.onClose,v=a.customStyles,m=a.customClasses,y=a.customIcons,_=n.useRef(null),x=l.PdfHighlightControls(c,d,_),q=x.highlightIndex,T=x.cursorIndex,b=x.setCursorIndex,j=x.orderedKeys,S=x.totalHighlights,P=x.getValidPosition,C=x.tryJump,w=x.jumpToPage,A=x.zoomTo,H=x.plugins,I=x.controls,F=x.hideNonTargetHighlights,R=P(T);if(!u)return t.jsx("div",e.__assign({style:e.__assign(e.__assign({},o.pdfStyles.emptyState),null==v?void 0:v.emptyState)},{children:"PDF is not available for this selection"}));return t.jsxs("div",e.__assign({ref:_,className:(null==m?void 0:m.pdfViewerWrapper)||"",style:e.__assign(e.__assign(e.__assign({},o.pdfStyles.pdfViewer),{display:"flex",flexDirection:"column",height:"100%",width:"100%",backgroundColor:"#FAFAFA"}),null==v?void 0:v.pdfViewer)},{children:[t.jsx(s.default,{highlightIndex:q,totalHighlights:S,controls:I,currentPosition:R,pdfName:h,onClose:p,pdfUrl:u,viewerRef:_,customStyles:v,customClasses:m,customIcons:y}),t.jsx(r.default,{pdfUrl:u,plugins:H,customStyles:v,onLoad:function(){if(A(i.SpecialZoomLevel.ActualSize),f>0){var e=f-1,t=j[e],r=d[t];b(e),r>0&&(1===Object.keys(d).length&&setTimeout(function(){return F(r-1)},1e3),w(r-1))}requestAnimationFrame(function(){C(),function(){if(_.current){var e=f-1,t=j[e],i=d[t],r=i>0?i-1:0,s={};j.forEach(function(e,t){var i=d[e];i>0&&(s[i]||(s[i]=[]),s[i].push(t))});var o=(s[i]||[]).indexOf(e),l=0,n=function(){var e,t;if(!(++l>40)){var i=null===(e=_.current)||void 0===e?void 0:e.querySelector(".rpv-core__inner-pages");if(i){var s=null===(t=_.current)||void 0===t?void 0:t.querySelector('[data-testid="core__page-layer-'.concat(r,'"]'));if(s){var a=i.getBoundingClientRect(),u=s.getBoundingClientRect();if(u.top<a.bottom&&u.bottom>a.top){var c=s.querySelectorAll(".rpv-search__highlight")[o];if(c){var d=c.getBoundingClientRect(),g=i.scrollTop+(d.top-a.top)-i.clientHeight/2+d.height/2;i.scrollTo({top:g,behavior:"smooth"})}else setTimeout(n,100)}else setTimeout(n,100)}else setTimeout(n,100)}else setTimeout(n,100)}};setTimeout(n,500)}}()})}})]}))};
|
|
2
2
|
//# sourceMappingURL=PdfViewer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("@react-pdf-viewer/search"),t=require("@react-pdf-viewer/page-navigation"),o=require("@react-pdf-viewer/zoom");exports.PdfHighlightControls=function(i,n,u){var c=e.useState(0),a=c[0],l=c[1],s=e.useRef(!1),g=e.useState(0),v=g[0],h=g[1],p=Object.keys(n).map(Number).sort(function(e,r){return e-r}),f=Object.values(n).filter(function(e){return e>0}).length,d=function(e){u.current&&u.current.querySelectorAll(".rpv-search__highlights").forEach(function(r){var t=r.getAttribute("data-testid"),o=parseInt((null==t?void 0:t.replace("search__highlights-",""))||"-1");r.querySelectorAll(".rpv-search__highlight").forEach(function(r){r.style.display=o===e?"":"none"})})},m=i.map(function(e){return function(e){return e?e.split(/\n+/).map(function(e){var r=e.trim(),t=(r=r.replace(/^[-•]\s+/,"")).match(/^(\d+(\.\d+)*[.)]?|[a-zA-Z][.)]|\([a-zA-Z0-9]+\)|(i|ii|iii|iv|v|vi|vii|viii|ix|x)[.)]?)\s+/i);return t?r.slice(t[0].length).trim():r}).map(function(e){return e.replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,;:!\u201C\u201D\u2018\u2019]+$/,"").replace(/"$/,"").replace(/^[.,;:!\u201C\u201D\u2018\u2019]+/,"").replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1").replace(/[*_]{1,3}([^*_]+)[*_]{1,3}/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()}).filter(function(e){return e.length>10&&e.split(" ").length>3}):[]}(e)}).flat(),_=r.searchPlugin({keyword:m}),y=t.pageNavigationPlugin(),T=o.zoomPlugin(),q=_.jumpToMatch,P=y.jumpToPage,x=T.zoomTo,b=T.ZoomInButton,j=T.ZoomOutButton,O=T.ZoomPopover,S=function(){if(!s.current)try{q(0),s.current=!0}catch(e){requestAnimationFrame(S)}},Z=function(e,r){if(u.current&&u.current.querySelector(".rpv-core__viewer")){var t=-1,o=function(){var i,n,c=null===(i=u.current)||void 0===i?void 0:i.querySelector(".rpv-core__inner-pages");if(c){if(c.scrollTop!==t)return t=c.scrollTop,void setTimeout(o,100);var a=null===(n=u.current)||void 0===n?void 0:n.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(a){var l=a.querySelectorAll(".rpv-search__highlight")[r];if(l){var s=c.getBoundingClientRect(),g=l.getBoundingClientRect(),v=c.scrollTop+(g.top-s.top)-c.clientHeight/2+g.height/2;c.scrollTo({top:v,behavior:"smooth"})}}}};setTimeout(o,300)}},A=e.useMemo(function(){var e={};return p.forEach(function(r,t){var o=n[r];o>0&&(e[o]||(e[o]=[]),e[o].push(t))}),e},[p,n]),C=function(e){var r=n[p[e]];return(A[r]||[]).indexOf(e)};return{setHighlightIndex:l,highlightIndex:a,cursorIndex:v,setCursorIndex:h,orderedKeys:p,totalHighlights:f,getValidPosition:function(e){for(var r=0,t=0;t<=e;t++){var o=p[t];n[o]>0&&r++}return r},tryJump:S,jumpToPage:P,zoomTo:x,hideNonTargetHighlights:d,plugins:[_,y,T],controls:{ZoomInButton:b,ZoomOutButton:j,ZoomPopover:O,goToNext:function(){for(var e=v+1;e<p.length;e++){var r=p[e];if(n[r]>0){var t=n[r]-1,o=C(e);return h(e),P(n[r]-1),Z(t,o),void(1===Object.keys(n).length&&d(t))}}},goToPrevious:function(){for(var e=v-1;e>=0;e--){var r=p[e];if(n[r]>0){var t=n[r]-1,o=C(e);return h(e),P(n[r]-1),Z(t,o),void(1===Object.keys(n).length&&d(t))}}}}}};
|
|
2
2
|
//# sourceMappingURL=usePdfHighlight.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={pdfViewer:{borderRadius:"12px",padding:"16px",width:"100%",height:"100%"},card:{border:"2px solid #E5E7EB",backgroundColor:"#FFFFFF",borderRadius:"12px",width:"100%"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative"},title:{fontSize:"14px",fontWeight:600,color:"#60A3F8",fontFamily:'Roboto, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif'},toolbar:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},button:{border:"1px solid #DFE5EC",borderRadius:"6px",padding:"4px 8px",fontSize:"
|
|
1
|
+
var e={pdfViewer:{borderRadius:"12px",padding:"16px",width:"100%",height:"100%"},card:{border:"2px solid #E5E7EB",backgroundColor:"#FFFFFF",borderRadius:"12px",width:"100%"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative"},title:{fontSize:"14px",fontWeight:600,color:"#60A3F8",fontFamily:'Roboto, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif'},toolbar:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},button:{border:"1px solid #DFE5EC",borderRadius:"6px",padding:"4px 8px",fontSize:"12px",cursor:"pointer",backgroundColor:"#FFFFFF"},buttonDisabled:{opacity:.4,cursor:"not-allowed"},counter:{fontSize:"13px",color:"#64748B",margin:"0 6px"},viewerWrapper:{height:"30rem",overflow:"auto",display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid #DEE4EB",borderRadius:"8px"},emptyState:{fontSize:"14px",color:"#EF4444"},pdfConatiner:{height:"100%",overflow:"auto",display:"flex",justifyContent:"center",alignItems:"center"}};export{e as pdfStyles};
|
|
2
2
|
//# sourceMappingURL=PdfStyle.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as n,jsx as t}from"react/jsx-runtime";import{pdfStyles as o}from"./PdfStyle.js";import{DefaultPdfIcon as l,DefaultFullScreenIcon as r,DefaultDownloadIcon as i,DefaultCloseIcon as s}from"../../assests/svg/PdfViewerIcons.js";var d=function(d){d.highlightIndex;var c=d.totalHighlights,a=d.controls,u=d.currentPosition,h=d.pdfName,m=d.onClose,p=d.pdfUrl,g=d.viewerRef,f=d.customStyles,x=d.customClasses,v=d.customIcons,b=a.ZoomInButton,y=a.ZoomOutButton,k=a.ZoomPopover,w=a.goToPrevious,N=a.goToNext,I=(null==x?void 0:x.actionButton)||"p-1 hover:bg-gray-200 rounded-md transition-colors";return n("div",e({className:(null==x?void 0:x.header)||"flex items-center justify-between mb-3 bg-[#FAFAFA] border-b border-gray-100 rounded-t-xl",style:e(e({},o.header),null==f?void 0:f.header)},{children:[n("div",e({className:"flex items-center gap-3 min-w-0 flex-1"},{children:[t("div",e({style:e(e({},{borderRadius:"21px",border:"6px solid #E8F3FF",background:"#D5E8FF",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",boxSizing:"content-box"}),null==f?void 0:f.pdfIconWrapper)},{children:(null==v?void 0:v.pdfIcon)||t(l,{})})),t("span",e({className:(null==x?void 0:x.pdfName)||"text-gray-800 text-sm truncate",style:e({fontWeight:500},null==f?void 0:f.pdfName)},{children:h}))]})),n("div",e({className:"flex items-center gap-4 text-gray-600 flex-shrink-0"},{children:[n("div",e({className:"flex items-center gap-1"},{children:[t(y,{}),t("div",e({className:"text-sm font-medium w-14 text-center"},{children:t(k,{})})),t(b,{})]})),!!c&&n("div",e({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n("span",e({style:{fontSize:"14px",color:"#475467",fontWeight:500,lineHeight:1}},{children:[u," of ",c]})),t("button",e({style:{background:"none",border:"none",cursor:u<=1?"not-allowed":"pointer",padding:"2px 4px",color:u<=1?"#D0D5DD":"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px"},onClick:w,disabled:u<=1},{children:t("svg",e({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},{children:t("path",{d:"M2 8L6 4L10 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))})),t("button",e({style:{background:"none",border:"none",cursor:u===c?"not-allowed":"pointer",padding:"2px 4px",color:u===c?"#D0D5DD":"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px"},onClick:N,disabled:u===c},{children:t("svg",e({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},{children:t("path",{d:"M2 4L6 8L10 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))}))]})),t("div",{className:"w-px h-5 bg-gray-300 mx-1"}),n("div",e({className:"flex items-center gap-2"},{children:[t("button",e({onClick:function(){var e=null==g?void 0:g.current;e&&(document.fullscreenElement?document.exitFullscreen():e.requestFullscreen().catch(function(e){console.error("Error attempting to enable fullscreen: ".concat(e.message))}))},className:I,title:"Full Screen"},{children:(null==v?void 0:v.fullScreenIcon)||t(r,{})})),p&&t("a",e({href:p,target:"_blank",rel:"noopener noreferrer",className:I,title:"Open in new tab"},{children:(null==v?void 0:v.downloadIcon)||t(i,{})})),m&&t("button",e({onClick:m,className:"".concat(I," ml-1"),title:"Close"},{children:(null==v?void 0:v.closeIcon)||t(s,{})}))]}))]}))]}))};export{d as default};
|
|
2
2
|
//# sourceMappingURL=PdfToolbar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as t,jsxs as o}from"react/jsx-runtime";import{SpecialZoomLevel as i}from"@react-pdf-viewer/core";import r from"./PdfContainer.js";import s from"./PdfToolbar.js";import{pdfStyles as l}from"./PdfStyle.js";import{PdfHighlightControls as n}from"./usePdfHighlight.js";import"@react-pdf-viewer/zoom/lib/styles/index.css";import"@react-pdf-viewer/page-navigation/lib/styles/index.css";import"@react-pdf-viewer/core/lib/styles/index.css";import"@react-pdf-viewer/search/lib/styles/index.css";import{useRef as a}from"react";var c=function(c){var u=c.pdfUrl,d=c.highlightText,m=c.highlightPages,f=c.jumpToPageValue,p=void 0===f?0:f,g=c.pdfName,h=c.onClose,v=c.customStyles,y=c.customClasses,x=c.customIcons,T=a(null),b=n(d,m,T),w=b.highlightIndex,C=b.cursorIndex,P=b.setCursorIndex,S=b.orderedKeys,j=b.totalHighlights,A=b.getValidPosition,I=b.tryJump,_=b.jumpToPage,F=b.zoomTo,H=b.plugins,V=b.controls,q=b.hideNonTargetHighlights,N=A(C);if(!u)return t("div",e({style:e(e({},l.emptyState),null==v?void 0:v.emptyState)},{children:"PDF is not available for this selection"}));return o("div",e({ref:T,className:(null==y?void 0:y.pdfViewerWrapper)||"",style:e(e(e({},l.pdfViewer),{display:"flex",flexDirection:"column",height:"100%",width:"100%",backgroundColor:"#FAFAFA"}),null==v?void 0:v.pdfViewer)},{children:[t(s,{highlightIndex:w,totalHighlights:j,controls:V,currentPosition:N,pdfName:g,onClose:h,pdfUrl:u,viewerRef:T,customStyles:v,customClasses:y,customIcons:x}),t(r,{pdfUrl:u,plugins:H,customStyles:v,onLoad:function(){if(F(i.ActualSize),p>0){var e=p-1,t=S[e],o=m[t];P(e),o>0&&(1===Object.keys(m).length&&setTimeout(function(){return q(o-1)},1e3),_(o-1))}requestAnimationFrame(function(){I(),function(){if(T.current){var e=p-1,t=S[e],o=m[t],i=o>0?o-1:0,r={};S.forEach(function(e,t){var o=m[e];o>0&&(r[o]||(r[o]=[]),r[o].push(t))});var s=(r[o]||[]).indexOf(e),l=0,n=function(){var e,t;if(!(++l>40)){var o=null===(e=T.current)||void 0===e?void 0:e.querySelector(".rpv-core__inner-pages");if(o){var r=null===(t=T.current)||void 0===t?void 0:t.querySelector('[data-testid="core__page-layer-'.concat(i,'"]'));if(r){var a=o.getBoundingClientRect(),c=r.getBoundingClientRect();if(c.top<a.bottom&&c.bottom>a.top){var u=r.querySelectorAll(".rpv-search__highlight")[s];if(u){var d=u.getBoundingClientRect(),m=o.scrollTop+(d.top-a.top)-o.clientHeight/2+d.height/2;o.scrollTo({top:m,behavior:"smooth"})}else setTimeout(n,100)}else setTimeout(n,100)}else setTimeout(n,100)}else setTimeout(n,100)}};setTimeout(n,500)}}()})}})]}))};export{c as default};
|
|
2
2
|
//# sourceMappingURL=PdfViewer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useState as
|
|
1
|
+
import{useState as r,useRef as e,useMemo as t}from"react";import{searchPlugin as o}from"@react-pdf-viewer/search";import{pageNavigationPlugin as i}from"@react-pdf-viewer/page-navigation";import{zoomPlugin as n}from"@react-pdf-viewer/zoom";var u=function(u,c,a){var l=r(0),p=l[0],v=l[1],g=e(!1),h=r(0),f=h[0],s=h[1],m=Object.keys(c).map(Number).sort(function(r,e){return r-e}),d=Object.values(c).filter(function(r){return r>0}).length,_=function(r){a.current&&a.current.querySelectorAll(".rpv-search__highlights").forEach(function(e){var t=e.getAttribute("data-testid"),o=parseInt((null==t?void 0:t.replace("search__highlights-",""))||"-1");e.querySelectorAll(".rpv-search__highlight").forEach(function(e){e.style.display=o===r?"":"none"})})},y=u.map(function(r){return function(r){return r?r.split(/\n+/).map(function(r){var e=r.trim(),t=(e=e.replace(/^[-•]\s+/,"")).match(/^(\d+(\.\d+)*[.)]?|[a-zA-Z][.)]|\([a-zA-Z0-9]+\)|(i|ii|iii|iv|v|vi|vii|viii|ix|x)[.)]?)\s+/i);return t?e.slice(t[0].length).trim():e}).map(function(r){return r.replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,;:!\u201C\u201D\u2018\u2019]+$/,"").replace(/"$/,"").replace(/^[.,;:!\u201C\u201D\u2018\u2019]+/,"").replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1").replace(/[*_]{1,3}([^*_]+)[*_]{1,3}/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\s+/g," ").trim()}).filter(function(r){return r.length>10&&r.split(" ").length>3}):[]}(r)}).flat(),T=o({keyword:y}),x=i(),Z=n(),b=T.jumpToMatch,j=x.jumpToPage,q=Z.zoomTo,A=Z.ZoomInButton,I=Z.ZoomOutButton,O=Z.ZoomPopover,B=function(){if(!g.current)try{b(0),g.current=!0}catch(r){requestAnimationFrame(B)}},C=function(r,e){if(a.current&&a.current.querySelector(".rpv-core__viewer")){var t=-1,o=function(){var i,n,u=null===(i=a.current)||void 0===i?void 0:i.querySelector(".rpv-core__inner-pages");if(u){if(u.scrollTop!==t)return t=u.scrollTop,void setTimeout(o,100);var c=null===(n=a.current)||void 0===n?void 0:n.querySelector('[data-testid="core__page-layer-'.concat(r,'"]'));if(c){var l=c.querySelectorAll(".rpv-search__highlight")[e];if(l){var p=u.getBoundingClientRect(),v=l.getBoundingClientRect(),g=u.scrollTop+(v.top-p.top)-u.clientHeight/2+v.height/2;u.scrollTo({top:g,behavior:"smooth"})}}}};setTimeout(o,300)}},P=t(function(){var r={};return m.forEach(function(e,t){var o=c[e];o>0&&(r[o]||(r[o]=[]),r[o].push(t))}),r},[m,c]),S=function(r){var e=c[m[r]];return(P[e]||[]).indexOf(r)};return{setHighlightIndex:v,highlightIndex:p,cursorIndex:f,setCursorIndex:s,orderedKeys:m,totalHighlights:d,getValidPosition:function(r){for(var e=0,t=0;t<=r;t++){var o=m[t];c[o]>0&&e++}return e},tryJump:B,jumpToPage:j,zoomTo:q,hideNonTargetHighlights:_,plugins:[T,x,Z],controls:{ZoomInButton:A,ZoomOutButton:I,ZoomPopover:O,goToNext:function(){for(var r=f+1;r<m.length;r++){var e=m[r];if(c[e]>0){var t=c[e]-1,o=S(r);return s(r),j(c[e]-1),C(t,o),void(1===Object.keys(c).length&&_(t))}}},goToPrevious:function(){for(var r=f-1;r>=0;r--){var e=m[r];if(c[e]>0){var t=c[e]-1,o=S(r);return s(r),j(c[e]-1),C(t,o),void(1===Object.keys(c).length&&_(t))}}}}}};export{u as PdfHighlightControls};
|
|
2
2
|
//# sourceMappingURL=usePdfHighlight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmailCitationTest.d.ts","sourceRoot":"","sources":["../../../src/EmailCitationTest.tsx"],"names":[],"mappings":"AAGA,QAAA,MAAM,qBAAqB,+CAqE1B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface CitationAttachment {
|
|
3
|
+
name: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface CitationItem {
|
|
7
|
+
source_field: "from" | "to" | "body" | "subject" | "cc" | string;
|
|
8
|
+
cited_text: string | string[];
|
|
9
|
+
}
|
|
10
|
+
export interface CitationEmailData {
|
|
11
|
+
subject: string;
|
|
12
|
+
from: string;
|
|
13
|
+
from_name?: string;
|
|
14
|
+
from_email: string;
|
|
15
|
+
to: string;
|
|
16
|
+
cc?: string | null;
|
|
17
|
+
date: string;
|
|
18
|
+
body: string;
|
|
19
|
+
}
|
|
20
|
+
export interface CitationEmailCardProps {
|
|
21
|
+
title?: string;
|
|
22
|
+
relevance: number;
|
|
23
|
+
email: CitationEmailData;
|
|
24
|
+
citations?: CitationItem[];
|
|
25
|
+
attachments?: CitationAttachment[];
|
|
26
|
+
toggleLabel?: string;
|
|
27
|
+
mailIcon?: ReactNode;
|
|
28
|
+
chevronUpIcon?: ReactNode;
|
|
29
|
+
chevronDownIcon?: ReactNode;
|
|
30
|
+
paperclipIcon?: ReactNode;
|
|
31
|
+
fileTextIcon?: ReactNode;
|
|
32
|
+
downloadIcon?: ReactNode;
|
|
33
|
+
}
|
|
34
|
+
export declare const formatEmailDate: (dateString: string) => string;
|
|
35
|
+
export declare const HighlightedText: ({ text, highlights, style, firstHighlightRef, }: {
|
|
36
|
+
text: string;
|
|
37
|
+
highlights: string[];
|
|
38
|
+
style?: import("react").CSSProperties | undefined;
|
|
39
|
+
firstHighlightRef?: import("react").RefObject<HTMLElement> | undefined;
|
|
40
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
declare const CitationEmailCard: ({ title, relevance, email, citations, attachments, toggleLabel, mailIcon, chevronUpIcon, chevronDownIcon, paperclipIcon, fileTextIcon, downloadIcon, }: CitationEmailCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export default CitationEmailCard;
|
|
43
|
+
//# sourceMappingURL=EmailCitation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmailCitation.d.ts","sourceRoot":"","sources":["../../../../../src/features/EmailCitation/EmailCitation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AAa/D,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAAC;IACjE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,iBAAiB,CAAC;IACzB,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B;AA2DD,eAAO,MAAM,eAAe,eAAgB,MAAM,WAcjD,CAAC;AAuBF,eAAO,MAAM,eAAe;UAMpB,MAAM;gBACA,MAAM,EAAE;;;6CAmCrB,CAAC;AAKF,QAAA,MAAM,iBAAiB,2JAapB,sBAAsB,4CA+TxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CitationEmailData } from "../EmailCitation";
|
|
2
|
+
export interface EmailMetaDropdownProps {
|
|
3
|
+
email: CitationEmailData;
|
|
4
|
+
toList: string[];
|
|
5
|
+
ccList: string[];
|
|
6
|
+
highlightsFor?: (field: string) => string[];
|
|
7
|
+
}
|
|
8
|
+
declare const EmailMetaDropdown: ({ email, toList, ccList, highlightsFor, }: EmailMetaDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default EmailMetaDropdown;
|
|
10
|
+
//# sourceMappingURL=EmailMetaDropdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmailMetaDropdown.d.ts","sourceRoot":"","sources":["../../../../../../src/features/EmailCitation/components/EmailMetaDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAoC,MAAM,kBAAkB,CAAC;AAGvF,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,iBAAiB,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;CAC7C;AAGD,QAAA,MAAM,iBAAiB,8CAKpB,sBAAsB,4CA4DxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfToolbar.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGnF,KAAK,KAAK,GAAG;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,GAAG,CAAC;IACd,eAAe,EAAE,GAAG,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B,CAAC;AAEF,QAAA,MAAM,UAAU,kJAYb,KAAK,
|
|
1
|
+
{"version":3,"file":"PdfToolbar.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGnF,KAAK,KAAK,GAAG;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,GAAG,CAAC;IACd,eAAe,EAAE,GAAG,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B,CAAC;AAEF,QAAA,MAAM,UAAU,kJAYb,KAAK,4CAgJP,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfViewer.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfViewer.tsx"],"names":[],"mappings":"AAKA,OAAO,6CAA6C,CAAC;AACrD,OAAO,wDAAwD,CAAC;AAChE,OAAO,6CAA6C,CAAC;AACrD,OAAO,+CAA+C,CAAC;AACvD,OAAO,KAAiB,MAAM,OAAO,CAAC;AAEtC,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAChC,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC7B,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACrC,OAAO,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACnC,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,QAAA,MAAM,SAAS,4HAUZ,cAAc,
|
|
1
|
+
{"version":3,"file":"PdfViewer.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfViewer.tsx"],"names":[],"mappings":"AAKA,OAAO,6CAA6C,CAAC;AACrD,OAAO,wDAAwD,CAAC;AAChE,OAAO,6CAA6C,CAAC;AACrD,OAAO,+CAA+C,CAAC;AACvD,OAAO,KAAiB,MAAM,OAAO,CAAC;AAEtC,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAChC,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC7B,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACrC,OAAO,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACnC,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,QAAA,MAAM,SAAS,4HAUZ,cAAc,4CA8KhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const PdfHighlightControls: (highlightText: string[], highlightPages: Record<number, number>) => {
|
|
2
|
+
export declare const PdfHighlightControls: (highlightText: string[], highlightPages: Record<number, number>, viewerRef: React.RefObject<HTMLDivElement | null>) => {
|
|
3
3
|
setHighlightIndex: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
4
4
|
highlightIndex: number;
|
|
5
5
|
cursorIndex: number;
|
|
@@ -10,6 +10,7 @@ export declare const PdfHighlightControls: (highlightText: string[], highlightPa
|
|
|
10
10
|
tryJump: () => void;
|
|
11
11
|
jumpToPage: (pageIndex: number) => void;
|
|
12
12
|
zoomTo: (scale: number | import("@react-pdf-viewer/core").SpecialZoomLevel) => void;
|
|
13
|
+
hideNonTargetHighlights: (targetPage: number) => void;
|
|
13
14
|
plugins: (import("@react-pdf-viewer/page-navigation").PageNavigationPlugin | import("@react-pdf-viewer/zoom").ZoomPlugin | import("@react-pdf-viewer/search").SearchPlugin)[];
|
|
14
15
|
controls: {
|
|
15
16
|
ZoomInButton: () => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePdfHighlight.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/usePdfHighlight.tsx"],"names":[],"mappings":";AAKA,eAAO,MAAM,oBAAoB,kBAChB,MAAM,EAAE,kBACP,OAAO,MAAM,EAAE,MAAM,CAAC;;;;;;;+
|
|
1
|
+
{"version":3,"file":"usePdfHighlight.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/usePdfHighlight.tsx"],"names":[],"mappings":";AAKA,eAAO,MAAM,oBAAoB,kBAChB,MAAM,EAAE,kBACP,OAAO,MAAM,EAAE,MAAM,CAAC,aAC3B,MAAM,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC;;;;;;;+BAqEf,MAAM;;;;0CASK,MAAM;;;;;;;;;CAgLpD,CAAC"}
|