lilact 0.23.0 → 0.23.1
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 +4 -4
- package/dist/lilact.development.js +11 -4
- package/dist/lilact.development.js.map +2 -2
- package/dist/lilact.development.min.js +8 -8
- package/dist/lilact.development.min.js.map +3 -3
- package/dist/lilact.production.min.js +7 -7
- package/docs/functions/run.lazy.html +1 -1
- package/docs/functions/run.require.html +3 -4
- package/docs/functions/run.runScripts.html +1 -1
- package/docs/index.html +4 -4
- package/docs/static/index.html +2 -2
- package/docs/static/lilact.development.js +11 -4
- package/docs/static/lilact.development.js.map +2 -2
- package/docs/static/lilact.development.min.js +8 -8
- package/docs/static/lilact.development.min.js.map +3 -3
- package/docs/static/lilact.production.min.js +7 -7
- package/examples/index.html +2 -2
- package/examples/lilact.development.js +11 -4
- package/examples/lilact.development.js.map +2 -2
- package/examples/lilact.development.min.js +8 -8
- package/examples/lilact.development.min.js.map +3 -3
- package/examples/lilact.production.min.js +7 -7
- package/package.json +1 -1
- package/src/run.jsx +10 -11
|
@@ -4,4 +4,4 @@ It is automatically attached to document.onload when Lilact is loaded.</p>
|
|
|
4
4
|
If element has inner content, it will be executed via <code>run</code>.</p>
|
|
5
5
|
<p>If both are present, first the src is loaded and then the inner content is executed.</p>
|
|
6
6
|
<p>Note that it won't detect such elements that are added after document.onload.</p>
|
|
7
|
-
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in run.jsx:
|
|
7
|
+
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in run.jsx:291</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/index.html
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<h2 id="react-apis-libraries-and-built-in-components" class="tsd-anchor-link">React APIs, Libraries, and Built-in Components<a href="#react-apis-libraries-and-built-in-components" 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></h2>
|
|
33
33
|
<p><code>Lilact</code> implements both the <strong>legacy class-based</strong> API and the <strong>modern hook-based</strong> API, and it includes almost everything you need.</p>
|
|
34
34
|
<p>In addition to the API itself, it bundles the official <code>Redux</code> library (see the <code>redux.jsx</code> example). As a result, it has Redux support and provides all necessary functions and hooks for working with it.</p>
|
|
35
|
-
<p>It also includes the amazing <code>@emotion/css</code> library to ease working with styles. You can access it via <code>Lilact.emotion</code>.</p>
|
|
35
|
+
<p>It also includes the amazing <code>@emotion/css</code> library to ease working with styles. You can access it via <code>Lilact.emotion</code> or by importing <code>@emotion/css</code>.</p>
|
|
36
36
|
<p>For convenience, it already includes components such as:</p>
|
|
37
37
|
<ul>
|
|
38
38
|
<li><code>HashRouter</code></li>
|
|
@@ -68,7 +68,7 @@ but in the background <code>Lilact</code> converts the ES import and exports to
|
|
|
68
68
|
</code><button type="button">Copy</button></pre>
|
|
69
69
|
|
|
70
70
|
<p>or</p>
|
|
71
|
-
<pre><code class="js"><span class="hl-3">const</span><span class="hl-1"> { </span><span class="hl-7">useState</span><span class="hl-1">, </span><span class="hl-7">useRef</span><span class="hl-1">, </span><span class="hl-7">render</span><span class="hl-1"
|
|
71
|
+
<pre><code class="js"><span class="hl-3">const</span><span class="hl-1"> { </span><span class="hl-7">useState</span><span class="hl-1">, </span><span class="hl-7">useRef</span><span class="hl-1">, </span><span class="hl-7">render</span><span class="hl-1"> } = </span><span class="hl-5">Lilact</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-7">App</span><span class="hl-1"> = </span><span class="hl-0">require</span><span class="hl-1">(</span><span class="hl-2">'./App.jsx'</span><span class="hl-1">);</span>
|
|
72
72
|
</code><button type="button">Copy</button></pre>
|
|
73
73
|
|
|
74
74
|
<p>To export:</p>
|
|
@@ -76,7 +76,7 @@ but in the background <code>Lilact</code> converts the ES import and exports to
|
|
|
76
76
|
</code><button type="button">Copy</button></pre>
|
|
77
77
|
|
|
78
78
|
<p>or</p>
|
|
79
|
-
<pre><code class="js"><span class="hl-8">module</span><span class="hl-1">.</span><span class="hl-8">exports</span><span class="hl-1"> = ...</span>
|
|
79
|
+
<pre><code class="js"><span class="hl-8">module</span><span class="hl-1">.</span><span class="hl-8">exports</span><span class="hl-1">.</span><span class="hl-5">default</span><span class="hl-1"> = ...</span>
|
|
80
80
|
</code><button type="button">Copy</button></pre>
|
|
81
81
|
|
|
82
82
|
<p>Bundled projects can also be used statically on other backends. However, bundling is not required: JSX files can be served and transpiled live.</p>
|
|
@@ -114,7 +114,7 @@ but in the background <code>Lilact</code> converts the ES import and exports to
|
|
|
114
114
|
</code><button type="button">Copy</button></pre>
|
|
115
115
|
|
|
116
116
|
<h3 id="outside-nodejs-eg-php-python-integration" class="tsd-anchor-link">Outside Node.js (e.g., PHP / Python integration)<a href="#outside-nodejs-eg-php-python-integration" 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></h3>
|
|
117
|
-
<pre><code class="html"><span class="hl-9"><!</span><span class="hl-10">DOCTYPE</span><span class="hl-1"> </span><span class="hl-12">html</span><span class="hl-9">></span><br/><span class="hl-9"><</span><span class="hl-10">html</span><span class="hl-9">></span><br/><span class="hl-9"><</span><span class="hl-10">head</span><span class="hl-9">></span><br/><span class="hl-1"> </span><span class="hl-9"><</span><span class="hl-10">meta</span><span class="hl-1"> </span><span class="hl-12">charset</span><span class="hl-1">=</span><span class="hl-13">"utf-8"</span><span class="hl-9">/></span><br/><span class="hl-1"> </span><span class="hl-9"><</span><span class="hl-10">title</span><span class="hl-9">></span><span class="hl-1">Lilact Demo</span><span class="hl-9"></</span><span class="hl-10">title</span><span class="hl-9">></span><br/><span class="hl-1"> </span><span class="hl-9"><</span><span class="hl-10">script</span><span class="hl-11"> </span><span class="hl-12">src</span><span class="hl-11">=</span><span class="hl-13">'./lilact.development.min.js'</span><span class="hl-11"> </span><span class="hl-12">type</span><span class="hl-11">=</span><span class="hl-13">"module"</span><span class="hl-9">></</span><span class="hl-10">script</span><span class="hl-9">></span><br/><span class="hl-9"></</span><span class="hl-10">head</span><span class="hl-9">></span><br/><span class="hl-9"><</span><span class="hl-10">body</span><span class="hl-9">></</span><span class="hl-10">body</span><span class="hl-9">></span><br/><span class="hl-9"><</span><span class="hl-10">script</span><span class="hl-11"> </span><span class="hl-12">type</span><span class="hl-11">=</span><span class="hl-13">'text/jsx'</span><span class="hl-9">></span><br/><span class="hl-11">
|
|
117
|
+
<pre><code class="html"><span class="hl-9"><!</span><span class="hl-10">DOCTYPE</span><span class="hl-1"> </span><span class="hl-12">html</span><span class="hl-9">></span><br/><span class="hl-9"><</span><span class="hl-10">html</span><span class="hl-9">></span><br/><span class="hl-9"><</span><span class="hl-10">head</span><span class="hl-9">></span><br/><span class="hl-1"> </span><span class="hl-9"><</span><span class="hl-10">meta</span><span class="hl-1"> </span><span class="hl-12">charset</span><span class="hl-1">=</span><span class="hl-13">"utf-8"</span><span class="hl-9">/></span><br/><span class="hl-1"> </span><span class="hl-9"><</span><span class="hl-10">title</span><span class="hl-9">></span><span class="hl-1">Lilact Demo</span><span class="hl-9"></</span><span class="hl-10">title</span><span class="hl-9">></span><br/><span class="hl-1"> </span><span class="hl-9"><</span><span class="hl-10">script</span><span class="hl-11"> </span><span class="hl-12">src</span><span class="hl-11">=</span><span class="hl-13">'./lilact.development.min.js'</span><span class="hl-11"> </span><span class="hl-12">type</span><span class="hl-11">=</span><span class="hl-13">"module"</span><span class="hl-9">></</span><span class="hl-10">script</span><span class="hl-9">></span><br/><span class="hl-9"></</span><span class="hl-10">head</span><span class="hl-9">></span><br/><span class="hl-9"><</span><span class="hl-10">body</span><span class="hl-9">></</span><span class="hl-10">body</span><span class="hl-9">></span><br/><span class="hl-9"><</span><span class="hl-10">script</span><span class="hl-11"> </span><span class="hl-12">type</span><span class="hl-11">=</span><span class="hl-13">'text/jsx'</span><span class="hl-9">></span><br/><span class="hl-11"> import { render } from "lilact";</span><br/><br/><span class="hl-11"> function App() {</span><br/><span class="hl-11"> return <div>Hello World</div>;</span><br/><span class="hl-11"> }</span><br/><span class="hl-11"> </span><br/><span class="hl-11"> render(<App/>, document.body);</span><br/><span class="hl-9"></</span><span class="hl-10">script</span><span class="hl-9">></span><br/><span class="hl-9"></</span><span class="hl-10">html</span><span class="hl-9">></span>
|
|
118
118
|
</code><button type="button">Copy</button></pre>
|
|
119
119
|
|
|
120
120
|
<hr>
|
package/docs/static/index.html
CHANGED
|
@@ -142,8 +142,8 @@ const pane = css({ flex: "1 1 0",
|
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
144
|
|
|
145
|
-
const left = css({ float: "left" });
|
|
146
|
-
const right = css({ float: "right" });
|
|
145
|
+
const left = css({ float: "left", textAlign: "left" });
|
|
146
|
+
const right = css({ float: "right", textAlign: "right" });
|
|
147
147
|
const demobox = css({ background: "#fff3", borderRadius: "15px", padding: "4px 2px", margin: "4px"});
|
|
148
148
|
|
|
149
149
|
|
|
@@ -3612,9 +3612,16 @@ function run(jsx, path = `InlineJSX-${++lilact_default.eval_num}`, is_inline = t
|
|
|
3612
3612
|
throw e;
|
|
3613
3613
|
}
|
|
3614
3614
|
}
|
|
3615
|
-
function require2(path2
|
|
3616
|
-
var _a, _b;
|
|
3617
|
-
|
|
3615
|
+
function require2(path2) {
|
|
3616
|
+
var _a, _b, _c, _d, _e, _f;
|
|
3617
|
+
let forceUpdate, checkExport, requirer, isLazy;
|
|
3618
|
+
if (arguments.length === 2 && typeof (arguments[1] === "object")) {
|
|
3619
|
+
forceUpdate = (_a = arguments[1]) == null ? void 0 : _a.forceUpdate;
|
|
3620
|
+
checkExport = (_b = arguments[1]) == null ? void 0 : _b.checkExport;
|
|
3621
|
+
requirer = (_c = arguments[1]) == null ? void 0 : _c.requirer;
|
|
3622
|
+
isLazy = (_d = arguments[1]) == null ? void 0 : _d.isLazy;
|
|
3623
|
+
}
|
|
3624
|
+
if ((_e = lilact_default.importObjectPaths) == null ? void 0 : _e[path2]) return lilact_default.importObjectPaths[path2];
|
|
3618
3625
|
if (required_scripts[path2] && !forceUpdate) return required_scripts[path2].exports;
|
|
3619
3626
|
if (path2[0] === "#") {
|
|
3620
3627
|
const el = document.getElementById(path2);
|
|
@@ -3625,7 +3632,7 @@ function require2(path2, { forceUpdate, checkExport, requirer, isLazy }) {
|
|
|
3625
3632
|
if (requirer && requirer.path) {
|
|
3626
3633
|
path2 = joinPaths(requirer.path, path2);
|
|
3627
3634
|
}
|
|
3628
|
-
if (((
|
|
3635
|
+
if (((_f = lilact_default) == null ? void 0 : _f[LAZY]) || isLazy) {
|
|
3629
3636
|
lilact_default[LAZY] = false;
|
|
3630
3637
|
return fetch(path2).then((res2) => {
|
|
3631
3638
|
if (!res2.ok) throw new Error(`HTTP ${res2.status}`);
|