Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zero-md-docs

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zero-md-docs - npm Package Compare versions

Comparing version 1.0.0-next.1 to 1.0.0-next.3

10

dist/index.js

@@ -1,9 +0,1 @@

var J=Object.defineProperty;var Q=(e,t,n)=>t in e?J(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var P=(e,t,n)=>(Q(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function v(){}function W(e){return e()}function D(){return Object.create(null)}function E(e){e.forEach(W)}function F(e){return typeof e=="function"}function X(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let L;function I(e,t){return e===t?!0:(L||(L=document.createElement("a")),L.href=t,e===L.href)}function Y(e){return Object.keys(e).length===0}function g(e,t){e.appendChild(t)}function K(e,t,n){e.insertBefore(t,n||null)}function j(e){e.parentNode&&e.parentNode.removeChild(e)}function ee(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function b(e){return document.createElement(e)}function V(e){return document.createTextNode(e)}function S(){return V(" ")}function T(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function _(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function O(e,t,n){const r=t.toLowerCase();r in e?e[r]=typeof e[r]=="boolean"&&n===""?!0:n:t in e?e[t]=typeof e[t]=="boolean"&&n===""?!0:n:_(e,t,n)}function te(e){return Array.from(e.childNodes)}function q(e,t,n){e.classList.toggle(t,!!n)}let M;function k(e){M=e}const w=[],B=[];let $=[];const R=[],ne=Promise.resolve();let A=!1;function re(){A||(A=!0,ne.then(G))}function N(e){$.push(e)}const C=new Set;let y=0;function G(){if(y!==0)return;const e=M;do{try{for(;y<w.length;){const t=w[y];y++,k(t),oe(t.$$)}}catch(t){throw w.length=0,y=0,t}for(k(null),w.length=0,y=0;B.length;)B.pop()();for(let t=0;t<$.length;t+=1){const n=$[t];C.has(n)||(C.add(n),n())}$.length=0}while(w.length);for(;R.length;)R.pop()();A=!1,C.clear(),k(e)}function oe(e){if(e.fragment!==null){e.update(),E(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(N)}}function le(e){const t=[],n=[];$.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),$=t}const se=new Set;function ce(e,t){e&&e.i&&(se.delete(e),e.i(t))}function U(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function ie(e,t,n){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),N(()=>{const l=e.$$.on_mount.map(W).filter(F);e.$$.on_destroy?e.$$.on_destroy.push(...l):E(l),e.$$.on_mount=[]}),o.forEach(N)}function fe(e,t){const n=e.$$;n.fragment!==null&&(le(n.after_update),E(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ue(e,t){e.$$.dirty[0]===-1&&(w.push(e),re(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ae(e,t,n,r,o,l,c=null,p=[-1]){const d=M;k(e);const s=e.$$={fragment:null,ctx:[],props:l,update:v,not_equal:o,bound:D(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(d?d.$$.context:[])),callbacks:D(),dirty:p,skip_bound:!1,root:t.target||d.$$.root};c&&c(s.root);let m=!1;if(s.ctx=n?n(e,t.props||{},(u,h,...i)=>{const f=i.length?i[0]:h;return s.ctx&&o(s.ctx[u],s.ctx[u]=f)&&(!s.skip_bound&&s.bound[u]&&s.bound[u](f),m&&ue(e,u)),h}):[],s.update(),m=!0,E(s.before_update),s.fragment=r?r(s.ctx):!1,t.target){if(t.hydrate){const u=te(t.target);s.fragment&&s.fragment.l(u),u.forEach(j)}else s.fragment&&s.fragment.c();t.intro&&ce(e.$$.fragment),ie(e,t.target,t.anchor),G()}k(d)}class de{constructor(){P(this,"$$");P(this,"$$set")}$destroy(){fe(this,1),this.$destroy=v}$on(t,n){if(!F(n))return v;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const o=r.indexOf(n);o!==-1&&r.splice(o,1)}}$set(t){this.$$set&&!Y(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const he="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(he);function Z(e,t,n){const r=e.slice();return r[5]=t[n][0],r[6]=t[n][1],r[7]=t[n][2],r}function H(e){let t,n,r=e[5]+"",o,l;return{c(){t=b("li"),n=b("a"),o=V(r),l=S(),_(n,"class","flex h-full w-full items-center justify-center px-4 text-sm hover:bg-blue-100 lg:justify-start dark:hover:bg-blue-800"),_(n,"data-title",e[7]),_(n,"href",e[6]),q(n,"font-bold",e[6].split("/").pop()===e[0]),_(t,"class","h-10")},m(c,p){K(c,t,p),g(t,n),g(n,o),g(t,l)},p(c,p){p&3&&q(n,"font-bold",c[6].split("/").pop()===c[0])},d(c){c&&j(t)}}}function pe(e){let t,n,r,o,l,c,p,d,s,m,u,h=U(e[1]),i=[];for(let f=0;f<h.length;f+=1)i[f]=H(Z(e,h,f));return{c(){t=b("div"),n=b("ul");for(let f=0;f<i.length;f+=1)i[f].c();r=S(),o=b("div"),l=b("zero-md"),c=b("template"),c.innerHTML=`<style>.markdown-body {
box-sizing: border-box;
padding: 45px;
}
@media (max-width: 767px) {
.markdown-body {
padding: 15px;
}
}</style>`,p=S(),d=b("script"),d.textContent="Page not found!",_(n,"class","mb-2 w-full rounded border border-gray-200 bg-white md:float-right lg:sticky lg:top-0 lg:w-[256px] dark:border-gray-800 dark:bg-gray-950 dark:text-gray-100"),_(c,"data-append",""),_(d,"type","text/markdown"),O(l,"class","w-full rounded border border-gray-200 dark:border-gray-800"),I(l.src,s=e[0])||O(l,"src",s),_(o,"class","w-full lg:pr-[264px]"),_(t,"class","relative mx-auto max-w-screen-xl px-2 pb-12 pt-2")},m(f,x){K(f,t,x),g(t,n);for(let a=0;a<i.length;a+=1)i[a]&&i[a].m(n,null);g(t,r),g(t,o),g(o,l),g(l,c),g(l,p),g(l,d),m||(u=[T(window,"popstate",e[2]),T(window,"click",e[3])],m=!0)},p(f,[x]){if(x&3){h=U(f[1]);let a;for(a=0;a<h.length;a+=1){const z=Z(f,h,a);i[a]?i[a].p(z,x):(i[a]=H(z),i[a].c(),i[a].m(n,null))}for(;a<i.length;a+=1)i[a].d(1);i.length=h.length}x&1&&!I(l.src,s=f[0])&&O(l,"src",s)},i:v,o:v,d(f){f&&j(t),ee(i,f),m=!1,E(u)}}}function me(e,t,n){ZeroMdDocsConfig=ZeroMdDocsConfig||{links:[["Home","readme.md"]]};const{links:r}=ZeroMdDocsConfig,o=location.origin+location.pathname;function l(){const s=new URL(location.href).searchParams.get("p")||"readme.md",m=r.find(u=>u[1]===s);if(m){const[u,h,i]=m;document.title=i||u,n(0,p=h)}else document.title="404",n(0,p="")}function c(d){const s=d.composedPath()[0].closest("a");if(s&&s.href.startsWith(o)&&s.href.endsWith(".md")){d.preventDefault();const m=new URL(location.href),u=s.href.split("/").pop();u==="readme.md"?m.searchParams.delete("p"):m.searchParams.set("p",u);const h=d.target.getAttribute("data-title")||d.target.text;document.title=h,history.pushState({title:h},"",m.toString()),n(0,p=u),scrollTo(0,0)}}let p="";return l(),[p,r,l,c]}class ge extends de{constructor(t){super(),ae(this,t,me,pe,X,{})}}new ge({target:document.getElementById("app")});
var X=Object.defineProperty;var Y=(e,t,n)=>t in e?X(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var z=(e,t,n)=>(Y(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&o(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();function L(){}function V(e){return e()}function U(){return Object.create(null)}function O(e){e.forEach(V)}function G(e){return typeof e=="function"}function ee(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let P;function q(e,t){return e===t?!0:(P||(P=document.createElement("a")),P.href=t,e===P.href)}function te(e){return Object.keys(e).length===0}function _(e,t){e.appendChild(t)}function N(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode&&e.parentNode.removeChild(e)}function ne(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function b(e){return document.createElement(e)}function J(e){return document.createTextNode(e)}function C(){return J(" ")}function B(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function y(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function H(e,t,n){const o=t.toLowerCase();o in e?e[o]=typeof e[o]=="boolean"&&n===""?!0:n:t in e?e[t]=typeof e[t]=="boolean"&&n===""?!0:n:y(e,t,n)}function oe(e){return Array.from(e.childNodes)}function R(e,t,n){e.classList.toggle(t,!!n)}let D;function E(e){D=e}const k=[],T=[];let v=[];const Z=[],re=Promise.resolve();let M=!1;function se(){M||(M=!0,re.then(Q))}function j(e){v.push(e)}const A=new Set;let x=0;function Q(){if(x!==0)return;const e=D;do{try{for(;x<k.length;){const t=k[x];x++,E(t),le(t.$$)}}catch(t){throw k.length=0,x=0,t}for(E(null),k.length=0,x=0;T.length;)T.pop()();for(let t=0;t<v.length;t+=1){const n=v[t];A.has(n)||(A.add(n),n())}v.length=0}while(k.length);for(;Z.length;)Z.pop()();M=!1,A.clear(),E(e)}function le(e){if(e.fragment!==null){e.update(),O(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(j)}}function ce(e){const t=[],n=[];v.forEach(o=>e.indexOf(o)===-1?t.push(o):n.push(o)),n.forEach(o=>o()),v=t}const ie=new Set;function fe(e,t){e&&e.i&&(ie.delete(e),e.i(t))}function W(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function ue(e,t,n){const{fragment:o,after_update:r}=e.$$;o&&o.m(t,n),j(()=>{const s=e.$$.on_mount.map(V).filter(G);e.$$.on_destroy?e.$$.on_destroy.push(...s):O(s),e.$$.on_mount=[]}),r.forEach(j)}function de(e,t){const n=e.$$;n.fragment!==null&&(ce(n.after_update),O(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ae(e,t){e.$$.dirty[0]===-1&&(k.push(e),se(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function he(e,t,n,o,r,s,i=null,c=[-1]){const h=D;E(e);const l=e.$$={fragment:null,ctx:[],props:s,update:L,not_equal:r,bound:U(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(h?h.$$.context:[])),callbacks:U(),dirty:c,skip_bound:!1,root:t.target||h.$$.root};i&&i(l.root);let m=!1;if(l.ctx=n?n(e,t.props||{},(f,p,...w)=>{const g=w.length?w[0]:p;return l.ctx&&r(l.ctx[f],l.ctx[f]=g)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](g),m&&ae(e,f)),p}):[],l.update(),m=!0,O(l.before_update),l.fragment=o?o(l.ctx):!1,t.target){if(t.hydrate){const f=oe(t.target);l.fragment&&l.fragment.l(f),f.forEach(S)}else l.fragment&&l.fragment.c();t.intro&&fe(e.$$.fragment),ue(e,t.target,t.anchor),Q()}E(h)}class me{constructor(){z(this,"$$");z(this,"$$set")}$destroy(){de(this,1),this.$destroy=L}$on(t,n){if(!G(n))return L;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(n),()=>{const r=o.indexOf(n);r!==-1&&o.splice(r,1)}}$set(t){this.$$set&&!te(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const pe="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(pe);function F(e,t,n){const o=e.slice();return o[1]=t[n][0],o[6]=t[n][1],o[7]=t[n][2],o}function K(e){let t,n,o=e[1]+"",r,s;return{c(){t=b("li"),n=b("a"),r=J(o),s=C(),y(n,"class","zmdocs-link"),y(n,"data-title",e[7]),y(n,"href",e[6]),R(n,"font-bold",e[6].split("/").pop()===e[0])},m(i,c){N(i,t,c),_(t,n),_(n,r),_(t,s)},p(i,c){c&5&&R(n,"font-bold",i[6].split("/").pop()===i[0])},d(i){i&&S(t)}}}function ge(e){let t,n,o,r,s,i,c,h,l,m,f,p,w;document.title=t=e[1];let g=W(e[2]),a=[];for(let u=0;u<g.length;u+=1)a[u]=K(F(e,g,u));return{c(){n=C(),o=b("div"),r=b("ul");for(let u=0;u<a.length;u+=1)a[u].c();s=C(),i=b("div"),c=b("zero-md"),h=b("template"),h.innerHTML="<style>.markdown-body{box-sizing:border-box;padding:45px;}@media(max-width:767px){.markdown-body{padding:15px;}}</style>",l=C(),m=b("script"),m.textContent="Page not found!",y(r,"class","zmdocs-menu"),y(h,"data-append",""),y(m,"type","text/markdown"),q(c.src,f=e[0])||H(c,"src",f),y(i,"class","zmdocs-content"),y(o,"class","zmdocs-container")},m(u,$){N(u,n,$),N(u,o,$),_(o,r);for(let d=0;d<a.length;d+=1)a[d]&&a[d].m(r,null);_(o,s),_(o,i),_(i,c),_(c,h),_(c,l),_(c,m),p||(w=[B(window,"popstate",e[3]),B(window,"click",e[4])],p=!0)},p(u,[$]){if($&2&&t!==(t=u[1])&&(document.title=t),$&5){g=W(u[2]);let d;for(d=0;d<g.length;d+=1){const I=F(u,g,d);a[d]?a[d].p(I,$):(a[d]=K(I),a[d].c(),a[d].m(r,null))}for(;d<a.length;d+=1)a[d].d(1);a.length=g.length}$&1&&!q(c.src,f=u[0])&&H(c,"src",f)},i:L,o:L,d(u){u&&(S(n),S(o)),ne(a,u),p=!1,O(w)}}}function _e(e,t,n){ZeroMdDocsConfig=ZeroMdDocsConfig||{links:[["Home","readme.md"]]};const{links:o}=ZeroMdDocsConfig,r=location.origin+location.pathname;function s(){const m=new URL(location.href).searchParams.get("p")||"readme.md",f=o.find(p=>p[1]===m);if(f){const[p,w,g]=f;n(1,c=g||p||"Home"),n(0,h=w)}else n(1,c="404"),n(0,h="")}function i(l){const m=l.composedPath()[0].closest("a");if(m&&m.href.startsWith(r)&&m.href.endsWith(".md")){l.preventDefault();const f=new URL(location.href),p=m.href.split("/").pop();p==="readme.md"?f.searchParams.delete("p"):f.searchParams.set("p",p),n(1,c=l.target.getAttribute("data-title")||l.target.text),history.pushState({title:c},"",f.toString()),scrollTo(0,0),n(0,h=p)}}let c="",h="";return s(),[h,c,o,s,i]}class ye extends me{constructor(t){super(),he(this,t,_e,ge,ee,{})}}new ye({target:document.getElementById("app")});

6

package.json
{
"name": "zero-md-docs",
"version": "1.0.0-next.1",
"version": "1.0.0-next.3",
"description": "Instantly publish markdown from Github docs folder",

@@ -8,3 +8,4 @@ "author": "Jason Lee <jason@zerodevx.com>",

"dev": "vite",
"build": "npm run lint && vite build && cd dist && rm *.* && mv assets/*.js index.js && mv assets/*.css default.css && rmdir assets",
"build": "npm run lint && vite build && npm run build:transform && npx publint",
"build:transform": "cd dist && rm *.* && mv assets/*.js index.js && mv assets/*.css default.css && rmdir assets",
"format": "prettier --write .",

@@ -38,5 +39,4 @@ "lint": "prettier --check . && eslint src/**/*.js"

"markdown-to-html",
"ejs-templates",
"zero-md"
]
}

@@ -33,3 +33,3 @@ # zero-md-docs

### Create `index.html`
### Create `index.html` and define site links

@@ -36,0 +36,0 @@ Copy and paste the following `index.html` into `docs/` folder:

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc