From ef4cf74f1e104abd31e215b4bdf84bb6dc98c3a6 Mon Sep 17 00:00:00 2001 From: Vahid V Date: Tue, 18 Apr 2023 20:10:49 +0330 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B3=20chore:=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +- docs/assets/main.js | 6 +- docs/assets/search.js | 2 +- docs/assets/style.css | 759 ++++++++++++----------- docs/classes/Grant.html | 207 ++++--- docs/classes/Permission.html | 327 +++++----- docs/classes/default.html | 207 ++++--- docs/coverage/lcov-report/index.html | 2 +- docs/coverage/lcov-report/index.ts.html | 2 +- docs/functions/accumulate.html | 55 +- docs/functions/check.html | 65 +- docs/functions/filterByNotation.html | 63 +- docs/index.html | 95 ++- docs/interfaces/AccessControlOption.html | 61 +- docs/modules.html | 67 +- docs/types/Ability.html | 88 +-- docs/types/PermissionGrant.html | 61 +- docs/types/Time.html | 59 +- package-lock.json | 108 ++-- package.json | 8 +- 20 files changed, 1131 insertions(+), 1115 deletions(-) diff --git a/README.md b/README.md index 88c2ddf..4e6ed88 100644 --- a/README.md +++ b/README.md @@ -144,12 +144,12 @@ if (permission.granted) { // default scope for action and object is `any` and `all` if (permission.has('own')) { - // Or pattern 'own:.*' + // Or pattern '.*:own' // user has read owned article objects } if (permission.has('shared')) { - // Or pattern 'shared:.*' + // Or pattern '.*:shared' // user can access shared article objects } diff --git a/docs/assets/main.js b/docs/assets/main.js index f7c8366..932e185 100644 --- a/docs/assets/main.js +++ b/docs/assets/main.js @@ -1,7 +1,7 @@ "use strict"; -"use strict";(()=>{var Qe=Object.create;var ae=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var Oe=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var _e=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Me=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ce(e))!Re.call(t,i)&&i!==n&&ae(t,i,{get:()=>e[i],enumerable:!(r=Pe(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Qe(Oe(t)):{},Me(e||!t||!t.__esModule?ae(n,"default",{value:t,enumerable:!0}):n,t));var de=_e((ce,he)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var h=t.utils.clone(n)||{};h.position=[a,l],h.index=s.length,s.push(new t.Token(r.slice(a,o),h))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. -`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ou?h+=2:a==u&&(n+=r[l+1]*i[h+1],l+=2,h+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}if(s.str.length==0&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}s.str.length==1&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var h=s.str.charAt(0),m=s.str.charAt(1),v;m in s.node.edges?v=s.node.edges[m]:(v=new t.TokenSet,s.node.edges[m]=v),s.str.length==1&&(v.final=!0),i.push({node:v,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof ce=="object"?he.exports=n():e.lunr=n()}(this,function(){return t})})()});var le=[];function B(t,e){le.push({selector:e,constructor:t})}var Y=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){le.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureFocusedElementVisible(){this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null);let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}};var I=class{constructor(e){this.el=e.el,this.app=e.app}};var J=class{constructor(){this.listeners={}}addEventListener(e,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push(n)}removeEventListener(e,n){if(!(e in this.listeners))return;let r=this.listeners[e];for(let i=0,s=r.length;i{let n=Date.now();return(...r)=>{n+e-Date.now()<0&&(t(...r),n=Date.now())}};var re=class extends J{constructor(){super();this.scrollTop=0;this.lastY=0;this.width=0;this.height=0;this.showToolbar=!0;this.toolbar=document.querySelector(".tsd-page-toolbar"),this.navigation=document.querySelector(".col-menu"),window.addEventListener("scroll",ne(()=>this.onScroll(),10)),window.addEventListener("resize",ne(()=>this.onResize(),10)),this.searchInput=document.querySelector("#tsd-search input"),this.searchInput&&this.searchInput.addEventListener("focus",()=>{this.hideShowToolbar()}),this.onResize(),this.onScroll()}triggerResize(){let n=new CustomEvent("resize",{detail:{width:this.width,height:this.height}});this.dispatchEvent(n)}onResize(){this.width=window.innerWidth||0,this.height=window.innerHeight||0;let n=new CustomEvent("resize",{detail:{width:this.width,height:this.height}});this.dispatchEvent(n)}onScroll(){this.scrollTop=window.scrollY||0;let n=new CustomEvent("scroll",{detail:{scrollTop:this.scrollTop}});this.dispatchEvent(n),this.hideShowToolbar()}hideShowToolbar(){let n=this.showToolbar;this.showToolbar=this.lastY>=this.scrollTop||this.scrollTop<=0||!!this.searchInput&&this.searchInput===document.activeElement,n!==this.showToolbar&&(this.toolbar.classList.toggle("tsd-page-toolbar--hide"),this.navigation?.classList.toggle("col-menu--hide")),this.lastY=this.scrollTop}},R=re;R.instance=new re;var X=class extends I{constructor(n){super(n);this.anchors=[];this.index=-1;R.instance.addEventListener("resize",()=>this.onResize()),R.instance.addEventListener("scroll",r=>this.onScroll(r)),this.createAnchors()}createAnchors(){let n=window.location.href;n.indexOf("#")!=-1&&(n=n.substring(0,n.indexOf("#"))),this.el.querySelectorAll("a").forEach(r=>{let i=r.href;if(i.indexOf("#")==-1||i.substring(0,n.length)!=n)return;let s=i.substring(i.indexOf("#")+1),o=document.querySelector("a.tsd-anchor[name="+s+"]"),a=r.parentNode;!o||!a||this.anchors.push({link:a,anchor:o,position:0})}),this.onResize()}onResize(){let n;for(let i=0,s=this.anchors.length;ii.position-s.position);let r=new CustomEvent("scroll",{detail:{scrollTop:R.instance.scrollTop}});this.onScroll(r)}onScroll(n){let r=n.detail.scrollTop+5,i=this.anchors,s=i.length-1,o=this.index;for(;o>-1&&i[o].position>r;)o-=1;for(;o-1&&this.anchors[this.index].link.classList.remove("focus"),this.index=o,this.index>-1&&this.anchors[this.index].link.classList.add("focus"))}};var ue=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var me=De(de());function ve(){let t=document.getElementById("tsd-search");if(!t)return;let e=document.getElementById("search-script");t.classList.add("loading"),e&&(e.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),e.addEventListener("load",()=>{t.classList.remove("loading"),t.classList.add("ready")}),window.searchData&&t.classList.remove("loading"));let n=document.querySelector("#tsd-search input"),r=document.querySelector("#tsd-search .results");if(!n||!r)throw new Error("The input field or the result list wrapper was not found");let i=!1;r.addEventListener("mousedown",()=>i=!0),r.addEventListener("mouseup",()=>{i=!1,t.classList.remove("has-focus")}),n.addEventListener("focus",()=>t.classList.add("has-focus")),n.addEventListener("blur",()=>{i||(i=!1,t.classList.remove("has-focus"))});let s={base:t.dataset.base+"/"};Fe(t,r,n,s)}function Fe(t,e,n,r){n.addEventListener("input",ue(()=>{He(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?pe(e,-1):s.key==="ArrowDown"?pe(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ae(t,e){t.index||window.searchData&&(e.classList.remove("loading"),e.classList.add("ready"),t.data=window.searchData,t.index=me.Index.load(window.searchData.index))}function He(t,e,n,r){if(Ae(r,t),!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s=i?r.index.search(`*${i}*`):[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o${fe(u.parent,i)}.${l}`);let h=document.createElement("li");h.classList.value=u.classes??"";let m=document.createElement("a");m.href=r.base+u.url,m.innerHTML=l,h.append(m),e.appendChild(h)}}function pe(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function fe(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(ie(t.substring(s,o)),`${ie(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(ie(t.substring(s))),i.join("")}var Ne={"&":"&","<":"<",">":">","'":"'",'"':"""};function ie(t){return t.replace(/[&<>"'"]/g,e=>Ne[e])}var F="mousedown",ye="mousemove",j="mouseup",Z={x:0,y:0},ge=!1,se=!1,Be=!1,A=!1,xe=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(xe?"is-mobile":"not-mobile");xe&&"ontouchstart"in document.documentElement&&(Be=!0,F="touchstart",ye="touchmove",j="touchend");document.addEventListener(F,t=>{se=!0,A=!1;let e=F=="touchstart"?t.targetTouches[0]:t;Z.y=e.pageY||0,Z.x=e.pageX||0});document.addEventListener(ye,t=>{if(se&&!A){let e=F=="touchstart"?t.targetTouches[0]:t,n=Z.x-(e.pageX||0),r=Z.y-(e.pageY||0);A=Math.sqrt(n*n+r*r)>10}});document.addEventListener(j,()=>{se=!1});document.addEventListener("click",t=>{ge&&(t.preventDefault(),t.stopImmediatePropagation(),ge=!1)});var K=class extends I{constructor(n){super(n);this.className=this.el.dataset.toggle||"",this.el.addEventListener(j,r=>this.onPointerUp(r)),this.el.addEventListener("click",r=>r.preventDefault()),document.addEventListener(F,r=>this.onDocumentPointerDown(r)),document.addEventListener(j,r=>this.onDocumentPointerUp(r))}setActive(n){if(this.active==n)return;this.active=n,document.documentElement.classList.toggle("has-"+this.className,n),this.el.classList.toggle("active",n);let r=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(r),setTimeout(()=>document.documentElement.classList.remove(r),500)}onPointerUp(n){A||(this.setActive(!0),n.preventDefault())}onDocumentPointerDown(n){if(this.active){if(n.target.closest(".col-menu, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(n){if(!A&&this.active&&n.target.closest(".col-menu")){let r=n.target.closest("a");if(r){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substring(0,i.indexOf("#"))),r.href.substring(0,i.length)==i&&setTimeout(()=>this.setActive(!1),250)}}}};var oe;try{oe=localStorage}catch{oe={getItem(){return null},setItem(){}}}var Q=oe;var Le=document.head.appendChild(document.createElement("style"));Le.dataset.for="filters";var ee=class extends I{constructor(n){super(n);this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),Le.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`}fromLocalStorage(){let n=Q.getItem(this.key);return n?n==="true":this.el.checked}setLocalStorage(n){Q.setItem(this.key,n.toString()),this.value=n,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(n=>{n.style.display="block";let r=Array.from(n.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);n.style.display=r?"none":"block"})}};var te=class extends I{constructor(n){super(n);this.calculateHeights(),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.textContent.replace(/\s+/g,"-").toLowerCase()}`,this.setLocalStorage(this.fromLocalStorage(),!0),this.summary.addEventListener("click",r=>this.toggleVisibility(r)),this.icon.style.transform=this.getIconRotation()}getIconRotation(n=this.el.open){return`rotate(${n?0:-90}deg)`}calculateHeights(){let n=this.el.open,{position:r,left:i}=this.el.style;this.el.style.position="fixed",this.el.style.left="-9999px",this.el.open=!0,this.expandedHeight=this.el.offsetHeight+"px",this.el.open=!1,this.collapsedHeight=this.el.offsetHeight+"px",this.el.open=n,this.el.style.height=n?this.expandedHeight:this.collapsedHeight,this.el.style.position=r,this.el.style.left=i}toggleVisibility(n){n.preventDefault(),this.el.style.overflow="hidden",this.el.open?this.collapse():this.expand()}expand(n=!0){this.el.open=!0,this.animate(this.collapsedHeight,this.expandedHeight,{opening:!0,duration:n?300:0})}collapse(n=!0){this.animate(this.expandedHeight,this.collapsedHeight,{opening:!1,duration:n?300:0})}animate(n,r,{opening:i,duration:s=300}){if(this.animation)return;let o={duration:s,easing:"ease"};this.animation=this.el.animate({height:[n,r]},o),this.icon.animate({transform:[this.icon.style.transform||this.getIconRotation(!i),this.getIconRotation(i)]},o).addEventListener("finish",()=>{this.icon.style.transform=this.getIconRotation(i)}),this.animation.addEventListener("finish",()=>this.animationEnd(i))}animationEnd(n){this.el.open=n,this.animation=void 0,this.el.style.height="auto",this.el.style.overflow="visible",this.setLocalStorage(n)}fromLocalStorage(){let n=Q.getItem(this.key);return n?n==="true":this.el.open}setLocalStorage(n,r=!1){this.fromLocalStorage()===n&&!r||(Q.setItem(this.key,n.toString()),this.el.open=n,this.handleValueChange(r))}handleValueChange(n=!1){this.fromLocalStorage()===this.el.open&&!n||(this.fromLocalStorage()?this.expand(!1):this.collapse(!1))}};function be(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,Ee(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),Ee(t.value)})}function Ee(t){document.documentElement.dataset.theme=t}ve();B(X,".menu-highlight");B(K,"a[data-toggle]");B(te,".tsd-index-accordion");B(ee,".tsd-filter-item input[type=checkbox]");var we=document.getElementById("theme");we&&be(we);var je=new Y;Object.defineProperty(window,"app",{value:je});})(); +"use strict";(()=>{var be=Object.create;var re=Object.defineProperty;var Se=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var Te=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty;var Qe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Pe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of we(e))!ke.call(t,i)&&i!==r&&re(t,i,{get:()=>e[i],enumerable:!(n=Se(e,i))||n.enumerable});return t};var Ie=(t,e,r)=>(r=t!=null?be(Te(t)):{},Pe(e||!t||!t.__esModule?re(r,"default",{value:t,enumerable:!0}):r,t));var ae=Qe((se,oe)=>{(function(){var t=function(e){var r=new t.Builder;return r.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),r.searchPipeline.add(t.stemmer),e.call(r,r),r.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(r){e.console&&console.warn&&console.warn(r)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var r=Object.create(null),n=Object.keys(e),i=0;i0){var d=t.utils.clone(r)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(n.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,r){r in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+r),e.label=r,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var r=e.label&&e.label in this.registeredFunctions;r||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var r=new t.Pipeline;return e.forEach(function(n){var i=t.Pipeline.registeredFunctions[n];if(i)r.add(i);else throw new Error("Cannot load unregistered function: "+n)}),r},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(r){t.Pipeline.warnIfFunctionNotRegistered(r),this._stack.push(r)},this)},t.Pipeline.prototype.after=function(e,r){t.Pipeline.warnIfFunctionNotRegistered(r);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");n=n+1,this._stack.splice(n,0,r)},t.Pipeline.prototype.before=function(e,r){t.Pipeline.warnIfFunctionNotRegistered(r);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");this._stack.splice(n,0,r)},t.Pipeline.prototype.remove=function(e){var r=this._stack.indexOf(e);r!=-1&&this._stack.splice(r,1)},t.Pipeline.prototype.run=function(e){for(var r=this._stack.length,n=0;n1&&(oe&&(n=s),o!=e);)i=n-r,s=r+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(r+=n[u+1]*i[d+1],u+=2,d+=2);return r},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),r=1,n=0;r0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),y;m in s.node.edges?y=s.node.edges[m]:(y=new t.TokenSet,s.node.edges[m]=y),s.str.length==1&&(y.final=!0),i.push({node:y,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return n},t.TokenSet.fromString=function(e){for(var r=new t.TokenSet,n=r,i=0,s=e.length;i=e;r--){var n=this.uncheckedNodes[r],i=n.child.toString();i in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[i]:(n.child._str=i,this.minimizedNodes[i]=n.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(r){var n=new t.QueryParser(e,r);n.parse()})},t.Index.prototype.query=function(e){for(var r=new t.Query(this.fields),n=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,r){var n=e[this._ref],i=Object.keys(this._fields);this._documents[n]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,r;do e=this.next(),r=e.charCodeAt(0);while(r>47&&r<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var r=e.next();if(r==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(r.charCodeAt(0)==92){e.escapeCharacter();continue}if(r==":")return t.QueryLexer.lexField;if(r=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(r=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(r=="+"&&e.width()===1||r=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(r.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,r){this.lexer=new t.QueryLexer(e),this.query=r,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var r=e.peekLexeme();if(r!=null)switch(r.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(n+=" with value '"+r.str+"'"),new t.QueryParseError(n,r.start,r.end)}},t.QueryParser.parsePresence=function(e){var r=e.consumeLexeme();if(r!=null){switch(r.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+r.str+"'";throw new t.QueryParseError(n,r.start,r.end)}var i=e.peekLexeme();if(i==null){var n="expecting term or field, found nothing";throw new t.QueryParseError(n,r.start,r.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(n,i.start,i.end)}}},t.QueryParser.parseField=function(e){var r=e.consumeLexeme();if(r!=null){if(e.query.allFields.indexOf(r.str)==-1){var n=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+r.str+"', possible fields: "+n;throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.fields=[r.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,r.start,r.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var r=e.consumeLexeme();if(r!=null){e.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(n==null){e.nextClause();return}switch(n.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new t.QueryParseError(i,n.start,n.end)}}},t.QueryParser.parseEditDistance=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.editDistance=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="boost must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.boost=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,r){typeof define=="function"&&define.amd?define(r):typeof se=="object"?oe.exports=r():e.lunr=r()}(this,function(){return t})})()});var ne=[];function G(t,e){ne.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){ne.forEach(r=>{e.querySelectorAll(r.selector).forEach(n=>{n.dataset.hasInstance||(new r.constructor({el:n,app:this}),n.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),r=e?.parentElement;for(;r&&!r.classList.contains(".tsd-navigation");)r instanceof HTMLDetailsElement&&e?.parentElement?.parentElement!==r&&(r.open=!0),r=r.parentElement;if(e){let n=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=n}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let r=e.parentElement;for(;r&&r.tagName!=="SECTION";)r=r.parentElement;if(r&&r.offsetParent==null){this.alwaysVisibleMember=r,r.classList.add("always-visible");let n=document.createElement("p");n.classList.add("warning"),n.textContent="This member is normally hidden due to your filter settings.",r.prepend(n)}}};var ie=(t,e=100)=>{let r;return()=>{clearTimeout(r),r=setTimeout(()=>t(),e)}};var ce=Ie(ae());function de(){let t=document.getElementById("tsd-search");if(!t)return;let e=document.getElementById("tsd-search-script");t.classList.add("loading"),e&&(e.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),e.addEventListener("load",()=>{t.classList.remove("loading"),t.classList.add("ready")}),window.searchData&&t.classList.remove("loading"));let r=document.querySelector("#tsd-search input"),n=document.querySelector("#tsd-search .results");if(!r||!n)throw new Error("The input field or the result list wrapper was not found");let i=!1;n.addEventListener("mousedown",()=>i=!0),n.addEventListener("mouseup",()=>{i=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{i||(i=!1,t.classList.remove("has-focus"))});let s={base:t.dataset.base+"/"};Ce(t,n,r,s)}function Ce(t,e,r,n){r.addEventListener("input",ie(()=>{_e(t,e,r,n)},200));let i=!1;r.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Re(e,r):s.key=="Escape"?r.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),r.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!r.matches(":focus")&&s.key==="/"&&(r.focus(),s.preventDefault())})}function Oe(t,e){t.index||window.searchData&&(e.classList.remove("loading"),e.classList.add("ready"),t.data=window.searchData,t.index=ce.Index.load(window.searchData.index))}function _e(t,e,r,n){if(Oe(n,t),!n.index||!n.data)return;e.textContent="";let i=r.value.trim(),s=i?n.index.search(`*${i}*`):[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o${le(l.parent,i)}.${u}`);let d=document.createElement("li");d.classList.value=l.classes??"";let m=document.createElement("a");m.href=n.base+l.url,m.innerHTML=u,d.append(m),e.appendChild(d)}}function ue(t,e){let r=t.querySelector(".current");if(!r)r=t.querySelector(e==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let n=r;if(e===1)do n=n.nextElementSibling??void 0;while(n instanceof HTMLElement&&n.offsetParent==null);else do n=n.previousElementSibling??void 0;while(n instanceof HTMLElement&&n.offsetParent==null);n&&(r.classList.remove("current"),n.classList.add("current"))}}function Re(t,e){let r=t.querySelector(".current");if(r||(r=t.querySelector("li:first-child")),r){let n=r.querySelector("a");n&&(window.location.href=n.href),e.blur()}}function le(t,e){if(e==="")return t;let r=t.toLocaleLowerCase(),n=e.toLocaleLowerCase(),i=[],s=0,o=r.indexOf(n);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+n.length))}`),s=o+n.length,o=r.indexOf(n,s);return i.push(K(t.substring(s))),i.join("")}var Fe={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Fe[e])}var P=class{constructor(e){this.el=e.el,this.app=e.app}};var M="mousedown",fe="mousemove",N="mouseup",J={x:0,y:0},he=!1,ee=!1,Me=!1,D=!1,pe=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(pe?"is-mobile":"not-mobile");pe&&"ontouchstart"in document.documentElement&&(Me=!0,M="touchstart",fe="touchmove",N="touchend");document.addEventListener(M,t=>{ee=!0,D=!1;let e=M=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(fe,t=>{if(ee&&!D){let e=M=="touchstart"?t.targetTouches[0]:t,r=J.x-(e.pageX||0),n=J.y-(e.pageY||0);D=Math.sqrt(r*r+n*n)>10}});document.addEventListener(N,()=>{ee=!1});document.addEventListener("click",t=>{he&&(t.preventDefault(),t.stopImmediatePropagation(),he=!1)});var X=class extends P{constructor(r){super(r);this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(M,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,n=>this.onDocumentPointerUp(n))}setActive(r){if(this.active==r)return;this.active=r,document.documentElement.classList.toggle("has-"+this.className,r),this.el.classList.toggle("active",r);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(r){D||(this.setActive(!0),r.preventDefault())}onDocumentPointerDown(r){if(this.active){if(r.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(r){if(!D&&this.active&&r.target.closest(".col-sidebar")){let n=r.target.closest("a");if(n){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substring(0,i.indexOf("#"))),n.href.substring(0,i.length)==i&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var me=document.head.appendChild(document.createElement("style"));me.dataset.for="filters";var Y=class extends P{constructor(r){super(r);this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),me.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`}fromLocalStorage(){let r=Q.getItem(this.key);return r?r==="true":this.el.checked}setLocalStorage(r){Q.setItem(this.key,r.toString()),this.value=r,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let n=Array.from(r.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);r.style.display=n?"none":"block"})}};var Z=class extends P{constructor(r){super(r);this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update()),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ve(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}addEventListener("load",()=>{de(),G(X,"a[data-toggle]"),G(Z,".tsd-index-accordion"),G(Y,".tsd-filter-item input[type=checkbox]");let t=document.getElementById("tsd-theme");t&&ve(t);let e=new U;Object.defineProperty(window,"app",{value:e})});})(); /*! Bundled license information: lunr/lunr.js: diff --git a/docs/assets/search.js b/docs/assets/search.js index e6b9d69..c31ee9f 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = JSON.parse("{\"kinds\":{\"64\":\"Function\",\"128\":\"Class\",\"256\":\"Interface\",\"512\":\"Constructor\",\"1024\":\"Property\",\"2048\":\"Method\",\"65536\":\"Type literal\",\"262144\":\"Accessor\",\"4194304\":\"Type alias\"},\"rows\":[{\"kind\":64,\"name\":\"check\",\"url\":\"functions/check.html\",\"classes\":\"tsd-kind-function\"},{\"kind\":64,\"name\":\"accumulate\",\"url\":\"functions/accumulate.html\",\"classes\":\"tsd-kind-function\"},{\"kind\":64,\"name\":\"filterByNotation\",\"url\":\"functions/filterByNotation.html\",\"classes\":\"tsd-kind-function\"},{\"kind\":4194304,\"name\":\"Ability\",\"url\":\"types/Ability.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/Ability.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"Ability\"},{\"kind\":1024,\"name\":\"subject\",\"url\":\"types/Ability.html#__type.subject\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Ability.__type\"},{\"kind\":1024,\"name\":\"action\",\"url\":\"types/Ability.html#__type.action\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Ability.__type\"},{\"kind\":1024,\"name\":\"object\",\"url\":\"types/Ability.html#__type.object\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Ability.__type\"},{\"kind\":1024,\"name\":\"field\",\"url\":\"types/Ability.html#__type.field\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Ability.__type\"},{\"kind\":1024,\"name\":\"filter\",\"url\":\"types/Ability.html#__type.filter\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Ability.__type\"},{\"kind\":1024,\"name\":\"location\",\"url\":\"types/Ability.html#__type.location\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Ability.__type\"},{\"kind\":1024,\"name\":\"time\",\"url\":\"types/Ability.html#__type.time\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Ability.__type\"},{\"kind\":4194304,\"name\":\"Time\",\"url\":\"types/Time.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/Time.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"Time\"},{\"kind\":1024,\"name\":\"cron_exp\",\"url\":\"types/Time.html#__type.cron_exp\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Time.__type\"},{\"kind\":1024,\"name\":\"duration\",\"url\":\"types/Time.html#__type.duration\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Time.__type\"},{\"kind\":128,\"name\":\"Permission\",\"url\":\"classes/Permission.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":2048,\"name\":\"build\",\"url\":\"classes/Permission.html#build\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Permission.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":1024,\"name\":\"times\",\"url\":\"classes/Permission.html#times\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-private\",\"parent\":\"Permission\"},{\"kind\":1024,\"name\":\"fields\",\"url\":\"classes/Permission.html#fields\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-private\",\"parent\":\"Permission\"},{\"kind\":1024,\"name\":\"filters\",\"url\":\"classes/Permission.html#filters\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-private\",\"parent\":\"Permission\"},{\"kind\":1024,\"name\":\"locations\",\"url\":\"classes/Permission.html#locations\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-private\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"location\",\"url\":\"classes/Permission.html#location\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"time\",\"url\":\"classes/Permission.html#time\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"field\",\"url\":\"classes/Permission.html#field\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"filter\",\"url\":\"classes/Permission.html#filter\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":1024,\"name\":\"granted\",\"url\":\"classes/Permission.html#granted\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":1024,\"name\":\"grants\",\"url\":\"classes/Permission.html#grants\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"has\",\"url\":\"classes/Permission.html#has\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"grant\",\"url\":\"classes/Permission.html#grant\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"hasAny\",\"url\":\"classes/Permission.html#hasAny\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"hasScopeAny\",\"url\":\"classes/Permission.html#hasScopeAny\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"hasAll\",\"url\":\"classes/Permission.html#hasAll\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"hasScopeAll\",\"url\":\"classes/Permission.html#hasScopeAll\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"abilities\",\"url\":\"classes/Permission.html#abilities\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Permission\"},{\"kind\":128,\"name\":\"Grant\",\"url\":\"classes/Grant.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":2048,\"name\":\"build\",\"url\":\"classes/Grant.html#build\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Grant\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Grant.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"Grant\"},{\"kind\":1024,\"name\":\"subject\",\"url\":\"classes/Grant.html#subject\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Grant\"},{\"kind\":1024,\"name\":\"action\",\"url\":\"classes/Grant.html#action\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Grant\"},{\"kind\":1024,\"name\":\"object\",\"url\":\"classes/Grant.html#object\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Grant\"},{\"kind\":1024,\"name\":\"ability\",\"url\":\"classes/Grant.html#ability\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Grant\"},{\"kind\":2048,\"name\":\"field\",\"url\":\"classes/Grant.html#field\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Grant\"},{\"kind\":2048,\"name\":\"filter\",\"url\":\"classes/Grant.html#filter\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Grant\"},{\"kind\":2048,\"name\":\"location\",\"url\":\"classes/Grant.html#location\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Grant\"},{\"kind\":2048,\"name\":\"time\",\"url\":\"classes/Grant.html#time\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Grant\"},{\"kind\":4194304,\"name\":\"PermissionGrant\",\"url\":\"types/PermissionGrant.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/PermissionGrant.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-alias\",\"parent\":\"PermissionGrant\"},{\"kind\":256,\"name\":\"AccessControlOption\",\"url\":\"interfaces/AccessControlOption.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"sep\",\"url\":\"interfaces/AccessControlOption.html#sep\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"AccessControlOption\"},{\"kind\":1024,\"name\":\"strict\",\"url\":\"interfaces/AccessControlOption.html#strict\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"AccessControlOption\"},{\"kind\":128,\"name\":\"default\",\"url\":\"classes/default.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/default.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"default\"},{\"kind\":1024,\"name\":\"sep\",\"url\":\"classes/default.html#sep\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-protected\",\"parent\":\"default\"},{\"kind\":1024,\"name\":\"strict\",\"url\":\"classes/default.html#strict\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"default\"},{\"kind\":1024,\"name\":\"_abilities\",\"url\":\"classes/default.html#_abilities\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-private\",\"parent\":\"default\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/default.html#_abilities.__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-property\",\"parent\":\"default._abilities\"},{\"kind\":1024,\"name\":\"_validators\",\"url\":\"classes/default.html#_validators\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-private\",\"parent\":\"default\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/default.html#_validators.__type-1\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-property\",\"parent\":\"default._validators\"},{\"kind\":1024,\"name\":\"ip_cidr\",\"url\":\"classes/default.html#_validators.__type-1.ip_cidr\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"default._validators.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/default.html#_validators.__type-1.ip_cidr.__type-4\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-property\",\"parent\":\"default._validators.__type.ip_cidr\"},{\"kind\":1024,\"name\":\"cron\",\"url\":\"classes/default.html#_validators.__type-1.cron\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"default._validators.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/default.html#_validators.__type-1.cron.__type-2\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-property\",\"parent\":\"default._validators.__type.cron\"},{\"kind\":2048,\"name\":\"validate\",\"url\":\"classes/default.html#validate\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"default\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"classes/default.html#update\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"default\"},{\"kind\":2048,\"name\":\"clear\",\"url\":\"classes/default.html#clear\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"default\"},{\"kind\":262144,\"name\":\"abilities\",\"url\":\"classes/default.html#abilities\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"default\"},{\"kind\":2048,\"name\":\"can\",\"url\":\"classes/default.html#can\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"default\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,38.43]],[\"comment/0\",[]],[\"name/1\",[1,38.43]],[\"comment/1\",[]],[\"name/2\",[2,38.43]],[\"comment/2\",[]],[\"name/3\",[3,33.322]],[\"comment/3\",[]],[\"name/4\",[4,22.336]],[\"comment/4\",[]],[\"name/5\",[5,33.322]],[\"comment/5\",[]],[\"name/6\",[6,33.322]],[\"comment/6\",[]],[\"name/7\",[7,33.322]],[\"comment/7\",[]],[\"name/8\",[8,29.957]],[\"comment/8\",[]],[\"name/9\",[9,29.957]],[\"comment/9\",[]],[\"name/10\",[10,29.957]],[\"comment/10\",[]],[\"name/11\",[11,27.444]],[\"comment/11\",[]],[\"name/12\",[11,27.444]],[\"comment/12\",[]],[\"name/13\",[4,22.336]],[\"comment/13\",[]],[\"name/14\",[12,38.43]],[\"comment/14\",[]],[\"name/15\",[13,38.43]],[\"comment/15\",[]],[\"name/16\",[14,38.43]],[\"comment/16\",[]],[\"name/17\",[15,33.322]],[\"comment/17\",[]],[\"name/18\",[16,29.957]],[\"comment/18\",[]],[\"name/19\",[17,38.43]],[\"comment/19\",[]],[\"name/20\",[18,38.43]],[\"comment/20\",[]],[\"name/21\",[19,38.43]],[\"comment/21\",[]],[\"name/22\",[20,38.43]],[\"comment/22\",[]],[\"name/23\",[10,29.957]],[\"comment/23\",[]],[\"name/24\",[11,27.444]],[\"comment/24\",[]],[\"name/25\",[8,29.957]],[\"comment/25\",[]],[\"name/26\",[9,29.957]],[\"comment/26\",[]],[\"name/27\",[21,38.43]],[\"comment/27\",[]],[\"name/28\",[22,38.43]],[\"comment/28\",[]],[\"name/29\",[23,38.43]],[\"comment/29\",[]],[\"name/30\",[24,33.322]],[\"comment/30\",[]],[\"name/31\",[25,38.43]],[\"comment/31\",[]],[\"name/32\",[26,38.43]],[\"comment/32\",[]],[\"name/33\",[27,38.43]],[\"comment/33\",[]],[\"name/34\",[28,38.43]],[\"comment/34\",[]],[\"name/35\",[29,33.322]],[\"comment/35\",[]],[\"name/36\",[24,33.322]],[\"comment/36\",[]],[\"name/37\",[15,33.322]],[\"comment/37\",[]],[\"name/38\",[16,29.957]],[\"comment/38\",[]],[\"name/39\",[5,33.322]],[\"comment/39\",[]],[\"name/40\",[6,33.322]],[\"comment/40\",[]],[\"name/41\",[7,33.322]],[\"comment/41\",[]],[\"name/42\",[3,33.322]],[\"comment/42\",[]],[\"name/43\",[8,29.957]],[\"comment/43\",[]],[\"name/44\",[9,29.957]],[\"comment/44\",[]],[\"name/45\",[10,29.957]],[\"comment/45\",[]],[\"name/46\",[11,27.444]],[\"comment/46\",[]],[\"name/47\",[30,38.43]],[\"comment/47\",[]],[\"name/48\",[4,22.336]],[\"comment/48\",[]],[\"name/49\",[31,38.43]],[\"comment/49\",[]],[\"name/50\",[32,33.322]],[\"comment/50\",[]],[\"name/51\",[33,33.322]],[\"comment/51\",[]],[\"name/52\",[34,38.43]],[\"comment/52\",[]],[\"name/53\",[16,29.957]],[\"comment/53\",[]],[\"name/54\",[32,33.322]],[\"comment/54\",[]],[\"name/55\",[33,33.322]],[\"comment/55\",[]],[\"name/56\",[35,38.43]],[\"comment/56\",[]],[\"name/57\",[4,22.336]],[\"comment/57\",[]],[\"name/58\",[36,38.43]],[\"comment/58\",[]],[\"name/59\",[4,22.336]],[\"comment/59\",[]],[\"name/60\",[37,38.43]],[\"comment/60\",[]],[\"name/61\",[4,22.336]],[\"comment/61\",[]],[\"name/62\",[38,38.43]],[\"comment/62\",[]],[\"name/63\",[4,22.336]],[\"comment/63\",[]],[\"name/64\",[39,38.43]],[\"comment/64\",[]],[\"name/65\",[40,38.43]],[\"comment/65\",[]],[\"name/66\",[41,38.43]],[\"comment/66\",[]],[\"name/67\",[29,33.322]],[\"comment/67\",[]],[\"name/68\",[42,38.43]],[\"comment/68\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":4,\"name\":{\"4\":{},\"13\":{},\"48\":{},\"57\":{},\"59\":{},\"61\":{},\"63\":{}},\"comment\":{}}],[\"_abilities\",{\"_index\":35,\"name\":{\"56\":{}},\"comment\":{}}],[\"_validators\",{\"_index\":36,\"name\":{\"58\":{}},\"comment\":{}}],[\"abilities\",{\"_index\":29,\"name\":{\"35\":{},\"67\":{}},\"comment\":{}}],[\"ability\",{\"_index\":3,\"name\":{\"3\":{},\"42\":{}},\"comment\":{}}],[\"accesscontroloption\",{\"_index\":31,\"name\":{\"49\":{}},\"comment\":{}}],[\"accumulate\",{\"_index\":1,\"name\":{\"1\":{}},\"comment\":{}}],[\"action\",{\"_index\":6,\"name\":{\"6\":{},\"40\":{}},\"comment\":{}}],[\"build\",{\"_index\":15,\"name\":{\"17\":{},\"37\":{}},\"comment\":{}}],[\"can\",{\"_index\":42,\"name\":{\"68\":{}},\"comment\":{}}],[\"check\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"clear\",{\"_index\":41,\"name\":{\"66\":{}},\"comment\":{}}],[\"constructor\",{\"_index\":16,\"name\":{\"18\":{},\"38\":{},\"53\":{}},\"comment\":{}}],[\"cron\",{\"_index\":38,\"name\":{\"62\":{}},\"comment\":{}}],[\"cron_exp\",{\"_index\":12,\"name\":{\"14\":{}},\"comment\":{}}],[\"default\",{\"_index\":34,\"name\":{\"52\":{}},\"comment\":{}}],[\"duration\",{\"_index\":13,\"name\":{\"15\":{}},\"comment\":{}}],[\"field\",{\"_index\":8,\"name\":{\"8\":{},\"25\":{},\"43\":{}},\"comment\":{}}],[\"fields\",{\"_index\":18,\"name\":{\"20\":{}},\"comment\":{}}],[\"filter\",{\"_index\":9,\"name\":{\"9\":{},\"26\":{},\"44\":{}},\"comment\":{}}],[\"filterbynotation\",{\"_index\":2,\"name\":{\"2\":{}},\"comment\":{}}],[\"filters\",{\"_index\":19,\"name\":{\"21\":{}},\"comment\":{}}],[\"grant\",{\"_index\":24,\"name\":{\"30\":{},\"36\":{}},\"comment\":{}}],[\"granted\",{\"_index\":21,\"name\":{\"27\":{}},\"comment\":{}}],[\"grants\",{\"_index\":22,\"name\":{\"28\":{}},\"comment\":{}}],[\"has\",{\"_index\":23,\"name\":{\"29\":{}},\"comment\":{}}],[\"hasall\",{\"_index\":27,\"name\":{\"33\":{}},\"comment\":{}}],[\"hasany\",{\"_index\":25,\"name\":{\"31\":{}},\"comment\":{}}],[\"hasscopeall\",{\"_index\":28,\"name\":{\"34\":{}},\"comment\":{}}],[\"hasscopeany\",{\"_index\":26,\"name\":{\"32\":{}},\"comment\":{}}],[\"ip_cidr\",{\"_index\":37,\"name\":{\"60\":{}},\"comment\":{}}],[\"location\",{\"_index\":10,\"name\":{\"10\":{},\"23\":{},\"45\":{}},\"comment\":{}}],[\"locations\",{\"_index\":20,\"name\":{\"22\":{}},\"comment\":{}}],[\"object\",{\"_index\":7,\"name\":{\"7\":{},\"41\":{}},\"comment\":{}}],[\"permission\",{\"_index\":14,\"name\":{\"16\":{}},\"comment\":{}}],[\"permissiongrant\",{\"_index\":30,\"name\":{\"47\":{}},\"comment\":{}}],[\"sep\",{\"_index\":32,\"name\":{\"50\":{},\"54\":{}},\"comment\":{}}],[\"strict\",{\"_index\":33,\"name\":{\"51\":{},\"55\":{}},\"comment\":{}}],[\"subject\",{\"_index\":5,\"name\":{\"5\":{},\"39\":{}},\"comment\":{}}],[\"time\",{\"_index\":11,\"name\":{\"11\":{},\"12\":{},\"24\":{},\"46\":{}},\"comment\":{}}],[\"times\",{\"_index\":17,\"name\":{\"19\":{}},\"comment\":{}}],[\"update\",{\"_index\":40,\"name\":{\"65\":{}},\"comment\":{}}],[\"validate\",{\"_index\":39,\"name\":{\"64\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file +window.searchData = JSON.parse("{\"rows\":[{\"kind\":64,\"name\":\"check\",\"url\":\"functions/check.html\",\"classes\":\"\"},{\"kind\":64,\"name\":\"accumulate\",\"url\":\"functions/accumulate.html\",\"classes\":\"\"},{\"kind\":64,\"name\":\"filterByNotation\",\"url\":\"functions/filterByNotation.html\",\"classes\":\"\"},{\"kind\":4194304,\"name\":\"Ability\",\"url\":\"types/Ability.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/Ability.html#__type\",\"classes\":\"\",\"parent\":\"Ability\"},{\"kind\":1024,\"name\":\"subject\",\"url\":\"types/Ability.html#__type.subject\",\"classes\":\"\",\"parent\":\"Ability.__type\"},{\"kind\":1024,\"name\":\"action\",\"url\":\"types/Ability.html#__type.action\",\"classes\":\"\",\"parent\":\"Ability.__type\"},{\"kind\":1024,\"name\":\"object\",\"url\":\"types/Ability.html#__type.object\",\"classes\":\"\",\"parent\":\"Ability.__type\"},{\"kind\":1024,\"name\":\"field\",\"url\":\"types/Ability.html#__type.field\",\"classes\":\"\",\"parent\":\"Ability.__type\"},{\"kind\":1024,\"name\":\"filter\",\"url\":\"types/Ability.html#__type.filter\",\"classes\":\"\",\"parent\":\"Ability.__type\"},{\"kind\":1024,\"name\":\"location\",\"url\":\"types/Ability.html#__type.location\",\"classes\":\"\",\"parent\":\"Ability.__type\"},{\"kind\":1024,\"name\":\"time\",\"url\":\"types/Ability.html#__type.time\",\"classes\":\"\",\"parent\":\"Ability.__type\"},{\"kind\":4194304,\"name\":\"Time\",\"url\":\"types/Time.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/Time.html#__type\",\"classes\":\"\",\"parent\":\"Time\"},{\"kind\":1024,\"name\":\"cron_exp\",\"url\":\"types/Time.html#__type.cron_exp\",\"classes\":\"\",\"parent\":\"Time.__type\"},{\"kind\":1024,\"name\":\"duration\",\"url\":\"types/Time.html#__type.duration\",\"classes\":\"\",\"parent\":\"Time.__type\"},{\"kind\":128,\"name\":\"Permission\",\"url\":\"classes/Permission.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"build\",\"url\":\"classes/Permission.html#build\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Permission.html#constructor\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":1024,\"name\":\"times\",\"url\":\"classes/Permission.html#times\",\"classes\":\"tsd-is-private\",\"parent\":\"Permission\"},{\"kind\":1024,\"name\":\"fields\",\"url\":\"classes/Permission.html#fields\",\"classes\":\"tsd-is-private\",\"parent\":\"Permission\"},{\"kind\":1024,\"name\":\"filters\",\"url\":\"classes/Permission.html#filters\",\"classes\":\"tsd-is-private\",\"parent\":\"Permission\"},{\"kind\":1024,\"name\":\"locations\",\"url\":\"classes/Permission.html#locations\",\"classes\":\"tsd-is-private\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"location\",\"url\":\"classes/Permission.html#location\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"time\",\"url\":\"classes/Permission.html#time\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"field\",\"url\":\"classes/Permission.html#field\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"filter\",\"url\":\"classes/Permission.html#filter\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":1024,\"name\":\"granted\",\"url\":\"classes/Permission.html#granted\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":1024,\"name\":\"grants\",\"url\":\"classes/Permission.html#grants\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"has\",\"url\":\"classes/Permission.html#has\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"grant\",\"url\":\"classes/Permission.html#grant\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"hasAny\",\"url\":\"classes/Permission.html#hasAny\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"hasScopeAny\",\"url\":\"classes/Permission.html#hasScopeAny\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"hasAll\",\"url\":\"classes/Permission.html#hasAll\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"hasScopeAll\",\"url\":\"classes/Permission.html#hasScopeAll\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":2048,\"name\":\"abilities\",\"url\":\"classes/Permission.html#abilities\",\"classes\":\"\",\"parent\":\"Permission\"},{\"kind\":128,\"name\":\"Grant\",\"url\":\"classes/Grant.html\",\"classes\":\"\"},{\"kind\":2048,\"name\":\"build\",\"url\":\"classes/Grant.html#build\",\"classes\":\"\",\"parent\":\"Grant\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Grant.html#constructor\",\"classes\":\"\",\"parent\":\"Grant\"},{\"kind\":1024,\"name\":\"subject\",\"url\":\"classes/Grant.html#subject\",\"classes\":\"\",\"parent\":\"Grant\"},{\"kind\":1024,\"name\":\"action\",\"url\":\"classes/Grant.html#action\",\"classes\":\"\",\"parent\":\"Grant\"},{\"kind\":1024,\"name\":\"object\",\"url\":\"classes/Grant.html#object\",\"classes\":\"\",\"parent\":\"Grant\"},{\"kind\":1024,\"name\":\"ability\",\"url\":\"classes/Grant.html#ability\",\"classes\":\"\",\"parent\":\"Grant\"},{\"kind\":2048,\"name\":\"field\",\"url\":\"classes/Grant.html#field\",\"classes\":\"\",\"parent\":\"Grant\"},{\"kind\":2048,\"name\":\"filter\",\"url\":\"classes/Grant.html#filter\",\"classes\":\"\",\"parent\":\"Grant\"},{\"kind\":2048,\"name\":\"location\",\"url\":\"classes/Grant.html#location\",\"classes\":\"\",\"parent\":\"Grant\"},{\"kind\":2048,\"name\":\"time\",\"url\":\"classes/Grant.html#time\",\"classes\":\"\",\"parent\":\"Grant\"},{\"kind\":4194304,\"name\":\"PermissionGrant\",\"url\":\"types/PermissionGrant.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/PermissionGrant.html#__type\",\"classes\":\"\",\"parent\":\"PermissionGrant\"},{\"kind\":256,\"name\":\"AccessControlOption\",\"url\":\"interfaces/AccessControlOption.html\",\"classes\":\"\"},{\"kind\":1024,\"name\":\"sep\",\"url\":\"interfaces/AccessControlOption.html#sep\",\"classes\":\"\",\"parent\":\"AccessControlOption\"},{\"kind\":1024,\"name\":\"strict\",\"url\":\"interfaces/AccessControlOption.html#strict\",\"classes\":\"\",\"parent\":\"AccessControlOption\"},{\"kind\":128,\"name\":\"default\",\"url\":\"classes/default.html\",\"classes\":\"\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/default.html#constructor\",\"classes\":\"\",\"parent\":\"default\"},{\"kind\":1024,\"name\":\"sep\",\"url\":\"classes/default.html#sep\",\"classes\":\"tsd-is-protected\",\"parent\":\"default\"},{\"kind\":1024,\"name\":\"strict\",\"url\":\"classes/default.html#strict\",\"classes\":\"\",\"parent\":\"default\"},{\"kind\":1024,\"name\":\"_abilities\",\"url\":\"classes/default.html#_abilities\",\"classes\":\"tsd-is-private\",\"parent\":\"default\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/default.html#_abilities.__type\",\"classes\":\"\",\"parent\":\"default._abilities\"},{\"kind\":1024,\"name\":\"_validators\",\"url\":\"classes/default.html#_validators\",\"classes\":\"tsd-is-private\",\"parent\":\"default\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/default.html#_validators.__type-1\",\"classes\":\"\",\"parent\":\"default._validators\"},{\"kind\":1024,\"name\":\"ip_cidr\",\"url\":\"classes/default.html#_validators.__type-1.ip_cidr\",\"classes\":\"\",\"parent\":\"default._validators.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/default.html#_validators.__type-1.ip_cidr.__type-4\",\"classes\":\"\",\"parent\":\"default._validators.__type.ip_cidr\"},{\"kind\":1024,\"name\":\"cron\",\"url\":\"classes/default.html#_validators.__type-1.cron\",\"classes\":\"\",\"parent\":\"default._validators.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/default.html#_validators.__type-1.cron.__type-2\",\"classes\":\"\",\"parent\":\"default._validators.__type.cron\"},{\"kind\":2048,\"name\":\"validate\",\"url\":\"classes/default.html#validate\",\"classes\":\"\",\"parent\":\"default\"},{\"kind\":2048,\"name\":\"update\",\"url\":\"classes/default.html#update\",\"classes\":\"\",\"parent\":\"default\"},{\"kind\":2048,\"name\":\"clear\",\"url\":\"classes/default.html#clear\",\"classes\":\"\",\"parent\":\"default\"},{\"kind\":262144,\"name\":\"abilities\",\"url\":\"classes/default.html#abilities\",\"classes\":\"\",\"parent\":\"default\"},{\"kind\":2048,\"name\":\"can\",\"url\":\"classes/default.html#can\",\"classes\":\"\",\"parent\":\"default\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,38.43]],[\"comment/0\",[]],[\"name/1\",[1,38.43]],[\"comment/1\",[]],[\"name/2\",[2,38.43]],[\"comment/2\",[]],[\"name/3\",[3,33.322]],[\"comment/3\",[]],[\"name/4\",[4,22.336]],[\"comment/4\",[]],[\"name/5\",[5,33.322]],[\"comment/5\",[]],[\"name/6\",[6,33.322]],[\"comment/6\",[]],[\"name/7\",[7,33.322]],[\"comment/7\",[]],[\"name/8\",[8,29.957]],[\"comment/8\",[]],[\"name/9\",[9,29.957]],[\"comment/9\",[]],[\"name/10\",[10,29.957]],[\"comment/10\",[]],[\"name/11\",[11,27.444]],[\"comment/11\",[]],[\"name/12\",[11,27.444]],[\"comment/12\",[]],[\"name/13\",[4,22.336]],[\"comment/13\",[]],[\"name/14\",[12,38.43]],[\"comment/14\",[]],[\"name/15\",[13,38.43]],[\"comment/15\",[]],[\"name/16\",[14,38.43]],[\"comment/16\",[]],[\"name/17\",[15,33.322]],[\"comment/17\",[]],[\"name/18\",[16,29.957]],[\"comment/18\",[]],[\"name/19\",[17,38.43]],[\"comment/19\",[]],[\"name/20\",[18,38.43]],[\"comment/20\",[]],[\"name/21\",[19,38.43]],[\"comment/21\",[]],[\"name/22\",[20,38.43]],[\"comment/22\",[]],[\"name/23\",[10,29.957]],[\"comment/23\",[]],[\"name/24\",[11,27.444]],[\"comment/24\",[]],[\"name/25\",[8,29.957]],[\"comment/25\",[]],[\"name/26\",[9,29.957]],[\"comment/26\",[]],[\"name/27\",[21,38.43]],[\"comment/27\",[]],[\"name/28\",[22,38.43]],[\"comment/28\",[]],[\"name/29\",[23,38.43]],[\"comment/29\",[]],[\"name/30\",[24,33.322]],[\"comment/30\",[]],[\"name/31\",[25,38.43]],[\"comment/31\",[]],[\"name/32\",[26,38.43]],[\"comment/32\",[]],[\"name/33\",[27,38.43]],[\"comment/33\",[]],[\"name/34\",[28,38.43]],[\"comment/34\",[]],[\"name/35\",[29,33.322]],[\"comment/35\",[]],[\"name/36\",[24,33.322]],[\"comment/36\",[]],[\"name/37\",[15,33.322]],[\"comment/37\",[]],[\"name/38\",[16,29.957]],[\"comment/38\",[]],[\"name/39\",[5,33.322]],[\"comment/39\",[]],[\"name/40\",[6,33.322]],[\"comment/40\",[]],[\"name/41\",[7,33.322]],[\"comment/41\",[]],[\"name/42\",[3,33.322]],[\"comment/42\",[]],[\"name/43\",[8,29.957]],[\"comment/43\",[]],[\"name/44\",[9,29.957]],[\"comment/44\",[]],[\"name/45\",[10,29.957]],[\"comment/45\",[]],[\"name/46\",[11,27.444]],[\"comment/46\",[]],[\"name/47\",[30,38.43]],[\"comment/47\",[]],[\"name/48\",[4,22.336]],[\"comment/48\",[]],[\"name/49\",[31,38.43]],[\"comment/49\",[]],[\"name/50\",[32,33.322]],[\"comment/50\",[]],[\"name/51\",[33,33.322]],[\"comment/51\",[]],[\"name/52\",[34,38.43]],[\"comment/52\",[]],[\"name/53\",[16,29.957]],[\"comment/53\",[]],[\"name/54\",[32,33.322]],[\"comment/54\",[]],[\"name/55\",[33,33.322]],[\"comment/55\",[]],[\"name/56\",[35,38.43]],[\"comment/56\",[]],[\"name/57\",[4,22.336]],[\"comment/57\",[]],[\"name/58\",[36,38.43]],[\"comment/58\",[]],[\"name/59\",[4,22.336]],[\"comment/59\",[]],[\"name/60\",[37,38.43]],[\"comment/60\",[]],[\"name/61\",[4,22.336]],[\"comment/61\",[]],[\"name/62\",[38,38.43]],[\"comment/62\",[]],[\"name/63\",[4,22.336]],[\"comment/63\",[]],[\"name/64\",[39,38.43]],[\"comment/64\",[]],[\"name/65\",[40,38.43]],[\"comment/65\",[]],[\"name/66\",[41,38.43]],[\"comment/66\",[]],[\"name/67\",[29,33.322]],[\"comment/67\",[]],[\"name/68\",[42,38.43]],[\"comment/68\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":4,\"name\":{\"4\":{},\"13\":{},\"48\":{},\"57\":{},\"59\":{},\"61\":{},\"63\":{}},\"comment\":{}}],[\"_abilities\",{\"_index\":35,\"name\":{\"56\":{}},\"comment\":{}}],[\"_validators\",{\"_index\":36,\"name\":{\"58\":{}},\"comment\":{}}],[\"abilities\",{\"_index\":29,\"name\":{\"35\":{},\"67\":{}},\"comment\":{}}],[\"ability\",{\"_index\":3,\"name\":{\"3\":{},\"42\":{}},\"comment\":{}}],[\"accesscontroloption\",{\"_index\":31,\"name\":{\"49\":{}},\"comment\":{}}],[\"accumulate\",{\"_index\":1,\"name\":{\"1\":{}},\"comment\":{}}],[\"action\",{\"_index\":6,\"name\":{\"6\":{},\"40\":{}},\"comment\":{}}],[\"build\",{\"_index\":15,\"name\":{\"17\":{},\"37\":{}},\"comment\":{}}],[\"can\",{\"_index\":42,\"name\":{\"68\":{}},\"comment\":{}}],[\"check\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"clear\",{\"_index\":41,\"name\":{\"66\":{}},\"comment\":{}}],[\"constructor\",{\"_index\":16,\"name\":{\"18\":{},\"38\":{},\"53\":{}},\"comment\":{}}],[\"cron\",{\"_index\":38,\"name\":{\"62\":{}},\"comment\":{}}],[\"cron_exp\",{\"_index\":12,\"name\":{\"14\":{}},\"comment\":{}}],[\"default\",{\"_index\":34,\"name\":{\"52\":{}},\"comment\":{}}],[\"duration\",{\"_index\":13,\"name\":{\"15\":{}},\"comment\":{}}],[\"field\",{\"_index\":8,\"name\":{\"8\":{},\"25\":{},\"43\":{}},\"comment\":{}}],[\"fields\",{\"_index\":18,\"name\":{\"20\":{}},\"comment\":{}}],[\"filter\",{\"_index\":9,\"name\":{\"9\":{},\"26\":{},\"44\":{}},\"comment\":{}}],[\"filterbynotation\",{\"_index\":2,\"name\":{\"2\":{}},\"comment\":{}}],[\"filters\",{\"_index\":19,\"name\":{\"21\":{}},\"comment\":{}}],[\"grant\",{\"_index\":24,\"name\":{\"30\":{},\"36\":{}},\"comment\":{}}],[\"granted\",{\"_index\":21,\"name\":{\"27\":{}},\"comment\":{}}],[\"grants\",{\"_index\":22,\"name\":{\"28\":{}},\"comment\":{}}],[\"has\",{\"_index\":23,\"name\":{\"29\":{}},\"comment\":{}}],[\"hasall\",{\"_index\":27,\"name\":{\"33\":{}},\"comment\":{}}],[\"hasany\",{\"_index\":25,\"name\":{\"31\":{}},\"comment\":{}}],[\"hasscopeall\",{\"_index\":28,\"name\":{\"34\":{}},\"comment\":{}}],[\"hasscopeany\",{\"_index\":26,\"name\":{\"32\":{}},\"comment\":{}}],[\"ip_cidr\",{\"_index\":37,\"name\":{\"60\":{}},\"comment\":{}}],[\"location\",{\"_index\":10,\"name\":{\"10\":{},\"23\":{},\"45\":{}},\"comment\":{}}],[\"locations\",{\"_index\":20,\"name\":{\"22\":{}},\"comment\":{}}],[\"object\",{\"_index\":7,\"name\":{\"7\":{},\"41\":{}},\"comment\":{}}],[\"permission\",{\"_index\":14,\"name\":{\"16\":{}},\"comment\":{}}],[\"permissiongrant\",{\"_index\":30,\"name\":{\"47\":{}},\"comment\":{}}],[\"sep\",{\"_index\":32,\"name\":{\"50\":{},\"54\":{}},\"comment\":{}}],[\"strict\",{\"_index\":33,\"name\":{\"51\":{},\"55\":{}},\"comment\":{}}],[\"subject\",{\"_index\":5,\"name\":{\"5\":{},\"39\":{}},\"comment\":{}}],[\"time\",{\"_index\":11,\"name\":{\"11\":{},\"12\":{},\"24\":{},\"46\":{}},\"comment\":{}}],[\"times\",{\"_index\":17,\"name\":{\"19\":{}},\"comment\":{}}],[\"update\",{\"_index\":40,\"name\":{\"65\":{}},\"comment\":{}}],[\"validate\",{\"_index\":39,\"name\":{\"64\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file diff --git a/docs/assets/style.css b/docs/assets/style.css index 496e66f..da6c789 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -6,17 +6,36 @@ --light-color-background-warning: #e6e600; --light-color-icon-background: var(--light-color-background); --light-color-accent: #c5c7c9; + --light-color-active-menu-item: var(--light-color-accent); --light-color-text: #222; - --light-color-text-aside: #707070; - --light-color-link: #4da6ff; - --light-color-ts: #db1373; - --light-color-ts-interface: #139d2c; - --light-color-ts-enum: #9c891a; - --light-color-ts-class: #2484e5; + --light-color-text-aside: #6e6e6e; + --light-color-link: #1f70c2; + + --light-color-ts-project: #b111c9; + --light-color-ts-module: var(--light-color-ts-project); + --light-color-ts-namespace: var(--light-color-ts-project); + --light-color-ts-enum: #7e6f15; + --light-color-ts-enum-member: var(--light-color-ts-enum); + --light-color-ts-variable: #4760ec; --light-color-ts-function: #572be7; - --light-color-ts-namespace: #b111c9; - --light-color-ts-private: #707070; - --light-color-ts-variable: #4d68ff; + --light-color-ts-class: #1f70c2; + --light-color-ts-interface: #108024; + --light-color-ts-constructor: var(--light-color-ts-class); + --light-color-ts-property: var(--light-color-ts-variable); + --light-color-ts-method: var(--light-color-ts-function); + --light-color-ts-call-signature: var(--light-color-ts-method); + --light-color-ts-index-signature: var(--light-color-ts-property); + --light-color-ts-constructor-signature: var(--light-color-ts-constructor); + --light-color-ts-parameter: var(--light-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --light-color-ts-type-parameter: var(--light-color-ts-type-alias); + --light-color-ts-accessor: var(--light-color-ts-property); + --light-color-ts-get-signature: var(--light-color-ts-accessor); + --light-color-ts-set-signature: var(--light-color-ts-accessor); + /* object literal not included as it is not used and will be removed in 0.25 */ + --light-color-ts-type-alias: #d51270; + /* reference not included as links will be colored with the kind that it points to */ + --light-external-icon: url("data:image/svg+xml;utf8,"); --light-color-scheme: light; @@ -27,17 +46,36 @@ --dark-color-warning-text: #222; --dark-color-icon-background: var(--dark-color-background-secondary); --dark-color-accent: #9096a2; + --dark-color-active-menu-item: #5d5d6a; --dark-color-text: #f5f5f5; --dark-color-text-aside: #dddddd; --dark-color-link: #00aff4; - --dark-color-ts: #ff6492; - --dark-color-ts-interface: #6cff87; + + --dark-color-ts-project: #e14dff; + --dark-color-ts-module: var(--dark-color-ts-project); + --dark-color-ts-namespace: var(--dark-color-ts-project); --dark-color-ts-enum: #f4d93e; - --dark-color-ts-class: #61b0ff; + --dark-color-ts-enum-member: var(--dark-color-ts-enum); + --dark-color-ts-variable: #798dff; --dark-color-ts-function: #9772ff; - --dark-color-ts-namespace: #e14dff; - --dark-color-ts-private: #e2e2e2; - --dark-color-ts-variable: #4d68ff; + --dark-color-ts-class: #8ac4ff; + --dark-color-ts-interface: #6cff87; + --dark-color-ts-constructor: var(--dark-color-ts-class); + --dark-color-ts-property: var(--dark-color-ts-variable); + --dark-color-ts-method: var(--dark-color-ts-function); + --dark-color-ts-call-signature: var(--dark-color-ts-method); + --dark-color-ts-index-signature: var(--dark-color-ts-property); + --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); + --dark-color-ts-parameter: var(--dark-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --dark-color-ts-type-parameter: var(--dark-color-ts-type-alias); + --dark-color-ts-accessor: var(--dark-color-ts-property); + --dark-color-ts-get-signature: var(--dark-color-ts-accessor); + --dark-color-ts-set-signature: var(--dark-color-ts-accessor); + /* object literal not included as it is not used and will be removed in 0.25 */ + --dark-color-ts-type-alias: #ff6492; + /* reference not included as links will be colored with the kind that it points to */ + --dark-external-icon: url("data:image/svg+xml;utf8,"); --dark-color-scheme: dark; } @@ -50,17 +88,34 @@ --color-warning-text: var(--light-color-warning-text); --color-icon-background: var(--light-color-icon-background); --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); --color-text: var(--light-color-text); --color-text-aside: var(--light-color-text-aside); --color-link: var(--light-color-link); - --color-ts: var(--light-color-ts); - --color-ts-interface: var(--light-color-ts-interface); - --color-ts-enum: var(--light-color-ts-enum); - --color-ts-class: var(--light-color-ts-class); - --color-ts-function: var(--light-color-ts-function); + + --color-ts-module: var(--light-color-ts-module); --color-ts-namespace: var(--light-color-ts-namespace); - --color-ts-private: var(--light-color-ts-private); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + --external-icon: var(--light-external-icon); --color-scheme: var(--light-color-scheme); } @@ -74,17 +129,34 @@ --color-warning-text: var(--dark-color-warning-text); --color-icon-background: var(--dark-color-icon-background); --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); --color-text: var(--dark-color-text); --color-text-aside: var(--dark-color-text-aside); --color-link: var(--dark-color-link); - --color-ts: var(--dark-color-ts); - --color-ts-interface: var(--dark-color-ts-interface); - --color-ts-enum: var(--dark-color-ts-enum); - --color-ts-class: var(--dark-color-ts-class); - --color-ts-function: var(--dark-color-ts-function); + + --color-ts-module: var(--dark-color-ts-module); --color-ts-namespace: var(--dark-color-ts-namespace); - --color-ts-private: var(--dark-color-ts-private); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + --external-icon: var(--dark-external-icon); --color-scheme: var(--dark-color-scheme); } @@ -105,17 +177,34 @@ body { --color-warning-text: var(--light-color-warning-text); --color-icon-background: var(--light-color-icon-background); --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); --color-text: var(--light-color-text); --color-text-aside: var(--light-color-text-aside); --color-link: var(--light-color-link); - --color-ts: var(--light-color-ts); - --color-ts-interface: var(--light-color-ts-interface); - --color-ts-enum: var(--light-color-ts-enum); - --color-ts-class: var(--light-color-ts-class); - --color-ts-function: var(--light-color-ts-function); + + --color-ts-module: var(--light-color-ts-module); --color-ts-namespace: var(--light-color-ts-namespace); - --color-ts-private: var(--light-color-ts-private); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + --external-icon: var(--light-external-icon); --color-scheme: var(--light-color-scheme); } @@ -127,17 +216,34 @@ body { --color-warning-text: var(--dark-color-warning-text); --color-icon-background: var(--dark-color-icon-background); --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); --color-text: var(--dark-color-text); --color-text-aside: var(--dark-color-text-aside); --color-link: var(--dark-color-link); - --color-ts: var(--dark-color-ts); - --color-ts-interface: var(--dark-color-ts-interface); - --color-ts-enum: var(--dark-color-ts-enum); - --color-ts-class: var(--dark-color-ts-class); - --color-ts-function: var(--dark-color-ts-function); + + --color-ts-module: var(--dark-color-ts-module); --color-ts-namespace: var(--dark-color-ts-namespace); - --color-ts-private: var(--dark-color-ts-private); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + --external-icon: var(--dark-external-icon); --color-scheme: var(--dark-color-scheme); } @@ -208,26 +314,10 @@ dd { } .container { - max-width: 1600px; + max-width: 1700px; padding: 0 2rem; } -@media (min-width: 640px) { - .container { - padding: 0 4rem; - } -} -@media (min-width: 1200px) { - .container { - padding: 0 8rem; - } -} -@media (min-width: 1600px) { - .container { - padding: 0 12rem; - } -} - /* Footer */ .tsd-generator { border-top: 1px solid var(--color-accent); @@ -243,26 +333,9 @@ dd { } .container-main { - display: flex; - justify-content: space-between; - position: relative; margin: 0 auto; -} - -.col-4, -.col-8 { - box-sizing: border-box; - float: left; - padding: 2rem 1rem; -} - -.col-4 { - flex: 0 0 25%; -} -.col-8 { - flex: 1 0; - flex-wrap: wrap; - padding-left: 0; + /* toolbar, footer, margin */ + min-height: calc(100vh - 41px - 56px - 4rem); } @keyframes fade-in { @@ -305,22 +378,6 @@ dd { opacity: 0; } } -@keyframes shift-to-left { - from { - transform: translate(0, 0); - } - to { - transform: translate(-25%, 0); - } -} -@keyframes unshift-to-left { - from { - transform: translate(-25%, 0); - } - to { - transform: translate(0, 0); - } -} @keyframes pop-in-from-right { from { transform: translate(100%, 0); @@ -409,91 +466,6 @@ blockquote { margin: 1em 0; } -@media (max-width: 1024px) { - html .col-content { - float: none; - max-width: 100%; - width: 100%; - padding-top: 3rem; - } - html .col-menu { - position: fixed !important; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 1024; - top: 0 !important; - bottom: 0 !important; - left: auto !important; - right: 0 !important; - padding: 1.5rem 1.5rem 0 0; - max-width: 25rem; - visibility: hidden; - background-color: var(--color-background); - transform: translate(100%, 0); - } - html .col-menu > *:last-child { - padding-bottom: 20px; - } - html .overlay { - content: ""; - display: block; - position: fixed; - z-index: 1023; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: rgba(0, 0, 0, 0.75); - visibility: hidden; - } - - .to-has-menu .overlay { - animation: fade-in 0.4s; - } - - .to-has-menu :is(header, footer, .col-content) { - animation: shift-to-left 0.4s; - } - - .to-has-menu .col-menu { - animation: pop-in-from-right 0.4s; - } - - .from-has-menu .overlay { - animation: fade-out 0.4s; - } - - .from-has-menu :is(header, footer, .col-content) { - animation: unshift-to-left 0.4s; - } - - .from-has-menu .col-menu { - animation: pop-out-to-right 0.4s; - } - - .has-menu body { - overflow: hidden; - } - .has-menu .overlay { - visibility: visible; - } - .has-menu :is(header, footer, .col-content) { - transform: translate(-25%, 0); - } - .has-menu .col-menu { - visibility: visible; - transform: translate(0, 0); - display: flex; - flex-direction: column; - gap: 1.5rem; - max-height: 100vh; - padding: 1rem 2rem; - } - .has-menu .tsd-navigation { - max-height: 100%; - } -} - .tsd-breadcrumb { margin: 0; padding: 0; @@ -672,43 +644,6 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { -o-page-break-inside: avoid; page-break-inside: avoid; } -.tsd-index-panel a, -.tsd-index-panel a.tsd-parent-kind-module { - color: var(--color-ts); -} -.tsd-index-panel a.tsd-parent-kind-interface { - color: var(--color-ts-interface); -} -.tsd-index-panel a.tsd-parent-kind-enum { - color: var(--color-ts-enum); -} -.tsd-index-panel a.tsd-parent-kind-class { - color: var(--color-ts-class); -} -.tsd-index-panel a.tsd-kind-module { - color: var(--color-ts-namespace); -} -.tsd-index-panel a.tsd-kind-interface { - color: var(--color-ts-interface); -} -.tsd-index-panel a.tsd-kind-enum { - color: var(--color-ts-enum); -} -.tsd-index-panel a.tsd-kind-class { - color: var(--color-ts-class); -} -.tsd-index-panel a.tsd-kind-function { - color: var(--color-ts-function); -} -.tsd-index-panel a.tsd-kind-namespace { - color: var(--color-ts-namespace); -} -.tsd-index-panel a.tsd-kind-variable { - color: var(--color-ts-variable); -} -.tsd-index-panel a.tsd-is-private { - color: var(--color-ts-private); -} .tsd-flag { display: inline-block; @@ -723,7 +658,7 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { } .tsd-anchor { - position: absolute; + position: relative; top: -100px; } @@ -737,108 +672,60 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { margin-bottom: 0; border-bottom: none; } -.tsd-member [data-tsd-kind] { - color: var(--color-ts); -} -.tsd-member [data-tsd-kind="Interface"] { - color: var(--color-ts-interface); + +.tsd-navigation.settings { + margin: 1rem 0; } -.tsd-member [data-tsd-kind="Enum"] { - color: var(--color-ts-enum); +.tsd-navigation a, +.tsd-page-navigation a { + display: inline-flex; + align-items: center; + padding: 0.25rem; + color: var(--color-text); + text-decoration: none; + box-sizing: border-box; } -.tsd-member [data-tsd-kind="Class"] { - color: var(--color-ts-class); +.tsd-navigation a { + /* why 3rem? No idea, but it seems to work. */ + width: calc(100% - 3rem); } -.tsd-member [data-tsd-kind="Private"] { - color: var(--color-ts-private); +.tsd-page-navigation a { + /* why is this different? */ + width: 100%; } - -.tsd-navigation a { - display: block; - margin: 0.4rem 0; - border-left: 2px solid transparent; - color: var(--color-text); - text-decoration: none; - transition: border-left-color 0.1s; +.tsd-navigation a.current, +.tsd-page-navigation a.current { + background: var(--color-active-menu-item); } -.tsd-navigation a:hover { +.tsd-navigation a:hover, +.tsd-page-navigation a:hover { text-decoration: underline; } -.tsd-navigation ul { +.tsd-navigation ul, +.tsd-page-navigation ul { margin: 0; padding: 0; list-style: none; } -.tsd-navigation li { +.tsd-navigation li, +.tsd-page-navigation li { padding: 0; + max-width: 100%; } - -.tsd-navigation.primary .tsd-accordion-details > ul { - margin-top: 0.75rem; -} -.tsd-navigation.primary a { - padding: 0.75rem 0.5rem; - margin: 0; -} -.tsd-navigation.primary ul li a { - margin-left: 0.5rem; +.tsd-nested-navigation > li > a { + margin-left: 3rem; } -.tsd-navigation.primary ul li li a { +.tsd-nested-navigation > li > details { margin-left: 1.5rem; } -.tsd-navigation.primary ul li li li a { - margin-left: 2.5rem; -} -.tsd-navigation.primary ul li li li li a { - margin-left: 3.5rem; -} -.tsd-navigation.primary ul li li li li li a { - margin-left: 4.5rem; -} -.tsd-navigation.primary ul li li li li li li a { - margin-left: 5.5rem; -} -.tsd-navigation.primary li.current > a { - border-left: 0.15rem var(--color-text) solid; -} -.tsd-navigation.primary li.selected > a { - font-weight: bold; - border-left: 0.2rem var(--color-text) solid; -} -.tsd-navigation.primary ul li a:hover { - border-left: 0.2rem var(--color-text-aside) solid; -} -.tsd-navigation.primary li.globals + li > span, -.tsd-navigation.primary li.globals + li > a { - padding-top: 20px; -} - -.tsd-navigation.secondary.tsd-navigation--toolbar-hide { - max-height: calc(100vh - 1rem); - top: 0.5rem; -} -.tsd-navigation.secondary > ul { - display: inline; - padding-right: 0.5rem; - transition: opacity 0.2s; -} -.tsd-navigation.secondary ul li a { - padding-left: 0; -} -.tsd-navigation.secondary ul li li a { - padding-left: 1.1rem; -} -.tsd-navigation.secondary ul li li li a { - padding-left: 2.2rem; -} -.tsd-navigation.secondary ul li li li li a { - padding-left: 3.3rem; +.tsd-small-nested-navigation > li > a { + margin-left: 1.5rem; } -.tsd-navigation.secondary ul li li li li li a { - padding-left: 4.4rem; +.tsd-small-nested-navigation > li > details { + margin-left: 0; } -.tsd-navigation.secondary ul li li li li li li a { - padding-left: 5.5rem; +.tsd-page-navigation ul { + padding-left: 1.75rem; } #tsd-sidebar-links a { @@ -851,28 +738,22 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { } a.tsd-index-link { - margin: 0.25rem 0; + padding: 0.25rem 0 !important; font-size: 1rem; line-height: 1.25rem; display: inline-flex; align-items: center; + color: var(--color-text); } -.tsd-accordion-summary > h1, -.tsd-accordion-summary > h2, -.tsd-accordion-summary > h3, -.tsd-accordion-summary > h4, -.tsd-accordion-summary > h5 { - display: inline-flex; - align-items: center; - vertical-align: middle; - margin-bottom: 0; +.tsd-accordion-summary, +.tsd-accordion-summary a { user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; -} -.tsd-accordion-summary { - display: block; + + display: flex; + align-items: center; cursor: pointer; } .tsd-accordion-summary > * { @@ -910,34 +791,6 @@ a.tsd-index-link { margin-right: 0.8rem; } -@media (min-width: 1025px) { - .col-content { - margin: 2rem auto; - } - - .menu-sticky-wrap { - position: sticky; - height: calc(100vh - 2rem); - top: 4rem; - right: 0; - padding: 0 1.5rem; - padding-top: 1rem; - margin-top: 3rem; - transition: 0.3s ease-in-out; - transition-property: top, padding-top, padding, height; - overflow-y: auto; - } - .col-menu { - border-left: 1px solid var(--color-accent); - } - .col-menu--hide { - top: 1rem; - } - .col-menu .tsd-navigation:not(:last-child) { - padding-bottom: 1.75rem; - } -} - .tsd-panel { margin-bottom: 2.5rem; } @@ -1143,7 +996,7 @@ ul.tsd-type-parameter-list h5 { } .tsd-page-toolbar { - position: fixed; + position: sticky; z-index: 1; top: 0; left: 0; @@ -1183,10 +1036,6 @@ ul.tsd-type-parameter-list h5 { padding: 12px 0; } -.tsd-page-toolbar--hide { - transform: translateY(-100%); -} - .tsd-widget { display: inline-block; overflow: hidden; @@ -1214,12 +1063,6 @@ ul.tsd-type-parameter-list h5 { .tsd-widget.menu { display: none; } -@media (max-width: 1024px) { - .tsd-widget.options, - .tsd-widget.menu { - display: inline-block; - } -} input[type="checkbox"] + .tsd-widget:before { background-position: -120px 0; } @@ -1259,6 +1102,78 @@ img { background: var(--color-background-warning); } +.tsd-kind-project { + color: var(--color-ts-project); +} +.tsd-kind-module { + color: var(--color-ts-module); +} +.tsd-kind-namespace { + color: var(--color-ts-namespace); +} +.tsd-kind-enum { + color: var(--color-ts-enum); +} +.tsd-kind-enum-member { + color: var(--color-ts-enum-member); +} +.tsd-kind-variable { + color: var(--color-ts-variable); +} +.tsd-kind-function { + color: var(--color-ts-function); +} +.tsd-kind-class { + color: var(--color-ts-class); +} +.tsd-kind-interface { + color: var(--color-ts-interface); +} +.tsd-kind-constructor { + color: var(--color-ts-constructor); +} +.tsd-kind-property { + color: var(--color-ts-property); +} +.tsd-kind-method { + color: var(--color-ts-method); +} +.tsd-kind-call-signature { + color: var(--color-ts-call-signature); +} +.tsd-kind-index-signature { + color: var(--color-ts-index-signature); +} +.tsd-kind-constructor-signature { + color: var(--color-ts-constructor-signature); +} +.tsd-kind-parameter { + color: var(--color-ts-parameter); +} +.tsd-kind-type-literal { + color: var(--color-ts-type-literal); +} +.tsd-kind-type-parameter { + color: var(--color-ts-type-parameter); +} +.tsd-kind-accessor { + color: var(--color-ts-accessor); +} +.tsd-kind-get-signature { + color: var(--color-ts-get-signature); +} +.tsd-kind-set-signature { + color: var(--color-ts-set-signature); +} +.tsd-kind-type-alias { + color: var(--color-ts-type-alias); +} + +/* if we have a kind icon, don't color the text by kind */ +.tsd-kind-icon ~ span { + color: var(--color-text); +} + * { scrollbar-width: thin; scrollbar-color: var(--color-accent) var(--color-icon-background); @@ -1277,3 +1192,147 @@ img { border-radius: 999rem; border: 0.25rem solid var(--color-icon-background); } + +/* mobile */ +@media (max-width: 769px) { + .tsd-widget.options, + .tsd-widget.menu { + display: inline-block; + } + + .container-main { + display: flex; + } + html .col-content { + float: none; + max-width: 100%; + width: 100%; + } + html .col-sidebar { + position: fixed !important; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + padding: 1.5rem 1.5rem 0 0; + width: 75vw; + visibility: hidden; + background-color: var(--color-background); + transform: translate(100%, 0); + } + html .col-sidebar > *:last-child { + padding-bottom: 20px; + } + html .overlay { + content: ""; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; + } + + .to-has-menu .overlay { + animation: fade-in 0.4s; + } + + .to-has-menu .col-sidebar { + animation: pop-in-from-right 0.4s; + } + + .from-has-menu .overlay { + animation: fade-out 0.4s; + } + + .from-has-menu .col-sidebar { + animation: pop-out-to-right 0.4s; + } + + .has-menu body { + overflow: hidden; + } + .has-menu .overlay { + visibility: visible; + } + .has-menu .col-sidebar { + visibility: visible; + transform: translate(0, 0); + display: flex; + flex-direction: column; + gap: 1.5rem; + max-height: 100vh; + padding: 1rem 2rem; + } + .has-menu .tsd-navigation { + max-height: 100%; + } +} + +/* one sidebar */ +@media (min-width: 770px) { + .container-main { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + grid-template-areas: "sidebar content"; + margin: 2rem auto; + } + + .col-sidebar { + grid-area: sidebar; + } + .col-content { + grid-area: content; + padding: 0 1rem; + } +} +@media (min-width: 770px) and (max-width: 1399px) { + .col-sidebar { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + padding-top: 1rem; + } + .site-menu { + margin-top: 1rem; + } +} + +/* two sidebars */ +@media (min-width: 1200px) { + .container-main { + grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); + grid-template-areas: "sidebar content toc"; + } + + .col-sidebar { + display: contents; + } + + .page-menu { + grid-area: toc; + padding-left: 1rem; + } + .site-menu { + grid-area: sidebar; + } + + .site-menu { + margin-top: 1rem 0; + } + + .page-menu, + .site-menu { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + } +} diff --git a/docs/classes/Grant.html b/docs/classes/Grant.html index 50469f2..5d254a0 100644 --- a/docs/classes/Grant.html +++ b/docs/classes/Grant.html @@ -1,4 +1,4 @@ -Grant | abacl
+Grant | abacl
-
+
  • abacl
  • @@ -19,17 +19,17 @@

    Class Grant<S, Act, Obj>

Type Parameters

  • -

    S = string

  • +

    S = string

  • -

    Act = string

  • +

    Act = string

  • -

    Obj = string

+

Obj = string

Hierarchy

  • Grant
+
  • Defined in index.ts:324
  • @@ -37,29 +37,29 @@

    Constructors

    -
    +
    -
    +

    Obj = string

    Parameters

    -

    Returns Grant<S, Act, Obj>

    +
  • Defined in index.ts:337
  • Properties

    -
    +
    -
    ability: Ability<S, Act, Obj>
    -
    +
  • Defined in index.ts:329
  • +
    -
    action: "any" | Act
    -
    +
  • Defined in index.ts:326
  • +
    -
    object: "all" | Obj
    -
    +
  • Defined in index.ts:327
  • +
    -
    subject: S
    +
  • Defined in index.ts:325
  • Methods

    -
    +
    -
      - +
        +
      • It takes a data object and returns a filtered version of it based on the field notation

        @@ -120,25 +120,25 @@

        Returns

        The return type is a Partial | Partial[].

        Type Parameters

        • -

          T = unknown

    +

    T = unknown

    Parameters

    • -
      data: T
      +
      data: T

      The data to filter.

    • -
      Optional deep_copy: boolean = false
      +
      Optional deep_copy: boolean = false

      If true, the returned data will be a deep copy of the original data.

    -

    Returns Partial<T> | Partial<T>[]

    -
    +
  • Defined in index.ts:354
  • +
    -
      - +
        +
      • It takes a data object and returns a filtered version of it based on the filter notation

        @@ -148,25 +148,25 @@

        Returns

        A partial of the data that is passed in.

        Type Parameters

        • -

          T = unknown

    +

    T = unknown

    Parameters

    • -
      data: T
      +
      data: T

      The data to be filtered.

    • -
      Optional deep_copy: boolean = false
      +
      Optional deep_copy: boolean = false

      If true, the data will be deep copied before filtering.

    -

    Returns Partial<T> | Partial<T>[]

    +
    -
      - +
        +
      • It checks if the IP address is in the list of allowed IP addresses

        @@ -176,21 +176,21 @@

        Returns

        A boolean value.

        Parameters

        • -
          ip: string
          +
          ip: string

          The IP address to check.

        • -
          Optional strict: boolean = false
          +
          Optional strict: boolean = false

          If true, the user must be in the location list. If false, the user must be in the location list or the list must be empty.

        Returns boolean

    -
    +
  • Defined in index.ts:379
  • +
    -
      - +
        +
      • If the ability has a time property, check if the current time matches any of the time objects in the array

        @@ -201,26 +201,26 @@

        Returns

        A boolean value.

        Parameters

        • -
          Optional options: {
              currentDate?: Date;
              tz?: string;
          }
          +
          Optional options: {
              currentDate?: Date;
              tz?: string;
          }

          An object with the following properties:

          • -
            Optional currentDate?: Date
          • +
            Optional currentDate?: Date
          • -
            Optional tz?: string
        • +
          Optional tz?: string
      • -
        Optional strict: boolean = false
        +
        Optional strict: boolean = false

        If true, the ability will only be active if the time is explicitly set. If false, the ability will be active if the time is not explicitly set.

    Returns boolean

    -
    +
  • Defined in index.ts:400
  • +
    -
      - +
        +
      • "This function takes an ability and returns a grant."

        The function is generic, which means that it can be used with any ability. The generic parameters @@ -232,25 +232,26 @@

        Returns

        A new Grant object.

        Type Parameters

        • -

          S = string

        • +

          S = string

        • -

          Act = string

        • +

          Act = string

        • -

          Obj = string

    +

    Obj = string

    Parameters

    • -
      ability: Ability<S, Act, Obj>
      +
      ability: Ability<S, Act, Obj>

      The ability to grant.

    -

    Returns Grant<S, Act, Obj>

    - +
    +
    +
    +

    On This Page

    - - + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/classes/Permission.html b/docs/classes/Permission.html index 4265696..efffc99 100644 --- a/docs/classes/Permission.html +++ b/docs/classes/Permission.html @@ -1,4 +1,4 @@ -Permission | abacl
    +Permission | abacl
    -
    +
    • abacl
    • @@ -19,17 +19,17 @@

      Class Permission<S, Act, Obj>

    Type Parameters

    • -

      S = string

    • +

      S = string

    • -

      Act = string

    • +

      Act = string

    • -

      Obj = string

    +

    Obj = string

    Hierarchy

    • Permission
    +
  • Defined in index.ts:106
  • @@ -37,38 +37,38 @@

    Constructors

    -
    +
    -
    +

    Obj = string

    -

    Returns Permission<S, Act, Obj>

    +
  • Defined in index.ts:219
  • Properties

    -
    +
    -
    fields: undefined | string[]
    -
    +
  • Defined in index.ts:108
  • +
    -
    filters: undefined | string[]
    -
    +
  • Defined in index.ts:109
  • +
    -
    granted: boolean
    +
    granted: boolean

    It returns the value of the private variable _granted.

    Returns

    The value of the _granted property.

    -
    +
  • Defined in index.ts:202
  • +
    -
    grants: PermissionGrant<S, Act, Obj>
    +
    grants: PermissionGrant<S, Act, Obj>

    It returns the value of the private variable _grants.

    Returns

    The grants property is being returned.

    -
    +
  • Defined in index.ts:209
  • +
    -
    locations: undefined | string[]
    -
    +
  • Defined in index.ts:110
  • +
    -
    times: undefined | Time[]
    +
  • Defined in index.ts:107
  • Methods

    -
    +
    -
      - +
        +
      • It returns an array of all the abilities that the subject grants

        Returns

        An array of Ability objects.

        -

        Returns Ability<S, Act, Obj>[]

    -
    +
  • Defined in index.ts:292
  • +
    -
      - +
        +
      • It takes a data object and returns a filtered version of it based on the fields that the user is allowed to see

        @@ -165,26 +165,26 @@

        Returns

        A partial of the data passed in.

        Type Parameters

        • -

          T = unknown

    +

    T = unknown

    Parameters

    • -
      data: T
      +
      data: T

      The data to filter.

    • -
      Optional deep_copy: boolean = false
      +
      Optional deep_copy: boolean = false

      If true, the returned object will be a deep copy of the original object.

    -

    Returns Partial<T> | Partial<T>[]

    -
    +
  • Defined in index.ts:179
  • +
    -
      - +
        +
      • It takes a data object and returns a filtered version of it based on the user's permissions

        @@ -194,25 +194,25 @@

        Returns

        A partial of the data passed in.

        Type Parameters

        • -

          T = unknown

    +

    T = unknown

    Parameters

    • -
      data: T
      +
      data: T

      The data to filter.

    • -
      Optional deep_copy: boolean = false
      +
      Optional deep_copy: boolean = false

      If true, the data will be deep copied before filtering.

    -

    Returns Partial<T> | Partial<T>[]

    +
    -
      - +
        +
      • If the pattern is not provided, set it to 'any:all' (which matches everything). If the pattern is not found in the grants, throw an error. Otherwise, return the grant that matches the pattern

        @@ -223,19 +223,19 @@

        Returns

        A Grant object

        Parameters

        • -
          Optional pattern: string
          +
          Optional pattern: string

          The pattern to match against. If not provided, it will match against all patterns.

        • -
          sep: string = ':'
        -

        Returns Grant<S, Act, Obj>

    +

    Returns Grant<S, Act, Obj>

    -
    +
  • Defined in index.ts:244
  • +
    -
      - +
        +
      • It returns true if any of the scope in the grants object match the pattern

        @@ -245,16 +245,16 @@

        Returns

        A boolean value.

        Parameters

        • -
          pattern: string
          +
          pattern: string

          The pattern to match against.

        Returns boolean

    -
    +
  • Defined in index.ts:231
  • +
    -
      - +
        +
      • It returns true if the grants object has a grant with an object of 'all'

        @@ -262,11 +262,11 @@

        Returns

        A boolean value.

        Returns boolean

    -
    +
  • Defined in index.ts:274
  • +
    -
      - +
        +
      • If any of the grants have an action of 'any', return true

        @@ -274,11 +274,11 @@

        Returns

        A boolean value.

        Returns boolean

    -
    +
  • Defined in index.ts:256
  • +
    -
      - +
        +
      • It returns true if the grants object has a scope with an object of 'all'

        @@ -286,11 +286,11 @@

        Returns

        A boolean value.

        Returns boolean

    -
    +
  • Defined in index.ts:283
  • +
    -
      - +
        +
      • If any of the grants have an scoped action of 'any', return true

        @@ -298,11 +298,11 @@

        Returns

        A boolean value.

        Returns boolean

    -
    +
  • Defined in index.ts:265
  • +
    -
      - +
        +
      • It checks if the IP address is in the list of allowed locations

        @@ -312,21 +312,21 @@

        Returns

        A boolean value

        Parameters

        • -
          ip: string
          +
          ip: string

          The IP address to check.

        • -
          Optional strict: boolean = false
          +
          Optional strict: boolean = false

          If true, the user must have a location set. If false, the user can have no location set.

        Returns boolean

    -
    +
  • Defined in index.ts:121
  • +
    -
      - +
        +
      • It checks if the current time is within the time range of any of the user's grants

        @@ -336,26 +336,26 @@

        Returns

        A boolean value.

        Parameters

        • -
          Optional options: {
              currentDate?: Date;
              tz?: string;
          }
          +
          Optional options: {
              currentDate?: Date;
              tz?: string;
          }

          currentDate?: Date; tz?: string

          • -
            Optional currentDate?: Date
          • +
            Optional currentDate?: Date
          • -
            Optional tz?: string
        • +
          Optional tz?: string
      • -
        Optional strict: boolean = false
        +
        Optional strict: boolean = false

        If true, the user must have at least one time restriction. If false, the user can have no time restrictions.

    Returns boolean

    -
    +
  • Defined in index.ts:151
  • +
    -
      - +
        +
      • It takes an array of abilities, and returns a permission object

        @@ -365,33 +365,34 @@

        Returns

        A Permission object

        Type Parameters

        • -

          S = string

        • +

          S = string

        • -

          Act = string

        • +

          Act = string

        • -

          Obj = string

    +

    Obj = string

    Parameters

    • -
      granted: boolean
      +
      granted: boolean

      boolean - whether the permission is granted or not.

    • -
      abilities: Ability<S, Act, Obj>[]
      +
      abilities: Ability<S, Act, Obj>[]

      An array of Ability objects.

    • -
      Optional sep: string = ':'
      +
      Optional sep: string = ':'

      The separator used to split the action and object.

    -

    Returns Permission<S, Act, Obj>

    +
    +
    +
    +

    On This Page

    - - + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/classes/default.html b/docs/classes/default.html index 4430694..391c578 100644 --- a/docs/classes/default.html +++ b/docs/classes/default.html @@ -1,4 +1,4 @@ -default | abacl
    +default | abacl
    -
    +
    • abacl
    • @@ -19,17 +19,17 @@

      Class default<S, Act, Obj>

    Type Parameters

    • -

      S = string

    • +

      S = string

    • -

      Act = string

    • +

      Act = string

    • -

      Obj = string

    +

    Obj = string

    Hierarchy

    • default
    +
  • Defined in index.ts:437
  • @@ -37,32 +37,32 @@

    Constructors

    -
    +
    -
    +

    Obj = string

    Parameters

    -

    Returns default<S, Act, Obj>

    +

    Returns default<S, Act, Obj>

    +
  • Defined in index.ts:462
  • Properties

    -
    +
    -
    _abilities: {
        [key: string]: PermissionGrant<S, Act, Obj>;
    } = {}
    +
    _abilities: {
        [key: string]: PermissionGrant<S, Act, Obj>;
    } = {}

    Type declaration

    -
    +
  • Defined in index.ts:442
  • +
    -
    _validators: {
        cron: ((val: string) => boolean);
        ip_cidr: ((val: string) => boolean);
    } = ...
    +
    _validators: {
        cron: ((val) => boolean);
        ip_cidr: ((val) => boolean);
    } = ...

    Type declaration

    • -
      cron: ((val: string) => boolean)
      +
      cron: ((val) => boolean)
      • -
          -
        • (val: string): boolean
        • +
            +
          • (val): boolean
          • Parameters

            • -
              val: string
            +
            val: string

    Returns boolean

  • -
    ip_cidr: ((val: string) => boolean)
    +
    ip_cidr: ((val) => boolean)
    • -
        -
      • (val: string): boolean
      • +
          +
        • (val): boolean
        • Parameters

          • -
            val: string
          +
          val: string

        Returns boolean

  • -
    +
  • Defined in index.ts:447
  • +
    -
    sep: string
    -
    +
  • Defined in index.ts:438
  • +
    -
    strict: boolean
    +
  • Defined in index.ts:439
  • Accessors

    -
    +
    -
      -
    • set abilities(abilities: Ability<S, Act, Obj>[]): void
    • +
        +
      • set abilities(abilities): void
      • It takes an array of abilities, and updates the internal abilities object with the new abilities

        @@ -160,18 +160,18 @@

        Returns void

    +
  • Defined in index.ts:519
  • Methods

    -
    +
    -
      - +
        +
      • It checks if the given subjects have the given action on the given object

        @@ -181,40 +181,40 @@

        Returns

        A Permission object

        Parameters

        • -
          subjects: S[]
          +
          subjects: S[]

          An array of subjects that the user has.

        • -
          action: Act
          +
          action: Act

          The action you want to perform on the object.

        • -
          object: Obj
          +
          object: Obj

          The object you want to check permissions for.

        • -
          Optional callable: null | ((perm: Permission<S, Act, Obj>) => boolean)
          +
          Optional callable: null | ((perm) => boolean)

          A function that takes a Permission object and returns a boolean.

        • -
          Optional options: Omit<AccessControlOption, "sep">
        -

        Returns Permission<S, Act, Obj>

      +

      Returns Permission<S, Act, Obj>

    -
    +
  • Defined in index.ts:537
  • +
    -
      - +
        +
      • It clears the abilities array

        Returns void

    -
    +
  • Defined in index.ts:510
  • +
    -
      - +
        +
      • It takes in an Ability object and validates it, then it adds it to the _abilities object

        @@ -222,16 +222,16 @@

        Returns void

    -
    +
  • Defined in index.ts:490
  • +
    -
      - +
        +
      • "If the ability is not valid, throw an error."

        The first line of the function calls the _validate function, which returns a boolean. If the @@ -241,16 +241,17 @@

        Returns void

    -
    +
    +
    +
    +

    On This Page

    - - + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/coverage/lcov-report/index.html b/docs/coverage/lcov-report/index.html index 25e5c38..9c9b646 100644 --- a/docs/coverage/lcov-report/index.html +++ b/docs/coverage/lcov-report/index.html @@ -101,7 +101,7 @@

    All files

    +accumulate | abacl
    -
    +

    Function accumulate

    -
      - +
        +
      • It takes an array of arrays of filters, and returns an array of filter

        @@ -27,16 +27,17 @@

        Returns

        An array of strings.

        Parameters

        • -
          Rest ...filters: string[][]
          +
          Rest ...filters: string[][]

          string[][]

        Returns string[]

    - +
    +
    -
    +

    Theme

    + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/check.html b/docs/functions/check.html index 3ff9eed..2cf77da 100644 --- a/docs/functions/check.html +++ b/docs/functions/check.html @@ -1,4 +1,4 @@ -check | abacl
    +check | abacl
    -
    +

    Function check

    -
      - +
        +
      • It checks if the current date is between the previous date and the next date.

        @@ -27,28 +27,29 @@

        Returns

        A boolean value

        Parameters

        • -
          -: {
              cron_exp: string;
              duration: number;
          }
          +
          -: {
              cron_exp: string;
              duration: number;
          }

          cron_exp: string;

          • -
            cron_exp: string
          • +
            cron_exp: string
          • -
            duration: number
        • +
          duration: number
      • -
        Optional options: {
            currentDate?: Date;
            tz?: string;
        }
        +
        Optional options: {
            currentDate?: Date;
            tz?: string;
        }
        • -
          Optional currentDate?: Date
        • +
          Optional currentDate?: Date
        • -
          Optional tz?: string
    +
    Optional tz?: string

    Returns boolean

    - +
    +
    -
    +

    Theme

    + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/filterByNotation.html b/docs/functions/filterByNotation.html index d9c52b8..08d3661 100644 --- a/docs/functions/filterByNotation.html +++ b/docs/functions/filterByNotation.html @@ -1,4 +1,4 @@ -filterByNotation | abacl
    +filterByNotation | abacl
    -
    +

    Function filterByNotation

    -
      - +
        +
      • It filters an object or array of objects by a given notation

        @@ -27,29 +27,30 @@

        Returns

        A new object with the notation filtered out.

        Type Parameters

        • -

          T = unknown

    +

    T = unknown

    Parameters

    • -
      data: T
      +
      data: T

      The data to filter.

    • -
      notation: string[]
      +
      notation: string[]

      The notation to filter by.

    • -
      Optional deep_copy: boolean = true
      +
      Optional deep_copy: boolean = true

      If true, the data will be converted to a plain object.

    -

    Returns Partial<T> | Partial<T>[]

    - +
    +
    -
    +

    Theme

    + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 0e0cd08..db90730 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ -abacl
    +abacl
    -
    +

    abacl

    -
    - -

    Attribute Based Access Control Library

    -
    -

    npm +

    Attribute Based Access Control Library

    npm Coverage Snyk Vulnerabilities for GitHub Repo npm @@ -34,51 +30,32 @@

    Attribute Based Access Control Library

  • Where can? the answer is location - With IP and CIDR you can find the location of users.
  • When can it? the answer is time - objects availabilities with cron expression and a duration.
  • - - -

    Quick Start Guide

    -
    -
    +

    Quick Start Guide

    Read more on defining scoped action and object ability in this link.

    - - -

    installation

    -
    -
    npm install --save abacl
    +

    installation

    npm install --save abacl
     
    - - -

    Usage

    -
    -

    Define your user abilities as a json array, so you can store it in your database:

    +

    Usage

    Define your user abilities as a json array, so you can store it in your database:

    import { Ability } from 'abacl';

    enum Role {
    Admin = 'admin',
    User = 'user',
    Guest = 'guest',
    Manager = 'manager',
    }

    const abilities: Ability<Role>[] = [
    {
    subject: Role.Admin,
    action: 'any',
    object: 'all',
    },
    {
    subject: Role.Guest,
    action: 'read',
    object: 'article:published',
    },
    {
    subject: Role.Manager,
    action: 'any',
    object: 'article',
    },
    {
    subject: Role.User,
    action: 'create:own',
    object: 'article',
    field: ['*', '!owner'],
    location: ['127.0.0.1', '192.168.1.0/24'],
    time: [
    {
    cron_exp: '* * 8 * * *',
    duration: 20 * 60 * 60,
    },
    ],
    },
    {
    subject: Role.User,
    action: 'read:own',
    object: 'article',
    },
    {
    subject: Role.User,
    action: 'read:shared',
    object: 'article',
    filter: ['*', '!id'],
    },
    {
    subject: Role.User,
    action: 'delete:own',
    object: 'article',
    },
    {
    subject: Role.User,
    action: 'update:own',
    object: 'article',
    field: ['*', '!owner'],
    },
    ];

    Article and User definition objects:

    const user = {
    id: 1,
    subject: Role.User,
    ip: '192.168.1.100',
    };

    const article = {
    id: 1,
    owner: 'user1',
    title: 'title',
    content: 'content',
    };

    Create a new access control object, then get the permission grants:

    -
    import AccessControl from 'abacl';

    // The `strict` `AccessControlOption` control the scoped functionality
    // default strict value is true, you can change it on the `can` method

    const ac = new AccessControl(abilities, { strict: false });
    const permission = ac.can([user.subject], 'read', 'article');

    // change strict mode dynamically, Example:
    // const strictPermission = ac.can([user.subject], 'read', 'article', undefined, { strict: true });

    /**
    * it('should change strict mode dynamically', () => {
    * const ac = new AccessControl(abilities, { strict: true });
    *
    * expect(ac.can([Role.User], 'read', 'article:published').granted).toBeFalsy();
    *
    * // After changing strict mode
    * expect(ac.can([Role.User], 'read', 'article:published', undefined, { strict: false }).granted).toBeTruthy();
    * });
    *
    * */

    if (permission.granted) {
    // default scope for action and object is `any` and `all`

    if (permission.has('own')) {
    // Or pattern 'own:.*'
    // user has read owned article objects
    }

    if (permission.has('shared')) {
    // Or pattern 'shared:.*'
    // user can access shared article objects
    }

    if (permission.has('published')) {
    // Or pattern '.*:published'
    // user can access shared article objects
    }

    // do something ...

    // get grants by pattern 'shared' or 'shared:.*'
    // pattern: [action_scoped_regex]:[object_scoped_regex]
    const response = permission.filter(article); // OR
    const response = permission.grant('shared').filter(article);

    // Now response has no `id` property so sent it to user
    } +
    import AccessControl from 'abacl';

    // The `strict` `AccessControlOption` control the scoped functionality
    // default strict value is true, you can change it on the `can` method

    const ac = new AccessControl(abilities, { strict: false });
    const permission = ac.can([user.subject], 'read', 'article');

    // change strict mode dynamically, Example:
    // const strictPermission = ac.can([user.subject], 'read', 'article', undefined, { strict: true });

    /**
    * it('should change strict mode dynamically', () => {
    * const ac = new AccessControl(abilities, { strict: true });
    *
    * expect(ac.can([Role.User], 'read', 'article:published').granted).toBeFalsy();
    *
    * // After changing strict mode
    * expect(ac.can([Role.User], 'read', 'article:published', undefined, { strict: false }).granted).toBeTruthy();
    * });
    *
    * */

    if (permission.granted) {
    // default scope for action and object is `any` and `all`

    if (permission.has('own')) {
    // Or pattern '.*:own'
    // user has read owned article objects
    }

    if (permission.has('shared')) {
    // Or pattern '.*:shared'
    // user can access shared article objects
    }

    if (permission.has('published')) {
    // Or pattern '.*:published'
    // user can access shared article objects
    }

    // do something ...

    // get grants by pattern 'shared' or 'shared:.*'
    // pattern: [action_scoped_regex]:[object_scoped_regex]
    const response = permission.filter(article); // OR
    const response = permission.grant('shared').filter(article);

    // Now response has no `id` property so sent it to user
    }

    Time and location access check example:

    import { Permission } from 'abacl';

    // default `strict` value is true
    const ac = new AccessControl(abilities, { strict: true });

    const permission = ac.can([user.subject], 'create', 'article', (perm: Permission) => {
    return perm.location(user.ip) && perm.time(); // OR Alternative Method
    return perm.grant('own').location(user.ip) && perm.grant('own').time();
    });

    if (permission.granted) {
    const inputData = permission.field(article); // OR
    const inputData = permission.grant('.*').field(article);

    // the `inputData` has not `owner` property
    // do something and then return results to user
    }
    - - -

    Thanks a lot

    -
    -

    accesscontrol - Role and Attribute based Access Control for Node.js

    +

    Thanks a lot

    accesscontrol - Role and Attribute based Access Control for Node.js

    CASL is an isomorphic authorization JavaScript library which restricts what resources a given user is allowed to access.

    - - -

    License

    -
    -

    MIT

    +

    License

    MIT

    - +
    +

    On This Page

    -
    -
    + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/AccessControlOption.html b/docs/interfaces/AccessControlOption.html index 79d50da..334587b 100644 --- a/docs/interfaces/AccessControlOption.html +++ b/docs/interfaces/AccessControlOption.html @@ -1,4 +1,4 @@ -AccessControlOption | abacl
    +AccessControlOption | abacl
    -
    +
    @@ -28,25 +28,26 @@

    Properties

    -
    +
    -
    sep?: string
    -
    +
  • Defined in index.ts:432
  • +
    -
    strict?: boolean
    - +
    +
    +
    +

    On This Page

    -
    - + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html index b7f0a5b..f3e33f5 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -1,4 +1,4 @@ -abacl
    +abacl
    - -
    + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/Ability.html b/docs/types/Ability.html index cc1bde8..056e05f 100644 --- a/docs/types/Ability.html +++ b/docs/types/Ability.html @@ -1,4 +1,4 @@ -Ability | abacl
    +Ability | abacl
    -
    +

    Type alias Ability<S, Act, Obj>

    -
    Ability<S, Act, Obj>: {
        action: Act | "any";
        field?: string[];
        filter?: string[];
        location?: string[];
        object: Obj | "all";
        subject: S;
        time?: Time[];
    }
    +
    Ability<S, Act, Obj>: {
        action: Act | "any";
        field?: string[];
        filter?: string[];
        location?: string[];
        object: Obj | "all";
        subject: S;
        time?: Time[];
    }

    Ability is a type that represents a single access ability.

    - -

    Property

    The subject that is allowed to perform the action on the object.

    - -

    Property

    The action that the subject is allowed to perform on the object.

    - -

    Property

    The object that the user is trying to access.

    - -

    Property

    The field property is used to specify the fields that are allowed to be -accessed.

    - -

    Property

    A list of filters that can be applied to the object.

    - -

    Property

    IP address or CIDR

    - -

    Property

    This is an array of objects that contain a cron expression and a duration. The cron -expression is used to determine when the access ability is valid. The duration is used to determine -how long the access ability is valid.

    Type Parameters

    • -

      S = string

    • +

      S = string

    • -

      Act = string

    • +

      Act = string

    • -

      Obj = string

    +

    Obj = string

    Type declaration

    • -
      action: Act | "any"
    • +
      action: Act | "any"
    • -
      Optional field?: string[]
    • +
      Optional field?: string[]
    • -
      Optional filter?: string[]
    • +
      Optional filter?: string[]
    • -
      Optional location?: string[]
    • +
      Optional location?: string[]
    • -
      object: Obj | "all"
    • +
      object: Obj | "all"
    • -
      subject: S
    • +
      subject: S
    • -
      Optional time?: Time[]
    - +
    +
    -
    +

    Theme

    + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/PermissionGrant.html b/docs/types/PermissionGrant.html index da8ebd0..a8d22b3 100644 --- a/docs/types/PermissionGrant.html +++ b/docs/types/PermissionGrant.html @@ -1,4 +1,4 @@ -PermissionGrant | abacl
    +PermissionGrant | abacl
    -
    +

    Type alias PermissionGrant<S, Act, Obj>

    -
    PermissionGrant<S, Act, Obj>: {
        [key: string]: Grant<S, Act, Obj>;
    }
    +
    PermissionGrant<S, Act, Obj>: {
        [key: string]: Grant<S, Act, Obj>;
    }

    PermissionGrant is an object whose keys are strings and whose values are Grants.

    - -

    Property

    string] - Grant<S, Act, Obj>;

    Type Parameters

    • -

      S = string

    • +

      S = string

    • -

      Act = string

    • +

      Act = string

    • -

      Obj = string

    +

    Obj = string

    Type declaration

    • -
      [key: string]: Grant<S, Act, Obj>
    - +
    +
    -
    +

    Theme

    + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/types/Time.html b/docs/types/Time.html index f80d2ed..b55c123 100644 --- a/docs/types/Time.html +++ b/docs/types/Time.html @@ -1,4 +1,4 @@ -Time | abacl
    +Time | abacl
    -
    +

    Type alias Time

    -
    Time: {
        cron_exp: string;
        duration: number;
    }
    +
    Time: {
        cron_exp: string;
        duration: number;
    }

    Time is an object with two properties, cron_exp and duration, where cron_exp is a string and duration is a number.

    - -

    Property

    This is the cron expression that will be used to start the job.

    - -

    Property

    The duration of the job in seconds.

    Type declaration

    • -
      cron_exp: string
    • +
      cron_exp: string
    • -
      duration: number
    - +
    +
    -
    +

    Theme

    + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index ce0f000..53bcdd5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "abacl", - "version": "4.1.1", + "version": "4.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "abacl", - "version": "4.1.1", + "version": "4.1.2", "license": "MIT", "dependencies": { "cidr-regex": "^3.1.1", @@ -18,8 +18,8 @@ }, "devDependencies": { "@types/jest": "29.5.0", - "@typescript-eslint/eslint-plugin": "5.57.1", - "@typescript-eslint/parser": "5.57.1", + "@typescript-eslint/eslint-plugin": "5.59.0", + "@typescript-eslint/parser": "5.59.0", "eslint": "8.38.0", "eslint-config-prettier": "8.8.0", "eslint-plugin-prettier": "4.2.1", @@ -28,7 +28,7 @@ "prettier": "2.8.7", "ts-jest": "29.1.0", "ts-node": "10.9.1", - "typedoc": "0.23.28", + "typedoc": "0.24.4", "typescript": "5.0.4" } }, @@ -1395,15 +1395,15 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.57.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.57.1.tgz", - "integrity": "sha512-1MeobQkQ9tztuleT3v72XmY0XuKXVXusAhryoLuU5YZ+mXoYKZP9SQ7Flulh1NX4DTjpGTc2b/eMu4u7M7dhnQ==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.0.tgz", + "integrity": "sha512-p0QgrEyrxAWBecR56gyn3wkG15TJdI//eetInP3zYRewDh0XS+DhB3VUAd3QqvziFsfaQIoIuZMxZRB7vXYaYw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.57.1", - "@typescript-eslint/type-utils": "5.57.1", - "@typescript-eslint/utils": "5.57.1", + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/type-utils": "5.59.0", + "@typescript-eslint/utils": "5.59.0", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", @@ -1429,14 +1429,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.57.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.57.1.tgz", - "integrity": "sha512-hlA0BLeVSA/wBPKdPGxoVr9Pp6GutGoY380FEhbVi0Ph4WNe8kLvqIRx76RSQt1lynZKfrXKs0/XeEk4zZycuA==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.0.tgz", + "integrity": "sha512-qK9TZ70eJtjojSUMrrEwA9ZDQ4N0e/AuoOIgXuNBorXYcBDk397D2r5MIe1B3cok/oCtdNC5j+lUUpVB+Dpb+w==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.57.1", - "@typescript-eslint/types": "5.57.1", - "@typescript-eslint/typescript-estree": "5.57.1", + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/typescript-estree": "5.59.0", "debug": "^4.3.4" }, "engines": { @@ -1456,13 +1456,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.57.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.57.1.tgz", - "integrity": "sha512-N/RrBwEUKMIYxSKl0oDK5sFVHd6VI7p9K5MyUlVYAY6dyNb/wHUqndkTd3XhpGlXgnQsBkRZuu4f9kAHghvgPw==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.0.tgz", + "integrity": "sha512-tsoldKaMh7izN6BvkK6zRMINj4Z2d6gGhO2UsI8zGZY3XhLq1DndP3Ycjhi1JwdwPRwtLMW4EFPgpuKhbCGOvQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.57.1", - "@typescript-eslint/visitor-keys": "5.57.1" + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/visitor-keys": "5.59.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1473,13 +1473,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.57.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.57.1.tgz", - "integrity": "sha512-/RIPQyx60Pt6ga86hKXesXkJ2WOS4UemFrmmq/7eOyiYjYv/MUSHPlkhU6k9T9W1ytnTJueqASW+wOmW4KrViw==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.0.tgz", + "integrity": "sha512-d/B6VSWnZwu70kcKQSCqjcXpVH+7ABKH8P1KNn4K7j5PXXuycZTPXF44Nui0TEm6rbWGi8kc78xRgOC4n7xFgA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.57.1", - "@typescript-eslint/utils": "5.57.1", + "@typescript-eslint/typescript-estree": "5.59.0", + "@typescript-eslint/utils": "5.59.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1500,9 +1500,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.57.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.57.1.tgz", - "integrity": "sha512-bSs4LOgyV3bJ08F5RDqO2KXqg3WAdwHCu06zOqcQ6vqbTJizyBhuh1o1ImC69X4bV2g1OJxbH71PJqiO7Y1RuA==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.0.tgz", + "integrity": "sha512-yR2h1NotF23xFFYKHZs17QJnB51J/s+ud4PYU4MqdZbzeNxpgUr05+dNeCN/bb6raslHvGdd6BFCkVhpPk/ZeA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1513,13 +1513,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.57.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.57.1.tgz", - "integrity": "sha512-A2MZqD8gNT0qHKbk2wRspg7cHbCDCk2tcqt6ScCFLr5Ru8cn+TCfM786DjPhqwseiS+PrYwcXht5ztpEQ6TFTw==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.0.tgz", + "integrity": "sha512-sUNnktjmI8DyGzPdZ8dRwW741zopGxltGs/SAPgGL/AAgDpiLsCFLcMNSpbfXfmnNeHmK9h3wGmCkGRGAoUZAg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.57.1", - "@typescript-eslint/visitor-keys": "5.57.1", + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/visitor-keys": "5.59.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1540,17 +1540,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.57.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.57.1.tgz", - "integrity": "sha512-kN6vzzf9NkEtawECqze6v99LtmDiUJCVpvieTFA1uL7/jDghiJGubGZ5csicYHU1Xoqb3oH/R5cN5df6W41Nfg==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.0.tgz", + "integrity": "sha512-GGLFd+86drlHSvPgN/el6dRQNYYGOvRSDVydsUaQluwIW3HvbXuxyuD5JETvBt/9qGYe+lOrDk6gRrWOHb/FvA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.57.1", - "@typescript-eslint/types": "5.57.1", - "@typescript-eslint/typescript-estree": "5.57.1", + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/typescript-estree": "5.59.0", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, @@ -1566,12 +1566,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.57.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.57.1.tgz", - "integrity": "sha512-RjQrAniDU0CEk5r7iphkm731zKlFiUjvcBS2yHAg8WWqFMCaCrD0rKEVOMUyMMcbGPZ0bPp56srkGWrgfZqLRA==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.0.tgz", + "integrity": "sha512-qZ3iXxQhanchCeaExlKPV3gDQFxMUmU35xfd5eCXB6+kUw1TUAbIy2n7QIrwz9s98DQLzNWyHp61fY0da4ZcbA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.57.1", + "@typescript-eslint/types": "5.59.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -4862,14 +4862,14 @@ } }, "node_modules/typedoc": { - "version": "0.23.28", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.28.tgz", - "integrity": "sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==", + "version": "0.24.4", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.24.4.tgz", + "integrity": "sha512-vQuliyGhJEGeKzzCFHbkS3m0gHoIL6cfr0fHf6eX658iGELtq2J9mWe0b+X5McEYgFoMuHFt5Py3Zug6Sxjn/Q==", "dev": true, "dependencies": { "lunr": "^2.3.9", - "marked": "^4.2.12", - "minimatch": "^7.1.3", + "marked": "^4.3.0", + "minimatch": "^9.0.0", "shiki": "^0.14.1" }, "bin": { @@ -4892,15 +4892,15 @@ } }, "node_modules/typedoc/node_modules/minimatch": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.5.tgz", - "integrity": "sha512-OzOamaOmNBJZUv2qqY1OSWa+++4YPpOkLgkc0w30Oov5ufKlWWXnFUl0l4dgmSv5Shq/zRVkEOXAe2NaqO4l5Q==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.0.tgz", + "integrity": "sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" diff --git a/package.json b/package.json index 4e7bf78..e9369e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "abacl", - "version": "4.1.1", + "version": "4.1.2", "description": "Attribute Based Access Control Library", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -35,8 +35,8 @@ "homepage": "https://github.com/vhidvz/abacl#readme", "devDependencies": { "@types/jest": "29.5.0", - "@typescript-eslint/eslint-plugin": "5.57.1", - "@typescript-eslint/parser": "5.57.1", + "@typescript-eslint/eslint-plugin": "5.59.0", + "@typescript-eslint/parser": "5.59.0", "eslint": "8.38.0", "eslint-config-prettier": "8.8.0", "eslint-plugin-prettier": "4.2.1", @@ -45,7 +45,7 @@ "prettier": "2.8.7", "ts-jest": "29.1.0", "ts-node": "10.9.1", - "typedoc": "0.23.28", + "typedoc": "0.24.4", "typescript": "5.0.4" }, "dependencies": {