@sakura-ui/markdown 0.0.16-beta.4 → 0.0.16
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/index.cjs.js
CHANGED
|
@@ -599,8 +599,8 @@ Check the top-level render call using <`+_+">.")}return p}function Dr(s,p){if(!(
|
|
|
599
599
|
lg:aspect-auto
|
|
600
600
|
lg:w-[${e.width}px]
|
|
601
601
|
lg:h-[${e.height}px]
|
|
602
|
-
`),Ye.jsx("iframe",{className:rr(u,i,t),...r,children:n})},V_=({children:e,showToc:t,tocTitle:n="目次",shiftHeding:r=0})=>{const[u,i]=rt.useState([]),[a,l]=rt.useState(Ye.jsx(rt.Fragment,{})),c=E=>th().use(M_).processSync(E).data.fm.headings.filter(O=>O.depth<3),f=rt.useCallback(()=>{(async()=>{var D;location.hash&&((D=document.getElementById(decodeURI(location.hash.substring(1))))==null||D.scrollIntoView())})()},[]);rt.useEffect(()=>{i(c(e)),l(h(e))},[e]);const d={...Sc,components:{a:U_,article:j_,button:Fa,code:t_,dl:n_,dt:r_,dd:u_,h1:i_,h2:a_,h3:s_,h4:o_,h5:l_,h6:c_,iframe:$_,img:Y_,ul:ea,ol:d_,pre:h_,table:H_,caption:m_,thead:E_,tbody:b_,th:g_,tr:T_,td:__,div:z_}},h=E=>zo().use(ko).use(Lp).use(Sm).use(E1).use(L_).use(S_).use(F_).use(w_).use(P_).use(B_).use(v_).use(h1,{allowDangerousHtml:!0}).use(Pg).use(Wg,{target:"_blank"}).use(Xg,{shift:r}).use(wT).use(NT,d).processSync(E).result;return Ye.jsxs("div",{className:"py-8 flex flex-col gap-8",children:[t&&Ye.jsxs("nav",{className:`
|
|
602
|
+
`),Ye.jsx("iframe",{className:rr(u,i,t),...r,children:n})},V_=e=>new Promise(t=>setTimeout(t,e)),q_=({children:e,showToc:t,tocTitle:n="目次",shiftHeding:r=0})=>{const[u,i]=rt.useState([]),[a,l]=rt.useState(Ye.jsx(rt.Fragment,{})),c=E=>th().use(M_).processSync(E).data.fm.headings.filter(O=>O.depth<3),f=rt.useCallback(()=>{(async()=>{var D;await V_(500),location.hash&&((D=document.getElementById(decodeURI(location.hash.substring(1))))==null||D.scrollIntoView())})()},[]);rt.useEffect(()=>{i(c(e)),l(h(e))},[e]);const d={...Sc,components:{a:U_,article:j_,button:Fa,code:t_,dl:n_,dt:r_,dd:u_,h1:i_,h2:a_,h3:s_,h4:o_,h5:l_,h6:c_,iframe:$_,img:Y_,ul:ea,ol:d_,pre:h_,table:H_,caption:m_,thead:E_,tbody:b_,th:g_,tr:T_,td:__,div:z_}},h=E=>zo().use(ko).use(Lp).use(Sm).use(E1).use(L_).use(S_).use(F_).use(w_).use(P_).use(B_).use(v_).use(h1,{allowDangerousHtml:!0}).use(Pg).use(Wg,{target:"_blank"}).use(Xg,{shift:r}).use(wT).use(NT,d).processSync(E).result;return Ye.jsxs("div",{ref:f,className:"py-8 flex flex-col gap-8",children:[t&&Ye.jsxs("nav",{className:`
|
|
603
603
|
rounded-3xl
|
|
604
604
|
p-10
|
|
605
605
|
bg-wood-50
|
|
606
|
-
`,children:[Ye.jsx("h2",{className:"mb-4 font-bold text-h-xs-m sm:text-h-xs",children:n}),Ye.jsx(ea,{children:Ye.jsx(_c,{items:u})})]}),
|
|
606
|
+
`,children:[Ye.jsx("h2",{className:"mb-4 font-bold text-h-xs-m sm:text-h-xs",children:n}),Ye.jsx(ea,{children:Ye.jsx(_c,{items:u})})]}),a]})};exports.Markdown=q_;
|
package/dist/index.es.js
CHANGED
|
@@ -21575,7 +21575,7 @@ const F_ = () => (e) => {
|
|
|
21575
21575
|
lg:w-[${e.width}px]
|
|
21576
21576
|
lg:h-[${e.height}px]
|
|
21577
21577
|
`), /* @__PURE__ */ Ye.jsx("iframe", { className: rr(u, i, t), ...r, children: n });
|
|
21578
|
-
},
|
|
21578
|
+
}, q_ = (e) => new Promise((t) => setTimeout(t, e)), Q_ = ({
|
|
21579
21579
|
children: e,
|
|
21580
21580
|
showToc: t,
|
|
21581
21581
|
tocTitle: n = "目次",
|
|
@@ -21586,7 +21586,7 @@ const F_ = () => (e) => {
|
|
|
21586
21586
|
), f = at.useCallback(() => {
|
|
21587
21587
|
(async () => {
|
|
21588
21588
|
var D;
|
|
21589
|
-
location.hash && ((D = document.getElementById(decodeURI(location.hash.substring(1)))) == null || D.scrollIntoView());
|
|
21589
|
+
await q_(500), location.hash && ((D = document.getElementById(decodeURI(location.hash.substring(1)))) == null || D.scrollIntoView());
|
|
21590
21590
|
})();
|
|
21591
21591
|
}, []);
|
|
21592
21592
|
at.useEffect(() => {
|
|
@@ -21625,7 +21625,7 @@ const F_ = () => (e) => {
|
|
|
21625
21625
|
}, h = (E) => zo().use(ko).use(Fp).use(km).use(b1).use(F_).use(k_).use(v_).use(P_).use(B_).use(M_).use(w_).use(p1, {
|
|
21626
21626
|
allowDangerousHtml: !0
|
|
21627
21627
|
}).use(Bg).use(Qg, { target: "_blank" }).use(Kg, { shift: r }).use(PT).use(IT, d).processSync(E).result;
|
|
21628
|
-
return /* @__PURE__ */ Ye.jsxs("div", { className: "py-8 flex flex-col gap-8", children: [
|
|
21628
|
+
return /* @__PURE__ */ Ye.jsxs("div", { ref: f, className: "py-8 flex flex-col gap-8", children: [
|
|
21629
21629
|
t && /* @__PURE__ */ Ye.jsxs("nav", { className: `
|
|
21630
21630
|
rounded-3xl
|
|
21631
21631
|
p-10
|
|
@@ -21634,9 +21634,9 @@ const F_ = () => (e) => {
|
|
|
21634
21634
|
/* @__PURE__ */ Ye.jsx("h2", { className: "mb-4 font-bold text-h-xs-m sm:text-h-xs", children: n }),
|
|
21635
21635
|
/* @__PURE__ */ Ye.jsx(ea, { children: /* @__PURE__ */ Ye.jsx(_c, { items: u }) })
|
|
21636
21636
|
] }),
|
|
21637
|
-
|
|
21637
|
+
a
|
|
21638
21638
|
] });
|
|
21639
21639
|
};
|
|
21640
21640
|
export {
|
|
21641
|
-
|
|
21641
|
+
Q_ as Markdown
|
|
21642
21642
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AA6C/C,OAAO,EASL,KAAK,WAAW,EACjB,MAAM,YAAY,CAAA;AAEnB,UAAU,QAAQ;IAChB,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,eAAO,MAAM,eAAe,cAAe,QAAQ,2BAelD,CAAA;
|
|
1
|
+
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AA6C/C,OAAO,EASL,KAAK,WAAW,EACjB,MAAM,YAAY,CAAA;AAEnB,UAAU,QAAQ;IAChB,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,eAAO,MAAM,eAAe,cAAe,QAAQ,2BAelD,CAAA;AA8JD,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,QAAQ,iDAKlB,KAAK,2BA8GP,CAAA"}
|