@pickaxeproject/react 0.0.30 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,3 +11,7 @@
11
11
  - push to main branch to generate a new PR
12
12
 
13
13
  - merge the PR
14
+
15
+ ## Notes
16
+
17
+ - must import `import "katex/dist/katex.min.css";`
@@ -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("../../common/PickaxeIcon.js"),c=require("../../common/PickaxeMarkdown/index.js"),t=require("../../common/PickaxeMarkdown/Renderer.js"),r=require("../../common/PickaxeCopyButton.js"),o=require("../../../../common/cn.js");exports.default=({message:i})=>{var l;const{formId:n,pickaxe:x,styles:d,colors:m,responsiveBy:u}=s.usePickaxeContext(),j=null!==(l=null==x?void 0:x.chaticon)&&void 0!==l?l:`https://prod-pickaxe-assets.s3.us-west-2.amazonaws.com/chaticons/${n}.png`;return"assistant"===i.role?e.jsx("div",Object.assign({className:o.default("flex flex-col","viewport"===u?"min-[767px]:max-w-[80%]":"@[767px]/pickaxe-root:max-w-[80%]")},{children:e.jsxs("div",Object.assign({className:"flex gap-x-3"},{children:["NONE"!==j&&e.jsx(a.default,{src:j,alt:"Assistant",width:24,height:24,className:"my-3 h-6 w-6",textColor:m.text}),e.jsxs("div",Object.assign({className:"flex flex-col"},{children:[e.jsx("div",Object.assign({className:"chat-message overflow-x-auto overflow-y-hidden rounded px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]",style:{backgroundColor:m.secondary+"80",color:m.secondaryText}},{children:e.jsx(c.default,Object.assign({theme:d.theme,accentColor:m.accent,linkPreviews:!0,actions:!0},{children:e.jsx(t.PickaxeMarkdownRenderer,{value:i.content})}))})),e.jsx("div",Object.assign({className:"mb-2 ml-2 mt-4 flex gap-3"},{children:e.jsx(r.default,{color:m.accent,text:i.content})}))]}))]}))})):"user"===i.role?e.jsx("div",Object.assign({className:o.default("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.jsx("div",Object.assign({className:"overflow-x-auto overflow-y-hidden rounded px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]"},{children:e.jsx(c.default,Object.assign({theme:d.theme,accentColor:m.accent},{children:e.jsx(t.PickaxeMarkdownRenderer,{value:i.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("../../common/PickaxeMarkdown/index.js"),c=require("../../common/PickaxeMarkdown/Renderer.js"),r=require("../../common/PickaxeIcon.js"),o=require("../../common/PickaxeCopyButton.js"),t=require("../../../../common/cn.js");exports.default=({message:i})=>{var n;const{formId:l,pickaxe:x,styles:d,colors:m,responsiveBy:u}=s.usePickaxeContext(),j=null!==(n=null==x?void 0:x.chaticon)&&void 0!==n?n:`https://prod-pickaxe-assets.s3.us-west-2.amazonaws.com/chaticons/${l}.png`;return"assistant"===i.role?e.jsx("div",Object.assign({className:t.default("flex flex-col","viewport"===u?"min-[767px]:max-w-[80%]":"@[767px]/pickaxe-root:max-w-[80%]")},{children:e.jsxs("div",Object.assign({className:"flex gap-x-3"},{children:["NONE"!==j&&e.jsx(r.default,{src:j,alt:"Assistant",width:24,height:24,className:"my-3 h-6 w-6",textColor:m.text}),e.jsxs("div",Object.assign({className:"flex flex-col"},{children:[e.jsx("div",Object.assign({className:"chat-message overflow-x-auto overflow-y-hidden rounded px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]",style:{backgroundColor:m.secondary+"80",color:m.secondaryText}},{children:e.jsx(a.PickaxeMarkdown,Object.assign({theme:d.theme,accentColor:m.accent,linkPreviews:!0,actions:!0},{children:e.jsx(c.PickaxeMarkdownRenderer,{value:i.content})}))})),e.jsx("div",Object.assign({className:"mb-2 ml-2 mt-4 flex gap-3"},{children:e.jsx(o.default,{color:m.accent,text:i.content})}))]}))]}))})):"user"===i.role?e.jsx("div",Object.assign({className:t.default("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.jsx("div",Object.assign({className:"overflow-x-auto overflow-y-hidden rounded px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]"},{children:e.jsx(a.PickaxeMarkdown,Object.assign({theme:d.theme,accentColor:m.accent},{children:e.jsx(c.PickaxeMarkdownRenderer,{value:i.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("date-fns"),l=require("../../../Icons/message-square-notes.svg.js"),r=require("../../../Icons/visitor.svg.js"),o=require("../../common/PickaxeIcon.js"),i=require("../../common/PickaxeMarkdown/index.js"),n=require("../../common/PickaxeMarkdown/Renderer.js"),c=require("../../common/PickaxeSimpleButton.js"),d=require("../../common/PickaxeCopyButton.js");exports.default=({item:m})=>{const{pickaxe:x,styles:u,colors:h,setChatId:p,setIsNewChat:j}=a.usePickaxeContext(),f=s.useMemo((()=>t.format(m.createdAt,"hh:mm a MMM dd, yy")),[m]),g=s.useMemo((()=>m&&m.messages?m.messages.length:0),[m]),v=s.useMemo((()=>{var e,s,a,t;if("form"===m.type){return(null!==(e=m.questions)&&void 0!==e?e:[]).map((e=>`<div style="display: flex; flex-direction: column; margin-bottom: 1em;">\n <p style="font-weight: 500;">${e.question}</p>\n <p>${e.answer||"n/a"}</p>\n</div>`)).join("")}return null!==(t=null===(a=null===(s=m.messages)||void 0===s?void 0:s[0])||void 0===a?void 0:a.message)&&void 0!==t?t:""}),[m]),b=s.useMemo((()=>{var e,s,a,t;return"form"===m.type?null!==(e=m.questionResponse)&&void 0!==e?e:"":null!==(t=null===(a=null===(s=m.messages)||void 0===s?void 0:s[1])||void 0===a?void 0:a.message)&&void 0!==t?t:""}),[m]);return e.jsxs("div",Object.assign({className:"flex flex-col shadow-black transition duration-300 hover:shadow"},{children:[e.jsxs("div",Object.assign({className:"flex gap-x-3 overflow-hidden px-4 py-5",style:{backgroundColor:h.primary,color:h.text}},{children:[e.jsx("div",Object.assign({className:"shrink-0 pt-1"},{children:e.jsx(r.default,{className:"h-6 w-6"})})),e.jsxs("div",Object.assign({className:"flex flex-col gap-y-1 overflow-x-auto pb-1.5 scrollbar-track-gray-100 scrollbar-thumb-[#4A4A4B] lg:max-w-[520px] lg:scrollbar-thin"},{children:[e.jsx("input",{id:`${m.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:v.length<280}),e.jsx("div",{className:"danger-html hidden flex-col peer-checked:flex",dangerouslySetInnerHTML:{__html:v}}),e.jsx("label",Object.assign({htmlFor:`${m.responseId}-input`,className:"mt-1 flex shrink-0 whitespace-nowrap text-sm font-semibold peer-checked:hidden hover:cursor-pointer",style:{color:h.accent}},{children:"See input"})),e.jsx("label",Object.assign({htmlFor:`${m.responseId}-input`,className:"hidden shrink-0 whitespace-nowrap text-sm font-semibold peer-checked:flex hover:cursor-pointer",style:{color:h.accent}},{children:"Hide input"}))]}))]})),e.jsxs("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:h.secondary,color:h.secondaryText}},{children:[e.jsx(o.default,{src:null==x?void 0:x.chaticon,alt:`${null==x?void 0:x.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:h.secondaryText}),e.jsxs("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[e.jsx(i.default,Object.assign({theme:u.theme,accentColor:h.accent,linkPreviews:!0,actions:!0},{children:e.jsx(n.PickaxeMarkdownRenderer,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]",value:b})})),e.jsxs("div",Object.assign({className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1"},{children:[e.jsxs("div",Object.assign({className:"flex items-center gap-3"},{children:[(null==x?void 0:x.enablechatresponses)&&e.jsxs(c.default,Object.assign({color:h.accent,onClick:()=>{return e=m.responseId,j(!1),void p(e);var e}},{children:[e.jsx(l.default,{className:"h-4 w-4 shrink-0"}),e.jsx("p",Object.assign({className:"text-sm font-semibold"},{children:g+1}))]})),e.jsx(d.default,{color:h.accent,text:b})]})),e.jsx("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:e.jsx("p",Object.assign({className:"text-sm font-semibold uppercase opacity-30"},{children:f}))}))]}))]}))]}))]}))};
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("date-fns"),r=require("../../common/PickaxeMarkdown/index.js"),l=require("../../common/PickaxeMarkdown/Renderer.js"),o=require("../../../Icons/message-square-notes.svg.js"),i=require("../../../Icons/visitor.svg.js"),n=require("../../common/PickaxeIcon.js"),c=require("../../common/PickaxeSimpleButton.js"),d=require("../../common/PickaxeCopyButton.js");exports.default=({item:m})=>{const{pickaxe:x,styles:u,colors:h,setChatId:p,setIsNewChat:j}=a.usePickaxeContext(),f=s.useMemo((()=>t.format(m.createdAt,"hh:mm a MMM dd, yy")),[m]),g=s.useMemo((()=>m&&m.messages?m.messages.length:0),[m]),v=s.useMemo((()=>{var e,s,a,t;if("form"===m.type){return(null!==(e=m.questions)&&void 0!==e?e:[]).map((e=>`<div style="display: flex; flex-direction: column; margin-bottom: 1em;">\n <p style="font-weight: 500;">${e.question}</p>\n <p>${e.answer||"n/a"}</p>\n</div>`)).join("")}return null!==(t=null===(a=null===(s=m.messages)||void 0===s?void 0:s[0])||void 0===a?void 0:a.message)&&void 0!==t?t:""}),[m]),b=s.useMemo((()=>{var e,s,a,t;return"form"===m.type?null!==(e=m.questionResponse)&&void 0!==e?e:"":null!==(t=null===(a=null===(s=m.messages)||void 0===s?void 0:s[1])||void 0===a?void 0:a.message)&&void 0!==t?t:""}),[m]);return e.jsxs("div",Object.assign({className:"flex flex-col shadow-black transition duration-300 hover:shadow"},{children:[e.jsxs("div",Object.assign({className:"flex gap-x-3 overflow-hidden px-4 py-5",style:{backgroundColor:h.primary,color:h.text}},{children:[e.jsx("div",Object.assign({className:"shrink-0 pt-1"},{children:e.jsx(i.default,{className:"h-6 w-6"})})),e.jsxs("div",Object.assign({className:"flex flex-col gap-y-1 overflow-x-auto pb-1.5 scrollbar-track-gray-100 scrollbar-thumb-[#4A4A4B] lg:max-w-[520px] lg:scrollbar-thin"},{children:[e.jsx("input",{id:`${m.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:v.length<280}),e.jsx("div",{className:"danger-html hidden flex-col peer-checked:flex",dangerouslySetInnerHTML:{__html:v}}),e.jsx("label",Object.assign({htmlFor:`${m.responseId}-input`,className:"mt-1 flex shrink-0 whitespace-nowrap text-sm font-semibold peer-checked:hidden hover:cursor-pointer",style:{color:h.accent}},{children:"See input"})),e.jsx("label",Object.assign({htmlFor:`${m.responseId}-input`,className:"hidden shrink-0 whitespace-nowrap text-sm font-semibold peer-checked:flex hover:cursor-pointer",style:{color:h.accent}},{children:"Hide input"}))]}))]})),e.jsxs("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:h.secondary,color:h.secondaryText}},{children:[e.jsx(n.default,{src:null==x?void 0:x.chaticon,alt:`${null==x?void 0:x.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:h.secondaryText}),e.jsxs("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[e.jsx(r.PickaxeMarkdown,Object.assign({theme:u.theme,accentColor:h.accent,linkPreviews:!0,actions:!0},{children:e.jsx(l.PickaxeMarkdownRenderer,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]",value:b})})),e.jsxs("div",Object.assign({className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1"},{children:[e.jsxs("div",Object.assign({className:"flex items-center gap-3"},{children:[(null==x?void 0:x.enablechatresponses)&&e.jsxs(c.default,Object.assign({color:h.accent,onClick:()=>{return e=m.responseId,j(!1),void p(e);var e}},{children:[e.jsx(o.default,{className:"h-4 w-4 shrink-0"}),e.jsx("p",Object.assign({className:"text-sm font-semibold"},{children:g+1}))]})),e.jsx(d.default,{color:h.accent,text:b})]})),e.jsx("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:e.jsx("p",Object.assign({className:"text-sm font-semibold uppercase opacity-30"},{children:f}))}))]}))]}))]}))]}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("../../../../hooks/pickaxe/usePickaxeContext.js"),a=require("../../../../hooks/pickaxe/useResponseContext.js"),r=require("date-fns"),o=require("../../../Icons/message-square-notes.svg.js"),n=require("../../../Icons/visitor.svg.js"),l=require("../../common/PickaxeIcon.js"),c=require("../../common/PickaxeSimpleButton.js"),i=require("../../Addons/Scroll/ScrollLockView.js"),d=require("../../common/PickaxeCopyButton.js"),x=require("../../common/PickaxeMarkdown/index.js"),u=require("../../common/PickaxeMarkdown/Renderer.js");exports.default=()=>{var h;const{pickaxe:m,styles:p,colors:j,setChatId:f,setIsNewChat:g}=t.usePickaxeContext(),{response:b}=a.useResponseContext(),v=s.useMemo((()=>b?r.format(b.createdAt,"hh:mm a MMM dd, yy"):r.format(new Date,"hh:mm a MMM dd, yy")),[b]),k=s.useMemo((()=>{var e;if(!b)return"";return(null!==(e=b.questions)&&void 0!==e?e:[]).map((e=>`<div style="display: flex; flex-direction: column; margin-bottom: 1em;">\n <p style="font-weight: 500;">${e.question}</p>\n <p>${e.answer||"n/a"}</p>\n</div>`)).join("")}),[b]);return b?e.jsxs("div",Object.assign({className:"flex flex-col shadow-black transition duration-300 hover:shadow"},{children:[e.jsxs("div",Object.assign({className:"flex gap-x-3 overflow-hidden px-4 py-5",style:{backgroundColor:j.primary,color:j.text}},{children:[e.jsx("div",Object.assign({className:"shrink-0 pt-1"},{children:e.jsx(n.default,{className:"h-6 w-6"})})),e.jsxs("div",Object.assign({className:"flex flex-col gap-y-1 overflow-x-auto pb-[6px] scrollbar-track-gray-100 scrollbar-thumb-[#4A4A4B] lg:max-w-[520px] lg:scrollbar-thin"},{children:[e.jsx("input",{id:`${b.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:k.length<280}),e.jsx("div",{className:"danger-html hidden flex-col opacity-50 peer-checked:flex",dangerouslySetInnerHTML:{__html:k}}),e.jsx("label",Object.assign({htmlFor:`${b.responseId}-input`,className:"mt-1 flex shrink-0 whitespace-nowrap text-sm font-semibold text-[#228DD7] peer-checked:hidden hover:cursor-pointer",style:{color:j.accent}},{children:"See input"})),e.jsx("label",Object.assign({htmlFor:`${b.responseId}-input`,className:"hidden shrink-0 whitespace-nowrap text-sm font-semibold text-[#228DD7] peer-checked:flex hover:cursor-pointer",style:{color:j.accent}},{children:"Hide input"}))]}))]})),e.jsxs("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:j.secondary,color:j.secondaryText}},{children:[e.jsx(l.default,{src:null==m?void 0:m.chaticon,alt:`${null==m?void 0:m.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:j.secondaryText}),e.jsxs("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[e.jsx(x.default,Object.assign({theme:p.theme,accentColor:j.accent,linkPreviews:!0,actions:!0},{children:e.jsx(u.PickaxeMarkdownRenderer,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]",value:b.questionResponse})})),e.jsxs("div",Object.assign({className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1"},{children:[e.jsxs("div",Object.assign({className:"flex items-center gap-3"},{children:[(null==m?void 0:m.enablechatresponses)&&e.jsxs(c.default,Object.assign({color:j.accent,onClick:()=>{return e=b.responseId,g(!1),void f(e);var e}},{children:[e.jsx(o.default,{className:"h-4 w-4 shrink-0"}),e.jsx("p",Object.assign({className:"text-sm font-semibold"},{children:b.messages.length+1}))]})),e.jsx(d.default,{color:j.accent,text:null!==(h=b.questionResponse)&&void 0!==h?h:""})]})),e.jsx("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:e.jsx("p",Object.assign({className:"text-sm font-semibold uppercase opacity-30"},{children:v}))}))]}))]}))]})),e.jsx(i.default,{})]})):null};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("../../../../hooks/pickaxe/usePickaxeContext.js"),a=require("../../../../hooks/pickaxe/useResponseContext.js"),r=require("date-fns"),o=require("../../common/PickaxeMarkdown/index.js"),n=require("../../common/PickaxeMarkdown/Renderer.js"),l=require("../../../Icons/message-square-notes.svg.js"),c=require("../../../Icons/visitor.svg.js"),i=require("../../common/PickaxeIcon.js"),d=require("../../common/PickaxeSimpleButton.js"),x=require("../../Addons/Scroll/ScrollLockView.js"),h=require("../../common/PickaxeCopyButton.js");exports.default=()=>{var u;const{pickaxe:m,styles:p,colors:j,setChatId:f,setIsNewChat:g}=t.usePickaxeContext(),{response:b}=a.useResponseContext(),k=s.useMemo((()=>b?r.format(b.createdAt,"hh:mm a MMM dd, yy"):r.format(new Date,"hh:mm a MMM dd, yy")),[b]),v=s.useMemo((()=>{var e;if(!b)return"";return(null!==(e=b.questions)&&void 0!==e?e:[]).map((e=>`<div style="display: flex; flex-direction: column; margin-bottom: 1em;">\n <p style="font-weight: 500;">${e.question}</p>\n <p>${e.answer||"n/a"}</p>\n</div>`)).join("")}),[b]);return b?e.jsxs("div",Object.assign({className:"flex flex-col shadow-black transition duration-300 hover:shadow"},{children:[e.jsxs("div",Object.assign({className:"flex gap-x-3 overflow-hidden px-4 py-5",style:{backgroundColor:j.primary,color:j.text}},{children:[e.jsx("div",Object.assign({className:"shrink-0 pt-1"},{children:e.jsx(c.default,{className:"h-6 w-6"})})),e.jsxs("div",Object.assign({className:"flex flex-col gap-y-1 overflow-x-auto pb-[6px] scrollbar-track-gray-100 scrollbar-thumb-[#4A4A4B] lg:max-w-[520px] lg:scrollbar-thin"},{children:[e.jsx("input",{id:`${b.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:v.length<280}),e.jsx("div",{className:"danger-html hidden flex-col opacity-50 peer-checked:flex",dangerouslySetInnerHTML:{__html:v}}),e.jsx("label",Object.assign({htmlFor:`${b.responseId}-input`,className:"mt-1 flex shrink-0 whitespace-nowrap text-sm font-semibold text-[#228DD7] peer-checked:hidden hover:cursor-pointer",style:{color:j.accent}},{children:"See input"})),e.jsx("label",Object.assign({htmlFor:`${b.responseId}-input`,className:"hidden shrink-0 whitespace-nowrap text-sm font-semibold text-[#228DD7] peer-checked:flex hover:cursor-pointer",style:{color:j.accent}},{children:"Hide input"}))]}))]})),e.jsxs("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:j.secondary,color:j.secondaryText}},{children:[e.jsx(i.default,{src:null==m?void 0:m.chaticon,alt:`${null==m?void 0:m.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:j.secondaryText}),e.jsxs("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[e.jsx(o.PickaxeMarkdown,Object.assign({theme:p.theme,accentColor:j.accent,linkPreviews:!0,actions:!0},{children:e.jsx(n.PickaxeMarkdownRenderer,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]",value:b.questionResponse})})),e.jsxs("div",Object.assign({className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1"},{children:[e.jsxs("div",Object.assign({className:"flex items-center gap-3"},{children:[(null==m?void 0:m.enablechatresponses)&&e.jsxs(d.default,Object.assign({color:j.accent,onClick:()=>{return e=b.responseId,g(!1),void f(e);var e}},{children:[e.jsx(l.default,{className:"h-4 w-4 shrink-0"}),e.jsx("p",Object.assign({className:"text-sm font-semibold"},{children:b.messages.length+1}))]})),e.jsx(h.default,{color:j.accent,text:null!==(u=b.questionResponse)&&void 0!==u?u:""})]})),e.jsx("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:e.jsx("p",Object.assign({className:"text-sm font-semibold uppercase opacity-30"},{children:k}))}))]}))]}))]})),e.jsx(x.default,{})]})):null};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),i=require("./hooks/usePickaxeMarkdownContext.js"),s=require("react-syntax-highlighter"),n=require("react-syntax-highlighter/dist/cjs/styles/prism"),l=require("react-markdown"),a=require("remark-gfm"),d=require("remark-math"),o=require("rehype-katex"),c=require("./A.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("katex/dist/katex.min.css");var h=m(l),g=m(a),j=m(d),x=m(o);const u=({className:l,value:a})=>{const{theme:d}=i.usePickaxeMarkdownContext(),o=r.useRef(null),m={h1:({node:e,children:r})=>t.jsx("h1",Object.assign({style:{fontSize:"2.25rem",lineHeight:"2.5rem",marginBottom:"1.5rem"}},{children:r})),h2:({node:e,children:r})=>t.jsx("h2",Object.assign({style:{fontSize:"1.875rem",lineHeight:"2.25rem",marginBottom:"1.25rem"}},{children:r})),h3:({node:e,children:r})=>t.jsx("h3",Object.assign({style:{fontSize:"1.5rem",lineHeight:"2rem",marginBottom:"1rem"}},{children:r})),h4:({node:e,children:r})=>t.jsx("h4",Object.assign({className:"mt-2 text-xl",style:{fontSize:"1.25rem",lineHeight:"1.75rem",marginBottom:"0.75rem"}},{children:r})),h5:({node:e,children:r})=>t.jsx("h5",Object.assign({style:{fontSize:"1.125rem",lineHeight:"1.75rem"}},{children:r})),p:({node:e,children:r})=>t.jsx("p",Object.assign({style:{marginBottom:"1.25rem",fontWeight:350}},{children:r})),a:c.default,ol:({node:e,children:r})=>t.jsx("ol",Object.assign({style:{listStyleType:"decimal",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"2rem"}},{children:r})),ul:({node:e,children:r})=>t.jsx("ul",Object.assign({style:{listStyleType:"disc",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"2rem"}},{children:r})),li:({node:e,children:r})=>t.jsx("li",Object.assign({style:{marginBottom:"0.5rem"}},{children:r})),table:({children:e})=>t.jsx("div",Object.assign({className:"overflow-auto"},{children:t.jsx("table",Object.assign({style:{tableLayout:"fixed",fontSize:"0.875rem",lineHeight:"1.24rem",marginBottom:"1.5rem"}},{children:e}))})),th:({node:e,children:r})=>t.jsx("th",Object.assign({style:{padding:"0.75em 1em",fontWeight:600,textAlign:"left"}},{children:r})),tr:({node:e,children:r})=>t.jsx("tr",Object.assign({style:{border:"dark"===d?"1px solid #30363D":"1px solid #D0D7DE"}},{children:r})),td:({node:e,children:r})=>t.jsx("td",Object.assign({style:{padding:"0.75em 1em"}},{children:r})),code:r=>{var{node:i,children:l,className:a}=r,d=e.__rest(r,["node","children","className"]);const o=/language-(\w+)/.exec(a||"");return o?t.jsx(s.Prism,Object.assign({},d,{PreTag:"div",language:o[1],style:n.atomDark,showLineNumbers:!0},{children:String(l).replace(/\n$/,"")})):t.jsx("code",Object.assign({},d,{className:a},{children:l}))},blockquote:({node:e,children:r})=>t.jsx("blockquote",Object.assign({style:{borderLeft:"dark"===d?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===d?"#8B8B8B":"#656D76",paddingLeft:"1rem"}},{children:r})),img:({node:e,src:r,alt:i})=>t.jsx("div",Object.assign({style:{marginTop:"2.5rem",marginBottom:"2.5rem",display:"flex",width:"100%",justifyContent:"center"}},{children:t.jsx("img",{src:r,alt:i,style:{borderRadius:"8px",maxWidth:"680px"}})}))};return t.jsx("div",Object.assign({className:"pxe-markdown relative",ref:o},{children:t.jsx(h.default,Object.assign({},l&&{className:l},{components:m,remarkPlugins:[g.default,j.default],rehypePlugins:[x.default]},{children:a}))}))};exports.PickaxeMarkdownRenderer=u,exports.default=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),i=require("./hooks/usePickaxeMarkdownContext.js"),s=require("react-syntax-highlighter"),n=require("react-syntax-highlighter/dist/cjs/styles/prism"),l=require("react-markdown"),a=require("remark-gfm"),d=require("remark-math"),o=require("rehype-katex"),c=require("./A.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=m(l),g=m(a),j=m(d),x=m(o);exports.PickaxeMarkdownRenderer=({className:l,value:a})=>{const{theme:d}=i.usePickaxeMarkdownContext(),o=r.useRef(null),m={h1:({node:e,children:r})=>t.jsx("h1",Object.assign({style:{fontSize:"2.25rem",lineHeight:"2.5rem",marginBottom:"1.5rem"}},{children:r})),h2:({node:e,children:r})=>t.jsx("h2",Object.assign({style:{fontSize:"1.875rem",lineHeight:"2.25rem",marginBottom:"1.25rem"}},{children:r})),h3:({node:e,children:r})=>t.jsx("h3",Object.assign({style:{fontSize:"1.5rem",lineHeight:"2rem",marginBottom:"1rem"}},{children:r})),h4:({node:e,children:r})=>t.jsx("h4",Object.assign({className:"mt-2 text-xl",style:{fontSize:"1.25rem",lineHeight:"1.75rem",marginBottom:"0.75rem"}},{children:r})),h5:({node:e,children:r})=>t.jsx("h5",Object.assign({style:{fontSize:"1.125rem",lineHeight:"1.75rem"}},{children:r})),p:({node:e,children:r})=>t.jsx("p",Object.assign({style:{marginBottom:"1.25rem",fontWeight:350}},{children:r})),a:c.default,ol:({node:e,children:r})=>t.jsx("ol",Object.assign({style:{listStyleType:"decimal",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"2rem"}},{children:r})),ul:({node:e,children:r})=>t.jsx("ul",Object.assign({style:{listStyleType:"disc",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"2rem"}},{children:r})),li:({node:e,children:r})=>t.jsx("li",Object.assign({style:{marginBottom:"0.5rem"}},{children:r})),table:({children:e})=>t.jsx("div",Object.assign({className:"overflow-auto"},{children:t.jsx("table",Object.assign({style:{tableLayout:"fixed",fontSize:"0.875rem",lineHeight:"1.24rem",marginBottom:"1.5rem"}},{children:e}))})),th:({node:e,children:r})=>t.jsx("th",Object.assign({style:{padding:"0.75em 1em",fontWeight:600,textAlign:"left"}},{children:r})),tr:({node:e,children:r})=>t.jsx("tr",Object.assign({style:{border:"dark"===d?"1px solid #30363D":"1px solid #D0D7DE"}},{children:r})),td:({node:e,children:r})=>t.jsx("td",Object.assign({style:{padding:"0.75em 1em"}},{children:r})),code:r=>{var{node:i,children:l,className:a}=r,d=e.__rest(r,["node","children","className"]);const o=/language-(\w+)/.exec(a||"");return o?t.jsx(s.Prism,Object.assign({},d,{PreTag:"div",language:o[1],style:n.atomDark,showLineNumbers:!0},{children:String(l).replace(/\n$/,"")})):t.jsx("code",Object.assign({},d,{className:a},{children:l}))},blockquote:({node:e,children:r})=>t.jsx("blockquote",Object.assign({style:{borderLeft:"dark"===d?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===d?"#8B8B8B":"#656D76",paddingLeft:"1rem"}},{children:r})),img:({node:e,src:r,alt:i})=>t.jsx("div",Object.assign({style:{marginTop:"2.5rem",marginBottom:"2.5rem",display:"flex",width:"100%",justifyContent:"center"}},{children:t.jsx("img",{src:r,alt:i,style:{borderRadius:"8px",maxWidth:"680px"}})}))};return t.jsx("div",Object.assign({className:"pxe-markdown relative",ref:o},{children:t.jsx(h.default,Object.assign({},l&&{className:l},{components:m,remarkPlugins:[g.default,j.default],rehypePlugins:[x.default]},{children:a}))}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react");const r=t.createContext({});exports.PickaxeMarkdownContext=r,exports.default=({children:s,theme:c="light",accentColor:i="#228DD7",linkPreviews:n=!1,actions:o=!1})=>{const[a,u]=t.useState(c),[l,x]=t.useState(i),[d,v]=t.useState(n),[h,P]=t.useState(o);return e.jsx(r.Provider,Object.assign({value:{theme:a,accentColor:l,linkPreviews:d,actions:h,setTheme:u,setAccentColor:x,setLinkPreviews:v,setActions:P}},{children:s}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react");const r=t.createContext({}),s=({children:s,theme:o="light",accentColor:c="#228DD7",linkPreviews:i=!1,actions:n=!1})=>{const[a,u]=t.useState(o),[l,x]=t.useState(c),[d,k]=t.useState(i),[v,P]=t.useState(n);return e.jsx(r.Provider,Object.assign({value:{theme:a,accentColor:l,linkPreviews:d,actions:v,setTheme:u,setAccentColor:x,setLinkPreviews:k,setActions:P}},{children:s}))};exports.PickaxeMarkdown=s,exports.PickaxeMarkdownContext=r,exports.default=s;
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./components/Pickaxe/index.js"),s=require("./components/Pickaxe/Provider.js"),o=require("./components/Pickaxe/ResponseProvider.js"),r=require("./components/Pickaxe/common/PickaxeMarkdown/index.js"),t=require("./components/Pickaxe/common/PickaxeMarkdown/Renderer.js"),i=require("./hooks/pickaxe/useConversation.js"),x=require("./hooks/pickaxe/useHistory.js"),u=require("./hooks/pickaxe/usePickaxe.js"),n=require("./hooks/pickaxe/usePickaxeContext.js"),k=require("./hooks/pickaxe/useResponseContext.js"),c=require("./hooks/pickaxe/useSubmit.js"),a=require("./hooks/pickaxe/useSubmitDocument.js"),p=require("./hooks/pickaxe/useSubmitResult.js");exports.Pickaxe=e.Pickaxe,exports.PickaxeContext=s.PickaxeContext,exports.PickaxeProvider=s.PickaxeProvider,exports.ResponseContext=o.ResponseContext,exports.PickaxeMarkdownContext=r.PickaxeMarkdownContext,exports.PickaxeMarkdownRenderer=t.PickaxeMarkdownRenderer,exports.useConversation=i.useConversation,exports.useHistory=x.useHistory,exports.usePickaxe=u.usePickaxe,exports.usePickaxeContext=n.usePickaxeContext,exports.useResponseContext=k.useResponseContext,exports.useSubmit=c.useSubmit,exports.useSubmitDocument=a.useSubmitDocument,exports.useSubmitResult=p.useSubmitResult;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./components/Pickaxe/index.js"),o=require("./components/Pickaxe/Provider.js"),s=require("./components/Pickaxe/ResponseProvider.js"),r=require("./components/Pickaxe/common/PickaxeMarkdown/index.js"),t=require("./components/Pickaxe/common/PickaxeMarkdown/Renderer.js"),i=require("./hooks/pickaxe/useConversation.js"),x=require("./hooks/pickaxe/useHistory.js"),u=require("./hooks/pickaxe/usePickaxe.js"),n=require("./hooks/pickaxe/usePickaxeContext.js"),k=require("./hooks/pickaxe/useResponseContext.js"),a=require("./hooks/pickaxe/useSubmit.js"),c=require("./hooks/pickaxe/useSubmitDocument.js"),p=require("./hooks/pickaxe/useSubmitResult.js");exports.Pickaxe=e.Pickaxe,exports.PickaxeContext=o.PickaxeContext,exports.PickaxeProvider=o.PickaxeProvider,exports.ResponseContext=s.ResponseContext,exports.PickaxeMarkdown=r.PickaxeMarkdown,exports.PickaxeMarkdownContext=r.PickaxeMarkdownContext,exports.PickaxeMarkdownRenderer=t.PickaxeMarkdownRenderer,exports.useConversation=i.useConversation,exports.useHistory=x.useHistory,exports.usePickaxe=u.usePickaxe,exports.usePickaxeContext=n.usePickaxeContext,exports.useResponseContext=k.useResponseContext,exports.useSubmit=a.useSubmit,exports.useSubmitDocument=c.useSubmitDocument,exports.useSubmitResult=p.useSubmitResult;
@@ -1,5 +1,4 @@
1
- import "katex/dist/katex.min.css";
2
- export interface PickaxeMarkdownRendererProps {
1
+ interface PickaxeMarkdownRendererProps {
3
2
  className?: string;
4
3
  value?: string | null;
5
4
  }
@@ -7,4 +6,4 @@ export type Node = {
7
6
  node?: any;
8
7
  };
9
8
  export declare const PickaxeMarkdownRenderer: ({ className, value, }: PickaxeMarkdownRendererProps) => import("react/jsx-runtime").JSX.Element;
10
- export default PickaxeMarkdownRenderer;
9
+ export {};
@@ -19,5 +19,5 @@ interface PickaxeMarkdownProps {
19
19
  actions?: boolean;
20
20
  }
21
21
  export declare const PickaxeMarkdownContext: import("react").Context<PickaxeMarkdownContextType>;
22
- declare const PickaxeMarkdown: ({ children, theme: _theme, accentColor: _accentColor, linkPreviews: _linkPreviews, actions: _actions, }: PickaxeMarkdownProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const PickaxeMarkdown: ({ children, theme: _theme, accentColor: _accentColor, linkPreviews: _linkPreviews, actions: _actions, }: PickaxeMarkdownProps) => import("react/jsx-runtime").JSX.Element;
23
23
  export default PickaxeMarkdown;
@@ -1 +1 @@
1
- import{jsx as e,jsxs as o}from"react/jsx-runtime";import{usePickaxeContext as s}from"../../../../hooks/pickaxe/usePickaxeContext.js";import c from"../../common/PickaxeIcon.js";import a from"../../common/PickaxeMarkdown/index.js";import{PickaxeMarkdownRenderer as t}from"../../common/PickaxeMarkdown/Renderer.js";import r from"../../common/PickaxeCopyButton.js";import i from"../../../../common/cn.js";const n=({message:n})=>{var l;const{formId:m,pickaxe:x,styles:d,colors:p,responsiveBy:h}=s(),f=null!==(l=null==x?void 0:x.chaticon)&&void 0!==l?l:`https://prod-pickaxe-assets.s3.us-west-2.amazonaws.com/chaticons/${m}.png`;return"assistant"===n.role?e("div",Object.assign({className:i("flex flex-col","viewport"===h?"min-[767px]:max-w-[80%]":"@[767px]/pickaxe-root:max-w-[80%]")},{children:o("div",Object.assign({className:"flex gap-x-3"},{children:["NONE"!==f&&e(c,{src:f,alt:"Assistant",width:24,height:24,className:"my-3 h-6 w-6",textColor:p.text}),o("div",Object.assign({className:"flex flex-col"},{children:[e("div",Object.assign({className:"chat-message overflow-x-auto overflow-y-hidden rounded px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]",style:{backgroundColor:p.secondary+"80",color:p.secondaryText}},{children:e(a,Object.assign({theme:d.theme,accentColor:p.accent,linkPreviews:!0,actions:!0},{children:e(t,{value:n.content})}))})),e("div",Object.assign({className:"mb-2 ml-2 mt-4 flex gap-3"},{children:e(r,{color:p.accent,text:n.content})}))]}))]}))})):"user"===n.role?e("div",Object.assign({className:i("flex gap-x-3 justify-self-end pl-9","viewport"===h?"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:"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:d.theme,accentColor:p.accent},{children:e(t,{value:n.content})}))}))})):e("div",{})};export{n as default};
1
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import{usePickaxeContext as s}from"../../../../hooks/pickaxe/usePickaxeContext.js";import{PickaxeMarkdown as c}from"../../common/PickaxeMarkdown/index.js";import{PickaxeMarkdownRenderer as a}from"../../common/PickaxeMarkdown/Renderer.js";import t from"../../common/PickaxeIcon.js";import r from"../../common/PickaxeCopyButton.js";import i from"../../../../common/cn.js";const n=({message:n})=>{var l;const{formId:m,pickaxe:x,styles:d,colors:p,responsiveBy:h}=s(),f=null!==(l=null==x?void 0:x.chaticon)&&void 0!==l?l:`https://prod-pickaxe-assets.s3.us-west-2.amazonaws.com/chaticons/${m}.png`;return"assistant"===n.role?e("div",Object.assign({className:i("flex flex-col","viewport"===h?"min-[767px]:max-w-[80%]":"@[767px]/pickaxe-root:max-w-[80%]")},{children:o("div",Object.assign({className:"flex gap-x-3"},{children:["NONE"!==f&&e(t,{src:f,alt:"Assistant",width:24,height:24,className:"my-3 h-6 w-6",textColor:p.text}),o("div",Object.assign({className:"flex flex-col"},{children:[e("div",Object.assign({className:"chat-message overflow-x-auto overflow-y-hidden rounded px-4 py-3 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]",style:{backgroundColor:p.secondary+"80",color:p.secondaryText}},{children:e(c,Object.assign({theme:d.theme,accentColor:p.accent,linkPreviews:!0,actions:!0},{children:e(a,{value:n.content})}))})),e("div",Object.assign({className:"mb-2 ml-2 mt-4 flex gap-3"},{children:e(r,{color:p.accent,text:n.content})}))]}))]}))})):"user"===n.role?e("div",Object.assign({className:i("flex gap-x-3 justify-self-end pl-9","viewport"===h?"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:"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:d.theme,accentColor:p.accent},{children:e(a,{value:n.content})}))}))})):e("div",{})};export{n as default};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as s}from"react/jsx-runtime";import{useMemo as o}from"react";import{usePickaxeContext as t}from"../../../../hooks/pickaxe/usePickaxeContext.js";import{format as a}from"date-fns";import l from"../../../Icons/message-square-notes.svg.js";import i from"../../../Icons/visitor.svg.js";import n from"../../common/PickaxeIcon.js";import r from"../../common/PickaxeMarkdown/index.js";import{PickaxeMarkdownRenderer as c}from"../../common/PickaxeMarkdown/Renderer.js";import d from"../../common/PickaxeSimpleButton.js";import m from"../../common/PickaxeCopyButton.js";const p=({item:p})=>{const{pickaxe:h,styles:f,colors:x,setChatId:u,setIsNewChat:g}=t(),v=o((()=>a(p.createdAt,"hh:mm a MMM dd, yy")),[p]),b=o((()=>p&&p.messages?p.messages.length:0),[p]),y=o((()=>{var e,s,o,t;if("form"===p.type){return(null!==(e=p.questions)&&void 0!==e?e:[]).map((e=>`<div style="display: flex; flex-direction: column; margin-bottom: 1em;">\n <p style="font-weight: 500;">${e.question}</p>\n <p>${e.answer||"n/a"}</p>\n</div>`)).join("")}return null!==(t=null===(o=null===(s=p.messages)||void 0===s?void 0:s[0])||void 0===o?void 0:o.message)&&void 0!==t?t:""}),[p]),k=o((()=>{var e,s,o,t;return"form"===p.type?null!==(e=p.questionResponse)&&void 0!==e?e:"":null!==(t=null===(o=null===(s=p.messages)||void 0===s?void 0:s[1])||void 0===o?void 0:o.message)&&void 0!==t?t:""}),[p]);return e("div",Object.assign({className:"flex flex-col shadow-black transition duration-300 hover:shadow"},{children:[e("div",Object.assign({className:"flex gap-x-3 overflow-hidden px-4 py-5",style:{backgroundColor:x.primary,color:x.text}},{children:[s("div",Object.assign({className:"shrink-0 pt-1"},{children:s(i,{className:"h-6 w-6"})})),e("div",Object.assign({className:"flex flex-col gap-y-1 overflow-x-auto pb-1.5 scrollbar-track-gray-100 scrollbar-thumb-[#4A4A4B] lg:max-w-[520px] lg:scrollbar-thin"},{children:[s("input",{id:`${p.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:y.length<280}),s("div",{className:"danger-html hidden flex-col peer-checked:flex",dangerouslySetInnerHTML:{__html:y}}),s("label",Object.assign({htmlFor:`${p.responseId}-input`,className:"mt-1 flex shrink-0 whitespace-nowrap text-sm font-semibold peer-checked:hidden hover:cursor-pointer",style:{color:x.accent}},{children:"See input"})),s("label",Object.assign({htmlFor:`${p.responseId}-input`,className:"hidden shrink-0 whitespace-nowrap text-sm font-semibold peer-checked:flex hover:cursor-pointer",style:{color:x.accent}},{children:"Hide input"}))]}))]})),e("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:x.secondary,color:x.secondaryText}},{children:[s(n,{src:null==h?void 0:h.chaticon,alt:`${null==h?void 0:h.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:x.secondaryText}),e("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[s(r,Object.assign({theme:f.theme,accentColor:x.accent,linkPreviews:!0,actions:!0},{children:s(c,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]",value:k})})),e("div",Object.assign({className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1"},{children:[e("div",Object.assign({className:"flex items-center gap-3"},{children:[(null==h?void 0:h.enablechatresponses)&&e(d,Object.assign({color:x.accent,onClick:()=>{return e=p.responseId,g(!1),void u(e);var e}},{children:[s(l,{className:"h-4 w-4 shrink-0"}),s("p",Object.assign({className:"text-sm font-semibold"},{children:b+1}))]})),s(m,{color:x.accent,text:k})]})),s("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:s("p",Object.assign({className:"text-sm font-semibold uppercase opacity-30"},{children:v}))}))]}))]}))]}))]}))};export{p as default};
1
+ import{jsxs as e,jsx as s}from"react/jsx-runtime";import{useMemo as o}from"react";import{usePickaxeContext as t}from"../../../../hooks/pickaxe/usePickaxeContext.js";import{format as a}from"date-fns";import{PickaxeMarkdown as l}from"../../common/PickaxeMarkdown/index.js";import{PickaxeMarkdownRenderer as i}from"../../common/PickaxeMarkdown/Renderer.js";import n from"../../../Icons/message-square-notes.svg.js";import r from"../../../Icons/visitor.svg.js";import c from"../../common/PickaxeIcon.js";import d from"../../common/PickaxeSimpleButton.js";import m from"../../common/PickaxeCopyButton.js";const p=({item:p})=>{const{pickaxe:h,styles:f,colors:x,setChatId:u,setIsNewChat:g}=t(),v=o((()=>a(p.createdAt,"hh:mm a MMM dd, yy")),[p]),b=o((()=>p&&p.messages?p.messages.length:0),[p]),y=o((()=>{var e,s,o,t;if("form"===p.type){return(null!==(e=p.questions)&&void 0!==e?e:[]).map((e=>`<div style="display: flex; flex-direction: column; margin-bottom: 1em;">\n <p style="font-weight: 500;">${e.question}</p>\n <p>${e.answer||"n/a"}</p>\n</div>`)).join("")}return null!==(t=null===(o=null===(s=p.messages)||void 0===s?void 0:s[0])||void 0===o?void 0:o.message)&&void 0!==t?t:""}),[p]),k=o((()=>{var e,s,o,t;return"form"===p.type?null!==(e=p.questionResponse)&&void 0!==e?e:"":null!==(t=null===(o=null===(s=p.messages)||void 0===s?void 0:s[1])||void 0===o?void 0:o.message)&&void 0!==t?t:""}),[p]);return e("div",Object.assign({className:"flex flex-col shadow-black transition duration-300 hover:shadow"},{children:[e("div",Object.assign({className:"flex gap-x-3 overflow-hidden px-4 py-5",style:{backgroundColor:x.primary,color:x.text}},{children:[s("div",Object.assign({className:"shrink-0 pt-1"},{children:s(r,{className:"h-6 w-6"})})),e("div",Object.assign({className:"flex flex-col gap-y-1 overflow-x-auto pb-1.5 scrollbar-track-gray-100 scrollbar-thumb-[#4A4A4B] lg:max-w-[520px] lg:scrollbar-thin"},{children:[s("input",{id:`${p.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:y.length<280}),s("div",{className:"danger-html hidden flex-col peer-checked:flex",dangerouslySetInnerHTML:{__html:y}}),s("label",Object.assign({htmlFor:`${p.responseId}-input`,className:"mt-1 flex shrink-0 whitespace-nowrap text-sm font-semibold peer-checked:hidden hover:cursor-pointer",style:{color:x.accent}},{children:"See input"})),s("label",Object.assign({htmlFor:`${p.responseId}-input`,className:"hidden shrink-0 whitespace-nowrap text-sm font-semibold peer-checked:flex hover:cursor-pointer",style:{color:x.accent}},{children:"Hide input"}))]}))]})),e("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:x.secondary,color:x.secondaryText}},{children:[s(c,{src:null==h?void 0:h.chaticon,alt:`${null==h?void 0:h.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:x.secondaryText}),e("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[s(l,Object.assign({theme:f.theme,accentColor:x.accent,linkPreviews:!0,actions:!0},{children:s(i,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]",value:k})})),e("div",Object.assign({className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1"},{children:[e("div",Object.assign({className:"flex items-center gap-3"},{children:[(null==h?void 0:h.enablechatresponses)&&e(d,Object.assign({color:x.accent,onClick:()=>{return e=p.responseId,g(!1),void u(e);var e}},{children:[s(n,{className:"h-4 w-4 shrink-0"}),s("p",Object.assign({className:"text-sm font-semibold"},{children:b+1}))]})),s(m,{color:x.accent,text:k})]})),s("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:s("p",Object.assign({className:"text-sm font-semibold uppercase opacity-30"},{children:v}))}))]}))]}))]}))]}))};export{p as default};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as s}from"react/jsx-runtime";import{useMemo as o}from"react";import{usePickaxeContext as t}from"../../../../hooks/pickaxe/usePickaxeContext.js";import{useResponseContext as r}from"../../../../hooks/pickaxe/useResponseContext.js";import{format as n}from"date-fns";import a from"../../../Icons/message-square-notes.svg.js";import c from"../../../Icons/visitor.svg.js";import i from"../../common/PickaxeIcon.js";import l from"../../common/PickaxeSimpleButton.js";import m from"../../Addons/Scroll/ScrollLockView.js";import d from"../../common/PickaxeCopyButton.js";import p from"../../common/PickaxeMarkdown/index.js";import{PickaxeMarkdownRenderer as h}from"../../common/PickaxeMarkdown/Renderer.js";const x=()=>{var x;const{pickaxe:f,styles:u,colors:g,setChatId:b,setIsNewChat:v}=t(),{response:k}=r(),j=o((()=>n(k?k.createdAt:new Date,"hh:mm a MMM dd, yy")),[k]),w=o((()=>{var e;if(!k)return"";return(null!==(e=k.questions)&&void 0!==e?e:[]).map((e=>`<div style="display: flex; flex-direction: column; margin-bottom: 1em;">\n <p style="font-weight: 500;">${e.question}</p>\n <p>${e.answer||"n/a"}</p>\n</div>`)).join("")}),[k]);return k?e("div",Object.assign({className:"flex flex-col shadow-black transition duration-300 hover:shadow"},{children:[e("div",Object.assign({className:"flex gap-x-3 overflow-hidden px-4 py-5",style:{backgroundColor:g.primary,color:g.text}},{children:[s("div",Object.assign({className:"shrink-0 pt-1"},{children:s(c,{className:"h-6 w-6"})})),e("div",Object.assign({className:"flex flex-col gap-y-1 overflow-x-auto pb-[6px] scrollbar-track-gray-100 scrollbar-thumb-[#4A4A4B] lg:max-w-[520px] lg:scrollbar-thin"},{children:[s("input",{id:`${k.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:w.length<280}),s("div",{className:"danger-html hidden flex-col opacity-50 peer-checked:flex",dangerouslySetInnerHTML:{__html:w}}),s("label",Object.assign({htmlFor:`${k.responseId}-input`,className:"mt-1 flex shrink-0 whitespace-nowrap text-sm font-semibold text-[#228DD7] peer-checked:hidden hover:cursor-pointer",style:{color:g.accent}},{children:"See input"})),s("label",Object.assign({htmlFor:`${k.responseId}-input`,className:"hidden shrink-0 whitespace-nowrap text-sm font-semibold text-[#228DD7] peer-checked:flex hover:cursor-pointer",style:{color:g.accent}},{children:"Hide input"}))]}))]})),e("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:g.secondary,color:g.secondaryText}},{children:[s(i,{src:null==f?void 0:f.chaticon,alt:`${null==f?void 0:f.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:g.secondaryText}),e("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[s(p,Object.assign({theme:u.theme,accentColor:g.accent,linkPreviews:!0,actions:!0},{children:s(h,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]",value:k.questionResponse})})),e("div",Object.assign({className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1"},{children:[e("div",Object.assign({className:"flex items-center gap-3"},{children:[(null==f?void 0:f.enablechatresponses)&&e(l,Object.assign({color:g.accent,onClick:()=>{return e=k.responseId,v(!1),void b(e);var e}},{children:[s(a,{className:"h-4 w-4 shrink-0"}),s("p",Object.assign({className:"text-sm font-semibold"},{children:k.messages.length+1}))]})),s(d,{color:g.accent,text:null!==(x=k.questionResponse)&&void 0!==x?x:""})]})),s("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:s("p",Object.assign({className:"text-sm font-semibold uppercase opacity-30"},{children:j}))}))]}))]}))]})),s(m,{})]})):null};export{x as default};
1
+ import{jsxs as e,jsx as s}from"react/jsx-runtime";import{useMemo as o}from"react";import{usePickaxeContext as t}from"../../../../hooks/pickaxe/usePickaxeContext.js";import{useResponseContext as r}from"../../../../hooks/pickaxe/useResponseContext.js";import{format as n}from"date-fns";import{PickaxeMarkdown as a}from"../../common/PickaxeMarkdown/index.js";import{PickaxeMarkdownRenderer as c}from"../../common/PickaxeMarkdown/Renderer.js";import i from"../../../Icons/message-square-notes.svg.js";import l from"../../../Icons/visitor.svg.js";import m from"../../common/PickaxeIcon.js";import d from"../../common/PickaxeSimpleButton.js";import p from"../../Addons/Scroll/ScrollLockView.js";import h from"../../common/PickaxeCopyButton.js";const x=()=>{var x;const{pickaxe:f,styles:u,colors:g,setChatId:b,setIsNewChat:v}=t(),{response:k}=r(),j=o((()=>n(k?k.createdAt:new Date,"hh:mm a MMM dd, yy")),[k]),w=o((()=>{var e;if(!k)return"";return(null!==(e=k.questions)&&void 0!==e?e:[]).map((e=>`<div style="display: flex; flex-direction: column; margin-bottom: 1em;">\n <p style="font-weight: 500;">${e.question}</p>\n <p>${e.answer||"n/a"}</p>\n</div>`)).join("")}),[k]);return k?e("div",Object.assign({className:"flex flex-col shadow-black transition duration-300 hover:shadow"},{children:[e("div",Object.assign({className:"flex gap-x-3 overflow-hidden px-4 py-5",style:{backgroundColor:g.primary,color:g.text}},{children:[s("div",Object.assign({className:"shrink-0 pt-1"},{children:s(l,{className:"h-6 w-6"})})),e("div",Object.assign({className:"flex flex-col gap-y-1 overflow-x-auto pb-[6px] scrollbar-track-gray-100 scrollbar-thumb-[#4A4A4B] lg:max-w-[520px] lg:scrollbar-thin"},{children:[s("input",{id:`${k.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:w.length<280}),s("div",{className:"danger-html hidden flex-col opacity-50 peer-checked:flex",dangerouslySetInnerHTML:{__html:w}}),s("label",Object.assign({htmlFor:`${k.responseId}-input`,className:"mt-1 flex shrink-0 whitespace-nowrap text-sm font-semibold text-[#228DD7] peer-checked:hidden hover:cursor-pointer",style:{color:g.accent}},{children:"See input"})),s("label",Object.assign({htmlFor:`${k.responseId}-input`,className:"hidden shrink-0 whitespace-nowrap text-sm font-semibold text-[#228DD7] peer-checked:flex hover:cursor-pointer",style:{color:g.accent}},{children:"Hide input"}))]}))]})),e("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:g.secondary,color:g.secondaryText}},{children:[s(m,{src:null==f?void 0:f.chaticon,alt:`${null==f?void 0:f.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:g.secondaryText}),e("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[s(a,Object.assign({theme:u.theme,accentColor:g.accent,linkPreviews:!0,actions:!0},{children:s(c,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar-thin scrollbar-track-white scrollbar-thumb-[#4A4A4B]",value:k.questionResponse})})),e("div",Object.assign({className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1"},{children:[e("div",Object.assign({className:"flex items-center gap-3"},{children:[(null==f?void 0:f.enablechatresponses)&&e(d,Object.assign({color:g.accent,onClick:()=>{return e=k.responseId,v(!1),void b(e);var e}},{children:[s(i,{className:"h-4 w-4 shrink-0"}),s("p",Object.assign({className:"text-sm font-semibold"},{children:k.messages.length+1}))]})),s(h,{color:g.accent,text:null!==(x=k.questionResponse)&&void 0!==x?x:""})]})),s("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:s("p",Object.assign({className:"text-sm font-semibold uppercase opacity-30"},{children:j}))}))]}))]}))]})),s(p,{})]})):null};export{x as default};
@@ -1 +1 @@
1
- import{__rest as e}from"../../../../_virtual/_tslib.js";import{jsx as t}from"react/jsx-runtime";import{useRef as i}from"react";import{usePickaxeMarkdownContext as r}from"./hooks/usePickaxeMarkdownContext.js";import{Prism as n}from"react-syntax-highlighter";import{atomDark as s}from"react-syntax-highlighter/dist/cjs/styles/prism";import l from"react-markdown";import o from"remark-gfm";import m from"remark-math";import a from"rehype-katex";import d from"./A.js";import"katex/dist/katex.min.css";const c=({className:c,value:h})=>{const{theme:g}=r(),p=i(null),f={h1:({node:e,children:i})=>t("h1",Object.assign({style:{fontSize:"2.25rem",lineHeight:"2.5rem",marginBottom:"1.5rem"}},{children:i})),h2:({node:e,children:i})=>t("h2",Object.assign({style:{fontSize:"1.875rem",lineHeight:"2.25rem",marginBottom:"1.25rem"}},{children:i})),h3:({node:e,children:i})=>t("h3",Object.assign({style:{fontSize:"1.5rem",lineHeight:"2rem",marginBottom:"1rem"}},{children:i})),h4:({node:e,children:i})=>t("h4",Object.assign({className:"mt-2 text-xl",style:{fontSize:"1.25rem",lineHeight:"1.75rem",marginBottom:"0.75rem"}},{children:i})),h5:({node:e,children:i})=>t("h5",Object.assign({style:{fontSize:"1.125rem",lineHeight:"1.75rem"}},{children:i})),p:({node:e,children:i})=>t("p",Object.assign({style:{marginBottom:"1.25rem",fontWeight:350}},{children:i})),a:d,ol:({node:e,children:i})=>t("ol",Object.assign({style:{listStyleType:"decimal",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"2rem"}},{children:i})),ul:({node:e,children:i})=>t("ul",Object.assign({style:{listStyleType:"disc",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"2rem"}},{children:i})),li:({node:e,children:i})=>t("li",Object.assign({style:{marginBottom:"0.5rem"}},{children:i})),table:({children:e})=>t("div",Object.assign({className:"overflow-auto"},{children:t("table",Object.assign({style:{tableLayout:"fixed",fontSize:"0.875rem",lineHeight:"1.24rem",marginBottom:"1.5rem"}},{children:e}))})),th:({node:e,children:i})=>t("th",Object.assign({style:{padding:"0.75em 1em",fontWeight:600,textAlign:"left"}},{children:i})),tr:({node:e,children:i})=>t("tr",Object.assign({style:{border:"dark"===g?"1px solid #30363D":"1px solid #D0D7DE"}},{children:i})),td:({node:e,children:i})=>t("td",Object.assign({style:{padding:"0.75em 1em"}},{children:i})),code:i=>{var{node:r,children:l,className:o}=i,m=e(i,["node","children","className"]);const a=/language-(\w+)/.exec(o||"");return a?t(n,Object.assign({},m,{PreTag:"div",language:a[1],style:s,showLineNumbers:!0},{children:String(l).replace(/\n$/,"")})):t("code",Object.assign({},m,{className:o},{children:l}))},blockquote:({node:e,children:i})=>t("blockquote",Object.assign({style:{borderLeft:"dark"===g?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===g?"#8B8B8B":"#656D76",paddingLeft:"1rem"}},{children:i})),img:({node:e,src:i,alt:r})=>t("div",Object.assign({style:{marginTop:"2.5rem",marginBottom:"2.5rem",display:"flex",width:"100%",justifyContent:"center"}},{children:t("img",{src:i,alt:r,style:{borderRadius:"8px",maxWidth:"680px"}})}))};return t("div",Object.assign({className:"pxe-markdown relative",ref:p},{children:t(l,Object.assign({},c&&{className:c},{components:f,remarkPlugins:[o,m],rehypePlugins:[a]},{children:h}))}))};export{c as PickaxeMarkdownRenderer,c as default};
1
+ import{__rest as e}from"../../../../_virtual/_tslib.js";import{jsx as t}from"react/jsx-runtime";import{useRef as i}from"react";import{usePickaxeMarkdownContext as r}from"./hooks/usePickaxeMarkdownContext.js";import{Prism as n}from"react-syntax-highlighter";import{atomDark as l}from"react-syntax-highlighter/dist/cjs/styles/prism";import s from"react-markdown";import o from"remark-gfm";import m from"remark-math";import a from"rehype-katex";import d from"./A.js";const c=({className:c,value:h})=>{const{theme:g}=r(),p=i(null),y={h1:({node:e,children:i})=>t("h1",Object.assign({style:{fontSize:"2.25rem",lineHeight:"2.5rem",marginBottom:"1.5rem"}},{children:i})),h2:({node:e,children:i})=>t("h2",Object.assign({style:{fontSize:"1.875rem",lineHeight:"2.25rem",marginBottom:"1.25rem"}},{children:i})),h3:({node:e,children:i})=>t("h3",Object.assign({style:{fontSize:"1.5rem",lineHeight:"2rem",marginBottom:"1rem"}},{children:i})),h4:({node:e,children:i})=>t("h4",Object.assign({className:"mt-2 text-xl",style:{fontSize:"1.25rem",lineHeight:"1.75rem",marginBottom:"0.75rem"}},{children:i})),h5:({node:e,children:i})=>t("h5",Object.assign({style:{fontSize:"1.125rem",lineHeight:"1.75rem"}},{children:i})),p:({node:e,children:i})=>t("p",Object.assign({style:{marginBottom:"1.25rem",fontWeight:350}},{children:i})),a:d,ol:({node:e,children:i})=>t("ol",Object.assign({style:{listStyleType:"decimal",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"2rem"}},{children:i})),ul:({node:e,children:i})=>t("ul",Object.assign({style:{listStyleType:"disc",listStylePosition:"inside",paddingLeft:"1.5rem",marginBottom:"2rem"}},{children:i})),li:({node:e,children:i})=>t("li",Object.assign({style:{marginBottom:"0.5rem"}},{children:i})),table:({children:e})=>t("div",Object.assign({className:"overflow-auto"},{children:t("table",Object.assign({style:{tableLayout:"fixed",fontSize:"0.875rem",lineHeight:"1.24rem",marginBottom:"1.5rem"}},{children:e}))})),th:({node:e,children:i})=>t("th",Object.assign({style:{padding:"0.75em 1em",fontWeight:600,textAlign:"left"}},{children:i})),tr:({node:e,children:i})=>t("tr",Object.assign({style:{border:"dark"===g?"1px solid #30363D":"1px solid #D0D7DE"}},{children:i})),td:({node:e,children:i})=>t("td",Object.assign({style:{padding:"0.75em 1em"}},{children:i})),code:i=>{var{node:r,children:s,className:o}=i,m=e(i,["node","children","className"]);const a=/language-(\w+)/.exec(o||"");return a?t(n,Object.assign({},m,{PreTag:"div",language:a[1],style:l,showLineNumbers:!0},{children:String(s).replace(/\n$/,"")})):t("code",Object.assign({},m,{className:o},{children:s}))},blockquote:({node:e,children:i})=>t("blockquote",Object.assign({style:{borderLeft:"dark"===g?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===g?"#8B8B8B":"#656D76",paddingLeft:"1rem"}},{children:i})),img:({node:e,src:i,alt:r})=>t("div",Object.assign({style:{marginTop:"2.5rem",marginBottom:"2.5rem",display:"flex",width:"100%",justifyContent:"center"}},{children:t("img",{src:i,alt:r,style:{borderRadius:"8px",maxWidth:"680px"}})}))};return t("div",Object.assign({className:"pxe-markdown relative",ref:p},{children:t(s,Object.assign({},c&&{className:c},{components:y,remarkPlugins:[o,m],rehypePlugins:[a]},{children:h}))}))};export{c as PickaxeMarkdownRenderer};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{createContext as t,useState as r}from"react";const i=t({}),o=({children:t,theme:o="light",accentColor:c="#228DD7",linkPreviews:n=!1,actions:s=!1})=>{const[a,l]=r(o),[m,h]=r(c),[v,d]=r(n),[u,P]=r(s);return e(i.Provider,Object.assign({value:{theme:a,accentColor:m,linkPreviews:v,actions:u,setTheme:l,setAccentColor:h,setLinkPreviews:d,setActions:P}},{children:t}))};export{i as PickaxeMarkdownContext,o as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{createContext as t,useState as r}from"react";const i=t({}),o=({children:t,theme:o="light",accentColor:c="#228DD7",linkPreviews:n=!1,actions:s=!1})=>{const[a,l]=r(o),[m,h]=r(c),[v,d]=r(n),[u,P]=r(s);return e(i.Provider,Object.assign({value:{theme:a,accentColor:m,linkPreviews:v,actions:u,setTheme:l,setAccentColor:h,setLinkPreviews:d,setActions:P}},{children:t}))};export{o as PickaxeMarkdown,i as PickaxeMarkdownContext,o as default};
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- export{Pickaxe}from"./components/Pickaxe/index.js";export{PickaxeContext,PickaxeProvider}from"./components/Pickaxe/Provider.js";export{ResponseContext}from"./components/Pickaxe/ResponseProvider.js";export{PickaxeMarkdownContext}from"./components/Pickaxe/common/PickaxeMarkdown/index.js";export{PickaxeMarkdownRenderer}from"./components/Pickaxe/common/PickaxeMarkdown/Renderer.js";export{useConversation}from"./hooks/pickaxe/useConversation.js";export{useHistory}from"./hooks/pickaxe/useHistory.js";export{usePickaxe}from"./hooks/pickaxe/usePickaxe.js";export{usePickaxeContext}from"./hooks/pickaxe/usePickaxeContext.js";export{useResponseContext}from"./hooks/pickaxe/useResponseContext.js";export{useSubmit}from"./hooks/pickaxe/useSubmit.js";export{useSubmitDocument}from"./hooks/pickaxe/useSubmitDocument.js";export{useSubmitResult}from"./hooks/pickaxe/useSubmitResult.js";
1
+ export{Pickaxe}from"./components/Pickaxe/index.js";export{PickaxeContext,PickaxeProvider}from"./components/Pickaxe/Provider.js";export{ResponseContext}from"./components/Pickaxe/ResponseProvider.js";export{PickaxeMarkdown,PickaxeMarkdownContext}from"./components/Pickaxe/common/PickaxeMarkdown/index.js";export{PickaxeMarkdownRenderer}from"./components/Pickaxe/common/PickaxeMarkdown/Renderer.js";export{useConversation}from"./hooks/pickaxe/useConversation.js";export{useHistory}from"./hooks/pickaxe/useHistory.js";export{usePickaxe}from"./hooks/pickaxe/usePickaxe.js";export{usePickaxeContext}from"./hooks/pickaxe/usePickaxeContext.js";export{useResponseContext}from"./hooks/pickaxe/useResponseContext.js";export{useSubmit}from"./hooks/pickaxe/useSubmit.js";export{useSubmitDocument}from"./hooks/pickaxe/useSubmitDocument.js";export{useSubmitResult}from"./hooks/pickaxe/useSubmitResult.js";
@@ -1,5 +1,4 @@
1
- import "katex/dist/katex.min.css";
2
- export interface PickaxeMarkdownRendererProps {
1
+ interface PickaxeMarkdownRendererProps {
3
2
  className?: string;
4
3
  value?: string | null;
5
4
  }
@@ -7,4 +6,4 @@ export type Node = {
7
6
  node?: any;
8
7
  };
9
8
  export declare const PickaxeMarkdownRenderer: ({ className, value, }: PickaxeMarkdownRendererProps) => import("react/jsx-runtime").JSX.Element;
10
- export default PickaxeMarkdownRenderer;
9
+ export {};
@@ -19,5 +19,5 @@ interface PickaxeMarkdownProps {
19
19
  actions?: boolean;
20
20
  }
21
21
  export declare const PickaxeMarkdownContext: import("react").Context<PickaxeMarkdownContextType>;
22
- declare const PickaxeMarkdown: ({ children, theme: _theme, accentColor: _accentColor, linkPreviews: _linkPreviews, actions: _actions, }: PickaxeMarkdownProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const PickaxeMarkdown: ({ children, theme: _theme, accentColor: _accentColor, linkPreviews: _linkPreviews, actions: _actions, }: PickaxeMarkdownProps) => import("react/jsx-runtime").JSX.Element;
23
23
  export default PickaxeMarkdown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pickaxeproject/react",
3
- "version": "0.0.30",
3
+ "version": "0.0.32",
4
4
  "description": "Client utility library for Pickaxe",
5
5
  "repository": {
6
6
  "type": "git",
@@ -67,7 +67,6 @@
67
67
  "@tanstack/react-query": "^4.36.1",
68
68
  "@types/katex": "^0.16.7",
69
69
  "@types/node": "^18.11.18",
70
- "@types/prismjs": "^1.26.5",
71
70
  "@types/react": "^18.0.26",
72
71
  "@types/react-dom": "^18.0.10",
73
72
  "@types/react-lottie": "^1.2.10",