@sakura-ui/sakura-ui 0.5.3 → 0.5.4

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.
Files changed (26) hide show
  1. package/package.json +1 -1
  2. package/packages/forms/.turbo/turbo-build.log +2 -2
  3. package/packages/helper/.turbo/turbo-build.log +2 -2
  4. package/packages/markdown/.turbo/turbo-build.log +3 -3
  5. package/packages/markdown/dist/index.cjs.js +1 -1
  6. package/packages/markdown/dist/index.es.js +7 -1
  7. package/packages/markdown/dist/types/components/Markdown.d.ts.map +1 -1
  8. package/packages/markdown/dist/types/decorate.d.ts +2 -5
  9. package/packages/markdown/dist/types/decorate.d.ts.map +1 -1
  10. package/packages/markdown/dist/types/marked/attributes.d.ts +4 -7
  11. package/packages/markdown/dist/types/marked/attributes.d.ts.map +1 -1
  12. package/packages/markdown/dist/types/marked/registry.d.ts.map +1 -1
  13. package/packages/markdown/dist/types/marked/renderer.d.ts +4 -6
  14. package/packages/markdown/dist/types/marked/renderer.d.ts.map +1 -1
  15. package/packages/markdown/dist/types/marked/tokenizer.d.ts.map +1 -1
  16. package/packages/markdown/package.json +1 -1
  17. package/packages/markdown/src/components/Markdown.tsx +12 -6
  18. package/packages/markdown/src/decorate.ts +3 -8
  19. package/packages/markdown/src/marked/attributes.ts +4 -7
  20. package/packages/markdown/src/marked/directives/card.ts +2 -2
  21. package/packages/markdown/src/marked/html.ts +3 -3
  22. package/packages/markdown/src/marked/registry.ts +2 -5
  23. package/packages/markdown/src/marked/renderer.ts +4 -6
  24. package/packages/markdown/src/marked/tokenizer.ts +5 -7
  25. package/packages/markdown/tests/__snapshots__/Markdown.test.tsx.snap +49 -49
  26. package/packages/tailwind-theme-plugin/.turbo/turbo-build.log +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sakura-ui/sakura-ui",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "keywords": [],
5
5
  "author": "glassonion1",
6
6
  "homepage": "https://github.com/glassonion1/sakura-ui",
@@ -1,7 +1,7 @@
1
1
  $ rimraf dist
2
2
  $ run-p build:*
3
- $ vite build
4
3
  $ tsc && tsc-alias
4
+ $ vite build
5
5
  vite v7.3.6 building client environment for production...
6
6
  transforming...
7
7
  ✓ 25 modules transformed.
@@ -9,4 +9,4 @@ rendering chunks...
9
9
  computing gzip size...
10
10
  dist/index.es.js 24.22 kB │ gzip: 6.09 kB
11
11
  dist/index.cjs.js 16.80 kB │ gzip: 5.23 kB
12
- ✓ built in 667ms
12
+ ✓ built in 474ms
@@ -1,7 +1,7 @@
1
1
  $ rimraf dist
2
2
  $ run-p build:*
3
- $ tsc && tsc-alias
4
3
  $ vite build
4
+ $ tsc && tsc-alias
5
5
  vite v7.3.6 building client environment for production...
6
6
  transforming...
7
7
  ✓ 6 modules transformed.
@@ -9,4 +9,4 @@ rendering chunks...
9
9
  computing gzip size...
10
10
  dist/index.es.js 2.76 kB │ gzip: 0.96 kB
11
11
  dist/index.cjs.js 2.58 kB │ gzip: 0.95 kB
12
- ✓ built in 264ms
12
+ ✓ built in 340ms
@@ -7,6 +7,6 @@ transforming...
7
7
  ✓ 31 modules transformed.
8
8
  rendering chunks...
9
9
  computing gzip size...
10
- dist/index.es.js 129.42 kB │ gzip: 39.48 kB
11
- dist/index.cjs.js 98.44 kB │ gzip: 34.86 kB
12
- ✓ built in 825ms
10
+ dist/index.es.js 129.50 kB │ gzip: 39.49 kB
11
+ dist/index.cjs.js 98.47 kB │ gzip: 34.86 kB
12
+ ✓ built in 657ms
@@ -72,4 +72,4 @@ Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error
72
72
  `,o=g=>ci({...g,"data-sakura":n}),c={token:t,attrs:s,nl:l,own:o,root:g=>o({...g,id:s[Or]}),body:()=>r===J?this.parser.parse(u):this.parser.parseInline(u),parser:this.parser,options:e},h=$i(n);return h?h(c):c.body()+l}const Ni=/^(:{2,})([A-Za-z][A-Za-z0-9_-]*)/,Mi=/^:([A-Za-z][A-Za-z0-9_-]*)/,zi=(t,e)=>{const n=new RegExp(`^:{${e},}[ \\t]*$`);let r=0;for(const s of t.split(`
