diff --git a/changelog.md b/changelog.md index a37bd95..41400e2 100644 --- a/changelog.md +++ b/changelog.md @@ -7,10 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 # 6.0.0 This update will break almost all existing applications! +The package has moved to `@nbsjs/core` to allow for future addons to the library. + Please carefully read through these changes and refer to the [examples](/examples). ### Changed - The project has been rebranded from `NBS.js` to `nbs.js`. +- The project has moved from `@encode42/nbs.js` to `@nbsjs/core`. +- The project's repository has moved to [Note Block World](https://github.com/OpenNBS). - The project is designated as a module by default. - This update redesigns how classes and their properties are structured. - Continuing what v5 started, multiple arrays tied to IDs/ticks have been transformed into an object. @@ -42,7 +46,6 @@ Please carefully read through these changes and refer to the [examples](/example - Moved all classes out of `util.ts` and into their own files. ### Added -- The `toJSON` and `fromJSON` functions. **Still in development!** - The `Song#setTempo` and `Song#setTimePerTick` methods update each other when changed. - The `SongLayers` class that provides helper methods and stores layers. - The `LayerNotes` class that provides helper methods and stores notes. diff --git a/examples/design/instrument.ts b/examples/design/instrument.ts index c88d838..1511af6 100644 --- a/examples/design/instrument.ts +++ b/examples/design/instrument.ts @@ -1,4 +1,4 @@ -import { Instrument, Song } from "@encode42/nbs.js"; +import { Instrument, Song } from "@nbsjs/core"; const instrument = new Instrument({ "name": "Sandple", diff --git a/examples/design/layer.ts b/examples/design/layer.ts index bdb6bbb..a8ddcec 100644 --- a/examples/design/layer.ts +++ b/examples/design/layer.ts @@ -1,4 +1,4 @@ -import { Layer } from "@encode42/nbs.js"; +import { Layer } from "@nbsjs/core"; const layer = new Layer({ "name": "Demo" diff --git a/examples/design/note.ts b/examples/design/note.ts index 9a0704b..d3b4af6 100644 --- a/examples/design/note.ts +++ b/examples/design/note.ts @@ -1,4 +1,4 @@ -import { Note } from "@encode42/nbs.js"; +import { Note } from "@nbsjs/core"; // Instrument ID 0 is always harp new Note(0, { diff --git a/examples/design/song.ts b/examples/design/song.ts index ededcd4..e9bfc9d 100644 --- a/examples/design/song.ts +++ b/examples/design/song.ts @@ -1,4 +1,4 @@ -import { Layer, Song } from "@encode42/nbs.js"; +import { Layer, Song } from "@nbsjs/core"; const song = new Song(); song.name = "Demo"; diff --git a/examples/full/iterateNotes.ts b/examples/full/iterateNotes.ts index 8ff87d6..f5bb15a 100644 --- a/examples/full/iterateNotes.ts +++ b/examples/full/iterateNotes.ts @@ -1,5 +1,5 @@ import { readFileSync, writeFileSync } from "node:fs"; -import { fromArrayBuffer, toArrayBuffer } from "@encode42/nbs.js"; +import { fromArrayBuffer, toArrayBuffer } from "@nbsjs/core"; // Read a NBS file named "song.nbs" const originalFile = readFileSync("song.nbs"); diff --git a/examples/full/randomSong.ts b/examples/full/randomSong.ts index f665526..6971457 100644 --- a/examples/full/randomSong.ts +++ b/examples/full/randomSong.ts @@ -1,4 +1,4 @@ -import { Song, toJSON } from "@encode42/nbs.js"; +import { Song, toJSON } from "@nbsjs/core"; const song = new Song(); song.name = "Chaos"; diff --git a/examples/simple/newSong.ts b/examples/simple/newSong.ts index 3fe75c6..707a9a3 100644 --- a/examples/simple/newSong.ts +++ b/examples/simple/newSong.ts @@ -1,4 +1,4 @@ -import { Note, Song } from "@encode42/nbs.js"; +import { Note, Song } from "@nbsjs/core"; // Create the song const song = new Song(); diff --git a/examples/simple/read.ts b/examples/simple/read.ts index a36cd5e..246514e 100644 --- a/examples/simple/read.ts +++ b/examples/simple/read.ts @@ -1,5 +1,5 @@ import { readFileSync } from "node:fs"; -import { fromArrayBuffer } from "@encode42/nbs.js"; +import { fromArrayBuffer } from "@nbsjs/core"; // Read a NBS file named "song.nbs" const originalFile = readFileSync("song.nbs"); diff --git a/examples/simple/write.ts b/examples/simple/write.ts index 8b81efb..7e6e08f 100644 --- a/examples/simple/write.ts +++ b/examples/simple/write.ts @@ -1,5 +1,5 @@ import { writeFileSync } from "node:fs"; -import { Song, toArrayBuffer } from "@encode42/nbs.js"; +import { Song, toArrayBuffer } from "@nbsjs/core"; const song = new Song(); diff --git a/package.json b/package.json index 7d9ff9c..002795e 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,21 @@ { "type": "module", - "name": "@encode42/nbs.js", + "name": "@nbsjs/core", "description": "Robust API for reading and writing OpenNBS files.", - "version": "6.0.0-beta2", + "version": "6.0.0", "author": { - "name": "encode42", - "email": "me@encode42.dev", - "url": "https://encode42.dev" + "name": "OpenNBS", + "url": "https://opennbs.org" }, "funding": { "type": "github", - "url": "https://github.com/sponsors/encode42" + "url": "https://github.com/sponsors/OpenNBS" }, "repository": { "type": "git", - "url": "https://github.com/encode42/nbs.js.git" + "url": "https://github.com/OpenNBS/nbs.js.git" }, - "homepage": "https://encode42.github.io/nbs.js/", + "homepage": "https://opennbs.github.io/nbs.js/", "license": "MIT", "keywords": ["api", "minecraft", "nbs", "noteblock", "onbs"], "main": "dist/index.js", diff --git a/public/docs/dev/assets/icons.js b/public/docs/dev/assets/icons.js index b79c9e8..e88e8ca 100644 --- a/public/docs/dev/assets/icons.js +++ b/public/docs/dev/assets/icons.js @@ -1,15 +1,18 @@ -(function(svg) { - svg.innerHTML = ``; - svg.style.display = 'none'; - if (location.protocol === 'file:') { - if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', updateUseElements); - else updateUseElements() - function updateUseElements() { - document.querySelectorAll('use').forEach(el => { - if (el.getAttribute('href').includes('#icon-')) { - el.setAttribute('href', el.getAttribute('href').replace(/.*#/, '#')); - } - }); - } +(function() { + addIcons(); + function addIcons() { + if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons); + const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg")); + svg.innerHTML = `""`; + svg.style.display = "none"; + if (location.protocol === "file:") updateUseElements(); } -})(document.body.appendChild(document.createElementNS('http://www.w3.org/2000/svg', 'svg'))) \ No newline at end of file + + function updateUseElements() { + document.querySelectorAll("use").forEach(el => { + if (el.getAttribute("href").includes("#icon-")) { + el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#")); + } + }); + } +})() \ No newline at end of file diff --git a/public/docs/dev/assets/icons.svg b/public/docs/dev/assets/icons.svg index 7dead61..e371b8b 100644 --- a/public/docs/dev/assets/icons.svg +++ b/public/docs/dev/assets/icons.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/docs/dev/assets/main.js b/public/docs/dev/assets/main.js index d6f1388..21a5d74 100644 --- a/public/docs/dev/assets/main.js +++ b/public/docs/dev/assets/main.js @@ -1,8 +1,9 @@ "use strict"; -"use strict";(()=>{var Ce=Object.create;var ne=Object.defineProperty;var Pe=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=Pe(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Ce(_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),y=s.str.charAt(1),p;y in s.node.edges?p=s.node.edges[y]:(p=new t.TokenSet,s.node.edges[y]=p),s.str.length==1&&(p.final=!0),i.push({node:p,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.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}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()}showPage(){document.body.style.display&&(console.log("Show page"),document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){console.log("Scorlling");let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}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&&!e.checkVisibility()){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let 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(()=>{Ve(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ne(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 Ve(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 y=document.createElement("li");y.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,y.append(p),e.appendChild(y)}}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 Ne(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 He={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>He[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",fe="mousemove",H="mouseup",J={x:0,y:0},pe=!1,ee=!1,Be=!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&&(Be=!0,F="touchstart",fe="touchmove",H="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(fe,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(H,()=>{ee=!1});document.addEventListener("click",t=>{pe&&(t.preventDefault(),t.stopImmediatePropagation(),pe=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(H,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(H,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ye=document.head.appendChild(document.createElement("style"));ye.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ye.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.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,ve(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ve(t.value)})}function ve(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.showPage(),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.pathname===r.pathname&&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();})(); +window.translations={"copy":"Copy","copied":"Copied!","normally_hidden":"This member is normally hidden due to your filter settings."}; +"use strict";(()=>{var Pe=Object.create;var ie=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var De=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _e(e))!Me.call(t,i)&&i!==n&&ie(t,i,{get:()=>e[i],enumerable:!(r=Oe(e,i))||r.enumerable});return t};var Ae=(t,e,n)=>(n=t!=null?Pe(Re(t)):{},De(e||!t||!t.__esModule?ie(n,"default",{value:t,enumerable:!0}):n,t));var ue=Fe((ae,le)=>{(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),m=s.str.charAt(1),p;m in s.node.edges?p=s.node.edges[m]:(p=new t.TokenSet,s.node.edges[m]=p),s.str.length==1&&(p.final=!0),i.push({node:p,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 ae=="object"?le.exports=n():e.lunr=n()}(this,function(){return t})})()});var se=[];function G(t,e){se.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){se.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()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}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&&!Ve(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}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=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function Ve(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var oe=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var pe=Ae(ue());async function ce(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=pe.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function fe(){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",()=>{ce(e,t)}),ce(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");i.addEventListener("mouseup",()=>{te(t)}),r.addEventListener("focus",()=>t.classList.add("has-focus")),He(t,i,r,e)}function He(t,e,n,r){n.addEventListener("input",oe(()=>{Ne(t,e,n,r)},200)),n.addEventListener("keydown",i=>{i.key=="Enter"?Be(e,t):i.key=="ArrowUp"?(de(e,n,-1),i.preventDefault()):i.key==="ArrowDown"&&(de(e,n,1),i.preventDefault())}),document.body.addEventListener("keypress",i=>{i.altKey||i.ctrlKey||i.metaKey||!n.matches(":focus")&&i.key==="/"&&(i.preventDefault(),n.focus())}),document.body.addEventListener("keyup",i=>{t.classList.contains("has-focus")&&(i.key==="Escape"||!e.matches(":focus-within")&&!n.matches(":focus"))&&(n.blur(),te(t))})}function te(t){t.classList.remove("has-focus")}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=he(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${he(l.parent,i)}.${d}`);let m=document.createElement("li");m.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,m.append(p),p.addEventListener("focus",()=>{e.querySelector(".current")?.classList.remove("current"),m.classList.add("current")}),e.appendChild(m)}}function de(t,e,n){let r=t.querySelector(".current");if(!r)r=t.querySelector(n==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let i=r;if(n===1)do i=i.nextElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);else do i=i.previousElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);i?(r.classList.remove("current"),i.classList.add("current")):n===-1&&(r.classList.remove("current"),e.focus())}}function Be(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),te(e)}}function he(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(ee(t.substring(s,o)),`${ee(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(ee(t.substring(s))),i.join("")}var je={"&":"&","<":"<",">":">","'":"'",'"':"""};function ee(t){return t.replace(/[&<>"'"]/g,e=>je[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",ye="mousemove",N="mouseup",J={x:0,y:0},me=!1,ne=!1,qe=!1,D=!1,ve=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(ve?"is-mobile":"not-mobile");ve&&"ontouchstart"in document.documentElement&&(qe=!0,F="touchstart",ye="touchmove",N="touchend");document.addEventListener(F,t=>{ne=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(ye,t=>{if(ne&&!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(N,()=>{ne=!1});document.addEventListener("click",t=>{me&&(t.preventDefault(),t.stopImmediatePropagation(),me=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var re;try{re=localStorage}catch{re={getItem(){return null},setItem(){}}}var Q=re;var ge=document.head.appendChild(document.createElement("style"));ge.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ge.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function Ee(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,xe(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),xe(t.value)})}function xe(t){document.documentElement.dataset.theme=t}var K;function we(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Le),Le())}async function Le(){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();K=t.dataset.base,K.endsWith("/")||(K+="/"),t.innerHTML="";for(let s of i)Se(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Se(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-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='',be(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)Se(u,l,i)}else be(t,r,t.class)}function be(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=K+t.path,n&&(r.className=n),location.pathname===r.pathname&&!r.href.includes("#")&&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-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Te=document.getElementById("tsd-theme");Te&&Ee(Te);var $e=new U;Object.defineProperty(window,"app",{value:$e});fe();we();})(); /*! Bundled license information: lunr/lunr.js: diff --git a/public/docs/dev/assets/navigation.js b/public/docs/dev/assets/navigation.js index 0c62bba..a3a4310 100644 --- a/public/docs/dev/assets/navigation.js +++ b/public/docs/dev/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA72X32/aMBDH/5Uqz9062NqtvLVSp3aqijS29qHiwSQOeHXsyLlURdP+98UBEf84OxGDPSCk3Pc++H7Edzz/ToC+QTJJbtlyxZsPVMlpkq4YzxQVyeR5J7gTFai6oAIaQUlg1TxLOakqWp11tvcrKHgjeGEiSyaj8Zc/pzvCPVlT5Tu3j2N+DxKo76afxrxmUix9L/005pUrWVwpRdbXdZ6bp81rkQKTojpzJDbt4pMBA9mDsgQeaO5HgxVmv0C1vc18hftubDHCzRurgIllV3wDxQRQlZO0oSE6Gzs+v3AOdlWDnJFXivJMQR/oXsoyCNHGPsB08YumEERszDFIRnNSc/AjeiWKkQVvQI7Epn0c+zA7Kg/kx2VBDtriWvltNn0IUbQt2tjWtXKce0cXCm1Ss9+D3WmzrmvG4U7or8zMndEXtiTWG0d6gzrZtGwrgUI9VQy5jakDwbrsQnU8P1x+Hp2bHbcIJK3rXFvxbtT/DkSC9F6InlAb/BwZU1gz7jvCWoGeWEj3dbb/c187x0D6DDmM3Q7tj8WayxQMuB1xnn+xBalOCbcbQ7CC/1SJ/daRA2ZfC2LJN+wDco/SvNQHmU7m26lxspssWAW+2sMlFgkujQX1Qw5EY8IB2eo7vJe4ISFg91s8EO9n+sM53g5wwDV3u0qge8BSSEWzR8LrwAtkKY6+2DH8PF1lLEF0pO21RJn5DzlvLD37VxO3IPzkJzDOgNHQ/79N9b5TkmET0LTG9yete1KkLMOYrXkIh0EMo60xiiwY3BQlrN3J2qXQkSC5nP8FnreBEkUPAAA=" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA72XW0/CMBTHv4rZszfwzpskGEmMJl7iA+Ghsg4au3bpzozE+N1dJ2G9nHULgg+EpOd/fjs3esbkKwL6CdEgumXzBS8/kEf70WzBeKyoiAaTtWAsclBFSgWUgozAojybcZLnND+qbYcLSHkpeGcijga9/uX3/ppwR5ZU+c7VccjvXgL13fRpyOtJirnvpU9DXomS6bVSZDksksSMNinEDJgU+ZEjsWnnpwYMZAvKEnigqZ8N1pjNEtX2qvI57vtrCxFGnywHJuZ18w0UE0BVQmYlDdHZ2P7ZuRPYdQHyiXxQlGcK2kB3UmaNEG0MAWKakIKDH8wHUYy88RLjSGzaSd+H2QF5ID8kC7KF6TSHyvpJ7+Y3r+uMDog5a42TYbOGBeMwFvorNpM32mpLQs3d0fTWsoesaggK9VQh5CqnGgTLrE7V8Ty+uuidmSPz1lC0evRsxUGvfYgDSXoT3ZJqiZ8iKwIbxk3XRyXQ2wKZvtr2P3elEwYyZ0gw9jhUDwsNlynocL3hPP9maqQ6LVxt68YO/qkTm70KbLH6WhAqvmHvUHuU5pW+kelUvrr299arAevAjb0dQpng0lBSz7IjGhN2qFZb8F7huqSA3W/hRLzHtKez7SW+k1fMsW6QIHzvBRhnwGjTP4Ff1iMlMXYfm9bwNte6V0WyrBmzMnfhMAhhtDVEkSmDUZrB0r3n60o6EqSW0x+Uc8p9Tw0AAA==" \ No newline at end of file diff --git a/public/docs/dev/assets/search.js b/public/docs/dev/assets/search.js index d4df24c..4f1a2cb 100644 --- a/public/docs/dev/assets/search.js +++ b/public/docs/dev/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA61dXZPbNrL9K1vyq6KoQYIffkv2o8r3ZpOtde7eB5fLJY84NjcaaUrkTOJ1+b8vAJJiN9gNgtI8JWM2ugGc7kbjEKC+rs6n35vV63dfV7/Vx/3qNahivTruHqrV69WPT/f31fn/z7vHx+q8Wq+ezgfzr3eHXdNUzffk6eZz+3AwIv1DI7b6th50alAXnXenY9Oen+7aU4zGV1QcaV+vH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1SXDHlSS3ly+LFXlGdR82FJ7TO2qKT/zCbyZDSMctigb6WJcKy6v9wADiIJNdfSX1zRBIi0hGs4WV0BBaDIInRNp+srStTiyuLaSgssoEnj3yi9X5sq6LE61Ecj9O79t2//BU1tdxdcgwAA"; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA62dW4/bOLKA/8qi8+rxiBdRZN5m9gIMdnZ2sdlzzkMQBE5bnRhx2w1LnZlskP9+REqyqsiiXLL7qeEWWcXLV8Uiy6K/3Z2Ovzd3r99+u/u8O2zvXgtpV3eHzWN99/ru5+eHh/r0f6fN01N9ulvdPZ/23X/v95umqZsf0dP1p/Zx3xUZHnbF7r6vRpmlkGeZ98dD056e79sjR+IrXBxIX909bU71oU2aOakVhdRnvR9CIY7Kc8kbtH3Z1b/ztJ1LTtraZvvDrvnh6XRs6/u23i7Wfqj/aH/+2tYc/aDssv7KQk+knOpm91+WvnPJG/ubYPrverPNDnn/8AUhBQIXMDq0MTuIm+3MtEGVoOht+v7n0Ow+HuoleqMqt+l/8+l4apmKx7K3afzlwNXXl7yxf+1pd/jI7eBYeJFOvpuD+ggvN9jh7vCpPu1IO5zXPev0oG6Gz/vTrY254ANhc0gXeIV+vkfEE3/RIV41GMQ63lXNr0n+4Yuu4meBixbx0MbMmP7un84ubJNOWPZGjQwfmWhe4CQZLZjzkolqjptk6Mz7yUTjZUfJ6eOcp0w7yXGVidYlEeGk8CpXOa/7Qnw46X4ZVznfmIvh4tScK13l/PRfCB4n7S/jKpPGmGko2uNPp9Pm688YjYfnw32765zYj+j5rLeUpTlL/Q+s9c+nIOosfHfoWvOwue96TJWbVYKmsfM3x1P918en9uuvm6/1aZmKV1R12rjI7kyNUtMysa0fNs/7drb/Xzan3ebDvmvbTOnZUQDz93A6Ps7PYFSCPYd/w/VmZpEu+cLzOKNkwUxmOjU3lxfGIZnNK0YDDvvPz7t9+8vB/4G7OzASuMQ8KGWpJtHv37dfn2qmyFfv33ci6j/W51q5hQd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TZrqLAVgibJlmCjtmjkQEEMZMkVw6kBPAuTLXxrCd3vc3TYEpgF5a8tz0dGEcmATk7dW4MPJG7nzZETBzaJrMaGv8RUlgkYDboUkDtswzlvGKbOBgQUer8RCCN24hVxIvRwL6fN5MBjnxog2iJeZpchCTrNoCLG7MY/5eULpuA/fDdNRBUm7hFgAJDqnvVl389lTvd4euytt337//P6uYYn8SgAAA"; \ No newline at end of file diff --git a/public/docs/dev/assets/style.css b/public/docs/dev/assets/style.css index 778b949..9d619a6 100644 --- a/public/docs/dev/assets/style.css +++ b/public/docs/dev/assets/style.css @@ -10,6 +10,7 @@ --light-color-text: #222; --light-color-text-aside: #6e6e6e; --light-color-link: #1f70c2; + --light-color-focus-outline: #3584e4; --light-color-ts-keyword: #056bd6; --light-color-ts-project: #b111c9; @@ -35,6 +36,7 @@ --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-color-document: #000000; --light-external-icon: url("data:image/svg+xml;utf8,"); --light-color-scheme: light; @@ -50,6 +52,7 @@ --dark-color-text: #f5f5f5; --dark-color-text-aside: #dddddd; --dark-color-link: #00aff4; + --dark-color-focus-outline: #4c97f2; --dark-color-ts-keyword: #3399ff; --dark-color-ts-project: #e358ff; @@ -75,6 +78,7 @@ --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-color-document: #ffffff; --dark-external-icon: url("data:image/svg+xml;utf8,"); --dark-color-scheme: dark; @@ -92,6 +96,7 @@ --color-text: var(--light-color-text); --color-text-aside: var(--light-color-text-aside); --color-link: var(--light-color-link); + --color-focus-outline: var(--light-color-focus-outline); --color-ts-keyword: var(--light-color-ts-keyword); --color-ts-module: var(--light-color-ts-module); @@ -116,6 +121,7 @@ --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); + --color-document: var(--light-color-document); --external-icon: var(--light-external-icon); --color-scheme: var(--light-color-scheme); @@ -134,6 +140,7 @@ --color-text: var(--dark-color-text); --color-text-aside: var(--dark-color-text-aside); --color-link: var(--dark-color-link); + --color-focus-outline: var(--dark-color-focus-outline); --color-ts-keyword: var(--dark-color-ts-keyword); --color-ts-module: var(--dark-color-ts-module); @@ -158,6 +165,7 @@ --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); + --color-document: var(--dark-color-document); --external-icon: var(--dark-external-icon); --color-scheme: var(--dark-color-scheme); @@ -183,6 +191,7 @@ body { --color-text: var(--light-color-text); --color-text-aside: var(--light-color-text-aside); --color-link: var(--light-color-link); + --color-focus-outline: var(--light-color-focus-outline); --color-ts-keyword: var(--light-color-ts-keyword); --color-ts-module: var(--light-color-ts-module); @@ -207,6 +216,7 @@ body { --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); + --color-document: var(--light-color-document); --external-icon: var(--light-external-icon); --color-scheme: var(--light-color-scheme); @@ -223,6 +233,7 @@ body { --color-text: var(--dark-color-text); --color-text-aside: var(--dark-color-text-aside); --color-link: var(--dark-color-link); + --color-focus-outline: var(--dark-color-focus-outline); --color-ts-keyword: var(--dark-color-ts-keyword); --color-ts-module: var(--dark-color-ts-module); @@ -247,11 +258,17 @@ body { --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); + --color-document: var(--dark-color-document); --external-icon: var(--dark-external-icon); --color-scheme: var(--dark-color-scheme); } +*:focus-visible, +.tsd-accordion-summary:focus-visible svg { + outline: 2px solid var(--color-focus-outline); +} + .always-visible, .always-visible .tsd-signatures { display: inherit !important; @@ -266,16 +283,6 @@ h6 { line-height: 1.2; } -h1 > a:not(.link), -h2 > a:not(.link), -h3 > a:not(.link), -h4 > a:not(.link), -h5 > a:not(.link), -h6 > a:not(.link) { - text-decoration: none; - color: var(--color-text); -} - h1 { font-size: 1.875rem; margin: 0.67rem 0; @@ -306,10 +313,6 @@ h6 { margin: 2.33rem 0; } -.uppercase { - text-transform: uppercase; -} - dl, menu, ol, @@ -333,7 +336,7 @@ footer { padding-bottom: 1rem; max-height: 3.5rem; } -.tsd-generator { +footer > p { margin: 0 1em; } @@ -421,6 +424,9 @@ a.external[target="_blank"] { background-repeat: no-repeat; padding-right: 13px; } +a.tsd-anchor-link { + color: var(--color-text); +} code, pre { @@ -580,13 +586,13 @@ dl.tsd-comment-tag-group p { } .tsd-filter-input { display: flex; - width: fit-content; width: -moz-fit-content; + width: fit-content; align-items: center; - user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; + user-select: none; cursor: pointer; } .tsd-filter-input input[type="checkbox"] { @@ -609,11 +615,8 @@ dl.tsd-comment-tag-group p { 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-filter-input input[type="checkbox"]:focus-visible + svg { + outline: 2px solid var(--color-focus-outline); } .tsd-checkbox-background { fill: var(--color-accent); @@ -630,13 +633,18 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { stroke: var(--color-accent); } -.tsd-theme-toggle { - padding-top: 0.75rem; +.settings-label { + font-weight: bold; + text-transform: uppercase; + display: inline-block; } -.tsd-theme-toggle > h4 { - display: inline; - vertical-align: middle; - margin-right: 0.75rem; + +.tsd-filter-visibility .settings-label { + margin: 0.75rem 0 0.5rem 0; +} + +.tsd-theme-toggle .settings-label { + margin: 0.75rem 0.75rem 0 0; } .tsd-hierarchy { @@ -769,6 +777,9 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { padding: 0; max-width: 100%; } +.tsd-navigation .tsd-nav-link { + display: none; +} .tsd-nested-navigation { margin-left: 3rem; } @@ -782,6 +793,15 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { margin-left: -1.5rem; } +.tsd-page-navigation-section { + margin-left: 10px; +} +.tsd-page-navigation-section > summary { + padding: 0.25rem; +} +.tsd-page-navigation-section > div { + margin-left: 20px; +} .tsd-page-navigation ul { padding-left: 1.75rem; } @@ -812,10 +832,10 @@ a.tsd-index-link { } .tsd-accordion-summary, .tsd-accordion-summary a { - user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; + user-select: none; cursor: pointer; } @@ -828,8 +848,9 @@ a.tsd-index-link { padding-top: 0; padding-bottom: 0; } -.tsd-index-accordion .tsd-accordion-summary > svg { +.tsd-accordion .tsd-accordion-summary > svg { margin-left: 0.25rem; + vertical-align: text-top; } .tsd-index-content > :not(:first-child) { margin-top: 0.75rem; @@ -877,7 +898,7 @@ a.tsd-index-link { } .tsd-panel-group { - margin: 4rem 0; + margin: 2rem 0; } .tsd-panel-group.tsd-index-group { margin: 2rem 0; @@ -885,6 +906,9 @@ a.tsd-index-link { .tsd-panel-group.tsd-index-group details { margin: 2rem 0; } +.tsd-panel-group > .tsd-accordion-summary { + margin-bottom: 1rem; +} #tsd-search { transition: background-color 0.2s; @@ -1034,6 +1058,12 @@ a.tsd-index-link { border-width: 1px 0; transition: background-color 0.1s; } +.tsd-signatures .tsd-index-signature:not(:last-child) { + margin-bottom: 1em; +} +.tsd-signatures .tsd-index-signature .tsd-signature { + border-width: 1px; +} .tsd-description .tsd-signatures .tsd-signature { border-width: 1px; } @@ -1347,6 +1377,12 @@ img { .has-menu .tsd-navigation { max-height: 100%; } + #tsd-toolbar-links { + display: none; + } + .tsd-navigation .tsd-nav-link { + display: flex; + } } /* one sidebar */ diff --git a/public/docs/dev/classes/BufferReader.html b/public/docs/dev/classes/BufferReader.html index 1b196b8..0f55e1b 100644 --- a/public/docs/dev/classes/BufferReader.html +++ b/public/docs/dev/classes/BufferReader.html @@ -1,4 +1,4 @@ -BufferReader | nbs.js - v6.0.0-beta2

