lilact 0.29.0 → 0.29.2
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 +110 -82
- package/dist/lilact.development.js.map +3 -3
- package/dist/lilact.development.min.js +17 -17
- package/dist/lilact.development.min.js.map +3 -3
- package/dist/lilact.production.min.js +17 -17
- package/docs/classes/accessories.ErrorBoundary.html +8 -8
- package/docs/classes/accessories.Suspense.html +7 -7
- package/docs/classes/components.Component.html +11 -11
- package/docs/classes/components.HTMLComponent.html +11 -11
- package/docs/classes/components.RootComponent.html +11 -11
- package/docs/functions/components.cloneComponent.html +1 -1
- package/docs/functions/components.createComponent.html +1 -1
- package/docs/functions/components.createPortal.html +1 -1
- package/docs/functions/components.createRoot.html +1 -1
- package/docs/functions/components.memo.html +1 -1
- package/docs/functions/components.render.html +1 -1
- package/docs/functions/run.lazy.html +1 -1
- package/docs/functions/run.require.html +1 -1
- package/docs/functions/run.run.html +1 -1
- package/docs/functions/run.runScripts.html +1 -1
- package/docs/static/index.html +1 -1
- package/docs/static/lilact.development.js +110 -82
- package/docs/static/lilact.development.js.map +3 -3
- package/docs/static/lilact.development.min.js +17 -17
- package/docs/static/lilact.development.min.js.map +3 -3
- package/docs/static/lilact.production.min.js +17 -17
- package/docs/variables/components.cloneElement.html +1 -1
- package/examples/index.html +1 -1
- package/examples/lilact.development.js +110 -82
- package/examples/lilact.development.js.map +3 -3
- package/examples/lilact.development.min.js +17 -17
- package/examples/lilact.development.min.js.map +3 -3
- package/examples/lilact.production.min.js +17 -17
- package/package.json +1 -1
- package/src/components.jsx +19 -7
- package/src/lilact.jsx +1 -1
- package/src/run.jsx +146 -119
|
@@ -1 +1 @@
|
|
|
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> <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> <span class="tsd-kind-parameter">__namedParameters</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{}</span><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-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></li><li><span><span class="tsd-kind-parameter">path</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ...</span></span></li><li><span><span class="tsd-kind-parameter">__namedParameters</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><aside class="tsd-sources"><ul><li>Defined in run.jsx:
|
|
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> <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> <span class="tsd-kind-parameter">__namedParameters</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{}</span><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-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></li><li><span><span class="tsd-kind-parameter">path</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ...</span></span></li><li><span><span class="tsd-kind-parameter">__namedParameters</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><aside class="tsd-sources"><ul><li>Defined in run.jsx:295</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 +1 @@
|
|
|
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>runScripts | 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">runScripts</a></li></ul><h1>Function runScripts</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="runscripts"><span class="tsd-kind-call-signature">runScripts</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#runscripts" 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"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><ul><li>Defined in run.jsx:
|
|
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>runScripts | 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">runScripts</a></li></ul><h1>Function runScripts</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="runscripts"><span class="tsd-kind-call-signature">runScripts</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#runscripts" 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"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><ul><li>Defined in run.jsx:507</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>
|
package/docs/static/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
|
|
7
7
|
<title>Lilact Examples</title>
|
|
8
|
-
<script src='./lilact.development.
|
|
8
|
+
<script src='./lilact.development.js' type="module"></script>
|
|
9
9
|
|
|
10
10
|
<script src="prismjs/prism.min.js"></script>
|
|
11
11
|
<script src="prismjs/prism-jsx.min.js"></script>
|
|
@@ -2781,6 +2781,11 @@ var ComponentCore = class {
|
|
|
2781
2781
|
}
|
|
2782
2782
|
};
|
|
2783
2783
|
var renderErrorHandler = (c, e) => {
|
|
2784
|
+
const value = e?.error instanceof Error ? e.error : e?.reason !== void 0 ? e.reason : e;
|
|
2785
|
+
const error2 = lilact_default.isThenable(e) ? e : lilact_default.traceError(
|
|
2786
|
+
value,
|
|
2787
|
+
e?.fileName || null
|
|
2788
|
+
);
|
|
2784
2789
|
const stack = [c];
|
|
2785
2790
|
while (c && !c.component?.componentDidCatch) {
|
|
2786
2791
|
c = c.parent;
|
|
@@ -2788,14 +2793,14 @@ var renderErrorHandler = (c, e) => {
|
|
|
2788
2793
|
}
|
|
2789
2794
|
if (c?.component?.componentDidCatch) {
|
|
2790
2795
|
if (c.entity?.getDerivedStateFromError) {
|
|
2791
|
-
c.component.setState(c.entity.getDerivedStateFromError.call(c,
|
|
2796
|
+
c.component.setState(c.entity.getDerivedStateFromError.call(c, error2));
|
|
2792
2797
|
}
|
|
2793
2798
|
}
|
|
2794
2799
|
let stack_log = Array.prototype.map.call(stack, (x) => `in ${typeof x.component.displayName === "function" ? x.component.displayName() : x.component.displayName}`).join("\n");
|
|
2795
|
-
|
|
2796
|
-
|
|
2800
|
+
error2.componentStack = stack;
|
|
2801
|
+
error2.componentStackLog = stack_log;
|
|
2797
2802
|
if (c?.component?.componentDidCatch) {
|
|
2798
|
-
c.component.componentDidCatch(
|
|
2803
|
+
c.component.componentDidCatch(error2, { componentStack: stack, componentStackLog: stack_log });
|
|
2799
2804
|
} else throw e;
|
|
2800
2805
|
};
|
|
2801
2806
|
function constructFunc(core, parent) {
|
|
@@ -3206,6 +3211,7 @@ var events_set = /* @__PURE__ */ new Set([
|
|
|
3206
3211
|
"onsearch",
|
|
3207
3212
|
"onselect",
|
|
3208
3213
|
"onsubmit",
|
|
3214
|
+
"oncancel",
|
|
3209
3215
|
"onkeydown",
|
|
3210
3216
|
"onkeypress",
|
|
3211
3217
|
"onkeyup",
|
|
@@ -3690,22 +3696,110 @@ function createModule(path2, {
|
|
|
3690
3696
|
required_scripts[path2] = module2;
|
|
3691
3697
|
return module2;
|
|
3692
3698
|
}
|
|
3699
|
+
function loadModule(path2, options = {}) {
|
|
3700
|
+
if (lilact_default.importObjectPaths?.[path2]) {
|
|
3701
|
+
return lilact_default.importObjectPaths[path2];
|
|
3702
|
+
}
|
|
3703
|
+
if (options.requirer?.path) {
|
|
3704
|
+
path2 = joinPaths(options.requirer.path, path2);
|
|
3705
|
+
}
|
|
3706
|
+
const loadAsync = Boolean(lilact_default[LAZY]) || Boolean(options.isLazy);
|
|
3707
|
+
const module2 = getOrCreateModule(path2, {});
|
|
3708
|
+
if (module2.loaded && !options.forceReload) {
|
|
3709
|
+
return module2.exports;
|
|
3710
|
+
}
|
|
3711
|
+
if (path2.startsWith("#")) {
|
|
3712
|
+
const element = document.getElementById(path2.slice(1));
|
|
3713
|
+
if (!element) {
|
|
3714
|
+
throw report(
|
|
3715
|
+
new Error(`Required element not found (${path2})`),
|
|
3716
|
+
path2
|
|
3717
|
+
);
|
|
3718
|
+
}
|
|
3719
|
+
return run(
|
|
3720
|
+
element.textContent || "",
|
|
3721
|
+
path2,
|
|
3722
|
+
{ forceReload: options.forceReload }
|
|
3723
|
+
);
|
|
3724
|
+
}
|
|
3725
|
+
if (loadAsync) {
|
|
3726
|
+
lilact_default[LAZY] = false;
|
|
3727
|
+
if (module2.request) {
|
|
3728
|
+
return module2.request;
|
|
3729
|
+
}
|
|
3730
|
+
return loadAsyncResource(path2, module2);
|
|
3731
|
+
}
|
|
3732
|
+
const resolved = lilact_default.resolver?.(path2);
|
|
3733
|
+
if (resolved != null) {
|
|
3734
|
+
if (path2.endsWith(".css")) {
|
|
3735
|
+
injectGlobal(String(resolved));
|
|
3736
|
+
module2.code = String(resolved);
|
|
3737
|
+
module2.loaded = true;
|
|
3738
|
+
return void 0;
|
|
3739
|
+
}
|
|
3740
|
+
return run(
|
|
3741
|
+
String(resolved),
|
|
3742
|
+
path2,
|
|
3743
|
+
{ forceReload: options.forceReload }
|
|
3744
|
+
);
|
|
3745
|
+
}
|
|
3746
|
+
const request = new XMLHttpRequest();
|
|
3747
|
+
try {
|
|
3748
|
+
request.open("GET", path2, false);
|
|
3749
|
+
request.send(null);
|
|
3750
|
+
} catch (value) {
|
|
3751
|
+
throw report(value, path2);
|
|
3752
|
+
}
|
|
3753
|
+
if (request.status >= 200 && request.status < 300) {
|
|
3754
|
+
if (path2.endsWith(".css")) {
|
|
3755
|
+
module2.code = request.responseText;
|
|
3756
|
+
injectGlobal(module2.code);
|
|
3757
|
+
module2.loaded = true;
|
|
3758
|
+
return void 0;
|
|
3759
|
+
}
|
|
3760
|
+
return run(
|
|
3761
|
+
request.responseText,
|
|
3762
|
+
path2,
|
|
3763
|
+
{ forceReload: true }
|
|
3764
|
+
);
|
|
3765
|
+
}
|
|
3766
|
+
throw report(
|
|
3767
|
+
new Error(
|
|
3768
|
+
`Unable to load ${path2}: HTTP ${request.status || 0}`
|
|
3769
|
+
),
|
|
3770
|
+
path2
|
|
3771
|
+
);
|
|
3772
|
+
}
|
|
3773
|
+
function require2(path2) {
|
|
3774
|
+
let options = {};
|
|
3775
|
+
if (arguments.length === 2 && arguments[1] && typeof arguments[1] === "object") {
|
|
3776
|
+
options = arguments[1];
|
|
3777
|
+
}
|
|
3778
|
+
return loadModule(path2, options);
|
|
3779
|
+
}
|
|
3693
3780
|
function makeImportsObject(mod) {
|
|
3694
|
-
mod.importsObject
|
|
3781
|
+
mod.importsObject = {};
|
|
3695
3782
|
for (const path2 in mod.meta.imports) {
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
}
|
|
3783
|
+
const imps = mod.meta.imports[path2];
|
|
3784
|
+
const exps = loadModule(path2, {
|
|
3785
|
+
requirer: mod
|
|
3786
|
+
});
|
|
3701
3787
|
for (const i2 in imps.named_imports) {
|
|
3702
3788
|
if (i2 === "") continue;
|
|
3703
|
-
const
|
|
3704
|
-
if (!
|
|
3705
|
-
|
|
3789
|
+
const exportedName = imps.named_imports[i2];
|
|
3790
|
+
if (!Object.prototype.hasOwnProperty.call(exps, exportedName)) {
|
|
3791
|
+
throw new Error(
|
|
3792
|
+
`Imported module does not export any "${i2}".`
|
|
3793
|
+
);
|
|
3794
|
+
}
|
|
3795
|
+
mod.importsObject[i2] = exps[exportedName];
|
|
3706
3796
|
}
|
|
3707
3797
|
for (const i2 of imps.import_defaults) {
|
|
3708
|
-
if (!
|
|
3798
|
+
if (!Object.prototype.hasOwnProperty.call(exps, "default")) {
|
|
3799
|
+
throw new Error(
|
|
3800
|
+
`Imported module does not export a default.`
|
|
3801
|
+
);
|
|
3802
|
+
}
|
|
3709
3803
|
mod.importsObject[i2] = exps.default;
|
|
3710
3804
|
}
|
|
3711
3805
|
for (const i2 of imps.import_stars) {
|
|
@@ -3758,7 +3852,7 @@ function run(jsx, path = `InlineJSX-${++lilact_default.eval_num}`, {} = {}) {
|
|
|
3758
3852
|
globalThis.Lilact = lilact_default;
|
|
3759
3853
|
globalThis.createComponent = lilact_default.createComponent;
|
|
3760
3854
|
globalThis.Fragment = lilact_default.Fragment;
|
|
3761
|
-
|
|
3855
|
+
makeImportsObject(module);
|
|
3762
3856
|
lilact_default.scriptImportsObject = module.importsObject;
|
|
3763
3857
|
const result = eval(processed);
|
|
3764
3858
|
module.loaded = true;
|
|
@@ -3819,72 +3913,6 @@ function loadAsyncResource(path2, module2) {
|
|
|
3819
3913
|
module2.request = request;
|
|
3820
3914
|
return request;
|
|
3821
3915
|
}
|
|
3822
|
-
function require2(path2) {
|
|
3823
|
-
let options = {};
|
|
3824
|
-
if (arguments.length === 2 && arguments[1] && typeof arguments[1] === "object") {
|
|
3825
|
-
options = arguments[1];
|
|
3826
|
-
}
|
|
3827
|
-
if (lilact_default.importObjectPaths?.[path2]) {
|
|
3828
|
-
return lilact_default.importObjectPaths[path2];
|
|
3829
|
-
}
|
|
3830
|
-
if (options?.requirer?.path) {
|
|
3831
|
-
path2 = joinPaths(options.requirer.path, path2);
|
|
3832
|
-
}
|
|
3833
|
-
const loadAsync = Boolean(lilact_default[LAZY]) || Boolean(options.isLazy);
|
|
3834
|
-
const module2 = getOrCreateModule(path2, {});
|
|
3835
|
-
if (module2.loaded && !options.forceReload) {
|
|
3836
|
-
return module2.exports;
|
|
3837
|
-
}
|
|
3838
|
-
if (path2.startsWith("#")) {
|
|
3839
|
-
const element = document.getElementById(path2.slice(1));
|
|
3840
|
-
if (!element) {
|
|
3841
|
-
throw report(
|
|
3842
|
-
new Error(`Required element not found (${path2})`),
|
|
3843
|
-
path2
|
|
3844
|
-
);
|
|
3845
|
-
}
|
|
3846
|
-
return run(element.textContent || "", path2, { forceReload: options.forceReload });
|
|
3847
|
-
}
|
|
3848
|
-
if (loadAsync) {
|
|
3849
|
-
lilact_default[LAZY] = false;
|
|
3850
|
-
if (module2.request) {
|
|
3851
|
-
return module2.request;
|
|
3852
|
-
}
|
|
3853
|
-
return loadAsyncResource(path2, module2);
|
|
3854
|
-
}
|
|
3855
|
-
const resolved = lilact_default.resolver?.(path2);
|
|
3856
|
-
if (resolved != null) {
|
|
3857
|
-
if (path2.endsWith(".css")) {
|
|
3858
|
-
injectGlobal(String(resolved));
|
|
3859
|
-
module2.code = String(resolved);
|
|
3860
|
-
module2.loaded = true;
|
|
3861
|
-
return void 0;
|
|
3862
|
-
}
|
|
3863
|
-
return run(String(resolved), path2, { forceReload: options.forceReload });
|
|
3864
|
-
}
|
|
3865
|
-
const request = new XMLHttpRequest();
|
|
3866
|
-
try {
|
|
3867
|
-
request.open("GET", path2, false);
|
|
3868
|
-
request.send(null);
|
|
3869
|
-
} catch (value) {
|
|
3870
|
-
throw report(value, path2);
|
|
3871
|
-
}
|
|
3872
|
-
if (request.status >= 200 && request.status < 300) {
|
|
3873
|
-
if (path2.endsWith(".css")) {
|
|
3874
|
-
module2.code = request.responseText;
|
|
3875
|
-
injectGlobal(module2.code);
|
|
3876
|
-
module2.loaded = true;
|
|
3877
|
-
return void 0;
|
|
3878
|
-
}
|
|
3879
|
-
return run(request.responseText, path2, { forceReload: options.forceReload });
|
|
3880
|
-
}
|
|
3881
|
-
throw report(
|
|
3882
|
-
new Error(
|
|
3883
|
-
`Unable to load ${path2}: HTTP ${request.status || 0}`
|
|
3884
|
-
),
|
|
3885
|
-
path2
|
|
3886
|
-
);
|
|
3887
|
-
}
|
|
3888
3916
|
function lazy(factory) {
|
|
3889
3917
|
let status = "pending";
|
|
3890
3918
|
let result2;
|
|
@@ -6957,7 +6985,7 @@ function transpileJSX(jsx2, {
|
|
|
6957
6985
|
|
|
6958
6986
|
// .tmp/src/lilact.jsx
|
|
6959
6987
|
var Lilact2 = {
|
|
6960
|
-
VERSION: "RC.
|
|
6988
|
+
VERSION: "RC.5",
|
|
6961
6989
|
// Configuration
|
|
6962
6990
|
defaultTransitionTimeout: 300,
|
|
6963
6991
|
defaultIsEqual: Object.is,
|