From df4517d4a3bc527755a38de2968857b6ec393f78 Mon Sep 17 00:00:00 2001 From: Taevas <67872932+TTTaevas@users.noreply.github.com> Date: Thu, 9 Nov 2023 18:47:55 +0100 Subject: [PATCH] Add some documentation & tweak `getUserScores` --- docs/.nojekyll | 1 + docs/CNAME | 1 + docs/assets/highlight.css | 64 + docs/assets/main.js | 59 + docs/assets/navigation.js | 1 + docs/assets/search.js | 1 + docs/assets/style.css | 1383 ++++++++++++++++++ docs/classes/API.html | 122 ++ docs/classes/APIError.html | 11 + docs/enums/Rulesets.html | 5 + docs/functions/generateAuthorizationURL.html | 6 + docs/index.html | 3 + docs/interfaces/Beatmap.html | 14 + docs/interfaces/BeatmapExtended.html | 32 + docs/interfaces/BeatmapUserScore.html | 4 + docs/interfaces/Beatmapset.html | 32 + docs/interfaces/BeatmapsetExtended.html | 47 + docs/interfaces/ChangelogBuild.html | 9 + docs/interfaces/KudosuHistory.html | 8 + docs/interfaces/Leader.html | 9 + docs/interfaces/MultiplayerScore.html | 18 + docs/interfaces/PlaylistItem.html | 14 + docs/interfaces/Room.html | 21 + docs/interfaces/Score.html | 32 + docs/interfaces/UpdateStream.html | 7 + docs/interfaces/User.html | 45 + docs/interfaces/UserExtended.html | 63 + docs/modules.html | 20 + lib/index.ts | 80 +- lib/score.ts | 9 + lib/tests/test.ts | 8 +- package.json | 2 +- yarn.lock | 12 +- 33 files changed, 2118 insertions(+), 25 deletions(-) create mode 100644 docs/.nojekyll create mode 100644 docs/CNAME create mode 100644 docs/assets/highlight.css create mode 100644 docs/assets/main.js create mode 100644 docs/assets/navigation.js create mode 100644 docs/assets/search.js create mode 100644 docs/assets/style.css create mode 100644 docs/classes/API.html create mode 100644 docs/classes/APIError.html create mode 100644 docs/enums/Rulesets.html create mode 100644 docs/functions/generateAuthorizationURL.html create mode 100644 docs/index.html create mode 100644 docs/interfaces/Beatmap.html create mode 100644 docs/interfaces/BeatmapExtended.html create mode 100644 docs/interfaces/BeatmapUserScore.html create mode 100644 docs/interfaces/Beatmapset.html create mode 100644 docs/interfaces/BeatmapsetExtended.html create mode 100644 docs/interfaces/ChangelogBuild.html create mode 100644 docs/interfaces/KudosuHistory.html create mode 100644 docs/interfaces/Leader.html create mode 100644 docs/interfaces/MultiplayerScore.html create mode 100644 docs/interfaces/PlaylistItem.html create mode 100644 docs/interfaces/Room.html create mode 100644 docs/interfaces/Score.html create mode 100644 docs/interfaces/UpdateStream.html create mode 100644 docs/interfaces/User.html create mode 100644 docs/interfaces/UserExtended.html create mode 100644 docs/modules.html diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..e2ac661 --- /dev/null +++ b/docs/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 0000000..fc31559 --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +osu-v2.taevas.xyz \ No newline at end of file diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css new file mode 100644 index 0000000..62e557d --- /dev/null +++ b/docs/assets/highlight.css @@ -0,0 +1,64 @@ +:root { + --light-hl-0: #AF00DB; + --dark-hl-0: #C586C0; + --light-hl-1: #000000; + --dark-hl-1: #D4D4D4; + --light-hl-2: #001080; + --dark-hl-2: #9CDCFE; + --light-hl-3: #795E26; + --dark-hl-3: #DCDCAA; + --light-hl-4: #098658; + --dark-hl-4: #B5CEA8; + --light-hl-5: #A31515; + --dark-hl-5: #CE9178; + --light-code-background: #FFFFFF; + --dark-code-background: #1E1E1E; +} + +@media (prefers-color-scheme: light) { :root { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --code-background: var(--light-code-background); +} } + +@media (prefers-color-scheme: dark) { :root { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --code-background: var(--dark-code-background); +} } + +:root[data-theme='light'] { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --code-background: var(--light-code-background); +} + +:root[data-theme='dark'] { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --code-background: var(--dark-code-background); +} + +.hl-0 { color: var(--hl-0); } +.hl-1 { color: var(--hl-1); } +.hl-2 { color: var(--hl-2); } +.hl-3 { color: var(--hl-3); } +.hl-4 { color: var(--hl-4); } +.hl-5 { color: var(--hl-5); } +pre, code { background: var(--code-background); } diff --git a/docs/assets/main.js b/docs/assets/main.js new file mode 100644 index 0000000..d0aa8d5 --- /dev/null +++ b/docs/assets/main.js @@ -0,0 +1,59 @@ +"use strict"; +"use strict";(()=>{var Pe=Object.create;var ne=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Ie(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Pe(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(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 d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.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,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(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=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 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),v=s.str.charAt(1),f;v in s.node.edges?f=s.node.edges[v]:(f=new t.TokenSet,s.node.edges[v]=f),s.str.length==1&&(f.final=!0),i.push({node:f,editsRemaining:s.editsRemaining-1,str:d+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),l=0;l1?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 se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){re.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()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}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 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)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ne(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"?ue(e,-1):s.key==="ArrowDown"?ue(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 Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${ce(l.parent,i)}.${d}`);let v=document.createElement("li");v.classList.value=l.classes??"";let f=document.createElement("a");f.href=r.base+l.url,f.innerHTML=u+d,v.append(f),e.appendChild(v)}}function ue(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 ce(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(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var Be={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Be[e])}var C=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",pe="mousemove",B="mouseup",J={x:0,y:0},fe=!1,ee=!1,He=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(He=!0,F="touchstart",pe="touchmove",B="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(pe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(B,()=>{ee=!1});document.addEventListener("click",t=>{fe&&(t.preventDefault(),t.stopImmediatePropagation(),fe=!1)});var X=class extends C{constructor(n){super(n);this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,r=>this.onPointerUp(r)),this.el.addEventListener("click",r=>r.preventDefault()),document.addEventListener(F,r=>this.onDocumentPointerDown(r)),document.addEventListener(B,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){D||(this.setActive(!0),n.preventDefault())}onDocumentPointerDown(n){if(this.active){if(n.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(n){if(!D&&this.active&&n.target.closest(".col-sidebar")){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 te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ve=document.head.appendChild(document.createElement("style"));ve.dataset.for="filters";var Y=class extends C{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()),ve.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 Z=class extends C{constructor(n){super(n);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 r=Q.getItem(this.key);this.el.open=r?r==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let i=this.summary.querySelector("a");i&&i.addEventListener("click",()=>{location.assign(i.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(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}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.href===r.href&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); +/*! Bundled license information: + +lunr/lunr.js: + (** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + *) + (*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + *) + (*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + *) +*/ diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js new file mode 100644 index 0000000..65d9e59 --- /dev/null +++ b/docs/assets/navigation.js @@ -0,0 +1 @@ +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA42S0WrCMBSG3yXXsjLZZHinQ1DmQCq9GrsIzbENS5OSnIBu+O5Lt6mtS4+9Pf//fT1J+vbFEPbIpiz1ChygYyNWcyzDBLSvXHKa35VYqRB+SC3Y9Ok4OpOzzeoC5Yo7By4Jwy5xP75iFtYaGwV/EoqeA8eK1xdYagS743ng/7IuPn6c/McXewQtQFCaU2eALnNgt7mxQPnOpQHCcOuUKsTDJEPO2apR0ueS6wKUKeZeqriwW6FkL14Y55fSobGHqKvToFRr4AJs1PEbUfCrVyhrxQ/U+12XKOEm1FRYeoVQRWXtAiVKjYkLmoAC+89xc/msFhxhixZ4/NvtAilyPS/SBLdA8p9tFyhRARps2HXmsTRWfnKURmfp+iLdeZ03Q5f0dbv+ycPx/Rt1sOPsMwUAAA==" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js new file mode 100644 index 0000000..ad48323 --- /dev/null +++ b/docs/assets/search.js @@ -0,0 +1 @@ +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA8WdW5PjupGg/0v3a09ZuJCS/DSXnY11rCfWYa/35YRDwVKxquiWRJmiqrvH4f++BCBQiWQmCJLq45dzqqsAZBKJS+aHBPn3T0397fLpt7/8/dPX6vTy6be5/vLpVBzLT7/99FaeyqZoy3+7tu91U/130Vb16c9//P2nL5+uzaEr8Ho97c3vLr/hij69t8dDV35/KC6XspPz6dM/vnhRQm56Wf/2h9/9Z9PUTd/2rcZv/B+iLWVC9i3tO33a5rpvxxr7HJYEDX/5dC6a8tRCvYDaK3nvo2N5uRRv5Yike6l5Ui5l81GOPU5faJ6M8vRyrquuaFwKKDZPTlew+6Etm8uIpKBguqxwUFEyokNJrvS9gX1TmkF9+XHasw19Dguxis4brpNGKtfl+0NV0oa9Ne//ntJynmUq75ve7dofZ3L4w6af+mKshKebEswjVC+JMp5syTExXiF2vnVGHe0wL7EvvVBqW38tTyP9GZSZPBDK7+eqKcmJd5vdfYHJbRf7fbfK7ayCvABUarKUpnzt9HsfE4OLTZZzvdDrrWv+9tfJrV729TnW/f3fJ7fcrfzP9SUycO4FpmvN7j6pGw+3vh7qN75Z98d7m+3l5V+qy7+cm+qjW28TJdTPbVGd/m98tISFFkq8Db0RkajU5J5ryr9dy0tkiboXWPg8b2X7x/JSX5t9+X++nWLjgCg5+bm6Nv4cnXr3AnPbjsw/UGJu63/a19EVFhebK+d/X1/qy3VUTl9sjpz/2XS71kv8Ye5l5kj49851OhbnqIR7mQUS4g8BCi2Q8T+q19dqfz20P/6tbZvq+dqODIR4vQWa9CMsRTws/AiZSc+8eA54k8XcNFxsgZ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ZJCE4ZEQ/zht0QyTqSW8kazZoxVbeZhrCmcUb4S2MPehqzDrH16dFP4tBaJP4+vfLsBmqN+b3VFzFl5VFivvHbEZF6a10NUWEF1Lf/As9a0p6SMXxR7EWVdrkOojYVa3Yo8kLtfnY9W2pGMDOSWLvW4nibtD+RFi221w685vYFtOEYyeJDyiVuxO3hbV14DIQ7oqVp7UbvqTc27odbEzCmIhwhHKQ3DfpOwXTO3p6JZb7G3b5EV9mOMi+5WXDXRvDaGAD8aNgs3wsJ7S8M0icH6wnVy3YUQhwmQJXmRXj8pJgUhOCj/UWTbp2iHuqcA93597a/baQPvNjHSU8BSs79wgx70mYRar9gckessNruvJnpOejwQqgLkqwieRiC2nijt43rlEznCJhb2x5hwvV5+oDk849JbbIPBtH9APPilF+HMD6cm17F89wE5/nPoXEKSbK+bvNcltnzTj2131bpu/WMa67O4+1f696hYs8weUGAMHtuiTfLiRaRsbImeIajOWHdnK+MUBcEEQ3nfQviN9cpDSPlz0d6y06LvAr0dsqqUVfO4iqLIpT3vkS8LLbsI3KtiTG9MW+dICGAcIdtf25Cgg/mBG+KMnwaYJD9M34RU0zXqxHyY/9hIuhkH2I18P3xoSMCFeCm8sbyPNXmC7tYXUh1EAuw58VC9leBQNT9qkv2Cp2H77Vj53ASPa8qDN2MSLb6XJ8A2jL6gzfTj4ly+fztW5tJlUv/3lL//4x/8HSFQzgV2TAQA="; \ No newline at end of file diff --git a/docs/assets/style.css b/docs/assets/style.css new file mode 100644 index 0000000..108428c --- /dev/null +++ b/docs/assets/style.css @@ -0,0 +1,1383 @@ +:root { + /* Light */ + --light-color-background: #f2f4f8; + --light-color-background-secondary: #eff0f1; + --light-color-warning-text: #222; + --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: #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-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); + --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; + + /* Dark */ + --dark-color-background: #2b2e33; + --dark-color-background-secondary: #1e2024; + --dark-color-background-warning: #bebe00; + --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-project: #e358ff; + --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-enum-member: var(--dark-color-ts-enum); + --dark-color-ts-variable: #798dff; + --dark-color-ts-function: #a280ff; + --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); + --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; +} + +@media (prefers-color-scheme: light) { + :root { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --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-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --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); + } +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --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-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --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); + } +} + +html { + color-scheme: var(--color-scheme); +} + +body { + margin: 0; +} + +:root[data-theme="light"] { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --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-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --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); +} + +:root[data-theme="dark"] { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --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-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --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); +} + +.always-visible, +.always-visible .tsd-signatures { + display: inherit !important; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: 1.2; +} + +h1 > a, +h2 > a, +h3 > a, +h4 > a, +h5 > a, +h6 > a { + text-decoration: none; + color: var(--color-text); +} + +h1 { + font-size: 1.875rem; + margin: 0.67rem 0; +} + +h2 { + font-size: 1.5rem; + margin: 0.83rem 0; +} + +h3 { + font-size: 1.25rem; + margin: 1rem 0; +} + +h4 { + font-size: 1.05rem; + margin: 1.33rem 0; +} + +h5 { + font-size: 1rem; + margin: 1.5rem 0; +} + +h6 { + font-size: 0.875rem; + margin: 2.33rem 0; +} + +.uppercase { + text-transform: uppercase; +} + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +.container { + max-width: 1700px; + padding: 0 2rem; +} + +/* Footer */ +.tsd-generator { + border-top: 1px solid var(--color-accent); + padding-top: 1rem; + padding-bottom: 1rem; + max-height: 3.5rem; +} + +.tsd-generator > p { + margin-top: 0; + margin-bottom: 0; + padding: 0 1rem; +} + +.container-main { + margin: 0 auto; + /* toolbar, footer, margin */ + min-height: calc(100vh - 41px - 56px - 4rem); +} + +@keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes fade-out { + from { + opacity: 1; + visibility: visible; + } + to { + opacity: 0; + } +} +@keyframes fade-in-delayed { + 0% { + opacity: 0; + } + 33% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fade-out-delayed { + 0% { + opacity: 1; + visibility: visible; + } + 66% { + opacity: 0; + } + 100% { + opacity: 0; + } +} +@keyframes pop-in-from-right { + from { + transform: translate(100%, 0); + } + to { + transform: translate(0, 0); + } +} +@keyframes pop-out-to-right { + from { + transform: translate(0, 0); + visibility: visible; + } + to { + transform: translate(100%, 0); + } +} +body { + background: var(--color-background); + font-family: "Segoe UI", sans-serif; + font-size: 16px; + color: var(--color-text); +} + +a { + color: var(--color-link); + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +a.external[target="_blank"] { + background-image: var(--external-icon); + background-position: top 3px right; + background-repeat: no-repeat; + padding-right: 13px; +} + +code, +pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 0.875rem; + border-radius: 0.8em; +} + +pre { + position: relative; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + padding: 10px; + border: 1px solid var(--color-accent); +} +pre code { + padding: 0; + font-size: 100%; +} +pre > button { + position: absolute; + top: 10px; + right: 10px; + opacity: 0; + transition: opacity 0.1s; + box-sizing: border-box; +} +pre:hover > button, +pre > button.visible { + opacity: 1; +} + +blockquote { + margin: 1em 0; + padding-left: 1em; + border-left: 4px solid gray; +} + +.tsd-typography { + line-height: 1.333em; +} +.tsd-typography ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; +} +.tsd-typography .tsd-index-panel h3, +.tsd-index-panel .tsd-typography h3, +.tsd-typography h4, +.tsd-typography h5, +.tsd-typography h6 { + font-size: 1em; +} +.tsd-typography h5, +.tsd-typography h6 { + font-weight: normal; +} +.tsd-typography p, +.tsd-typography ul, +.tsd-typography ol { + margin: 1em 0; +} +.tsd-typography table { + border-collapse: collapse; + border: none; +} +.tsd-typography td, +.tsd-typography th { + padding: 6px 13px; + border: 1px solid var(--color-accent); +} +.tsd-typography thead, +.tsd-typography tr:nth-child(even) { + background-color: var(--color-background-secondary); +} + +.tsd-breadcrumb { + margin: 0; + padding: 0; + color: var(--color-text-aside); +} +.tsd-breadcrumb a { + color: var(--color-text-aside); + text-decoration: none; +} +.tsd-breadcrumb a:hover { + text-decoration: underline; +} +.tsd-breadcrumb li { + display: inline; +} +.tsd-breadcrumb li:after { + content: " / "; +} + +.tsd-comment-tags { + display: flex; + flex-direction: column; +} +dl.tsd-comment-tag-group { + display: flex; + align-items: center; + overflow: hidden; + margin: 0.5em 0; +} +dl.tsd-comment-tag-group dt { + display: flex; + margin-right: 0.5em; + font-size: 0.875em; + font-weight: normal; +} +dl.tsd-comment-tag-group dd { + margin: 0; +} +code.tsd-tag { + padding: 0.25em 0.4em; + border: 0.1em solid var(--color-accent); + margin-right: 0.25em; + font-size: 70%; +} +h1 code.tsd-tag:first-of-type { + margin-left: 0.25em; +} + +dl.tsd-comment-tag-group dd:before, +dl.tsd-comment-tag-group dd:after { + content: " "; +} +dl.tsd-comment-tag-group dd pre, +dl.tsd-comment-tag-group dd:after { + clear: both; +} +dl.tsd-comment-tag-group p { + margin: 0; +} + +.tsd-panel.tsd-comment .lead { + font-size: 1.1em; + line-height: 1.333em; + margin-bottom: 2em; +} +.tsd-panel.tsd-comment .lead:last-child { + margin-bottom: 0; +} + +.tsd-filter-visibility h4 { + font-size: 1rem; + padding-top: 0.75rem; + padding-bottom: 0.5rem; + margin: 0; +} +.tsd-filter-item:not(:last-child) { + margin-bottom: 0.5rem; +} +.tsd-filter-input { + display: flex; + width: fit-content; + width: -moz-fit-content; + align-items: center; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + cursor: pointer; +} +.tsd-filter-input input[type="checkbox"] { + cursor: pointer; + position: absolute; + width: 1.5em; + height: 1.5em; + opacity: 0; +} +.tsd-filter-input input[type="checkbox"]:disabled { + pointer-events: none; +} +.tsd-filter-input svg { + cursor: pointer; + width: 1.5em; + height: 1.5em; + margin-right: 0.5em; + border-radius: 0.33em; + /* Leaving this at full opacity breaks event listeners on Firefox. + Don't remove unless you know what you're doing. */ + opacity: 0.99; +} +.tsd-filter-input input[type="checkbox"]:focus + svg { + transform: scale(0.95); +} +.tsd-filter-input input[type="checkbox"]:focus:not(:focus-visible) + svg { + transform: scale(1); +} +.tsd-checkbox-background { + fill: var(--color-accent); +} +input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { + stroke: var(--color-text); +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { + fill: var(--color-background); + stroke: var(--color-accent); + stroke-width: 0.25rem; +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { + stroke: var(--color-accent); +} + +.tsd-theme-toggle { + padding-top: 0.75rem; +} +.tsd-theme-toggle > h4 { + display: inline; + vertical-align: middle; + margin-right: 0.75rem; +} + +.tsd-hierarchy { + list-style: square; + margin: 0; +} +.tsd-hierarchy .target { + font-weight: bold; +} + +.tsd-panel-group.tsd-index-group { + margin-bottom: 0; +} +.tsd-index-panel .tsd-index-list { + list-style: none; + line-height: 1.333em; + margin: 0; + padding: 0.25rem 0 0 0; + overflow: hidden; + display: grid; + grid-template-columns: repeat(3, 1fr); + column-gap: 1rem; + grid-template-rows: auto; +} +@media (max-width: 1024px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(2, 1fr); + } +} +@media (max-width: 768px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(1, 1fr); + } +} +.tsd-index-panel .tsd-index-list li { + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; +} + +.tsd-flag { + display: inline-block; + padding: 0.25em 0.4em; + border-radius: 4px; + color: var(--color-comment-tag-text); + background-color: var(--color-comment-tag); + text-indent: 0; + font-size: 75%; + line-height: 1; + font-weight: normal; +} + +.tsd-anchor { + position: relative; + top: -100px; +} + +.tsd-member { + position: relative; +} +.tsd-member .tsd-anchor + h3 { + display: flex; + align-items: center; + margin-top: 0; + margin-bottom: 0; + border-bottom: none; +} + +.tsd-navigation.settings { + margin: 1rem 0; +} +.tsd-navigation > a, +.tsd-navigation .tsd-accordion-summary { + width: calc(100% - 0.5rem); +} +.tsd-navigation a, +.tsd-navigation summary > span, +.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-navigation a.current, +.tsd-page-navigation a.current { + background: var(--color-active-menu-item); +} +.tsd-navigation a:hover, +.tsd-page-navigation a:hover { + text-decoration: underline; +} +.tsd-navigation ul, +.tsd-page-navigation ul { + margin-top: 0; + margin-bottom: 0; + padding: 0; + list-style: none; +} +.tsd-navigation li, +.tsd-page-navigation li { + padding: 0; + max-width: 100%; +} +.tsd-nested-navigation { + margin-left: 3rem; +} +.tsd-nested-navigation > li > details { + margin-left: -1.5rem; +} +.tsd-small-nested-navigation { + margin-left: 1.5rem; +} +.tsd-small-nested-navigation > li > details { + margin-left: -1.5rem; +} + +.tsd-nested-navigation > li > a, +.tsd-nested-navigation > li > span { + width: calc(100% - 1.75rem - 0.5rem); +} + +.tsd-page-navigation ul { + padding-left: 1.75rem; +} + +#tsd-sidebar-links a { + margin-top: 0; + margin-bottom: 0.5rem; + line-height: 1.25rem; +} +#tsd-sidebar-links a:last-of-type { + margin-bottom: 0; +} + +a.tsd-index-link { + 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 { + list-style-type: none; /* hide marker on non-safari */ + outline: none; /* broken on safari, so just hide it */ +} +.tsd-accordion-summary::-webkit-details-marker { + display: none; /* hide marker on safari */ +} +.tsd-accordion-summary, +.tsd-accordion-summary a { + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + + cursor: pointer; +} +.tsd-accordion-summary a { + width: calc(100% - 1.5rem); +} +.tsd-accordion-summary > * { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; +} +.tsd-index-accordion .tsd-accordion-summary > svg { + margin-left: 0.25rem; +} +.tsd-index-content > :not(:first-child) { + margin-top: 0.75rem; +} +.tsd-index-heading { + margin-top: 1.5rem; + margin-bottom: 0.75rem; +} + +.tsd-kind-icon { + margin-right: 0.5rem; + width: 1.25rem; + height: 1.25rem; + min-width: 1.25rem; + min-height: 1.25rem; +} +.tsd-kind-icon path { + transform-origin: center; + transform: scale(1.1); +} +.tsd-signature > .tsd-kind-icon { + margin-right: 0.8rem; +} + +.tsd-panel { + margin-bottom: 2.5rem; +} +.tsd-panel.tsd-member { + margin-bottom: 4rem; +} +.tsd-panel:empty { + display: none; +} +.tsd-panel > h1, +.tsd-panel > h2, +.tsd-panel > h3 { + margin: 1.5rem -1.5rem 0.75rem -1.5rem; + padding: 0 1.5rem 0.75rem 1.5rem; +} +.tsd-panel > h1.tsd-before-signature, +.tsd-panel > h2.tsd-before-signature, +.tsd-panel > h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: none; +} + +.tsd-panel-group { + margin: 4rem 0; +} +.tsd-panel-group.tsd-index-group { + margin: 2rem 0; +} +.tsd-panel-group.tsd-index-group details { + margin: 2rem 0; +} + +#tsd-search { + transition: background-color 0.2s; +} +#tsd-search .title { + position: relative; + z-index: 2; +} +#tsd-search .field { + position: absolute; + left: 0; + top: 0; + right: 2.5rem; + height: 100%; +} +#tsd-search .field input { + box-sizing: border-box; + position: relative; + top: -50px; + z-index: 1; + width: 100%; + padding: 0 10px; + opacity: 0; + outline: 0; + border: 0; + background: transparent; + color: var(--color-text); +} +#tsd-search .field label { + position: absolute; + overflow: hidden; + right: -40px; +} +#tsd-search .field input, +#tsd-search .title, +#tsd-toolbar-links a { + transition: opacity 0.2s; +} +#tsd-search .results { + position: absolute; + visibility: hidden; + top: 40px; + width: 100%; + margin: 0; + padding: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); +} +#tsd-search .results li { + background-color: var(--color-background); + line-height: initial; + padding: 4px; +} +#tsd-search .results li:nth-child(even) { + background-color: var(--color-background-secondary); +} +#tsd-search .results li.state { + display: none; +} +#tsd-search .results li.current:not(.no-results), +#tsd-search .results li:hover:not(.no-results) { + background-color: var(--color-accent); +} +#tsd-search .results a { + display: flex; + align-items: center; + padding: 0.25rem; + box-sizing: border-box; +} +#tsd-search .results a:before { + top: 10px; +} +#tsd-search .results span.parent { + color: var(--color-text-aside); + font-weight: normal; +} +#tsd-search.has-focus { + background-color: var(--color-accent); +} +#tsd-search.has-focus .field input { + top: 0; + opacity: 1; +} +#tsd-search.has-focus .title, +#tsd-search.has-focus #tsd-toolbar-links a { + z-index: 0; + opacity: 0; +} +#tsd-search.has-focus .results { + visibility: visible; +} +#tsd-search.loading .results li.state.loading { + display: block; +} +#tsd-search.failure .results li.state.failure { + display: block; +} + +#tsd-toolbar-links { + position: absolute; + top: 0; + right: 2rem; + height: 100%; + display: flex; + align-items: center; + justify-content: flex-end; +} +#tsd-toolbar-links a { + margin-left: 1.5rem; +} +#tsd-toolbar-links a:hover { + text-decoration: underline; +} + +.tsd-signature { + margin: 0 0 1rem 0; + padding: 1rem 0.5rem; + border: 1px solid var(--color-accent); + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 14px; + overflow-x: auto; +} + +.tsd-signature-symbol { + color: var(--color-text-aside); + font-weight: normal; +} + +.tsd-signature-type { + font-style: italic; + font-weight: normal; +} + +.tsd-signatures { + padding: 0; + margin: 0 0 1em 0; + list-style-type: none; +} +.tsd-signatures .tsd-signature { + margin: 0; + border-color: var(--color-accent); + border-width: 1px 0; + transition: background-color 0.1s; +} +.tsd-description .tsd-signatures .tsd-signature { + border-width: 1px; +} + +ul.tsd-parameter-list, +ul.tsd-type-parameter-list { + list-style: square; + margin: 0; + padding-left: 20px; +} +ul.tsd-parameter-list > li.tsd-parameter-signature, +ul.tsd-type-parameter-list > li.tsd-parameter-signature { + list-style: none; + margin-left: -20px; +} +ul.tsd-parameter-list h5, +ul.tsd-type-parameter-list h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; +} +.tsd-sources { + margin-top: 1rem; + font-size: 0.875em; +} +.tsd-sources a { + color: var(--color-text-aside); + text-decoration: underline; +} +.tsd-sources ul { + list-style: none; + padding: 0; +} + +.tsd-page-toolbar { + position: sticky; + z-index: 1; + top: 0; + left: 0; + width: 100%; + color: var(--color-text); + background: var(--color-background-secondary); + border-bottom: 1px var(--color-accent) solid; + transition: transform 0.3s ease-in-out; +} +.tsd-page-toolbar a { + color: var(--color-text); + text-decoration: none; +} +.tsd-page-toolbar a.title { + font-weight: bold; +} +.tsd-page-toolbar a.title:hover { + text-decoration: underline; +} +.tsd-page-toolbar .tsd-toolbar-contents { + display: flex; + justify-content: space-between; + height: 2.5rem; + margin: 0 auto; +} +.tsd-page-toolbar .table-cell { + position: relative; + white-space: nowrap; + line-height: 40px; +} +.tsd-page-toolbar .table-cell:first-child { + width: 100%; +} +.tsd-page-toolbar .tsd-toolbar-icon { + box-sizing: border-box; + line-height: 0; + padding: 12px 0; +} + +.tsd-widget { + display: inline-block; + overflow: hidden; + opacity: 0.8; + height: 40px; + transition: + opacity 0.1s, + background-color 0.2s; + vertical-align: bottom; + cursor: pointer; +} +.tsd-widget:hover { + opacity: 0.9; +} +.tsd-widget.active { + opacity: 1; + background-color: var(--color-accent); +} +.tsd-widget.no-caption { + width: 40px; +} +.tsd-widget.no-caption:before { + margin: 0; +} + +.tsd-widget.options, +.tsd-widget.menu { + display: none; +} +input[type="checkbox"] + .tsd-widget:before { + background-position: -120px 0; +} +input[type="checkbox"]:checked + .tsd-widget:before { + background-position: -160px 0; +} + +img { + max-width: 100%; +} + +.tsd-anchor-icon { + display: inline-flex; + align-items: center; + margin-left: 0.5rem; + vertical-align: middle; + color: var(--color-text); +} + +.tsd-anchor-icon svg { + width: 1em; + height: 1em; + visibility: hidden; +} + +.tsd-anchor-link:hover > .tsd-anchor-icon svg { + visibility: visible; +} + +.deprecated { + text-decoration: line-through !important; +} + +.warning { + padding: 1rem; + color: var(--color-warning-text); + 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); +} + +*::-webkit-scrollbar { + width: 0.75rem; +} + +*::-webkit-scrollbar-track { + background: var(--color-icon-background); +} + +*::-webkit-scrollbar-thumb { + background-color: var(--color-accent); + 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/API.html b/docs/classes/API.html new file mode 100644 index 0000000..8ae6882 --- /dev/null +++ b/docs/classes/API.html @@ -0,0 +1,122 @@ +API | osu-api-v2-js

You can create an API instance using its createAsync function!

+

Hierarchy

  • API

Constructors

  • Use the API's createAsync instead of the default constructor if you don't have at least an access_token! +createAsync should always be your way of creating API instances!!

    +

    Parameters

    • Optional client: {
          id: number;
          secret: string;
      }
      • id: number
      • secret: string
    • Optional token_type: string
    • Optional expires: Date
    • Optional access_token: string
    • Optional scopes: Scope[]
    • Optional refresh_token: string
    • Optional user: number
    • verbose: "all" | "none" | "errors" = "none"
    • server: string = "https://osu.ppy.sh"

    Returns API

Properties

access_token: string
client: {
    id: number;
    secret: string;
}

Type declaration

  • id: number
  • secret: string
expires: Date
refresh_token?: string

Valid for an unknown amount of time, allows you to get a new token without going through the Authorization Code Grant! +Use the API's refreshToken function to do that

+
scopes: Scope[]
server: string

(default https://osu.ppy.sh) The base url of the server where the requests should land

+

Remarks

For tokens, requests will be sent to the oauth/token route, other requests will be sent to the api/v2 route

+
token_type: string

Should always be "Bearer"

+
user?: number

The osu! user id of the user who went through the Authorization Code Grant

+
verbose: "all" | "none" | "errors"

(default none) Which events should be logged

+

Methods

  • Get extensive beatmap data about whichever beatmap you want!

    +

    Parameters

    • beatmap: Beatmap | {
          id: number;
      }

      An object with the id of the beatmap you're trying to get

      +

    Returns Promise<BeatmapExtended>

  • Get various data about the difficulty of a beatmap!

    +

    Parameters

    • beatmap: Beatmap | {
          id: number;
      }

      The Beatmap in question

      +
    • Optional mods: number | string[] | Mod[]

      Defaults to No Mod, can be a bitset of mods, an array of mod acronyms ("DT" for DoubleTime), or an array of Mods

      +
    • Optional ruleset: Rulesets

      Defaults to the Ruleset the Beatmap was made for, useful to specify if you want a convert

      +

    Returns Promise<BeatmapDifficultyAttributes>

    The (beatmap) difficulty attributes of the Beatmap

    +

    Remarks

    Will ignore the customization of your mods

    +

    Example

    await api.getBeatmapDifficultyAttributes({id: 811925}, ["HR", "HD"])
    +
    +
  • Get data about a BeatmapPack using its tag!

    +

    Parameters

    • pack: BeatmapPack | {
          tag: string;
      }

      An object with the tag of the beatmappack you're trying to get

      +

    Returns Promise<BeatmapPack>

    Remarks

    Currently in https://osu.ppy.sh/beatmaps/packs, when hovering a pack, its link with its tag should show up on your browser's bottom left

    +
  • Get an Array of up to 100 BeatmapPacks of a specific type!

    +

    Parameters

    • type: "standard" | "featured" | "tournament" | "loved" | "chart" | "theme" | "artist" = "standard"

      The type of the BeatmapPacks, defaults to "standard"

      +

    Returns Promise<BeatmapPack[]>

  • Get the score on a beatmap made by a specific user (with specific mods and on a specific ruleset if needed)

    +

    Parameters

    • beatmap: Beatmap | {
          id: number;
      }

      The Beatmap the score was made on

      +
    • user: User | {
          id: number;
      }

      The User who made the score

      +
    • Optional mods: string[]

      The Mods used to make the score, defaults to any, you can use ["NM"] to filter out scores with mods

      +
    • Optional ruleset: Rulesets

      The Ruleset used to make the score, useful if it was made on a convert

      +

    Returns Promise<BeatmapUserScore>

    An Object with the position of the score according to the specified Mods and Ruleset, and with the score itself

    +
  • Get the score on a beatmap made by a specific user (with the possibility to specify if the scores are on a convert)

    +

    Parameters

    • beatmap: Beatmap | {
          id: number;
      }

      The Beatmap the scores were made on

      +
    • user: User | {
          id: number;
      }

      The User who made the scores

      +
    • Optional ruleset: Rulesets

      The Ruleset used to make the scores, defaults to the Ruleset the Beatmap was made for

      +

    Returns Promise<Score[]>

  • Get extensive beatmap data for up to 50 beatmaps at once!

    +

    Parameters

    • Optional ids: number[]

      An array composed of the ids of the beatmaps you want

      +

    Returns Promise<BeatmapExtended[]>

  • Parameters

    • format: "html" | "markdown"
    • Optional options: {
          build_version_range?: {
              from?: string;
              to?: string;
          };
          max_id: number;
          stream: string;
      }
      • Optional build_version_range?: {
            from?: string;
            to?: string;
        }
        • Optional from?: string
        • Optional to?: string
      • max_id: number
      • stream: string

    Returns Promise<ChangelogBuild[]>

  • Get user data of each friend of the authorized user

    +

    Returns Promise<User[]>

    Scope

    friends.read

    +
  • Parameters

    • id: number

      Can be found at the end of the URL of said match

      +

    Returns Promise<Match>

    Remarks

    For multiplayer lobbies from the stable (non-lazer) client, with URLs having community/matches or mp

    +
  • Gets the info of the 50 most recently created matches, descending order (most recent is at index 0)

    +

    Returns Promise<MatchInfo[]>

    Remarks

    For multiplayer lobbies from the stable (non-lazer) client, with URLs having community/matches or mp

    +
  • Get the scores on a specific item of a room

    +

    Parameters

    • item: PlaylistItem | {
          id: number;
          room_id: number;
      }

    Returns Promise<MultiplayerScore[]>

    Scope

    public

    +

    Remarks

    (2023-11-05) Is currently broken on osu!'s side, gotta love the API not being stable!

    +
  • Parameters

    • ruleset: Rulesets
    • type: "country" | "performance" | "charts" | "score"
    • filter: "all" | "friends"
    • Optional options: {
          country?: number;
          spotlight?: Spotlight | {
              id: number;
          };
          variant?: "4k" | "7k";
      }
      • Optional country?: number
      • Optional spotlight?: Spotlight | {
            id: number;
        }
      • Optional variant?: "4k" | "7k"

    Returns Promise<Rankings>

  • Get extensive user data about the authorized user

    +

    Parameters

    • Optional ruleset: Rulesets

      Defaults to the user's default/favourite Ruleset

      +

    Returns Promise<UserExtended>

    Scope

    identify

    +
  • Get the room stats of a user from the room, for each user of that room

    +

    Parameters

    • room: Room | {
          id: number;
      }

    Returns Promise<Leader[]>

    Scope

    public

    +
  • Get room data for each room fitting the given criterias

    +

    Parameters

    • mode: "all" | "active" | "ended" | "participated" | "owned" = "active"

    Returns Promise<Room[]>

    Scope

    public

    +
  • Returns Promise<Spotlight[]>

  • Get extensive user data about whoever you want!

    +

    Parameters

    • user: User | {
          id?: number;
          username?: string;
      }

      An object with either the id or the username of the user you're trying to get

      +
    • Optional ruleset: Rulesets

      Defaults to the user's default/favourite Ruleset

      +

    Returns Promise<UserExtended>

  • Get data about the activity of a user kudosu-wise!

    +

    Parameters

    • user: User | {
          id: number;
      }

      The user in question

      +
    • Optional limit: number

      The maximum amount of activities in the returned array, defaults to 5

      +
    • Optional offset: number

      How many elements that would be at the top of the returned array get skipped (while still filling the array up to the limit)

      +

    Returns Promise<KudosuHistory[]>

  • Get "notable" scores from a user

    +

    Parameters

    • user: User | {
          id: number;
      }

      The user who set the scores

      +
    • type: "best" | "firsts" | "recent"

      Do you want scores: in the user's top 100, that are top 1 on a beatmap, that have been recently set?

      +
    • Optional limit: number

      The maximum amount of scores to be returned

      +
    • Optional ruleset: Rulesets

      The Ruleset the scores were made in, defaults to the user's default/favourite Ruleset

      +
    • include_fails: boolean = false

      Do you want scores where the user didn't survive or quit the map? Defaults to false

      +
    • Optional offset: number

      How many elements that would be at the top of the returned array get skipped (while still filling the array up to the limit)

      +

    Returns Promise<Score[]>

  • Get user data for up to 50 users at once!

    +

    Parameters

    • ids: number[]

      An array composed of the ids of the users you want

      +

    Returns Promise<User[]>

  • Use this instead of console.log to log any information

    +

    Parameters

    • is_error: boolean

      Is the logging happening because of an error?

      +
    • Rest ...to_log: any[]

      Whatever you would put between the parentheses of console.log()

      +

    Returns void

  • Parameters

    • body: any
    • api: API

    Returns Promise<API>

  • Returns Promise<boolean>

  • Parameters

    • method: "get" | "post"
    • endpoint: string

      What comes in the URL after api/

      +
    • Optional parameters: {
          [k: string]: any;
      }

      The things to specify in the request, such as the beatmap_id when looking for a beatmap

      +
      • [k: string]: any
    • number_try: number = 1

      How many attempts there's been to get the data

      +

    Returns Promise<any>

    A Promise with either the API's response or false upon failing

    +
  • The normal way to create an API instance! Make sure to await it

    +

    Parameters

    • client: {
          id: number;
          secret: string;
      }

      The ID and the secret of your client, can be found on https://osu.ppy.sh/home/account/edit#new-oauth-application

      +
      • id: number
      • secret: string
    • Optional user: {
          code: string;
          redirect_uri: string;
      }

      If the instance is supposed to represent a user, use their Authorization Code and the Application Callback URL of your application!

      +
      • code: string
      • redirect_uri: string
    • verbose: "all" | "none" | "errors" = "none"
    • server: string = "https://osu.ppy.sh"

    Returns Promise<API>

    A promise with an API instance

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/APIError.html b/docs/classes/APIError.html new file mode 100644 index 0000000..8fdaa35 --- /dev/null +++ b/docs/classes/APIError.html @@ -0,0 +1,11 @@ +APIError | osu-api-v2-js

Class APIError

If the API throws an error, it should always be an APIError!

+

Hierarchy

  • APIError

Constructors

Properties

Constructors

  • Parameters

    • message: string

      The reason why things didn't go as expected

      +
    • server: string

      The server to which the request was sent

      +
    • endpoint: string

      The type of resource that was requested from the server

      +
    • parameters: string

      The filters that were used to specify what resource was wanted

      +

    Returns APIError

Properties

endpoint: string
message: string
parameters: string
server: string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/enums/Rulesets.html b/docs/enums/Rulesets.html new file mode 100644 index 0000000..ae41042 --- /dev/null +++ b/docs/enums/Rulesets.html @@ -0,0 +1,5 @@ +Rulesets | osu-api-v2-js

Enumeration Rulesets

Enumeration Members

Enumeration Members

fruits: 2
mania: 3
osu: 0
taiko: 1

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/functions/generateAuthorizationURL.html b/docs/functions/generateAuthorizationURL.html new file mode 100644 index 0000000..81d4f87 --- /dev/null +++ b/docs/functions/generateAuthorizationURL.html @@ -0,0 +1,6 @@ +generateAuthorizationURL | osu-api-v2-js

Function generateAuthorizationURL

  • Generates a link for users to click on in order to use your application!

    +

    Parameters

    • client_id: number
    • redirect_uri: string

      The specified Application Callback URL, aka where the user will be redirected upon clicking the button to authorize

      +
    • scopes: Scope[]

      What you want to do with/as the user

      +

    Returns string

    The link people should click on

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..68520d1 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,3 @@ +osu-api-v2-js

osu-api-v2-js

osu-api-v2-js

osu-api-v2-js is a JavaScript & TypeScript package that helps you interact with osu!api (v2).

+

It's currently extremely unstable as it's under heavy development, but be sure to come back soon so you can find it in a more stable state with documentation!!

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/Beatmap.html b/docs/interfaces/Beatmap.html new file mode 100644 index 0000000..c29ac26 --- /dev/null +++ b/docs/interfaces/Beatmap.html @@ -0,0 +1,14 @@ +Beatmap | osu-api-v2-js

Interface Beatmap

Hierarchy

Properties

beatmapset?: null | BeatmapsetExtended | Beatmapset

Beatmapset for Beatmap object, BeatmapsetExtended for BeatmapExtended object, null if the beatmap doesn't have associated beatmapset (e.g. deleted)

+
beatmapset_id: number
checksum?: string
difficulty_rating: number
failtimes?: Failtimes
id: number
max_combo?: number
mode: string
status: string
total_length: number
user_id: number
version: string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/BeatmapExtended.html b/docs/interfaces/BeatmapExtended.html new file mode 100644 index 0000000..071a2a6 --- /dev/null +++ b/docs/interfaces/BeatmapExtended.html @@ -0,0 +1,32 @@ +BeatmapExtended | osu-api-v2-js

Interface BeatmapExtended

Hierarchy

Properties

accuracy: number
ar: number
beatmapset?: null | BeatmapsetExtended | Beatmapset

Beatmapset for Beatmap object, BeatmapsetExtended for BeatmapExtended object, null if the beatmap doesn't have associated beatmapset (e.g. deleted)

+
beatmapset_id: number
bpm: null | number
checksum?: string
convert: boolean
count_circles: number
count_sliders: number
count_spinners: number
cs: number
deleted_at: null | Date
difficulty_rating: number
drain: number
failtimes?: Failtimes
hit_length: number
id: number
is_scoreable: boolean
last_updated: Date
max_combo?: number
mode: string
mode_int: number
passcount: number
playcount: number
ranked: RankStatus
status: string
total_length: number
url: string
user_id: number
version: string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/BeatmapUserScore.html b/docs/interfaces/BeatmapUserScore.html new file mode 100644 index 0000000..4ddd264 --- /dev/null +++ b/docs/interfaces/BeatmapUserScore.html @@ -0,0 +1,4 @@ +BeatmapUserScore | osu-api-v2-js

Interface BeatmapUserScore

Hierarchy

  • BeatmapUserScore

Properties

Properties

position: number

Value depends on the requested mode and mods!

+
score: Score

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/Beatmapset.html b/docs/interfaces/Beatmapset.html new file mode 100644 index 0000000..7519a32 --- /dev/null +++ b/docs/interfaces/Beatmapset.html @@ -0,0 +1,32 @@ +Beatmapset | osu-api-v2-js

Interface Beatmapset

Hierarchy

Properties

artist: string
artist_unicode: string
beatmaps?: BeatmapExtended[]
converts?: 0 | BeatmapExtended[]
covers: {
    card: string;
    card@2x: string;
    cover: string;
    cover@2x: string;
    list: string;
    list@2x: string;
    slimcover: string;
    slimcover@2x: string;
}

Type declaration

  • card: string
  • card@2x: string
  • cover: string
  • cover@2x: string
  • list: string
  • list@2x: string
  • slimcover: string
  • slimcover@2x: string
creator: string
current_nominations?: {
    beatmapset_id: number;
    reset: boolean;
    rulesets: null | Rulesets[];
    user_id: number;
}[]

Type declaration

  • beatmapset_id: number
  • reset: boolean
  • rulesets: null | Rulesets[]
  • user_id: number
current_user_attributes?: any
description?: {
    description: string;
}

Type declaration

  • description: string
discussions?: any
events?: any
favourite_count: number
genre?: {
    id: number;
    name: string;
}

Type declaration

  • id: number
  • name: string
has_favourited?: boolean
id: number
language?: {
    id: number;
    name: string;
}

Type declaration

  • id: number
  • name: string
nominations?: any
nsfw: boolean
pack_tags?: string[]
play_count: number
preview_url: string
ratings?: number[]
recent_favourites?: User[]
related_users?: User[]
source: string
status: string
title: string
title_unicode: string
user?: User
user_id: number
video: boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/BeatmapsetExtended.html b/docs/interfaces/BeatmapsetExtended.html new file mode 100644 index 0000000..abb14c2 --- /dev/null +++ b/docs/interfaces/BeatmapsetExtended.html @@ -0,0 +1,47 @@ +BeatmapsetExtended | osu-api-v2-js

Interface BeatmapsetExtended

Hierarchy

Properties

artist: string
artist_unicode: string
availability: {
    download_disabled: boolean;
    more_information: null | string;
}

Type declaration

  • download_disabled: boolean
  • more_information: null | string
beatmaps?: BeatmapExtended[]
bpm: number
can_be_hyped: boolean
converts?: 0 | BeatmapExtended[]
covers: {
    card: string;
    card@2x: string;
    cover: string;
    cover@2x: string;
    list: string;
    list@2x: string;
    slimcover: string;
    slimcover@2x: string;
}

Type declaration

  • card: string
  • card@2x: string
  • cover: string
  • cover@2x: string
  • list: string
  • list@2x: string
  • slimcover: string
  • slimcover@2x: string
creator: string
current_nominations?: {
    beatmapset_id: number;
    reset: boolean;
    rulesets: null | Rulesets[];
    user_id: number;
}[]

Type declaration

  • beatmapset_id: number
  • reset: boolean
  • rulesets: null | Rulesets[]
  • user_id: number
current_user_attributes?: any
deleted_at: null | string
description?: {
    description: string;
}

Type declaration

  • description: string
discussion_locked: boolean
discussions?: any
events?: any
favourite_count: number
genre?: {
    id: number;
    name: string;
}

Type declaration

  • id: number
  • name: string
has_favourited?: any
hype.current: number
hype.required: number
id: number
is_scoreable: boolean
language?: {
    id: number;
    name: string;
}

Type declaration

  • id: number
  • name: string
last_updated: Date
legacy_thread_url: null | string
nominations: {
    current: number;
    required: number;
}

Type declaration

  • current: number
  • required: number
nsfw: boolean
pack_tags?: string[]
play_count: number
preview_url: string
ranked: RankStatus
ranked_date: null | Date
ratings?: number[]
recent_favourites?: User[]
related_users?: User[]
source: string
status: string
storyboard: boolean
submitted_date: null | Date
tags: string
title: string
title_unicode: string
user?: User
user_id: number
video: boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/ChangelogBuild.html b/docs/interfaces/ChangelogBuild.html new file mode 100644 index 0000000..0add962 --- /dev/null +++ b/docs/interfaces/ChangelogBuild.html @@ -0,0 +1,9 @@ +ChangelogBuild | osu-api-v2-js

Interface ChangelogBuild

Hierarchy

  • ChangelogBuild

Properties

changelog_entries?: {
    category: string;
    created_at: null | Date;
    github_pull_request_id: null | number;
    github_url: null | string;
    id: null | number;
    major: boolean;
    repository: null | string;
    title: null | string;
    type: string;
    url: null | string;
}

Type declaration

  • category: string
  • created_at: null | Date
  • github_pull_request_id: null | number
  • github_url: null | string
  • id: null | number
  • major: boolean
  • repository: null | string
  • title: null | string
  • type: string
  • url: null | string
created_at: Date
display_version: string
id: number
update_stream: null | UpdateStream
users: number
version: null | string
versions?: {
    next: null | ChangelogBuild;
    previous: null | ChangelogBuild;
}

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/KudosuHistory.html b/docs/interfaces/KudosuHistory.html new file mode 100644 index 0000000..ed9b936 --- /dev/null +++ b/docs/interfaces/KudosuHistory.html @@ -0,0 +1,8 @@ +KudosuHistory | osu-api-v2-js

Interface KudosuHistory

Hierarchy

  • KudosuHistory

Properties

action: "reset" | "give" | "vote.give" | "vote.reset" | "revoke" | "vote.revoke"
amount: number
created_at: Date
giver: null | {
    url: string;
    username: string;
}

Type declaration

  • url: string
  • username: string
id: number
model: string
post: {
    title: string;
    url: null | string;
}

Type declaration

  • title: string
  • url: null | string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/Leader.html b/docs/interfaces/Leader.html new file mode 100644 index 0000000..359c6c1 --- /dev/null +++ b/docs/interfaces/Leader.html @@ -0,0 +1,9 @@ +Leader | osu-api-v2-js

Interface Leader

Hierarchy

  • Leader

Properties

accuracy: number
attempts: number
completed: number
pp: number
room_id: number
total_score: number
user: User
user_id: number

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/MultiplayerScore.html b/docs/interfaces/MultiplayerScore.html new file mode 100644 index 0000000..0f6d8e0 --- /dev/null +++ b/docs/interfaces/MultiplayerScore.html @@ -0,0 +1,18 @@ +MultiplayerScore | osu-api-v2-js

Interface MultiplayerScore

Hierarchy

  • MultiplayerScore

Properties

accuracy: number
beatmap_id: number
ended_at?: Date
id: number
max_combo: number
mods: Mod[]
passed: boolean
playlist_item_id: number
position?: null | number
rank: string
room_id: number
scores_around: {
    higher: MultiplayerScores;
    lower: MultiplayerScores;
}

Type declaration

  • higher: MultiplayerScores
  • lower: MultiplayerScores
started_at?: Date
statistics: any
total_score: number
user_id: number

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/PlaylistItem.html b/docs/interfaces/PlaylistItem.html new file mode 100644 index 0000000..83fe553 --- /dev/null +++ b/docs/interfaces/PlaylistItem.html @@ -0,0 +1,14 @@ +PlaylistItem | osu-api-v2-js

Interface PlaylistItem

Remarks

This is entirely absent from the official documentation +even though it's essential to get scores, due to the playlist system

+

Hierarchy

  • PlaylistItem

Properties

allowed_mods: Mod[]
beatmap: Beatmap
beatmap_id: number
expired: boolean
id: number
owner_id: number
played_at: Date
playlist_order: number
required_mods: Mod[]
room_id: number
ruleset_id: number

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/Room.html b/docs/interfaces/Room.html new file mode 100644 index 0000000..199d42e --- /dev/null +++ b/docs/interfaces/Room.html @@ -0,0 +1,21 @@ +Room | osu-api-v2-js

Interface Room

Remarks

This is entirely absent from the official documentation +even though it's essential to get scores, due to the playlist system

+

Hierarchy

  • Room

Properties

active: boolean
auto_skip: boolean
category: string
channel_id: number
current_user_score: {
    [k: string]: any;
}

Type declaration

  • [k: string]: any
ends_at: null | Date
has_password: boolean
host: User
id: number
max_attempts: null | number
name: string
participant_count: number
playlist: PlaylistItem[]
queue_mode: string
recent_participants: User[]
starts_at: Date
type: string
user_id: number

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/Score.html b/docs/interfaces/Score.html new file mode 100644 index 0000000..66491f5 --- /dev/null +++ b/docs/interfaces/Score.html @@ -0,0 +1,32 @@ +Score | osu-api-v2-js

Interface Score

Hierarchy

  • Score

Properties

accuracy: number

In a format where 96.40% would be 0.9640 (likely with some numbers after the zero)

+
beatmap?: Beatmap
beatmapset?: Beatmapset
best_id: number
created_at: Date
current_user_attributes?: {
    pin: null;
}

Type declaration

  • pin: null

    Remarks

    Seems to remain null even if the score is pinned on the user's profile

    +

Remarks

Not in the API's documentation, expect it to either be unreliable or disappear

+
id: number
match?: any
max_combo: number
mode: string
mode_int: Rulesets
mods: 0 | string[]

0 when NoMod

+
passed: boolean
perfect: boolean
pp: null | number

null when Beatmap is Loved (for example)

+
rank: string
rank_country?: any
rank_global?: any
replay: boolean
score: number
statistics: {
    count_100: number;
    count_300: number;
    count_50: number;
    count_geki: number;
    count_katu: number;
    count_miss: number;
}

Type declaration

  • count_100: number
  • count_300: number
  • count_50: number
  • count_geki: number
  • count_katu: number
  • count_miss: number
user?: any
user_id: number

The ID of the user who made the score

+
weight?: any

Remarks

Should only exist from the returned object of getUserScores if type is set to best

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/UpdateStream.html b/docs/interfaces/UpdateStream.html new file mode 100644 index 0000000..d94055e --- /dev/null +++ b/docs/interfaces/UpdateStream.html @@ -0,0 +1,7 @@ +UpdateStream | osu-api-v2-js

Interface UpdateStream

Hierarchy

  • UpdateStream

Properties

display_name: null | string
id: number
is_featured: boolean
latest_build: null | ChangelogBuild
name: string
user_count: number

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/User.html b/docs/interfaces/User.html new file mode 100644 index 0000000..b9e7009 --- /dev/null +++ b/docs/interfaces/User.html @@ -0,0 +1,45 @@ +User | osu-api-v2-js

Interface User

Hierarchy

Properties

account_history?: 0 | {
    description: null | string;
    id: number;
    length: number;
    permanent: boolean;
    timestamp: Date;
    type: "note" | "restriction" | "silence";
}[]
active_tournament_banner?: null | ProfileBanner
avatar_url: string
badges?: 0 | UserBadge[]
beatmap_playcounts_count?: number
blocks?: any
country?: {
    code: string;
    name: string;
}

Type declaration

  • code: string
  • name: string
country_code: string
cover?: {
    custom_url: null | string;
    id: null | string;
    url: string;
}

Type declaration

  • custom_url: null | string
  • id: null | string
  • url: string
default_group: string
favourite_beatmapset_count?: number
follower_count?: number
friends?: any
graveyard_beatmapset_count?: number
groups?: 0 | {
    colour: null | string;
    has_listing: boolean;
    has_playmodes: boolean;
    id: number;
    identifier: string;
    is_probationary: boolean;
    name: string;
    playmodes: null | string[];
    short_name: string;
}[]
id: number
is_active: boolean
is_bot: boolean
is_deleted: boolean
is_online: boolean
is_restricted?: null | boolean
is_supported: boolean
last_visit: null | Date
loved_beatmapset_count?: number
monthly_playcounts?: {
    count: number;
    start_date: Date;
}[]

Type declaration

  • count: number
  • start_date: Date
page?: {
    html: string;
    raw: string;
}

Type declaration

  • html: string
  • raw: string
pending_beatmapset_count?: number
pm_friends_only: boolean
previous_usernames?: string[]
profile_colour: null | string
rank_highest?: null | {
    rank: number;
    updated_at: Date;
}

Type declaration

  • rank: number
  • updated_at: Date
rank_history?: {
    data: number[];
    mode: string;
}

Type declaration

  • data: number[]
  • mode: string
ranked_beatmapset_count?: number
replays_watched_counts?: {
    count: number;
    start_date: Date;
}[]

Type declaration

  • count: number
  • start_date: Date
scores_best_count?: number
scores_recent_count?: number
statistics?: UserStatistics
statistics_rulesets?: {
    fruits: UserStatistics;
    mania: UserStatistics;
    osu: UserStatistics;
    taiko: UserStatistics;
}

Type declaration

  • fruits: UserStatistics
  • mania: UserStatistics
  • osu: UserStatistics
  • taiko: UserStatistics
support_level?: number
unread_pm_count?: number

Remarks

...I actually don't know its type and have been unable to figure it out, I'm only presuming it is number

+
user_achievements?: {
    achieved_at: Date;
    achievement_id: number;
}[]

Type declaration

  • achieved_at: Date
  • achievement_id: number
user_preferences?: any
username: string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/UserExtended.html b/docs/interfaces/UserExtended.html new file mode 100644 index 0000000..9f5bb60 --- /dev/null +++ b/docs/interfaces/UserExtended.html @@ -0,0 +1,63 @@ +UserExtended | osu-api-v2-js

Interface UserExtended

Hierarchy

Properties

account_history?: 0 | {
    description: null | string;
    id: number;
    length: number;
    permanent: boolean;
    timestamp: Date;
    type: "note" | "restriction" | "silence";
}[]
active_tournament_banner?: null | ProfileBanner
avatar_url: string
badges?: 0 | UserBadge[]
beatmap_playcounts_count?: number
blocks?: any
country?: {
    code: string;
    name: string;
}

Type declaration

  • code: string
  • name: string
country_code: string
cover?: {
    custom_url: null | string;
    id: null | string;
    url: string;
}

Type declaration

  • custom_url: null | string
  • id: null | string
  • url: string
cover_url: string
default_group: string
discord: null | string
favourite_beatmapset_count?: number
follower_count?: number
friends?: any
graveyard_beatmapset_count?: number
groups?: 0 | {
    colour: null | string;
    has_listing: boolean;
    has_playmodes: boolean;
    id: number;
    identifier: string;
    is_probationary: boolean;
    name: string;
    playmodes: null | string[];
    short_name: string;
}[]
has_supported: boolean
id: number
interests: null | string
is_active: boolean
is_bot: boolean
is_deleted: boolean
is_online: boolean
is_restricted?: null | boolean
is_supported: boolean
join_date: Date
kudosu: {
    available: number;
    total: number;
}

Type declaration

  • available: number
  • total: number
last_visit: null | Date
location: null | string
loved_beatmapset_count?: number
max_blocks: number
max_friends: number
monthly_playcounts?: {
    count: number;
    start_date: Date;
}[]

Type declaration

  • count: number
  • start_date: Date
occupation: null | string
page?: {
    html: string;
    raw: string;
}

Type declaration

  • html: string
  • raw: string
pending_beatmapset_count?: number
playmode: string
playstyle: string[]
pm_friends_only: boolean
post_count: number
previous_usernames?: string[]
profile_colour: null | string
profile_order: ProfilePage[]
rank_highest?: null | {
    rank: number;
    updated_at: Date;
}

Type declaration

  • rank: number
  • updated_at: Date
rank_history?: {
    data: number[];
    mode: string;
}

Type declaration

  • data: number[]
  • mode: string
ranked_beatmapset_count?: number
replays_watched_counts?: {
    count: number;
    start_date: Date;
}[]

Type declaration

  • count: number
  • start_date: Date
scores_best_count?: number
scores_recent_count?: number
statistics?: UserStatistics
statistics_rulesets?: {
    fruits: UserStatistics;
    mania: UserStatistics;
    osu: UserStatistics;
    taiko: UserStatistics;
}

Type declaration

  • fruits: UserStatistics
  • mania: UserStatistics
  • osu: UserStatistics
  • taiko: UserStatistics
support_level?: number
title: null | string
title_url: null | string
twitter: null | string
unread_pm_count?: number

Remarks

...I actually don't know its type and have been unable to figure it out, I'm only presuming it is number

+
user_achievements?: {
    achieved_at: Date;
    achievement_id: number;
}[]

Type declaration

  • achieved_at: Date
  • achievement_id: number
user_preferences?: any
username: string
website: null | string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html new file mode 100644 index 0000000..164feec --- /dev/null +++ b/docs/modules.html @@ -0,0 +1,20 @@ +osu-api-v2-js

Generated using TypeDoc

\ No newline at end of file diff --git a/lib/index.ts b/lib/index.ts index 17d8caf..f238b9f 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1,15 +1,15 @@ import fetch, { FetchError } from "node-fetch" import querystring from "querystring" -import { BeatmapExtended, BeatmapDifficultyAttributes, Beatmap, BeatmapPack, Beatmapset, BeatmapsetExtended } from "./beatmap.js" -import { KudosuHistory, UserExtended, User } from "./user.js" +import { User, UserExtended, KudosuHistory } from "./user.js" +import { Beatmap, BeatmapExtended, BeatmapDifficultyAttributes, BeatmapPack, Beatmapset, BeatmapsetExtended } from "./beatmap.js" import { Leader, Match, MatchInfo, MultiplayerScore, PlaylistItem, Room } from "./multiplayer.js" import { Rulesets, Mod } from "./misc.js" import { BeatmapUserScore, Score } from "./score.js" import { Rankings, Spotlight } from "./ranking.js" import { ChangelogBuild, UpdateStream } from "./changelog.js" -export {BeatmapExtended, Beatmap} -export {UserExtended, User, KudosuHistory} +export {User, UserExtended, KudosuHistory} +export {Beatmap, BeatmapExtended, Beatmapset, BeatmapsetExtended} export {BeatmapUserScore, Score} export {Room, Leader, PlaylistItem, MultiplayerScore} export {Rulesets} @@ -90,7 +90,8 @@ export class API { server: string /** - * Use `createAsync` instead of the default constructor if you don't have at least an access_token + * Use the API's `createAsync` instead of the default constructor if you don't have at least an access_token! + * `createAsync` should always be your way of creating API instances!! */ constructor(client?: {id: number, secret: string}, token_type?: string, expires?: Date, access_token?: string, scopes?: Scope[], refresh_token?: string, user?: number, @@ -282,14 +283,20 @@ export class API { // USER STUFF /** - * Get user data of the authorized user + * Get extensive user data about the authorized user + * @param ruleset Defaults to the user's default/favourite Ruleset * @scope identify */ async getResourceOwner(ruleset?: Rulesets): Promise { const response = await this.request("get", "me", {mode: ruleset}) return correctType(response) as UserExtended } - + + /** + * Get extensive user data about whoever you want! + * @param user An object with either the id or the username of the user you're trying to get + * @param ruleset Defaults to the user's default/favourite Ruleset + */ async getUser(user: {id?: number, username?: string} | User, ruleset?: Rulesets): Promise { const key = user.id !== undefined ? "id" : "username" const lookup = user.id !== undefined ? user.id : user.username @@ -299,21 +306,37 @@ export class API { return correctType(response) as UserExtended } + /** + * Get user data for up to 50 users at once! + * @param ids An array composed of the ids of the users you want + */ async getUsers(ids: number[]): Promise { const response = await this.request("get", "users", {ids}) return response.users.map((u: User) => correctType(u)) as User[] } - async getUserScores(limit: number, user: {id: number} | User, type: "best" | "firsts" | "recent", - options?: {ruleset?: Rulesets, include_fails?: boolean, offset?: number}): Promise { - const mode = options && options.ruleset !== undefined ? Rulesets[options.ruleset] : "" - const offset = options && options.offset !== undefined ? options.offset : "" - const include_fails = options && options.include_fails !== undefined ? options.include_fails : "" - - const response = await this.request("get", `users/${user.id}/scores/${type}`, {limit, mode, offset, include_fails}) + /** + * Get "notable" scores from a user + * @param user The user who set the scores + * @param type Do you want scores: in the user's top 100, that are top 1 on a beatmap, that have been recently set? + * @param limit The maximum amount of scores to be returned + * @param ruleset The Ruleset the scores were made in, defaults to the user's default/favourite Ruleset + * @param include_fails Do you want scores where the user didn't survive or quit the map? Defaults to false + * @param offset How many elements that would be at the top of the returned array get skipped (while still filling the array up to the limit) + */ + async getUserScores(user: {id: number} | User, type: "best" | "firsts" | "recent", limit?: number, + ruleset?: Rulesets, include_fails: boolean = false, offset?: number): Promise { + const mode = ruleset ? Rulesets[ruleset] : undefined + const response = await this.request("get", `users/${user.id}/scores/${type}`, {limit, mode, offset, include_fails: String(Number(include_fails))}) return response.map((s: Score) => correctType(s)) as Score[] } + /** + * Get data about the activity of a user kudosu-wise! + * @param user The user in question + * @param limit The maximum amount of activities in the returned array, defaults to 5 + * @param offset How many elements that would be at the top of the returned array get skipped (while still filling the array up to the limit) + */ async getUserKudosu(user: {id: number} | User, limit?: number, offset?: number): Promise { const response = await this.request("get", `users/${user.id}/kudosu`, {limit, offset}) return response.map((k: KudosuHistory) => correctType(k)) as KudosuHistory[] @@ -331,17 +354,26 @@ export class API { // BEATMAP STUFF + /** + * Get extensive beatmap data about whichever beatmap you want! + * @param beatmap An object with the id of the beatmap you're trying to get + */ async getBeatmap(beatmap: {id: number} | Beatmap): Promise { const response = await this.request("get", `beatmaps/${beatmap.id}`) return correctType(response) as BeatmapExtended } + /** + * Get extensive beatmap data for up to 50 beatmaps at once! + * @param ids An array composed of the ids of the beatmaps you want + */ async getBeatmaps(ids?: number[]): Promise { const response = await this.request("get", "beatmaps", {ids}) return response.beatmaps.map((b: BeatmapExtended) => correctType(b)) as BeatmapExtended[] } /** + * Get various data about the difficulty of a beatmap! * @remarks Will ignore the customization of your mods * @param beatmap The Beatmap in question * @param mods Defaults to No Mod, can be a bitset of mods, an array of mod acronyms ("DT" for DoubleTime), or an array of Mods @@ -358,6 +390,7 @@ export class API { } /** + * Get the score on a beatmap made by a specific user (with specific mods and on a specific ruleset if needed) * @param beatmap The Beatmap the score was made on * @param user The User who made the score * @param mods The Mods used to make the score, defaults to any, you can use `["NM"]` to filter out scores with mods @@ -371,22 +404,41 @@ export class API { return correctType(response) as BeatmapUserScore } + /** + * Get the score on a beatmap made by a specific user (with the possibility to specify if the scores are on a convert) + * @param beatmap The Beatmap the scores were made on + * @param user The User who made the scores + * @param ruleset The Ruleset used to make the scores, defaults to the Ruleset the Beatmap was made for + */ async getBeatmapUserScores(beatmap: {id: number} | Beatmap, user: {id: number} | User, ruleset?: Rulesets): Promise { const mode = ruleset ? Rulesets[ruleset] : undefined const response = await this.request("get", `beatmaps/${beatmap.id}/scores/users/${user.id}/all`, {mode}) return response.scores.map((s: Score) => correctType(s)) as Score[] } + /** + * Get extensive beatmapset data about whichever beatmapset you want! + * @param beatmap An object with the id of the beatmapset you're trying to get + */ async getBeatmapset(beatmapset: {id: number} | Beatmapset): Promise { const response = await this.request("get", `beatmapsets/${beatmapset.id}`) return correctType(response) as BeatmapsetExtended } + /** + * Get data about a BeatmapPack using its tag! + * @param pack An object with the tag of the beatmappack you're trying to get + * @remarks Currently in https://osu.ppy.sh/beatmaps/packs, when hovering a pack, its link with its tag should show up on your browser's bottom left + */ async getBeatmapPack(pack: {tag: string} | BeatmapPack): Promise { const response = await this.request("get", `beatmaps/packs/${pack.tag}`) return correctType(response) as BeatmapPack } + /** + * Get an Array of up to 100 BeatmapPacks of a specific type! + * @param type The type of the BeatmapPacks, defaults to "standard" + */ async getBeatmapPacks(type: "standard" | "featured" | "tournament" | "loved" | "chart" | "theme" | "artist" = "standard"): Promise { const response = await this.request("get", "beatmaps/packs", {type}) return correctType(response.beatmap_packs) as BeatmapPack[] diff --git a/lib/score.ts b/lib/score.ts index 364d754..1ab00fe 100644 --- a/lib/score.ts +++ b/lib/score.ts @@ -4,7 +4,13 @@ import { Rulesets } from "./misc.js" export interface Score { id: number best_id: number + /** + * The ID of the user who made the score + */ user_id: number + /** + * In a format where `96.40%` would be `0.9640` (likely with some numbers after the zero) + */ accuracy: number /** * 0 when NoMod @@ -35,6 +41,9 @@ export interface Score { beatmapset?: Beatmapset rank_country?: any rank_global?: any + /** + * @remarks Should only exist from the returned object of `getUserScores` if `type` is set to `best` + */ weight?: any user?: any match?: any diff --git a/lib/tests/test.ts b/lib/tests/test.ts index 27d0790..0d4a9d9 100644 --- a/lib/tests/test.ts +++ b/lib/tests/test.ts @@ -44,11 +44,11 @@ const testUserStuff = async (): Promise => { if (!isOk(a1, !a1 || (a1.id === user_id))) okay = false let a2 = await | false>>attempt("getUsers: ", api.getUsers([user_id, 2])) if (!isOk(a2, !a2 || (a2.length === 2))) okay = false - let a3 = await | false>>attempt("getUserScores: ", api.getUserScores(5, {id: user_id}, "best")) + let a3 = await | false>>attempt("getUserScores: ", api.getUserScores({id: user_id}, "best", 5)) if (!isOk(a3, !a3 || (a3.length === 5))) okay = false - let a4 = await | false>>attempt("getUserScores: ", api.getUserScores(5, {id: user_id}, "firsts")) + let a4 = await | false>>attempt("getUserScores: ", api.getUserScores({id: user_id}, "firsts", 5)) if (!isOk(a4, !a4 || (a4.length === 0))) okay = false - let a5 = await | false>>attempt("getUserScores: ", api.getUserScores(5, {id: user_id}, "recent")) + let a5 = await | false>>attempt("getUserScores: ", api.getUserScores({id: user_id}, "recent", 5)) if (!isOk(a5)) okay = false let a6 = await | false>>attempt("getUserKudosu: ", api.getUserKudosu({id: user_id}, 5)) if (!isOk(a6, !a6 || (a6.length === 5))) okay = false @@ -81,7 +81,7 @@ const testBeatmapStuff = async (): Promise => { let b7 = await | false>>attempt("getBeatmapPack", api.getBeatmapPack({tag: "P217"})) if (!isOk(b7, !b7 || (b7.tag === "P217"))) okay = false let b8 = await | false>>attempt("getBeatmapPacks", api.getBeatmapPacks("tournament")) - if (!isOk(b8, !b8 || (b8.length > 3))) okay = false + if (!isOk(b8, !b8 || (b8.length >= 100))) okay = false return okay } diff --git a/package.json b/package.json index d9a745c..4305268 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "osu-api-v2-js", - "version": "0.3.0", + "version": "0.3.1", "description": "Package to easily access osu!api version 2.0", "type": "module", "main": "dist/index.js", diff --git a/yarn.lock b/yarn.lock index 12c89e9..e1d6def 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,16 +3,16 @@ "@types/node@^20.8.10": - version "20.8.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.10.tgz#a5448b895c753ae929c26ce85cab557c6d4a365e" - integrity sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w== + version "20.9.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.9.0.tgz#bfcdc230583aeb891cf51e73cfdaacdd8deae298" + integrity sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw== dependencies: undici-types "~5.26.4" "@types/prompt-sync@^4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@types/prompt-sync/-/prompt-sync-4.2.2.tgz#df2bc03694ac28f15fb3d5f64356b6e6a1243d2a" - integrity sha512-S8GBVdrchd7egtwrWtnhzZ3mFKgwlFpOCsiemzYgd5Bg75SwR5RquDlE7G4ijPbbNtAATpdn/Km3u5PEAnTsAw== + version "4.2.3" + resolved "https://registry.yarnpkg.com/@types/prompt-sync/-/prompt-sync-4.2.3.tgz#b6a9fe88fc4b4cacb8ab59f87f2614d6e674e177" + integrity sha512-Ox77gCSx0YyeakGt/qfOZUSFNSSi+sh3ABoGOiCwiO2KODx492BJnUm9oIXS+AHJtqp12iM4RduY6viTJ9bYwA== ansi-regex@^4.1.0: version "4.1.1"