Class BufferReaderInternal

Represents an ArrayBuffer reader.

-

Hierarchy (view full)

Properties

buffer +

Class BufferReaderInternal

Represents an ArrayBuffer reader.

+

Hierarchy (view full)

Properties

Methods

readByte @@ -166,21 +166,21 @@ readString readUnsignedByte resize -

Constructors

Properties

buffer: ArrayBufferLike

Buffer that is being read.

-
nextByte: number = 0

Next byte to read.

-
viewer: DataView

Data view for the buffer.

-

Methods

  • Read the next unsigned byte.

    -

    Returns number

  • Resize the ArrayBuffer and increment the next byte.

    +

Constructors

Properties

buffer: ArrayBufferLike

Buffer that is being read.

+
nextByte: number = 0

Next byte to read.

+
viewer: DataView

Data view for the buffer.

+

Methods

  • Read the next unsigned byte.

    +

    Returns number

  • Resize the ArrayBuffer and increment the next byte.

    Parameters

    • by: number

      The amount of bytes to increment by

    Returns number

    The byte that now has by bytes to write to.

    -

Constructors

Constructors

\ No newline at end of file + diff --git a/public/docs/dev/classes/BufferWrapper.html b/public/docs/dev/classes/BufferWrapper.html index 215f154..8ec9372 100644 --- a/public/docs/dev/classes/BufferWrapper.html +++ b/public/docs/dev/classes/BufferWrapper.html @@ -1,4 +1,4 @@ -BufferWrapper | nbs.js - v6.0.0-beta2

