@pickaxeproject/react 0.0.63 → 0.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Pickaxe/Chat/History/index.js +1 -1
- package/dist/cjs/components/Pickaxe/common/PickaxeMarkdown/Renderer.js +1 -1
- package/dist/cjs/components/Pickaxe/common/PickaxeUpgradeCard.js +1 -1
- package/dist/cjs/src/components/Pickaxe/common/PickaxeMarkdown/Renderer.d.ts +1 -2
- package/dist/cjs/src/components/Pickaxe/common/PickaxeMarkdown/index.d.ts +1 -1
- package/dist/esm/components/Pickaxe/Chat/History/index.js +1 -1
- package/dist/esm/components/Pickaxe/common/PickaxeMarkdown/Renderer.js +1 -1
- package/dist/esm/components/Pickaxe/common/PickaxeUpgradeCard.js +1 -1
- package/dist/esm/src/components/Pickaxe/common/PickaxeMarkdown/Renderer.d.ts +1 -2
- package/dist/esm/src/components/Pickaxe/common/PickaxeMarkdown/index.d.ts +1 -1
- package/package.json +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),a=require("../../../../hooks/pickaxe/usePickaxeContext.js"),t=require("../../../../hooks/pickaxe/useResponseContext.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),a=require("../../../../hooks/pickaxe/usePickaxeContext.js"),t=require("../../../../hooks/pickaxe/useResponseContext.js"),r=require("../../../../hooks/studio/useStyleFontSize.js"),l=require("../../../../hooks/pickaxe/useConversation.js"),o=require("../../common/PickaxeIcon.js"),i=require("../../../Core/ErrorAlert.js"),c=require("../../Addons/Scroll/ScrollLockView.js"),n=require("../../common/PickaxeHead.js"),d=require("../../common/PickaxeInfoModal.js"),u=require("../../common/PickaxeUpgradeCard.js"),x=require("./Message.js"),m=require("../../../../common/cn.js");exports.default=()=>{var j;const{pickaxe:p,styles:f,colors:g,responsiveBy:h,isNewChat:k,setChatId:E}=a.usePickaxeContext(),{messages:b,status:v,limitData:w,error:y}=t.useResponseContext(),N=l.useConversation(),C=r.useStyleFontSize(),[O,q]=s.useState(!1),S=s.useMemo((()=>!!N.data&&!(N.data.messages.length<=1)),[N.data]),F=s.useMemo((()=>N.isSuccess&&k&&!S),[N.isSuccess,k,S]);return e.jsxs("div",Object.assign({className:"relative flex flex-grow flex-col justify-end"},{children:[O&&e.jsx(d.default,{isOpen:O,onChangeIsOpen:q}),e.jsx("div",Object.assign({className:m.default("absolute left-1/2 top-5 flex w-full max-w-[400px] -translate-x-1/2 -translate-y-1/3 transform flex-col items-center px-4 opacity-0 duration-300",F&&"top-1/3 opacity-100")},{children:e.jsx(n.default,{iconClassName:"duration-300 hover:opacity-90",onIconClick:()=>E("")})})),e.jsx("div",Object.assign({className:"flex w-full justify-center"},{children:N.isLoading?e.jsxs("div",Object.assign({className:"grid w-full max-w-[800px] grid-cols-1 gap-y-6 px-6 pt-10"},{children:[e.jsx("div",{className:"h-10 w-[70%] animate-pulse justify-self-end rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===f.theme?"#1E1E1F":"#E5E7EB"}}),e.jsx("div",{className:"h-[150px] w-[70%] animate-pulse rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===f.theme?"#1E1E1F":"#E5E7EB"}}),e.jsx("div",{className:"h-10 w-[50%] animate-pulse justify-self-end rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===f.theme?"#1E1E1F":"#E5E7EB"}})]})):N.isError?e.jsx("div",Object.assign({className:"flex w-full max-w-[800px] justify-center pt-10"},{children:e.jsxs("p",Object.assign({className:m.default(C.b2,"text-center font-semibold")},{children:["Something went wrong. Please try again, or"," ",e.jsx("a",Object.assign({href:"mailto:info@pickaxeproject.com?subject=Help",target:"_blank",rel:"noreferrer"},{children:"contact us"}))," ","for help."]}))})):e.jsxs("div",Object.assign({className:"flex flex-col w-full"},{children:[e.jsxs("div",Object.assign({className:m.default("relative grid w-full max-w-[800px] grid-cols-1 gap-y-6 px-4 pt-6","viewport"===h?"min-[767px]:pt-10":"@[767px]/pickaxe-root:pt-10")},{children:[N.data.messages.map(((s,a)=>e.jsx(x.default,{message:s},a))),b.map(((s,a)=>e.jsx(x.default,{message:s},a))),"fetching"===v?e.jsxs("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:["NONE"!==(null==p?void 0:p.chaticon)&&e.jsx(o.default,{src:null!==(j=null==p?void 0:p.chaticon)&&void 0!==j?j:`https://prod-pickaxe-assets.s3.us-west-2.amazonaws.com/chaticons/${null==p?void 0:p.formid}.png`,alt:`${null==p?void 0:p.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6",textColor:g.text}),e.jsxs("div",Object.assign({className:"flex items-center gap-x-2 rounded px-4 py-4",style:{backgroundColor:g.secondary+"80",color:g.secondaryText}},{children:[e.jsx("div",{className:"h-1.5 w-1.5 animate-dot rounded-full",style:{backgroundColor:g.secondaryText}}),e.jsx("div",{className:"h-1.5 w-1.5 animate-dot-down rounded-full",style:{backgroundColor:g.secondaryText}}),e.jsx("div",{className:"h-1.5 w-1.5 animate-dot rounded-full",style:{backgroundColor:g.secondaryText}})]}))]})):w?e.jsx("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:e.jsx(u.default,{})})):y?e.jsx("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:e.jsx(i.default,{error:y})})):null]})),e.jsx(c.default,{className:"w-full"})]}))}))]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),r=require("./hooks/usePickaxeMarkdownContext.js"),t=require("react-markdown"),s=require("remark-gfm"),n=require("remark-math"),l=require("rehype-katex"),d=require("./Custom/A/index.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),r=require("./hooks/usePickaxeMarkdownContext.js"),t=require("react-markdown"),s=require("remark-gfm"),n=require("remark-math"),l=require("rehype-katex"),d=require("rehype-raw"),a=require("./Custom/A/index.js"),o=require("./Custom/P/index.js"),c=require("./Custom/Img/index.js"),h=require("./Custom/Iframe/index.js"),m=require("./Custom/Code/index.js"),u=require("./Custom/common/LinkPreview.js");function j(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=j(t),g=j(s),f=j(n),p=j(l),b=j(d);exports.PickaxeMarkdownRenderer=({className:t,style:s,value:n,recursion:l=!1})=>{const{theme:d,websiteMetadatas:j}=r.usePickaxeMarkdownContext(),y=i.useRef(null),k=i.useMemo((()=>{if(!n)return"";let e=n;return e=n.replace(/<!--[\s\S]*?-->/g,""),e=n.replace(/\u200B/g,""),e}),[n]),O={h1:({node:i,children:r})=>e.jsx("h1",Object.assign({style:{fontSize:"2.25rem",lineHeight:"2.5rem"}},{children:r})),h2:({node:i,children:r})=>e.jsx("h2",Object.assign({style:{fontSize:"1.875rem",lineHeight:"2.25rem"}},{children:r})),h3:({node:i,children:r})=>e.jsx("h3",Object.assign({style:{fontSize:"1.5rem",lineHeight:"2rem"}},{children:r})),h4:({node:i,children:r})=>e.jsx("h4",Object.assign({className:"mt-2",style:{fontSize:"1.25rem",lineHeight:"1.75rem"}},{children:r})),h5:({node:i,children:r})=>e.jsx("h5",Object.assign({style:{fontSize:"1.125rem",lineHeight:"1.75rem"}},{children:r})),p:o.default,a:a.default,ol:({node:i,children:r})=>e.jsx("ol",Object.assign({style:{listStyleType:"decimal",listStylePosition:"inside",paddingLeft:"1.5rem",whiteSpace:"normal"}},{children:r})),ul:({node:i,children:r})=>e.jsx("ul",Object.assign({style:{listStyleType:"disc",listStylePosition:"inside",paddingLeft:"1.5rem",whiteSpace:"normal"}},{children:r})),li:({node:i,children:r})=>e.jsx("li",Object.assign({style:{whiteSpace:"normal"}},{children:r})),table:({children:i})=>e.jsx("div",Object.assign({className:"overflow-auto"},{children:e.jsx("table",Object.assign({style:{tableLayout:"fixed",fontSize:"0.875rem",lineHeight:"1.24rem"}},{children:i}))})),th:({node:i,children:r})=>e.jsx("th",Object.assign({style:{padding:"0.75em 1em",fontWeight:600,textAlign:"left"}},{children:r})),tr:({node:i,children:r})=>e.jsx("tr",Object.assign({style:{border:"dark"===d?"1px solid #30363D":"1px solid #D0D7DE"}},{children:r})),td:({node:i,children:r})=>e.jsx("td",Object.assign({style:{padding:"0.75em 1em"}},{children:r})),code:m.default,blockquote:({node:i,children:r})=>e.jsx("blockquote",Object.assign({style:{lineHeight:"15px",borderLeft:"dark"===d?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===d?"#8B8B8B":"#656D76",paddingLeft:"1rem",marginBottom:"1rem"}},{children:r})),img:c.default,iframe:h.default,hr:()=>e.jsx("hr",{style:{border:0,borderTop:"dark"===d?"1px solid #30363D":"1px solid #D0D7DE"}})};return e.jsxs("div",Object.assign({className:"pxe-markdown",ref:y,style:Object.assign({position:"relative",whiteSpace:"pre-wrap"},s)},{children:[e.jsx(x.default,Object.assign({},t&&{className:t},{components:O,remarkPlugins:[g.default,f.default],rehypePlugins:[p.default,b.default]},{children:`${k}${!l&&j.length>0?"\n\n---":""}`})),!l&&j.length>0&&e.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"2rem",marginTop:"2rem"}},{children:j.map(((i,r)=>e.jsx(u.default,{data:i},r)))}))]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("framer-motion"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("framer-motion"),r=require("../../../hooks/pickaxe/usePickaxeContext.js"),t=require("../../../hooks/pickaxe/useResponseContext.js"),a=require("../../../hooks/studio/useStyleFontSize.js"),i=require("../../Icons/circle-exclamation.svg.js"),l=require("../../Core/SpringTransition.js"),n=require("../../Core/HtmlRenderer.js"),c=require("./PickaxeButton.js"),o=require("../../../common/cn.js");exports.default=({className:u,iconClassName:x,htmlClassName:m})=>{const{colors:j}=r.usePickaxeContext(),d=a.useStyleFontSize(),{limitData:f}=t.useResponseContext();return e.jsx(s.AnimatePresence,{children:!!f&&e.jsxs(l.default,Object.assign({className:o.default("flex gap-3",u)},{children:[e.jsx(i.default,{className:o.default("h-5 w-5 shrink-0",x),style:{color:j.accent}}),e.jsxs("div",Object.assign({className:"flex flex-col gap-4"},{children:[e.jsx(n.default,{className:o.default(d.b2,"font-semibold",m),style:{color:j.text},html:f.html}),!!f.cta&&e.jsx("a",Object.assign({href:f.ctaLink,target:"_blank",rel:"noreferrer"},{children:e.jsx(c.default,Object.assign({variant:"primary",className:"min-h-[38px]"},{children:f.cta}))}))]}))]}))})};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
|
-
interface PickaxeMarkdownRendererProps {
|
|
2
|
+
export interface PickaxeMarkdownRendererProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
style?: CSSProperties;
|
|
5
5
|
value?: string | null;
|
|
@@ -9,4 +9,3 @@ export type Node = {
|
|
|
9
9
|
node?: any;
|
|
10
10
|
};
|
|
11
11
|
export declare const PickaxeMarkdownRenderer: ({ className, style, value, recursion, }: PickaxeMarkdownRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -20,7 +20,7 @@ type PickaxeMarkdownContextType = {
|
|
|
20
20
|
setLinkPreviews: SetState<boolean>;
|
|
21
21
|
setActions: SetState<boolean>;
|
|
22
22
|
};
|
|
23
|
-
interface PickaxeMarkdownProps {
|
|
23
|
+
export interface PickaxeMarkdownProps {
|
|
24
24
|
children: ReactNode;
|
|
25
25
|
theme?: PickaxeMarkdownTheme;
|
|
26
26
|
syntaxTheme?: Record<string, CSSProperties>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as s}from"react/jsx-runtime";import{useState as a,useMemo as o}from"react";import{usePickaxeContext as t}from"../../../../hooks/pickaxe/usePickaxeContext.js";import{useResponseContext as r}from"../../../../hooks/pickaxe/useResponseContext.js";import{useStyleFontSize as i}from"../../../../hooks/studio/useStyleFontSize.js";import{useConversation as l}from"../../../../hooks/pickaxe/useConversation.js";import c from"../../common/PickaxeIcon.js";import n from"../../../Core/ErrorAlert.js";import m from"../../Addons/Scroll/ScrollLockView.js";import d from"../../common/PickaxeHead.js";import p from"../../common/PickaxeInfoModal.js";import x from"../../common/PickaxeUpgradeCard.js";import f from"./Message.js";import u from"../../../../common/cn.js";const g=()=>{var g;const{pickaxe:h,styles:j,colors:E,responsiveBy:k,isNewChat:
|
|
1
|
+
import{jsxs as e,jsx as s}from"react/jsx-runtime";import{useState as a,useMemo as o}from"react";import{usePickaxeContext as t}from"../../../../hooks/pickaxe/usePickaxeContext.js";import{useResponseContext as r}from"../../../../hooks/pickaxe/useResponseContext.js";import{useStyleFontSize as i}from"../../../../hooks/studio/useStyleFontSize.js";import{useConversation as l}from"../../../../hooks/pickaxe/useConversation.js";import c from"../../common/PickaxeIcon.js";import n from"../../../Core/ErrorAlert.js";import m from"../../Addons/Scroll/ScrollLockView.js";import d from"../../common/PickaxeHead.js";import p from"../../common/PickaxeInfoModal.js";import x from"../../common/PickaxeUpgradeCard.js";import f from"./Message.js";import u from"../../../../common/cn.js";const g=()=>{var g;const{pickaxe:h,styles:j,colors:E,responsiveBy:k,isNewChat:b,setChatId:w}=t(),{messages:v,status:y,limitData:N,error:C}=r(),O=l(),B=i(),[F,S]=a(!1),I=o((()=>!!O.data&&!(O.data.messages.length<=1)),[O.data]),P=o((()=>O.isSuccess&&b&&!I),[O.isSuccess,b,I]);return e("div",Object.assign({className:"relative flex flex-grow flex-col justify-end"},{children:[F&&s(p,{isOpen:F,onChangeIsOpen:S}),s("div",Object.assign({className:u("absolute left-1/2 top-5 flex w-full max-w-[400px] -translate-x-1/2 -translate-y-1/3 transform flex-col items-center px-4 opacity-0 duration-300",P&&"top-1/3 opacity-100")},{children:s(d,{iconClassName:"duration-300 hover:opacity-90",onIconClick:()=>w("")})})),s("div",Object.assign({className:"flex w-full justify-center"},{children:O.isLoading?e("div",Object.assign({className:"grid w-full max-w-[800px] grid-cols-1 gap-y-6 px-6 pt-10"},{children:[s("div",{className:"h-10 w-[70%] animate-pulse justify-self-end rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===j.theme?"#1E1E1F":"#E5E7EB"}}),s("div",{className:"h-[150px] w-[70%] animate-pulse rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===j.theme?"#1E1E1F":"#E5E7EB"}}),s("div",{className:"h-10 w-[50%] animate-pulse justify-self-end rounded bg-[#E5E7EB] dark:bg-[#1E1E1F]",style:{backgroundColor:"dark"===j.theme?"#1E1E1F":"#E5E7EB"}})]})):O.isError?s("div",Object.assign({className:"flex w-full max-w-[800px] justify-center pt-10"},{children:e("p",Object.assign({className:u(B.b2,"text-center font-semibold")},{children:["Something went wrong. Please try again, or"," ",s("a",Object.assign({href:"mailto:info@pickaxeproject.com?subject=Help",target:"_blank",rel:"noreferrer"},{children:"contact us"}))," ","for help."]}))})):e("div",Object.assign({className:"flex flex-col w-full"},{children:[e("div",Object.assign({className:u("relative grid w-full max-w-[800px] grid-cols-1 gap-y-6 px-4 pt-6","viewport"===k?"min-[767px]:pt-10":"@[767px]/pickaxe-root:pt-10")},{children:[O.data.messages.map(((e,a)=>s(f,{message:e},a))),v.map(((e,a)=>s(f,{message:e},a))),"fetching"===y?e("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:["NONE"!==(null==h?void 0:h.chaticon)&&s(c,{src:null!==(g=null==h?void 0:h.chaticon)&&void 0!==g?g:`https://prod-pickaxe-assets.s3.us-west-2.amazonaws.com/chaticons/${null==h?void 0:h.formid}.png`,alt:`${null==h?void 0:h.formtitle}'s Chat Icon`,width:24,height:24,className:"h-6 w-6",textColor:E.text}),e("div",Object.assign({className:"flex items-center gap-x-2 rounded px-4 py-4",style:{backgroundColor:E.secondary+"80",color:E.secondaryText}},{children:[s("div",{className:"h-1.5 w-1.5 animate-dot rounded-full",style:{backgroundColor:E.secondaryText}}),s("div",{className:"h-1.5 w-1.5 animate-dot-down rounded-full",style:{backgroundColor:E.secondaryText}}),s("div",{className:"h-1.5 w-1.5 animate-dot rounded-full",style:{backgroundColor:E.secondaryText}})]}))]})):N?s("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:s(x,{})})):C?s("div",Object.assign({className:"flex max-w-[80%] items-center gap-x-3"},{children:s(n,{error:C})})):null]})),s(m,{className:"w-full"})]}))}))]}))};export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useRef as
|
|
1
|
+
import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useRef as r,useMemo as t}from"react";import{usePickaxeMarkdownContext as n}from"./hooks/usePickaxeMarkdownContext.js";import l from"react-markdown";import o from"remark-gfm";import s from"remark-math";import d from"rehype-katex";import m from"rehype-raw";import a from"./Custom/A/index.js";import c from"./Custom/P/index.js";import h from"./Custom/Img/index.js";import p from"./Custom/Iframe/index.js";import g from"./Custom/Code/index.js";import f from"./Custom/common/LinkPreview.js";const b=({className:b,style:y,value:j,recursion:u=!1})=>{const{theme:x,websiteMetadatas:O}=n(),k=r(null),S=t((()=>{if(!j)return"";let e=j;return e=j.replace(/<!--[\s\S]*?-->/g,""),e=j.replace(/\u200B/g,""),e}),[j]),D={h1:({node:e,children:r})=>i("h1",Object.assign({style:{fontSize:"2.25rem",lineHeight:"2.5rem"}},{children:r})),h2:({node:e,children:r})=>i("h2",Object.assign({style:{fontSize:"1.875rem",lineHeight:"2.25rem"}},{children:r})),h3:({node:e,children:r})=>i("h3",Object.assign({style:{fontSize:"1.5rem",lineHeight:"2rem"}},{children:r})),h4:({node:e,children:r})=>i("h4",Object.assign({className:"mt-2",style:{fontSize:"1.25rem",lineHeight:"1.75rem"}},{children:r})),h5:({node:e,children:r})=>i("h5",Object.assign({style:{fontSize:"1.125rem",lineHeight:"1.75rem"}},{children:r})),p:c,a:a,ol:({node:e,children:r})=>i("ol",Object.assign({style:{listStyleType:"decimal",listStylePosition:"inside",paddingLeft:"1.5rem",whiteSpace:"normal"}},{children:r})),ul:({node:e,children:r})=>i("ul",Object.assign({style:{listStyleType:"disc",listStylePosition:"inside",paddingLeft:"1.5rem",whiteSpace:"normal"}},{children:r})),li:({node:e,children:r})=>i("li",Object.assign({style:{whiteSpace:"normal"}},{children:r})),table:({children:e})=>i("div",Object.assign({className:"overflow-auto"},{children:i("table",Object.assign({style:{tableLayout:"fixed",fontSize:"0.875rem",lineHeight:"1.24rem"}},{children:e}))})),th:({node:e,children:r})=>i("th",Object.assign({style:{padding:"0.75em 1em",fontWeight:600,textAlign:"left"}},{children:r})),tr:({node:e,children:r})=>i("tr",Object.assign({style:{border:"dark"===x?"1px solid #30363D":"1px solid #D0D7DE"}},{children:r})),td:({node:e,children:r})=>i("td",Object.assign({style:{padding:"0.75em 1em"}},{children:r})),code:g,blockquote:({node:e,children:r})=>i("blockquote",Object.assign({style:{lineHeight:"15px",borderLeft:"dark"===x?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===x?"#8B8B8B":"#656D76",paddingLeft:"1rem",marginBottom:"1rem"}},{children:r})),img:h,iframe:p,hr:()=>i("hr",{style:{border:0,borderTop:"dark"===x?"1px solid #30363D":"1px solid #D0D7DE"}})};return e("div",Object.assign({className:"pxe-markdown",ref:k,style:Object.assign({position:"relative",whiteSpace:"pre-wrap"},y)},{children:[i(l,Object.assign({},b&&{className:b},{components:D,remarkPlugins:[o,s],rehypePlugins:[d,m]},{children:`${S}${!u&&O.length>0?"\n\n---":""}`})),!u&&O.length>0&&i("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"2rem",marginTop:"2rem"}},{children:O.map(((e,r)=>i(f,{data:e},r)))}))]}))};export{b as PickaxeMarkdownRenderer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{AnimatePresence as r}from"framer-motion";import{usePickaxeContext as s}from"../../../hooks/pickaxe/usePickaxeContext.js";import{useResponseContext as t}from"../../../hooks/pickaxe/useResponseContext.js";import{useStyleFontSize as a}from"../../../hooks/studio/useStyleFontSize.js";import i from"../../Icons/circle-exclamation.svg.js";import m from"../../Core/SpringTransition.js";import c from"../../Core/HtmlRenderer.js";import n from"./PickaxeButton.js";import l from"../../../common/cn.js";const p=({className:p,iconClassName:f,htmlClassName:h})=>{const{colors:x}=s(),j=a(),{limitData:d}=t();return e(r,{children:!!d&&o(m,Object.assign({className:l("flex gap-3",p)},{children:[e(i,{className:l("h-5 w-5 shrink-0",f),style:{color:x.accent}}),o("div",Object.assign({className:"flex flex-col gap-4"},{children:[e(c,{className:l(j.b2,"font-semibold",h),style:{color:x.text},html:d.html}),!!d.cta&&e("a",Object.assign({href:d.ctaLink,target:"_blank",rel:"noreferrer"},{children:e(n,Object.assign({variant:"primary",className:"min-h-[38px]"},{children:d.cta}))}))]}))]}))})};export{p as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
|
-
interface PickaxeMarkdownRendererProps {
|
|
2
|
+
export interface PickaxeMarkdownRendererProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
style?: CSSProperties;
|
|
5
5
|
value?: string | null;
|
|
@@ -9,4 +9,3 @@ export type Node = {
|
|
|
9
9
|
node?: any;
|
|
10
10
|
};
|
|
11
11
|
export declare const PickaxeMarkdownRenderer: ({ className, style, value, recursion, }: PickaxeMarkdownRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -20,7 +20,7 @@ type PickaxeMarkdownContextType = {
|
|
|
20
20
|
setLinkPreviews: SetState<boolean>;
|
|
21
21
|
setActions: SetState<boolean>;
|
|
22
22
|
};
|
|
23
|
-
interface PickaxeMarkdownProps {
|
|
23
|
+
export interface PickaxeMarkdownProps {
|
|
24
24
|
children: ReactNode;
|
|
25
25
|
theme?: PickaxeMarkdownTheme;
|
|
26
26
|
syntaxTheme?: Record<string, CSSProperties>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pickaxeproject/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.65",
|
|
4
4
|
"description": "Client utility library for Pickaxe",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -106,6 +106,7 @@
|
|
|
106
106
|
"react-tooltip": "^5.28.0",
|
|
107
107
|
"react-virtualized-auto-sizer": "^1.0.25",
|
|
108
108
|
"rehype-katex": "^7.0.1",
|
|
109
|
+
"rehype-raw": "^7.0.0",
|
|
109
110
|
"remark-gfm": "^4.0.0",
|
|
110
111
|
"remark-math": "^6.0.0",
|
|
111
112
|
"rollup": "^2.79.1",
|
|
@@ -149,6 +150,7 @@
|
|
|
149
150
|
"react-tooltip": "^5.28.0",
|
|
150
151
|
"react-virtualized-auto-sizer": "^1.0.25",
|
|
151
152
|
"rehype-katex": "^7.0.1",
|
|
153
|
+
"rehype-raw": "^7.0.0",
|
|
152
154
|
"remark-gfm": "^4.0.0",
|
|
153
155
|
"remark-math": "^6.0.0",
|
|
154
156
|
"tailwind-merge": "^2.6.0",
|