lilact 0.31.6 → 0.31.8

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.
Files changed (54) hide show
  1. package/dist/lilact.development.js +61 -22
  2. package/dist/lilact.development.js.map +3 -3
  3. package/dist/lilact.development.min.js +26 -26
  4. package/dist/lilact.development.min.js.map +3 -3
  5. package/dist/lilact.production.min.js +26 -26
  6. package/docs/assets/navigation.js +1 -1
  7. package/docs/assets/search.js +1 -1
  8. package/docs/classes/accessories.ErrorBoundary.html +8 -8
  9. package/docs/classes/accessories.Suspense.html +7 -7
  10. package/docs/classes/components.Component.html +11 -11
  11. package/docs/classes/components.HTMLComponent.html +11 -11
  12. package/docs/classes/components.RootComponent.html +11 -11
  13. package/docs/functions/components.cloneComponent.html +1 -1
  14. package/docs/functions/components.createComponent.html +1 -1
  15. package/docs/functions/components.createPortal.html +1 -1
  16. package/docs/functions/components.createRoot.html +1 -1
  17. package/docs/functions/components.memo.html +1 -1
  18. package/docs/functions/components.render.html +1 -1
  19. package/docs/functions/components.replaceAllComponentInstances.html +1 -1
  20. package/docs/functions/components.replaceComponentEntity.html +1 -1
  21. package/docs/functions/hooks.startTransition.html +1 -1
  22. package/docs/functions/hooks.useCallback.html +2 -2
  23. package/docs/functions/hooks.useDebugValue.html +1 -1
  24. package/docs/functions/hooks.useDeferredValue.html +1 -1
  25. package/docs/functions/hooks.useEffect.html +1 -1
  26. package/docs/functions/hooks.useImperativeHandle.html +2 -2
  27. package/docs/functions/hooks.useInsertionEffect.html +1 -1
  28. package/docs/functions/hooks.useLayoutEffect.html +1 -1
  29. package/docs/functions/hooks.useMemo.html +1 -1
  30. package/docs/functions/hooks.useReducer.html +1 -1
  31. package/docs/functions/run.lazy.html +10 -1
  32. package/docs/functions/run.require.html +7 -1
  33. package/docs/functions/run.run.html +14 -1
  34. package/docs/functions/run.runScripts.html +8 -1
  35. package/docs/modules/run.html +1 -1
  36. package/docs/static/demos/error-callback.jsx +7 -9
  37. package/docs/static/lilact.development.js +61 -22
  38. package/docs/static/lilact.development.js.map +3 -3
  39. package/docs/static/lilact.development.min.js +26 -26
  40. package/docs/static/lilact.development.min.js.map +3 -3
  41. package/docs/static/lilact.production.min.js +26 -26
  42. package/docs/variables/components.cloneElement.html +1 -1
  43. package/examples/demos/error-callback.jsx +7 -9
  44. package/examples/lilact.development.js +61 -22
  45. package/examples/lilact.development.js.map +3 -3
  46. package/examples/lilact.development.min.js +26 -26
  47. package/examples/lilact.development.min.js.map +3 -3
  48. package/examples/lilact.production.min.js +26 -26
  49. package/package.json +1 -1
  50. package/src/components.jsx +83 -27
  51. package/src/hooks.jsx +7 -8
  52. package/src/run.jsx +62 -6
  53. package/src/symbols.jsx +2 -0
  54. package/docs/variables/run.required_scripts.html +0 -1
