@e-llm-studio/citation 0.0.140 → 0.0.142

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.
Files changed (56) hide show
  1. package/README.md +21 -26
  2. package/dist/assests/svg/PdfViewerIcons.js +2 -0
  3. package/dist/assests/svg/PdfViewerIcons.js.map +1 -0
  4. package/dist/cjs/assests/svg/PdfViewerIcons.js +2 -0
  5. package/dist/cjs/assests/svg/PdfViewerIcons.js.map +1 -0
  6. package/dist/cjs/features/Bookemon/BookCopyrightsCard/BookCopyrightsCard.js +1 -1
  7. package/dist/cjs/features/Bookemon/BookDetailsCard/BookDetailsCard.js +1 -1
  8. package/dist/cjs/features/Bookemon/BookElementsCard/BookElementsCard.js +1 -1
  9. package/dist/cjs/features/Bookemon/BookOverviewCard/BookOverviewCard.js +1 -1
  10. package/dist/cjs/features/Bookemon/BookPeopleAwardsCard/BookPeopleAwardsCard.js +1 -1
  11. package/dist/cjs/features/Bookemon/Bookemon.js +1 -1
  12. package/dist/cjs/features/Bookemon/BookemonContent.js +1 -1
  13. package/dist/cjs/features/PdfViewer/PdfContainer.js +1 -1
  14. package/dist/cjs/features/PdfViewer/PdfStyle.js +1 -1
  15. package/dist/cjs/features/PdfViewer/PdfToolbar.js +1 -1
  16. package/dist/cjs/features/PdfViewer/PdfViewer.js +1 -1
  17. package/dist/features/Bookemon/BookCopyrightsCard/BookCopyrightsCard.js +1 -1
  18. package/dist/features/Bookemon/BookDetailsCard/BookDetailsCard.js +1 -1
  19. package/dist/features/Bookemon/BookElementsCard/BookElementsCard.js +1 -1
  20. package/dist/features/Bookemon/BookOverviewCard/BookOverviewCard.js +1 -1
  21. package/dist/features/Bookemon/BookPeopleAwardsCard/BookPeopleAwardsCard.js +1 -1
  22. package/dist/features/Bookemon/Bookemon.js +1 -1
  23. package/dist/features/Bookemon/BookemonContent.js +1 -1
  24. package/dist/features/PdfViewer/PdfContainer.js +1 -1
  25. package/dist/features/PdfViewer/PdfStyle.js +1 -1
  26. package/dist/features/PdfViewer/PdfToolbar.js +1 -1
  27. package/dist/features/PdfViewer/PdfViewer.js +1 -1
  28. package/dist/types/src/BookemonTest.d.ts.map +1 -1
  29. package/dist/types/src/PdfViewerTest.d.ts.map +1 -1
  30. package/dist/types/src/assests/svg/PdfViewerIcons.d.ts +5 -0
  31. package/dist/types/src/assests/svg/PdfViewerIcons.d.ts.map +1 -0
  32. package/dist/types/src/features/Bookemon/BookCopyrightsCard/BookCopyrightsCard.d.ts +2 -1
  33. package/dist/types/src/features/Bookemon/BookCopyrightsCard/BookCopyrightsCard.d.ts.map +1 -1
  34. package/dist/types/src/features/Bookemon/BookDetailsCard/BookDetailsCard.d.ts +5 -2
  35. package/dist/types/src/features/Bookemon/BookDetailsCard/BookDetailsCard.d.ts.map +1 -1
  36. package/dist/types/src/features/Bookemon/BookElementsCard/BookElementsCard.d.ts +5 -1
  37. package/dist/types/src/features/Bookemon/BookElementsCard/BookElementsCard.d.ts.map +1 -1
  38. package/dist/types/src/features/Bookemon/BookOverviewCard/BookOverviewCard.d.ts +2 -1
  39. package/dist/types/src/features/Bookemon/BookOverviewCard/BookOverviewCard.d.ts.map +1 -1
  40. package/dist/types/src/features/Bookemon/BookPeopleAwardsCard/BookPeopleAwardsCard.d.ts +2 -1
  41. package/dist/types/src/features/Bookemon/BookPeopleAwardsCard/BookPeopleAwardsCard.d.ts.map +1 -1
  42. package/dist/types/src/features/Bookemon/Bookemon.d.ts +1 -1
  43. package/dist/types/src/features/Bookemon/Bookemon.d.ts.map +1 -1
  44. package/dist/types/src/features/Bookemon/BookemonContent.d.ts +1 -1
  45. package/dist/types/src/features/Bookemon/BookemonContent.d.ts.map +1 -1
  46. package/dist/types/src/features/Bookemon/types/citation.types.d.ts +2 -0
  47. package/dist/types/src/features/Bookemon/types/citation.types.d.ts.map +1 -1
  48. package/dist/types/src/features/PdfViewer/PdfContainer.d.ts +3 -1
  49. package/dist/types/src/features/PdfViewer/PdfContainer.d.ts.map +1 -1
  50. package/dist/types/src/features/PdfViewer/PdfStyle.d.ts +29 -1
  51. package/dist/types/src/features/PdfViewer/PdfStyle.d.ts.map +1 -1
  52. package/dist/types/src/features/PdfViewer/PdfToolbar.d.ts +10 -1
  53. package/dist/types/src/features/PdfViewer/PdfToolbar.d.ts.map +1 -1
  54. package/dist/types/src/features/PdfViewer/PdfViewer.d.ts +34 -1
  55. package/dist/types/src/features/PdfViewer/PdfViewer.d.ts.map +1 -1
  56. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import{__assign as e,__awaiter as t,__generator as n,__rest as o}from"tslib";import{jsxs as r,jsx as a,Fragment as i}from"react/jsx-runtime";import l from"@mui/material/Pagination";import s from"@mui/material/Skeleton";import{useRef as c,useEffect as d,useState as u}from"react";import p from"react-markdown";import g from"rehype-raw";import h from"remark-breaks";import{highlightTermsFunc as x,processTextWithHighlight as f}from"../utils/highlight.js";import{sanitizeHtml as m}from"../../../utils/sanitizeHtml.js";var y={sectionTitle:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"12px"},quotesPadding:{paddingLeft:"12px"},quoteCard:{border:"1px solid #CBD5E1",borderRadius:"8px",padding:"16px",backgroundColor:"#F8FAFC",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",marginBottom:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},quoteText:{fontStyle:"italic",color:"#475569",fontSize:"14px",fontWeight:400,marginBottom:"12px"},quoteMeta:{color:"#475569",fontSize:"12px",fontWeight:400},quoteAuthor:{fontSize:"10px",fontWeight:600,color:"#475569",marginTop:"8px",marginBottom:"18px"},button:{color:"#5928ED",fontSize:"14px",fontWeight:600,background:"none",border:"none",cursor:"pointer",padding:0,textDecoration:"none",paddingLeft:"12px"},geoLocationsContainer:{marginTop:"24px",marginBottom:"24px"},geoText:{fontSize:"14px",fontWeight:500,cursor:"pointer",color:"#532BED"},geoDivider:{margin:"0 8px",color:"#475abb",backgroundColor:"#475abb",width:"1px",height:"18px",display:"inline-block"},geoLocationFlex:{display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"8px"},charactersContainer:{marginTop:"16px"},charactersGrid:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"16px",marginBottom:"16px",paddingLeft:"12px"},characterCard:{border:"1px solid #E5E7EB",borderRadius:"8px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",display:"flex",alignItems:"flex-start",gap:"12px",padding:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},avatar:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"9999px",fontSize:"14px",fontWeight:600,flexShrink:0},charName:{fontStyle:"normal",fontWeight:600,color:"#101827",fontSize:"16px"},charDesc:{fontStyle:"normal",fontWeight:400,fontSize:"14px",color:"#6B7280"},retryButton:{backgroundColor:"#5928EC",color:"#fff",padding:"6px 10px",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"12px",fontWeight:"500"}},v=function(v){var b,k,T;v.data;var C=v.updateQuotesToHighLight,w=v.handleFetchManuscriptElements,S=v.BookIsbn,L=v.title,N=v.highlightTerms,q=v.onHighlightMatch,B=v.defaultPages,D=c(!0);d(function(){return function(){D.current=!1}},[]);var M=u([]),E=M[0],P=M[1],F=u(null!==(b=null==B?void 0:B.quotes)&&void 0!==b?b:1),_=F[0],H=F[1],I=u(!1),W=I[0],z=I[1],R=u(!0),j=R[0],G=R[1],K=u(0),Y=K[0],A=K[1],Q=u([]),O=Q[0],J=Q[1],U=u(null!==(k=null==B?void 0:B.characters)&&void 0!==k?k:1),V=U[0],X=U[1],Z=u(!1),$=Z[0],ee=Z[1],te=u(!0),ne=te[0],oe=te[1],re=u(0),ae=re[0],ie=re[1],le=u([]),se=le[0],ce=le[1],de=u(null!==(T=null==B?void 0:B.locations)&&void 0!==T?T:1),ue=de[0],pe=de[1],ge=u(!1),he=ge[0],xe=ge[1],fe=u(!0),me=fe[0],ye=fe[1],ve=u(0),be=ve[0],ke=ve[1],Te=u({list:"",index:-1,page:1}),Ce=Te[0],we=Te[1],Se=c(!1),Le=c(null);d(function(){if(null==N?void 0:N.length){var e=N.map(function(e){return e.toLowerCase()}),t=function(t){return t&&e.some(function(e){return t.toLowerCase().includes(e)})},n=!1;E.forEach(function(e,o){!n&&t(e.text)&&(we({list:"notable",index:o,page:_}),null==q||q(!0),n=!0)}),se.forEach(function(e,o){!n&&t(e.name)&&(we({list:"geo_location",index:o,page:ue}),null==q||q(!0),n=!0)}),O.forEach(function(e,o){n||!t(e.name)&&!t(e.description)||(we({list:"key_character",index:o,page:V}),null==q||q(!0),n=!0)})}},[N,E,se,O,_,ue,V]),d(function(){B&&(B.quotes&&H(B.quotes),B.locations&&pe(B.locations),B.characters&&X(B.characters))},[B]),d(function(){Se.current=!1},[N]);var Ne=function(e){var o=e.endpoint,r=e.page,a=e.isbn,i=e.setData,l=e.setLoading,s=e.setHasMore,c=e.setTotalPage,d=e.title;return t(void 0,void 0,void 0,function(){var e,t,u,p;return n(this,function(n){switch(n.label){case 0:l(!0),n.label=1;case 1:return n.trys.push([1,,3,4]),[4,w({endpoint:o,page:r,pageSize:10,isbn:a,title:d})];case 2:return e=n.sent(),D.current?(i((null==e?void 0:e.data)||[]),c((null===(t=null==e?void 0:e.pagination)||void 0===t?void 0:t.totalPages)||0),s(!(null===(u=null==e?void 0:e.pagination)||void 0===u?void 0:u.hasNext)&&!(null===(p=null==e?void 0:e.pagination)||void 0===p?void 0:p.hasPrevious)),[3,4]):[2];case 3:return D.current&&l(!1),[7];case 4:return[2]}})})};return d(function(){Ne({endpoint:"notable-quotes",page:_,isbn:S,setData:P,setLoading:z,setHasMore:G,setTotalPage:A,title:L})},[_]),d(function(){Ne({endpoint:"notable-characters",page:V,isbn:S,setData:J,setLoading:ee,setHasMore:oe,setTotalPage:ie,title:L})},[V]),d(function(){Ne({endpoint:"geo-locations",page:ue,isbn:S,setData:ce,setLoading:xe,setHasMore:ye,setTotalPage:ke,title:L})},[ue]),r("div",e({ref:Le,className:"book-elements-container"},{children:[r("div",e({style:{marginBottom:"24px"}},{children:[a("p",e({style:y.sectionTitle,className:"book-elements-section-title"},{children:"Notable Quotes"})),r("div",e({style:y.quotesPadding},{children:[W?a("div",e({style:{display:"flex",flexDirection:"column",rowGap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map(function(t){return r("div",e({className:"book-elements-quote-card",style:y.quoteCard},{children:[a(s,{variant:"text",width:"60%",height:28}),a(s,{variant:"text",width:"40%",height:20}),a(s,{variant:"text",width:"25%",height:20}),a(s,{variant:"text",width:"30%",height:20})]}),t)})})):0===E.length?r("p",e({style:{color:"#6B7280",fontStyle:"italic"}},{children:["No notable quotes found. ",a("button",e({style:y.retryButton,onClick:function(){return Ne({endpoint:"notable-quotes",page:_,isbn:S,setData:P,setLoading:z,setHasMore:G,setTotalPage:A,title:L})}},{children:"Retry"}))]})):a(i,{children:E.map(function(o,i){var l="notable"===Ce.list&&Ce.page===_&&Ce.index===i;return r("div",e({className:"book-elements-quote-card",style:e(e({},y.quoteCard),{borderColor:l?"rgb(83, 43, 237)":"#CBD5E1"}),onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},onClick:function(){return t(void 0,void 0,void 0,function(){var e,t;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),we({list:"notable",page:_,index:i}),(null===(t=null==o?void 0:o.chunkIds)||void 0===t?void 0:t.length)>0?[4,C(o.text,"Notable Quotes",o.chunkIds,0)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:return e=n.sent(),console.error("Failed to highlight quote:",e),[3,4];case 4:return[2]}})})},"data-selected":"notable"===Ce.list&&Ce.page===_&&Ce.index===i?"true":void 0},{children:[N&&N.length>0?a("p",{style:y.quoteText,className:"book-elements-quote-text",dangerouslySetInnerHTML:{__html:m(x(null==o?void 0:o.text,N))}}):a("p",e({style:y.quoteText,className:"book-elements-quote-text"},{children:null==o?void 0:o.text})),r("p",e({style:y.quoteMeta,className:"book-elements-quote-meta"},{children:[f(o.chapter,N)," ",a("br",{})," ",f(o.page,N)]})),r("p",e({style:y.quoteAuthor},{children:["— ",f(null==o?void 0:o.author,N)]}))]}),i)})}),a("div",e({className:"book-elements-pagination",style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!j&&a(l,{disabled:W,count:Y,page:_,onChange:function(e,t){return H(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),r("div",e({style:y.geoLocationsContainer},{children:[a("p",e({style:y.sectionTitle,className:"book-elements-section-title"},{children:"Key Geo Locations"})),r("div",e({className:"book-elements-geo-wrapper",style:e(e({},y.quotesPadding),{marginBottom:"8px"})},{children:[he?a("div",e({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map(function(e){return a(s,{variant:"rectangular",width:100,height:20,style:{borderRadius:"8px"}},e)})})):0===se.length?r("p",e({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key geo locations found. ",a("button",e({style:y.retryButton,onClick:function(){return Ne({endpoint:"geo-locations",page:ue,isbn:S,setData:ce,setLoading:xe,setHasMore:ye,setTotalPage:ke,title:L})}},{children:"Retry"}))]})):a(i,{children:se.map(function(o,i){var l="geo_location"===Ce.list&&Ce.page===ue&&Ce.index===i;return r("span",e({"data-selected":"geo_location"===Ce.list&&Ce.page===ue&&Ce.index===i?"true":void 0,style:y.geoLocationFlex},{children:[a("span",e({className:"book-elements-geo-text",style:e(e({},y.geoText),{fontWeight:l?"700":"",textDecoration:l?"underline":""}),onClick:function(){return t(void 0,void 0,void 0,function(){var e,t;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),we({list:"geo_location",page:ue,index:i}),(null===(t=null==o?void 0:o.chunkIds)||void 0===t?void 0:t.length)>0?[4,C(o.name,"Key Geo Locations",o.chunkIds,0)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:return e=n.sent(),console.error("Failed to highlight location:",e),[3,4];case 4:return[2]}})})},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:N&&N.length>0?a("span",{dangerouslySetInnerHTML:{__html:m(x(null==o?void 0:o.name,N))}}):null==o?void 0:o.name})),i<se.length-1&&a("span",{style:y.geoDivider})]}),i)})}),a("div",e({className:"book-elements-pagination",style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!me&&a(l,{disabled:he,count:be,page:ue,onChange:function(e,t){return pe(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),r("div",e({style:y.charactersContainer},{children:[a("p",e({style:y.sectionTitle,className:"book-elements-section-title"},{children:"Key Characters"})),$?a("div",e({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map(function(t){return r("div",e({style:e(e({},y.characterCard),{flexBasis:"40%"})},{children:[a(s,{variant:"circular",style:e(e({},y.avatar),{flexShrink:0})}),r("div",e({style:{display:"flex",flexDirection:"column",flex:1}},{children:[a(s,{variant:"text",style:{flex:"1",flexShrink:0}}),a(s,{variant:"text",style:{flex:"1"}}),a(s,{variant:"text",style:{flex:"1"}}),a(s,{variant:"text",style:{flex:"1"}})]}))]}),t)})})):0===O.length?r("p",e({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key characters found. ",a("button",e({style:y.retryButton,onClick:function(){return Ne({endpoint:"notable-characters",page:V,isbn:S,setData:J,setLoading:ee,setHasMore:oe,setTotalPage:ie,title:L})}},{children:"Retry"}))]})):a(i,{children:a("div",e({className:"book-elements-characters-grid",style:y.charactersGrid},{children:O.map(function(i,l){var s=e(e({},y.avatar),{backgroundColor:i.bg,color:i.color}),c="key_character"===Ce.list&&Ce.page===V&&Ce.index===l;return r("div",e({onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},className:"book-elements-character-card",style:e(e({},y.characterCard),{borderColor:c?"rgb(83, 43, 237)":"#E5E7EB"}),onClick:function(){return t(void 0,void 0,void 0,function(){var e,t;return n(this,function(n){switch(n.label){case 0:we({list:"key_character",page:V,index:l}),n.label=1;case 1:return n.trys.push([1,4,,5]),(null===(t=null==i?void 0:i.chunkIds)||void 0===t?void 0:t.length)>0?[4,C(i.name,"Key Characters",i.chunkIds,0)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[3,5];case 4:return e=n.sent(),console.error("Failed to highlight character:",e),[3,5];case 5:return[2]}})})},"data-selected":"key_character"===Ce.list&&Ce.page===V&&Ce.index===l?"true":void 0},{children:[a("div",e({style:s},{children:i.initials})),r("div",e({style:{display:"flex",flexDirection:"column"}},{children:[a("p",e({className:"book-elements-char-name",style:e(e({},y.charName),{margin:0})},{children:N&&N.length>0?a("span",{dangerouslySetInnerHTML:{__html:m(x(i.name,N))}}):i.name})),a("p",e({className:"book-elements-char-desc",style:e(e({},y.charDesc),{margin:0,marginTop:"4px"})},{children:a(p,e({remarkPlugins:[h],rehypePlugins:[g],components:{p:function(t){t.node;var n=o(t,["node"]);return a("p",e({style:{marginTop:0}},n))}}},{children:f(null==i?void 0:i.description,N)}))}))]}))]}),l)})}))}),a("div",e({className:"book-elements-pagination",style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!ne&&a(l,{count:ae,disabled:$,page:V,onChange:function(e,t){return X(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]}))};export{v as default};
1
+ import{__assign as e,__awaiter as t,__generator as n,__rest as o}from"tslib";import{jsxs as a,jsx as r,Fragment as i}from"react/jsx-runtime";import l from"@mui/material/Pagination";import s from"@mui/material/Skeleton";import{useRef as c,useEffect as d,useState as u}from"react";import p from"react-markdown";import h from"rehype-raw";import g from"remark-breaks";import{highlightTermsFunc as x}from"../utils/highlight.js";import{sanitizeHtml as f}from"../../../utils/sanitizeHtml.js";var m={sectionTitle:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"12px"},quotesPadding:{paddingLeft:"12px"},quoteCard:{border:"1px solid #CBD5E1",borderRadius:"8px",padding:"16px",backgroundColor:"#F8FAFC",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",marginBottom:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},quoteText:{fontStyle:"italic",color:"#475569",fontSize:"14px",fontWeight:400,marginBottom:"12px"},quoteMeta:{color:"#475569",fontSize:"12px",fontWeight:400},quoteAuthor:{fontSize:"10px",fontWeight:600,color:"#475569",marginTop:"8px",marginBottom:"18px"},button:{color:"#5928ED",fontSize:"14px",fontWeight:600,background:"none",border:"none",cursor:"pointer",padding:0,textDecoration:"none",paddingLeft:"12px"},geoLocationsContainer:{marginTop:"24px",marginBottom:"24px"},geoText:{fontSize:"14px",fontWeight:500,cursor:"pointer",color:"#532BED"},geoDivider:{margin:"0 8px",color:"#475abb",backgroundColor:"#475abb",width:"1px",height:"18px",display:"inline-block"},geoLocationFlex:{display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"8px"},charactersContainer:{marginTop:"16px"},charactersGrid:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"16px",marginBottom:"16px",paddingLeft:"12px"},characterCard:{border:"1px solid #E5E7EB",borderRadius:"8px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",display:"flex",alignItems:"flex-start",gap:"12px",padding:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},avatar:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"9999px",fontSize:"14px",fontWeight:600,flexShrink:0},charName:{fontStyle:"normal",fontWeight:600,color:"#101827",fontSize:"16px"},charDesc:{fontStyle:"normal",fontWeight:400,fontSize:"14px",color:"#6B7280"},retryButton:{backgroundColor:"#5928EC",color:"#fff",padding:"6px 10px",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"12px",fontWeight:"500"}},y=function(y){var v,b,k;y.data;var C=y.updateQuotesToHighLight,T=y.handleFetchManuscriptElements,w=y.BookIsbn,S=y.title,L=y.highlightTerms,q=y.onHighlightMatch,N=y.defaultPages;y.citationType;var B=y.citationSubTitle,D=y.highlightEnabled,M=c(!0);d(function(){return function(){M.current=!1}},[]);var E=u([]),_=E[0],P=E[1],F=u(null!==(v=null==N?void 0:N.quotes)&&void 0!==v?v:1),H=F[0],I=F[1],W=u(!1),z=W[0],R=W[1],j=u(!0),G=j[0],K=j[1],Y=u(0),A=Y[0],Q=Y[1],O=u([]),J=O[0],U=O[1],V=u(null!==(b=null==N?void 0:N.characters)&&void 0!==b?b:1),X=V[0],Z=V[1],$=u(!1),ee=$[0],te=$[1],ne=u(!0),oe=ne[0],ae=ne[1],re=u(0),ie=re[0],le=re[1],se=u([]),ce=se[0],de=se[1],ue=u(null!==(k=null==N?void 0:N.locations)&&void 0!==k?k:1),pe=ue[0],he=ue[1],ge=u(!1),xe=ge[0],fe=ge[1],me=u(!0),ye=me[0],ve=me[1],be=u(0),ke=be[0],Ce=be[1],Te=u({list:"",index:-1,page:1}),we=Te[0],Se=Te[1],Le=c(!1),qe=c(null);d(function(){if((null==L?void 0:L.length)&&D){var e=L.map(function(e){return e.toLowerCase()}),t=function(t){return t&&e.some(function(e){return t.toLowerCase().includes(e)})},n=!1;"notable_quotes"==B&&_.forEach(function(e,o){!n&&t(e.text)&&(null==q||q(!0),n=!0)}),"location_details"==B&&ce.forEach(function(e,o){!n&&t(e.name)&&(null==q||q(!0),n=!0)}),"notable_characters"==B&&J.forEach(function(t,o){var a;!n&&((a=t.name)&&e[0]===a.toLowerCase())&&(null==q||q(!0),n=!0)})}},[L,_,ce,J,H,pe,X]),d(function(){N&&(N.quotes&&I(N.quotes),N.locations&&he(N.locations),N.characters&&Z(N.characters))},[N]),d(function(){Le.current=!1},[L]);var Ne=function(e){var o=e.endpoint,a=e.page,r=e.isbn,i=e.setData,l=e.setLoading,s=e.setHasMore,c=e.setTotalPage,d=e.title;return t(void 0,void 0,void 0,function(){var e,t,u,p;return n(this,function(n){switch(n.label){case 0:l(!0),n.label=1;case 1:return n.trys.push([1,,3,4]),[4,T({endpoint:o,page:a,pageSize:10,isbn:r,title:d})];case 2:return e=n.sent(),M.current?(i((null==e?void 0:e.data)||[]),c((null===(t=null==e?void 0:e.pagination)||void 0===t?void 0:t.totalPages)||0),s(!(null===(u=null==e?void 0:e.pagination)||void 0===u?void 0:u.hasNext)&&!(null===(p=null==e?void 0:e.pagination)||void 0===p?void 0:p.hasPrevious)),[3,4]):[2];case 3:return M.current&&l(!1),[7];case 4:return[2]}})})};return d(function(){Ne({endpoint:"notable-quotes",page:H,isbn:w,setData:P,setLoading:R,setHasMore:K,setTotalPage:Q,title:S})},[H]),d(function(){Ne({endpoint:"notable-characters",page:X,isbn:w,setData:U,setLoading:te,setHasMore:ae,setTotalPage:le,title:S})},[X]),d(function(){Ne({endpoint:"geo-locations",page:pe,isbn:w,setData:de,setLoading:fe,setHasMore:ve,setTotalPage:Ce,title:S})},[pe]),a("div",e({ref:qe,className:"book-elements-container"},{children:[a("div",e({style:{marginBottom:"24px"}},{children:[r("p",e({style:m.sectionTitle,className:"book-elements-section-title"},{children:"Notable Quotes"})),a("div",e({style:m.quotesPadding},{children:[z?r("div",e({style:{display:"flex",flexDirection:"column",rowGap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map(function(t){return a("div",e({className:"book-elements-quote-card",style:m.quoteCard},{children:[r(s,{variant:"text",width:"60%",height:28}),r(s,{variant:"text",width:"40%",height:20}),r(s,{variant:"text",width:"25%",height:20}),r(s,{variant:"text",width:"30%",height:20})]}),t)})})):0===_.length?a("p",e({style:{color:"#6B7280",fontStyle:"italic"}},{children:["No notable quotes found. ",r("button",e({style:m.retryButton,onClick:function(){return Ne({endpoint:"notable-quotes",page:H,isbn:w,setData:P,setLoading:R,setHasMore:K,setTotalPage:Q,title:S})}},{children:"Retry"}))]})):r(i,{children:_.map(function(o,i){var l="notable"===we.list&&we.page===H&&we.index===i;return a("div",e({className:"book-elements-quote-card",style:e(e({},m.quoteCard),{borderColor:l?"rgb(83, 43, 237)":"#CBD5E1"}),onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},onClick:function(){return t(void 0,void 0,void 0,function(){var e,t;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),Se({list:"notable",page:H,index:i}),(null===(t=null==o?void 0:o.chunkIds)||void 0===t?void 0:t.length)>0?[4,C(o.text,"Notable Quotes",o.chunkIds,0)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:return e=n.sent(),console.error("Failed to highlight quote:",e),[3,4];case 4:return[2]}})})},"data-selected":"notable"===we.list&&we.page===H&&we.index===i?"true":void 0},{children:[L&&L.length>0&&"notable_quotes"==B&&D?r("p",{style:m.quoteText,className:"book-elements-quote-text",dangerouslySetInnerHTML:{__html:f(x(null==o?void 0:o.text,L))}}):r("p",e({style:m.quoteText,className:"book-elements-quote-text"},{children:null==o?void 0:o.text})),a("p",e({style:m.quoteMeta,className:"book-elements-quote-meta"},{children:[o.chapter,r("br",{}),o.page]})),a("p",e({style:m.quoteAuthor},{children:["— ",null==o?void 0:o.author]}))]}),i)})}),r("div",e({className:"book-elements-pagination",style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!G&&r(l,{disabled:z,count:A,page:H,onChange:function(e,t){return I(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),a("div",e({style:m.geoLocationsContainer},{children:[r("p",e({style:m.sectionTitle,className:"book-elements-section-title"},{children:"Key Geo Locations"})),a("div",e({className:"book-elements-geo-wrapper",style:e(e({},m.quotesPadding),{marginBottom:"8px"})},{children:[xe?r("div",e({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map(function(e){return r(s,{variant:"rectangular",width:100,height:20,style:{borderRadius:"8px"}},e)})})):0===ce.length?a("p",e({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key geo locations found. ",r("button",e({style:m.retryButton,onClick:function(){return Ne({endpoint:"geo-locations",page:pe,isbn:w,setData:de,setLoading:fe,setHasMore:ve,setTotalPage:Ce,title:S})}},{children:"Retry"}))]})):r(i,{children:ce.map(function(o,i){var l="geo_location"===we.list&&we.page===pe&&we.index===i;return a("span",e({"data-selected":"geo_location"===we.list&&we.page===pe&&we.index===i?"true":void 0,style:m.geoLocationFlex},{children:[r("span",e({className:"book-elements-geo-text",style:e(e({},m.geoText),{fontWeight:l?"700":"",textDecoration:l?"underline":""}),onClick:function(){return t(void 0,void 0,void 0,function(){var e,t;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),Se({list:"geo_location",page:pe,index:i}),(null===(t=null==o?void 0:o.chunkIds)||void 0===t?void 0:t.length)>0?[4,C(o.name,"Key Geo Locations",o.chunkIds,0)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:return e=n.sent(),console.error("Failed to highlight location:",e),[3,4];case 4:return[2]}})})},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:L&&L.length>0&&"location_details"==B&&D?r("span",{dangerouslySetInnerHTML:{__html:f(x(null==o?void 0:o.name,L))}}):null==o?void 0:o.name})),i<ce.length-1&&r("span",{style:m.geoDivider})]}),i)})}),r("div",e({className:"book-elements-pagination",style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!ye&&r(l,{disabled:xe,count:ke,page:pe,onChange:function(e,t){return he(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),a("div",e({style:m.charactersContainer},{children:[r("p",e({style:m.sectionTitle,className:"book-elements-section-title"},{children:"Key Characters"})),ee?r("div",e({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map(function(t){return a("div",e({style:e(e({},m.characterCard),{flexBasis:"40%"})},{children:[r(s,{variant:"circular",style:e(e({},m.avatar),{flexShrink:0})}),a("div",e({style:{display:"flex",flexDirection:"column",flex:1}},{children:[r(s,{variant:"text",style:{flex:"1",flexShrink:0}}),r(s,{variant:"text",style:{flex:"1"}}),r(s,{variant:"text",style:{flex:"1"}}),r(s,{variant:"text",style:{flex:"1"}})]}))]}),t)})})):0===J.length?a("p",e({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key characters found. ",r("button",e({style:m.retryButton,onClick:function(){return Ne({endpoint:"notable-characters",page:X,isbn:w,setData:U,setLoading:te,setHasMore:ae,setTotalPage:le,title:S})}},{children:"Retry"}))]})):r(i,{children:r("div",e({className:"book-elements-characters-grid",style:m.charactersGrid},{children:J.map(function(i,l){var s=e(e({},m.avatar),{backgroundColor:i.bg,color:i.color}),c="key_character"===we.list&&we.page===X&&we.index===l;return a("div",e({onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},className:"book-elements-character-card",style:e(e({},m.characterCard),{borderColor:c?"rgb(83, 43, 237)":"#E5E7EB"}),onClick:function(){return t(void 0,void 0,void 0,function(){var e,t;return n(this,function(n){switch(n.label){case 0:Se({list:"key_character",page:X,index:l}),n.label=1;case 1:return n.trys.push([1,4,,5]),(null===(t=null==i?void 0:i.chunkIds)||void 0===t?void 0:t.length)>0?[4,C(i.name,"Key Characters",i.chunkIds,0)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[3,5];case 4:return e=n.sent(),console.error("Failed to highlight character:",e),[3,5];case 5:return[2]}})})},"data-selected":"key_character"===we.list&&we.page===X&&we.index===l?"true":void 0},{children:[r("div",e({style:s},{children:i.initials})),a("div",e({style:{display:"flex",flexDirection:"column"}},{children:[r("p",e({className:"book-elements-char-name",style:e(e({},m.charName),{margin:0})},{children:L&&L.length>0&&"notable_characters"==B&&i.name.toLowerCase()===L[0].toLowerCase()&&D?r("span",{dangerouslySetInnerHTML:{__html:f(x(i.name,L))}}):i.name})),r("p",e({className:"book-elements-char-desc",style:e(e({},m.charDesc),{margin:0,marginTop:"4px"})},{children:r(p,e({remarkPlugins:[g],rehypePlugins:[h],components:{p:function(t){t.node;var n=o(t,["node"]);return r("p",e({style:{marginTop:0}},n))}}},{children:null==i?void 0:i.description}))}))]}))]}),l)})}))}),r("div",e({className:"book-elements-pagination",style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!oe&&r(l,{count:ie,disabled:ee,page:X,onChange:function(e,t){return Z(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]}))};export{y as default};
2
2
  //# sourceMappingURL=BookElementsCard.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__rest as t}from"tslib";import{jsxs as n,jsx as l,Fragment as o}from"react/jsx-runtime";import{useState as i,useRef as r,useLayoutEffect as a,useEffect as d}from"react";import c from"react-markdown";import u from"remark-breaks";import s from"rehype-raw";import{highlightTermsFunc as p,processTextWithHighlight as m}from"../utils/highlight.js";import{sanitizeHtml as h}from"../../../utils/sanitizeHtml.js";var g={card:{border:"2px solid #E5E7EB",backgroundColor:"#FFFFFF",borderRadius:"12px",padding:"24px"},title:{fontSize:"16px",fontWeight:"bold",marginBottom:"24px"},grid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(110px, 1fr))",gap:"24px",marginBottom:"24px"},gridItem:{backgroundColor:"#F8FAFC",border:"1px solid #DFE5EC",borderRadius:"8px",padding:"12px 8px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"12px"},gridItemHeight:{height:"50px"},label:{fontSize:"14px",fontWeight:400,color:"#64748B",margin:0},value:{fontWeight:"bold",fontSize:"14px",color:"#434C55",margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"120px"},section:{marginBottom:"12px",padding:"8px 12px",borderRadius:"8px",border:"1px solid #DEE4EB"},sectionLabel:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"8px",whiteSpace:"pre-line"},summaryText:{marginTop:"0px"},sectionText:{fontSize:"16px",fontWeight:400,lineHeight:"1.625",color:"#64748B",marginBottom:"8px"},button:{color:"#5928ED",fontSize:"14px",fontWeight:600,background:"none",border:"none",cursor:"pointer",padding:0,textDecoration:"none"},lineClamp:{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden"},container:{fontFamily:"Inter, sans-serif",color:"#434C54",marginBottom:"8px"},partContainer:{marginBottom:"8px"},partTitle:{fontSize:"16px",fontWeight:"600",marginBottom:"10px"},chapterList:{listStyle:"none",paddingLeft:"20px",margin:0},chapterItem:{marginBottom:"6px"},chapterLink:{textDecoration:"none",color:"#63748A",fontSize:"16px",lineHeight:"1.5"},chapterLinkHover:{textDecoration:"underline"},singleChapter:{marginBottom:"4px",fontSize:"16px"},chapterNumber:{color:"#63748A"}},v=function(v){var f,y,b,x,k,T,C,S,N,L,B,w,I,D,M,_=v.data,H=v.highlightTerms,O=v.onHighlightMatch,A=i(!1),z=A[0],F=A[1],W=i(!1),E=W[0],P=W[1],V=i(!1),j=V[0],R=V[1],q=i(!1),G=q[0],J=q[1],K=r(null),Q=r(null),U=(null==_?void 0:_.tableOfContent)&&_.tableOfContent.every(function(e){return!e.title||""===e.title.trim()}),X=null===(x=null===(b=null===(y=null===(f=null==_?void 0:_.bookDescription)||void 0===f?void 0:f.replace(/display:\s*-webkit-box;?/g,""))||void 0===y?void 0:y.replace(/-webkit-line-clamp:\s*\d+;?/g,""))||void 0===b?void 0:b.replace(/-webkit-box-orient:\s*vertical;?/g,""))||void 0===x?void 0:x.replace(/overflow:\s*hidden;?/g,""),Y=function(e){return null!=e?String(e):""};return a(function(){if(K.current){var e=K.current.scrollHeight>K.current.clientHeight;J(e)}},[null==_?void 0:_.bookDescription,E]),d(function(){var e;if(null==H?void 0:H.length){var t=H.map(function(e){return e.toLowerCase()}),n=function(e){return e&&t.some(function(t){return e.toLowerCase().includes(t)})},l=n(_.title),o=n(_.author),i=n(_.bookDescription),r=n(_.summary),a=n(Y(null==_?void 0:_.totalSectionCount)),d=n(Y(null==_?void 0:_.totalPages)),c=n(_.readingTime),u=null===(e=null==_?void 0:_.tableOfContent)||void 0===e?void 0:e.some(function(e){var t;return n(null==e?void 0:e.title)||(null===(t=null==e?void 0:e.children)||void 0===t?void 0:t.some(function(e){return n(null==e?void 0:e.title)}))}),s=l||o||i||r||a||d||c||u;null==O||O(s),s&&(i&&P(!0),r&&F(!0),u&&R(!0))}},[H,_]),n("div",e({ref:Q,style:g.card,className:"book-card-container"},{children:[n("div",e({style:g.grid,className:"book-card-grid"},{children:[n("div",e({style:g.gridItem},{children:[l("p",e({style:g.label},{children:"Book Title"})),H&&H.length>0?l("p",{style:g.value,className:"book-card-value",title:null==_?void 0:_.title,dangerouslySetInnerHTML:{__html:h(p(null!==(k=null==_?void 0:_.title)&&void 0!==k?k:"NA",H))}}):l("p",e({style:g.value,className:"book-card-value",title:null==_?void 0:_.title},{children:null!==(T=null==_?void 0:_.title)&&void 0!==T?T:"NA"}))]})),n("div",e({style:g.gridItem},{children:[l("p",e({style:g.label},{children:"Book Author"})),H&&H.length>0?l("p",{style:g.value,className:"book-card-value",title:null==_?void 0:_.author,dangerouslySetInnerHTML:{__html:h(p(null!==(C=null==_?void 0:_.author)&&void 0!==C?C:"NA",H))}}):l("p",e({style:g.value,className:"book-card-value",title:null==_?void 0:_.author},{children:null!==(S=null==_?void 0:_.author)&&void 0!==S?S:"NA"}))]})),n("div",e({style:g.gridItem},{children:[l("p",e({style:g.label},{children:"Total Sections"})),H&&H.length>0?l("p",{style:g.value,className:"book-card-value",dangerouslySetInnerHTML:{__html:h(p(null!==(N=String(null==_?void 0:_.totalSectionCount))&&void 0!==N?N:"NA",H))}}):l("p",e({style:g.value,className:"book-card-value"},{children:null!==(L=null==_?void 0:_.totalSectionCount)&&void 0!==L?L:"NA"}))]})),n("div",e({style:g.gridItem},{children:[l("p",e({style:g.label},{children:"Total Pages"})),H&&H.length>0?l("p",{style:g.value,className:"book-card-value",dangerouslySetInnerHTML:{__html:h(p(String(null!==(B=null==_?void 0:_.totalPages)&&void 0!==B?B:"NA"),H))}}):l("p",e({style:g.value,className:"book-card-value"},{children:null!==(w=null==_?void 0:_.totalPages)&&void 0!==w?w:"NA"}))]})),n("div",e({style:g.gridItem},{children:[l("p",e({style:g.label},{children:"Reading Time"})),H&&H.length>0?l("p",{style:g.value,className:"book-card-value",dangerouslySetInnerHTML:{__html:h(p(String(null!==(I=null==_?void 0:_.readingTime)&&void 0!==I?I:"NA"),H))}}):l("p",e({style:g.value,className:"book-card-value"},{children:null!==(D=null==_?void 0:_.readingTime)&&void 0!==D?D:"NA"}))]}))]})),(null==_?void 0:_.bookDescription)&&(null==_?void 0:_.bookDescription.length)>0&&n("div",e({style:g.section,className:"book-card-section"},{children:[l("p",e({style:g.sectionLabel},{children:"Book Description"})),l("div",e({ref:K,className:"book-card-section-text",style:e(e(e({},g.sectionText),g.summaryText),E?{}:g.lineClamp)},{children:l("div",{dangerouslySetInnerHTML:{__html:H&&H.length>0?h(p(X||"",H)):X}})})),(G||E)&&l("button",e({style:e(e({},g.button),{marginBottom:"10px"}),onClick:function(){return P(function(e){return!e})},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:E?"View Less":"View More"}))]})),n("div",e({style:g.section,className:"book-card-section"},{children:[l("p",e({style:g.sectionLabel},{children:"AI Book Summary"})),l("p",e({className:"book-card-section-text",style:e(e({},g.sectionText),z?{}:g.lineClamp)},{children:l(c,e({remarkPlugins:[u],rehypePlugins:[s],components:{p:function(n){n.node;var o=t(n,["node"]);return l("p",e({style:{marginTop:"0"}},o))}}},{children:m(null==_?void 0:_.summary,H)}))})),(null==_?void 0:_.summary)&&(null==_?void 0:_.summary.length)>0&&l("button",e({style:e(e({},g.button),{marginBottom:"10px"}),onClick:function(){return F(function(e){return!e})},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:z?"View Less":"View More"}))]})),n("div",e({style:e(e({},g.section),{marginTop:"10px"})},{children:[l("p",e({style:e(e({},g.sectionLabel),{marginBottom:"18px"})},{children:"Table Of Content"})),l("div",e({style:e(e({},g.container),j?{}:g.lineClamp)},{children:(null==_?void 0:_.tableOfContent)&&!U?null===(M=null==_?void 0:_.tableOfContent)||void 0===M?void 0:M.map(function(t,i){return l("div",e({style:g.partContainer},{children:t.children?n(o,{children:[l("p",{style:g.partTitle,className:"book-card-part-title",dangerouslySetInnerHTML:{__html:H&&H.length>0?h(p(t.title,H)):t.title}}),l("ul",e({style:g.chapterList},{children:t.children.map(function(t,n){return l("li",e({style:g.chapterItem},{children:l("span",{style:g.chapterLink,className:"book-card-chapter-link",dangerouslySetInnerHTML:{__html:H&&H.length>0?h(p(t.title,H)):t.title}})}),n)})}))]}):l("div",e({style:g.singleChapter},{children:l("span",{style:g.chapterLink,className:"book-card-chapter-link",dangerouslySetInnerHTML:{__html:H&&H.length>0?h(p(t.title,H)):t.title}})}))}),i)}):l("p",e({style:{fontStyle:"italic",fontSize:"16px",color:"#6B7280",margin:"8px 0"}},{children:"Table of Contents not found for this book."}))})),(null==_?void 0:_.tableOfContent)&&!U&&(null==_?void 0:_.tableOfContent.length)>0&&l("button",e({style:e(e({},g.button),{marginBottom:"10px"}),onClick:function(){return R(function(e){return!e})},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:j?"View Less":"View More"}))]}))]}))};export{v as default};
1
+ import{__assign as e,__rest as t}from"tslib";import{jsxs as n,jsx as l,Fragment as o}from"react/jsx-runtime";import{useState as i,useRef as r,useLayoutEffect as a,useEffect as d}from"react";import c from"react-markdown";import u from"remark-breaks";import s from"rehype-raw";import{highlightTermsFunc as p,processTextWithHighlight as m}from"../utils/highlight.js";import{sanitizeHtml as h}from"../../../utils/sanitizeHtml.js";var g={card:{border:"2px solid #E5E7EB",backgroundColor:"#FFFFFF",borderRadius:"12px",padding:"24px"},title:{fontSize:"16px",fontWeight:"bold",marginBottom:"24px"},grid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(110px, 1fr))",gap:"24px",marginBottom:"24px"},gridItem:{backgroundColor:"#F8FAFC",border:"1px solid #DFE5EC",borderRadius:"8px",padding:"12px 8px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"12px"},gridItemHeight:{height:"50px"},label:{fontSize:"14px",fontWeight:400,color:"#64748B",margin:0},value:{fontWeight:"bold",fontSize:"14px",color:"#434C55",margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"120px"},section:{marginBottom:"12px",padding:"8px 12px",borderRadius:"8px",border:"1px solid #DEE4EB"},sectionLabel:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"8px",whiteSpace:"pre-line"},summaryText:{marginTop:"0px"},sectionText:{fontSize:"16px",fontWeight:400,lineHeight:"1.625",color:"#64748B",marginBottom:"8px"},button:{color:"#5928ED",fontSize:"14px",fontWeight:600,background:"none",border:"none",cursor:"pointer",padding:0,textDecoration:"none"},lineClamp:{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden"},container:{fontFamily:"Inter, sans-serif",color:"#434C54",marginBottom:"8px"},partContainer:{marginBottom:"8px"},partTitle:{fontSize:"16px",fontWeight:"600",marginBottom:"10px"},chapterList:{listStyle:"none",paddingLeft:"20px",margin:0},chapterItem:{marginBottom:"6px"},chapterLink:{textDecoration:"none",color:"#63748A",fontSize:"16px",lineHeight:"1.5"},chapterLinkHover:{textDecoration:"underline"},singleChapter:{marginBottom:"4px",fontSize:"16px"},chapterNumber:{color:"#63748A"}},v=function(v){var f,b,y,x,k,T,C,S,N,L,B,w,I,D,M,_=v.data,H=v.highlightTerms,O=v.onHighlightMatch,A=v.highlightEnabled,z=i(!1),F=z[0],E=z[1],W=i(!1),P=W[0],V=W[1],j=i(!1),R=j[0],q=j[1],G=i(!1),J=G[0],K=G[1],Q=r(null),U=r(null),X=(null==_?void 0:_.tableOfContent)&&_.tableOfContent.every(function(e){return!e.title||""===e.title.trim()}),Y=null===(x=null===(y=null===(b=null===(f=null==_?void 0:_.bookDescription)||void 0===f?void 0:f.replace(/display:\s*-webkit-box;?/g,""))||void 0===b?void 0:b.replace(/-webkit-line-clamp:\s*\d+;?/g,""))||void 0===y?void 0:y.replace(/-webkit-box-orient:\s*vertical;?/g,""))||void 0===x?void 0:x.replace(/overflow:\s*hidden;?/g,""),Z=function(e){return null!=e?String(e):""};return a(function(){if(Q.current){var e=Q.current.scrollHeight>Q.current.clientHeight;K(e)}},[null==_?void 0:_.bookDescription,P]),d(function(){var e;if((null==H?void 0:H.length)&&A){var t=H.map(function(e){return e.toLowerCase()}),n=function(e){return e&&t.some(function(t){return e.toLowerCase().includes(t)})},l=n(_.title),o=n(_.author),i=n(_.bookDescription),r=n(_.summary),a=n(Z(null==_?void 0:_.totalSectionCount)),d=n(Z(null==_?void 0:_.totalPages)),c=n(_.readingTime),u=null===(e=null==_?void 0:_.tableOfContent)||void 0===e?void 0:e.some(function(e){var t;return n(null==e?void 0:e.title)||(null===(t=null==e?void 0:e.children)||void 0===t?void 0:t.some(function(e){return n(null==e?void 0:e.title)}))}),s=l||o||i||r||a||d||c||u;null==O||O(s),s&&(i&&V(!0),r&&E(!0),u&&q(!0))}},[H,_]),n("div",e({ref:U,style:g.card,className:"book-card-container"},{children:[n("div",e({style:g.grid,className:"book-card-grid"},{children:[n("div",e({style:g.gridItem},{children:[l("p",e({style:g.label},{children:"Book Title"})),H&&H.length>0&&A?l("p",{style:g.value,className:"book-card-value",title:null==_?void 0:_.title,dangerouslySetInnerHTML:{__html:h(p(null!==(k=null==_?void 0:_.title)&&void 0!==k?k:"NA",H))}}):l("p",e({style:g.value,className:"book-card-value",title:null==_?void 0:_.title},{children:null!==(T=null==_?void 0:_.title)&&void 0!==T?T:"NA"}))]})),n("div",e({style:g.gridItem},{children:[l("p",e({style:g.label},{children:"Book Author"})),H&&H.length>0&&A?l("p",{style:g.value,className:"book-card-value",title:null==_?void 0:_.author,dangerouslySetInnerHTML:{__html:h(p(null!==(C=null==_?void 0:_.author)&&void 0!==C?C:"NA",H))}}):l("p",e({style:g.value,className:"book-card-value",title:null==_?void 0:_.author},{children:null!==(S=null==_?void 0:_.author)&&void 0!==S?S:"NA"}))]})),n("div",e({style:g.gridItem},{children:[l("p",e({style:g.label},{children:"Total Sections"})),H&&H.length>0&&A?l("p",{style:g.value,className:"book-card-value",dangerouslySetInnerHTML:{__html:h(p(null!==(N=String(null==_?void 0:_.totalSectionCount))&&void 0!==N?N:"NA",H))}}):l("p",e({style:g.value,className:"book-card-value"},{children:null!==(L=null==_?void 0:_.totalSectionCount)&&void 0!==L?L:"NA"}))]})),n("div",e({style:g.gridItem},{children:[l("p",e({style:g.label},{children:"Total Pages"})),H&&H.length>0&&A?l("p",{style:g.value,className:"book-card-value",dangerouslySetInnerHTML:{__html:h(p(String(null!==(B=null==_?void 0:_.totalPages)&&void 0!==B?B:"NA"),H))}}):l("p",e({style:g.value,className:"book-card-value"},{children:null!==(w=null==_?void 0:_.totalPages)&&void 0!==w?w:"NA"}))]})),n("div",e({style:g.gridItem},{children:[l("p",e({style:g.label},{children:"Reading Time"})),H&&H.length>0&&A?l("p",{style:g.value,className:"book-card-value",dangerouslySetInnerHTML:{__html:h(p(String(null!==(I=null==_?void 0:_.readingTime)&&void 0!==I?I:"NA"),H))}}):l("p",e({style:g.value,className:"book-card-value"},{children:null!==(D=null==_?void 0:_.readingTime)&&void 0!==D?D:"NA"}))]}))]})),(null==_?void 0:_.bookDescription)&&(null==_?void 0:_.bookDescription.length)>0&&n("div",e({style:g.section,className:"book-card-section"},{children:[l("p",e({style:g.sectionLabel},{children:"Book Description"})),l("div",e({ref:Q,className:"book-card-section-text",style:e(e(e({},g.sectionText),g.summaryText),P?{}:g.lineClamp)},{children:l("div",{dangerouslySetInnerHTML:{__html:H&&H.length>0&&A?h(p(Y||"",H)):Y}})})),(J||P)&&l("button",e({style:e(e({},g.button),{marginBottom:"10px"}),onClick:function(){return V(function(e){return!e})},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:P?"View Less":"View More"}))]})),n("div",e({style:g.section,className:"book-card-section"},{children:[l("p",e({style:g.sectionLabel},{children:"AI Book Summary"})),l("p",e({className:"book-card-section-text",style:e(e({},g.sectionText),F?{}:g.lineClamp)},{children:l(c,e({remarkPlugins:[u],rehypePlugins:[s],components:{p:function(n){n.node;var o=t(n,["node"]);return l("p",e({style:{marginTop:"0"}},o))}}},{children:m(null==_?void 0:_.summary,H)}))})),(null==_?void 0:_.summary)&&(null==_?void 0:_.summary.length)>0&&l("button",e({style:e(e({},g.button),{marginBottom:"10px"}),onClick:function(){return E(function(e){return!e})},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:F?"View Less":"View More"}))]})),n("div",e({style:e(e({},g.section),{marginTop:"10px"})},{children:[l("p",e({style:e(e({},g.sectionLabel),{marginBottom:"18px"})},{children:"Table Of Content"})),l("div",e({style:e(e({},g.container),R?{}:g.lineClamp)},{children:(null==_?void 0:_.tableOfContent)&&!X?null===(M=null==_?void 0:_.tableOfContent)||void 0===M?void 0:M.map(function(t,i){return l("div",e({style:g.partContainer},{children:t.children?n(o,{children:[l("p",{style:g.partTitle,className:"book-card-part-title",dangerouslySetInnerHTML:{__html:H&&H.length>0&&A?h(p(t.title,H)):t.title}}),l("ul",e({style:g.chapterList},{children:t.children.map(function(t,n){return l("li",e({style:g.chapterItem},{children:l("span",{style:g.chapterLink,className:"book-card-chapter-link",dangerouslySetInnerHTML:{__html:H&&H.length>0&&A?h(p(t.title,H)):t.title}})}),n)})}))]}):l("div",e({style:g.singleChapter},{children:l("span",{style:g.chapterLink,className:"book-card-chapter-link",dangerouslySetInnerHTML:{__html:H&&H.length>0&&A?h(p(t.title,H)):t.title}})}))}),i)}):l("p",e({style:{fontStyle:"italic",fontSize:"16px",color:"#6B7280",margin:"8px 0"}},{children:"Table of Contents not found for this book."}))})),(null==_?void 0:_.tableOfContent)&&!X&&(null==_?void 0:_.tableOfContent.length)>0&&l("button",e({style:e(e({},g.button),{marginBottom:"10px"}),onClick:function(){return q(function(e){return!e})},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:R?"View Less":"View More"}))]}))]}))};export{v as default};
2
2
  //# sourceMappingURL=BookOverviewCard.js.map
@@ -1,2 +1,2 @@
1
- import{__spreadArray as e,__assign as l}from"tslib";import{jsxs as n,jsx as o,Fragment as t}from"react/jsx-runtime";import{useRef as i,useEffect as r}from"react";import{highlightTermsFunc as a}from"../utils/highlight.js";import{sanitizeHtml as d}from"../../../utils/sanitizeHtml.js";var p={sectionTitle:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"12px"},card:{backgroundColor:"#ECEEF1",padding:"8px 12px",fontWeight:500,fontSize:"14px",borderRadius:"4px",color:"#64748B",maxWidth:"100%",wordBreak:"break-word",marginBottom:"24px",width:"fit-content"},tag:{padding:"4px 12px",fontSize:"14px",fontWeight:500,color:"#3B82F6",backgroundColor:"#F3F8FF",borderRadius:"6px"},avatar:{display:"flex",alignItems:"center",justifyContent:"center",height:"35px",width:"35px",borderRadius:"50%",backgroundColor:"#E5E7EB",color:"#4B5563",fontWeight:600,flexShrink:0,fontSize:"12px"},contributorName:{fontWeight:600,color:"#111827",marginTop:"8px",fontSize:"14px"},contributorRole:{fontSize:"12px",color:"#6B7280"},grid:{display:"grid",gridTemplateColumns:"repeat(4, minmax(0, 1fr))",gap:"24px",marginBottom:"24px",padding:"0 12px"},awardMeta:{fontSize:"14px",color:"#4B5563"},awardDesc:{fontSize:"14px",color:"#4B5563"},awardContainer:{display:"flex",gap:"8px"},awardInfo:{backgroundColor:"#ECEEF1",padding:"8px 12px",fontWeight:600,fontSize:"12px",borderRadius:"4px",color:"#434C54",maxWidth:"100%",wordBreak:"break-word",width:"fit-content"},listContainerWrapper:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"30px",marginBottom:"24px"},awardContainerWrapper:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"16px"}},s=function(s){var c,u,m,v=s.data,g=s.highlightTerms,h=s.onHighlightMatch,f=v.publisher,x=v.contributors,y=v.awards,b=void 0===y?[]:y,w=i(null),k=function(e){var l=e.trim().split(/\s+/).map(function(e){var l;return null===(l=e[0])||void 0===l?void 0:l.toUpperCase()}).join("");return l.length>3?"".concat(l.slice(0,3)):l};return r(function(){var l,n,o,t,i,r,a,d,p,s,c,u;if(g&&0!==g.length){var m=e(e(e(e([null!==(n=null===(l=v.publisher)||void 0===l?void 0:l.name)&&void 0!==n?n:""],null!==(t=null===(o=v.publisher)||void 0===o?void 0:o.tags)&&void 0!==t?t:[],!0),null!==(a=null===(r=null===(i=v.contributors)||void 0===i?void 0:i.primary)||void 0===r?void 0:r.flatMap(function(l){var n;return e([l.name,l.role],null!==(n=l.tags)&&void 0!==n?n:[],!0)}))&&void 0!==a?a:[],!0),null!==(s=null===(p=null===(d=v.contributors)||void 0===d?void 0:d.additional)||void 0===p?void 0:p.flatMap(function(l){var n;return e([l.name,l.role],null!==(n=l.tags)&&void 0!==n?n:[],!0)}))&&void 0!==s?s:[],!0),null!==(u=null===(c=v.awards)||void 0===c?void 0:c.flatMap(function(e){return[e.title,e.org,String(e.year),e.country]}))&&void 0!==u?u:[],!0).some(function(e){return!!e&&g.some(function(l){return e.toLowerCase().includes(l.toLowerCase())})});null==h||h(m)}},[g,v]),n("div",l({ref:w,className:"book-people-container"},{children:[o("p",l({style:p.sectionTitle,className:"book-people-section-title"},{children:"Publishers"})),n("div",l({style:p.card,className:"book-people-card"},{children:[o("span",l({style:{color:"rgb(67, 76, 85)"}},{children:g&&g.length>0?o("span",{dangerouslySetInnerHTML:{__html:d(a(f.name,g))}}):f.name})),(null==f?void 0:f.tags)&&(null==f?void 0:f.tags.length)>0&&o("div",l({style:{display:"flex",gap:"8px",marginTop:"18px"}},{children:null===(c=null==f?void 0:f.tags)||void 0===c?void 0:c.map(function(e,n){return o("span",l({style:p.tag},{children:g&&g.length>0?o("span",{dangerouslySetInnerHTML:{__html:d(a(e,g))}}):e}),n)})}))]})),o("p",l({style:p.sectionTitle,className:"book-people-section-title"},{children:"Contributors"})),o("div",l({style:p.listContainerWrapper,className:"book-people-list-wrapper"},{children:null===(u=null==x?void 0:x.primary)||void 0===u?void 0:u.map(function(e,t){var i;return n("div",l({style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},{children:[o("div",l({style:p.avatar,className:"book-people-avatar"},{children:k(null==e?void 0:e.name)})),o("span",l({style:p.contributorName,className:"book-people-name"},{children:g&&g.length>0?o("span",{dangerouslySetInnerHTML:{__html:d(a(null==e?void 0:e.name,g))}}):null==e?void 0:e.name})),o("span",l({style:p.contributorRole,className:"book-people-role"},{children:g&&g.length>0?o("span",{dangerouslySetInnerHTML:{__html:d(a(null==e?void 0:e.role,g))}}):null==e?void 0:e.role})),o("div",l({style:{display:"flex",gap:"8px",marginTop:"8px"}},{children:null===(i=null==e?void 0:e.tags)||void 0===i?void 0:i.map(function(e,n){return o("span",l({style:p.tag},{children:g&&g.length>0?o("span",{dangerouslySetInnerHTML:{__html:d(a(e,g))}}):e}),n)})}))]}),t)})})),x.additional&&x.additional.length>0&&n(t,{children:[o("p",l({style:p.sectionTitle,className:"book-people-section-title"},{children:"Additional Contributors"})),o("div",l({style:p.listContainerWrapper,className:"book-people-list-wrapper"},{children:null===(m=null==x?void 0:x.additional)||void 0===m?void 0:m.map(function(e,t){return n("div",l({style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},{children:[o("div",l({style:p.avatar,className:"book-people-avatar"},{children:k(null==e?void 0:e.name)})),o("span",l({style:p.contributorName,className:"book-people-name"},{children:g&&g.length>0?o("span",{dangerouslySetInnerHTML:{__html:d(a(null==e?void 0:e.name,g))}}):null==e?void 0:e.name})),o("span",l({style:p.contributorRole,className:"book-people-role"},{children:g&&g.length>0?o("span",{dangerouslySetInnerHTML:{__html:d(a(null==e?void 0:e.role,g))}}):null==e?void 0:e.role}))]}),t)})}))]}),b.length>0&&n(t,{children:[o("p",l({style:p.sectionTitle,className:"book-people-section-title"},{children:"Awards"})),o("div",l({style:p.awardContainerWrapper,className:"book-people-award-wrapper"},{children:null==b?void 0:b.map(function(e,n){return o("div",l({style:p.awardInfo},{children:o("span",{children:g&&g.length>0?o("span",{dangerouslySetInnerHTML:{__html:d(a(null==e?void 0:e.title,g))}}):null==e?void 0:e.title})}),n)})}))]})]}))};export{s as default};
1
+ import{__spreadArray as e,__assign as l}from"tslib";import{jsxs as n,jsx as o,Fragment as t}from"react/jsx-runtime";import{useRef as i,useEffect as r}from"react";import{highlightTermsFunc as a}from"../utils/highlight.js";import{sanitizeHtml as d}from"../../../utils/sanitizeHtml.js";var p={sectionTitle:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"12px"},card:{backgroundColor:"#ECEEF1",padding:"8px 12px",fontWeight:500,fontSize:"14px",borderRadius:"4px",color:"#64748B",maxWidth:"100%",wordBreak:"break-word",marginBottom:"24px",width:"fit-content"},tag:{padding:"4px 12px",fontSize:"14px",fontWeight:500,color:"#3B82F6",backgroundColor:"#F3F8FF",borderRadius:"6px"},avatar:{display:"flex",alignItems:"center",justifyContent:"center",height:"35px",width:"35px",borderRadius:"50%",backgroundColor:"#E5E7EB",color:"#4B5563",fontWeight:600,flexShrink:0,fontSize:"12px"},contributorName:{fontWeight:600,color:"#111827",marginTop:"8px",fontSize:"14px"},contributorRole:{fontSize:"12px",color:"#6B7280"},grid:{display:"grid",gridTemplateColumns:"repeat(4, minmax(0, 1fr))",gap:"24px",marginBottom:"24px",padding:"0 12px"},awardMeta:{fontSize:"14px",color:"#4B5563"},awardDesc:{fontSize:"14px",color:"#4B5563"},awardContainer:{display:"flex",gap:"8px"},awardInfo:{backgroundColor:"#ECEEF1",padding:"8px 12px",fontWeight:600,fontSize:"12px",borderRadius:"4px",color:"#434C54",maxWidth:"100%",wordBreak:"break-word",width:"fit-content"},listContainerWrapper:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"30px",marginBottom:"24px"},awardContainerWrapper:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"16px"}},s=function(s){var c,u,m,h=s.data,v=s.highlightTerms,g=s.onHighlightMatch,f=s.highlightEnabled,x=h.publisher,y=h.contributors,b=h.awards,w=void 0===b?[]:b,k=i(null),C=function(e){var l=e.trim().split(/\s+/).map(function(e){var l;return null===(l=e[0])||void 0===l?void 0:l.toUpperCase()}).join("");return l.length>3?"".concat(l.slice(0,3)):l};return r(function(){var l,n,o,t,i,r,a,d,p,s,c,u;if(v&&0!==v.length&&f){var m=e(e(e(e([null!==(n=null===(l=h.publisher)||void 0===l?void 0:l.name)&&void 0!==n?n:""],null!==(t=null===(o=h.publisher)||void 0===o?void 0:o.tags)&&void 0!==t?t:[],!0),null!==(a=null===(r=null===(i=h.contributors)||void 0===i?void 0:i.primary)||void 0===r?void 0:r.flatMap(function(l){var n;return e([l.name,l.role],null!==(n=l.tags)&&void 0!==n?n:[],!0)}))&&void 0!==a?a:[],!0),null!==(s=null===(p=null===(d=h.contributors)||void 0===d?void 0:d.additional)||void 0===p?void 0:p.flatMap(function(l){var n;return e([l.name,l.role],null!==(n=l.tags)&&void 0!==n?n:[],!0)}))&&void 0!==s?s:[],!0),null!==(u=null===(c=h.awards)||void 0===c?void 0:c.flatMap(function(e){return[e.title,e.org,String(e.year),e.country]}))&&void 0!==u?u:[],!0).some(function(e){return!!e&&v.some(function(l){return e.toLowerCase().includes(l.toLowerCase())})});null==g||g(m)}},[v,h]),n("div",l({ref:k,className:"book-people-container"},{children:[o("p",l({style:p.sectionTitle,className:"book-people-section-title"},{children:"Publishers"})),n("div",l({style:p.card,className:"book-people-card"},{children:[o("span",l({style:{color:"rgb(67, 76, 85)"}},{children:v&&v.length>0&&f?o("span",{dangerouslySetInnerHTML:{__html:d(a(x.name,v))}}):x.name})),(null==x?void 0:x.tags)&&(null==x?void 0:x.tags.length)>0&&o("div",l({style:{display:"flex",gap:"8px",marginTop:"18px"}},{children:null===(c=null==x?void 0:x.tags)||void 0===c?void 0:c.map(function(e,n){return o("span",l({style:p.tag},{children:v&&v.length>0&&f?o("span",{dangerouslySetInnerHTML:{__html:d(a(e,v))}}):e}),n)})}))]})),o("p",l({style:p.sectionTitle,className:"book-people-section-title"},{children:"Contributors"})),o("div",l({style:p.listContainerWrapper,className:"book-people-list-wrapper"},{children:null===(u=null==y?void 0:y.primary)||void 0===u?void 0:u.map(function(e,t){var i;return n("div",l({style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},{children:[o("div",l({style:p.avatar,className:"book-people-avatar"},{children:C(null==e?void 0:e.name)})),o("span",l({style:p.contributorName,className:"book-people-name"},{children:v&&v.length>0&&f?o("span",{dangerouslySetInnerHTML:{__html:d(a(null==e?void 0:e.name,v))}}):null==e?void 0:e.name})),o("span",l({style:p.contributorRole,className:"book-people-role"},{children:v&&v.length>0&&f?o("span",{dangerouslySetInnerHTML:{__html:d(a(null==e?void 0:e.role,v))}}):null==e?void 0:e.role})),o("div",l({style:{display:"flex",gap:"8px",marginTop:"8px"}},{children:null===(i=null==e?void 0:e.tags)||void 0===i?void 0:i.map(function(e,n){return o("span",l({style:p.tag},{children:v&&v.length>0&&f?o("span",{dangerouslySetInnerHTML:{__html:d(a(e,v))}}):e}),n)})}))]}),t)})})),y.additional&&y.additional.length>0&&n(t,{children:[o("p",l({style:p.sectionTitle,className:"book-people-section-title"},{children:"Additional Contributors"})),o("div",l({style:p.listContainerWrapper,className:"book-people-list-wrapper"},{children:null===(m=null==y?void 0:y.additional)||void 0===m?void 0:m.map(function(e,t){return n("div",l({style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},{children:[o("div",l({style:p.avatar,className:"book-people-avatar"},{children:C(null==e?void 0:e.name)})),o("span",l({style:p.contributorName,className:"book-people-name"},{children:v&&v.length>0&&f?o("span",{dangerouslySetInnerHTML:{__html:d(a(null==e?void 0:e.name,v))}}):null==e?void 0:e.name})),o("span",l({style:p.contributorRole,className:"book-people-role"},{children:v&&v.length>0&&f?o("span",{dangerouslySetInnerHTML:{__html:d(a(null==e?void 0:e.role,v))}}):null==e?void 0:e.role}))]}),t)})}))]}),w.length>0&&n(t,{children:[o("p",l({style:p.sectionTitle,className:"book-people-section-title"},{children:"Awards"})),o("div",l({style:p.awardContainerWrapper,className:"book-people-award-wrapper"},{children:null==w?void 0:w.map(function(e,n){return o("div",l({style:p.awardInfo},{children:o("span",{children:v&&v.length>0&&f?o("span",{dangerouslySetInnerHTML:{__html:d(a(null==e?void 0:e.title,v))}}):null==e?void 0:e.title})}),n)})}))]})]}))};export{s as default};
2
2
  //# sourceMappingURL=BookPeopleAwardsCard.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as o}from"react/jsx-runtime";import i from"@mui/material/Dialog";import t from"@mui/material/DialogContent";import{BookemonContent as n}from"./BookemonContent.js";var l={maxWidth:"none",fontFamily:"Inter, sans-serif"},r={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%"}},a=o("svg",e({style:r.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},{children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})),s=function(r){var s=r.open,g=r.onClose,h=r.isDialog,d=void 0===h||h,m=r.isBookPreview,u=void 0===m||m,c=r.isNonHighlightedBlur,p=r.isBookemon,f=r.getHighlightContent,x=r.handleFetchManuscriptElements,B=r.data,C=r.showComingSoon,v=void 0!==C&&C,k=r.comingSoonData,w=void 0===k?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:a}:k,y=r.customStyle,S=void 0===y?{}:y,F=r.isBlurToggleVisible,D=void 0!==F&&F,E=r.highlightTerms,b=r.defaultElementPages,P=null!=g?g:function(){};return d?o(i,e({open:null!=s&&s,fullWidth:!0,PaperProps:{style:e(e({},l),null==S?void 0:S.dialogDimension)}},{children:o(t,e({style:{padding:0}},{children:o(n,{data:B,customStyle:S,comingSoonData:w,showComingSoon:v,isNonHighlightedBlur:c,isBlurToggleVisible:D,isBookemon:p,highlightTerms:E,getHighlightContent:f,handleFetchManuscriptElements:x,isBookPreview:u,isDialog:d,onClose:P,defaultElementPages:b})}))})):o("div",e({style:{width:"100%",height:"100%"}},{children:o(n,{data:B,customStyle:S,comingSoonData:w,showComingSoon:v,isNonHighlightedBlur:c,isBlurToggleVisible:D,isBookemon:p,highlightTerms:E,getHighlightContent:f,handleFetchManuscriptElements:x,isBookPreview:u,isDialog:d,onClose:P,defaultElementPages:b})}))};export{r as comingSoonStyles,s as default,a as defaultIcon};
