@sakura-ui/markdown 0.0.14 → 0.0.15-beta.1
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 +1 -1
- package/dist/index.es.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -473,7 +473,7 @@ Check the top-level render call using <`+_+">.")}return h}function Cr(s,h){if(!(
|
|
|
473
473
|
!text-blue-1000
|
|
474
474
|
!bg-blue-100
|
|
475
475
|
font-bold
|
|
476
|
-
`,l=u["aria-current"]??!1;return ge.jsx("li",{role:"presentation",children:ge.jsxs("a",{"aria-current":l,ref:t,role:"menuitem",className:ve(a,l&&i),...u,children:[ge.jsx(tu,{opticalSize:20,className:`flex-none ${!l&&"invisible"}`,children:"check"}),ge.jsx("span",{className:Ra,children:r})]})})});z_.displayName="PopoverMenuItem";const rr=e=>e.type==="containerDirective"||e.type==="leafDirective"||e.type==="textDirective",va=e=>e.type==="containerDirective",Y_=e=>e.type==="textDirective",$_=e=>e.type==="heading",V_=()=>e=>{kt(e,rr,t=>{if(t.type==="containerDirective"||t.type==="leafDirective"){if(t.name!=="youtube")return;const n=t.data||(t.data={}),r=t.attributes||{},u=r.id;u||console.error("Unexpected missing `id` on `youtube` directive");const i=t.children[0].value,l=r.width,c=r.height,f=r.allow||"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",d=r.referrerpolicy||"strict-origin-when-cross-origin";n.hName="iframe",n.hProperties={title:i,src:`https://www.youtube-nocookie.com/embed/${u}`,width:l,height:c,frameBorder:0,allow:f,referrerpolicy:d,allowFullScreen:!0,loading:"lazy"}}})},Ji={}.hasOwnProperty;function Sc(e,t,n){const r=n&&G_(n);function u(a,i,...l){let c=-1,f;if(a==null){f={type:"root",children:[]};const d=i;l.unshift(d)}else if(f=_l(a,t),f.tagName=f.tagName.toLowerCase(),r&&Ji.call(r,f.tagName)&&(f.tagName=r[f.tagName]),q_(i))l.unshift(i);else{let d;for(d in i)Ji.call(i,d)&&W_(e,f.properties,d,i[d])}for(;++c<l.length;)Zi(f.children,l[c]);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return u}function q_(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const u=t[r];if(u&&typeof u=="object"){if(!Array.isArray(u))return!0;const a=u;for(const i of a)if(typeof i!="number"&&typeof i!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function W_(e,t,n,r){const u=iu(e,n);let a=-1,i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?u.spaceSeparated?i=Jr(r):u.commaSeparated?i=Su(r):u.commaOrSpaceSeparated?i=Jr(Su(r).join(" ")):i=fo(u,u.property,r):Array.isArray(r)?i=r.concat():i=u.property==="style"?Q_(r):String(r);if(Array.isArray(i)){const l=[];for(;++a<i.length;){const c=fo(u,u.property,i[a]);l[a]=c}i=l}if(u.property==="className"&&Array.isArray(t.className)){const l=i;i=t.className.concat(l)}t[u.property]=i}}function Zi(e,t){let n=-1;if(t!=null)if(typeof t=="string"||typeof t=="number")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)Zi(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?Zi(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function fo(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||qn(n)===qn(t)))return!0}return n}function Q_(e){const t=[];let n;for(n in e)Ji.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function G_(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const X_=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],gn=Sc(ar,"div");Sc(Tn,"g",X_);const K_=()=>e=>{kt(e,rr,t=>{t.data=t.data??{};const n=gn(t.name,t.attributes||{});t.data.hName=n.tagName,t.data.hProperties=n.properties})},J_=()=>e=>{kt(e,Y_,t=>{if(t.name!=="link-button")return;const n=t.data||(t.data={}),r="a";n.hName=r,t.attributes=t.attributes??{},t.attributes["data-node"]=t.name,n.hProperties=gn(r,t.attributes).properties})},Z_=()=>e=>{kt(e,va,t=>{if(!t.name.startsWith("grid-cols-"))return;t.attributes=t.attributes??{},t.attributes.as==="list"&&(t.attributes.as=void 0,t.attributes["data-behavior"]="list");const n=Number.parseInt(t.name.split("-").pop()||"1"),r={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-6",8:"md:grid-cols-6",9:"md:grid-cols-6",10:"md:grid-cols-6",11:"md:grid-cols-6",12:"md:grid-cols-12"};t.data=t.data??{};const u="div";t.data.hName=u,t.attributes.class=`flex flex-col md:grid ${r[n]} gap-8`,t.data.hProperties=gn(u,t.attributes).properties})},e2=()=>e=>{kt(e,va,t=>{if(t.name!=="cell")return;t.data=t.data??{};const n="div";t.data.hName=n,t.attributes=t.attributes??{},t.attributes["data-node"]=t.name,t.data.hProperties=gn(n,t.attributes).properties,t.children.forEach(r=>{if(!rr(r)||r.name!=="cell-img")return;r.data=r.data??{};const u="img";r.data.hName=u,r.attributes=r.attributes??{},r.attributes["data-node"]=r.name,r.data.hProperties=gn(u,r.attributes).properties})})},t2=()=>e=>{kt(e,rr,t=>{if(t.type!=="containerDirective"||t.name!=="card")return;t.data=t.data??{};const n="article";t.data.hName=n,t.attributes=t.attributes??{},t.attributes["data-node"]=t.name,t.attributes.as==="link"&&(t.attributes.as=void 0,t.attributes["data-behavior"]="link",t.attributes["data-href"]=t.attributes.href||""),t.data.hProperties=gn(n,t.attributes).properties,t.children.forEach(r=>{if(!rr(r))return;r.data=r.data??{};let u="div";r.name==="card-img"&&(u="img"),r.data.hName=u,r.attributes=r.attributes??{},r.attributes["data-node"]=r.name,r.data.hProperties=gn(u,r.attributes).properties})})},n2=()=>e=>{kt(e,va,t=>{if(t.name!=="faq")return;t.data=t.data??{};const n="dl";t.data.hName=n,t.data.hProperties=gn(n,t.attributes||{}).properties,t.children.forEach(r=>{if(!rr(r)||r.name!=="faq-q"&&r.name!=="faq-a")return;r.data=r.data??{};const u=r.name==="faq-q"?"dt":"dd";r.data.hName=u,r.data.hProperties=gn(u,r.attributes||{}).properties})})},r2=()=>(e,t)=>{const n=[],r=new mc;kt(e,$_,a=>{const i={id:r.slug(Xr(a)),depth:a.depth,value:Xr(a)};n.push(i)}),t.data.fm||(t.data.fm={}),t.data.fm.headings=e_(n)},Nc=({items:e})=>Ye.jsx(Ye.Fragment,{children:e.map(t=>Ye.jsxs("li",{children:[Ye.jsx(Fa,{href:`#${t.id}`,children:t.value}),t.children?Ye.jsx(Ki,{children:Ye.jsx(Nc,{items:t.children})}):null]},t.id))}),u2=e=>{const{className:t,children:n,...r}=e;return Ye.jsx(U_,{children:Ye.jsx(F_,{className:nr(t),...r,children:n})})},i2=e=>{const{children:t,href:n,...r}=e;return r["data-node"]==="link-button"?Ye.jsx(Oa,{as:"a",variant:"secondary",href:n,children:t}):Ye.jsx(Fa,{href:n,...r,children:t})},a2=e=>{const{children:t,className:n,...r}=e;if(r["data-node"]==="card"){if(r["data-behavior"]==="link"){const a=r["data-href"];return Ye.jsx(b_,{href:a,className:nr(n),children:t})}return Ye.jsx(Cc,{className:nr(n),children:t})}return Ye.jsx("article",{className:n,...r,children:t})},s2=e=>{const{children:t,...n}=e,r=n["data-node"];return r==="card-title"?Ye.jsx(T_,{children:t}):r==="card-description"?Ye.jsx(E_,{children:t}):r==="card-footer"?Ye.jsx(g_,{children:t}):n["data-behavior"]==="list"?Ye.jsx("ul",{className:n.className,children:st.Children.map(t,u=>Ye.jsx("li",{className:"
|
|
476
|
+
`,l=u["aria-current"]??!1;return ge.jsx("li",{role:"presentation",children:ge.jsxs("a",{"aria-current":l,ref:t,role:"menuitem",className:ve(a,l&&i),...u,children:[ge.jsx(tu,{opticalSize:20,className:`flex-none ${!l&&"invisible"}`,children:"check"}),ge.jsx("span",{className:Ra,children:r})]})})});z_.displayName="PopoverMenuItem";const rr=e=>e.type==="containerDirective"||e.type==="leafDirective"||e.type==="textDirective",va=e=>e.type==="containerDirective",Y_=e=>e.type==="textDirective",$_=e=>e.type==="heading",V_=()=>e=>{kt(e,rr,t=>{if(t.type==="containerDirective"||t.type==="leafDirective"){if(t.name!=="youtube")return;const n=t.data||(t.data={}),r=t.attributes||{},u=r.id;u||console.error("Unexpected missing `id` on `youtube` directive");const i=t.children[0].value,l=r.width,c=r.height,f=r.allow||"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",d=r.referrerpolicy||"strict-origin-when-cross-origin";n.hName="iframe",n.hProperties={title:i,src:`https://www.youtube-nocookie.com/embed/${u}`,width:l,height:c,frameBorder:0,allow:f,referrerpolicy:d,allowFullScreen:!0,loading:"lazy"}}})},Ji={}.hasOwnProperty;function Sc(e,t,n){const r=n&&G_(n);function u(a,i,...l){let c=-1,f;if(a==null){f={type:"root",children:[]};const d=i;l.unshift(d)}else if(f=_l(a,t),f.tagName=f.tagName.toLowerCase(),r&&Ji.call(r,f.tagName)&&(f.tagName=r[f.tagName]),q_(i))l.unshift(i);else{let d;for(d in i)Ji.call(i,d)&&W_(e,f.properties,d,i[d])}for(;++c<l.length;)Zi(f.children,l[c]);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return u}function q_(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const u=t[r];if(u&&typeof u=="object"){if(!Array.isArray(u))return!0;const a=u;for(const i of a)if(typeof i!="number"&&typeof i!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function W_(e,t,n,r){const u=iu(e,n);let a=-1,i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?u.spaceSeparated?i=Jr(r):u.commaSeparated?i=Su(r):u.commaOrSpaceSeparated?i=Jr(Su(r).join(" ")):i=fo(u,u.property,r):Array.isArray(r)?i=r.concat():i=u.property==="style"?Q_(r):String(r);if(Array.isArray(i)){const l=[];for(;++a<i.length;){const c=fo(u,u.property,i[a]);l[a]=c}i=l}if(u.property==="className"&&Array.isArray(t.className)){const l=i;i=t.className.concat(l)}t[u.property]=i}}function Zi(e,t){let n=-1;if(t!=null)if(typeof t=="string"||typeof t=="number")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)Zi(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?Zi(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function fo(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||qn(n)===qn(t)))return!0}return n}function Q_(e){const t=[];let n;for(n in e)Ji.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function G_(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const X_=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],gn=Sc(ar,"div");Sc(Tn,"g",X_);const K_=()=>e=>{kt(e,rr,t=>{t.data=t.data??{};const n=gn(t.name,t.attributes||{});t.data.hName=n.tagName,t.data.hProperties=n.properties})},J_=()=>e=>{kt(e,Y_,t=>{if(t.name!=="link-button")return;const n=t.data||(t.data={}),r="a";n.hName=r,t.attributes=t.attributes??{},t.attributes["data-node"]=t.name,n.hProperties=gn(r,t.attributes).properties})},Z_=()=>e=>{kt(e,va,t=>{if(!t.name.startsWith("grid-cols-"))return;t.attributes=t.attributes??{},t.attributes.as==="list"&&(t.attributes.as=void 0,t.attributes["data-behavior"]="list");const n=Number.parseInt(t.name.split("-").pop()||"1"),r={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-6",8:"md:grid-cols-6",9:"md:grid-cols-6",10:"md:grid-cols-6",11:"md:grid-cols-6",12:"md:grid-cols-12"};t.data=t.data??{};const u="div";t.data.hName=u,t.attributes.class=`flex flex-col md:grid ${r[n]} gap-8`,t.data.hProperties=gn(u,t.attributes).properties})},e2=()=>e=>{kt(e,va,t=>{if(t.name!=="cell")return;t.data=t.data??{};const n="div";t.data.hName=n,t.attributes=t.attributes??{},t.attributes["data-node"]=t.name,t.data.hProperties=gn(n,t.attributes).properties,t.children.forEach(r=>{if(!rr(r)||r.name!=="cell-img")return;r.data=r.data??{};const u="img";r.data.hName=u,r.attributes=r.attributes??{},r.attributes["data-node"]=r.name,r.data.hProperties=gn(u,r.attributes).properties})})},t2=()=>e=>{kt(e,rr,t=>{if(t.type!=="containerDirective"||t.name!=="card")return;t.data=t.data??{};const n="article";t.data.hName=n,t.attributes=t.attributes??{},t.attributes["data-node"]=t.name,t.attributes.as==="link"&&(t.attributes.as=void 0,t.attributes["data-behavior"]="link",t.attributes["data-href"]=t.attributes.href||""),t.data.hProperties=gn(n,t.attributes).properties,t.children.forEach(r=>{if(!rr(r))return;r.data=r.data??{};let u="div";r.name==="card-img"&&(u="img"),r.data.hName=u,r.attributes=r.attributes??{},r.attributes["data-node"]=r.name,r.data.hProperties=gn(u,r.attributes).properties})})},n2=()=>e=>{kt(e,va,t=>{if(t.name!=="faq")return;t.data=t.data??{};const n="dl";t.data.hName=n,t.data.hProperties=gn(n,t.attributes||{}).properties,t.children.forEach(r=>{if(!rr(r)||r.name!=="faq-q"&&r.name!=="faq-a")return;r.data=r.data??{};const u=r.name==="faq-q"?"dt":"dd";r.data.hName=u,r.data.hProperties=gn(u,r.attributes||{}).properties})})},r2=()=>(e,t)=>{const n=[],r=new mc;kt(e,$_,a=>{const i={id:r.slug(Xr(a)),depth:a.depth,value:Xr(a)};n.push(i)}),t.data.fm||(t.data.fm={}),t.data.fm.headings=e_(n)},Nc=({items:e})=>Ye.jsx(Ye.Fragment,{children:e.map(t=>Ye.jsxs("li",{children:[Ye.jsx(Fa,{href:`#${t.id}`,children:t.value}),t.children?Ye.jsx(Ki,{children:Ye.jsx(Nc,{items:t.children})}):null]},t.id))}),u2=e=>{const{className:t,children:n,...r}=e;return Ye.jsx(U_,{children:Ye.jsx(F_,{className:nr(t),...r,children:n})})},i2=e=>{const{children:t,href:n,...r}=e;return r["data-node"]==="link-button"?Ye.jsx(Oa,{as:"a",variant:"secondary",href:n,children:t}):Ye.jsx(Fa,{href:n,...r,children:t})},a2=e=>{const{children:t,className:n,...r}=e;if(r["data-node"]==="card"){if(r["data-behavior"]==="link"){const a=r["data-href"];return Ye.jsx(b_,{href:a,className:nr(n),children:t})}return Ye.jsx(Cc,{className:nr(n),children:t})}return Ye.jsx("article",{className:n,...r,children:t})},s2=e=>{const{children:t,...n}=e,r=n["data-node"];return r==="card-title"?Ye.jsx(T_,{children:t}):r==="card-description"?Ye.jsx(E_,{children:t}):r==="card-footer"?Ye.jsx(g_,{children:t}):n["data-behavior"]==="list"?Ye.jsx("ul",{className:n.className,children:st.Children.map(t,u=>Ye.jsx("li",{className:"",children:u},Math.random()))}):Ye.jsx("div",{...n,children:t})},o2=e=>{const{children:t,className:n,...r}=e;return r["data-node"]==="card-img"?Ye.jsx(p_,{className:nr("w-full aspect-[352/226]",n),...r}):r["data-node"]==="cell-img"?Ye.jsx("img",{className:nr("mb-4",n),...r}):Ye.jsx("img",{className:n,...r})},l2=e=>{const{className:t,children:n,...r}=e,u=`
|
|
477
477
|
my-8
|
|
478
478
|
`;let a=`
|
|
479
479
|
aspect-video
|
package/dist/index.es.js
CHANGED
|
@@ -21505,7 +21505,7 @@ const J_ = () => (e) => {
|
|
|
21505
21505
|
return /* @__PURE__ */ Ye.jsx("article", { className: n, ...r, children: t });
|
|
21506
21506
|
}, o2 = (e) => {
|
|
21507
21507
|
const { children: t, ...n } = e, r = n["data-node"];
|
|
21508
|
-
return r === "card-title" ? /* @__PURE__ */ Ye.jsx(__, { children: t }) : r === "card-description" ? /* @__PURE__ */ Ye.jsx(g_, { children: t }) : r === "card-footer" ? /* @__PURE__ */ Ye.jsx(b_, { children: t }) : n["data-behavior"] === "list" ? /* @__PURE__ */ Ye.jsx("ul", { className: n.className, children: kc.map(t, (u) => /* @__PURE__ */ Ye.jsx("li", { className: "
|
|
21508
|
+
return r === "card-title" ? /* @__PURE__ */ Ye.jsx(__, { children: t }) : r === "card-description" ? /* @__PURE__ */ Ye.jsx(g_, { children: t }) : r === "card-footer" ? /* @__PURE__ */ Ye.jsx(b_, { children: t }) : n["data-behavior"] === "list" ? /* @__PURE__ */ Ye.jsx("ul", { className: n.className, children: kc.map(t, (u) => /* @__PURE__ */ Ye.jsx("li", { className: "", children: u }, Math.random())) }) : /* @__PURE__ */ Ye.jsx("div", { ...n, children: t });
|
|
21509
21509
|
}, l2 = (e) => {
|
|
21510
21510
|
const { children: t, className: n, ...r } = e;
|
|
21511
21511
|
return r["data-node"] === "card-img" ? /* @__PURE__ */ Ye.jsx(
|