diff --git a/demo-mkdocs/docs/index.md b/demo-mkdocs/docs/index.md index cec8cd8..235e92f 100644 --- a/demo-mkdocs/docs/index.md +++ b/demo-mkdocs/docs/index.md @@ -4,8 +4,9 @@ A MkDocs plugin supports for add [Swagger UI](https://github.com/swagger-api/swa ## Features -1. Multiple OpenAPI Specification file source: url, static file in docs +1. OpenAPI Specification file from online over URL or static file in docs 2. Multiple Swagger UI in same page +3. Synchronized dark mode with [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) ## Dependency @@ -39,7 +40,7 @@ A MkDocs plugin supports for add [Swagger UI](https://github.com/swagger-api/swa | Option | Default | Description | |------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------| - | background | White | Swagger UI iframe body background attribute value. You can use any css value for background for example "#74b9ff" or Gainsboro or "" for nothing. | + | background | "" | Swagger UI iframe body background attribute value. You can use any css value for background for example "#74b9ff" or Gainsboro or "" for nothing. | 4. Add ```swagger-ui``` tag in markdown to include Swagger UI @@ -52,3 +53,7 @@ A MkDocs plugin supports for add [Swagger UI](https://github.com/swagger-api/swa ## License This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/Blueswen/mkdocs-swagger-ui-tag/blob/main/LICENSE) file for details. + +## Reference + +1. [Amoenus Swagger Dark Theme](https://github.com/Amoenus/SwaggerDark/): source of dark mode css diff --git a/demo-mkdocs/docs/sample.png b/demo-mkdocs/docs/sample.png index 0139720..f518dc7 100644 Binary files a/demo-mkdocs/docs/sample.png and b/demo-mkdocs/docs/sample.png differ diff --git a/demo-mkdocs/mkdocs.yml b/demo-mkdocs/mkdocs.yml index 92dfa58..ea861a8 100644 --- a/demo-mkdocs/mkdocs.yml +++ b/demo-mkdocs/mkdocs.yml @@ -10,6 +10,26 @@ theme: name: material features: - toc.integrate + palette: + # Palette toggle for automatic mode + - media: "(prefers-color-scheme)" + toggle: + icon: material/brightness-auto + name: Switch to light mode + + # Palette toggle for light mode + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/brightness-7 + name: Switch to dark mode + + # Palette toggle for dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/brightness-4 + name: Switch to system preference markdown_extensions: - pymdownx.highlight: diff --git a/docs/404.html b/docs/404.html index 93285cd..923bd4c 100644 --- a/docs/404.html +++ b/docs/404.html @@ -12,7 +12,7 @@ - + @@ -20,7 +20,7 @@ - + @@ -52,10 +52,12 @@ + + - + @@ -68,7 +70,6 @@ - @@ -110,6 +111,40 @@ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + @@ -343,10 +378,10 @@

404 - Not found

- + - + diff --git a/docs/assets/javascripts/bundle.fdb661c6.min.js b/docs/assets/javascripts/bundle.ba7fc6cf.min.js similarity index 65% rename from docs/assets/javascripts/bundle.fdb661c6.min.js rename to docs/assets/javascripts/bundle.ba7fc6cf.min.js index bbd236b..11a1a87 100644 --- a/docs/assets/javascripts/bundle.fdb661c6.min.js +++ b/docs/assets/javascripts/bundle.ba7fc6cf.min.js @@ -1,3 +1,3 @@ -(()=>{var la=Object.create;var _r=Object.defineProperty;var ua=Object.getOwnPropertyDescriptor;var ma=Object.getOwnPropertyNames,jt=Object.getOwnPropertySymbols,da=Object.getPrototypeOf,Mr=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable;var ln=(e,t,r)=>t in e?_r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,H=(e,t)=>{for(var r in t||(t={}))Mr.call(t,r)&&ln(e,r,t[r]);if(jt)for(var r of jt(t))un.call(t,r)&&ln(e,r,t[r]);return e};var mn=(e,t)=>{var r={};for(var n in e)Mr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&jt)for(var n of jt(e))t.indexOf(n)<0&&un.call(e,n)&&(r[n]=e[n]);return r};var wt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ha=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ma(t))!Mr.call(e,o)&&o!==r&&_r(e,o,{get:()=>t[o],enumerable:!(n=ua(t,o))||n.enumerable});return e};var rt=(e,t,r)=>(r=e!=null?la(da(e)):{},ha(t||!e||!e.__esModule?_r(r,"default",{value:e,enumerable:!0}):r,e));var hn=wt((Lr,dn)=>{(function(e,t){typeof Lr=="object"&&typeof dn!="undefined"?t():typeof define=="function"&&define.amd?define(t):t()})(Lr,function(){"use strict";function e(r){var n=!0,o=!1,i=null,a={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function s(M){return!!(M&&M!==document&&M.nodeName!=="HTML"&&M.nodeName!=="BODY"&&"classList"in M&&"contains"in M.classList)}function c(M){var ze=M.type,Ue=M.tagName;return!!(Ue==="INPUT"&&a[ze]&&!M.readOnly||Ue==="TEXTAREA"&&!M.readOnly||M.isContentEditable)}function p(M){M.classList.contains("focus-visible")||(M.classList.add("focus-visible"),M.setAttribute("data-focus-visible-added",""))}function f(M){!M.hasAttribute("data-focus-visible-added")||(M.classList.remove("focus-visible"),M.removeAttribute("data-focus-visible-added"))}function l(M){M.metaKey||M.altKey||M.ctrlKey||(s(r.activeElement)&&p(r.activeElement),n=!0)}function m(M){n=!1}function d(M){!s(M.target)||(n||c(M.target))&&p(M.target)}function h(M){!s(M.target)||(M.target.classList.contains("focus-visible")||M.target.hasAttribute("data-focus-visible-added"))&&(o=!0,window.clearTimeout(i),i=window.setTimeout(function(){o=!1},100),f(M.target))}function b(M){document.visibilityState==="hidden"&&(o&&(n=!0),U())}function U(){document.addEventListener("mousemove",V),document.addEventListener("mousedown",V),document.addEventListener("mouseup",V),document.addEventListener("pointermove",V),document.addEventListener("pointerdown",V),document.addEventListener("pointerup",V),document.addEventListener("touchmove",V),document.addEventListener("touchstart",V),document.addEventListener("touchend",V)}function Z(){document.removeEventListener("mousemove",V),document.removeEventListener("mousedown",V),document.removeEventListener("mouseup",V),document.removeEventListener("pointermove",V),document.removeEventListener("pointerdown",V),document.removeEventListener("pointerup",V),document.removeEventListener("touchmove",V),document.removeEventListener("touchstart",V),document.removeEventListener("touchend",V)}function V(M){M.target.nodeName&&M.target.nodeName.toLowerCase()==="html"||(n=!1,Z())}document.addEventListener("keydown",l,!0),document.addEventListener("mousedown",m,!0),document.addEventListener("pointerdown",m,!0),document.addEventListener("touchstart",m,!0),document.addEventListener("visibilitychange",b,!0),U(),r.addEventListener("focus",d,!0),r.addEventListener("blur",h,!0),r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host?r.host.setAttribute("data-js-focus-visible",""):r.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if(typeof window!="undefined"&&typeof document!="undefined"){window.applyFocusVisiblePolyfill=e;var t;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(r){t=document.createEvent("CustomEvent"),t.initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}typeof document!="undefined"&&e(document)})});var bn=wt(Ar=>{(function(e){var t=function(){try{return!!Symbol.iterator}catch(p){return!1}},r=t(),n=function(p){var f={next:function(){var l=p.shift();return{done:l===void 0,value:l}}};return r&&(f[Symbol.iterator]=function(){return f}),f},o=function(p){return encodeURIComponent(p).replace(/%20/g,"+")},i=function(p){return decodeURIComponent(String(p).replace(/\+/g," "))},a=function(){var p=function(l){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var m=typeof l;if(m!=="undefined")if(m==="string")l!==""&&this._fromString(l);else if(l instanceof p){var d=this;l.forEach(function(Z,V){d.append(V,Z)})}else if(l!==null&&m==="object")if(Object.prototype.toString.call(l)==="[object Array]")for(var h=0;hd[0]?1:0}),p._entries&&(p._entries={});for(var l=0;l1?i(d[1]):"")}})})(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:Ar);(function(e){var t=function(){try{var o=new e.URL("b","http://a");return o.pathname="c d",o.href==="http://a/c%20d"&&o.searchParams}catch(i){return!1}},r=function(){var o=e.URL,i=function(c,p){typeof c!="string"&&(c=String(c)),p&&typeof p!="string"&&(p=String(p));var f=document,l;if(p&&(e.location===void 0||p!==e.location.href)){p=p.toLowerCase(),f=document.implementation.createHTMLDocument(""),l=f.createElement("base"),l.href=p,f.head.appendChild(l);try{if(l.href.indexOf(p)!==0)throw new Error(l.href)}catch(M){throw new Error("URL unable to set base "+p+" due to "+M)}}var m=f.createElement("a");m.href=c,l&&(f.body.appendChild(m),m.href=m.href);var d=f.createElement("input");if(d.type="url",d.value=c,m.protocol===":"||!/:/.test(m.href)||!d.checkValidity()&&!p)throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:m});var h=new e.URLSearchParams(this.search),b=!0,U=!0,Z=this;["append","delete","set"].forEach(function(M){var ze=h[M];h[M]=function(){ze.apply(h,arguments),b&&(U=!1,Z.search=h.toString(),U=!0)}}),Object.defineProperty(this,"searchParams",{value:h,enumerable:!0});var V=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==V&&(V=this.search,U&&(b=!1,this.searchParams._fromString(this.search),b=!0))}})},a=i.prototype,s=function(c){Object.defineProperty(a,c,{get:function(){return this._anchorElement[c]},set:function(p){this._anchorElement[c]=p},enumerable:!0})};["hash","host","hostname","port","protocol"].forEach(function(c){s(c)}),Object.defineProperty(a,"search",{get:function(){return this._anchorElement.search},set:function(c){this._anchorElement.search=c,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(a,{toString:{get:function(){var c=this;return function(){return c.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(c){this._anchorElement.href=c,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(c){this._anchorElement.pathname=c},enumerable:!0},origin:{get:function(){var c={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],p=this._anchorElement.port!=c&&this._anchorElement.port!=="";return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(p?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(c){},enumerable:!0},username:{get:function(){return""},set:function(c){},enumerable:!0}}),i.createObjectURL=function(c){return o.createObjectURL.apply(o,arguments)},i.revokeObjectURL=function(c){return o.revokeObjectURL.apply(o,arguments)},e.URL=i};if(t()||r(),e.location!==void 0&&!("origin"in e.location)){var n=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:n,enumerable:!0})}catch(o){setInterval(function(){e.location.origin=n()},100)}}})(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:Ar)});var jn=wt((rc,Wt)=>{var vn,gn,yn,xn,En,wn,Sn,On,Tn,Ft,Cr,_n,Mn,Ln,nt,An,Cn,kn,Rn,Hn,Pn,$n,In,Ut;(function(e){var t=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){e(r(t,r(n)))}):typeof Wt=="object"&&typeof Wt.exports=="object"?e(r(t,r(Wt.exports))):e(r(t));function r(n,o){return n!==t&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(i,a){return n[i]=o?o(i,a):a}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])};vn=function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(n,o);function i(){this.constructor=n}n.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)},gn=Object.assign||function(n){for(var o,i=1,a=arguments.length;i=0;f--)(p=n[f])&&(c=(s<3?p(c):s>3?p(o,i,c):p(o,i))||c);return s>3&&c&&Object.defineProperty(o,i,c),c},En=function(n,o){return function(i,a){o(i,a,n)}},wn=function(n,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,o)},Sn=function(n,o,i,a){function s(c){return c instanceof i?c:new i(function(p){p(c)})}return new(i||(i=Promise))(function(c,p){function f(d){try{m(a.next(d))}catch(h){p(h)}}function l(d){try{m(a.throw(d))}catch(h){p(h)}}function m(d){d.done?c(d.value):s(d.value).then(f,l)}m((a=a.apply(n,o||[])).next())})},On=function(n,o){var i={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},a,s,c,p;return p={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function f(m){return function(d){return l([m,d])}}function l(m){if(a)throw new TypeError("Generator is already executing.");for(;i;)try{if(a=1,s&&(c=m[0]&2?s.return:m[0]?s.throw||((c=s.return)&&c.call(s),0):s.next)&&!(c=c.call(s,m[1])).done)return c;switch(s=0,c&&(m=[m[0]&2,c.value]),m[0]){case 0:case 1:c=m;break;case 4:return i.label++,{value:m[1],done:!1};case 5:i.label++,s=m[1],m=[0];continue;case 7:m=i.ops.pop(),i.trys.pop();continue;default:if(c=i.trys,!(c=c.length>0&&c[c.length-1])&&(m[0]===6||m[0]===2)){i=0;continue}if(m[0]===3&&(!c||m[1]>c[0]&&m[1]=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},Cr=function(n,o){var i=typeof Symbol=="function"&&n[Symbol.iterator];if(!i)return n;var a=i.call(n),s,c=[],p;try{for(;(o===void 0||o-- >0)&&!(s=a.next()).done;)c.push(s.value)}catch(f){p={error:f}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(p)throw p.error}}return c},_n=function(){for(var n=[],o=0;o1||f(b,U)})})}function f(b,U){try{l(a[b](U))}catch(Z){h(c[0][3],Z)}}function l(b){b.value instanceof nt?Promise.resolve(b.value.v).then(m,d):h(c[0][2],b)}function m(b){f("next",b)}function d(b){f("throw",b)}function h(b,U){b(U),c.shift(),c.length&&f(c[0][0],c[0][1])}},Cn=function(n){var o,i;return o={},a("next"),a("throw",function(s){throw s}),a("return"),o[Symbol.iterator]=function(){return this},o;function a(s,c){o[s]=n[s]?function(p){return(i=!i)?{value:nt(n[s](p)),done:s==="return"}:c?c(p):p}:c}},kn=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=n[Symbol.asyncIterator],i;return o?o.call(n):(n=typeof Ft=="function"?Ft(n):n[Symbol.iterator](),i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i);function a(c){i[c]=n[c]&&function(p){return new Promise(function(f,l){p=n[c](p),s(f,l,p.done,p.value)})}}function s(c,p,f,l){Promise.resolve(l).then(function(m){c({value:m,done:f})},p)}},Rn=function(n,o){return Object.defineProperty?Object.defineProperty(n,"raw",{value:o}):n.raw=o,n};var r=Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o};Hn=function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var i in n)i!=="default"&&Object.prototype.hasOwnProperty.call(n,i)&&Ut(o,n,i);return r(o,n),o},Pn=function(n){return n&&n.__esModule?n:{default:n}},$n=function(n,o,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof o=="function"?n!==o||!a:!o.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(n):a?a.value:o.get(n)},In=function(n,o,i,a,s){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof o=="function"?n!==o||!s:!o.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?s.call(n,i):s?s.value=i:o.set(n,i),i},e("__extends",vn),e("__assign",gn),e("__rest",yn),e("__decorate",xn),e("__param",En),e("__metadata",wn),e("__awaiter",Sn),e("__generator",On),e("__exportStar",Tn),e("__createBinding",Ut),e("__values",Ft),e("__read",Cr),e("__spread",_n),e("__spreadArrays",Mn),e("__spreadArray",Ln),e("__await",nt),e("__asyncGenerator",An),e("__asyncDelegator",Cn),e("__asyncValues",kn),e("__makeTemplateObject",Rn),e("__importStar",Hn),e("__importDefault",Pn),e("__classPrivateFieldGet",$n),e("__classPrivateFieldSet",In)})});var rn=wt((Pt,tn)=>{(function(t,r){typeof Pt=="object"&&typeof tn=="object"?tn.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Pt=="object"?Pt.ClipboardJS=r():t.ClipboardJS=r()})(Pt,function(){return function(){var e={686:function(n,o,i){"use strict";i.d(o,{default:function(){return fa}});var a=i(279),s=i.n(a),c=i(370),p=i.n(c),f=i(817),l=i.n(f);function m(j){try{return document.execCommand(j)}catch(L){return!1}}var d=function(L){var T=l()(L);return m("cut"),T},h=d;function b(j){var L=document.documentElement.getAttribute("dir")==="rtl",T=document.createElement("textarea");T.style.fontSize="12pt",T.style.border="0",T.style.padding="0",T.style.margin="0",T.style.position="absolute",T.style[L?"right":"left"]="-9999px";var P=window.pageYOffset||document.documentElement.scrollTop;return T.style.top="".concat(P,"px"),T.setAttribute("readonly",""),T.value=j,T}var U=function(L,T){var P=b(L);T.container.appendChild(P);var I=l()(P);return m("copy"),P.remove(),I},Z=function(L){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},P="";return typeof L=="string"?P=U(L,T):L instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(L==null?void 0:L.type)?P=U(L.value,T):(P=l()(L),m("copy")),P},V=Z;function M(j){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(T){return typeof T}:M=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},M(j)}var ze=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=L.action,P=T===void 0?"copy":T,I=L.container,Q=L.target,Ae=L.text;if(P!=="copy"&&P!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(Q!==void 0)if(Q&&M(Q)==="object"&&Q.nodeType===1){if(P==="copy"&&Q.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(P==="cut"&&(Q.hasAttribute("readonly")||Q.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Ae)return V(Ae,{container:I});if(Q)return P==="cut"?h(Q):V(Q,{container:I})},Ue=ze;function Pe(j){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pe=function(T){return typeof T}:Pe=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},Pe(j)}function ra(j,L){if(!(j instanceof L))throw new TypeError("Cannot call a class as a function")}function fn(j,L){for(var T=0;T0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof I.action=="function"?I.action:this.defaultAction,this.target=typeof I.target=="function"?I.target:this.defaultTarget,this.text=typeof I.text=="function"?I.text:this.defaultText,this.container=Pe(I.container)==="object"?I.container:document.body}},{key:"listenClick",value:function(I){var Q=this;this.listener=p()(I,"click",function(Ae){return Q.onClick(Ae)})}},{key:"onClick",value:function(I){var Q=I.delegateTarget||I.currentTarget,Ae=this.action(Q)||"copy",It=Ue({action:Ae,container:this.container,target:this.target(Q),text:this.text(Q)});this.emit(It?"success":"error",{action:Ae,text:It,trigger:Q,clearSelection:function(){Q&&Q.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(I){return Tr("action",I)}},{key:"defaultTarget",value:function(I){var Q=Tr("target",I);if(Q)return document.querySelector(Q)}},{key:"defaultText",value:function(I){return Tr("text",I)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(I){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return V(I,Q)}},{key:"cut",value:function(I){return h(I)}},{key:"isSupported",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],Q=typeof I=="string"?[I]:I,Ae=!!document.queryCommandSupported;return Q.forEach(function(It){Ae=Ae&&!!document.queryCommandSupported(It)}),Ae}}]),T}(s()),fa=pa},828:function(n){var o=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}function a(s,c){for(;s&&s.nodeType!==o;){if(typeof s.matches=="function"&&s.matches(c))return s;s=s.parentNode}}n.exports=a},438:function(n,o,i){var a=i(828);function s(f,l,m,d,h){var b=p.apply(this,arguments);return f.addEventListener(m,b,h),{destroy:function(){f.removeEventListener(m,b,h)}}}function c(f,l,m,d,h){return typeof f.addEventListener=="function"?s.apply(null,arguments):typeof m=="function"?s.bind(null,document).apply(null,arguments):(typeof f=="string"&&(f=document.querySelectorAll(f)),Array.prototype.map.call(f,function(b){return s(b,l,m,d,h)}))}function p(f,l,m,d){return function(h){h.delegateTarget=a(h.target,l),h.delegateTarget&&d.call(f,h)}}n.exports=c},879:function(n,o){o.node=function(i){return i!==void 0&&i instanceof HTMLElement&&i.nodeType===1},o.nodeList=function(i){var a=Object.prototype.toString.call(i);return i!==void 0&&(a==="[object NodeList]"||a==="[object HTMLCollection]")&&"length"in i&&(i.length===0||o.node(i[0]))},o.string=function(i){return typeof i=="string"||i instanceof String},o.fn=function(i){var a=Object.prototype.toString.call(i);return a==="[object Function]"}},370:function(n,o,i){var a=i(879),s=i(438);function c(m,d,h){if(!m&&!d&&!h)throw new Error("Missing required arguments");if(!a.string(d))throw new TypeError("Second argument must be a String");if(!a.fn(h))throw new TypeError("Third argument must be a Function");if(a.node(m))return p(m,d,h);if(a.nodeList(m))return f(m,d,h);if(a.string(m))return l(m,d,h);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(m,d,h){return m.addEventListener(d,h),{destroy:function(){m.removeEventListener(d,h)}}}function f(m,d,h){return Array.prototype.forEach.call(m,function(b){b.addEventListener(d,h)}),{destroy:function(){Array.prototype.forEach.call(m,function(b){b.removeEventListener(d,h)})}}}function l(m,d,h){return s(document.body,m,d,h)}n.exports=c},817:function(n){function o(i){var a;if(i.nodeName==="SELECT")i.focus(),a=i.value;else if(i.nodeName==="INPUT"||i.nodeName==="TEXTAREA"){var s=i.hasAttribute("readonly");s||i.setAttribute("readonly",""),i.select(),i.setSelectionRange(0,i.value.length),s||i.removeAttribute("readonly"),a=i.value}else{i.hasAttribute("contenteditable")&&i.focus();var c=window.getSelection(),p=document.createRange();p.selectNodeContents(i),c.removeAllRanges(),c.addRange(p),a=c.toString()}return a}n.exports=o},279:function(n){function o(){}o.prototype={on:function(i,a,s){var c=this.e||(this.e={});return(c[i]||(c[i]=[])).push({fn:a,ctx:s}),this},once:function(i,a,s){var c=this;function p(){c.off(i,p),a.apply(s,arguments)}return p._=a,this.on(i,p,s)},emit:function(i){var a=[].slice.call(arguments,1),s=((this.e||(this.e={}))[i]||[]).slice(),c=0,p=s.length;for(c;c{"use strict";var Is=/["'&<>]/;Mi.exports=js;function js(e){var t=""+e,r=Is.exec(t);if(!r)return t;var n,o="",i=0,a=0;for(i=r.index;i{function e(o,i){parent.postMessage(o,i||"*")}function t(...o){return o.reduce((i,a)=>i.then(()=>new Promise(s=>{let c=document.createElement("script");c.src=a,c.addEventListener("load",()=>s()),document.body.appendChild(c)})),Promise.resolve())}function r(){let o=document.createElement("iframe");return o.width=o.height=o.frameBorder="0",o}var n=class{constructor(o,i){if(this.url=o,this.onerror=null,this.onmessage=null,this.onmessageerror=null,this.handleMessage=s=>{s.source===this.worker&&(s.stopImmediatePropagation(),this.dispatchEvent(new MessageEvent("message",{data:s.data})),this.onmessage&&this.onmessage(s))},this.handleError=(s,c,p,f,l)=>{if(c===this.url.toString()){let m=new ErrorEvent("error",{message:s,filename:c,lineno:p,colno:f,error:l});this.dispatchEvent(m),this.onerror&&this.onerror(m)}},typeof i!="undefined")throw new TypeError("Options are not supported for iframe workers");let a=new EventTarget;this.addEventListener=a.addEventListener.bind(a),this.removeEventListener=a.removeEventListener.bind(a),this.dispatchEvent=a.dispatchEvent.bind(a),document.body.appendChild(this.iframe=r()),this.worker.document.open(),this.worker.document.write(` - + @@ -51,6 +51,21 @@ +
+ + + + + + +
+
@@ -175,8 +190,8 @@

Markdown

<swagger-ui src="https://petstore.swagger.io/v2/swagger.json"/>

Swagger UI

-

-

+

+

@@ -215,25 +230,48 @@

Swagger UI

- - + + \ No newline at end of file diff --git a/docs/demo/multiple/swagger-2449924b.html b/docs/demo/multiple/swagger-2449924b.html new file mode 100644 index 0000000..2f3b8b5 --- /dev/null +++ b/docs/demo/multiple/swagger-2449924b.html @@ -0,0 +1,51 @@ + + + + + + Swagger UI + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/docs/demo/multiple/swagger-891d4dd2.html b/docs/demo/multiple/swagger-891d4dd2.html new file mode 100644 index 0000000..a4a4042 --- /dev/null +++ b/docs/demo/multiple/swagger-891d4dd2.html @@ -0,0 +1,51 @@ + + + + + + Swagger UI + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/docs/demo/multiple/swagger-9d470a87.html b/docs/demo/multiple/swagger-9d470a87.html deleted file mode 100644 index 1c2bd94..0000000 --- a/docs/demo/multiple/swagger-9d470a87.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - Swagger UI - - - - -
- - - - - - \ No newline at end of file diff --git a/docs/demo/multiple/swagger-c4d4ca9a.html b/docs/demo/multiple/swagger-c4d4ca9a.html deleted file mode 100644 index 9333ed6..0000000 --- a/docs/demo/multiple/swagger-c4d4ca9a.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - Swagger UI - - - - -
- - - - - - \ No newline at end of file diff --git a/docs/demo/static-file/index.html b/docs/demo/static-file/index.html index 1af4572..9e4b780 100644 --- a/docs/demo/static-file/index.html +++ b/docs/demo/static-file/index.html @@ -7,16 +7,16 @@ - + Static File - MkDocs Swagger UI Tag - + - + @@ -51,6 +51,21 @@ +
+ + + + + + +
+
@@ -174,7 +189,7 @@

Markdown

<swagger-ui src="./openapi-spec/sample.yaml"/>
 

Swagger UI

-

+

@@ -226,16 +241,48 @@

Swagger UI

- - + + \ No newline at end of file diff --git a/docs/demo/static-file/swagger-a160ded2.html b/docs/demo/static-file/swagger-a160ded2.html deleted file mode 100644 index a9acf5d..0000000 --- a/docs/demo/static-file/swagger-a160ded2.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - Swagger UI - - - - -
- - - - - - \ No newline at end of file diff --git a/docs/demo/static-file/swagger-b1b2ad69.html b/docs/demo/static-file/swagger-b1b2ad69.html new file mode 100644 index 0000000..8dc103e --- /dev/null +++ b/docs/demo/static-file/swagger-b1b2ad69.html @@ -0,0 +1,51 @@ + + + + + + Swagger UI + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index c1d43b0..900ce34 100644 --- a/docs/index.html +++ b/docs/index.html @@ -7,16 +7,16 @@ - + MkDocs Swagger UI Tag - + - + @@ -51,6 +51,21 @@
+
+ + + + + + +
+
@@ -134,6 +149,13 @@ +
  • + + + Reference + + +
  • @@ -186,8 +208,9 @@

    MkDocs Swagger UI Tag

    A MkDocs plugin supports for add Swagger UI in page.

    Features

      -
    1. Multiple OpenAPI Specification file source: url, static file in docs
    2. +
    3. OpenAPI Specification file from online over URL or static file in docs
    4. Multiple Swagger UI in same page
    5. +
    6. Synchronized dark mode with mkdocs-material

    Dependency

      @@ -230,7 +253,7 @@

      Usage

      background -White +"" Swagger UI iframe body background attribute value. You can use any css value for background for example "#74b9ff" or Gainsboro or "" for nothing. @@ -245,6 +268,10 @@

      Usage

    License

    This project is licensed under the MIT License - see the LICENSE.md file for details.

    +

    Reference

    +
      +
    1. Amoenus Swagger Dark Theme: source of dark mode css
    2. +
    @@ -283,7 +310,7 @@

    License

    - - + + \ No newline at end of file diff --git a/docs/pet-store/index.html b/docs/pet-store/index.html index e9497bf..0539f67 100644 --- a/docs/pet-store/index.html +++ b/docs/pet-store/index.html @@ -7,16 +7,16 @@ - + Pet Store - MkDocs Swagger UI Tag - + - + @@ -51,6 +51,21 @@
    +
    + + + + + + +
    +
    @@ -173,7 +188,7 @@

    Markdown

    <swagger-ui src="https://petstore.swagger.io/v2/swagger.json"/>
     

    Swagger UI

    -

    +

    @@ -225,16 +240,48 @@

    Swagger UI

    - - + + \ No newline at end of file diff --git a/docs/pet-store/swagger-29b74b89.html b/docs/pet-store/swagger-29b74b89.html new file mode 100644 index 0000000..92e02cf --- /dev/null +++ b/docs/pet-store/swagger-29b74b89.html @@ -0,0 +1,51 @@ + + + + + + Swagger UI + + + + + + +
    + + + + + + \ No newline at end of file diff --git a/docs/pet-store/swagger-4bb20d42.html b/docs/pet-store/swagger-4bb20d42.html deleted file mode 100644 index 92af32e..0000000 --- a/docs/pet-store/swagger-4bb20d42.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - Swagger UI - - - - -
    - - - - - - \ No newline at end of file diff --git a/docs/sample.png b/docs/sample.png index 0139720..f518dc7 100644 Binary files a/docs/sample.png and b/docs/sample.png differ diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 231a710..23fee65 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -2,22 +2,22 @@ https://github.com/blueswen/mkdocs-swagger-ui-tag/ - 2022-06-12 + 2022-06-14 daily https://github.com/blueswen/mkdocs-swagger-ui-tag/pet-store/ - 2022-06-12 + 2022-06-14 daily https://github.com/blueswen/mkdocs-swagger-ui-tag/demo/multiple/ - 2022-06-12 + 2022-06-14 daily https://github.com/blueswen/mkdocs-swagger-ui-tag/demo/static-file/ - 2022-06-12 + 2022-06-14 daily \ No newline at end of file diff --git a/docs/sitemap.xml.gz b/docs/sitemap.xml.gz index 619a854..11ed0fd 100644 Binary files a/docs/sitemap.xml.gz and b/docs/sitemap.xml.gz differ diff --git a/index.html b/index.html deleted file mode 100644 index 7efe0dd..0000000 --- a/index.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - Document - - - -
    - - - - - -