Skip to content

Commit

Permalink
update: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleactii committed Dec 31, 2024
1 parent 173f298 commit 440a2e3
Show file tree
Hide file tree
Showing 19 changed files with 46 additions and 33 deletions.
2 changes: 1 addition & 1 deletion docs/assets/hierarchy.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
window.hierarchyData = "eJyrVirKzy8pVrKKjtVRKkpNy0lNLsnMzytWsqqurQUAmx4Kpg=="
window.hierarchyData = "eJyrVirKzy8pVrKKjtVRKkpNy0lNLsnMzwMKVNfWAgCbHgqm"
11 changes: 9 additions & 2 deletions docs/assets/highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
--dark-hl-5: #9CDCFE;
--light-hl-6: #008000;
--dark-hl-6: #6A9955;
--light-hl-7: #0070C1;
--dark-hl-7: #4FC1FF;
--light-hl-7: #267F99;
--dark-hl-7: #4EC9B0;
--light-hl-8: #0070C1;
--dark-hl-8: #4FC1FF;
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}
Expand All @@ -28,6 +30,7 @@
--hl-5: var(--light-hl-5);
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--hl-8: var(--light-hl-8);
--code-background: var(--light-code-background);
} }

Expand All @@ -40,6 +43,7 @@
--hl-5: var(--dark-hl-5);
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--hl-8: var(--dark-hl-8);
--code-background: var(--dark-code-background);
} }

Expand All @@ -52,6 +56,7 @@
--hl-5: var(--light-hl-5);
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--hl-8: var(--light-hl-8);
--code-background: var(--light-code-background);
}

Expand All @@ -64,6 +69,7 @@
--hl-5: var(--dark-hl-5);
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--hl-8: var(--dark-hl-8);
--code-background: var(--dark-code-background);
}

Expand All @@ -75,4 +81,5 @@
.hl-5 { color: var(--hl-5); }
.hl-6 { color: var(--hl-6); }
.hl-7 { color: var(--hl-7); }
.hl-8 { color: var(--hl-8); }
pre, code { background: var(--code-background); }
2 changes: 1 addition & 1 deletion docs/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/assets/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions docs/classes/index.Kit.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<a id="using-kit-with-plugins" class="tsd-anchor"></a><h1 class="tsd-anchor-link">Using Kit with plugins<a href="#using-kit-with-plugins" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1><pre><code class="ts"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">Plugin</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&#39;custom-plugin&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-6">// Initialize an array of plugins.</span><br/><span class="hl-5">Kit</span><span class="hl-1">.</span><span class="hl-0">init</span><span class="hl-1">([</span><span class="hl-5">Plugin</span><span class="hl-1">]);</span><br/><br/><span class="hl-6">// or you can just register one plugin</span><br/><span class="hl-5">Kit</span><span class="hl-1">.</span><span class="hl-0">registerPlugin</span><span class="hl-1">(</span><span class="hl-5">Plugin</span><span class="hl-1">);</span>
</code><button type="button">Copy</button></pre>

<a id="listening-for-plugin-events" class="tsd-anchor"></a><h1 class="tsd-anchor-link">Listening for plugin events<a href="#listening-for-plugin-events" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1><pre><code class="js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-0">listener</span><span class="hl-1"> = (</span><span class="hl-5">pEvent</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> { </span><span class="hl-7">data</span><span class="hl-1">, </span><span class="hl-7">timestamp</span><span class="hl-1"> } = </span><span class="hl-5">pEvent</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">// Here you can use the data that the event sent down.</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-6">// Here you listen for an event from the plugin: `Plugin`, under the event name of `eventName`</span><br/><span class="hl-5">Kit</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;Plugin&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;eventName&#39;</span><span class="hl-1">, </span><span class="hl-5">listener</span><span class="hl-1">);</span><br/><br/><span class="hl-6">// You can also stop listening for an event</span><br/><span class="hl-5">Kit</span><span class="hl-1">.</span><span class="hl-0">off</span><span class="hl-1">(</span><span class="hl-2">&#39;Plugin&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;eventName&#39;</span><span class="hl-1">, </span><span class="hl-5">listener</span><span class="hl-1">);</span>
<a id="listening-for-plugin-events" class="tsd-anchor"></a><h1 class="tsd-anchor-link">Listening for plugin events<a href="#listening-for-plugin-events" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1><pre><code class="js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-0">listener</span><span class="hl-1"> = (</span><span class="hl-5">pEvent</span><span class="hl-1">: </span><span class="hl-7">EventEmitter</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> { </span><span class="hl-8">data</span><span class="hl-1">, </span><span class="hl-8">timestamp</span><span class="hl-1"> } = </span><span class="hl-5">pEvent</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">// Here you can use the data that the event sent down.</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-6">// Here you listen for an event from the plugin: `Plugin`, under the event name of `eventName`</span><br/><span class="hl-5">Kit</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;Plugin&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;eventName&#39;</span><span class="hl-1">, </span><span class="hl-5">listener</span><span class="hl-1">);</span><br/><br/><span class="hl-6">// You can also stop listening for an event</span><br/><span class="hl-5">Kit</span><span class="hl-1">.</span><span class="hl-0">off</span><span class="hl-1">(</span><span class="hl-2">&#39;Plugin&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;eventName&#39;</span><span class="hl-1">, </span><span class="hl-5">listener</span><span class="hl-1">);</span>
</code><button type="button">Copy</button></pre>

</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#kit"><span>Kit</span></a><a href="#install"><span>Install</span></a><a href="#using-kit-with-plugins"><span>Using <wbr/>Kit with plugins</span></a><a href="#listening-for-plugin-events"><span>Listening for plugin events</span></a></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html">@evitcastudio/kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
Loading

0 comments on commit 440a2e3

Please sign in to comment.