@e-llm-studio/citation 0.0.142 → 0.0.144
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 +97 -0
- package/dist/cjs/features/Bookemon/BookemonContent.js +1 -1
- package/dist/cjs/features/PdfViewer/PdfViewer.js +1 -1
- package/dist/cjs/features/ScannedDocCitation/ScannedDocCitation.js +2 -0
- package/dist/cjs/features/ScannedDocCitation/ScannedDocCitation.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/features/Bookemon/BookemonContent.js +1 -1
- package/dist/features/PdfViewer/PdfViewer.js +1 -1
- package/dist/features/ScannedDocCitation/ScannedDocCitation.js +2 -0
- package/dist/features/ScannedDocCitation/ScannedDocCitation.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/types/src/ScannedDocCitationTest.d.ts +2 -0
- package/dist/types/src/ScannedDocCitationTest.d.ts.map +1 -0
- package/dist/types/src/features/Bookemon/BookemonContent.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/PdfViewer.d.ts.map +1 -1
- package/dist/types/src/features/ScannedDocCitation/ScannedDocCitation.d.ts +24 -0
- package/dist/types/src/features/ScannedDocCitation/ScannedDocCitation.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
- [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)
|
|
17
17
|
- [PdfEditorCitation](#pdfeditorcitation) [<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/PdfEditorCitation/README.md)
|
|
18
18
|
- [RequirementAICitation](#requirementaicitation) [<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)
|
|
19
|
+
- [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)
|
|
19
20
|
- [Other Components](#other-components)
|
|
20
21
|
- [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)
|
|
21
22
|
- [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)
|
|
@@ -863,6 +864,102 @@ npm install react-markdown rehype-raw @react-pdf-viewer/core @material-ui/core
|
|
|
863
864
|
|
|
864
865
|
---
|
|
865
866
|
|
|
867
|
+
## ScannedDocCitation
|
|
868
|
+
|
|
869
|
+
### Overview
|
|
870
|
+
|
|
871
|
+
ScannedDocCitation is a React component for displaying scanned documents with interactive bounding box highlight overlays. It supports multi-page scrolling, highlight navigation via arrows, and a fullscreen view.
|
|
872
|
+
|
|
873
|
+
### Features
|
|
874
|
+
|
|
875
|
+
- **Multi-page scrolling** - All pages stacked vertically inside a fixed-height scrollable container
|
|
876
|
+
- **Bounding box highlights** - Overlay highlights on document pages using normalized pixel coordinates
|
|
877
|
+
- **Highlight navigation** - Jump between highlights using ↑↓ arrows, auto-scrolls to active highlight
|
|
878
|
+
- **Fullscreen modal** - Expand to a larger view for detailed examination
|
|
879
|
+
- **Customizable highlight colors** - Control highlight color, active color, and border color
|
|
880
|
+
- **Pixel coordinate normalization** - Accepts raw pixel coordinates and normalizes using page dimensions
|
|
881
|
+
|
|
882
|
+
### Usage
|
|
883
|
+
```tsx
|
|
884
|
+
import ScannedDocCitation from '@e-llm-studio/citation/ScannedDocCitation'
|
|
885
|
+
|
|
886
|
+
<ScannedDocCitation
|
|
887
|
+
images={[
|
|
888
|
+
'https://example.com/page1.png',
|
|
889
|
+
'https://example.com/page2.png'
|
|
890
|
+
]}
|
|
891
|
+
highlights={[
|
|
892
|
+
{
|
|
893
|
+
pageIndex: 0,
|
|
894
|
+
dimensions: { width: 1275, height: 1650 },
|
|
895
|
+
bboxes: [
|
|
896
|
+
{ xmin: 127, ymin: 132, xmax: 1147, ymax: 297 }
|
|
897
|
+
]
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
pageIndex: 1,
|
|
901
|
+
dimensions: { width: 1275, height: 1650 },
|
|
902
|
+
bboxes: [
|
|
903
|
+
{ xmin: 89, ymin: 742, xmax: 1147, ymax: 891 }
|
|
904
|
+
]
|
|
905
|
+
}
|
|
906
|
+
]}
|
|
907
|
+
height="700px"
|
|
908
|
+
/>
|
|
909
|
+
```
|
|
910
|
+
|
|
911
|
+
**With Custom Highlight Colors**:
|
|
912
|
+
```tsx
|
|
913
|
+
<ScannedDocCitation
|
|
914
|
+
images={imageUrls}
|
|
915
|
+
highlights={highlights}
|
|
916
|
+
highlightColor="rgba(100, 160, 255, 0.3)"
|
|
917
|
+
highlightActiveColor="rgba(100, 160, 255, 0.6)"
|
|
918
|
+
highlightBorderColor="rgba(50, 100, 220, 0.8)"
|
|
919
|
+
/>
|
|
920
|
+
```
|
|
921
|
+
|
|
922
|
+
### Props
|
|
923
|
+
|
|
924
|
+
| Prop Name | Type | Required | Default | Description |
|
|
925
|
+
|-----------|------|----------|---------|-------------|
|
|
926
|
+
| `images` | `string[]` | ✅ | — | Array of image URLs, one per page |
|
|
927
|
+
| `highlights` | `PageHighlight[]` | ✅ | — | Array of highlights with bounding boxes per page |
|
|
928
|
+
| `highlightColor` | `string` | ❌ | `rgba(255,220,0,0.35)` | Background color of inactive highlights |
|
|
929
|
+
| `highlightActiveColor` | `string` | ❌ | `rgba(255,220,0,0.65)` | Background color of the currently active highlight |
|
|
930
|
+
| `highlightBorderColor` | `string` | ❌ | `rgba(200,160,0,0.8)` | Border color of the active highlight |
|
|
931
|
+
| `height` | `string \| number` | ❌ | `700px` | Height of the scrollable container |
|
|
932
|
+
|
|
933
|
+
### Type Definitions
|
|
934
|
+
```typescript
|
|
935
|
+
interface BBox {
|
|
936
|
+
xmin: number; // raw pixel coordinate
|
|
937
|
+
ymin: number;
|
|
938
|
+
xmax: number;
|
|
939
|
+
ymax: number;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
interface PageHighlight {
|
|
943
|
+
pageIndex: number; // zero-based page index (page_no - 1)
|
|
944
|
+
bboxes: BBox[]; // bounding boxes on this page
|
|
945
|
+
dimensions: {
|
|
946
|
+
width: number; // original image width in pixels e.g. 1275
|
|
947
|
+
height: number; // original image height in pixels e.g. 1650
|
|
948
|
+
};
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
interface ScannedDocCitationProps {
|
|
952
|
+
images: string[];
|
|
953
|
+
highlights: PageHighlight[];
|
|
954
|
+
highlightColor?: string;
|
|
955
|
+
highlightActiveColor?: string;
|
|
956
|
+
highlightBorderColor?: string;
|
|
957
|
+
height?: string | number;
|
|
958
|
+
}
|
|
959
|
+
```
|
|
960
|
+
|
|
961
|
+
---
|
|
962
|
+
|
|
866
963
|
|
|
867
964
|
# Other Components
|
|
868
965
|
## Bookemon
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("react"),n=require("react-resizable-panels"),o=require("@mui/material/Accordion"),r=require("@mui/material/AccordionSummary"),a=require("@mui/material/Typography"),l=require("@mui/material/AccordionDetails"),s=require("@mui/material/IconButton"),d=require("./BookDetailsCard/BookDetailsCard.js"),u=require("./BookOverviewCard/BookOverviewCard.js"),c=require("./BookElementsCard/BookElementsCard.js"),h=require("./BookCopyrightsCard/BookCopyrightsCard.js"),g=require("./BookPeopleAwardsCard/BookPeopleAwardsCard.js"),x=require("./BookPreview/BookPreview.js"),p=require("@mui/icons-material/ExpandMore"),f=require("@mui/icons-material/Close");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=_(o),b=_(r),m=_(a),y=_(l),j=_(s),k=_(p),C=_(f),w={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogHeight:{overflow:"hidden",height:"90vh",position:"relative"},dialogContent:{padding:0,backgroundColor:"#FFFFFF"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},S={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},B=function(i){var n=i.header,o=i.subheader,r=i.icon;return t.jsx("div",e.__assign({style:S.wrapper},{children:t.jsxs("div",e.__assign({style:S.inner},{children:[t.jsx("div",e.__assign({style:{marginBottom:"32px"}},{children:t.jsx("div",e.__assign({style:S.iconWrapper},{children:r}))})),t.jsxs("div",{children:[t.jsx("h1",e.__assign({style:S.heading},{children:n})),t.jsx("p",e.__assign({style:S.text},{children:o}))]})]}))}))};exports.BookemonContent=function(o){var r=o.showComingSoon,a=o.onClose,l=o.highlightTerms,s=o.data,p=o.customStyle,f=o.comingSoonData,_=o.isNonHighlightedBlur,S=o.isBlurToggleVisible,D=o.isBookemon,F=o.getHighlightContent,P=o.handleFetchManuscriptElements,q=o.isBookPreview,E=o.isDialog,H=o.defaultElementPages,I=o.citationType,T=o.citationSubTitle,z=i.useState({textToHighLight:"",content:""}),M=z[0],R=z[1],A=i.useState(1),O=A[0],L=A[1],V=i.useState(!1),W=V[0],N=V[1],Q=i.useState("Book Preview"),Y=Q[0],G=Q[1],J=i.useState(70),K=J[0],U=J[1],X=i.useRef(null),Z=i.useState(!1),$=Z[0],ee=Z[1],te=i.useRef(null),ie=i.useRef(null),ne=i.useRef(null),oe=i.useRef(null),re=i.useRef(null),ae=function(t,i,n,o){return void 0===o&&(o=0),e.__awaiter(void 0,void 0,void 0,function(){var r,a,l,s,d,u,c,h,g,x,p,f,_,v,b,m;return e.__generator(this,function(e){switch(e.label){case 0:R({textToHighLight:"",content:""}),ee(!1),N(!0),G(i),e.label=1;case 1:return e.trys.push([1,5,6,7]),n&&0!==n.length?[4,null==F?void 0:F([n[o]])]:(N(!1),U(70),null===(b=X.current)||void 0===b||b.resize(70),[2]);case 2:if(r=e.sent(),a=(null==r?void 0:r.data)||r||[],!Array.isArray(a)||0===a.length)return ee(!0),N(!1),[2];for(s=(l=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(t),d=null,u=0,c=a;u<c.length;u++)if(f=c[u],l(f.normalizedContent||f.htmlContent).includes(s)){d=f;break}if(!d)for(h=s.split(" ").filter(Boolean);h.length>0;){for(g=h.join(" "),x=0,p=a;x<p.length;x++)if(f=p[x],l(f.normalizedContent||f.htmlContent).includes(g)){d=f;break}if(d)break;h.pop()}return _=a.map(function(e){return e.htmlContent}).join("\n"),R({textToHighLight:d?d.htmlContent:"",content:_}),U(50),null===(m=X.current)||void 0===m||m.resize(50),!d&&o+1<n.length?[4,ae(t,i,n,o+1)]:[3,4];case 3:return[2,e.sent()];case 4:return[2];case 5:return v=e.sent(),console.error("Highlight error:",v),ee(!0),[3,7];case 6:return N(!1),[7];case 7:return[2]}})})},le=i.useState(!1),se=le[0],de=le[1],ue=i.useState(!1),ce=ue[0],he=ue[1],ge=i.useState(!1),xe=ge[0],pe=ge[1],fe=i.useState(!1),_e=fe[0],ve=fe[1],be=i.useState(!1),me=be[0],ye=be[1],je=i.useState(!1),ke=je[0],Ce=je[1],we=i.useState(!1),Se=we[0],Be=we[1],De=i.useState(!1),Fe=De[0],Pe=De[1],qe=i.useState(!1),Ee=qe[0],He=qe[1],Ie=i.useState(!1),Te=Ie[0],ze=Ie[1];i.useEffect(function(){se&&Ce(!0),ce&&Be(!0),xe&&Pe(!0),_e&&He(!0),me&&ze(!0)},[se,ce,xe,_e,me]);var Me=s.bookAwards,Re=s.bookCopyRight,Ae=s.bookDetails,Oe=s.bookElements,Le=s.bookOverView,Ve=s.bookCoverImage,We=null==Ae?void 0:Ae.isbn,Ne=null!=a?a:function(){},Qe=void 0!==T&&!!T.length&&["notable_quotes","location_details","notable_characters"].includes(T);return t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},w.dialogContent),E?w.dialogHeight:{})},{children:[!r&&t.jsx("div",e.__assign({style:w.container},{children:t.jsxs(n.PanelGroup,e.__assign({direction:"horizontal"},{children:[t.jsx(n.Panel,e.__assign({order:1,ref:X,defaultSize:K||70},{children:t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},null==w?void 0:w.leftPanel),null==p?void 0:p.leftPanel)},{children:[t.jsx("div",e.__assign({ref:te,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:t.jsxs(v.default,e.__assign({expanded:ke,onChange:function(e,t){return Ce(t)},slotProps:{transition:{onEntered:function(){var e=te.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}},elevation:0,style:w.accordion},{children:[t.jsx(b.default,e.__assign({expandIcon:t.jsx(k.default,{}),style:w.accordionSummary},{children:t.jsx(m.default,e.__assign({style:w.heading},{children:"Book Overview"}))})),t.jsx(y.default,e.__assign({style:w.accordionDetails},{children:Le&&Object.keys(Le).length>0?t.jsx(u.default,{data:Le,highlightTerms:l,onHighlightMatch:de,highlightEnabled:!Qe}):t.jsx("div",e.__assign({style:w.errorState},{children:"No overview data available."}))}))]}))})),t.jsx("div",e.__assign({ref:ie,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:t.jsxs(v.default,e.__assign({elevation:0,style:w.accordion,expanded:Se,onChange:function(e,t){return Be(t)},slotProps:{transition:{onEntered:function(){var e=ie.current;if(e){var t=e.querySelector('[data-highlight="true"]');if(t){t.scrollIntoView({behavior:"smooth",block:"center"});var i=new MutationObserver(function(){var t=e.querySelector('[data-highlight="true"]');t&&t.scrollIntoView({behavior:"auto",block:"center"}),i.disconnect()});i.observe(e,{childList:!0,subtree:!0})}}}}}},{children:[t.jsx(b.default,e.__assign({expandIcon:t.jsx(k.default,{}),style:w.accordionSummary},{children:t.jsx(m.default,e.__assign({style:w.heading},{children:"Book Manuscript Elements"}))})),t.jsx(y.default,e.__assign({style:w.accordionDetails},{children:t.jsx(c.default,{data:Oe,title:(null==Le?void 0:Le.title)||"",handleFetchManuscriptElements:P,BookIsbn:We,updateQuotesToHighLight:ae,highlightTerms:l,onHighlightMatch:he,defaultPages:H,citationType:I,citationSubTitle:T,highlightEnabled:Qe})}))]}))})),t.jsx("div",e.__assign({ref:ne,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:t.jsxs(v.default,e.__assign({expanded:Fe,onChange:function(e,t){return Pe(t)},elevation:0,style:w.accordion,slotProps:{transition:{onEntered:function(){var e=ne.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[t.jsx(b.default,e.__assign({expandIcon:t.jsx(k.default,{}),style:w.accordionSummary},{children:t.jsx(m.default,e.__assign({style:w.heading},{children:"Book Metadata Details"}))})),t.jsx(y.default,e.__assign({style:w.accordionDetails},{children:Ae&&Object.keys(Ae).length>0?t.jsx(d.default,{data:Ae,highlightTerms:l,onHighlightMatch:pe,highlightEnabled:!Qe,citationType:I,citationSubTitle:T}):t.jsx("div",e.__assign({style:w.errorState},{children:"No Book Metadata data available."}))}))]}))})),t.jsx("div",e.__assign({ref:oe,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:t.jsxs(v.default,e.__assign({elevation:0,style:w.accordion,expanded:Ee,onChange:function(e,t){return He(t)},slotProps:{transition:{onEntered:function(){var e=oe.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[t.jsx(b.default,e.__assign({expandIcon:t.jsx(k.default,{}),style:w.accordionSummary},{children:t.jsx(m.default,e.__assign({style:w.heading},{children:"Copyrights & Marketing"}))})),t.jsx(y.default,e.__assign({style:w.accordionDetails},{children:Re&&Object.keys(Re).length>0?t.jsx(h.default,{data:Re,highlightTerms:l,onHighlightMatch:ve,highlightEnabled:!Qe}):t.jsx("div",e.__assign({style:w.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),t.jsx("div",e.__assign({ref:re},{children:t.jsxs(v.default,e.__assign({elevation:0,style:w.accordion,expanded:Te,onChange:function(e,t){return ze(t)},slotProps:{transition:{onEntered:function(){var e=re.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[t.jsx(b.default,e.__assign({expandIcon:t.jsx(k.default,{}),style:w.accordionSummary},{children:t.jsx(m.default,e.__assign({style:w.heading},{children:"People & Awards"}))})),t.jsx(y.default,e.__assign({style:w.accordionDetails},{children:Me&&Object.keys(Me).length>0?t.jsx(g.default,{data:Me,highlightTerms:l,onHighlightMatch:ye,highlightEnabled:!Qe}):t.jsx("div",e.__assign({style:w.errorState},{children:"No People & Awards data available."}))}))]}))}))]}))})),q&&t.jsx(n.PanelResizeHandle,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),q&&t.jsx(n.Panel,e.__assign({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:t.jsx(x.default,{bookOverView:Le,bookCoverImage:Ve,onClose:Ne,clickableElementCategory:Y,quotesToHighLightData:M,updateQuotesToHighLight:ae,citationLoad:W,previewPage:O,setPreviewPage:L,customStyle:p,comingSoonData:f,isNonHighlightedBlur:_,isBlurToggleVisible:S,isBookemon:D,noHtmlContent:$})}))]}))})),r&&t.jsxs("div",e.__assign({style:w.blurOverlay},{children:[t.jsx(j.default,e.__assign({style:w.closeButton,onClick:a,size:"large"},{children:t.jsx(C.default,{})})),t.jsx(B,{header:null==f?void 0:f.header,subheader:null==f?void 0:f.subheader,icon:null==f?void 0:f.icon})]}))]}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("react"),n=require("react-resizable-panels"),o=require("@mui/material/Accordion"),r=require("@mui/material/AccordionSummary"),a=require("@mui/material/Typography"),l=require("@mui/material/AccordionDetails"),s=require("@mui/material/IconButton"),d=require("./BookDetailsCard/BookDetailsCard.js"),u=require("./BookOverviewCard/BookOverviewCard.js"),c=require("./BookElementsCard/BookElementsCard.js"),h=require("./BookCopyrightsCard/BookCopyrightsCard.js"),g=require("./BookPeopleAwardsCard/BookPeopleAwardsCard.js"),x=require("./BookPreview/BookPreview.js"),f=require("@mui/icons-material/ExpandMore"),p=require("@mui/icons-material/Close");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=_(o),m=_(r),b=_(a),y=_(l),j=_(s),k=_(f),C=_(p),w={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogHeight:{overflow:"hidden",height:"90vh",position:"relative"},dialogContent:{padding:0,backgroundColor:"#FFFFFF"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},S={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},B=function(i){var n=i.header,o=i.subheader,r=i.icon;return t.jsx("div",e.__assign({style:S.wrapper},{children:t.jsxs("div",e.__assign({style:S.inner},{children:[t.jsx("div",e.__assign({style:{marginBottom:"32px"}},{children:t.jsx("div",e.__assign({style:S.iconWrapper},{children:r}))})),t.jsxs("div",{children:[t.jsx("h1",e.__assign({style:S.heading},{children:n})),t.jsx("p",e.__assign({style:S.text},{children:o}))]})]}))}))};exports.BookemonContent=function(o){var r=o.showComingSoon,a=o.onClose,l=o.highlightTerms,s=o.data,f=o.customStyle,p=o.comingSoonData,_=o.isNonHighlightedBlur,S=o.isBlurToggleVisible,D=o.isBookemon,F=o.getHighlightContent,P=o.handleFetchManuscriptElements,q=o.isBookPreview,E=o.isDialog,T=o.defaultElementPages,H=o.citationType,I=o.citationSubTitle,z=i.useState({textToHighLight:"",content:""}),M=z[0],R=z[1],A=i.useState(1),O=A[0],L=A[1],V=i.useState(!1),N=V[0],W=V[1],Q=i.useState("Book Preview"),Y=Q[0],G=Q[1],J=i.useState(70),K=J[0],U=J[1],X=i.useRef(null),Z=i.useState(!1),$=Z[0],ee=Z[1],te=i.useRef(null),ie=i.useRef(null),ne=i.useRef(null),oe=i.useRef(null),re=i.useRef(null),ae=function(t,i,n,o){return void 0===o&&(o=0),e.__awaiter(void 0,void 0,void 0,function(){var r,a,l,s,d,u,c,h,g,x,f,p,_,v,m,b;return e.__generator(this,function(e){switch(e.label){case 0:R({textToHighLight:"",content:""}),ee(!1),W(!0),G(i),e.label=1;case 1:return e.trys.push([1,5,6,7]),n&&0!==n.length?[4,null==F?void 0:F([n[o]])]:(W(!1),U(70),null===(m=X.current)||void 0===m||m.resize(70),[2]);case 2:if(r=e.sent(),a=(null==r?void 0:r.data)||r||[],!Array.isArray(a)||0===a.length)return ee(!0),W(!1),[2];for(s=(l=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(t),d=null,u=0,c=a;u<c.length;u++)if(p=c[u],l(p.normalizedContent||p.htmlContent).includes(s)){d=p;break}if(!d)for(h=s.split(" ").filter(Boolean);h.length>0;){for(g=h.join(" "),x=0,f=a;x<f.length;x++)if(p=f[x],l(p.normalizedContent||p.htmlContent).includes(g)){d=p;break}if(d)break;h.pop()}return _=a.map(function(e){return e.htmlContent}).join("\n"),R({textToHighLight:d?d.htmlContent:"",content:_}),U(50),null===(b=X.current)||void 0===b||b.resize(50),!d&&o+1<n.length?[4,ae(t,i,n,o+1)]:[3,4];case 3:return[2,e.sent()];case 4:return[2];case 5:return v=e.sent(),console.error("Highlight error:",v),ee(!0),[3,7];case 6:return W(!1),[7];case 7:return[2]}})})},le=i.useState(!1),se=le[0],de=le[1],ue=i.useState(!1),ce=ue[0],he=ue[1],ge=i.useState(!1),xe=ge[0],fe=ge[1],pe=i.useState(!1),_e=pe[0],ve=pe[1],me=i.useState(!1),be=me[0],ye=me[1],je=i.useState(!1),ke=je[0],Ce=je[1],we=i.useState(!1),Se=we[0],Be=we[1],De=i.useState(!1),Fe=De[0],Pe=De[1],qe=i.useState(!1),Ee=qe[0],Te=qe[1],He=i.useState(!1),Ie=He[0],ze=He[1];i.useEffect(function(){se&&Ce(!0),ce&&Be(!0),xe&&Pe(!0),_e&&Te(!0),be&&ze(!0)},[se,ce,xe,_e,be]);var Me=s.bookAwards,Re=s.bookCopyRight,Ae=s.bookDetails,Oe=s.bookElements,Le=s.bookOverView,Ve=s.bookCoverImage,Ne=null==Ae?void 0:Ae.isbn,We=null!=a?a:function(){},Qe=void 0!==I&&!!I.length&&["notable_quotes","location_details","notable_characters"].includes(I);return t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},w.dialogContent),E?w.dialogHeight:{})},{children:[!r&&t.jsx("div",e.__assign({style:w.container},{children:t.jsxs(n.PanelGroup,e.__assign({direction:"horizontal"},{children:[t.jsx(n.Panel,e.__assign({order:1,ref:X,defaultSize:K||70},{children:t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},null==w?void 0:w.leftPanel),null==f?void 0:f.leftPanel)},{children:[t.jsx("div",e.__assign({ref:te,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:t.jsxs(v.default,e.__assign({expanded:ke,onChange:function(e,t){return Ce(t)},slotProps:{transition:{onEntered:function(){var e=te.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}},elevation:0,style:w.accordion},{children:[t.jsx(m.default,e.__assign({expandIcon:t.jsx(k.default,{}),style:w.accordionSummary},{children:t.jsx(b.default,e.__assign({style:w.heading},{children:"Book Overview"}))})),t.jsx(y.default,e.__assign({style:w.accordionDetails},{children:Le&&Object.keys(Le).length>0?t.jsx(u.default,{data:Le,highlightTerms:l,onHighlightMatch:de,highlightEnabled:!Qe}):t.jsx("div",e.__assign({style:w.errorState},{children:"No overview data available."}))}))]}))})),t.jsx("div",e.__assign({ref:ie,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:t.jsxs(v.default,e.__assign({elevation:0,style:w.accordion,expanded:Se,onChange:function(e,t){return Be(t)},slotProps:{transition:{onEntered:function(){var e=ie.current;if(e){var t=e.querySelector('[data-highlight="true"]');if(t){t.scrollIntoView({behavior:"smooth",block:"center"});var i=!1,n=new MutationObserver(function(t){if(!i&&t.some(function(e){return"childList"===e.type&&e.addedNodes.length>0})){var o=e.querySelector('[data-highlight="true"]');o&&(i=!0,o.scrollIntoView({behavior:"auto",block:"center"}),n.disconnect())}});n.observe(e,{childList:!0,subtree:!0}),setTimeout(function(){return n.disconnect()},2e3)}}}}}},{children:[t.jsx(m.default,e.__assign({expandIcon:t.jsx(k.default,{}),style:w.accordionSummary},{children:t.jsx(b.default,e.__assign({style:w.heading},{children:"Book Manuscript Elements"}))})),t.jsx(y.default,e.__assign({style:w.accordionDetails},{children:t.jsx(c.default,{data:Oe,title:(null==Le?void 0:Le.title)||"",handleFetchManuscriptElements:P,BookIsbn:Ne,updateQuotesToHighLight:ae,highlightTerms:l,onHighlightMatch:he,defaultPages:T,citationType:H,citationSubTitle:I,highlightEnabled:Qe})}))]}))})),t.jsx("div",e.__assign({ref:ne,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:t.jsxs(v.default,e.__assign({expanded:Fe,onChange:function(e,t){return Pe(t)},elevation:0,style:w.accordion,slotProps:{transition:{onEntered:function(){var e=ne.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[t.jsx(m.default,e.__assign({expandIcon:t.jsx(k.default,{}),style:w.accordionSummary},{children:t.jsx(b.default,e.__assign({style:w.heading},{children:"Book Metadata Details"}))})),t.jsx(y.default,e.__assign({style:w.accordionDetails},{children:Ae&&Object.keys(Ae).length>0?t.jsx(d.default,{data:Ae,highlightTerms:l,onHighlightMatch:fe,highlightEnabled:!Qe,citationType:H,citationSubTitle:I}):t.jsx("div",e.__assign({style:w.errorState},{children:"No Book Metadata data available."}))}))]}))})),t.jsx("div",e.__assign({ref:oe,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:t.jsxs(v.default,e.__assign({elevation:0,style:w.accordion,expanded:Ee,onChange:function(e,t){return Te(t)},slotProps:{transition:{onEntered:function(){var e=oe.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[t.jsx(m.default,e.__assign({expandIcon:t.jsx(k.default,{}),style:w.accordionSummary},{children:t.jsx(b.default,e.__assign({style:w.heading},{children:"Copyrights & Marketing"}))})),t.jsx(y.default,e.__assign({style:w.accordionDetails},{children:Re&&Object.keys(Re).length>0?t.jsx(h.default,{data:Re,highlightTerms:l,onHighlightMatch:ve,highlightEnabled:!Qe}):t.jsx("div",e.__assign({style:w.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),t.jsx("div",e.__assign({ref:re},{children:t.jsxs(v.default,e.__assign({elevation:0,style:w.accordion,expanded:Ie,onChange:function(e,t){return ze(t)},slotProps:{transition:{onEntered:function(){var e=re.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[t.jsx(m.default,e.__assign({expandIcon:t.jsx(k.default,{}),style:w.accordionSummary},{children:t.jsx(b.default,e.__assign({style:w.heading},{children:"People & Awards"}))})),t.jsx(y.default,e.__assign({style:w.accordionDetails},{children:Me&&Object.keys(Me).length>0?t.jsx(g.default,{data:Me,highlightTerms:l,onHighlightMatch:ye,highlightEnabled:!Qe}):t.jsx("div",e.__assign({style:w.errorState},{children:"No People & Awards data available."}))}))]}))}))]}))})),q&&t.jsx(n.PanelResizeHandle,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),q&&t.jsx(n.Panel,e.__assign({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:t.jsx(x.default,{bookOverView:Le,bookCoverImage:Ve,onClose:We,clickableElementCategory:Y,quotesToHighLightData:M,updateQuotesToHighLight:ae,citationLoad:N,previewPage:O,setPreviewPage:L,customStyle:f,comingSoonData:p,isNonHighlightedBlur:_,isBlurToggleVisible:S,isBookemon:D,noHtmlContent:$})}))]}))})),r&&t.jsxs("div",e.__assign({style:w.blurOverlay},{children:[t.jsx(j.default,e.__assign({style:w.closeButton,onClick:a,size:"large"},{children:t.jsx(C.default,{})})),t.jsx(B,{header:null==p?void 0:p.header,subheader:null==p?void 0:p.subheader,icon:null==p?void 0:p.icon})]}))]}))};
|
|
2
2
|
//# sourceMappingURL=BookemonContent.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"),r=require("react/jsx-runtime"),i=require("@react-pdf-viewer/core"),s=require("./PdfContainer.js"),t=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,f=a.jumpToPageValue,g=void 0===f?0:f,h=a.pdfName,p=a.onClose,v=a.customStyles,m=a.customClasses,y=a.customIcons,_=l.PdfHighlightControls(c,d),x=_.highlightIndex,q=_.cursorIndex,b=_.setCursorIndex,w=_.orderedKeys,j=_.totalHighlights,P=_.getValidPosition,S=_.tryJump,C=_.jumpToPage,I=_.zoomTo,V=_.plugins,A=_.controls,F=P(q),T=n.useRef(null);if(!u)return r.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 r.jsxs("div",e.__assign({ref:T,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:[r.jsx(t.default,{highlightIndex:x,totalHighlights:j,controls:A,currentPosition:F,pdfName:h,onClose:p,pdfUrl:u,viewerRef:T,customStyles:v,customClasses:m,customIcons:y}),r.jsx(s.default,{pdfUrl:u,plugins:V,customStyles:v,onLoad:function(){if(I(i.SpecialZoomLevel.ActualSize),g>0){var e=g-1,r=w[e],s=d[r];b(e),s>0&&C(s-1)}requestAnimationFrame(function(){S(),function(){if(T.current){var e=T.current.querySelector(".rpv-core__viewer");if(e){var r=new MutationObserver(function(){var e,i=null===(e=T.current)||void 0===e?void 0:e.querySelector(".rpv-search__highlight");i&&(i.scrollIntoView({behavior:"smooth",block:"center"}),r.disconnect())});r.observe(e,{childList:!0,subtree:!0})}}}()})}})]}))};
|
|
2
2
|
//# sourceMappingURL=PdfViewer.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),e=require("react/jsx-runtime"),n=require("react"),t=require("lucide-react");exports.default=function(o){var r=o.images,s=o.highlights,a=o.highlightColor,d=void 0===a?"rgba(255, 220, 0, 0.35)":a,l=o.highlightActiveColor,c=void 0===l?"rgba(255, 220, 0, 0.65)":l,x=o.highlightBorderColor,u=void 0===x?"rgba(200, 160, 0, 0.8)":x,g=o.height,p=void 0===g?"700px":g,h=s.flatMap(function(i,e){return i.bboxes.map(function(n,t){return{bbox:n,dimensions:i.dimensions,pageIndex:i.pageIndex,key:"".concat(e,"-").concat(t)}})}).length,b=n.useState(0),f=b[0],m=b[1],_=n.useState(!1),y=_[0],v=_[1],j=n.useRef(null),k=n.useRef(null),w=n.useRef([]),C=n.useCallback(function(i,e){void 0===e&&(e=!1);var n=Math.max(0,Math.min(h-1,i));m(n);var t=e?k.current:j.current,o=w.current[n];if(t&&o){var r=t.getBoundingClientRect().top,s=o.getBoundingClientRect().top-r+t.scrollTop-t.clientHeight/2+o.clientHeight/2;t.scrollTo({top:s,behavior:"smooth"})}},[h]),z=function(n){return void 0===n&&(n=!1),h>0&&e.jsx("div",i.__assign({style:{display:"flex",alignItems:"center",marginBottom:"6px"}},{children:e.jsxs("div",i.__assign({style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:"4px"}},{children:[e.jsxs("span",i.__assign({style:{fontSize:"12px",color:"#888"}},{children:[f+1," / ",h]})),e.jsx("button",i.__assign({onClick:function(){return C(f-1,n)},disabled:f<=0,style:{padding:"2px 8px",fontSize:"12px",cursor:f<=0?"not-allowed":"pointer",opacity:f<=0?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white"}},{children:"↑"})),e.jsx("button",i.__assign({onClick:function(){return C(f+1,n)},disabled:f>=h-1,style:{padding:"2px 8px",fontSize:"12px",cursor:f>=h-1?"not-allowed":"pointer",opacity:f>=h-1?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white"}},{children:"↓"})),e.jsx("span",{style:{width:"1px",height:"16px",background:"#e2e8f0",margin:"0 2px"}}),n?e.jsx(t.X,{size:16,color:"#64748b",style:{cursor:"pointer"},onClick:function(){return v(!1)}}):e.jsx(t.Maximize2,{size:16,color:"#64748b",style:{cursor:"pointer"},onClick:function(){return v(!0)}})]}))}))},I=function(){var n=-1;return r.map(function(t,o){var r=s.filter(function(i){return i.pageIndex===o}).flatMap(function(i,e){return i.bboxes.map(function(t,r){return n++,{bbox:t,dimensions:i.dimensions,key:"".concat(o,"-").concat(e,"-").concat(r),globalIndex:n}})});return e.jsxs("div",{children:[e.jsxs("div",i.__assign({style:{fontSize:"12px",color:"#888",marginBottom:"4px"}},{children:["Page ",o+1]})),e.jsx("div",i.__assign({style:{position:"relative",width:"100%",paddingTop:"129%",flexShrink:0}},{children:e.jsxs("div",i.__assign({style:{position:"absolute",inset:0}},{children:[e.jsx("img",{src:t,alt:"Page ".concat(o+1),style:{display:"block",width:"100%",height:"100%",objectFit:"fill"},draggable:!1}),r.map(function(i){var n=i.bbox,t=i.dimensions,o=i.key,r=i.globalIndex,s=f===r;return e.jsx("div",{ref:function(i){w.current[r]=i},style:{position:"absolute",left:"".concat(n.xmin/t.width*100,"%"),top:"".concat(n.ymin/t.height*100,"%"),width:"".concat((n.xmax-n.xmin)/t.width*100,"%"),height:"".concat((n.ymax-n.ymin)/t.height*100,"%"),background:s?c:d,border:s?"1.5px solid ".concat(u):"none",borderRadius:"2px",zIndex:2}},o)})]}))}))]},o)})},R={overflowY:"auto",border:"1px solid #ddd",borderRadius:"4px",padding:"8px",display:"flex",flexDirection:"column",gap:"8px",boxSizing:"border-box"};return e.jsxs(e.Fragment,{children:[e.jsxs("div",i.__assign({style:{width:"100%",maxWidth:"600px",fontFamily:"inherit"}},{children:[z(!1),e.jsx("div",i.__assign({ref:j,style:i.__assign(i.__assign({},R),{height:p})},{children:I()}))]})),y&&e.jsx("div",i.__assign({style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center"}},{children:e.jsxs("div",i.__assign({style:{background:"white",borderRadius:"8px",padding:"16px",width:"90vw",maxWidth:"800px",height:"90vh",display:"flex",flexDirection:"column"}},{children:[z(!0),e.jsx("div",i.__assign({ref:k,style:i.__assign(i.__assign({},R),{flex:1})},{children:I()}))]}))}))]})};
|
|
2
|
+
//# sourceMappingURL=ScannedDocCitation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScannedDocCitation.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/CodeCitation/CodeCitation.js"),t=require("./features/ProjectAccordion/ProjectAccordion.js"),i=require("./features/BookCitation/BookCitation.js"),o=require("./features/Bookemon/Bookemon.js"),r=require("./features/PdfEditorCitation/PdfEditorCitation.js"),n=require("./features/CitationRenderer/CitationRenderer.js"),a=require("./features/CitationRenderer/MarkdownRenderer.js"),s=require("./features/CodeCitation/_components/CodeEditor.js"),u=require("./features/PaginatedTable/PaginatedTable.js"),C=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js"),d=require("./features/ChatCitation/ChatCitationRenderer.js"),f=require("./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js"),l=require("./features/PdfViewer/PdfViewer.js"),p=require("./features/CognitiveDecisioning/FaqCitation/FaqCitation.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/CodeCitation/CodeCitation.js"),t=require("./features/ProjectAccordion/ProjectAccordion.js"),i=require("./features/BookCitation/BookCitation.js"),o=require("./features/Bookemon/Bookemon.js"),r=require("./features/PdfEditorCitation/PdfEditorCitation.js"),n=require("./features/CitationRenderer/CitationRenderer.js"),a=require("./features/CitationRenderer/MarkdownRenderer.js"),s=require("./features/CodeCitation/_components/CodeEditor.js"),u=require("./features/PaginatedTable/PaginatedTable.js"),C=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js"),d=require("./features/ChatCitation/ChatCitationRenderer.js"),f=require("./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js"),l=require("./features/PdfViewer/PdfViewer.js"),p=require("./features/CognitiveDecisioning/FaqCitation/FaqCitation.js"),q=require("./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js"),c=require("./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js"),g=require("./features/RequirementAiCitations/FileCitation/FileCitationContent.js"),j=require("./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js"),x=require("./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js"),R=require("./features/CitationViewer/CitationsViewer.js"),m=require("./features/ExcelCitation/ExcelCitations.js"),P=require("./features/ScannedDocCitation/ScannedDocCitation.js");exports.CodeCitation=e.default,exports.ProjectAccordian=t.default,exports.BookCitation=i.default,exports.Bookemon=o.default,exports.PdfCitation=r.PdfEditorCitation,exports.CitationRenderer=n.default,exports.MarkdownRenderer=a.default,Object.defineProperty(exports,"DiagnosticSeverity",{enumerable:!0,get:function(){return s.DiagnosticSeverity}}),exports.PaginatedTable=u.default,exports.NonWebReasoningComponent=C.default,exports.ChatCitation=d.default,exports.CognitiveDecisioningCard=f.default,exports.PdfViewer=l.default,exports.FaqCitation=p.default,exports.ImageCitationContent=q.default,exports.VideoCitationContent=c.default,exports.FileCitationContent=g.default,exports.WebCitationWithImageContent=j.default,exports.AiReasoningCitation=x.default,exports.CitationsViewer=R.default,exports.ExcelCitation=m.default,exports.ScannedDocCitation=P.default;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as t,__generator as o}from"tslib";import{jsxs as i,jsx as r}from"react/jsx-runtime";import{useState as n,useRef as l,useEffect as a}from"react";import{PanelGroup as d,Panel as c,PanelResizeHandle as s}from"react-resizable-panels";import h from"@mui/material/Accordion";import u from"@mui/material/AccordionSummary";import g from"@mui/material/Typography";import p from"@mui/material/AccordionDetails";import m from"@mui/material/IconButton";import f from"./BookDetailsCard/BookDetailsCard.js";import v from"./BookOverviewCard/BookOverviewCard.js";import b from"./BookElementsCard/BookElementsCard.js";import y from"./BookCopyrightsCard/BookCopyrightsCard.js";import x from"./BookPeopleAwardsCard/BookPeopleAwardsCard.js";import k from"./BookPreview/BookPreview.js";import C from"@mui/icons-material/ExpandMore";import w from"@mui/icons-material/Close";var B={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogHeight:{overflow:"hidden",height:"90vh",position:"relative"},dialogContent:{padding:0,backgroundColor:"#FFFFFF"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},S={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},D=function(t){var o=t.header,n=t.subheader,l=t.icon;return r("div",e({style:S.wrapper},{children:i("div",e({style:S.inner},{children:[r("div",e({style:{marginBottom:"32px"}},{children:r("div",e({style:S.iconWrapper},{children:l}))})),i("div",{children:[r("h1",e({style:S.heading},{children:o})),r("p",e({style:S.text},{children:n}))]})]}))}))},F=function(S){var F=S.showComingSoon,E=S.onClose,P=S.highlightTerms,I=S.data,T=S.customStyle,H=S.comingSoonData,z=S.isNonHighlightedBlur,j=S.isBlurToggleVisible,M=S.isBookemon,A=S.getHighlightContent,O=S.handleFetchManuscriptElements,L=S.isBookPreview,V=S.isDialog,R=S.defaultElementPages,q=S.citationType,W=S.citationSubTitle,N=n({textToHighLight:"",content:""}),_=N[0],Q=N[1],Y=n(1),G=Y[0],J=Y[1],K=n(!1),U=K[0],X=K[1],Z=n("Book Preview"),$=Z[0],ee=Z[1],te=n(70),oe=te[0],ie=te[1],re=l(null),ne=n(!1),le=ne[0],ae=ne[1],de=l(null),ce=l(null),se=l(null),he=l(null),ue=l(null),ge=function(e,i,r,n){return void 0===n&&(n=0),t(void 0,void 0,void 0,function(){var t,l,a,d,c,s,h,u,g,p,m,f,v,b,y,x;return o(this,function(o){switch(o.label){case 0:Q({textToHighLight:"",content:""}),ae(!1),X(!0),ee(i),o.label=1;case 1:return o.trys.push([1,5,6,7]),r&&0!==r.length?[4,null==A?void 0:A([r[n]])]:(X(!1),ie(70),null===(y=re.current)||void 0===y||y.resize(70),[2]);case 2:if(t=o.sent(),l=(null==t?void 0:t.data)||t||[],!Array.isArray(l)||0===l.length)return ae(!0),X(!1),[2];for(d=(a=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(e),c=null,s=0,h=l;s<h.length;s++)if(f=h[s],a(f.normalizedContent||f.htmlContent).includes(d)){c=f;break}if(!c)for(u=d.split(" ").filter(Boolean);u.length>0;){for(g=u.join(" "),p=0,m=l;p<m.length;p++)if(f=m[p],a(f.normalizedContent||f.htmlContent).includes(g)){c=f;break}if(c)break;u.pop()}return v=l.map(function(e){return e.htmlContent}).join("\n"),Q({textToHighLight:c?c.htmlContent:"",content:v}),ie(50),null===(x=re.current)||void 0===x||x.resize(50),!c&&n+1<r.length?[4,ge(e,i,r,n+1)]:[3,4];case 3:return[2,o.sent()];case 4:return[2];case 5:return b=o.sent(),console.error("Highlight error:",b),ae(!0),[3,7];case 6:return X(!1),[7];case 7:return[2]}})})},pe=n(!1),me=pe[0],fe=pe[1],ve=n(!1),be=ve[0],ye=ve[1],xe=n(!1),ke=xe[0],Ce=xe[1],we=n(!1),Be=we[0],Se=we[1],De=n(!1),Fe=De[0],Ee=De[1],Pe=n(!1),Ie=Pe[0],Te=Pe[1],He=n(!1),ze=He[0],je=He[1],Me=n(!1),Ae=Me[0],Oe=Me[1],Le=n(!1),Ve=Le[0],Re=Le[1],qe=n(!1),We=qe[0],Ne=qe[1];a(function(){me&&Te(!0),be&&je(!0),ke&&Oe(!0),Be&&Re(!0),Fe&&Ne(!0)},[me,be,ke,Be,Fe]);var _e=I.bookAwards,Qe=I.bookCopyRight,Ye=I.bookDetails,Ge=I.bookElements,Je=I.bookOverView,Ke=I.bookCoverImage,Ue=null==Ye?void 0:Ye.isbn,Xe=null!=E?E:function(){},Ze=void 0!==W&&!!W.length&&["notable_quotes","location_details","notable_characters"].includes(W);return i("div",e({style:e(e({},B.dialogContent),V?B.dialogHeight:{})},{children:[!F&&r("div",e({style:B.container},{children:i(d,e({direction:"horizontal"},{children:[r(c,e({order:1,ref:re,defaultSize:oe||70},{children:i("div",e({style:e(e({},null==B?void 0:B.leftPanel),null==T?void 0:T.leftPanel)},{children:[r("div",e({ref:de,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:i(h,e({expanded:Ie,onChange:function(e,t){return Te(t)},slotProps:{transition:{onEntered:function(){var e=de.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}},elevation:0,style:B.accordion},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"Book Overview"}))})),r(p,e({style:B.accordionDetails},{children:Je&&Object.keys(Je).length>0?r(v,{data:Je,highlightTerms:P,onHighlightMatch:fe,highlightEnabled:!Ze}):r("div",e({style:B.errorState},{children:"No overview data available."}))}))]}))})),r("div",e({ref:ce,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:i(h,e({elevation:0,style:B.accordion,expanded:ze,onChange:function(e,t){return je(t)},slotProps:{transition:{onEntered:function(){var e=ce.current;if(e){var t=e.querySelector('[data-highlight="true"]');if(t){t.scrollIntoView({behavior:"smooth",block:"center"});var o=new MutationObserver(function(){var t=e.querySelector('[data-highlight="true"]');t&&t.scrollIntoView({behavior:"auto",block:"center"}),o.disconnect()});o.observe(e,{childList:!0,subtree:!0})}}}}}},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"Book Manuscript Elements"}))})),r(p,e({style:B.accordionDetails},{children:r(b,{data:Ge,title:(null==Je?void 0:Je.title)||"",handleFetchManuscriptElements:O,BookIsbn:Ue,updateQuotesToHighLight:ge,highlightTerms:P,onHighlightMatch:ye,defaultPages:R,citationType:q,citationSubTitle:W,highlightEnabled:Ze})}))]}))})),r("div",e({ref:se,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:i(h,e({expanded:Ae,onChange:function(e,t){return Oe(t)},elevation:0,style:B.accordion,slotProps:{transition:{onEntered:function(){var e=se.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"Book Metadata Details"}))})),r(p,e({style:B.accordionDetails},{children:Ye&&Object.keys(Ye).length>0?r(f,{data:Ye,highlightTerms:P,onHighlightMatch:Ce,highlightEnabled:!Ze,citationType:q,citationSubTitle:W}):r("div",e({style:B.errorState},{children:"No Book Metadata data available."}))}))]}))})),r("div",e({ref:he,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:i(h,e({elevation:0,style:B.accordion,expanded:Ve,onChange:function(e,t){return Re(t)},slotProps:{transition:{onEntered:function(){var e=he.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"Copyrights & Marketing"}))})),r(p,e({style:B.accordionDetails},{children:Qe&&Object.keys(Qe).length>0?r(y,{data:Qe,highlightTerms:P,onHighlightMatch:Se,highlightEnabled:!Ze}):r("div",e({style:B.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),r("div",e({ref:ue},{children:i(h,e({elevation:0,style:B.accordion,expanded:We,onChange:function(e,t){return Ne(t)},slotProps:{transition:{onEntered:function(){var e=ue.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"People & Awards"}))})),r(p,e({style:B.accordionDetails},{children:_e&&Object.keys(_e).length>0?r(x,{data:_e,highlightTerms:P,onHighlightMatch:Ee,highlightEnabled:!Ze}):r("div",e({style:B.errorState},{children:"No People & Awards data available."}))}))]}))}))]}))})),L&&r(s,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),L&&r(c,e({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:r(k,{bookOverView:Je,bookCoverImage:Ke,onClose:Xe,clickableElementCategory:$,quotesToHighLightData:_,updateQuotesToHighLight:ge,citationLoad:U,previewPage:G,setPreviewPage:J,customStyle:T,comingSoonData:H,isNonHighlightedBlur:z,isBlurToggleVisible:j,isBookemon:M,noHtmlContent:le})}))]}))})),F&&i("div",e({style:B.blurOverlay},{children:[r(m,e({style:B.closeButton,onClick:E,size:"large"},{children:r(w,{})})),r(D,{header:null==H?void 0:H.header,subheader:null==H?void 0:H.subheader,icon:null==H?void 0:H.icon})]}))]}))};export{F as BookemonContent};
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as o}from"tslib";import{jsxs as i,jsx as r}from"react/jsx-runtime";import{useState as n,useRef as l,useEffect as a}from"react";import{PanelGroup as d,Panel as c,PanelResizeHandle as s}from"react-resizable-panels";import h from"@mui/material/Accordion";import u from"@mui/material/AccordionSummary";import g from"@mui/material/Typography";import p from"@mui/material/AccordionDetails";import m from"@mui/material/IconButton";import f from"./BookDetailsCard/BookDetailsCard.js";import v from"./BookOverviewCard/BookOverviewCard.js";import b from"./BookElementsCard/BookElementsCard.js";import y from"./BookCopyrightsCard/BookCopyrightsCard.js";import x from"./BookPeopleAwardsCard/BookPeopleAwardsCard.js";import k from"./BookPreview/BookPreview.js";import C from"@mui/icons-material/ExpandMore";import w from"@mui/icons-material/Close";var B={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogHeight:{overflow:"hidden",height:"90vh",position:"relative"},dialogContent:{padding:0,backgroundColor:"#FFFFFF"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},S={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},D=function(t){var o=t.header,n=t.subheader,l=t.icon;return r("div",e({style:S.wrapper},{children:i("div",e({style:S.inner},{children:[r("div",e({style:{marginBottom:"32px"}},{children:r("div",e({style:S.iconWrapper},{children:l}))})),i("div",{children:[r("h1",e({style:S.heading},{children:o})),r("p",e({style:S.text},{children:n}))]})]}))}))},F=function(S){var F=S.showComingSoon,E=S.onClose,P=S.highlightTerms,T=S.data,I=S.customStyle,H=S.comingSoonData,z=S.isNonHighlightedBlur,j=S.isBlurToggleVisible,M=S.isBookemon,A=S.getHighlightContent,L=S.handleFetchManuscriptElements,O=S.isBookPreview,V=S.isDialog,R=S.defaultElementPages,q=S.citationType,N=S.citationSubTitle,W=n({textToHighLight:"",content:""}),_=W[0],Q=W[1],Y=n(1),G=Y[0],J=Y[1],K=n(!1),U=K[0],X=K[1],Z=n("Book Preview"),$=Z[0],ee=Z[1],te=n(70),oe=te[0],ie=te[1],re=l(null),ne=n(!1),le=ne[0],ae=ne[1],de=l(null),ce=l(null),se=l(null),he=l(null),ue=l(null),ge=function(e,i,r,n){return void 0===n&&(n=0),t(void 0,void 0,void 0,function(){var t,l,a,d,c,s,h,u,g,p,m,f,v,b,y,x;return o(this,function(o){switch(o.label){case 0:Q({textToHighLight:"",content:""}),ae(!1),X(!0),ee(i),o.label=1;case 1:return o.trys.push([1,5,6,7]),r&&0!==r.length?[4,null==A?void 0:A([r[n]])]:(X(!1),ie(70),null===(y=re.current)||void 0===y||y.resize(70),[2]);case 2:if(t=o.sent(),l=(null==t?void 0:t.data)||t||[],!Array.isArray(l)||0===l.length)return ae(!0),X(!1),[2];for(d=(a=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(e),c=null,s=0,h=l;s<h.length;s++)if(f=h[s],a(f.normalizedContent||f.htmlContent).includes(d)){c=f;break}if(!c)for(u=d.split(" ").filter(Boolean);u.length>0;){for(g=u.join(" "),p=0,m=l;p<m.length;p++)if(f=m[p],a(f.normalizedContent||f.htmlContent).includes(g)){c=f;break}if(c)break;u.pop()}return v=l.map(function(e){return e.htmlContent}).join("\n"),Q({textToHighLight:c?c.htmlContent:"",content:v}),ie(50),null===(x=re.current)||void 0===x||x.resize(50),!c&&n+1<r.length?[4,ge(e,i,r,n+1)]:[3,4];case 3:return[2,o.sent()];case 4:return[2];case 5:return b=o.sent(),console.error("Highlight error:",b),ae(!0),[3,7];case 6:return X(!1),[7];case 7:return[2]}})})},pe=n(!1),me=pe[0],fe=pe[1],ve=n(!1),be=ve[0],ye=ve[1],xe=n(!1),ke=xe[0],Ce=xe[1],we=n(!1),Be=we[0],Se=we[1],De=n(!1),Fe=De[0],Ee=De[1],Pe=n(!1),Te=Pe[0],Ie=Pe[1],He=n(!1),ze=He[0],je=He[1],Me=n(!1),Ae=Me[0],Le=Me[1],Oe=n(!1),Ve=Oe[0],Re=Oe[1],qe=n(!1),Ne=qe[0],We=qe[1];a(function(){me&&Ie(!0),be&&je(!0),ke&&Le(!0),Be&&Re(!0),Fe&&We(!0)},[me,be,ke,Be,Fe]);var _e=T.bookAwards,Qe=T.bookCopyRight,Ye=T.bookDetails,Ge=T.bookElements,Je=T.bookOverView,Ke=T.bookCoverImage,Ue=null==Ye?void 0:Ye.isbn,Xe=null!=E?E:function(){},Ze=void 0!==N&&!!N.length&&["notable_quotes","location_details","notable_characters"].includes(N);return i("div",e({style:e(e({},B.dialogContent),V?B.dialogHeight:{})},{children:[!F&&r("div",e({style:B.container},{children:i(d,e({direction:"horizontal"},{children:[r(c,e({order:1,ref:re,defaultSize:oe||70},{children:i("div",e({style:e(e({},null==B?void 0:B.leftPanel),null==I?void 0:I.leftPanel)},{children:[r("div",e({ref:de,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:i(h,e({expanded:Te,onChange:function(e,t){return Ie(t)},slotProps:{transition:{onEntered:function(){var e=de.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}},elevation:0,style:B.accordion},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"Book Overview"}))})),r(p,e({style:B.accordionDetails},{children:Je&&Object.keys(Je).length>0?r(v,{data:Je,highlightTerms:P,onHighlightMatch:fe,highlightEnabled:!Ze}):r("div",e({style:B.errorState},{children:"No overview data available."}))}))]}))})),r("div",e({ref:ce,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:i(h,e({elevation:0,style:B.accordion,expanded:ze,onChange:function(e,t){return je(t)},slotProps:{transition:{onEntered:function(){var e=ce.current;if(e){var t=e.querySelector('[data-highlight="true"]');if(t){t.scrollIntoView({behavior:"smooth",block:"center"});var o=!1,i=new MutationObserver(function(t){if(!o&&t.some(function(e){return"childList"===e.type&&e.addedNodes.length>0})){var r=e.querySelector('[data-highlight="true"]');r&&(o=!0,r.scrollIntoView({behavior:"auto",block:"center"}),i.disconnect())}});i.observe(e,{childList:!0,subtree:!0}),setTimeout(function(){return i.disconnect()},2e3)}}}}}},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"Book Manuscript Elements"}))})),r(p,e({style:B.accordionDetails},{children:r(b,{data:Ge,title:(null==Je?void 0:Je.title)||"",handleFetchManuscriptElements:L,BookIsbn:Ue,updateQuotesToHighLight:ge,highlightTerms:P,onHighlightMatch:ye,defaultPages:R,citationType:q,citationSubTitle:N,highlightEnabled:Ze})}))]}))})),r("div",e({ref:se,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:i(h,e({expanded:Ae,onChange:function(e,t){return Le(t)},elevation:0,style:B.accordion,slotProps:{transition:{onEntered:function(){var e=se.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"Book Metadata Details"}))})),r(p,e({style:B.accordionDetails},{children:Ye&&Object.keys(Ye).length>0?r(f,{data:Ye,highlightTerms:P,onHighlightMatch:Ce,highlightEnabled:!Ze,citationType:q,citationSubTitle:N}):r("div",e({style:B.errorState},{children:"No Book Metadata data available."}))}))]}))})),r("div",e({ref:he,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:i(h,e({elevation:0,style:B.accordion,expanded:Ve,onChange:function(e,t){return Re(t)},slotProps:{transition:{onEntered:function(){var e=he.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"Copyrights & Marketing"}))})),r(p,e({style:B.accordionDetails},{children:Qe&&Object.keys(Qe).length>0?r(y,{data:Qe,highlightTerms:P,onHighlightMatch:Se,highlightEnabled:!Ze}):r("div",e({style:B.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),r("div",e({ref:ue},{children:i(h,e({elevation:0,style:B.accordion,expanded:Ne,onChange:function(e,t){return We(t)},slotProps:{transition:{onEntered:function(){var e=ue.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"People & Awards"}))})),r(p,e({style:B.accordionDetails},{children:_e&&Object.keys(_e).length>0?r(x,{data:_e,highlightTerms:P,onHighlightMatch:Ee,highlightEnabled:!Ze}):r("div",e({style:B.errorState},{children:"No People & Awards data available."}))}))]}))}))]}))})),O&&r(s,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),O&&r(c,e({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:r(k,{bookOverView:Je,bookCoverImage:Ke,onClose:Xe,clickableElementCategory:$,quotesToHighLightData:_,updateQuotesToHighLight:ge,citationLoad:U,previewPage:G,setPreviewPage:J,customStyle:I,comingSoonData:H,isNonHighlightedBlur:z,isBlurToggleVisible:j,isBookemon:M,noHtmlContent:le})}))]}))})),F&&i("div",e({style:B.blurOverlay},{children:[r(m,e({style:B.closeButton,onClick:E,size:"large"},{children:r(w,{})})),r(D,{header:null==H?void 0:H.header,subheader:null==H?void 0:H.subheader,icon:null==H?void 0:H.icon})]}))]}))};export{F as BookemonContent};
|
|
2
2
|
//# sourceMappingURL=BookemonContent.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 r,jsxs as t}from"react/jsx-runtime";import{SpecialZoomLevel as i}from"@react-pdf-viewer/core";import o 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 c}from"react";var a=function(a){var d=a.pdfUrl,m=a.highlightText,u=a.highlightPages,f=a.jumpToPageValue,p=void 0===f?0:f,h=a.pdfName,v=a.onClose,g=a.customStyles,y=a.customClasses,b=a.customIcons,w=n(m,u),x=w.highlightIndex,P=w.cursorIndex,S=w.setCursorIndex,j=w.orderedKeys,C=w.totalHighlights,I=w.getValidPosition,V=w.tryJump,A=w.jumpToPage,F=w.zoomTo,T=w.plugins,_=w.controls,q=I(P),z=c(null);if(!d)return r("div",e({style:e(e({},l.emptyState),null==g?void 0:g.emptyState)},{children:"PDF is not available for this selection"}));return t("div",e({ref:z,className:(null==y?void 0:y.pdfViewerWrapper)||"",style:e(e(e({},l.pdfViewer),{display:"flex",flexDirection:"column",height:"100%",width:"100%",backgroundColor:"#FAFAFA"}),null==g?void 0:g.pdfViewer)},{children:[r(s,{highlightIndex:x,totalHighlights:C,controls:_,currentPosition:q,pdfName:h,onClose:v,pdfUrl:d,viewerRef:z,customStyles:g,customClasses:y,customIcons:b}),r(o,{pdfUrl:d,plugins:T,customStyles:g,onLoad:function(){if(F(i.ActualSize),p>0){var e=p-1,r=j[e],t=u[r];S(e),t>0&&A(t-1)}requestAnimationFrame(function(){V(),function(){if(z.current){var e=z.current.querySelector(".rpv-core__viewer");if(e){var r=new MutationObserver(function(){var e,t=null===(e=z.current)||void 0===e?void 0:e.querySelector(".rpv-search__highlight");t&&(t.scrollIntoView({behavior:"smooth",block:"center"}),r.disconnect())});r.observe(e,{childList:!0,subtree:!0})}}}()})}})]}))};export{a as default};
|
|
2
2
|
//# sourceMappingURL=PdfViewer.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as i}from"tslib";import{jsxs as e,Fragment as t,jsx as n}from"react/jsx-runtime";import{useState as o,useRef as r,useCallback as d}from"react";import{X as l,Maximize2 as a}from"lucide-react";function c(c){var s=c.images,p=c.highlights,h=c.highlightColor,u=void 0===h?"rgba(255, 220, 0, 0.35)":h,x=c.highlightActiveColor,g=void 0===x?"rgba(255, 220, 0, 0.65)":x,f=c.highlightBorderColor,b=void 0===f?"rgba(200, 160, 0, 0.8)":f,m=c.height,y=void 0===m?"700px":m,v=p.flatMap(function(i,e){return i.bboxes.map(function(t,n){return{bbox:t,dimensions:i.dimensions,pageIndex:i.pageIndex,key:"".concat(e,"-").concat(n)}})}).length,k=o(0),w=k[0],C=k[1],I=o(!1),z=I[0],R=I[1],S=r(null),B=r(null),M=r([]),j=d(function(i,e){void 0===e&&(e=!1);var t=Math.max(0,Math.min(v-1,i));C(t);var n=e?B.current:S.current,o=M.current[t];if(n&&o){var r=n.getBoundingClientRect().top,d=o.getBoundingClientRect().top-r+n.scrollTop-n.clientHeight/2+o.clientHeight/2;n.scrollTo({top:d,behavior:"smooth"})}},[v]),T=function(t){return void 0===t&&(t=!1),v>0&&n("div",i({style:{display:"flex",alignItems:"center",marginBottom:"6px"}},{children:e("div",i({style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:"4px"}},{children:[e("span",i({style:{fontSize:"12px",color:"#888"}},{children:[w+1," / ",v]})),n("button",i({onClick:function(){return j(w-1,t)},disabled:w<=0,style:{padding:"2px 8px",fontSize:"12px",cursor:w<=0?"not-allowed":"pointer",opacity:w<=0?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white"}},{children:"↑"})),n("button",i({onClick:function(){return j(w+1,t)},disabled:w>=v-1,style:{padding:"2px 8px",fontSize:"12px",cursor:w>=v-1?"not-allowed":"pointer",opacity:w>=v-1?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white"}},{children:"↓"})),n("span",{style:{width:"1px",height:"16px",background:"#e2e8f0",margin:"0 2px"}}),t?n(l,{size:16,color:"#64748b",style:{cursor:"pointer"},onClick:function(){return R(!1)}}):n(a,{size:16,color:"#64748b",style:{cursor:"pointer"},onClick:function(){return R(!0)}})]}))}))},D=function(){var t=-1;return s.map(function(o,r){var d=p.filter(function(i){return i.pageIndex===r}).flatMap(function(i,e){return i.bboxes.map(function(n,o){return t++,{bbox:n,dimensions:i.dimensions,key:"".concat(r,"-").concat(e,"-").concat(o),globalIndex:t}})});return e("div",{children:[e("div",i({style:{fontSize:"12px",color:"#888",marginBottom:"4px"}},{children:["Page ",r+1]})),n("div",i({style:{position:"relative",width:"100%",paddingTop:"129%",flexShrink:0}},{children:e("div",i({style:{position:"absolute",inset:0}},{children:[n("img",{src:o,alt:"Page ".concat(r+1),style:{display:"block",width:"100%",height:"100%",objectFit:"fill"},draggable:!1}),d.map(function(i){var e=i.bbox,t=i.dimensions,o=i.key,r=i.globalIndex,d=w===r;return n("div",{ref:function(i){M.current[r]=i},style:{position:"absolute",left:"".concat(e.xmin/t.width*100,"%"),top:"".concat(e.ymin/t.height*100,"%"),width:"".concat((e.xmax-e.xmin)/t.width*100,"%"),height:"".concat((e.ymax-e.ymin)/t.height*100,"%"),background:d?g:u,border:d?"1.5px solid ".concat(b):"none",borderRadius:"2px",zIndex:2}},o)})]}))}))]},r)})},F={overflowY:"auto",border:"1px solid #ddd",borderRadius:"4px",padding:"8px",display:"flex",flexDirection:"column",gap:"8px",boxSizing:"border-box"};return e(t,{children:[e("div",i({style:{width:"100%",maxWidth:"600px",fontFamily:"inherit"}},{children:[T(!1),n("div",i({ref:S,style:i(i({},F),{height:y})},{children:D()}))]})),z&&n("div",i({style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center"}},{children:e("div",i({style:{background:"white",borderRadius:"8px",padding:"16px",width:"90vw",maxWidth:"800px",height:"90vh",display:"flex",flexDirection:"column"}},{children:[T(!0),n("div",i({ref:B,style:i(i({},F),{flex:1})},{children:D()}))]}))}))]})}export{c as default};
|
|
2
|
+
//# sourceMappingURL=ScannedDocCitation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScannedDocCitation.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";
|
|
1
|
+
export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScannedDocCitationTest.d.ts","sourceRoot":"","sources":["../../../src/ScannedDocCitationTest.tsx"],"names":[],"mappings":"AAqCA,MAAM,CAAC,OAAO,UAAU,sBAAsB,4CAY7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookemonContent.d.ts","sourceRoot":"","sources":["../../../../../src/features/Bookemon/BookemonContent.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AA0LvD,eAAO,MAAM,eAAe,4QAiBvB,aAAa,
|
|
1
|
+
{"version":3,"file":"BookemonContent.d.ts","sourceRoot":"","sources":["../../../../../src/features/Bookemon/BookemonContent.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AA0LvD,eAAO,MAAM,eAAe,4QAiBvB,aAAa,4CAoiBf,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,4CAmHhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface BBox {
|
|
2
|
+
xmin: number;
|
|
3
|
+
ymin: number;
|
|
4
|
+
xmax: number;
|
|
5
|
+
ymax: number;
|
|
6
|
+
}
|
|
7
|
+
export interface PageHighlight {
|
|
8
|
+
pageIndex: number;
|
|
9
|
+
bboxes: BBox[];
|
|
10
|
+
dimensions: {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface ScannedDocCitationProps {
|
|
16
|
+
images: string[];
|
|
17
|
+
highlights: PageHighlight[];
|
|
18
|
+
highlightColor?: string;
|
|
19
|
+
highlightActiveColor?: string;
|
|
20
|
+
highlightBorderColor?: string;
|
|
21
|
+
height?: string | number;
|
|
22
|
+
}
|
|
23
|
+
export default function ScannedDocCitation({ images, highlights, highlightColor, highlightActiveColor, highlightBorderColor, height, }: ScannedDocCitationProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
//# sourceMappingURL=ScannedDocCitation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScannedDocCitation.d.ts","sourceRoot":"","sources":["../../../../../src/features/ScannedDocCitation/ScannedDocCitation.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,IAAI,EAAE,CAAC;IACf,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,MAAM,EACN,UAAU,EACV,cAA0C,EAC1C,oBAAgD,EAChD,oBAA+C,EAC/C,MAAgB,GACjB,EAAE,uBAAuB,2CA2JzB"}
|
|
@@ -19,4 +19,5 @@ export { default as WebCitationWithImageContent } from "./features/RequirementAi
|
|
|
19
19
|
export { default as AiReasoningCitation } from "./features/RequirementAiCitations/AiReasoning/AiReasoningCitation";
|
|
20
20
|
export { default as CitationsViewer } from "./features/CitationViewer/CitationsViewer";
|
|
21
21
|
export { default as ExcelCitation } from "./features/ExcelCitation/ExcelCitations";
|
|
22
|
+
export { default as ScannedDocCitation } from "./features/ScannedDocCitation/ScannedDocCitation";
|
|
22
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,iBAAiB,IAAI,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,kBAAkB,IAAI,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAC1G,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,iFAAiF,CAAC;AACtI,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,6DAA6D,CAAC;AAClH,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,yDAAyD,CAAC;AAEjG,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sEAAsE,CAAC;AACvH,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sEAAsE,CAAC;AACvH,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,oEAAoE,CAAC;AACpH,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,2EAA2E,CAAC;AACnI,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mEAAmE,CAAC;AACnH,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yCAAyC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,iBAAiB,IAAI,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,kBAAkB,IAAI,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAC1G,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,iFAAiF,CAAC;AACtI,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,6DAA6D,CAAC;AAClH,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,yDAAyD,CAAC;AAEjG,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sEAAsE,CAAC;AACvH,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sEAAsE,CAAC;AACvH,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,oEAAoE,CAAC;AACpH,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,2EAA2E,CAAC;AACnI,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mEAAmE,CAAC;AACnH,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,kDAAkD,CAAC"}
|