@viswa-test/test-citation 0.0.8 → 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/dist/cjs/features/AiRedLineCompare/AiRedLineCompare.js +1 -1
- package/dist/cjs/features/MarkdownWithImageCitation/MarkdownWithImageCitation.js +2 -0
- package/dist/cjs/features/MarkdownWithImageCitation/MarkdownWithImageCitation.js.map +1 -0
- package/dist/cjs/features/MarkdownWithImageCitation/MarkdownWithImageCitation.module.css.js +2 -0
- package/dist/cjs/features/MarkdownWithImageCitation/MarkdownWithImageCitation.module.css.js.map +1 -0
- package/dist/features/AiRedLineCompare/AiRedLineCompare.js +1 -1
- package/dist/features/MarkdownWithImageCitation/MarkdownWithImageCitation.js +2 -0
- package/dist/features/MarkdownWithImageCitation/MarkdownWithImageCitation.js.map +1 -0
- package/dist/features/MarkdownWithImageCitation/MarkdownWithImageCitation.module.css.js +2 -0
- package/dist/features/MarkdownWithImageCitation/MarkdownWithImageCitation.module.css.js.map +1 -0
- package/dist/types/src/AiRedLineCompareTest.d.ts.map +1 -1
- package/dist/types/src/MarkdownWithImageCitationTest.d.ts +3 -0
- package/dist/types/src/MarkdownWithImageCitationTest.d.ts.map +1 -0
- package/dist/types/src/features/AiRedLineCompare/AiRedLineCompare.d.ts +2 -0
- package/dist/types/src/features/AiRedLineCompare/AiRedLineCompare.d.ts.map +1 -1
- package/dist/types/src/features/MarkdownWithImageCitation/MarkdownWithImageCitation.d.ts +37 -0
- package/dist/types/src/features/MarkdownWithImageCitation/MarkdownWithImageCitation.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -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"),
|
|
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
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),l=require("react-markdown"),s=require("rehype-raw"),t=require("../RequirementAiCitations/components/CitationAIConfidenceDisplay.js"),a=require("./MarkdownWithImageCitation.module.css.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=r(n),o=r(l),u=r(s);exports.default=function(n){var l,s,r,c,v=null===(l=null==n?void 0:n.closeCitationConfig)||void 0===l?void 0:l.CloseIcon,m=n.styles,_=function(e){if(!e)return"";var i=e.replace(/\t/g," ").split("\n"),n=i.filter(function(e){return e.trim().length>0}).reduce(function(e,i){var n=i.match(/^ */),l=n?n[0].length:0;return Math.min(e,l)},Number.POSITIVE_INFINITY);return i.map(function(e){return n&&Number.isFinite(n)?e.slice(n):e}).join("\n").trim()}(n.markdownContent);return i.jsxs("div",e.__assign({className:a.default.container,style:null==m?void 0:m.container},{children:[i.jsxs("div",e.__assign({className:a.default.header,style:null==m?void 0:m.header},{children:[i.jsxs("div",e.__assign({className:a.default.titleGroup,style:null==m?void 0:m.titleGroup},{children:[i.jsx("h2",e.__assign({className:a.default.title,style:null==m?void 0:m.title},{children:(null==n?void 0:n.citationTitle)||"Markdown With Image"})),(null==n?void 0:n.timestamp)?i.jsx("span",e.__assign({className:a.default.timestamp,style:null==m?void 0:m.timestamp},{children:n.timestamp})):null]})),(null==n?void 0:n.closeCitationConfig)?i.jsxs("div",e.__assign({className:a.default.headerRight,style:null==m?void 0:m.headerRight},{children:[t.renderCitationAIConfidenceDisplay(n.relevanceScore,!1,null==m?void 0:m.aiConfidenceDisplayPill),i.jsx("div",{className:a.default.divider,style:null==m?void 0:m.divider}),v&&i.jsx("div",e.__assign({className:a.default.closeIconWrapper,style:null==m?void 0:m.closeIconWrapper,onClick:n.closeCitationConfig.handleCloseCitationPreview},{children:i.jsx(v,{className:a.default.closeIcon})}))]})):t.renderCitationAIConfidenceDisplay(n.relevanceScore,!0,null==m?void 0:m.aiConfidenceDisplayPill)]})),i.jsx("div",e.__assign({className:a.default.content,style:null==m?void 0:m.content},{children:i.jsx("div",e.__assign({style:null===(s=null==m?void 0:m.markdown)||void 0===s?void 0:s.containerWrapper},{children:i.jsx("div",e.__assign({style:null===(r=null==m?void 0:m.markdown)||void 0===r?void 0:r.mainCard},{children:i.jsx("div",e.__assign({className:a.default.markdownBody,style:null===(c=null==m?void 0:m.markdown)||void 0===c?void 0:c.scrollArea},{children:i.jsx(o.default,e.__assign({rehypePlugins:[u.default],components:{p:function(n){n.node;var l=n.children,s=e.__rest(n,["node","children"]);return i.jsx("p",e.__assign({},s,{children:d.default.Children.map(l,function(n){var l,s,t;return"string"==typeof n?(s=n,(t=null===(l=null==m?void 0:m.markdown)||void 0===l?void 0:l.customHighlight)?i.jsx("span",e.__assign({style:t},{children:s})):s):n})}))},img:function(n){n.node;var l=e.__rest(n,["node"]);return i.jsx("div",e.__assign({className:a.default.imageWrapper,style:null==m?void 0:m.imageWrapper},{children:i.jsx("img",e.__assign({},l,{className:a.default.image,style:null==m?void 0:m.image,alt:l.alt||"Citation image"}))}))},ul:function(n){var l;n.node,n.ordered;var s=e.__rest(n,["node","ordered"]);return i.jsx("ul",e.__assign({},s,{style:null===(l=null==m?void 0:m.markdown)||void 0===l?void 0:l.list}))},ol:function(n){var l;n.node,n.ordered;var s=e.__rest(n,["node","ordered"]);return i.jsx("ol",e.__assign({},s,{style:null===(l=null==m?void 0:m.markdown)||void 0===l?void 0:l.list}))}}},{children:_}))}))}))}))}))]}))};
|
|
2
|
+
//# sourceMappingURL=MarkdownWithImageCitation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownWithImageCitation.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const o=document.createElement("style");o.type="text/css";const e=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;e&&o.setAttribute("nonce",e),o.appendChild(document.createTextNode(".MarkdownWithImageCitation-module_container__IIipw{border:1px solid #e5e7eb;display:flex;flex-direction:column;height:100%;min-height:200px;position:relative;row-gap:1rem}.MarkdownWithImageCitation-module_header__yELrX{align-items:center;border-bottom:1px solid #e5e7eb;display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;width:100%}.MarkdownWithImageCitation-module_titleGroup__NoGZT{display:flex;flex-direction:column;overflow:hidden;row-gap:.125rem}.MarkdownWithImageCitation-module_title__2ol0g{color:#1f2937;font-family:Inter,sans-serif;font-weight:400;margin-top:.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.MarkdownWithImageCitation-module_timestamp__TycMU{color:#6b7280;font-family:Inter,sans-serif;font-size:.75rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.MarkdownWithImageCitation-module_headerRight__fKorY{align-items:center;column-gap:1rem;display:flex;flex-direction:row}.MarkdownWithImageCitation-module_divider__DBf2T{align-self:stretch;background-color:#e5e7eb;margin-bottom:-.5rem;margin-top:-.5rem;width:1px}.MarkdownWithImageCitation-module_closeIconWrapper__alT2Q{cursor:pointer}.MarkdownWithImageCitation-module_closeIcon__KvaUd{color:#6b7280;height:24px;width:24px}.MarkdownWithImageCitation-module_content__omW6T{display:flex;flex-direction:column;gap:.875rem;padding:1rem 1rem 1.25rem}.MarkdownWithImageCitation-module_imageWrapper__IuQaH{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;margin-bottom:1rem;margin-top:1rem;overflow:hidden;width:100%}.MarkdownWithImageCitation-module_image__69FkI{display:block;height:auto;max-width:100%;object-fit:cover;vertical-align:middle;width:100%}.MarkdownWithImageCitation-module_markdownBody__Lf-gb{color:#1f2937;font-family:Inter,sans-serif;font-size:.975rem;line-height:1.65}.MarkdownWithImageCitation-module_markdownBody__Lf-gb>:first-child{margin-top:0}.MarkdownWithImageCitation-module_markdownBody__Lf-gb>:last-child{margin-bottom:0}.MarkdownWithImageCitation-module_markdownBody__Lf-gb h1,.MarkdownWithImageCitation-module_markdownBody__Lf-gb h2,.MarkdownWithImageCitation-module_markdownBody__Lf-gb h3,.MarkdownWithImageCitation-module_markdownBody__Lf-gb h4,.MarkdownWithImageCitation-module_markdownBody__Lf-gb h5,.MarkdownWithImageCitation-module_markdownBody__Lf-gb h6{color:#111827;line-height:1.2;margin:0 0 .625rem}.MarkdownWithImageCitation-module_markdownBody__Lf-gb h1{font-size:2rem}.MarkdownWithImageCitation-module_markdownBody__Lf-gb h2{font-size:1.125rem;font-weight:700}.MarkdownWithImageCitation-module_markdownBody__Lf-gb h3{font-size:1rem;font-weight:700}.MarkdownWithImageCitation-module_markdownBody__Lf-gb p{margin:0 0 .875rem}.MarkdownWithImageCitation-module_markdownBody__Lf-gb ol,.MarkdownWithImageCitation-module_markdownBody__Lf-gb ul{margin:0 0 1rem;padding-left:1.25rem}.MarkdownWithImageCitation-module_markdownBody__Lf-gb li+li{margin-top:.25rem}.MarkdownWithImageCitation-module_markdownBody__Lf-gb strong{color:#111827}.MarkdownWithImageCitation-module_markdownBody__Lf-gb blockquote{border-left:3px solid #dbe3f0;color:#4b5563;margin:0 0 1rem;padding-left:.875rem}"));const t=document.head||document.getElementsByTagName("head")[0]||document.documentElement;t&&t.appendChild(o)}(),exports.default={container:"MarkdownWithImageCitation-module_container__IIipw",header:"MarkdownWithImageCitation-module_header__yELrX",titleGroup:"MarkdownWithImageCitation-module_titleGroup__NoGZT",title:"MarkdownWithImageCitation-module_title__2ol0g",timestamp:"MarkdownWithImageCitation-module_timestamp__TycMU",headerRight:"MarkdownWithImageCitation-module_headerRight__fKorY",divider:"MarkdownWithImageCitation-module_divider__DBf2T",closeIconWrapper:"MarkdownWithImageCitation-module_closeIconWrapper__alT2Q",closeIcon:"MarkdownWithImageCitation-module_closeIcon__KvaUd",content:"MarkdownWithImageCitation-module_content__omW6T",imageWrapper:"MarkdownWithImageCitation-module_imageWrapper__IuQaH",image:"MarkdownWithImageCitation-module_image__69FkI",markdownBody:"MarkdownWithImageCitation-module_markdownBody__Lf-gb"};
|
|
2
|
+
//# sourceMappingURL=MarkdownWithImageCitation.module.css.js.map
|
package/dist/cjs/features/MarkdownWithImageCitation/MarkdownWithImageCitation.module.css.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownWithImageCitation.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -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
|
|
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
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e,__rest as i}from"tslib";import{jsxs as l,jsx as n}from"react/jsx-runtime";import o from"react";import r from"react-markdown";import t from"rehype-raw";import{renderCitationAIConfidenceDisplay as d}from"../RequirementAiCitations/components/CitationAIConfidenceDisplay.js";import a from"./MarkdownWithImageCitation.module.css.js";var s=function(s){var c,m,u,v,p=null===(c=null==s?void 0:s.closeCitationConfig)||void 0===c?void 0:c.CloseIcon,h=s.styles,f=function(e){if(!e)return"";var i=e.replace(/\t/g," ").split("\n"),l=i.filter(function(e){return e.trim().length>0}).reduce(function(e,i){var l=i.match(/^ */),n=l?l[0].length:0;return Math.min(e,n)},Number.POSITIVE_INFINITY);return i.map(function(e){return l&&Number.isFinite(l)?e.slice(l):e}).join("\n").trim()}(s.markdownContent);return l("div",e({className:a.container,style:null==h?void 0:h.container},{children:[l("div",e({className:a.header,style:null==h?void 0:h.header},{children:[l("div",e({className:a.titleGroup,style:null==h?void 0:h.titleGroup},{children:[n("h2",e({className:a.title,style:null==h?void 0:h.title},{children:(null==s?void 0:s.citationTitle)||"Markdown With Image"})),(null==s?void 0:s.timestamp)?n("span",e({className:a.timestamp,style:null==h?void 0:h.timestamp},{children:s.timestamp})):null]})),(null==s?void 0:s.closeCitationConfig)?l("div",e({className:a.headerRight,style:null==h?void 0:h.headerRight},{children:[d(s.relevanceScore,!1,null==h?void 0:h.aiConfidenceDisplayPill),n("div",{className:a.divider,style:null==h?void 0:h.divider}),p&&n("div",e({className:a.closeIconWrapper,style:null==h?void 0:h.closeIconWrapper,onClick:s.closeCitationConfig.handleCloseCitationPreview},{children:n(p,{className:a.closeIcon})}))]})):d(s.relevanceScore,!0,null==h?void 0:h.aiConfidenceDisplayPill)]})),n("div",e({className:a.content,style:null==h?void 0:h.content},{children:n("div",e({style:null===(m=null==h?void 0:h.markdown)||void 0===m?void 0:m.containerWrapper},{children:n("div",e({style:null===(u=null==h?void 0:h.markdown)||void 0===u?void 0:u.mainCard},{children:n("div",e({className:a.markdownBody,style:null===(v=null==h?void 0:h.markdown)||void 0===v?void 0:v.scrollArea},{children:n(r,e({rehypePlugins:[t],components:{p:function(l){l.node;var r=l.children,t=i(l,["node","children"]);return n("p",e({},t,{children:o.Children.map(r,function(i){var l,o,r;return"string"==typeof i?(o=i,(r=null===(l=null==h?void 0:h.markdown)||void 0===l?void 0:l.customHighlight)?n("span",e({style:r},{children:o})):o):i})}))},img:function(l){l.node;var o=i(l,["node"]);return n("div",e({className:a.imageWrapper,style:null==h?void 0:h.imageWrapper},{children:n("img",e({},o,{className:a.image,style:null==h?void 0:h.image,alt:o.alt||"Citation image"}))}))},ul:function(l){var o;l.node,l.ordered;var r=i(l,["node","ordered"]);return n("ul",e({},r,{style:null===(o=null==h?void 0:h.markdown)||void 0===o?void 0:o.list}))},ol:function(l){var o;l.node,l.ordered;var r=i(l,["node","ordered"]);return n("ol",e({},r,{style:null===(o=null==h?void 0:h.markdown)||void 0===o?void 0:o.list}))}}},{children:f}))}))}))}))}))]}))};export{s as default};
|
|
2
|
+
//# sourceMappingURL=MarkdownWithImageCitation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownWithImageCitation.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var o={container:"MarkdownWithImageCitation-module_container__IIipw",header:"MarkdownWithImageCitation-module_header__yELrX",titleGroup:"MarkdownWithImageCitation-module_titleGroup__NoGZT",title:"MarkdownWithImageCitation-module_title__2ol0g",timestamp:"MarkdownWithImageCitation-module_timestamp__TycMU",headerRight:"MarkdownWithImageCitation-module_headerRight__fKorY",divider:"MarkdownWithImageCitation-module_divider__DBf2T",closeIconWrapper:"MarkdownWithImageCitation-module_closeIconWrapper__alT2Q",closeIcon:"MarkdownWithImageCitation-module_closeIcon__KvaUd",content:"MarkdownWithImageCitation-module_content__omW6T",imageWrapper:"MarkdownWithImageCitation-module_imageWrapper__IuQaH",image:"MarkdownWithImageCitation-module_image__69FkI",markdownBody:"MarkdownWithImageCitation-module_markdownBody__Lf-gb"};!function(){if("undefined"==typeof document)return;const o=document.createElement("style");o.type="text/css";const e=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;e&&o.setAttribute("nonce",e),o.appendChild(document.createTextNode(".MarkdownWithImageCitation-module_container__IIipw{border:1px solid #e5e7eb;display:flex;flex-direction:column;height:100%;min-height:200px;position:relative;row-gap:1rem}.MarkdownWithImageCitation-module_header__yELrX{align-items:center;border-bottom:1px solid #e5e7eb;display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;width:100%}.MarkdownWithImageCitation-module_titleGroup__NoGZT{display:flex;flex-direction:column;overflow:hidden;row-gap:.125rem}.MarkdownWithImageCitation-module_title__2ol0g{color:#1f2937;font-family:Inter,sans-serif;font-weight:400;margin-top:.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.MarkdownWithImageCitation-module_timestamp__TycMU{color:#6b7280;font-family:Inter,sans-serif;font-size:.75rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.MarkdownWithImageCitation-module_headerRight__fKorY{align-items:center;column-gap:1rem;display:flex;flex-direction:row}.MarkdownWithImageCitation-module_divider__DBf2T{align-self:stretch;background-color:#e5e7eb;margin-bottom:-.5rem;margin-top:-.5rem;width:1px}.MarkdownWithImageCitation-module_closeIconWrapper__alT2Q{cursor:pointer}.MarkdownWithImageCitation-module_closeIcon__KvaUd{color:#6b7280;height:24px;width:24px}.MarkdownWithImageCitation-module_content__omW6T{display:flex;flex-direction:column;gap:.875rem;padding:1rem 1rem 1.25rem}.MarkdownWithImageCitation-module_imageWrapper__IuQaH{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;margin-bottom:1rem;margin-top:1rem;overflow:hidden;width:100%}.MarkdownWithImageCitation-module_image__69FkI{display:block;height:auto;max-width:100%;object-fit:cover;vertical-align:middle;width:100%}.MarkdownWithImageCitation-module_markdownBody__Lf-gb{color:#1f2937;font-family:Inter,sans-serif;font-size:.975rem;line-height:1.65}.MarkdownWithImageCitation-module_markdownBody__Lf-gb>:first-child{margin-top:0}.MarkdownWithImageCitation-module_markdownBody__Lf-gb>:last-child{margin-bottom:0}.MarkdownWithImageCitation-module_markdownBody__Lf-gb h1,.MarkdownWithImageCitation-module_markdownBody__Lf-gb h2,.MarkdownWithImageCitation-module_markdownBody__Lf-gb h3,.MarkdownWithImageCitation-module_markdownBody__Lf-gb h4,.MarkdownWithImageCitation-module_markdownBody__Lf-gb h5,.MarkdownWithImageCitation-module_markdownBody__Lf-gb h6{color:#111827;line-height:1.2;margin:0 0 .625rem}.MarkdownWithImageCitation-module_markdownBody__Lf-gb h1{font-size:2rem}.MarkdownWithImageCitation-module_markdownBody__Lf-gb h2{font-size:1.125rem;font-weight:700}.MarkdownWithImageCitation-module_markdownBody__Lf-gb h3{font-size:1rem;font-weight:700}.MarkdownWithImageCitation-module_markdownBody__Lf-gb p{margin:0 0 .875rem}.MarkdownWithImageCitation-module_markdownBody__Lf-gb ol,.MarkdownWithImageCitation-module_markdownBody__Lf-gb ul{margin:0 0 1rem;padding-left:1.25rem}.MarkdownWithImageCitation-module_markdownBody__Lf-gb li+li{margin-top:.25rem}.MarkdownWithImageCitation-module_markdownBody__Lf-gb strong{color:#111827}.MarkdownWithImageCitation-module_markdownBody__Lf-gb blockquote{border-left:3px solid #dbe3f0;color:#4b5563;margin:0 0 1rem;padding-left:.875rem}"));const t=document.head||document.getElementsByTagName("head")[0]||document.documentElement;t&&t.appendChild(o)}();export{o as default};
|
|
2
|
+
//# sourceMappingURL=MarkdownWithImageCitation.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownWithImageCitation.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiRedLineCompareTest.d.ts","sourceRoot":"","sources":["../../../src/AiRedLineCompareTest.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AiRedLineCompareTest.d.ts","sourceRoot":"","sources":["../../../src/AiRedLineCompareTest.tsx"],"names":[],"mappings":"AAqCA,QAAA,MAAM,oBAAoB,+CAazB,CAAA;AAED,eAAe,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownWithImageCitationTest.d.ts","sourceRoot":"","sources":["../../../src/MarkdownWithImageCitationTest.tsx"],"names":[],"mappings":"AAwBA,QAAA,MAAM,6BAA6B,+CA+BlC,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
|
|
@@ -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;
|
|
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"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface MarkdownWithImageCitationProps {
|
|
3
|
+
citationTitle?: string;
|
|
4
|
+
timestamp?: string;
|
|
5
|
+
relevanceScore?: number;
|
|
6
|
+
markdownContent: string;
|
|
7
|
+
closeCitationConfig?: {
|
|
8
|
+
CloseIcon: React.ElementType;
|
|
9
|
+
handleCloseCitationPreview: () => void;
|
|
10
|
+
};
|
|
11
|
+
styles?: {
|
|
12
|
+
container?: React.CSSProperties;
|
|
13
|
+
header?: React.CSSProperties;
|
|
14
|
+
titleGroup?: React.CSSProperties;
|
|
15
|
+
timestamp?: React.CSSProperties;
|
|
16
|
+
title?: React.CSSProperties;
|
|
17
|
+
headerRight?: React.CSSProperties;
|
|
18
|
+
divider?: React.CSSProperties;
|
|
19
|
+
closeIconWrapper?: React.CSSProperties;
|
|
20
|
+
content?: React.CSSProperties;
|
|
21
|
+
imageWrapper?: React.CSSProperties;
|
|
22
|
+
image?: React.CSSProperties;
|
|
23
|
+
markdown?: {
|
|
24
|
+
containerWrapper?: React.CSSProperties;
|
|
25
|
+
mainCard?: React.CSSProperties;
|
|
26
|
+
scrollArea?: React.CSSProperties;
|
|
27
|
+
customHighlight?: React.CSSProperties;
|
|
28
|
+
list?: React.CSSProperties;
|
|
29
|
+
};
|
|
30
|
+
aiConfidenceDisplayPill?: {
|
|
31
|
+
container?: React.CSSProperties;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
declare const MarkdownWithImageCitation: React.FC<MarkdownWithImageCitationProps>;
|
|
36
|
+
export default MarkdownWithImageCitation;
|
|
37
|
+
//# sourceMappingURL=MarkdownWithImageCitation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownWithImageCitation.d.ts","sourceRoot":"","sources":["../../../../../src/features/MarkdownWithImageCitation/MarkdownWithImageCitation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAM7C,UAAU,8BAA8B;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE;QACpB,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC;QAC7B,0BAA0B,EAAE,MAAM,IAAI,CAAC;KACxC,CAAC;IACF,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAChC,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC7B,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QACjC,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAChC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC5B,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAClC,OAAO,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC9B,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QACvC,OAAO,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC9B,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QACnC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC5B,QAAQ,CAAC,EAAE;YACT,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;YACvC,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;YAC/B,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;YACjC,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;YACtC,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;SAC5B,CAAC;QACF,uBAAuB,CAAC,EAAE;YACxB,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;SACjC,CAAC;KACH,CAAC;CACH;AAkCD,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAsGvE,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|