Class BufferWrapperInternal

A buffer object wrapper.

-

Hierarchy (view full)

Properties

buffer +

Class BufferWrapperInternal

A buffer object wrapper.

+

Hierarchy (view full)

Properties

Methods

Constructors

Properties

buffer: ArrayBufferLike

Buffer that is being read.

-
nextByte: number = 0

Next byte to read.

-
viewer: DataView

Data view for the buffer.

-

Methods

  • Resize the ArrayBuffer and increment the next byte.

    +

Properties

buffer: ArrayBufferLike

Buffer that is being read.

+
nextByte: number = 0

Next byte to read.

+
viewer: DataView

Data view for the buffer.

+

Methods

  • Resize the ArrayBuffer and increment the next byte.

    Parameters

    • by: number

      The amount of bytes to increment by

    Returns number

    The byte that now has by bytes to write to.

    -

Constructors

Constructors

\ No newline at end of file + diff --git a/public/docs/dev/classes/BufferWriter.html b/public/docs/dev/classes/BufferWriter.html index de6c033..052a93e 100644 --- a/public/docs/dev/classes/BufferWriter.html +++ b/public/docs/dev/classes/BufferWriter.html @@ -1,4 +1,4 @@ -BufferWriter | nbs.js - v6.0.0-beta2

Class BufferWriterInternal

Represents an ArrayBuffer writer.

-

Hierarchy (view full)

Properties

buffer +

Class BufferWriterInternal

Represents an ArrayBuffer writer.

+

Hierarchy (view full)

Properties

Methods

writeByte @@ -167,18 +167,18 @@ writeUnsignedByte resize

Constructors

Properties

buffer: ArrayBufferLike

Buffer that is being read.

-
nextByte: number = 0