1
+ import{__assign as e}from"tslib";import{jsx as i}from"react/jsx-runtime";import o from"@mui/material/Dialog";import t from"@mui/material/DialogContent";import{BookemonContent as n}from"./BookemonContent.js";var l={maxWidth:"none",fontFamily:"Inter, sans-serif"},r={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%"}},a=i("svg",e({style:r.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"})})),s=function(r){var s=r.open,g=r.onClose,h=r.isDialog,d=void 0===h||h,m=r.isBookPreview,c=void 0===m||m,u=r.isNonHighlightedBlur,p=r.isBookemon,f=r.getHighlightContent,x=r.handleFetchManuscriptElements,B=r.data,C=r.showComingSoon,v=void 0!==C&&C,y=r.comingSoonData,S=void 0===y?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:a}:y,k=r.customStyle,w=void 0===k?{}:k,F=r.isBlurToggleVisible,b=void 0!==F&&F,T=r.highlightTerms,D=r.defaultElementPages,E=r.citationType,P=r.citationSubTitle,H=null!=g?g:function(){};return d?i(o,e({open:null!=s&&s,fullWidth:!0,PaperProps:{style:e(e({},l),null==w?void 0:w.dialogDimension)}},{children:i(t,e({style:{padding:0}},{children:i(n,{data:B,customStyle:w,comingSoonData:S,showComingSoon:v,isNonHighlightedBlur:u,isBlurToggleVisible:b,isBookemon:p,highlightTerms:T,getHighlightContent:f,handleFetchManuscriptElements:x,isBookPreview:c,isDialog:d,onClose:H,defaultElementPages:D})}))})):i("div",e({style:{width:"100%",height:"100%"}},{children:i(n,{data:B,customStyle:w,comingSoonData:S,showComingSoon:v,isNonHighlightedBlur:u,isBlurToggleVisible:b,isBookemon:p,highlightTerms:T,getHighlightContent:f,handleFetchManuscriptElements:x,isBookPreview:c,isDialog:d,onClose:H,defaultElementPages:D,citationType:E,citationSubTitle:P})}))};export{r as comingSoonStyles,s as default,a as defaultIcon};
2
2
  //# sourceMappingURL=Bookemon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__awaiter as t,__generator as o}from"tslib";import{jsxs as r,jsx as i}from"react/jsx-runtime";import{useState as n,useRef as l,useEffect as a}from"react";import{PanelGroup as d,Panel as c,PanelResizeHandle as s}from"react-resizable-panels";import h from"@mui/material/Accordion";import u from"@mui/material/AccordionSummary";import g from"@mui/material/Typography";import p from"@mui/material/AccordionDetails";import m from"@mui/material/IconButton";import f from"./BookDetailsCard/BookDetailsCard.js";import v from"./BookOverviewCard/BookOverviewCard.js";import y from"./BookElementsCard/BookElementsCard.js";import b from"./BookCopyrightsCard/BookCopyrightsCard.js";import x from"./BookPeopleAwardsCard/BookPeopleAwardsCard.js";import k from"./BookPreview/BookPreview.js";import C from"@mui/icons-material/ExpandMore";import w from"@mui/icons-material/Close";var B={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogHeight:{overflow:"hidden",height:"90vh",position:"relative"},dialogContent:{padding:0,backgroundColor:"#FFFFFF"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},S={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},D=function(t){var o=t.header,n=t.subheader,l=t.icon;return 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}))})),r("div",{children:[i("h1",e({style:S.heading},{children:o})),i("p",e({style:S.text},{children:n}))]})]}))}))},F=function(S){var F=S.showComingSoon,P=S.onClose,I=S.highlightTerms,H=S.data,z=S.customStyle,j=S.comingSoonData,E=S.isNonHighlightedBlur,M=S.isBlurToggleVisible,T=S.isBookemon,A=S.getHighlightContent,O=S.handleFetchManuscriptElements,L=S.isBookPreview,V=S.isDialog,R=S.defaultElementPages,q=n({textToHighLight:"",content:""}),W=q[0],N=q[1],Q=n(1),Y=Q[0],_=Q[1],G=n(!1),J=G[0],K=G[1],U=n("Book Preview"),X=U[0],Z=U[1],$=n(70),ee=$[0],te=$[1],oe=l(null),re=n(!1),ie=re[0],ne=re[1],le=l(null),ae=l(null),de=l(null),ce=l(null),se=l(null),he=function(e,r,i,n){return void 0===n&&(n=0),t(void 0,void 0,void 0,function(){var t,l,a,d,c,s,h,u,g,p,m,f,v,y,b,x;return o(this,function(o){switch(o.label){case 0:N({textToHighLight:"",content:""}),ne(!1),K(!0),Z(r),o.label=1;case 1:return o.trys.push([1,5,6,7]),i&&0!==i.length?[4,null==A?void 0:A([i[n]])]:(K(!1),te(70),null===(b=oe.current)||void 0===b||b.resize(70),[2]);case 2:if(t=o.sent(),l=(null==t?void 0:t.data)||t||[],!Array.isArray(l)||0===l.length)return ne(!0),K(!1),[2];for(d=(a=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/&nbsp;/g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(e),c=null,s=0,h=l;s<h.length;s++)if(f=h[s],a(f.normalizedContent||f.htmlContent).includes(d)){c=f;break}if(!c)for(u=d.split(" ").filter(Boolean);u.length>0;){for(g=u.join(" "),p=0,m=l;p<m.length;p++)if(f=m[p],a(f.normalizedContent||f.htmlContent).includes(g)){c=f;break}if(c)break;u.pop()}return v=l.map(function(e){return e.htmlContent}).join("\n"),N({textToHighLight:c?c.htmlContent:"",content:v}),te(50),null===(x=oe.current)||void 0===x||x.resize(50),!c&&n+1<i.length?[4,he(e,r,i,n+1)]:[3,4];case 3:return[2,o.sent()];case 4:return[2];case 5:return y=o.sent(),console.error("Highlight error:",y),ne(!0),[3,7];case 6:return K(!1),[7];case 7:return[2]}})})},ue=n(!1),ge=ue[0],pe=ue[1],me=n(!1),fe=me[0],ve=me[1],ye=n(!1),be=ye[0],xe=ye[1],ke=n(!1),Ce=ke[0],we=ke[1],Be=n(!1),Se=Be[0],De=Be[1],Fe=n(!1),Pe=Fe[0],Ie=Fe[1],He=n(!1),ze=He[0],je=He[1],Ee=n(!1),Me=Ee[0],Te=Ee[1],Ae=n(!1),Oe=Ae[0],Le=Ae[1],Ve=n(!1),Re=Ve[0],qe=Ve[1];a(function(){ge&&Ie(!0),fe&&je(!0),be&&Te(!0),Ce&&Le(!0),Se&&qe(!0)},[ge,fe,be,Ce,Se]);var We=H.bookAwards,Ne=H.bookCopyRight,Qe=H.bookDetails,Ye=H.bookElements,_e=H.bookOverView,Ge=H.bookCoverImage,Je=null==Qe?void 0:Qe.isbn,Ke=null!=P?P:function(){};return r("div",e({style:e(e({},B.dialogContent),V?B.dialogHeight:{})},{children:[!F&&i("div",e({style:B.container},{children:r(d,e({direction:"horizontal"},{children:[i(c,e({order:1,ref:oe,defaultSize:ee||70},{children:r("div",e({style:e(e({},null==B?void 0:B.leftPanel),null==z?void 0:z.leftPanel)},{children:[i("div",e({ref:le,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:r(h,e({expanded:Pe,onChange:function(e,t){return Ie(t)},slotProps:{transition:{onEntered:function(){var e=le.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}},elevation:0,style:B.accordion},{children:[i(u,e({expandIcon:i(C,{}),style:B.accordionSummary},{children:i(g,e({style:B.heading},{children:"Book Overview"}))})),i(p,e({style:B.accordionDetails},{children:_e&&Object.keys(_e).length>0?i(v,{data:_e,highlightTerms:I,onHighlightMatch:pe}):i("div",e({style:B.errorState},{children:"No overview data available."}))}))]}))})),i("div",e({ref:ae,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:r(h,e({elevation:0,style:B.accordion,expanded:ze,onChange:function(e,t){return je(t)},slotProps:{transition:{onEntered:function(){var e=ae.current;if(e){var t=e.querySelector('[data-highlight="true"]');if(t){t.scrollIntoView({behavior:"smooth",block:"center"});var o=new MutationObserver(function(){var t=e.querySelector('[data-highlight="true"]');t&&t.scrollIntoView({behavior:"auto",block:"center"}),o.disconnect()});o.observe(e,{childList:!0,subtree:!0})}}}}}},{children:[i(u,e({expandIcon:i(C,{}),style:B.accordionSummary},{children:i(g,e({style:B.heading},{children:"Book Manuscript Elements"}))})),i(p,e({style:B.accordionDetails},{children:i(y,{data:Ye,title:(null==_e?void 0:_e.title)||"",handleFetchManuscriptElements:O,BookIsbn:Je,updateQuotesToHighLight:he,highlightTerms:I,onHighlightMatch:ve,defaultPages:R})}))]}))})),i("div",e({ref:de,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:r(h,e({expanded:Me,onChange:function(e,t){return Te(t)},elevation:0,style:B.accordion,slotProps:{transition:{onEntered:function(){var e=de.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[i(u,e({expandIcon:i(C,{}),style:B.accordionSummary},{children:i(g,e({style:B.heading},{children:"Book Metadata Details"}))})),i(p,e({style:B.accordionDetails},{children:Qe&&Object.keys(Qe).length>0?i(f,{data:Qe,highlightTerms:I,onHighlightMatch:xe}):i("div",e({style:B.errorState},{children:"No Book Metadata data available."}))}))]}))})),i("div",e({ref:ce,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:r(h,e({elevation:0,style:B.accordion,expanded:Oe,onChange:function(e,t){return Le(t)},slotProps:{transition:{onEntered:function(){var e=ce.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[i(u,e({expandIcon:i(C,{}),style:B.accordionSummary},{children:i(g,e({style:B.heading},{children:"Copyrights & Marketing"}))})),i(p,e({style:B.accordionDetails},{children:Ne&&Object.keys(Ne).length>0?i(b,{data:Ne,highlightTerms:I,onHighlightMatch:we}):i("div",e({style:B.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),i("div",e({ref:se},{children:r(h,e({elevation:0,style:B.accordion,expanded:Re,onChange:function(e,t){return qe(t)},slotProps:{transition:{onEntered:function(){var e=se.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[i(u,e({expandIcon:i(C,{}),style:B.accordionSummary},{children:i(g,e({style:B.heading},{children:"People & Awards"}))})),i(p,e({style:B.accordionDetails},{children:We&&Object.keys(We).length>0?i(x,{data:We,highlightTerms:I,onHighlightMatch:De}):i("div",e({style:B.errorState},{children:"No People & Awards data available."}))}))]}))}))]}))})),L&&i(s,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),L&&i(c,e({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:i(k,{bookOverView:_e,bookCoverImage:Ge,onClose:Ke,clickableElementCategory:X,quotesToHighLightData:W,updateQuotesToHighLight:he,citationLoad:J,previewPage:Y,setPreviewPage:_,customStyle:z,comingSoonData:j,isNonHighlightedBlur:E,isBlurToggleVisible:M,isBookemon:T,noHtmlContent:ie})}))]}))})),F&&r("div",e({style:B.blurOverlay},{children:[i(m,e({style:B.closeButton,onClick:P,size:"large"},{children:i(w,{})})),i(D,{header:null==j?void 0:j.header,subheader:null==j?void 0:j.subheader,icon:null==j?void 0:j.icon})]}))]}))};export{F as BookemonContent};
