@pickaxeproject/react 0.0.69 → 0.0.71

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../../../hooks/pickaxe/usePickaxeContext.js"),a=require("../../../../hooks/studio/useStyleFontSize.js"),t=require("../../common/PickaxeMarkdown/index.js"),o=require("../../common/PickaxeMarkdown/Renderer.js"),c=require("../../common/PickaxeIcon.js"),r=require("../../common/PickaxeCopyButton.js"),i=require("../../../../common/cn.js");exports.default=({index:n,message:l})=>{var x;const{formId:d,pickaxe:m,styles:u,colors:j,misc:h,responsiveBy:p}=s.usePickaxeContext(),k=a.useStyleFontSize(),b=null!==(x=null==m?void 0:m.chaticon)&&void 0!==x?x:`https://prod-pickaxe-assets.s3.us-west-2.amazonaws.com/chaticons/${d}.png`;return"assistant"===l.role?e.jsx("div",Object.assign({className:i.default("flex flex-col","viewport"===p?"min-[767px]:max-w-[80%]":"@[767px]/pickaxe-root:max-w-[80%]")},{children:e.jsxs("div",Object.assign({className:"flex gap-x-3"},{children:[h.isChatImage&&"NONE"!==b&&e.jsx(c.default,{src:b,alt:"Assistant",width:24,height:24,className:"my-3 h-6 w-6",textColor:j.text}),e.jsxs("div",Object.assign({className:"flex flex-col"},{children:[e.jsx("div",Object.assign({className:i.default(k.b2,"chat-message overflow-x-auto overflow-y-hidden rounded px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]")},{children:e.jsx(t.PickaxeMarkdown,Object.assign({theme:u.theme,accentColor:j.accent,linkPreviews:!0,actions:!0},{children:e.jsx(o.PickaxeMarkdownRenderer,Object.assign({value:l.content},0===n&&{maxChar:360}))}))})),e.jsx("div",Object.assign({className:"mb-2 ml-2 mt-4 flex gap-3"},{children:e.jsx(r.default,{color:j.accent,text:l.content})}))]}))]}))})):"user"===l.role?e.jsx("div",Object.assign({className:i.default("flex gap-x-3 justify-self-end pl-9","viewport"===p?"min-[767px]:max-w-[80%] min-[767px]:pl-0":"@[767px]/pickaxe-root:max-w-[80%] @[767px]/pickaxe-root:pl-0")},{children:e.jsx("div",Object.assign({className:i.default(k.b2,"overflow-x-auto overflow-y-hidden rounded px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]"),style:{backgroundColor:j.secondary+"80",color:j.secondaryText}},{children:e.jsx(t.PickaxeMarkdown,Object.assign({theme:u.theme,accentColor:j.accent},{children:e.jsx(o.PickaxeMarkdownRenderer,{value:l.content})}))}))})):e.jsx("div",{})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../../../hooks/pickaxe/usePickaxeContext.js"),a=require("../../../../hooks/pickaxe/useDimensionContext.js"),t=require("../../../../hooks/studio/useStyleFontSize.js"),o=require("../../common/PickaxeMarkdown/index.js"),r=require("../../common/PickaxeMarkdown/Renderer.js"),c=require("../../common/PickaxeIcon.js"),i=require("../../common/PickaxeCopyButton.js"),n=require("../../../../common/cn.js");exports.default=({index:l,message:x})=>{var d;const{formId:m,pickaxe:u,styles:h,colors:j,misc:p,responsiveBy:k}=s.usePickaxeContext(),{width:w}=a.useDimensionContext(),b=t.useStyleFontSize(),v=null!==(d=null==u?void 0:u.chaticon)&&void 0!==d?d:`https://prod-pickaxe-assets.s3.us-west-2.amazonaws.com/chaticons/${m}.png`;return"assistant"===x.role?e.jsx("div",Object.assign({className:n.default("flex flex-col","viewport"===k?"min-[767px]:max-w-[80%]":"@[767px]/pickaxe-root:max-w-[80%]")},{children:e.jsxs("div",Object.assign({className:"flex gap-x-3"},{children:[p.isChatImage&&"NONE"!==v&&e.jsx(c.default,{src:v,alt:"Assistant",width:24,height:24,className:"my-3 h-6 w-6",textColor:j.text}),e.jsxs("div",Object.assign({className:"flex flex-col"},{children:[e.jsx("div",Object.assign({className:n.default(b.b2,"chat-message overflow-x-auto overflow-y-hidden rounded px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]")},{children:e.jsx(o.PickaxeMarkdown,Object.assign({theme:h.theme,accentColor:j.accent,linkPreviews:!0,actions:!0},{children:e.jsx(r.PickaxeMarkdownRenderer,Object.assign({value:x.content},0===l&&{maxChar:w<=767?176:360}))}))})),e.jsx("div",Object.assign({className:"mb-2 ml-2 mt-4 flex gap-3"},{children:e.jsx(i.default,{color:j.accent,text:x.content})}))]}))]}))})):"user"===x.role?e.jsx("div",Object.assign({className:n.default("flex gap-x-3 justify-self-end pl-9","viewport"===k?"min-[767px]:max-w-[80%] min-[767px]:pl-0":"@[767px]/pickaxe-root:max-w-[80%] @[767px]/pickaxe-root:pl-0")},{children:e.jsx("div",Object.assign({className:n.default(b.b2,"overflow-x-auto overflow-y-hidden rounded px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]"),style:{backgroundColor:j.secondary+"80",color:j.secondaryText}},{children:e.jsx(o.PickaxeMarkdown,Object.assign({theme:h.theme,accentColor:j.accent},{children:e.jsx(r.PickaxeMarkdownRenderer,{value:x.content})}))}))})):e.jsx("div",{})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),a=require("../../../../hooks/pickaxe/usePickaxeContext.js"),t=require("../../../../hooks/pickaxe/useResponseContext.js"),r=require("../../../../hooks/studio/useStyleFontSize.js"),l=require("../../../../hooks/pickaxe/useConversation.js"),o=require("../../common/PickaxeIcon.js"),i=require("../../../Core/ErrorAlert.js"),n=require("../../Addons/Scroll/ScrollLockView.js"),c=require("../../common/PickaxeHead.js"),d=require("../../common/PickaxeInfoModal.js"),x=require("../../common/PickaxeUpgradeCard.js"),u=require("./Message.js"),m=require("../../../../common/cn.js");exports.default=()=>{var j;const p=l.useConversation(),g=r.useStyleFontSize(),{pickaxe:f,styles:h,colors:k,responsiveBy:E,isNewChat:b,setChatId:v}=a.usePickaxeContext(),{messages:w,status:y,limitData:N,error:C}=t.useResponseContext(),[O,q]=s.useState(!1),S=s.useMemo((()=>!!p.data&&!(p.data.messages.length<=1)),[p.data]),F=s.useMemo((()=>p.isSuccess&&b&&!S),[p.isSuccess,b,S]);return e.jsxs("div",Object.assign({className:"relative flex flex-grow flex-col justify-end"},{children:[O&&e.jsx(d.default,{isOpen:O,onChangeIsOpen:q}),e.jsx("div",Object.assign({className:m.default("absolute left-1/2 top-5 flex w-full max-w-[400px] -translate-x-1/2 -translate-y-1/3 transform flex-col items-center px-4 opacity-0 duration-300",F&&"top-1/3 opacity-100")},{children:e.jsx(c.default,{iconClassName:"duration-300 hover:opacity-90",onIconClick:()=>v("")})})),e.jsx("div",Object.assign({className:"flex w-full justify-center"},{children:p.isLoading?e.jsxs("div",Object.assign({className:"grid w-full max-w-[800px] grid-cols-1 gap-y-6 px-6 pt-10"},{children:[e.jsx("div",{className:"h-10 w-[70%] animate-pulse justify-self-end rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===h.theme?"#1E1E1F":"#E5E7EB"}}),e.jsx("div",{className:"h-[150px] w-[70%] animate-pulse rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===h.theme?"#1E1E1F":"#E5E7EB"}}),e.jsx("div",{className:"h-10 w-[50%] animate-pulse justify-self-end rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===h.theme?"#1E1E1F":"#E5E7EB"}})]})):p.isError?e.jsx("div",Object.assign({className:"flex w-full max-w-[800px] justify-center pt-10"},{children:e.jsxs("p",Object.assign({className:m.default(g.b2,"text-center font-semibold")},{children:["Something went wrong. Please try again, or"," ",e.jsx("a",Object.assign({href:"mailto:info@pickaxeproject.com?subject=Help",target:"_blank",rel:"noreferrer"},{children:"contact us"}))," ","for help."]}))})):e.jsxs("div",Object.assign({className:"flex flex-col w-full"},{children:[e.jsxs("div",Object.assign({className:m.default("relative grid w-full max-w-[800px] grid-cols-1 gap-y-6 px-4 pt-6","viewport"===E?"min-[767px]:pt-10":"@[767px]/pickaxe-root:pt-10")},{children:[p.data.messages.map(((s,a)=>e.jsx(u.default,{index:a,message:s},a))),w.map(((s,a)=>e.jsx(u.default,{index:p.data.messages.length+a,message:s},a))),"fetching"===y?e.jsxs("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:["NONE"!==(null==f?void 0:f.chaticon)&&e.jsx(o.default,{src:null!==(j=null==f?void 0:f.chaticon)&&void 0!==j?j:`https://prod-pickaxe-assets.s3.us-west-2.amazonaws.com/chaticons/${null==f?void 0:f.formid}.png`,alt:`${null==f?void 0:f.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6",textColor:k.text}),e.jsxs("div",Object.assign({className:"flex items-center gap-x-2 rounded px-4 py-4",style:{backgroundColor:k.secondary+"80",color:k.secondaryText}},{children:[e.jsx("div",{className:"h-1.5 w-1.5 animate-dot rounded-full",style:{backgroundColor:k.secondaryText}}),e.jsx("div",{className:"h-1.5 w-1.5 animate-dot-down rounded-full",style:{backgroundColor:k.secondaryText}}),e.jsx("div",{className:"h-1.5 w-1.5 animate-dot rounded-full",style:{backgroundColor:k.secondaryText}})]}))]})):N?e.jsx("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:e.jsx(x.default,{})})):C?e.jsx("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:e.jsx(i.default,{error:C})})):null]})),e.jsx(n.default,{className:"w-full"})]}))}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),a=require("../../../../hooks/pickaxe/usePickaxeContext.js"),t=require("../../../../hooks/pickaxe/useResponseContext.js"),o=require("../../../../hooks/pickaxe/useDimensionContext.js"),i=require("../../../../hooks/studio/useStyleFontSize.js"),r=require("../../../../hooks/pickaxe/useConversation.js"),l=require("../../common/PickaxeIcon.js"),n=require("../../../Core/ErrorAlert.js"),c=require("../../Addons/Scroll/ScrollLockView.js"),d=require("../../common/PickaxeHead.js"),x=require("../../common/PickaxeInfoModal.js"),u=require("../../common/PickaxeUpgradeCard.js"),m=require("./Message.js"),p=require("../../../../common/cn.js");exports.default=()=>{var j;const g=r.useConversation(),f=i.useStyleFontSize(),{pickaxe:h,styles:k,colors:E,responsiveBy:b,isNewChat:v,setChatId:y}=a.usePickaxeContext(),{messages:w,status:C,limitData:N,error:O}=t.useResponseContext(),{height:q}=o.useDimensionContext(),[S,F]=s.useState(!1),P=s.useMemo((()=>!!g.data&&!(g.data.messages.length<=1)),[g.data]),B=s.useMemo((()=>g.isSuccess&&v&&!P),[g.isSuccess,v,P]);return e.jsxs("div",Object.assign({className:"relative flex flex-grow flex-col justify-end"},{children:[S&&e.jsx(x.default,{isOpen:S,onChangeIsOpen:F}),e.jsx("div",Object.assign({className:p.default("absolute left-1/2 top-5 flex w-full max-w-[400px] -translate-x-1/2 -translate-y-1/3 transform flex-col items-center px-4 opacity-0 duration-300",B&&"top-1/3 opacity-100 [@media(max-height:630px)]:top-5 [@media(max-height:630px)]:opacity-0",q<630&&"top-5 opacity-0")},{children:e.jsx(d.default,{iconClassName:"duration-300 hover:opacity-90",onIconClick:()=>y("")})})),e.jsx("div",Object.assign({className:"flex w-full justify-center"},{children:g.isLoading?e.jsxs("div",Object.assign({className:"grid w-full max-w-[800px] grid-cols-1 gap-y-6 px-6 pt-10"},{children:[e.jsx("div",{className:"h-10 w-[70%] animate-pulse justify-self-end rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===k.theme?"#1E1E1F":"#E5E7EB"}}),e.jsx("div",{className:"h-[150px] w-[70%] animate-pulse rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===k.theme?"#1E1E1F":"#E5E7EB"}}),e.jsx("div",{className:"h-10 w-[50%] animate-pulse justify-self-end rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===k.theme?"#1E1E1F":"#E5E7EB"}})]})):g.isError?e.jsx("div",Object.assign({className:"flex w-full max-w-[800px] justify-center pt-10"},{children:e.jsxs("p",Object.assign({className:p.default(f.b2,"text-center font-semibold")},{children:["Something went wrong. Please try again, or"," ",e.jsx("a",Object.assign({href:"mailto:info@pickaxeproject.com?subject=Help",target:"_blank",rel:"noreferrer"},{children:"contact us"}))," ","for help."]}))})):e.jsxs("div",Object.assign({className:"flex flex-col w-full"},{children:[e.jsxs("div",Object.assign({className:p.default("relative grid w-full max-w-[800px] grid-cols-1 gap-y-6 px-4 pt-6","viewport"===b?"min-[767px]:pt-10":"@[767px]/pickaxe-root:pt-10")},{children:[g.data.messages.map(((s,a)=>e.jsx(m.default,{index:a,message:s},a))),w.map(((s,a)=>e.jsx(m.default,{index:g.data.messages.length+a,message:s},a))),"fetching"===C?e.jsxs("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:["NONE"!==(null==h?void 0:h.chaticon)&&e.jsx(l.default,{src:null!==(j=null==h?void 0:h.chaticon)&&void 0!==j?j:`https://prod-pickaxe-assets.s3.us-west-2.amazonaws.com/chaticons/${null==h?void 0:h.formid}.png`,alt:`${null==h?void 0:h.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6",textColor:E.text}),e.jsxs("div",Object.assign({className:"flex items-center gap-x-2 rounded px-4 py-4",style:{backgroundColor:E.secondary+"80",color:E.secondaryText}},{children:[e.jsx("div",{className:"h-1.5 w-1.5 animate-dot rounded-full",style:{backgroundColor:E.secondaryText}}),e.jsx("div",{className:"h-1.5 w-1.5 animate-dot-down rounded-full",style:{backgroundColor:E.secondaryText}}),e.jsx("div",{className:"h-1.5 w-1.5 animate-dot rounded-full",style:{backgroundColor:E.secondaryText}})]}))]})):N?e.jsx("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:e.jsx(u.default,{})})):O?e.jsx("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:e.jsx(n.default,{error:O})})):null]})),e.jsx(c.default,{className:"w-full"})]}))}))]}))};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react");const r=t.createContext({});exports.DimensionContext=r,exports.default=({children:s})=>{const[i,n]=t.useState(0),[o,u]=t.useState(0);return e.jsx(r.Provider,Object.assign({value:{width:i,height:o,setWidth:n,setHeight:u,setDimension:(e,t)=>{n(e),u(t)}}},{children:s}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),s=require("./Addons/Document/Provider.js"),r=require("./ResponseProvider.js");const o=t.createContext({});exports.PickaxeContext=o,exports.PickaxeProvider=({children:i,userId:a="",studioUserId:n="",deploymentId:d="",styles:c,colors:l,limits:u={},misc:F={isWhiteLabel:!0,isProfileImage:!0,isChatImage:!0,isTitle:!0,isDescription:!0},responsiveBy:m="viewport",loadFont:I=!0,forceMobile:h=!1,onGenerateComplete:x})=>{const[p,f]=t.useState(""),[y,S]=t.useState(""),[j,b]=t.useState(null),[v,P]=t.useState(!1),[g,C]=t.useState(!0),[k,w]=t.useState(!0),[O,q]=t.useState(!1);return t.useEffect((()=>{P(!1)}),[null==c?void 0:c.font]),e.jsx(o.Provider,Object.assign({value:Object.assign({formId:p,chatId:y,userId:a,studioUserId:n,deploymentId:d,pickaxe:j,styles:Object.assign({theme:"light",font:"Real Head Pro",fontSize:"md",formFieldStyle:"box",btnStyle:"filled",outlineThickness:1,cornerRadius:4},c),colors:Object.assign({primary:"#F6F8FA",text:"#000000",secondary:"#FFFFFF",secondaryText:"#000000",accent:"#228DD7",accentText:"#FFFFFF",error:"#EF4444"},l),misc:F,responsiveBy:m,isFontLoaded:v,isNewChat:g,isShowIceBreaker:k,isShowHistory:O,loadFont:I,forceMobile:h,setIsFontLoaded:P,setFormId:f,setChatId:S,setPickaxe:b,setIsNewChat:C,setIsShowIceBreaker:w,setIsShowHistory:q},x&&{onGenerateComplete:x})},{children:e.jsx(r.default,Object.assign({limits:u},{children:e.jsx(s.default,{children:i})}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),s=require("./Addons/Document/Provider.js"),r=require("./ResponseProvider.js"),i=require("./DimensionProvider.js");const o=t.createContext({});exports.PickaxeContext=o,exports.PickaxeProvider=({children:a,userId:n="",studioUserId:d="",deploymentId:c="",styles:l,colors:u,limits:F={},misc:m={isWhiteLabel:!0,isProfileImage:!0,isChatImage:!0,isTitle:!0,isDescription:!0},responsiveBy:h="viewport",loadFont:x=!0,forceMobile:I=!1,onGenerateComplete:f})=>{const[p,j]=t.useState(""),[y,S]=t.useState(""),[v,b]=t.useState(null),[P,g]=t.useState(!1),[C,k]=t.useState(!0),[w,O]=t.useState(!0),[q,D]=t.useState(!1);return t.useEffect((()=>{g(!1)}),[null==l?void 0:l.font]),e.jsx(o.Provider,Object.assign({value:Object.assign({formId:p,chatId:y,userId:n,studioUserId:d,deploymentId:c,pickaxe:v,styles:Object.assign({theme:"light",font:"Real Head Pro",fontSize:"md",formFieldStyle:"box",btnStyle:"filled",outlineThickness:1,cornerRadius:4},l),colors:Object.assign({primary:"#F6F8FA",text:"#000000",secondary:"#FFFFFF",secondaryText:"#000000",accent:"#228DD7",accentText:"#FFFFFF",error:"#EF4444"},u),misc:m,responsiveBy:h,isFontLoaded:P,isNewChat:C,isShowIceBreaker:w,isShowHistory:q,loadFont:x,forceMobile:I,setIsFontLoaded:g,setFormId:j,setChatId:S,setPickaxe:b,setIsNewChat:k,setIsShowIceBreaker:O,setIsShowHistory:D},f&&{onGenerateComplete:f})},{children:e.jsx(r.default,Object.assign({limits:F},{children:e.jsx(i.default,{children:e.jsx(s.default,{children:a})})}))}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),i=require("react"),t=require("./hooks/usePickaxeMarkdownContext.js"),n=require("react-markdown"),s=require("remark-gfm"),l=require("remark-math"),a=require("rehype-katex"),o=require("rehype-raw"),d=require("./Custom/A/index.js"),m=require("./Custom/P/index.js"),c=require("./Custom/Img/index.js"),u=require("./Custom/Iframe/index.js"),h=require("./Custom/Code/index.js"),g=require("./Custom/common/LinkPreview.js"),j=require("./Custom/common/TextModal.js");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=x(n),f=x(s),b=x(l),y=x(a),k=x(o);exports.PickaxeMarkdownRenderer=({className:n,style:s,value:l,recursion:a=!1,children:o,maxChar:x})=>{const{theme:O,accentColor:q,websiteMetadatas:v}=t.usePickaxeMarkdownContext(),[C,B]=i.useState(!1),D=i.useRef(null),S=i.useMemo((()=>{if(!l)return"";let e=l;return e=l.replace(/<!--[\s\S]*?-->/g,""),e=l.replace(/\u200B/g,""),x&&(e=e.slice(0,x)),e}),[l,x]),w={h1:({node:e,children:i})=>r.jsx("h1",Object.assign({style:{fontSize:"2.25rem",lineHeight:"2.5rem",marginBottom:"1.5rem"}},{children:i})),h2:({node:e,children:i})=>r.jsx("h2",Object.assign({style:{fontSize:"1.875rem",lineHeight:"2.25rem",marginBottom:"0.75rem"}},{children:i})),h3:({node:e,children:i})=>r.jsx("h3",Object.assign({style:{fontSize:"1.5rem",lineHeight:"2rem",marginBottom:"0.5rem"}},{children:i})),h4:({node:e,children:i})=>r.jsx("h4",Object.assign({className:"mt-2",style:{fontSize:"1.25rem",lineHeight:"1.75rem",marginBottom:"0.5rem"}},{children:i})),h5:({node:e,children:i})=>r.jsx("h5",Object.assign({style:{fontSize:"1.125rem",lineHeight:"1.75rem",marginBottom:"0.5rem"}},{children:i})),p:m.default,a:d.default,ol:({node:e,children:i})=>r.jsx("ol",Object.assign({style:{listStyleType:"decimal",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"1.5rem"}},{children:i})),ul:({node:e,children:i})=>r.jsx("ul",Object.assign({style:{listStyleType:"disc",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"1.5rem"}},{children:i})),li:({node:e,children:i})=>r.jsx("li",{children:i}),table:({children:e})=>r.jsx("div",Object.assign({style:{position:"relative",overflow:"auto",marginBottom:"1.5rem"}},{children:r.jsx("table",Object.assign({style:{tableLayout:"fixed",fontSize:"0.875rem",lineHeight:"1.24rem"}},{children:e}))})),th:({node:e,children:i})=>r.jsx("th",Object.assign({style:{padding:"0.75em 1em",fontWeight:600,textAlign:"left"}},{children:i})),tr:({node:e,children:i})=>r.jsx("tr",Object.assign({style:{border:"dark"===O?"1px solid #30363D":"1px solid #D0D7DE"}},{children:i})),td:({node:e,children:i})=>r.jsx("td",Object.assign({style:{padding:"0.75em 1em"}},{children:i})),code:h.default,blockquote:({node:e,children:i})=>r.jsx("blockquote",Object.assign({style:{lineHeight:"15px",borderLeft:"dark"===O?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===O?"#8B8B8B":"#656D76",paddingLeft:"1rem",marginBottom:"1rem"}},{children:i})),img:c.default,iframe:u.default,hr:()=>r.jsx("hr",{style:{border:0,borderTop:"dark"===O?"1px solid #30363D":"1px solid #D0D7DE",marginBottom:"1.5rem"}}),span:i=>{var{node:t,children:n}=i,s=e.__rest(i,["node","children"]);return"intro-msg-expand-btn"===s.className?r.jsx("span",Object.assign({},s,{style:{display:"inline",fontWeight:500,color:q,cursor:"pointer"},onClick:()=>B(!0)},{children:n})):r.jsx("span",Object.assign({},s,{children:n}))}};return r.jsxs("div",Object.assign({className:"pxe-markdown",ref:D,style:Object.assign({position:"relative",overflowWrap:"break-word",display:"grid",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",gap:".625rem"},s)},{children:[C&&r.jsx(j.default,{value:S,isOpen:C,onChangeIsOpen:B}),r.jsx(p.default,Object.assign({},n&&{className:n},{components:w,remarkPlugins:[f.default,b.default],rehypePlugins:[y.default,k.default]},{children:`${S}${!a&&v.length>0?"\n\n---":""}${"number"==typeof x&&S.length>=x?'<span class="intro-msg-expand-btn">...</span>':""}`})),!a&&v.length>0&&r.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"2rem",marginTop:"2rem"}},{children:v.map(((e,i)=>r.jsx(g.default,{data:e},i)))})),o]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),i=require("react"),t=require("./hooks/usePickaxeMarkdownContext.js"),n=require("react-markdown"),s=require("remark-gfm"),l=require("remark-math"),a=require("rehype-katex"),o=require("rehype-raw"),d=require("./Custom/A/index.js"),m=require("./Custom/P/index.js"),c=require("./Custom/Img/index.js"),u=require("./Custom/Iframe/index.js"),h=require("./Custom/Code/index.js"),g=require("./Custom/common/LinkPreview.js"),j=require("./Custom/common/TextModal.js");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=x(n),f=x(s),b=x(l),y=x(a),O=x(o);exports.PickaxeMarkdownRenderer=({className:n,style:s,value:l,recursion:a=!1,children:o,maxChar:x})=>{const{theme:k,accentColor:q,websiteMetadatas:v}=t.usePickaxeMarkdownContext(),[C,B]=i.useState(!1),D=i.useRef(null),S=i.useMemo((()=>{if(!l)return"";let e=l;return e=l.replace(/<!--[\s\S]*?-->/g,""),e=l.replace(/\u200B/g,""),x&&(e=e.slice(0,x)),e}),[l,x]),w={h1:({node:e,children:i})=>r.jsx("h1",Object.assign({style:{fontSize:"2.25rem",lineHeight:"2.5rem",marginBottom:"1.5rem"}},{children:i})),h2:({node:e,children:i})=>r.jsx("h2",Object.assign({style:{fontSize:"1.875rem",lineHeight:"2.25rem",marginBottom:"1.5rem"}},{children:i})),h3:({node:e,children:i})=>r.jsx("h3",Object.assign({style:{fontSize:"1.5rem",lineHeight:"2rem",marginBottom:"0.5rem"}},{children:i})),h4:({node:e,children:i})=>r.jsx("h4",Object.assign({className:"mt-2",style:{fontSize:"1.25rem",lineHeight:"1.75rem",marginBottom:"0.5rem"}},{children:i})),h5:({node:e,children:i})=>r.jsx("h5",Object.assign({style:{fontSize:"1.125rem",lineHeight:"1.75rem",marginBottom:"0.5rem"}},{children:i})),p:m.default,a:d.default,ol:({node:e,children:i})=>r.jsx("ol",Object.assign({style:{listStyleType:"decimal",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"1.5rem"}},{children:i})),ul:({node:e,children:i})=>r.jsx("ul",Object.assign({style:{listStyleType:"disc",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"1.5rem"}},{children:i})),li:({node:e,children:i})=>r.jsx("li",Object.assign({style:{margin:"10px"}},{children:i})),table:({children:e})=>r.jsx("div",Object.assign({style:{position:"relative",overflow:"auto",marginBottom:"1.5rem"}},{children:r.jsx("table",Object.assign({style:{tableLayout:"fixed",fontSize:"0.875rem",lineHeight:"1.24rem"}},{children:e}))})),th:({node:e,children:i})=>r.jsx("th",Object.assign({style:{padding:"0.75em 1em",fontWeight:600,textAlign:"left"}},{children:i})),tr:({node:e,children:i})=>r.jsx("tr",Object.assign({style:{border:"dark"===k?"1px solid #30363D":"1px solid #D0D7DE"}},{children:i})),td:({node:e,children:i})=>r.jsx("td",Object.assign({style:{padding:"0.75em 1em"}},{children:i})),code:h.default,blockquote:({node:e,children:i})=>r.jsx("blockquote",Object.assign({style:{lineHeight:"15px",borderLeft:"dark"===k?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===k?"#8B8B8B":"#656D76",paddingLeft:"1rem",marginBottom:"1rem"}},{children:i})),img:c.default,iframe:u.default,hr:()=>r.jsx("hr",{style:{border:0,borderTop:"dark"===k?"1px solid #30363D":"1px solid #D0D7DE",marginBottom:"1.5rem"}}),span:i=>{var{node:t,children:n}=i,s=e.__rest(i,["node","children"]);return"intro-msg-expand-btn"===s.className?r.jsx("span",Object.assign({},s,{style:{display:"inline",fontWeight:500,color:q,cursor:"pointer"},onClick:()=>B(!0)},{children:n})):r.jsx("span",Object.assign({},s,{children:n}))}};return r.jsxs("div",Object.assign({className:"pxe-markdown",ref:D,style:Object.assign({position:"relative",overflowWrap:"break-word",display:"grid",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",gap:".625rem"},s)},{children:[C&&r.jsx(j.default,{value:S,isOpen:C,onChangeIsOpen:B}),r.jsx(p.default,Object.assign({},n&&{className:n},{components:w,remarkPlugins:[f.default,b.default],rehypePlugins:[y.default,O.default]},{children:`${S}${!a&&v.length>0?"\n\n---":""}${"number"==typeof x&&S.length>=x?'<span class="intro-msg-expand-btn">...</span>':""}`})),!a&&v.length>0&&r.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"2rem",marginTop:"2rem"}},{children:v.map(((e,i)=>r.jsx(g.default,{data:e},i)))})),o]}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("../../hooks/pickaxe/usePickaxe.js"),o=require("react"),s=require("../../hooks/pickaxe/usePickaxeContext.js"),a=require("../../hooks/pickaxe/useResponseContext.js"),n=require("../../common/utils.js"),i=require("./Addons/Scroll/Provider.js"),u=require("./Chat/index.js"),l=require("./Form/index.js"),c=require("../../common/cn.js");function d(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}exports.Pickaxe=({formId:f,className:x})=>{const{chatId:j,styles:k,colors:m,loadFont:p,isFontLoaded:h,setFormId:P,setChatId:b,setPickaxe:g,setIsFontLoaded:q}=s.usePickaxeContext(),{setMessages:v,setResponse:y}=a.useResponseContext(),O=r.usePickaxe();return o.useEffect((()=>{P(f)}),[f]),o.useEffect((()=>{if(!O.data)return;const e=O.data.chatflag;b(e?n.generateId(15):""),e?v([]):y(null),g(O.data)}),[O.data]),o.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){"undefined"!=typeof window&&(h||p&&"Real Head Pro"!==k.font&&((yield Promise.resolve().then((function(){return d(require("webfontloader"))}))).default.load({google:{families:[k.font]}}),q(!0)))}))}),[k.font,p,h]),O.data?t.jsx("div",Object.assign({className:c.default("relative @container/pickaxe-root flex flex-col flex-grow w-full h-full",x,"dark"===k.theme&&"dark"),style:Object.assign({backgroundColor:m.primary,color:m.text},k.font&&"Real Head Pro"!==k.font&&{fontFamily:k.font})},{children:j?t.jsx(i.default,{children:t.jsx(u.default,{})}):t.jsx(i.default,{children:t.jsx(l.default,{})})})):null};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("../../hooks/pickaxe/usePickaxe.js"),o=require("react"),s=require("../../hooks/pickaxe/usePickaxeContext.js"),n=require("../../hooks/pickaxe/useResponseContext.js"),i=require("../../hooks/pickaxe/useDimensionContext.js"),a=require("../../common/utils.js"),u=require("./Addons/Scroll/Provider.js"),c=require("./Chat/index.js"),l=require("./Form/index.js"),d=require("../../common/cn.js");function f(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}exports.Pickaxe=({formId:x,className:j})=>{const{chatId:k,styles:m,colors:h,loadFont:p,isFontLoaded:b,setFormId:v,setChatId:g,setPickaxe:q,setIsFontLoaded:P}=s.usePickaxeContext(),{setMessages:y,setResponse:O}=n.useResponseContext(),{setDimension:w}=i.useDimensionContext(),C=r.usePickaxe(),R=o.useRef(null);return o.useEffect((()=>{v(x)}),[x]),o.useEffect((()=>{if(!C.data)return;const e=C.data.chatflag;g(e?a.generateId(15):""),e?y([]):O(null),q(C.data)}),[C.data]),o.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){"undefined"!=typeof window&&(b||p&&"Real Head Pro"!==m.font&&((yield Promise.resolve().then((function(){return f(require("webfontloader"))}))).default.load({google:{families:[m.font]}}),P(!0)))}))}),[m.font,p,b]),o.useEffect((()=>{if(!R.current)return;const e=new ResizeObserver((e=>{for(const t of e){const{width:e,height:r}=t.contentRect;w(e,r)}}));return e.observe(R.current),()=>{e.disconnect()}}),[R.current]),C.data?t.jsx("div",Object.assign({ref:R,className:d.default("relative @container/pickaxe-root flex flex-col flex-grow w-full h-full",j,"dark"===m.theme&&"dark"),style:Object.assign({backgroundColor:h.primary,color:h.text},m.font&&"Real Head Pro"!==m.font&&{fontFamily:m.font})},{children:k?t.jsx(u.default,{children:t.jsx(c.default,{})}):t.jsx(u.default,{children:t.jsx(l.default,{})})})):null};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../../components/Pickaxe/DimensionProvider.js");exports.useDimensionContext=()=>e.useContext(t.DimensionContext);
@@ -0,0 +1,15 @@
1
+ import type { SetState } from "../../types/common";
2
+ import { type ReactNode } from "react";
3
+ type DimensionContextType = {
4
+ width: number;
5
+ height: number;
6
+ setWidth: SetState<number>;
7
+ setHeight: SetState<number>;
8
+ setDimension: (width: number, height: number) => void;
9
+ };
10
+ interface IDimensionProviderProps {
11
+ children: ReactNode;
12
+ }
13
+ export declare const DimensionContext: import("react").Context<DimensionContextType>;
14
+ declare const DimensionProvider: ({ children }: IDimensionProviderProps) => import("react/jsx-runtime").JSX.Element;
15
+ export default DimensionProvider;
@@ -0,0 +1,7 @@
1
+ export declare const useDimensionContext: () => {
2
+ width: number;
3
+ height: number;
4
+ setWidth: import("../../types/common").SetState<number>;
5
+ setHeight: import("../../types/common").SetState<number>;
6
+ setDimension: (width: number, height: number) => void;
7
+ };
@@ -1 +1 @@
1
- import{jsx as e,jsxs as o}from"react/jsx-runtime";import{usePickaxeContext as s}from"../../../../hooks/pickaxe/usePickaxeContext.js";import{useStyleFontSize as t}from"../../../../hooks/studio/useStyleFontSize.js";import{PickaxeMarkdown as a}from"../../common/PickaxeMarkdown/index.js";import{PickaxeMarkdownRenderer as c}from"../../common/PickaxeMarkdown/Renderer.js";import r from"../../common/PickaxeIcon.js";import i from"../../common/PickaxeCopyButton.js";import n from"../../../../common/cn.js";const l=({index:l,message:m})=>{var x;const{formId:d,pickaxe:p,styles:h,colors:f,misc:b,responsiveBy:u}=s(),v=t(),g=null!==(x=null==p?void 0:p.chaticon)&&void 0!==x?x:`https://prod-pickaxe-assets.s3.us-west-2.amazonaws.com/chaticons/${d}.png`;return"assistant"===m.role?e("div",Object.assign({className:n("flex flex-col","viewport"===u?"min-[767px]:max-w-[80%]":"@[767px]/pickaxe-root:max-w-[80%]")},{children:o("div",Object.assign({className:"flex gap-x-3"},{children:[b.isChatImage&&"NONE"!==g&&e(r,{src:g,alt:"Assistant",width:24,height:24,className:"my-3 h-6 w-6",textColor:f.text}),o("div",Object.assign({className:"flex flex-col"},{children:[e("div",Object.assign({className:n(v.b2,"chat-message overflow-x-auto overflow-y-hidden rounded px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]")},{children:e(a,Object.assign({theme:h.theme,accentColor:f.accent,linkPreviews:!0,actions:!0},{children:e(c,Object.assign({value:m.content},0===l&&{maxChar:360}))}))})),e("div",Object.assign({className:"mb-2 ml-2 mt-4 flex gap-3"},{children:e(i,{color:f.accent,text:m.content})}))]}))]}))})):"user"===m.role?e("div",Object.assign({className:n("flex gap-x-3 justify-self-end pl-9","viewport"===u?"min-[767px]:max-w-[80%] min-[767px]:pl-0":"@[767px]/pickaxe-root:max-w-[80%] @[767px]/pickaxe-root:pl-0")},{children:e("div",Object.assign({className:n(v.b2,"overflow-x-auto overflow-y-hidden rounded px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]"),style:{backgroundColor:f.secondary+"80",color:f.secondaryText}},{children:e(a,Object.assign({theme:h.theme,accentColor:f.accent},{children:e(c,{value:m.content})}))}))})):e("div",{})};export{l as default};
1
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import{usePickaxeContext as s}from"../../../../hooks/pickaxe/usePickaxeContext.js";import{useDimensionContext as t}from"../../../../hooks/pickaxe/useDimensionContext.js";import{useStyleFontSize as a}from"../../../../hooks/studio/useStyleFontSize.js";import{PickaxeMarkdown as c}from"../../common/PickaxeMarkdown/index.js";import{PickaxeMarkdownRenderer as i}from"../../common/PickaxeMarkdown/Renderer.js";import r from"../../common/PickaxeIcon.js";import n from"../../common/PickaxeCopyButton.js";import l from"../../../../common/cn.js";const m=({index:m,message:x})=>{var d;const{formId:p,pickaxe:h,styles:f,colors:b,misc:u,responsiveBy:k}=s(),{width:v}=t(),j=a(),w=null!==(d=null==h?void 0:h.chaticon)&&void 0!==d?d:`https://prod-pickaxe-assets.s3.us-west-2.amazonaws.com/chaticons/${p}.png`;return"assistant"===x.role?e("div",Object.assign({className:l("flex flex-col","viewport"===k?"min-[767px]:max-w-[80%]":"@[767px]/pickaxe-root:max-w-[80%]")},{children:o("div",Object.assign({className:"flex gap-x-3"},{children:[u.isChatImage&&"NONE"!==w&&e(r,{src:w,alt:"Assistant",width:24,height:24,className:"my-3 h-6 w-6",textColor:b.text}),o("div",Object.assign({className:"flex flex-col"},{children:[e("div",Object.assign({className:l(j.b2,"chat-message overflow-x-auto overflow-y-hidden rounded px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]")},{children:e(c,Object.assign({theme:f.theme,accentColor:b.accent,linkPreviews:!0,actions:!0},{children:e(i,Object.assign({value:x.content},0===m&&{maxChar:v<=767?176:360}))}))})),e("div",Object.assign({className:"mb-2 ml-2 mt-4 flex gap-3"},{children:e(n,{color:b.accent,text:x.content})}))]}))]}))})):"user"===x.role?e("div",Object.assign({className:l("flex gap-x-3 justify-self-end pl-9","viewport"===k?"min-[767px]:max-w-[80%] min-[767px]:pl-0":"@[767px]/pickaxe-root:max-w-[80%] @[767px]/pickaxe-root:pl-0")},{children:e("div",Object.assign({className:l(j.b2,"overflow-x-auto overflow-y-hidden rounded px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]"),style:{backgroundColor:b.secondary+"80",color:b.secondaryText}},{children:e(c,Object.assign({theme:f.theme,accentColor:b.accent},{children:e(i,{value:x.content})}))}))})):e("div",{})};export{m as default};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as s}from"react/jsx-runtime";import{useState as a,useMemo as o}from"react";import{usePickaxeContext as t}from"../../../../hooks/pickaxe/usePickaxeContext.js";import{useResponseContext as r}from"../../../../hooks/pickaxe/useResponseContext.js";import{useStyleFontSize as i}from"../../../../hooks/studio/useStyleFontSize.js";import{useConversation as l}from"../../../../hooks/pickaxe/useConversation.js";import c from"../../common/PickaxeIcon.js";import n from"../../../Core/ErrorAlert.js";import d from"../../Addons/Scroll/ScrollLockView.js";import m from"../../common/PickaxeHead.js";import p from"../../common/PickaxeInfoModal.js";import x from"../../common/PickaxeUpgradeCard.js";import f from"./Message.js";import g from"../../../../common/cn.js";const u=()=>{var u;const h=l(),j=i(),{pickaxe:E,styles:k,colors:b,responsiveBy:w,isNewChat:v,setChatId:y}=t(),{messages:N,status:C,limitData:O,error:B}=r(),[F,S]=a(!1),I=o((()=>!!h.data&&!(h.data.messages.length<=1)),[h.data]),P=o((()=>h.isSuccess&&v&&!I),[h.isSuccess,v,I]);return e("div",Object.assign({className:"relative flex flex-grow flex-col justify-end"},{children:[F&&s(p,{isOpen:F,onChangeIsOpen:S}),s("div",Object.assign({className:g("absolute left-1/2 top-5 flex w-full max-w-[400px] -translate-x-1/2 -translate-y-1/3 transform flex-col items-center px-4 opacity-0 duration-300",P&&"top-1/3 opacity-100")},{children:s(m,{iconClassName:"duration-300 hover:opacity-90",onIconClick:()=>y("")})})),s("div",Object.assign({className:"flex w-full justify-center"},{children:h.isLoading?e("div",Object.assign({className:"grid w-full max-w-[800px] grid-cols-1 gap-y-6 px-6 pt-10"},{children:[s("div",{className:"h-10 w-[70%] animate-pulse justify-self-end rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===k.theme?"#1E1E1F":"#E5E7EB"}}),s("div",{className:"h-[150px] w-[70%] animate-pulse rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===k.theme?"#1E1E1F":"#E5E7EB"}}),s("div",{className:"h-10 w-[50%] animate-pulse justify-self-end rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===k.theme?"#1E1E1F":"#E5E7EB"}})]})):h.isError?s("div",Object.assign({className:"flex w-full max-w-[800px] justify-center pt-10"},{children:e("p",Object.assign({className:g(j.b2,"text-center font-semibold")},{children:["Something went wrong. Please try again, or"," ",s("a",Object.assign({href:"mailto:info@pickaxeproject.com?subject=Help",target:"_blank",rel:"noreferrer"},{children:"contact us"}))," ","for help."]}))})):e("div",Object.assign({className:"flex flex-col w-full"},{children:[e("div",Object.assign({className:g("relative grid w-full max-w-[800px] grid-cols-1 gap-y-6 px-4 pt-6","viewport"===w?"min-[767px]:pt-10":"@[767px]/pickaxe-root:pt-10")},{children:[h.data.messages.map(((e,a)=>s(f,{index:a,message:e},a))),N.map(((e,a)=>s(f,{index:h.data.messages.length+a,message:e},a))),"fetching"===C?e("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:["NONE"!==(null==E?void 0:E.chaticon)&&s(c,{src:null!==(u=null==E?void 0:E.chaticon)&&void 0!==u?u:`https://prod-pickaxe-assets.s3.us-west-2.amazonaws.com/chaticons/${null==E?void 0:E.formid}.png`,alt:`${null==E?void 0:E.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6",textColor:b.text}),e("div",Object.assign({className:"flex items-center gap-x-2 rounded px-4 py-4",style:{backgroundColor:b.secondary+"80",color:b.secondaryText}},{children:[s("div",{className:"h-1.5 w-1.5 animate-dot rounded-full",style:{backgroundColor:b.secondaryText}}),s("div",{className:"h-1.5 w-1.5 animate-dot-down rounded-full",style:{backgroundColor:b.secondaryText}}),s("div",{className:"h-1.5 w-1.5 animate-dot rounded-full",style:{backgroundColor:b.secondaryText}})]}))]})):O?s("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:s(x,{})})):B?s("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:s(n,{error:B})})):null]})),s(d,{className:"w-full"})]}))}))]}))};export{u as default};
1
+ import{jsxs as e,jsx as s}from"react/jsx-runtime";import{useState as a,useMemo as o}from"react";import{usePickaxeContext as t}from"../../../../hooks/pickaxe/usePickaxeContext.js";import{useResponseContext as i}from"../../../../hooks/pickaxe/useResponseContext.js";import{useDimensionContext as r}from"../../../../hooks/pickaxe/useDimensionContext.js";import{useStyleFontSize as l}from"../../../../hooks/studio/useStyleFontSize.js";import{useConversation as c}from"../../../../hooks/pickaxe/useConversation.js";import n from"../../common/PickaxeIcon.js";import m from"../../../Core/ErrorAlert.js";import d from"../../Addons/Scroll/ScrollLockView.js";import p from"../../common/PickaxeHead.js";import x from"../../common/PickaxeInfoModal.js";import g from"../../common/PickaxeUpgradeCard.js";import f from"./Message.js";import u from"../../../../common/cn.js";const h=()=>{var h;const j=c(),k=l(),{pickaxe:E,styles:b,colors:w,responsiveBy:y,isNewChat:v,setChatId:N}=t(),{messages:C,status:O,limitData:B,error:F}=i(),{height:S}=r(),[I,P]=a(!1),T=o((()=>!!j.data&&!(j.data.messages.length<=1)),[j.data]),z=o((()=>j.isSuccess&&v&&!T),[j.isSuccess,v,T]);return e("div",Object.assign({className:"relative flex flex-grow flex-col justify-end"},{children:[I&&s(x,{isOpen:I,onChangeIsOpen:P}),s("div",Object.assign({className:u("absolute left-1/2 top-5 flex w-full max-w-[400px] -translate-x-1/2 -translate-y-1/3 transform flex-col items-center px-4 opacity-0 duration-300",z&&"top-1/3 opacity-100 [@media(max-height:630px)]:top-5 [@media(max-height:630px)]:opacity-0",S<630&&"top-5 opacity-0")},{children:s(p,{iconClassName:"duration-300 hover:opacity-90",onIconClick:()=>N("")})})),s("div",Object.assign({className:"flex w-full justify-center"},{children:j.isLoading?e("div",Object.assign({className:"grid w-full max-w-[800px] grid-cols-1 gap-y-6 px-6 pt-10"},{children:[s("div",{className:"h-10 w-[70%] animate-pulse justify-self-end rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===b.theme?"#1E1E1F":"#E5E7EB"}}),s("div",{className:"h-[150px] w-[70%] animate-pulse rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===b.theme?"#1E1E1F":"#E5E7EB"}}),s("div",{className:"h-10 w-[50%] animate-pulse justify-self-end rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===b.theme?"#1E1E1F":"#E5E7EB"}})]})):j.isError?s("div",Object.assign({className:"flex w-full max-w-[800px] justify-center pt-10"},{children:e("p",Object.assign({className:u(k.b2,"text-center font-semibold")},{children:["Something went wrong. Please try again, or"," ",s("a",Object.assign({href:"mailto:info@pickaxeproject.com?subject=Help",target:"_blank",rel:"noreferrer"},{children:"contact us"}))," ","for help."]}))})):e("div",Object.assign({className:"flex flex-col w-full"},{children:[e("div",Object.assign({className:u("relative grid w-full max-w-[800px] grid-cols-1 gap-y-6 px-4 pt-6","viewport"===y?"min-[767px]:pt-10":"@[767px]/pickaxe-root:pt-10")},{children:[j.data.messages.map(((e,a)=>s(f,{index:a,message:e},a))),C.map(((e,a)=>s(f,{index:j.data.messages.length+a,message:e},a))),"fetching"===O?e("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:["NONE"!==(null==E?void 0:E.chaticon)&&s(n,{src:null!==(h=null==E?void 0:E.chaticon)&&void 0!==h?h:`https://prod-pickaxe-assets.s3.us-west-2.amazonaws.com/chaticons/${null==E?void 0:E.formid}.png`,alt:`${null==E?void 0:E.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6",textColor:w.text}),e("div",Object.assign({className:"flex items-center gap-x-2 rounded px-4 py-4",style:{backgroundColor:w.secondary+"80",color:w.secondaryText}},{children:[s("div",{className:"h-1.5 w-1.5 animate-dot rounded-full",style:{backgroundColor:w.secondaryText}}),s("div",{className:"h-1.5 w-1.5 animate-dot-down rounded-full",style:{backgroundColor:w.secondaryText}}),s("div",{className:"h-1.5 w-1.5 animate-dot rounded-full",style:{backgroundColor:w.secondaryText}})]}))]})):B?s("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:s(g,{})})):F?s("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:s(m,{error:F})})):null]})),s(d,{className:"w-full"})]}))}))]}))};export{h as default};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{useState as e,createContext as r}from"react";const i=r({}),s=({children:r})=>{const[s,n]=e(0),[o,c]=e(0);return t(i.Provider,Object.assign({value:{width:s,height:o,setWidth:n,setHeight:c,setDimension:(t,e)=>{n(t),c(e)}}},{children:r}))};export{i as DimensionContext,s as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{createContext as o,useState as s,useEffect as t}from"react";import r from"./Addons/Document/Provider.js";import i from"./ResponseProvider.js";const n=o({}),d=({children:o,userId:d="",studioUserId:a="",deploymentId:c="",styles:l,colors:m,limits:F={},misc:I={isWhiteLabel:!0,isProfileImage:!0,isChatImage:!0,isTitle:!0,isDescription:!0},responsiveBy:h="viewport",loadFont:p=!0,forceMobile:f=!1,onGenerateComplete:y})=>{const[u,b]=s(""),[g,j]=s(""),[v,x]=s(null),[w,S]=s(!1),[C,P]=s(!0),[k,O]=s(!0),[B,D]=s(!1);return t((()=>{S(!1)}),[null==l?void 0:l.font]),e(n.Provider,Object.assign({value:Object.assign({formId:u,chatId:g,userId:d,studioUserId:a,deploymentId:c,pickaxe:v,styles:Object.assign({theme:"light",font:"Real Head Pro",fontSize:"md",formFieldStyle:"box",btnStyle:"filled",outlineThickness:1,cornerRadius:4},l),colors:Object.assign({primary:"#F6F8FA",text:"#000000",secondary:"#FFFFFF",secondaryText:"#000000",accent:"#228DD7",accentText:"#FFFFFF",error:"#EF4444"},m),misc:I,responsiveBy:h,isFontLoaded:w,isNewChat:C,isShowIceBreaker:k,isShowHistory:B,loadFont:p,forceMobile:f,setIsFontLoaded:S,setFormId:b,setChatId:j,setPickaxe:x,setIsNewChat:P,setIsShowIceBreaker:O,setIsShowHistory:D},y&&{onGenerateComplete:y})},{children:e(i,Object.assign({limits:F},{children:e(r,{children:o})}))}))};export{n as PickaxeContext,d as PickaxeProvider};
1
+ import{jsx as e}from"react/jsx-runtime";import{createContext as o,useState as s,useEffect as t}from"react";import r from"./Addons/Document/Provider.js";import i from"./ResponseProvider.js";import n from"./DimensionProvider.js";const d=o({}),c=({children:o,userId:c="",studioUserId:l="",deploymentId:a="",styles:m,colors:F,limits:h={},misc:I={isWhiteLabel:!0,isProfileImage:!0,isChatImage:!0,isTitle:!0,isDescription:!0},responsiveBy:p="viewport",loadFont:f=!0,forceMobile:y=!1,onGenerateComplete:u})=>{const[b,j]=s(""),[v,g]=s(""),[x,w]=s(null),[P,S]=s(!1),[C,k]=s(!0),[D,O]=s(!0),[B,T]=s(!1);return t((()=>{S(!1)}),[null==m?void 0:m.font]),e(d.Provider,Object.assign({value:Object.assign({formId:b,chatId:v,userId:c,studioUserId:l,deploymentId:a,pickaxe:x,styles:Object.assign({theme:"light",font:"Real Head Pro",fontSize:"md",formFieldStyle:"box",btnStyle:"filled",outlineThickness:1,cornerRadius:4},m),colors:Object.assign({primary:"#F6F8FA",text:"#000000",secondary:"#FFFFFF",secondaryText:"#000000",accent:"#228DD7",accentText:"#FFFFFF",error:"#EF4444"},F),misc:I,responsiveBy:p,isFontLoaded:P,isNewChat:C,isShowIceBreaker:D,isShowHistory:B,loadFont:f,forceMobile:y,setIsFontLoaded:S,setFormId:j,setChatId:g,setPickaxe:w,setIsNewChat:k,setIsShowIceBreaker:O,setIsShowHistory:T},u&&{onGenerateComplete:u})},{children:e(i,Object.assign({limits:h},{children:e(n,{children:e(r,{children:o})})}))}))};export{d as PickaxeContext,c as PickaxeProvider};
@@ -1 +1 @@
1
- import{__rest as e}from"../../../../_virtual/_tslib.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";import{useState as t,useRef as n,useMemo as o}from"react";import{usePickaxeMarkdownContext as s}from"./hooks/usePickaxeMarkdownContext.js";import l from"react-markdown";import m from"remark-gfm";import a from"remark-math";import d from"rehype-katex";import c from"rehype-raw";import h from"./Custom/A/index.js";import p from"./Custom/P/index.js";import g from"./Custom/Img/index.js";import f from"./Custom/Iframe/index.js";import b from"./Custom/Code/index.js";import y from"./Custom/common/LinkPreview.js";import u from"./Custom/common/TextModal.js";const j=({className:j,style:x,value:O,recursion:k=!1,children:B,maxChar:C})=>{const{theme:D,accentColor:v,websiteMetadatas:S}=s(),[w,H]=t(!1),P=n(null),z=o((()=>{if(!O)return"";let e=O;return e=O.replace(/<!--[\s\S]*?-->/g,""),e=O.replace(/\u200B/g,""),C&&(e=e.slice(0,C)),e}),[O,C]),L={h1:({node:e,children:r})=>i("h1",Object.assign({style:{fontSize:"2.25rem",lineHeight:"2.5rem",marginBottom:"1.5rem"}},{children:r})),h2:({node:e,children:r})=>i("h2",Object.assign({style:{fontSize:"1.875rem",lineHeight:"2.25rem",marginBottom:"0.75rem"}},{children:r})),h3:({node:e,children:r})=>i("h3",Object.assign({style:{fontSize:"1.5rem",lineHeight:"2rem",marginBottom:"0.5rem"}},{children:r})),h4:({node:e,children:r})=>i("h4",Object.assign({className:"mt-2",style:{fontSize:"1.25rem",lineHeight:"1.75rem",marginBottom:"0.5rem"}},{children:r})),h5:({node:e,children:r})=>i("h5",Object.assign({style:{fontSize:"1.125rem",lineHeight:"1.75rem",marginBottom:"0.5rem"}},{children:r})),p:p,a:h,ol:({node:e,children:r})=>i("ol",Object.assign({style:{listStyleType:"decimal",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"1.5rem"}},{children:r})),ul:({node:e,children:r})=>i("ul",Object.assign({style:{listStyleType:"disc",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"1.5rem"}},{children:r})),li:({node:e,children:r})=>i("li",{children:r}),table:({children:e})=>i("div",Object.assign({style:{position:"relative",overflow:"auto",marginBottom:"1.5rem"}},{children:i("table",Object.assign({style:{tableLayout:"fixed",fontSize:"0.875rem",lineHeight:"1.24rem"}},{children:e}))})),th:({node:e,children:r})=>i("th",Object.assign({style:{padding:"0.75em 1em",fontWeight:600,textAlign:"left"}},{children:r})),tr:({node:e,children:r})=>i("tr",Object.assign({style:{border:"dark"===D?"1px solid #30363D":"1px solid #D0D7DE"}},{children:r})),td:({node:e,children:r})=>i("td",Object.assign({style:{padding:"0.75em 1em"}},{children:r})),code:b,blockquote:({node:e,children:r})=>i("blockquote",Object.assign({style:{lineHeight:"15px",borderLeft:"dark"===D?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===D?"#8B8B8B":"#656D76",paddingLeft:"1rem",marginBottom:"1rem"}},{children:r})),img:g,iframe:f,hr:()=>i("hr",{style:{border:0,borderTop:"dark"===D?"1px solid #30363D":"1px solid #D0D7DE",marginBottom:"1.5rem"}}),span:r=>{var{node:t,children:n}=r,o=e(r,["node","children"]);return"intro-msg-expand-btn"===o.className?i("span",Object.assign({},o,{style:{display:"inline",fontWeight:500,color:v,cursor:"pointer"},onClick:()=>H(!0)},{children:n})):i("span",Object.assign({},o,{children:n}))}};return r("div",Object.assign({className:"pxe-markdown",ref:P,style:Object.assign({position:"relative",overflowWrap:"break-word",display:"grid",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",gap:".625rem"},x)},{children:[w&&i(u,{value:z,isOpen:w,onChangeIsOpen:H}),i(l,Object.assign({},j&&{className:j},{components:L,remarkPlugins:[m,a],rehypePlugins:[d,c]},{children:`${z}${!k&&S.length>0?"\n\n---":""}${"number"==typeof C&&z.length>=C?'<span class="intro-msg-expand-btn">...</span>':""}`})),!k&&S.length>0&&i("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"2rem",marginTop:"2rem"}},{children:S.map(((e,r)=>i(y,{data:e},r)))})),B]}))};export{j as PickaxeMarkdownRenderer};
1
+ import{__rest as e}from"../../../../_virtual/_tslib.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";import{useState as t,useRef as n,useMemo as o}from"react";import{usePickaxeMarkdownContext as s}from"./hooks/usePickaxeMarkdownContext.js";import l from"react-markdown";import m from"remark-gfm";import a from"remark-math";import d from"rehype-katex";import c from"rehype-raw";import h from"./Custom/A/index.js";import g from"./Custom/P/index.js";import p from"./Custom/Img/index.js";import f from"./Custom/Iframe/index.js";import b from"./Custom/Code/index.js";import y from"./Custom/common/LinkPreview.js";import u from"./Custom/common/TextModal.js";const j=({className:j,style:x,value:O,recursion:k=!1,children:B,maxChar:C})=>{const{theme:D,accentColor:v,websiteMetadatas:S}=s(),[w,H]=t(!1),P=n(null),z=o((()=>{if(!O)return"";let e=O;return e=O.replace(/<!--[\s\S]*?-->/g,""),e=O.replace(/\u200B/g,""),C&&(e=e.slice(0,C)),e}),[O,C]),L={h1:({node:e,children:r})=>i("h1",Object.assign({style:{fontSize:"2.25rem",lineHeight:"2.5rem",marginBottom:"1.5rem"}},{children:r})),h2:({node:e,children:r})=>i("h2",Object.assign({style:{fontSize:"1.875rem",lineHeight:"2.25rem",marginBottom:"1.5rem"}},{children:r})),h3:({node:e,children:r})=>i("h3",Object.assign({style:{fontSize:"1.5rem",lineHeight:"2rem",marginBottom:"0.5rem"}},{children:r})),h4:({node:e,children:r})=>i("h4",Object.assign({className:"mt-2",style:{fontSize:"1.25rem",lineHeight:"1.75rem",marginBottom:"0.5rem"}},{children:r})),h5:({node:e,children:r})=>i("h5",Object.assign({style:{fontSize:"1.125rem",lineHeight:"1.75rem",marginBottom:"0.5rem"}},{children:r})),p:g,a:h,ol:({node:e,children:r})=>i("ol",Object.assign({style:{listStyleType:"decimal",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"1.5rem"}},{children:r})),ul:({node:e,children:r})=>i("ul",Object.assign({style:{listStyleType:"disc",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"1.5rem"}},{children:r})),li:({node:e,children:r})=>i("li",Object.assign({style:{margin:"10px"}},{children:r})),table:({children:e})=>i("div",Object.assign({style:{position:"relative",overflow:"auto",marginBottom:"1.5rem"}},{children:i("table",Object.assign({style:{tableLayout:"fixed",fontSize:"0.875rem",lineHeight:"1.24rem"}},{children:e}))})),th:({node:e,children:r})=>i("th",Object.assign({style:{padding:"0.75em 1em",fontWeight:600,textAlign:"left"}},{children:r})),tr:({node:e,children:r})=>i("tr",Object.assign({style:{border:"dark"===D?"1px solid #30363D":"1px solid #D0D7DE"}},{children:r})),td:({node:e,children:r})=>i("td",Object.assign({style:{padding:"0.75em 1em"}},{children:r})),code:b,blockquote:({node:e,children:r})=>i("blockquote",Object.assign({style:{lineHeight:"15px",borderLeft:"dark"===D?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===D?"#8B8B8B":"#656D76",paddingLeft:"1rem",marginBottom:"1rem"}},{children:r})),img:p,iframe:f,hr:()=>i("hr",{style:{border:0,borderTop:"dark"===D?"1px solid #30363D":"1px solid #D0D7DE",marginBottom:"1.5rem"}}),span:r=>{var{node:t,children:n}=r,o=e(r,["node","children"]);return"intro-msg-expand-btn"===o.className?i("span",Object.assign({},o,{style:{display:"inline",fontWeight:500,color:v,cursor:"pointer"},onClick:()=>H(!0)},{children:n})):i("span",Object.assign({},o,{children:n}))}};return r("div",Object.assign({className:"pxe-markdown",ref:P,style:Object.assign({position:"relative",overflowWrap:"break-word",display:"grid",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",gap:".625rem"},x)},{children:[w&&i(u,{value:z,isOpen:w,onChangeIsOpen:H}),i(l,Object.assign({},j&&{className:j},{components:L,remarkPlugins:[m,a],rehypePlugins:[d,c]},{children:`${z}${!k&&S.length>0?"\n\n---":""}${"number"==typeof C&&z.length>=C?'<span class="intro-msg-expand-btn">...</span>':""}`})),!k&&S.length>0&&i("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"2rem",marginTop:"2rem"}},{children:S.map(((e,r)=>i(y,{data:e},r)))})),B]}))};export{j as PickaxeMarkdownRenderer};
@@ -1 +1 @@
1
- import{__awaiter as o}from"../../_virtual/_tslib.js";import{jsx as t}from"react/jsx-runtime";import{usePickaxe as e}from"../../hooks/pickaxe/usePickaxe.js";import{useEffect as r}from"react";import{usePickaxeContext as a}from"../../hooks/pickaxe/usePickaxeContext.js";import{useResponseContext as s}from"../../hooks/pickaxe/useResponseContext.js";import{generateId as i}from"../../common/utils.js";import n from"./Addons/Scroll/Provider.js";import l from"./Chat/index.js";import d from"./Form/index.js";import m from"../../common/cn.js";const f=({formId:f,className:c})=>{const{chatId:p,styles:x,colors:u,loadFont:k,isFontLoaded:h,setFormId:j,setChatId:g,setPickaxe:v,setIsFontLoaded:y}=a(),{setMessages:F,setResponse:P}=s(),b=e();return r((()=>{j(f)}),[f]),r((()=>{if(!b.data)return;const o=b.data.chatflag;g(o?i(15):""),o?F([]):P(null),v(b.data)}),[b.data]),r((()=>{o(void 0,void 0,void 0,(function*(){"undefined"!=typeof window&&(h||k&&"Real Head Pro"!==x.font&&((yield import("webfontloader")).default.load({google:{families:[x.font]}}),y(!0)))}))}),[x.font,k,h]),b.data?t("div",Object.assign({className:m("relative @container/pickaxe-root flex flex-col flex-grow w-full h-full",c,"dark"===x.theme&&"dark"),style:Object.assign({backgroundColor:u.primary,color:u.text},x.font&&"Real Head Pro"!==x.font&&{fontFamily:x.font})},{children:t(n,p?{children:t(l,{})}:{children:t(d,{})})})):null};export{f as Pickaxe};
1
+ import{__awaiter as o}from"../../_virtual/_tslib.js";import{jsx as e}from"react/jsx-runtime";import{usePickaxe as t}from"../../hooks/pickaxe/usePickaxe.js";import{useRef as r,useEffect as s}from"react";import{usePickaxeContext as n}from"../../hooks/pickaxe/usePickaxeContext.js";import{useResponseContext as i}from"../../hooks/pickaxe/useResponseContext.js";import{useDimensionContext as a}from"../../hooks/pickaxe/useDimensionContext.js";import{generateId as c}from"../../common/utils.js";import l from"./Addons/Scroll/Provider.js";import m from"./Chat/index.js";import d from"./Form/index.js";import f from"../../common/cn.js";const p=({formId:p,className:u})=>{const{chatId:x,styles:h,colors:k,loadFont:j,isFontLoaded:g,setFormId:v,setChatId:b,setPickaxe:w,setIsFontLoaded:y}=n(),{setMessages:C,setResponse:F}=i(),{setDimension:P}=a(),R=t(),I=r(null);return s((()=>{v(p)}),[p]),s((()=>{if(!R.data)return;const o=R.data.chatflag;b(o?c(15):""),o?C([]):F(null),w(R.data)}),[R.data]),s((()=>{o(void 0,void 0,void 0,(function*(){"undefined"!=typeof window&&(g||j&&"Real Head Pro"!==h.font&&((yield import("webfontloader")).default.load({google:{families:[h.font]}}),y(!0)))}))}),[h.font,j,g]),s((()=>{if(!I.current)return;const o=new ResizeObserver((o=>{for(const e of o){const{width:o,height:t}=e.contentRect;P(o,t)}}));return o.observe(I.current),()=>{o.disconnect()}}),[I.current]),R.data?e("div",Object.assign({ref:I,className:f("relative @container/pickaxe-root flex flex-col flex-grow w-full h-full",u,"dark"===h.theme&&"dark"),style:Object.assign({backgroundColor:k.primary,color:k.text},h.font&&"Real Head Pro"!==h.font&&{fontFamily:h.font})},{children:e(l,x?{children:e(m,{})}:{children:e(d,{})})})):null};export{p as Pickaxe};
@@ -0,0 +1 @@
1
+ import{useContext as o}from"react";import{DimensionContext as r}from"../../components/Pickaxe/DimensionProvider.js";const e=()=>o(r);export{e as useDimensionContext};
@@ -0,0 +1,15 @@
1
+ import type { SetState } from "../../types/common";
2
+ import { type ReactNode } from "react";
3
+ type DimensionContextType = {
4
+ width: number;
5
+ height: number;
6
+ setWidth: SetState<number>;
7
+ setHeight: SetState<number>;
8
+ setDimension: (width: number, height: number) => void;
9
+ };
10
+ interface IDimensionProviderProps {
11
+ children: ReactNode;
12
+ }
13
+ export declare const DimensionContext: import("react").Context<DimensionContextType>;
14
+ declare const DimensionProvider: ({ children }: IDimensionProviderProps) => import("react/jsx-runtime").JSX.Element;
15
+ export default DimensionProvider;
@@ -0,0 +1,7 @@
1
+ export declare const useDimensionContext: () => {
2
+ width: number;
3
+ height: number;
4
+ setWidth: import("../../types/common").SetState<number>;
5
+ setHeight: import("../../types/common").SetState<number>;
6
+ setDimension: (width: number, height: number) => void;
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pickaxeproject/react",
3
- "version": "0.0.69",
3
+ "version": "0.0.71",
4
4
  "description": "Client utility library for Pickaxe",
5
5
  "repository": {
6
6
  "type": "git",