Next byte to read.

-
viewer: DataView

Data view for the buffer.

-

Methods

  • Write a byte.

    -

    Parameters

    • value: number = 0

    Returns void

  • Write an integer.

    -

    Parameters

    • value: number = 0

    Returns void

  • Write a short.

    -

    Parameters

    • value: number = 0

    Returns void

  • Write a string.

    -

    Parameters

    • value: string = ""

    Returns void

  • Write an unsigned byte.

    -

    Parameters

    • value: number = 0

    Returns void

  • Resize the ArrayBuffer and increment the next byte.

    +

Properties

buffer: ArrayBufferLike

Buffer that is being read.

+
nextByte: number = 0

Next byte to read.

+
viewer: DataView

Data view for the buffer.

+

Methods

  • Write a byte.

    +

    Parameters

    • value: number = 0

    Returns void

  • Write an integer.

    +

    Parameters

    • value: number = 0

    Returns void

  • Write a short.

    +

    Parameters

    • value: number = 0

    Returns void

  • Write a string.

    +

    Parameters

    • value: string = ""

    Returns void

  • Write an unsigned byte.

    +

    Parameters

    • value: number = 0

    Returns void

  • Resize the ArrayBuffer and increment the next byte.

    Parameters

    • by: number

      The amount of bytes to increment by

    Returns number

    The byte that now has by bytes to write to.

    -

Constructors

\ No newline at end of file + diff --git a/public/docs/dev/classes/Instrument.html b/public/docs/dev/classes/Instrument.html index b914bd9..c7b6a30 100644 --- a/public/docs/dev/classes/Instrument.html +++ b/public/docs/dev/classes/Instrument.html @@ -1,4 +1,4 @@ -Instrument | nbs.js - v6.0.0-beta2

Class Instrument

Represents an instrument of a Note.

-

Example


import { Instrument, Song } from "@encode42/nbs.js";

const instrument = new Instrument({
"name": "Sandple",
"soundFile": "sand.ogg" // Just a string in nbs.js, no IO is performed
});

// Note Block Studio's built-in instruments are provided
console.dir(Instrument.builtIn);

// You'll want to add that instrument to a song, otherwise it won't do much!
const song = new Song();
song.instruments.add(instrument);
+

Class Instrument

Represents an instrument of a Note.

+

import { Instrument, Song } from "@nbsjs/core";

const instrument = new Instrument({
"name": "Sandple",
"soundFile": "sand.ogg" // Just a string in nbs.js, no IO is performed
});

// Note Block Studio's built-in instruments are provided
console.dir(Instrument.builtIn);

// You'll want to add that instrument to a song, otherwise it won't do much!
const song = new Song();
song.instruments.add(instrument);
-

Properties

Properties

builtIn: BuiltIn = ...

Instruments built into Note Block Studio.

-
isBuiltIn: boolean = false

Whether the instrument is a built-in instrument.

-
key: number = defaultInstrumentOptions.key

Key of the sound file.

-

Remarks

Just like note blocks, this ranges from 0-87.

-

See

Note#key

-
name?: string

Name of the instrument.

-
pressKey: boolean = defaultInstrumentOptions.pressKey

Whether the on-screen piano should visually press keys when these notes are played.

-
soundFile: string

Sound file of the instrument.

-

Remarks

Relative to the Data/Sounds/ directory of Note Block Studio installations.

-

See

This property is not used within nbs.js for anything other than storage.

+

Properties

builtIn: BuiltIn = ...

Instruments built into Note Block Studio.

+
isBuiltIn: boolean = false

Whether the instrument is a built-in instrument.

+
key: number = defaultInstrumentOptions.key

Key of the sound file.

+

Just like note blocks, this ranges from 0-87.

+

Note#key

+
name?: string

Name of the instrument.

+
pressKey: boolean = defaultInstrumentOptions.pressKey

Whether the on-screen piano should visually press keys when these notes are played.

+
soundFile: string

Sound file of the instrument.

+

Relative to the Data/Sounds/ directory of Note Block Studio installations.

+

This property is not used within nbs.js for anything other than storage.

It only exists to work with other applications that implement functionality.

-

Constructors

Constructors

\ No newline at end of file + diff --git a/public/docs/dev/classes/Layer.html b/public/docs/dev/classes/Layer.html index 5bca07a..31d56ce 100644 --- a/public/docs/dev/classes/Layer.html +++ b/public/docs/dev/classes/Layer.html @@ -1,4 +1,4 @@ -Layer | nbs.js - v6.0.0-beta2

Class Layer

Represents a layer.

-

Example


import { Layer } from "@encode42/nbs.js";

const layer = new Layer({
"name": "Demo"
});

// The "notes" property provides helper functions such as...
layer.notes.add(0, 0, {
"key": 42
});

layer.notes.add(8, 0, {
"key": 24
});

// Deletes the note on tick 8 (which was just added)
layer.notes.delete(8);

// These properties are only used in Note Block Studio and do not affect the functions above
layer.isSolo = true;
layer.isLocked = true;
+

Class Layer

Represents a layer.

+

import { Layer } from "@nbsjs/core";

const layer = new Layer({
"name": "Demo"
});

// The "notes" property provides helper functions such as...
layer.notes.add(0, 0, {
"key": 42
});

layer.notes.add(8, 0, {
"key": 24
});

// Deletes the note on tick 8 (which was just added)
layer.notes.delete(8);

// These properties are only used in Note Block Studio and do not affect the functions above
layer.isSolo = true;
layer.isLocked = true;
-

Properties

Properties

isLocked: boolean = defaultLayerOptions.isLocked

Whether this layer has been marked as locked.

-

See

This property is not used within nbs.js for anything other than storage.

+

Properties

isLocked: boolean = defaultLayerOptions.isLocked

Whether this layer has been marked as locked.

+

This property is not used within nbs.js for anything other than storage.

It only exists to work with other applications that implement functionality.

-
isSolo: boolean = defaultLayerOptions.isSolo

Whether this layer has been marked as solo.

-

See

This property is not used within nbs.js for anything other than storage.

+
isSolo: boolean = defaultLayerOptions.isSolo

Whether this layer has been marked as solo.

+

This property is not used within nbs.js for anything other than storage.

It only exists to work with other applications that implement functionality.

-
name: string = defaultLayerOptions.name

Name of the layer.

-
notes: LayerNotes = ...

Array of every note in the layer.

-
stereo: number = defaultLayerOptions.stereo

How much this layer is panned to the left or right.

-

Example

-100 is 2 blocks right, 0 is center, 100 is 2 blocks left.
-
-
volume: number = defaultLayerOptions.volume

Volume percentage of the layer.

-

Constructors

\ No newline at end of file + diff --git a/public/docs/dev/classes/LayerNotes.html b/public/docs/dev/classes/LayerNotes.html index a3e4b75..e2f0eb3 100644 --- a/public/docs/dev/classes/LayerNotes.html +++ b/public/docs/dev/classes/LayerNotes.html @@ -1,4 +1,4 @@ -LayerNotes | nbs.js - v6.0.0-beta2

Class LayerNotes

Represents the Notes of a Layer with helper methods.

-

Example


import { readFileSync, writeFileSync } from "node:fs";
import { fromArrayBuffer, toArrayBuffer } from "@encode42/nbs.js";

// Read a NBS file named "song.nbs"
const originalFile = readFileSync("song.nbs");
const originalBuffer = new Uint8Array(originalFile).buffer;
const song = fromArrayBuffer(originalBuffer);

// "get" is a getter function and should be cached during these operations
const instruments = song.instruments.get;

for (const layer of song.layers) {
// Every layer
for (const [tick, note] of layer.notes) {
// Every note in the layer
const songInstrument = instruments[note.instrument];
console.log(`Note on layer ${layer.name}, tick ${tick}, is a ${songInstrument.name}`);

note.key++;
console.log(`The note's key has been increased to ${note.key}`);

// Delete notes above or below the octave limit
if (note.key < 33 || note.key > 57) {
layer.notes.delete(tick);
}
}

console.log(`There are now ${layer.notes.total} notes in this layer.`);
}

// Done transforming! Write the result to "transformed.nbs"
const exportedBuffer = toArrayBuffer(song);
writeFileSync("transformed.nbs", new Uint8Array(exportedBuffer));
+

Class LayerNotes

Represents the Notes of a Layer with helper methods.

+

import { readFileSync, writeFileSync } from "node:fs";
import { fromArrayBuffer, toArrayBuffer } from "@nbsjs/core";

// Read a NBS file named "song.nbs"
const originalFile = readFileSync("song.nbs");
const originalBuffer = new Uint8Array(originalFile).buffer;
const song = fromArrayBuffer(originalBuffer);

// "get" is a getter function and should be cached during these operations
const instruments = song.instruments.get;

for (const layer of song.layers) {
// Every layer
for (const [tick, note] of layer.notes) {
// Every note in the layer
const songInstrument = instruments[note.instrument];
console.log(`Note on layer ${layer.name}, tick ${tick}, is a ${songInstrument.name}`);

note.key++;
console.log(`The note's key has been increased to ${note.key}`);

// Delete notes above or below the octave limit
if (note.key < 33 || note.key > 57) {
layer.notes.delete(tick);
}
}

console.log(`There are now ${layer.notes.total} notes in this layer.`);
}

// Done transforming! Write the result to "transformed.nbs"
const exportedBuffer = toArrayBuffer(song);
writeFileSync("transformed.nbs", new Uint8Array(exportedBuffer));
-

Properties

all + +

Properties

Methods

[iterator] add create @@ -168,28 +169,29 @@ set

Accessors

Constructors

Properties

all: ExistingNotes = {}

Tick-note pair of every note in the layer.

-

See

This should not be modified directly! Instead, utilize the various helper methods in this class.

-

Methods

  • Iterate each tick-note pair.

    -

    Returns Iterator<[number, Note], any, undefined>

    Example

    This is intended for use in for loops.

    -
    for (const [id, note] in layer.notes) { ... }
    -
    -
  • Create and add a Note to a tick.

    +

Properties

all: ExistingNotes = {}

Tick-note pair of every note in the layer.

+

This should not be modified directly! Instead, utilize the various helper methods in this class.

+

Methods

  • Iterate each tick-note pair.

    +

    Returns Iterator<[number, Note], any, any>

    This is intended for use in for loops.

    +
    for (const [id, note] in layer.notes) { ... }
    +
    + +
  • Create and add a Note to a tick.

    +

Returns Note

  • Create and add a Note to a tick.

    Parameters

    • tick: number

      Tick to set the note at

    • instrument: number

      The ID of the instrument for the note to use.

    • options: NoteOptions = defaultNoteOptions

      Options for the note

      -

    Returns Note

  • Delete a Note at the specified tick.

    +

