zenn-cli 0.4.3 → 0.4.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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const c={};function a({src:s,id:e}){return new Promise((n,i)=>{if(document.getElementById(e)){const t=setInterval(()=>{c[e]&&(clearInterval(t),n())},100)}else{const t=document.createElement("script");t.setAttribute("src",s),t.setAttribute("id",e),document.head.appendChild(t),t.onload=()=>{c[e]=!0,n()},t.onerror=o=>i(o)}})}function d({href:s,id:e}){return new Promise((n,i)=>{if(document.getElementById(e))return n();const r=document.createElement("link");r.setAttribute("href",s),r.setAttribute("rel","stylesheet"),r.setAttribute("id",e),document.head.appendChild(r),r.onload=()=>{n()},r.onerror=t=>i(t)})}const l="katex-container";class u extends HTMLElement{constructor(){super(),this._observer=null,this._isRendering=!1;const e=document.createElement("div");e.setAttribute("id",l),this._container=e}async connectedCallback(){this.render(),this._setupObserver()}disconnectedCallback(){this._cleanupObserver()}_setupObserver(){this._observer||(this._observer=new MutationObserver(()=>{this._isRendering||this.querySelector("eq")&&!this.querySelector(".katex")&&this.render()}),this._observer.observe(this,{childList:!0,subtree:!0}))}_cleanupObserver(){this._observer&&(this._observer.disconnect(),this._observer=null)}async render(){if(!this._isRendering){this._isRendering=!0;try{typeof katex>"u"&&await a({src:"https://cdn.jsdelivr.net/npm/katex/dist/katex.min.js",id:"katex-js"}),d({href:"https://cdn.jsdelivr.net/npm/katex/dist/katex.min.css",id:"katex-css"});const e=!!this.getAttribute("display-mode"),n=this.textContent||this.innerText;katex?.render(n,this._container,{macros:{"\\RR":"\\mathbb{R}"},throwOnError:!1,displayMode:e}),this.innerHTML=this._container.innerHTML}finally{this._isRendering=!1}}}}customElements.define("embed-katex",u);
|
|
@@ -768,4 +768,4 @@ Error generating stack: `+s.message+`
|
|
|
768
768
|
.layout__main {
|
|
769
769
|
flex: 1;
|
|
770
770
|
}
|
|
771
|
-
`,WR=()=>{const e=Gt.useLocation();return se.useEffect(()=>{e.hash||window.scrollTo(0,0)},[e]),null},JR=()=>(se.useEffect(()=>{OA(()=>import("./index-
|
|
771
|
+
`,WR=()=>{const e=Gt.useLocation();return se.useEffect(()=>{e.hash||window.scrollTo(0,0)},[e]),null},JR=()=>(se.useEffect(()=>{OA(()=>import("./index-DWPlwCLj.js"),[])},[]),A.jsx(gv,{children:A.jsx(pC,{children:A.jsxs(Gt.RoconRoot,{children:[A.jsx(WR,{}),A.jsx(ZR,{children:A.jsx(UR,{})})]})})})),eO=SA.createRoot(document.getElementById("root"));eO.render(A.jsx(JR,{}));
|
package/dist/client/index.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
<!-- 埋め込み要素のイベントを処理するためのスクリプト -->
|
|
29
29
|
<script src="https://embed.zenn.studio/js/listen-embed-event.js"></script>
|
|
30
|
-
<script type="module" crossorigin src="/assets/index-
|
|
30
|
+
<script type="module" crossorigin src="/assets/index-D_OIIVrd.js"></script>
|
|
31
31
|
<link rel="stylesheet" crossorigin href="/assets/index-CbTaFWVe.css">
|
|
32
32
|
</head>
|
|
33
33
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zenn-cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Preview Zenn content locally.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -95,10 +95,10 @@
|
|
|
95
95
|
"vitest": "^4.0.6",
|
|
96
96
|
"wait-on": "^9.0.1",
|
|
97
97
|
"ws": "^8.18.3",
|
|
98
|
-
"zenn-content-css": "0.4.
|
|
99
|
-
"zenn-embed-elements": "0.4.
|
|
100
|
-
"zenn-markdown-html": "0.4.
|
|
101
|
-
"zenn-model": "0.4.
|
|
98
|
+
"zenn-content-css": "0.4.4",
|
|
99
|
+
"zenn-embed-elements": "0.4.4",
|
|
100
|
+
"zenn-markdown-html": "0.4.4",
|
|
101
|
+
"zenn-model": "0.4.4"
|
|
102
102
|
},
|
|
103
103
|
"engines": {
|
|
104
104
|
"node": ">=22.0.0"
|
|
@@ -106,5 +106,5 @@
|
|
|
106
106
|
"publishConfig": {
|
|
107
107
|
"access": "public"
|
|
108
108
|
},
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "de867b158201c3a387544cb88b8b627ea356aa43"
|
|
110
110
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const c={};function a({src:s,id:t}){return new Promise((n,i)=>{if(document.getElementById(t)){const e=setInterval(()=>{c[t]&&(clearInterval(e),n())},100)}else{const e=document.createElement("script");e.setAttribute("src",s),e.setAttribute("id",t),document.head.appendChild(e),e.onload=()=>{c[t]=!0,n()},e.onerror=o=>i(o)}})}function d({href:s,id:t}){return new Promise((n,i)=>{if(document.getElementById(t))return n();const r=document.createElement("link");r.setAttribute("href",s),r.setAttribute("rel","stylesheet"),r.setAttribute("id",t),document.head.appendChild(r),r.onload=()=>{n()},r.onerror=e=>i(e)})}const l="katex-container";class m extends HTMLElement{constructor(){super();const t=document.createElement("div");t.setAttribute("id",l),this._container=t}async connectedCallback(){this.render()}async render(){typeof katex>"u"&&await a({src:"https://cdn.jsdelivr.net/npm/katex/dist/katex.min.js",id:"katex-js"}),d({href:"https://cdn.jsdelivr.net/npm/katex/dist/katex.min.css",id:"katex-css"});const t=!!this.getAttribute("display-mode"),n=this.textContent||this.innerText;katex?.render(n,this._container,{macros:{"\\RR":"\\mathbb{R}"},throwOnError:!1,displayMode:t}),this.innerHTML=this._container.innerHTML}}customElements.define("embed-katex",m);
|