@pickaxeproject/react 0.0.33 → 0.0.35
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/common/PickaxeMarkdown/Renderer.js +1 -1
- package/dist/cjs/src/components/Pickaxe/common/PickaxeMarkdown/Renderer.d.ts +3 -1
- package/dist/esm/components/Pickaxe/common/PickaxeMarkdown/Renderer.js +1 -1
- package/dist/esm/src/components/Pickaxe/common/PickaxeMarkdown/Renderer.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),i=require("react"),t=require("./hooks/usePickaxeMarkdownContext.js"),n=require("react-syntax-highlighter"),s=require("react-markdown"),l=require("remark-gfm"),a=require("remark-math"),d=require("rehype-katex"),o=require("./A.js"),c=require("./Img.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=m(s),g=m(l),j=m(a),u=m(d);exports.PickaxeMarkdownRenderer=({className:s,value:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),i=require("react"),t=require("./hooks/usePickaxeMarkdownContext.js"),n=require("react-syntax-highlighter"),s=require("react-markdown"),l=require("remark-gfm"),a=require("remark-math"),d=require("rehype-katex"),o=require("./A.js"),c=require("./Img.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=m(s),g=m(l),j=m(a),u=m(d);exports.PickaxeMarkdownRenderer=({className:s,style:l,value:a})=>{const{theme:d,syntaxTheme:m}=t.usePickaxeMarkdownContext(),x=i.useRef(null),b={h1:({node:e,children:i})=>r.jsx("h1",Object.assign({style:{fontSize:"2.25rem",lineHeight:"2.5rem",marginTop:"1rem",marginBottom:"1.5rem"}},{children:i})),h2:({node:e,children:i})=>r.jsx("h2",Object.assign({style:{fontSize:"1.875rem",lineHeight:"2.25rem",marginTop:"1.25rem",marginBottom:"1.25rem"}},{children:i})),h3:({node:e,children:i})=>r.jsx("h3",Object.assign({style:{fontSize:"1.5rem",lineHeight:"2rem",marginBottom:"1rem"}},{children:i})),h4:({node:e,children:i})=>r.jsx("h4",Object.assign({className:"mt-2 text-xl",style:{fontSize:"1.25rem",lineHeight:"1.75rem",marginBottom:"0.75rem"}},{children:i})),h5:({node:e,children:i})=>r.jsx("h5",Object.assign({style:{fontSize:"1.125rem",lineHeight:"1.75rem"}},{children:i})),p:({node:e,children:i})=>r.jsx("p",Object.assign({style:{fontWeight:350}},{children:i})),a:o.default,ol:({node:e,children:i})=>r.jsx("ol",Object.assign({style:{listStyleType:"decimal",listStylePosition:"inside",paddingLeft:"1.5rem",marginTop:"1rem",marginBottom:"2rem"}},{children:i})),ul:({node:e,children:i})=>r.jsx("ul",Object.assign({style:{listStyleType:"disc",listStylePosition:"inside",paddingLeft:"1.5rem",marginTop:"1rem",marginBottom:"2rem"}},{children:i})),li:({node:e,children:i})=>r.jsx("li",Object.assign({style:{marginBottom:"0.75rem"}},{children:i})),table:({children:e})=>r.jsx("div",Object.assign({className:"overflow-auto"},{children:r.jsx("table",Object.assign({style:{tableLayout:"fixed",fontSize:"0.875rem",lineHeight:"1.24rem",marginBottom:"1.5rem"}},{children:e}))})),th:({node:e,children:i})=>r.jsx("th",Object.assign({style:{padding:"0.75em 1em",fontWeight:600,textAlign:"left"}},{children:i})),tr:({node:e,children:i})=>r.jsx("tr",Object.assign({style:{border:"dark"===d?"1px solid #30363D":"1px solid #D0D7DE"}},{children:i})),td:({node:e,children:i})=>r.jsx("td",Object.assign({style:{padding:"0.75em 1em"}},{children:i})),code:i=>{var{node:t,children:s,className:l}=i,a=e.__rest(i,["node","children","className"]);const d=/language-(\w+)/.exec(l||"");return d?r.jsx(n.Prism,Object.assign({},a,{PreTag:"div",language:d[1],style:m,showLineNumbers:!0},{children:String(s).replace(/\n$/,"")})):r.jsx("code",Object.assign({},a,{className:l},{children:s}))},blockquote:({node:e,children:i})=>r.jsx("blockquote",Object.assign({style:{borderLeft:"dark"===d?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===d?"#8B8B8B":"#656D76",paddingLeft:"1rem",marginBottom:"1.5rem"}},{children:i})),img:c.default};return r.jsx("div",Object.assign({className:"pxe-markdown",ref:x,style:Object.assign({position:"relative",whiteSpace:"pre-wrap"},l)},{children:r.jsx(h.default,Object.assign({},s&&{className:s},{components:b,remarkPlugins:[g.default,j.default],rehypePlugins:[u.default]},{children:(null!=a?a:"").replace(/\u200B/g,"")}))}))};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
1
2
|
interface PickaxeMarkdownRendererProps {
|
|
2
3
|
className?: string;
|
|
4
|
+
style?: CSSProperties;
|
|
3
5
|
value?: string | null;
|
|
4
6
|
}
|
|
5
7
|
export type Node = {
|
|
6
8
|
node?: any;
|
|
7
9
|
};
|
|
8
|
-
export declare const PickaxeMarkdownRenderer: ({ className, value, }: PickaxeMarkdownRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const PickaxeMarkdownRenderer: ({ className, style, value, }: PickaxeMarkdownRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as e}from"../../../../_virtual/_tslib.js";import{jsx as i}from"react/jsx-runtime";import{useRef as r}from"react";import{usePickaxeMarkdownContext as t}from"./hooks/usePickaxeMarkdownContext.js";import{Prism as n}from"react-syntax-highlighter";import l from"react-markdown";import o from"remark-gfm";import
|
|
1
|
+
import{__rest as e}from"../../../../_virtual/_tslib.js";import{jsx as i}from"react/jsx-runtime";import{useRef as r}from"react";import{usePickaxeMarkdownContext as t}from"./hooks/usePickaxeMarkdownContext.js";import{Prism as n}from"react-syntax-highlighter";import l from"react-markdown";import o from"remark-gfm";import s from"remark-math";import m from"rehype-katex";import a from"./A.js";import d from"./Img.js";const c=({className:c,style:h,value:g})=>{const{theme:p,syntaxTheme:b}=t(),f=r(null),y={h1:({node:e,children:r})=>i("h1",Object.assign({style:{fontSize:"2.25rem",lineHeight:"2.5rem",marginTop:"1rem",marginBottom:"1.5rem"}},{children:r})),h2:({node:e,children:r})=>i("h2",Object.assign({style:{fontSize:"1.875rem",lineHeight:"2.25rem",marginTop:"1.25rem",marginBottom:"1.25rem"}},{children:r})),h3:({node:e,children:r})=>i("h3",Object.assign({style:{fontSize:"1.5rem",lineHeight:"2rem",marginBottom:"1rem"}},{children:r})),h4:({node:e,children:r})=>i("h4",Object.assign({className:"mt-2 text-xl",style:{fontSize:"1.25rem",lineHeight:"1.75rem",marginBottom:"0.75rem"}},{children:r})),h5:({node:e,children:r})=>i("h5",Object.assign({style:{fontSize:"1.125rem",lineHeight:"1.75rem"}},{children:r})),p:({node:e,children:r})=>i("p",Object.assign({style:{fontWeight:350}},{children:r})),a:a,ol:({node:e,children:r})=>i("ol",Object.assign({style:{listStyleType:"decimal",listStylePosition:"inside",paddingLeft:"1.5rem",marginTop:"1rem",marginBottom:"2rem"}},{children:r})),ul:({node:e,children:r})=>i("ul",Object.assign({style:{listStyleType:"disc",listStylePosition:"inside",paddingLeft:"1.5rem",marginTop:"1rem",marginBottom:"2rem"}},{children:r})),li:({node:e,children:r})=>i("li",Object.assign({style:{marginBottom:"0.75rem"}},{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",marginBottom:"1.5rem"}},{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"===p?"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:r=>{var{node:t,children:l,className:o}=r,s=e(r,["node","children","className"]);const m=/language-(\w+)/.exec(o||"");return m?i(n,Object.assign({},s,{PreTag:"div",language:m[1],style:b,showLineNumbers:!0},{children:String(l).replace(/\n$/,"")})):i("code",Object.assign({},s,{className:o},{children:l}))},blockquote:({node:e,children:r})=>i("blockquote",Object.assign({style:{borderLeft:"dark"===p?"4px solid #30363D":"4px solid #D0D7DE",color:"dark"===p?"#8B8B8B":"#656D76",paddingLeft:"1rem",marginBottom:"1.5rem"}},{children:r})),img:d};return i("div",Object.assign({className:"pxe-markdown",ref:f,style:Object.assign({position:"relative",whiteSpace:"pre-wrap"},h)},{children:i(l,Object.assign({},c&&{className:c},{components:y,remarkPlugins:[o,s],rehypePlugins:[m]},{children:(null!=g?g:"").replace(/\u200B/g,"")}))}))};export{c as PickaxeMarkdownRenderer};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
1
2
|
interface PickaxeMarkdownRendererProps {
|
|
2
3
|
className?: string;
|
|
4
|
+
style?: CSSProperties;
|
|
3
5
|
value?: string | null;
|
|
4
6
|
}
|
|
5
7
|
export type Node = {
|
|
6
8
|
node?: any;
|
|
7
9
|
};
|
|
8
|
-
export declare const PickaxeMarkdownRenderer: ({ className, value, }: PickaxeMarkdownRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const PickaxeMarkdownRenderer: ({ className, style, value, }: PickaxeMarkdownRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export {};
|