@viswa-test/test-citation 0.0.9 → 0.0.10

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 CHANGED
@@ -19,7 +19,6 @@
19
19
  - [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)
20
20
  - [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)
21
21
  - [VideoCitationContent](#videocitationcontent) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/RequirementAiCitations/RequirementAiCitationsReadme.md)
22
- - [MarkdownWithImageCitation](#markdownwithimagecitation) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/MarkdownWithImageCitation/README.md)
23
22
  - [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)
24
23
  - [Other Components](#other-components)
25
24
  - [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)
@@ -888,61 +887,6 @@ import { WebCitationWithImageContent } from '@e-llm-studio/citation/WebCitationW
888
887
 
889
888
  ---
890
889
 
891
- ### Usage 5: Standalone Markdown With Image Citation
892
-
893
- Use this component when the image should be rendered as part of the markdown content itself rather than as a separate prop-driven media block.
894
-
895
- ```tsx
896
- import { MarkdownWithImageCitation } from '@e-llm-studio/citation/MarkdownWithImageCitation'
897
-
898
- const markdownContent = `
899
- ## Product Collaboration Workspace
900
-
901
- <img src="https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1200&q=80" alt="Team collaboration workspace" />
902
-
903
- This visual captures a clean product collaboration workspace prepared for planning, note-taking, and design review.
904
-
905
- ### Key observations
906
-
907
- - The laptop acts as the primary working surface for product or engineering review
908
- - The surrounding setup reinforces a structured, research-oriented workflow
909
- - The image is rendered inline as part of the markdown citation
910
- `;
911
-
912
- <MarkdownWithImageCitation
913
- citationTitle="Inline Markdown Image Reference"
914
- timestamp="Apr 03, 2026 - 11:15 AM"
915
- relevanceScore={98}
916
- markdownContent={markdownContent}
917
- closeCitationConfig={{
918
- CloseIcon: () => <span>✕</span>,
919
- handleCloseCitationPreview: () => console.log('Closed'),
920
- }}
921
- />
922
- ```
923
-
924
- **With CitationRenderer (Expandable Pill):**
925
- ```tsx
926
- import { CitationRenderer } from '@e-llm-studio/citation/CitationRenderer'
927
- import { MarkdownWithImageCitation } from '@e-llm-studio/citation/MarkdownWithImageCitation'
928
-
929
- <CitationRenderer
930
- inLineCitation={true}
931
- citationTitle="Markdown Image Reference"
932
- citationComponent={
933
- <MarkdownWithImageCitation
934
- citationTitle="Workspace Note"
935
- markdownContent={markdownContent}
936
- relevanceScore={98}
937
- />
938
- }
939
- chevronDownComponent={<span>▼</span>}
940
- chevronUpComponent={<span>▲</span>}
941
- />
942
- ```
943
-
944
- ---
945
-
946
890
  ### Component Props Reference
947
891
 
948
892
  #### AiReasoningCitation Props
@@ -1005,17 +949,6 @@ import { MarkdownWithImageCitation } from '@e-llm-studio/citation/MarkdownWithIm
1005
949
 
1006
950
  *Either `signedUrl` or `gsUtilPath` must be provided
1007
951
 
1008
- #### MarkdownWithImageCitation Props
1009
-
1010
- | Prop Name | Type | Required | Description |
1011
- |-----------|------|----------|-------------|
1012
- | `markdownContent` | `string` | ✅ | Markdown/HTML string to render. Inline `<img />` tags are supported. |
1013
- | `citationTitle` | `string` | ❌ | Title shown in the header. Defaults to `"Markdown With Image"`. |
1014
- | `timestamp` | `string` | ❌ | Optional subtitle shown below the title. |
1015
- | `relevanceScore` | `number` | ❌ | Confidence score to display in the header badge (0–100). |
1016
- | `closeCitationConfig` | `Object` | ❌ | `{ CloseIcon, handleCloseCitationPreview }` — renders a close button in the header. |
1017
- | `styles` | `Object` | ❌ | Deep style overrides for container, header, image wrapper, and markdown regions. |
1018
-
1019
952
  ---
1020
953
 
1021
954
  **Required peer dependencies:**
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),s=require("lucide-react"),t=require("./utils/helpers.js"),o=require("react-markdown");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(n),l=r(o),d=function(n){var t=n.type,o=n.label,r={display:"inline-flex",alignItems:"center",gap:"4px",whiteSpace:"nowrap",borderRadius:"9999px",padding:"4px 12px",fontSize:"12px",fontWeight:600};switch(t){case"similarity":return i.jsx("span",e.__assign({style:e.__assign(e.__assign({},r),{border:"1px solid #C4B5FD",backgroundColor:"#F5F3FF",color:"#6D28D9"})},{children:o}));case"no_deviation":return i.jsx("span",e.__assign({style:e.__assign(e.__assign({},r),{border:"1px solid #A7F3D0",backgroundColor:"#ECFDF3",color:"#027A48"})},{children:o}));case"deviation":return i.jsxs("span",e.__assign({style:e.__assign(e.__assign({},r),{gap:"6px",border:"1px solid #FECACA",backgroundColor:"#FEF2F2",color:"#DC2626"})},{children:[o,i.jsx("span",e.__assign({style:{borderRadius:"9999px",backgroundColor:"#FEE2E2",padding:"2px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:i.jsx(s.ThumbsDown,{style:{width:"12px",height:"12px"}})})),i.jsx(s.ChevronDown,{style:{width:"12px",height:"12px",color:"#DC2626"}})]}));default:return null}};function p(n,s,t){return n&&n.length>0?i.jsx("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:"8px"}},{children:n.map(function(n){return i.jsx("p",e.__assign({style:{fontSize:"13px",lineHeight:"1.625",color:"#374151",margin:0}},{children:i.jsx(l.default,e.__assign({components:t},{children:n.text}))}),n.id)})})):s||i.jsx("p",e.__assign({style:{fontSize:"13px",fontStyle:"italic",color:"#9CA3AF",margin:0}},{children:"No content available"}))}var x=function(o){var r=o.leftDocumentName,x=void 0===r?"Uploaded Contract":r,c=o.rightDocumentName,g=void 0===c?"Template":c,h=o.overallSimilarity,u=void 0===h?"Similarity":h,_=o.rawMappingData,f=o.deviationMappingData,F=o.defaultExpandedIds,y=void 0===F?[]:F,b=o.onSectionToggle,v=o.showDeviationBar,j=void 0===v||v,m=o.centerColumnWidth,C=void 0===m?15:m,w=o.className,D=void 0===w?"":w,A=o.style,B=t.transformContractComparisons(_),E=n.useState(function(){return new Set(null!=y?y:[B[0].id])}),k=E[0],z=E[1],S=n.useMemo(function(){return{p:function(n){var s=n.children;return i.jsx("div",e.__assign({className:"inline",style:{padding:"8px 0px 8px 0px"}},{children:s}))},strong:function(n){var s=n.children;return i.jsx("strong",e.__assign({className:"font-semibold"},{children:s}))},em:function(n){var s=n.children;return i.jsx("em",e.__assign({className:"italic"},{children:s}))}}},[]),I=n.useState(!0),T=I[0],R=I[1],N=n.useCallback(function(e){z(function(i){var n=new Set(i),s=!n.has(e);return s?n.add(e):n.delete(e),null==b||b(e,s),n})},[b]),q=function(){return R(function(e){return!e})},W=j?"1fr minmax(80px, ".concat(C,"%) 1fr"):"1fr 1fr";return i.jsx("div",e.__assign({className:D,style:e.__assign({display:"flex",flexDirection:"column",height:"100%",width:"100%",overflow:"auto",fontFamily:"sans-serif",background:"#FFFFFF"},A)},{children:i.jsx("div",e.__assign({style:{width:"100%",padding:"24px 16px 40px"}},{children:i.jsxs("div",e.__assign({style:{position:"relative",display:"grid",gridTemplateColumns:W,rowGap:"0px"}},{children:[T&&i.jsx("div",{style:{pointerEvents:"none",position:"absolute",top:56,bottom:0,left:0,width:j?"calc((100% - ".concat(C,"%) / 2)"):"50%",zIndex:0,border:"2px dashed #A0AAB4",borderTop:"none",borderRadius:"0 0 12px 12px",background:"#FFFFFF"}}),T&&i.jsx("div",{style:{pointerEvents:"none",position:"absolute",top:56,bottom:0,right:0,width:j?"calc((100% - ".concat(C,"%) / 2)"):"50%",zIndex:0,border:"1px solid #E5E7EB",borderTop:"none",background:"#F7F8FA",borderRadius:"0 0 12px 12px"}}),i.jsxs("div",e.__assign({style:{position:"relative",zIndex:10,display:"flex",alignItems:"center",gap:"12px",padding:"0 16px",height:56,cursor:"pointer",background:"#F7F8FA",border:"2px dashed #A0AAB4",borderBottom:T?"1px dashed #A0AAB4":"2px dashed #A0AAB4",borderRadius:T?"12px 12px 0 0":"12px",transition:"border-radius 0.2s ease"},onClick:q},{children:[i.jsx(s.FileText,{style:{width:"18px",height:"18px",color:"#4B5563"}}),i.jsx("span",e.__assign({style:{flex:1,fontSize:"15px",fontWeight:700,color:"#19213D"}},{children:x})),T?i.jsx(s.ChevronUp,{style:{width:"20px",height:"20px",color:"#6B7280"}}):i.jsx(s.ChevronDown,{style:{width:"20px",height:"20px",color:"#6B7280"}})]})),j&&i.jsxs("div",e.__assign({style:{position:"relative",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center"}},{children:[i.jsx("div",{style:{position:"absolute",top:"50%",left:0,right:0,height:"1.5px",background:"#C4B5FD",opacity:.5}}),i.jsx("div",e.__assign({style:{position:"relative",zIndex:11,background:"#FFFFFF",padding:"0 8px"}},{children:i.jsx(d,{type:"similarity",label:u})}))]})),i.jsxs("div",e.__assign({style:{position:"relative",zIndex:10,display:"flex",alignItems:"center",gap:"12px",padding:"0 16px",height:56,cursor:"pointer",background:"#F7F8FA",border:"1px solid #E5E7EB",borderRadius:T?"12px 12px 0 0":"12px",transition:"border-radius 0.2s ease"},onClick:q},{children:[i.jsx(s.FileText,{style:{width:"18px",height:"18px",color:"#5928ED"}}),i.jsx("span",e.__assign({style:{flex:1,fontSize:"15px",fontWeight:600,color:"#5928ED"}},{children:g})),T?i.jsx(s.ChevronUp,{style:{width:"20px",height:"20px",color:"#6B7280"}}):i.jsx(s.ChevronDown,{style:{width:"20px",height:"20px",color:"#6B7280"}})]})),T&&B.map(function(n,t){var o,r,x,c=k.has(n.id),g=0===t?"42px":"38px";return i.jsxs(a.default.Fragment,{children:[i.jsx("div",e.__assign({style:{position:"relative",zIndex:10,padding:"12px 16px"}},{children:i.jsxs("div",e.__assign({style:{borderRadius:"8px",border:"1px solid #E5E7EB",background:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"}},{children:[i.jsxs("button",e.__assign({onClick:function(){return N(n.id)},style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"16px",background:"transparent",border:"none",cursor:"pointer"}},{children:[i.jsx("span",e.__assign({style:{fontSize:"13px",fontWeight:600,color:"#111827"}},{children:i.jsx(l.default,e.__assign({components:S},{children:n.leftTitle}))})),c?i.jsx(s.ChevronUp,{size:16,color:"#6B7280"}):i.jsx(s.ChevronDown,{size:16,color:"#6B7280"})]})),c&&i.jsx("div",e.__assign({style:{borderTop:"1px solid #F3F4F6",padding:"16px"}},{children:p(null!==(o=n.leftClauses)&&void 0!==o?o:[],n.contentLeft,S)}))]}))})),j&&i.jsxs("div",e.__assign({style:{position:"relative",zIndex:10}},{children:[i.jsx("div",{style:{position:"absolute",left:"-16px",right:"-16px",top:g,height:"1.5px",background:(x=f[t].matchType,"deviation"===x?"#FECACA":"no_deviation"===x?"#77BB9D":"#C4B5FD")}}),i.jsx("div",e.__assign({style:{position:"absolute",left:"50%",transform:"translate(-50%, -50%)",top:g,background:"#FFFFFF",padding:"0 8px"}},{children:i.jsx(d,{type:f[t].matchType,label:f[t].matchLabel})}))]})),i.jsx("div",e.__assign({style:{position:"relative",zIndex:10,padding:"12px 16px"}},{children:i.jsxs("div",e.__assign({style:{borderRadius:"8px",border:"1px solid #E5E7EB",background:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"}},{children:[i.jsxs("button",e.__assign({onClick:function(){return N(n.id)},style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"16px",background:"transparent",border:"none",cursor:"pointer"}},{children:[i.jsx("span",e.__assign({style:{fontSize:"13px",fontWeight:600,color:"#111827"}},{children:i.jsx(l.default,e.__assign({components:S},{children:n.rightTitle}))})),c?i.jsx(s.ChevronUp,{size:16,color:"#6B7280"}):i.jsx(s.ChevronDown,{size:16,color:"#6B7280"})]})),c&&i.jsx("div",e.__assign({style:{borderTop:"1px solid #F3F4F6",padding:"16px"}},{children:p(null!==(r=n.rightClauses)&&void 0!==r?r:[],n.contentRight,S)}))]}))}))]},n.id)})]}))}))}))};exports.AiRedLineCompare=x,exports.default=x;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),t=require("lucide-react"),s=require("./utils/helpers.js"),o=require("react-markdown");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(n),a=r(o),d=function(n){var s=n.type,o=n.label,r=n.onClick,l=n.isOpen,a={display:"inline-flex",alignItems:"center",gap:"4px",whiteSpace:"nowrap",borderRadius:"9999px",padding:"4px 12px",fontSize:"12px",fontWeight:600};switch(s){case"similarity":return i.jsxs("span",e.__assign({style:e.__assign(e.__assign({},a),{border:"1px solid #C4B5FD",backgroundColor:"#F5F3FF",color:"#6D28D9",cursor:r?"pointer":"default"}),onClick:r},{children:[o,r&&(l?i.jsx(t.ChevronUp,{style:{width:"12px",height:"12px",color:"#6D28D9"}}):i.jsx(t.ChevronDown,{style:{width:"12px",height:"12px",color:"#6D28D9"}}))]}));case"no_deviation":return i.jsxs("span",e.__assign({style:e.__assign(e.__assign({},a),{border:"1px solid #A7F3D0",backgroundColor:"#ECFDF3",color:"#027A48",cursor:r?"pointer":"default"}),onClick:r},{children:[o,r&&(l?i.jsx(t.ChevronUp,{style:{width:"12px",height:"12px",color:"#027A48"}}):i.jsx(t.ChevronDown,{style:{width:"12px",height:"12px",color:"#027A48"}}))]}));case"deviation":return i.jsxs("span",e.__assign({style:e.__assign(e.__assign({},a),{gap:"6px",border:"1px solid #FECACA",backgroundColor:"#FEF2F2",color:"#DC2626",cursor:"pointer"}),onClick:r},{children:[o,i.jsx("span",e.__assign({style:{borderRadius:"9999px",backgroundColor:"#FEE2E2",padding:"2px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:i.jsx(t.ThumbsDown,{style:{width:"12px",height:"12px"}})})),l?i.jsx(t.ChevronUp,{style:{width:"12px",height:"12px",color:"#DC2626"}}):i.jsx(t.ChevronDown,{style:{width:"12px",height:"12px",color:"#DC2626"}})]}));default:return null}};function p(n,t,s){return n&&n.length>0?i.jsx("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:"8px"}},{children:n.map(function(n){return i.jsx("p",e.__assign({style:{fontSize:"13px",lineHeight:"1.625",color:"#374151",margin:0}},{children:i.jsx(a.default,e.__assign({components:s},{children:n.text}))}),n.id)})})):t||i.jsx("p",e.__assign({style:{fontSize:"13px",fontStyle:"italic",color:"#9CA3AF",margin:0}},{children:"No content available"}))}var x=function(o){var r=o.leftDocumentName,x=void 0===r?"Uploaded Contract":r,c=o.rightDocumentName,h=void 0===c?"Template":c,g=o.overallSimilarity,u=void 0===g?"Similarity":g,_=o.rawMappingData,v=o.deviationMappingData,f=o.defaultExpandedIds,y=void 0===f?[]:f,F=o.onSectionToggle,b=o.onBadgeClick,j=o.showDeviationBar,m=void 0===j||j,C=o.centerColumnWidth,w=void 0===C?15:C,D=o.className,k=void 0===D?"":D,A=o.style,B=o.activeBadgeId,E=s.transformContractComparisons(_),S=n.useState(function(){return new Set(null!=y?y:[E[0].id])}),z=S[0],I=S[1],T=n.useState(!1),R=T[0],N=T[1],U=n.useState(new Set),q=U[0],W=U[1],M=n.useMemo(function(){return{p:function(n){var t=n.children;return i.jsx("div",e.__assign({className:"inline",style:{padding:"8px 0px 8px 0px"}},{children:t}))},strong:function(n){var t=n.children;return i.jsx("strong",e.__assign({className:"font-semibold"},{children:t}))},em:function(n){var t=n.children;return i.jsx("em",e.__assign({className:"italic"},{children:t}))}}},[]),O=n.useState(!0),L=O[0],G=O[1],H=n.useCallback(function(e){I(function(i){var n=new Set(i),t=!n.has(e);return t?n.add(e):n.delete(e),null==F||F(e,t),n})},[F]),P=function(){return G(function(e){return!e})},J=m?"1fr minmax(80px, ".concat(w,"%) 1fr"):"1fr 1fr";return i.jsx("div",e.__assign({className:k,style:e.__assign({display:"flex",flexDirection:"column",height:"100%",width:"100%",overflow:"auto",fontFamily:"sans-serif",background:"#FFFFFF"},A)},{children:i.jsx("div",e.__assign({style:{width:"100%",padding:"24px 16px 40px"}},{children:i.jsxs("div",e.__assign({style:{position:"relative",display:"grid",gridTemplateColumns:J,rowGap:"0px"}},{children:[L&&i.jsx("div",{style:{pointerEvents:"none",position:"absolute",top:56,bottom:0,left:0,width:m?"calc((100% - ".concat(w,"%) / 2)"):"50%",zIndex:0,border:"2px dashed #A0AAB4",borderTop:"none",borderRadius:"0 0 12px 12px",background:"#FFFFFF"}}),L&&i.jsx("div",{style:{pointerEvents:"none",position:"absolute",top:56,bottom:0,right:0,width:m?"calc((100% - ".concat(w,"%) / 2)"):"50%",zIndex:0,border:"1px solid #E5E7EB",borderTop:"none",background:"#F7F8FA",borderRadius:"0 0 12px 12px"}}),i.jsxs("div",e.__assign({style:{position:"relative",zIndex:10,display:"flex",alignItems:"center",gap:"12px",padding:"0 16px",height:56,cursor:"pointer",background:"#F7F8FA",border:"2px dashed #A0AAB4",borderBottom:L?"1px dashed #A0AAB4":"2px dashed #A0AAB4",borderRadius:L?"12px 12px 0 0":"12px",transition:"border-radius 0.2s ease"},onClick:P},{children:[i.jsx(t.FileText,{style:{width:"18px",height:"18px",color:"#4B5563"}}),i.jsx("span",e.__assign({style:{flex:1,fontSize:"15px",fontWeight:700,color:"#19213D"}},{children:x})),L?i.jsx(t.ChevronUp,{style:{width:"20px",height:"20px",color:"#6B7280"}}):i.jsx(t.ChevronDown,{style:{width:"20px",height:"20px",color:"#6B7280"}})]})),m&&i.jsxs("div",e.__assign({style:{position:"relative",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center"}},{children:[i.jsx("div",{style:{position:"absolute",top:"50%",left:0,right:0,height:"1.5px",background:"#C4B5FD",opacity:.5}}),i.jsx("div",e.__assign({style:{position:"relative",zIndex:11,background:"#FFFFFF",padding:"0 8px"}},{children:i.jsx(d,{type:"similarity",label:u,isOpen:void 0!==B?"overall_similarity"===B:R,onClick:function(){var e=!("overall_similarity"===B);void 0===B&&N(e),null==b||b("overall_similarity",e)}})}))]})),i.jsxs("div",e.__assign({style:{position:"relative",zIndex:10,display:"flex",alignItems:"center",gap:"12px",padding:"0 16px",height:56,cursor:"pointer",background:"#F7F8FA",border:"1px solid #E5E7EB",borderRadius:L?"12px 12px 0 0":"12px",transition:"border-radius 0.2s ease"},onClick:P},{children:[i.jsx(t.FileText,{style:{width:"18px",height:"18px",color:"#5928ED"}}),i.jsx("span",e.__assign({style:{flex:1,fontSize:"15px",fontWeight:600,color:"#5928ED"}},{children:h})),L?i.jsx(t.ChevronUp,{style:{width:"20px",height:"20px",color:"#6B7280"}}):i.jsx(t.ChevronDown,{style:{width:"20px",height:"20px",color:"#6B7280"}})]})),L&&E.map(function(n,s){var o,r,x,c=z.has(n.id),h=0===s?"42px":"38px";return i.jsxs(l.default.Fragment,{children:[i.jsx("div",e.__assign({style:{position:"relative",zIndex:10,padding:"12px 16px"}},{children:i.jsxs("div",e.__assign({style:{borderRadius:"8px",border:"1px solid #E5E7EB",background:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"}},{children:[i.jsxs("button",e.__assign({onClick:function(){return H(n.id)},style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"16px",background:"transparent",border:"none",cursor:"pointer"}},{children:[i.jsx("span",e.__assign({style:{fontSize:"13px",fontWeight:600,color:"#111827"}},{children:i.jsx(a.default,e.__assign({components:M},{children:n.leftTitle}))})),c?i.jsx(t.ChevronUp,{size:16,color:"#6B7280"}):i.jsx(t.ChevronDown,{size:16,color:"#6B7280"})]})),c&&i.jsx("div",e.__assign({style:{borderTop:"1px solid #F3F4F6",padding:"16px"}},{children:p(null!==(o=n.leftClauses)&&void 0!==o?o:[],n.contentLeft,M)}))]}))})),m&&i.jsxs("div",e.__assign({style:{position:"relative",zIndex:10}},{children:[i.jsx("div",{style:{position:"absolute",left:"-16px",right:"-16px",top:h,height:"1.5px",background:(x=v[s].matchType,"deviation"===x?"#FECACA":"no_deviation"===x?"#77BB9D":"#C4B5FD")}}),i.jsx("div",e.__assign({style:{position:"absolute",left:"50%",transform:"translate(-50%, -50%)",top:h,background:"#FFFFFF",padding:"0 8px"}},{children:i.jsx(d,{type:v[s].matchType,label:v[s].matchLabel,isOpen:void 0!==B?B===n.id:q.has(n.id),onClick:function(){var e=!(B===n.id);void 0===B&&W(function(i){var t=new Set(i);return e?t.add(n.id):t.delete(n.id),t}),null==b||b(n.id,e)}})}))]})),i.jsx("div",e.__assign({style:{position:"relative",zIndex:10,padding:"12px 16px"}},{children:i.jsxs("div",e.__assign({style:{borderRadius:"8px",border:"1px solid #E5E7EB",background:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"}},{children:[i.jsxs("button",e.__assign({onClick:function(){return H(n.id)},style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"16px",background:"transparent",border:"none",cursor:"pointer"}},{children:[i.jsx("span",e.__assign({style:{fontSize:"13px",fontWeight:600,color:"#111827"}},{children:i.jsx(a.default,e.__assign({components:M},{children:n.rightTitle}))})),c?i.jsx(t.ChevronUp,{size:16,color:"#6B7280"}):i.jsx(t.ChevronDown,{size:16,color:"#6B7280"})]})),c&&i.jsx("div",e.__assign({style:{borderTop:"1px solid #F3F4F6",padding:"16px"}},{children:p(null!==(r=n.rightClauses)&&void 0!==r?r:[],n.contentRight,M)}))]}))}))]},n.id)})]}))}))}))};exports.AiRedLineCompare=x,exports.default=x;
2
2
  //# sourceMappingURL=AiRedLineCompare.js.map
@@ -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-pdf-viewer/core"),r=require("./PdfContainer.js"),o=require("./PdfToolbar.js"),s=require("./PdfStyle.js"),n=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 l=require("react");exports.default=function(a){var u,c=a.pdfUrl,d=a.highlightText,g=a.highlightPages,f=a.highlightCordinatePages,h=a.jumpToPageValue,p=void 0===h?0:h,v=a.pdfName,m=a.onClose,x=a.customStyles,y=a.customClasses,_=a.customIcons,q=a.useCoordinates,P=l.useRef(null),S=l.useMemo(function(){if(q)return new Set(f.map(function(e){return e.pageIndex}));var e=new Set;return Object.values(g).forEach(function(t){t>0&&e.add(t-1)}),e},[g]),T=(u=d)&&0!==u.length?u.filter(function(e){return!u.some(function(t){return t!==e&&t.includes(e)})}):u,C=n.PdfHighlightControls(T,q?{}:g,P,S,q,q?f:[]),b=C.highlightIndex,j=C.cursorIndex,w=C.setCursorIndex,I=C.orderedKeys,H=C.totalHighlights,A=C.getValidPosition,F=C.tryJump,R=C.jumpToPage,V=C.zoomTo,N=C.plugins,z=C.controls,B=C.hideNonTargetHighlights,O=C.deduplicateHighlights,U=A(j);if(!c)return t.jsx("div",e.__assign({style:e.__assign(e.__assign({},s.pdfStyles.emptyState),null==x?void 0:x.emptyState)},{children:"PDF is not available for this selection"}));return t.jsxs("div",e.__assign({ref:P,className:(null==y?void 0:y.pdfViewerWrapper)||"",style:e.__assign(e.__assign(e.__assign({},s.pdfStyles.pdfViewer),{display:"flex",flexDirection:"column",height:"100%",width:"100%",backgroundColor:"#FAFAFA"}),null==x?void 0:x.pdfViewer)},{children:[t.jsx(o.default,{highlightIndex:b,totalHighlights:H,controls:z,currentPosition:U,pdfName:v,onClose:m,pdfUrl:c,viewerRef:P,customStyles:x,customClasses:y,customIcons:_}),t.jsx(r.default,{pdfUrl:c,plugins:N,customStyles:x,onLoad:function(){if(V(i.SpecialZoomLevel.ActualSize),p>0){var e=p-1,t=I[e],r=g[t],o=f[e];w(e),console.log(o,"cordinateTargetHighlight"),q&&o.pageIndex>0&&R(o.pageIndex),r>0&&(setTimeout(function(){B(S),O(r-1)},1e3),q||R(r-1))}requestAnimationFrame(function(){F(),q||function(){if(P.current){var e=p-1,t=I[e],i=g[t],r=i>0?i-1:0,o={};I.forEach(function(e,t){var i=g[e];i>0&&(o[i]||(o[i]=[]),o[i].push(t))});var s=(o[i]||[]).indexOf(e),n=0,l=function(){var e,t;if(!(++n>40)){var i=null===(e=P.current)||void 0===e?void 0:e.querySelector(".rpv-core__inner-pages");if(i){var o=null===(t=P.current)||void 0===t?void 0:t.querySelector('[data-testid="core__page-layer-'.concat(r,'"]'));if(o){var a=i.getBoundingClientRect(),u=o.getBoundingClientRect();if(u.top<a.bottom&&u.bottom>a.top){var c=o.querySelectorAll(".rpv-search__highlight")[s];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(l,100)}else setTimeout(l,100)}else setTimeout(l,100)}else setTimeout(l,100)}};setTimeout(l,500)}}()})},onPageChange:function(e){var t=e.currentPage;S.has(t)?(O(t),B(S)):B(S)}})]}))};
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"),n=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 l=require("react");exports.default=function(u){var a,c=u.pdfUrl,d=u.highlightText,f=u.highlightPages,g=u.jumpToPageValue,h=void 0===g?0:g,p=u.pdfName,v=u.onClose,m=u.customStyles,y=u.customClasses,_=u.customIcons,x=l.useRef(null),q=l.useMemo(function(){var e=new Set;return Object.values(f).forEach(function(t){t>0&&e.add(t-1)}),e},[f]),P=(a=d)&&0!==a.length?a.filter(function(e){return!a.some(function(t){return t!==e&&t.includes(e)})}):a,S=n.PdfHighlightControls(P,f,x,q),T=S.highlightIndex,b=S.cursorIndex,j=S.setCursorIndex,C=S.orderedKeys,w=S.totalHighlights,H=S.getValidPosition,A=S.tryJump,I=S.jumpToPage,F=S.zoomTo,R=S.plugins,V=S.controls,N=S.hideNonTargetHighlights,z=S.deduplicateHighlights,B=H(b);if(!c)return t.jsx("div",e.__assign({style:e.__assign(e.__assign({},o.pdfStyles.emptyState),null==m?void 0:m.emptyState)},{children:"PDF is not available for this selection"}));return t.jsxs("div",e.__assign({ref:x,className:(null==y?void 0:y.pdfViewerWrapper)||"",style:e.__assign(e.__assign(e.__assign({},o.pdfStyles.pdfViewer),{display:"flex",flexDirection:"column",height:"100%",width:"100%",backgroundColor:"#FAFAFA"}),null==m?void 0:m.pdfViewer)},{children:[t.jsx(s.default,{highlightIndex:T,totalHighlights:w,controls:V,currentPosition:B,pdfName:p,onClose:v,pdfUrl:c,viewerRef:x,customStyles:m,customClasses:y,customIcons:_}),t.jsx(r.default,{pdfUrl:c,plugins:R,customStyles:m,onLoad:function(){if(F(i.SpecialZoomLevel.ActualSize),h>0){var e=h-1,t=C[e],r=f[t];j(e),r>0&&(setTimeout(function(){N(q),z(r-1)},1e3),I(r-1))}requestAnimationFrame(function(){A(),function(){if(x.current){var e=h-1,t=C[e],i=f[t],r=i>0?i-1:0,s={};C.forEach(function(e,t){var i=f[e];i>0&&(s[i]||(s[i]=[]),s[i].push(t))});var o=(s[i]||[]).indexOf(e),n=0,l=function(){var e,t;if(!(++n>40)){var i=null===(e=x.current)||void 0===e?void 0:e.querySelector(".rpv-core__inner-pages");if(i){var s=null===(t=x.current)||void 0===t?void 0:t.querySelector('[data-testid="core__page-layer-'.concat(r,'"]'));if(s){var u=i.getBoundingClientRect(),a=s.getBoundingClientRect();if(a.top<u.bottom&&a.bottom>u.top){var c=s.querySelectorAll(".rpv-search__highlight")[o];if(c){var d=c.getBoundingClientRect(),f=i.scrollTop+(d.top-u.top)-i.clientHeight/2+d.height/2;i.scrollTo({top:f,behavior:"smooth"})}else setTimeout(l,100)}else setTimeout(l,100)}else setTimeout(l,100)}else setTimeout(l,100)}};setTimeout(l,500)}}()})},onPageChange:function(e){var t=e.currentPage;q.has(t)?(z(t),N(q)):N(q)}})]}))};
2
2
  //# sourceMappingURL=PdfViewer.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("@react-pdf-viewer/search"),n=require("@react-pdf-viewer/page-navigation"),o=require("@react-pdf-viewer/zoom"),i=require("@react-pdf-viewer/highlight");exports.PdfHighlightControls=function(u,a,c,l,s,g){var p=t.useState(0),f=p[0],h=p[1],v=t.useRef(!1),d=t.useState(0),m=d[0],y=d[1];t.useRef([]);var _=function(e){if(!e)return[];return e.replace(/\]\s*\n\s*\(/g,"](").split(/\n+/).map(function(e){var t=e.trim(),r=(t=(t=t.replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u00A0\u2009\u202F]/g," ")).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 r?t.slice(r[0].length).trim():t}).flatMap(function(e){var t=e.match(/^\s*\|(.+)\|\s*$/);return t?t[1].split("|").map(function(e){return e.trim()}).filter(Boolean):[e]}).map(function(e){return e.replace(/&[#\w]+;/g,function(e){return t=e,(r=document.createElement("textarea")).innerHTML=t,r.value;var t,r}).replace(/<br\s*\/?>/gi,"\n").replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1").replace(/[^\S\n]+/g," ").trim()}).flatMap(function(e){return e.split(/\n+/)}).flatMap(function(e){for(var t,r=[],n=/([*_]{1,3})([^*_]+)\1|([*_]{1,3})/g,o=0;null!==(t=n.exec(e));){var i=e.slice(o,t.index).trim();i&&r.push(i),t[2]&&r.push(t[2].trim()),o=t.index+t[0].length}var u=e.slice(o).trim();return u&&r.push(u),r.flatMap(function(e){return e.split(/[\u2013\u2014-]/g)}).flatMap(function(e){return e.split(/\n+/)}).map(function(e){return e.replace(/[*_]+/g,"").replace(/`([^`]+)`/g,"$1").replace(/[^\S\n]+/g," ").trim()})})},x=Object.keys(a).map(Number).sort(function(e,t){return e-t}),T=t.useMemo(function(){return s?g.length:s?0:Object.values(a).filter(function(e){return e>0}).length},[g,a]),b=function(e){if(c.current){var t=c.current.querySelectorAll(".rpv-search__highlights"),r=new Set;t.forEach(function(t){var n=t.getAttribute("data-testid"),o=parseInt((null==n?void 0:n.replace("search__highlights-",""))||"-1"),i=t.querySelectorAll(".rpv-search__highlight");o===e&&(i.forEach(function(e){var t=e,n=(t.getAttribute("title")||"").toLowerCase(),o=t.style.top,i="".concat(n,"_#$_").concat(o);r.has(i)?t.style.display="none":(r.add(i),t.style.display="")}),console.groupCollapsed("[debug: PDF highlight text]"),console.log("input->",u),console.log("processed text->",q),console.groupEnd())})}},I=function(e){c.current&&c.current.querySelectorAll(".rpv-search__highlights").forEach(function(t){var r=t.getAttribute("data-testid"),n=parseInt((null==r?void 0:r.replace(/search__highlights-/g,""))||"-1"),o=t.querySelectorAll(".rpv-search__highlight");e.has(n)||o.forEach(function(e){e.style.display="none"})})},q=u.map(function(e){return _(e)}).flat(),j=r.searchPlugin({keyword:q}),S=n.pageNavigationPlugin(),P=o.zoomPlugin(),w=j.jumpToMatch,A=S.jumpToPage,B=P.zoomTo,M=P.ZoomInButton,C=P.ZoomOutButton,E=P.ZoomPopover,F=i.highlightPlugin({renderHighlights:function(t){return e.jsx(e.Fragment,{children:g.filter(function(e){return e.pageNumber?e.pageNumber-1===t.pageIndex:e.pageIndex===t.pageIndex}).map(function(t,r){var n=g.findIndex(function(e){return e.pageIndex===t.pageIndex&&e.top===t.top&&e.left===t.left})===m;return e.jsx("div",{style:{position:"absolute",left:"".concat(t.left,"%"),top:"".concat(t.top,"%"),width:"".concat(t.width,"%"),height:"".concat(t.height,"%"),background:n?"#F6D739":"yellow",opacity:n?.7:.4,transition:"background 0.2s, opacity 0.2s"}},r)})})}}),H=function(){if(!v.current)try{w(0),v.current=!0;var e=g[0];e&&s&&Z(e.pageIndex,e.top)}catch(e){requestAnimationFrame(H)}},O=function(e,t){if(c.current&&c.current.querySelector(".rpv-core__viewer")){var r=-1,n=function(){var o,i,u=null===(o=c.current)||void 0===o?void 0:o.querySelector(".rpv-core__inner-pages");if(u){if(u.scrollTop!==r)return r=u.scrollTop,void setTimeout(n,100);var a=null===(i=c.current)||void 0===i?void 0:i.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(a){var l=a.querySelectorAll(".rpv-search__highlight")[t];if(l){var s=u.getBoundingClientRect(),g=l.getBoundingClientRect(),p=u.scrollTop+(g.top-s.top)-u.clientHeight/2+g.height/2;u.scrollTo({top:p,behavior:"smooth"})}}}};setTimeout(n,300)}},Z=function(e,t){if(c.current){var r=0,n=function(){var o,i;if(!(++r>60)){var u=null===(o=c.current)||void 0===o?void 0:o.querySelector(".rpv-core__inner-pages");if(u){var a=null===(i=c.current)||void 0===i?void 0:i.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(a){var l=a.getBoundingClientRect();if(0!==l.height){var s=u.getBoundingClientRect(),g=t/100*l.height,p=l.top-s.top+g;u.scrollTo({top:u.scrollTop+p-40,behavior:"smooth"})}else setTimeout(n,100)}else setTimeout(n,100)}else setTimeout(n,100)}};setTimeout(n,100)}},k=t.useMemo(function(){var e={};return x.forEach(function(t,r){var n=a[t];n>0&&(e[n]||(e[n]=[]),e[n].push(r))}),e},[x,a]),z=function(e){var t=a[x[e]];return(k[t]||[]).indexOf(e)};return{setHighlightIndex:h,highlightIndex:f,cursorIndex:m,setCursorIndex:y,orderedKeys:x,totalHighlights:T,getValidPosition:function(e){if(s)return e+1;if(!a)return 0;for(var t=0,r=0;r<=e;r++)a[x[r]]>0&&t++;return t},tryJump:H,jumpToPage:A,zoomTo:B,hideNonTargetHighlights:I,deduplicateHighlights:b,scrollToCoord:Z,plugins:[s?F:j,S,P],controls:{ZoomInButton:M,ZoomOutButton:C,ZoomPopover:E,goToNext:function(){if(s&&g)for(var e=function(e){var t=g[e];return y(e),A(t.pageIndex),setTimeout(function(){Z(t.pageIndex,t.top)},400),{value:void 0}},t=m+1;t<g.length;t++){var r=e(t);if("object"==typeof r)return r.value}else{var n=function(e){var t=x[e];if(a[t]>0){var r=a[t]-1,n=z(e);return y(e),A(a[t]-1),O(r,n),setTimeout(function(){b(r)},500),1===Object.keys(a).length&&I(l),{value:void 0}}};for(t=m+1;t<x.length;t++){var o=n(t);if("object"==typeof o)return o.value}}},goToPrevious:function(){if(s&&g)for(var e=function(e){var t=g[e];return y(e),A(t.pageIndex),setTimeout(function(){Z(t.pageIndex,t.top)},400),{value:void 0}},t=m-1;t>=0;t--){var r=e(t);if("object"==typeof r)return r.value}else{var n=function(e){var t=x[e];if(a[t]>0){var r=a[t]-1,n=z(e);return y(e),A(a[t]-1),O(r,n),setTimeout(function(){b(r)},500),1===Object.keys(a).length&&I(l),{value:void 0}}};for(t=m-1;t>=0;t--){var o=n(t);if("object"==typeof o)return o.value}}}}}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react"),r=require("@react-pdf-viewer/search"),n=require("@react-pdf-viewer/page-navigation"),o=require("@react-pdf-viewer/zoom");exports.PdfHighlightControls=function(i,a,u,l){var c=t.useState(0),s=c[0],p=c[1],f=t.useRef(!1),h=t.useState(0),g=h[0],v=h[1],d=function(e){if(!e)return[];return e.replace(/\]\s*\n\s*\(/g,"](").split(/\n+/).map(function(e){var t=e.trim(),r=(t=(t=t.replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u00A0\u2009\u202F]/g," ")).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 r?t.slice(r[0].length).trim():t}).flatMap(function(e){var t=e.match(/^\s*\|(.+)\|\s*$/);return t?t[1].split("|").map(function(e){return e.trim()}).filter(Boolean):[e]}).map(function(e){return e.replace(/&[#\w]+;/g,function(e){return t=e,(r=document.createElement("textarea")).innerHTML=t,r.value;var t,r}).replace(/<br\s*\/?>/gi,"\n").replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1").replace(/[^\S\n]+/g," ").trim()}).flatMap(function(e){return e.split(/\n+/)}).flatMap(function(e){for(var t,r=[],n=/([*_]{1,3})([^*_]+)\1|([*_]{1,3})/g,o=0;null!==(t=n.exec(e));){var i=e.slice(o,t.index).trim();i&&r.push(i),t[2]&&r.push(t[2].trim()),o=t.index+t[0].length}var a=e.slice(o).trim();return a&&r.push(a),r.flatMap(function(e){return e.split(/[\u2013\u2014-]/g)}).flatMap(function(e){return e.split(/\n+/)}).map(function(e){return e.replace(/[*_]+/g,"").replace(/`([^`]+)`/g,"$1").replace(/[^\S\n]+/g," ").trim()})})},m=Object.keys(a).map(Number).sort(function(e,t){return e-t}),_=Object.values(a).filter(function(e){return e>0}).length,y=function(t){if(u.current){var r=u.current.querySelectorAll(".rpv-search__highlights"),n=new Set,o=new Set,a=new Map;r.forEach(function(r){var u=r.getAttribute("data-testid"),l=parseInt((null==u?void 0:u.replace("search__highlights-",""))||"-1"),c=r.querySelectorAll(".rpv-search__highlight");if(l===t){var s=new Set;c.forEach(function(t){var r=t,i=(r.getAttribute("title")||"").toLowerCase(),u=r.style.top,l="".concat(i,"_#$_").concat(u);if(r.style.display="none",n.has(l))if(a.has(l)){var c=a.get(l);a.set(l,e.__spreadArray(e.__spreadArray([],c,!0),[r],!1))}else a.set(l,[r]);else{if(n.add(l),a.has(l)){c=a.get(l);a.set(l,e.__spreadArray(e.__spreadArray([],c,!0),[r],!1))}else a.set(l,[r]);o.has(i)?s.add(l):o.add(i)}});var p=A(b,a);p.forEach(function(e){var t=new Set;e.elements.forEach(function(e){var r=e.style.left,n=e.style.width,o="".concat(r,"_").concat(n);t.has(o)?e.style.display="none":(t.add(o),e.style.display="")})}),console.groupCollapsed("[debug: PDF highlight text]"),console.log("input->",i),console.log("processed text->",b),console.log("dom->processed elements->",p),console.groupEnd()}})}},A=function(e,t){for(var r=Array.from(t.entries()),n=0,o=[],i=function(e){return e.toLowerCase().replace(/[^\w\s]/g,"").replace(/\s+/g," ").trim()},a=0;a<e.length;a++)for(var u=e[a],l=i(u);n<r.length;){var c=r[n],s=c[0],p=c[1],f=i(s.split("_#$_")[0]),h=e[a+1],g=r[n+1],v=h?i(h):null,d=g?i(g[0].split("_#$_")[0]):null,m=l===f,_=n+1<r.length&&f===i(r[n+1][0].split("_#$_")[0]),y=m;if(m&&_&&v&&(y=v===d),y){o.push({chunk:u,matchedKey:s,elements:p}),n++;break}n++}return o},T=function(e){u.current&&u.current.querySelectorAll(".rpv-search__highlights").forEach(function(t){var r=t.getAttribute("data-testid"),n=parseInt((null==r?void 0:r.replace(/search__highlights-/g,""))||"-1"),o=t.querySelectorAll(".rpv-search__highlight");e.has(n)||o.forEach(function(e){e.style.display="none"})})},b=i.map(function(e){return d(e)}).flat(),x=r.searchPlugin({keyword:b}),S=n.pageNavigationPlugin(),w=o.zoomPlugin(),q=x.jumpToMatch,P=S.jumpToPage,j=w.zoomTo,E=w.ZoomInButton,M=w.ZoomOutButton,B=w.ZoomPopover,I=function(){if(!f.current)try{q(0),f.current=!0}catch(e){requestAnimationFrame(I)}},O=function(e,t){if(u.current&&u.current.querySelector(".rpv-core__viewer")){var r=-1,n=function(){var o,i,a=null===(o=u.current)||void 0===o?void 0:o.querySelector(".rpv-core__inner-pages");if(a){if(a.scrollTop!==r)return r=a.scrollTop,void setTimeout(n,100);var l=null===(i=u.current)||void 0===i?void 0:i.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(l){var c=l.querySelectorAll(".rpv-search__highlight")[t];if(c){var s=a.getBoundingClientRect(),p=c.getBoundingClientRect(),f=a.scrollTop+(p.top-s.top)-a.clientHeight/2+p.height/2;a.scrollTo({top:f,behavior:"smooth"})}}}};setTimeout(n,300)}},Z=t.useMemo(function(){var e={};return m.forEach(function(t,r){var n=a[t];n>0&&(e[n]||(e[n]=[]),e[n].push(r))}),e},[m,a]),C=function(e){var t=a[m[e]];return(Z[t]||[]).indexOf(e)};return{setHighlightIndex:p,highlightIndex:s,cursorIndex:g,setCursorIndex:v,orderedKeys:m,totalHighlights:_,getValidPosition:function(e){for(var t=0,r=0;r<=e;r++){var n=m[r];a[n]>0&&t++}return t},tryJump:I,jumpToPage:P,zoomTo:j,hideNonTargetHighlights:T,deduplicateHighlights:y,plugins:[x,S,w],controls:{ZoomInButton:E,ZoomOutButton:M,ZoomPopover:B,goToNext:function(){for(var e=function(e){var t=m[e];if(a[t]>0){var r=a[t]-1,n=C(e);return v(e),P(a[t]-1),O(r,n),setTimeout(function(){y(r)},500),1===Object.keys(a).length&&T(l),{value:void 0}}},t=g+1;t<m.length;t++){var r=e(t);if("object"==typeof r)return r.value}},goToPrevious:function(){for(var e=function(e){var t=m[e];if(a[t]>0){var r=a[t]-1,n=C(e);return v(e),P(a[t]-1),O(r,n),setTimeout(function(){y(r)},500),1===Object.keys(a).length&&T(l),{value:void 0}}},t=g-1;t>=0;t--){var r=e(t);if("object"==typeof r)return r.value}}}}};
2
2
  //# sourceMappingURL=usePdfHighlight.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".TableCitationContent-module_container__OfivB{background-color:var(--cite-bg-color,#fff);border:1px solid var(--cite-border-color,#e5e7eb);display:flex;flex-direction:column;font-family:var(--cite-font-family,Inter,system-ui,sans-serif);height:100%;min-height:200px;overflow:hidden;width:100%}.TableCitationContent-module_header__ANgC5{align-items:center;border-bottom:1px solid var(--cite-border-color,#e5e7eb);display:flex;justify-content:space-between;padding:.5rem 1rem}.TableCitationContent-module_title__UzB8i{color:var(--cite-text-primary,#1f2937);font-size:1.1rem;font-weight:500;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.TableCitationContent-module_headerRight__GLyqb{align-items:center;display:flex;gap:1rem}.TableCitationContent-module_divider__SYxWE{align-self:stretch;background-color:var(--cite-border-color,#e5e7eb);margin-bottom:-.5rem;margin-top:-.5rem;width:1px}.TableCitationContent-module_closeBtn__lTrT4{align-items:center;color:var(--cite-text-secondary,#6b7280);cursor:pointer;display:flex;transition:opacity .2s}.TableCitationContent-module_ccloseBtn__Gp3l5:hover{opacity:.7}.TableCitationContent-module_tableScroll__Gv2KN{flex:1;overflow:auto;padding:.75rem 1rem}.TableCitationContent-module_table__ZIHBi{border-collapse:collapse;font-size:.875rem;min-width:100%;width:max-content}.TableCitationContent-module_table__ZIHBi td,.TableCitationContent-module_table__ZIHBi th{border:1px solid var(--cite-border-color,#e5e7eb);padding:.5rem .75rem}.TableCitationContent-module_table__ZIHBi th{background-color:var(--cite-header-bg,#f9fafb);color:var(--cite-text-header,#374151);font-weight:600;position:sticky;top:0}.TableCitationContent-module_highlightCell__1RESY{background-color:var(--cite-highlight-color,#f7ef9e)!important}.TableCitationContent-module_failedCell__-Q2WX{background-color:var(--cite-error-bg,#fee2e2);color:var(--cite-error-text,#991b1b)}.TableCitationContent-module_actions__yvyTj{align-items:center;display:flex;gap:.5rem}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={container:"TableCitationContent-module_container__OfivB",header:"TableCitationContent-module_header__ANgC5",title:"TableCitationContent-module_title__UzB8i",headerRight:"TableCitationContent-module_headerRight__GLyqb",divider:"TableCitationContent-module_divider__SYxWE",closeBtn:"TableCitationContent-module_closeBtn__lTrT4",ccloseBtn:"TableCitationContent-module_ccloseBtn__Gp3l5",tableScroll:"TableCitationContent-module_tableScroll__Gv2KN",table:"TableCitationContent-module_table__ZIHBi",highlightCell:"TableCitationContent-module_highlightCell__1RESY",failedCell:"TableCitationContent-module_failedCell__-Q2WX",actions:"TableCitationContent-module_actions__yvyTj"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".TableCitationContent-module_container__OfivB{background-color:var(--cite-bg-color,#fff);border:1px solid var(--cite-border-color,#e5e7eb);display:flex;flex-direction:column;font-family:var(--cite-font-family,Inter,system-ui,sans-serif);height:100%;min-height:200px;width:100%}.TableCitationContent-module_header__ANgC5{align-items:center;border-bottom:1px solid var(--cite-border-color,#e5e7eb);display:flex;justify-content:space-between;padding:.5rem 1rem}.TableCitationContent-module_title__UzB8i{color:var(--cite-text-primary,#1f2937);font-size:1.1rem;font-weight:500;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.TableCitationContent-module_headerRight__GLyqb{align-items:center;display:flex;gap:1rem}.TableCitationContent-module_divider__SYxWE{align-self:stretch;background-color:var(--cite-border-color,#e5e7eb);margin-bottom:-.5rem;margin-top:-.5rem;width:1px}.TableCitationContent-module_closeBtn__lTrT4{align-items:center;color:var(--cite-text-secondary,#6b7280);cursor:pointer;display:flex;transition:opacity .2s}.TableCitationContent-module_ccloseBtn__Gp3l5:hover{opacity:.7}.TableCitationContent-module_tableWrapper__nst7D{overflow:auto;padding:.75rem 1rem;width:100%}.TableCitationContent-module_table__ZIHBi{border-collapse:collapse;font-size:.875rem;min-width:100%;width:max-content}.TableCitationContent-module_table__ZIHBi td,.TableCitationContent-module_table__ZIHBi th{border:1px solid var(--cite-border-color,#e5e7eb);padding:.5rem .75rem}.TableCitationContent-module_table__ZIHBi th{background-color:var(--cite-header-bg,#f9fafb);color:var(--cite-text-header,#374151);font-weight:600;position:sticky;top:0}.TableCitationContent-module_highlightCell__1RESY{background-color:var(--cite-highlight-color,#f7ef9e)!important}.TableCitationContent-module_failedCell__-Q2WX{background-color:var(--cite-error-bg,#fee2e2);color:var(--cite-error-text,#991b1b)}.TableCitationContent-module_actions__yvyTj{align-items:center;display:flex;gap:.5rem}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={container:"TableCitationContent-module_container__OfivB",header:"TableCitationContent-module_header__ANgC5",title:"TableCitationContent-module_title__UzB8i",headerRight:"TableCitationContent-module_headerRight__GLyqb",divider:"TableCitationContent-module_divider__SYxWE",closeBtn:"TableCitationContent-module_closeBtn__lTrT4",ccloseBtn:"TableCitationContent-module_ccloseBtn__Gp3l5",tableWrapper:"TableCitationContent-module_tableWrapper__nst7D",table:"TableCitationContent-module_table__ZIHBi",highlightCell:"TableCitationContent-module_highlightCell__1RESY",failedCell:"TableCitationContent-module_failedCell__-Q2WX",actions:"TableCitationContent-module_actions__yvyTj"};
2
2
  //# sourceMappingURL=TableCitationContent.module.css.js.map
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"),r=require("./features/Bookemon/Bookemon.js"),o=require("./features/PdfEditorCitation/PdfEditorCitation.js"),a=require("./features/CitationRenderer/CitationRenderer.js"),n=require("./features/CitationRenderer/MarkdownRenderer.js"),s=require("./features/CodeCitation/_components/CodeEditor.js"),C=require("./features/PaginatedTable/PaginatedTable.js"),u=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"),g=require("./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js"),x=require("./features/RequirementAiCitations/FileCitation/FileCitationContent.js"),j=require("./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js"),c=require("./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js"),R=require("./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js"),E=require("./features/TableCitation/TableCitationContent.js"),m=require("./features/CitationViewer/CitationsViewer.js"),D=require("./features/ExcelCitation/ExcelCitations.js"),T=require("./features/ScannedDocCitation/ScannedDocCitation.js"),A=require("./features/ChatDrawer/ChatDrawer.js"),I=require("./features/ChatDrawer/constants/ChatDrawer.js");exports.CodeCitation=e.default,exports.ProjectAccordian=t.default,exports.BookCitation=i.default,exports.Bookemon=r.default,exports.PdfCitation=o.PdfEditorCitation,exports.CitationRenderer=a.default,exports.MarkdownRenderer=n.default,Object.defineProperty(exports,"DiagnosticSeverity",{enumerable:!0,get:function(){return s.DiagnosticSeverity}}),exports.PaginatedTable=C.default,exports.NonWebReasoningComponent=u.default,exports.ChatCitation=d.default,exports.CognitiveDecisioningCard=f.default,exports.PdfViewer=l.default,exports.FaqCitation=p.default,exports.ImageCitationContent=q.default,exports.VideoCitationContent=g.default,exports.FileCitationContent=x.default,exports.WebCitationWithImageContent=j.default,exports.MarkdownWithImageCitation=c.default,exports.AiReasoningCitation=R.default,exports.TableCitationContent=E.default,exports.CitationsViewer=m.default,exports.ExcelCitation=D.default,exports.ScannedDocCitation=T.default,exports.ChatDrawer=A.default,exports.FILE_INGESTION_STATUS=I.FILE_INGESTION_STATUS,exports.SUMMARY_EXPAND_HEIGHT_NUDGE=I.SUMMARY_EXPAND_HEIGHT_NUDGE,exports.TRUNCATE_THRESHOLD=I.TRUNCATE_THRESHOLD;
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"),r=require("./features/Bookemon/Bookemon.js"),o=require("./features/PdfEditorCitation/PdfEditorCitation.js"),a=require("./features/CitationRenderer/CitationRenderer.js"),n=require("./features/CitationRenderer/MarkdownRenderer.js"),s=require("./features/CodeCitation/_components/CodeEditor.js"),C=require("./features/PaginatedTable/PaginatedTable.js"),u=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js"),d=require("./features/ChatCitation/ChatCitationRenderer.js"),f=require("./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js"),p=require("./features/PdfViewer/PdfViewer.js"),l=require("./features/CognitiveDecisioning/FaqCitation/FaqCitation.js"),q=require("./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js"),x=require("./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js"),j=require("./features/RequirementAiCitations/FileCitation/FileCitationContent.js"),c=require("./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js"),g=require("./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js"),R=require("./features/TableCitation/TableCitationContent.js"),A=require("./features/CitationViewer/CitationsViewer.js"),m=require("./features/ExcelCitation/ExcelCitations.js"),E=require("./features/ScannedDocCitation/ScannedDocCitation.js"),D=require("./features/ChatDrawer/ChatDrawer.js"),T=require("./features/ChatDrawer/constants/ChatDrawer.js"),P=require("./features/AiRedLineCompare/AiRedLineCompare.js");exports.CodeCitation=e.default,exports.ProjectAccordian=t.default,exports.BookCitation=i.default,exports.Bookemon=r.default,exports.PdfCitation=o.PdfEditorCitation,exports.CitationRenderer=a.default,exports.MarkdownRenderer=n.default,Object.defineProperty(exports,"DiagnosticSeverity",{enumerable:!0,get:function(){return s.DiagnosticSeverity}}),exports.PaginatedTable=C.default,exports.NonWebReasoningComponent=u.default,exports.ChatCitation=d.default,exports.CognitiveDecisioningCard=f.default,exports.PdfViewer=p.default,exports.FaqCitation=l.default,exports.ImageCitationContent=q.default,exports.VideoCitationContent=x.default,exports.FileCitationContent=j.default,exports.WebCitationWithImageContent=c.default,exports.AiReasoningCitation=g.default,exports.TableCitationContent=R.default,exports.CitationsViewer=A.default,exports.ExcelCitation=m.default,exports.ScannedDocCitation=E.default,exports.ChatDrawer=D.default,exports.FILE_INGESTION_STATUS=T.FILE_INGESTION_STATUS,exports.SUMMARY_EXPAND_HEIGHT_NUDGE=T.SUMMARY_EXPAND_HEIGHT_NUDGE,exports.TRUNCATE_THRESHOLD=T.TRUNCATE_THRESHOLD,exports.AiRedLineCompare=P.AiRedLineCompare;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as i,jsxs as t}from"react/jsx-runtime";import n,{useState as o,useMemo as r,useCallback as d}from"react";import{FileText as l,ChevronUp as a,ChevronDown as p,ThumbsDown as s}from"lucide-react";import{transformContractComparisons as c}from"./utils/helpers.js";import x from"react-markdown";var h=function(n){var o=n.type,r=n.label,d={display:"inline-flex",alignItems:"center",gap:"4px",whiteSpace:"nowrap",borderRadius:"9999px",padding:"4px 12px",fontSize:"12px",fontWeight:600};switch(o){case"similarity":return i("span",e({style:e(e({},d),{border:"1px solid #C4B5FD",backgroundColor:"#F5F3FF",color:"#6D28D9"})},{children:r}));case"no_deviation":return i("span",e({style:e(e({},d),{border:"1px solid #A7F3D0",backgroundColor:"#ECFDF3",color:"#027A48"})},{children:r}));case"deviation":return t("span",e({style:e(e({},d),{gap:"6px",border:"1px solid #FECACA",backgroundColor:"#FEF2F2",color:"#DC2626"})},{children:[r,i("span",e({style:{borderRadius:"9999px",backgroundColor:"#FEE2E2",padding:"2px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:i(s,{style:{width:"12px",height:"12px"}})})),i(p,{style:{width:"12px",height:"12px",color:"#DC2626"}})]}));default:return null}};function u(t,n,o){return t&&t.length>0?i("div",e({style:{display:"flex",flexDirection:"column",gap:"8px"}},{children:t.map(function(t){return i("p",e({style:{fontSize:"13px",lineHeight:"1.625",color:"#374151",margin:0}},{children:i(x,e({components:o},{children:t.text}))}),t.id)})})):n||i("p",e({style:{fontSize:"13px",fontStyle:"italic",color:"#9CA3AF",margin:0}},{children:"No content available"}))}var g=function(s){var g=s.leftDocumentName,f=void 0===g?"Uploaded Contract":g,F=s.rightDocumentName,y=void 0===F?"Template":F,b=s.overallSimilarity,m=void 0===b?"Similarity":b,v=s.rawMappingData,C=s.deviationMappingData,w=s.defaultExpandedIds,E=void 0===w?[]:w,A=s.onSectionToggle,k=s.showDeviationBar,B=void 0===k||k,D=s.centerColumnWidth,z=void 0===D?15:D,I=s.className,S=void 0===I?"":I,T=s.style,R=c(v),N=o(function(){return new Set(null!=E?E:[R[0].id])}),j=N[0],W=N[1],L=r(function(){return{p:function(t){var n=t.children;return i("div",e({className:"inline",style:{padding:"8px 0px 8px 0px"}},{children:n}))},strong:function(t){var n=t.children;return i("strong",e({className:"font-semibold"},{children:n}))},em:function(t){var n=t.children;return i("em",e({className:"italic"},{children:n}))}}},[]),M=o(!0),_=M[0],G=M[1],H=d(function(e){W(function(i){var t=new Set(i),n=!t.has(e);return n?t.add(e):t.delete(e),null==A||A(e,n),t})},[A]),U=function(){return G(function(e){return!e})},q=B?"1fr minmax(80px, ".concat(z,"%) 1fr"):"1fr 1fr";return i("div",e({className:S,style:e({display:"flex",flexDirection:"column",height:"100%",width:"100%",overflow:"auto",fontFamily:"sans-serif",background:"#FFFFFF"},T)},{children:i("div",e({style:{width:"100%",padding:"24px 16px 40px"}},{children:t("div",e({style:{position:"relative",display:"grid",gridTemplateColumns:q,rowGap:"0px"}},{children:[_&&i("div",{style:{pointerEvents:"none",position:"absolute",top:56,bottom:0,left:0,width:B?"calc((100% - ".concat(z,"%) / 2)"):"50%",zIndex:0,border:"2px dashed #A0AAB4",borderTop:"none",borderRadius:"0 0 12px 12px",background:"#FFFFFF"}}),_&&i("div",{style:{pointerEvents:"none",position:"absolute",top:56,bottom:0,right:0,width:B?"calc((100% - ".concat(z,"%) / 2)"):"50%",zIndex:0,border:"1px solid #E5E7EB",borderTop:"none",background:"#F7F8FA",borderRadius:"0 0 12px 12px"}}),t("div",e({style:{position:"relative",zIndex:10,display:"flex",alignItems:"center",gap:"12px",padding:"0 16px",height:56,cursor:"pointer",background:"#F7F8FA",border:"2px dashed #A0AAB4",borderBottom:_?"1px dashed #A0AAB4":"2px dashed #A0AAB4",borderRadius:_?"12px 12px 0 0":"12px",transition:"border-radius 0.2s ease"},onClick:U},{children:[i(l,{style:{width:"18px",height:"18px",color:"#4B5563"}}),i("span",e({style:{flex:1,fontSize:"15px",fontWeight:700,color:"#19213D"}},{children:f})),i(_?a:p,{style:{width:"20px",height:"20px",color:"#6B7280"}})]})),B&&t("div",e({style:{position:"relative",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center"}},{children:[i("div",{style:{position:"absolute",top:"50%",left:0,right:0,height:"1.5px",background:"#C4B5FD",opacity:.5}}),i("div",e({style:{position:"relative",zIndex:11,background:"#FFFFFF",padding:"0 8px"}},{children:i(h,{type:"similarity",label:m})}))]})),t("div",e({style:{position:"relative",zIndex:10,display:"flex",alignItems:"center",gap:"12px",padding:"0 16px",height:56,cursor:"pointer",background:"#F7F8FA",border:"1px solid #E5E7EB",borderRadius:_?"12px 12px 0 0":"12px",transition:"border-radius 0.2s ease"},onClick:U},{children:[i(l,{style:{width:"18px",height:"18px",color:"#5928ED"}}),i("span",e({style:{flex:1,fontSize:"15px",fontWeight:600,color:"#5928ED"}},{children:y})),i(_?a:p,{style:{width:"20px",height:"20px",color:"#6B7280"}})]})),_&&R.map(function(o,r){var d,l,s,c=j.has(o.id),g=0===r?"42px":"38px";return t(n.Fragment,{children:[i("div",e({style:{position:"relative",zIndex:10,padding:"12px 16px"}},{children:t("div",e({style:{borderRadius:"8px",border:"1px solid #E5E7EB",background:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"}},{children:[t("button",e({onClick:function(){return H(o.id)},style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"16px",background:"transparent",border:"none",cursor:"pointer"}},{children:[i("span",e({style:{fontSize:"13px",fontWeight:600,color:"#111827"}},{children:i(x,e({components:L},{children:o.leftTitle}))})),i(c?a:p,{size:16,color:"#6B7280"})]})),c&&i("div",e({style:{borderTop:"1px solid #F3F4F6",padding:"16px"}},{children:u(null!==(d=o.leftClauses)&&void 0!==d?d:[],o.contentLeft,L)}))]}))})),B&&t("div",e({style:{position:"relative",zIndex:10}},{children:[i("div",{style:{position:"absolute",left:"-16px",right:"-16px",top:g,height:"1.5px",background:(s=C[r].matchType,"deviation"===s?"#FECACA":"no_deviation"===s?"#77BB9D":"#C4B5FD")}}),i("div",e({style:{position:"absolute",left:"50%",transform:"translate(-50%, -50%)",top:g,background:"#FFFFFF",padding:"0 8px"}},{children:i(h,{type:C[r].matchType,label:C[r].matchLabel})}))]})),i("div",e({style:{position:"relative",zIndex:10,padding:"12px 16px"}},{children:t("div",e({style:{borderRadius:"8px",border:"1px solid #E5E7EB",background:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"}},{children:[t("button",e({onClick:function(){return H(o.id)},style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"16px",background:"transparent",border:"none",cursor:"pointer"}},{children:[i("span",e({style:{fontSize:"13px",fontWeight:600,color:"#111827"}},{children:i(x,e({components:L},{children:o.rightTitle}))})),i(c?a:p,{size:16,color:"#6B7280"})]})),c&&i("div",e({style:{borderTop:"1px solid #F3F4F6",padding:"16px"}},{children:u(null!==(l=o.rightClauses)&&void 0!==l?l:[],o.contentRight,L)}))]}))}))]},o.id)})]}))}))}))};export{g as AiRedLineCompare,g as default};
1
+ import{__assign as e}from"tslib";import{jsx as i,jsxs as t}from"react/jsx-runtime";import n,{useState as o,useMemo as r,useCallback as l}from"react";import{FileText as d,ChevronUp as a,ChevronDown as p,ThumbsDown as s}from"lucide-react";import{transformContractComparisons as c}from"./utils/helpers.js";import x from"react-markdown";var h=function(n){var o=n.type,r=n.label,l=n.onClick,d=n.isOpen,c={display:"inline-flex",alignItems:"center",gap:"4px",whiteSpace:"nowrap",borderRadius:"9999px",padding:"4px 12px",fontSize:"12px",fontWeight:600};switch(o){case"similarity":return t("span",e({style:e(e({},c),{border:"1px solid #C4B5FD",backgroundColor:"#F5F3FF",color:"#6D28D9",cursor:l?"pointer":"default"}),onClick:l},{children:[r,l&&i(d?a:p,{style:{width:"12px",height:"12px",color:"#6D28D9"}})]}));case"no_deviation":return t("span",e({style:e(e({},c),{border:"1px solid #A7F3D0",backgroundColor:"#ECFDF3",color:"#027A48",cursor:l?"pointer":"default"}),onClick:l},{children:[r,l&&i(d?a:p,{style:{width:"12px",height:"12px",color:"#027A48"}})]}));case"deviation":return t("span",e({style:e(e({},c),{gap:"6px",border:"1px solid #FECACA",backgroundColor:"#FEF2F2",color:"#DC2626",cursor:"pointer"}),onClick:l},{children:[r,i("span",e({style:{borderRadius:"9999px",backgroundColor:"#FEE2E2",padding:"2px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:i(s,{style:{width:"12px",height:"12px"}})})),i(d?a:p,{style:{width:"12px",height:"12px",color:"#DC2626"}})]}));default:return null}};function u(t,n,o){return t&&t.length>0?i("div",e({style:{display:"flex",flexDirection:"column",gap:"8px"}},{children:t.map(function(t){return i("p",e({style:{fontSize:"13px",lineHeight:"1.625",color:"#374151",margin:0}},{children:i(x,e({components:o},{children:t.text}))}),t.id)})})):n||i("p",e({style:{fontSize:"13px",fontStyle:"italic",color:"#9CA3AF",margin:0}},{children:"No content available"}))}var g=function(s){var g=s.leftDocumentName,f=void 0===g?"Uploaded Contract":g,y=s.rightDocumentName,F=void 0===y?"Template":y,v=s.overallSimilarity,b=void 0===v?"Similarity":v,m=s.rawMappingData,C=s.deviationMappingData,w=s.defaultExpandedIds,k=void 0===w?[]:w,A=s.onSectionToggle,E=s.onBadgeClick,B=s.showDeviationBar,D=void 0===B||B,z=s.centerColumnWidth,I=void 0===z?15:z,S=s.className,T=void 0===S?"":S,R=s.style,N=s.activeBadgeId,j=c(m),W=o(function(){return new Set(null!=k?k:[j[0].id])}),_=W[0],O=W[1],L=o(!1),M=L[0],G=L[1],H=o(new Set),U=H[0],q=H[1],J=r(function(){return{p:function(t){var n=t.children;return i("div",e({className:"inline",style:{padding:"8px 0px 8px 0px"}},{children:n}))},strong:function(t){var n=t.children;return i("strong",e({className:"font-semibold"},{children:n}))},em:function(t){var n=t.children;return i("em",e({className:"italic"},{children:n}))}}},[]),K=o(!0),P=K[0],Q=K[1],V=l(function(e){O(function(i){var t=new Set(i),n=!t.has(e);return n?t.add(e):t.delete(e),null==A||A(e,n),t})},[A]),X=function(){return Q(function(e){return!e})},Y=D?"1fr minmax(80px, ".concat(I,"%) 1fr"):"1fr 1fr";return i("div",e({className:T,style:e({display:"flex",flexDirection:"column",height:"100%",width:"100%",overflow:"auto",fontFamily:"sans-serif",background:"#FFFFFF"},R)},{children:i("div",e({style:{width:"100%",padding:"24px 16px 40px"}},{children:t("div",e({style:{position:"relative",display:"grid",gridTemplateColumns:Y,rowGap:"0px"}},{children:[P&&i("div",{style:{pointerEvents:"none",position:"absolute",top:56,bottom:0,left:0,width:D?"calc((100% - ".concat(I,"%) / 2)"):"50%",zIndex:0,border:"2px dashed #A0AAB4",borderTop:"none",borderRadius:"0 0 12px 12px",background:"#FFFFFF"}}),P&&i("div",{style:{pointerEvents:"none",position:"absolute",top:56,bottom:0,right:0,width:D?"calc((100% - ".concat(I,"%) / 2)"):"50%",zIndex:0,border:"1px solid #E5E7EB",borderTop:"none",background:"#F7F8FA",borderRadius:"0 0 12px 12px"}}),t("div",e({style:{position:"relative",zIndex:10,display:"flex",alignItems:"center",gap:"12px",padding:"0 16px",height:56,cursor:"pointer",background:"#F7F8FA",border:"2px dashed #A0AAB4",borderBottom:P?"1px dashed #A0AAB4":"2px dashed #A0AAB4",borderRadius:P?"12px 12px 0 0":"12px",transition:"border-radius 0.2s ease"},onClick:X},{children:[i(d,{style:{width:"18px",height:"18px",color:"#4B5563"}}),i("span",e({style:{flex:1,fontSize:"15px",fontWeight:700,color:"#19213D"}},{children:f})),i(P?a:p,{style:{width:"20px",height:"20px",color:"#6B7280"}})]})),D&&t("div",e({style:{position:"relative",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center"}},{children:[i("div",{style:{position:"absolute",top:"50%",left:0,right:0,height:"1.5px",background:"#C4B5FD",opacity:.5}}),i("div",e({style:{position:"relative",zIndex:11,background:"#FFFFFF",padding:"0 8px"}},{children:i(h,{type:"similarity",label:b,isOpen:void 0!==N?"overall_similarity"===N:M,onClick:function(){var e=!("overall_similarity"===N);void 0===N&&G(e),null==E||E("overall_similarity",e)}})}))]})),t("div",e({style:{position:"relative",zIndex:10,display:"flex",alignItems:"center",gap:"12px",padding:"0 16px",height:56,cursor:"pointer",background:"#F7F8FA",border:"1px solid #E5E7EB",borderRadius:P?"12px 12px 0 0":"12px",transition:"border-radius 0.2s ease"},onClick:X},{children:[i(d,{style:{width:"18px",height:"18px",color:"#5928ED"}}),i("span",e({style:{flex:1,fontSize:"15px",fontWeight:600,color:"#5928ED"}},{children:F})),i(P?a:p,{style:{width:"20px",height:"20px",color:"#6B7280"}})]})),P&&j.map(function(o,r){var l,d,s,c=_.has(o.id),g=0===r?"42px":"38px";return t(n.Fragment,{children:[i("div",e({style:{position:"relative",zIndex:10,padding:"12px 16px"}},{children:t("div",e({style:{borderRadius:"8px",border:"1px solid #E5E7EB",background:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"}},{children:[t("button",e({onClick:function(){return V(o.id)},style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"16px",background:"transparent",border:"none",cursor:"pointer"}},{children:[i("span",e({style:{fontSize:"13px",fontWeight:600,color:"#111827"}},{children:i(x,e({components:J},{children:o.leftTitle}))})),i(c?a:p,{size:16,color:"#6B7280"})]})),c&&i("div",e({style:{borderTop:"1px solid #F3F4F6",padding:"16px"}},{children:u(null!==(l=o.leftClauses)&&void 0!==l?l:[],o.contentLeft,J)}))]}))})),D&&t("div",e({style:{position:"relative",zIndex:10}},{children:[i("div",{style:{position:"absolute",left:"-16px",right:"-16px",top:g,height:"1.5px",background:(s=C[r].matchType,"deviation"===s?"#FECACA":"no_deviation"===s?"#77BB9D":"#C4B5FD")}}),i("div",e({style:{position:"absolute",left:"50%",transform:"translate(-50%, -50%)",top:g,background:"#FFFFFF",padding:"0 8px"}},{children:i(h,{type:C[r].matchType,label:C[r].matchLabel,isOpen:void 0!==N?N===o.id:U.has(o.id),onClick:function(){var e=!(N===o.id);void 0===N&&q(function(i){var t=new Set(i);return e?t.add(o.id):t.delete(o.id),t}),null==E||E(o.id,e)}})}))]})),i("div",e({style:{position:"relative",zIndex:10,padding:"12px 16px"}},{children:t("div",e({style:{borderRadius:"8px",border:"1px solid #E5E7EB",background:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"}},{children:[t("button",e({onClick:function(){return V(o.id)},style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"16px",background:"transparent",border:"none",cursor:"pointer"}},{children:[i("span",e({style:{fontSize:"13px",fontWeight:600,color:"#111827"}},{children:i(x,e({components:J},{children:o.rightTitle}))})),i(c?a:p,{size:16,color:"#6B7280"})]})),c&&i("div",e({style:{borderTop:"1px solid #F3F4F6",padding:"16px"}},{children:u(null!==(d=o.rightClauses)&&void 0!==d?d:[],o.contentRight,J)}))]}))}))]},o.id)})]}))}))}))};export{g as AiRedLineCompare,g as default};
2
2
  //# sourceMappingURL=AiRedLineCompare.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as t,jsxs as i}from"react/jsx-runtime";import{SpecialZoomLevel as o}from"@react-pdf-viewer/core";import r from"./PdfContainer.js";import n from"./PdfToolbar.js";import{pdfStyles as s}from"./PdfStyle.js";import{PdfHighlightControls as l}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,useMemo as c}from"react";var u=function(u){var d,f=u.pdfUrl,g=u.highlightText,p=u.highlightPages,m=u.highlightCordinatePages,h=u.jumpToPageValue,v=void 0===h?0:h,y=u.pdfName,x=u.onClose,T=u.customStyles,C=u.customClasses,P=u.customIcons,b=u.useCoordinates,w=a(null),S=c(function(){if(b)return new Set(m.map(function(e){return e.pageIndex}));var e=new Set;return Object.values(p).forEach(function(t){t>0&&e.add(t-1)}),e},[p]),I=(d=g)&&0!==d.length?d.filter(function(e){return!d.some(function(t){return t!==e&&t.includes(e)})}):d,j=l(I,b?{}:p,w,S,b,b?m:[]),H=j.highlightIndex,A=j.cursorIndex,_=j.setCursorIndex,F=j.orderedKeys,V=j.totalHighlights,q=j.getValidPosition,N=j.tryJump,R=j.jumpToPage,z=j.zoomTo,B=j.plugins,U=j.controls,D=j.hideNonTargetHighlights,E=j.deduplicateHighlights,O=q(A);if(!f)return t("div",e({style:e(e({},s.emptyState),null==T?void 0:T.emptyState)},{children:"PDF is not available for this selection"}));return i("div",e({ref:w,className:(null==C?void 0:C.pdfViewerWrapper)||"",style:e(e(e({},s.pdfViewer),{display:"flex",flexDirection:"column",height:"100%",width:"100%",backgroundColor:"#FAFAFA"}),null==T?void 0:T.pdfViewer)},{children:[t(n,{highlightIndex:H,totalHighlights:V,controls:U,currentPosition:O,pdfName:y,onClose:x,pdfUrl:f,viewerRef:w,customStyles:T,customClasses:C,customIcons:P}),t(r,{pdfUrl:f,plugins:B,customStyles:T,onLoad:function(){if(z(o.ActualSize),v>0){var e=v-1,t=F[e],i=p[t],r=m[e];_(e),console.log(r,"cordinateTargetHighlight"),b&&r.pageIndex>0&&R(r.pageIndex),i>0&&(setTimeout(function(){D(S),E(i-1)},1e3),b||R(i-1))}requestAnimationFrame(function(){N(),b||function(){if(w.current){var e=v-1,t=F[e],i=p[t],o=i>0?i-1:0,r={};F.forEach(function(e,t){var i=p[e];i>0&&(r[i]||(r[i]=[]),r[i].push(t))});var n=(r[i]||[]).indexOf(e),s=0,l=function(){var e,t;if(!(++s>40)){var i=null===(e=w.current)||void 0===e?void 0:e.querySelector(".rpv-core__inner-pages");if(i){var r=null===(t=w.current)||void 0===t?void 0:t.querySelector('[data-testid="core__page-layer-'.concat(o,'"]'));if(r){var a=i.getBoundingClientRect(),c=r.getBoundingClientRect();if(c.top<a.bottom&&c.bottom>a.top){var u=r.querySelectorAll(".rpv-search__highlight")[n];if(u){var d=u.getBoundingClientRect(),f=i.scrollTop+(d.top-a.top)-i.clientHeight/2+d.height/2;i.scrollTo({top:f,behavior:"smooth"})}else setTimeout(l,100)}else setTimeout(l,100)}else setTimeout(l,100)}else setTimeout(l,100)}};setTimeout(l,500)}}()})},onPageChange:function(e){var t=e.currentPage;S.has(t)?(E(t),D(S)):D(S)}})]}))};export{u as default};
1
+ import{__assign as e}from"tslib";import{jsx as t,jsxs as i}from"react/jsx-runtime";import{SpecialZoomLevel as o}from"@react-pdf-viewer/core";import r from"./PdfContainer.js";import n from"./PdfToolbar.js";import{pdfStyles as s}from"./PdfStyle.js";import{PdfHighlightControls as l}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,useMemo as c}from"react";var u=function(u){var d,f=u.pdfUrl,m=u.highlightText,p=u.highlightPages,g=u.jumpToPageValue,h=void 0===g?0:g,v=u.pdfName,y=u.onClose,x=u.customStyles,T=u.customClasses,b=u.customIcons,P=a(null),w=c(function(){var e=new Set;return Object.values(p).forEach(function(t){t>0&&e.add(t-1)}),e},[p]),C=(d=m)&&0!==d.length?d.filter(function(e){return!d.some(function(t){return t!==e&&t.includes(e)})}):d,S=l(C,p,P,w),j=S.highlightIndex,A=S.cursorIndex,H=S.setCursorIndex,I=S.orderedKeys,_=S.totalHighlights,F=S.getValidPosition,V=S.tryJump,q=S.jumpToPage,N=S.zoomTo,R=S.plugins,z=S.controls,B=S.hideNonTargetHighlights,U=S.deduplicateHighlights,D=F(A);if(!f)return t("div",e({style:e(e({},s.emptyState),null==x?void 0:x.emptyState)},{children:"PDF is not available for this selection"}));return i("div",e({ref:P,className:(null==T?void 0:T.pdfViewerWrapper)||"",style:e(e(e({},s.pdfViewer),{display:"flex",flexDirection:"column",height:"100%",width:"100%",backgroundColor:"#FAFAFA"}),null==x?void 0:x.pdfViewer)},{children:[t(n,{highlightIndex:j,totalHighlights:_,controls:z,currentPosition:D,pdfName:v,onClose:y,pdfUrl:f,viewerRef:P,customStyles:x,customClasses:T,customIcons:b}),t(r,{pdfUrl:f,plugins:R,customStyles:x,onLoad:function(){if(N(o.ActualSize),h>0){var e=h-1,t=I[e],i=p[t];H(e),i>0&&(setTimeout(function(){B(w),U(i-1)},1e3),q(i-1))}requestAnimationFrame(function(){V(),function(){if(P.current){var e=h-1,t=I[e],i=p[t],o=i>0?i-1:0,r={};I.forEach(function(e,t){var i=p[e];i>0&&(r[i]||(r[i]=[]),r[i].push(t))});var n=(r[i]||[]).indexOf(e),s=0,l=function(){var e,t;if(!(++s>40)){var i=null===(e=P.current)||void 0===e?void 0:e.querySelector(".rpv-core__inner-pages");if(i){var r=null===(t=P.current)||void 0===t?void 0:t.querySelector('[data-testid="core__page-layer-'.concat(o,'"]'));if(r){var a=i.getBoundingClientRect(),c=r.getBoundingClientRect();if(c.top<a.bottom&&c.bottom>a.top){var u=r.querySelectorAll(".rpv-search__highlight")[n];if(u){var d=u.getBoundingClientRect(),f=i.scrollTop+(d.top-a.top)-i.clientHeight/2+d.height/2;i.scrollTo({top:f,behavior:"smooth"})}else setTimeout(l,100)}else setTimeout(l,100)}else setTimeout(l,100)}else setTimeout(l,100)}};setTimeout(l,500)}}()})},onPageChange:function(e){var t=e.currentPage;w.has(t)?(U(t),B(w)):B(w)}})]}))};export{u as default};
2
2
  //# sourceMappingURL=PdfViewer.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as e,Fragment as t}from"react/jsx-runtime";import{useState as r,useRef as n,useMemo as o}from"react";import{searchPlugin as i}from"@react-pdf-viewer/search";import{pageNavigationPlugin as a}from"@react-pdf-viewer/page-navigation";import{zoomPlugin as u}from"@react-pdf-viewer/zoom";import{highlightPlugin as c}from"@react-pdf-viewer/highlight";var l=function(l,p,f,s,g,v){var h=r(0),d=h[0],m=h[1],y=n(!1),_=r(0),x=_[0],T=_[1];n([]);var b=function(e){if(!e)return[];return e.replace(/\]\s*\n\s*\(/g,"](").split(/\n+/).map(function(e){var t=e.trim(),r=(t=(t=t.replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u00A0\u2009\u202F]/g," ")).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 r?t.slice(r[0].length).trim():t}).flatMap(function(e){var t=e.match(/^\s*\|(.+)\|\s*$/);return t?t[1].split("|").map(function(e){return e.trim()}).filter(Boolean):[e]}).map(function(e){return e.replace(/&[#\w]+;/g,function(e){return t=e,(r=document.createElement("textarea")).innerHTML=t,r.value;var t,r}).replace(/<br\s*\/?>/gi,"\n").replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1").replace(/[^\S\n]+/g," ").trim()}).flatMap(function(e){return e.split(/\n+/)}).flatMap(function(e){for(var t,r=[],n=/([*_]{1,3})([^*_]+)\1|([*_]{1,3})/g,o=0;null!==(t=n.exec(e));){var i=e.slice(o,t.index).trim();i&&r.push(i),t[2]&&r.push(t[2].trim()),o=t.index+t[0].length}var a=e.slice(o).trim();return a&&r.push(a),r.flatMap(function(e){return e.split(/[\u2013\u2014-]/g)}).flatMap(function(e){return e.split(/\n+/)}).map(function(e){return e.replace(/[*_]+/g,"").replace(/`([^`]+)`/g,"$1").replace(/[^\S\n]+/g," ").trim()})})},I=Object.keys(p).map(Number).sort(function(e,t){return e-t}),S=o(function(){return g?v.length:g?0:Object.values(p).filter(function(e){return e>0}).length},[v,p]),j=function(e){if(f.current){var t=f.current.querySelectorAll(".rpv-search__highlights"),r=new Set;t.forEach(function(t){var n=t.getAttribute("data-testid"),o=parseInt((null==n?void 0:n.replace("search__highlights-",""))||"-1"),i=t.querySelectorAll(".rpv-search__highlight");o===e&&(i.forEach(function(e){var t=e,n=(t.getAttribute("title")||"").toLowerCase(),o=t.style.top,i="".concat(n,"_#$_").concat(o);r.has(i)?t.style.display="none":(r.add(i),t.style.display="")}),console.groupCollapsed("[debug: PDF highlight text]"),console.log("input->",l),console.log("processed text->",A),console.groupEnd())})}},w=function(e){f.current&&f.current.querySelectorAll(".rpv-search__highlights").forEach(function(t){var r=t.getAttribute("data-testid"),n=parseInt((null==r?void 0:r.replace(/search__highlights-/g,""))||"-1"),o=t.querySelectorAll(".rpv-search__highlight");e.has(n)||o.forEach(function(e){e.style.display="none"})})},A=l.map(function(e){return b(e)}).flat(),q=i({keyword:A}),B=a(),C=u(),E=q.jumpToMatch,Z=B.jumpToPage,F=C.zoomTo,H=C.ZoomInButton,M=C.ZoomOutButton,O=C.ZoomPopover,P=c({renderHighlights:function(r){return e(t,{children:v.filter(function(e){return e.pageNumber?e.pageNumber-1===r.pageIndex:e.pageIndex===r.pageIndex}).map(function(t,r){var n=v.findIndex(function(e){return e.pageIndex===t.pageIndex&&e.top===t.top&&e.left===t.left})===x;return e("div",{style:{position:"absolute",left:"".concat(t.left,"%"),top:"".concat(t.top,"%"),width:"".concat(t.width,"%"),height:"".concat(t.height,"%"),background:n?"#F6D739":"yellow",opacity:n?.7:.4,transition:"background 0.2s, opacity 0.2s"}},r)})})}}),k=function(){if(!y.current)try{E(0),y.current=!0;var e=v[0];e&&g&&N(e.pageIndex,e.top)}catch(e){requestAnimationFrame(k)}},z=function(e,t){if(f.current&&f.current.querySelector(".rpv-core__viewer")){var r=-1,n=function(){var o,i,a=null===(o=f.current)||void 0===o?void 0:o.querySelector(".rpv-core__inner-pages");if(a){if(a.scrollTop!==r)return r=a.scrollTop,void setTimeout(n,100);var u=null===(i=f.current)||void 0===i?void 0:i.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(u){var c=u.querySelectorAll(".rpv-search__highlight")[t];if(c){var l=a.getBoundingClientRect(),p=c.getBoundingClientRect(),s=a.scrollTop+(p.top-l.top)-a.clientHeight/2+p.height/2;a.scrollTo({top:s,behavior:"smooth"})}}}};setTimeout(n,300)}},N=function(e,t){if(f.current){var r=0,n=function(){var o,i;if(!(++r>60)){var a=null===(o=f.current)||void 0===o?void 0:o.querySelector(".rpv-core__inner-pages");if(a){var u=null===(i=f.current)||void 0===i?void 0:i.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(u){var c=u.getBoundingClientRect();if(0!==c.height){var l=a.getBoundingClientRect(),p=t/100*c.height,s=c.top-l.top+p;a.scrollTo({top:a.scrollTop+s-40,behavior:"smooth"})}else setTimeout(n,100)}else setTimeout(n,100)}else setTimeout(n,100)}};setTimeout(n,100)}},R=o(function(){var e={};return I.forEach(function(t,r){var n=p[t];n>0&&(e[n]||(e[n]=[]),e[n].push(r))}),e},[I,p]),$=function(e){var t=p[I[e]];return(R[t]||[]).indexOf(e)};return{setHighlightIndex:m,highlightIndex:d,cursorIndex:x,setCursorIndex:T,orderedKeys:I,totalHighlights:S,getValidPosition:function(e){if(g)return e+1;if(!p)return 0;for(var t=0,r=0;r<=e;r++)p[I[r]]>0&&t++;return t},tryJump:k,jumpToPage:Z,zoomTo:F,hideNonTargetHighlights:w,deduplicateHighlights:j,scrollToCoord:N,plugins:[g?P:q,B,C],controls:{ZoomInButton:H,ZoomOutButton:M,ZoomPopover:O,goToNext:function(){if(g&&v)for(var e=function(e){var t=v[e];return T(e),Z(t.pageIndex),setTimeout(function(){N(t.pageIndex,t.top)},400),{value:void 0}},t=x+1;t<v.length;t++){var r=e(t);if("object"==typeof r)return r.value}else{var n=function(e){var t=I[e];if(p[t]>0){var r=p[t]-1,n=$(e);return T(e),Z(p[t]-1),z(r,n),setTimeout(function(){j(r)},500),1===Object.keys(p).length&&w(s),{value:void 0}}};for(t=x+1;t<I.length;t++){var o=n(t);if("object"==typeof o)return o.value}}},goToPrevious:function(){if(g&&v)for(var e=function(e){var t=v[e];return T(e),Z(t.pageIndex),setTimeout(function(){N(t.pageIndex,t.top)},400),{value:void 0}},t=x-1;t>=0;t--){var r=e(t);if("object"==typeof r)return r.value}else{var n=function(e){var t=I[e];if(p[t]>0){var r=p[t]-1,n=$(e);return T(e),Z(p[t]-1),z(r,n),setTimeout(function(){j(r)},500),1===Object.keys(p).length&&w(s),{value:void 0}}};for(t=x-1;t>=0;t--){var o=n(t);if("object"==typeof o)return o.value}}}}}};export{l as PdfHighlightControls};
1
+ import{__spreadArray as e}from"tslib";import{useState as t,useRef as r,useMemo as n}from"react";import{searchPlugin as o}from"@react-pdf-viewer/search";import{pageNavigationPlugin as i}from"@react-pdf-viewer/page-navigation";import{zoomPlugin as a}from"@react-pdf-viewer/zoom";var l=function(l,u,c,s){var f=t(0),p=f[0],h=f[1],g=r(!1),v=t(0),d=v[0],m=v[1],_=function(e){if(!e)return[];return e.replace(/\]\s*\n\s*\(/g,"](").split(/\n+/).map(function(e){var t=e.trim(),r=(t=(t=t.replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u00A0\u2009\u202F]/g," ")).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 r?t.slice(r[0].length).trim():t}).flatMap(function(e){var t=e.match(/^\s*\|(.+)\|\s*$/);return t?t[1].split("|").map(function(e){return e.trim()}).filter(Boolean):[e]}).map(function(e){return e.replace(/&[#\w]+;/g,function(e){return t=e,(r=document.createElement("textarea")).innerHTML=t,r.value;var t,r}).replace(/<br\s*\/?>/gi,"\n").replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1").replace(/[^\S\n]+/g," ").trim()}).flatMap(function(e){return e.split(/\n+/)}).flatMap(function(e){for(var t,r=[],n=/([*_]{1,3})([^*_]+)\1|([*_]{1,3})/g,o=0;null!==(t=n.exec(e));){var i=e.slice(o,t.index).trim();i&&r.push(i),t[2]&&r.push(t[2].trim()),o=t.index+t[0].length}var a=e.slice(o).trim();return a&&r.push(a),r.flatMap(function(e){return e.split(/[\u2013\u2014-]/g)}).flatMap(function(e){return e.split(/\n+/)}).map(function(e){return e.replace(/[*_]+/g,"").replace(/`([^`]+)`/g,"$1").replace(/[^\S\n]+/g," ").trim()})})},y=Object.keys(u).map(Number).sort(function(e,t){return e-t}),T=Object.values(u).filter(function(e){return e>0}).length,b=function(t){if(c.current){var r=c.current.querySelectorAll(".rpv-search__highlights"),n=new Set,o=new Set,i=new Map;r.forEach(function(r){var a=r.getAttribute("data-testid"),u=parseInt((null==a?void 0:a.replace("search__highlights-",""))||"-1"),c=r.querySelectorAll(".rpv-search__highlight");if(u===t){var s=new Set;c.forEach(function(t){var r=t,a=(r.getAttribute("title")||"").toLowerCase(),l=r.style.top,u="".concat(a,"_#$_").concat(l);if(r.style.display="none",n.has(u))if(i.has(u)){var c=i.get(u);i.set(u,e(e([],c,!0),[r],!1))}else i.set(u,[r]);else{if(n.add(u),i.has(u)){c=i.get(u);i.set(u,e(e([],c,!0),[r],!1))}else i.set(u,[r]);o.has(a)?s.add(u):o.add(a)}});var f=w(S,i);f.forEach(function(e){var t=new Set;e.elements.forEach(function(e){var r=e.style.left,n=e.style.width,o="".concat(r,"_").concat(n);t.has(o)?e.style.display="none":(t.add(o),e.style.display="")})}),console.groupCollapsed("[debug: PDF highlight text]"),console.log("input->",l),console.log("processed text->",S),console.log("dom->processed elements->",f),console.groupEnd()}})}},w=function(e,t){for(var r=Array.from(t.entries()),n=0,o=[],i=function(e){return e.toLowerCase().replace(/[^\w\s]/g,"").replace(/\s+/g," ").trim()},a=0;a<e.length;a++)for(var l=e[a],u=i(l);n<r.length;){var c=r[n],s=c[0],f=c[1],p=i(s.split("_#$_")[0]),h=e[a+1],g=r[n+1],v=h?i(h):null,d=g?i(g[0].split("_#$_")[0]):null,m=u===p,_=n+1<r.length&&p===i(r[n+1][0].split("_#$_")[0]),y=m;if(m&&_&&v&&(y=v===d),y){o.push({chunk:l,matchedKey:s,elements:f}),n++;break}n++}return o},x=function(e){c.current&&c.current.querySelectorAll(".rpv-search__highlights").forEach(function(t){var r=t.getAttribute("data-testid"),n=parseInt((null==r?void 0:r.replace(/search__highlights-/g,""))||"-1"),o=t.querySelectorAll(".rpv-search__highlight");e.has(n)||o.forEach(function(e){e.style.display="none"})})},S=l.map(function(e){return _(e)}).flat(),A=o({keyword:S}),E=i(),j=a(),q=A.jumpToMatch,B=E.jumpToPage,I=j.zoomTo,M=j.ZoomInButton,Z=j.ZoomOutButton,O=j.ZoomPopover,P=function(){if(!g.current)try{q(0),g.current=!0}catch(e){requestAnimationFrame(P)}},$=function(e,t){if(c.current&&c.current.querySelector(".rpv-core__viewer")){var r=-1,n=function(){var o,i,a=null===(o=c.current)||void 0===o?void 0:o.querySelector(".rpv-core__inner-pages");if(a){if(a.scrollTop!==r)return r=a.scrollTop,void setTimeout(n,100);var l=null===(i=c.current)||void 0===i?void 0:i.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(l){var u=l.querySelectorAll(".rpv-search__highlight")[t];if(u){var s=a.getBoundingClientRect(),f=u.getBoundingClientRect(),p=a.scrollTop+(f.top-s.top)-a.clientHeight/2+f.height/2;a.scrollTo({top:p,behavior:"smooth"})}}}};setTimeout(n,300)}},k=n(function(){var e={};return y.forEach(function(t,r){var n=u[t];n>0&&(e[n]||(e[n]=[]),e[n].push(r))}),e},[y,u]),C=function(e){var t=u[y[e]];return(k[t]||[]).indexOf(e)};return{setHighlightIndex:h,highlightIndex:p,cursorIndex:d,setCursorIndex:m,orderedKeys:y,totalHighlights:T,getValidPosition:function(e){for(var t=0,r=0;r<=e;r++){var n=y[r];u[n]>0&&t++}return t},tryJump:P,jumpToPage:B,zoomTo:I,hideNonTargetHighlights:x,deduplicateHighlights:b,plugins:[A,E,j],controls:{ZoomInButton:M,ZoomOutButton:Z,ZoomPopover:O,goToNext:function(){for(var e=function(e){var t=y[e];if(u[t]>0){var r=u[t]-1,n=C(e);return m(e),B(u[t]-1),$(r,n),setTimeout(function(){b(r)},500),1===Object.keys(u).length&&x(s),{value:void 0}}},t=d+1;t<y.length;t++){var r=e(t);if("object"==typeof r)return r.value}},goToPrevious:function(){for(var e=function(e){var t=y[e];if(u[t]>0){var r=u[t]-1,n=C(e);return m(e),B(u[t]-1),$(r,n),setTimeout(function(){b(r)},500),1===Object.keys(u).length&&x(s),{value:void 0}}},t=d-1;t>=0;t--){var r=e(t);if("object"==typeof r)return r.value}}}}};export{l as PdfHighlightControls};
2
2
  //# sourceMappingURL=usePdfHighlight.js.map
@@ -1,2 +1,2 @@
1
- var e={container:"TableCitationContent-module_container__OfivB",header:"TableCitationContent-module_header__ANgC5",title:"TableCitationContent-module_title__UzB8i",headerRight:"TableCitationContent-module_headerRight__GLyqb",divider:"TableCitationContent-module_divider__SYxWE",closeBtn:"TableCitationContent-module_closeBtn__lTrT4",ccloseBtn:"TableCitationContent-module_ccloseBtn__Gp3l5",tableScroll:"TableCitationContent-module_tableScroll__Gv2KN",table:"TableCitationContent-module_table__ZIHBi",highlightCell:"TableCitationContent-module_highlightCell__1RESY",failedCell:"TableCitationContent-module_failedCell__-Q2WX",actions:"TableCitationContent-module_actions__yvyTj"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".TableCitationContent-module_container__OfivB{background-color:var(--cite-bg-color,#fff);border:1px solid var(--cite-border-color,#e5e7eb);display:flex;flex-direction:column;font-family:var(--cite-font-family,Inter,system-ui,sans-serif);height:100%;min-height:200px;overflow:hidden;width:100%}.TableCitationContent-module_header__ANgC5{align-items:center;border-bottom:1px solid var(--cite-border-color,#e5e7eb);display:flex;justify-content:space-between;padding:.5rem 1rem}.TableCitationContent-module_title__UzB8i{color:var(--cite-text-primary,#1f2937);font-size:1.1rem;font-weight:500;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.TableCitationContent-module_headerRight__GLyqb{align-items:center;display:flex;gap:1rem}.TableCitationContent-module_divider__SYxWE{align-self:stretch;background-color:var(--cite-border-color,#e5e7eb);margin-bottom:-.5rem;margin-top:-.5rem;width:1px}.TableCitationContent-module_closeBtn__lTrT4{align-items:center;color:var(--cite-text-secondary,#6b7280);cursor:pointer;display:flex;transition:opacity .2s}.TableCitationContent-module_ccloseBtn__Gp3l5:hover{opacity:.7}.TableCitationContent-module_tableScroll__Gv2KN{flex:1;overflow:auto;padding:.75rem 1rem}.TableCitationContent-module_table__ZIHBi{border-collapse:collapse;font-size:.875rem;min-width:100%;width:max-content}.TableCitationContent-module_table__ZIHBi td,.TableCitationContent-module_table__ZIHBi th{border:1px solid var(--cite-border-color,#e5e7eb);padding:.5rem .75rem}.TableCitationContent-module_table__ZIHBi th{background-color:var(--cite-header-bg,#f9fafb);color:var(--cite-text-header,#374151);font-weight:600;position:sticky;top:0}.TableCitationContent-module_highlightCell__1RESY{background-color:var(--cite-highlight-color,#f7ef9e)!important}.TableCitationContent-module_failedCell__-Q2WX{background-color:var(--cite-error-bg,#fee2e2);color:var(--cite-error-text,#991b1b)}.TableCitationContent-module_actions__yvyTj{align-items:center;display:flex;gap:.5rem}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
1
+ var e={container:"TableCitationContent-module_container__OfivB",header:"TableCitationContent-module_header__ANgC5",title:"TableCitationContent-module_title__UzB8i",headerRight:"TableCitationContent-module_headerRight__GLyqb",divider:"TableCitationContent-module_divider__SYxWE",closeBtn:"TableCitationContent-module_closeBtn__lTrT4",ccloseBtn:"TableCitationContent-module_ccloseBtn__Gp3l5",tableWrapper:"TableCitationContent-module_tableWrapper__nst7D",table:"TableCitationContent-module_table__ZIHBi",highlightCell:"TableCitationContent-module_highlightCell__1RESY",failedCell:"TableCitationContent-module_failedCell__-Q2WX",actions:"TableCitationContent-module_actions__yvyTj"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".TableCitationContent-module_container__OfivB{background-color:var(--cite-bg-color,#fff);border:1px solid var(--cite-border-color,#e5e7eb);display:flex;flex-direction:column;font-family:var(--cite-font-family,Inter,system-ui,sans-serif);height:100%;min-height:200px;width:100%}.TableCitationContent-module_header__ANgC5{align-items:center;border-bottom:1px solid var(--cite-border-color,#e5e7eb);display:flex;justify-content:space-between;padding:.5rem 1rem}.TableCitationContent-module_title__UzB8i{color:var(--cite-text-primary,#1f2937);font-size:1.1rem;font-weight:500;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.TableCitationContent-module_headerRight__GLyqb{align-items:center;display:flex;gap:1rem}.TableCitationContent-module_divider__SYxWE{align-self:stretch;background-color:var(--cite-border-color,#e5e7eb);margin-bottom:-.5rem;margin-top:-.5rem;width:1px}.TableCitationContent-module_closeBtn__lTrT4{align-items:center;color:var(--cite-text-secondary,#6b7280);cursor:pointer;display:flex;transition:opacity .2s}.TableCitationContent-module_ccloseBtn__Gp3l5:hover{opacity:.7}.TableCitationContent-module_tableWrapper__nst7D{overflow:auto;padding:.75rem 1rem;width:100%}.TableCitationContent-module_table__ZIHBi{border-collapse:collapse;font-size:.875rem;min-width:100%;width:max-content}.TableCitationContent-module_table__ZIHBi td,.TableCitationContent-module_table__ZIHBi th{border:1px solid var(--cite-border-color,#e5e7eb);padding:.5rem .75rem}.TableCitationContent-module_table__ZIHBi th{background-color:var(--cite-header-bg,#f9fafb);color:var(--cite-text-header,#374151);font-weight:600;position:sticky;top:0}.TableCitationContent-module_highlightCell__1RESY{background-color:var(--cite-highlight-color,#f7ef9e)!important}.TableCitationContent-module_failedCell__-Q2WX{background-color:var(--cite-error-bg,#fee2e2);color:var(--cite-error-text,#991b1b)}.TableCitationContent-module_actions__yvyTj{align-items:center;display:flex;gap:.5rem}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
2
2
  //# sourceMappingURL=TableCitationContent.module.css.js.map
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 MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.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";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.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 TableCitationContent}from"./features/TableCitation/TableCitationContent.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";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{AiRedLineCompare}from"./features/AiRedLineCompare/AiRedLineCompare.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AiRedLineCompareTest.d.ts","sourceRoot":"","sources":["../../../src/AiRedLineCompareTest.tsx"],"names":[],"mappings":"AAkKA,QAAA,MAAM,oBAAoB,+CAazB,CAAA;AAED,eAAe,oBAAoB,CAAA"}
1
+ {"version":3,"file":"AiRedLineCompareTest.d.ts","sourceRoot":"","sources":["../../../src/AiRedLineCompareTest.tsx"],"names":[],"mappings":"AAqCA,QAAA,MAAM,oBAAoB,+CAazB,CAAA;AAED,eAAe,oBAAoB,CAAA"}
@@ -1,5 +1,3 @@
1
- declare const PdfViewerTest: ({ useCoordinates }: {
2
- useCoordinates?: boolean | undefined;
3
- }) => import("react/jsx-runtime").JSX.Element;
1
+ declare const PdfViewerTest: () => import("react/jsx-runtime").JSX.Element;
4
2
  export default PdfViewerTest;
5
3
  //# sourceMappingURL=PdfViewerTest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PdfViewerTest.d.ts","sourceRoot":"","sources":["../../../src/PdfViewerTest.tsx"],"names":[],"mappings":"AAcA,QAAA,MAAM,aAAa;;6CA2DlB,CAAA;AAED,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"PdfViewerTest.d.ts","sourceRoot":"","sources":["../../../src/PdfViewerTest.tsx"],"names":[],"mappings":"AAcA,QAAA,MAAM,aAAa,+CAwClB,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -13,6 +13,8 @@ export interface AiRedLineCompareProps {
13
13
  maxWidth?: number;
14
14
  className?: string;
15
15
  style?: CSSProperties;
16
+ onBadgeClick?: (mappingId: string, isOpen: boolean) => void;
17
+ activeBadgeId?: string | null;
16
18
  }
17
19
  export declare const AiRedLineCompare: React.FC<AiRedLineCompareProps>;
18
20
  export default AiRedLineCompare;
@@ -1 +1 @@
1
- {"version":3,"file":"AiRedLineCompare.d.ts","sourceRoot":"","sources":["../../../../../src/features/AiRedLineCompare/AiRedLineCompare.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAIZ,KAAK,aAAa,EAEnB,MAAM,OAAO,CAAC;AAQf,OAAO,EAAU,sBAAsB,EAAa,MAAM,8BAA8B,CAAC;AAIzF,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,sBAAsB,EAAE,CAAC;IACzC,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAA;IAC9C,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAGxD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAyHD,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAwP5D,CAAC;AACF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"AiRedLineCompare.d.ts","sourceRoot":"","sources":["../../../../../src/features/AiRedLineCompare/AiRedLineCompare.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAIZ,KAAK,aAAa,EAEnB,MAAM,OAAO,CAAC;AAQf,OAAO,EAAU,sBAAsB,EAAa,MAAM,8BAA8B,CAAC;AAIzF,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,sBAAsB,EAAE,CAAC;IACzC,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAA;IAC9C,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAGxD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAgKD,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAyd5D,CAAC;AACF,eAAe,gBAAgB,CAAC"}
@@ -27,7 +27,6 @@ interface PdfViewerProps {
27
27
  pdfUrl?: string;
28
28
  highlightText: string[];
29
29
  highlightPages?: any;
30
- highlightCordinatePages: HighlightArea[];
31
30
  jumpToPageValue?: number;
32
31
  pdfName?: string;
33
32
  onClose?: () => void;
@@ -35,16 +34,7 @@ interface PdfViewerProps {
35
34
  customStyles?: CustomStylesType;
36
35
  customClasses?: CustomClassesType;
37
36
  customIcons?: CustomIconsType;
38
- useCoordinates: boolean;
39
37
  }
40
- export type HighlightArea = {
41
- pageIndex: number;
42
- left: number;
43
- top: number;
44
- width: number;
45
- height: number;
46
- pageNumber?: number;
47
- };
48
- declare const PdfViewer: ({ pdfUrl, highlightText, highlightPages, highlightCordinatePages, jumpToPageValue, pdfName, onClose, customStyles, customClasses, customIcons, useCoordinates }: PdfViewerProps) => import("react/jsx-runtime").JSX.Element;
38
+ declare const PdfViewer: ({ pdfUrl, highlightText, highlightPages, jumpToPageValue, pdfName, onClose, customStyles, customClasses, customIcons, }: PdfViewerProps) => import("react/jsx-runtime").JSX.Element;
49
39
  export default PdfViewer;
50
40
  //# sourceMappingURL=PdfViewer.d.ts.map
@@ -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,KAA0B,MAAM,OAAO,CAAC;AAE/C,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,uBAAuB,EAAG,aAAa,EAAE,CAAA;IACzC,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;IAC9B,cAAc,EAAG,OAAO,CAAA;CACzB;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAC;AAEF,QAAA,MAAM,SAAS,oKAYZ,cAAc,4CAoOhB,CAAC;AAEF,eAAe,SAAS,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,KAA0B,MAAM,OAAO,CAAC;AAE/C,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,4CAkNhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { HighlightArea } from "./PdfViewer";
3
- export declare const PdfHighlightControls: (highlightText: string[], highlightPages: Record<number, number>, viewerRef: React.RefObject<HTMLDivElement | null>, highlightPageSet: Set<number>, useCoordinates: boolean, highlightCordinatePages: HighlightArea[]) => {
2
+ export declare const PdfHighlightControls: (highlightText: string[], highlightPages: Record<number, number>, viewerRef: React.RefObject<HTMLDivElement | null>, highlightPageSet: Set<number>) => {
4
3
  setHighlightIndex: import("react").Dispatch<import("react").SetStateAction<number>>;
5
4
  highlightIndex: number;
6
5
  cursorIndex: number;
@@ -13,8 +12,7 @@ export declare const PdfHighlightControls: (highlightText: string[], highlightPa
13
12
  zoomTo: (scale: number | import("@react-pdf-viewer/core").SpecialZoomLevel) => void;
14
13
  hideNonTargetHighlights: (targetPages: Set<number>) => void;
15
14
  deduplicateHighlights: (targetPage: number) => void;
16
- scrollToCoord: (pageIndex: number, top: number) => void;
17
- plugins: (import("@react-pdf-viewer/page-navigation").PageNavigationPlugin | import("@react-pdf-viewer/zoom").ZoomPlugin | import("@react-pdf-viewer/highlight").HighlightPlugin | import("@react-pdf-viewer/search").SearchPlugin)[];
15
+ plugins: (import("@react-pdf-viewer/page-navigation").PageNavigationPlugin | import("@react-pdf-viewer/zoom").ZoomPlugin | import("@react-pdf-viewer/search").SearchPlugin)[];
18
16
  controls: {
19
17
  ZoomInButton: () => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
20
18
  ZoomOutButton: () => 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":";AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAM5C,eAAO,MAAM,oBAAoB,kBAChB,MAAM,EAAE,kBACP,OAAO,MAAM,EAAE,MAAM,CAAC,aAC3B,MAAM,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,oBAC9B,IAAI,MAAM,CAAC,kBACb,OAAO,2BACE,aAAa,EAAE;;;;;;;+BAiIP,MAAM,KAAG,MAAM;;;;2CA0PH,IAAI,MAAM,CAAC;wCAvKZ,MAAM;+BAkTjB,MAAM,OAAO,MAAM;;;;;;;;;CAiKtD,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,oBAC9B,IAAI,MAAM,CAAC;;;;;;;+BAyHI,MAAM;;;;2CA0OM,IAAI,MAAM,CAAC;wCAzJd,MAAM;;;;;;;;;CAmVlD,CAAC"}
@@ -16,7 +16,6 @@ export { default as ImageCitationContent } from "./features/RequirementAiCitatio
16
16
  export { default as VideoCitationContent } from "./features/RequirementAiCitations/VideoCitation/VideoCitationContent";
17
17
  export { default as FileCitationContent } from "./features/RequirementAiCitations/FileCitation/FileCitationContent";
18
18
  export { default as WebCitationWithImageContent } from "./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent";
19
- export { default as MarkdownWithImageCitation } from "./features/MarkdownWithImageCitation/MarkdownWithImageCitation";
20
19
  export { default as AiReasoningCitation } from "./features/RequirementAiCitations/AiReasoning/AiReasoningCitation";
21
20
  export { default as TableCitationContent } from "./features/TableCitation/TableCitationContent";
22
21
  export { default as CitationsViewer } from "./features/CitationViewer/CitationsViewer";
@@ -25,4 +24,5 @@ export { default as ScannedDocCitation } from "./features/ScannedDocCitation/Sca
25
24
  export { default as ChatDrawer } from "./features/ChatDrawer/ChatDrawer";
26
25
  export type { ChatDrawerProps } from "./features/ChatDrawer/types/ChatDrawer.types";
27
26
  export { FILE_INGESTION_STATUS, SUMMARY_EXPAND_HEIGHT_NUDGE, TRUNCATE_THRESHOLD } from "./features/ChatDrawer/constants/ChatDrawer";
27
+ export { default as AiRedLineCompare } from "./features/AiRedLineCompare/AiRedLineCompare";
28
28
  //# 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,yBAAyB,EAAE,MAAM,gEAAgE,CAAC;AACtH,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mEAAmE,CAAC;AACnH,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAC,MAAM,+CAA+C,CAAC;AAC/F,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;AACjG,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACzE,YAAY,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,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,oBAAoB,EAAC,MAAM,+CAA+C,CAAC;AAC/F,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;AACjG,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACzE,YAAY,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AACpI,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export declare const APP_API: string;
2
2
  export declare const HYPERVISOR_DOMAIN: string;
3
+ export declare const testContractRes: any;
3
4
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/service/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,EAAE,MAAkF,CAAC;AACzG,eAAO,MAAM,iBAAiB,EAAE,MAA8C,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/service/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,EAAE,MAAkF,CAAC;AACzG,eAAO,MAAM,iBAAiB,EAAE,MAA8C,CAAC;AAE/E,eAAO,MAAM,eAAe,EAAE,GAivB7B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viswa-test/test-citation",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "author": "Viswa Koduru",
5
5
  "description": "",
6
6
  "license": "MIT",
@@ -97,11 +97,6 @@
97
97
  "require": "./dist/cjs/features/RequirementAiCitations/ImageCitation/ImageCitationContent.js",
98
98
  "types": "./dist/types/src/features/RequirementAiCitations/ImageCitation/ImageCitationContent.d.ts"
99
99
  },
100
- "./MarkdownWithImageCitation": {
101
- "import": "./dist/features/MarkdownWithImageCitation/MarkdownWithImageCitation.js",
102
- "require": "./dist/cjs/features/MarkdownWithImageCitation/MarkdownWithImageCitation.js",
103
- "types": "./dist/types/src/features/MarkdownWithImageCitation/MarkdownWithImageCitation.d.ts"
104
- },
105
100
  "./FileCitationContent": {
106
101
  "import": "./dist/features/RequirementAiCitations/FileCitation/FileCitationContent.js",
107
102
  "require": "./dist/cjs/features/RequirementAiCitations/FileCitation/FileCitationContent.js",
@@ -121,6 +116,11 @@
121
116
  "import": "./dist/features/ReviewPanel/ReviewPanel.js",
122
117
  "require": "./dist/cjs/features/ReviewPanel/ReviewPanel.js",
123
118
  "types": "./dist/types/src/features/ReviewPanel/ReviewPanel.d.ts"
119
+ },
120
+ "./AiRedLineCompare": {
121
+ "import": "./dist/features/AiRedLineCompare/AiRedLineCompare.js",
122
+ "require": "./dist/cjs/features/AiRedLineCompare/AiRedLineCompare.js",
123
+ "types": "./dist/types/src/features/AiRedLineCompare/AiRedLineCompare.d.ts"
124
124
  }
125
125
  },
126
126
  "repository": {
@@ -185,25 +185,17 @@
185
185
  "@react-pdf-viewer/page-navigation": "^3.12.0",
186
186
  "@react-pdf-viewer/search": "^3.12.0",
187
187
  "@react-pdf-viewer/zoom": "^3.12.0",
188
+ "highlight.js": "^11.11.1",
189
+ "pdfjs-dist": "^3.11.174",
190
+ "react-player": "^3.4.0",
191
+ "react-reader": "^2.0.13",
192
+ "wavesurfer.js": "^7.12.1",
188
193
  "@rollup/plugin-commonjs": "28.0.2",
189
194
  "@rollup/plugin-json": "6.1.0",
190
195
  "@rollup/plugin-node-resolve": "13.3.0",
191
196
  "@rollup/plugin-strip": "3.0.4",
192
197
  "@rollup/plugin-url": "^8.0.2",
193
198
  "@svgr/rollup": "8.1.0",
194
- "@types/react": "17.0.83",
195
- "@types/react-dom": "17.0.26",
196
- "@types/react-router-dom": "5.3.3",
197
- "@types/react-syntax-highlighter": "^15.5.13",
198
- "@types/react-window": "^1.8.8",
199
- "ajv": "8.12.0",
200
- "ajv-keywords": "5.1.0",
201
- "highlight.js": "^11.11.1",
202
- "pdfjs-dist": "^3.11.174",
203
- "react-player": "^3.4.0",
204
- "react-reader": "^2.0.13",
205
- "react-router-dom": "5.2.0",
206
- "react-scripts": ">=5.0.1",
207
199
  "rollup": "2.79.2",
208
200
  "rollup-plugin-babel": "4.4.0",
209
201
  "rollup-plugin-peer-deps-external": "2.2.4",
@@ -212,28 +204,36 @@
212
204
  "rollup-plugin-terser": "7.0.2",
213
205
  "rollup-plugin-typescript2": "0.36.0",
214
206
  "rollup-plugin-visualizer": "5.12.0",
215
- "ts-loader": "9.5.1",
216
207
  "typescript": "4.9.5",
217
- "wavesurfer.js": "^7.12.1",
208
+ "ts-loader": "9.5.1",
209
+ "@types/react": "17.0.83",
210
+ "@types/react-dom": "17.0.26",
211
+ "@types/react-router-dom": "5.3.3",
212
+ "@types/react-syntax-highlighter": "^15.5.13",
213
+ "@types/react-window": "^1.8.8",
214
+ "ajv": "8.12.0",
215
+ "ajv-keywords": "5.1.0",
216
+ "react-scripts": ">=5.0.1",
217
+ "react-router-dom": "5.2.0",
218
218
  "webpack-bundle-analyzer": "^4.10.2"
219
219
  },
220
220
  "peerDependencies": {
221
+ "react": ">=16.8.0 <19.0.0",
222
+ "react-dom": ">=16.8.0 <19.0.0",
223
+ "@mui/material": "^6.5.0",
221
224
  "@emotion/react": "^11.13.5",
222
225
  "@emotion/styled": "^11.13.0",
223
- "@monaco-editor/react": "^4.7.0",
224
- "@mui/icons-material": "^6.5.0",
225
- "@mui/material": "^6.5.0",
226
+ "pdfjs-dist": "^3.11.174",
226
227
  "@react-pdf-viewer/core": "^3.12.0",
227
228
  "@react-pdf-viewer/page-navigation": "^3.12.0",
228
229
  "@react-pdf-viewer/search": "^3.12.0",
229
230
  "@react-pdf-viewer/zoom": "^3.12.0",
230
- "highlight.js": "^11.11.1",
231
- "pdfjs-dist": "^3.11.174",
232
- "react": ">=16.8.0 <19.0.0",
233
- "react-dom": ">=16.8.0 <19.0.0",
231
+ "wavesurfer.js": "^7.12.1",
234
232
  "react-player": "^3.4.0",
233
+ "@monaco-editor/react": "^4.7.0",
235
234
  "react-reader": "^2.0.13",
236
- "wavesurfer.js": "^7.12.1"
235
+ "highlight.js": "^11.11.1",
236
+ "@mui/icons-material": "^6.5.0"
237
237
  },
238
238
  "peerDependenciesMeta": {
239
239
  "@mui/icons-material": {
@@ -271,19 +271,18 @@
271
271
  }
272
272
  },
273
273
  "dependencies": {
274
- "@react-pdf-viewer/highlight": "^3.12.0",
275
- "axios": "^1.7.9",
276
274
  "dayjs": "^1.11.19",
277
275
  "dompurify": "^3.3.1",
278
276
  "lucide-react": "^0.562.0",
279
277
  "pdf-collaborative-tool": "^0.7.0",
280
278
  "react-markdown": "^8.0.7",
281
- "react-resizable-panels": "^3.0.6",
282
279
  "react-syntax-highlighter": "^15.6.1",
283
- "react-virtualized-auto-sizer": "^1.0.26",
284
- "react-window": "^1.8.11",
285
280
  "rehype-raw": "^7.0.0",
281
+ "remark-gfm": "^4.0.1",
286
282
  "remark-breaks": "^4.0.0",
287
- "remark-gfm": "^4.0.1"
283
+ "react-window": "^1.8.11",
284
+ "react-virtualized-auto-sizer": "^1.0.26",
285
+ "react-resizable-panels": "^3.0.6",
286
+ "axios": "^1.7.9"
288
287
  }
289
288
  }