@e-llm-studio/citation 0.0.85 → 0.0.87
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/Bookemon/BookPreview/BookPreview.js +1 -1
- package/dist/cjs/features/Bookemon/Bookemon.js +1 -1
- package/dist/cjs/features/CodeCitation/CodeCitation.js +1 -1
- package/dist/cjs/utils/themeManager.js +2 -0
- package/dist/cjs/utils/themeManager.js.map +1 -0
- package/dist/features/Bookemon/BookPreview/BookPreview.js +1 -1
- package/dist/features/Bookemon/Bookemon.js +1 -1
- package/dist/features/CodeCitation/CodeCitation.js +1 -1
- package/dist/types/src/features/Bookemon/BookPreview/BookPreview.d.ts.map +1 -1
- package/dist/types/src/features/Bookemon/Bookemon.d.ts.map +1 -1
- package/dist/types/src/features/CodeCitation/CodeCitation.d.ts.map +1 -1
- package/dist/types/src/utils/themeManager.d.ts +13 -0
- package/dist/types/src/utils/themeManager.d.ts.map +1 -0
- package/dist/utils/themeManager.js +2 -0
- package/dist/utils/themeManager.js.map +1 -0
- package/package.json +156 -156
- package/dist/_virtual/browser.js +0 -2
- package/dist/_virtual/browser.js.map +0 -1
- package/dist/_virtual/form_data.js +0 -2
- package/dist/_virtual/form_data.js.map +0 -1
- package/dist/_virtual/index14.js +0 -2
- package/dist/_virtual/index14.js.map +0 -1
- package/dist/_virtual/index15.js +0 -2
- package/dist/_virtual/index15.js.map +0 -1
- package/dist/_virtual/index16.js +0 -2
- package/dist/_virtual/index16.js.map +0 -1
- package/dist/_virtual/index17.js +0 -2
- package/dist/_virtual/index17.js.map +0 -1
- package/dist/_virtual/index18.js +0 -2
- package/dist/_virtual/index18.js.map +0 -1
- package/dist/_virtual/index19.js +0 -2
- package/dist/_virtual/index19.js.map +0 -1
- package/dist/_virtual/node.js +0 -2
- package/dist/_virtual/node.js.map +0 -1
- package/dist/_virtual/serialOrdered.js +0 -2
- package/dist/_virtual/serialOrdered.js.map +0 -1
- package/dist/cjs/_virtual/browser.js +0 -2
- package/dist/cjs/_virtual/browser.js.map +0 -1
- package/dist/cjs/_virtual/form_data.js +0 -2
- package/dist/cjs/_virtual/form_data.js.map +0 -1
- package/dist/cjs/_virtual/index14.js +0 -2
- package/dist/cjs/_virtual/index14.js.map +0 -1
- package/dist/cjs/_virtual/index15.js +0 -2
- package/dist/cjs/_virtual/index15.js.map +0 -1
- package/dist/cjs/_virtual/index16.js +0 -2
- package/dist/cjs/_virtual/index16.js.map +0 -1
- package/dist/cjs/_virtual/index17.js +0 -2
- package/dist/cjs/_virtual/index17.js.map +0 -1
- package/dist/cjs/_virtual/index18.js +0 -2
- package/dist/cjs/_virtual/index18.js.map +0 -1
- package/dist/cjs/_virtual/index19.js +0 -2
- package/dist/cjs/_virtual/index19.js.map +0 -1
- package/dist/cjs/_virtual/node.js +0 -2
- package/dist/cjs/_virtual/node.js.map +0 -1
- package/dist/cjs/_virtual/serialOrdered.js +0 -2
- package/dist/cjs/_virtual/serialOrdered.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/index.js +0 -2
- package/dist/cjs/node_modules/asynckit/index.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/lib/abort.js +0 -2
- package/dist/cjs/node_modules/asynckit/lib/abort.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/lib/async.js +0 -2
- package/dist/cjs/node_modules/asynckit/lib/async.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/lib/defer.js +0 -2
- package/dist/cjs/node_modules/asynckit/lib/defer.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/lib/iterate.js +0 -2
- package/dist/cjs/node_modules/asynckit/lib/iterate.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/lib/state.js +0 -2
- package/dist/cjs/node_modules/asynckit/lib/state.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/lib/terminator.js +0 -2
- package/dist/cjs/node_modules/asynckit/lib/terminator.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/parallel.js +0 -2
- package/dist/cjs/node_modules/asynckit/parallel.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/serial.js +0 -2
- package/dist/cjs/node_modules/asynckit/serial.js.map +0 -1
- package/dist/cjs/node_modules/asynckit/serialOrdered.js +0 -2
- package/dist/cjs/node_modules/asynckit/serialOrdered.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/adapters/http.js +0 -2
- package/dist/cjs/node_modules/axios/lib/adapters/http.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -2
- package/dist/cjs/node_modules/axios/lib/helpers/AxiosTransformStream.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -2
- package/dist/cjs/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/helpers/callbackify.js +0 -2
- package/dist/cjs/node_modules/axios/lib/helpers/callbackify.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/helpers/formDataToStream.js +0 -2
- package/dist/cjs/node_modules/axios/lib/helpers/formDataToStream.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/helpers/fromDataURI.js +0 -2
- package/dist/cjs/node_modules/axios/lib/helpers/fromDataURI.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/helpers/readBlob.js +0 -2
- package/dist/cjs/node_modules/axios/lib/helpers/readBlob.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/platform/node/classes/FormData.js +0 -2
- package/dist/cjs/node_modules/axios/lib/platform/node/classes/FormData.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -2
- package/dist/cjs/node_modules/axios/lib/platform/node/classes/URLSearchParams.js.map +0 -1
- package/dist/cjs/node_modules/axios/lib/platform/node/index.js +0 -2
- package/dist/cjs/node_modules/axios/lib/platform/node/index.js.map +0 -1
- package/dist/cjs/node_modules/combined-stream/lib/combined_stream.js +0 -2
- package/dist/cjs/node_modules/combined-stream/lib/combined_stream.js.map +0 -1
- package/dist/cjs/node_modules/debug/src/browser.js +0 -2
- package/dist/cjs/node_modules/debug/src/browser.js.map +0 -1
- package/dist/cjs/node_modules/debug/src/common.js +0 -2
- package/dist/cjs/node_modules/debug/src/common.js.map +0 -1
- package/dist/cjs/node_modules/debug/src/index.js +0 -2
- package/dist/cjs/node_modules/debug/src/index.js.map +0 -1
- package/dist/cjs/node_modules/debug/src/node.js +0 -2
- package/dist/cjs/node_modules/debug/src/node.js.map +0 -1
- package/dist/cjs/node_modules/decode-named-character-reference/index.js +0 -2
- package/dist/cjs/node_modules/decode-named-character-reference/index.js.map +0 -1
- package/dist/cjs/node_modules/decode-named-character-reference/node_modules/character-entities/index.js +0 -2
- package/dist/cjs/node_modules/decode-named-character-reference/node_modules/character-entities/index.js.map +0 -1
- package/dist/cjs/node_modules/delayed-stream/lib/delayed_stream.js +0 -2
- package/dist/cjs/node_modules/delayed-stream/lib/delayed_stream.js.map +0 -1
- package/dist/cjs/node_modules/follow-redirects/debug.js +0 -2
- package/dist/cjs/node_modules/follow-redirects/debug.js.map +0 -1
- package/dist/cjs/node_modules/follow-redirects/index.js +0 -2
- package/dist/cjs/node_modules/follow-redirects/index.js.map +0 -1
- package/dist/cjs/node_modules/form-data/lib/form_data.js +0 -2
- package/dist/cjs/node_modules/form-data/lib/form_data.js.map +0 -1
- package/dist/cjs/node_modules/form-data/lib/populate.js +0 -2
- package/dist/cjs/node_modules/form-data/lib/populate.js.map +0 -1
- package/dist/cjs/node_modules/has-flag/index.js +0 -2
- package/dist/cjs/node_modules/has-flag/index.js.map +0 -1
- package/dist/cjs/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js +0 -2
- package/dist/cjs/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/cjs/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js +0 -2
- package/dist/cjs/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/cjs/node_modules/mime-db/db.json.js +0 -2
- package/dist/cjs/node_modules/mime-db/db.json.js.map +0 -1
- package/dist/cjs/node_modules/mime-db/index.js +0 -8
- package/dist/cjs/node_modules/mime-db/index.js.map +0 -1
- package/dist/cjs/node_modules/mime-types/index.js +0 -8
- package/dist/cjs/node_modules/mime-types/index.js.map +0 -1
- package/dist/cjs/node_modules/ms/index.js +0 -2
- package/dist/cjs/node_modules/ms/index.js.map +0 -1
- package/dist/cjs/node_modules/proxy-from-env/index.js +0 -2
- package/dist/cjs/node_modules/proxy-from-env/index.js.map +0 -1
- package/dist/cjs/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js +0 -2
- package/dist/cjs/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/cjs/node_modules/react-resizable-panels/dist/react-resizable-panels.js +0 -2
- package/dist/cjs/node_modules/react-resizable-panels/dist/react-resizable-panels.js.map +0 -1
- package/dist/cjs/node_modules/supports-color/index.js +0 -2
- package/dist/cjs/node_modules/supports-color/index.js.map +0 -1
- package/dist/node_modules/asynckit/index.js +0 -2
- package/dist/node_modules/asynckit/index.js.map +0 -1
- package/dist/node_modules/asynckit/lib/abort.js +0 -2
- package/dist/node_modules/asynckit/lib/abort.js.map +0 -1
- package/dist/node_modules/asynckit/lib/async.js +0 -2
- package/dist/node_modules/asynckit/lib/async.js.map +0 -1
- package/dist/node_modules/asynckit/lib/defer.js +0 -2
- package/dist/node_modules/asynckit/lib/defer.js.map +0 -1
- package/dist/node_modules/asynckit/lib/iterate.js +0 -2
- package/dist/node_modules/asynckit/lib/iterate.js.map +0 -1
- package/dist/node_modules/asynckit/lib/state.js +0 -2
- package/dist/node_modules/asynckit/lib/state.js.map +0 -1
- package/dist/node_modules/asynckit/lib/terminator.js +0 -2
- package/dist/node_modules/asynckit/lib/terminator.js.map +0 -1
- package/dist/node_modules/asynckit/parallel.js +0 -2
- package/dist/node_modules/asynckit/parallel.js.map +0 -1
- package/dist/node_modules/asynckit/serial.js +0 -2
- package/dist/node_modules/asynckit/serial.js.map +0 -1
- package/dist/node_modules/asynckit/serialOrdered.js +0 -2
- package/dist/node_modules/asynckit/serialOrdered.js.map +0 -1
- package/dist/node_modules/axios/lib/adapters/http.js +0 -2
- package/dist/node_modules/axios/lib/adapters/http.js.map +0 -1
- package/dist/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -2
- package/dist/node_modules/axios/lib/helpers/AxiosTransformStream.js.map +0 -1
- package/dist/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -2
- package/dist/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js.map +0 -1
- package/dist/node_modules/axios/lib/helpers/callbackify.js +0 -2
- package/dist/node_modules/axios/lib/helpers/callbackify.js.map +0 -1
- package/dist/node_modules/axios/lib/helpers/formDataToStream.js +0 -2
- package/dist/node_modules/axios/lib/helpers/formDataToStream.js.map +0 -1
- package/dist/node_modules/axios/lib/helpers/fromDataURI.js +0 -2
- package/dist/node_modules/axios/lib/helpers/fromDataURI.js.map +0 -1
- package/dist/node_modules/axios/lib/helpers/readBlob.js +0 -2
- package/dist/node_modules/axios/lib/helpers/readBlob.js.map +0 -1
- package/dist/node_modules/axios/lib/platform/node/classes/FormData.js +0 -2
- package/dist/node_modules/axios/lib/platform/node/classes/FormData.js.map +0 -1
- package/dist/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -2
- package/dist/node_modules/axios/lib/platform/node/classes/URLSearchParams.js.map +0 -1
- package/dist/node_modules/axios/lib/platform/node/index.js +0 -2
- package/dist/node_modules/axios/lib/platform/node/index.js.map +0 -1
- package/dist/node_modules/combined-stream/lib/combined_stream.js +0 -2
- package/dist/node_modules/combined-stream/lib/combined_stream.js.map +0 -1
- package/dist/node_modules/debug/src/browser.js +0 -2
- package/dist/node_modules/debug/src/browser.js.map +0 -1
- package/dist/node_modules/debug/src/common.js +0 -2
- package/dist/node_modules/debug/src/common.js.map +0 -1
- package/dist/node_modules/debug/src/index.js +0 -2
- package/dist/node_modules/debug/src/index.js.map +0 -1
- package/dist/node_modules/debug/src/node.js +0 -2
- package/dist/node_modules/debug/src/node.js.map +0 -1
- package/dist/node_modules/decode-named-character-reference/index.js +0 -2
- package/dist/node_modules/decode-named-character-reference/index.js.map +0 -1
- package/dist/node_modules/decode-named-character-reference/node_modules/character-entities/index.js +0 -2
- package/dist/node_modules/decode-named-character-reference/node_modules/character-entities/index.js.map +0 -1
- package/dist/node_modules/delayed-stream/lib/delayed_stream.js +0 -2
- package/dist/node_modules/delayed-stream/lib/delayed_stream.js.map +0 -1
- package/dist/node_modules/follow-redirects/debug.js +0 -2
- package/dist/node_modules/follow-redirects/debug.js.map +0 -1
- package/dist/node_modules/follow-redirects/index.js +0 -2
- package/dist/node_modules/follow-redirects/index.js.map +0 -1
- package/dist/node_modules/form-data/lib/form_data.js +0 -2
- package/dist/node_modules/form-data/lib/form_data.js.map +0 -1
- package/dist/node_modules/form-data/lib/populate.js +0 -2
- package/dist/node_modules/form-data/lib/populate.js.map +0 -1
- package/dist/node_modules/has-flag/index.js +0 -2
- package/dist/node_modules/has-flag/index.js.map +0 -1
- package/dist/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js +0 -2
- package/dist/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js +0 -2
- package/dist/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/node_modules/mime-db/db.json.js +0 -2
- package/dist/node_modules/mime-db/db.json.js.map +0 -1
- package/dist/node_modules/mime-db/index.js +0 -8
- package/dist/node_modules/mime-db/index.js.map +0 -1
- package/dist/node_modules/mime-types/index.js +0 -8
- package/dist/node_modules/mime-types/index.js.map +0 -1
- package/dist/node_modules/ms/index.js +0 -2
- package/dist/node_modules/ms/index.js.map +0 -1
- package/dist/node_modules/proxy-from-env/index.js +0 -2
- package/dist/node_modules/proxy-from-env/index.js.map +0 -1
- package/dist/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js +0 -2
- package/dist/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.js +0 -2
- package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.js.map +0 -1
- package/dist/node_modules/supports-color/index.js +0 -2
- package/dist/node_modules/supports-color/index.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.mjs.js"),t=require("react/jsx-runtime"),i=require("react"),o=require("../../../_virtual/Close.js"),n=require("../../../_virtual/ArrowBack.js"),r=require("../../BookCitation/BookCitation.js"),l=require("../Bookemon.js"),s=require("../../../node_modules/@material-ui/core/esm/Switch/Switch.js"),a=require("../../../node_modules/@material-ui/core/esm/Tooltip/Tooltip.js");exports.default=function(d){var c=d.bookOverView,g=d.bookCoverImage,u=d.onClose,h=d.customStyle,p=d.quotesToHighLightData,x=d.updateQuotesToHighLight,f=d.citationLoad,y=d.clickableElementCategory,v=void 0===y?"":y,_=d.comingSoonData,m=d.isNonHighlightedBlur,b=void 0!==m&&m,k=d.isBlurToggleVisible,C=void 0!==k&&k,j=d.noHtmlContent,w=void 0!==j&&j,S=d.isBookemon,B=void 0===S||S,I=i.useState(!1),T=I[0],W=I[1],L=i.useState(!0),P=L[0],q=L[1],H=!!p.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.mjs.js"),t=require("react/jsx-runtime"),i=require("react"),o=require("../../../_virtual/Close.js"),n=require("../../../_virtual/ArrowBack.js"),r=require("../../BookCitation/BookCitation.js"),l=require("../Bookemon.js"),s=require("../../../node_modules/@material-ui/core/esm/Switch/Switch.js"),a=require("../../../node_modules/@material-ui/core/esm/Tooltip/Tooltip.js");exports.default=function(d){var c=d.bookOverView,g=d.bookCoverImage,u=d.onClose,h=d.customStyle,p=d.quotesToHighLightData,x=d.updateQuotesToHighLight,f=d.citationLoad,y=d.clickableElementCategory,v=void 0===y?"":y,_=d.comingSoonData,m=d.isNonHighlightedBlur,b=void 0!==m&&m,k=d.isBlurToggleVisible,C=void 0!==k&&k,j=d.noHtmlContent,w=void 0!==j&&j,S=d.isBookemon,B=void 0===S||S,I=i.useState(!1),T=I[0],W=I[1],L=i.useState(!0),P=L[0],q=L[1],H=!!p.content,F={header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px"},headerLeft:{display:"flex",alignItems:"center",gap:"8px"},closeButton:{padding:"4px",borderRadius:"4px",cursor:"pointer",backgroundColor:"transparent"},flexCenter:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},coverContainer:{width:"100%",maxWidth:"300px",borderRadius:"12px",padding:"4px",background:"linear-gradient(135deg, #34D399, #3B82F6, #10B981)",position:"relative",overflow:"hidden",boxShadow:"0 10px 25px rgba(0,0,0,0.3)",marginBottom:"24px"},bookCoverStyle:{width:"100%",height:"auto",objectFit:"contain",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},loadingStyle:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},rightPanel:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},clickableElementCategory:{fontSize:"20px",fontWeight:600},previewWrapper:{flex:1,width:"80%",margin:"0 auto",display:"flex",flexDirection:"column",overflow:"hidden",justifyContent:"flex-start",alignItems:"center"},coverImagePreview:{display:"flex",justifyContent:"center",alignItems:"center",aspectRatio:"7 / 10",background:"",padding:0},toggleBlurContainer:{display:"flex",alignItems:"center",gap:"20px"},bookCoverPlaceholder:{width:"100%",height:"calc(100% - 8px)",background:"linear-gradient(to bottom, #22c55e, #14532d)",borderRadius:"4px",padding:"4px",color:"white",fontSize:"10px",display:"flex",justifyContent:"center",alignItems:"center"},bookCoverInner:{border:"1px solid white",padding:"4px",width:"calc(100% - 26px)",height:"calc(100% - 26px)",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",justifyContent:"space-around"},bookTitle:{fontWeight:800,fontSize:"1.5rem",textTransform:"uppercase",letterSpacing:"0.5px",lineHeight:1.2,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",padding:"0 8px"},bookAuthor:{fontSize:"1rem",fontWeight:500,opacity:.9,marginTop:"8px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"}};return i.useEffect((function(){q(!0),console.log(f,"citationLoad")}),[f]),t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},F.rightPanel),(null==h?void 0:h.rightPanel)||{})},{children:[t.jsxs("div",e.__assign({style:F.header},{children:[t.jsxs("div",e.__assign({style:F.headerLeft},{children:[(H||w)&&t.jsx("button",e.__assign({style:F.closeButton,onClick:function(){return x("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:t.jsx(n.default,{})})),t.jsx("h2",e.__assign({style:F.clickableElementCategory},{children:v}))]})),t.jsxs("div",e.__assign({style:F.toggleBlurContainer},{children:[H&&C&&t.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"2px"}},{children:[t.jsx(s.default,{checked:P,onChange:function(e){q(e.target.checked),console.log(e.target.checked,"event.target.checked")},color:"primary",size:"small"}),t.jsxs("span",e.__assign({style:{fontSize:"0.75rem",display:"flex",alignItems:"center",gap:"4px"}},{children:["Blur",t.jsx(a.default,e.__assign({title:"Blur Text is enabled by default. Non-highlighted parts of the text will appear blurred to help you focus on the highlighted content. You can turn this off if you want to see all text clearly."},{children:t.jsx("span",e.__assign({style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:"14px",height:"14px",borderRadius:"50%",backgroundColor:"#485468",color:"#fff",fontSize:"10px",fontWeight:"bold",cursor:"pointer",lineHeight:"14px",userSelect:"none"}},{children:"i"}))}))]}))]})),t.jsx("button",e.__assign({style:F.closeButton,onClick:function(){u(),x("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:t.jsx(o.default,{})}))]}))]})),t.jsx("div",e.__assign({style:e.__assign(e.__assign({},F.previewWrapper),null==h?void 0:h.previewWrapper)},{children:H?t.jsx(r.default,{citationNumber:1,defaultState:!0,partialMatch:!0,fixedWidth:!1,citationTitle:"Sample Citation",title:"Sample Title",paragraphs:[null==p?void 0:p.content],textToHighlight:[null==p?void 0:p.textToHighLight],externalLinkComponent:"",bookCoverImage:g,customStyle:null==h?void 0:h.citationCustomStyle,isNonHighlightedBlur:b,isBookemon:B,toggleBlur:P}):f||w?t.jsxs("div",e.__assign({style:F.loadingStyle},{children:[t.jsx("div",e.__assign({style:l.comingSoonStyles.iconWrapper},{children:(null==_?void 0:_.icon)||l.defaultIcon})),w?t.jsxs("p",e.__assign({style:l.comingSoonStyles.text},{children:["No data found matching the selected ",v.toLowerCase()]})):t.jsxs("p",e.__assign({style:l.comingSoonStyles.text},{children:["fetching ",v.toLowerCase(),"...."]}))]})):t.jsx("div",e.__assign({style:F.flexCenter},{children:t.jsx("div",e.__assign({style:e.__assign(e.__assign({},F.coverContainer),T||!g?e.__assign(e.__assign({},F.coverImagePreview),null==h?void 0:h.coverImagePreview):{})},{children:g&&!T?t.jsx("img",{onError:function(){return W(!0)},style:F.bookCoverStyle,src:g,alt:"Book Cover Image"}):t.jsx("div",e.__assign({style:F.bookCoverPlaceholder},{children:t.jsxs("div",e.__assign({style:F.bookCoverInner},{children:[t.jsx("div",e.__assign({style:F.bookTitle},{children:(null==c?void 0:c.title)||"Unknown Title"})),t.jsx("div",e.__assign({style:F.bookAuthor},{children:(null==c?void 0:c.author)||"Unknown Author"}))]}))}))}))}))}))]}))};
|
|
2
2
|
//# sourceMappingURL=BookPreview.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),i=require("react/jsx-runtime"),t=require("react"),o=require("../../node_modules/@material-ui/core/esm/Accordion/Accordion.js"),n=require("../../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js"),r=require("../../_virtual/ExpandMore.js"),a=require("../../_virtual/Close.js"),s=require("../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js"),l=require("./BookDetailsCard/BookDetailsCard.js"),d=require("./BookOverviewCard/BookOverviewCard.js"),c=require("./BookElementsCard/BookElementsCard.js"),u=require("./BookCopyrightsCard/BookCopyrightsCard.js"),g=require("./BookPeopleAwardsCard/BookPeopleAwardsCard.js"),h=require("./BookPreview/BookPreview.js"),x=require("../../node_modules/@material-ui/core/esm/Dialog/Dialog.js"),p=require("../../node_modules/@material-ui/core/esm/DialogContent/DialogContent.js"),_=require("../../node_modules/@material-ui/core/esm/Typography/Typography.js"),m=require("../../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js"),f=require("../../node_modules/@material-ui/core/esm/IconButton/IconButton.js"),j={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogContent:{padding:0,backgroundColor:"#FFFFFF",overflow:"hidden",height:"90vh",position:"relative"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},y={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},v=i.jsx("svg",e.__assign({style:y.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},{children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})),b=function(t){var o=t.header,n=t.subheader,r=t.icon;return i.jsx("div",e.__assign({style:y.wrapper},{children:i.jsxs("div",e.__assign({style:y.inner},{children:[i.jsx("div",e.__assign({style:{marginBottom:"32px"}},{children:i.jsx("div",e.__assign({style:y.iconWrapper},{children:r||v}))})),i.jsxs("div",{children:[i.jsx("h1",e.__assign({style:y.heading},{children:o})),i.jsx("p",e.__assign({style:y.text},{children:n}))]})]}))}))};exports.comingSoonStyles=y,exports.default=function(y){var k=y.open,C=y.onClose,B=y.isNonHighlightedBlur,w=y.isBookemon,S=y.getHighlightContent,F=y.handleFetchManuscriptElements,D=y.data,z=y.showComingSoon,P=void 0!==z&&z,q=y.comingSoonData,I=void 0===q?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:v}:q,A=y.customStyle,H=void 0===A?{}:A,E=y.isBlurToggleVisible,L=void 0!==E&&E,O=t.useState({textToHighLight:"",content:""}),R=O[0],T=O[1],M=t.useState(1),W=M[0],N=M[1],V=t.useState(!1),Q=V[0],Y=V[1],G=t.useState("Book Preview"),J=G[0],K=G[1],U=t.useState(70),X=U[0],Z=U[1],$=t.useRef(null),ee=t.useState(!1),ie=ee[0],te=ee[1],oe=function(i,t,o,n){return void 0===n&&(n=0),e.__awaiter(void 0,void 0,void 0,(function(){var r,a,s,l,d,c,u,g,h,x,p,_,m,f,j,y;return e.__generator(this,(function(e){switch(e.label){case 0:T({textToHighLight:"",content:""}),te(!1),Y(!0),K(t),e.label=1;case 1:return e.trys.push([1,5,6,7]),o&&0!==o.length?[4,S([o[n]])]:(Y(!1),Z(70),null===(j=$.current)||void 0===j||j.resize(70),[2]);case 2:if(r=e.sent(),a=(null==r?void 0:r.data)||r||[],!Array.isArray(a)||0===a.length)return te(!0),Y(!1),[2];for(l=(s=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(i),d=null,c=0,u=a;c<u.length;c++)if(_=u[c],s(_.normalizedContent||_.htmlContent).includes(l)){d=_;break}if(!d)for(g=l.split(" ").filter(Boolean);g.length>0;){for(h=g.join(" "),x=0,p=a;x<p.length;x++)if(_=p[x],s(_.normalizedContent||_.htmlContent).includes(h)){d=_;break}if(d)break;g.pop()}return m=a.map((function(e){return e.htmlContent})).join("\n"),d?(T({textToHighLight:d.htmlContent,content:m}),Z(50),null===(y=$.current)||void 0===y||y.resize(50),Y(!1),[2]):n+1<o.length?[4,oe(i,t,o,n+1)]:[3,4];case 3:return[2,e.sent()];case 4:return te(!0),Y(!1),[3,7];case 5:return f=e.sent(),console.error("Highlight error:",f),te(!0),[3,7];case 6:return Y(!1),[7];case 7:return[2]}}))}))},ne=D.bookAwards,re=D.bookCopyRight,ae=D.bookDetails,se=D.bookElements,le=D.bookOverView,de=D.bookCoverImage,ce=null==ae?void 0:ae.isbn;return i.jsx(x.default,e.__assign({open:k,fullWidth:!0,PaperProps:{style:e.__assign(e.__assign({},null==j?void 0:j.dialogPaper),null==H?void 0:H.dialogDimension)}},{children:i.jsxs(p.default,e.__assign({style:j.dialogContent},{children:[!P&&i.jsx("div",e.__assign({style:j.container},{children:i.jsxs(s.PanelGroup,e.__assign({direction:"horizontal"},{children:[i.jsx(s.Panel,e.__assign({order:1,ref:$,defaultSize:X||70},{children:i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},null==j?void 0:j.leftPanel),null==H?void 0:H.leftPanel)},{children:[i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({defaultExpanded:!0,elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Overview"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:le&&Object.keys(le).length>0?i.jsx(d.default,{data:le}):i.jsx("div",e.__assign({style:j.errorState},{children:"No overview data available."}))}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Manuscript Elements"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:i.jsx(c.default,{data:se,handleFetchManuscriptElements:F,BookIsbn:ce,updateQuotesToHighLight:oe})}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Metadata Details"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:ae&&Object.keys(ae).length>0?i.jsx(l.default,{data:ae}):i.jsx("div",e.__assign({style:j.errorState},{children:"No Book Metadata data available."}))}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Copyrights & Marketing"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:re&&Object.keys(re).length>0?i.jsx(u.default,{data:re}):i.jsx("div",e.__assign({style:j.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),i.jsx("div",{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"People & Awards"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:ne&&Object.keys(ne).length>0?i.jsx(g.default,{data:ne}):i.jsx("div",e.__assign({style:j.errorState},{children:"No People & Awards data available."}))}))]}))})]}))})),i.jsx(s.PanelResizeHandle,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),i.jsx(s.Panel,e.__assign({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:i.jsx(h.default,{bookOverView:le,bookCoverImage:de,onClose:C,clickableElementCategory:J,quotesToHighLightData:R,updateQuotesToHighLight:oe,citationLoad:Q,previewPage:W,setPreviewPage:N,customStyle:H,comingSoonData:I,isNonHighlightedBlur:B,isBlurToggleVisible:L,isBookemon:w,noHtmlContent:ie})}))]}))})),P?i.jsxs("div",e.__assign({style:j.blurOverlay},{children:[i.jsx(f.default,e.__assign({style:j.closeButton,onClick:C},{children:i.jsx(a.default,{})})),i.jsx(b,{header:I.header,subheader:I.subheader,icon:I.icon})]})):i.jsx(i.Fragment,{})]}))}))},exports.defaultIcon=v;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),i=require("react/jsx-runtime"),t=require("react"),o=require("../../node_modules/@material-ui/core/esm/Accordion/Accordion.js"),n=require("../../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js"),r=require("../../_virtual/ExpandMore.js"),a=require("../../_virtual/Close.js"),s=require("../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js"),l=require("./BookDetailsCard/BookDetailsCard.js"),d=require("./BookOverviewCard/BookOverviewCard.js"),c=require("./BookElementsCard/BookElementsCard.js"),u=require("./BookCopyrightsCard/BookCopyrightsCard.js"),g=require("./BookPeopleAwardsCard/BookPeopleAwardsCard.js"),h=require("./BookPreview/BookPreview.js"),x=require("../../node_modules/@material-ui/core/esm/Dialog/Dialog.js"),p=require("../../node_modules/@material-ui/core/esm/DialogContent/DialogContent.js"),_=require("../../node_modules/@material-ui/core/esm/Typography/Typography.js"),m=require("../../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js"),f=require("../../node_modules/@material-ui/core/esm/IconButton/IconButton.js"),j={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogContent:{padding:0,backgroundColor:"#FFFFFF",overflow:"hidden",height:"90vh",position:"relative"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},y={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},v=i.jsx("svg",e.__assign({style:y.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},{children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})),b=function(t){var o=t.header,n=t.subheader,r=t.icon;return i.jsx("div",e.__assign({style:y.wrapper},{children:i.jsxs("div",e.__assign({style:y.inner},{children:[i.jsx("div",e.__assign({style:{marginBottom:"32px"}},{children:i.jsx("div",e.__assign({style:y.iconWrapper},{children:r||v}))})),i.jsxs("div",{children:[i.jsx("h1",e.__assign({style:y.heading},{children:o})),i.jsx("p",e.__assign({style:y.text},{children:n}))]})]}))}))};exports.comingSoonStyles=y,exports.default=function(y){var k=y.open,C=y.onClose,B=y.isNonHighlightedBlur,w=y.isBookemon,S=y.getHighlightContent,F=y.handleFetchManuscriptElements,D=y.data,z=y.showComingSoon,P=void 0!==z&&z,q=y.comingSoonData,I=void 0===q?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:v}:q,A=y.customStyle,H=void 0===A?{}:A,E=y.isBlurToggleVisible,L=void 0!==E&&E,O=t.useState({textToHighLight:"",content:""}),R=O[0],T=O[1],M=t.useState(1),W=M[0],N=M[1],V=t.useState(!1),Q=V[0],Y=V[1],G=t.useState("Book Preview"),J=G[0],K=G[1],U=t.useState(70),X=U[0],Z=U[1],$=t.useRef(null),ee=t.useState(!1),ie=ee[0],te=ee[1],oe=function(i,t,o,n){return void 0===n&&(n=0),e.__awaiter(void 0,void 0,void 0,(function(){var r,a,s,l,d,c,u,g,h,x,p,_,m,f,j,y;return e.__generator(this,(function(e){switch(e.label){case 0:T({textToHighLight:"",content:""}),te(!1),Y(!0),K(t),e.label=1;case 1:return e.trys.push([1,5,6,7]),o&&0!==o.length?[4,S([o[n]])]:(Y(!1),Z(70),null===(j=$.current)||void 0===j||j.resize(70),[2]);case 2:if(r=e.sent(),a=(null==r?void 0:r.data)||r||[],!Array.isArray(a)||0===a.length)return te(!0),Y(!1),[2];for(l=(s=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(i),d=null,c=0,u=a;c<u.length;c++)if(_=u[c],s(_.normalizedContent||_.htmlContent).includes(l)){d=_;break}if(!d)for(g=l.split(" ").filter(Boolean);g.length>0;){for(h=g.join(" "),x=0,p=a;x<p.length;x++)if(_=p[x],s(_.normalizedContent||_.htmlContent).includes(h)){d=_;break}if(d)break;g.pop()}return m=a.map((function(e){return e.htmlContent})).join("\n"),T({textToHighLight:d?d.htmlContent:"",content:m}),Z(50),null===(y=$.current)||void 0===y||y.resize(50),!d&&n+1<o.length?[4,oe(i,t,o,n+1)]:[3,4];case 3:return[2,e.sent()];case 4:return[2];case 5:return f=e.sent(),console.error("Highlight error:",f),te(!0),[3,7];case 6:return Y(!1),[7];case 7:return[2]}}))}))},ne=D.bookAwards,re=D.bookCopyRight,ae=D.bookDetails,se=D.bookElements,le=D.bookOverView,de=D.bookCoverImage,ce=null==ae?void 0:ae.isbn;return i.jsx(x.default,e.__assign({open:k,fullWidth:!0,PaperProps:{style:e.__assign(e.__assign({},null==j?void 0:j.dialogPaper),null==H?void 0:H.dialogDimension)}},{children:i.jsxs(p.default,e.__assign({style:j.dialogContent},{children:[!P&&i.jsx("div",e.__assign({style:j.container},{children:i.jsxs(s.PanelGroup,e.__assign({direction:"horizontal"},{children:[i.jsx(s.Panel,e.__assign({order:1,ref:$,defaultSize:X||70},{children:i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},null==j?void 0:j.leftPanel),null==H?void 0:H.leftPanel)},{children:[i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({defaultExpanded:!0,elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Overview"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:le&&Object.keys(le).length>0?i.jsx(d.default,{data:le}):i.jsx("div",e.__assign({style:j.errorState},{children:"No overview data available."}))}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Manuscript Elements"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:i.jsx(c.default,{data:se,handleFetchManuscriptElements:F,BookIsbn:ce,updateQuotesToHighLight:oe})}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Metadata Details"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:ae&&Object.keys(ae).length>0?i.jsx(l.default,{data:ae}):i.jsx("div",e.__assign({style:j.errorState},{children:"No Book Metadata data available."}))}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Copyrights & Marketing"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:re&&Object.keys(re).length>0?i.jsx(u.default,{data:re}):i.jsx("div",e.__assign({style:j.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),i.jsx("div",{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"People & Awards"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:ne&&Object.keys(ne).length>0?i.jsx(g.default,{data:ne}):i.jsx("div",e.__assign({style:j.errorState},{children:"No People & Awards data available."}))}))]}))})]}))})),i.jsx(s.PanelResizeHandle,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),i.jsx(s.Panel,e.__assign({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:i.jsx(h.default,{bookOverView:le,bookCoverImage:de,onClose:C,clickableElementCategory:J,quotesToHighLightData:R,updateQuotesToHighLight:oe,citationLoad:Q,previewPage:W,setPreviewPage:N,customStyle:H,comingSoonData:I,isNonHighlightedBlur:B,isBlurToggleVisible:L,isBookemon:w,noHtmlContent:ie})}))]}))})),P?i.jsxs("div",e.__assign({style:j.blurOverlay},{children:[i.jsx(f.default,e.__assign({style:j.closeButton,onClick:C},{children:i.jsx(a.default,{})})),i.jsx(b,{header:I.header,subheader:I.subheader,icon:I.icon})]})):i.jsx(i.Fragment,{})]}))}))},exports.defaultIcon=v;
|
|
2
2
|
//# sourceMappingURL=Bookemon.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),t=require("react/jsx-runtime"),n=require("react"),i=require("./CodeCitation.module.css.js"),a=require("./_components/CodeEditor.js"),s=require("../../utils/codeCitations.utils.js"),o=require("./_components/ThemeToggle.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),t=require("react/jsx-runtime"),n=require("react"),i=require("./CodeCitation.module.css.js"),a=require("./_components/CodeEditor.js"),s=require("../../utils/codeCitations.utils.js"),o=require("./_components/ThemeToggle.js"),r=require("./_components/CodeCitationPopup.js"),l=require("./_components/HighlightedCodeDetails.js"),d=require("../../node_modules/axios/lib/axios.js"),u=require("./_components/Spinner.js"),c=require("../../constants/diagnosticStylesBySeverity.js"),g=require("../../utils/themeManager.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=h(n);exports.default=function(h){var m=h.baseUrlForCodeRetrieval,p=h.assistantName,x=h.organizationName,S=h.userId,v=h.taskId,_=h.repoUrl,I=h.inLineCitation,C=h.citationTitle,y=h.filename,j=h.filepath,b=h.citationContainerTitle,F=h.showThemeToggle,T=h.customCode,k=h.isDarkModeEnabled,D=h.chevronUpComponent,P=h.chevronDownComponent,w=h.isHighlightingEnabled,E=h.FileDetailsComponent,L=h.additionalCallbackForPillButton,H=h.CustomCodeRenderComponent,q=h.fileSummarySectionTitle,M=h.showFullscreenIcon,B=h.showFileSummaryIButton,N=h.editorHeight,W=h.editorWidth,z=h.styles,V=void 0===z?{}:z,R=h.diagnostics,J=h.diagnosticStylesBySeverity,U=h.datasource,A=void 0===U?"codebase":U,O=h.externalFilesData,Y=h.startIndex,G=h.endIndex,K=n.useRef(!1),Q=s.getLanguageFromFileName(y),X=n.useState(!1),Z=X[0],$=X[1],ee=n.useState((function(){return g.themeManager.getTheme(k)})),te=ee[0],ne=ee[1];n.useEffect((function(){return g.themeManager.subscribe(ne)}),[]);var ie=n.useState(!1),ae=ie[0],se=ie[1],oe=n.useState(!1),re=oe[0],le=oe[1],de=n.useState(!1),ue=de[0],ce=de[1],ge=n.useState(!1),he=ge[0],fe=ge[1],me=n.useState(null),pe=me[0],xe=me[1],Se=n.useState(""),ve=Se[0],_e=Se[1],Ie=n.useState(""),Ce=Ie[0],ye=Ie[1],je=n.useState({startIndex:-1,endIndex:-1}),be=je[0],Fe=je[1],Te=n.useState({}),ke=Te[0],De=Te[1],Pe=n.useState(!1),we=Pe[0],Ee=Pe[1],Le=n.useState(!1),He=Le[0],qe=Le[1],Me=n.useState({startIndex:-1,endIndex:-1}),Be=Me[0],Ne=Me[1],We=n.useState({startIndex:-1,endIndex:-1}),ze=We[0],Ve=We[1],Re=f.default.useMemo((function(){return e.__assign(e.__assign({},c.DEFAULT_DIAGNOSTIC_STYLES_BY_SEVERITY),J)}),[J]);n.useEffect((function(){Ve({startIndex:null!=Y?Y:-1,endIndex:null!=G?G:-1})}),[Y,G]),n.useEffect((function(){O&&T&&(xe(O),K.current=!0)}),[O,T]),n.useEffect((function(){if("undefined"!=typeof window&&!K.current){K.current=!0;var t=new URL(j,"http://example.com"),n=t.searchParams,i=void 0!==Y?Y:n.has("startLine")?Number(n.get("startLine")):-1,a=void 0!==G?G:n.has("endLine")?Number(n.get("endLine")):-1;Ve({startIndex:i,endIndex:a}),Fe({startIndex:i,endIndex:a}),Ne({startIndex:i,endIndex:a}),t.searchParams.delete("startLine"),t.searchParams.delete("endLine"),t.searchParams.delete("validation");var s=t.pathname+t.search,o=null==s?void 0:s.replace(/^\//,"");ye(o),console.log("Params going to API:",{file_path:o,assistant_name:p,organization_name:x,user_id:S,task_id:v,chunks_search:!1,technical_details_only:!0,repo_url:_});T||we||e.__awaiter(void 0,void 0,void 0,(function(){var t,n,i,a,s,r;return e.__generator(this,(function(l){switch(l.label){case 0:qe(!1),Ee(!0),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,d.default.get("".concat(m,"/analyzer/get_file_details"),{params:e.__assign({file_path:String(o),assistant_name:String(p),organization_name:String(x),user_id:String(S),task_id:String(v),repo_url:String(_),chunks_search:!1,technical_details_only:!0},"codebase"!==A&&{datasource:A})})];case 2:return t=l.sent(),n=(null==t?void 0:t.data[0])||(null==t?void 0:t.data),!pe&&n&&(xe(n),Object.keys(null==t?void 0:t.data)&&(i=(null===(r=null===(s=null==t?void 0:t.data)||void 0===s?void 0:s[0])||void 0===r?void 0:r.content)||(null==t?void 0:t.data.content),_e(i))),Ee(!1),[2,t.data];case 3:return a=l.sent(),qe(!0),console.error("Error in retrieving file details: ",a),[3,4];case 4:return Ee(!1),[2]}}))}))}}),[]);return t.jsxs(t.Fragment,{children:[t.jsxs("span",e.__assign({onClick:function(e){return function(e){e.preventDefault(),e.stopPropagation(),L&&L(),$((function(e){return!e})),se((function(e){return!e}))}(e)},className:i.default.pillButton,style:V.pillButton},{children:[t.jsx("span",e.__assign({style:V.citationTitle},{children:C})),I&&(Z?D:P)]})),(!I||re)&&t.jsx(r.default,{open:ae,onClose:function(){Ve({startIndex:null==Be?void 0:Be.startIndex,endIndex:null==Be?void 0:Be.endIndex}),le(!1),se(!1),Fe({startIndex:-1,endIndex:-1}),De({})},title:C,customStyles:{popupContainer:{width:"100vw",height:"100vh",borderRadius:"0.75rem",fontFamily:"Plus Jakarta Sans, sans-serif"},popupTitleContainer:{color:"#d63384",fontFamily:"Plus Jakarta Sans, sans-serif",position:"relative",textAlign:"left",fontWeight:"700"},topLeftTitle:{backgroundColor:"#f9f9f9",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"1rem",fontWeight:"bold",padding:"5px",margin:"0px"},bottomLeftTitle:{backgroundColor:"#f9f9f9",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"1rem",fontWeight:"bold",padding:"5px",margin:"0px"}},editorChildren:t.jsx(a.default,{startIndex:null==ze?void 0:ze.startIndex,endIndex:null==ze?void 0:ze.endIndex,language:Q,editorHeight:N,editorWidth:W,code:T||ve,isHighlightingEnabled:w,isDarkModeEnabled:te,highlightCodeStatsLine:be,setHighlightCodeStatsLine:Fe,highlightCodeStatsVariable:ke,setHighlightCodeStatsVariable:De,isExpanded:Z,highlightIndexes:ze,diagnostics:R,diagnosticStylesBySeverity:Re}),fileDetails:pe,setHighlightIndexes:Ve,highlightCodeStatsLine:be,setHighlightCodeStatsLine:Fe,highlightCodeStatsVariable:ke,setHighlightCodeStatsVariable:De,filepath:Ce,datasource:A}),I&&Z&&t.jsx("div",e.__assign({className:i.default.citationWrapper,style:V.citationWrapper},{children:t.jsxs("div",e.__assign({className:i.default.citationContent,style:V.citationContent},{children:[!ue&&b?t.jsxs("div",e.__assign({className:i.default.citationContainerTitle,style:V.citationContainerTitle},{children:[t.jsx("span",{children:b}),F?t.jsx(o.default,{darkMode:te,onToggle:function(e){return function(e){e.stopPropagation(),e.preventDefault(),g.themeManager.setTheme(!te)}(e)},toggleFullscreen:function(e){e.stopPropagation(),e.preventDefault(),se(!0),le(!0)},handleOpenFileDetailSection:function(e){e.stopPropagation(),e.preventDefault(),fe(!0)},showFullscreenIcon:M,showFileSummaryIButton:B}):t.jsx(t.Fragment,{})]})):t.jsx(t.Fragment,{}),t.jsxs("div",e.__assign({style:{zIndex:-1e3,color:"#000",overflow:"hidden",display:"flex",flexDirection:"column",height:N,width:W,fontFamily:"Plus Jakarta Sans, sans-serif"}},{children:[!ue&&!he&&H,we?t.jsx(u.default,{}):t.jsx(t.Fragment,{}),He?t.jsx("div",e.__assign({style:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",color:"#242424"}},{children:"Something went wrong"})):t.jsx(t.Fragment,{}),!ue&&!he&&!H&&!we&&!He&&t.jsx(a.default,{startIndex:null==ze?void 0:ze.startIndex,endIndex:null==ze?void 0:ze.endIndex,language:Q,editorHeight:N,editorWidth:W,code:null!=T?T:ve,isHighlightingEnabled:w,isDarkModeEnabled:te,openHighlightedCodeDetails:function(){ce(!0)},highlightCodeStatsVariable:ke,setHighlightCodeStatsVariable:De,isExpanded:Z,highlightIndexes:ze,diagnostics:R,diagnosticStylesBySeverity:Re}),he&&t.jsx(l.default,{FileDetailsComponent:E,fileSummarySectionTitle:q,isDarkMode:te,editorHeight:N,editorWidth:W,code:null==pe?void 0:pe.content.split("\n").slice((null==ze?void 0:ze.startIndex)-1,null==ze?void 0:ze.endIndex).join("\n"),language:Q,onClose:function(e){e.stopPropagation(),e.preventDefault(),fe(!1)},summary:null==pe?void 0:pe.summary,filepath:Ce,citationTitle:C})]}))]}))}))]})};
|
|
2
2
|
//# sourceMappingURL=CodeCitation.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=new(function(){function e(){this.listeners=new Set,this.isDarkTheme=!0,this.isInitialized=!1}return e.prototype.subscribe=function(e){var t=this;return this.listeners.add(e),function(){return t.listeners.delete(e)}},e.prototype.setTheme=function(e){this.isDarkTheme=e,this.listeners.forEach((function(t){return t(e)}))},e.prototype.getTheme=function(e){return this.isInitialized||void 0===e||(this.setTheme(e),this.isInitialized=!0),this.isDarkTheme},e}());exports.themeManager=e;
|
|
2
|
+
//# sourceMappingURL=themeManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeManager.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as i,useEffect as n}from"react";import r from"../../../_virtual/Close.js";import l from"../../../_virtual/ArrowBack.js";import a from"../../BookCitation/BookCitation.js";import{comingSoonStyles as d,defaultIcon as c}from"../Bookemon.js";import s from"../../../node_modules/@material-ui/core/esm/Switch/Switch.js";import p from"../../../node_modules/@material-ui/core/esm/Tooltip/Tooltip.js";var
|
|
1
|
+
import{__assign as e}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as i,useEffect as n}from"react";import r from"../../../_virtual/Close.js";import l from"../../../_virtual/ArrowBack.js";import a from"../../BookCitation/BookCitation.js";import{comingSoonStyles as d,defaultIcon as c}from"../Bookemon.js";import s from"../../../node_modules/@material-ui/core/esm/Switch/Switch.js";import p from"../../../node_modules/@material-ui/core/esm/Tooltip/Tooltip.js";var u=function(u){var h=u.bookOverView,g=u.bookCoverImage,f=u.onClose,m=u.customStyle,x=u.quotesToHighLightData,v=u.updateQuotesToHighLight,y=u.citationLoad,b=u.clickableElementCategory,k=void 0===b?"":b,C=u.comingSoonData,w=u.isNonHighlightedBlur,B=void 0!==w&&w,S=u.isBlurToggleVisible,I=void 0!==S&&S,T=u.noHtmlContent,j=void 0!==T&&T,W=u.isBookemon,L=void 0===W||W,P=i(!1),H=P[0],F=P[1],z=i(!0),D=z[0],O=z[1],R=!!x.content,A={header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px"},headerLeft:{display:"flex",alignItems:"center",gap:"8px"},closeButton:{padding:"4px",borderRadius:"4px",cursor:"pointer",backgroundColor:"transparent"},flexCenter:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},coverContainer:{width:"100%",maxWidth:"300px",borderRadius:"12px",padding:"4px",background:"linear-gradient(135deg, #34D399, #3B82F6, #10B981)",position:"relative",overflow:"hidden",boxShadow:"0 10px 25px rgba(0,0,0,0.3)",marginBottom:"24px"},bookCoverStyle:{width:"100%",height:"auto",objectFit:"contain",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},loadingStyle:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},rightPanel:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},clickableElementCategory:{fontSize:"20px",fontWeight:600},previewWrapper:{flex:1,width:"80%",margin:"0 auto",display:"flex",flexDirection:"column",overflow:"hidden",justifyContent:"flex-start",alignItems:"center"},coverImagePreview:{display:"flex",justifyContent:"center",alignItems:"center",aspectRatio:"7 / 10",background:"",padding:0},toggleBlurContainer:{display:"flex",alignItems:"center",gap:"20px"},bookCoverPlaceholder:{width:"100%",height:"calc(100% - 8px)",background:"linear-gradient(to bottom, #22c55e, #14532d)",borderRadius:"4px",padding:"4px",color:"white",fontSize:"10px",display:"flex",justifyContent:"center",alignItems:"center"},bookCoverInner:{border:"1px solid white",padding:"4px",width:"calc(100% - 26px)",height:"calc(100% - 26px)",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",justifyContent:"space-around"},bookTitle:{fontWeight:800,fontSize:"1.5rem",textTransform:"uppercase",letterSpacing:"0.5px",lineHeight:1.2,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",padding:"0 8px"},bookAuthor:{fontSize:"1rem",fontWeight:500,opacity:.9,marginTop:"8px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"}};return n((function(){O(!0),console.log(y,"citationLoad")}),[y]),t("div",e({style:e(e({},A.rightPanel),(null==m?void 0:m.rightPanel)||{})},{children:[t("div",e({style:A.header},{children:[t("div",e({style:A.headerLeft},{children:[(R||j)&&o("button",e({style:A.closeButton,onClick:function(){return v("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:o(l,{})})),o("h2",e({style:A.clickableElementCategory},{children:k}))]})),t("div",e({style:A.toggleBlurContainer},{children:[R&&I&&t("div",e({style:{display:"flex",alignItems:"center",gap:"2px"}},{children:[o(s,{checked:D,onChange:function(e){O(e.target.checked),console.log(e.target.checked,"event.target.checked")},color:"primary",size:"small"}),t("span",e({style:{fontSize:"0.75rem",display:"flex",alignItems:"center",gap:"4px"}},{children:["Blur",o(p,e({title:"Blur Text is enabled by default. Non-highlighted parts of the text will appear blurred to help you focus on the highlighted content. You can turn this off if you want to see all text clearly."},{children:o("span",e({style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:"14px",height:"14px",borderRadius:"50%",backgroundColor:"#485468",color:"#fff",fontSize:"10px",fontWeight:"bold",cursor:"pointer",lineHeight:"14px",userSelect:"none"}},{children:"i"}))}))]}))]})),o("button",e({style:A.closeButton,onClick:function(){f(),v("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:o(r,{})}))]}))]})),o("div",e({style:e(e({},A.previewWrapper),null==m?void 0:m.previewWrapper)},{children:R?o(a,{citationNumber:1,defaultState:!0,partialMatch:!0,fixedWidth:!1,citationTitle:"Sample Citation",title:"Sample Title",paragraphs:[null==x?void 0:x.content],textToHighlight:[null==x?void 0:x.textToHighLight],externalLinkComponent:"",bookCoverImage:g,customStyle:null==m?void 0:m.citationCustomStyle,isNonHighlightedBlur:B,isBookemon:L,toggleBlur:D}):y||j?t("div",e({style:A.loadingStyle},{children:[o("div",e({style:d.iconWrapper},{children:(null==C?void 0:C.icon)||c})),t("p",e({style:d.text},j?{children:["No data found matching the selected ",k.toLowerCase()]}:{children:["fetching ",k.toLowerCase(),"...."]}))]})):o("div",e({style:A.flexCenter},{children:o("div",e({style:e(e({},A.coverContainer),H||!g?e(e({},A.coverImagePreview),null==m?void 0:m.coverImagePreview):{})},{children:g&&!H?o("img",{onError:function(){return F(!0)},style:A.bookCoverStyle,src:g,alt:"Book Cover Image"}):o("div",e({style:A.bookCoverPlaceholder},{children:t("div",e({style:A.bookCoverInner},{children:[o("div",e({style:A.bookTitle},{children:(null==h?void 0:h.title)||"Unknown Title"})),o("div",e({style:A.bookAuthor},{children:(null==h?void 0:h.author)||"Unknown Author"}))]}))}))}))}))}))]}))};export{u as default};
|
|
2
2
|
//# sourceMappingURL=BookPreview.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as o,__generator as t}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as i,jsxs as r,Fragment as n}from"react/jsx-runtime";import{useState as l,useRef as a}from"react";import d from"../../node_modules/@material-ui/core/esm/Accordion/Accordion.js";import s from"../../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js";import c from"../../_virtual/ExpandMore.js";import h from"../../_virtual/Close.js";import{PanelGroup as p,Panel as u,PanelResizeHandle as m}from"../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js";import g from"./BookDetailsCard/BookDetailsCard.js";import y from"./BookOverviewCard/BookOverviewCard.js";import v from"./BookElementsCard/BookElementsCard.js";import f from"./BookCopyrightsCard/BookCopyrightsCard.js";import x from"./BookPeopleAwardsCard/BookPeopleAwardsCard.js";import b from"./BookPreview/BookPreview.js";import k from"../../node_modules/@material-ui/core/esm/Dialog/Dialog.js";import C from"../../node_modules/@material-ui/core/esm/DialogContent/DialogContent.js";import B from"../../node_modules/@material-ui/core/esm/Typography/Typography.js";import w from"../../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js";import j from"../../node_modules/@material-ui/core/esm/IconButton/IconButton.js";var F={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogContent:{padding:0,backgroundColor:"#FFFFFF",overflow:"hidden",height:"90vh",position:"relative"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},S={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},D=i("svg",e({style:S.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},{children:i("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})),z=function(o){var t=o.header,n=o.subheader,l=o.icon;return i("div",e({style:S.wrapper},{children:r("div",e({style:S.inner},{children:[i("div",e({style:{marginBottom:"32px"}},{children:i("div",e({style:S.iconWrapper},{children:l||D}))})),r("div",{children:[i("h1",e({style:S.heading},{children:t})),i("p",e({style:S.text},{children:n}))]})]}))}))},P=function(S){var P=S.open,A=S.onClose,I=S.isNonHighlightedBlur,H=S.isBookemon,E=S.getHighlightContent,L=S.handleFetchManuscriptElements,_=S.data,O=S.showComingSoon,T=void 0!==O&&O,W=S.comingSoonData,M=void 0===W?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:D}:W,R=S.customStyle,N=void 0===R?{}:R,V=S.isBlurToggleVisible,Q=void 0!==V&&V,Y=l({textToHighLight:"",content:""}),q=Y[0],G=Y[1],J=l(1),K=J[0],U=J[1],X=l(!1),Z=X[0],$=X[1],ee=l("Book Preview"),oe=ee[0],te=ee[1],ie=l(70),re=ie[0],ne=ie[1],le=a(null),ae=l(!1),de=ae[0],se=ae[1],ce=function(e,i,r,n){return void 0===n&&(n=0),o(void 0,void 0,void 0,(function(){var o,l,a,d,s,c,h,p,u,m,g,y,v,f,x,b;return t(this,(function(t){switch(t.label){case 0:G({textToHighLight:"",content:""}),se(!1),$(!0),te(i),t.label=1;case 1:return t.trys.push([1,5,6,7]),r&&0!==r.length?[4,E([r[n]])]:($(!1),ne(70),null===(x=le.current)||void 0===x||x.resize(70),[2]);case 2:if(o=t.sent(),l=(null==o?void 0:o.data)||o||[],!Array.isArray(l)||0===l.length)return se(!0),$(!1),[2];for(d=(a=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(e),s=null,c=0,h=l;c<h.length;c++)if(y=h[c],a(y.normalizedContent||y.htmlContent).includes(d)){s=y;break}if(!s)for(p=d.split(" ").filter(Boolean);p.length>0;){for(u=p.join(" "),m=0,g=l;m<g.length;m++)if(y=g[m],a(y.normalizedContent||y.htmlContent).includes(u)){s=y;break}if(s)break;p.pop()}return v=l.map((function(e){return e.htmlContent})).join("\n"),
|
|
1
|
+
import{__assign as e,__awaiter as o,__generator as t}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as i,jsxs as r,Fragment as n}from"react/jsx-runtime";import{useState as l,useRef as a}from"react";import d from"../../node_modules/@material-ui/core/esm/Accordion/Accordion.js";import s from"../../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js";import c from"../../_virtual/ExpandMore.js";import h from"../../_virtual/Close.js";import{PanelGroup as p,Panel as u,PanelResizeHandle as m}from"../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js";import g from"./BookDetailsCard/BookDetailsCard.js";import y from"./BookOverviewCard/BookOverviewCard.js";import v from"./BookElementsCard/BookElementsCard.js";import f from"./BookCopyrightsCard/BookCopyrightsCard.js";import x from"./BookPeopleAwardsCard/BookPeopleAwardsCard.js";import b from"./BookPreview/BookPreview.js";import k from"../../node_modules/@material-ui/core/esm/Dialog/Dialog.js";import C from"../../node_modules/@material-ui/core/esm/DialogContent/DialogContent.js";import B from"../../node_modules/@material-ui/core/esm/Typography/Typography.js";import w from"../../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js";import j from"../../node_modules/@material-ui/core/esm/IconButton/IconButton.js";var F={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogContent:{padding:0,backgroundColor:"#FFFFFF",overflow:"hidden",height:"90vh",position:"relative"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},S={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},D=i("svg",e({style:S.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},{children:i("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})),z=function(o){var t=o.header,n=o.subheader,l=o.icon;return i("div",e({style:S.wrapper},{children:r("div",e({style:S.inner},{children:[i("div",e({style:{marginBottom:"32px"}},{children:i("div",e({style:S.iconWrapper},{children:l||D}))})),r("div",{children:[i("h1",e({style:S.heading},{children:t})),i("p",e({style:S.text},{children:n}))]})]}))}))},P=function(S){var P=S.open,A=S.onClose,I=S.isNonHighlightedBlur,H=S.isBookemon,E=S.getHighlightContent,L=S.handleFetchManuscriptElements,_=S.data,O=S.showComingSoon,T=void 0!==O&&O,W=S.comingSoonData,M=void 0===W?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:D}:W,R=S.customStyle,N=void 0===R?{}:R,V=S.isBlurToggleVisible,Q=void 0!==V&&V,Y=l({textToHighLight:"",content:""}),q=Y[0],G=Y[1],J=l(1),K=J[0],U=J[1],X=l(!1),Z=X[0],$=X[1],ee=l("Book Preview"),oe=ee[0],te=ee[1],ie=l(70),re=ie[0],ne=ie[1],le=a(null),ae=l(!1),de=ae[0],se=ae[1],ce=function(e,i,r,n){return void 0===n&&(n=0),o(void 0,void 0,void 0,(function(){var o,l,a,d,s,c,h,p,u,m,g,y,v,f,x,b;return t(this,(function(t){switch(t.label){case 0:G({textToHighLight:"",content:""}),se(!1),$(!0),te(i),t.label=1;case 1:return t.trys.push([1,5,6,7]),r&&0!==r.length?[4,E([r[n]])]:($(!1),ne(70),null===(x=le.current)||void 0===x||x.resize(70),[2]);case 2:if(o=t.sent(),l=(null==o?void 0:o.data)||o||[],!Array.isArray(l)||0===l.length)return se(!0),$(!1),[2];for(d=(a=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(e),s=null,c=0,h=l;c<h.length;c++)if(y=h[c],a(y.normalizedContent||y.htmlContent).includes(d)){s=y;break}if(!s)for(p=d.split(" ").filter(Boolean);p.length>0;){for(u=p.join(" "),m=0,g=l;m<g.length;m++)if(y=g[m],a(y.normalizedContent||y.htmlContent).includes(u)){s=y;break}if(s)break;p.pop()}return v=l.map((function(e){return e.htmlContent})).join("\n"),G({textToHighLight:s?s.htmlContent:"",content:v}),ne(50),null===(b=le.current)||void 0===b||b.resize(50),!s&&n+1<r.length?[4,ce(e,i,r,n+1)]:[3,4];case 3:return[2,t.sent()];case 4:return[2];case 5:return f=t.sent(),console.error("Highlight error:",f),se(!0),[3,7];case 6:return $(!1),[7];case 7:return[2]}}))}))},he=_.bookAwards,pe=_.bookCopyRight,ue=_.bookDetails,me=_.bookElements,ge=_.bookOverView,ye=_.bookCoverImage,ve=null==ue?void 0:ue.isbn;return i(k,e({open:P,fullWidth:!0,PaperProps:{style:e(e({},null==F?void 0:F.dialogPaper),null==N?void 0:N.dialogDimension)}},{children:r(C,e({style:F.dialogContent},{children:[!T&&i("div",e({style:F.container},{children:r(p,e({direction:"horizontal"},{children:[i(u,e({order:1,ref:le,defaultSize:re||70},{children:r("div",e({style:e(e({},null==F?void 0:F.leftPanel),null==N?void 0:N.leftPanel)},{children:[i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({defaultExpanded:!0,elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Book Overview"}))})),i(w,e({style:F.accordionDetails},{children:ge&&Object.keys(ge).length>0?i(y,{data:ge}):i("div",e({style:F.errorState},{children:"No overview data available."}))}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Book Manuscript Elements"}))})),i(w,e({style:F.accordionDetails},{children:i(v,{data:me,handleFetchManuscriptElements:L,BookIsbn:ve,updateQuotesToHighLight:ce})}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Book Metadata Details"}))})),i(w,e({style:F.accordionDetails},{children:ue&&Object.keys(ue).length>0?i(g,{data:ue}):i("div",e({style:F.errorState},{children:"No Book Metadata data available."}))}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Copyrights & Marketing"}))})),i(w,e({style:F.accordionDetails},{children:pe&&Object.keys(pe).length>0?i(f,{data:pe}):i("div",e({style:F.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),i("div",{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"People & Awards"}))})),i(w,e({style:F.accordionDetails},{children:he&&Object.keys(he).length>0?i(x,{data:he}):i("div",e({style:F.errorState},{children:"No People & Awards data available."}))}))]}))})]}))})),i(m,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),i(u,e({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:i(b,{bookOverView:ge,bookCoverImage:ye,onClose:A,clickableElementCategory:oe,quotesToHighLightData:q,updateQuotesToHighLight:ce,citationLoad:Z,previewPage:K,setPreviewPage:U,customStyle:N,comingSoonData:M,isNonHighlightedBlur:I,isBlurToggleVisible:Q,isBookemon:H,noHtmlContent:de})}))]}))})),T?r("div",e({style:F.blurOverlay},{children:[i(j,e({style:F.closeButton,onClick:A},{children:i(h,{})})),i(z,{header:M.header,subheader:M.subheader,icon:M.icon})]})):i(n,{})]}))}))};export{S as comingSoonStyles,P as default,D as defaultIcon};
|
|
2
2
|
//# sourceMappingURL=Bookemon.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as t,__generator as n}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as i,Fragment as o,jsx as a}from"react/jsx-runtime";import
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as n}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as i,Fragment as o,jsx as a}from"react/jsx-runtime";import r,{useRef as l,useState as s,useEffect as d}from"react";import c from"./CodeCitation.module.css.js";import u from"./_components/CodeEditor.js";import{getLanguageFromFileName as h}from"../../utils/codeCitations.utils.js";import g from"./_components/ThemeToggle.js";import m from"./_components/CodeCitationPopup.js";import p from"./_components/HighlightedCodeDetails.js";import f from"../../node_modules/axios/lib/axios.js";import v from"./_components/Spinner.js";import{DEFAULT_DIAGNOSTIC_STYLES_BY_SEVERITY as x}from"../../constants/diagnosticStylesBySeverity.js";import{themeManager as I}from"../../utils/themeManager.js";var C=function(C){var y=C.baseUrlForCodeRetrieval,S=C.assistantName,b=C.organizationName,_=C.userId,k=C.taskId,D=C.repoUrl,P=C.inLineCitation,T=C.citationTitle,w=C.filename,j=C.filepath,F=C.citationContainerTitle,H=C.showThemeToggle,L=C.customCode,E=C.isDarkModeEnabled,B=C.chevronUpComponent,W=C.chevronDownComponent,N=C.isHighlightingEnabled,z=C.FileDetailsComponent,M=C.additionalCallbackForPillButton,V=C.CustomCodeRenderComponent,J=C.fileSummarySectionTitle,R=C.showFullscreenIcon,U=C.showFileSummaryIButton,A=C.editorHeight,O=C.editorWidth,q=C.styles,G=void 0===q?{}:q,K=C.diagnostics,Q=C.diagnosticStylesBySeverity,X=C.datasource,Y=void 0===X?"codebase":X,Z=C.externalFilesData,$=C.startIndex,ee=C.endIndex,te=l(!1),ne=h(w),ie=s(!1),oe=ie[0],ae=ie[1],re=s((function(){return I.getTheme(E)})),le=re[0],se=re[1];d((function(){return I.subscribe(se)}),[]);var de=s(!1),ce=de[0],ue=de[1],he=s(!1),ge=he[0],me=he[1],pe=s(!1),fe=pe[0],ve=pe[1],xe=s(!1),Ie=xe[0],Ce=xe[1],ye=s(null),Se=ye[0],be=ye[1],_e=s(""),ke=_e[0],De=_e[1],Pe=s(""),Te=Pe[0],we=Pe[1],je=s({startIndex:-1,endIndex:-1}),Fe=je[0],He=je[1],Le=s({}),Ee=Le[0],Be=Le[1],We=s(!1),Ne=We[0],ze=We[1],Me=s(!1),Ve=Me[0],Je=Me[1],Re=s({startIndex:-1,endIndex:-1}),Ue=Re[0],Ae=Re[1],Oe=s({startIndex:-1,endIndex:-1}),qe=Oe[0],Ge=Oe[1],Ke=r.useMemo((function(){return e(e({},x),Q)}),[Q]);d((function(){Ge({startIndex:null!=$?$:-1,endIndex:null!=ee?ee:-1})}),[$,ee]),d((function(){Z&&L&&(be(Z),te.current=!0)}),[Z,L]),d((function(){if("undefined"!=typeof window&&!te.current){te.current=!0;var i=new URL(j,"http://example.com"),o=i.searchParams,a=void 0!==$?$:o.has("startLine")?Number(o.get("startLine")):-1,r=void 0!==ee?ee:o.has("endLine")?Number(o.get("endLine")):-1;Ge({startIndex:a,endIndex:r}),He({startIndex:a,endIndex:r}),Ae({startIndex:a,endIndex:r}),i.searchParams.delete("startLine"),i.searchParams.delete("endLine"),i.searchParams.delete("validation");var l=i.pathname+i.search,s=null==l?void 0:l.replace(/^\//,"");we(s),console.log("Params going to API:",{file_path:s,assistant_name:S,organization_name:b,user_id:_,task_id:k,chunks_search:!1,technical_details_only:!0,repo_url:D});L||Ne||t(void 0,void 0,void 0,(function(){var t,i,o,a,r,l;return n(this,(function(n){switch(n.label){case 0:Je(!1),ze(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,f.get("".concat(y,"/analyzer/get_file_details"),{params:e({file_path:String(s),assistant_name:String(S),organization_name:String(b),user_id:String(_),task_id:String(k),repo_url:String(D),chunks_search:!1,technical_details_only:!0},"codebase"!==Y&&{datasource:Y})})];case 2:return t=n.sent(),i=(null==t?void 0:t.data[0])||(null==t?void 0:t.data),!Se&&i&&(be(i),Object.keys(null==t?void 0:t.data)&&(o=(null===(l=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r[0])||void 0===l?void 0:l.content)||(null==t?void 0:t.data.content),De(o))),ze(!1),[2,t.data];case 3:return a=n.sent(),Je(!0),console.error("Error in retrieving file details: ",a),[3,4];case 4:return ze(!1),[2]}}))}))}}),[]);return i(o,{children:[i("span",e({onClick:function(e){return function(e){e.preventDefault(),e.stopPropagation(),M&&M(),ae((function(e){return!e})),ue((function(e){return!e}))}(e)},className:c.pillButton,style:G.pillButton},{children:[a("span",e({style:G.citationTitle},{children:T})),P&&(oe?B:W)]})),(!P||ge)&&a(m,{open:ce,onClose:function(){Ge({startIndex:null==Ue?void 0:Ue.startIndex,endIndex:null==Ue?void 0:Ue.endIndex}),me(!1),ue(!1),He({startIndex:-1,endIndex:-1}),Be({})},title:T,customStyles:{popupContainer:{width:"100vw",height:"100vh",borderRadius:"0.75rem",fontFamily:"Plus Jakarta Sans, sans-serif"},popupTitleContainer:{color:"#d63384",fontFamily:"Plus Jakarta Sans, sans-serif",position:"relative",textAlign:"left",fontWeight:"700"},topLeftTitle:{backgroundColor:"#f9f9f9",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"1rem",fontWeight:"bold",padding:"5px",margin:"0px"},bottomLeftTitle:{backgroundColor:"#f9f9f9",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"1rem",fontWeight:"bold",padding:"5px",margin:"0px"}},editorChildren:a(u,{startIndex:null==qe?void 0:qe.startIndex,endIndex:null==qe?void 0:qe.endIndex,language:ne,editorHeight:A,editorWidth:O,code:L||ke,isHighlightingEnabled:N,isDarkModeEnabled:le,highlightCodeStatsLine:Fe,setHighlightCodeStatsLine:He,highlightCodeStatsVariable:Ee,setHighlightCodeStatsVariable:Be,isExpanded:oe,highlightIndexes:qe,diagnostics:K,diagnosticStylesBySeverity:Ke}),fileDetails:Se,setHighlightIndexes:Ge,highlightCodeStatsLine:Fe,setHighlightCodeStatsLine:He,highlightCodeStatsVariable:Ee,setHighlightCodeStatsVariable:Be,filepath:Te,datasource:Y}),P&&oe&&a("div",e({className:c.citationWrapper,style:G.citationWrapper},{children:i("div",e({className:c.citationContent,style:G.citationContent},{children:[!fe&&F?i("div",e({className:c.citationContainerTitle,style:G.citationContainerTitle},{children:[a("span",{children:F}),H?a(g,{darkMode:le,onToggle:function(e){return function(e){e.stopPropagation(),e.preventDefault(),I.setTheme(!le)}(e)},toggleFullscreen:function(e){e.stopPropagation(),e.preventDefault(),ue(!0),me(!0)},handleOpenFileDetailSection:function(e){e.stopPropagation(),e.preventDefault(),Ce(!0)},showFullscreenIcon:R,showFileSummaryIButton:U}):a(o,{})]})):a(o,{}),i("div",e({style:{zIndex:-1e3,color:"#000",overflow:"hidden",display:"flex",flexDirection:"column",height:A,width:O,fontFamily:"Plus Jakarta Sans, sans-serif"}},{children:[!fe&&!Ie&&V,a(Ne?v:o,{}),Ve?a("div",e({style:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",color:"#242424"}},{children:"Something went wrong"})):a(o,{}),!fe&&!Ie&&!V&&!Ne&&!Ve&&a(u,{startIndex:null==qe?void 0:qe.startIndex,endIndex:null==qe?void 0:qe.endIndex,language:ne,editorHeight:A,editorWidth:O,code:null!=L?L:ke,isHighlightingEnabled:N,isDarkModeEnabled:le,openHighlightedCodeDetails:function(){ve(!0)},highlightCodeStatsVariable:Ee,setHighlightCodeStatsVariable:Be,isExpanded:oe,highlightIndexes:qe,diagnostics:K,diagnosticStylesBySeverity:Ke}),Ie&&a(p,{FileDetailsComponent:z,fileSummarySectionTitle:J,isDarkMode:le,editorHeight:A,editorWidth:O,code:null==Se?void 0:Se.content.split("\n").slice((null==qe?void 0:qe.startIndex)-1,null==qe?void 0:qe.endIndex).join("\n"),language:ne,onClose:function(e){e.stopPropagation(),e.preventDefault(),Ce(!1)},summary:null==Se?void 0:Se.summary,filepath:Te,citationTitle:T})]}))]}))}))]})};export{C as default};
|
|
2
2
|
//# sourceMappingURL=CodeCitation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookPreview.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookPreview/BookPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAA+B,MAAM,OAAO,CAAC;AAI1E,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,mBAAmB,CAAC;AAM3B,UAAU,gBAAgB;IACxB,YAAY,EAAE,aAAa,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,qBAAqB,EAAE;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,YAAY,EAAE,OAAO,CAAC;IACtB,uBAAuB,EAAE,CAAC,eAAe,EAAE,MAAM,EAC/C,wBAAwB,EAAE,MAAM,EAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE;QACZ,mBAAmB,CAAC,EAAE;YACpB,qBAAqB,CAAC,EAAE,aAAa,CAAC;YACtC,KAAK,CAAC,EAAE,aAAa,CAAC;YACtB,cAAc,CAAC,EAAE,aAAa,CAAC;YAC/B,iBAAiB,CAAC,EAAE,aAAa,CAAC;YAClC,UAAU,CAAC,EAAE,aAAa,CAAC;YAC3B,QAAQ,CAAC,EAAE,aAAa,CAAC;YACzB,SAAS,CAAC,EAAE,aAAa,CAAC;YAC1B,eAAe,CAAC,EAAE,aAAa,CAAC;YAChC,eAAe,CAAC,EAAE,aAAa,CAAC;YAChC,mBAAmB,CAAC,EAAE,aAAa,CAAC;YACpC,eAAe,CAAC,EAAE,aAAa,CAAC;YAChC,oBAAoB,CAAC,EAAE,aAAa,CAAC;YACrC,eAAe,CAAC,EAAE,aAAa,CAAC;SACjC,CAAA;QACD,eAAe,CAAC,EAAE,aAAa,CAAA;QAC/B,SAAS,CAAC,EAAE,aAAa,CAAA;QACzB,UAAU,CAAC,EAAE,aAAa,CAAA;QAC1B,cAAc,CAAC,EAAE,aAAa,CAAA;QAC9B,iBAAiB,CAAC,EAAE,aAAa,CAAA;KAClC,CAAA;IACD,cAAc,CAAC,EAAE;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;KACxB,CAAC;IACF,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,EAAE,OAAO,CAAA;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,EAAG,OAAO,CAAA;IACvB,UAAU,EAAG,OAAO,CAAA;CACrB;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"BookPreview.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookPreview/BookPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAA+B,MAAM,OAAO,CAAC;AAI1E,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,mBAAmB,CAAC;AAM3B,UAAU,gBAAgB;IACxB,YAAY,EAAE,aAAa,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,qBAAqB,EAAE;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,YAAY,EAAE,OAAO,CAAC;IACtB,uBAAuB,EAAE,CAAC,eAAe,EAAE,MAAM,EAC/C,wBAAwB,EAAE,MAAM,EAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE;QACZ,mBAAmB,CAAC,EAAE;YACpB,qBAAqB,CAAC,EAAE,aAAa,CAAC;YACtC,KAAK,CAAC,EAAE,aAAa,CAAC;YACtB,cAAc,CAAC,EAAE,aAAa,CAAC;YAC/B,iBAAiB,CAAC,EAAE,aAAa,CAAC;YAClC,UAAU,CAAC,EAAE,aAAa,CAAC;YAC3B,QAAQ,CAAC,EAAE,aAAa,CAAC;YACzB,SAAS,CAAC,EAAE,aAAa,CAAC;YAC1B,eAAe,CAAC,EAAE,aAAa,CAAC;YAChC,eAAe,CAAC,EAAE,aAAa,CAAC;YAChC,mBAAmB,CAAC,EAAE,aAAa,CAAC;YACpC,eAAe,CAAC,EAAE,aAAa,CAAC;YAChC,oBAAoB,CAAC,EAAE,aAAa,CAAC;YACrC,eAAe,CAAC,EAAE,aAAa,CAAC;SACjC,CAAA;QACD,eAAe,CAAC,EAAE,aAAa,CAAA;QAC/B,SAAS,CAAC,EAAE,aAAa,CAAA;QACzB,UAAU,CAAC,EAAE,aAAa,CAAA;QAC1B,cAAc,CAAC,EAAE,aAAa,CAAA;QAC9B,iBAAiB,CAAC,EAAE,aAAa,CAAA;KAClC,CAAA;IACD,cAAc,CAAC,EAAE;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;KACxB,CAAC;IACF,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,EAAE,OAAO,CAAA;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,EAAG,OAAO,CAAA;IACvB,UAAU,EAAG,OAAO,CAAA;CACrB;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAqS3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bookemon.d.ts","sourceRoot":"","sources":["../../../../../src/features/Bookemon/Bookemon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,aAAa,EAAU,MAAM,OAAO,CAAC;AAuI/D,eAAO,MAAM,gBAAgB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CA4C5D,CAAC;AACF,eAAO,MAAM,WAAW,yCAcvB,CAAC;AAyBF,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAKD,QAAA,MAAM,QAAQ;UAiBN,OAAO;aACJ,MAAM,IAAI;0BACI,OAAO;gBACjB,OAAO;;oCAEY,MAAM,EAAE,KAAK,QAAQ,GAAG,CAAC;;kBAO7C,GAAG;cACP,GAAG;kBACC,MAAM;cACV,GAAG;UACL,QAAQ,GAAG,CAAC;UACZ,GAAG;;;;;eAKA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Bookemon.d.ts","sourceRoot":"","sources":["../../../../../src/features/Bookemon/Bookemon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,aAAa,EAAU,MAAM,OAAO,CAAC;AAuI/D,eAAO,MAAM,gBAAgB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CA4C5D,CAAC;AACF,eAAO,MAAM,WAAW,yCAcvB,CAAC;AAyBF,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAKD,QAAA,MAAM,QAAQ;UAiBN,OAAO;aACJ,MAAM,IAAI;0BACI,OAAO;gBACjB,OAAO;;oCAEY,MAAM,EAAE,KAAK,QAAQ,GAAG,CAAC;;kBAO7C,GAAG;cACP,GAAG;kBACC,MAAM;cACV,GAAG;UACL,QAAQ,GAAG,CAAC;UACZ,GAAG;;;;;eAKA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;6CAwXzB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeCitation.d.ts","sourceRoot":"","sources":["../../../../../src/features/CodeCitation/CodeCitation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoB,aAAa,EAAa,MAAM,OAAO,CAAC;AAS1E,OAAO,EAAE,WAAW,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"CodeCitation.d.ts","sourceRoot":"","sources":["../../../../../src/features/CodeCitation/CodeCitation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoB,aAAa,EAAa,MAAM,OAAO,CAAC;AAS1E,OAAO,EAAE,WAAW,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAIhH,UAAU,iBAAiB;IACvB,uBAAuB,EAAE,MAAM,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,2BAA2B,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9C,yBAAyB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5C,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,yBAAyB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5C,sBAAsB,CAAC,EAAE,GAAG,CAAC;IAC7B,+BAA+B,CAAC,EAAE,GAAG,CAAC;IACtC,uBAAuB,EAAE,MAAM,CAAA;IAC/B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,sBAAsB,EAAE,OAAO,CAAC;IAChC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;IAC5B,0BAA0B,CAAC,EAAE,2BAA2B,CAAC;IACzD,MAAM,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,aAAa,CAAC;QACrB,UAAU,CAAC,EAAE,aAAa,CAAC;QAC3B,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,sBAAsB,CAAC,EAAE,aAAa,CAAC;KAC1C,CAAC;IACF,UAAU,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC;IAC/B,iBAAiB,CAAC,EAAE,qBAAqB,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA8R7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type ThemeCallback = (isDarkTheme: boolean) => void;
|
|
2
|
+
declare class ThemeManager {
|
|
3
|
+
private listeners;
|
|
4
|
+
private isDarkTheme;
|
|
5
|
+
private isInitialized;
|
|
6
|
+
constructor();
|
|
7
|
+
subscribe(callback: ThemeCallback): () => void;
|
|
8
|
+
setTheme(isDarkTheme: boolean): void;
|
|
9
|
+
getTheme(initialTheme?: boolean): boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const themeManager: ThemeManager;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=themeManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeManager.d.ts","sourceRoot":"","sources":["../../../../src/utils/themeManager.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GAAG,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;AAEpD,cAAM,YAAY;IACd,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,WAAW,CAAU;IAC7B,OAAO,CAAC,aAAa,CAAU;;IAQ/B,SAAS,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,IAAI;IAK9C,QAAQ,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI;IAKpC,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO;CAS5C;AAED,eAAO,MAAM,YAAY,cAAqB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=new(function(){function e(){this.listeners=new Set,this.isDarkTheme=!0,this.isInitialized=!1}return e.prototype.subscribe=function(e){var t=this;return this.listeners.add(e),function(){return t.listeners.delete(e)}},e.prototype.setTheme=function(e){this.isDarkTheme=e,this.listeners.forEach((function(t){return t(e)}))},e.prototype.getTheme=function(e){return this.isInitialized||void 0===e||(this.setTheme(e),this.isInitialized=!0),this.isDarkTheme},e}());export{e as themeManager};
|
|
2
|
+
//# sourceMappingURL=themeManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeManager.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|