1
+ import{__assign as e,__awaiter as t,__generator as o}from"tslib";import{jsxs as i,jsx as r}from"react/jsx-runtime";import{useState as n,useRef as l,useEffect as a}from"react";import{PanelGroup as d,Panel as c,PanelResizeHandle as s}from"react-resizable-panels";import h from"@mui/material/Accordion";import u from"@mui/material/AccordionSummary";import g from"@mui/material/Typography";import p from"@mui/material/AccordionDetails";import m from"@mui/material/IconButton";import f from"./BookDetailsCard/BookDetailsCard.js";import v from"./BookOverviewCard/BookOverviewCard.js";import b from"./BookElementsCard/BookElementsCard.js";import y from"./BookCopyrightsCard/BookCopyrightsCard.js";import x from"./BookPeopleAwardsCard/BookPeopleAwardsCard.js";import k from"./BookPreview/BookPreview.js";import C from"@mui/icons-material/ExpandMore";import w from"@mui/icons-material/Close";var B={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogHeight:{overflow:"hidden",height:"90vh",position:"relative"},dialogContent:{padding:0,backgroundColor:"#FFFFFF"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},S={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},D=function(t){var o=t.header,n=t.subheader,l=t.icon;return r("div",e({style:S.wrapper},{children:i("div",e({style:S.inner},{children:[r("div",e({style:{marginBottom:"32px"}},{children:r("div",e({style:S.iconWrapper},{children:l}))})),i("div",{children:[r("h1",e({style:S.heading},{children:o})),r("p",e({style:S.text},{children:n}))]})]}))}))},F=function(S){var F=S.showComingSoon,E=S.onClose,P=S.highlightTerms,I=S.data,T=S.customStyle,H=S.comingSoonData,z=S.isNonHighlightedBlur,j=S.isBlurToggleVisible,M=S.isBookemon,A=S.getHighlightContent,O=S.handleFetchManuscriptElements,L=S.isBookPreview,V=S.isDialog,R=S.defaultElementPages,q=S.citationType,W=S.citationSubTitle,N=n({textToHighLight:"",content:""}),_=N[0],Q=N[1],Y=n(1),G=Y[0],J=Y[1],K=n(!1),U=K[0],X=K[1],Z=n("Book Preview"),$=Z[0],ee=Z[1],te=n(70),oe=te[0],ie=te[1],re=l(null),ne=n(!1),le=ne[0],ae=ne[1],de=l(null),ce=l(null),se=l(null),he=l(null),ue=l(null),ge=function(e,i,r,n){return void 0===n&&(n=0),t(void 0,void 0,void 0,function(){var t,l,a,d,c,s,h,u,g,p,m,f,v,b,y,x;return o(this,function(o){switch(o.label){case 0:Q({textToHighLight:"",content:""}),ae(!1),X(!0),ee(i),o.label=1;case 1:return o.trys.push([1,5,6,7]),r&&0!==r.length?[4,null==A?void 0:A([r[n]])]:(X(!1),ie(70),null===(y=re.current)||void 0===y||y.resize(70),[2]);case 2:if(t=o.sent(),l=(null==t?void 0:t.data)||t||[],!Array.isArray(l)||0===l.length)return ae(!0),X(!1),[2];for(d=(a=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/&nbsp;/g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(e),c=null,s=0,h=l;s<h.length;s++)if(f=h[s],a(f.normalizedContent||f.htmlContent).includes(d)){c=f;break}if(!c)for(u=d.split(" ").filter(Boolean);u.length>0;){for(g=u.join(" "),p=0,m=l;p<m.length;p++)if(f=m[p],a(f.normalizedContent||f.htmlContent).includes(g)){c=f;break}if(c)break;u.pop()}return v=l.map(function(e){return e.htmlContent}).join("\n"),Q({textToHighLight:c?c.htmlContent:"",content:v}),ie(50),null===(x=re.current)||void 0===x||x.resize(50),!c&&n+1<r.length?[4,ge(e,i,r,n+1)]:[3,4];case 3:return[2,o.sent()];case 4:return[2];case 5:return b=o.sent(),console.error("Highlight error:",b),ae(!0),[3,7];case 6:return X(!1),[7];case 7:return[2]}})})},pe=n(!1),me=pe[0],fe=pe[1],ve=n(!1),be=ve[0],ye=ve[1],xe=n(!1),ke=xe[0],Ce=xe[1],we=n(!1),Be=we[0],Se=we[1],De=n(!1),Fe=De[0],Ee=De[1],Pe=n(!1),Ie=Pe[0],Te=Pe[1],He=n(!1),ze=He[0],je=He[1],Me=n(!1),Ae=Me[0],Oe=Me[1],Le=n(!1),Ve=Le[0],Re=Le[1],qe=n(!1),We=qe[0],Ne=qe[1];a(function(){me&&Te(!0),be&&je(!0),ke&&Oe(!0),Be&&Re(!0),Fe&&Ne(!0)},[me,be,ke,Be,Fe]);var _e=I.bookAwards,Qe=I.bookCopyRight,Ye=I.bookDetails,Ge=I.bookElements,Je=I.bookOverView,Ke=I.bookCoverImage,Ue=null==Ye?void 0:Ye.isbn,Xe=null!=E?E:function(){},Ze=void 0!==W&&!!W.length&&["notable_quotes","location_details","notable_characters"].includes(W);return i("div",e({style:e(e({},B.dialogContent),V?B.dialogHeight:{})},{children:[!F&&r("div",e({style:B.container},{children:i(d,e({direction:"horizontal"},{children:[r(c,e({order:1,ref:re,defaultSize:oe||70},{children:i("div",e({style:e(e({},null==B?void 0:B.leftPanel),null==T?void 0:T.leftPanel)},{children:[r("div",e({ref:de,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:i(h,e({expanded:Ie,onChange:function(e,t){return Te(t)},slotProps:{transition:{onEntered:function(){var e=de.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}},elevation:0,style:B.accordion},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"Book Overview"}))})),r(p,e({style:B.accordionDetails},{children:Je&&Object.keys(Je).length>0?r(v,{data:Je,highlightTerms:P,onHighlightMatch:fe,highlightEnabled:!Ze}):r("div",e({style:B.errorState},{children:"No overview data available."}))}))]}))})),r("div",e({ref:ce,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:i(h,e({elevation:0,style:B.accordion,expanded:ze,onChange:function(e,t){return je(t)},slotProps:{transition:{onEntered:function(){var e=ce.current;if(e){var t=e.querySelector('[data-highlight="true"]');if(t){t.scrollIntoView({behavior:"smooth",block:"center"});var o=new MutationObserver(function(){var t=e.querySelector('[data-highlight="true"]');t&&t.scrollIntoView({behavior:"auto",block:"center"}),o.disconnect()});o.observe(e,{childList:!0,subtree:!0})}}}}}},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"Book Manuscript Elements"}))})),r(p,e({style:B.accordionDetails},{children:r(b,{data:Ge,title:(null==Je?void 0:Je.title)||"",handleFetchManuscriptElements:O,BookIsbn:Ue,updateQuotesToHighLight:ge,highlightTerms:P,onHighlightMatch:ye,defaultPages:R,citationType:q,citationSubTitle:W,highlightEnabled:Ze})}))]}))})),r("div",e({ref:se,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:i(h,e({expanded:Ae,onChange:function(e,t){return Oe(t)},elevation:0,style:B.accordion,slotProps:{transition:{onEntered:function(){var e=se.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"Book Metadata Details"}))})),r(p,e({style:B.accordionDetails},{children:Ye&&Object.keys(Ye).length>0?r(f,{data:Ye,highlightTerms:P,onHighlightMatch:Ce,highlightEnabled:!Ze,citationType:q,citationSubTitle:W}):r("div",e({style:B.errorState},{children:"No Book Metadata data available."}))}))]}))})),r("div",e({ref:he,style:{marginBottom:"24px"},onMouseDown:function(e){return e.preventDefault()}},{children:i(h,e({elevation:0,style:B.accordion,expanded:Ve,onChange:function(e,t){return Re(t)},slotProps:{transition:{onEntered:function(){var e=he.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"Copyrights & Marketing"}))})),r(p,e({style:B.accordionDetails},{children:Qe&&Object.keys(Qe).length>0?r(y,{data:Qe,highlightTerms:P,onHighlightMatch:Se,highlightEnabled:!Ze}):r("div",e({style:B.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),r("div",e({ref:ue},{children:i(h,e({elevation:0,style:B.accordion,expanded:We,onChange:function(e,t){return Ne(t)},slotProps:{transition:{onEntered:function(){var e=ue.current,t=null==e?void 0:e.querySelector('[data-highlight="true"]');t&&e&&!e.dataset.scrolled&&(t.scrollIntoView({behavior:"smooth",block:"center"}),e.dataset.scrolled="true")}}}},{children:[r(u,e({expandIcon:r(C,{}),style:B.accordionSummary},{children:r(g,e({style:B.heading},{children:"People & Awards"}))})),r(p,e({style:B.accordionDetails},{children:_e&&Object.keys(_e).length>0?r(x,{data:_e,highlightTerms:P,onHighlightMatch:Ee,highlightEnabled:!Ze}):r("div",e({style:B.errorState},{children:"No People & Awards data available."}))}))]}))}))]}))})),L&&r(s,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),L&&r(c,e({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:r(k,{bookOverView:Je,bookCoverImage:Ke,onClose:Xe,clickableElementCategory:$,quotesToHighLightData:_,updateQuotesToHighLight:ge,citationLoad:U,previewPage:G,setPreviewPage:J,customStyle:T,comingSoonData:H,isNonHighlightedBlur:z,isBlurToggleVisible:j,isBookemon:M,noHtmlContent:le})}))]}))})),F&&i("div",e({style:B.blurOverlay},{children:[r(m,e({style:B.closeButton,onClick:E,size:"large"},{children:r(w,{})})),r(D,{header:null==H?void 0:H.header,subheader:null==H?void 0:H.subheader,icon:null==H?void 0:H.icon})]}))]}))};export{F as BookemonContent};
2
2
  //# sourceMappingURL=BookemonContent.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as r}from"tslib";import{jsx as e}from"react/jsx-runtime";import{Worker as t,Viewer as o,SpecialZoomLevel as i}from"@react-pdf-viewer/core";import{pdfStyles as l}from"./PdfStyle.js";var d="https://unpkg.com/pdfjs-dist@3.11.174/build/pdf.worker.min.js",n=function(n){var f=n.pdfUrl,p=n.plugins,a=n.onLoad;return e("div",r({style:l.pdfConatiner},{children:e(t,r({workerUrl:d},{children:e(o,{fileUrl:f,defaultScale:i.ActualSize,plugins:p,onDocumentLoad:a})}))}))};export{n as default,d as pdfWorker};
