@sakura-ui/markdown 0.0.4 → 0.0.5-beta.0

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
@@ -370,7 +370,7 @@ React keys must be passed directly to JSX without using spread:
370
370
  lg:aspect-auto
371
371
  lg:w-[${e.width}px]
372
372
  lg:h-[${e.height}px]
373
- `),xe.jsx("iframe",{className:Qt(u,i,t),...r,children:n})},m2=({children:e,showToc:t,tocTitle:n="目次"})=>{const[r,u]=it.useState([]),[i,a]=it.useState();it.useEffect(()=>{u(o(e)),a(c(e))},[e]);const o=d=>Aa().use(Pa).use(a2).parse(d).children.filter(T=>T.type==="heading").filter(T=>T.depth<3).map(T=>{var R;return{depth:T.depth,title:((R=T.children[0])==null?void 0:R.value)||""}}),l={...hc,components:{a:c2,article:f2,button:Ri,code:NT,dl:IT,dt:ST,dd:kT,h1:RT,h2:LT,h3:OT,h4:FT,h5:PT,h6:wT,iframe:p2,img:d2,ul:ei,ol:BT,pre:MT,table:l2,caption:UT,thead:jT,tbody:zT,th:YT,tr:qT,td:VT,div:h2}},c=d=>Aa().use(Pa).use(ep).use(Qp).use(Mm).use(e2).use(QT).use(t2).use(r2).use(u2).use(i2).use(n2).use(wm,{allowDangerousHtml:!0}).use(ug).use(mg,{target:"_blank"}).use(gg,{shift:0}).use(pT).use(sT,l).processSync(d).result;return xe.jsxs("div",{className:"py-8 flex flex-col gap-8",children:[t&&xe.jsxs("nav",{className:`
373
+ `),xe.jsx("iframe",{className:Qt(u,i,t),...r,children:n})},m2=({children:e,showToc:t,tocTitle:n="目次"})=>{const[r,u]=it.useState([]),[i,a]=it.useState();it.useEffect(()=>{u(o(e)),a(c(e))},[e]);const o=d=>{const m=Aa().use(Pa).use(a2).parse(d).children.filter(T=>T.type==="heading").filter(T=>T.depth<3).map(T=>{var R;return{depth:T.depth,title:((R=T.children[0])==null?void 0:R.value)||""}});return console.log(m),m},l={...hc,components:{a:c2,article:f2,button:Ri,code:NT,dl:IT,dt:ST,dd:kT,h1:RT,h2:LT,h3:OT,h4:FT,h5:PT,h6:wT,iframe:p2,img:d2,ul:ei,ol:BT,pre:MT,table:l2,caption:UT,thead:jT,tbody:zT,th:YT,tr:qT,td:VT,div:h2}},c=d=>Aa().use(Pa).use(ep).use(Qp).use(Mm).use(e2).use(QT).use(t2).use(r2).use(u2).use(i2).use(n2).use(wm,{allowDangerousHtml:!0}).use(ug).use(mg,{target:"_blank"}).use(gg,{shift:0}).use(pT).use(sT,l).processSync(d).result;return xe.jsxs("div",{className:"py-8 flex flex-col gap-8",children:[t&&xe.jsxs("nav",{className:`
374
374
  rounded-3xl
375
375
  p-10
376
376
  bg-wood-50
package/dist/index.es.js CHANGED
@@ -19544,13 +19544,16 @@ const o2 = () => (e, t) => {
19544
19544
  mt.useEffect(() => {
19545
19545
  u(o(e)), a(c(e));
19546
19546
  }, [e]);
19547
- const o = (d) => Aa().use(Pa).use(o2).parse(d).children.filter((T) => T.type === "heading").filter((T) => T.depth < 3).map((T) => {
19548
- var R;
19549
- return {
19550
- depth: T.depth,
19551
- title: ((R = T.children[0]) == null ? void 0 : R.value) || ""
19552
- };
19553
- }), l = {
19547
+ const o = (d) => {
19548
+ const m = Aa().use(Pa).use(o2).parse(d).children.filter((T) => T.type === "heading").filter((T) => T.depth < 3).map((T) => {
19549
+ var R;
19550
+ return {
19551
+ depth: T.depth,
19552
+ title: ((R = T.children[0]) == null ? void 0 : R.value) || ""
19553
+ };
19554
+ });
19555
+ return console.log(m), m;
19556
+ }, l = {
19554
19557
  ...pc,
19555
19558
  components: {
19556
19559
  a: h2,
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AA0C/C,OAAO,EASL,KAAK,WAAW,EACjB,MAAM,YAAY,CAAA;AAGnB,UAAU,QAAQ;IAChB,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,eAAO,MAAM,eAAe,cAAe,QAAQ,2BAelD,CAAA;AA0JD,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,QAAQ,oCAA4C,KAAK,2BAwGrE,CAAA"}
1
+ {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AA0C/C,OAAO,EASL,KAAK,WAAW,EACjB,MAAM,YAAY,CAAA;AAGnB,UAAU,QAAQ;IAChB,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,eAAO,MAAM,eAAe,cAAe,QAAQ,2BAelD,CAAA;AA0JD,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,QAAQ,oCAA4C,KAAK,2BAyGrE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sakura-ui/markdown",
3
- "version": "0.0.4",
3
+ "version": "0.0.5-beta.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "glassonion1",