@e-llm-studio/citation 0.0.159 → 0.0.160
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 +66 -0
- package/dist/cjs/features/BookCitation/BookCitation.js +1 -1
- package/dist/cjs/features/ChatDrawer/ChatDrawer.js +2 -0
- package/dist/cjs/features/ChatDrawer/ChatDrawer.js.map +1 -0
- package/dist/cjs/features/ChatDrawer/constants/ChatDrawer.js +2 -0
- package/dist/cjs/features/ChatDrawer/constants/ChatDrawer.js.map +1 -0
- package/dist/cjs/features/PdfViewer/PdfContainer.js +1 -1
- package/dist/cjs/features/PdfViewer/PdfViewer.js +1 -1
- package/dist/cjs/features/PdfViewer/usePdfHighlight.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/features/BookCitation/BookCitation.js +1 -1
- package/dist/features/ChatDrawer/ChatDrawer.js +2 -0
- package/dist/features/ChatDrawer/ChatDrawer.js.map +1 -0
- package/dist/features/ChatDrawer/constants/ChatDrawer.js +2 -0
- package/dist/features/ChatDrawer/constants/ChatDrawer.js.map +1 -0
- package/dist/features/PdfViewer/PdfContainer.js +1 -1
- package/dist/features/PdfViewer/PdfViewer.js +1 -1
- package/dist/features/PdfViewer/usePdfHighlight.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/src/ChatDrawerTest.d.ts +2 -0
- package/dist/types/src/ChatDrawerTest.d.ts.map +1 -0
- package/dist/types/src/features/BookCitation/BookCitation.d.ts +1 -0
- package/dist/types/src/features/BookCitation/BookCitation.d.ts.map +1 -1
- package/dist/types/src/features/ChatDrawer/ChatDrawer.d.ts +5 -0
- package/dist/types/src/features/ChatDrawer/ChatDrawer.d.ts.map +1 -0
- package/dist/types/src/features/ChatDrawer/UploadedFilesList.types.d.ts +33 -0
- package/dist/types/src/features/ChatDrawer/UploadedFilesList.types.d.ts.map +1 -0
- package/dist/types/src/features/ChatDrawer/Uploadedfileslist.d.ts +5 -0
- package/dist/types/src/features/ChatDrawer/Uploadedfileslist.d.ts.map +1 -0
- package/dist/types/src/features/ChatDrawer/constants/ChatDrawer.d.ts +17 -0
- package/dist/types/src/features/ChatDrawer/constants/ChatDrawer.d.ts.map +1 -0
- package/dist/types/src/features/ChatDrawer/context/ChatDrawerContext.d.ts +8 -0
- package/dist/types/src/features/ChatDrawer/context/ChatDrawerContext.d.ts.map +1 -0
- package/dist/types/src/features/ChatDrawer/types/ChatDrawer.types.d.ts +20 -0
- package/dist/types/src/features/ChatDrawer/types/ChatDrawer.types.d.ts.map +1 -0
- package/dist/types/src/features/PdfViewer/PdfContainer.d.ts +3 -1
- package/dist/types/src/features/PdfViewer/PdfContainer.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/PdfViewer.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/usePdfHighlight.d.ts +3 -2
- package/dist/types/src/features/PdfViewer/usePdfHighlight.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
- [CognitiveDecisioningCard](#cognitivedecisioningcard) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/CognitiveDecisioning/CognitiveDecisioningReadme.md)
|
|
15
15
|
- [CognitiveInternalGPTReasoning](#cognitiveinternalgptreasoning) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/CognitiveInternalgptReasoning/README.md)
|
|
16
16
|
- [CodeCitation](#codecitation) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/CodeCitation/README.md)
|
|
17
|
+
- [ChatDrawer](#chatdrawer) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/README.md)
|
|
17
18
|
- [CitationsViewer](#citationsviewer) [<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="18" height="18">](https://github.com/Techolution/e-llm-studio-lib/blob/dev/citation/src/features/CitationViewer/CitationViewerReadme.md)
|
|
18
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)
|
|
19
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)
|
|
@@ -184,6 +185,7 @@ import BookCitation from '@e-llm-studio/citation/BookCitation'
|
|
|
184
185
|
| `defaultState` | `boolean` | Optional flag to set the initial expanded/collapsed state |
|
|
185
186
|
| `isNonHighlightedBlur` | `boolean` | Optional flag to enable blur effect on non-highlighted text |
|
|
186
187
|
| `customStyle` | `object` | Optional object for overriding default styles |
|
|
188
|
+
| `useDropdown` | `boolean` | Optional flag to render the citation as a dropdown (default: `true`) |
|
|
187
189
|
|
|
188
190
|
---
|
|
189
191
|
|
|
@@ -234,6 +236,70 @@ import ChatCitation from '@e-llm-studio/citation/ChatCitation'
|
|
|
234
236
|
---
|
|
235
237
|
|
|
236
238
|
|
|
239
|
+
|
|
240
|
+
## ChatDrawer
|
|
241
|
+
|
|
242
|
+
### Overview
|
|
243
|
+
|
|
244
|
+
ChatDrawer is a generic, resizable drawer component for rendering collapsible panels with a draggable resize handle. All content is consumer-owned — pass any React node as `children`: forms, file lists, summary cards, tables, or any custom component. The consuming team is fully responsible for styling and rendering the content inside.
|
|
245
|
+
|
|
246
|
+
### Features
|
|
247
|
+
|
|
248
|
+
- **Collapsible panel** — Header is always visible; body and drag handle only render when open
|
|
249
|
+
- **Drag to resize** — Grab the pill handle at the bottom to resize between `minHeight` and `maxHeight`
|
|
250
|
+
- **Configurable height** — `defaultHeight`, `minHeight`, `maxHeight` all exposed as props
|
|
251
|
+
- **Chevron toggle** — Rotates 180° when open, standard drawer UX
|
|
252
|
+
- **Consumer-owned content** — Zero opinion on what goes inside, pass any React node
|
|
253
|
+
- **Inline styles only** — No Tailwind or MUI dependency, works in any consuming app
|
|
254
|
+
|
|
255
|
+
### Usage
|
|
256
|
+
|
|
257
|
+
```tsx
|
|
258
|
+
import ChatDrawer from '@e-llm-studio/citation/ChatDrawer'
|
|
259
|
+
|
|
260
|
+
<ChatDrawer
|
|
261
|
+
uploadListTopContent="My Panel"
|
|
262
|
+
isExpanded={isOpen}
|
|
263
|
+
onToggle={() => setIsOpen(v => !v)}
|
|
264
|
+
defaultHeight={300}
|
|
265
|
+
minHeight={150}
|
|
266
|
+
maxHeight="60vh"
|
|
267
|
+
>
|
|
268
|
+
{/* Pass any component here — form, file list, summary cards, etc. */}
|
|
269
|
+
<YourComponent />
|
|
270
|
+
</ChatDrawer>
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
**With onHeightChange (sibling layout adjustment):**
|
|
274
|
+
```tsx
|
|
275
|
+
const [drawerHeight, setDrawerHeight] = useState(300);
|
|
276
|
+
|
|
277
|
+
<ChatDrawer
|
|
278
|
+
uploadListTopContent="Context"
|
|
279
|
+
isExpanded={isOpen}
|
|
280
|
+
onToggle={() => setIsOpen(v => !v)}
|
|
281
|
+
defaultHeight={300}
|
|
282
|
+
onHeightChange={setDrawerHeight}
|
|
283
|
+
>
|
|
284
|
+
<YourComponent />
|
|
285
|
+
</ChatDrawer>
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Props
|
|
289
|
+
|
|
290
|
+
| Prop | Type | Required | Description |
|
|
291
|
+
|------|------|----------|-------------|
|
|
292
|
+
| `children` | `ReactNode` | ❌ | Scrollable body — fully consumer owned. Pass any React node. |
|
|
293
|
+
| `uploadListTopContent` | `string` | ❌ | Header title shown in the always-visible top bar. Defaults to `"Data uploaded for your context"`. |
|
|
294
|
+
| `isExpanded` | `boolean` | ❌ | Controlled open/close state. Defaults to `false`. |
|
|
295
|
+
| `onToggle` | `() => void` | ❌ | Called when the chevron button is clicked. Wire your open/close state here. |
|
|
296
|
+
| `defaultHeight` | `number` | ❌ | Initial height of the panel in px when expanded. Defaults to `300`. |
|
|
297
|
+
| `minHeight` | `number` | ❌ | Minimum height in px when drag-resizing. Defaults to `150`. |
|
|
298
|
+
| `maxHeight` | `number \| string` | ❌ | Maximum height when drag-resizing. Accepts a px number or a CSS string like `"70vh"`. Defaults to `40vh`. |
|
|
299
|
+
| `onHeightChange` | `(height: number) => void` | ❌ | Fired on every drag tick with the current height in px. Useful when a sibling layout needs to react to height changes. |
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
237
303
|
## CitationRenderer
|
|
238
304
|
|
|
239
305
|
### Overview
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),a=require("./BookCitation.module.css.js"),i=require("./text-cleaner.js");exports.default=function(o){var s,r=o.title,c=o.author,l=o.paragraphs,d=o.chevronUpComponent,u=o.chevronDownComponent,f=o.externalLinkComponent,v=o.textToHighlight,h=o.pageNumber,p=o.totalPageNumber,m=void 0===p?null:p,g=o.citationTitle,x=o.customStyle,_=void 0===x?{}:x,j=o.handleExternalLinkClick,N=o.bookCoverImage,b=o.partialMatch,y=void 0!==b&&b,C=o.citationNumber,k=void 0===C?1:C,E=o.defaultState,T=void 0!==E&&E,q=o.isNonHighlightedBlur,A=void 0!==q&&q,L=o.toggleBlur,w=void 0===L?A:L,B=o.fixedWidth,I=void 0===B||B,W=o.isBookemon,H=void 0!==W&&W,M=t.useState(T),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),a=require("./BookCitation.module.css.js"),i=require("./text-cleaner.js");exports.default=function(o){var s,r=o.title,c=o.author,l=o.paragraphs,d=o.chevronUpComponent,u=o.chevronDownComponent,f=o.externalLinkComponent,v=o.textToHighlight,h=o.pageNumber,p=o.totalPageNumber,m=void 0===p?null:p,g=o.citationTitle,x=o.customStyle,_=void 0===x?{}:x,j=o.handleExternalLinkClick,N=o.bookCoverImage,b=o.partialMatch,y=void 0!==b&&b,C=o.citationNumber,k=void 0===C?1:C,E=o.defaultState,T=void 0!==E&&E,q=o.isNonHighlightedBlur,A=void 0!==q&&q,L=o.toggleBlur,w=void 0===L?A:L,B=o.fixedWidth,I=void 0===B||B,W=o.isBookemon,H=void 0!==W&&W,M=o.useDropdown,S=void 0===M||M,O=t.useState(T),F=O[0],R=O[1],$=null===(s=null==_?void 0:_.showGradientOverlay)||void 0===s||s,D=["address","article","aside","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","li","main","nav","noscript","ol","p","pre","section","table","tfoot","ul","video"];t.useEffect(function(){if(F||!S){var e,n="quotes-citations-".concat(null!=k?k:""),t=!1;return requestAnimationFrame(function(){requestAnimationFrame(function(){e=function(){var e=document.getElementById(n);if(e&&!t){e.scrollIntoView({behavior:"smooth",block:"center"});var a=setTimeout(function(){if(!t){var n=e.getBoundingClientRect(),a=window.innerHeight/2;Math.abs(n.top-a)>40&&e.scrollIntoView({behavior:"auto",block:"center"})}},400);return function(){return clearTimeout(a)}}}()||void 0})}),function(){t=!0,e&&e()}}},[F,S,v,k]);var P=function(e){void 0===e&&(e="");var n=document.createElement("div");n.innerHTML=e;var t=n.textContent||n.innerText||"";return(t=(t=t.replace(/<\/?[^>]+(>|$)/g,"")).replace(/\s+/g," ")).trim()};function V(e){var n=document.createElement("div");n.innerHTML=e;var t=a.default.highlighted,i=function(e,n){var o,s;if(void 0===n&&(n=!1),e.nodeType===Node.TEXT_NODE){if(!n&&(null===(o=e.textContent)||void 0===o?void 0:o.trim())){var r=document.createElement("span");r.classList.add(a.default.blurred),r.textContent=e.textContent,null===(s=e.parentNode)||void 0===s||s.replaceChild(r,e)}}else if(e.nodeType===Node.ELEMENT_NODE){var c=e,l=c.classList.contains(t);Array.from(c.childNodes).forEach(function(e){return i(e,n||l)})}};return Array.from(n.childNodes).forEach(function(e){return i(e)}),n.innerHTML}function z(e,n,t,i,o,s){void 0===o&&(o=[]),void 0===s&&(s=!1);var r,c=a.default.highlighted,l=a.default.highlightedInline,d=a.default.highlightedBlock,u="".concat(c," ").concat(l),f="".concat(c," ").concat(d),v=n,h=(r=document.createElement("textarea"),function(e){return r.innerHTML=e,r.value});if(o.length>0){if(s){return o.forEach(function(e){e&&(v=function(e,n,t){for(var a='<span id="'.concat(t,'" class="').concat(u,'">'),i="</span>",o=e,s=0,r=new RegExp("(<(?:".concat(D.join("|"),")[^>]*>.*?)(?=<(?:").concat(D.join("|"),")|$)"),"gi"),c=(n.match(r)||[n]).map(function(e){var n=e.match(/^<([a-zA-Z0-9]+)([^>]*)>/);if(n&&D.includes(n[1].toLowerCase())){var t=n[0].length;return n[0]+a+e.slice(t)+i}return a+e+i}).join("");;){var l=o.indexOf(n,s);if(-1===l)break;o=o.slice(0,l)+c+o.slice(l+n.length),s=l+c.length}var f=d;return o.replace(/<span([^>]*)>([\s\S]*?)<\/span>/gi,function(e,n,t){if(D.some(function(e){return new RegExp("<".concat(e,"\\b[^>]*>"),"i").test(t)})){var a=n.match(/\sclass\s*=\s*(['"])(.*?)\1/);if(a){var i=a[2],o=i.split(/\s+/).includes(f)?i:"".concat(i," ").concat(f);n=n.replace(a[0],' class="'.concat(o,'"'))}else n+=' class="'.concat(f,'"')}return"<span".concat(n,">").concat(t,"</span>")})}(v,e,"Annotation"===t?"quotes-annotations-".concat(null!=i?i:""):"quotes-citations-".concat(null!=i?i:"")))}),A&&w?V(v):v}return o.forEach(function(e){var a=h(e).trim();if(a&&h(n).trim().toLowerCase()===a.toLowerCase()){var o="Annotation"===t?"quotes-annotations-".concat(null!=i?i:""):"quotes-citations-".concat(null!=i?i:"");v='<span id="'.concat(o,'" class="').concat(f,'">').concat(n,"</span>")}}),A&&w?V(v):v}var p=f;if(!e||!n)return"Annotation"===t?n:'<span id="quotes-citations" class="'.concat(p,'">').concat(n,"</span>");var m=Array.from(e.matchAll(/`([^`]+)`/g));if(0===m.length)return"Annotation"===t?n:'<span id="quotes-citations" class="'.concat(p,'">').concat(n,"</span>");v=n;var g=!1;return m.forEach(function(e){var n=h(e[1]).trim();if(n){var a=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp("(".concat(a,")"),"gi");v.match(i)&&(g=!0,v=v.replace(i,'<span id="'.concat("Annotation"===t?"quotes-annotations":"quotes-citations",'" class="').concat(p,'">$1</span>')))}}),g?v:"Annotation"===t?n:'<span id="quotes-citations" class="'.concat(p,'">').concat(n,"</span>")}return n.jsx(n.Fragment,{children:n.jsxs("span",e.__assign({className:"".concat(a.default.relativeWrapper," ").concat(H?a.default.height95percent+" "+a.default.displayFlex:a.default.height100percent),style:null==_?void 0:_.relativeWrapper},{children:[!T&&S&&n.jsx("div",e.__assign({className:a.default.citationButtonWrapper,style:null==_?void 0:_.citationButtonWrapper},{children:n.jsxs("div",e.__assign({onClick:function(){return R(function(e){return!e})},className:a.default.citationButton,style:null==_?void 0:_.citationButton},{children:[n.jsx("span",e.__assign({className:a.default.citationText},{children:g})),n.jsx("span",e.__assign({style:null==_?void 0:_.arrow},{children:F?d:u}))]}))})),(F&&S||!S)&&n.jsx("div",e.__assign({className:a.default.expandedWrapper,style:null==_?void 0:_.expandedWrapper},{children:n.jsx("div",e.__assign({className:"".concat(a.default.expandableContainer," ").concat(I?a.default.expandableContainerWidth:""),style:null==_?void 0:_.expandableContainer},{children:n.jsx("div",e.__assign({className:a.default.expandableContent,style:null==_?void 0:_.expandableContent},{children:n.jsxs("div",e.__assign({className:a.default.bookBodyContent,style:null==_?void 0:_.bookBodyContent},{children:[!T&&n.jsx("div",e.__assign({className:a.default.header,style:null==_?void 0:_.bookHeader},{children:n.jsxs("div",e.__assign({className:a.default.bookInfo},{children:[N&&n.jsx("div",e.__assign({className:a.default.bookImageWrapper},{children:n.jsx("img",{src:N,alt:r||"Book cover",className:a.default.bookImage})})),n.jsxs("div",e.__assign({className:a.default.bookTextInfo},{children:[n.jsx("h1",e.__assign({className:a.default.bookTitle},{children:r})),c||Array.isArray(c)&&n.jsxs("p",e.__assign({className:a.default.bookAuthor},{children:["by"," ",Array.isArray(c)?c.join(", "):c||""]}))]})),n.jsx("div",e.__assign({onClick:j,className:a.default.externalLink},{children:f}))]}))})),n.jsx("div",e.__assign({className:a.default.relativeContainer,style:null==_?void 0:_.relative},{children:n.jsx("div",e.__assign({className:a.default.container},{children:n.jsxs("div",e.__assign({className:"".concat(a.default.contentWrapper," ").concat(a.default.customScrollbarClass," ").concat(H?"":a.default.maxheight38rem),style:null==_?void 0:_.customScrollbarClass},{children:[$&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:a.default.gradientOverlayLeft}),n.jsx("div",{className:a.default.gradientOverlayRight})]}),n.jsxs("div",e.__assign({className:a.default.contentWrapper},{children:[l.map(function(e,t){i.cleanScannedText(e);var o=(y?e.includes(v[0]):v.some(function(n){return P(e).toLowerCase()===P(n).toLowerCase()}))?z(l.join("\n"),e,"Citation",k,v,y):e;return n.jsx("div",{className:"".concat(a.default.paragraph," ").concat(0!==t?a.default.textIndent:""),dangerouslySetInnerHTML:{__html:o}},t)}),h&&n.jsx("div",e.__assign({className:a.default.pageIndex},{children:n.jsxs("div",e.__assign({className:a.default.pageLabel,style:null==_?void 0:_.pageColor},{children:[h," ",m&&"of ".concat(m)]}))}))]}))]}))}))}))]}))}))}))}))]}))})};
|
|
2
2
|
//# sourceMappingURL=BookCitation.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),i=require("lucide-react");exports.default=function(r){var o=r.children,s=r.uploadListTopContent,d=r.defaultHeight,a=void 0===d?300:d,l=r.minHeight,u=void 0===l?150:l,c=r.maxHeight,p=r.isExpanded,x=void 0!==p&&p,f=r.onToggle,g=r.onHeightChange,h=t.useState(!1),m=h[0],v=h[1],y=t.useState(a),b=y[0],w=y[1],_=t.useRef(0),j=t.useRef(a),H="string"==typeof c?parseFloat(c)/100*window.innerHeight:null!=c?c:.4*window.innerHeight;return t.useEffect(function(){if(m){var e=function(e){e.preventDefault();var n=e.clientY-_.current,t=Math.max(u,Math.min(H,j.current+n));w(t),null==g||g(t)},n=function(){v(!1),document.body.style.userSelect=""};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",n),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n)}}},[m]),n.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",backgroundColor:"#fff",borderRadius:20,border:"1px solid #BDB4FE",boxShadow:"0 4px 8px -2px rgba(16, 24, 40, 0.05), 0 2px 4px -2px rgba(16, 24, 40, 0.06)",height:x?"".concat(b,"px"):"auto",minHeight:x?"".concat(u,"px"):"auto",maxHeight:x?"".concat(b,"px"):"auto",overflow:"hidden",width:"100%"}},{children:[n.jsx("div",e.__assign({style:{display:"flex",alignItems:"center",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px"}},{children:n.jsxs("button",e.__assign({onClick:f,style:{display:"flex",alignItems:"center",gap:8,background:"none",border:"none",cursor:"pointer",padding:0}},{children:[n.jsx("span",e.__assign({style:{display:"inline-block",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"}},{children:(null==s?void 0:s.trim())?s:"Data uploaded for your context"})),n.jsx("span",e.__assign({style:{display:"flex",alignItems:"center",width:16,height:16,transform:x?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}},{children:n.jsx(i.ChevronDown,{})}))]}))})),x&&n.jsx("div",e.__assign({style:{flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px"}},{children:o})),x&&n.jsx("div",e.__assign({onMouseDown:function(e){e.preventDefault(),v(!0),_.current=e.clientY,j.current=b,document.body.style.userSelect="none"},style:{display:"flex",justifyContent:"center",alignItems:"center",padding:"8px 20px",cursor:"ns-resize",userSelect:"none",flexShrink:0}},{children:n.jsx("div",{style:{width:48,height:4,borderRadius:4,background:m?"#a78bfa":"#d1d5db"}})}))]}))};
|
|
2
|
+
//# sourceMappingURL=ChatDrawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatDrawer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.FILE_INGESTION_STATUS={INGESTING_FILE:"Ingesting File",YET_TO_INGEST:"Yet to Ingest",INGESTION_COMPLETE:"Completed",INGESTION_FAILED:"Ingestion Failed"},exports.SUMMARY_EXPAND_HEIGHT_NUDGE=100,exports.TRUNCATE_THRESHOLD=80;
|
|
2
|
+
//# sourceMappingURL=ChatDrawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatDrawer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),s=require("@react-pdf-viewer/core"),i=require("./PdfStyle.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),s=require("@react-pdf-viewer/core"),i=require("./PdfStyle.js"),n="https://unpkg.com/pdfjs-dist@3.11.174/build/pdf.worker.min.js";exports.default=function(t){var o=t.pdfUrl,l=t.plugins,a=t.onLoad,d=t.customStyles,u=t.onPageChange;return r.jsx("div",e.__assign({style:e.__assign(e.__assign({},i.pdfStyles.pdfConatiner),null==d?void 0:d.pdfContainer)},{children:r.jsx(s.Worker,e.__assign({workerUrl:n},{children:r.jsx(s.Viewer,{fileUrl:o,defaultScale:s.SpecialZoomLevel.ActualSize,plugins:l,onDocumentLoad:a,onPageChange:u})}))}))},exports.pdfWorker=n;
|
|
2
2
|
//# sourceMappingURL=PdfContainer.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"),s=require("./PdfToolbar.js"),o=require("./PdfStyle.js"),
|
|
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"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@react-pdf-viewer/search"),r=require("@react-pdf-viewer/page-navigation"),n=require("@react-pdf-viewer/zoom");exports.PdfHighlightControls=function(i,o,a,u){var c=e.useState(0),l=c[0],s=c[1],h=e.useRef(!1),g=e.useState(0),p=g[0],f=g[1],v=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,i=0;null!==(t=n.exec(e));){var o=e.slice(i,t.index).trim();o&&r.push(o),t[2]&&r.push(t[2].trim()),i=t.index+t[0].length}var a=e.slice(i).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()})})},d=Object.keys(o).map(Number).sort(function(e,t){return e-t}),m=Object.values(o).filter(function(e){return e>0}).length,_=function(e){a.current&&a.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"),i=t.querySelectorAll(".rpv-search__highlight");e.has(n)||i.forEach(function(e){e.style.display="none"})})},y=i.map(function(e){return v(e)}).flat();console.log("[debug: PDF highlight text]",i,y);var x=t.searchPlugin({keyword:y}),S=r.pageNavigationPlugin(),T=n.zoomPlugin(),q=x.jumpToMatch,b=S.jumpToPage,A=T.zoomTo,P=T.ZoomInButton,w=T.ZoomOutButton,M=T.ZoomPopover,j=function(){if(!h.current)try{q(0),h.current=!0}catch(e){requestAnimationFrame(j)}},B=function(e,t){if(a.current&&a.current.querySelector(".rpv-core__viewer")){var r=-1,n=function(){var i,o,u=null===(i=a.current)||void 0===i?void 0:i.querySelector(".rpv-core__inner-pages");if(u){if(u.scrollTop!==r)return r=u.scrollTop,void setTimeout(n,100);var c=null===(o=a.current)||void 0===o?void 0:o.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(c){var l=c.querySelectorAll(".rpv-search__highlight")[t];if(l){var s=u.getBoundingClientRect(),h=l.getBoundingClientRect(),g=u.scrollTop+(h.top-s.top)-u.clientHeight/2+h.height/2;u.scrollTo({top:g,behavior:"smooth"})}}}};setTimeout(n,300)}},I=e.useMemo(function(){var e={};return d.forEach(function(t,r){var n=o[t];n>0&&(e[n]||(e[n]=[]),e[n].push(r))}),e},[d,o]),O=function(e){var t=o[d[e]];return(I[t]||[]).indexOf(e)};return{setHighlightIndex:s,highlightIndex:l,cursorIndex:p,setCursorIndex:f,orderedKeys:d,totalHighlights:m,getValidPosition:function(e){for(var t=0,r=0;r<=e;r++){var n=d[r];o[n]>0&&t++}return t},tryJump:j,jumpToPage:b,zoomTo:A,hideNonTargetHighlights:_,deduplicateHighlights:function(e){if(a.current){var t=a.current.querySelectorAll(".rpv-search__highlights"),r=new Set,n=new Set;t.forEach(function(t){var i=t.getAttribute("data-testid"),o=parseInt((null==i?void 0:i.replace("search__highlights-",""))||"-1"),a=t.querySelectorAll(".rpv-search__highlight");if(o===e){var u=new Set;a.forEach(function(e){var t=e,i=(t.getAttribute("title")||"").toLowerCase(),o=t.style.top,a="".concat(i,"_").concat(o);r.has(a)?t.style.display=u.has(a)?"none":"":(r.add(a),n.has(i)?(u.add(a),t.style.display="none"):(n.add(i),t.style.display=""))})}})}},plugins:[x,S,T],controls:{ZoomInButton:P,ZoomOutButton:w,ZoomPopover:M,goToNext:function(){for(var e=p+1;e<d.length;e++){var t=d[e];if(o[t]>0){var r=o[t]-1,n=O(e);return f(e),b(o[t]-1),B(r,n),void(1===Object.keys(o).length&&_(u))}}},goToPrevious:function(){for(var e=p-1;e>=0;e--){var t=d[e];if(o[t]>0){var r=o[t]-1,n=O(e);return f(e),b(o[t]-1),B(r,n),void(1===Object.keys(o).length&&_(u))}}}}}};
|
|
2
2
|
//# sourceMappingURL=usePdfHighlight.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"),
|
|
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"),c=require("./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js"),x=require("./features/RequirementAiCitations/FileCitation/FileCitationContent.js"),g=require("./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js"),j=require("./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js"),R=require("./features/CitationViewer/CitationsViewer.js"),E=require("./features/ExcelCitation/ExcelCitations.js"),D=require("./features/ScannedDocCitation/ScannedDocCitation.js"),A=require("./features/ChatDrawer/ChatDrawer.js"),m=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=p.default,exports.FaqCitation=l.default,exports.ImageCitationContent=q.default,exports.VideoCitationContent=c.default,exports.FileCitationContent=x.default,exports.WebCitationWithImageContent=g.default,exports.AiReasoningCitation=j.default,exports.CitationsViewer=R.default,exports.ExcelCitation=E.default,exports.ScannedDocCitation=D.default,exports.ChatDrawer=A.default,exports.FILE_INGESTION_STATUS=m.FILE_INGESTION_STATUS,exports.SUMMARY_EXPAND_HEIGHT_NUDGE=m.SUMMARY_EXPAND_HEIGHT_NUDGE,exports.TRUNCATE_THRESHOLD=m.TRUNCATE_THRESHOLD;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as n}from"tslib";import{jsx as e,Fragment as t,jsxs as a}from"react/jsx-runtime";import{useState as o,useEffect as i}from"react";import r from"./BookCitation.module.css.js";import{cleanScannedText as c}from"./text-cleaner.js";var l=function(l){var s,d=l.title,u=l.author,v=l.paragraphs,h=l.chevronUpComponent,
|
|
1
|
+
import{__assign as n}from"tslib";import{jsx as e,Fragment as t,jsxs as a}from"react/jsx-runtime";import{useState as o,useEffect as i}from"react";import r from"./BookCitation.module.css.js";import{cleanScannedText as c}from"./text-cleaner.js";var l=function(l){var s,d=l.title,u=l.author,v=l.paragraphs,h=l.chevronUpComponent,p=l.chevronDownComponent,m=l.externalLinkComponent,f=l.textToHighlight,g=l.pageNumber,N=l.totalPageNumber,b=void 0===N?null:N,x=l.citationTitle,y=l.customStyle,C=void 0===y?{}:y,k=l.handleExternalLinkClick,E=l.bookCoverImage,A=l.partialMatch,L=void 0!==A&&A,T=l.citationNumber,w=void 0===T?1:T,B=l.defaultState,q=void 0!==B&&B,I=l.isNonHighlightedBlur,W=void 0!==I&&I,H=l.toggleBlur,j=void 0===H?W:H,M=l.fixedWidth,O=void 0===M||M,S=l.isBookemon,R=void 0!==S&&S,$=l.useDropdown,D=void 0===$||$,_=o(q),F=_[0],V=_[1],z=null===(s=null==C?void 0:C.showGradientOverlay)||void 0===s||s,G=["address","article","aside","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","li","main","nav","noscript","ol","p","pre","section","table","tfoot","ul","video"];i(function(){if(F||!D){var n,e="quotes-citations-".concat(null!=w?w:""),t=!1;return requestAnimationFrame(function(){requestAnimationFrame(function(){n=function(){var n=document.getElementById(e);if(n&&!t){n.scrollIntoView({behavior:"smooth",block:"center"});var a=setTimeout(function(){if(!t){var e=n.getBoundingClientRect(),a=window.innerHeight/2;Math.abs(e.top-a)>40&&n.scrollIntoView({behavior:"auto",block:"center"})}},400);return function(){return clearTimeout(a)}}}()||void 0})}),function(){t=!0,n&&n()}}},[F,D,f,w]);var P=function(n){void 0===n&&(n="");var e=document.createElement("div");e.innerHTML=n;var t=e.textContent||e.innerText||"";return(t=(t=t.replace(/<\/?[^>]+(>|$)/g,"")).replace(/\s+/g," ")).trim()};function U(n){var e=document.createElement("div");e.innerHTML=n;var t=r.highlighted,a=function(n,e){var o,i;if(void 0===e&&(e=!1),n.nodeType===Node.TEXT_NODE){if(!e&&(null===(o=n.textContent)||void 0===o?void 0:o.trim())){var c=document.createElement("span");c.classList.add(r.blurred),c.textContent=n.textContent,null===(i=n.parentNode)||void 0===i||i.replaceChild(c,n)}}else if(n.nodeType===Node.ELEMENT_NODE){var l=n,s=l.classList.contains(t);Array.from(l.childNodes).forEach(function(n){return a(n,e||s)})}};return Array.from(e.childNodes).forEach(function(n){return a(n)}),e.innerHTML}function X(n,e,t,a,o,i){void 0===o&&(o=[]),void 0===i&&(i=!1);var c,l=r.highlighted,s=r.highlightedInline,d=r.highlightedBlock,u="".concat(l," ").concat(s),v="".concat(l," ").concat(d),h=e,p=(c=document.createElement("textarea"),function(n){return c.innerHTML=n,c.value});if(o.length>0){if(i){return o.forEach(function(n){n&&(h=function(n,e,t){for(var a='<span id="'.concat(t,'" class="').concat(u,'">'),o="</span>",i=n,r=0,c=new RegExp("(<(?:".concat(G.join("|"),")[^>]*>.*?)(?=<(?:").concat(G.join("|"),")|$)"),"gi"),l=(e.match(c)||[e]).map(function(n){var e=n.match(/^<([a-zA-Z0-9]+)([^>]*)>/);if(e&&G.includes(e[1].toLowerCase())){var t=e[0].length;return e[0]+a+n.slice(t)+o}return a+n+o}).join("");;){var s=i.indexOf(e,r);if(-1===s)break;i=i.slice(0,s)+l+i.slice(s+e.length),r=s+l.length}var v=d;return i.replace(/<span([^>]*)>([\s\S]*?)<\/span>/gi,function(n,e,t){if(G.some(function(n){return new RegExp("<".concat(n,"\\b[^>]*>"),"i").test(t)})){var a=e.match(/\sclass\s*=\s*(['"])(.*?)\1/);if(a){var o=a[2],i=o.split(/\s+/).includes(v)?o:"".concat(o," ").concat(v);e=e.replace(a[0],' class="'.concat(i,'"'))}else e+=' class="'.concat(v,'"')}return"<span".concat(e,">").concat(t,"</span>")})}(h,n,"Annotation"===t?"quotes-annotations-".concat(null!=a?a:""):"quotes-citations-".concat(null!=a?a:"")))}),W&&j?U(h):h}return o.forEach(function(n){var o=p(n).trim();if(o&&p(e).trim().toLowerCase()===o.toLowerCase()){var i="Annotation"===t?"quotes-annotations-".concat(null!=a?a:""):"quotes-citations-".concat(null!=a?a:"");h='<span id="'.concat(i,'" class="').concat(v,'">').concat(e,"</span>")}}),W&&j?U(h):h}var m=v;if(!n||!e)return"Annotation"===t?e:'<span id="quotes-citations" class="'.concat(m,'">').concat(e,"</span>");var f=Array.from(n.matchAll(/`([^`]+)`/g));if(0===f.length)return"Annotation"===t?e:'<span id="quotes-citations" class="'.concat(m,'">').concat(e,"</span>");h=e;var g=!1;return f.forEach(function(n){var e=p(n[1]).trim();if(e){var a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp("(".concat(a,")"),"gi");h.match(o)&&(g=!0,h=h.replace(o,'<span id="'.concat("Annotation"===t?"quotes-annotations":"quotes-citations",'" class="').concat(m,'">$1</span>')))}}),g?h:"Annotation"===t?e:'<span id="quotes-citations" class="'.concat(m,'">').concat(e,"</span>")}return e(t,{children:a("span",n({className:"".concat(r.relativeWrapper," ").concat(R?r.height95percent+" "+r.displayFlex:r.height100percent),style:null==C?void 0:C.relativeWrapper},{children:[!q&&D&&e("div",n({className:r.citationButtonWrapper,style:null==C?void 0:C.citationButtonWrapper},{children:a("div",n({onClick:function(){return V(function(n){return!n})},className:r.citationButton,style:null==C?void 0:C.citationButton},{children:[e("span",n({className:r.citationText},{children:x})),e("span",n({style:null==C?void 0:C.arrow},{children:F?h:p}))]}))})),(F&&D||!D)&&e("div",n({className:r.expandedWrapper,style:null==C?void 0:C.expandedWrapper},{children:e("div",n({className:"".concat(r.expandableContainer," ").concat(O?r.expandableContainerWidth:""),style:null==C?void 0:C.expandableContainer},{children:e("div",n({className:r.expandableContent,style:null==C?void 0:C.expandableContent},{children:a("div",n({className:r.bookBodyContent,style:null==C?void 0:C.bookBodyContent},{children:[!q&&e("div",n({className:r.header,style:null==C?void 0:C.bookHeader},{children:a("div",n({className:r.bookInfo},{children:[E&&e("div",n({className:r.bookImageWrapper},{children:e("img",{src:E,alt:d||"Book cover",className:r.bookImage})})),a("div",n({className:r.bookTextInfo},{children:[e("h1",n({className:r.bookTitle},{children:d})),u||Array.isArray(u)&&a("p",n({className:r.bookAuthor},{children:["by"," ",Array.isArray(u)?u.join(", "):u||""]}))]})),e("div",n({onClick:k,className:r.externalLink},{children:m}))]}))})),e("div",n({className:r.relativeContainer,style:null==C?void 0:C.relative},{children:e("div",n({className:r.container},{children:a("div",n({className:"".concat(r.contentWrapper," ").concat(r.customScrollbarClass," ").concat(R?"":r.maxheight38rem),style:null==C?void 0:C.customScrollbarClass},{children:[z&&a(t,{children:[e("div",{className:r.gradientOverlayLeft}),e("div",{className:r.gradientOverlayRight})]}),a("div",n({className:r.contentWrapper},{children:[v.map(function(n,t){c(n);var a=(L?n.includes(f[0]):f.some(function(e){return P(n).toLowerCase()===P(e).toLowerCase()}))?X(v.join("\n"),n,"Citation",w,f,L):n;return e("div",{className:"".concat(r.paragraph," ").concat(0!==t?r.textIndent:""),dangerouslySetInnerHTML:{__html:a}},t)}),g&&e("div",n({className:r.pageIndex},{children:a("div",n({className:r.pageLabel,style:null==C?void 0:C.pageColor},{children:[g," ",b&&"of ".concat(b)]}))}))]}))]}))}))}))]}))}))}))}))]}))})};export{l as default};
|
|
2
2
|
//# sourceMappingURL=BookCitation.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as t,jsx as n}from"react/jsx-runtime";import{useState as i,useRef as o,useEffect as r}from"react";import{ChevronDown as d}from"lucide-react";var l=function(l){var a=l.children,s=l.uploadListTopContent,c=l.defaultHeight,u=void 0===c?300:c,p=l.minHeight,f=void 0===p?150:p,m=l.maxHeight,h=l.isExpanded,x=void 0!==h&&h,g=l.onToggle,v=l.onHeightChange,y=i(!1),b=y[0],w=y[1],H=i(u),S=H[0],k=H[1],D=o(0),E=o(u),C="string"==typeof m?parseFloat(m)/100*window.innerHeight:null!=m?m:.4*window.innerHeight;return r(function(){if(b){var e=function(e){e.preventDefault();var t=e.clientY-D.current,n=Math.max(f,Math.min(C,E.current+t));k(n),null==v||v(n)},t=function(){w(!1),document.body.style.userSelect=""};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}},[b]),t("div",e({style:{display:"flex",flexDirection:"column",backgroundColor:"#fff",borderRadius:20,border:"1px solid #BDB4FE",boxShadow:"0 4px 8px -2px rgba(16, 24, 40, 0.05), 0 2px 4px -2px rgba(16, 24, 40, 0.06)",height:x?"".concat(S,"px"):"auto",minHeight:x?"".concat(f,"px"):"auto",maxHeight:x?"".concat(S,"px"):"auto",overflow:"hidden",width:"100%"}},{children:[n("div",e({style:{display:"flex",alignItems:"center",width:"100%",marginBottom:12,flexShrink:0,padding:"12px 20px 0 20px"}},{children:t("button",e({onClick:g,style:{display:"flex",alignItems:"center",gap:8,background:"none",border:"none",cursor:"pointer",padding:0}},{children:[n("span",e({style:{display:"inline-block",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:500,lineHeight:"24px",color:"#101828",fontFamily:"Inter, sans-serif"}},{children:(null==s?void 0:s.trim())?s:"Data uploaded for your context"})),n("span",e({style:{display:"flex",alignItems:"center",width:16,height:16,transform:x?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}},{children:n(d,{})}))]}))})),x&&n("div",e({style:{flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0,padding:"0 20px"}},{children:a})),x&&n("div",e({onMouseDown:function(e){e.preventDefault(),w(!0),D.current=e.clientY,E.current=S,document.body.style.userSelect="none"},style:{display:"flex",justifyContent:"center",alignItems:"center",padding:"8px 20px",cursor:"ns-resize",userSelect:"none",flexShrink:0}},{children:n("div",{style:{width:48,height:4,borderRadius:4,background:b?"#a78bfa":"#d1d5db"}})}))]}))};export{l as default};
|
|
2
|
+
//# sourceMappingURL=ChatDrawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatDrawer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var I={INGESTING_FILE:"Ingesting File",YET_TO_INGEST:"Yet to Ingest",INGESTION_COMPLETE:"Completed",INGESTION_FAILED:"Ingestion Failed"},e=80,E=100;export{I as FILE_INGESTION_STATUS,E as SUMMARY_EXPAND_HEIGHT_NUDGE,e as TRUNCATE_THRESHOLD};
|
|
2
|
+
//# sourceMappingURL=ChatDrawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatDrawer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as r}from"tslib";import{jsx as
|
|
1
|
+
import{__assign as r}from"tslib";import{jsx as e}from"react/jsx-runtime";import{Worker as o,Viewer as t,SpecialZoomLevel as n}from"@react-pdf-viewer/core";import{pdfStyles as i}from"./PdfStyle.js";var l="https://unpkg.com/pdfjs-dist@3.11.174/build/pdf.worker.min.js",a=function(a){var d=a.pdfUrl,f=a.plugins,p=a.onLoad,m=a.customStyles,s=a.onPageChange;return e("div",r({style:r(r({},i.pdfConatiner),null==m?void 0:m.pdfContainer)},{children:e(o,r({workerUrl:l},{children:e(t,{fileUrl:d,defaultScale:n.ActualSize,plugins:f,onDocumentLoad:p,onPageChange:s})}))}))};export{a as default,l as pdfWorker};
|
|
2
2
|
//# sourceMappingURL=PdfContainer.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
|
|
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{useState as
|
|
1
|
+
import{useState as e,useRef as t,useMemo as r}from"react";import{searchPlugin as n}from"@react-pdf-viewer/search";import{pageNavigationPlugin as i}from"@react-pdf-viewer/page-navigation";import{zoomPlugin as o}from"@react-pdf-viewer/zoom";var a=function(a,u,c,l){var s=e(0),h=s[0],p=s[1],g=t(!1),f=e(0),v=f[0],d=f[1],m=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,i=0;null!==(t=n.exec(e));){var o=e.slice(i,t.index).trim();o&&r.push(o),t[2]&&r.push(t[2].trim()),i=t.index+t[0].length}var a=e.slice(i).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}),_=Object.values(u).filter(function(e){return e>0}).length,T=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"),i=t.querySelectorAll(".rpv-search__highlight");e.has(n)||i.forEach(function(e){e.style.display="none"})})},x=a.map(function(e){return m(e)}).flat();console.log("[debug: PDF highlight text]",a,x);var S=n({keyword:x}),A=i(),b=o(),w=S.jumpToMatch,q=A.jumpToPage,B=b.zoomTo,I=b.ZoomInButton,Z=b.ZoomOutButton,j=b.ZoomPopover,E=function(){if(!g.current)try{w(0),g.current=!0}catch(e){requestAnimationFrame(E)}},M=function(e,t){if(c.current&&c.current.querySelector(".rpv-core__viewer")){var r=-1,n=function(){var i,o,a=null===(i=c.current)||void 0===i?void 0:i.querySelector(".rpv-core__inner-pages");if(a){if(a.scrollTop!==r)return r=a.scrollTop,void setTimeout(n,100);var u=null===(o=c.current)||void 0===o?void 0:o.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(u){var l=u.querySelectorAll(".rpv-search__highlight")[t];if(l){var s=a.getBoundingClientRect(),h=l.getBoundingClientRect(),p=a.scrollTop+(h.top-s.top)-a.clientHeight/2+h.height/2;a.scrollTo({top:p,behavior:"smooth"})}}}};setTimeout(n,300)}},O=r(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]),P=function(e){var t=u[y[e]];return(O[t]||[]).indexOf(e)};return{setHighlightIndex:p,highlightIndex:h,cursorIndex:v,setCursorIndex:d,orderedKeys:y,totalHighlights:_,getValidPosition:function(e){for(var t=0,r=0;r<=e;r++){var n=y[r];u[n]>0&&t++}return t},tryJump:E,jumpToPage:q,zoomTo:B,hideNonTargetHighlights:T,deduplicateHighlights:function(e){if(c.current){var t=c.current.querySelectorAll(".rpv-search__highlights"),r=new Set,n=new Set;t.forEach(function(t){var i=t.getAttribute("data-testid"),o=parseInt((null==i?void 0:i.replace("search__highlights-",""))||"-1"),a=t.querySelectorAll(".rpv-search__highlight");if(o===e){var u=new Set;a.forEach(function(e){var t=e,i=(t.getAttribute("title")||"").toLowerCase(),o=t.style.top,a="".concat(i,"_").concat(o);r.has(a)?t.style.display=u.has(a)?"none":"":(r.add(a),n.has(i)?(u.add(a),t.style.display="none"):(n.add(i),t.style.display=""))})}})}},plugins:[S,A,b],controls:{ZoomInButton:I,ZoomOutButton:Z,ZoomPopover:j,goToNext:function(){for(var e=v+1;e<y.length;e++){var t=y[e];if(u[t]>0){var r=u[t]-1,n=P(e);return d(e),q(u[t]-1),M(r,n),void(1===Object.keys(u).length&&T(l))}}},goToPrevious:function(){for(var e=v-1;e>=0;e--){var t=y[e];if(u[t]>0){var r=u[t]-1,n=P(e);return d(e),q(u[t]-1),M(r,n),void(1===Object.keys(u).length&&T(l))}}}}}};export{a as PdfHighlightControls};
|
|
2
2
|
//# sourceMappingURL=usePdfHighlight.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 AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";
|
|
1
|
+
export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";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";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatDrawerTest.d.ts","sourceRoot":"","sources":["../../../src/ChatDrawerTest.tsx"],"names":[],"mappings":"AA+CA,MAAM,CAAC,OAAO,UAAU,cAAc,4CA+BrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookCitation.d.ts","sourceRoot":"","sources":["../../../../../src/features/BookCitation/BookCitation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAuB,MAAM,OAAO,CAAC;AAIlE,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE;QACZ,qBAAqB,CAAC,EAAE,aAAa,CAAC;QACtC,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,cAAc,CAAC,EAAE,aAAa,CAAC;QAC/B,iBAAiB,CAAC,EAAE,aAAa,CAAC;QAClC,UAAU,CAAC,EAAE,aAAa,CAAC;QAC3B,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,mBAAmB,CAAC,EAAE,aAAa,CAAC;QACpC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,oBAAoB,CAAC,EAAE,aAAa,CAAC;QACrC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,mBAAmB,CAAC,EAAE,OAAO,CAAA;KAC9B,CAAC;IACF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"BookCitation.d.ts","sourceRoot":"","sources":["../../../../../src/features/BookCitation/BookCitation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAuB,MAAM,OAAO,CAAC;AAIlE,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,WAAW,CA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AAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type DataSourceId = 'images' | 'meeting-recordings' | 'documents' | 'context-from-web' | 'codebase-knowledge' | 'stormee-conversations' | 'requirement-documents' | 'files';
|
|
2
|
+
export interface FileItem {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
size: string;
|
|
6
|
+
type: string;
|
|
7
|
+
date: string;
|
|
8
|
+
instruction?: string;
|
|
9
|
+
summary?: string | null;
|
|
10
|
+
url?: string;
|
|
11
|
+
projectId?: string;
|
|
12
|
+
gcsUrl?: string;
|
|
13
|
+
source?: DataSourceId;
|
|
14
|
+
status?: string;
|
|
15
|
+
isUploaded?: boolean;
|
|
16
|
+
projectName?: string;
|
|
17
|
+
category?: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface PersistedFileMeta {
|
|
20
|
+
status?: string;
|
|
21
|
+
summary?: string;
|
|
22
|
+
}
|
|
23
|
+
import { ReactNode } from "react";
|
|
24
|
+
export interface UploadedFilesListProps {
|
|
25
|
+
files?: FileItem[];
|
|
26
|
+
sourceAttachments?: Record<string, FileItem[]>;
|
|
27
|
+
persistedFileMeta?: Record<string, PersistedFileMeta>;
|
|
28
|
+
onSetFileMeta?: (id: string, meta: PersistedFileMeta) => void;
|
|
29
|
+
getFileIcon?: (fileType: string) => ReactNode;
|
|
30
|
+
onPreviewFile?: (file: FileItem) => void;
|
|
31
|
+
emptyState?: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=UploadedFilesList.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadedFilesList.types.d.ts","sourceRoot":"","sources":["../../../../../src/features/ChatDrawer/UploadedFilesList.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,oBAAoB,GACpB,WAAW,GACX,kBAAkB,GAClB,oBAAoB,GACpB,uBAAuB,GACvB,uBAA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@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Uploadedfileslist.d.ts","sourceRoot":"","sources":["../../../../../src/features/ChatDrawer/Uploadedfileslist.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAGpE,OAAO,KAAK,EAAY,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAUlF,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAoKvD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** File extension constants for different file types */
|
|
2
|
+
export declare const FILE_EXTENSIONS: {
|
|
3
|
+
readonly IMAGE: readonly ["jpg", "jpeg", "png", "gif", "svg", "webp", "bmp", "ico", "tiff", "tif", "image/jpeg", "image/png", "image/gif", "image/svg+xml", "image/webp", "image/bmp", "image/x-icon", "image/tiff"];
|
|
4
|
+
readonly AUDIO: readonly ["mp3", "wav", "ogg", "m4a", "aac", "flac", "wma"];
|
|
5
|
+
readonly VIDEO: readonly ["mp4", "avi", "mov", "wmv", "flv", "mkv", "webm", "3gp"];
|
|
6
|
+
readonly DOCUMENT: readonly ["pdf", "docx", "application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"];
|
|
7
|
+
};
|
|
8
|
+
/** File ingestion status constants for uploaded attachments */
|
|
9
|
+
export declare const FILE_INGESTION_STATUS: {
|
|
10
|
+
readonly INGESTING_FILE: "Ingesting File";
|
|
11
|
+
readonly YET_TO_INGEST: "Yet to Ingest";
|
|
12
|
+
readonly INGESTION_COMPLETE: "Completed";
|
|
13
|
+
readonly INGESTION_FAILED: "Ingestion Failed";
|
|
14
|
+
};
|
|
15
|
+
export declare const TRUNCATE_THRESHOLD = 80;
|
|
16
|
+
export declare const SUMMARY_EXPAND_HEIGHT_NUDGE = 100;
|
|
17
|
+
//# sourceMappingURL=ChatDrawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatDrawer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/ChatDrawer/constants/ChatDrawer.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,eAAO,MAAM,eAAe;;;;;CAKlB,CAAC;AAEX,+DAA+D;AAC/D,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AAEX,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,2BAA2B,MAAM,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the appropriate icon component for a file type
|
|
4
|
+
* @param type - File type or extension
|
|
5
|
+
* @returns React component for the file icon
|
|
6
|
+
*/
|
|
7
|
+
export declare const getFileIcon: (type: string) => ReactNode;
|
|
8
|
+
//# sourceMappingURL=ChatDrawerContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatDrawerContext.d.ts","sourceRoot":"","sources":["../../../../../../src/features/ChatDrawer/context/ChatDrawerContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC;;;;GAIG;AACH,eAAO,MAAM,WAAW,SAAU,MAAM,KAAG,SAyB1C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface ChatDrawerProps {
|
|
3
|
+
/** Scrollable body — fully consumer owned. Pass anything: forms, file lists, summaries, tables. */
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
/** Header title. Falls back to "Data uploaded for your context". */
|
|
6
|
+
uploadListTopContent?: string;
|
|
7
|
+
/** Initial height when expanded in px. Default: 300 */
|
|
8
|
+
defaultHeight?: number;
|
|
9
|
+
/** Minimum height when dragging in px. Default: 150 */
|
|
10
|
+
minHeight?: number;
|
|
11
|
+
/** Maximum height — px number or string e.g. "70vh". Default: 40vh */
|
|
12
|
+
maxHeight?: number | string;
|
|
13
|
+
/** Controlled open state */
|
|
14
|
+
isExpanded?: boolean;
|
|
15
|
+
/** Toggle callback */
|
|
16
|
+
onToggle?: () => void;
|
|
17
|
+
/** Called on every drag-resize tick with the new height in px */
|
|
18
|
+
onHeightChange?: (height: number) => void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ChatDrawer.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatDrawer.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/ChatDrawer/types/ChatDrawer.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,eAAe;IAC9B,mGAAmG;IACnG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,4BAA4B;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iEAAiE;IACjE,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PageChangeEvent } from "@react-pdf-viewer/core";
|
|
1
2
|
import { CustomStylesType } from "./PdfViewer";
|
|
2
3
|
export declare const pdfWorker: string;
|
|
3
4
|
type Props = {
|
|
@@ -5,7 +6,8 @@ type Props = {
|
|
|
5
6
|
plugins: any[];
|
|
6
7
|
onLoad: () => void;
|
|
7
8
|
customStyles?: CustomStylesType;
|
|
9
|
+
onPageChange: (e: PageChangeEvent) => void;
|
|
8
10
|
};
|
|
9
|
-
declare const PdfContainer: ({ pdfUrl, plugins, onLoad, customStyles }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const PdfContainer: ({ pdfUrl, plugins, onLoad, customStyles, onPageChange }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export default PdfContainer;
|
|
11
13
|
//# sourceMappingURL=PdfContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfContainer.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PdfContainer.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,eAAO,MAAM,SAAS,EAAE,MAAwE,CAAC;AAEjG,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,YAAY,EAAI,CAAC,CAAC,EAAG,eAAe,KAAK,IAAI,CAAA;CAC9C,CAAC;AAEF,QAAA,MAAM,YAAY,4DAA4D,KAAK,4CAclF,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfViewer.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfViewer.tsx"],"names":[],"mappings":"AAKA,OAAO,6CAA6C,CAAC;AACrD,OAAO,wDAAwD,CAAC;AAChE,OAAO,6CAA6C,CAAC;AACrD,OAAO,+CAA+C,CAAC;AACvD,OAAO,
|
|
1
|
+
{"version":3,"file":"PdfViewer.d.ts","sourceRoot":"","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AAG,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,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const PdfHighlightControls: (highlightText: string[], highlightPages: Record<number, number>, viewerRef: React.RefObject<HTMLDivElement | null>) => {
|
|
2
|
+
export declare const PdfHighlightControls: (highlightText: string[], highlightPages: Record<number, number>, viewerRef: React.RefObject<HTMLDivElement | null>, highlightPageSet: Set<number>) => {
|
|
3
3
|
setHighlightIndex: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
4
4
|
highlightIndex: number;
|
|
5
5
|
cursorIndex: number;
|
|
@@ -10,7 +10,8 @@ export declare const PdfHighlightControls: (highlightText: string[], highlightPa
|
|
|
10
10
|
tryJump: () => void;
|
|
11
11
|
jumpToPage: (pageIndex: number) => void;
|
|
12
12
|
zoomTo: (scale: number | import("@react-pdf-viewer/core").SpecialZoomLevel) => void;
|
|
13
|
-
hideNonTargetHighlights: (
|
|
13
|
+
hideNonTargetHighlights: (targetPages: Set<number>) => void;
|
|
14
|
+
deduplicateHighlights: (targetPage: number) => void;
|
|
14
15
|
plugins: (import("@react-pdf-viewer/page-navigation").PageNavigationPlugin | import("@react-pdf-viewer/zoom").ZoomPlugin | import("@react-pdf-viewer/search").SearchPlugin)[];
|
|
15
16
|
controls: {
|
|
16
17
|
ZoomInButton: () => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePdfHighlight.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/usePdfHighlight.tsx"],"names":[],"mappings":";AAKA,eAAO,MAAM,oBAAoB,kBAChB,MAAM,EAAE,kBACP,OAAO,MAAM,EAAE,MAAM,CAAC,aAC3B,MAAM,SAAS,CAAC,cAAc,GAAG,IAAI,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;;;;2CA+HM,IAAI,MAAM,CAAC;wCA9Cd,MAAM;;;;;;;;;CAqOlD,CAAC"}
|
|
@@ -20,4 +20,7 @@ export { default as AiReasoningCitation } from "./features/RequirementAiCitation
|
|
|
20
20
|
export { default as CitationsViewer } from "./features/CitationViewer/CitationsViewer";
|
|
21
21
|
export { default as ExcelCitation } from "./features/ExcelCitation/ExcelCitations";
|
|
22
22
|
export { default as ScannedDocCitation } from "./features/ScannedDocCitation/ScannedDocCitation";
|
|
23
|
+
export { default as ChatDrawer } from "./features/ChatDrawer/ChatDrawer";
|
|
24
|
+
export type { ChatDrawerProps } from "./features/ChatDrawer/types/ChatDrawer.types";
|
|
25
|
+
export { FILE_INGESTION_STATUS, SUMMARY_EXPAND_HEIGHT_NUDGE, TRUNCATE_THRESHOLD } from "./features/ChatDrawer/constants/ChatDrawer";
|
|
23
26
|
//# 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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ACnI,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mEAAmE,CAAC;AACnH,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-llm-studio/citation",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.160",
|
|
4
4
|
"author": "Devesh Patel",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,6 +32,11 @@
|
|
|
32
32
|
"require": "./dist/cjs/features/ChatCitation/ChatCitationRenderer.js",
|
|
33
33
|
"types": "./dist/types/src/features/ChatCitation/ChatCitationRenderer.d.ts"
|
|
34
34
|
},
|
|
35
|
+
"./ChatDrawer": {
|
|
36
|
+
"import": "./dist/features/ChatDrawer/ChatDrawer.js",
|
|
37
|
+
"require": "./dist/cjs/features/ChatDrawer/ChatDrawer.js",
|
|
38
|
+
"types": "./dist/types/src/features/ChatDrawer/ChatDrawer.d.ts"
|
|
39
|
+
},
|
|
35
40
|
"./ExcelCitation": {
|
|
36
41
|
"import": "./dist/features/ExcelCitation/ExcelCitation.js",
|
|
37
42
|
"require": "./dist/cjs/features/ExcelCitation/ExcelCitation.js",
|