1
+ import{__assign as r}from"tslib";import{jsx as t}from"react/jsx-runtime";import{Worker as e,Viewer as o,SpecialZoomLevel as i}from"@react-pdf-viewer/core";import{pdfStyles as l}from"./PdfStyle.js";var n="https://unpkg.com/pdfjs-dist@3.11.174/build/pdf.worker.min.js",d=function(d){var f=d.pdfUrl,p=d.plugins,a=d.onLoad,m=d.customStyles;return t("div",r({style:r(r({},l.pdfConatiner),null==m?void 0:m.pdfContainer)},{children:t(e,r({workerUrl:n},{children:t(o,{fileUrl:f,defaultScale:i.ActualSize,plugins:p,onDocumentLoad:a})}))}))};export{d as default,n as pdfWorker};
2
2
  //# sourceMappingURL=PdfContainer.js.map
@@ -1,2 +1,2 @@
1
- var e={pdfViewer:{borderRadius:"12px",padding:"16px",width:"100%",height:"100%"},card:{border:"2px solid #E5E7EB",backgroundColor:"#FFFFFF",borderRadius:"12px",padding:"16px",width:"100%"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"12px",position:"relative"},title:{fontSize:"14px",fontWeight:600,color:"#60A3F8",fontFamily:'Roboto, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif'},toolbar:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},button:{border:"1px solid #DFE5EC",borderRadius:"6px",padding:"4px 8px",fontSize:"14px",cursor:"pointer",backgroundColor:"#FFFFFF"},buttonDisabled:{opacity:.4,cursor:"not-allowed"},counter:{fontSize:"13px",color:"#64748B",margin:"0 6px"},viewerWrapper:{height:"30rem",overflow:"auto",display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid #DEE4EB",borderRadius:"8px"},emptyState:{fontSize:"14px",color:"#EF4444"},pdfConatiner:{height:"100%",overflow:"auto",display:"flex",justifyContent:"center",alignItems:"center"}};export{e as pdfStyles};
1
+ var e={pdfViewer:{borderRadius:"12px",padding:"16px",width:"100%",height:"100%"},card:{border:"2px solid #E5E7EB",backgroundColor:"#FFFFFF",borderRadius:"12px",width:"100%"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative"},title:{fontSize:"14px",fontWeight:600,color:"#60A3F8",fontFamily:'Roboto, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif'},toolbar:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},button:{border:"1px solid #DFE5EC",borderRadius:"6px",padding:"4px 8px",fontSize:"14px",cursor:"pointer",backgroundColor:"#FFFFFF"},buttonDisabled:{opacity:.4,cursor:"not-allowed"},counter:{fontSize:"13px",color:"#64748B",margin:"0 6px"},viewerWrapper:{height:"30rem",overflow:"auto",display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid #DEE4EB",borderRadius:"8px"},emptyState:{fontSize:"14px",color:"#EF4444"},pdfConatiner:{height:"100%",overflow:"auto",display:"flex",justifyContent:"center",alignItems:"center"}};export{e as pdfStyles};
2
2
  //# sourceMappingURL=PdfStyle.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsxs as o,jsx as e,Fragment as i}from"react/jsx-runtime";import{pdfStyles as n}from"./PdfStyle.js";var l=function(l){l.highlightIndex;var r=l.totalHighlights,s=l.controls,d=l.currentPosition,h=s.ZoomInButton,u=s.ZoomOutButton,c=s.ZoomPopover,a=s.goToPrevious,b=s.goToNext;return o("div",t({style:n.header},{children:[e("span",t({style:n.title},{children:"PDF with Highlighted Sections"})),o("div",t({style:n.toolbar},{children:[e(u,{}),e(c,{}),e(h,{}),!!r&&o(i,{children:[e("button",t({style:t(t({},n.button),0===d||1===d?n.buttonDisabled:{}),onClick:a,disabled:0===d||1===d},{children:"◀"})),o("span",t({style:n.counter},{children:[d," / ",r]})),e("button",t({style:t(t({},n.button),d===r?n.buttonDisabled:{}),onClick:b,disabled:d===r},{children:"▶"}))]})]}))]}))};export{l as default};
1
+ import{__assign as e}from"tslib";import{jsxs as t,jsx as n}from"react/jsx-runtime";import{pdfStyles as l}from"./PdfStyle.js";import{DefaultPdfIcon as o,DefaultFullScreenIcon as r,DefaultDownloadIcon as i,DefaultCloseIcon as s}from"../../assests/svg/PdfViewerIcons.js";var c=function(c){c.highlightIndex,c.totalHighlights;var a=c.controls;c.currentPosition;var d=c.pdfName,m=c.onClose,u=c.pdfUrl,f=c.viewerRef,p=c.customStyles,v=c.customClasses,g=c.customIcons,h=a.ZoomInButton,x=a.ZoomOutButton,b=a.ZoomPopover;a.goToPrevious,a.goToNext;var N=(null==v?void 0:v.actionButton)||"p-1 hover:bg-gray-200 rounded-md transition-colors";return t("div",e({className:(null==v?void 0:v.header)||"flex items-center justify-between mb-3 bg-[#FAFAFA] border-b border-gray-100 rounded-t-xl",style:e(e({},l.header),null==p?void 0:p.header)},{children:[t("div",e({className:"flex items-center gap-3"},{children:[n("div",e({style:e(e({},{borderRadius:"21px",border:"6px solid #E8F3FF",background:"#D5E8FF",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",boxSizing:"content-box"}),null==p?void 0:p.pdfIconWrapper)},{children:(null==g?void 0:g.pdfIcon)||n(o,{})})),n("span",e({className:(null==v?void 0:v.pdfName)||"text-gray-800 text-sm",style:e({fontWeight:500},null==p?void 0:p.pdfName)},{children:d}))]})),t("div",e({className:"flex items-center gap-4 text-gray-600"},{children:[t("div",e({className:"flex items-center gap-1"},{children:[n(x,{}),n("div",e({className:"text-sm font-medium w-14 text-center"},{children:n(b,{})})),n(h,{})]})),n("div",{className:"w-px h-5 bg-gray-300 mx-1"}),t("div",e({className:"flex items-center gap-2"},{children:[n("button",e({onClick:function(){var e=null==f?void 0:f.current;e&&(document.fullscreenElement?document.exitFullscreen():e.requestFullscreen().catch(function(e){console.error("Error attempting to enable fullscreen: ".concat(e.message))}))},className:N,title:"Full Screen"},{children:(null==g?void 0:g.fullScreenIcon)||n(r,{})})),u&&n("a",e({href:u,target:"_blank",rel:"noopener noreferrer",className:N,title:"Open in new tab"},{children:(null==g?void 0:g.downloadIcon)||n(i,{})})),m&&n("button",e({onClick:m,className:"".concat(N," ml-1"),title:"Close"},{children:(null==g?void 0:g.closeIcon)||n(s,{})}))]}))]}))]}))};export{c as default};
2
2
  //# sourceMappingURL=PdfToolbar.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as i}from"tslib";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{SpecialZoomLevel as r}from"@react-pdf-viewer/core";import o from"./PdfContainer.js";import s from"./PdfToolbar.js";import{pdfStyles as l}from"./PdfStyle.js";import{PdfHighlightControls as a}from"./usePdfHighlight.js";import"@react-pdf-viewer/zoom/lib/styles/index.css";import"@react-pdf-viewer/page-navigation/lib/styles/index.css";import"@react-pdf-viewer/core/lib/styles/index.css";import"@react-pdf-viewer/search/lib/styles/index.css";var n=function(n){var d=n.pdfUrl,m=n.highlightText,p=n.highlightPages,f=n.jumpToPageValue,c=void 0===f?0:f,g=a(m,p),h=g.highlightIndex,u=g.cursorIndex,v=g.setCursorIndex,x=g.orderedKeys,y=g.totalHighlights,P=g.getValidPosition,b=g.tryJump,j=g.jumpToPage,w=g.zoomTo,T=g.plugins,I=g.controls,z=P(u);return d?t("div",i({style:l.pdfViewer},{children:[e(s,{highlightIndex:h,totalHighlights:y,controls:I,currentPosition:z}),e(o,{pdfUrl:d,plugins:T,onLoad:function(){if(w(r.ActualSize),c>0){var i=c-1,e=x[i],t=p[e];v(i),t>0&&j(t-1)}requestAnimationFrame(b)}})]})):e("div",i({style:l.emptyState},{children:"PDF is not available for this selection"}))};export{n as default};
1
+ import{__assign as e}from"tslib";import{jsx as t,jsxs as i}from"react/jsx-runtime";import{SpecialZoomLevel as o}from"@react-pdf-viewer/core";import r from"./PdfContainer.js";import s from"./PdfToolbar.js";import{pdfStyles as l}from"./PdfStyle.js";import{PdfHighlightControls as n}from"./usePdfHighlight.js";import"@react-pdf-viewer/zoom/lib/styles/index.css";import"@react-pdf-viewer/page-navigation/lib/styles/index.css";import"@react-pdf-viewer/core/lib/styles/index.css";import"@react-pdf-viewer/search/lib/styles/index.css";import{useRef as a}from"react";var d=function(d){var m=d.pdfUrl,c=d.highlightText,p=d.highlightPages,f=d.jumpToPageValue,u=void 0===f?0:f,h=d.pdfName,g=d.onClose,v=d.customStyles,y=d.customClasses,x=d.customIcons,w=n(c,p),P=w.highlightIndex,b=w.cursorIndex,j=w.setCursorIndex,C=w.orderedKeys,S=w.totalHighlights,I=w.getValidPosition,A=w.tryJump,F=w.jumpToPage,T=w.zoomTo,V=w.plugins,z=w.controls,H=I(b),N=a(null);if(!m)return t("div",e({style:e(e({},l.emptyState),null==v?void 0:v.emptyState)},{children:"PDF is not available for this selection"}));return i("div",e({ref:N,className:(null==y?void 0:y.pdfViewerWrapper)||"",style:e(e(e({},l.pdfViewer),{display:"flex",flexDirection:"column",height:"100%",width:"100%",backgroundColor:"#FAFAFA"}),null==v?void 0:v.pdfViewer)},{children:[t(s,{highlightIndex:P,totalHighlights:S,controls:z,currentPosition:H,pdfName:h,onClose:g,pdfUrl:m,viewerRef:N,customStyles:v,customClasses:y,customIcons:x}),t(r,{pdfUrl:m,plugins:V,customStyles:v,onLoad:function(){if(T(o.ActualSize),u>0){var e=u-1,t=C[e],i=p[t];j(e),i>0&&F(i-1)}requestAnimationFrame(A)}})]}))};export{d as default};
2
2
  //# sourceMappingURL=PdfViewer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookemonTest.d.ts","sourceRoot":"","sources":["../../../src/BookemonTest.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgYd,CAAA;AAGH,eAAO,MAAM,mBAAmB,aAAmB,MAAM,EAAE,iBA2B1D,CAAC;AAGF,eAAO,MAAM,kBAAkB;cAAmE,GAAG;UAAS,GAAG;cAAa,GAAG;UAAS,GAAG;WAAW,MAAM;kBAW7J,CAAC;AAGF,eAAO,MAAM,6BAA6B;cAAkE,GAAG;UAAS,GAAG;cAAW,GAAG;UAAQ,GAAG;WAAU,MAAM;kBASjK,CAAC;AAEJ,eAAO,MAAM,cAAc,UAAU,CAAA;AAErC,QAAA,MAAM,YAAY,+CAwHjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"BookemonTest.d.ts","sourceRoot":"","sources":["../../../src/BookemonTest.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgYd,CAAA;AAGH,eAAO,MAAM,mBAAmB,aAAmB,MAAM,EAAE,iBA2B1D,CAAC;AAGF,eAAO,MAAM,kBAAkB;cAAmE,GAAG;UAAS,GAAG;cAAa,GAAG;UAAS,GAAG;WAAW,MAAM;kBAW7J,CAAC;AAGF,eAAO,MAAM,6BAA6B;cAAkE,GAAG;UAAS,GAAG;cAAW,GAAG;UAAQ,GAAG;WAAU,MAAM;kBASjK,CAAC;AAEJ,eAAO,MAAM,cAAc,UAAmB,CAAA;AAE9C,QAAA,MAAM,YAAY,+CAkIjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PdfViewerTest.d.ts","sourceRoot":"","sources":["../../../src/PdfViewerTest.tsx"],"names":[],"mappings":"AAcA,QAAA,MAAM,aAAa,+CAsClB,CAAA;AAED,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"PdfViewerTest.d.ts","sourceRoot":"","sources":["../../../src/PdfViewerTest.tsx"],"names":[],"mappings":"AAcA,QAAA,MAAM,aAAa,+CAwClB,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -0,0 +1,5 @@
1
+ export declare const DefaultPdfIcon: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare const DefaultFullScreenIcon: () => import("react/jsx-runtime").JSX.Element;
3
+ export declare const DefaultDownloadIcon: () => import("react/jsx-runtime").JSX.Element;
4
+ export declare const DefaultCloseIcon: () => import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=PdfViewerIcons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PdfViewerIcons.d.ts","sourceRoot":"","sources":["../../../../../src/assests/svg/PdfViewerIcons.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,+CAI1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,+CAIjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,+CAM/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,+CAK5B,CAAC"}
@@ -14,7 +14,8 @@ interface BookCopyrightsCardProps {
14
14
  data: IBookCopyrightsData;
15
15
  highlightTerms?: string[];
16
16
  onHighlightMatch?: (matched: boolean) => void;
17
+ highlightEnabled: boolean;
17
18
  }
18
- declare const BookCopyrightsCard: ({ data, highlightTerms, onHighlightMatch }: BookCopyrightsCardProps) => import("react/jsx-runtime").JSX.Element;
19
+ declare const BookCopyrightsCard: ({ data, highlightTerms, onHighlightMatch, highlightEnabled }: BookCopyrightsCardProps) => import("react/jsx-runtime").JSX.Element;
19
20
  export default BookCopyrightsCard;
20
21
  //# sourceMappingURL=BookCopyrightsCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookCopyrightsCard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookCopyrightsCard/BookCopyrightsCard.tsx"],"names":[],"mappings":"AAkBA,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,UAAU,CAAC;IACtB,WAAW,EAAE,YAAY,CAAC;CAC3B;AAED,UAAU,uBAAuB;IAC/B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C;AAED,QAAA,MAAM,kBAAkB,+CAAgD,uBAAuB,4CAkE9F,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"BookCopyrightsCard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookCopyrightsCard/BookCopyrightsCard.tsx"],"names":[],"mappings":"AAkBA,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,UAAU,CAAC;IACtB,WAAW,EAAE,YAAY,CAAC;CAC3B;AAED,UAAU,uBAAuB;IAC/B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,OAAO,CAAA;CAC1B;AAED,QAAA,MAAM,kBAAkB,iEAAkE,uBAAuB,4CAkEhH,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1,10 +1,13 @@
1
- import { IBookDetails } from "../types/citation.types";
1
+ import { BookemonProps, IBookDetails } from "../types/citation.types";
2
2
  import "./BookDetailsCard.css";
3
3
  type BookDetailsCardProps = {
4
4
  data: IBookDetails;
5
5
  highlightTerms?: string[];
6
6
  onHighlightMatch?: (matched: boolean) => void;
7
+ highlightEnabled: boolean;
8
+ citationType?: BookemonProps['citationType'];
9
+ citationSubTitle?: BookemonProps['citationSubTitle'];
7
10
  };
8
- declare const BookDetailsCard: ({ data, highlightTerms, onHighlightMatch }: BookDetailsCardProps) => import("react/jsx-runtime").JSX.Element;
11
+ declare const BookDetailsCard: ({ data, highlightTerms, onHighlightMatch, highlightEnabled, citationType, citationSubTitle }: BookDetailsCardProps) => import("react/jsx-runtime").JSX.Element;
9
12
  export default BookDetailsCard;
10
13
  //# sourceMappingURL=BookDetailsCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookDetailsCard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookDetailsCard/BookDetailsCard.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,uBAAuB,CAAC;AAmF/B,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,YAAY,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C,CAAC;AACF,QAAA,MAAM,eAAe,+CAAgD,oBAAoB,4CAiMxF,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"BookDetailsCard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookDetailsCard/BookDetailsCard.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,uBAAuB,CAAC;AAmF/B,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,YAAY,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,OAAO,CAAA;IACzB,YAAY,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAC7C,gBAAgB,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CACtD,CAAC;AACF,QAAA,MAAM,eAAe,iGAAkG,oBAAoB,4CAmM1I,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import "./BookElementsCard.css";
2
+ import { BookemonProps } from '../types/citation.types';
2
3
  export interface IQuote {
3
4
  text: string;
4
5
  chapter: string;
@@ -42,7 +43,10 @@ interface BookElementsCardProps {
42
43
  locations?: number;
43
44
  characters?: number;
44
45
  };
46
+ citationType: BookemonProps['citationType'];
47
+ citationSubTitle: BookemonProps['citationSubTitle'];
48
+ highlightEnabled: boolean;
45
49
  }
46
- declare const BookElementsCard: ({ data, updateQuotesToHighLight, handleFetchManuscriptElements, BookIsbn, title, highlightTerms, onHighlightMatch, defaultPages }: BookElementsCardProps) => import("react/jsx-runtime").JSX.Element;
50
+ declare const BookElementsCard: ({ data, updateQuotesToHighLight, handleFetchManuscriptElements, BookIsbn, title, highlightTerms, onHighlightMatch, defaultPages, citationType, citationSubTitle, highlightEnabled }: BookElementsCardProps) => import("react/jsx-runtime").JSX.Element;
47
51
  export default BookElementsCard;
48
52
  //# sourceMappingURL=BookElementsCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookElementsCard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookElementsCard/BookElementsCard.tsx"],"names":[],"mappings":"AASA,OAAO,wBAAwB,CAAC;AA0IhC,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAG,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAG,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAG,MAAM,EAAE,CAAC;IACpB,IAAI,EAAG,MAAM,CAAA;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,UAAU,EAAE,UAAU,EAAE,CAAC;CAC1B;AAED,UAAU,qBAAqB;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IACxB,uBAAuB,EAAE,CAAC,eAAe,EAAE,MAAM,EAAC,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAM,EAAE,EAAE,YAAY,EAAG,MAAM,KAAK,IAAI,CAAC;IACnH,6BAA6B,EAAE,CAAC,EAC/B,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,KAAK,EACN,EAAE;QACD,QAAQ,EAAE,GAAG,CAAC;QACd,IAAI,EAAE,GAAG,CAAC;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG,CAAC;QACV,KAAK,EAAG,MAAM,CAAA;KACf,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACnB,QAAQ,EAAG,MAAM,CAAC;IAClB,KAAK,EAAG,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,YAAY,CAAC,EAAE;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,QAAA,MAAM,gBAAgB,sIASnB,qBAAqB,4CA6iBvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"BookElementsCard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookElementsCard/BookElementsCard.tsx"],"names":[],"mappings":"AASA,OAAO,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AA0IxD,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAG,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAG,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAG,MAAM,EAAE,CAAC;IACpB,IAAI,EAAG,MAAM,CAAA;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,UAAU,EAAE,UAAU,EAAE,CAAC;CAC1B;AAED,UAAU,qBAAqB;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IACxB,uBAAuB,EAAE,CAAC,eAAe,EAAE,MAAM,EAAC,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAM,EAAE,EAAE,YAAY,EAAG,MAAM,KAAK,IAAI,CAAC;IACnH,6BAA6B,EAAE,CAAC,EAC/B,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,KAAK,EACN,EAAE;QACD,QAAQ,EAAE,GAAG,CAAC;QACd,IAAI,EAAE,GAAG,CAAC;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG,CAAC;QACV,KAAK,EAAG,MAAM,CAAA;KACf,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACnB,QAAQ,EAAG,MAAM,CAAC;IAClB,KAAK,EAAG,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,YAAY,CAAC,EAAE;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,YAAY,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAC5C,gBAAgB,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACpD,gBAAgB,EAAE,OAAO,CAAA;CAC1B;AAED,QAAA,MAAM,gBAAgB,wLAYnB,qBAAqB,4CAijBvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -13,7 +13,8 @@ interface BookOverviewCardProps {
13
13
  data: IBookOverview;
14
14
  highlightTerms?: string[];
15
15
  onHighlightMatch?: (matched: boolean) => void;
16
+ highlightEnabled?: boolean;
16
17
  }
17
- declare const BookOverviewCard: ({ data, highlightTerms, onHighlightMatch }: BookOverviewCardProps) => import("react/jsx-runtime").JSX.Element;
18
+ declare const BookOverviewCard: ({ data, highlightTerms, onHighlightMatch, highlightEnabled }: BookOverviewCardProps) => import("react/jsx-runtime").JSX.Element;
18
19
  export default BookOverviewCard;
19
20
  //# sourceMappingURL=BookOverviewCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookOverviewCard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookOverviewCard/BookOverviewCard.tsx"],"names":[],"mappings":"AAMA,OAAO,wBAAwB,CAAC;AAwIhC,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAG,MAAM,CAAC;IAChB,iBAAiB,EAAG,MAAM,CAAC;IAC3B,eAAe,EAAG,MAAM,CAAC;IACzB,cAAc,EAAG,GAAG,EAAE,CAAA;CACvB;AAED,UAAU,qBAAqB;IAC7B,IAAI,EAAE,aAAa,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C;AAED,QAAA,MAAM,gBAAgB,+CAAgD,qBAAqB,4CAqP1F,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"BookOverviewCard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookOverviewCard/BookOverviewCard.tsx"],"names":[],"mappings":"AAMA,OAAO,wBAAwB,CAAC;AAyIhC,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAG,MAAM,CAAC;IAChB,iBAAiB,EAAG,MAAM,CAAC;IAC3B,eAAe,EAAG,MAAM,CAAC;IACzB,cAAc,EAAG,GAAG,EAAE,CAAA;CACvB;AAED,UAAU,qBAAqB;IAC7B,IAAI,EAAE,aAAa,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,QAAA,MAAM,gBAAgB,iEAAkE,qBAAqB,4CAsP5G,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -28,7 +28,8 @@ interface BookPeopleAwardsCardProps {
28
28
  data: IBookPeopleAwardsData;
29
29
  highlightTerms?: string[];
30
30
  onHighlightMatch?: (matched: boolean) => void;
31
+ highlightEnabled: boolean;
31
32
  }
32
- declare const BookPeopleAwardsCard: ({ data, highlightTerms, onHighlightMatch }: BookPeopleAwardsCardProps) => import("react/jsx-runtime").JSX.Element;
33
+ declare const BookPeopleAwardsCard: ({ data, highlightTerms, onHighlightMatch, highlightEnabled }: BookPeopleAwardsCardProps) => import("react/jsx-runtime").JSX.Element;
33
34
  export default BookPeopleAwardsCard;
34
35
  //# sourceMappingURL=BookPeopleAwardsCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookPeopleAwardsCard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookPeopleAwardsCard/BookPeopleAwardsCard.tsx"],"names":[],"mappings":"AAGA,OAAO,4BAA4B,CAAA;AAwGnC,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAG,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,UAAU,CAAC;IACtB,YAAY,EAAE;QACZ,OAAO,EAAE,YAAY,EAAE,CAAC;QACxB,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;KAC7B,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,UAAU,yBAAyB;IACjC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C;AAED,QAAA,MAAM,oBAAoB,+CAAgD,yBAAyB,4CA2LlG,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"BookPeopleAwardsCard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookPeopleAwardsCard/BookPeopleAwardsCard.tsx"],"names":[],"mappings":"AAGA,OAAO,4BAA4B,CAAA;AAwGnC,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAG,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,UAAU,CAAC;IACtB,YAAY,EAAE;QACZ,OAAO,EAAE,YAAY,EAAE,CAAC;QACxB,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;KAC7B,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,UAAU,yBAAyB;IACjC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,OAAO,CAAA;CAC1B;AAED,QAAA,MAAM,oBAAoB,iEAAkE,yBAAyB,4CA2LpH,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -4,6 +4,6 @@ export declare const comingSoonStyles: {
4
4
  [key: string]: CSSProperties;
5
5
  };
6
6
  export declare const defaultIcon: import("react/jsx-runtime").JSX.Element;
7
- declare const Bookemon: ({ open, onClose, isDialog, isBookPreview, isNonHighlightedBlur, isBookemon, getHighlightContent, handleFetchManuscriptElements, data, showComingSoon, comingSoonData, customStyle, isBlurToggleVisible, highlightTerms, defaultElementPages }: BookemonProps) => import("react/jsx-runtime").JSX.Element;
7
+ declare const Bookemon: ({ open, onClose, isDialog, isBookPreview, isNonHighlightedBlur, isBookemon, getHighlightContent, handleFetchManuscriptElements, data, showComingSoon, comingSoonData, customStyle, isBlurToggleVisible, highlightTerms, defaultElementPages, citationType, citationSubTitle }: BookemonProps) => import("react/jsx-runtime").JSX.Element;
8
8
  export default Bookemon;
9
9
  //# sourceMappingURL=Bookemon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Bookemon.d.ts","sourceRoot":"","sources":["../../../../../src/features/Bookemon/Bookemon.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAa7C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAWvD,eAAO,MAAM,gBAAgB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CA4C5D,CAAC;AACF,eAAO,MAAM,WAAW,yCAcvB,CAAC;AAUF,QAAA,MAAM,QAAQ,kPAoBX,aAAa,4CAsMf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Bookemon.d.ts","sourceRoot":"","sources":["../../../../../src/features/Bookemon/Bookemon.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAa7C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAWvD,eAAO,MAAM,gBAAgB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CA4C5D,CAAC;AACF,eAAO,MAAM,WAAW,yCAcvB,CAAC;AAUF,QAAA,MAAM,QAAQ,kRAsBX,aAAa,4CAwMf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { BookemonProps } from "./types/citation.types";
2
- export declare const BookemonContent: ({ showComingSoon, onClose, highlightTerms, data, customStyle, comingSoonData, isNonHighlightedBlur, isBlurToggleVisible, isBookemon, getHighlightContent, handleFetchManuscriptElements, isBookPreview, isDialog, defaultElementPages }: BookemonProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const BookemonContent: ({ showComingSoon, onClose, highlightTerms, data, customStyle, comingSoonData, isNonHighlightedBlur, isBlurToggleVisible, isBookemon, getHighlightContent, handleFetchManuscriptElements, isBookPreview, isDialog, defaultElementPages, citationType, citationSubTitle }: BookemonProps) => import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=BookemonContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookemonContent.d.ts","sourceRoot":"","sources":["../../../../../src/features/Bookemon/BookemonContent.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AA0LvD,eAAO,MAAM,eAAe,4OAevB,aAAa,4CAwgBf,CAAC"}
1
+ {"version":3,"file":"BookemonContent.d.ts","sourceRoot":"","sources":["../../../../../src/features/Bookemon/BookemonContent.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AA0LvD,eAAO,MAAM,eAAe,4QAiBvB,aAAa,4CAmhBf,CAAC"}
@@ -59,5 +59,7 @@ export interface BookemonProps {
59
59
  locations?: number;
60
60
  characters?: number;
61
61
  };
62
+ citationType?: string;
63
+ citationSubTitle?: "book_summary" | "genre_details" | "book_marketing_collateral" | "contributor_biography_details" | "audience_details" | "prize_details" | "location_details" | "notable_characters" | "notable_quotes" | "section_details" | "contributor_details" | "publisher_details" | "book_stats" | "copyright_details" | "supporting_excerpts";
62
64
  }
63
65
  //# sourceMappingURL=citation.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"citation.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/types/citation.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,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,aAAa;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3D,6BAA6B,EAAE,CAAC,IAAI,EAAE;QACpC,QAAQ,EAAE,GAAG,CAAC;QACd,IAAI,EAAE,GAAG,CAAC;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG,CAAC;QACV,KAAK,EAAE,MAAM,CAAC;KACf,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAEnB,IAAI,EAAE,GAAG,CAAC;IACV,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,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,WAAW,CAAC,EAAE;QACZ,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,UAAU,CAAC,EAAE,aAAa,CAAC;QAC3B,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,CAAC;KACH,CAAC;IACF,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,mBAAmB,CAAC,EAAE;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH"}
1
+ {"version":3,"file":"citation.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/types/citation.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,WAAW,YAAY;IACzB,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,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3D,6BAA6B,EAAE,CAAC,IAAI,EAAE;QAClC,QAAQ,EAAE,GAAG,CAAC;QACd,IAAI,EAAE,GAAG,CAAC;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG,CAAC;QACV,KAAK,EAAE,MAAM,CAAC;KACjB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAEnB,IAAI,EAAE,GAAG,CAAC;IACV,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;KAC1B,CAAC;IACF,WAAW,CAAC,EAAE;QACV,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,UAAU,CAAC,EAAE,aAAa,CAAC;QAC3B,mBAAmB,CAAC,EAAE;YAClB,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;SACnC,CAAC;KACL,CAAC;IACF,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,mBAAmB,CAAC,EAAE;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EACX,cAAc,GACd,eAAe,GACf,2BAA2B,GAC3B,+BAA+B,GAC/B,kBAAkB,GAClB,eAAe,GACf,kBAAkB,GAClB,oBAAoB,GACpB,gBAAgB,GAChB,iBAAiB,GACjB,qBAAqB,GACrB,mBAAmB,GACnB,YAAY,GACZ,mBAAmB,GACnB,qBAAqB,CAAC;CAC/B"}
@@ -1,9 +1,11 @@
1
+ import { CustomStylesType } from "./PdfViewer";
1
2
  export declare const pdfWorker: string;
2
3
  type Props = {
3
4
  pdfUrl: string;
4
5
  plugins: any[];
5
6
  onLoad: () => void;
7
+ customStyles?: CustomStylesType;
6
8
  };
7
- declare const PdfContainer: ({ pdfUrl, plugins, onLoad }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ declare const PdfContainer: ({ pdfUrl, plugins, onLoad, customStyles }: Props) => import("react/jsx-runtime").JSX.Element;
8
10
  export default PdfContainer;
9
11
  //# sourceMappingURL=PdfContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PdfContainer.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfContainer.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,EAAE,MAAwE,CAAC;AAGjG,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,YAAY,gCAAiC,KAAK,4CAavD,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"PdfContainer.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfContainer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,eAAO,MAAM,SAAS,EAAE,MAAwE,CAAC;AAEjG,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF,QAAA,MAAM,YAAY,8CAA+C,KAAK,4CAarE,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,4 +1,32 @@
1
- import { CSSProperties } from "react";
1
+ import { CSSProperties, ReactNode } from "react";
2
+ export interface PdfCustomIcons {
3
+ pdfIcon?: ReactNode;
4
+ fullScreenIcon?: ReactNode;
5
+ downloadIcon?: ReactNode;
6
+ closeIcon?: ReactNode;
7
+ }
8
+ export interface PdfCustomStyles {
9
+ pdfViewer?: CSSProperties;
10
+ card?: CSSProperties;
11
+ header?: CSSProperties;
12
+ title?: CSSProperties;
13
+ toolbar?: CSSProperties;
14
+ button?: CSSProperties;
15
+ buttonDisabled?: CSSProperties;
16
+ counter?: CSSProperties;
17
+ viewerWrapper?: CSSProperties;
18
+ emptyState?: CSSProperties;
19
+ pdfContainer?: CSSProperties;
20
+ }
21
+ export interface PdfCustomClasses {
22
+ pdfViewer?: string;
23
+ header?: string;
24
+ headerLeft?: string;
25
+ headerRight?: string;
26
+ pdfContainer?: string;
27
+ emptyState?: string;
28
+ iconButton?: string;
29
+ }
2
30
  export declare const pdfStyles: {
3
31
  [key: string]: CSSProperties;
4
32
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PdfStyle.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAO,MAAM,SAAS,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CA8ErD,CAAC"}
1
+ {"version":3,"file":"PdfStyle.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CA8ErD,CAAC"}