73
73
  `)){if(n.test(s))return{contentEnd:r,rawEnd:Math.min(r+s.length+1,t.length)};r+=s.length+1}return null},Ui=t=>{const e=/\n:{2,}[A-Za-z]/.exec(t);return e?e.index:void 0},ji=t=>{const e=/:[A-Za-z][A-Za-z0-9_-]*\[/.exec(t);return e?e.index:void 0},Hi=t=>{if(!/^grid-cols-\d+$/.test(t.name))return;const e=t.tokens.filter(r=>r.type!=="space"),n=e.filter(r=>r.type==="directive"&&r.name==="card");if(!(n.length===0||n.length!==e.length)){t.listed=!0;for(const r of n)r.listed=!0}},qi=t=>{if(t.name!=="card"||!t.attrs.href)return;const e=t.tokens;if(e.some(r=>r.type==="directive"&&r.name==="card-title")){t.linked=!0;for(const r of e)r.type==="directive"&&(r.name==="card-title"||r.name==="card-footer")&&(r.inherited={behavior:"link",href:t.attrs.href??""})}};function Gi(t){const e=Ni.exec(t);if(!e)return;const[,n,r]=e,s=n.length>=3?J:pe;if(!Pr(r,s))return;const u=vr(t,e[0].length),l=/^[ \t]*(?:\n|$)/.exec(t.slice(u.end));if(!l)return;const o=u.end+l[0].length,c={type:"directive",kind:s,name:r,attrs:u.attrs,tokens:[],raw:t.slice(0,o)};if(s===pe)return u.label&&this.lexer.inline(u.label,c.tokens),c;const h=t.slice(o),g=zi(h,n.length);return c.raw=t.slice(0,o+(g?g.rawEnd:h.length)),c.tokens=this.lexer.blockTokens(g?h.slice(0,g.contentEnd):h),qi(c),Hi(c),c}function Wi(t){const e=Mi.exec(t);if(!e)return;const[,n]=e;if(!Pr(n,Lt))return;const r=vr(t,e[0].length);if(r.label!==null)return{type:"directive",kind:Lt,name:n,attrs:r.attrs,tokens:this.lexer.inlineTokens(r.label),raw:t.slice(0,r.end)}}const Yi=t=>({extensions:[{name:"directive",level:"inline",start:ji,tokenizer:Wi},{name:"directive",level:"block",start:Ui,tokenizer:Gi,renderer(e){return Ii.call(this,e,t)}}]});function ur(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Zi(t){if(Array.isArray(t))return t}function Xi(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,s,u,l,o=[],c=!0,h=!1;try{if(u=(n=n.call(t)).next,e!==0)for(;!(c=(r=u.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(g){h=!0,s=g}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw s}}return o}}function Vi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
74
74
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qi(t,e){return Zi(t)||Xi(t,e)||Ki(t,e)||Vi()}function Ki(t,e){if(t){if(typeof t=="string")return ur(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ur(t,e):void 0}}const $r=Object.entries,or=Object.setPrototypeOf,Ji=Object.isFrozen,eu=Object.getPrototypeOf,tu=Object.getOwnPropertyDescriptor;let N=Object.freeze,z=Object.seal,He=Object.create,Ir=typeof Reflect<"u"&&Reflect,an=Ir.apply,cn=Ir.construct;N||(N=function(e){return e});z||(z=function(e){return e});an||(an=function(e,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),u=2;u<r;u++)s[u-2]=arguments[u];return e.apply(n,s)});cn||(cn=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return new e(...r)});const Se=I(Array.prototype.forEach),nu=I(Array.prototype.lastIndexOf),lr=I(Array.prototype.pop),rt=I(Array.prototype.push),ru=I(Array.prototype.splice),qe=Array.isArray,lt=I(String.prototype.toLowerCase),Jt=I(String.prototype.toString),ar=I(String.prototype.match),st=I(String.prototype.replace),cr=I(String.prototype.indexOf),su=I(String.prototype.trim),iu=I(Number.prototype.toString),uu=I(Boolean.prototype.toString),pr=typeof BigInt>"u"?null:I(BigInt.prototype.toString),fr=typeof Symbol>"u"?null:I(Symbol.prototype.toString),Z=I(Object.prototype.hasOwnProperty),it=I(Object.prototype.toString),j=I(RegExp.prototype.test),we=ou(TypeError);function I(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return an(t,e,r)}}function ou(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return cn(t,n)}}function T(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lt;if(or&&or(t,null),!qe(e))return t;let r=e.length;for(;r--;){let s=e[r];if(typeof s=="string"){const u=n(s);u!==s&&(Ji(e)||(e[r]=u),s=u)}t[s]=!0}return t}function lu(t){for(let e=0;e<t.length;e++)Z(t,e)||(t[e]=null);return t}function V(t){const e=He(null);for(const r of $r(t)){var n=Qi(r,2);const s=n[0],u=n[1];Z(t,s)&&(qe(u)?e[s]=lu(u):u&&typeof u=="object"&&u.constructor===Object?e[s]=V(u):e[s]=u)}return e}function au(t){switch(typeof t){case"string":return t;case"number":return iu(t);case"boolean":return uu(t);case"bigint":return pr?pr(t):"0";case"symbol":return fr?fr(t):"Symbol()";case"undefined":return it(t);case"function":case"object":{if(t===null)return it(t);const e=t,n=re(e,"toString");if(typeof n=="function"){const r=n(e);return typeof r=="string"?r:it(r)}return it(t)}default:return it(t)}}function re(t,e){for(;t!==null;){const r=tu(t,e);if(r){if(r.get)return I(r.get);if(typeof r.value=="function")return I(r.value)}t=eu(t)}function n(){return null}return n}function cu(t){try{return j(t,""),!0}catch{return!1}}const hr=N(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),en=N(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),tn=N(["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"]),pu=N(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),nn=N(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),fu=N(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dr=N(["#text"]),Dr=N(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),rn=N(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),gr=N(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),wt=N(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),hu=z(/{{[\w\W]*|^[\w\W]*}}/g),du=z(/<%[\w\W]*|^[\w\W]*%>/g),Du=z(/\${[\w\W]*/g),gu=z(/^data-[\-\w.\u00B7-\uFFFF]+$/),mu=z(/^aria-[\-\w]+$/),mr=z(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Fu=z(/^(?:\w+script|data):/i),Au=z(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Eu=z(/^html$/i),bu=z(/^[a-z][.\w]*(-[.\w]+)+$/i),Fr=z(/<[/\w!]/g),Ar=z(/<[/\w]/g),ku=z(/<\/no(script|embed|frames)/i),yu=z(/\/>/i),X={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Nr=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Cu=N(T({},Nr)),xu=(function(){const t={};return Se(Nr,e=>{t[e]=z(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),N(t)})(),Tu=function(){return typeof window>"u"?null:window},_u=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(r=n.getAttribute(s));const u="dompurify"+(r?"#"+r:"");try{return e.createPolicy(u,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+u+" could not be created."),null}},Er=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ee=function(e,n,r,s){return Z(e,n)&&qe(e[n])?T(s.base?V(s.base):{},e[n],s.transform):r},sn=function(e,n,r){const s=Z(e,n)?e[n]:void 0;return s&&typeof s=="object"?V(s):r()};function Mr(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tu();const e=d=>Mr(d);if(e.version="3.4.14",e.removed=[],!t||!t.document||t.document.nodeType!==X.document||!t.Element)return e.isSupported=!1,e;let n=t.document;const r=n,s=r.currentScript;t.DocumentFragment;const u=t.HTMLTemplateElement,l=t.Node,o=t.Element,c=t.NodeFilter,h=t.NamedNodeMap;h===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const g=t.DOMParser,m=t.trustedTypes,k=o.prototype,v=re(k,"cloneNode"),x=re(k,"remove"),G=re(k,"nextSibling"),U=re(k,"childNodes"),te=re(k,"parentNode"),be=re(k,"shadowRoot"),ke=re(k,"attributes"),ne=l&&l.prototype?re(l.prototype,"nodeType"):null,Q=l&&l.prototype?re(l.prototype,"nodeName"):null,K=l&&l.prototype?re(l.prototype,"ownerDocument"):null,ye=function(i){return ne?ne(i):i.nodeType},We=function(i){return Q?Q(i):i.nodeName};if(typeof u=="function"){const d=n.createElement("template");d.content&&d.content.ownerDocument&&(n=d.content.ownerDocument)}let M,fe="",Ye,ve=!1,de=0;const pt=function(){if(de>0)throw we('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},ue=function(i){pt(),de++;try{return M.createHTML(i)}finally{de--}},ft=function(i){pt(),de++;try{return M.createScriptURL(i)}finally{de--}},ht=function(){return ve||(Ye=_u(m,s),ve=!0),Ye},Ce=n,Le=Ce.implementation,Ze=Ce.createNodeIterator,f=Ce.createDocumentFragment,y=Ce.getElementsByTagName,S=r.importNode;let b=Er();e.isSupported=typeof $r=="function"&&typeof te=="function"&&Le&&Le.createHTMLDocument!==void 0;const Pe=hu,Xe=du,P=Du,De=gu,Ve=mu,$t=Fu,En=Au,Ur=bu;let bn=mr,R=null;const It=T({},[...hr,...en,...tn,...nn,...dr]);let B=null;const Nt=T({},[...Dr,...rn,...gr,...wt]);let oe=Object.seal(He(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Qe=null,kn=null;const ge=Object.seal(He(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let yn=!0,Mt=!0,Cn=!1,xn=!0,me=!1,xe=!0,Te=!1,zt=!1,dt=null,Dt=null,Ut=!1,$e=!1,gt=!1,mt=!1,Tn=!0,_n=!1;const wn="user-content-";let jt=!0,Ht=!1,Ie={},Ne=null;const Sn=T({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Rn=null;const Bn=T({},["audio","video","img","source","image","track"]);let On=null;const vn=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ft="http://www.w3.org/1998/Math/MathML",At="http://www.w3.org/2000/svg",le="http://www.w3.org/1999/xhtml";let Me=le,qt=!1,Gt=null;const jr=T({},[Ft,At,le],Jt),Ln=N(["mi","mo","mn","ms","mtext"]);let Wt=T({},Ln);const Pn=N(["annotation-xml"]);let Yt=T({},Pn);const Hr=T({},["title","style","font","a","script"]);let Ke=null;const qr=["application/xhtml+xml","text/html"],Gr="text/html";let $=null,ze=null;const Wr=n.createElement("form"),$n=function(i){return i instanceof RegExp||i instanceof Function},Zt=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ze&&ze===i)return;(!i||typeof i!="object")&&(i={}),i=V(i),Ke=qr.indexOf(i.PARSER_MEDIA_TYPE)===-1?Gr:i.PARSER_MEDIA_TYPE,$=Ke==="application/xhtml+xml"?Jt:lt,R=Ee(i,"ALLOWED_TAGS",It,{transform:$}),B=Ee(i,"ALLOWED_ATTR",Nt,{transform:$}),Gt=Ee(i,"ALLOWED_NAMESPACES",jr,{transform:Jt}),On=Ee(i,"ADD_URI_SAFE_ATTR",vn,{transform:$,base:vn}),Rn=Ee(i,"ADD_DATA_URI_TAGS",Bn,{transform:$,base:Bn}),Ne=Ee(i,"FORBID_CONTENTS",Sn,{transform:$}),Qe=Ee(i,"FORBID_TAGS",V({}),{transform:$}),kn=Ee(i,"FORBID_ATTR",V({}),{transform:$}),Ie=Z(i,"USE_PROFILES")?i.USE_PROFILES&&typeof i.USE_PROFILES=="object"?V(i.USE_PROFILES):i.USE_PROFILES:!1,yn=i.ALLOW_ARIA_ATTR!==!1,Mt=i.ALLOW_DATA_ATTR!==!1,Cn=i.ALLOW_UNKNOWN_PROTOCOLS||!1,xn=i.ALLOW_SELF_CLOSE_IN_ATTR!==!1,me=i.SAFE_FOR_TEMPLATES||!1,xe=i.SAFE_FOR_XML!==!1,Te=i.WHOLE_DOCUMENT||!1,$e=i.RETURN_DOM||!1,gt=i.RETURN_DOM_FRAGMENT||!1,mt=i.RETURN_TRUSTED_TYPE||!1,Ut=i.FORCE_BODY||!1,Tn=i.SANITIZE_DOM!==!1,_n=i.SANITIZE_NAMED_PROPS||!1,jt=i.KEEP_CONTENT!==!1,Ht=i.IN_PLACE||!1,bn=cu(i.ALLOWED_URI_REGEXP)?i.ALLOWED_URI_REGEXP:mr,Me=typeof i.NAMESPACE=="string"?i.NAMESPACE:le,Wt=sn(i,"MATHML_TEXT_INTEGRATION_POINTS",()=>T({},Ln)),Yt=sn(i,"HTML_INTEGRATION_POINTS",()=>T({},Pn));const a=sn(i,"CUSTOM_ELEMENT_HANDLING",()=>He(null));if(oe=He(null),Z(a,"tagNameCheck")&&$n(a.tagNameCheck)&&(oe.tagNameCheck=a.tagNameCheck),Z(a,"attributeNameCheck")&&$n(a.attributeNameCheck)&&(oe.attributeNameCheck=a.attributeNameCheck),Z(a,"allowCustomizedBuiltInElements")&&typeof a.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=a.allowCustomizedBuiltInElements),z(oe),me&&(Mt=!1),gt&&($e=!0),Ie&&(R=T({},dr),B=He(null),Ie.html===!0&&(T(R,hr),T(B,Dr)),Ie.svg===!0&&(T(R,en),T(B,rn),T(B,wt)),Ie.svgFilters===!0&&(T(R,tn),T(B,rn),T(B,wt)),Ie.mathMl===!0&&(T(R,nn),T(B,gr),T(B,wt))),ge.tagCheck=null,ge.attributeCheck=null,Z(i,"ADD_TAGS")&&(typeof i.ADD_TAGS=="function"?ge.tagCheck=i.ADD_TAGS:qe(i.ADD_TAGS)&&(R===It&&(R=V(R)),T(R,i.ADD_TAGS,$))),Z(i,"ADD_ATTR")&&(typeof i.ADD_ATTR=="function"?ge.attributeCheck=i.ADD_ATTR:qe(i.ADD_ATTR)&&(B===Nt&&(B=V(B)),T(B,i.ADD_ATTR,$))),Z(i,"ADD_FORBID_CONTENTS")&&qe(i.ADD_FORBID_CONTENTS)&&(Ne===Sn&&(Ne=V(Ne)),T(Ne,i.ADD_FORBID_CONTENTS,$)),jt&&(R["#text"]=!0),Te&&T(R,["html","head","body"]),R.table&&(T(R,["tbody"]),delete Qe.tbody),i.TRUSTED_TYPES_POLICY){if(typeof i.TRUSTED_TYPES_POLICY.createHTML!="function")throw we('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof i.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw we('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const p=M;M=i.TRUSTED_TYPES_POLICY;try{fe=ue("")}catch(D){throw M=p,D}}else i.TRUSTED_TYPES_POLICY===null?(M=void 0,fe=""):(M===void 0&&(M=ht()),M&&typeof fe=="string"&&(fe=ue("")));N&&N(i),ze=i},In=T({},[...en,...tn,...pu]),Nn=T({},[...nn,...fu]),Yr=function(i,a,p){return a.namespaceURI===le?i==="svg":a.namespaceURI===Ft?i==="svg"&&(p==="annotation-xml"||Wt[p]):!!In[i]},Zr=function(i,a,p){return a.namespaceURI===le?i==="math":a.namespaceURI===At?i==="math"&&Yt[p]:!!Nn[i]},Xr=function(i,a,p){return a.namespaceURI===At&&!Yt[p]||a.namespaceURI===Ft&&!Wt[p]?!1:!Nn[i]&&(Hr[i]||!In[i])},Vr=function(i){let a=te(i);(!a||!a.tagName)&&(a={namespaceURI:Me,tagName:"template"});const p=lt(i.tagName),D=lt(a.tagName);return Gt[i.namespaceURI]?i.namespaceURI===At?Yr(p,a,D):i.namespaceURI===Ft?Zr(p,a,D):i.namespaceURI===le?Xr(p,a,D):!!(Ke==="application/xhtml+xml"&&Gt[i.namespaceURI]):!1},Fe=function(i){rt(e.removed,{element:i});try{te(i).removeChild(i)}catch{if(x(i),!te(i))throw we("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Mn=function(i,a,p){try{i.removeAttributeNode(a)}catch{try{i.removeAttribute(p)}catch{}}},Et=function(i){bt(i);const a=U(i);if(a){const D=[];Se(a,F=>{rt(D,F)}),Se(D,F=>{try{x(F)}catch{}})}const p=ke(i);if(p)for(let D=p.length-1;D>=0;--D){const F=p[D],E=F&&F.name;typeof E=="string"&&Mn(i,F,E)}},_e=function(i,a,p){if(!p)try{p=a.getAttributeNode(i)}catch{p=null}rt(e.removed,{attribute:p||null,from:a});try{p?a.removeAttributeNode(p):a.removeAttribute(i)}catch{try{a.removeAttribute(i)}catch{}}if(i==="is")if($e||gt)try{Fe(a)}catch{}else try{a.setAttribute(i,"")}catch{}},Qr=function(i){const a=ke(i);if(a)for(let p=a.length-1;p>=0;--p){const D=a[p],F=D&&D.name;typeof F!="string"||B[$(F)]||Mn(i,D,F)}},bt=function(i){const a=[i];for(;a.length>0;){const p=a.pop();ye(p)===X.element&&Qr(p);const F=U(p);if(F)for(let E=F.length-1;E>=0;--E)a.push(F[E])}},zn=function(i,a){return xe?i==="patchsrc"?!0:i==="for"&&a!=="label"&&a!=="output":!1},Kr=function(i){if(!xe)return;const a=[i];for(;a.length>0;){const p=a.pop(),D=ye(p);if(D===X.processingInstruction||D===X.comment&&j(Ar,p.data)){try{x(p)}catch{}continue}if(D===X.element){const E=p,w=$(We(p));try{E.hasAttribute&&E.hasAttribute("patchsrc")&&E.removeAttribute("patchsrc"),E.hasAttribute&&E.hasAttribute("for")&&zn("for",w)&&E.removeAttribute("for")}catch{}}const F=U(p);if(F)for(let E=F.length-1;E>=0;--E)a.push(F[E])}},Un=function(i){let a=null,p=null;if(Ut)i="<remove></remove>"+i;else{const E=ar(i,/^[\r\n\t ]+/);p=E&&E[0]}Ke==="application/xhtml+xml"&&Me===le&&(i='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+i+"</body></html>");const D=M?ue(i):i;if(Me===le)try{a=new g().parseFromString(D,Ke)}catch{}if(!a||!a.documentElement){a=Le.createDocument(Me,"template",null);try{a.documentElement.innerHTML=qt?fe:D}catch{}}const F=a.body||a.documentElement;return i&&p&&F.insertBefore(n.createTextNode(p),F.childNodes[0]||null),Me===le?y.call(a,Te?"html":"body")[0]:Te?a.documentElement:F},jn=function(i){const a=K?K(i):i.ownerDocument;return Ze.call(a||i,i,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},kt=function(i){return i=st(i,Pe," "),i=st(i,Xe," "),i=st(i,P," "),i},Xt=function(i){var a;i.normalize();const p=K?K(i):i.ownerDocument,D=Ze.call(p||i,i,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let F=D.nextNode();for(;F;)F.data=kt(F.data),F=D.nextNode();const E=(a=i.querySelectorAll)===null||a===void 0?void 0:a.call(i,"template");E&&Se(E,w=>{Ue(w.content)&&Xt(w.content)})},yt=function(i){const a=Q?Q(i):null;return typeof a!="string"||$(a)!=="form"?!1:typeof i.nodeName!="string"||typeof i.textContent!="string"||typeof i.removeChild!="function"||i.attributes!==ke(i)||typeof i.removeAttribute!="function"||typeof i.setAttribute!="function"||typeof i.namespaceURI!="string"||typeof i.insertBefore!="function"||typeof i.hasChildNodes!="function"||i.nodeType!==ne(i)||i.childNodes!==U(i)},Ue=function(i){if(!ne||typeof i!="object"||i===null)return!1;try{return ne(i)===X.documentFragment}catch{return!1}},Je=function(i){if(!ne||typeof i!="object"||i===null)return!1;try{return typeof ne(i)=="number"}catch{return!1}};function ae(d,i,a){d.length!==0&&Se(d,p=>{p.call(e,i,a,ze)})}const Jr=function(i,a){return!!(xe&&i.hasChildNodes()&&!Je(i.firstElementChild)&&j(Fr,i.textContent)&&j(Fr,i.innerHTML)||xe&&i.namespaceURI===le&&Cu[a]&&(Je(i.firstElementChild)||typeof i.textContent=="string"&&j(xu[a],i.textContent))||i.nodeType===X.processingInstruction||xe&&i.nodeType===X.comment&&j(Ar,i.data))},Ct=function(i,a){if(i instanceof RegExp)return j(i,a);if(i instanceof Function){for(var p=arguments.length,D=new Array(p>2?p-2:0),F=2;F<p;F++)D[F-2]=arguments[F];return!!i(a,...D)}return!1},es=function(i,a,p){if(!Qe[a]&&Yn(a)&&Ct(oe.tagNameCheck,a))return!1;if(jt&&!Ne[a]){const D=te(i),F=U(i);if(F&&D){const E=F.length;for(let w=E-1;w>=0;--w){const O=i===p?v(F[w],!0):F[w];D.insertBefore(O,G(i))}}}return Fe(i),!0},Hn=function(i,a,p,D){return i.length===0?a:a===p||a===D?V(a):a},qn=function(i,a){return i===a||te(i)!==null?!1:(Ht&&bt(i),!0)},Gn=function(i,a){if(ae(b.beforeSanitizeElements,i,null),qn(i,a))return!0;if(yt(i))return Fe(i),!0;const p=$(We(i));if(R=Hn(b.uponSanitizeElement,R,It,dt),ae(b.uponSanitizeElement,i,{tagName:p,allowedTags:R}),qn(i,a))return!0;if(Jr(i,p))return Fe(i),!0;if(Qe[p]||!(ge.tagCheck instanceof Function&&ge.tagCheck(p))&&!R[p]){const F=es(i,p,a);return F===!1&&ae(b.afterSanitizeElements,i,null),F}if(ye(i)===X.element&&!Vr(i)||(p==="noscript"||p==="noembed"||p==="noframes")&&j(ku,i.innerHTML))return Fe(i),!0;if(me&&i.nodeType===X.text){const F=kt(i.textContent);i.textContent!==F&&(rt(e.removed,{element:i.cloneNode()}),i.textContent=F)}return ae(b.afterSanitizeElements,i,null),!1},Wn=function(i,a,p){if(kn[a]||zn(a,i)||Tn&&(a==="id"||a==="name")&&(p in n||p in Wr))return!1;const D=B[a]||ge.attributeCheck instanceof Function&&ge.attributeCheck(a,i);return Mt&&j(De,a)||yn&&j(Ve,a)?!0:D?On[a]||j(bn,st(p,En,""))||(a==="src"||a==="xlink:href"||a==="href")&&i!=="script"&&cr(p,"data:")===0&&Rn[i]||Cn&&!j($t,st(p,En,""))?!0:!p:Yn(i)&&Ct(oe.tagNameCheck,i)&&Ct(oe.attributeNameCheck,a,i)||a==="is"&&oe.allowCustomizedBuiltInElements&&Ct(oe.tagNameCheck,p)},ts=T({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Yn=function(i){return!ts[lt(i)]&&j(Ur,i)},ns=function(i,a,p,D){if(M&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!p)switch(m.getAttributeType(i,a)){case"TrustedHTML":return ue(D);case"TrustedScriptURL":return ft(D)}return D},rs=function(i,a,p,D){try{p?i.setAttributeNS(p,a,D):i.setAttribute(a,D),yt(i)?Fe(i):lr(e.removed)}catch{_e(a,i)}},Zn=function(i){ae(b.beforeSanitizeAttributes,i,null);const a=i.attributes;if(!a||yt(i))return;B=Hn(b.uponSanitizeAttribute,B,Nt,Dt);const p={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B,forceKeepAttr:void 0};let D=a.length;const F=$(i.nodeName);for(;D--;){const E=a[D],w=E.name,O=E.namespaceURI,W=E.value,Y=$(w),Qt=W;let q=w==="value"?Qt:su(Qt);if(p.attrName=Y,p.attrValue=q,p.keepAttr=!0,p.forceKeepAttr=void 0,ae(b.uponSanitizeAttribute,i,p),q=p.attrValue,_n&&(Y==="id"||Y==="name")&&cr(q,wn)!==0&&(_e(w,i,E),q=wn+q),xe&&j(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,q)){_e(w,i,E);continue}if(Y==="attributename"&&ar(q,"href")){_e(w,i,E);continue}if(!p.forceKeepAttr){if(!p.keepAttr){_e(w,i,E);continue}if(!xn&&j(yu,q)){_e(w,i,E);continue}if(me&&(q=kt(q)),!Wn(F,Y,q)){_e(w,i,E);continue}q=ns(F,Y,O,q),q!==Qt&&rs(i,w,O,q)}}ae(b.afterSanitizeAttributes,i,null)},xt=function(i){let a=null;const p=jn(i);for(ae(b.beforeSanitizeShadowDOM,i,null);a=p.nextNode();)if(ae(b.uponSanitizeShadowNode,a,null),Gn(a,i),Zn(a),Ue(a.content)&&xt(a.content),ye(a)===X.element){const D=be(a);Ue(D)&&(Vt(D),xt(D))}ae(b.afterSanitizeShadowDOM,i,null)},Vt=function(i){const a=[{node:i,shadow:null}];for(;a.length>0;){const p=a.pop();if(p.shadow){xt(p.shadow);continue}const D=p.node,E=ye(D)===X.element,w=U(D);if(w)for(let O=w.length-1;O>=0;--O)a.push({node:w[O],shadow:null});if(E){const O=Q?Q(D):null;if(typeof O=="string"&&$(O)==="template"){const W=D.content;Ue(W)&&a.push({node:W,shadow:null})}}if(E){const O=be(D);Ue(O)&&a.push({node:null,shadow:O},{node:O,shadow:null})}}};return e.sanitize=function(d){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=null,p=null,D=null,F=null;if(qt=!d,qt&&(d="<!-->"),typeof d!="string"&&!Je(d)&&(d=au(d),typeof d!="string"))throw we("dirty is not a string, aborting");if(!e.isSupported)return d;zt?(R=dt,B=Dt):Zt(i),(b.uponSanitizeElement.length>0||b.uponSanitizeAttribute.length>0)&&(R=V(R)),b.uponSanitizeAttribute.length>0&&(B=V(B)),e.removed=[];const E=Ht&&typeof d!="string"&&Je(d);if(E){Kr(d);const W=We(d);if(typeof W=="string"){const Y=$(W);if(!R[Y]||Qe[Y])throw Et(d),we("root node is forbidden and cannot be sanitized in-place")}if(yt(d))throw Et(d),we("root node is clobbered and cannot be sanitized in-place");try{Vt(d)}catch(Y){throw Et(d),Y}}else if(Je(d))a=Un("<!---->"),p=a.ownerDocument.importNode(d,!0),p.nodeType===X.element&&p.nodeName==="BODY"||p.nodeName==="HTML"?a=p:a.appendChild(p),Vt(p);else{if(!$e&&!me&&!Te&&d.indexOf("<")===-1)return M&&mt?ue(d):d;if(a=Un(d),!a)return $e?null:mt?fe:""}a&&Ut&&Fe(a.firstChild);const w=E?d:a;try{const W=jn(w);for(;D=W.nextNode();)Gn(D,w),Zn(D),Ue(D.content)&&xt(D.content)}catch(W){throw E&&(Et(d),Se(e.removed,Y=>{Y.element&&bt(Y.element)})),W}if(E)return Se(e.removed,W=>{W.element&&bt(W.element)}),me&&Xt(d),d;if($e){if(me&&Xt(a),gt)for(F=f.call(a.ownerDocument);a.firstChild;)F.appendChild(a.firstChild);else F=a;return(B.shadowroot||B.shadowrootmode)&&(F=S.call(r,F,!0)),F}let O=Te?a.outerHTML:a.innerHTML;return Te&&R["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&j(Eu,a.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+a.ownerDocument.doctype.name+`>
75
- `+O),me&&(O=kt(O)),M&&mt?ue(O):O},e.setConfig=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zt(d),zt=!0,dt=R,Dt=B},e.clearConfig=function(){ze=null,zt=!1,dt=null,Dt=null,M=Ye,fe=""},e.isValidAttribute=function(d,i,a){ze||Zt({});const p=$(d),D=$(i);return Wn(p,D,a)},e.addHook=function(d,i){typeof i=="function"&&Z(b,d)&&rt(b[d],i)},e.removeHook=function(d,i){if(Z(b,d)){if(i!==void 0){const a=nu(b[d],i);return a===-1?void 0:ru(b[d],a,1)[0]}return lr(b[d])}},e.removeHooks=function(d){Z(b,d)&&(b[d]=[])},e.removeAllHooks=function(){b=Er()},e}var wu=Mr();const Su=["caption","col","colgroup","small","u","iframe"],Ru=["target","role","colspan","rowspan","open","allow","allowfullscreen","frameborder","referrerpolicy","loading"],Bu=new Set(["www.youtube-nocookie.com"]),Ou=t=>{if(!t)return!1;try{return Bu.has(new URL(t).host)}catch{return!1}},vu=new Set(["background-color","border","border-bottom","border-collapse","border-left","border-radius","border-right","border-top","color","color-scheme","font-size","font-weight","height","line-height","list-style","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","max-width","min-width","padding","padding-bottom","padding-left","padding-right","padding-top","text-align","text-indent","text-orientation","vertical-align","white-space","width","writing-mode"]),Lu={position:new Set(["relative","static"])},Pu=t=>t.split(";").map(e=>e.trim()).filter(Boolean).filter(e=>{const[n,...r]=e.split(":"),s=n.trim().toLowerCase(),u=r.join(":").trim().toLowerCase();return/url\(|expression\(|@import|behavior:/i.test(u)?!1:vu.has(s)?!0:!!Lu[s]?.has(u)}).map(e=>`${e};`).join(" "),$u=t=>Array.from(t).filter(e=>(e.codePointAt(0)??0)>32).join("").toLowerCase();let ut=null;const Iu=()=>ut||(ut=wu(window),ut.addHook("afterSanitizeAttributes",t=>{const e=t;if(!e.getAttribute)return;if(e.tagName==="IFRAME"&&!Ou(e.getAttribute("src"))){e.remove();return}for(const r of["src","href"]){const s=e.getAttribute(r);s&&$u(s).startsWith("data:")&&e.removeAttribute(r)}const n=e.getAttribute("style");if(n){const r=Pu(n);r?e.setAttribute("style",r):e.removeAttribute("style")}e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener noreferrer")}),ut),Nu=t=>Iu().sanitize(t,{ADD_TAGS:Su,ADD_ATTR:Ru,RETURN_DOM_FRAGMENT:!0,ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i}),Mu=t=>Math.min(6,Math.max(1,t)),zr=(t,e={})=>{const{shiftHeading:n=0,tocMaxDepth:r=2}=e,s=new Br({gfm:!0,breaks:!0},Yi({cardHeadingLevel:`h${Mu(3+n)}`})),u=Nu(s.parse(t,{async:!1})),{headings:l}=mi(u,document,{shiftHeading:n,tocMaxDepth:r}),o=document.createElement("div");return o.appendChild(u),{html:o.innerHTML,headings:l}},zu={html:"",headings:[]},An=({items:t})=>ee.jsx(ee.Fragment,{children:t.map(e=>ee.jsxs("li",{children:[ee.jsx(A.Link,{href:`#${e.id}`,children:e.value}),e.children?ee.jsx(A.Ul,{children:ee.jsx(An,{items:e.children})}):null]},e.id))}),Uu=({children:t,showToc:e,tocTitle:n="目次",shiftHeading:r=0,tocMaxDepth:s=2})=>{const[{html:u,headings:l},o]=St.useState(zu);return St.useEffect(()=>{o(zr(t,{shiftHeading:r,tocMaxDepth:s}))},[t,r,s]),St.useEffect(()=>{if(!u)return;const c=decodeURI(window.location.hash.slice(1));c&&document.getElementById(c)?.scrollIntoView()},[u]),ee.jsxs("div",{className:"py-8 flex flex-col gap-8",children:[e&&l.length>0&&ee.jsxs("nav",{className:"rounded-3xl p-10 bg-yellow-50",children:[ee.jsx("h2",{className:"mb-4 font-bold text-h-xs-m sm:text-h-xs",children:n}),ee.jsx(A.Ul,{children:ee.jsx(An,{items:l})})]}),ee.jsx("div",{dangerouslySetInnerHTML:{__html:u}})]})};exports.Markdown=Uu;exports.TableOfContents=An;exports.render=zr;
75
+ `+O),me&&(O=kt(O)),M&&mt?ue(O):O},e.setConfig=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zt(d),zt=!0,dt=R,Dt=B},e.clearConfig=function(){ze=null,zt=!1,dt=null,Dt=null,M=Ye,fe=""},e.isValidAttribute=function(d,i,a){ze||Zt({});const p=$(d),D=$(i);return Wn(p,D,a)},e.addHook=function(d,i){typeof i=="function"&&Z(b,d)&&rt(b[d],i)},e.removeHook=function(d,i){if(Z(b,d)){if(i!==void 0){const a=nu(b[d],i);return a===-1?void 0:ru(b[d],a,1)[0]}return lr(b[d])}},e.removeHooks=function(d){Z(b,d)&&(b[d]=[])},e.removeAllHooks=function(){b=Er()},e}var wu=Mr();const Su=["caption","col","colgroup","small","u","iframe"],Ru=["target","role","colspan","rowspan","open","allow","allowfullscreen","frameborder","referrerpolicy","loading"],Bu=new Set(["www.youtube-nocookie.com"]),Ou=t=>{if(!t)return!1;try{return Bu.has(new URL(t).host)}catch{return!1}},vu=new Set(["background-color","border","border-bottom","border-collapse","border-left","border-radius","border-right","border-top","color","color-scheme","font-size","font-weight","height","line-height","list-style","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","max-width","min-width","padding","padding-bottom","padding-left","padding-right","padding-top","text-align","text-indent","text-orientation","vertical-align","white-space","width","writing-mode"]),Lu={position:new Set(["relative","static"])},Pu=t=>t.split(";").map(e=>e.trim()).filter(Boolean).filter(e=>{const[n,...r]=e.split(":"),s=n.trim().toLowerCase(),u=r.join(":").trim().toLowerCase();return/url\(|expression\(|@import|behavior:/i.test(u)?!1:vu.has(s)?!0:!!Lu[s]?.has(u)}).map(e=>`${e};`).join(" "),$u=t=>Array.from(t).filter(e=>(e.codePointAt(0)??0)>32).join("").toLowerCase();let ut=null;const Iu=()=>ut||(ut=wu(window),ut.addHook("afterSanitizeAttributes",t=>{const e=t;if(!e.getAttribute)return;if(e.tagName==="IFRAME"&&!Ou(e.getAttribute("src"))){e.remove();return}for(const r of["src","href"]){const s=e.getAttribute(r);s&&$u(s).startsWith("data:")&&e.removeAttribute(r)}const n=e.getAttribute("style");if(n){const r=Pu(n);r?e.setAttribute("style",r):e.removeAttribute("style")}e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener noreferrer")}),ut),Nu=t=>Iu().sanitize(t,{ADD_TAGS:Su,ADD_ATTR:Ru,RETURN_DOM_FRAGMENT:!0,ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i}),Mu=t=>Math.min(6,Math.max(1,t)),zr=(t,e={})=>{const{shiftHeading:n=0,tocMaxDepth:r=2}=e,s=new Br({gfm:!0,breaks:!0},Yi({cardHeadingLevel:`h${Mu(3+n)}`})),u=Nu(s.parse(t,{async:!1})),{headings:l}=mi(u,document,{shiftHeading:n,tocMaxDepth:r}),o=document.createElement("div");return o.appendChild(u),{html:o.innerHTML,headings:l}},zu={html:"",headings:[]},An=({items:t})=>ee.jsx(ee.Fragment,{children:t.map(e=>ee.jsxs("li",{children:[ee.jsx(A.Link,{href:`#${e.id}`,children:e.value}),e.children?ee.jsx(A.Ul,{children:ee.jsx(An,{items:e.children})}):null]},e.id))}),Uu=({children:t,showToc:e,tocTitle:n="目次",shiftHeading:r=0,tocMaxDepth:s=2})=>{const[{html:u,headings:l},o]=St.useState(zu);return St.useEffect(()=>{o(zr(t,{shiftHeading:r,tocMaxDepth:s}))},[t,r,s]),St.useEffect(()=>{if(!u)return;const c=decodeURI(window.location.hash.slice(1));c&&document.getElementById(c)?.scrollIntoView()},[u]),ee.jsxs("div",{className:"py-8 flex flex-col gap-8",children:[e&&l.length>0&&ee.jsxs("nav",{className:"rounded-3xl p-10 bg-yellow-50",children:[ee.jsx("h2",{className:"mb-4 font-bold text-h-xs-m sm:text-h-xs",children:n}),ee.jsx(A.Ul,{children:ee.jsx(An,{items:l})})]}),ee.jsx("div",{className:"flex flex-col gap-8",dangerouslySetInnerHTML:{__html:u}})]})};exports.Markdown=Uu;exports.TableOfContents=An;exports.render=zr;
@@ -2832,7 +2832,13 @@ const Nu = () => ut || (ut = Su(window), ut.addHook("afterSanitizeAttributes", (
2832
2832
  /* @__PURE__ */ ee.jsx("h2", { className: "mb-4 font-bold text-h-xs-m sm:text-h-xs", children: n }),
2833
2833
  /* @__PURE__ */ ee.jsx(Er, { children: /* @__PURE__ */ ee.jsx(zr, { items: l }) })
2834
2834
  ] }),
