zenn-cli 0.5.3-alpha.6 → 0.5.3
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.
|
@@ -769,4 +769,4 @@ Error generating stack: `+e.message+`
|
|
|
769
769
|
.layout__main {
|
|
770
770
|
flex: 1;
|
|
771
771
|
}
|
|
772
|
-
`,Tb=`modulepreload`,Eb=function(e){return`/`+e},Db={},Ob=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Eb(t,n),t=s(t),t in Db)return;Db[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Tb,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},kb=()=>{let e=(0,xn.useLocation)();return(0,k.useEffect)(()=>{e.hash||window.scrollTo(0,0)},[e]),null};bn.createRoot(document.getElementById(`root`)).render((0,j.jsx)(()=>((0,k.useEffect)(()=>{Ob(()=>import(`./src-
|
|
772
|
+
`,Tb=`modulepreload`,Eb=function(e){return`/`+e},Db={},Ob=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Eb(t,n),t=s(t),t in Db)return;Db[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Tb,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},kb=()=>{let e=(0,xn.useLocation)();return(0,k.useEffect)(()=>{e.hash||window.scrollTo(0,0)},[e]),null};bn.createRoot(document.getElementById(`root`)).render((0,j.jsx)(()=>((0,k.useEffect)(()=>{Ob(()=>import(`./src-GLLyDtkq.js`),[])},[]),(0,j.jsx)(Ti,{children:(0,j.jsx)(ho,{children:(0,j.jsxs)(xn.RoconRoot,{children:[(0,j.jsx)(kb,{}),(0,j.jsx)(Cb,{children:(0,j.jsx)(sb,{})})]})})})),{}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={};function t({src:t,id:n}){return new Promise((r,i)=>{if(document.getElementById(n)){let t=setInterval(()=>{e[n]&&(clearInterval(t),r())},100)}else{let a=document.createElement(`script`);a.setAttribute(`src`,t),a.setAttribute(`id`,n),document.head.appendChild(a),a.onload=()=>{e[n]=!0,r()},a.onerror=e=>i(e)}})}function n({href:e,id:t}){return new Promise((n,r)=>{if(document.getElementById(t))return n();let i=document.createElement(`link`);i.setAttribute(`href`,e),i.setAttribute(`rel`,`stylesheet`),i.setAttribute(`id`,t),document.head.appendChild(i),i.onload=()=>{n()},i.onerror=e=>r(e)})}var r=`katex-container`,i=class extends HTMLElement{constructor(){super();let e=document.createElement(`div`);e.setAttribute(`id`,r),this._container=e}async connectedCallback(){this.render()}async render(){typeof katex>`u`&&await t({src:`https://cdn.jsdelivr.net/npm/katex/dist/katex.min.js`,id:`katex-js`}),n({href:`https://cdn.jsdelivr.net/npm/katex/dist/katex.min.css`,id:`katex-css`});let e=!!this.getAttribute(`display-mode`),r=this.getAttribute(`data-tex-source`);r===null&&(r=this.textContent||this.innerText,this.setAttribute(`data-tex-source`,r)),katex?.render(r,this._container,{macros:{"\\RR":`\\mathbb{R}`},throwOnError:!1,displayMode:e}),this.innerHTML=this._container.innerHTML}},a=`zenn-footnote-tooltip`,o=150,s=300,c=!1,l=null,u=null,d,f;function p(){d!==void 0&&(window.clearTimeout(d),d=void 0)}function m(){f!==void 0&&(window.clearTimeout(f),f=void 0)}function h(){return l&&l.isConnected?l:(l=document.createElement(`div`),l.id=a,l.className=`znc zenn-footnote-tooltip`,l.setAttribute(`role`,`tooltip`),l.hidden=!0,l.addEventListener(`mouseenter`,()=>m()),l.addEventListener(`mouseleave`,()=>C()),document.body.appendChild(l),l)}function g(e){if(!(e instanceof Element))return null;let t=e.closest(`sup.footnote-ref > a`);return!(t instanceof HTMLAnchorElement)||l&&l.contains(t)||!t.closest(`.znc`)?null:t}function _(e){try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`}catch{return!1}}function v(e,t){e.querySelectorAll(`.embed-block`).forEach(e=>{let n=e.querySelector(`iframe`)?.getAttribute(`data-content`),r=(()=>{if(!n)return null;try{return decodeURIComponent(n)}catch{return null}})(),i=document.createElement(`a`);r&&_(r)?(i.href=r,i.textContent=r,i.rel=`noreferrer noopener nofollow`,i.target=`_blank`):(i.href=t,i.textContent=`埋め込みコンテンツ`),e.replaceWith(i)})}function y(e){let t=(()=>{try{return decodeURIComponent(e.hash.slice(1))}catch{return null}})();if(!t)return null;let n=document.getElementById(t);if(!n||!n.classList.contains(`footnote-item`))return null;let r=document.createDocumentFragment();return n.childNodes.forEach(e=>{r.appendChild(e.cloneNode(!0))}),r.querySelectorAll(`.footnote-backref`).forEach(e=>e.remove()),v(r,e.getAttribute(`href`)??``),r.textContent?.trim()?r:null}function b(e,t){let n=e.getBoundingClientRect(),r=t.left+t.width/2-n.width/2;r=Math.min(Math.max(8,r),window.innerWidth-n.width-8);let i=t.top-n.height-8;i<8&&(i=t.bottom+8),i=Math.max(Math.min(i,window.innerHeight-n.height-8),8),e.style.left=`${r+window.scrollX}px`,e.style.top=`${i+window.scrollY}px`}function x(e){let t=y(e);if(!t)return;let n=e.getBoundingClientRect();S();let r=h();r.replaceChildren(t),r.hidden=!1,b(r,n),e.setAttribute(`aria-describedby`,a),u=e}function S(){p(),m(),u&&=(u.removeAttribute(`aria-describedby`),null),l&&(l.hidden=!0)}function C(){m(),f=window.setTimeout(S,s)}function w(e){let t=g(e.target);t&&window.matchMedia(`(hover: hover)`).matches&&(m(),t!==u&&(p(),d=window.setTimeout(()=>x(t),o)))}function T(e){let t=g(e.target);t&&(p(),t===u&&C())}function E(e){let t=g(e.target);t&&(m(),t!==u&&x(t))}function D(e){let t=g(e.target)!==null,n=e.target instanceof Node&&!!l&&l.contains(e.target);if(!t&&!n)return;let r=e.relatedTarget;r instanceof Node&&l&&l.contains(r)||g(r)||S()}function O(e){e.key===`Escape`&&(p(),l&&!l.hidden&&S())}function k(){c||typeof document>`u`||(c=!0,document.addEventListener(`mouseover`,w),document.addEventListener(`mouseout`,T),document.addEventListener(`focusin`,E),document.addEventListener(`focusout`,D),document.addEventListener(`keydown`,O))}customElements.define(`embed-katex`,i),k();
|
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-vaMEwv9z.js"></script>
|
|
31
31
|
<link rel="stylesheet" crossorigin href="/assets/index-rqkWbNGi.css">
|
|
32
32
|
</head>
|
|
33
33
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zenn-cli",
|
|
3
|
-
"version": "0.5.3
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "Preview Zenn content locally.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -101,10 +101,10 @@
|
|
|
101
101
|
"vitest": "^4.0.6",
|
|
102
102
|
"wait-on": "^9.0.1",
|
|
103
103
|
"ws": "^8.18.3",
|
|
104
|
-
"zenn-content-css": "0.5.3
|
|
105
|
-
"zenn-embed-elements": "0.5.3
|
|
106
|
-
"zenn-markdown-html": "0.5.3
|
|
107
|
-
"zenn-model": "0.5.3
|
|
104
|
+
"zenn-content-css": "0.5.3",
|
|
105
|
+
"zenn-embed-elements": "0.5.3",
|
|
106
|
+
"zenn-markdown-html": "0.5.3",
|
|
107
|
+
"zenn-model": "0.5.3"
|
|
108
108
|
},
|
|
109
109
|
"engines": {
|
|
110
110
|
"node": ">=22.12.0"
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"publishConfig": {
|
|
113
113
|
"access": "public"
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "086a303749a1a8deaf99175d2e2f3ffd43dab8d5"
|
|
116
116
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={};function t({src:t,id:n}){return new Promise((r,i)=>{if(document.getElementById(n)){let t=setInterval(()=>{e[n]&&(clearInterval(t),r())},100)}else{let a=document.createElement(`script`);a.setAttribute(`src`,t),a.setAttribute(`id`,n),document.head.appendChild(a),a.onload=()=>{e[n]=!0,r()},a.onerror=e=>i(e)}})}function n({href:e,id:t}){return new Promise((n,r)=>{if(document.getElementById(t))return n();let i=document.createElement(`link`);i.setAttribute(`href`,e),i.setAttribute(`rel`,`stylesheet`),i.setAttribute(`id`,t),document.head.appendChild(i),i.onload=()=>{n()},i.onerror=e=>r(e)})}var r=`katex-container`,i=class extends HTMLElement{constructor(){super();let e=document.createElement(`div`);e.setAttribute(`id`,r),this._container=e}async connectedCallback(){this.render()}async render(){typeof katex>`u`&&await t({src:`https://cdn.jsdelivr.net/npm/katex/dist/katex.min.js`,id:`katex-js`}),n({href:`https://cdn.jsdelivr.net/npm/katex/dist/katex.min.css`,id:`katex-css`});let e=!!this.getAttribute(`display-mode`),r=this.textContent||this.innerText;katex?.render(r,this._container,{macros:{"\\RR":`\\mathbb{R}`},throwOnError:!1,displayMode:e}),this.innerHTML=this._container.innerHTML}},a=`zenn-footnote-tooltip`,o=150,s=300,c=!1,l=null,u=null,d,f;function p(){d!==void 0&&(window.clearTimeout(d),d=void 0)}function m(){f!==void 0&&(window.clearTimeout(f),f=void 0)}function h(){return l&&l.isConnected?l:(l=document.createElement(`div`),l.id=a,l.className=`znc zenn-footnote-tooltip`,l.setAttribute(`role`,`tooltip`),l.hidden=!0,l.addEventListener(`mouseenter`,()=>m()),l.addEventListener(`mouseleave`,()=>C()),document.body.appendChild(l),l)}function g(e){if(!(e instanceof Element))return null;let t=e.closest(`sup.footnote-ref > a`);return!(t instanceof HTMLAnchorElement)||l&&l.contains(t)||!t.closest(`.znc`)?null:t}function _(e){try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`}catch{return!1}}function v(e,t){e.querySelectorAll(`.embed-block`).forEach(e=>{let n=e.querySelector(`iframe`)?.getAttribute(`data-content`),r=(()=>{if(!n)return null;try{return decodeURIComponent(n)}catch{return null}})(),i=document.createElement(`a`);r&&_(r)?(i.href=r,i.textContent=r,i.rel=`noreferrer noopener nofollow`,i.target=`_blank`):(i.href=t,i.textContent=`埋め込みコンテンツ`),e.replaceWith(i)})}function y(e){let t=(()=>{try{return decodeURIComponent(e.hash.slice(1))}catch{return null}})();if(!t)return null;let n=document.getElementById(t);if(!n||!n.classList.contains(`footnote-item`))return null;let r=document.createDocumentFragment();return n.childNodes.forEach(e=>{r.appendChild(e.cloneNode(!0))}),r.querySelectorAll(`.footnote-backref`).forEach(e=>e.remove()),v(r,e.getAttribute(`href`)??``),r.textContent?.trim()?r:null}function b(e,t){let n=e.getBoundingClientRect(),r=t.left+t.width/2-n.width/2;r=Math.min(Math.max(8,r),window.innerWidth-n.width-8);let i=t.top-n.height-8;i<8&&(i=t.bottom+8),i=Math.max(Math.min(i,window.innerHeight-n.height-8),8),e.style.left=`${r+window.scrollX}px`,e.style.top=`${i+window.scrollY}px`}function x(e){let t=y(e);if(!t)return;let n=e.getBoundingClientRect();S();let r=h();r.replaceChildren(t),r.hidden=!1,b(r,n),e.setAttribute(`aria-describedby`,a),u=e}function S(){p(),m(),u&&=(u.removeAttribute(`aria-describedby`),null),l&&(l.hidden=!0)}function C(){m(),f=window.setTimeout(S,s)}function w(e){let t=g(e.target);t&&window.matchMedia(`(hover: hover)`).matches&&(m(),t!==u&&(p(),d=window.setTimeout(()=>x(t),o)))}function T(e){let t=g(e.target);t&&(p(),t===u&&C())}function E(e){let t=g(e.target);t&&(m(),t!==u&&x(t))}function D(e){let t=g(e.target)!==null,n=e.target instanceof Node&&!!l&&l.contains(e.target);if(!t&&!n)return;let r=e.relatedTarget;r instanceof Node&&l&&l.contains(r)||g(r)||S()}function O(e){e.key===`Escape`&&(p(),l&&!l.hidden&&S())}function k(){c||typeof document>`u`||(c=!0,document.addEventListener(`mouseover`,w),document.addEventListener(`mouseout`,T),document.addEventListener(`focusin`,E),document.addEventListener(`focusout`,D),document.addEventListener(`keydown`,O))}customElements.define(`embed-katex`,i),k();
|