From 1eebf3e050817d0782cba8fc36c2f7f35ce66ff6 Mon Sep 17 00:00:00 2001 From: andrepolischuk Date: Mon, 15 Apr 2024 07:25:08 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20rambler-?= =?UTF-8?q?digital-solutions/widgetly@26753c65e83a800f359b6f6994f42f40670d?= =?UTF-8?q?7e0b=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .nojekyll | 1 + assets/custom.css | 54 + assets/highlight.css | 113 ++ assets/icons.js | 15 + assets/icons.svg | 1 + assets/main.js | 59 ++ assets/navigation.js | 1 + assets/search.js | 1 + assets/style.css | 1415 ++++++++++++++++++++++++++ classes/BaseLayout.html | 57 ++ classes/Container.html | 50 + classes/ContentElement.html | 40 + classes/EmbedLayout.html | 65 ++ classes/IFrameConsumer.html | 49 + classes/IFrameProvider.html | 65 ++ classes/Mediator.html | 105 ++ classes/OverlayLayout.html | 68 ++ classes/Widget.html | 97 ++ functions/createMediator.html | 42 + functions/createViewportManager.html | 43 + functions/registerIFrame.html | 42 + functions/setMutationParams.html | 40 + hierarchy.html | 39 + index.html | 104 ++ interfaces/Callback.html | 40 + interfaces/ContainerElement.html | 40 + interfaces/Debounce.html | 40 + interfaces/EmbedLayoutConfig.html | 42 + interfaces/EnterViewportOptions.html | 44 + interfaces/ExternalizedWidget.html | 40 + interfaces/IFrameConsumerConfig.html | 46 + interfaces/MediatorConfig.html | 46 + interfaces/OverlayLayoutConfig.html | 48 + interfaces/ViewportManager.html | 40 + interfaces/VisibleArea.html | 48 + interfaces/WidgetConfig.html | 53 + modules.html | 66 ++ variables/globalViewportEvents.html | 40 + variables/mutationEvents.html | 40 + 39 files changed, 3239 insertions(+) create mode 100644 .nojekyll create mode 100644 assets/custom.css create mode 100644 assets/highlight.css create mode 100644 assets/icons.js create mode 100644 assets/icons.svg create mode 100644 assets/main.js create mode 100644 assets/navigation.js create mode 100644 assets/search.js create mode 100644 assets/style.css create mode 100644 classes/BaseLayout.html create mode 100644 classes/Container.html create mode 100644 classes/ContentElement.html create mode 100644 classes/EmbedLayout.html create mode 100644 classes/IFrameConsumer.html create mode 100644 classes/IFrameProvider.html create mode 100644 classes/Mediator.html create mode 100644 classes/OverlayLayout.html create mode 100644 classes/Widget.html create mode 100644 functions/createMediator.html create mode 100644 functions/createViewportManager.html create mode 100644 functions/registerIFrame.html create mode 100644 functions/setMutationParams.html create mode 100644 hierarchy.html create mode 100644 index.html create mode 100644 interfaces/Callback.html create mode 100644 interfaces/ContainerElement.html create mode 100644 interfaces/Debounce.html create mode 100644 interfaces/EmbedLayoutConfig.html create mode 100644 interfaces/EnterViewportOptions.html create mode 100644 interfaces/ExternalizedWidget.html create mode 100644 interfaces/IFrameConsumerConfig.html create mode 100644 interfaces/MediatorConfig.html create mode 100644 interfaces/OverlayLayoutConfig.html create mode 100644 interfaces/ViewportManager.html create mode 100644 interfaces/VisibleArea.html create mode 100644 interfaces/WidgetConfig.html create mode 100644 modules.html create mode 100644 variables/globalViewportEvents.html create mode 100644 variables/mutationEvents.html diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e2ac661 --- /dev/null +++ b/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/assets/custom.css b/assets/custom.css new file mode 100644 index 0000000..7c19ec8 --- /dev/null +++ b/assets/custom.css @@ -0,0 +1,54 @@ +@import "https://static.rambler.ru/fonts/Manrope/Manrope.css"; + +:root { + /* base colors */ + --color-white: #fff; + --color-black: #000; + --color-blue-base: #315efb; + --color-alt-blue-base: #649dff; + --color-carbone-base: #343b4c; + --color-carbone-dark: #1f2431; + --color-light-carbone-2: #3d4456; + --color-alt-blue-1: #eff5ff; + --color-alt-blue-2: #e0ebff; + --color-cloud-gray-7: #afb6c9; + --color-sun-yellow-base: #fffbbf; + + /* light theme */ + --light-color-background: var(--color-white); + --light-color-background-secondary: var(--color-white); + --light-color-warning-text: var(--color-carbone-base); + --light-color-background-warning: var(--color-sun-yellow-base); + --light-color-accent: var(--color-alt-blue-2); + --light-color-active-menu-item: var(--light-color-accent); + --light-color-text: var(--color-carbone-base); + --light-color-text-aside: var(--color-cloud-gray-7); + --light-color-link: var(--color-blue-base); + --light-code-background: var(--color-white); + + /* dark theme */ + --dark-color-background: var(--color-carbone-dark); + --dark-color-background-secondary: var(--color-carbone-dark); + --dark-color-warning-text: var(--color-alt-blue-1); + --dark-color-background-warning: var(--color-sun-yellow-base); + --dark-color-accent: var(--color-light-carbone-2); + --dark-color-active-menu-item: var(--dark-color-accent); + --dark-color-text: var(--color-alt-blue-1); + --dark-color-text-aside: var(--color-cloud-gray-7); + --dark-color-link: var(--color-alt-blue-base); + --dark-code-background: var(--color-light-carbone-2); +} + +body { + font-family: Manrope, sans-serif; + text-rendering: optimizeLegibility; + font-feature-settings: "liga" on; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +pre, code { + font-family: SF Mono, Menlo, Monaco, Courier New, Courier, monospace; + font-size: 0.9rem; + font-feature-settings: normal; +} diff --git a/assets/highlight.css b/assets/highlight.css new file mode 100644 index 0000000..4156af2 --- /dev/null +++ b/assets/highlight.css @@ -0,0 +1,113 @@ +:root { + --light-hl-0: #795E26; + --dark-hl-0: #DCDCAA; + --light-hl-1: #000000; + --dark-hl-1: #D4D4D4; + --light-hl-2: #A31515; + --dark-hl-2: #CE9178; + --light-hl-3: #008000; + --dark-hl-3: #6A9955; + --light-hl-4: #AF00DB; + --dark-hl-4: #C586C0; + --light-hl-5: #001080; + --dark-hl-5: #9CDCFE; + --light-hl-6: #0000FF; + --dark-hl-6: #569CD6; + --light-hl-7: #0070C1; + --dark-hl-7: #4FC1FF; + --light-hl-8: #098658; + --dark-hl-8: #B5CEA8; + --light-hl-9: #800000; + --dark-hl-9: #808080; + --light-hl-10: #267F99; + --dark-hl-10: #4EC9B0; + --light-hl-11: #E50000; + --dark-hl-11: #9CDCFE; + --light-hl-12: #800000; + --dark-hl-12: #569CD6; + --light-code-background: #FFFFFF; + --dark-code-background: #1E1E1E; +} + +@media (prefers-color-scheme: light) { :root { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --hl-12: var(--light-hl-12); + --code-background: var(--light-code-background); +} } + +@media (prefers-color-scheme: dark) { :root { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --hl-12: var(--dark-hl-12); + --code-background: var(--dark-code-background); +} } + +:root[data-theme='light'] { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --hl-12: var(--light-hl-12); + --code-background: var(--light-code-background); +} + +:root[data-theme='dark'] { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --hl-12: var(--dark-hl-12); + --code-background: var(--dark-code-background); +} + +.hl-0 { color: var(--hl-0); } +.hl-1 { color: var(--hl-1); } +.hl-2 { color: var(--hl-2); } +.hl-3 { color: var(--hl-3); } +.hl-4 { color: var(--hl-4); } +.hl-5 { color: var(--hl-5); } +.hl-6 { color: var(--hl-6); } +.hl-7 { color: var(--hl-7); } +.hl-8 { color: var(--hl-8); } +.hl-9 { color: var(--hl-9); } +.hl-10 { color: var(--hl-10); } +.hl-11 { color: var(--hl-11); } +.hl-12 { color: var(--hl-12); } +pre, code { background: var(--code-background); } diff --git a/assets/icons.js b/assets/icons.js new file mode 100644 index 0000000..b79c9e8 --- /dev/null +++ b/assets/icons.js @@ -0,0 +1,15 @@ +(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(/.*#/, '#')); + } + }); + } + } +})(document.body.appendChild(document.createElementNS('http://www.w3.org/2000/svg', 'svg'))) \ No newline at end of file diff --git a/assets/icons.svg b/assets/icons.svg new file mode 100644 index 0000000..7dead61 --- /dev/null +++ b/assets/icons.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/main.js b/assets/main.js new file mode 100644 index 0000000..1daeb69 --- /dev/null +++ b/assets/main.js @@ -0,0 +1,59 @@ +"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.scrollToHash(),this.updateIndexVisibility())}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&&(document.body.style.removeProperty("display"),this.scrollToHash(),this.updateIndexVisibility())}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&&!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(()=>{Ne(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${ce(l.parent,i)}.${d}`);let 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 Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var 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();})(); +/*! Bundled license information: + +lunr/lunr.js: + (** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + *) + (*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + *) + (*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + *) +*/ diff --git a/assets/navigation.js b/assets/navigation.js new file mode 100644 index 0000000..e469386 --- /dev/null +++ b/assets/navigation.js @@ -0,0 +1 @@ +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA4XUwU4CMRAG4HfpmUhEJYabIiYmEjjpwXiY3R2Whm5L2lkEje9uEBbabXe48v/9QtvpfvwIwi2JkXgEh6+wMzWJnlgDLcVI5AqcQ9c/Z1dLqpToiZXUhRhdD+5/eydhbDSB1Ghj4BRdWo+aJgor1Il/EeacNKkyLLo244Wc8fJsocKx0a6uUlsK88vS3JqNLLqlJuekKRYSyCSMJuFWzzZoFey6ziWIOeddFiUmgMPv7A2DUhnkq/NaqQntAvL99R7DEBjcDVMjFg2JD7VKHPiEmal1jkmoCTnAm6ax0QtZJqWoxZL7dW8Sv9bG0mxN0miXVhNFFt4SWg1KfmPRvkSfjWocGr4D5gxSRQ5uRpohwwqHBcPNiIkexzaHPwUNpf+2PbLV4TknM4UPFqGDOuUcc7g0Zpd+gYNKZTJQzQYmG9TkTeIGrIRMoeuneqF7M/DYqibYD2s3GDYYKrcIhPF3cVHr/P899MNGSA1vI6rzRtsie60BbLGUjtAeHkBKDBsM5ZCmx6OZg4XKpbSoFIGff+GBBVj3BwAA" \ No newline at end of file diff --git a/assets/search.js b/assets/search.js new file mode 100644 index 0000000..64355c2 --- /dev/null +++ b/assets/search.js @@ -0,0 +1 @@ +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA91dW2/cthL+L8rrZrPUhZL81iYpEKA5LXCKngcjKORd2ha6Ky20stM0yH8/ECVKM9SMxL2laZ7sWMO5fTNDckQxn72q/Hjwbm4/e3/mxca7keHCK7Kd8m68Sj3kh1pV736qmj8svKdq691490/Fus7L4vAKE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o55dsvNs2ssO6+2ARqwF2mz6lfqYf8UKtqvGwGswMXa+ZzcFCGYJ50oAf9Yofj037OXpdIfegNtiAeVL02d7ODmQGETtDVrqhbe0nOnwdVmwwYYxoCu2Ku9rWX4gM1QAaEnXizhJJcIjRMqMkOKBB09ce0JyLWO+aScxDTIJWjrppLbrLs7/gAy5hxoAlgZr9UFFxpa6/xpywE8WraLJLnskfwgGBJuChr/0u75/4+AGABEM3usPSNeiA+4Zy/4vSc2hCCII05BJn1YwhKTMyhp/934FGCQrU5rZsrFPpeQF5QLpNwX8luOBpGaIt1X5U7C7sIFJqE88N4LxABF6RcMrXDxpVdwlmYXS61o/PhK2FQq2GND7iC0H/UDAbC5U/A1aLuFu1hGKrl3VKdVPvDwtvne7XNC+Xd3H748uX/fhowraSGAAA="; \ No newline at end of file diff --git a/assets/style.css b/assets/style.css new file mode 100644 index 0000000..072daed --- /dev/null +++ b/assets/style.css @@ -0,0 +1,1415 @@ +:root { + /* Light */ + --light-color-background: #f2f4f8; + --light-color-background-secondary: #eff0f1; + --light-color-warning-text: #222; + --light-color-background-warning: #e6e600; + --light-color-icon-background: var(--light-color-background); + --light-color-accent: #c5c7c9; + --light-color-active-menu-item: var(--light-color-accent); + --light-color-text: #222; + --light-color-text-aside: #6e6e6e; + --light-color-link: #1f70c2; + + --light-color-ts-keyword: #056bd6; + --light-color-ts-project: #b111c9; + --light-color-ts-module: var(--light-color-ts-project); + --light-color-ts-namespace: var(--light-color-ts-project); + --light-color-ts-enum: #7e6f15; + --light-color-ts-enum-member: var(--light-color-ts-enum); + --light-color-ts-variable: #4760ec; + --light-color-ts-function: #572be7; + --light-color-ts-class: #1f70c2; + --light-color-ts-interface: #108024; + --light-color-ts-constructor: var(--light-color-ts-class); + --light-color-ts-property: var(--light-color-ts-variable); + --light-color-ts-method: var(--light-color-ts-function); + --light-color-ts-call-signature: var(--light-color-ts-method); + --light-color-ts-index-signature: var(--light-color-ts-property); + --light-color-ts-constructor-signature: var(--light-color-ts-constructor); + --light-color-ts-parameter: var(--light-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --light-color-ts-type-parameter: #a55c0e; + --light-color-ts-accessor: var(--light-color-ts-property); + --light-color-ts-get-signature: var(--light-color-ts-accessor); + --light-color-ts-set-signature: var(--light-color-ts-accessor); + --light-color-ts-type-alias: #d51270; + /* reference not included as links will be colored with the kind that it points to */ + + --light-external-icon: url("data:image/svg+xml;utf8,"); + --light-color-scheme: light; + + /* Dark */ + --dark-color-background: #2b2e33; + --dark-color-background-secondary: #1e2024; + --dark-color-background-warning: #bebe00; + --dark-color-warning-text: #222; + --dark-color-icon-background: var(--dark-color-background-secondary); + --dark-color-accent: #9096a2; + --dark-color-active-menu-item: #5d5d6a; + --dark-color-text: #f5f5f5; + --dark-color-text-aside: #dddddd; + --dark-color-link: #00aff4; + + --dark-color-ts-keyword: #3399ff; + --dark-color-ts-project: #e358ff; + --dark-color-ts-module: var(--dark-color-ts-project); + --dark-color-ts-namespace: var(--dark-color-ts-project); + --dark-color-ts-enum: #f4d93e; + --dark-color-ts-enum-member: var(--dark-color-ts-enum); + --dark-color-ts-variable: #798dff; + --dark-color-ts-function: #a280ff; + --dark-color-ts-class: #8ac4ff; + --dark-color-ts-interface: #6cff87; + --dark-color-ts-constructor: var(--dark-color-ts-class); + --dark-color-ts-property: var(--dark-color-ts-variable); + --dark-color-ts-method: var(--dark-color-ts-function); + --dark-color-ts-call-signature: var(--dark-color-ts-method); + --dark-color-ts-index-signature: var(--dark-color-ts-property); + --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); + --dark-color-ts-parameter: var(--dark-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --dark-color-ts-type-parameter: #e07d13; + --dark-color-ts-accessor: var(--dark-color-ts-property); + --dark-color-ts-get-signature: var(--dark-color-ts-accessor); + --dark-color-ts-set-signature: var(--dark-color-ts-accessor); + --dark-color-ts-type-alias: #ff6492; + /* reference not included as links will be colored with the kind that it points to */ + + --dark-external-icon: url("data:image/svg+xml;utf8,"); + --dark-color-scheme: dark; +} + +@media (prefers-color-scheme: light) { + :root { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); + } +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); + } +} + +html { + color-scheme: var(--color-scheme); +} + +body { + margin: 0; +} + +:root[data-theme="light"] { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); +} + +:root[data-theme="dark"] { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); +} + +.always-visible, +.always-visible .tsd-signatures { + display: inherit !important; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: 1.2; +} + +h1 > a: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; +} + +h2 { + font-size: 1.5rem; + margin: 0.83rem 0; +} + +h3 { + font-size: 1.25rem; + margin: 1rem 0; +} + +h4 { + font-size: 1.05rem; + margin: 1.33rem 0; +} + +h5 { + font-size: 1rem; + margin: 1.5rem 0; +} + +h6 { + font-size: 0.875rem; + margin: 2.33rem 0; +} + +.uppercase { + text-transform: uppercase; +} + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +.container { + max-width: 1700px; + padding: 0 2rem; +} + +/* Footer */ +.tsd-generator { + border-top: 1px solid var(--color-accent); + padding-top: 1rem; + padding-bottom: 1rem; + max-height: 3.5rem; +} + +.tsd-generator > p { + margin-top: 0; + margin-bottom: 0; + padding: 0 1rem; +} + +.container-main { + margin: 0 auto; + /* toolbar, footer, margin */ + min-height: calc(100vh - 41px - 56px - 4rem); +} + +@keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes fade-out { + from { + opacity: 1; + visibility: visible; + } + to { + opacity: 0; + } +} +@keyframes fade-in-delayed { + 0% { + opacity: 0; + } + 33% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fade-out-delayed { + 0% { + opacity: 1; + visibility: visible; + } + 66% { + opacity: 0; + } + 100% { + opacity: 0; + } +} +@keyframes pop-in-from-right { + from { + transform: translate(100%, 0); + } + to { + transform: translate(0, 0); + } +} +@keyframes pop-out-to-right { + from { + transform: translate(0, 0); + visibility: visible; + } + to { + transform: translate(100%, 0); + } +} +body { + background: var(--color-background); + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", + Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; + font-size: 16px; + color: var(--color-text); +} + +a { + color: var(--color-link); + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +a.external[target="_blank"] { + background-image: var(--external-icon); + background-position: top 3px right; + background-repeat: no-repeat; + padding-right: 13px; +} + +code, +pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 0.875rem; + border-radius: 0.8em; +} + +pre { + position: relative; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + padding: 10px; + border: 1px solid var(--color-accent); +} +pre code { + padding: 0; + font-size: 100%; +} +pre > button { + position: absolute; + top: 10px; + right: 10px; + opacity: 0; + transition: opacity 0.1s; + box-sizing: border-box; +} +pre:hover > button, +pre > button.visible { + opacity: 1; +} + +blockquote { + margin: 1em 0; + padding-left: 1em; + border-left: 4px solid gray; +} + +.tsd-typography { + line-height: 1.333em; +} +.tsd-typography ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; +} +.tsd-typography .tsd-index-panel h3, +.tsd-index-panel .tsd-typography h3, +.tsd-typography h4, +.tsd-typography h5, +.tsd-typography h6 { + font-size: 1em; +} +.tsd-typography h5, +.tsd-typography h6 { + font-weight: normal; +} +.tsd-typography p, +.tsd-typography ul, +.tsd-typography ol { + margin: 1em 0; +} +.tsd-typography table { + border-collapse: collapse; + border: none; +} +.tsd-typography td, +.tsd-typography th { + padding: 6px 13px; + border: 1px solid var(--color-accent); +} +.tsd-typography thead, +.tsd-typography tr:nth-child(even) { + background-color: var(--color-background-secondary); +} + +.tsd-breadcrumb { + margin: 0; + padding: 0; + color: var(--color-text-aside); +} +.tsd-breadcrumb a { + color: var(--color-text-aside); + text-decoration: none; +} +.tsd-breadcrumb a:hover { + text-decoration: underline; +} +.tsd-breadcrumb li { + display: inline; +} +.tsd-breadcrumb li:after { + content: " / "; +} + +.tsd-comment-tags { + display: flex; + flex-direction: column; +} +dl.tsd-comment-tag-group { + display: flex; + align-items: center; + overflow: hidden; + margin: 0.5em 0; +} +dl.tsd-comment-tag-group dt { + display: flex; + margin-right: 0.5em; + font-size: 0.875em; + font-weight: normal; +} +dl.tsd-comment-tag-group dd { + margin: 0; +} +code.tsd-tag { + padding: 0.25em 0.4em; + border: 0.1em solid var(--color-accent); + margin-right: 0.25em; + font-size: 70%; +} +h1 code.tsd-tag:first-of-type { + margin-left: 0.25em; +} + +dl.tsd-comment-tag-group dd:before, +dl.tsd-comment-tag-group dd:after { + content: " "; +} +dl.tsd-comment-tag-group dd pre, +dl.tsd-comment-tag-group dd:after { + clear: both; +} +dl.tsd-comment-tag-group p { + margin: 0; +} + +.tsd-panel.tsd-comment .lead { + font-size: 1.1em; + line-height: 1.333em; + margin-bottom: 2em; +} +.tsd-panel.tsd-comment .lead:last-child { + margin-bottom: 0; +} + +.tsd-filter-visibility h4 { + font-size: 1rem; + padding-top: 0.75rem; + padding-bottom: 0.5rem; + margin: 0; +} +.tsd-filter-item:not(:last-child) { + margin-bottom: 0.5rem; +} +.tsd-filter-input { + display: flex; + width: fit-content; + width: -moz-fit-content; + align-items: center; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + cursor: pointer; +} +.tsd-filter-input input[type="checkbox"] { + cursor: pointer; + position: absolute; + width: 1.5em; + height: 1.5em; + opacity: 0; +} +.tsd-filter-input input[type="checkbox"]:disabled { + pointer-events: none; +} +.tsd-filter-input svg { + cursor: pointer; + width: 1.5em; + height: 1.5em; + margin-right: 0.5em; + border-radius: 0.33em; + /* Leaving this at full opacity breaks event listeners on Firefox. + Don't remove unless you know what you're doing. */ + opacity: 0.99; +} +.tsd-filter-input input[type="checkbox"]:focus + svg { + transform: scale(0.95); +} +.tsd-filter-input input[type="checkbox"]:focus:not(:focus-visible) + svg { + transform: scale(1); +} +.tsd-checkbox-background { + fill: var(--color-accent); +} +input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { + stroke: var(--color-text); +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { + fill: var(--color-background); + stroke: var(--color-accent); + stroke-width: 0.25rem; +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { + stroke: var(--color-accent); +} + +.tsd-theme-toggle { + padding-top: 0.75rem; +} +.tsd-theme-toggle > h4 { + display: inline; + vertical-align: middle; + margin-right: 0.75rem; +} + +.tsd-hierarchy { + list-style: square; + margin: 0; +} +.tsd-hierarchy .target { + font-weight: bold; +} + +.tsd-full-hierarchy:not(:last-child) { + margin-bottom: 1em; + padding-bottom: 1em; + border-bottom: 1px solid var(--color-accent); +} +.tsd-full-hierarchy, +.tsd-full-hierarchy ul { + list-style: none; + margin: 0; + padding: 0; +} +.tsd-full-hierarchy ul { + padding-left: 1.5rem; +} +.tsd-full-hierarchy a { + padding: 0.25rem 0 !important; + font-size: 1rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} + +.tsd-panel-group.tsd-index-group { + margin-bottom: 0; +} +.tsd-index-panel .tsd-index-list { + list-style: none; + line-height: 1.333em; + margin: 0; + padding: 0.25rem 0 0 0; + overflow: hidden; + display: grid; + grid-template-columns: repeat(3, 1fr); + column-gap: 1rem; + grid-template-rows: auto; +} +@media (max-width: 1024px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(2, 1fr); + } +} +@media (max-width: 768px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(1, 1fr); + } +} +.tsd-index-panel .tsd-index-list li { + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; +} + +.tsd-flag { + display: inline-block; + padding: 0.25em 0.4em; + border-radius: 4px; + color: var(--color-comment-tag-text); + background-color: var(--color-comment-tag); + text-indent: 0; + font-size: 75%; + line-height: 1; + font-weight: normal; +} + +.tsd-anchor { + position: relative; + top: -100px; +} + +.tsd-member { + position: relative; +} +.tsd-member .tsd-anchor + h3 { + display: flex; + align-items: center; + margin-top: 0; + margin-bottom: 0; + border-bottom: none; +} + +.tsd-navigation.settings { + margin: 1rem 0; +} +.tsd-navigation > a, +.tsd-navigation .tsd-accordion-summary { + width: calc(100% - 0.25rem); + display: flex; + align-items: center; +} +.tsd-navigation a, +.tsd-navigation summary > span, +.tsd-page-navigation a { + display: flex; + width: calc(100% - 0.25rem); + align-items: center; + padding: 0.25rem; + color: var(--color-text); + text-decoration: none; + box-sizing: border-box; +} +.tsd-navigation a.current, +.tsd-page-navigation a.current { + background: var(--color-active-menu-item); +} +.tsd-navigation a:hover, +.tsd-page-navigation a:hover { + text-decoration: underline; +} +.tsd-navigation ul, +.tsd-page-navigation ul { + margin-top: 0; + margin-bottom: 0; + padding: 0; + list-style: none; +} +.tsd-navigation li, +.tsd-page-navigation li { + padding: 0; + max-width: 100%; +} +.tsd-nested-navigation { + margin-left: 3rem; +} +.tsd-nested-navigation > li > details { + margin-left: -1.5rem; +} +.tsd-small-nested-navigation { + margin-left: 1.5rem; +} +.tsd-small-nested-navigation > li > details { + margin-left: -1.5rem; +} + +.tsd-page-navigation ul { + padding-left: 1.75rem; +} + +#tsd-sidebar-links a { + margin-top: 0; + margin-bottom: 0.5rem; + line-height: 1.25rem; +} +#tsd-sidebar-links a:last-of-type { + margin-bottom: 0; +} + +a.tsd-index-link { + padding: 0.25rem 0 !important; + font-size: 1rem; + line-height: 1.25rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} +.tsd-accordion-summary { + list-style-type: none; /* hide marker on non-safari */ + outline: none; /* broken on safari, so just hide it */ +} +.tsd-accordion-summary::-webkit-details-marker { + display: none; /* hide marker on safari */ +} +.tsd-accordion-summary, +.tsd-accordion-summary a { + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + + cursor: pointer; +} +.tsd-accordion-summary a { + width: calc(100% - 1.5rem); +} +.tsd-accordion-summary > * { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; +} +.tsd-index-accordion .tsd-accordion-summary > svg { + margin-left: 0.25rem; +} +.tsd-index-content > :not(:first-child) { + margin-top: 0.75rem; +} +.tsd-index-heading { + margin-top: 1.5rem; + margin-bottom: 0.75rem; +} + +.tsd-kind-icon { + margin-right: 0.5rem; + width: 1.25rem; + height: 1.25rem; + min-width: 1.25rem; + min-height: 1.25rem; +} +.tsd-kind-icon path { + transform-origin: center; + transform: scale(1.1); +} +.tsd-signature > .tsd-kind-icon { + margin-right: 0.8rem; +} + +.tsd-panel { + margin-bottom: 2.5rem; +} +.tsd-panel.tsd-member { + margin-bottom: 4rem; +} +.tsd-panel:empty { + display: none; +} +.tsd-panel > h1, +.tsd-panel > h2, +.tsd-panel > h3 { + margin: 1.5rem -1.5rem 0.75rem -1.5rem; + padding: 0 1.5rem 0.75rem 1.5rem; +} +.tsd-panel > h1.tsd-before-signature, +.tsd-panel > h2.tsd-before-signature, +.tsd-panel > h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: none; +} + +.tsd-panel-group { + margin: 4rem 0; +} +.tsd-panel-group.tsd-index-group { + margin: 2rem 0; +} +.tsd-panel-group.tsd-index-group details { + margin: 2rem 0; +} + +#tsd-search { + transition: background-color 0.2s; +} +#tsd-search .title { + position: relative; + z-index: 2; +} +#tsd-search .field { + position: absolute; + left: 0; + top: 0; + right: 2.5rem; + height: 100%; +} +#tsd-search .field input { + box-sizing: border-box; + position: relative; + top: -50px; + z-index: 1; + width: 100%; + padding: 0 10px; + opacity: 0; + outline: 0; + border: 0; + background: transparent; + color: var(--color-text); +} +#tsd-search .field label { + position: absolute; + overflow: hidden; + right: -40px; +} +#tsd-search .field input, +#tsd-search .title, +#tsd-toolbar-links a { + transition: opacity 0.2s; +} +#tsd-search .results { + position: absolute; + visibility: hidden; + top: 40px; + width: 100%; + margin: 0; + padding: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); +} +#tsd-search .results li { + background-color: var(--color-background); + line-height: initial; + padding: 4px; +} +#tsd-search .results li:nth-child(even) { + background-color: var(--color-background-secondary); +} +#tsd-search .results li.state { + display: none; +} +#tsd-search .results li.current:not(.no-results), +#tsd-search .results li:hover:not(.no-results) { + background-color: var(--color-accent); +} +#tsd-search .results a { + display: flex; + align-items: center; + padding: 0.25rem; + box-sizing: border-box; +} +#tsd-search .results a:before { + top: 10px; +} +#tsd-search .results span.parent { + color: var(--color-text-aside); + font-weight: normal; +} +#tsd-search.has-focus { + background-color: var(--color-accent); +} +#tsd-search.has-focus .field input { + top: 0; + opacity: 1; +} +#tsd-search.has-focus .title, +#tsd-search.has-focus #tsd-toolbar-links a { + z-index: 0; + opacity: 0; +} +#tsd-search.has-focus .results { + visibility: visible; +} +#tsd-search.loading .results li.state.loading { + display: block; +} +#tsd-search.failure .results li.state.failure { + display: block; +} + +#tsd-toolbar-links { + position: absolute; + top: 0; + right: 2rem; + height: 100%; + display: flex; + align-items: center; + justify-content: flex-end; +} +#tsd-toolbar-links a { + margin-left: 1.5rem; +} +#tsd-toolbar-links a:hover { + text-decoration: underline; +} + +.tsd-signature { + margin: 0 0 1rem 0; + padding: 1rem 0.5rem; + border: 1px solid var(--color-accent); + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 14px; + overflow-x: auto; +} + +.tsd-signature-keyword { + color: var(--color-ts-keyword); + font-weight: normal; +} + +.tsd-signature-symbol { + color: var(--color-text-aside); + font-weight: normal; +} + +.tsd-signature-type { + font-style: italic; + font-weight: normal; +} + +.tsd-signatures { + padding: 0; + margin: 0 0 1em 0; + list-style-type: none; +} +.tsd-signatures .tsd-signature { + margin: 0; + border-color: var(--color-accent); + border-width: 1px 0; + transition: background-color 0.1s; +} +.tsd-description .tsd-signatures .tsd-signature { + border-width: 1px; +} + +ul.tsd-parameter-list, +ul.tsd-type-parameter-list { + list-style: square; + margin: 0; + padding-left: 20px; +} +ul.tsd-parameter-list > li.tsd-parameter-signature, +ul.tsd-type-parameter-list > li.tsd-parameter-signature { + list-style: none; + margin-left: -20px; +} +ul.tsd-parameter-list h5, +ul.tsd-type-parameter-list h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; +} +.tsd-sources { + margin-top: 1rem; + font-size: 0.875em; +} +.tsd-sources a { + color: var(--color-text-aside); + text-decoration: underline; +} +.tsd-sources ul { + list-style: none; + padding: 0; +} + +.tsd-page-toolbar { + position: sticky; + z-index: 1; + top: 0; + left: 0; + width: 100%; + color: var(--color-text); + background: var(--color-background-secondary); + border-bottom: 1px var(--color-accent) solid; + transition: transform 0.3s ease-in-out; +} +.tsd-page-toolbar a { + color: var(--color-text); + text-decoration: none; +} +.tsd-page-toolbar a.title { + font-weight: bold; +} +.tsd-page-toolbar a.title:hover { + text-decoration: underline; +} +.tsd-page-toolbar .tsd-toolbar-contents { + display: flex; + justify-content: space-between; + height: 2.5rem; + margin: 0 auto; +} +.tsd-page-toolbar .table-cell { + position: relative; + white-space: nowrap; + line-height: 40px; +} +.tsd-page-toolbar .table-cell:first-child { + width: 100%; +} +.tsd-page-toolbar .tsd-toolbar-icon { + box-sizing: border-box; + line-height: 0; + padding: 12px 0; +} + +.tsd-widget { + display: inline-block; + overflow: hidden; + opacity: 0.8; + height: 40px; + transition: + opacity 0.1s, + background-color 0.2s; + vertical-align: bottom; + cursor: pointer; +} +.tsd-widget:hover { + opacity: 0.9; +} +.tsd-widget.active { + opacity: 1; + background-color: var(--color-accent); +} +.tsd-widget.no-caption { + width: 40px; +} +.tsd-widget.no-caption:before { + margin: 0; +} + +.tsd-widget.options, +.tsd-widget.menu { + display: none; +} +input[type="checkbox"] + .tsd-widget:before { + background-position: -120px 0; +} +input[type="checkbox"]:checked + .tsd-widget:before { + background-position: -160px 0; +} + +img { + max-width: 100%; +} + +.tsd-anchor-icon { + display: inline-flex; + align-items: center; + margin-left: 0.5rem; + vertical-align: middle; + color: var(--color-text); +} + +.tsd-anchor-icon svg { + width: 1em; + height: 1em; + visibility: hidden; +} + +.tsd-anchor-link:hover > .tsd-anchor-icon svg { + visibility: visible; +} + +.deprecated { + text-decoration: line-through !important; +} + +.warning { + padding: 1rem; + color: var(--color-warning-text); + background: var(--color-background-warning); +} + +.tsd-kind-project { + color: var(--color-ts-project); +} +.tsd-kind-module { + color: var(--color-ts-module); +} +.tsd-kind-namespace { + color: var(--color-ts-namespace); +} +.tsd-kind-enum { + color: var(--color-ts-enum); +} +.tsd-kind-enum-member { + color: var(--color-ts-enum-member); +} +.tsd-kind-variable { + color: var(--color-ts-variable); +} +.tsd-kind-function { + color: var(--color-ts-function); +} +.tsd-kind-class { + color: var(--color-ts-class); +} +.tsd-kind-interface { + color: var(--color-ts-interface); +} +.tsd-kind-constructor { + color: var(--color-ts-constructor); +} +.tsd-kind-property { + color: var(--color-ts-property); +} +.tsd-kind-method { + color: var(--color-ts-method); +} +.tsd-kind-call-signature { + color: var(--color-ts-call-signature); +} +.tsd-kind-index-signature { + color: var(--color-ts-index-signature); +} +.tsd-kind-constructor-signature { + color: var(--color-ts-constructor-signature); +} +.tsd-kind-parameter { + color: var(--color-ts-parameter); +} +.tsd-kind-type-literal { + color: var(--color-ts-type-literal); +} +.tsd-kind-type-parameter { + color: var(--color-ts-type-parameter); +} +.tsd-kind-accessor { + color: var(--color-ts-accessor); +} +.tsd-kind-get-signature { + color: var(--color-ts-get-signature); +} +.tsd-kind-set-signature { + color: var(--color-ts-set-signature); +} +.tsd-kind-type-alias { + color: var(--color-ts-type-alias); +} + +/* if we have a kind icon, don't color the text by kind */ +.tsd-kind-icon ~ span { + color: var(--color-text); +} + +* { + scrollbar-width: thin; + scrollbar-color: var(--color-accent) var(--color-icon-background); +} + +*::-webkit-scrollbar { + width: 0.75rem; +} + +*::-webkit-scrollbar-track { + background: var(--color-icon-background); +} + +*::-webkit-scrollbar-thumb { + background-color: var(--color-accent); + border-radius: 999rem; + border: 0.25rem solid var(--color-icon-background); +} + +/* mobile */ +@media (max-width: 769px) { + .tsd-widget.options, + .tsd-widget.menu { + display: inline-block; + } + + .container-main { + display: flex; + } + html .col-content { + float: none; + max-width: 100%; + width: 100%; + } + html .col-sidebar { + position: fixed !important; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + padding: 1.5rem 1.5rem 0 0; + width: 75vw; + visibility: hidden; + background-color: var(--color-background); + transform: translate(100%, 0); + } + html .col-sidebar > *:last-child { + padding-bottom: 20px; + } + html .overlay { + content: ""; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; + } + + .to-has-menu .overlay { + animation: fade-in 0.4s; + } + + .to-has-menu .col-sidebar { + animation: pop-in-from-right 0.4s; + } + + .from-has-menu .overlay { + animation: fade-out 0.4s; + } + + .from-has-menu .col-sidebar { + animation: pop-out-to-right 0.4s; + } + + .has-menu body { + overflow: hidden; + } + .has-menu .overlay { + visibility: visible; + } + .has-menu .col-sidebar { + visibility: visible; + transform: translate(0, 0); + display: flex; + flex-direction: column; + gap: 1.5rem; + max-height: 100vh; + padding: 1rem 2rem; + } + .has-menu .tsd-navigation { + max-height: 100%; + } +} + +/* one sidebar */ +@media (min-width: 770px) { + .container-main { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + grid-template-areas: "sidebar content"; + margin: 2rem auto; + } + + .col-sidebar { + grid-area: sidebar; + } + .col-content { + grid-area: content; + padding: 0 1rem; + } +} +@media (min-width: 770px) and (max-width: 1399px) { + .col-sidebar { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + padding-top: 1rem; + } + .site-menu { + margin-top: 1rem; + } +} + +/* two sidebars */ +@media (min-width: 1200px) { + .container-main { + grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); + grid-template-areas: "sidebar content toc"; + } + + .col-sidebar { + display: contents; + } + + .page-menu { + grid-area: toc; + padding-left: 1rem; + } + .site-menu { + grid-area: sidebar; + } + + .site-menu { + margin-top: 1rem 0; + } + + .page-menu, + .site-menu { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + } +} diff --git a/classes/BaseLayout.html b/classes/BaseLayout.html new file mode 100644 index 0000000..3fa15cc --- /dev/null +++ b/classes/BaseLayout.html @@ -0,0 +1,57 @@ +BaseLayout | widgetly

Class BaseLayout<T>Abstract

Basic layout

+

destroy Destroy layout

+

Type Parameters

  • T = any

Hierarchy (view full)

Methods

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/classes/Container.html b/classes/Container.html new file mode 100644 index 0000000..9c419f5 --- /dev/null +++ b/classes/Container.html @@ -0,0 +1,50 @@ +Container | widgetly

Class Container

Container for widgets

+

Hierarchy

  • EventEmitter
    • Container

Constructors

  • Container constructor

    +

    Parameters

    • element: ContainerElement

      Container's DOM element

      +
    • Optional reduceViewportChange: Debounce

      Function to throttle viewport change events

      +

    Returns Container

Methods

  • Append content element

    +

    Parameters

    • element: HTMLElement

    Returns void

  • Manually destroy the container

    +

    Returns void

  • Returns a Promise that resolves when the container enters the viewport from the top

    +

    Parameters

    Returns Promise<void>

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/classes/ContentElement.html b/classes/ContentElement.html new file mode 100644 index 0000000..168aa58 --- /dev/null +++ b/classes/ContentElement.html @@ -0,0 +1,40 @@ +ContentElement | widgetly

Class ContentElementAbstract

Content element

+

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/classes/EmbedLayout.html b/classes/EmbedLayout.html new file mode 100644 index 0000000..8b652b9 --- /dev/null +++ b/classes/EmbedLayout.html @@ -0,0 +1,65 @@ +EmbedLayout | widgetly

Class EmbedLayout

Embedded layout

+

destroy Destroy layout

+

Hierarchy (view full)

Constructors

Methods

  • Show/hide loader

    +

    Parameters

    • show: boolean

      Flag to hide/show loader

      +

    Returns void

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/classes/IFrameConsumer.html b/classes/IFrameConsumer.html new file mode 100644 index 0000000..9c52fb3 --- /dev/null +++ b/classes/IFrameConsumer.html @@ -0,0 +1,49 @@ +IFrameConsumer | widgetly

Class IFrameConsumer

Consumer inside an iframe

+

Constructors

Methods

  • Factory that exports a facade available externally to the widget (for the webmaster)

    +

    Returns Record<string, any>

  • Factory that exports a facade available to the widget

    +

    Returns {
        externalizedProps: Record<string, any>;
        getSize: (() => {
            height: number;
            width: number;
        });
        initialize: (() => void);
        resize: (() => undefined | void);
        watchSize: (() => void);
    }

    • externalizedProps: Record<string, any>
    • getSize: (() => {
          height: number;
          width: number;
      })
        • (): {
              height: number;
              width: number;
          }
        • Returns {
              height: number;
              width: number;
          }

          • height: number
          • width: number
    • initialize: (() => void)
        • (): void
        • Widget initialization function, should render the application

          +

          Returns void

    • resize: (() => undefined | void)
        • (): undefined | void
        • Returns undefined | void

    • watchSize: (() => void)
        • (): void
        • Returns void

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/classes/IFrameProvider.html b/classes/IFrameProvider.html new file mode 100644 index 0000000..f7f3b66 --- /dev/null +++ b/classes/IFrameProvider.html @@ -0,0 +1,65 @@ +IFrameProvider | widgetly

Class IFrameProvider

Wrapper over an iframe

+

viewportChange Event when the viewport of the element changes + destroy Termination of the provider

+

Hierarchy

  • EventEmitter
    • IFrameProvider

Constructors

  • Creating a new provider instance

    +

    Parameters

    • url: string

      URL to load the iframe from

      +
    • widget: Widget

      Widget object

      +
    • id: string

      Unique widget identifier

      +
    • Optional reduceViewportChange: Debounce

      Method to debounce viewport change tracking

      +

    Returns IFrameProvider

Methods

  • Get the current iframe element

    +

    Returns HTMLIFrameElement

  • Initialization of the iframe provider

    +

    Returns Promise<Record<string, any>>

  • Subscription to changes in the visible area of the iframe

    +

    Parameters

    Returns (() => void)

      • (): void
      • Returns void

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/classes/Mediator.html b/classes/Mediator.html new file mode 100644 index 0000000..5e41c3a --- /dev/null +++ b/classes/Mediator.html @@ -0,0 +1,105 @@ +Mediator | widgetly

Class Mediator

Mediator - a widget factory

+

Hierarchy

  • EventEmitter
    • Mediator

Constructors

  • Creating a new instance of the mediator

    +

    Parameters

    • config: MediatorConfig

      Widget configuration

      +
    • properties: Record<string, any> = {}

      Additional properties/methods for the mediator +You can specify an object with any properties, except for reserved ones (and properties starting with _):

      +
        +
      • config
      • +
      • prefix
      • +
      • id
      • +
      • properties
      • +
      • initializeDOMElements
      • +
      • counterWidgetId
      • +
      • widgets
      • +
      • widgetInstances
      • +
      • destroy
      • +
      • provideWidgetId
      • +
      • defineWidget
      • +
      • buildWidget
      • +
      • updateViewport
      • +
      • initializeDOMElements
      • +
      • externalize
      • +
      • externalizeAsProvider
      • +
      +

    Returns Mediator

Properties

id: string

Mediator identifier

+
prefix: string

Prefix used for data-attributes

+
widgetInstances: Record<string, Widget> = {}

Widget instances

+
widgets: Record<string, {
    config: WidgetConfig;
    properties: Record<string, any>;
}> = {}

Widgets

+

Type declaration

Methods

  • Create a widget and place it on the page

    +

    Parameters

    • name: string

      Widget name

      +
    • containerElement: string | HTMLElement

      Element/selector where the widget will be inserted

      +
    • Optional params: Record<string, any>

      Widget initialization parameters

      +

    Returns Promise<ExternalizedWidget>

  • Create a widget and place it on the page

    +

    Parameters

    • name: string

      Widget name

      +
    • Optional params: Record<string, any>

      Widget initialization parameters

      +

    Returns Promise<ExternalizedWidget>

  • Define a widget

    +

    Parameters

    • config: WidgetConfig

      Widget configuration

      +
    • properties: Record<string, any> = {}

      Additional widget properties, this object is copied to the widget as is and supplements it with these properties

      +

    Returns void

  • Destroy the mediator and stop listening to DOM events

    +

    Returns void

  • Factory that exports a facade available to the widget

    +

    Returns {
        buildWidget: {
            (name, containerElement, params?): Promise<ExternalizedWidget>;
            (name, params?): Promise<ExternalizedWidget>;
        };
        initializeDOMElements: (() => void);
    }

    • buildWidget: {
          (name, containerElement, params?): Promise<ExternalizedWidget>;
          (name, params?): Promise<ExternalizedWidget>;
      }
        • (name, containerElement, params?): Promise<ExternalizedWidget>
        • Create a widget and place it on the page

          +

          Parameters

          • name: string

            Widget name

            +
          • containerElement: string | HTMLElement

            Element/selector where the widget will be inserted

            +
          • Optional params: Record<string, any>

            Widget initialization parameters

            +

          Returns Promise<ExternalizedWidget>

        • (name, params?): Promise<ExternalizedWidget>
        • Create a widget and place it on the page

          +

          Parameters

          • name: string

            Widget name

            +
          • Optional params: Record<string, any>

            Widget initialization parameters

            +

          Returns Promise<ExternalizedWidget>

    • initializeDOMElements: (() => void)
        • (): void
        • Initialization of DOM elements

          +

          Returns void

  • Factory that exports a facade available inside an iframe

    +

    Returns {
        buildWidget: {
            (name, containerElement, params?): Promise<ExternalizedWidget>;
            (name, params?): Promise<ExternalizedWidget>;
        };
        initializeDOMElements: (() => void);
    }

    • buildWidget: {
          (name, containerElement, params?): Promise<ExternalizedWidget>;
          (name, params?): Promise<ExternalizedWidget>;
      }
        • (name, containerElement, params?): Promise<ExternalizedWidget>
        • Create a widget and place it on the page

          +

          Parameters

          • name: string

            Widget name

            +
          • containerElement: string | HTMLElement

            Element/selector where the widget will be inserted

            +
          • Optional params: Record<string, any>

            Widget initialization parameters

            +

          Returns Promise<ExternalizedWidget>

        • (name, params?): Promise<ExternalizedWidget>
        • Create a widget and place it on the page

          +

          Parameters

          • name: string

            Widget name

            +
          • Optional params: Record<string, any>

            Widget initialization parameters

            +

          Returns Promise<ExternalizedWidget>

    • initializeDOMElements: (() => void)
        • (): void
        • Initialization of DOM elements

          +

          Returns void

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/classes/OverlayLayout.html b/classes/OverlayLayout.html new file mode 100644 index 0000000..3480228 --- /dev/null +++ b/classes/OverlayLayout.html @@ -0,0 +1,68 @@ +OverlayLayout | widgetly

Class OverlayLayout

Layout for modal window

+

destroy Destroy layout

+

Hierarchy (view full)

Constructors

Methods

  • Toggle loader visibility

    +

    Parameters

    • show: boolean

      Flag to show/hide loader

      +

    Returns void

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/classes/Widget.html b/classes/Widget.html new file mode 100644 index 0000000..c892f34 --- /dev/null +++ b/classes/Widget.html @@ -0,0 +1,97 @@ +Widget | widgetly

Class Widget

Widget

+

destroy Widget deletion event

+

Hierarchy

  • EventEmitter
    • Widget

Constructors

  • Creating a new widget instance

    +

    Parameters

    • mediator: Mediator

      Mediator

      +
    • id: string

      Widget identifier

      +
    • config: WidgetConfig

      Widget configuration

      +
    • properties: Record<string, any>

      Widget properties, this object is copied as is into the widget and supplements it with these properties

      +
    • params: Record<string, any> = {}

      Some external parameters for the widget. +You can specify an object with any properties, except for reserved ones (and properties starting with _):

      +
        +
      • mediator
      • +
      • id
      • +
      • config
      • +
      • name
      • +
      • properties
      • +
      • params
      • +
      • initialize
      • +
      • updateViewport
      • +
      • destroy
      • +
      • createIFrame
      • +
      • externalize
      • +
      • externalizeAsProvider
      • +
      • whenContainerInViewport
      • +
      • reduceViewportChange
      • +
      +

    Returns Widget

Properties

id: string

Widget identifier

+
name: string

Widget name

+

Methods

  • Set a container for the widget

    +

    Parameters

    Returns void

  • Destroy the widget and stop listening events

    +

    Returns void

  • A factory that exports the facade available to the external user

    +

    Returns any

  • A factory that exports the facade available in the iframe

    +

    Returns {
        destroy: (() => void);
        getVisibleArea: (() => undefined | VisibleArea);
        mediator: {
            buildWidget: {
                (name, containerElement, params?): Promise<ExternalizedWidget>;
                (name, params?): Promise<ExternalizedWidget>;
            };
            initializeDOMElements: (() => void);
        };
        params: Record<string, any>;
        resize: undefined | (() => void);
        scrollTo: ((top, duration?) => Promise<void>);
        subscribeVisibleAreaChange: ((callback) => undefined | (() => void));
        url: string;
    }

    • destroy: (() => void)
        • (): void
        • Destroy the widget and stop listening events

          +

          Returns void

    • getVisibleArea: (() => undefined | VisibleArea)
    • mediator: {
          buildWidget: {
              (name, containerElement, params?): Promise<ExternalizedWidget>;
              (name, params?): Promise<ExternalizedWidget>;
          };
          initializeDOMElements: (() => void);
      }
      • buildWidget: {
            (name, containerElement, params?): Promise<ExternalizedWidget>;
            (name, params?): Promise<ExternalizedWidget>;
        }
          • (name, containerElement, params?): Promise<ExternalizedWidget>
          • Create a widget and place it on the page

            +

            Parameters

            • name: string

              Widget name

              +
            • containerElement: string | HTMLElement

              Element/selector where the widget will be inserted

              +
            • Optional params: Record<string, any>

              Widget initialization parameters

              +

            Returns Promise<ExternalizedWidget>

          • (name, params?): Promise<ExternalizedWidget>
          • Create a widget and place it on the page

            +

            Parameters

            • name: string

              Widget name

              +
            • Optional params: Record<string, any>

              Widget initialization parameters

              +

            Returns Promise<ExternalizedWidget>

      • initializeDOMElements: (() => void)
          • (): void
          • Initialization of DOM elements

            +

            Returns void

    • params: Record<string, any>
    • resize: undefined | (() => void)
    • scrollTo: ((top, duration?) => Promise<void>)
        • (top, duration?): Promise<void>
        • Scroll to a specific part of the iframe

          +

          Parameters

          • top: number

            The coordinate relative to the top-left corner of the iframe to scroll to

            +
          • duration: number = 200

            Scroll animation time, default is 200

            +

          Returns Promise<void>

    • subscribeVisibleAreaChange: ((callback) => undefined | (() => void))
        • (callback): undefined | (() => void)
        • Callback for iframe viewport change (whether the iframe is visible or not)

          +

          Parameters

          Returns undefined | (() => void)

    • url: string
  • Widget initialization function

    +

    Returns Promise<any>

  • Wait when the container enters the viewport from the top

    +

    Parameters

    Returns Promise<void>

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/functions/createMediator.html b/functions/createMediator.html new file mode 100644 index 0000000..d7c5732 --- /dev/null +++ b/functions/createMediator.html @@ -0,0 +1,42 @@ +createMediator | widgetly

Function createMediator

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/functions/createViewportManager.html b/functions/createViewportManager.html new file mode 100644 index 0000000..afda4ad --- /dev/null +++ b/functions/createViewportManager.html @@ -0,0 +1,43 @@ +createViewportManager | widgetly

Function createViewportManager

  • Creates a manager that monitors changes to the viewport of an element

    +

    Parameters

    • element: HTMLElement

      An element

      +
    • callback: Callback

      A viewport change callback

      +
    • duration: number | Debounce = 200

      Function to debounce a callback or callback delay duration, default is 200

      +

    Returns ViewportManager

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/functions/registerIFrame.html b/functions/registerIFrame.html new file mode 100644 index 0000000..9c06742 --- /dev/null +++ b/functions/registerIFrame.html @@ -0,0 +1,42 @@ +registerIFrame | widgetly

Function registerIFrame

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/functions/setMutationParams.html b/functions/setMutationParams.html new file mode 100644 index 0000000..149ea98 --- /dev/null +++ b/functions/setMutationParams.html @@ -0,0 +1,40 @@ +setMutationParams | widgetly

Function setMutationParams

  • Set parameters for mutationObserver

    +

    Parameters

    • params: MutationObserverInit

    Returns void

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/hierarchy.html b/hierarchy.html new file mode 100644 index 0000000..63bedb5 --- /dev/null +++ b/hierarchy.html @@ -0,0 +1,39 @@ +widgetly

widgetly

Class Hierarchy

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..6241c00 --- /dev/null +++ b/index.html @@ -0,0 +1,104 @@ +widgetly

widgetly

Widgetly

Library helps you to create widgets, including widgets that work via an iframe.

+

Main goals

    +
  • Reusable Widgets: extract some business logic into a universal widget, which can then be easily reused across various applications. A single widget can be integrated into numerous applications without the need to change its code.
  • +
  • API: create an external interface for interacting with the widget, that provides for developers methods to control the widget, receive data from it, and send data to the widget.
  • +
  • Transport: use built-in mechanism for sync data and methods between the application, widget, and iframe, without using postMessage directly.
  • +
  • Framework agnostic: use any libraries and frameworks to create widgets and applications that embed them, increasing flexibility and development speed.
  • +
+

Install

npm install widgetly
+
+

or

+
yarn add widgetly
+
+

Usage

Mediator

The Mediator is an instance of the widget factory. After creating an instance, you can declare widgets. If you are using iframe widgets, place this code in the parent window.

+
// ./mediator.ts
import {createMediator} from 'widgetly'

export const mediator = createMediator({
// Prefix for data attributes when inserting widgets via HTML code
prefix: 'rc'
}, {
myMethod() {
return 1
},
someProp: {
someMethod() {
return 2
}
}
}) +
+

Widget declaration

After creating the mediator, you can start declaring widgets via the factory.

+
mediator.defineWidget(config, properties)
+
+

Embedded widgets

// ./widget.ts
import {EmbedLayout} from 'widgetly'
import {mediator} from './mediator'

mediator.defineWidget({
// Widget name
name: 'EmbedComments',

// Widget initialization function
// - should return a Promise
// - should render the widget
async initialize() {
// Wait until the widget enters the viewport
await this.whenContainerInViewport({lazy: true})
// Create an iframe tied to the current widget
this.iframe = this.createIframe(iframeUrl)
// Create an embedded layout
this.layout = new EmbedLayout({
spinner: '<div class="Spinner" />'
})
this.layout.showLoading()
this.layout.addToDOM(this.container)
this.layout.setContent(this.iframe)
// Wait until the widget renders in iframe
await this.iframe.initialize()
this.layout.hideLoading()
}
}, {
// All methods declared here will enrich widget
hide() {
this.layout.hide()
},

show() {
this.layout.show()
}
}) +
+

Overlay widgets

// ./widget.ts
import {OverlayLayout} from 'widgetly'
import {mediator} from './mediator'

mediator.defineWidget({
// Widget name
name: 'LoginModal',

// Widget initialization function
// - should return a Promise
// - should render the widget
async initialize() {
// Create an iframe tied to the current widget
this.iframe = this.createIframe(iframeUrl)
// Create an overlay layout
this.layout = new OverlayLayout({hidden: true})
this.layout.setContainer(this.container)
this.layout.setContent(this.iframe)
// Wait until the widget renders in iframe
await this.iframe.initialize()
this.layout.show()
}
}) +
+

Layout

Layout is an element into which an iframe and loader are inserted.

+

There are following types of layouts:

+
    +
  • EmbedLayout – Embeds into a specific element on the page
  • +
  • OverlayLayout – Overlay, can be used for modal windows
  • +
+

Widgets with iframe

Inside the iframe, you need to wrap the initialization of your widget.

+
registerIFrame(config, properties)
+
+

Example

// ./app.tsx
import React, {useEffect} from 'react'

export const App = ({transport, onReady}) => {
useEffect(() => {
onReady()
}, [onReady])

return (
<TransportContext.Provider value={transport}>
<main>
...
</main>
</TransportContext.Provider>
)
} +
+
// ./iframe.tsx
import React from 'react'
import {createRoot} from 'react-dom/client'
import {registerIFrame} from 'widgetly'
import {App} from './app'

const rootElement = document.getElementById('my_app')
const root = createRoot(rootElement)

registerIFrame({
async initialize() {
await new Promise(resolve => {
root.render(
<App
transport={this}
onReady={resolve}
/>
)
})
}
}) +
+

Using widgets

The mediator can automatically create widgets in containers with the corresponding data attributes when it appears in the DOM.

+
// ./app.ts
import React from 'react'
import './mediator'

export const App = () => {
return (
<div
data-rc-widget="EmbedComments"
data-rc-app-id={APP_ID}
data-rc-page-url={window.location.pathname}
/>
)
} +
+

Or create widget through the factory to gain full control over the widget.

+
mediator.buildWidget(name, containerElement, params)
+
+

Example of creating a widget

// ./app.ts
import mediator from './mediator'

const container = document.getElementById('my_comments');

mediator.buildWidget('EmbedComments', container, {
appId: APP_ID,
pageUrl: window.location.pathname
}).then(widget => {
// At this moment, you can use the widget external methods
}); +
+

Documentation

Currently we only have the API which you can check here.

+

Contributing

Start

After you clone the repo you just need to run yarn's default command to install and build the packages

+
yarn
+
+

Testing

We have a test suite consisting of a bunch of unit tests to verify utils keep working as expected. Test suit is run in CI on every commit.

+

To run the tests

+
yarn test
+
+

To run the tests in watch mode

+
yarn test:watch
+
+

Code quality

To run linting the codebase

+
yarn lint
+
+

To check typings

+
yarn typecheck
+
+

To check bundle size

+
yarn sizecheck
+
+

Discussion

Please open an issue if you have any questions or concerns.

+

License

MIT

+

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/interfaces/Callback.html b/interfaces/Callback.html new file mode 100644 index 0000000..118144b --- /dev/null +++ b/interfaces/Callback.html @@ -0,0 +1,40 @@ +Callback | widgetly

Interface Callback

Base callback

+
interface Callback ((...args) => any)
  • Parameters

    • Rest ...args: any[]

    Returns any

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/interfaces/ContainerElement.html b/interfaces/ContainerElement.html new file mode 100644 index 0000000..1c3ff33 --- /dev/null +++ b/interfaces/ContainerElement.html @@ -0,0 +1,40 @@ +ContainerElement | widgetly

Interface ContainerElement

Container element

+
interface ContainerElement {}

Hierarchy

  • HTMLElement
    • ContainerElement

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/interfaces/Debounce.html b/interfaces/Debounce.html new file mode 100644 index 0000000..8cdd7b8 --- /dev/null +++ b/interfaces/Debounce.html @@ -0,0 +1,40 @@ +Debounce | widgetly

Interface Debounce

Base debounce

+
interface Debounce (<T>(func) => T)

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/interfaces/EmbedLayoutConfig.html b/interfaces/EmbedLayoutConfig.html new file mode 100644 index 0000000..303731f --- /dev/null +++ b/interfaces/EmbedLayoutConfig.html @@ -0,0 +1,42 @@ +EmbedLayoutConfig | widgetly

Interface EmbedLayoutConfig

Embedded layout configuration

+
interface EmbedLayoutConfig {
    spinner?: string;
}

Properties

Properties

spinner?: string

Spinner HTML template

+

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/interfaces/EnterViewportOptions.html b/interfaces/EnterViewportOptions.html new file mode 100644 index 0000000..2991ff7 --- /dev/null +++ b/interfaces/EnterViewportOptions.html @@ -0,0 +1,44 @@ +EnterViewportOptions | widgetly

Interface EnterViewportOptions

Options for waiting when the container enters the viewport

+
interface EnterViewportOptions {
    lazy?: boolean;
    offset?: number;
}

Properties

Properties

lazy?: boolean

Enable lazy loading, default is false

+
offset?: number

Offset for lazy loading, default is 300

+

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/interfaces/ExternalizedWidget.html b/interfaces/ExternalizedWidget.html new file mode 100644 index 0000000..183cb9c --- /dev/null +++ b/interfaces/ExternalizedWidget.html @@ -0,0 +1,40 @@ +ExternalizedWidget | widgetly

Interface ExternalizedWidget

Widget facade available to the user

+
interface ExternalizedWidget {}

Hierarchy

  • ExternalizedEmitter
    • ExternalizedWidget

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/interfaces/IFrameConsumerConfig.html b/interfaces/IFrameConsumerConfig.html new file mode 100644 index 0000000..b78ace9 --- /dev/null +++ b/interfaces/IFrameConsumerConfig.html @@ -0,0 +1,46 @@ +IFrameConsumerConfig | widgetly

Interface IFrameConsumerConfig

Configuration of the consumer inside an iframe

+
interface IFrameConsumerConfig {
    externalize?(): void;
    externalizeAsConsumer?(): void;
    initialize(): void;
}

Methods

  • Factory that exports a facade available externally to the widget user

    +

    Returns void

  • Factory that exports a facade available to the widget

    +

    Returns void

  • Widget initialization function, should render the application

    +

    Returns void

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/interfaces/MediatorConfig.html b/interfaces/MediatorConfig.html new file mode 100644 index 0000000..139b3f9 --- /dev/null +++ b/interfaces/MediatorConfig.html @@ -0,0 +1,46 @@ +MediatorConfig | widgetly

Interface MediatorConfig

Mediator configuration

+
interface MediatorConfig {
    prefix: string;
    externalizeAsProvider?(this): Record<string, any>;
    initialize(): void;
}

Properties

prefix: string

Prefix for data-attributes

+

Methods

  • Factory that exports a facade available in an iframe

    +

    Parameters

    Returns Record<string, any>

  • Initialization function

    +

    Returns void

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/interfaces/OverlayLayoutConfig.html b/interfaces/OverlayLayoutConfig.html new file mode 100644 index 0000000..a77cc1e --- /dev/null +++ b/interfaces/OverlayLayoutConfig.html @@ -0,0 +1,48 @@ +OverlayLayoutConfig | widgetly

Interface OverlayLayoutConfig

Overlay layout configuration for modal window

+
interface OverlayLayoutConfig {
    animationDuration?: number;
    className?: string;
    hidden?: boolean;
    spinner?: string;
}

Properties

animationDuration?: number

Duration of opacity animation in ms, default 200

+
className?: string

CSS class added to element

+
hidden?: boolean

Add hidden layout to DOM

+
spinner?: string

HTML template for spinner

+

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/interfaces/ViewportManager.html b/interfaces/ViewportManager.html new file mode 100644 index 0000000..c604035 --- /dev/null +++ b/interfaces/ViewportManager.html @@ -0,0 +1,40 @@ +ViewportManager | widgetly

Interface ViewportManager

Base viewport manager

+
interface ViewportManager {}

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/interfaces/VisibleArea.html b/interfaces/VisibleArea.html new file mode 100644 index 0000000..aba3f08 --- /dev/null +++ b/interfaces/VisibleArea.html @@ -0,0 +1,48 @@ +VisibleArea | widgetly

Interface VisibleArea

Visible area

+
interface VisibleArea {
    height: number;
    left: number;
    top: number;
    width: number;
}

Properties

Properties

height: number

Visible height of the element

+
left: number

Coordinates relative to the top left corner of the element from which it is visible

+
top: number

Coordinates relative to the top left corner of the element from which it is visible

+
width: number

Visible width of the element

+

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/interfaces/WidgetConfig.html b/interfaces/WidgetConfig.html new file mode 100644 index 0000000..8be27b3 --- /dev/null +++ b/interfaces/WidgetConfig.html @@ -0,0 +1,53 @@ +WidgetConfig | widgetly

Interface WidgetConfig

Widget configuration

+
interface WidgetConfig {
    name: string;
    reduceViewportChange?: Debounce;
    destroy?(this): void;
    externalize?(this): Record<string, any>;
    externalizeAsProvider?(this): Record<string, any>;
    initialize(this): void;
}

Properties

name: string

Unique widget name

+
reduceViewportChange?: Debounce

Function to slow down the processing of Viewport changes, if it is absent, the standard debounce is used

+

Methods

  • Widget deletion function, this function should be called by the user when deleting the widget

    +

    Parameters

    Returns void

  • A factory that exports the facade available to the user. +By default, exports properties passed to the widget and properties that the iframe exports

    +

    Parameters

    Returns Record<string, any>

  • A factory that exports the facade available in the iframe

    +

    Parameters

    Returns Record<string, any>

  • Widget initialization function, should render the widget

    +

    Parameters

    Returns void

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/modules.html b/modules.html new file mode 100644 index 0000000..26e2902 --- /dev/null +++ b/modules.html @@ -0,0 +1,66 @@ +widgetly

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/variables/globalViewportEvents.html b/variables/globalViewportEvents.html new file mode 100644 index 0000000..8705d1a --- /dev/null +++ b/variables/globalViewportEvents.html @@ -0,0 +1,40 @@ +globalViewportEvents | widgetly

Variable globalViewportEventsConst

globalViewportEvents: EventEmitter<DefaultEventMap> = ...

Monitor scroll window

+

Generated using TypeDoc
+ + +

\ No newline at end of file diff --git a/variables/mutationEvents.html b/variables/mutationEvents.html new file mode 100644 index 0000000..5257c29 --- /dev/null +++ b/variables/mutationEvents.html @@ -0,0 +1,40 @@ +mutationEvents | widgetly

Variable mutationEventsConst

mutationEvents: EventEmitter<DefaultEventMap> = ...

Create a MutationObserver

+

Generated using TypeDoc
+ + +

\ No newline at end of file