Returns Note

  • Delete a Note at the specified tick.

    Parameters

    • tick: number

      Tick to remove the note from

      -

    Returns void

  • Set an existing Note at the specified tick.

    +

Returns void

  • Set an existing Note at the specified tick.

    Parameters

    • tick: number

      Tick to set the note on

    • note: Note

      Note to set on tick

      -

    Returns Note

    Remarks

    Any existing note at the same tick as the added note will be overwritten.

    -

Accessors

Constructors

\ No newline at end of file + diff --git a/public/docs/dev/classes/Note.html b/public/docs/dev/classes/Note.html index 23a1707..a03df99 100644 --- a/public/docs/dev/classes/Note.html +++ b/public/docs/dev/classes/Note.html @@ -1,4 +1,4 @@ -Note | nbs.js - v6.0.0-beta2

Class Note

Represents a note.

-

Example


import { Note } from "@encode42/nbs.js";

// Instrument ID 0 is always harp
new Note(0, {
"key": 42,
"velocity": 80
});

new Note(0, {
"key": 42,
"velocity": 20,
"panning": 50
});

// Notes do not have tick information tied to them!
// This is stored within the layer's "notes" object
+

Class Note

Represents a note.

+

import { Note } from "@nbsjs/core";

// Instrument ID 0 is always harp
new Note(0, {
"key": 42,
"velocity": 80
});

new Note(0, {
"key": 42,
"velocity": 20,
"panning": 50
});

// Notes do not have tick information tied to them!
// This is stored within the layer's "notes" object
-

Properties

Properties

instrument: number = 0

ID of the instrument used by the note.

-
key: number = defaultNoteOptions.key

Key of the note block.

-

Remarks

From 0 to 87. 33 to 57 is within the 2-octave limit.

-

Example

0 is A0 and 87 is C8.
-
-
panning: number = defaultNoteOptions.panning

Stereo position of the note block.

-

Remarks

From -100 to 100.

-

Example

0 means center panning.
-
-
pitch: number = defaultNoteOptions.pitch

Fine pitch of the note block.

-

Remarks

The max in Note Block Studio is limited to -1200 and +1200.

-

Example

0 designates no fine-tuning. ±100 cents is a single semitone difference.
-
-
velocity: number = defaultNoteOptions.velocity

Velocity (volume) of the note block.

-

Remarks

From 0% to 100%.

-

Constructors

  • Construct a new note.

    +

Properties

instrument: number = 0

ID of the instrument used by the note.

+
key: number = defaultNoteOptions.key

Key of the note block.

+

From 0 to 87. 33 to 57 is within the 2-octave limit.

+
0 is A0 and 87 is C8.
+
+ +
panning: number = defaultNoteOptions.panning

Stereo position of the note block.

+

From -100 to 100.

+
0 means center panning.
+
+ +
pitch: number = defaultNoteOptions.pitch

Fine pitch of the note block.

+

The max in Note Block Studio is limited to -1200 and +1200.

+
0 designates no fine-tuning. ±100 cents is a single semitone difference.
+
+ +
velocity: number = defaultNoteOptions.velocity

Velocity (volume) of the note block.

+

From 0% to 100%.

+

Constructors

  • Construct a new note.

    Parameters

    • instrument: number

      ID of the instrument used by the note.

    • options: NoteOptions = defaultNoteOptions

      Options for the note

      -

    Returns Note

\ No newline at end of file + diff --git a/public/docs/dev/classes/Song.html b/public/docs/dev/classes/Song.html index 0238ffd..77e97bc 100644 --- a/public/docs/dev/classes/Song.html +++ b/public/docs/dev/classes/Song.html @@ -1,4 +1,4 @@ -Song | nbs.js - v6.0.0-beta2

Class Song

Represents a note block song with helper methods.

-

Example


import { Note, Song } from "@encode42/nbs.js";

// Create the song
const song = new Song();
song.name = "Hello";
song.description = "World!";

// Add a layer and a note
const layer = song.layers.create();
const note = new Note(0, {
"key": 42
});

// Add the note to the layer
layer.notes.set(0, note);

// Alternatively, create a note directly on the layer
layer.notes.add(4, 0, {
"key": 24
});

console.dir(song.layers);
+

Class Song

Represents a note block song with helper methods.

+

import { Note, Song } from "@nbsjs/core";

// Create the song
const song = new Song();
song.name = "Hello";
song.description = "World!";

// Add a layer and a note
const layer = song.layers.create();
const note = new Note(0, {
"key": 42
});

// Add the note to the layer
layer.notes.set(0, note);

// Alternatively, create a note directly on the layer
layer.notes.add(4, 0, {
"key": 24
});

console.dir(song.layers);
-

Properties

Properties

author?: string

Author of the song.

-
autoSave: SongAutoSave = ...

Auto-save options for the song.

-
blocksAdded: number = 0

Number of times the user has added a note block.

-

Remarks

This value does not update when methods such as LayerNotes#add is used!

-
blocksRemoved: number = 0

Number of times the user have removed a note block.

-

Remarks

This value does not update when methods such as LayerNotes#delete is used!

-
description?: string

Description of the song.

-
importName?: string

Imported MIDI/Schematic file name.

-
instruments: SongInstruments = ...

Instruments of the song.

-
layers: SongLayers = ...

Layers within the song.

-
leftClicks: number = 0

Number of times the user has left-clicked on the song.

-

Remarks

This value does not update when methods such as LayerNotes#add is used!

-
loop: SongLoop = ...

Looping options for the song.

-
minutesSpent: number = 0

Number of minutes spent on the song.

-

Remarks

This value is not updated by nbs.js!

-
name?: string

Name of the song.

-
originalAuthor?: string

Original author of the song.

-
rightClicks: number = 0

Number of times the user has right-clicked on the song.

-

Remarks

This value does not update when methods such as LayerNotes#delete is used!

-
timeSignature: number = 4

Time signature of the song.

-

Remarks

From 2 to 8.

-

Example

If this is 3, then the signature is 3/4.
-
-
version: number = 5

Version of NBS the song has been made with.

-

Remarks

Currently, this does not affect the exported song structure properly, and should always be upgraded to 5.

-

See

https://opennbs.org/nbs

-
#tempo: number = 10

Tempo of the song in ticks per second.

-
#timePerTick: number = 100

Amount of milliseconds each tick takes.

-

Methods

  • Playtime of the song in milliseconds.

    -

    Returns number

    Remarks

    This currently does not support Note Block Studio's unofficial tempo changer layer.

    -
  • Tick of the last measure of the song.

    -

    Returns number

  • Length of the song in ticks.

    -

    Returns number

  • Tempo of the song in ticks per second.

    -

    Returns number

  • Amount of milliseconds each tick takes.

    -

    Returns number

  • Sets the song's tempo in ticks per second.

    -

    Parameters

    • ticksPerSecond: number

    Returns void

    Remarks

    Adjusts the time per tick upon modification.

    -
  • Sets the song's amount of milliseconds per tick.

    -

    Parameters

    • milliseconds: number

    Returns void

    Remarks

    Adjusts the tempo upon modification.

    -

Constructors

\ No newline at end of file + diff --git a/public/docs/dev/classes/SongInstruments.html b/public/docs/dev/classes/SongInstruments.html index 95b5a7c..0f0b90b 100644 --- a/public/docs/dev/classes/SongInstruments.html +++ b/public/docs/dev/classes/SongInstruments.html @@ -1,4 +1,4 @@ -SongInstruments | nbs.js - v6.0.0-beta2

Class SongInstruments

Represents the Instruments of a Song with helper methods.

-

Properties

all +

Class SongInstruments

Represents the Instruments of a Song with helper methods.

+

Properties

Methods

[iterator] add @@ -166,29 +166,30 @@ getTotal set

Constructors

Properties

ID-instrument pair of the song's instruments.

-

Remarks

Currently, this always includes the built-in instruments from Note Block Studio v5.

-

See

This should not be modified directly! Instead, utilize the various helper methods in this class.

-
firstCustomIndex: number = ...

The ID of the first custom instrument.

-

Methods

Properties

ID-instrument pair of the song's instruments.

+

Currently, this always includes the built-in instruments from Note Block Studio v5.

+

This should not be modified directly! Instead, utilize the various helper methods in this class.

+
firstCustomIndex: number = ...

The ID of the first custom instrument.

+

Methods

Returns Instrument

Returns Instrument

  • Delete an Instrument.

    Parameters

    • id: number

      ID of the instrument to be deleted

      -

    Returns void

    Remarks

    Does not protect built-in instruments. This may not be desirable!

    -

    See

    According to the NBS specification, instrument IDs must be consecutive! Make sure to update any proceeding instrument IDs.

    -

Returns void

Does not protect built-in instruments. This may not be desirable!

+

According to the NBS specification, instrument IDs must be consecutive! Make sure to update any proceeding instrument IDs.

+
  • Set an existing Instrument at an ID.

    Parameters

    • id: number

      ID of the instrument to be set

    • instrument: Instrument

      The instrument to set at id.

      -

    Returns Instrument

    Remarks

    Any existing instrument with the same ID as the added instrument will be overwritten. This includes built-in instruments, which may not be desirable!

    -

    See

    According to the NBS specification, instrument IDs must be consecutive!

    -

Constructors

\ No newline at end of file + diff --git a/public/docs/dev/classes/SongLayers.html b/public/docs/dev/classes/SongLayers.html index ae0ef65..ad52e7e 100644 --- a/public/docs/dev/classes/SongLayers.html +++ b/public/docs/dev/classes/SongLayers.html @@ -1,4 +1,4 @@ -SongLayers | nbs.js - v6.0.0-beta2

Class SongLayers

Represents the Layers of a Song with helper methods.

-

Example


import { Song, toJSON } from "@encode42/nbs.js";

const song = new Song();
song.name = "Chaos";
song.description = "A randomly generated song.";
song.author = "Pseudorandomness";

// Create four random layers
for (let i = 0; i < 4; i++) {
createRandomLayer(i);
}

// Create a new layer with random notes
function createRandomLayer(number: number) {
const layer = song.layers.create();
layer.name = `Randomness ${number}`;
layer.stereo = number % 2 === 0 ? -100 : 100;

// Add ten notes with random key and instrument, four ticks apart
for (let i = 0; i < 10; i++) {
layer.notes.add(i + 4, random(1, song.instruments.total - 1), {
"key": random(0, 87)
});
}
}

