@diplodoc/cli 4.7.0-beta-1 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/assets/app.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var e,t={5816:(e,t,n)=>{"use strict";var o=n(7294),r=n(745),i=n(7725),a=n(7537),c=n(7332),l=n(293),s=n(8534),d=n(9609),u=n(4990);const m=(0,o.memo)((({mobileView:e,theme:t,onChangeTheme:n,textSize:r,onChangeTextSize:i,wideFormat:a,onChangeWideFormat:c,showMiniToc:l,onChangeShowMiniToc:m})=>o.createElement(d.C,{controlClassName:"Control",controlSize:s.$D.L,isWideView:e,isMobileView:e},o.createElement(u.Z,{className:"Controls",theme:t,onChangeTheme:n,wideFormat:a,onChangeWideFormat:c,showMiniToc:l,onChangeShowMiniToc:m,textSize:r,onChangeTextSize:i}))));function h(e){return"boolean"==typeof e?e:!!e&&"true"===e}m.displayName="HeaderControls";const f=(0,n(2853).Z)("Layout");function w(){return null}function p(){return null}function g(){return null}const S=e=>{const{children:t,doc:n}=e;let r,i,a;return o.Children.forEach(t,(e=>{switch(e.type){case w:r=e.props.children;break;case p:i=e.props.children;break;case g:a=e.props.children}})),o.createElement("div",{className:f()},r&&o.createElement("div",{className:f("header")},r),o.createElement("div",{className:f("body")},i&&o.createElement("div",{className:f("content")},i),a&&o.createElement("div",{className:f("footer",{doc:n})},a)))};S.displayName="Layout",S.defaultProps={doc:!1},S.Header=w,S.Content=p,S.Footer=g;const b={theme:s.Q2.Light,textSize:s.tF.M,showMiniToc:!0,wideFormat:!0,fullScreen:!1};function v(e){if("undefined"==typeof sessionStorage)return b[e];try{return sessionStorage.getItem(e)||b[e]}catch{return b[e]}}function y(e,t){return n=>{!function(e,t){try{sessionStorage.setItem(e,String(t))}catch{}}(e,n),t(n)}}n(9380),n(8648);var E=n(5289);function C(e){const t=function(){const[e,t]=(0,o.useState)(null),n=(0,o.useCallback)((async t=>{if(e)return e.run(t)}),[e]);return(0,o.useEffect)((()=>((window.latexJsonp=window.latexJsonp||[]).push(t),()=>{const e=window.latexJsonp.indexOf(t);e>-1&&window.latexJsonp.splice(e,1)})),[]),n}();return(0,o.useEffect)((()=>{t(e).catch(e.onError||(()=>{}))})),null}var T=n(5584);function x(e){const{data:t,...n}=e,r=t.leading?c.IU:l.Z;return o.createElement(S,null,o.createElement(S.Content,null,o.createElement(r,Object.assign({},t,n))))}function M(e){const{data:t,router:n,lang:r}=e,{navigation:c}=t.toc,l=function(){const e=function(){const e=v("theme"),t=v("textSize"),n=v("showMiniToc"),o=v("wideFormat"),r=v("fullScreen");return{theme:e,textSize:t,showMiniToc:h(n),wideFormat:h(o),fullScreen:h(r)}}(),[t,n]=(0,o.useState)(e.wideFormat),[r,i]=(0,o.useState)(e.fullScreen),[a,c]=(0,o.useState)(e.showMiniToc),[l,s]=(0,o.useState)(e.theme),[d,u]=(0,o.useState)(e.textSize);return{theme:l,onChangeTheme:y("theme",s),textSize:d,onChangeTextSize:y("textSize",u),wideFormat:t,onChangeWideFormat:y("wideFormat",n),showMiniToc:a,onChangeShowMiniToc:y("showMiniToc",c),fullScreen:r,onChangeFullScreen:y("fullScreen",i)}}(),d=function(){const[e,t]=(0,o.useState)("undefined"!=typeof document&&document.body.clientWidth<769),n=(0,o.useCallback)((()=>{t(document.body.clientWidth<769)}),[]);return(0,o.useEffect)(n,[n]),(0,o.useEffect)((()=>(window.addEventListener("resize",n),()=>window.removeEventListener("resize",n))),[n]),e}(),{theme:u,textSize:f,wideFormat:w,fullScreen:p,showMiniToc:g,onChangeFullScreen:S}=l,b=!p&&Boolean(c),M={headerHeight:b?64:0,data:t,router:n,lang:r,wideFormat:w,showMiniToc:g,theme:u,textSize:f,fullScreen:p,onChangeFullScreen:S},F=e=>"link"!==e.type?e:{...e,url:e.url.replace(/^\/?/,"/")};if((0,o.useEffect)((()=>{!function({theme:e,mobileView:t=!1,wideFormat:n=!1,fullHeader:o=!1}){document.body.className=["g-root",t?"mobile":"desktop",n&&"dc-root_wide-format",o&&"dc-root_full-header","light"===e&&"g-root_theme_light","dark"===e&&"g-root_theme_dark"].filter(Boolean).join(" ")}({theme:u,mobileView:d,wideFormat:w,fullHeader:b})}),[u,d,w,b]),!c)return o.createElement("div",{className:"App"},o.createElement(x,Object.assign({},M,l)));const{header:_={},logo:O}=c,{leftItems:k=[],rightItems:z=[]}=_,j=z.some((e=>"controls"===e.type));return o.createElement("div",{className:"App"},o.createElement(i.W,{theme:u},o.createElement(a.C,{custom:{navigation:{controls:()=>o.createElement(m,Object.assign({},l,{mobileView:d}))},blocks:{page:()=>o.createElement(x,Object.assign({},M,j?{}:l))}},content:{blocks:[{type:"page"}]},navigation:b?{header:{withBorder:!0,leftItems:k.map(F),rightItems:z.map(F)},logo:O}:void 0})),o.createElement(T.r,null),o.createElement(C,null),o.createElement(E.u,{theme:u===s.Q2.Dark?"dark":"neutral",zoom:{showMenu:!0,bindKeys:!0}}))}const F=document.getElementById("root"),_=window.__DATA__;if(!F)throw new Error("Root element not found!");window.STATIC_CONTENT?(0,r.a)(F,o.createElement(M,_)):(0,r.s)(F).render(o.createElement(M,_))},9380:()=>{"undefined"!=typeof Element&&function(e){const t=e.matches||e.matchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector;e.matches=e.matchesSelector=t||function(e){const t=this;return Array.prototype.some.call(document.querySelectorAll(e),(e=>e===t))}}(Element.prototype),"undefined"!=typeof document&&document.addEventListener("click",(e=>{const t=e.target.href,n=window.location.origin;if(e.target.matches(".dc-doc-layout__center a")&&t.startsWith(n)){e.preventDefault();const n="index",o=".html";if(t.endsWith("/"))return void(window.location.href=`${t}${n}${o}`);const r=t.split("#");if(r.length>0&&!r[0].endsWith(o))return r[0]+=o,void(window.location.href=r.join("#"));window.location.href=t}}))},3615:(e,t,n)=>{"use strict";function o(){}n.d(t,{Z:()=>o})},4654:()=>{}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=t,o.amdO={},e=[],o.O=(t,n,r,i)=>{if(!n){var a=1/0;for(d=0;d<e.length;d++){for(var[n,r,i]=e[d],c=!0,l=0;l<n.length;l++)(!1&i||a>=i)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(c=!1,i<a&&(a=i));if(c){e.splice(d--,1);var s=r();void 0!==s&&(t=s)}}return t}i=i||0;for(var d=e.length;d>0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={143:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[a,c,l]=n,s=0;if(a.some((t=>0!==e[t]))){for(r in c)o.o(c,r)&&(o.m[r]=c[r]);if(l)var d=l(o)}for(t&&t(n);s<a.length;s++)i=a[s],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(d)},n=self.webpackChunk_diplodoc_client=self.webpackChunk_diplodoc_client||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[514,736],(()=>o(5816)));r=o.O(r)})();
1
+ (()=>{var e,t={3616:(e,t,n)=>{"use strict";var o=n(7294),r=n(745),i=n(7725),a=n(7537),c=n(7332),l=n(293),s=n(8534),d=n(9609),u=n(4990);const m=(0,o.memo)((({mobileView:e,theme:t,onChangeTheme:n,textSize:r,onChangeTextSize:i,wideFormat:a,onChangeWideFormat:c,showMiniToc:l,onChangeShowMiniToc:m})=>o.createElement(d.C,{controlClassName:"Control",controlSize:s.$D.L,isWideView:e,isMobileView:e},o.createElement(u.Z,{className:"Controls",theme:t,onChangeTheme:n,wideFormat:a,onChangeWideFormat:c,showMiniToc:l,onChangeShowMiniToc:m,textSize:r,onChangeTextSize:i}))));function h(e){return"boolean"==typeof e?e:!!e&&"true"===e}m.displayName="HeaderControls";const f=(0,n(2853).Z)("Layout");function w(){return null}function g(){return null}function p(){return null}const S=e=>{const{children:t,doc:n}=e;let r,i,a;return o.Children.forEach(t,(e=>{switch(e.type){case w:r=e.props.children;break;case g:i=e.props.children;break;case p:a=e.props.children}})),o.createElement("div",{className:f()},r&&o.createElement("div",{className:f("header")},r),o.createElement("div",{className:f("body")},i&&o.createElement("div",{className:f("content")},i),a&&o.createElement("div",{className:f("footer",{doc:n})},a)))};S.displayName="Layout",S.defaultProps={doc:!1},S.Header=w,S.Content=g,S.Footer=p;const v={theme:s.Q2.Light,textSize:s.tF.M,showMiniToc:!0,wideFormat:!0,fullScreen:!1};function y(e){if("undefined"==typeof sessionStorage)return v[e];try{return sessionStorage.getItem(e)||v[e]}catch{return v[e]}}function b(e,t){return n=>{!function(e,t){try{sessionStorage.setItem(e,String(t))}catch{}}(e,n),t(n)}}n(9380),n(8648);var E=n(5289),C=n(9295),T=n(5584);function M(e){const{data:t,...n}=e,r=t.leading?c.IU:l.Z;return o.createElement(S,null,o.createElement(S.Content,null,o.createElement(r,Object.assign({},t,n))))}function F(e){const t={...e};return function(e){return Array.isArray(e.items)}(e)&&(t.items=e.items.map(F)),void 0!==e.url&&(t.url=e.url.replace(/^\/?/,"/")),t}function _(e){const{data:t,router:n,lang:r}=e,{navigation:c}=t.toc,l=function(){const e=function(){const e=y("theme"),t=y("textSize"),n=y("showMiniToc"),o=y("wideFormat"),r=y("fullScreen");return{theme:e,textSize:t,showMiniToc:h(n),wideFormat:h(o),fullScreen:h(r)}}(),[t,n]=(0,o.useState)(e.wideFormat),[r,i]=(0,o.useState)(e.fullScreen),[a,c]=(0,o.useState)(e.showMiniToc),[l,s]=(0,o.useState)(e.theme),[d,u]=(0,o.useState)(e.textSize);return{theme:l,onChangeTheme:b("theme",s),textSize:d,onChangeTextSize:b("textSize",u),wideFormat:t,onChangeWideFormat:b("wideFormat",n),showMiniToc:a,onChangeShowMiniToc:b("showMiniToc",c),fullScreen:r,onChangeFullScreen:b("fullScreen",i)}}(),d=function(){const[e,t]=(0,o.useState)("undefined"!=typeof document&&document.body.clientWidth<769),n=(0,o.useCallback)((()=>{t(document.body.clientWidth<769)}),[]);return(0,o.useEffect)(n,[n]),(0,o.useEffect)((()=>(window.addEventListener("resize",n),()=>window.removeEventListener("resize",n))),[n]),e}(),{theme:u,textSize:f,wideFormat:w,fullScreen:g,showMiniToc:p,onChangeFullScreen:S}=l,v=!g&&Boolean(c),_={headerHeight:v?64:0,data:t,router:n,lang:r,wideFormat:w,showMiniToc:p,theme:u,textSize:f,fullScreen:g,onChangeFullScreen:S};if((0,o.useEffect)((()=>{!function({theme:e,mobileView:t=!1,wideFormat:n=!1,fullHeader:o=!1}){document.body.className=["g-root",t?"mobile":"desktop",n&&"dc-root_wide-format",o&&"dc-root_full-header","light"===e&&"g-root_theme_light","dark"===e&&"g-root_theme_dark"].filter(Boolean).join(" ")}({theme:u,mobileView:d,wideFormat:w,fullHeader:v})}),[u,d,w,v]),!c)return o.createElement("div",{className:"App"},o.createElement(M,Object.assign({},_,l)));const{header:x={},logo:O}=c,{leftItems:z=[],rightItems:k=[]}=x,j=k.some((e=>"controls"===e.type));return o.createElement("div",{className:"App"},o.createElement(i.W,{theme:u},o.createElement(a.C,{custom:{navigation:{controls:()=>o.createElement(m,Object.assign({},l,{mobileView:d}))},blocks:{page:()=>o.createElement(M,Object.assign({},_,j?{}:l))}},content:{blocks:[{type:"page"}]},navigation:v?{header:{withBorder:!0,leftItems:z.map(F),rightItems:k.map(F)},logo:O}:void 0})),o.createElement(T.r,null),o.createElement(C.S,null),o.createElement(E.u,{theme:u===s.Q2.Dark?"dark":"neutral",zoom:{showMenu:!0,bindKeys:!0}}))}const x=document.getElementById("root"),O=window.__DATA__;if(!x)throw new Error("Root element not found!");window.STATIC_CONTENT?(0,r.a)(x,o.createElement(_,O)):(0,r.s)(x).render(o.createElement(_,O))},9380:()=>{"undefined"!=typeof Element&&function(e){const t=e.matches||e.matchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector;e.matches=e.matchesSelector=t||function(e){const t=this;return Array.prototype.some.call(document.querySelectorAll(e),(e=>e===t))}}(Element.prototype),"undefined"!=typeof document&&document.addEventListener("click",(e=>{const t=e.target.href,n=window.location.origin;if(e.target.matches(".dc-doc-layout__center a")&&t.startsWith(n)){e.preventDefault();const n="index",o=".html";if(t.endsWith("/"))return void(window.location.href=`${t}${n}${o}`);const r=t.split("#");if(r.length>0&&!r[0].endsWith(o))return r[0]+=o,void(window.location.href=r.join("#"));window.location.href=t}}))},3615:(e,t,n)=>{"use strict";function o(){}n.d(t,{Z:()=>o})},4654:()=>{}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=t,o.amdO={},e=[],o.O=(t,n,r,i)=>{if(!n){var a=1/0;for(d=0;d<e.length;d++){for(var[n,r,i]=e[d],c=!0,l=0;l<n.length;l++)(!1&i||a>=i)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(c=!1,i<a&&(a=i));if(c){e.splice(d--,1);var s=r();void 0!==s&&(t=s)}}return t}i=i||0;for(var d=e.length;d>0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={143:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[a,c,l]=n,s=0;if(a.some((t=>0!==e[t]))){for(r in c)o.o(c,r)&&(o.m[r]=c[r]);if(l)var d=l(o)}for(t&&t(n);s<a.length;s++)i=a[s],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(d)},n=self.webpackChunk_diplodoc_client=self.webpackChunk_diplodoc_client||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[514,736],(()=>o(3616)));r=o.O(r)})();
2
2
  //# sourceMappingURL=app.js.map