lilact 0.26.1 → 0.26.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lilact.development.js +147 -113
- package/dist/lilact.development.js.map +3 -3
- package/dist/lilact.development.min.js +25 -25
- package/dist/lilact.development.min.js.map +3 -3
- package/dist/lilact.production.min.js +25 -25
- package/docs/functions/run.lazy.html +1 -1
- package/docs/functions/run.require.html +1 -1
- package/docs/functions/run.run.html +3 -4
- package/docs/functions/run.runScripts.html +1 -1
- package/docs/static/lilact.development.js +147 -113
- package/docs/static/lilact.development.js.map +3 -3
- package/docs/static/lilact.development.min.js +25 -25
- package/docs/static/lilact.development.min.js.map +3 -3
- package/docs/static/lilact.production.min.js +25 -25
- package/examples/lilact.development.js +147 -113
- package/examples/lilact.development.js.map +3 -3
- package/examples/lilact.development.min.js +25 -25
- package/examples/lilact.development.min.js.map +3 -3
- package/examples/lilact.production.min.js +25 -25
- package/package.json +1 -1
- package/src/accessories.jsx +385 -298
- package/src/run.jsx +5 -6
|
@@ -10,4 +10,4 @@ would work, but it will not be wired correctly to the <code>Lilact</code> runtim
|
|
|
10
10
|
The promise must resolve to a module whose module.exports.default is a Lilact component
|
|
11
11
|
or otherwise it will be whatever the module.exports is set to.</p>
|
|
12
12
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">props</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <a href="../classes/components.HTMLComponent.html" class="tsd-signature-type tsd-kind-class">HTMLComponent</a></h4><p>A Lilact component that should be rendered inside a <code>Suspense</code> boundary.</p>
|
|
13
|
-
<aside class="tsd-sources"><ul><li>Defined in run.jsx:
|
|
13
|
+
<aside class="tsd-sources"><ul><li>Defined in run.jsx:231</li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Lilact</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>
|
|
@@ -6,4 +6,4 @@ id and run its contents.</p>
|
|
|
6
6
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">path</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><p>The path to the required file. Must be either absolute path or relative to the current
|
|
7
7
|
module or document’s URL (the page/location that initiated the request).</p>
|
|
8
8
|
</div></li><li><span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4><p>An array representation of the children.</p>
|
|
9
|
-
<aside class="tsd-sources"><ul><li>Defined in run.jsx:
|
|
9
|
+
<aside class="tsd-sources"><ul><li>Defined in run.jsx:151</li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Lilact</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>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>run | Lilact</title><meta name="description" content="Documentation for Lilact"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Lilact</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/run.html">run</a></li><li><a href="" aria-current="page">run</a></li></ul><h1>Function run</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="run"><span class="tsd-kind-call-signature">run</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">jsx</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>run | Lilact</title><meta name="description" content="Documentation for Lilact"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Lilact</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/run.html">run</a></li><li><a href="" aria-current="page">run</a></li></ul><h1>Function run</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="run"><span class="tsd-kind-call-signature">run</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">jsx</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">path</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">__namedParameters</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">isInline</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">isModule</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><a href="#run" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Runs a jsx script. All scripts can access Lilact namespace as a global object.</p>
|
|
2
2
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">jsx</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><p>The code to run.</p>
|
|
3
3
|
</div></li><li><span><span class="tsd-kind-parameter">path</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ...</span></span><div class="tsd-comment tsd-typography"><p>The optional path to be used in reporting errors.</p>
|
|
4
|
-
</div></li><li><span><span class="tsd-kind-parameter">
|
|
5
|
-
</div></li></ul></div><
|
|
6
|
-
<aside class="tsd-sources"><ul><li>Defined in run.jsx:75</li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Lilact</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>
|
|
4
|
+
</div></li><li><span><span class="tsd-kind-parameter">__namedParameters</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">isInline</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">isModule</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = ...</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4><p>An array representation of the children.</p>
|
|
5
|
+
<aside class="tsd-sources"><ul><li>Defined in run.jsx:74</li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Lilact</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>
|
|
@@ -4,4 +4,4 @@ It is automatically attached to document.onload when Lilact is loaded.</p>
|
|
|
4
4
|
If element has inner content, it will be executed via <code>run</code>.</p>
|
|
5
5
|
<p>If both are present, first the src is loaded and then the inner content is executed.</p>
|
|
6
6
|
<p>Note that it won't detect such elements that are added after document.onload.</p>
|
|
7
|
-
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in run.jsx:
|
|
7
|
+
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in run.jsx:290</li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Lilact</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>
|
|
@@ -3597,11 +3597,11 @@ function joinPaths(basePath, relativePath) {
|
|
|
3597
3597
|
return (isAbs ? "/" : "") + stack.join("/");
|
|
3598
3598
|
}
|
|
3599
3599
|
var required_scripts = {};
|
|
3600
|
-
function run(jsx, path = `InlineJSX-${++lilact_default.eval_num}`,
|
|
3600
|
+
function run(jsx, path = `InlineJSX-${++lilact_default.eval_num}`, { isInline, isModule } = { isInline: true, isModule: true }) {
|
|
3601
3601
|
const mappings = [];
|
|
3602
3602
|
const module = {
|
|
3603
3603
|
mappings,
|
|
3604
|
-
|
|
3604
|
+
isInline,
|
|
3605
3605
|
path,
|
|
3606
3606
|
code: jsx,
|
|
3607
3607
|
exports: {}
|
|
@@ -3635,7 +3635,7 @@ function run(jsx, path = `InlineJSX-${++lilact_default.eval_num}`, is_inline = t
|
|
|
3635
3635
|
globalThis.createComponent = lilact_default.createComponent;
|
|
3636
3636
|
globalThis.Fragment = lilact_default.Fragment;
|
|
3637
3637
|
const res = eval(processed);
|
|
3638
|
-
if (module.exports) return module.exports;
|
|
3638
|
+
if (isModule && module.exports) return module.exports;
|
|
3639
3639
|
return res;
|
|
3640
3640
|
} catch (e) {
|
|
3641
3641
|
e = lilact_default.traceError(e);
|
|
@@ -3676,7 +3676,7 @@ function require2(path2) {
|
|
|
3676
3676
|
});
|
|
3677
3677
|
} else {
|
|
3678
3678
|
const request = new XMLHttpRequest();
|
|
3679
|
-
request.open("GET", path2, false);
|
|
3679
|
+
request.open("GET", path2, { isInline: false });
|
|
3680
3680
|
request.send(null);
|
|
3681
3681
|
if (request.status === 200) {
|
|
3682
3682
|
return run(request.responseText, path2, false);
|
|
@@ -4981,123 +4981,144 @@ var SplitPane = forwardRef(function SplitPane2({
|
|
|
4981
4981
|
}, ref) {
|
|
4982
4982
|
const containerRef = useRef(null);
|
|
4983
4983
|
const sizeRef = useRef({ w: 0, h: 0 });
|
|
4984
|
-
const
|
|
4985
|
-
const
|
|
4986
|
-
const [internalPos, setInternalPos] = useState(
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
mode === "verical" ? sizeRef.current.h : sizeRef.current.w,
|
|
4991
|
-
splitterSize
|
|
4992
|
-
));
|
|
4993
|
-
let posResolved = position2 == null ? internalPos : position2;
|
|
4994
|
-
posResolved = clamp(
|
|
4995
|
-
posResolved,
|
|
4996
|
-
min,
|
|
4997
|
-
max,
|
|
4998
|
-
mode === "verical" ? sizeRef.current.h : sizeRef.current.w,
|
|
4999
|
-
splitterSize
|
|
5000
|
-
);
|
|
4984
|
+
const [internalMode, setInternalMode] = useState(mode === "vertical" ? "vertical" : "horizontal");
|
|
4985
|
+
const internalModeRef = useRef(internalMode);
|
|
4986
|
+
const [internalPos, setInternalPos] = useState(defaultPosition);
|
|
4987
|
+
const internalPosRef = useRef(internalPos);
|
|
4988
|
+
const effectivePosRef = useRef(void 0);
|
|
4989
|
+
const resizePolicyRef = useRef(resizePolicy);
|
|
5001
4990
|
useEffect(() => {
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
min,
|
|
5006
|
-
max,
|
|
5007
|
-
mode === "verical" ? sizeRef.current.h : sizeRef.current.w,
|
|
5008
|
-
splitterSize
|
|
5009
|
-
));
|
|
5010
|
-
}, [position2, min, max]);
|
|
4991
|
+
resizePolicyRef.current = resizePolicy;
|
|
4992
|
+
}, [resizePolicy]);
|
|
4993
|
+
internalModeRef.current = internalMode;
|
|
5011
4994
|
useEffect(() => {
|
|
4995
|
+
internalPosRef.current = internalPos;
|
|
4996
|
+
}, [internalPos]);
|
|
4997
|
+
useLayoutEffect(() => {
|
|
5012
4998
|
setInternalMode(mode === "vertical" ? "vertical" : "horizontal");
|
|
5013
4999
|
}, [mode]);
|
|
5000
|
+
const clampWithSize = (v, modeNow, w2, h2) => {
|
|
5001
|
+
const size = modeNow === "vertical" ? h2 : w2;
|
|
5002
|
+
return clamp(v, min, max, size, splitterSize);
|
|
5003
|
+
};
|
|
5004
|
+
const posResolved = useMemo(() => {
|
|
5005
|
+
const raw = position2 == null ? internalPos : position2;
|
|
5006
|
+
const { w: w2, h: h2 } = sizeRef.current;
|
|
5007
|
+
const hasSize = mode === "vertical" ? h2 > 0 : w2 > 0;
|
|
5008
|
+
if (!hasSize) return raw;
|
|
5009
|
+
return clampWithSize(raw, internalModeRef.current, w2, h2);
|
|
5010
|
+
}, [position2, internalPos, min, max, splitterSize, mode]);
|
|
5011
|
+
useEffect(() => {
|
|
5012
|
+
effectivePosRef.current = posResolved;
|
|
5013
|
+
}, [posResolved]);
|
|
5014
5014
|
const setPosition = (next2) => {
|
|
5015
|
-
const
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5015
|
+
const modeNow = internalModeRef.current;
|
|
5016
|
+
const { w: w2, h: h2 } = sizeRef.current;
|
|
5017
|
+
if (modeNow === "vertical" ? h2 <= 0 : w2 <= 0) {
|
|
5018
|
+
if (position2 == null) setInternalPos(next2);
|
|
5019
|
+
onSizeChange == null ? void 0 : onSizeChange(next2);
|
|
5020
|
+
return;
|
|
5021
|
+
}
|
|
5022
|
+
const clamped = clampWithSize(next2, modeNow, w2, h2);
|
|
5022
5023
|
if (position2 == null) setInternalPos(clamped);
|
|
5024
|
+
effectivePosRef.current = clamped;
|
|
5023
5025
|
onSizeChange == null ? void 0 : onSizeChange(clamped);
|
|
5024
5026
|
};
|
|
5025
5027
|
useImperativeHandle(ref, () => ({
|
|
5026
5028
|
setPosition,
|
|
5027
5029
|
setMode: (nextMode) => setInternalMode(nextMode === "vertical" ? "vertical" : "horizontal"),
|
|
5028
|
-
getPosition: () =>
|
|
5029
|
-
|
|
5030
|
+
getPosition: () => {
|
|
5031
|
+
var _a;
|
|
5032
|
+
return (_a = effectivePosRef.current) != null ? _a : posResolved;
|
|
5033
|
+
},
|
|
5034
|
+
getMode: () => internalModeRef.current
|
|
5030
5035
|
}));
|
|
5036
|
+
const didInitRef = useRef(false);
|
|
5031
5037
|
useLayoutEffect(() => {
|
|
5032
5038
|
const el = containerRef.current;
|
|
5033
5039
|
if (!el) return;
|
|
5034
|
-
const ro = new ResizeObserver(() => {
|
|
5040
|
+
const ro = new ResizeObserver((entries) => {
|
|
5035
5041
|
var _a;
|
|
5036
|
-
const
|
|
5037
|
-
const
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
if (
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5042
|
+
const rect = el.getBoundingClientRect();
|
|
5043
|
+
const prev2 = sizeRef.current;
|
|
5044
|
+
const nextSize = { w: rect.width, h: rect.height };
|
|
5045
|
+
sizeRef.current = nextSize;
|
|
5046
|
+
const modeNow = internalModeRef.current;
|
|
5047
|
+
const hadSize = modeNow === "vertical" ? prev2.h > 0 : prev2.w > 0;
|
|
5048
|
+
const hasSizeNow = modeNow === "vertical" ? nextSize.h > 0 : nextSize.w > 0;
|
|
5049
|
+
if (!didInitRef.current && hasSizeNow) {
|
|
5050
|
+
didInitRef.current = true;
|
|
5051
|
+
const raw = position2 == null ? internalPosRef.current : position2;
|
|
5052
|
+
const clamped = clampWithSize(raw, modeNow, nextSize.w, nextSize.h);
|
|
5053
|
+
if (position2 == null) setInternalPos(clamped);
|
|
5054
|
+
effectivePosRef.current = clamped;
|
|
5055
|
+
onSizeChange == null ? void 0 : onSizeChange(clamped);
|
|
5056
|
+
return;
|
|
5057
|
+
}
|
|
5058
|
+
if (!hadSize || !hasSizeNow) return;
|
|
5059
|
+
const p2 = (_a = effectivePosRef.current) != null ? _a : posResolved;
|
|
5060
|
+
const rp = resizePolicyRef.current;
|
|
5061
|
+
const s = splitterSize;
|
|
5062
|
+
if (rp === "fixFirst") {
|
|
5063
|
+
if (modeNow === "vertical") {
|
|
5064
|
+
const availOld = prev2.h - s;
|
|
5065
|
+
const availNew = nextSize.h - s;
|
|
5066
|
+
if (availOld > 0 && availNew > 0) {
|
|
5067
|
+
const firstPx = p2 * availOld;
|
|
5068
|
+
const nextP = firstPx / availNew;
|
|
5069
|
+
if (Math.abs(nextP - p2) > EPS) setPosition(nextP);
|
|
5062
5070
|
}
|
|
5063
|
-
} else
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5071
|
+
} else {
|
|
5072
|
+
const availOld = prev2.w - s;
|
|
5073
|
+
const availNew = nextSize.w - s;
|
|
5074
|
+
if (availOld > 0 && availNew > 0) {
|
|
5075
|
+
const firstPx = p2 * availOld;
|
|
5076
|
+
const nextP = firstPx / availNew;
|
|
5077
|
+
if (Math.abs(nextP - p2) > EPS) setPosition(nextP);
|
|
5078
|
+
}
|
|
5079
|
+
}
|
|
5080
|
+
} else if (rp === "fixSecond") {
|
|
5081
|
+
if (modeNow === "vertical") {
|
|
5082
|
+
const availOld = prev2.h - s;
|
|
5083
|
+
const availNew = nextSize.h - s;
|
|
5084
|
+
if (availOld > 0 && availNew > 0) {
|
|
5085
|
+
const secondPx = (1 - p2) * availOld;
|
|
5086
|
+
const nextP = 1 - secondPx / availNew;
|
|
5087
|
+
if (Math.abs(nextP - p2) > EPS) setPosition(nextP);
|
|
5088
|
+
}
|
|
5089
|
+
} else {
|
|
5090
|
+
const availOld = prev2.w - s;
|
|
5091
|
+
const availNew = nextSize.w - s;
|
|
5092
|
+
if (availOld > 0 && availNew > 0) {
|
|
5093
|
+
const secondPx = (1 - p2) * availOld;
|
|
5094
|
+
const nextP = 1 - secondPx / availNew;
|
|
5095
|
+
if (Math.abs(nextP - p2) > EPS) setPosition(nextP);
|
|
5080
5096
|
}
|
|
5081
5097
|
}
|
|
5082
5098
|
}
|
|
5083
5099
|
});
|
|
5084
5100
|
ro.observe(el);
|
|
5085
|
-
const rect = el.getBoundingClientRect();
|
|
5086
|
-
sizeRef.current = { w: rect.width, h: rect.height };
|
|
5087
5101
|
return () => ro.disconnect();
|
|
5088
|
-
}, [
|
|
5102
|
+
}, [min, max, splitterSize, onSizeChange, position2]);
|
|
5089
5103
|
const startPosRef = useRef(posResolved);
|
|
5090
5104
|
const [dragging, setDragging] = useState(false);
|
|
5105
|
+
useEffect(() => {
|
|
5106
|
+
if (!dragging) startPosRef.current = posResolved;
|
|
5107
|
+
}, [posResolved, dragging]);
|
|
5091
5108
|
const handleStart = () => {
|
|
5109
|
+
var _a;
|
|
5092
5110
|
setDragging(true);
|
|
5093
|
-
startPosRef.current = posResolved;
|
|
5111
|
+
startPosRef.current = (_a = effectivePosRef.current) != null ? _a : posResolved;
|
|
5094
5112
|
};
|
|
5095
|
-
const handleDelta = (x, y
|
|
5113
|
+
const handleDelta = (x, y) => {
|
|
5114
|
+
const modeNow = internalModeRef.current;
|
|
5096
5115
|
const { w: w2, h: h2 } = sizeRef.current;
|
|
5097
|
-
if (
|
|
5098
|
-
|
|
5116
|
+
if (modeNow === "horizontal") {
|
|
5117
|
+
const denom = w2 > 0 ? w2 : 1;
|
|
5118
|
+
setPosition(startPosRef.current + x / denom);
|
|
5099
5119
|
} else {
|
|
5100
|
-
|
|
5120
|
+
const denom = h2 > 0 ? h2 : 1;
|
|
5121
|
+
setPosition(startPosRef.current + y / denom);
|
|
5101
5122
|
}
|
|
5102
5123
|
};
|
|
5103
5124
|
const handleEnd = () => setDragging(false);
|
|
@@ -5134,21 +5155,25 @@ var SplitPane = forwardRef(function SplitPane2({
|
|
|
5134
5155
|
computedPane1Style.bottom = 0;
|
|
5135
5156
|
computedPane2Style.top = 0;
|
|
5136
5157
|
if (resizePolicy === "fixFirst") {
|
|
5137
|
-
|
|
5138
|
-
|
|
5158
|
+
const ww = w - splitterSize;
|
|
5159
|
+
const pane1W = ww > 0 ? p * ww : 0;
|
|
5160
|
+
computedPane1Style.width = pane1W;
|
|
5161
|
+
computedPane2Style.left = pane1W + splitterSize;
|
|
5139
5162
|
Object.assign(computedSplitterStyle, {
|
|
5140
5163
|
top: 0,
|
|
5141
5164
|
bottom: 0,
|
|
5142
|
-
left:
|
|
5165
|
+
left: pane1W,
|
|
5143
5166
|
width: splitterSize
|
|
5144
5167
|
});
|
|
5145
5168
|
} else if (resizePolicy === "fixSecond") {
|
|
5146
|
-
|
|
5147
|
-
|
|
5169
|
+
const ww = w - splitterSize;
|
|
5170
|
+
const pane2W = ww > 0 ? (1 - p) * ww : 0;
|
|
5171
|
+
computedPane2Style.width = pane2W;
|
|
5172
|
+
computedPane1Style.right = pane2W + splitterSize;
|
|
5148
5173
|
Object.assign(computedSplitterStyle, {
|
|
5149
5174
|
top: 0,
|
|
5150
5175
|
bottom: 0,
|
|
5151
|
-
right:
|
|
5176
|
+
right: pane2W,
|
|
5152
5177
|
width: splitterSize
|
|
5153
5178
|
});
|
|
5154
5179
|
} else {
|
|
@@ -5165,21 +5190,25 @@ var SplitPane = forwardRef(function SplitPane2({
|
|
|
5165
5190
|
computedPane1Style.right = 0;
|
|
5166
5191
|
computedPane2Style.left = 0;
|
|
5167
5192
|
if (resizePolicy === "fixFirst") {
|
|
5168
|
-
|
|
5169
|
-
|
|
5193
|
+
const hh = h - splitterSize;
|
|
5194
|
+
const pane1H = hh > 0 ? p * hh : 0;
|
|
5195
|
+
computedPane1Style.height = pane1H;
|
|
5196
|
+
computedPane2Style.top = pane1H + splitterSize;
|
|
5170
5197
|
Object.assign(computedSplitterStyle, {
|
|
5171
5198
|
left: 0,
|
|
5172
5199
|
right: 0,
|
|
5173
|
-
top:
|
|
5200
|
+
top: pane1H,
|
|
5174
5201
|
height: splitterSize
|
|
5175
5202
|
});
|
|
5176
5203
|
} else if (resizePolicy === "fixSecond") {
|
|
5177
|
-
|
|
5178
|
-
|
|
5204
|
+
const hh = h - splitterSize;
|
|
5205
|
+
const pane2H = hh > 0 ? (1 - p) * hh : 0;
|
|
5206
|
+
computedPane2Style.height = pane2H;
|
|
5207
|
+
computedPane1Style.bottom = pane2H + splitterSize;
|
|
5179
5208
|
Object.assign(computedSplitterStyle, {
|
|
5180
5209
|
left: 0,
|
|
5181
5210
|
right: 0,
|
|
5182
|
-
bottom:
|
|
5211
|
+
bottom: pane2H,
|
|
5183
5212
|
height: splitterSize
|
|
5184
5213
|
});
|
|
5185
5214
|
} else {
|
|
@@ -5199,18 +5228,23 @@ var SplitPane = forwardRef(function SplitPane2({
|
|
|
5199
5228
|
height: "100%",
|
|
5200
5229
|
overflow: "hidden",
|
|
5201
5230
|
...style || {}
|
|
5202
|
-
} }, createComponent("div", { "style": computedPane1Style }, firstChild), createComponent("div", { "style": computedPane2Style }, secondChild), createComponent(DragHandle, { "onStart": handleStart, "onDelta": handleDelta, "onEnd": handleEnd, "style": computedSplitterStyle, "className": "splitter" }, splitterChild));
|
|
5231
|
+
} }, createComponent("div", { "style": computedPane1Style }, firstChild), createComponent("div", { "style": computedPane2Style }, secondChild), createComponent(DragHandle, { "key": internalMode, "onStart": handleStart, "onDelta": handleDelta, "onEnd": handleEnd, "style": computedSplitterStyle, "className": "splitter" }, splitterChild));
|
|
5203
5232
|
});
|
|
5233
|
+
var EPS = 1e-6;
|
|
5204
5234
|
var clamp = function(v, min, max, size, splitterSize) {
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5235
|
+
let _min = min;
|
|
5236
|
+
let _max = max;
|
|
5237
|
+
if (typeof _min === "function") {
|
|
5238
|
+
if (size > 0) _min = _min(size, splitterSize);
|
|
5239
|
+
else _min = 0;
|
|
5240
|
+
}
|
|
5241
|
+
if (typeof _max === "function") {
|
|
5242
|
+
if (size > 0) _max = _max(size, splitterSize);
|
|
5243
|
+
else _max = 1;
|
|
5244
|
+
}
|
|
5245
|
+
_min = Math.max(0, Math.min(_min, 1));
|
|
5246
|
+
_max = Math.max(0, Math.min(_max, 1));
|
|
5247
|
+
return Math.max(_min, Math.min(_max, v));
|
|
5214
5248
|
};
|
|
5215
5249
|
|
|
5216
5250
|
// .tmp/src/vlq.js
|