lilact 0.24.1 → 0.26.0
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/README.md +1 -1
- package/dist/lilact.development.js +145 -61
- package/dist/lilact.development.js.map +3 -3
- package/dist/lilact.development.min.js +28 -28
- package/dist/lilact.development.min.js.map +3 -3
- package/dist/lilact.production.min.js +28 -28
- 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/timers.timeoutPromise.html +7 -2
- package/docs/index.html +1 -7
- package/docs/static/demos/usedefered.jsx +1 -1
- package/docs/static/lilact.development.js +145 -61
- package/docs/static/lilact.development.js.map +3 -3
- package/docs/static/lilact.development.min.js +28 -28
- package/docs/static/lilact.development.min.js.map +3 -3
- package/docs/static/lilact.production.min.js +28 -28
- package/docs/variables/accessories.SplitPane.html +8 -3
- package/docs/variables/components.cloneElement.html +1 -1
- package/examples/demos/usedefered.jsx +1 -1
- package/examples/lilact.development.js +145 -61
- package/examples/lilact.development.js.map +3 -3
- package/examples/lilact.development.min.js +28 -28
- package/examples/lilact.development.min.js.map +3 -3
- package/examples/lilact.production.min.js +28 -28
- package/package.json +1 -1
- package/src/accessories.jsx +158 -89
- package/src/components.jsx +11 -4
- package/src/jsx.js +1 -1
- package/src/lilact.jsx +1 -1
|
@@ -32,17 +32,22 @@
|
|
|
32
32
|
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-position">Param: position<a href="#param-position" 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></h4><p>Controlled splitter position. Normalized value within <code>[min, max]</code>.
|
|
33
33
|
If provided, the component uses this value instead of internal state.</p>
|
|
34
34
|
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-defaultposition">Param: defaultPosition<a href="#param-defaultposition" 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></h4><p>Initial splitter position for uncontrolled usage. Defaults to <code>0.5</code>.</p>
|
|
35
|
-
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-min">Param: min<a href="#param-min" 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></h4><p>Minimum allowed position. Defaults to <code>0.1</code
|
|
36
|
-
|
|
35
|
+
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-min">Param: min<a href="#param-min" 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></h4><p>Minimum allowed position. Defaults to <code>0.1</code>.
|
|
36
|
+
Can also be a function that will be called with (containerWidth|containerHeight,splitterSize) as arguments</p>
|
|
37
|
+
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-max">Param: max<a href="#param-max" 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></h4><p>Maximum allowed position. Defaults to <code>0.9</code>.
|
|
38
|
+
Can also be a function that will be called with (containerWidth|containerHeight,splitterSize) as arguments</p>
|
|
37
39
|
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-splittersize">Param: splitterSize<a href="#param-splittersize" 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></h4><p>Thickness of the draggable splitter in pixels. Defaults to <code>8</code>.</p>
|
|
40
|
+
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-resizemode">Param: resizeMode<a href="#param-resizemode" 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></h4><p>The behavior on container resize. Its value can be <code>proportional</code>, <code>fixFirst</code> or <code>fixSecond</code>.
|
|
41
|
+
Default is <code>proportional</code>.</p>
|
|
38
42
|
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-onsizechange">Param: onSizeChange<a href="#param-onsizechange" 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></h4><p>Callback invoked when the position changes. Receives the new normalized position.</p>
|
|
39
43
|
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-style">Param: style<a href="#param-style" 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></h4><p>Optional root container styles.</p>
|
|
40
44
|
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-classname">Param: className<a href="#param-classname" 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></h4><p>Optional root container CSS class.</p>
|
|
41
45
|
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-leftpanestyle">Param: leftPaneStyle<a href="#param-leftpanestyle" 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></h4><p>Optional styles applied to the left pane (or top pane in vertical mode).</p>
|
|
42
46
|
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-rightpanestyle">Param: rightPaneStyle<a href="#param-rightpanestyle" 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></h4><p>Optional styles applied to the right pane (or bottom pane in vertical mode).</p>
|
|
43
47
|
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-splitterstyle">Param: splitterStyle<a href="#param-splitterstyle" 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></h4><p>Optional styles applied to the splitter element.</p>
|
|
48
|
+
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-splitterchild">Param: splitterChild<a href="#param-splitterchild" 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></h4><p>Child to be rendered into the splitter itself.</p>
|
|
44
49
|
</div><div class="tsd-tag-param"><h4 class="tsd-anchor-link" id="param-children">Param: children<a href="#param-children" 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></h4><p>Children to be rendered into the two pane containers.</p>
|
|
45
50
|
</div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" 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></h4><pre><code class="tsx"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-7">ref</span><span class="hl-1"> = </span><span class="hl-0">useRef</span><span class="hl-1"><</span><span class="hl-8">SplitPaneHandle</span><span class="hl-1">>(</span><span class="hl-3">null</span><span class="hl-1">);</span><br/><br/><span class="hl-9"><</span><span class="hl-8">SplitPane</span><br/><span class="hl-1"> </span><span class="hl-12">ref</span><span class="hl-1">=</span><span class="hl-3">{</span><span class="hl-5">ref</span><span class="hl-3">}</span><br/><span class="hl-1"> </span><span class="hl-12">mode</span><span class="hl-1">=</span><span class="hl-2">"horizontal"</span><br/><span class="hl-1"> </span><span class="hl-12">defaultPosition</span><span class="hl-1">=</span><span class="hl-3">{</span><span class="hl-14">0.5</span><span class="hl-3">}</span><br/><span class="hl-1"> </span><span class="hl-12">min</span><span class="hl-1">=</span><span class="hl-3">{</span><span class="hl-14">0.1</span><span class="hl-3">}</span><br/><span class="hl-1"> </span><span class="hl-12">max</span><span class="hl-1">=</span><span class="hl-3">{</span><span class="hl-14">0.9</span><span class="hl-3">}</span><br/><span class="hl-1"> </span><span class="hl-12">onSizeChange</span><span class="hl-1">=</span><span class="hl-3">{</span><span class="hl-11">(</span><span class="hl-5">pos</span><span class="hl-11">) </span><span class="hl-3">=></span><span class="hl-11"> </span><span class="hl-5">console</span><span class="hl-11">.</span><span class="hl-0">log</span><span class="hl-11">(</span><span class="hl-5">pos</span><span class="hl-11">)</span><span class="hl-3">}</span><br/><span class="hl-9">></span><br/><span class="hl-1"> </span><span class="hl-9"><</span><span class="hl-10">div</span><span class="hl-1"> </span><span class="hl-9">/></span><span class="hl-1"> </span><span class="hl-9"><</span><span class="hl-10">div</span><span class="hl-1"> </span><span class="hl-9">/></span><br/><span class="hl-9"></</span><span class="hl-8">SplitPane</span><span class="hl-9">></span>
|
|
46
51
|
</code><button type="button">Copy</button></pre>
|
|
47
52
|
|
|
48
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in accessories.jsx:
|
|
53
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in accessories.jsx:430</li></ul></aside></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>cloneElement | 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/components.html">components</a></li><li><a href="" aria-current="page">cloneElement</a></li></ul><h1>Variable cloneElement<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">cloneElement</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">component</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">propsPatch</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">children</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><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">entity</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">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><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = cloneComponent</span></div><div class="tsd-type-declaration"><h4>Type Declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature" id="__type"><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">component</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">propsPatch</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">children</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><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">entity</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">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><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">}</span></li><li 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">component</span>: <span class="tsd-signature-type">any</span></span></li><li><span><span class="tsd-kind-parameter">propsPatch</span>: <span class="tsd-signature-type">any</span></span></li><li><span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">children</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-symbol">{</span> <span class="tsd-kind-property">entity</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">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><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">}</span></h4></li></ul></li></ul></div><aside class="tsd-sources"><ul><li>Defined in components.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>cloneElement | 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/components.html">components</a></li><li><a href="" aria-current="page">cloneElement</a></li></ul><h1>Variable cloneElement<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">cloneElement</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">component</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">propsPatch</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">children</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><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">entity</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">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><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = cloneComponent</span></div><div class="tsd-type-declaration"><h4>Type Declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature" id="__type"><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">component</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">propsPatch</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">children</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><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">entity</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">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><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">}</span></li><li 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">component</span>: <span class="tsd-signature-type">any</span></span></li><li><span><span class="tsd-kind-parameter">propsPatch</span>: <span class="tsd-signature-type">any</span></span></li><li><span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">children</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-symbol">{</span> <span class="tsd-kind-property">entity</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">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><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">null</span> <span class="tsd-signature-symbol">}</span></h4></li></ul></li></ul></div><aside class="tsd-sources"><ul><li>Defined in components.jsx:1228</li></ul></aside></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,7 +1,7 @@
|
|
|
1
1
|
import { useState, useDeferredValue } from "lilact";
|
|
2
2
|
|
|
3
3
|
function ExpensiveList({ query }) {
|
|
4
|
-
const items = Array.from({ length:
|
|
4
|
+
const items = Array.from({ length: 2000 }, (_, i) => `${query} item ${i}`);
|
|
5
5
|
return (
|
|
6
6
|
<ul>
|
|
7
7
|
{items.map((it) => (
|
|
@@ -2408,6 +2408,8 @@ var ComponentCore = class {
|
|
|
2408
2408
|
insert_index
|
|
2409
2409
|
loader_args
|
|
2410
2410
|
|
|
2411
|
+
is_svg
|
|
2412
|
+
|
|
2411
2413
|
*/
|
|
2412
2414
|
__publicField(this, "component");
|
|
2413
2415
|
__publicField(this, "props");
|
|
@@ -2446,7 +2448,8 @@ var ComponentCore = class {
|
|
|
2446
2448
|
if (this.component.shouldComponentUpdate && !this.component.shouldComponentUpdate(next_state, next_props, this.context)) return;
|
|
2447
2449
|
if (typeof this.entity === "string") {
|
|
2448
2450
|
if (!(this.element instanceof Element)) {
|
|
2449
|
-
if (this.
|
|
2451
|
+
if (this.is_svg || this.container.is_svg) {
|
|
2452
|
+
this.is_svg = true;
|
|
2450
2453
|
this.element = document.createElementNS(SVG_NS, this.entity);
|
|
2451
2454
|
} else {
|
|
2452
2455
|
this.element = document.createElement(this.entity);
|
|
@@ -3028,6 +3031,9 @@ var HTMLComponent = class extends Component {
|
|
|
3028
3031
|
constructor(entity, props) {
|
|
3029
3032
|
super(props);
|
|
3030
3033
|
this[CORE].entity = entity;
|
|
3034
|
+
if (entity === "svg") {
|
|
3035
|
+
this[CORE].is_svg = true;
|
|
3036
|
+
}
|
|
3031
3037
|
}
|
|
3032
3038
|
render() {
|
|
3033
3039
|
return this[CORE].props.children;
|
|
@@ -3035,7 +3041,7 @@ var HTMLComponent = class extends Component {
|
|
|
3035
3041
|
};
|
|
3036
3042
|
var RootComponent = class extends HTMLComponent {
|
|
3037
3043
|
constructor(element, props) {
|
|
3038
|
-
super(":root", props);
|
|
3044
|
+
super(":root:", props);
|
|
3039
3045
|
__publicField(this, "displayName", "Root");
|
|
3040
3046
|
if (typeof this.element === "string") {
|
|
3041
3047
|
element = document.querySelector(element);
|
|
@@ -4964,26 +4970,55 @@ var SplitPane = forwardRef(function SplitPane2({
|
|
|
4964
4970
|
max = 0.9,
|
|
4965
4971
|
splitterSize = 8,
|
|
4966
4972
|
onSizeChange,
|
|
4973
|
+
resizeMode = "proportional",
|
|
4967
4974
|
style,
|
|
4968
4975
|
className,
|
|
4969
4976
|
firstPaneStyle,
|
|
4970
4977
|
secondPaneStyle,
|
|
4971
4978
|
splitterStyle,
|
|
4979
|
+
splitterChild,
|
|
4972
4980
|
children
|
|
4973
4981
|
}, ref) {
|
|
4982
|
+
const containerRef = useRef(null);
|
|
4983
|
+
const sizeRef = useRef({ w: 0, h: 0 });
|
|
4974
4984
|
const initialMode = mode === "vertical" ? "vertical" : "horizontal";
|
|
4975
4985
|
const [internalMode, setInternalMode] = useState(initialMode);
|
|
4976
|
-
const [internalPos, setInternalPos] = useState(clamp(
|
|
4977
|
-
|
|
4986
|
+
const [internalPos, setInternalPos] = useState(clamp(
|
|
4987
|
+
defaultPosition,
|
|
4988
|
+
min,
|
|
4989
|
+
max,
|
|
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
|
+
);
|
|
4978
5001
|
useEffect(() => {
|
|
4979
5002
|
if (position2 == null) return;
|
|
4980
|
-
setInternalPos(clamp(
|
|
5003
|
+
setInternalPos(clamp(
|
|
5004
|
+
position2,
|
|
5005
|
+
min,
|
|
5006
|
+
max,
|
|
5007
|
+
mode === "verical" ? sizeRef.current.h : sizeRef.current.w,
|
|
5008
|
+
splitterSize
|
|
5009
|
+
));
|
|
4981
5010
|
}, [position2, min, max]);
|
|
4982
5011
|
useEffect(() => {
|
|
4983
5012
|
setInternalMode(mode === "vertical" ? "vertical" : "horizontal");
|
|
4984
5013
|
}, [mode]);
|
|
4985
5014
|
const setPosition = (next2) => {
|
|
4986
|
-
const clamped = clamp(
|
|
5015
|
+
const clamped = clamp(
|
|
5016
|
+
next2,
|
|
5017
|
+
min,
|
|
5018
|
+
max,
|
|
5019
|
+
mode === "verical" ? sizeRef.current.h : sizeRef.current.w,
|
|
5020
|
+
splitterSize
|
|
5021
|
+
);
|
|
4987
5022
|
if (position2 == null) setInternalPos(clamped);
|
|
4988
5023
|
onSizeChange == null ? void 0 : onSizeChange(clamped);
|
|
4989
5024
|
};
|
|
@@ -4993,20 +5028,35 @@ var SplitPane = forwardRef(function SplitPane2({
|
|
|
4993
5028
|
getPosition: () => posResolved,
|
|
4994
5029
|
getMode: () => internalMode
|
|
4995
5030
|
}));
|
|
4996
|
-
const containerRef = useRef(null);
|
|
4997
|
-
const sizeRef = useRef({ w: 0, h: 0 });
|
|
4998
5031
|
useLayoutEffect(() => {
|
|
4999
5032
|
const el = containerRef.current;
|
|
5000
5033
|
if (!el) return;
|
|
5001
5034
|
const ro = new ResizeObserver(() => {
|
|
5035
|
+
var _a;
|
|
5002
5036
|
const rect2 = el.getBoundingClientRect();
|
|
5037
|
+
const o = sizeRef.current;
|
|
5003
5038
|
sizeRef.current = { w: rect2.width, h: rect2.height };
|
|
5039
|
+
if ((_a = ref.current) == null ? void 0 : _a.getPosition) {
|
|
5040
|
+
if (resizeMode === "fixFirst") {
|
|
5041
|
+
if (internalMode === "vertical" && o.h > 0) {
|
|
5042
|
+
setPosition(ref.current.getPosition() * o.h / sizeRef.current.h);
|
|
5043
|
+
} else if (o.w > 0) {
|
|
5044
|
+
setPosition(ref.current.getPosition() * o.w / sizeRef.current.w);
|
|
5045
|
+
}
|
|
5046
|
+
} else if (resizeMode === "fixSecond") {
|
|
5047
|
+
if (internalMode === "vertical" && o.h > 0) {
|
|
5048
|
+
setPosition(1 - (1 - ref.current.getPosition()) * o.h / sizeRef.current.h);
|
|
5049
|
+
} else if (o.w > 0) {
|
|
5050
|
+
setPosition(1 - (1 - ref.current.getPosition()) * o.w / sizeRef.current.w);
|
|
5051
|
+
}
|
|
5052
|
+
}
|
|
5053
|
+
}
|
|
5004
5054
|
});
|
|
5005
5055
|
ro.observe(el);
|
|
5006
5056
|
const rect = el.getBoundingClientRect();
|
|
5007
5057
|
sizeRef.current = { w: rect.width, h: rect.height };
|
|
5008
5058
|
return () => ro.disconnect();
|
|
5009
|
-
}, []);
|
|
5059
|
+
}, [resizeMode, internalMode]);
|
|
5010
5060
|
const startPosRef = useRef(posResolved);
|
|
5011
5061
|
const [dragging, setDragging] = useState(false);
|
|
5012
5062
|
const handleStart = () => {
|
|
@@ -5014,11 +5064,11 @@ var SplitPane = forwardRef(function SplitPane2({
|
|
|
5014
5064
|
startPosRef.current = posResolved;
|
|
5015
5065
|
};
|
|
5016
5066
|
const handleDelta = (x, y, _data) => {
|
|
5017
|
-
const { w, h } = sizeRef.current;
|
|
5067
|
+
const { w: w2, h: h2 } = sizeRef.current;
|
|
5018
5068
|
if (internalMode === "horizontal") {
|
|
5019
|
-
setPosition(startPosRef.current + x / (
|
|
5069
|
+
setPosition(startPosRef.current + x / (w2 || 1));
|
|
5020
5070
|
} else {
|
|
5021
|
-
setPosition(startPosRef.current + y / (
|
|
5071
|
+
setPosition(startPosRef.current + y / (h2 || 1));
|
|
5022
5072
|
}
|
|
5023
5073
|
};
|
|
5024
5074
|
const handleEnd = () => setDragging(false);
|
|
@@ -5026,79 +5076,113 @@ var SplitPane = forwardRef(function SplitPane2({
|
|
|
5026
5076
|
const firstChild = arr[0];
|
|
5027
5077
|
const secondChild = arr[1];
|
|
5028
5078
|
const p = posResolved;
|
|
5029
|
-
const
|
|
5079
|
+
const { w, h } = sizeRef.current;
|
|
5080
|
+
const computedPane1Style = {
|
|
5030
5081
|
position: "absolute",
|
|
5031
5082
|
top: 0,
|
|
5032
|
-
bottom: 0,
|
|
5033
5083
|
left: 0,
|
|
5034
|
-
width: `calc(${p} * (100% - ${splitterSize}px))`,
|
|
5035
|
-
overflow: "auto",
|
|
5036
|
-
...firstPaneStyle || {}
|
|
5037
|
-
} : {
|
|
5038
|
-
position: "absolute",
|
|
5039
|
-
left: 0,
|
|
5040
|
-
right: 0,
|
|
5041
|
-
top: 0,
|
|
5042
|
-
height: `calc(${p} * (100% - ${splitterSize}px))`,
|
|
5043
5084
|
overflow: "auto",
|
|
5044
5085
|
...firstPaneStyle || {}
|
|
5045
5086
|
};
|
|
5046
|
-
const
|
|
5087
|
+
const computedPane2Style = {
|
|
5047
5088
|
position: "absolute",
|
|
5048
|
-
top: 0,
|
|
5049
5089
|
bottom: 0,
|
|
5050
|
-
left: `calc(${p} * (100% - ${splitterSize}px) + ${splitterSize}px)`,
|
|
5051
5090
|
right: 0,
|
|
5052
5091
|
overflow: "auto",
|
|
5053
5092
|
...secondPaneStyle || {}
|
|
5054
|
-
} : {
|
|
5055
|
-
position: "absolute",
|
|
5056
|
-
left: 0,
|
|
5057
|
-
right: 0,
|
|
5058
|
-
top: `calc(${p} * (100% - ${splitterSize}px) + ${splitterSize}px)`,
|
|
5059
|
-
bottom: 0,
|
|
5060
|
-
overflow: "auto",
|
|
5061
|
-
...secondPaneStyle || {}
|
|
5062
5093
|
};
|
|
5063
|
-
const
|
|
5094
|
+
const computedSplitterStyle = {
|
|
5064
5095
|
background: "rgba(0,0,0,0.08)",
|
|
5065
5096
|
boxShadow: "inset 0 0 2px rgba(0,0,0,0.25)",
|
|
5066
|
-
zIndex: 10
|
|
5067
|
-
};
|
|
5068
|
-
const splitterAbsStyle = internalMode === "horizontal" ? {
|
|
5097
|
+
zIndex: 10,
|
|
5069
5098
|
position: "absolute",
|
|
5070
|
-
|
|
5071
|
-
bottom: 0,
|
|
5072
|
-
left: `calc(${p} * (100% - ${splitterSize}px))`,
|
|
5073
|
-
width: splitterSize,
|
|
5074
|
-
height: "100%",
|
|
5075
|
-
cursor: dragging ? "col-resize" : "col-resize",
|
|
5099
|
+
cursor: internalMode === "horizontal" ? "col-resize" : "row-resize",
|
|
5076
5100
|
touchAction: "none",
|
|
5077
5101
|
pointerEvents: "auto",
|
|
5078
|
-
...splitterBase,
|
|
5079
|
-
...splitterStyle || {}
|
|
5080
|
-
} : {
|
|
5081
|
-
position: "absolute",
|
|
5082
|
-
left: 0,
|
|
5083
|
-
right: 0,
|
|
5084
|
-
top: `calc(${p} * (100% - ${splitterSize}px))`,
|
|
5085
|
-
height: splitterSize,
|
|
5086
|
-
width: "100%",
|
|
5087
|
-
cursor: dragging ? "row-resize" : "row-resize",
|
|
5088
|
-
touchAction: "none",
|
|
5089
|
-
pointerEvents: "auto",
|
|
5090
|
-
...splitterBase,
|
|
5091
5102
|
...splitterStyle || {}
|
|
5092
5103
|
};
|
|
5104
|
+
if (internalMode === "horizontal") {
|
|
5105
|
+
computedPane1Style.bottom = 0;
|
|
5106
|
+
computedPane2Style.top = 0;
|
|
5107
|
+
if (resizeMode === "fixFirst") {
|
|
5108
|
+
computedPane1Style.width = p * (w - splitterSize);
|
|
5109
|
+
computedPane2Style.left = computedPane1Style.width + splitterSize;
|
|
5110
|
+
Object.assign(computedSplitterStyle, {
|
|
5111
|
+
top: 0,
|
|
5112
|
+
bottom: 0,
|
|
5113
|
+
left: computedPane1Style.width,
|
|
5114
|
+
width: splitterSize
|
|
5115
|
+
});
|
|
5116
|
+
} else if (resizeMode === "fixSecond") {
|
|
5117
|
+
computedPane2Style.width = (1 - p) * (w - splitterSize);
|
|
5118
|
+
computedPane1Style.right = computedPane2Style.width + splitterSize;
|
|
5119
|
+
Object.assign(computedSplitterStyle, {
|
|
5120
|
+
top: 0,
|
|
5121
|
+
bottom: 0,
|
|
5122
|
+
left: computedPane2Style.width,
|
|
5123
|
+
width: splitterSize
|
|
5124
|
+
});
|
|
5125
|
+
} else {
|
|
5126
|
+
computedPane1Style.width = `calc(${p} * (100% - ${splitterSize}px))`;
|
|
5127
|
+
computedPane2Style.left = `calc(${p} * (100% - ${splitterSize}px) + ${splitterSize}px)`;
|
|
5128
|
+
Object.assign(computedSplitterStyle, {
|
|
5129
|
+
top: 0,
|
|
5130
|
+
bottom: 0,
|
|
5131
|
+
left: `calc(${p} * (100% - ${splitterSize}px))`,
|
|
5132
|
+
width: splitterSize
|
|
5133
|
+
});
|
|
5134
|
+
}
|
|
5135
|
+
} else {
|
|
5136
|
+
computedPane1Style.right = 0;
|
|
5137
|
+
computedPane2Style.left = 0;
|
|
5138
|
+
if (resizeMode === "fixFirst") {
|
|
5139
|
+
computedPane1Style.height = p * (h - splitterSize);
|
|
5140
|
+
computedPane2Style.top = computedPane1Style.height + splitterSize;
|
|
5141
|
+
Object.assign(computedSplitterStyle, {
|
|
5142
|
+
left: 0,
|
|
5143
|
+
right: 0,
|
|
5144
|
+
top: computedPane1Style.height,
|
|
5145
|
+
height: splitterSize
|
|
5146
|
+
});
|
|
5147
|
+
} else if (resizeMode === "fixSecond") {
|
|
5148
|
+
computedPane2Style.height = (1 - p) * (h - splitterSize);
|
|
5149
|
+
computedPane1Style.bottom = computedPane2Style.height + splitterSize;
|
|
5150
|
+
Object.assign(computedSplitterStyle, {
|
|
5151
|
+
left: 0,
|
|
5152
|
+
right: 0,
|
|
5153
|
+
bottom: computedPane2Style.height,
|
|
5154
|
+
height: splitterSize
|
|
5155
|
+
});
|
|
5156
|
+
} else {
|
|
5157
|
+
computedPane1Style.height = `calc(${p} * (100% - ${splitterSize}px))`;
|
|
5158
|
+
computedPane2Style.top = `calc(${p} * (100% - ${splitterSize}px) + ${splitterSize}px)`;
|
|
5159
|
+
Object.assign(computedSplitterStyle, {
|
|
5160
|
+
left: 0,
|
|
5161
|
+
right: 0,
|
|
5162
|
+
top: computedPane1Style.height,
|
|
5163
|
+
height: splitterSize
|
|
5164
|
+
});
|
|
5165
|
+
}
|
|
5166
|
+
}
|
|
5093
5167
|
return createComponent("div", { "ref": containerRef, "className": className, "style": {
|
|
5094
5168
|
position: "relative",
|
|
5095
5169
|
width: "100%",
|
|
5096
5170
|
height: "100%",
|
|
5097
5171
|
overflow: "hidden",
|
|
5098
5172
|
...style || {}
|
|
5099
|
-
} }, createComponent("div", { "style":
|
|
5173
|
+
} }, createComponent("div", { "style": computedPane1Style }, firstChild), createComponent("div", { "style": computedPane2Style }, secondChild), createComponent(DragHandle, { "onStart": handleStart, "onDelta": handleDelta, "onEnd": handleEnd, "style": computedSplitterStyle, "className": "splitter" }, splitterChild));
|
|
5100
5174
|
});
|
|
5101
|
-
var clamp = (v, min, max
|
|
5175
|
+
var clamp = function(v, min, max, size, splitterSize) {
|
|
5176
|
+
if (typeof min === "function") {
|
|
5177
|
+
if (size > 0) min = min(size, splitterSize);
|
|
5178
|
+
else min = 0;
|
|
5179
|
+
}
|
|
5180
|
+
if (typeof max === "function") {
|
|
5181
|
+
if (size > 0) max = max(size, splitterSize);
|
|
5182
|
+
else max = 1;
|
|
5183
|
+
}
|
|
5184
|
+
return Math.max(min, Math.min(max, v));
|
|
5185
|
+
};
|
|
5102
5186
|
|
|
5103
5187
|
// .tmp/src/vlq.js
|
|
5104
5188
|
var char_to_integer = {};
|
|
@@ -5564,7 +5648,7 @@ var transpilerConfig = {
|
|
|
5564
5648
|
};
|
|
5565
5649
|
var raiseError;
|
|
5566
5650
|
var tab = 0;
|
|
5567
|
-
var TOKENIZE_RE = /(\{|\}|\[|\]|\(|\)|\.\.\.|=>|\?\?=|\?\?|\?\.|===|!==|>>>|<<=|>>=|>>>=|\*\*=|\*\*|&&=|\|\|=|<=|>=|==|!=|<<|>>|\+\+|--|\+=|-=|\*=|\/=|%=|&=|\^=|\|=|=|\+|-|\*|\/|%|&|\^|\||!|~|\?|:|<|>|=|\.|,|;|\n+|[\s^\n]+)/
|
|
5651
|
+
var TOKENIZE_RE = /(\{|\}|\[|\]|\(|\)|\.\.\.|=>|\?\?=|\?\?|\?\.|===|!==|>>>|<<=|>>=|>>>=|\*\*=|\*\*|&&=|\|\|=|<=|>=|==|!=|<<|>>|\+\+|--|\+=|-=|\*=|\/=|%=|&=|\^=|\|=|=|\+|-|\*|\/|%|&|\^|\||!|~|\?|:|<|>|=|\.|,|;|\n+|[\s^\n]+)/g;
|
|
5568
5652
|
function lookAhead(f, code2, index2, ...args) {
|
|
5569
5653
|
const b2 = f(code2, index2, ...args);
|
|
5570
5654
|
if (b2) {
|
|
@@ -6429,7 +6513,7 @@ function transpileJSX(jsx2, {
|
|
|
6429
6513
|
|
|
6430
6514
|
// .tmp/src/lilact.jsx
|
|
6431
6515
|
var Lilact2 = {
|
|
6432
|
-
VERSION: "RC.
|
|
6516
|
+
VERSION: "RC.3",
|
|
6433
6517
|
// Configuration
|
|
6434
6518
|
defaultTransitionTimeout: 300,
|
|
6435
6519
|
defaultIsEqual: Object.is,
|