@pickaxeproject/react 1.2.0 → 1.2.1

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("react"),o=require("../../../../hooks/pickaxe/usePickaxeContext.js"),a=require("../../../../hooks/studio/useStyleFontSize.js"),n=require("../../Addons/Document/hooks/useDocument.js"),t=require("date-fns"),i=require("../../common/PickaxeMarkdown/index.js"),l=require("../../common/PickaxeMarkdown/Renderer.js"),r=require("../../../Icons/message-square-notes.svg.js"),c=require("../../../Icons/visitor.svg.js"),d=require("../../common/PickaxeIcon.js"),u=require("../../common/PickaxeSimpleButton.js"),m=require("../../common/PickaxeCopyButton.js"),x=require("../../../../common/cn.js");exports.default=({item:h})=>{const{pickaxe:p,styles:j,colors:f,misc:v,translations:g,setChatId:b,setIsNewChat:k}=o.usePickaxeContext(),y=a.useStyleFontSize(),{upsertDocuments:w}=n.useDocument(),N=s.useMemo((()=>t.format(h.createdAt,"hh:mm a MMM dd, yy")),[h]),q=s.useMemo((()=>h&&h.messages?h.messages.length:0),[h]),O=s.useMemo((()=>{var e,s,o,a;if("form"===h.type){return(null!==(e=h.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!==(a=null===(o=null===(s=h.messages)||void 0===s?void 0:s[0])||void 0===o?void 0:o.message)&&void 0!==a?a:""}),[h]),C=s.useMemo((()=>{var e,s,o,a;return"form"===h.type?null!==(e=h.questionResponse)&&void 0!==e?e:"":null!==(a=null===(o=null===(s=h.messages)||void 0===s?void 0:s[1])||void 0===o?void 0:o.message)&&void 0!==a?a:""}),[h]);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:f.primary,color:f.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-1.5 scrollbar-track-gray-100 scrollbar-thumb-[#4A4A4B] lg:max-w-[520px] lg:scrollbar-thin"},{children:[e.jsx("input",{id:`${h.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:O.length<280}),e.jsx("div",{className:"danger-html hidden flex-col peer-checked:flex",dangerouslySetInnerHTML:{__html:O}}),e.jsx("label",Object.assign({htmlFor:`${h.responseId}-input`,className:x.default(y.b3,"mt-1 flex shrink-0 whitespace-nowrap font-semibold peer-checked:hidden hover:cursor-pointer"),style:{color:f.accent}},{children:(null==g?void 0:g["see-input"])||"See input"})),e.jsx("label",Object.assign({htmlFor:`${h.responseId}-input`,className:x.default(y.b3,"hidden shrink-0 whitespace-nowrap font-semibold peer-checked:flex hover:cursor-pointer"),style:{color:f.accent}},{children:(null==g?void 0:g["hide-input"])||"Hide input"}))]}))]})),e.jsxs("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:f.secondary,color:f.secondaryText}},{children:[v.isChatImage&&e.jsx(d.default,{src:null==p?void 0:p.chaticon,alt:`${null==p?void 0:p.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:f.secondaryText}),e.jsxs("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[e.jsx(i.PickaxeMarkdown,Object.assign({theme:j.theme,accentColor:f.accent,linkPreviews:!0,actions:!0},{children:e.jsx(l.PickaxeMarkdownRenderer,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar scrollbar-thin",value:C})})),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==p?void 0:p.enablechatresponses)&&e.jsxs(u.default,Object.assign({color:f.accent,onClick:()=>{return e=h.responseId,w([]),k(!1),void b(e);var e}},{children:[e.jsx(r.default,{className:"h-4 w-4 shrink-0"}),e.jsx("p",Object.assign({className:x.default(y.b3,"font-semibold")},{children:q+1}))]})),e.jsx(m.default,{color:f.accent,text:C})]})),e.jsx("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:e.jsx("p",Object.assign({className:x.default(y.b3,"font-semibold uppercase opacity-30")},{children:N}))}))]}))]}))]}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),o=require("../../../../hooks/pickaxe/usePickaxeContext.js"),t=require("../../../../hooks/pickaxe/useResponseContext.js"),n=require("../../../../hooks/studio/useStyleFontSize.js"),a=require("../../Addons/Document/hooks/useDocument.js"),i=require("date-fns"),l=require("../../common/PickaxeMarkdown/index.js"),r=require("../../common/PickaxeMarkdown/Renderer.js"),c=require("../../../Icons/message-square-notes.svg.js"),d=require("../../../Icons/visitor.svg.js"),u=require("../../common/PickaxeIcon.js"),m=require("../../common/PickaxeSimpleButton.js"),x=require("../../common/PickaxeCopyButton.js"),h=require("../../../../common/cn.js");exports.default=({item:p})=>{const{pickaxe:j,styles:f,colors:g,misc:v,translations:b,setChatId:k,setIsNewChat:y}=o.usePickaxeContext(),{setMessages:w}=t.useResponseContext(),{upsertDocuments:N}=a.useDocument(),q=n.useStyleFontSize(),O=s.useMemo((()=>i.format(p.createdAt,"hh:mm a MMM dd, yy")),[p]),C=s.useMemo((()=>p&&p.messages?p.messages.length:0),[p]),M=s.useMemo((()=>{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]),I=s.useMemo((()=>{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.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:g.primary,color:g.text}},{children:[e.jsx("div",Object.assign({className:"shrink-0 pt-1"},{children:e.jsx(d.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:`${p.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:M.length<280}),e.jsx("div",{className:"danger-html hidden flex-col peer-checked:flex",dangerouslySetInnerHTML:{__html:M}}),e.jsx("label",Object.assign({htmlFor:`${p.responseId}-input`,className:h.default(q.b3,"mt-1 flex shrink-0 whitespace-nowrap font-semibold peer-checked:hidden hover:cursor-pointer"),style:{color:g.accent}},{children:(null==b?void 0:b["see-input"])||"See input"})),e.jsx("label",Object.assign({htmlFor:`${p.responseId}-input`,className:h.default(q.b3,"hidden shrink-0 whitespace-nowrap font-semibold peer-checked:flex hover:cursor-pointer"),style:{color:g.accent}},{children:(null==b?void 0:b["hide-input"])||"Hide input"}))]}))]})),e.jsxs("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:g.secondary,color:g.secondaryText}},{children:[v.isChatImage&&e.jsx(u.default,{src:null==j?void 0:j.chaticon,alt:`${null==j?void 0:j.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:g.secondaryText}),e.jsxs("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[e.jsx(l.PickaxeMarkdown,Object.assign({theme:f.theme,accentColor:g.accent,linkPreviews:!0,actions:!0},{children:e.jsx(r.PickaxeMarkdownRenderer,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar scrollbar-thin",value:I})})),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==j?void 0:j.enablechatresponses)&&e.jsxs(m.default,Object.assign({color:g.accent,onClick:()=>{return e=p.responseId,N([]),w([]),y(!1),void k(e);var e}},{children:[e.jsx(c.default,{className:"h-4 w-4 shrink-0"}),e.jsx("p",Object.assign({className:h.default(q.b3,"font-semibold")},{children:C+1}))]})),e.jsx(x.default,{color:g.accent,text:I})]})),e.jsx("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:e.jsx("p",Object.assign({className:h.default(q.b3,"font-semibold uppercase opacity-30")},{children:O}))}))]}))]}))]}))]}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),o=require("../../../../hooks/pickaxe/usePickaxeContext.js"),t=require("../../../../hooks/pickaxe/useResponseContext.js"),n=require("../../Addons/Scroll/hooks/useScrollContext.js"),r=require("../../../../hooks/studio/useStyleFontSize.js"),a=require("../../Addons/Document/hooks/useDocument.js"),l=require("date-fns"),i=require("../../common/PickaxeMarkdown/index.js"),c=require("../../common/PickaxeMarkdown/Renderer.js"),d=require("../../../Icons/message-square-notes.svg.js"),u=require("../../../Icons/visitor.svg.js"),x=require("../../common/PickaxeIcon.js"),h=require("../../common/PickaxeSimpleButton.js"),m=require("../../common/PickaxeCopyButton.js"),p=require("../../Addons/Scroll/ScrollLockView.js"),j=require("../../../../common/cn.js");exports.default=()=>{var f;const{pickaxe:b,styles:g,colors:k,misc:v,translations:y,setChatId:w,setIsNewChat:q}=o.usePickaxeContext(),{response:N}=t.useResponseContext(),{scrollTargetRef:C}=n.useScrollContext(),O=r.useStyleFontSize(),{upsertDocuments:M}=a.useDocument(),I=s.useMemo((()=>N?l.format(N.createdAt,"hh:mm a MMM dd, yy"):l.format(new Date,"hh:mm a MMM dd, yy")),[N]),S=s.useMemo((()=>{var e;if(!N)return"";return(null!==(e=N.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("")}),[N]);return N?e.jsxs("div",Object.assign({ref:C,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:k.primary,color:k.text}},{children:[e.jsx("div",Object.assign({className:"shrink-0 pt-1"},{children:e.jsx(u.default,{className:"h-6 w-6"})})),e.jsxs("div",Object.assign({className:"flex flex-col gap-y-1 overflow-x-auto pb-[6px] scrollbar scrollbar-thin"},{children:[e.jsx("input",{id:`${N.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:S.length<280}),e.jsx("div",{className:"danger-html hidden flex-col opacity-50 peer-checked:flex",dangerouslySetInnerHTML:{__html:S}}),e.jsx("label",Object.assign({htmlFor:`${N.responseId}-input`,className:j.default(O.b3,"mt-1 flex shrink-0 whitespace-nowrap font-semibold text-[#228DD7] peer-checked:hidden hover:cursor-pointer"),style:{color:k.accent}},{children:(null==y?void 0:y["see-input"])||"See input"})),e.jsx("label",Object.assign({htmlFor:`${N.responseId}-input`,className:j.default(O.b3,"hidden shrink-0 whitespace-nowrap font-semibold text-[#228DD7] peer-checked:flex hover:cursor-pointer"),style:{color:k.accent}},{children:(null==y?void 0:y["hide-input"])||"Hide input"}))]}))]})),e.jsxs("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:k.secondary,color:k.secondaryText}},{children:[v.isChatImage&&e.jsx(x.default,{src:null==b?void 0:b.chaticon,alt:`${null==b?void 0:b.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:k.secondaryText}),e.jsxs("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[e.jsx(i.PickaxeMarkdown,Object.assign({theme:g.theme,accentColor:k.accent,linkPreviews:!0,actions:!0},{children:e.jsx(c.PickaxeMarkdownRenderer,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar scrollbar-thin",value:N.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==b?void 0:b.enablechatresponses)&&e.jsxs(h.default,Object.assign({color:k.accent,onClick:()=>{return e=N.responseId,M([]),q(!1),void w(e);var e}},{children:[e.jsx(d.default,{className:"h-4 w-4 shrink-0"}),e.jsx("p",Object.assign({className:j.default(O.b3,"font-semibold")},{children:N.messages.length+1}))]})),e.jsx(m.default,{color:k.accent,text:null!==(f=N.questionResponse)&&void 0!==f?f:""})]})),e.jsx("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:e.jsx("p",Object.assign({className:j.default(O.b3,"font-semibold uppercase opacity-30")},{children:I}))}))]}))]}))]})),e.jsx(p.default,{className:"w-full"})]})):null};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),o=require("../../../../hooks/pickaxe/usePickaxeContext.js"),t=require("../../../../hooks/pickaxe/useResponseContext.js"),n=require("../../Addons/Scroll/hooks/useScrollContext.js"),r=require("../../../../hooks/studio/useStyleFontSize.js"),a=require("../../Addons/Document/hooks/useDocument.js"),l=require("date-fns"),i=require("../../common/PickaxeMarkdown/index.js"),c=require("../../common/PickaxeMarkdown/Renderer.js"),d=require("../../../Icons/message-square-notes.svg.js"),u=require("../../../Icons/visitor.svg.js"),x=require("../../common/PickaxeIcon.js"),h=require("../../common/PickaxeSimpleButton.js"),m=require("../../common/PickaxeCopyButton.js"),p=require("../../Addons/Scroll/ScrollLockView.js"),j=require("../../../../common/cn.js");exports.default=()=>{var f;const{pickaxe:g,styles:b,colors:k,misc:v,translations:y,setChatId:w,setIsNewChat:q}=o.usePickaxeContext(),{response:N,setMessages:C}=t.useResponseContext(),{scrollTargetRef:O}=n.useScrollContext(),M=r.useStyleFontSize(),{upsertDocuments:I}=a.useDocument(),S=s.useMemo((()=>N?l.format(N.createdAt,"hh:mm a MMM dd, yy"):l.format(new Date,"hh:mm a MMM dd, yy")),[N]),P=s.useMemo((()=>{var e;if(!N)return"";return(null!==(e=N.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("")}),[N]);return N?e.jsxs("div",Object.assign({ref:O,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:k.primary,color:k.text}},{children:[e.jsx("div",Object.assign({className:"shrink-0 pt-1"},{children:e.jsx(u.default,{className:"h-6 w-6"})})),e.jsxs("div",Object.assign({className:"flex flex-col gap-y-1 overflow-x-auto pb-[6px] scrollbar scrollbar-thin"},{children:[e.jsx("input",{id:`${N.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:P.length<280}),e.jsx("div",{className:"danger-html hidden flex-col opacity-50 peer-checked:flex",dangerouslySetInnerHTML:{__html:P}}),e.jsx("label",Object.assign({htmlFor:`${N.responseId}-input`,className:j.default(M.b3,"mt-1 flex shrink-0 whitespace-nowrap font-semibold text-[#228DD7] peer-checked:hidden hover:cursor-pointer"),style:{color:k.accent}},{children:(null==y?void 0:y["see-input"])||"See input"})),e.jsx("label",Object.assign({htmlFor:`${N.responseId}-input`,className:j.default(M.b3,"hidden shrink-0 whitespace-nowrap font-semibold text-[#228DD7] peer-checked:flex hover:cursor-pointer"),style:{color:k.accent}},{children:(null==y?void 0:y["hide-input"])||"Hide input"}))]}))]})),e.jsxs("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:k.secondary,color:k.secondaryText}},{children:[v.isChatImage&&e.jsx(x.default,{src:null==g?void 0:g.chaticon,alt:`${null==g?void 0:g.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:k.secondaryText}),e.jsxs("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[e.jsx(i.PickaxeMarkdown,Object.assign({theme:b.theme,accentColor:k.accent,linkPreviews:!0,actions:!0},{children:e.jsx(c.PickaxeMarkdownRenderer,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar scrollbar-thin",value:N.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==g?void 0:g.enablechatresponses)&&e.jsxs(h.default,Object.assign({color:k.accent,onClick:()=>{return e=N.responseId,I([]),C([]),q(!1),void w(e);var e}},{children:[e.jsx(d.default,{className:"h-4 w-4 shrink-0"}),e.jsx("p",Object.assign({className:j.default(M.b3,"font-semibold")},{children:N.messages.length+1}))]})),e.jsx(m.default,{color:k.accent,text:null!==(f=N.questionResponse)&&void 0!==f?f:""})]})),e.jsx("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:e.jsx("p",Object.assign({className:j.default(M.b3,"font-semibold uppercase opacity-30")},{children:S}))}))]}))]}))]})),e.jsx(p.default,{className:"w-full"})]})):null};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),s=require("react-syntax-highlighter"),t=require("../../hooks/usePickaxeMarkdownContext.js"),i=require("../../../PickaxeCopyButton.js");exports.default=a=>{var n,{node:l,children:c,className:o}=a,d=e.__rest(a,["node","children","className"]);const{syntaxTheme:u}=t.usePickaxeMarkdownContext(),x=/language-(\w+)/.exec(o||"");return r.jsx("div",Object.assign({className:"pxe-markdown-code scrollbar scrollbar-thin"},{children:r.jsxs("div",{children:[r.jsx("div",{children:r.jsx(i.default,{color:"#FFFFFF",text:null!==(n=null==c?void 0:c.toString())&&void 0!==n?n:"",iconClassName:"w-4 h-4 text-white"})}),r.jsx(s.Prism,Object.assign({},d,{PreTag:"div",language:x?x[1]:"js",style:u,showLineNumbers:!0},{children:String(c).replace(/\n$/,"")}))]})}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),s=require("react-syntax-highlighter"),i=require("../../hooks/usePickaxeMarkdownContext.js"),t=require("../../../PickaxeCopyButton.js");exports.default=a=>{var n,{node:l,children:c,className:d}=a,o=e.__rest(a,["node","children","className"]);const{syntaxTheme:u}=i.usePickaxeMarkdownContext(),x=/language-(\w+)/.exec(d||"");return r.jsx("div",Object.assign({className:"pxe-markdown-code"},{children:r.jsxs("div",{children:[r.jsx("div",{children:r.jsx(t.default,{color:"#FFFFFF",text:null!==(n=null==c?void 0:c.toString())&&void 0!==n?n:"",iconClassName:"w-4 h-4 text-white"})}),r.jsx("div",{children:r.jsx(s.Prism,Object.assign({},o,{PreTag:"div",language:x?x[1]:"js",style:u,showLineNumbers:!0},{children:String(c).replace(/\n$/,"")}))})]})}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),o=require("../../../hooks/core/useHover.js"),s=require("../../../common/cn.js");exports.default=({color:t,children:i,className:n,isForceColor:c,onClick:l})=>{const u=o.useHover(),{isHover:a}=u,d=e.__rest(u,["isHover"]);return r.jsx("button",Object.assign({className:s.default("flex items-center gap-1 outline-none transition-colors duration-300 ease-in-out",n)},(a||c)&&{style:{color:t}},l&&{onClick:e=>{e.stopPropagation(),l()}},d,{children:i}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("../../../common/cn.js");exports.default=({color:t,children:r,className:i,isForceColor:a,onClick:c})=>e.jsx("button",Object.assign({className:o.default("flex items-center gap-1 outline-none transition-opacity opacity-70 hover:opacity-100 duration-300 ease-in-out",i,a&&"opacity-100")},t&&{style:{color:t}},c&&{onClick:e=>{e.stopPropagation(),c()}},{children:r}));
@@ -1 +1 @@
1
- .pxe-prose p{font-weight:350}.pxe-prose p:not(:only-child){margin-bottom:.75rem}.pxe-prose a{font-weight:600;text-decoration:underline;text-underline-offset:.2rem}.pxe-prose iframe{margin-bottom:1.5rem}.pxe-prose blockquote{margin-bottom:2.5rem;padding-bottom:.25rem;padding-left:1rem;padding-top:.25rem}.pxe-prose hr{margin-bottom:1.5rem}.pxe-prose .pxe-markdown-image,.pxe-prose .pxe-markdown-youtube{margin-bottom:2.5rem}.pxe-prose .pxe-markdown-code{margin-bottom:1.5rem}.pxe-prose .pxe-action{margin-top:1rem}.pxe-prose ol{list-style-type:decimal}.pxe-prose ol,.pxe-prose ul{list-style-position:inside;margin-bottom:1.5rem;padding-left:1rem}.pxe-prose ul{list-style-type:disc}.pxe-prose li{margin:10px}.pxe-prose li>p{display:inline}.pxe-prose .pxe-markdown-table{margin-bottom:2.5rem;overflow:auto;position:relative}.pxe-prose table{font-size:.875rem;line-height:1.24rem;table-layout:fixed}.pxe-prose th{font-weight:600;text-align:left}.pxe-prose td,.pxe-prose th{padding:.75em 1em}.pxe-prose h1{font-size:2.25rem;line-height:2.5rem;margin-bottom:1.5rem}.pxe-prose h2{font-size:1.875rem;line-height:2.25rem;margin-bottom:1.5rem}.pxe-prose h3{font-size:1.5rem;line-height:2rem;margin-bottom:1.5rem}.pxe-prose h4{font-size:1.25rem}.pxe-prose h4,.pxe-prose h5{line-height:1.75rem;margin-bottom:1rem}.pxe-prose h5{font-size:1.125rem}.pxe-prose h2:not(:first-child),.pxe-prose h3:not(:first-child),.pxe-prose h4:not(:first-child),.pxe-prose h5:not(:first-child){margin-top:2.5rem}.pxe-prose>pre:not(:first-child){margin-top:1rem}.pxe-prose>p:not(:first-child) .pxe-markdown-image,.pxe-prose>p:not(:first-child) .pxe-markdown-youtube{margin-top:2.5rem}.pxe-prose .pxe-markdown-code{display:flex;flex-direction:column}.pxe-prose .pxe-markdown-code>div:first-child{background-color:#1d1f21;border-radius:.3em;display:flex;flex-direction:column;max-width:min-content;overflow:auto;padding-top:1em;position:relative}.pxe-prose .pxe-markdown-code>div:first-child>div:first-child{display:flex;justify-content:flex-end;padding:0 1em}
1
+ .pxe-prose p{font-weight:350}.pxe-prose p:not(:only-child){margin-bottom:.75rem}.pxe-prose a{font-weight:600;text-decoration:underline;text-underline-offset:.2rem}.pxe-prose iframe{margin-bottom:1.5rem}.pxe-prose blockquote{margin-bottom:2.5rem;padding-bottom:.25rem;padding-left:1rem;padding-top:.25rem}.pxe-prose hr{margin-bottom:1.5rem}.pxe-prose .pxe-markdown-image,.pxe-prose .pxe-markdown-youtube{margin-bottom:2.5rem}.pxe-prose .pxe-markdown-code{margin-bottom:1.5rem}.pxe-prose .pxe-action{margin-top:1rem}.pxe-prose ol{list-style-type:decimal}.pxe-prose ol,.pxe-prose ul{list-style-position:inside;margin-bottom:1.5rem;padding-left:1rem}.pxe-prose ul{list-style-type:disc}.pxe-prose li{margin:10px}.pxe-prose li>p{display:inline}.pxe-prose .pxe-markdown-table{margin-bottom:2.5rem;overflow:auto;position:relative}.pxe-prose table{font-size:.875rem;line-height:1.24rem;table-layout:fixed}.pxe-prose th{font-weight:600;text-align:left}.pxe-prose td,.pxe-prose th{padding:.75em 1em}.pxe-prose h1{font-size:2.25rem;line-height:2.5rem;margin-bottom:1.5rem}.pxe-prose h2{font-size:1.875rem;line-height:2.25rem;margin-bottom:1.5rem}.pxe-prose h3{font-size:1.5rem;line-height:2rem;margin-bottom:1.5rem}.pxe-prose h4{font-size:1.25rem}.pxe-prose h4,.pxe-prose h5{line-height:1.75rem;margin-bottom:1rem}.pxe-prose h5{font-size:1.125rem}.pxe-prose h2:not(:first-child),.pxe-prose h3:not(:first-child),.pxe-prose h4:not(:first-child),.pxe-prose h5:not(:first-child){margin-top:2.5rem}.pxe-prose>pre:not(:first-child){margin-top:1rem}.pxe-prose>p:not(:first-child) .pxe-markdown-image,.pxe-prose>p:not(:first-child) .pxe-markdown-youtube{margin-top:2.5rem}.pxe-prose .pxe-markdown-code{display:flex;flex-direction:column}.pxe-prose .pxe-markdown-code>div:first-child{background-color:#1d1f21;border-radius:.3em;display:flex;flex-direction:column;max-width:min-content;padding-top:1em;position:relative}.pxe-prose .pxe-markdown-code>div:first-child>div:first-child{display:flex;justify-content:flex-end;padding:0 1em}.pxe-prose .pxe-markdown-code>div:first-child>div:last-child{overflow:auto}
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from "react";
2
2
  interface PickaxeSimpleButtonProps {
3
- color: string;
3
+ color?: string;
4
4
  children: ReactNode;
5
5
  className?: string;
6
6
  isForceColor?: boolean;
@@ -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{useStyleFontSize as n}from"../../../../hooks/studio/useStyleFontSize.js";import{useDocument as i}from"../../Addons/Document/hooks/useDocument.js";import{format as l}from"date-fns";import{PickaxeMarkdown as r}from"../../common/PickaxeMarkdown/index.js";import{PickaxeMarkdownRenderer as a}from"../../common/PickaxeMarkdown/Renderer.js";import c from"../../../Icons/message-square-notes.svg.js";import m from"../../../Icons/visitor.svg.js";import d from"../../common/PickaxeIcon.js";import p from"../../common/PickaxeSimpleButton.js";import h from"../../common/PickaxeCopyButton.js";import u from"../../../../common/cn.js";const f=({item:f})=>{const{pickaxe:g,styles:v,colors:x,misc:b,translations:j,setChatId:y,setIsNewChat:k}=t(),w=n(),{upsertDocuments:N}=i(),O=o((()=>l(f.createdAt,"hh:mm a MMM dd, yy")),[f]),C=o((()=>f&&f.messages?f.messages.length:0),[f]),I=o((()=>{var e,s,o,t;if("form"===f.type){return(null!==(e=f.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=f.messages)||void 0===s?void 0:s[0])||void 0===o?void 0:o.message)&&void 0!==t?t:""}),[f]),P=o((()=>{var e,s,o,t;return"form"===f.type?null!==(e=f.questionResponse)&&void 0!==e?e:"":null!==(t=null===(o=null===(s=f.messages)||void 0===s?void 0:s[1])||void 0===o?void 0:o.message)&&void 0!==t?t:""}),[f]);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(m,{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:`${f.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:I.length<280}),s("div",{className:"danger-html hidden flex-col peer-checked:flex",dangerouslySetInnerHTML:{__html:I}}),s("label",Object.assign({htmlFor:`${f.responseId}-input`,className:u(w.b3,"mt-1 flex shrink-0 whitespace-nowrap font-semibold peer-checked:hidden hover:cursor-pointer"),style:{color:x.accent}},{children:(null==j?void 0:j["see-input"])||"See input"})),s("label",Object.assign({htmlFor:`${f.responseId}-input`,className:u(w.b3,"hidden shrink-0 whitespace-nowrap font-semibold peer-checked:flex hover:cursor-pointer"),style:{color:x.accent}},{children:(null==j?void 0:j["hide-input"])||"Hide input"}))]}))]})),e("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:x.secondary,color:x.secondaryText}},{children:[b.isChatImage&&s(d,{src:null==g?void 0:g.chaticon,alt:`${null==g?void 0:g.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:v.theme,accentColor:x.accent,linkPreviews:!0,actions:!0},{children:s(a,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar scrollbar-thin",value:P})})),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==g?void 0:g.enablechatresponses)&&e(p,Object.assign({color:x.accent,onClick:()=>{return e=f.responseId,N([]),k(!1),void y(e);var e}},{children:[s(c,{className:"h-4 w-4 shrink-0"}),s("p",Object.assign({className:u(w.b3,"font-semibold")},{children:C+1}))]})),s(h,{color:x.accent,text:P})]})),s("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:s("p",Object.assign({className:u(w.b3,"font-semibold uppercase opacity-30")},{children:O}))}))]}))]}))]}))]}))};export{f 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 n}from"../../../../hooks/pickaxe/useResponseContext.js";import{useStyleFontSize as i}from"../../../../hooks/studio/useStyleFontSize.js";import{useDocument as r}from"../../Addons/Document/hooks/useDocument.js";import{format as a}from"date-fns";import{PickaxeMarkdown as l}from"../../common/PickaxeMarkdown/index.js";import{PickaxeMarkdownRenderer as c}from"../../common/PickaxeMarkdown/Renderer.js";import m from"../../../Icons/message-square-notes.svg.js";import d from"../../../Icons/visitor.svg.js";import p from"../../common/PickaxeIcon.js";import h from"../../common/PickaxeSimpleButton.js";import u from"../../common/PickaxeCopyButton.js";import f from"../../../../common/cn.js";const g=({item:g})=>{const{pickaxe:x,styles:v,colors:b,misc:j,translations:k,setChatId:y,setIsNewChat:w}=t(),{setMessages:N}=n(),{upsertDocuments:O}=r(),C=i(),I=o((()=>a(g.createdAt,"hh:mm a MMM dd, yy")),[g]),M=o((()=>g&&g.messages?g.messages.length:0),[g]),P=o((()=>{var e,s,o,t;if("form"===g.type){return(null!==(e=g.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=g.messages)||void 0===s?void 0:s[0])||void 0===o?void 0:o.message)&&void 0!==t?t:""}),[g]),$=o((()=>{var e,s,o,t;return"form"===g.type?null!==(e=g.questionResponse)&&void 0!==e?e:"":null!==(t=null===(o=null===(s=g.messages)||void 0===s?void 0:s[1])||void 0===o?void 0:o.message)&&void 0!==t?t:""}),[g]);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:b.primary,color:b.text}},{children:[s("div",Object.assign({className:"shrink-0 pt-1"},{children:s(d,{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:`${g.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:P.length<280}),s("div",{className:"danger-html hidden flex-col peer-checked:flex",dangerouslySetInnerHTML:{__html:P}}),s("label",Object.assign({htmlFor:`${g.responseId}-input`,className:f(C.b3,"mt-1 flex shrink-0 whitespace-nowrap font-semibold peer-checked:hidden hover:cursor-pointer"),style:{color:b.accent}},{children:(null==k?void 0:k["see-input"])||"See input"})),s("label",Object.assign({htmlFor:`${g.responseId}-input`,className:f(C.b3,"hidden shrink-0 whitespace-nowrap font-semibold peer-checked:flex hover:cursor-pointer"),style:{color:b.accent}},{children:(null==k?void 0:k["hide-input"])||"Hide input"}))]}))]})),e("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:b.secondary,color:b.secondaryText}},{children:[j.isChatImage&&s(p,{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:b.secondaryText}),e("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[s(l,Object.assign({theme:v.theme,accentColor:b.accent,linkPreviews:!0,actions:!0},{children:s(c,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar scrollbar-thin",value:$})})),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==x?void 0:x.enablechatresponses)&&e(h,Object.assign({color:b.accent,onClick:()=>{return e=g.responseId,O([]),N([]),w(!1),void y(e);var e}},{children:[s(m,{className:"h-4 w-4 shrink-0"}),s("p",Object.assign({className:f(C.b3,"font-semibold")},{children:M+1}))]})),s(u,{color:b.accent,text:$})]})),s("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:s("p",Object.assign({className:f(C.b3,"font-semibold uppercase opacity-30")},{children:I}))}))]}))]}))]}))]}))};export{g 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 n}from"../../../../hooks/pickaxe/useResponseContext.js";import{useScrollContext as r}from"../../Addons/Scroll/hooks/useScrollContext.js";import{useStyleFontSize as i}from"../../../../hooks/studio/useStyleFontSize.js";import{useDocument as l}from"../../Addons/Document/hooks/useDocument.js";import{format as c}from"date-fns";import{PickaxeMarkdown as a}from"../../common/PickaxeMarkdown/index.js";import{PickaxeMarkdownRenderer as m}from"../../common/PickaxeMarkdown/Renderer.js";import d from"../../../Icons/message-square-notes.svg.js";import p from"../../../Icons/visitor.svg.js";import h from"../../common/PickaxeIcon.js";import f from"../../common/PickaxeSimpleButton.js";import u from"../../common/PickaxeCopyButton.js";import x from"../../Addons/Scroll/ScrollLockView.js";import g from"../../../../common/cn.js";const b=()=>{var b;const{pickaxe:v,styles:j,colors:k,misc:y,translations:w,setChatId:N,setIsNewChat:O}=t(),{response:C}=n(),{scrollTargetRef:I}=r(),S=i(),{upsertDocuments:D}=l(),P=o((()=>c(C?C.createdAt:new Date,"hh:mm a MMM dd, yy")),[C]),M=o((()=>{var e;if(!C)return"";return(null!==(e=C.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("")}),[C]);return C?e("div",Object.assign({ref:I,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:k.primary,color:k.text}},{children:[s("div",Object.assign({className:"shrink-0 pt-1"},{children:s(p,{className:"h-6 w-6"})})),e("div",Object.assign({className:"flex flex-col gap-y-1 overflow-x-auto pb-[6px] scrollbar scrollbar-thin"},{children:[s("input",{id:`${C.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:M.length<280}),s("div",{className:"danger-html hidden flex-col opacity-50 peer-checked:flex",dangerouslySetInnerHTML:{__html:M}}),s("label",Object.assign({htmlFor:`${C.responseId}-input`,className:g(S.b3,"mt-1 flex shrink-0 whitespace-nowrap font-semibold text-[#228DD7] peer-checked:hidden hover:cursor-pointer"),style:{color:k.accent}},{children:(null==w?void 0:w["see-input"])||"See input"})),s("label",Object.assign({htmlFor:`${C.responseId}-input`,className:g(S.b3,"hidden shrink-0 whitespace-nowrap font-semibold text-[#228DD7] peer-checked:flex hover:cursor-pointer"),style:{color:k.accent}},{children:(null==w?void 0:w["hide-input"])||"Hide input"}))]}))]})),e("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:k.secondary,color:k.secondaryText}},{children:[y.isChatImage&&s(h,{src:null==v?void 0:v.chaticon,alt:`${null==v?void 0:v.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:k.secondaryText}),e("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[s(a,Object.assign({theme:j.theme,accentColor:k.accent,linkPreviews:!0,actions:!0},{children:s(m,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar scrollbar-thin",value:C.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==v?void 0:v.enablechatresponses)&&e(f,Object.assign({color:k.accent,onClick:()=>{return e=C.responseId,D([]),O(!1),void N(e);var e}},{children:[s(d,{className:"h-4 w-4 shrink-0"}),s("p",Object.assign({className:g(S.b3,"font-semibold")},{children:C.messages.length+1}))]})),s(u,{color:k.accent,text:null!==(b=C.questionResponse)&&void 0!==b?b:""})]})),s("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:s("p",Object.assign({className:g(S.b3,"font-semibold uppercase opacity-30")},{children:P}))}))]}))]}))]})),s(x,{className:"w-full"})]})):null};export{b 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 n}from"../../../../hooks/pickaxe/useResponseContext.js";import{useScrollContext as r}from"../../Addons/Scroll/hooks/useScrollContext.js";import{useStyleFontSize as i}from"../../../../hooks/studio/useStyleFontSize.js";import{useDocument as l}from"../../Addons/Document/hooks/useDocument.js";import{format as c}from"date-fns";import{PickaxeMarkdown as a}from"../../common/PickaxeMarkdown/index.js";import{PickaxeMarkdownRenderer as m}from"../../common/PickaxeMarkdown/Renderer.js";import d from"../../../Icons/message-square-notes.svg.js";import p from"../../../Icons/visitor.svg.js";import h from"../../common/PickaxeIcon.js";import f from"../../common/PickaxeSimpleButton.js";import u from"../../common/PickaxeCopyButton.js";import x from"../../Addons/Scroll/ScrollLockView.js";import g from"../../../../common/cn.js";const b=()=>{var b;const{pickaxe:v,styles:j,colors:k,misc:y,translations:w,setChatId:N,setIsNewChat:O}=t(),{response:C,setMessages:I}=n(),{scrollTargetRef:S}=r(),D=i(),{upsertDocuments:M}=l(),P=o((()=>c(C?C.createdAt:new Date,"hh:mm a MMM dd, yy")),[C]),$=o((()=>{var e;if(!C)return"";return(null!==(e=C.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("")}),[C]);return C?e("div",Object.assign({ref:S,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:k.primary,color:k.text}},{children:[s("div",Object.assign({className:"shrink-0 pt-1"},{children:s(p,{className:"h-6 w-6"})})),e("div",Object.assign({className:"flex flex-col gap-y-1 overflow-x-auto pb-[6px] scrollbar scrollbar-thin"},{children:[s("input",{id:`${C.responseId}-input`,type:"checkbox",className:"peer hidden",defaultChecked:$.length<280}),s("div",{className:"danger-html hidden flex-col opacity-50 peer-checked:flex",dangerouslySetInnerHTML:{__html:$}}),s("label",Object.assign({htmlFor:`${C.responseId}-input`,className:g(D.b3,"mt-1 flex shrink-0 whitespace-nowrap font-semibold text-[#228DD7] peer-checked:hidden hover:cursor-pointer"),style:{color:k.accent}},{children:(null==w?void 0:w["see-input"])||"See input"})),s("label",Object.assign({htmlFor:`${C.responseId}-input`,className:g(D.b3,"hidden shrink-0 whitespace-nowrap font-semibold text-[#228DD7] peer-checked:flex hover:cursor-pointer"),style:{color:k.accent}},{children:(null==w?void 0:w["hide-input"])||"Hide input"}))]}))]})),e("div",Object.assign({className:"flex gap-x-3 px-4 py-5",style:{backgroundColor:k.secondary,color:k.secondaryText}},{children:[y.isChatImage&&s(h,{src:null==v?void 0:v.chaticon,alt:`${null==v?void 0:v.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6 pt-1",textColor:k.secondaryText}),e("div",Object.assign({className:"flex w-full flex-col gap-y-2 overflow-hidden"},{children:[s(a,Object.assign({theme:j.theme,accentColor:k.accent,linkPreviews:!0,actions:!0},{children:s(m,{className:"overflow-x-auto pb-2 font-semilight opacity-90 scrollbar scrollbar-thin",value:C.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==v?void 0:v.enablechatresponses)&&e(f,Object.assign({color:k.accent,onClick:()=>{return e=C.responseId,M([]),I([]),O(!1),void N(e);var e}},{children:[s(d,{className:"h-4 w-4 shrink-0"}),s("p",Object.assign({className:g(D.b3,"font-semibold")},{children:C.messages.length+1}))]})),s(u,{color:k.accent,text:null!==(b=C.questionResponse)&&void 0!==b?b:""})]})),s("div",Object.assign({className:"flex shrink-0 grow justify-end"},{children:s("p",Object.assign({className:g(D.b3,"font-semibold uppercase opacity-30")},{children:P}))}))]}))]}))]})),s(x,{className:"w-full"})]})):null};export{b as default};
@@ -1 +1 @@
1
- import{__rest as e}from"../../../../../../_virtual/_tslib.js";import{jsx as r,jsxs as t}from"react/jsx-runtime";import{Prism as i}from"react-syntax-highlighter";import{usePickaxeMarkdownContext as o}from"../../hooks/usePickaxeMarkdownContext.js";import a from"../../../PickaxeCopyButton.js";const n=n=>{var s,{node:l,children:c,className:d}=n,m=e(n,["node","children","className"]);const{syntaxTheme:h}=o(),g=/language-(\w+)/.exec(d||"");return r("div",Object.assign({className:"pxe-markdown-code scrollbar scrollbar-thin"},{children:t("div",{children:[r("div",{children:r(a,{color:"#FFFFFF",text:null!==(s=null==c?void 0:c.toString())&&void 0!==s?s:"",iconClassName:"w-4 h-4 text-white"})}),r(i,Object.assign({},m,{PreTag:"div",language:g?g[1]:"js",style:h,showLineNumbers:!0},{children:String(c).replace(/\n$/,"")}))]})}))};export{n as default};
1
+ import{__rest as e}from"../../../../../../_virtual/_tslib.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{Prism as t}from"react-syntax-highlighter";import{usePickaxeMarkdownContext as n}from"../../hooks/usePickaxeMarkdownContext.js";import o from"../../../PickaxeCopyButton.js";const a=a=>{var s,{node:l,children:c,className:d}=a,m=e(a,["node","children","className"]);const{syntaxTheme:h}=n(),g=/language-(\w+)/.exec(d||"");return r("div",Object.assign({className:"pxe-markdown-code"},{children:i("div",{children:[r("div",{children:r(o,{color:"#FFFFFF",text:null!==(s=null==c?void 0:c.toString())&&void 0!==s?s:"",iconClassName:"w-4 h-4 text-white"})}),r("div",{children:r(t,Object.assign({},m,{PreTag:"div",language:g?g[1]:"js",style:h,showLineNumbers:!0},{children:String(c).replace(/\n$/,"")}))})]})}))};export{a as default};
@@ -1 +1 @@
1
- import{__rest as o}from"../../../_virtual/_tslib.js";import{jsx as r}from"react/jsx-runtime";import{useHover as t}from"../../../hooks/core/useHover.js";import e from"../../../common/cn.js";const s=({color:s,children:i,className:n,isForceColor:c,onClick:l})=>{const a=t(),{isHover:m}=a,u=o(a,["isHover"]);return r("button",Object.assign({className:e("flex items-center gap-1 outline-none transition-colors duration-300 ease-in-out",n)},(m||c)&&{style:{color:s}},l&&{onClick:o=>{o.stopPropagation(),l()}},u,{children:i}))};export{s as default};
1
+ import{jsx as o}from"react/jsx-runtime";import t from"../../../common/cn.js";const e=({color:e,children:i,className:c,isForceColor:n,onClick:a})=>o("button",Object.assign({className:t("flex items-center gap-1 outline-none transition-opacity opacity-70 hover:opacity-100 duration-300 ease-in-out",c,n&&"opacity-100")},e&&{style:{color:e}},a&&{onClick:o=>{o.stopPropagation(),a()}},{children:i}));export{e as default};
@@ -1 +1 @@
1
- .pxe-prose p{font-weight:350}.pxe-prose p:not(:only-child){margin-bottom:.75rem}.pxe-prose a{font-weight:600;text-decoration:underline;text-underline-offset:.2rem}.pxe-prose iframe{margin-bottom:1.5rem}.pxe-prose blockquote{margin-bottom:2.5rem;padding-bottom:.25rem;padding-left:1rem;padding-top:.25rem}.pxe-prose hr{margin-bottom:1.5rem}.pxe-prose .pxe-markdown-image,.pxe-prose .pxe-markdown-youtube{margin-bottom:2.5rem}.pxe-prose .pxe-markdown-code{margin-bottom:1.5rem}.pxe-prose .pxe-action{margin-top:1rem}.pxe-prose ol{list-style-type:decimal}.pxe-prose ol,.pxe-prose ul{list-style-position:inside;margin-bottom:1.5rem;padding-left:1rem}.pxe-prose ul{list-style-type:disc}.pxe-prose li{margin:10px}.pxe-prose li>p{display:inline}.pxe-prose .pxe-markdown-table{margin-bottom:2.5rem;overflow:auto;position:relative}.pxe-prose table{font-size:.875rem;line-height:1.24rem;table-layout:fixed}.pxe-prose th{font-weight:600;text-align:left}.pxe-prose td,.pxe-prose th{padding:.75em 1em}.pxe-prose h1{font-size:2.25rem;line-height:2.5rem;margin-bottom:1.5rem}.pxe-prose h2{font-size:1.875rem;line-height:2.25rem;margin-bottom:1.5rem}.pxe-prose h3{font-size:1.5rem;line-height:2rem;margin-bottom:1.5rem}.pxe-prose h4{font-size:1.25rem}.pxe-prose h4,.pxe-prose h5{line-height:1.75rem;margin-bottom:1rem}.pxe-prose h5{font-size:1.125rem}.pxe-prose h2:not(:first-child),.pxe-prose h3:not(:first-child),.pxe-prose h4:not(:first-child),.pxe-prose h5:not(:first-child){margin-top:2.5rem}.pxe-prose>pre:not(:first-child){margin-top:1rem}.pxe-prose>p:not(:first-child) .pxe-markdown-image,.pxe-prose>p:not(:first-child) .pxe-markdown-youtube{margin-top:2.5rem}.pxe-prose .pxe-markdown-code{display:flex;flex-direction:column}.pxe-prose .pxe-markdown-code>div:first-child{background-color:#1d1f21;border-radius:.3em;display:flex;flex-direction:column;max-width:min-content;overflow:auto;padding-top:1em;position:relative}.pxe-prose .pxe-markdown-code>div:first-child>div:first-child{display:flex;justify-content:flex-end;padding:0 1em}
1
+ .pxe-prose p{font-weight:350}.pxe-prose p:not(:only-child){margin-bottom:.75rem}.pxe-prose a{font-weight:600;text-decoration:underline;text-underline-offset:.2rem}.pxe-prose iframe{margin-bottom:1.5rem}.pxe-prose blockquote{margin-bottom:2.5rem;padding-bottom:.25rem;padding-left:1rem;padding-top:.25rem}.pxe-prose hr{margin-bottom:1.5rem}.pxe-prose .pxe-markdown-image,.pxe-prose .pxe-markdown-youtube{margin-bottom:2.5rem}.pxe-prose .pxe-markdown-code{margin-bottom:1.5rem}.pxe-prose .pxe-action{margin-top:1rem}.pxe-prose ol{list-style-type:decimal}.pxe-prose ol,.pxe-prose ul{list-style-position:inside;margin-bottom:1.5rem;padding-left:1rem}.pxe-prose ul{list-style-type:disc}.pxe-prose li{margin:10px}.pxe-prose li>p{display:inline}.pxe-prose .pxe-markdown-table{margin-bottom:2.5rem;overflow:auto;position:relative}.pxe-prose table{font-size:.875rem;line-height:1.24rem;table-layout:fixed}.pxe-prose th{font-weight:600;text-align:left}.pxe-prose td,.pxe-prose th{padding:.75em 1em}.pxe-prose h1{font-size:2.25rem;line-height:2.5rem;margin-bottom:1.5rem}.pxe-prose h2{font-size:1.875rem;line-height:2.25rem;margin-bottom:1.5rem}.pxe-prose h3{font-size:1.5rem;line-height:2rem;margin-bottom:1.5rem}.pxe-prose h4{font-size:1.25rem}.pxe-prose h4,.pxe-prose h5{line-height:1.75rem;margin-bottom:1rem}.pxe-prose h5{font-size:1.125rem}.pxe-prose h2:not(:first-child),.pxe-prose h3:not(:first-child),.pxe-prose h4:not(:first-child),.pxe-prose h5:not(:first-child){margin-top:2.5rem}.pxe-prose>pre:not(:first-child){margin-top:1rem}.pxe-prose>p:not(:first-child) .pxe-markdown-image,.pxe-prose>p:not(:first-child) .pxe-markdown-youtube{margin-top:2.5rem}.pxe-prose .pxe-markdown-code{display:flex;flex-direction:column}.pxe-prose .pxe-markdown-code>div:first-child{background-color:#1d1f21;border-radius:.3em;display:flex;flex-direction:column;max-width:min-content;padding-top:1em;position:relative}.pxe-prose .pxe-markdown-code>div:first-child>div:first-child{display:flex;justify-content:flex-end;padding:0 1em}.pxe-prose .pxe-markdown-code>div:first-child>div:last-child{overflow:auto}
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from "react";
2
2
  interface PickaxeSimpleButtonProps {
3
- color: string;
3
+ color?: string;
4
4
  children: ReactNode;
5
5
  className?: string;
6
6
  isForceColor?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pickaxeproject/react",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Client utility library for Pickaxe",
5
5
  "repository": {
6
6
  "type": "git",