2835
- /* @__PURE__ */ ee.jsx("div", { dangerouslySetInnerHTML: { __html: u } })
2835
+ /* @__PURE__ */ ee.jsx(
2836
+ "div",
2837
+ {
2838
+ className: "flex flex-col gap-8",
2839
+ dangerouslySetInnerHTML: { __html: u }
2840
+ }
2841
+ )
2836
2842
  ] });
2837
2843
  };
2838
2844
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,WAAW,EAA6B,MAAM,WAAW,CAAA;AASvE,UAAU,QAAQ;IAChB,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,eAAO,MAAM,eAAe,GAAI,WAAW,QAAQ,sBAelD,CAAA;AAED,yBAAiB,QAAQ,CAAC;IACxB,UAAiB,KAAK;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,oDAAoD;QACpD,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,0DAA0D;QAC1D,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,QAAQ,EAAE,MAAM,CAAA;KACjB;CACF;AAED,eAAO,MAAM,QAAQ,GAAI,4DAMtB,QAAQ,CAAC,KAAK,sBA4ChB,CAAA"}
1
+ {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,WAAW,EAA6B,MAAM,WAAW,CAAA;AASvE,UAAU,QAAQ;IAChB,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,eAAO,MAAM,eAAe,GAAI,WAAW,QAAQ,sBAelD,CAAA;AAED,yBAAiB,QAAQ,CAAC;IACxB,UAAiB,KAAK;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,oDAAoD;QACpD,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,0DAA0D;QAC1D,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,QAAQ,EAAE,MAAM,CAAA;KACjB;CACF;AAED,eAAO,MAAM,QAAQ,GAAI,4DAMtB,QAAQ,CAAC,KAAK,sBAkDhB,CAAA"}
@@ -1,11 +1,8 @@
1
1
  /**
2
2
  * Applies the look of the design system to the finished document.
3
3
  *
4
- * This runs over the sanitised DOM rather than inside the markdown renderer so
5
- * that a table written as raw HTML 56 of the guide's documents do is styled
6
- * the same as one written with pipes. The pipeline this replaces had the same
7
- * property, because rehype-raw turned the raw HTML into real nodes before the
8
- * tag to component mapping ran.
4
+ * Runs over the sanitised DOM rather than inside the markdown renderer, so that
5
+ * a table written as raw HTML is styled the same as one written with pipes.
9
6
  */
10
7
  export type HeadingItem = {
11
8
  id?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"decorate.d.ts","sourceRoot":"","sources":["../../src/decorate.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;CACzB,CAAA;AAsDD,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,WAAW,EAAE,CAAA;CACxB,CAAA;AAID,eAAO,MAAM,QAAQ,GACnB,MAAM,gBAAgB,GAAG,OAAO,EAChC,UAAU,QAAQ,EAClB,SAAS,eAAe,KACvB,cA2EF,CAAA"}
1
+ {"version":3,"file":"decorate.d.ts","sourceRoot":"","sources":["../../src/decorate.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;CACzB,CAAA;AAsDD,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,WAAW,EAAE,CAAA;CACxB,CAAA;AAID,eAAO,MAAM,QAAQ,GACnB,MAAM,gBAAgB,GAAG,OAAO,EAChC,UAAU,QAAQ,EAClB,SAAS,eAAe,KACvB,cAyEF,CAAA"}
@@ -2,14 +2,11 @@ export type Attrs = Record<string, string>;
2
2
  /**
3
3
  * Where `{#name}` is kept, apart from anything written as `key=value`.
4
4
  *
5
- * A sigil says something about the element itself and means the same on every
6
- * directive; an attribute is the directive's own, and each reads the ones it
7
- * knows. Keeping them in one place would let a directive that wanted an
8
- * attribute called `id` take the anchor's place, which is how the video on a
9
- * youtube embed came to be called `id` and stayed that way.
10
- *
5
+ * A sigil describes the element and means the same on every directive; an
6
+ * attribute belongs to whichever directive reads it. Held apart so that a
7
+ * directive wanting an attribute called `id` cannot take the anchor's place.
11
8
  * A key beginning with `#` cannot be written as `key=value`, since an attribute
12
- * name has to start with a letter, so there is nowhere for the two to meet.
9
+ * name has to start with a letter.
13
10
  */
14
11
  export declare const ANCHOR = "#id";
15
12
  /** Parses the inside of `{...}`: `key=value key2="値 2" #id .cls` */
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/marked/attributes.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAE1C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,oEAAoE;AACpE,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,GAAG,IAAI,KAAG,KAkBhD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,GACxB,KAAK,MAAM,EACX,OAAO,MAAM,EACb,MAAM,MAAM,EACZ,OAAO,MAAM,KACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAkBnC,CAAA;AAED,mFAAmF;AACnF,eAAO,MAAM,QAAQ,GACnB,KAAK,MAAM,EACX,GAAG,MAAM,KACR;IAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAcnD,CAAA"}
1
+ {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/marked/attributes.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAE1C;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,oEAAoE;AACpE,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,GAAG,IAAI,KAAG,KAkBhD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,GACxB,KAAK,MAAM,EACX,OAAO,MAAM,EACb,MAAM,MAAM,EACZ,OAAO,MAAM,KACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAkBnC,CAAA;AAED,mFAAmF;AACnF,eAAO,MAAM,QAAQ,GACnB,KAAK,MAAM,EACX,GAAG,MAAM,KACR;IAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAcnD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/marked/registry.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,cAAc,CAAA;AACpC,eAAO,MAAM,IAAI,SAAS,CAAA;AAC1B,eAAO,MAAM,IAAI,SAAS,CAAA;AAE1B,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,GAAG,OAAO,IAAI,GAAG,OAAO,IAAI,CAAA;AAyBxE,+EAA+E;AAC/E,eAAO,MAAM,OAAO,QAAiC,CAAA;AAErD,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,EAAE,MAAM,aAAa,KAAG,OACmB,CAAA"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/marked/registry.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,cAAc,CAAA;AACpC,eAAO,MAAM,IAAI,SAAS,CAAA;AAC1B,eAAO,MAAM,IAAI,SAAS,CAAA;AAE1B,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,GAAG,OAAO,IAAI,GAAG,OAAO,IAAI,CAAA;AAsBxE,+EAA+E;AAC/E,eAAO,MAAM,OAAO,QAAiC,CAAA;AAErD,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,EAAE,MAAM,aAAa,KAAG,OACmB,CAAA"}
@@ -1,13 +1,11 @@
1
1
  import type { DirectiveToken } from './tokenizer';
2
2
  import { type Parser, type RendererOptions } from './directives';
3
3
  /**
4
- * Builds what a directive renderer is given, then hands the token to the one
5
- * that knows it. The renderers themselves live in `directives/`, a file to a
6
- * feature: `card.ts` holds the card and everything written inside one, because
7
- * a title has to know whether the card gave it an href.
4
+ * Builds the context, then hands the token to the renderer that knows its name.
5
+ * The renderers live in `directives/`, a file to a feature, so that a card and
6
+ * everything written inside one stay together.
8
7
  *
9
- * A name with no renderer falls through to its own children, which is what a
10
- * directive the registry allows but nobody has drawn yet looks like.
8
+ * A name with no renderer falls through to its own children.
11
9
  */
12
10
  export declare function directiveRenderer(this: {
13
11
  parser: Parser;
@@ -1 +1 @@
1
- {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../src/marked/renderer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,eAAe,EACrB,MAAM,cAAc,CAAA;AAErB;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,EACxB,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,eAAe,GACvB,MAAM,CAyBR;AAED,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA"}
1
+ {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../src/marked/renderer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,eAAe,EACrB,MAAM,cAAc,CAAA;AAErB;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,EACxB,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,eAAe,GACvB,MAAM,CAyBR;AAED,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"tokenizer.d.ts","sourceRoot":"","sources":["../../../src/marked/tokenizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,EAAE,KAAK,KAAK,EAAY,MAAM,cAAc,CAAA;AACnD,OAAO,EAAa,KAAK,aAAa,EAAuB,MAAM,YAAY,CAAA;AAE/E,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,OAAO;IACpD,IAAI,EAAE,WAAW,CAAA;IACjB,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,KAAK,CAAA;IACZ,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,4EAA4E;IAC5E,SAAS,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IAC9C,yEAAyE;IACzE,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AA4BD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,MAAM,GAAG,SAGjD,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,KAAG,MAAM,GAAG,SAGlD,CAAA;AA+CD,wBAAgB,cAAc,CAC5B,IAAI,EAAE;IACJ,KAAK,EAAE;QACL,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,KAAK,EAAE,CAAA;QACrC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,IAAI,CAAA;KAC/C,CAAA;CACF,EACD,GAAG,EAAE,MAAM,GACV,cAAc,GAAG,SAAS,CAsC5B;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE;IAAE,KAAK,EAAE;QAAE,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,KAAK,EAAE,CAAA;KAAE,CAAA;CAAE,EAC3D,GAAG,EAAE,MAAM,GACV,cAAc,GAAG,SAAS,CAiB5B"}
1
+ {"version":3,"file":"tokenizer.d.ts","sourceRoot":"","sources":["../../../src/marked/tokenizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,EAAE,KAAK,KAAK,EAAY,MAAM,cAAc,CAAA;AACnD,OAAO,EAAa,KAAK,aAAa,EAAuB,MAAM,YAAY,CAAA;AAE/E,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,OAAO;IACpD,IAAI,EAAE,WAAW,CAAA;IACjB,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,KAAK,CAAA;IACZ,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,4EAA4E;IAC5E,SAAS,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IAC9C,yEAAyE;IACzE,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AA4BD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,MAAM,GAAG,SAGjD,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,KAAG,MAAM,GAAG,SAGlD,CAAA;AA6CD,wBAAgB,cAAc,CAC5B,IAAI,EAAE;IACJ,KAAK,EAAE;QACL,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,KAAK,EAAE,CAAA;QACrC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,IAAI,CAAA;KAC/C,CAAA;CACF,EACD,GAAG,EAAE,MAAM,GACV,cAAc,GAAG,SAAS,CAsC5B;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE;IAAE,KAAK,EAAE;QAAE,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,KAAK,EAAE,CAAA;KAAE,CAAA;CAAE,EAC3D,GAAG,EAAE,MAAM,GACV,cAAc,GAAG,SAAS,CAiB5B"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sakura-ui/markdown",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "markdown"
@@ -75,10 +75,8 @@ export const Markdown = ({
75
75
  {showToc && headings.length > 0 && (
76
76
  <nav className="rounded-3xl p-10 bg-yellow-50">
77
77
  {/*
78
- A plain h2 rather than core's H2. That one is built for a heading in
79
- a document: it is sized to be read as one, and carries the space
80
- that separates it from the text above it. This is the label on a
81
- box, at the top of it, with nothing above to separate it from.
78
+ The label on a box, not a heading in the document, so it does not
79
+ use core's H2 and its heading size and spacing.
82
80
  */}
83
81
  <h2 className="mb-4 font-bold text-h-xs-m sm:text-h-xs">
84
82
  {tocTitle}
@@ -88,8 +86,16 @@ export const Markdown = ({
88
86
  </Ul>
89
87
  </nav>
90
88
  )}
91
- {/* The markup is sanitised in src/sanitize.ts before it gets here. */}
92
- <div dangerouslySetInnerHTML={{ __html: html }} />
89
+ {/*
90
+ The document's blocks are children of this element, not of the wrapper,
91
+ so the space between them is set here.
92
+
93
+ The markup is sanitised in src/sanitize.ts before it gets here.
94
+ */}
95
+ <div
96
+ className="flex flex-col gap-8"
97
+ dangerouslySetInnerHTML={{ __html: html }}
98
+ />
93
99
  </div>
94
100
  )
95
101
  }
@@ -5,11 +5,8 @@ import { classNames } from './marked/html'
5
5
  /**
6
6
  * Applies the look of the design system to the finished document.
7
7
  *
8
- * This runs over the sanitised DOM rather than inside the markdown renderer so
9
- * that a table written as raw HTML 56 of the guide's documents do is styled
10
- * the same as one written with pipes. The pipeline this replaces had the same
11
- * property, because rehype-raw turned the raw HTML into real nodes before the
12
- * tag to component mapping ran.
8
+ * Runs over the sanitised DOM rather than inside the markdown renderer, so that
9
+ * a table written as raw HTML is styled the same as one written with pipes.
13
10
  */
14
11
 
15
12
  export type HeadingItem = {
@@ -113,9 +110,7 @@ export const decorate = (
113
110
  const tag = element.tagName.toLowerCase()
114
111
 
115
112
  // One id, generated once, for headings from markdown and from raw HTML
116
- // alike. The pipeline this replaces generated them in two passes that
117
- // disagreed whenever a heading held an image, raw HTML or a directive, and
118
- // the table of contents then linked to anchors that were not there.
113
+ // alike, so the table of contents and the body cannot disagree.
119
114
  if (HEADINGS.has(tag)) {
120
115
  const text = element.textContent ?? ''
121
116
  const asked = element.getAttribute('id')
@@ -6,14 +6,11 @@ export type Attrs = Record<string, string>
6
6
  /**
7
7
  * Where `{#name}` is kept, apart from anything written as `key=value`.
8
8
  *
9
- * A sigil says something about the element itself and means the same on every
10
- * directive; an attribute is the directive's own, and each reads the ones it
11
- * knows. Keeping them in one place would let a directive that wanted an
12
- * attribute called `id` take the anchor's place, which is how the video on a
13
- * youtube embed came to be called `id` and stayed that way.
14
- *
9
+ * A sigil describes the element and means the same on every directive; an
10
+ * attribute belongs to whichever directive reads it. Held apart so that a
11
+ * directive wanting an attribute called `id` cannot take the anchor's place.
15
12
  * A key beginning with `#` cannot be written as `key=value`, since an attribute
16
- * name has to start with a letter, so there is nowhere for the two to meet.
13
+ * name has to start with a letter.
17
14
  */
18
15
  export const ANCHOR = '#id'
19
16
 
@@ -12,8 +12,8 @@ const iconHtml = (name: string, altText: string): string =>
12
12
 
13
13
  export const cardRenderers: Record<string, DirectiveRenderer> = {
14
14
  card: ({ token, attrs, root, body, nl }) => {
15
- // The tokenizer withholds linked from a card with no title, which has no
16
- // link to give and so must not look as though it had one.
15
+ // Set by the tokenizer, and only when the card has a title to put the
16
+ // link on. A card without one must not look as though it were clickable.
17
17
  const isLink = Boolean(token.linked)
18
18
  const cls = classNames(
19
19
  styles.cardStyle,
@@ -31,9 +31,9 @@ export const cleanUrl = (href: string | undefined): string | undefined => {
31
31
  if (href == null || href === '') return undefined
32
32
  const trimmed = stripControl(String(href)).trim()
33
33
  if (/^(?:javascript|vbscript|file):/i.test(trimmed)) return undefined
34
- // Images written as data: used to be kept here and dropped nowhere, since
35
- // DOMPurify allows the scheme on an img whatever ALLOWED_URI_REGEXP says. The
36
- // content has no use for it, so both this and the sanitiser refuse it now.
34
+ // Refused here and in the sanitiser both: DOMPurify allows the scheme on an
35
+ // img whatever ALLOWED_URI_REGEXP says, so this is the only place a directive
36
+ // writing one is turned back.
37
37
  if (/^data:/i.test(trimmed)) return undefined
38
38
  return trimmed
39
39
  }
@@ -6,11 +6,8 @@ export type DirectiveKind = typeof CONTAINER | typeof LEAF | typeof TEXT
6
6
 
7
7
  /**
8
8
  * The whitelist. A name that is not here is not a directive, and the text
9
- * carrying it is left alone.
10
- *
11
- * The remark pipeline this replaces turned any name into a tag of the same
12
- * name, so ordinary prose lost characters: "HH:MM" rendered as "HH", and
13
- * "chat:write" as "chat".
9
+ * carrying it is left alone — which is what keeps "HH:MM" and "chat:write"
10
+ * intact in the prose.
14
11
  */
15
12
  const STATIC: Record<string, DirectiveKind[]> = {
16
13
  card: [CONTAINER],
@@ -10,13 +10,11 @@ import {
10
10
  } from './directives'
11
11
 
12
12
  /**
13
- * Builds what a directive renderer is given, then hands the token to the one
14
- * that knows it. The renderers themselves live in `directives/`, a file to a
15
- * feature: `card.ts` holds the card and everything written inside one, because
16
- * a title has to know whether the card gave it an href.
13
+ * Builds the context, then hands the token to the renderer that knows its name.
14
+ * The renderers live in `directives/`, a file to a feature, so that a card and
15
+ * everything written inside one stay together.
17
16
  *
18
- * A name with no renderer falls through to its own children, which is what a
19
- * directive the registry allows but nobody has drawn yet looks like.
17
+ * A name with no renderer falls through to its own children.
20
18
  */
21
19
  export function directiveRenderer(
22
20
  this: { parser: Parser },
@@ -60,14 +60,12 @@ export const inlineStart = (src: string): number | undefined => {
60
60
  }
61
61
 
62
62
  /**
63
- * A grid of cards is a list. The cards are things of one kind, and how many
64
- * there are is part of what the page says; a grid holding anything else, or
65
- * cards and something else together, is a layout — prose beside a figure is not
66
- * two of something. Nothing is written to ask for this, the way nothing is
67
- * written to ask a run of "- " for a <ul>.
63
+ * A grid of cards is a list: the cards are things of one kind, and how many
64
+ * there are is part of what the page says. A grid holding anything else, or
65
+ * cards mixed with something else, is a layout.
68
66
  *
69
- * Marked here rather than worked out while rendering, because by then the
70
- * children have become one string and the boundaries between them are gone.
67
+ * Marked here rather than while rendering, because by then the children are one
68
+ * string with no boundaries between them.
71
69
  */
72
70
  const markCardList = (token: DirectiveToken): void => {
73
71
  if (!/^grid-cols-\d+$/.test(token.name)) return
@@ -1,7 +1,7 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
3
  exports[`Markdown > directives > should render card 1`] = `
4
- "<div class="py-8 flex flex-col gap-8"><div><div class="border border-solid border-solid-gray-500 rounded-2xl sm:rounded-3xl text-solid-gray-900 overflow-hidden" data-sakura="card"><img class="object-cover mb-2 w-full aspect-[352/226]" src="/a.png" alt="図" data-sakura="card-img">
4
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><div class="border border-solid border-solid-gray-500 rounded-2xl sm:rounded-3xl text-solid-gray-900 overflow-hidden" data-sakura="card"><img class="object-cover mb-2 w-full aspect-[352/226]" src="/a.png" alt="図" data-sakura="card-img">
5
5
  <h3 class="m-0 text-base leading-[2rem] font-medium first:pt-4 pt-2 last:pb-4 px-6" data-sakura="card-title" id="タイトル">タイトル</h3>
6
6
  <div class="text-base-sm leading-[1.85rem] first:pt-4 pt-2 last:pb-4 px-6" data-sakura="card-description">説明</div>
7
7
  </div>
@@ -9,14 +9,14 @@ exports[`Markdown > directives > should render card 1`] = `
9
9
  `;
10
10
 
11
11
  exports[`Markdown > directives > should render cell 1`] = `
12
- "<div class="py-8 flex flex-col gap-8"><div><div data-sakura="cell"><img class="mb-4" src="/a.png" alt="図" data-sakura="cell-img">
12
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><div data-sakura="cell"><img class="mb-4" src="/a.png" alt="図" data-sakura="cell-img">
13
13
  <p>本文</p>
14
14
  </div>
15
15
  </div></div>"
16
16
  `;
17
17
 
18
18
  exports[`Markdown > directives > should render faq 1`] = `
19
- "<div class="py-8 flex flex-col gap-8"><div><dl class="flex flex-col gap-8" data-sakura="faq"><dt class="flex flex-row gap-8 mt-8 text-h-med-m sm:text-h-med" data-sakura="faq-q"><span aria-hidden="true">Q</span><span>質問は?</span></dt>
19
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><dl class="flex flex-col gap-8" data-sakura="faq"><dt class="flex flex-row gap-8 mt-8 text-h-med-m sm:text-h-med" data-sakura="faq-q"><span aria-hidden="true">Q</span><span>質問は?</span></dt>
20
20
  <dd class="flex flex-row items-start gap-8" data-sakura="faq-a"><span class="text-h-med-m sm:text-h-med !leading-none" aria-hidden="true">A</span><span>回答です。</span></dd>
21
21
  <dt class="flex flex-row gap-8 mt-8 text-h-med-m sm:text-h-med" data-sakura="faq-q"><span aria-hidden="true">Q</span><span>二つ目の質問は?</span></dt>
22
22
  <dd class="flex flex-row items-start gap-8" data-sakura="faq-a"><span class="text-h-med-m sm:text-h-med !leading-none" aria-hidden="true">A</span><span>二つ目の回答。</span></dd>
@@ -25,7 +25,7 @@ exports[`Markdown > directives > should render faq 1`] = `
25
25
  `;
26
26
 
27
27
  exports[`Markdown > directives > should render grid 1`] = `
28
- "<div class="py-8 flex flex-col gap-8"><div><ul class="flex flex-col md:grid md:grid-cols-3 gap-8" data-sakura="grid-cols-3"><li class="sm:grid"><div class="border border-solid border-solid-gray-500 rounded-2xl sm:rounded-3xl text-solid-gray-900 overflow-hidden" data-sakura="card"><h3 class="m-0 text-base leading-[2rem] font-medium first:pt-4 pt-2 last:pb-4 px-6" data-sakura="card-title" id="1つ目">1つ目</h3>
28
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><ul class="flex flex-col md:grid md:grid-cols-3 gap-8" data-sakura="grid-cols-3"><li class="sm:grid"><div class="border border-solid border-solid-gray-500 rounded-2xl sm:rounded-3xl text-solid-gray-900 overflow-hidden" data-sakura="card"><h3 class="m-0 text-base leading-[2rem] font-medium first:pt-4 pt-2 last:pb-4 px-6" data-sakura="card-title" id="1つ目">1つ目</h3>
29
29
  </div></li>
30
30
  <li class="sm:grid"><div class="border border-solid border-solid-gray-500 rounded-2xl sm:rounded-3xl text-solid-gray-900 overflow-hidden" data-sakura="card"><h3 class="m-0 text-base leading-[2rem] font-medium first:pt-4 pt-2 last:pb-4 px-6" data-sakura="card-title" id="2つ目">2つ目</h3>
31
31
  </div></li>
@@ -34,7 +34,7 @@ exports[`Markdown > directives > should render grid 1`] = `
34
34
  `;
35
35
 
36
36
  exports[`Markdown > directives > should render gridMixed 1`] = `
37
- "<div class="py-8 flex flex-col gap-8"><div><div class="flex flex-col md:grid md:grid-cols-2 gap-8" data-sakura="grid-cols-2"><div class="border border-solid border-solid-gray-500 rounded-2xl sm:rounded-3xl text-solid-gray-900 overflow-hidden" data-sakura="card"><h3 class="m-0 text-base leading-[2rem] font-medium first:pt-4 pt-2 last:pb-4 px-6" data-sakura="card-title" id="1つ目">1つ目</h3>
37
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><div class="flex flex-col md:grid md:grid-cols-2 gap-8" data-sakura="grid-cols-2"><div class="border border-solid border-solid-gray-500 rounded-2xl sm:rounded-3xl text-solid-gray-900 overflow-hidden" data-sakura="card"><h3 class="m-0 text-base leading-[2rem] font-medium first:pt-4 pt-2 last:pb-4 px-6" data-sakura="card-title" id="1つ目">1つ目</h3>
38
38
  </div>
39
39
  <div data-sakura="cell"><p>本文</p>
40
40
  </div>
@@ -43,7 +43,7 @@ exports[`Markdown > directives > should render gridMixed 1`] = `
43
43
  `;
44
44
 
45
45
  exports[`Markdown > directives > should render gridOfCells 1`] = `
46
- "<div class="py-8 flex flex-col gap-8"><div><div class="flex flex-col md:grid md:grid-cols-2 gap-8" data-sakura="grid-cols-2"><div data-sakura="cell"><p><img src="/a.png" alt="alt"><br>本文1</p>
46
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><div class="flex flex-col md:grid md:grid-cols-2 gap-8" data-sakura="grid-cols-2"><div data-sakura="cell"><p><img src="/a.png" alt="alt"><br>本文1</p>
47
47
  </div>
48
48
  <div data-sakura="cell"><p>本文2</p>
49
49
  </div>
@@ -52,12 +52,12 @@ exports[`Markdown > directives > should render gridOfCells 1`] = `
52
52
  `;
53
53
 
54
54
  exports[`Markdown > directives > should render linkButton 1`] = `
55
- "<div class="py-8 flex flex-col gap-8"><div><p>ご案内です。<a class="inline-block text-button text-center cursor-pointer select-none touch-manipulation whitespace-nowrap outline-offset-2 border border-solid border-blue-900 hover:border-blue-1000 active:border-blue-1200 disabled:border-solid-gray-500 disabled:cursor-not-allowed text-blue-900 hover:text-blue-1000 active:text-blue-1200 bg-transparent hover:bg-blue-200 active:bg-blue-300 disabled:bg-transparent disabled:text-solid-gray-500 hover:underline hover:underline-offset-[calc(3/16*1rem)] focus-visible:outline-4 focus-visible:outline-black focus-visible:ring-yellow-300 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:ring-[calc(2/16*1rem)] focus-visible:rounded-sm p-4 text-button leading-snug rounded-lg" href="/services" data-sakura="link-button">サービス一覧</a> をどうぞ。</p>
55
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>ご案内です。<a class="inline-block text-button text-center cursor-pointer select-none touch-manipulation whitespace-nowrap outline-offset-2 border border-solid border-blue-900 hover:border-blue-1000 active:border-blue-1200 disabled:border-solid-gray-500 disabled:cursor-not-allowed text-blue-900 hover:text-blue-1000 active:text-blue-1200 bg-transparent hover:bg-blue-200 active:bg-blue-300 disabled:bg-transparent disabled:text-solid-gray-500 hover:underline hover:underline-offset-[calc(3/16*1rem)] focus-visible:outline-4 focus-visible:outline-black focus-visible:ring-yellow-300 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:ring-[calc(2/16*1rem)] focus-visible:rounded-sm p-4 text-button leading-snug rounded-lg" href="/services" data-sakura="link-button">サービス一覧</a> をどうぞ。</p>
56
56
  </div></div>"
57
57
  `;
58
58
 
59
59
  exports[`Markdown > directives > should render linkCard 1`] = `
60
- "<div class="py-8 flex flex-col gap-8"><div><div class="border border-solid border-solid-gray-500 rounded-2xl sm:rounded-3xl text-solid-gray-900 overflow-hidden relative z-0 group hover:outline hover:outline-2 hover:outline-black hover:bg-solid-gray-50 has-[a:focus-visible]:outline has-[a:focus-visible]:outline-4 has-[a:focus-visible]:outline-black has-[a:focus-visible]:outline-offset-[calc(2/16*1rem)] has-[a:focus-visible]:ring-[calc(2/16*1rem)] has-[a:focus-visible]:ring-yellow-300" data-sakura="card"><h3 class="m-0 text-base leading-[2rem] font-medium first:pt-4 pt-2 last:pb-4 px-6 decoration-blue-900 underline underline-offset-[calc(3/16*1rem)] group-hover:text-blue-900 group-hover:decoration-[calc(3/16*1rem)]" data-sakura="card-title" id="タイトル"><a class="after:content-[''] after:absolute after:inset-0 after:z-10 focus-visible:outline-none" href="/x" data-sakura="card-title">タイトル</a></h3>
60
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><div class="border border-solid border-solid-gray-500 rounded-2xl sm:rounded-3xl text-solid-gray-900 overflow-hidden relative z-0 group hover:outline hover:outline-2 hover:outline-black hover:bg-solid-gray-50 has-[a:focus-visible]:outline has-[a:focus-visible]:outline-4 has-[a:focus-visible]:outline-black has-[a:focus-visible]:outline-offset-[calc(2/16*1rem)] has-[a:focus-visible]:ring-[calc(2/16*1rem)] has-[a:focus-visible]:ring-yellow-300" data-sakura="card"><h3 class="m-0 text-base leading-[2rem] font-medium first:pt-4 pt-2 last:pb-4 px-6 decoration-blue-900 underline underline-offset-[calc(3/16*1rem)] group-hover:text-blue-900 group-hover:decoration-[calc(3/16*1rem)]" data-sakura="card-title" id="タイトル"><a class="after:content-[''] after:absolute after:inset-0 after:z-10 focus-visible:outline-none" href="/x" data-sakura="card-title">タイトル</a></h3>
61
61
  <div class="text-base-sm leading-[1.85rem] first:pt-4 pt-2 last:pb-4 px-6" data-sakura="card-description">説明</div>
62
62
  <div class="sticky top-full text-base-sm leading-[1.85rem] first:pt-4 pt-2 last:pb-4 px-6 flex justify-between items-center" data-sakura="card-footer"><span>2026年8月</span><span class="inline-flex items-center justify-center w-6 h-6 text-blue-1000 border border-blue-1000 rounded-full group-hover:bg-blue-1000 group-hover:text-white"><span aria-hidden="true" class="!text-[16px] font-icon font-light inline-block leading-none align-middle whitespace-nowrap">arrow_forward</span><span class="sr-only"></span></span></div>
63
63
  </div>
@@ -65,32 +65,32 @@ exports[`Markdown > directives > should render linkCard 1`] = `
65
65
  `;
66
66
 
67
67
  exports[`Markdown > directives > should render linkCardWithoutTitle 1`] = `
68
- "<div class="py-8 flex flex-col gap-8"><div><div class="border border-solid border-solid-gray-500 rounded-2xl sm:rounded-3xl text-solid-gray-900 overflow-hidden" data-sakura="card"><div class="text-base-sm leading-[1.85rem] first:pt-4 pt-2 last:pb-4 px-6" data-sakura="card-description">説明</div>
68
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><div class="border border-solid border-solid-gray-500 rounded-2xl sm:rounded-3xl text-solid-gray-900 overflow-hidden" data-sakura="card"><div class="text-base-sm leading-[1.85rem] first:pt-4 pt-2 last:pb-4 px-6" data-sakura="card-description">説明</div>
69
69
  <div class="sticky top-full text-base-sm leading-[1.85rem] first:pt-4 pt-2 last:pb-4 px-6" data-sakura="card-footer">2026年8月</div>
70
70
  </div>
71
71
  </div></div>"
72
72
  `;
73
73
 
74
74
  exports[`Markdown > directives > should render youtube 1`] = `
75
- "<div class="py-8 flex flex-col gap-8"><div><iframe title="動画タイトル" src="https://www.youtube-nocookie.com/embed/yXdbvBzxeb8" class="aspect-video w-full max-w-[470px]" style="width:560px;" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy" data-sakura="youtube"></iframe>
75
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><iframe title="動画タイトル" src="https://www.youtube-nocookie.com/embed/yXdbvBzxeb8" class="aspect-video w-full max-w-[470px]" style="width:560px;" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy" data-sakura="youtube"></iframe>
76
76
  </div></div>"
77
77
  `;
78
78
 
79
79
  exports[`Markdown > heading shift > should move the headings down by the given amount 1`] = `
80
- "<div class="py-8 flex flex-col gap-8"><div><h2 id="見出し1" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]">見出し1</h2>
80
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><h2 id="見出し1" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]">見出し1</h2>
81
81
  <h3 id="見出し2" class="text-h-sm-m sm:text-h-sm pt-[4rem] sm:pt-[4.5rem]">見出し2</h3>
82
82
  </div></div>"
83
83
  `;
84
84
 
85
85
  exports[`Markdown > headings > should render duplicated 1`] = `
86
- "<div class="py-8 flex flex-col gap-8"><div><h2 id="概要" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]">概要</h2>
86
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><h2 id="概要" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]">概要</h2>
87
87
  <h2 id="概要-1" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]">概要</h2>
88
88
  <h2 id="概要-2" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]">概要</h2>
89
89
  </div></div>"
90
90
  `;
91
91
 
92
92
  exports[`Markdown > headings > should render japanese 1`] = `
93
- "<div class="py-8 flex flex-col gap-8"><div><h2 id="概要" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]">概要</h2>
93
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><h2 id="概要" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]">概要</h2>
94
94
  <h2 id="はじめに概要" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]">はじめに(概要)</h2>
95
95
  <h2 id="ab-テスト" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]">A/B テスト</h2>
96
96
  <h2 id="サービスアプリ" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]">サービス・アプリ</h2>
@@ -98,27 +98,27 @@ exports[`Markdown > headings > should render japanese 1`] = `
98
98
  `;
99
99
 
100
100
  exports[`Markdown > headings > should render withCode 1`] = `
101
- "<div class="py-8 flex flex-col gap-8"><div><h2 id="code-を含む見出し" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]"><code class="bg-solid-gray-50 font-mono">code</code> を含む見出し</h2>
101
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><h2 id="code-を含む見出し" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]"><code class="bg-solid-gray-50 font-mono">code</code> を含む見出し</h2>
102
102
  </div></div>"
103
103
  `;
104
104
 
105
105
  exports[`Markdown > headings > should render withImage 1`] = `
106
- "<div class="py-8 flex flex-col gap-8"><div><h2 id="-会社概要" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]"><img src="/a.png" alt="ロゴ"> 会社概要</h2>
106
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><h2 id="-会社概要" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]"><img src="/a.png" alt="ロゴ"> 会社概要</h2>
107
107
  </div></div>"
108
108
  `;
109
109
 
110
110
  exports[`Markdown > headings > should render withInlineHtml 1`] = `
111
- "<div class="py-8 flex flex-col gap-8"><div><h2 id="太字-タイトル" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]"><b>太字</b> タイトル</h2>
111
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><h2 id="太字-タイトル" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]"><b>太字</b> タイトル</h2>
112
112
  </div></div>"
113
113
  `;
114
114
 
115
115
  exports[`Markdown > malformed html > should recover from closingBr 1`] = `
116
- "<div class="py-8 flex flex-col gap-8"><div><p>一行目<br>二行目<br>三行目<br>四行目</p>
116
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>一行目<br>二行目<br>三行目<br>四行目</p>
117
117
  </div></div>"
118
118
  `;
119
119
 
120
120
  exports[`Markdown > malformed html > should recover from crossedNesting 1`] = `
121
- "<div class="py-8 flex flex-col gap-8"><div><ul class="list-disc [&amp;_&amp;]:list-circle [&amp;_&amp;_&amp;]:list-square pl-8">
121
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><ul class="list-disc [&amp;_&amp;]:list-circle [&amp;_&amp;_&amp;]:list-square pl-8">
122
122
  <details>
123
123
  <summary>まとめ</summary>
124
124
  中身
@@ -126,24 +126,24 @@ exports[`Markdown > malformed html > should recover from crossedNesting 1`] = `
126
126
  </ul></div></div>"
127
127
  `;
128
128
 
129
- exports[`Markdown > malformed html > should recover from mistypedClose 1`] = `"<div class="py-8 flex flex-col gap-8"><div><div class="w-full overflow-x-auto whitespace-nowrap print:overflow-visible print:whitespace-normal" data-sakura-table-container="true"><table class="border border-collapse border-solid-gray-420"><tbody><tr class="border border-collapse border-solid-gray-420"><td class="p-2 text-label border border-collapse border-solid-gray-420">値</td></tr></tbody></table></div></div></div>"`;
129
+ exports[`Markdown > malformed html > should recover from mistypedClose 1`] = `"<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><div class="w-full overflow-x-auto whitespace-nowrap print:overflow-visible print:whitespace-normal" data-sakura-table-container="true"><table class="border border-collapse border-solid-gray-420"><tbody><tr class="border border-collapse border-solid-gray-420"><td class="p-2 text-label border border-collapse border-solid-gray-420">値</td></tr></tbody></table></div></div></div>"`;
130
130
 
131
- exports[`Markdown > malformed html > should recover from unclosedCell 1`] = `"<div class="py-8 flex flex-col gap-8"><div><div class="w-full overflow-x-auto whitespace-nowrap print:overflow-visible print:whitespace-normal" data-sakura-table-container="true"><table class="border border-collapse border-solid-gray-420"><tbody><tr class="border border-collapse border-solid-gray-420"><td class="p-2 text-label border border-collapse border-solid-gray-420">閉じ忘れ</td></tr><tr class="border border-collapse border-solid-gray-420"><td class="p-2 text-label border border-collapse border-solid-gray-420">次の行</td></tr></tbody></table></div></div></div>"`;
131
+ exports[`Markdown > malformed html > should recover from unclosedCell 1`] = `"<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><div class="w-full overflow-x-auto whitespace-nowrap print:overflow-visible print:whitespace-normal" data-sakura-table-container="true"><table class="border border-collapse border-solid-gray-420"><tbody><tr class="border border-collapse border-solid-gray-420"><td class="p-2 text-label border border-collapse border-solid-gray-420">閉じ忘れ</td></tr><tr class="border border-collapse border-solid-gray-420"><td class="p-2 text-label border border-collapse border-solid-gray-420">次の行</td></tr></tbody></table></div></div></div>"`;
132
132
 
133
133
  exports[`Markdown > plain markdown > should render blockquote 1`] = `
134
- "<div class="py-8 flex flex-col gap-8"><div><blockquote>
134
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><blockquote>
135
135
  <p>引用文<br>続き</p>
136
136
  </blockquote>
137
137
  </div></div>"
138
138
  `;
139
139
 
140
140
  exports[`Markdown > plain markdown > should render cjkSoftBreak 1`] = `
141
- "<div class="py-8 flex flex-col gap-8"><div><p>東京都<br>港区</p>
141
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>東京都<br>港区</p>
142
142
  </div></div>"
143
143
  `;
144
144
 
145
145
  exports[`Markdown > plain markdown > should render codeFence 1`] = `
146
- "<div class="py-8 flex flex-col gap-8"><div><pre class="p-4 bg-solid-gray-50 rounded-lg whitespace-pre-wrap overflow-y-scroll"><code class="language-sh bg-solid-gray-50 font-mono">echo "hello"
146
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><pre class="p-4 bg-solid-gray-50 rounded-lg whitespace-pre-wrap overflow-y-scroll"><code class="language-sh bg-solid-gray-50 font-mono">echo "hello"
147
147
  </code></pre>
148
148
  <pre class="p-4 bg-solid-gray-50 rounded-lg whitespace-pre-wrap overflow-y-scroll"><code class="bg-solid-gray-50 font-mono">言語指定なし
149
149
  </code></pre>
@@ -151,12 +151,12 @@ exports[`Markdown > plain markdown > should render codeFence 1`] = `
151
151
  `;
152
152
 
153
153
  exports[`Markdown > plain markdown > should render footnote 1`] = `
154
- "<div class="py-8 flex flex-col gap-8"><div><p>本文<a href="%E8%84%9A%E6%B3%A8%E3%81%AE%E4%B8%AD%E8%BA%AB" class="cursor-pointer text-blue-1000 active:text-orange-700 visited:text-magenta-900 focus-visible:outline-4 focus-visible:outline-black focus-visible:ring-yellow-300 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:ring-[calc(2/16*1rem)] focus-visible:bg-yellow-300 focus-visible:rounded-sm underline underline-offset-[calc(3/16*1rem)] hover:decoration-[calc(3/16*1rem)] disabled:border-solid-gray-500 [overflow-wrap:anywhere]">^1</a></p>
154
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>本文<a href="%E8%84%9A%E6%B3%A8%E3%81%AE%E4%B8%AD%E8%BA%AB" class="cursor-pointer text-blue-1000 active:text-orange-700 visited:text-magenta-900 focus-visible:outline-4 focus-visible:outline-black focus-visible:ring-yellow-300 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:ring-[calc(2/16*1rem)] focus-visible:bg-yellow-300 focus-visible:rounded-sm underline underline-offset-[calc(3/16*1rem)] hover:decoration-[calc(3/16*1rem)] disabled:border-solid-gray-500 [overflow-wrap:anywhere]">^1</a></p>
155
155
  </div></div>"
156
156
  `;
157
157
 
158
158
  exports[`Markdown > plain markdown > should render gfmTable 1`] = `
159
- "<div class="py-8 flex flex-col gap-8"><div><div class="w-full overflow-x-auto whitespace-nowrap print:overflow-visible print:whitespace-normal" data-sakura-table-container="true"><table class="border border-collapse border-solid-gray-420">
159
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><div class="w-full overflow-x-auto whitespace-nowrap print:overflow-visible print:whitespace-normal" data-sakura-table-container="true"><table class="border border-collapse border-solid-gray-420">
160
160
  <thead>
161
161
  <tr class="border border-collapse border-solid-gray-420">
162
162
  <th class="p-2 bg-[#f8f8fb] text-label text-left border border-collapse border-solid-gray-420">見出し</th>
@@ -176,7 +176,7 @@ exports[`Markdown > plain markdown > should render gfmTable 1`] = `
176
176
  `;
177
177
 
178
178
  exports[`Markdown > plain markdown > should render headings 1`] = `
179
- "<div class="py-8 flex flex-col gap-8"><div><h1 id="見出し1" class="text-h-lg-m sm:text-h-lg pt-[2rem] sm:pt-[6.5rem]">見出し1</h1>
179
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><h1 id="見出し1" class="text-h-lg-m sm:text-h-lg pt-[2rem] sm:pt-[6.5rem]">見出し1</h1>
180
180
  <h2 id="見出し-2" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]">見出し 2</h2>
181
181
  <h3 id="見出し3" class="text-h-sm-m sm:text-h-sm pt-[4rem] sm:pt-[4.5rem]">見出し・3</h3>
182
182
  <h4 id="はじめに概要" class="text-h-xs-m sm:text-h-xs pt-[3.5rem] sm:pt-[4.5rem]">はじめに(概要)</h4>
@@ -184,17 +184,17 @@ exports[`Markdown > plain markdown > should render headings 1`] = `
184
184
  `;
185
185
 
186
186
  exports[`Markdown > plain markdown > should render image 1`] = `
187
- "<div class="py-8 flex flex-col gap-8"><div><p><img src="/images/a.png" alt="代替テキスト"></p>
187
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p><img src="/images/a.png" alt="代替テキスト"></p>
188
188
  </div></div>"
189
189
  `;
190
190
 
191
191
  exports[`Markdown > plain markdown > should render links 1`] = `
192
- "<div class="py-8 flex flex-col gap-8"><div><p><a href="/foo" class="cursor-pointer text-blue-1000 active:text-orange-700 visited:text-magenta-900 focus-visible:outline-4 focus-visible:outline-black focus-visible:ring-yellow-300 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:ring-[calc(2/16*1rem)] focus-visible:bg-yellow-300 focus-visible:rounded-sm underline underline-offset-[calc(3/16*1rem)] hover:decoration-[calc(3/16*1rem)] disabled:border-solid-gray-500 [overflow-wrap:anywhere]">内部</a> と <a href="https://example.com" target="_blank" rel="noopener noreferrer" class="cursor-pointer text-blue-1000 active:text-orange-700 visited:text-magenta-900 focus-visible:outline-4 focus-visible:outline-black focus-visible:ring-yellow-300 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:ring-[calc(2/16*1rem)] focus-visible:bg-yellow-300 focus-visible:rounded-sm underline underline-offset-[calc(3/16*1rem)] hover:decoration-[calc(3/16*1rem)] disabled:border-solid-gray-500 [overflow-wrap:anywhere]">外部<span aria-hidden="true" data-sakura-new-tab="true" class="!text-[16px] font-icon font-light inline-block leading-none align-middle whitespace-nowrap ml-0.5">open_in_new</span><span class="sr-only">Opens in new tab</span></a> と <a href="https://example.com/bare" target="_blank" rel="noopener noreferrer" class="cursor-pointer text-blue-1000 active:text-orange-700 visited:text-magenta-900 focus-visible:outline-4 focus-visible:outline-black focus-visible:ring-yellow-300 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:ring-[calc(2/16*1rem)] focus-visible:bg-yellow-300 focus-visible:rounded-sm underline underline-offset-[calc(3/16*1rem)] hover:decoration-[calc(3/16*1rem)] disabled:border-solid-gray-500 [overflow-wrap:anywhere]">https://example.com/bare<span aria-hidden="true" data-sakura-new-tab="true" class="!text-[16px] font-icon font-light inline-block leading-none align-middle whitespace-nowrap ml-0.5">open_in_new</span><span class="sr-only">Opens in new tab</span></a></p>
192
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p><a href="/foo" class="cursor-pointer text-blue-1000 active:text-orange-700 visited:text-magenta-900 focus-visible:outline-4 focus-visible:outline-black focus-visible:ring-yellow-300 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:ring-[calc(2/16*1rem)] focus-visible:bg-yellow-300 focus-visible:rounded-sm underline underline-offset-[calc(3/16*1rem)] hover:decoration-[calc(3/16*1rem)] disabled:border-solid-gray-500 [overflow-wrap:anywhere]">内部</a> と <a href="https://example.com" target="_blank" rel="noopener noreferrer" class="cursor-pointer text-blue-1000 active:text-orange-700 visited:text-magenta-900 focus-visible:outline-4 focus-visible:outline-black focus-visible:ring-yellow-300 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:ring-[calc(2/16*1rem)] focus-visible:bg-yellow-300 focus-visible:rounded-sm underline underline-offset-[calc(3/16*1rem)] hover:decoration-[calc(3/16*1rem)] disabled:border-solid-gray-500 [overflow-wrap:anywhere]">外部<span aria-hidden="true" data-sakura-new-tab="true" class="!text-[16px] font-icon font-light inline-block leading-none align-middle whitespace-nowrap ml-0.5">open_in_new</span><span class="sr-only">Opens in new tab</span></a> と <a href="https://example.com/bare" target="_blank" rel="noopener noreferrer" class="cursor-pointer text-blue-1000 active:text-orange-700 visited:text-magenta-900 focus-visible:outline-4 focus-visible:outline-black focus-visible:ring-yellow-300 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:ring-[calc(2/16*1rem)] focus-visible:bg-yellow-300 focus-visible:rounded-sm underline underline-offset-[calc(3/16*1rem)] hover:decoration-[calc(3/16*1rem)] disabled:border-solid-gray-500 [overflow-wrap:anywhere]">https://example.com/bare<span aria-hidden="true" data-sakura-new-tab="true" class="!text-[16px] font-icon font-light inline-block leading-none align-middle whitespace-nowrap ml-0.5">open_in_new</span><span class="sr-only">Opens in new tab</span></a></p>
193
193
  </div></div>"
194
194
  `;
195
195
 
196
196
  exports[`Markdown > plain markdown > should render list 1`] = `
197
- "<div class="py-8 flex flex-col gap-8"><div><ul class="list-disc [&amp;_&amp;]:list-circle [&amp;_&amp;_&amp;]:list-square pl-8">
197
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><ul class="list-disc [&amp;_&amp;]:list-circle [&amp;_&amp;_&amp;]:list-square pl-8">
198
198
  <li>項目1</li>
199
199
  <li>項目2<ul class="list-disc [&amp;_&amp;]:list-circle [&amp;_&amp;_&amp;]:list-square pl-8">
200
200
  <li>入れ子<ul class="list-disc [&amp;_&amp;]:list-circle [&amp;_&amp;_&amp;]:list-square pl-8">
@@ -212,17 +212,17 @@ exports[`Markdown > plain markdown > should render list 1`] = `
212
212
  `;
213
213
 
214
214
  exports[`Markdown > plain markdown > should render paragraph 1`] = `
215
- "<div class="py-8 flex flex-col gap-8"><div><p>段落です。<strong>強調</strong> と <em>斜体</em> と <code class="bg-solid-gray-50 font-mono">コード</code> と <del>取り消し</del>。</p>
215
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>段落です。<strong>強調</strong> と <em>斜体</em> と <code class="bg-solid-gray-50 font-mono">コード</code> と <del>取り消し</del>。</p>
216
216
  </div></div>"
217
217
  `;
218
218
 
219
219
  exports[`Markdown > plain markdown > should render rule 1`] = `
220
- "<div class="py-8 flex flex-col gap-8"><div><hr>
220
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><hr>
221
221
  </div></div>"
222
222
  `;
223
223
 
224
224
  exports[`Markdown > raw html > should render details 1`] = `
225
- "<div class="py-8 flex flex-col gap-8"><div><details>
225
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><details>
226
226
  <summary>詳細はこちら</summary><ul class="list-disc [&amp;_&amp;]:list-circle [&amp;_&amp;_&amp;]:list-square pl-8">
227
227
  <li>リスト項目</li>
228
228
  </ul>
@@ -242,25 +242,25 @@ exports[`Markdown > raw html > should render details 1`] = `
242
242
  `;
243
243
 
244
244
  exports[`Markdown > raw html > should render externalAnchor 1`] = `
245
- "<div class="py-8 flex flex-col gap-8"><div><p><a href="https://example.com" target="_blank" rel="noopener noreferrer" class="cursor-pointer text-blue-1000 active:text-orange-700 visited:text-magenta-900 focus-visible:outline-4 focus-visible:outline-black focus-visible:ring-yellow-300 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:ring-[calc(2/16*1rem)] focus-visible:bg-yellow-300 focus-visible:rounded-sm underline underline-offset-[calc(3/16*1rem)] hover:decoration-[calc(3/16*1rem)] disabled:border-solid-gray-500 [overflow-wrap:anywhere]">外部リンク<span aria-hidden="true" data-sakura-new-tab="true" class="!text-[16px] font-icon font-light inline-block leading-none align-middle whitespace-nowrap ml-0.5">open_in_new</span><span class="sr-only">Opens in new tab</span></a></p>
245
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p><a href="https://example.com" target="_blank" rel="noopener noreferrer" class="cursor-pointer text-blue-1000 active:text-orange-700 visited:text-magenta-900 focus-visible:outline-4 focus-visible:outline-black focus-visible:ring-yellow-300 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:ring-[calc(2/16*1rem)] focus-visible:bg-yellow-300 focus-visible:rounded-sm underline underline-offset-[calc(3/16*1rem)] hover:decoration-[calc(3/16*1rem)] disabled:border-solid-gray-500 [overflow-wrap:anywhere]">外部リンク<span aria-hidden="true" data-sakura-new-tab="true" class="!text-[16px] font-icon font-light inline-block leading-none align-middle whitespace-nowrap ml-0.5">open_in_new</span><span class="sr-only">Opens in new tab</span></a></p>
246
246
  </div></div>"
247
247
  `;
248
248
 
249
249
  exports[`Markdown > raw html > should render inlineTags 1`] = `
250
- "<div class="py-8 flex flex-col gap-8"><div><p>本文に <strong>太字</strong> と <u>下線</u> と <sup>(※1)</sup> と <small>小</small>。</p>
250
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>本文に <strong>太字</strong> と <u>下線</u> と <sup>(※1)</sup> と <small>小</small>。</p>
251
251
  </div></div>"
252
252
  `;
253
253
 
254
254
  exports[`Markdown > raw html > should render styledBlock 1`] = `
255
- "<div class="py-8 flex flex-col gap-8"><div><div style="background-color: #E8F1FE; padding: 12px 16px; border-radius: 8px; margin: 0 24px;">
255
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><div style="background-color: #E8F1FE; padding: 12px 16px; border-radius: 8px; margin: 0 24px;">
256
256
  注記のボックス
257
257
  </div></div></div>"
258
258
  `;
259
259
 
260
- exports[`Markdown > raw html > should render styledImg 1`] = `"<div class="py-8 flex flex-col gap-8"><div><img src="/images/a.png" alt="図" style="width: 800px; color-scheme: light;"></div></div>"`;
260
+ exports[`Markdown > raw html > should render styledImg 1`] = `"<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><img src="/images/a.png" alt="図" style="width: 800px; color-scheme: light;"></div></div>"`;
261
261
 
262
262
  exports[`Markdown > raw html > should render tableSpan 1`] = `
263
- "<div class="py-8 flex flex-col gap-8"><div><div class="w-full overflow-x-auto whitespace-nowrap print:overflow-visible print:whitespace-normal" data-sakura-table-container="true"><table class="border border-collapse border-solid-gray-420">
263
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><div class="w-full overflow-x-auto whitespace-nowrap print:overflow-visible print:whitespace-normal" data-sakura-table-container="true"><table class="border border-collapse border-solid-gray-420">
264
264
  <caption class="text-left">表:01 キャプション</caption>
265
265
  <colgroup><col style="width: 15%;"><col style="width: auto;"></colgroup>
266
266
  <thead><tr class="border border-collapse border-solid-gray-420"><th colspan="2" class="p-2 bg-[#f8f8fb] text-label text-left border border-collapse border-solid-gray-420">見出し</th></tr></thead>
@@ -382,7 +382,7 @@ exports[`Markdown > table of contents > should render the table of contents when
382
382
 
383
383
  disabled:border-solid-gray-500
384
384
  [overflow-wrap:anywhere]
385
- " href="#章2">章2</a></li></ul></nav><div><h1 id="章1" class="text-h-lg-m sm:text-h-lg pt-[2rem] sm:pt-[6.5rem]">章1</h1>
385
+ " href="#章2">章2</a></li></ul></nav><div class="flex flex-col gap-8"><h1 id="章1" class="text-h-lg-m sm:text-h-lg pt-[2rem] sm:pt-[6.5rem]">章1</h1>
386
386
  <h2 id="節1" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]">節1</h2>
387
387
  <h3 id="項1" class="text-h-sm-m sm:text-h-sm pt-[4rem] sm:pt-[4.5rem]">項1</h3>
388
388
  <h2 id="節2" class="text-h-med-m sm:text-h-med pt-[4rem] sm:pt-[4.5rem]">節2</h2>
@@ -391,56 +391,56 @@ exports[`Markdown > table of contents > should render the table of contents when
391
391
  `;
392
392
 
393
393
  exports[`Markdown > text that only looks like a directive > should leave chapter alone 1`] = `
394
- "<div class="py-8 flex flex-col gap-8"><div><p>第1章:はじめに</p>
394
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>第1章:はじめに</p>
395
395
  </div></div>"
396
396
  `;
397
397
 
398
398
  exports[`Markdown > text that only looks like a directive > should leave colonWord alone 1`] = `
399
- "<div class="py-8 flex flex-col gap-8"><div><p>参照:example と note:important を見てください。</p>
399
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>参照:example と note:important を見てください。</p>
400
400
  </div></div>"
401
401
  `;
402
402
 
403
403
  exports[`Markdown > text that only looks like a directive > should leave emoji alone 1`] = `
404
- "<div class="py-8 flex flex-col gap-8"><div><p>絵文字 :smile: です。</p>
404
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>絵文字 :smile: です。</p>
405
405
  </div></div>"
406
406
  `;
407
407
 
408
408
  exports[`Markdown > text that only looks like a directive > should leave functionCall alone 1`] = `
409
- "<div class="py-8 flex flex-col gap-8"><div><p>関数 foo:bar() を呼びます。</p>
409
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>関数 foo:bar() を呼びます。</p>
410
410
  </div></div>"
411
411
  `;
412
412
 
413
413
  exports[`Markdown > text that only looks like a directive > should leave linkLabel alone 1`] = `
414
- "<div class="py-8 flex flex-col gap-8"><div><p><a href="https://example.com" target="_blank" rel="noopener noreferrer" class="cursor-pointer text-blue-1000 active:text-orange-700 visited:text-magenta-900 focus-visible:outline-4 focus-visible:outline-black focus-visible:ring-yellow-300 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:ring-[calc(2/16*1rem)] focus-visible:bg-yellow-300 focus-visible:rounded-sm underline underline-offset-[calc(3/16*1rem)] hover:decoration-[calc(3/16*1rem)] disabled:border-solid-gray-500 [overflow-wrap:anywhere]">AWSドキュメント:AWS PrivateLink<span aria-hidden="true" data-sakura-new-tab="true" class="!text-[16px] font-icon font-light inline-block leading-none align-middle whitespace-nowrap ml-0.5">open_in_new</span><span class="sr-only">Opens in new tab</span></a></p>
414
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p><a href="https://example.com" target="_blank" rel="noopener noreferrer" class="cursor-pointer text-blue-1000 active:text-orange-700 visited:text-magenta-900 focus-visible:outline-4 focus-visible:outline-black focus-visible:ring-yellow-300 focus-visible:outline-offset-[calc(2/16*1rem)] focus-visible:ring-[calc(2/16*1rem)] focus-visible:bg-yellow-300 focus-visible:rounded-sm underline underline-offset-[calc(3/16*1rem)] hover:decoration-[calc(3/16*1rem)] disabled:border-solid-gray-500 [overflow-wrap:anywhere]">AWSドキュメント:AWS PrivateLink<span aria-hidden="true" data-sakura-new-tab="true" class="!text-[16px] font-icon font-light inline-block leading-none align-middle whitespace-nowrap ml-0.5">open_in_new</span><span class="sr-only">Opens in new tab</span></a></p>
415
415
  </div></div>"
416
416
  `;
417
417
 
418
418
  exports[`Markdown > text that only looks like a directive > should leave ratio alone 1`] = `
419
- "<div class="py-8 flex flex-col gap-8"><div><p>比率は 16:9 です。</p>
419
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>比率は 16:9 です。</p>
420
420
  </div></div>"
421
421
  `;
422
422
 
423
423
  exports[`Markdown > text that only looks like a directive > should leave scopeName alone 1`] = `
424
- "<div class="py-8 flex flex-col gap-8"><div><p>スコープ chat:write を付与する。</p>
424
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>スコープ chat:write を付与する。</p>
425
425
  </div></div>"
426
426
  `;
427
427
 
428
428
  exports[`Markdown > text that only looks like a directive > should leave time alone 1`] = `
429
- "<div class="py-8 flex flex-col gap-8"><div><p>開始は 10:30 です。</p>
429
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>開始は 10:30 です。</p>
430
430
  </div></div>"
431
431
  `;
432
432
 
433
433
  exports[`Markdown > text that only looks like a directive > should leave timeFormat alone 1`] = `
434
- "<div class="py-8 flex flex-col gap-8"><div><p>開始時刻は HH:MM 形式で記載する。</p>
434
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>開始時刻は HH:MM 形式で記載する。</p>
435
435
  </div></div>"
436
436
  `;
437
437
 
438
438
  exports[`Markdown > text that only looks like a directive > should leave todo alone 1`] = `
439
- "<div class="py-8 flex flex-col gap-8"><div><p>TODO: あとで直す</p>
439
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>TODO: あとで直す</p>
440
440
  </div></div>"
441
441
  `;
442
442
 
443
443
  exports[`Markdown > text that only looks like a directive > should leave xmlAttr alone 1`] = `
444
- "<div class="py-8 flex flex-col gap-8"><div><p>属性は xml:lang です。</p>
444
+ "<div class="py-8 flex flex-col gap-8"><div class="flex flex-col gap-8"><p>属性は xml:lang です。</p>
445
445
  </div></div>"
446
446
  `;
@@ -1,7 +1,7 @@
1
1
  $ rimraf dist
2
2
  $ run-p build:*
3
- $ tsc && tsc-alias
4
3
  $ vite build
4
+ $ tsc && tsc-alias
5
5
  vite v7.3.6 building client environment for production...
6
6
  transforming...
7
7
  ✓ 5 modules transformed.
@@ -9,4 +9,4 @@ rendering chunks...
9
9
  computing gzip size...
10
10
  dist/index.es.js 160.05 kB │ gzip: 10.15 kB
11
11
  dist/index.cjs.js 88.17 kB │ gzip: 8.80 kB
12
- ✓ built in 706ms
12
+ ✓ built in 621ms