// Ye Olde RNG
function random(min: number, max: number) {
return Math.floor(Math.random() * (max - min)) + min;
}

console.dir(JSON.stringify(toJSON(song), undefined, 4));
+

Class SongLayers

Represents the Layers of a Song with helper methods.

+

import { Song, toJSON } from "@nbsjs/core";

const song = new Song();
song.name = "Chaos";
song.description = "A randomly generated song.";
song.author = "Pseudorandomness";

// Create four random layers
for (let i = 0; i < 4; i++) {
createRandomLayer(i);
}

// Create a new layer with random notes
function createRandomLayer(number: number) {
const layer = song.layers.create();
layer.name = `Randomness ${number}`;
layer.stereo = number % 2 === 0 ? -100 : 100;

// Add ten notes with random key and instrument, four ticks apart
for (let i = 0; i < 10; i++) {
layer.notes.add(i + 4, random(1, song.instruments.total - 1), {
"key": random(0, 87)
});
}
}

// Ye Olde RNG
function random(min: number, max: number) {
return Math.floor(Math.random() * (max - min)) + min;
}

console.dir(JSON.stringify(toJSON(song), undefined, 4));
-

Properties

all + +

Properties

Methods

Constructors

Properties

all: Layer[] = []

Array of every layer in the song.

-

See

This should not be modified directly! Instead, utilize the various helper methods in this class.

-

Methods

  • Add an existing Layer.

    +

Properties

all: Layer[] = []

Array of every layer in the song.

+

This should not be modified directly! Instead, utilize the various helper methods in this class.

+

Methods

  • Add an existing Layer.

    Parameters

    • layer: Layer

      Layer to add

      -

    Returns void

    Remarks

    Any existing layer with the same ID as the added layer will be overwritten.

    -

Returns void

Any existing layer with the same ID as the added layer will be overwritten.

+

Constructors

\ No newline at end of file + diff --git a/public/docs/dev/functions/fromArrayBuffer.html b/public/docs/dev/functions/fromArrayBuffer.html index 4e3d265..9fc69a8 100644 --- a/public/docs/dev/functions/fromArrayBuffer.html +++ b/public/docs/dev/functions/fromArrayBuffer.html @@ -1,4 +1,4 @@ -fromArrayBuffer | nbs.js - v6.0.0-beta2

