@pickaxeproject/react 1.1.5 → 1.1.6

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("../../../../../../_virtual/_tslib.js"),o=require("react/jsx-runtime"),t=require("react"),s=require("../../hooks/usePickaxeMarkdownContext.js"),i=require("../../../../../../hooks/core/useHover.js"),r=require("framer-motion"),n=require("../../../../../../common/utils.js"),a=require("../../../../../Icons/download.svg.js"),l=require("../../../PickaxeCopyButton.js"),d=require("./ImgModal.js");exports.default=({node:c,src:p,alt:u})=>{const{accentColor:x}=s.usePickaxeMarkdownContext(),[b,h]=t.useState(!1),[g,j]=t.useState(!1),m=i.useHover(),{isHover:y}=m,v=e.__rest(m,["isHover"]);return o.jsxs("div",Object.assign({className:"pxe-markdown-image",style:{display:"flex",width:"100%",justifyContent:"center",overflow:"hidden",borderRadius:"8px",transition:"transform 0.3s ease, box-shadow 0.3s ease",transform:y?"translateY(-5px)":"translateY(0)"}},v,{children:[g&&o.jsx(d.default,{src:p,isOpen:g,onChangeIsOpen:j}),b?o.jsx("p",Object.assign({style:{userSelect:"none",opacity:.5,fontStyle:"italic"}},{children:"[Image link is broken]"})):o.jsxs("div",Object.assign({style:{position:"relative"}},{children:[o.jsxs(r.motion.div,Object.assign({initial:"hidden",animate:y?"visible":"hidden",variants:{hidden:{opacity:0,y:-10,pointerEvents:"none"},visible:{opacity:1,y:0,pointerEvents:"auto"}},style:{position:"absolute",display:"flex",gap:"0.4rem",top:"10px",right:"10px",color:"#FFF"}},{children:[o.jsx(r.motion.button,Object.assign({style:{outline:"none",padding:"0.5rem 0.65rem",borderRadius:"4px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1)",transition:"background-color 0.2s ease",backgroundColor:x,opacity:.6},whileTap:{scale:.95},whileHover:{opacity:1},onClick:e=>{e.stopPropagation(),window.open(p,"_blank")}},{children:o.jsx(a.default,{width:24,height:24,style:{color:n.getContrastColor(x),flexShrink:0}})})),o.jsx(r.motion.button,Object.assign({style:{outline:"none",padding:"0.5rem 0.65rem",borderRadius:"4px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1)",transition:"background-color 0.2s ease",backgroundColor:x,opacity:.6},whileTap:{scale:.95},whileHover:{opacity:1},onClick:e=>e.stopPropagation()},{children:o.jsx(l.default,{color:n.getContrastColor(x),iconClassName:"w-6 h-6",text:p||""})}))]})),o.jsx("img",{src:p,alt:u,style:{borderRadius:"8px",width:"100%",transition:"box-shadow 0.3s ease",boxShadow:y?"inset 0px 4px 10px rgba(0, 0, 0, 0.5)":"none"},onError:()=>h(!0),onClick:()=>j(!0)})]}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../../_virtual/_tslib.js"),o=require("react/jsx-runtime"),s=require("react"),t=require("../../hooks/usePickaxeMarkdownContext.js"),i=require("../../../../../../hooks/core/useHover.js"),r=require("framer-motion"),n=require("../../../../../../common/utils.js"),a=require("../../../../../Icons/download.svg.js"),l=require("../../../PickaxeCopyButton.js"),d=require("./ImgModal.js");exports.default=({node:c,src:p,alt:u})=>{const{accentColor:x,readOnly:b}=t.usePickaxeMarkdownContext(),[g,h]=s.useState(!1),[j,y]=s.useState(!1),m=i.useHover(),{isHover:v}=m,w=e.__rest(m,["isHover"]);return o.jsxs("div",Object.assign({className:"pxe-markdown-image",style:Object.assign({display:"flex",width:"100%",justifyContent:"center",overflow:"hidden",borderRadius:"8px"},!b&&{transition:"transform 0.3s ease, box-shadow 0.3s ease",transform:v?"translateY(-5px)":"translateY(0)"})},!b&&Object.assign({},w),{children:[j&&o.jsx(d.default,{src:p,isOpen:j,onChangeIsOpen:y}),g?o.jsx("p",Object.assign({style:{userSelect:"none",opacity:.5,fontStyle:"italic"}},{children:"[Image link is broken]"})):o.jsxs("div",Object.assign({style:{position:"relative"}},{children:[!b&&o.jsxs(r.motion.div,Object.assign({initial:"hidden",animate:v?"visible":"hidden",variants:{hidden:{opacity:0,y:-10,pointerEvents:"none"},visible:{opacity:1,y:0,pointerEvents:"auto"}},style:{position:"absolute",display:"flex",gap:"0.4rem",top:"10px",right:"10px",color:"#FFF"}},{children:[o.jsx(r.motion.button,Object.assign({style:{outline:"none",padding:"0.5rem 0.65rem",borderRadius:"4px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1)",transition:"background-color 0.2s ease",backgroundColor:x,opacity:.6},whileTap:{scale:.95},whileHover:{opacity:1},onClick:e=>{e.stopPropagation(),window.open(p,"_blank")}},{children:o.jsx(a.default,{width:24,height:24,style:{color:n.getContrastColor(x),flexShrink:0}})})),o.jsx(r.motion.button,Object.assign({style:{outline:"none",padding:"0.5rem 0.65rem",borderRadius:"4px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1)",transition:"background-color 0.2s ease",backgroundColor:x,opacity:.6},whileTap:{scale:.95},whileHover:{opacity:1},onClick:e=>e.stopPropagation()},{children:o.jsx(l.default,{color:n.getContrastColor(x),iconClassName:"w-6 h-6",text:p||""})}))]})),o.jsx("img",Object.assign({src:p,alt:u,style:{borderRadius:"8px",width:"100%",transition:"box-shadow 0.3s ease",boxShadow:v?"inset 0px 4px 10px rgba(0, 0, 0, 0.5)":"none"},onError:()=>h(!0)},!b&&{onClick:()=>y(!0)}))]}))]}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),n=require("react"),s=require("./hooks/usePickaxeMarkdownContext.js"),t=require("react-markdown"),i=require("remark-gfm"),l=require("remark-math"),d=require("rehype-katex"),a=require("rehype-raw"),o=require("./Custom/A/index.js"),c=require("./Custom/P/index.js"),u=require("./Custom/Img/index.js"),h=require("./Custom/Iframe/index.js"),x=require("./Custom/Code/index.js"),p=require("./Custom/common/LinkPreview.js"),m=require("../../../../common/cn.js");function j(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=j(t),g=j(i),b=j(l),k=j(d),q=j(a);exports.PickaxeMarkdownRenderer=({className:t,style:i,value:l,recursion:d=!1,children:a,maxLines:j,multiLineBreaks:w,onExpandClick:y})=>{const{theme:v,accentColor:C,websiteMetadatas:D}=s.usePickaxeMarkdownContext(),[O,M]=n.useState({width:0,height:0}),[P,S]=n.useState(null),$=n.useRef(null),E=n.useMemo((()=>{if(!l)return"";let e=l.trim();return e=e.replace(/<!--[\s\S]*?-->/g,""),e=e.replace(/\u200B/g,""),e=e.replace(/\\[\s\S]*?\\]/g,(e=>"$$"+e.substring(2,e.length-2)+"$$")).replace(/\\\(\s*[\s\S]*?\s*\\\)/g,(e=>"$"+e.substring(2,e.length-2)+"$")),w&&(e=e.replace(/```[\s\S]*?```|(\n(?=\n))/g,((e,r)=>r?"\n\n<br/>\n":e))),e||""}),[l,w]);n.useEffect((()=>{if(!j||!$.current||!E||P)return;const e=$.current,r=parseInt(window.getComputedStyle(e).lineHeight,10),n=j*r;if(!(O.height>n))return;const s=Math.floor(O.width/8),t=Math.floor(s*j);S(E.slice(0,t)+'<span class="pxe-expand-btn">...</span>')}),[E,j,O,P]);const _={h1:({node:e,children:n})=>r.jsx("h1",{children:n}),h2:({node:e,children:n})=>r.jsx("h2",{children:n}),h3:({node:e,children:n})=>r.jsx("h3",{children:n}),h4:({node:e,children:n})=>r.jsx("h4",{children:n}),h5:({node:e,children:n})=>r.jsx("h5",{children:n}),p:c.default,a:o.default,ol:({node:e,children:n})=>r.jsx("ol",{children:n}),ul:({node:e,children:n})=>r.jsx("ul",{children:n}),li:({node:e,children:n})=>r.jsx("li",{children:n}),table:({children:e})=>r.jsx("div",Object.assign({className:"pxe-markdown-table"},{children:r.jsx("table",{children:e})})),th:({node:e,children:n})=>r.jsx("th",{children:n}),tr:({node:e,children:n})=>r.jsx("tr",Object.assign({style:{border:"dark"===v?"1px solid #30363D":"1px solid #D0D7DE"}},{children:n})),td:({node:e,children:n})=>r.jsx("td",{children:n}),code:x.default,blockquote:({node:e,children:n})=>r.jsx("blockquote",Object.assign({style:{borderLeft:"dark"===v?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===v?"#8B8B8B":"#656D76"}},{children:n})),img:u.default,iframe:h.default,hr:()=>r.jsx("hr",{style:{border:0,borderTop:"dark"===v?"1px solid #30363D":"1px solid #D0D7DE"}}),span:n=>{var{node:s,children:t}=n,i=e.__rest(n,["node","children"]);return"pxe-expand-btn"===i.className?r.jsx("span",Object.assign({},i,{style:Object.assign({display:"inline",fontWeight:500,color:C,marginLeft:".25rem",userSelect:"none"},y&&{cursor:"pointer"})},y&&{onClick:y},{children:t})):r.jsx("span",Object.assign({},i,{children:t}))},br:()=>r.jsx("br",{})};n.useEffect((()=>{if(!$.current)return;const e=new ResizeObserver((e=>{for(const r of e){const{width:e,height:n}=r.contentRect;M({width:e,height:n})}}));return e.observe($.current),()=>{e.disconnect()}}),[]);const B=P||E,L=!d&&D.length>0?"\n\n---":"";return r.jsxs("div",Object.assign({className:"pxe-markdown",ref:$,style:Object.assign({position:"relative",overflowWrap:"break-word",display:"grid",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",gap:".625rem"},i)},{children:[r.jsx(f.default,Object.assign({className:m.default("pxe-prose",t),components:_,remarkPlugins:[g.default,b.default],rehypePlugins:[k.default,q.default]},{children:`${B}${L}`})),!d&&D.length>0&&r.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"2rem",marginTop:"2rem"}},{children:D.map(((e,n)=>r.jsx(p.default,{data:e},n)))})),a]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),n=require("react"),t=require("./hooks/usePickaxeMarkdownContext.js"),s=require("react-markdown"),i=require("remark-gfm"),l=require("remark-math"),d=require("rehype-katex"),a=require("rehype-raw"),o=require("./Custom/A/index.js"),c=require("./Custom/P/index.js"),u=require("./Custom/Img/index.js"),h=require("./Custom/Iframe/index.js"),x=require("./Custom/Code/index.js"),p=require("./Custom/common/LinkPreview.js"),m=require("../../../../common/cn.js");function j(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=j(s),g=j(i),b=j(l),k=j(d),q=j(a);exports.PickaxeMarkdownRenderer=({className:s,style:i,value:l,recursion:d=!1,children:a,maxLines:j,multiLineBreaks:w,onExpandClick:y})=>{const{theme:v,accentColor:C,websiteMetadatas:D}=t.usePickaxeMarkdownContext(),[O,M]=n.useState({width:0,height:0}),[P,S]=n.useState(null),$=n.useRef(null),E=n.useMemo((()=>{if(!l)return"";let e=l.trim();return e=e.replace(/<!--[\s\S]*?-->/g,""),e=e.replace(/\u200B/g,""),e=e.replace(/\\[\s\S]*?\\]/g,(e=>"$$"+e.substring(2,e.length-2)+"$$")).replace(/\\\(\s*[\s\S]*?\s*\\\)/g,(e=>"$"+e.substring(2,e.length-2)+"$")),w&&(e=e.replace(/```[\s\S]*?```|(\n(?=\n))/g,((e,r)=>r?"\n\n<br/>\n":e))),e||""}),[l,w]);n.useEffect((()=>{if(!j)return void S(null);if(!$.current||!E||P)return;const e=$.current,r=parseInt(window.getComputedStyle(e).lineHeight,10),n=j*r;if(!(O.height>n))return;const t=Math.floor(O.width/8),s=Math.floor(t*j);S(E.slice(0,s)+'<span class="pxe-expand-btn">...</span>')}),[E,j,O,P]);const _={h1:({node:e,children:n})=>r.jsx("h1",{children:n}),h2:({node:e,children:n})=>r.jsx("h2",{children:n}),h3:({node:e,children:n})=>r.jsx("h3",{children:n}),h4:({node:e,children:n})=>r.jsx("h4",{children:n}),h5:({node:e,children:n})=>r.jsx("h5",{children:n}),p:c.default,a:o.default,ol:({node:e,children:n})=>r.jsx("ol",{children:n}),ul:({node:e,children:n})=>r.jsx("ul",{children:n}),li:({node:e,children:n})=>r.jsx("li",{children:n}),table:({children:e})=>r.jsx("div",Object.assign({className:"pxe-markdown-table"},{children:r.jsx("table",{children:e})})),th:({node:e,children:n})=>r.jsx("th",{children:n}),tr:({node:e,children:n})=>r.jsx("tr",Object.assign({style:{border:"dark"===v?"1px solid #30363D":"1px solid #D0D7DE"}},{children:n})),td:({node:e,children:n})=>r.jsx("td",{children:n}),code:x.default,blockquote:({node:e,children:n})=>r.jsx("blockquote",Object.assign({style:{borderLeft:"dark"===v?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===v?"#8B8B8B":"#656D76"}},{children:n})),img:u.default,iframe:h.default,hr:()=>r.jsx("hr",{style:{border:0,borderTop:"dark"===v?"1px solid #30363D":"1px solid #D0D7DE"}}),span:n=>{var{node:t,children:s}=n,i=e.__rest(n,["node","children"]);return"pxe-expand-btn"===i.className?r.jsx("span",Object.assign({},i,{style:Object.assign({display:"inline",fontWeight:500,color:C,marginLeft:".25rem",userSelect:"none"},y&&{cursor:"pointer"})},y&&{onClick:y},{children:s})):r.jsx("span",Object.assign({},i,{children:s}))},br:()=>r.jsx("br",{})};n.useEffect((()=>{if(!$.current)return;const e=new ResizeObserver((e=>{for(const r of e){const{width:e,height:n}=r.contentRect;M({width:e,height:n})}}));return e.observe($.current),()=>{e.disconnect()}}),[]);const B=P||E,L=!d&&D.length>0?"\n\n---":"";return r.jsxs("div",Object.assign({className:"pxe-markdown",ref:$,style:Object.assign({position:"relative",overflowWrap:"break-word",display:"grid",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",gap:".625rem"},i)},{children:[r.jsx(f.default,Object.assign({className:m.default("pxe-prose",s),components:_,remarkPlugins:[g.default,b.default],rehypePlugins:[k.default,q.default]},{children:`${B}${L}`})),!d&&D.length>0&&r.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"2rem",marginTop:"2rem"}},{children:D.map(((e,n)=>r.jsx(p.default,{data:e},n)))})),a]}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react");const t=o.createContext({}),r=({children:r,theme:n="light",syntaxTheme:a,accentColor:c="#228DD7",linkPreviews:l=!1,actions:i=!1})=>{const[s,d]=o.useState(n),[p,u]=o.useState(c),[C,m]=o.useState([]),[g,F]=o.useState(l),[h,b]=o.useState(i);return e.jsx(t.Provider,Object.assign({value:{theme:s,syntaxTheme:a||{'code[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",width:"max-content"},'pre[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",paddingTop:"1.5em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",background:"#1d1f21",width:"max-content"},':not(pre) > code[class*="language-"]':{background:"#1d1f21",padding:".1em",borderRadius:".3em"},comment:{color:"#7C7C7C"},prolog:{color:"#7C7C7C"},doctype:{color:"#7C7C7C"},cdata:{color:"#7C7C7C"},punctuation:{color:"#c5c8c6"},".namespace":{opacity:".7"},property:{color:"#96CBFE"},keyword:{color:"#96CBFE"},tag:{color:"#96CBFE"},"class-name":{color:"#FFFFB6",textDecoration:"underline"},boolean:{color:"#99CC99"},constant:{color:"#99CC99"},symbol:{color:"#f92672"},deleted:{color:"#f92672"},number:{color:"#FF73FD"},selector:{color:"#A8FF60"},"attr-name":{color:"#A8FF60"},string:{color:"#A8FF60"},char:{color:"#A8FF60"},builtin:{color:"#A8FF60"},inserted:{color:"#A8FF60"},variable:{color:"#C6C5FE"},operator:{color:"#EDEDED"},entity:{color:"#FFFFB6",cursor:"help"},url:{color:"#96CBFE"},".language-css .token.string":{color:"#87C38A"},".style .token.string":{color:"#87C38A"},atrule:{color:"#F9EE98"},"attr-value":{color:"#F9EE98"},function:{color:"#DAD085"},regex:{color:"#E9C062"},important:{color:"#fd971f",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}},accentColor:p,websiteMetadatas:C,linkPreviews:g,actions:h,setTheme:d,setAccentColor:u,setWebsiteMetadatas:m,setLinkPreviews:F,setActions:b}},{children:r}))};exports.PickaxeMarkdown=r,exports.PickaxeMarkdownContext=t,exports.default=r;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react");const t=o.createContext({}),r=({children:r,theme:n="light",syntaxTheme:a,accentColor:c="#228DD7",linkPreviews:l=!1,actions:i=!1,readOnly:s=!1})=>{const[d,p]=o.useState(n),[u,C]=o.useState(c),[m,g]=o.useState([]),[F,h]=o.useState(l),[b,y]=o.useState(i);return e.jsx(t.Provider,Object.assign({value:{theme:d,syntaxTheme:a||{'code[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",width:"max-content"},'pre[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",paddingTop:"1.5em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",background:"#1d1f21",width:"max-content"},':not(pre) > code[class*="language-"]':{background:"#1d1f21",padding:".1em",borderRadius:".3em"},comment:{color:"#7C7C7C"},prolog:{color:"#7C7C7C"},doctype:{color:"#7C7C7C"},cdata:{color:"#7C7C7C"},punctuation:{color:"#c5c8c6"},".namespace":{opacity:".7"},property:{color:"#96CBFE"},keyword:{color:"#96CBFE"},tag:{color:"#96CBFE"},"class-name":{color:"#FFFFB6",textDecoration:"underline"},boolean:{color:"#99CC99"},constant:{color:"#99CC99"},symbol:{color:"#f92672"},deleted:{color:"#f92672"},number:{color:"#FF73FD"},selector:{color:"#A8FF60"},"attr-name":{color:"#A8FF60"},string:{color:"#A8FF60"},char:{color:"#A8FF60"},builtin:{color:"#A8FF60"},inserted:{color:"#A8FF60"},variable:{color:"#C6C5FE"},operator:{color:"#EDEDED"},entity:{color:"#FFFFB6",cursor:"help"},url:{color:"#96CBFE"},".language-css .token.string":{color:"#87C38A"},".style .token.string":{color:"#87C38A"},atrule:{color:"#F9EE98"},"attr-value":{color:"#F9EE98"},function:{color:"#DAD085"},regex:{color:"#E9C062"},important:{color:"#fd971f",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}},accentColor:u,websiteMetadatas:m,linkPreviews:F,actions:b,readOnly:s,setTheme:p,setAccentColor:C,setWebsiteMetadatas:g,setLinkPreviews:h,setActions:y}},{children:r}))};exports.PickaxeMarkdown=r,exports.PickaxeMarkdownContext=t,exports.default=r;
@@ -6,6 +6,7 @@ export declare const usePickaxeMarkdownContext: () => {
6
6
  websiteMetadatas: import("..").WebsiteMetadata[];
7
7
  linkPreviews: boolean;
8
8
  actions: boolean;
9
+ readOnly: boolean;
9
10
  setTheme: import("../../../../../types/common").SetState<import("..").PickaxeMarkdownTheme>;
10
11
  setAccentColor: import("../../../../../types/common").SetState<string>;
11
12
  setWebsiteMetadatas: import("../../../../../types/common").SetState<import("..").WebsiteMetadata[]>;
@@ -14,6 +14,7 @@ type PickaxeMarkdownContextType = {
14
14
  websiteMetadatas: WebsiteMetadata[];
15
15
  linkPreviews: boolean;
16
16
  actions: boolean;
17
+ readOnly: boolean;
17
18
  setTheme: SetState<PickaxeMarkdownTheme>;
18
19
  setAccentColor: SetState<string>;
19
20
  setWebsiteMetadatas: SetState<WebsiteMetadata[]>;
@@ -27,7 +28,8 @@ export interface PickaxeMarkdownProps {
27
28
  accentColor?: string;
28
29
  linkPreviews?: boolean;
29
30
  actions?: boolean;
31
+ readOnly?: boolean;
30
32
  }
31
33
  export declare const PickaxeMarkdownContext: import("react").Context<PickaxeMarkdownContextType>;
32
- export declare const PickaxeMarkdown: ({ children, theme: _theme, syntaxTheme, accentColor: _accentColor, linkPreviews: _linkPreviews, actions: _actions, }: PickaxeMarkdownProps) => import("react/jsx-runtime").JSX.Element;
34
+ export declare const PickaxeMarkdown: ({ children, theme: _theme, syntaxTheme, accentColor: _accentColor, linkPreviews: _linkPreviews, actions: _actions, readOnly, }: PickaxeMarkdownProps) => import("react/jsx-runtime").JSX.Element;
33
35
  export default PickaxeMarkdown;
@@ -1 +1 @@
1
- import{__rest as o}from"../../../../../../_virtual/_tslib.js";import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useState as t}from"react";import{usePickaxeMarkdownContext as r}from"../../hooks/usePickaxeMarkdownContext.js";import{useHover as n}from"../../../../../../hooks/core/useHover.js";import{motion as s}from"framer-motion";import{getContrastColor as a}from"../../../../../../common/utils.js";import l from"../../../../../Icons/download.svg.js";import p from"../../../PickaxeCopyButton.js";import c from"./ImgModal.js";const d=({node:d,src:m,alt:x})=>{const{accentColor:b}=r(),[h,g]=t(!1),[u,y]=t(!1),f=n(),{isHover:w}=f,k=o(f,["isHover"]);return e("div",Object.assign({className:"pxe-markdown-image",style:{display:"flex",width:"100%",justifyContent:"center",overflow:"hidden",borderRadius:"8px",transition:"transform 0.3s ease, box-shadow 0.3s ease",transform:w?"translateY(-5px)":"translateY(0)"}},k,{children:[u&&i(c,{src:m,isOpen:u,onChangeIsOpen:y}),h?i("p",Object.assign({style:{userSelect:"none",opacity:.5,fontStyle:"italic"}},{children:"[Image link is broken]"})):e("div",Object.assign({style:{position:"relative"}},{children:[e(s.div,Object.assign({initial:"hidden",animate:w?"visible":"hidden",variants:{hidden:{opacity:0,y:-10,pointerEvents:"none"},visible:{opacity:1,y:0,pointerEvents:"auto"}},style:{position:"absolute",display:"flex",gap:"0.4rem",top:"10px",right:"10px",color:"#FFF"}},{children:[i(s.button,Object.assign({style:{outline:"none",padding:"0.5rem 0.65rem",borderRadius:"4px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1)",transition:"background-color 0.2s ease",backgroundColor:b,opacity:.6},whileTap:{scale:.95},whileHover:{opacity:1},onClick:o=>{o.stopPropagation(),window.open(m,"_blank")}},{children:i(l,{width:24,height:24,style:{color:a(b),flexShrink:0}})})),i(s.button,Object.assign({style:{outline:"none",padding:"0.5rem 0.65rem",borderRadius:"4px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1)",transition:"background-color 0.2s ease",backgroundColor:b,opacity:.6},whileTap:{scale:.95},whileHover:{opacity:1},onClick:o=>o.stopPropagation()},{children:i(p,{color:a(b),iconClassName:"w-6 h-6",text:m||""})}))]})),i("img",{src:m,alt:x,style:{borderRadius:"8px",width:"100%",transition:"box-shadow 0.3s ease",boxShadow:w?"inset 0px 4px 10px rgba(0, 0, 0, 0.5)":"none"},onError:()=>g(!0),onClick:()=>y(!0)})]}))]}))};export{d as default};
1
+ import{__rest as o}from"../../../../../../_virtual/_tslib.js";import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useState as t}from"react";import{usePickaxeMarkdownContext as r}from"../../hooks/usePickaxeMarkdownContext.js";import{useHover as s}from"../../../../../../hooks/core/useHover.js";import{motion as n}from"framer-motion";import{getContrastColor as a}from"../../../../../../common/utils.js";import l from"../../../../../Icons/download.svg.js";import p from"../../../PickaxeCopyButton.js";import c from"./ImgModal.js";const d=({node:d,src:m,alt:b})=>{const{accentColor:x,readOnly:h}=r(),[g,u]=t(!1),[y,f]=t(!1),w=s(),{isHover:j}=w,k=o(w,["isHover"]);return e("div",Object.assign({className:"pxe-markdown-image",style:Object.assign({display:"flex",width:"100%",justifyContent:"center",overflow:"hidden",borderRadius:"8px"},!h&&{transition:"transform 0.3s ease, box-shadow 0.3s ease",transform:j?"translateY(-5px)":"translateY(0)"})},!h&&Object.assign({},k),{children:[y&&i(c,{src:m,isOpen:y,onChangeIsOpen:f}),g?i("p",Object.assign({style:{userSelect:"none",opacity:.5,fontStyle:"italic"}},{children:"[Image link is broken]"})):e("div",Object.assign({style:{position:"relative"}},{children:[!h&&e(n.div,Object.assign({initial:"hidden",animate:j?"visible":"hidden",variants:{hidden:{opacity:0,y:-10,pointerEvents:"none"},visible:{opacity:1,y:0,pointerEvents:"auto"}},style:{position:"absolute",display:"flex",gap:"0.4rem",top:"10px",right:"10px",color:"#FFF"}},{children:[i(n.button,Object.assign({style:{outline:"none",padding:"0.5rem 0.65rem",borderRadius:"4px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1)",transition:"background-color 0.2s ease",backgroundColor:x,opacity:.6},whileTap:{scale:.95},whileHover:{opacity:1},onClick:o=>{o.stopPropagation(),window.open(m,"_blank")}},{children:i(l,{width:24,height:24,style:{color:a(x),flexShrink:0}})})),i(n.button,Object.assign({style:{outline:"none",padding:"0.5rem 0.65rem",borderRadius:"4px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1)",transition:"background-color 0.2s ease",backgroundColor:x,opacity:.6},whileTap:{scale:.95},whileHover:{opacity:1},onClick:o=>o.stopPropagation()},{children:i(p,{color:a(x),iconClassName:"w-6 h-6",text:m||""})}))]})),i("img",Object.assign({src:m,alt:b,style:{borderRadius:"8px",width:"100%",transition:"box-shadow 0.3s ease",boxShadow:j?"inset 0px 4px 10px rgba(0, 0, 0, 0.5)":"none"},onError:()=>u(!0)},!h&&{onClick:()=>f(!0)}))]}))]}))};export{d as default};
@@ -1 +1 @@
1
- import{__rest as e}from"../../../../_virtual/_tslib.js";import{jsxs as r,jsx as n}from"react/jsx-runtime";import{useState as i,useRef as t,useMemo as o,useEffect as s}from"react";import{usePickaxeMarkdownContext as l}from"./hooks/usePickaxeMarkdownContext.js";import d from"react-markdown";import c from"remark-gfm";import a from"remark-math";import m from"rehype-katex";import h from"rehype-raw";import p from"./Custom/A/index.js";import u from"./Custom/P/index.js";import g from"./Custom/Img/index.js";import f from"./Custom/Iframe/index.js";import b from"./Custom/Code/index.js";import x from"./Custom/common/LinkPreview.js";import k from"../../../../common/cn.js";const j=({className:j,style:w,value:y,recursion:D=!1,children:C,maxLines:v,multiLineBreaks:O,onExpandClick:$})=>{const{theme:S,accentColor:B,websiteMetadatas:L}=l(),[N,P]=i({width:0,height:0}),[E,M]=i(null),I=t(null),T=o((()=>{if(!y)return"";let e=y.trim();return e=e.replace(/<!--[\s\S]*?-->/g,""),e=e.replace(/\u200B/g,""),e=e.replace(/\\[\s\S]*?\\]/g,(e=>"$$"+e.substring(2,e.length-2)+"$$")).replace(/\\\(\s*[\s\S]*?\s*\\\)/g,(e=>"$"+e.substring(2,e.length-2)+"$")),O&&(e=e.replace(/```[\s\S]*?```|(\n(?=\n))/g,((e,r)=>r?"\n\n<br/>\n":e))),e||""}),[y,O]);s((()=>{if(!v||!I.current||!T||E)return;const e=I.current,r=parseInt(window.getComputedStyle(e).lineHeight,10),n=v*r;if(!(N.height>n))return;const i=Math.floor(N.width/8),t=Math.floor(i*v);M(T.slice(0,t)+'<span class="pxe-expand-btn">...</span>')}),[T,v,N,E]);const q={h1:({node:e,children:r})=>n("h1",{children:r}),h2:({node:e,children:r})=>n("h2",{children:r}),h3:({node:e,children:r})=>n("h3",{children:r}),h4:({node:e,children:r})=>n("h4",{children:r}),h5:({node:e,children:r})=>n("h5",{children:r}),p:u,a:p,ol:({node:e,children:r})=>n("ol",{children:r}),ul:({node:e,children:r})=>n("ul",{children:r}),li:({node:e,children:r})=>n("li",{children:r}),table:({children:e})=>n("div",Object.assign({className:"pxe-markdown-table"},{children:n("table",{children:e})})),th:({node:e,children:r})=>n("th",{children:r}),tr:({node:e,children:r})=>n("tr",Object.assign({style:{border:"dark"===S?"1px solid #30363D":"1px solid #D0D7DE"}},{children:r})),td:({node:e,children:r})=>n("td",{children:r}),code:b,blockquote:({node:e,children:r})=>n("blockquote",Object.assign({style:{borderLeft:"dark"===S?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===S?"#8B8B8B":"#656D76"}},{children:r})),img:g,iframe:f,hr:()=>n("hr",{style:{border:0,borderTop:"dark"===S?"1px solid #30363D":"1px solid #D0D7DE"}}),span:r=>{var{node:i,children:t}=r,o=e(r,["node","children"]);return"pxe-expand-btn"===o.className?n("span",Object.assign({},o,{style:Object.assign({display:"inline",fontWeight:500,color:B,marginLeft:".25rem",userSelect:"none"},$&&{cursor:"pointer"})},$&&{onClick:$},{children:t})):n("span",Object.assign({},o,{children:t}))},br:()=>n("br",{})};s((()=>{if(!I.current)return;const e=new ResizeObserver((e=>{for(const r of e){const{width:e,height:n}=r.contentRect;P({width:e,height:n})}}));return e.observe(I.current),()=>{e.disconnect()}}),[]);const R=E||T,W=!D&&L.length>0?"\n\n---":"";return r("div",Object.assign({className:"pxe-markdown",ref:I,style:Object.assign({position:"relative",overflowWrap:"break-word",display:"grid",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",gap:".625rem"},w)},{children:[n(d,Object.assign({className:k("pxe-prose",j),components:q,remarkPlugins:[c,a],rehypePlugins:[m,h]},{children:`${R}${W}`})),!D&&L.length>0&&n("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"2rem",marginTop:"2rem"}},{children:L.map(((e,r)=>n(x,{data:e},r)))})),C]}))};export{j as PickaxeMarkdownRenderer};
1
+ import{__rest as e}from"../../../../_virtual/_tslib.js";import{jsxs as r,jsx as n}from"react/jsx-runtime";import{useState as i,useRef as t,useMemo as o,useEffect as s}from"react";import{usePickaxeMarkdownContext as l}from"./hooks/usePickaxeMarkdownContext.js";import d from"react-markdown";import c from"remark-gfm";import a from"remark-math";import m from"rehype-katex";import h from"rehype-raw";import p from"./Custom/A/index.js";import u from"./Custom/P/index.js";import g from"./Custom/Img/index.js";import f from"./Custom/Iframe/index.js";import b from"./Custom/Code/index.js";import x from"./Custom/common/LinkPreview.js";import k from"../../../../common/cn.js";const j=({className:j,style:w,value:y,recursion:D=!1,children:C,maxLines:v,multiLineBreaks:O,onExpandClick:$})=>{const{theme:S,accentColor:B,websiteMetadatas:L}=l(),[N,P]=i({width:0,height:0}),[E,M]=i(null),I=t(null),T=o((()=>{if(!y)return"";let e=y.trim();return e=e.replace(/<!--[\s\S]*?-->/g,""),e=e.replace(/\u200B/g,""),e=e.replace(/\\[\s\S]*?\\]/g,(e=>"$$"+e.substring(2,e.length-2)+"$$")).replace(/\\\(\s*[\s\S]*?\s*\\\)/g,(e=>"$"+e.substring(2,e.length-2)+"$")),O&&(e=e.replace(/```[\s\S]*?```|(\n(?=\n))/g,((e,r)=>r?"\n\n<br/>\n":e))),e||""}),[y,O]);s((()=>{if(!v)return void M(null);if(!I.current||!T||E)return;const e=I.current,r=parseInt(window.getComputedStyle(e).lineHeight,10),n=v*r;if(!(N.height>n))return;const i=Math.floor(N.width/8),t=Math.floor(i*v);M(T.slice(0,t)+'<span class="pxe-expand-btn">...</span>')}),[T,v,N,E]);const q={h1:({node:e,children:r})=>n("h1",{children:r}),h2:({node:e,children:r})=>n("h2",{children:r}),h3:({node:e,children:r})=>n("h3",{children:r}),h4:({node:e,children:r})=>n("h4",{children:r}),h5:({node:e,children:r})=>n("h5",{children:r}),p:u,a:p,ol:({node:e,children:r})=>n("ol",{children:r}),ul:({node:e,children:r})=>n("ul",{children:r}),li:({node:e,children:r})=>n("li",{children:r}),table:({children:e})=>n("div",Object.assign({className:"pxe-markdown-table"},{children:n("table",{children:e})})),th:({node:e,children:r})=>n("th",{children:r}),tr:({node:e,children:r})=>n("tr",Object.assign({style:{border:"dark"===S?"1px solid #30363D":"1px solid #D0D7DE"}},{children:r})),td:({node:e,children:r})=>n("td",{children:r}),code:b,blockquote:({node:e,children:r})=>n("blockquote",Object.assign({style:{borderLeft:"dark"===S?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===S?"#8B8B8B":"#656D76"}},{children:r})),img:g,iframe:f,hr:()=>n("hr",{style:{border:0,borderTop:"dark"===S?"1px solid #30363D":"1px solid #D0D7DE"}}),span:r=>{var{node:i,children:t}=r,o=e(r,["node","children"]);return"pxe-expand-btn"===o.className?n("span",Object.assign({},o,{style:Object.assign({display:"inline",fontWeight:500,color:B,marginLeft:".25rem",userSelect:"none"},$&&{cursor:"pointer"})},$&&{onClick:$},{children:t})):n("span",Object.assign({},o,{children:t}))},br:()=>n("br",{})};s((()=>{if(!I.current)return;const e=new ResizeObserver((e=>{for(const r of e){const{width:e,height:n}=r.contentRect;P({width:e,height:n})}}));return e.observe(I.current),()=>{e.disconnect()}}),[]);const R=E||T,W=!D&&L.length>0?"\n\n---":"";return r("div",Object.assign({className:"pxe-markdown",ref:I,style:Object.assign({position:"relative",overflowWrap:"break-word",display:"grid",gridTemplateColumns:"repeat(1, minmax(0, 1fr))",gap:".625rem"},w)},{children:[n(d,Object.assign({className:k("pxe-prose",j),components:q,remarkPlugins:[c,a],rehypePlugins:[m,h]},{children:`${R}${W}`})),!D&&L.length>0&&n("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"2rem",marginTop:"2rem"}},{children:L.map(((e,r)=>n(x,{data:e},r)))})),C]}))};export{j as PickaxeMarkdownRenderer};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{createContext as e,useState as r}from"react";const t=e({}),n=({children:e,theme:n="light",syntaxTheme:a,accentColor:c="#228DD7",linkPreviews:l=!1,actions:i=!1})=>{const[s,d]=r(n),[m,p]=r(c),[C,g]=r([]),[F,h]=r(l),[u,b]=r(i);return o(t.Provider,Object.assign({value:{theme:s,syntaxTheme:a||{'code[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",width:"max-content"},'pre[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",paddingTop:"1.5em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",background:"#1d1f21",width:"max-content"},':not(pre) > code[class*="language-"]':{background:"#1d1f21",padding:".1em",borderRadius:".3em"},comment:{color:"#7C7C7C"},prolog:{color:"#7C7C7C"},doctype:{color:"#7C7C7C"},cdata:{color:"#7C7C7C"},punctuation:{color:"#c5c8c6"},".namespace":{opacity:".7"},property:{color:"#96CBFE"},keyword:{color:"#96CBFE"},tag:{color:"#96CBFE"},"class-name":{color:"#FFFFB6",textDecoration:"underline"},boolean:{color:"#99CC99"},constant:{color:"#99CC99"},symbol:{color:"#f92672"},deleted:{color:"#f92672"},number:{color:"#FF73FD"},selector:{color:"#A8FF60"},"attr-name":{color:"#A8FF60"},string:{color:"#A8FF60"},char:{color:"#A8FF60"},builtin:{color:"#A8FF60"},inserted:{color:"#A8FF60"},variable:{color:"#C6C5FE"},operator:{color:"#EDEDED"},entity:{color:"#FFFFB6",cursor:"help"},url:{color:"#96CBFE"},".language-css .token.string":{color:"#87C38A"},".style .token.string":{color:"#87C38A"},atrule:{color:"#F9EE98"},"attr-value":{color:"#F9EE98"},function:{color:"#DAD085"},regex:{color:"#E9C062"},important:{color:"#fd971f",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}},accentColor:m,websiteMetadatas:C,linkPreviews:F,actions:u,setTheme:d,setAccentColor:p,setWebsiteMetadatas:g,setLinkPreviews:h,setActions:b}},{children:e}))};export{n as PickaxeMarkdown,t as PickaxeMarkdownContext,n as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{createContext as e,useState as r}from"react";const n=e({}),t=({children:e,theme:t="light",syntaxTheme:a,accentColor:c="#228DD7",linkPreviews:l=!1,actions:i=!1,readOnly:s=!1})=>{const[d,m]=r(t),[p,C]=r(c),[g,F]=r([]),[h,u]=r(l),[b,y]=r(i);return o(n.Provider,Object.assign({value:{theme:d,syntaxTheme:a||{'code[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",width:"max-content"},'pre[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",paddingTop:"1.5em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",background:"#1d1f21",width:"max-content"},':not(pre) > code[class*="language-"]':{background:"#1d1f21",padding:".1em",borderRadius:".3em"},comment:{color:"#7C7C7C"},prolog:{color:"#7C7C7C"},doctype:{color:"#7C7C7C"},cdata:{color:"#7C7C7C"},punctuation:{color:"#c5c8c6"},".namespace":{opacity:".7"},property:{color:"#96CBFE"},keyword:{color:"#96CBFE"},tag:{color:"#96CBFE"},"class-name":{color:"#FFFFB6",textDecoration:"underline"},boolean:{color:"#99CC99"},constant:{color:"#99CC99"},symbol:{color:"#f92672"},deleted:{color:"#f92672"},number:{color:"#FF73FD"},selector:{color:"#A8FF60"},"attr-name":{color:"#A8FF60"},string:{color:"#A8FF60"},char:{color:"#A8FF60"},builtin:{color:"#A8FF60"},inserted:{color:"#A8FF60"},variable:{color:"#C6C5FE"},operator:{color:"#EDEDED"},entity:{color:"#FFFFB6",cursor:"help"},url:{color:"#96CBFE"},".language-css .token.string":{color:"#87C38A"},".style .token.string":{color:"#87C38A"},atrule:{color:"#F9EE98"},"attr-value":{color:"#F9EE98"},function:{color:"#DAD085"},regex:{color:"#E9C062"},important:{color:"#fd971f",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}},accentColor:p,websiteMetadatas:g,linkPreviews:h,actions:b,readOnly:s,setTheme:m,setAccentColor:C,setWebsiteMetadatas:F,setLinkPreviews:u,setActions:y}},{children:e}))};export{t as PickaxeMarkdown,n as PickaxeMarkdownContext,t as default};
@@ -6,6 +6,7 @@ export declare const usePickaxeMarkdownContext: () => {
6
6
  websiteMetadatas: import("..").WebsiteMetadata[];
7
7
  linkPreviews: boolean;
8
8
  actions: boolean;
9
+ readOnly: boolean;
9
10
  setTheme: import("../../../../../types/common").SetState<import("..").PickaxeMarkdownTheme>;
10
11
  setAccentColor: import("../../../../../types/common").SetState<string>;
11
12
  setWebsiteMetadatas: import("../../../../../types/common").SetState<import("..").WebsiteMetadata[]>;
@@ -14,6 +14,7 @@ type PickaxeMarkdownContextType = {
14
14
  websiteMetadatas: WebsiteMetadata[];
15
15
  linkPreviews: boolean;
16
16
  actions: boolean;
17
+ readOnly: boolean;
17
18
  setTheme: SetState<PickaxeMarkdownTheme>;
18
19
  setAccentColor: SetState<string>;
19
20
  setWebsiteMetadatas: SetState<WebsiteMetadata[]>;
@@ -27,7 +28,8 @@ export interface PickaxeMarkdownProps {
27
28
  accentColor?: string;
28
29
  linkPreviews?: boolean;
29
30
  actions?: boolean;
31
+ readOnly?: boolean;
30
32
  }
31
33
  export declare const PickaxeMarkdownContext: import("react").Context<PickaxeMarkdownContextType>;
32
- export declare const PickaxeMarkdown: ({ children, theme: _theme, syntaxTheme, accentColor: _accentColor, linkPreviews: _linkPreviews, actions: _actions, }: PickaxeMarkdownProps) => import("react/jsx-runtime").JSX.Element;
34
+ export declare const PickaxeMarkdown: ({ children, theme: _theme, syntaxTheme, accentColor: _accentColor, linkPreviews: _linkPreviews, actions: _actions, readOnly, }: PickaxeMarkdownProps) => import("react/jsx-runtime").JSX.Element;
33
35
  export default PickaxeMarkdown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pickaxeproject/react",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Client utility library for Pickaxe",
5
5
  "repository": {
6
6
  "type": "git",