@@ -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="" aria-current="page">run</a></li></ul><h1>Module run</h1></div><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Variables"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Variables</h2></summary><dl class="tsd-member-summaries"><dt class="tsd-member-summary" id="required_scripts"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Variable"><use href="../assets/icons.svg#icon-32"></use></svg><a href="../variables/run.required_scripts.html">required_scripts</a><a href="#required_scripts" 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></span></dt><dd class="tsd-member-summary"></dd></dl></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Functions"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Functions</h2></summary><dl class="tsd-member-summaries"><dt class="tsd-member-summary" id="lazy"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><a href="../functions/run.lazy.html">lazy</a><a href="#lazy" 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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="require"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><a href="../functions/run.require.html">require</a><a href="#require" 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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="run"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><a href="../functions/run.run.html">run</a><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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="runscripts"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><a href="../functions/run.runScripts.html">runScripts</a><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></span></dt><dd class="tsd-member-summary"></dd></dl></details></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><details open class="tsd-accordion tsd-page-navigation"><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>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Variables"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Variables</summary><div><a href="#required_scripts"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Variable"><use href="../assets/icons.svg#icon-32"></use></svg><span>required_<wbr/>scripts</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Functions"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Functions</summary><div><a href="#lazy"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><span>lazy</span></a><a href="#require"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><span>require</span></a><a href="#run"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><span>run</span></a><a href="#runscripts"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><span>run<wbr/>Scripts</span></a></div></details></div></details></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
+ <!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="" aria-current="page">run</a></li></ul><h1>Module run</h1></div><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Functions"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Functions</h2></summary><dl class="tsd-member-summaries"><dt class="tsd-member-summary" id="lazy"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><a href="../functions/run.lazy.html">lazy</a><a href="#lazy" 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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="require"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><a href="../functions/run.require.html">require</a><a href="#require" 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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="run"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><a href="../functions/run.run.html">run</a><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></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="runscripts"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><a href="../functions/run.runScripts.html">runScripts</a><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></span></dt><dd class="tsd-member-summary"></dd></dl></details></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><details open class="tsd-accordion tsd-page-navigation"><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>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Functions"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Functions</summary><div><a href="#lazy"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><span>lazy</span></a><a href="#require"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><span>require</span></a><a href="#run"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><span>run</span></a><a href="#runscripts"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="../assets/icons.svg#icon-64"></use></svg><span>run<wbr/>Scripts</span></a></div></details></div></details></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>
@@ -5,7 +5,7 @@ export default function() {
5
5
  Press to get Error! (With Curly Brackets)
6
6
  </button>
7
7
  <br/><br/>
8
- <button onClick={()=>doUnknown()}>
8
+ <button onClick={ () => doUnknown () }>
9
9
  Press to get Error! (Without Curly Brackets)
10
10
  </button>
11
11
 
@@ -16,14 +16,12 @@ export default function() {
16
16
  JS runtimes currently lack a consistent reporting mechanism for errors produced in eval,
17
17
  and as Lilact runs the transpiled JSX in eval, tracing errors has its own difficulties.
18
18
  <br/><br/>
19
- At the moment things work pretty nice and errors are tracked to the JSX scripts in
20
- {" "}<b>Firefox</b>{" "}and{" "}<b>Chrome</b>{" "}, but{" "}<b>Safari</b>{" "}
21
- has problems sometimes, as it drops the eval frame data on async or deferred calls.
22
- <br/><br/>
23
- Lilact has a tracking mechanism to overcome this, but for the sake of efficiency,
24
- it is block-based and only locates the code that is in {" {} "} blocks. As a result, the callbacks
25
- should be wrapped in a {" {} "} to be tracable in Safari. If not, it works,
26
- but it is not possible to display the exact location of some errors in Safari.</p>
19
+ Lilact has a tracing mechanism to overcome this, but for the sake of efficiency,
20
+ it is block-based and only locates the code that is in {" {} "} blocks. As a result, the
21
+ arrow callbacks should be wrapped in a {" {} "} (and return result if any) or be defined
22
+ somewhere else in the code (like useCallback) and only referenced from XML to be traceable
23
+ in all situations. If not, it works, but it is not possible to display the exact location
24
+ of some errors.</p>
27
25
  </center>
28
26
 
29
27
  }
@@ -1709,6 +1709,7 @@ __export(symbols_exports, {
1709
1709
  CALLBACK: () => CALLBACK,
1710
1710
  CHILD_CLASS_ADDENDUM: () => CHILD_CLASS_ADDENDUM,
1711
1711
  CLEARED: () => CLEARED,
1712
+ CLONED_STYLE: () => CLONED_STYLE,
1712
1713
  COMPONENT: () => COMPONENT,
1713
1714
  CORE: () => CORE,
1714
1715
  DUE: () => DUE,
@@ -1731,6 +1732,7 @@ var [
1731
1732
  CHILD_CLASS_ADDENDUM,
1732
1733
  MEMOIZED,
1733
1734
  LAZY,
1735
+ CLONED_STYLE,
1734
1736
  DUE,
1735
1737
  REPEAT,
1736
1738
  CLEARED,
@@ -1747,6 +1749,7 @@ var [
1747
1749
  /* @__PURE__ */ Symbol.for("LILACT:CHILD_CLASS_ADDENDUM"),
1748
1750
  /* @__PURE__ */ Symbol.for("LILACT:MEMOIZED"),
1749
1751
  /* @__PURE__ */ Symbol.for("LILACT:LAZY"),
1752
+ /* @__PURE__ */ Symbol.for("LILACT:CLONED_STYLE"),
1750
1753
  /* @__PURE__ */ Symbol.for("LILACT:TIMERS:DUE"),
1751
1754
  /* @__PURE__ */ Symbol.for("LILACT:TIMERS:REPEAT"),
1752
1755
  /* @__PURE__ */ Symbol.for("LILACT:TIMERS:CLEARED"),
@@ -2379,6 +2382,21 @@ function getComponentEntity(entity) {
2379
2382
  return entity?.[MEMOIZED] ? entity.component : entity;
2380
2383
  }
2381
2384
  var hotEntityAliases = /* @__PURE__ */ new Map();
2385
+ var hotEntityCacheTokens = /* @__PURE__ */ new WeakMap();
2386
+ function getHotEntityCacheToken(entity) {
2387
+ entity = getComponentEntity(entity);
2388
+ if (typeof entity !== "function") {
2389
+ return entity;
2390
+ }
2391
+ let token2 = hotEntityCacheTokens.get(entity);
2392
+ if (!token2) {
2393
+ const resolved = resolveHotEntity(entity);
2394
+ token2 = hotEntityCacheTokens.get(resolved) || {};
2395
+ hotEntityCacheTokens.set(entity, token2);
2396
+ hotEntityCacheTokens.set(resolved, token2);
2397
+ }
2398
+ return token2;
2399
+ }
2382
2400
  function resolveHotEntity(entity) {
2383
2401
  entity = getComponentEntity(entity);
2384
2402
  const visited = /* @__PURE__ */ new Set();
@@ -2434,6 +2452,9 @@ function replaceComponentEntity(componentCore, nextEntity) {
2434
2452
  }
2435
2453
  const oldEntity = getComponentEntity(componentCore.entity);
2436
2454
  const newEntity = resolveHotEntity(nextEntity);
2455
+ const cacheToken = hotEntityCacheTokens.get(oldEntity) || hotEntityCacheTokens.get(newEntity) || {};
2456
+ hotEntityCacheTokens.set(oldEntity, cacheToken);
2457
+ hotEntityCacheTokens.set(newEntity, cacheToken);
2437
2458
  if (oldEntity === newEntity) {
2438
2459
  return true;
2439
2460
  }
@@ -2463,6 +2484,9 @@ function replaceAllComponentInstances(oldEntity, newEntity) {
2463
2484
  if (oldEntity === newEntity) {
2464
2485
  return 0;
2465
2486
  }
2487
+ const cacheToken = hotEntityCacheTokens.get(oldEntity) || hotEntityCacheTokens.get(newEntity) || {};
2488
+ hotEntityCacheTokens.set(oldEntity, cacheToken);
2489
+ hotEntityCacheTokens.set(newEntity, cacheToken);
2466
2490
  hotEntityAliases.set(oldEntity, newEntity);
2467
2491
  const instances = componentInstances.get(oldEntity);
2468
2492
  if (!instances) {
@@ -2522,7 +2546,7 @@ var ComponentCache = class {
2522
2546
  if (ex.cleanup) {
2523
2547
  ex.cleanup();
2524
2548
  } else if (ex.element && !ex.portal) {
2525
- ex.element.parentElement.removeChild(ex.element);
2549
+ ex.element.parentElement?.removeChild?.(ex.element);
2526
2550
  }
2527
2551
  });
2528
2552
  });
@@ -2576,14 +2600,21 @@ var ComponentCore = class {
2576
2600
  if (do_rerender) {
2577
2601
  if (true) {
2578
2602
  if (this.entity?.propTypes) {
2579
- PropTypes.checkPropTypes(this.entity.propTypes, this.props, "prop", this.entity.name);
2603
+ PropTypes.checkPropTypes(this.entity.propTypes, next_props, "prop", this.entity.name);
2580
2604
  } else if (this.component?.propTypes) {
2581
- PropTypes.checkPropTypes(this.component.propTypes, this.props, "prop", this.component.name);
2605
+ PropTypes.checkPropTypes(this.component.propTypes, next_props, "prop", this.component.name);
2582
2606
  }
2583
2607
  }
2584
2608
  if (typeof next_state === "function") next_state = next_state(this.state);
2585
- if (this.component.constructor.defaultProps) {
2586
- next_props = { ...this.component.constructor.defaultProps, ...next_props };
2609
+ const defaultProps = this.entity?.defaultProps || this.component?.constructor?.defaultProps;
2610
+ if (defaultProps) {
2611
+ next_props = {
2612
+ ...defaultProps,
2613
+ ...next_props || {}
2614
+ };
2615
+ }
2616
+ if (next_props?.style && typeof next_props.style === "object" && !next_props.style[CLONED_STYLE]) {
2617
+ next_props.style = { ...next_props.style, [CLONED_STYLE]: true };
2587
2618
  }
2588
2619
  if (this?.parent?.component?.context || this?.parent?.component?.getChildContext) {
2589
2620
  this.context = { ...this.parent.component.context, ...this.parent.component.getChildContext?.() };
@@ -2692,7 +2723,7 @@ var ComponentCore = class {
2692
2723
  if (typeof this.props.ref === "function") {
2693
2724
  this.props.ref(null);
2694
2725
  } else {
2695
- this.props.current = null;
2726
+ this.props.ref.current = null;
2696
2727
  }
2697
2728
  }
2698
2729
  if (this.component.componentWillUnmount) {
@@ -2786,7 +2817,7 @@ var ComponentCore = class {
2786
2817
  this.element.style = "";
2787
2818
  } else {
2788
2819
  for (let p in this.props.style) {
2789
- if (!patch.style.hasOwnProperty(p)) {
2820
+ if (p !== CLONED_STYLE && !patch.style.hasOwnProperty(p)) {
2790
2821
  this.element.style[p] = "";
2791
2822
  }
2792
2823
  }
@@ -2808,7 +2839,7 @@ var ComponentCore = class {
2808
2839
  }
2809
2840
  } else if (a === "autoFocus") {
2810
2841
  this.element["autofocus"] = toBool(patch[a]);
2811
- } else if (a === "htmlFor") {
2842
+ } else if (a === "htmlFor" || a === "for") {
2812
2843
  this.element.setAttribute("for", patch[a]);
2813
2844
  } else if (al !== "value" || ["input", "textarea", "select"].indexOf(this.entity) === -1) {
2814
2845
  this.element.setAttribute(al, patch[a]);
@@ -2997,11 +3028,22 @@ function prepareCore(parent, core) {
2997
3028
  try {
2998
3029
  parent.cache ?? (parent.cache = new ComponentCache(parent));
2999
3030
  const isText = core[TEXT2] !== void 0;
3000
- const key = isText ? ":text:" : core.props?.key;
3001
- const entity = isText || core instanceof ComponentCore ? void 0 : core.entity;
3031
+ const isExistingCore = core instanceof ComponentCore;
3032
+ const entity = isText || isExistingCore ? void 0 : resolveHotEntity(core.entity);
3033
+ const hasExplicitKey = !isText && core.props && core.props.key !== void 0 && core.props.key !== null;
3034
+ let key;
3035
+ if (isText) {
3036
+ key = ":text:";
3037
+ } else if (hasExplicitKey) {
3038
+ key = core.props.key;
3039
+ } else if (typeof entity === "function") {
3040
+ key = getHotEntityCacheToken(entity);
3041
+ } else {
3042
+ key = entity;
3043
+ }
3002
3044
  return parent.cache.pick(
3003
3045
  key,
3004
- () => isText || core instanceof ComponentCore ? core : constructFunc(core, parent)[CORE],
3046
+ () => isText || isExistingCore ? core : constructFunc(core, parent)[CORE],
3005
3047
  entity
3006
3048
  );
3007
3049
  } catch (e) {
@@ -3509,7 +3551,7 @@ function useState(initialValue) {
3509
3551
  }
3510
3552
  return [hk.value, hk.set_func];
3511
3553
  }
3512
- function useCallback(callback, deps = void 0) {
3554
+ function useCallback(callback, deps) {
3513
3555
  if (deps !== void 0 && !Array.isArray(deps) && deps !== null && typeof deps !== "object") {
3514
3556
  throw new Error("Callback dependencies must be an array, object or omitted.");
3515
3557
  }
@@ -3601,7 +3643,7 @@ function useRef(initialValue = null) {
3601
3643
  }
3602
3644
  return hk;
3603
3645
  }
3604
- async function useLayoutEffect(effect, deps = void 0) {
3646
+ async function useLayoutEffect(effect, deps) {
3605
3647
  if (deps !== void 0 && !Array.isArray(deps) && deps !== null && typeof deps !== "object") {
3606
3648
  throw new Error("Layout effect dependencies must be an array, object or omitted.");
3607
3649
  }
@@ -3620,7 +3662,7 @@ async function useLayoutEffect(effect, deps = void 0) {
3620
3662
  NATIVE_TIMERS.clearTimeout(lilact_default.effect_timeout);
3621
3663
  lilact_default.effect_timeout = NATIVE_TIMERS.setTimeout(lilact_default.processEffects, 0);
3622
3664
  }
3623
- async function useEffect(effect, deps = void 0) {
3665
+ async function useEffect(effect, deps) {
3624
3666
  if (deps !== void 0 && !Array.isArray(deps) && deps !== null && typeof deps !== "object") {
3625
3667
  throw new Error("Effect dependencies must be an array, object or omitted.");
3626
3668
  }
@@ -3639,7 +3681,7 @@ async function useEffect(effect, deps = void 0) {
3639
3681
  NATIVE_TIMERS.clearTimeout(lilact_default.effect_timeout);
3640
3682
  lilact_default.effect_timeout = NATIVE_TIMERS.setTimeout(lilact_default.processEffects, 0);
3641
3683
  }
3642
- async function useInsertionEffect(effect, deps = void 0) {
3684
+ async function useInsertionEffect(effect, deps) {
3643
3685
  if (deps !== void 0 && !Array.isArray(deps) && deps !== null && typeof deps !== "object") {
3644
3686
  throw new Error("Insertion effect dependencies must be an array, object, or omitted.");
3645
3687
  }
@@ -3658,7 +3700,7 @@ async function useInsertionEffect(effect, deps = void 0) {
3658
3700
  NATIVE_TIMERS.clearTimeout(lilact_default.effect_timeout);
3659
3701
  lilact_default.effect_timeout = NATIVE_TIMERS.setTimeout(lilact_default.processEffects, 0);
3660
3702
  }
3661
- function useMemo(factory, deps = void 0) {
3703
+ function useMemo(factory, deps) {
3662
3704
  if (deps !== void 0 && !Array.isArray(deps) && deps !== null && typeof deps !== "object") {
3663
3705
  throw new Error("Memo dependencies must be an array or omitted.");
3664
3706
  }
@@ -3683,8 +3725,7 @@ function useActionState(action, initialState) {
3683
3725
  async () => {
3684
3726
  const form_data = new FormData(event.target, event.submitter);
3685
3727
  hk.state = await action(hk.state, form_data);
3686
- },
3687
- []
3728
+ }
3688
3729
  );
3689
3730
  return false;
3690
3731
  };
@@ -3736,7 +3777,7 @@ function useDeferredValue(value, initialValue) {
3736
3777
  }, [value]);
3737
3778
  return deferred;
3738
3779
  }
3739
- function useImperativeHandle(ref, factory, deps = void 0) {
3780
+ function useImperativeHandle(ref, factory, deps) {
3740
3781
  if (deps !== void 0 && ref?.deps !== void 0 && shallowEqual(deps, ref.deps)) return;
3741
3782
  ref.deps = deps;
3742
3783
  if (typeof ref?.current !== "object") {
@@ -3823,10 +3864,7 @@ function createModule(path2, {
3823
3864
  mappings: [],
3824
3865
  meta: {},
3825
3866
  exports: {},
3826
- // True only after the module has been successfully evaluated.
3827
3867
  loaded: false,
3828
- // The promise for the request currently loading this resource.
3829
- // This is deliberately stored on the module to deduplicate requests.
3830
3868
  request: void 0,
3831
3869
  error: void 0
3832
3870
  };
@@ -7188,6 +7226,7 @@ export {
7188
7226
  CALLBACK,
7189
7227
  CHILD_CLASS_ADDENDUM,
7190
7228
  CLEARED,
7229
+ CLONED_STYLE,
7191
7230
  COMPONENT,
7192
7231
  CORE,
7193
7232
  CSSTransition,