Function fromArrayBuffer

  • Parse and return a Song from a file array buffer.

    -

    Example


    import { readFileSync } from "node:fs";
    import { fromArrayBuffer } from "@encode42/nbs.js";

    // Read a NBS file named "song.nbs"
    const originalFile = readFileSync("song.nbs");
    const originalBuffer = new Uint8Array(originalFile).buffer;
    const song = fromArrayBuffer(originalBuffer);

    console.dir(song); // Here's ya song!
    +

    Function fromArrayBuffer

    • Parse and return a Song from a file array buffer.

      +

      import { readFileSync } from "node:fs";
      import { fromArrayBuffer } from "@nbsjs/core";

      // Read a NBS file named "song.nbs"
      const originalFile = readFileSync("song.nbs");
      const originalBuffer = new Uint8Array(originalFile).buffer;
      const song = fromArrayBuffer(originalBuffer);

      console.dir(song); // Here's ya song!
      +

      Parameters

      • arrayBuffer: ArrayBufferLike

        Array buffer to parse from

      • options: FromArrayBufferOptions = defaultFromArrayBufferOptions

        Options for parsing

      Returns Song

      Parsed song, empty if unsuccessful

      -
    \ No newline at end of file + diff --git a/public/docs/dev/functions/fromJSON.html b/public/docs/dev/functions/fromJSON.html deleted file mode 100644 index fa77ab5..0000000 --- a/public/docs/dev/functions/fromJSON.html +++ /dev/null @@ -1,178 +0,0 @@ -fromJSON | nbs.js - v6.0.0-beta2

    Function fromJSON

    • Parse and return a Song from a JSON object.

      -

      Parameters

      • json: object

        JSON object to parse from

        -

      Returns Song

      Parsed song

      -

      See

      Currently untested!

      -
    \ No newline at end of file diff --git a/public/docs/dev/functions/omitEmptyLayers.html b/public/docs/dev/functions/omitEmptyLayers.html index 2eda99f..f2509d5 100644 --- a/public/docs/dev/functions/omitEmptyLayers.html +++ b/public/docs/dev/functions/omitEmptyLayers.html @@ -1,4 +1,4 @@ -omitEmptyLayers | nbs.js - v6.0.0-beta2

    Function omitEmptyLayers

    • Internal

      Deletes all layers without notes from a Song.

      +

      Function omitEmptyLayers

      • Internal

        Deletes all layers without notes from a Song.

        Parameters

        • song: Song

          Song to remove empty layers from

        • makeClone: boolean = true

          Whether to create a clone of the song, preventing modification of the original song

        Returns Song

        The song without empty layers (new Song if cloned, original Song otherwise)

        -
      \ No newline at end of file + diff --git a/public/docs/dev/functions/toArrayBuffer.html b/public/docs/dev/functions/toArrayBuffer.html index 1fc3ad0..cfa5ae4 100644 --- a/public/docs/dev/functions/toArrayBuffer.html +++ b/public/docs/dev/functions/toArrayBuffer.html @@ -1,4 +1,4 @@ -toArrayBuffer | nbs.js - v6.0.0-beta2

      Function toArrayBuffer

      • Generate an ArrayBuffer from a Song.

        -

        Example


        import { writeFileSync } from "node:fs";
        import { Song, toArrayBuffer } from "@encode42/nbs.js";

        const song = new Song();

        // ...do what you need with the song

        const exportedBuffer = toArrayBuffer(song, {
        "ignoreEmptyLayers": true
        });

        writeFileSync("output.nbs", new Uint8Array(exportedBuffer));
        +

        Function toArrayBuffer

        • Generate an ArrayBuffer from a Song.

          +

          import { writeFileSync } from "node:fs";
          import { Song, toArrayBuffer } from "@nbsjs/core";

          const song = new Song();

          // ...do what you need with the song

          const exportedBuffer = toArrayBuffer(song, {
          "ignoreEmptyLayers": true
          });

          writeFileSync("output.nbs", new Uint8Array(exportedBuffer));
          +

          Parameters

          • song: Song

            Song to parse from

          • options: ToArrayBufferOptions = defaultToArrayBufferOptions

            Optional arguments that impact export behavior

          Returns ArrayBufferLike

          Generated array buffer, empty if unsuccessful

          -
        \ No newline at end of file + diff --git a/public/docs/dev/functions/toJSON.html b/public/docs/dev/functions/toJSON.html deleted file mode 100644 index 92ebd4b..0000000 --- a/public/docs/dev/functions/toJSON.html +++ /dev/null @@ -1,180 +0,0 @@ -toJSON | nbs.js - v6.0.0-beta2

        Function toJSON

        • Generate a JSON object from a Song.

          -

          Example


          import { format, parse } from "node:path";
          import { readFileSync, writeFileSync } from "node:fs";
          import { fromArrayBuffer, toJSON } from "@encode42/nbs.js";

          // We will be converting a file named "song.nbs"
          const songPath = parse("song.nbs");
          const inputPath = format(songPath);
          const outputPath = format({
          ...songPath,
          "ext": ".json"
          });

          // Read the file into a song
          const originalFile = readFileSync(inputPath);
          const originalBuffer = new Uint8Array(originalFile).buffer;
          const song = fromArrayBuffer(originalBuffer);

          // Export the song into a JSON object
          const exportedJSON = toJSON(song);
          writeFileSync(outputPath, JSON.stringify(exportedJSON));
          -
          -

          Parameters

          • song: Song

            Song to parse from

            -

          Returns object

          Generated JSON object

          -

          See

          Currently untested!

          -
        \ No newline at end of file diff --git a/public/docs/dev/hierarchy.html b/public/docs/dev/hierarchy.html index b017de6..0354246 100644 --- a/public/docs/dev/hierarchy.html +++ b/public/docs/dev/hierarchy.html @@ -1,4 +1,4 @@ -nbs.js - v6.0.0-beta2

        nbs.js - v6.0.0-beta2

        Class Hierarchy

        nbs.js - v6.0.0

        Class Hierarchy

        \ No newline at end of file + diff --git a/public/docs/dev/index.html b/public/docs/dev/index.html index ffe5930..2082e4a 100644 --- a/public/docs/dev/index.html +++ b/public/docs/dev/index.html @@ -1,4 +1,4 @@ -nbs.js - v6.0.0-beta2

        nbs.js - v6.0.0-beta2

        Index

        Highlights

        Instrument +
        \ No newline at end of file + diff --git a/public/docs/dev/interfaces/BuiltInBuilder.html b/public/docs/dev/interfaces/BuiltInBuilder.html index 15b6a19..e6b3888 100644 --- a/public/docs/dev/interfaces/BuiltInBuilder.html +++ b/public/docs/dev/interfaces/BuiltInBuilder.html @@ -1,4 +1,4 @@ -BuiltInBuilder | nbs.js - v6.0.0-beta2

        Interface BuiltInBuilderInternal

        Structure of builtInBuilder.

        -
        interface BuiltInBuilder {
            [id: number]: {
                name: string;
                soundFile: string;
            };
        }

        Indexable

        [id: number]: {
            name: string;
            soundFile: string;
        }

        ID-instrument pair.

        +

        Interface BuiltInBuilderInternal

        Structure of builtInBuilder.

        +

        Indexable

        • [id: number]: {
              name: string;
              soundFile: string;
          }

          ID-instrument pair.

          • name: string

            Name of the instrument.

          • soundFile: string

            Sound file of the instrument.

            -

            Remarks

            Relative to the Data/Sounds/ directory of Note Block Studio installations.

            -
        \ No newline at end of file + diff --git a/public/docs/dev/interfaces/ExistingInstruments.html b/public/docs/dev/interfaces/ExistingInstruments.html index 4053a4d..95a026b 100644 --- a/public/docs/dev/interfaces/ExistingInstruments.html +++ b/public/docs/dev/interfaces/ExistingInstruments.html @@ -1,4 +1,4 @@ -ExistingInstruments | nbs.js - v6.0.0-beta2

        Interface ExistingInstruments

        The existing Instruments.

        -
        interface ExistingInstruments {
            [id: number]: Instrument;
        }

        Hierarchy (view full)

        Indexable

        [id: number]: Instrument

        ID-Instrument pair.

        -

        Interface ExistingInstruments

        The existing Instruments.

        +

        Hierarchy (view full)

        Indexable

        \ No newline at end of file + diff --git a/public/docs/dev/interfaces/ExistingNotes.html b/public/docs/dev/interfaces/ExistingNotes.html index 9b0333b..e180280 100644 --- a/public/docs/dev/interfaces/ExistingNotes.html +++ b/public/docs/dev/interfaces/ExistingNotes.html @@ -1,4 +1,4 @@ -ExistingNotes | nbs.js - v6.0.0-beta2

        Interface ExistingNotes

        The existing Notes of the layer.

        -
        interface ExistingNotes {
            [tick: number]: Note;
        }

        Indexable

        [tick: number]: Note

        Each tick-note pair.

        -

        See

        Note

        -

        Interface ExistingNotes

        The existing Notes of the layer.

        +

        Indexable

        • [tick: number]: Note

          Each tick-note pair.

          +

          Note

          +
        \ No newline at end of file + diff --git a/public/docs/dev/interfaces/FromArrayBufferOptions.html b/public/docs/dev/interfaces/FromArrayBufferOptions.html index 532a218..acc8324 100644 --- a/public/docs/dev/interfaces/FromArrayBufferOptions.html +++ b/public/docs/dev/interfaces/FromArrayBufferOptions.html @@ -1,4 +1,4 @@ -FromArrayBufferOptions | nbs.js - v6.0.0-beta2

        Interface FromArrayBufferOptionsInternal

        Options for fromArrayBuffer.

        -
        interface FromArrayBufferOptions {
            ignoreEmptyLayers?: boolean;
        }

        Properties

        Properties

        ignoreEmptyLayers?: boolean

        Whether to ignore (delete) unpopulated leading layers.

        -

        Remarks

        Note Block Studio automatically generates extra layers past the last populated layer.

        +

        Interface FromArrayBufferOptionsInternal

        Options for fromArrayBuffer.

        +
        interface FromArrayBufferOptions {
            ignoreEmptyLayers?: boolean;
        }

        Properties

        Properties

        ignoreEmptyLayers?: boolean

        Whether to ignore (delete) unpopulated leading layers.

        +

        Note Block Studio automatically generates extra layers past the last populated layer.

        This option skips those layers upon import.

        -
        \ No newline at end of file + diff --git a/public/docs/dev/interfaces/IgnoredValues.html b/public/docs/dev/interfaces/IgnoredValues.html deleted file mode 100644 index 72c9a0e..0000000 --- a/public/docs/dev/interfaces/IgnoredValues.html +++ /dev/null @@ -1,176 +0,0 @@ -IgnoredValues | nbs.js - v6.0.0-beta2

        Interface IgnoredValuesInternal

        Structure for ignoredValues.

        -
        interface IgnoredValues {
            [key: string]: unknown;
        }

        Indexable

        [key: string]: unknown

        Key to ignore if equal to value.

        -
        \ No newline at end of file diff --git a/public/docs/dev/interfaces/InstrumentOptions.html b/public/docs/dev/interfaces/InstrumentOptions.html index 188b240..ce06f95 100644 --- a/public/docs/dev/interfaces/InstrumentOptions.html +++ b/public/docs/dev/interfaces/InstrumentOptions.html @@ -1,4 +1,4 @@ -InstrumentOptions | nbs.js - v6.0.0-beta2

        Interface InstrumentOptions

        Options available for an Instrument.

        -
        interface InstrumentOptions {
            key?: number;
            name?: string;
            pressKey?: boolean;
            soundFile?: string;
        }

        Properties

        key? +

        Interface InstrumentOptions

        Options available for an Instrument.

        +
        interface InstrumentOptions {
            key?: number;
            name?: string;
            pressKey?: boolean;
            soundFile?: string;
        }

        Properties

        key?: number

        Key of the sound file.

        -

        Remarks

        Just like note blocks, this ranges from 0-87.

        -
        name?: string

        Name of the instrument.

        -
        pressKey?: boolean

        Whether the on-screen piano should visually press keys when these notes are played.

        -
        soundFile?: string

        Sound file of the instrument.

        -

        Remarks

        Relative to the Data/Sounds/ directory of Note Block Studio installations.

        -
        \ No newline at end of file + diff --git a/public/docs/dev/interfaces/LayerOptions.html b/public/docs/dev/interfaces/LayerOptions.html index 0383673..b29fa41 100644 --- a/public/docs/dev/interfaces/LayerOptions.html +++ b/public/docs/dev/interfaces/LayerOptions.html @@ -1,4 +1,4 @@ -LayerOptions | nbs.js - v6.0.0-beta2

        Interface LayerOptions

        Options available for a Layer.

        -
        interface LayerOptions {
            isLocked?: boolean;
            isSolo?: boolean;
            name?: string;
            stereo?: number;
            volume?: number;
        }

        Properties

        isLocked? +

        Interface LayerOptions

        Options available for a Layer.

        +
        interface LayerOptions {
            isLocked?: boolean;
            isSolo?: boolean;
            name?: string;
            stereo?: number;
            volume?: number;
        }

        Properties

        isLocked?: boolean

        Whether this layer has been marked as locked.

        -
        isSolo?: boolean

        Whether this layer has been marked as solo.

        -
        name?: string

        Name of the layer.

        -
        stereo?: number

        How much this layer is panned to the left or right.

        -
        volume?: number

        Volume percentage of the layer.

        -
        \ No newline at end of file + diff --git a/public/docs/dev/interfaces/NoteOptions.html b/public/docs/dev/interfaces/NoteOptions.html index da92bc4..c8cbaa3 100644 --- a/public/docs/dev/interfaces/NoteOptions.html +++ b/public/docs/dev/interfaces/NoteOptions.html @@ -1,4 +1,4 @@ -NoteOptions | nbs.js - v6.0.0-beta2

        Interface NoteOptions

        Options available for a Note.

        -
        interface NoteOptions {
            key?: number;
            panning?: number;
            pitch?: number;
            velocity?: number;
        }

        Properties

        key? +

        Interface NoteOptions

        Options available for a Note.

        +
        interface NoteOptions {
            key?: number;
            panning?: number;
            pitch?: number;
            velocity?: number;
        }

        Properties

        key?: number

        Key of the note block.

        -

        Remarks

        From 0 to 87. 33 to 57 is within the 2-octave limit.

        -
        panning?: number

        Stereo position of the note block.

        -

        Remarks

        From -100 to 100.

        -
        pitch?: number

        Fine pitch of the note block.

        -

        Remarks

        The max in Note Block Studio is limited to -1200 and +1200.

        -
        velocity?: number

        Velocity (volume) of the note block.

        -

        Remarks

        From 0% to 100%.

        -
        \ No newline at end of file + diff --git a/public/docs/dev/interfaces/SongAutoSave.html b/public/docs/dev/interfaces/SongAutoSave.html index 474dfba..0e4b3af 100644 --- a/public/docs/dev/interfaces/SongAutoSave.html +++ b/public/docs/dev/interfaces/SongAutoSave.html @@ -1,4 +1,4 @@ -SongAutoSave | nbs.js - v6.0.0-beta2

        Interface SongAutoSave

        Options available for Song#autoSave.

        -

        Remarks

        These properties are not used within nbs.js for anything other than storage.

        +

        Interface SongAutoSave

        Options available for Song#autoSave.

        +

        These properties are not used within nbs.js for anything other than storage.

        They only exist as data fields to work with other applications that implement functionality.

        -
        interface SongAutoSave {
            enabled: boolean;
            interval: number;
        }

        Properties

        interface SongAutoSave {
            enabled: boolean;
            interval: number;
        }

        Properties

        Properties

        enabled: boolean

        Whether auto-saving has been enabled.

        -
        interval: number

        Number of minutes between each auto-save.

        -

        Remarks

        Ranges from 1 to 60.

        -
        \ No newline at end of file + diff --git a/public/docs/dev/interfaces/SongLoop.html b/public/docs/dev/interfaces/SongLoop.html index 19f6a4d..d7707c4 100644 --- a/public/docs/dev/interfaces/SongLoop.html +++ b/public/docs/dev/interfaces/SongLoop.html @@ -1,4 +1,4 @@ -SongLoop | nbs.js - v6.0.0-beta2

        Interface SongLoop

        Options available for Song#loop.

        -

        Remarks

        These properties are not used within nbs.js for anything other than storage.

        +

        Interface SongLoop

        Options available for Song#loop.

        +

        These properties are not used within nbs.js for anything other than storage.

        They only exist as data fields to work with other applications that implement functionality.

        -
        interface SongLoop {
            enabled: boolean;
            startTick: number;
            totalLoops: number;
        }

        Properties

        interface SongLoop {
            enabled: boolean;
            startTick: number;
            totalLoops: number;
        }

        Properties

        enabled: boolean

        Whether looping is enabled.

        -
        startTick: number

        Where the song should loop back to.

        -

        Remarks

        Unit is ticks.

        -
        totalLoops: number

        Number of times the song should loop.

        -

        Remarks

        0 designates infinite.

        -
        \ No newline at end of file + diff --git a/public/docs/dev/interfaces/SongObject.html b/public/docs/dev/interfaces/SongObject.html deleted file mode 100644 index 0a856ff..0000000 --- a/public/docs/dev/interfaces/SongObject.html +++ /dev/null @@ -1,227 +0,0 @@ -SongObject | nbs.js - v6.0.0-beta2

        Interface SongObject

        A Song represented by basic JSON notation.

        -
        interface SongObject {
            author?: string;
            autoSave: SongAutoSave;
            blocksAdded: number;
            blocksRemoved: number;
            description?: string;
            duration: number;
            hasSolo: boolean;
            importName?: string;
            instruments: SongInstruments;
            lastMeasure: number;
            layers: SongLayers;
            leftClicks: number;
            length: number;
            loop: SongLoop;
            minutesSpent: number;
            name?: string;
            originalAuthor?: string;
            rightClicks: number;
            tempo: number;
            timePerTick: number;
            timeSignature: number;
            version: number;
        }

        Properties

        author?: string

        Author of the song.

        -
        autoSave: SongAutoSave

        Auto-save options for the song.

        -
        blocksAdded: number

        Number of times the user has added a note block.

        -

        Remarks

        This value does not update when methods such as LayerNotes#add is used!

        -
        blocksRemoved: number

        Number of times the user have removed a note block.

        -

        Remarks

        This value does not update when methods such as LayerNotes#delete is used!

        -
        description?: string

        Description of the song.

        -
        duration: number

        Playtime of the song in milliseconds.

        -

        Remarks

        This currently does not support Note Block Studio's unofficial tempo changer layer.

        -
        hasSolo: boolean

        Whether the song has at least one solo layer.

        -
        importName?: string

        Imported MIDI/Schematic file name.

        -
        instruments: SongInstruments

        Instruments of the song.

        -
        lastMeasure: number

        Tick of the last measure of the song.

        -
        layers: SongLayers

        Length of the song in ticks.

        -
        leftClicks: number

        Number of times the user has left-clicked on the song.

        -

        Remarks

        This value does not update when methods such as LayerNotes#add is used!

        -
        length: number

        Length of the song in ticks.

        -
        loop: SongLoop

        Looping options for the song.

        -
        minutesSpent: number

        Number of minutes spent on the song.

        -

        Remarks

        This value is not updated by nbs.js!

        -
        name?: string

        Name of the song.

        -
        originalAuthor?: string

        Original author of the song.

        -
        rightClicks: number

        Number of times the user has right-clicked on the song.

        -

        Remarks

        This value does not update when methods such as LayerNotes#delete is used!

        -
        tempo: number

        Tempo of the song in ticks per second.

        -
        timePerTick: number

        Amount of milliseconds each tick takes.

        -
        timeSignature: number

        Time signature of the song.

        -

        Remarks

        From 2 to 8.

        -
        version: number

        Version of NBS the song has been made with.

        -

        Remarks

        Currently, this does not affect the exported song structure properly, and should always be upgraded to 5.

        -
        \ No newline at end of file diff --git a/public/docs/dev/interfaces/ToArrayBufferOptions.html b/public/docs/dev/interfaces/ToArrayBufferOptions.html index 1f1b3d8..7f1fe27 100644 --- a/public/docs/dev/interfaces/ToArrayBufferOptions.html +++ b/public/docs/dev/interfaces/ToArrayBufferOptions.html @@ -1,4 +1,4 @@ -ToArrayBufferOptions | nbs.js - v6.0.0-beta2

        Interface ToArrayBufferOptionsInternal

        Options for toArrayBuffer.

        -
        interface ToArrayBufferOptions {
            ignoreEmptyLayers?: boolean;
        }

        Properties

        Properties

        ignoreEmptyLayers?: boolean

        Whether to ignore unpopulated leading layers.

        -

        Remarks

        This skips all layers without notes from the exported song.

        -

        Interface ToArrayBufferOptionsInternal

        Options for toArrayBuffer.

        +
        interface ToArrayBufferOptions {
            ignoreEmptyLayers?: boolean;
        }

        Properties

        Properties

        ignoreEmptyLayers?: boolean

        Whether to ignore unpopulated leading layers.

        +

        This skips all layers without notes from the exported song.

        +
        \ No newline at end of file + diff --git a/public/docs/dev/types/BuiltIn.html b/public/docs/dev/types/BuiltIn.html index 055e247..fbca5d8 100644 --- a/public/docs/dev/types/BuiltIn.html +++ b/public/docs/dev/types/BuiltIn.html @@ -1,4 +1,4 @@ -BuiltIn | nbs.js - v6.0.0-beta2

        Type alias BuiltIn

        BuiltIn: {
            [Id in keyof typeof builtInBuilder]: Instrument
        }

        Every built-in instrument.

        -

        Type Alias BuiltIn

        BuiltIn: {
            [Id in keyof typeof builtInBuilder]: Instrument
        }

        Every built-in instrument.

        +
        \ No newline at end of file + diff --git a/public/docs/dev/variables/builtInBuilder-1.html b/public/docs/dev/variables/builtInBuilder-1.html index 05712f3..a34fe6a 100644 --- a/public/docs/dev/variables/builtInBuilder-1.html +++ b/public/docs/dev/variables/builtInBuilder-1.html @@ -1,4 +1,4 @@ -builtInBuilder | nbs.js - v6.0.0-beta2

        Variable builtInBuilderConst Internal

        builtInBuilder: BuiltInBuilder = ...

        Used to construct Instrument.builtIn.

        -

        Variable builtInBuilderConst Internal

        builtInBuilder: BuiltInBuilder = ...

        Used to construct Instrument.builtIn.

        +
        \ No newline at end of file + diff --git a/public/docs/dev/variables/defaultAutoSave.html b/public/docs/dev/variables/defaultAutoSave.html index c0f30b4..75e29ab 100644 --- a/public/docs/dev/variables/defaultAutoSave.html +++ b/public/docs/dev/variables/defaultAutoSave.html @@ -1,4 +1,4 @@ -defaultAutoSave | nbs.js - v6.0.0-beta2

        Variable defaultAutoSaveConst Internal

        defaultAutoSave: SongAutoSave = ...

        Default Song#autoSave values.

        -

        Variable defaultAutoSaveConst Internal

        defaultAutoSave: SongAutoSave = ...

        Default Song#autoSave values.

        +
        \ No newline at end of file + diff --git a/public/docs/dev/variables/defaultFromArrayBufferOptions.html b/public/docs/dev/variables/defaultFromArrayBufferOptions.html index 6e03376..1207780 100644 --- a/public/docs/dev/variables/defaultFromArrayBufferOptions.html +++ b/public/docs/dev/variables/defaultFromArrayBufferOptions.html @@ -1,4 +1,4 @@ -defaultFromArrayBufferOptions | nbs.js - v6.0.0-beta2

        Variable defaultFromArrayBufferOptionsConst Internal

        defaultFromArrayBufferOptions: FromArrayBufferOptions = ...

        Default options for fromArrayBuffer.

        -

        Variable defaultFromArrayBufferOptionsConst Internal

        defaultFromArrayBufferOptions: FromArrayBufferOptions = ...

        Default options for fromArrayBuffer.

        +
        \ No newline at end of file + diff --git a/public/docs/dev/variables/defaultInstrumentOptions.html b/public/docs/dev/variables/defaultInstrumentOptions.html index 2b660f0..c8789b2 100644 --- a/public/docs/dev/variables/defaultInstrumentOptions.html +++ b/public/docs/dev/variables/defaultInstrumentOptions.html @@ -1,4 +1,4 @@ -defaultInstrumentOptions | nbs.js - v6.0.0-beta2

        Variable defaultInstrumentOptionsConst

        defaultInstrumentOptions: InstrumentOptions = ...

        Default Instrument values.

        -

        Variable defaultInstrumentOptionsConst

        defaultInstrumentOptions: InstrumentOptions = ...

        Default Instrument values.

        +
        \ No newline at end of file + diff --git a/public/docs/dev/variables/defaultLayerOptions.html b/public/docs/dev/variables/defaultLayerOptions.html index 799f430..c72f1ee 100644 --- a/public/docs/dev/variables/defaultLayerOptions.html +++ b/public/docs/dev/variables/defaultLayerOptions.html @@ -1,4 +1,4 @@ -defaultLayerOptions | nbs.js - v6.0.0-beta2

        Variable defaultLayerOptionsConst Internal

        defaultLayerOptions: Required<LayerOptions> = ...

        Default Layer values.

        -

        Variable defaultLayerOptionsConst Internal

        defaultLayerOptions: Required<LayerOptions> = ...

        Default Layer values.

        +
        \ No newline at end of file + diff --git a/public/docs/dev/variables/defaultLoop.html b/public/docs/dev/variables/defaultLoop.html index e3ae262..73bf28d 100644 --- a/public/docs/dev/variables/defaultLoop.html +++ b/public/docs/dev/variables/defaultLoop.html @@ -1,4 +1,4 @@ -defaultLoop | nbs.js - v6.0.0-beta2

        Variable defaultLoopConst Internal

        defaultLoop: SongLoop = ...

        Default Song#loop values.

        -

        Variable defaultLoopConst Internal

        defaultLoop: SongLoop = ...

        Default Song#loop values.

        +
        \ No newline at end of file + diff --git a/public/docs/dev/variables/defaultNoteOptions.html b/public/docs/dev/variables/defaultNoteOptions.html index ca8fdcc..c794ab6 100644 --- a/public/docs/dev/variables/defaultNoteOptions.html +++ b/public/docs/dev/variables/defaultNoteOptions.html @@ -1,4 +1,4 @@ -defaultNoteOptions | nbs.js - v6.0.0-beta2

        Variable defaultNoteOptionsConst Internal

        defaultNoteOptions: Required<NoteOptions> = ...

        Default NoteOptions values.

        -

        Variable defaultNoteOptionsConst Internal

        defaultNoteOptions: Required<NoteOptions> = ...

        Default NoteOptions values.

        +
        \ No newline at end of file + diff --git a/public/docs/dev/variables/defaultToArrayBufferOptions.html b/public/docs/dev/variables/defaultToArrayBufferOptions.html index e046f6f..e4d7e53 100644 --- a/public/docs/dev/variables/defaultToArrayBufferOptions.html +++ b/public/docs/dev/variables/defaultToArrayBufferOptions.html @@ -1,4 +1,4 @@ -defaultToArrayBufferOptions | nbs.js - v6.0.0-beta2

        Variable defaultToArrayBufferOptionsConst Internal

        defaultToArrayBufferOptions: ToArrayBufferOptions = ...

        Default options for toArrayBuffer.

        -

        Variable defaultToArrayBufferOptionsConst Internal

        defaultToArrayBufferOptions: ToArrayBufferOptions = ...

        Default options for toArrayBuffer.

        +
        \ No newline at end of file + diff --git a/public/docs/dev/variables/ignoredValues-1.html b/public/docs/dev/variables/ignoredValues-1.html deleted file mode 100644 index ea6b6c1..0000000 --- a/public/docs/dev/variables/ignoredValues-1.html +++ /dev/null @@ -1,175 +0,0 @@ -ignoredValues | nbs.js - v6.0.0-beta2

        Variable ignoredValuesConst Internal

        ignoredValues: IgnoredValues = ...

        Values that will be ignored during export if matched.

        -
        \ No newline at end of file diff --git a/public/docs/index.html b/public/docs/index.html index 56d62f4..615a77e 100644 --- a/public/docs/index.html +++ b/public/docs/index.html @@ -3,7 +3,7 @@ nbs.js - Documentation ``` #### 🦕 Deno ```js -import { Song } from "https://esm.run/@encode42/nbs.js"; +import { Song } from "https://esm.run/@nbsjs/core"; ``` ### ❔ FAQ @@ -65,7 +65,7 @@ There are more examples designed for use with Node.js in the [examples directory ```js import { readFileSync } from "node:fs"; -import { fromArrayBuffer } from "@encode42/nbs.js"; +import { fromArrayBuffer } from "@nbsjs/core"; const songFile = readFileSync("song.nbs"); // Read the selected NBS file const buffer = new Uint8Array(songFile).buffer; // Convert it into an ArrayBuffer @@ -84,7 +84,7 @@ console.dir(song);