lilact 0.15.4 → 0.16.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 +7 -6
- package/bin/bundle.cjs +148 -60
- package/dist/lilact.development.js +5332 -10264
- package/dist/lilact.development.js.map +7 -1
- package/dist/lilact.development.min.js +54 -11
- package/dist/lilact.development.min.js.map +7 -1
- package/dist/lilact.production.min.js +53 -10
- package/docs/assets/hierarchy.js +1 -1
- package/docs/classes/accessories.ErrorBoundary.html +11 -11
- package/docs/classes/accessories.Suspense.html +10 -10
- 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/accessories.DragHandle.html +1 -1
- package/docs/functions/accessories.Spinner.html +1 -1
- package/docs/functions/components.createComponent.html +1 -1
- package/docs/functions/components.createRoot.html +1 -1
- package/docs/functions/components.render.html +1 -1
- package/docs/functions/errors.globalErrorHandler.html +1 -1
- package/docs/functions/errors.traceError.html +1 -1
- package/docs/functions/hooks.createContext.html +1 -1
- package/docs/functions/hooks.useActionState.html +1 -1
- package/docs/functions/hooks.useCallback.html +1 -1
- package/docs/functions/hooks.useContext.html +1 -1
- package/docs/functions/hooks.useDeferredValue.html +1 -1
- package/docs/functions/hooks.useEffect.html +1 -1
- package/docs/functions/hooks.useHook.html +1 -1
- package/docs/functions/hooks.useId.html +1 -1
- package/docs/functions/hooks.useImperativeHandle.html +1 -1
- package/docs/functions/hooks.useLayoutEffect.html +1 -1
- package/docs/functions/hooks.useLocalStorage.html +1 -1
- package/docs/functions/hooks.useMemo.html +1 -1
- package/docs/functions/hooks.useReducer.html +1 -1
- package/docs/functions/hooks.useRef.html +1 -1
- package/docs/functions/hooks.useState.html +1 -1
- package/docs/functions/hooks.useTransition.html +1 -1
- package/docs/functions/misc.Fragment.html +2 -2
- package/docs/functions/misc.deepEqual.html +1 -1
- package/docs/functions/misc.findDOMNode.html +1 -1
- package/docs/functions/misc.forwardRef.html +1 -1
- package/docs/functions/misc.getComponentByPointer.html +1 -1
- package/docs/functions/misc.isAsync.html +1 -1
- package/docs/functions/misc.isClass.html +1 -1
- package/docs/functions/misc.isEmpty.html +1 -1
- package/docs/functions/misc.isError.html +1 -1
- package/docs/functions/misc.isThenable.html +1 -1
- package/docs/functions/misc.isValidElement.html +1 -1
- package/docs/functions/misc.shallowEqual.html +1 -1
- package/docs/functions/misc.toBool.html +1 -1
- package/docs/functions/redux.Provider.html +1 -1
- package/docs/functions/redux.combineReducers.html +1 -1
- package/docs/functions/redux.connect.html +1 -1
- package/docs/functions/redux.useDispatch.html +1 -1
- package/docs/functions/redux.useSelector.html +1 -1
- package/docs/functions/redux.useStore.html +1 -1
- package/docs/functions/router.HashRouter.html +1 -1
- package/docs/functions/router.Link.html +1 -1
- package/docs/functions/router.NavLink.html +1 -1
- package/docs/functions/router.Route.html +1 -1
- package/docs/functions/router.Routes.html +1 -1
- package/docs/functions/router.useLocation.html +1 -1
- package/docs/functions/router.useNavigate.html +1 -1
- package/docs/functions/run.lazy.html +1 -1
- package/docs/functions/run.require.html +1 -1
- package/docs/functions/run.run.html +1 -1
- package/docs/functions/run.runScripts.html +1 -1
- package/docs/functions/timers.animationFramePromise.html +1 -1
- package/docs/functions/timers.clearInterval.html +1 -1
- package/docs/functions/timers.clearTimeout.html +1 -1
- package/docs/functions/timers.grabTimers.html +1 -1
- package/docs/functions/timers.pauseTimers.html +1 -1
- package/docs/functions/timers.releaseTimers.html +1 -1
- package/docs/functions/timers.resetTimers.html +1 -1
- package/docs/functions/timers.resumeTimers.html +1 -1
- package/docs/functions/timers.setInterval.html +1 -1
- package/docs/functions/timers.setTimeout.html +1 -1
- package/docs/functions/timers.timeoutPromise.html +12 -12
- package/docs/functions/transition.CSSTransition.html +1 -1
- package/docs/functions/transition.SwitchTransition.html +1 -1
- package/docs/functions/transition.Transition.html +1 -1
- package/docs/functions/transition.TransitionGroup.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +8 -7
- package/docs/static/index.html +2 -0
- package/docs/static/lilact.development.js +5332 -10264
- package/docs/static/lilact.development.js.map +7 -0
- package/docs/static/lilact.development.min.js +54 -11
- package/docs/static/lilact.development.min.js.map +7 -0
- package/docs/static/lilact.production.min.js +53 -10
- package/docs/variables/accessories.SplitPane.html +1 -1
- package/docs/variables/misc.Children.html +2 -2
- package/package.json +11 -14
- package/root/index.html +2 -0
- package/root/lilact.development.js +5332 -10264
- package/root/lilact.development.js.map +7 -0
- package/root/lilact.development.min.js +54 -11
- package/root/lilact.development.min.js.map +7 -0
- package/root/lilact.production.min.js +53 -10
- package/{webpack.config.factory.cjs → scripts/build.mjs} +48 -73
- package/scripts/copy-dist-to-root.mjs +13 -0
- package/scripts/esbuild-preprocessor-plugin.cjs +29 -0
- package/scripts/preprocess.mjs +42 -0
- package/src/accessories.jsx +2 -28
- package/src/components.jsx +1 -1
- package/src/hooks.jsx +5 -6
- package/src/jsx.js +30 -26
- package/src/lilact.jsx +3 -2
- package/src/proptypes.jsx +407 -0
- package/tsconfig.json +1 -2
- package/typedoc.json +13 -13
- package/dist/lilact.development.min.js.LICENSE.txt +0 -83
- package/dist/lilact.production.min.js.map +0 -1
- package/src/loader.cjs +0 -59
- package/webpack.config.js +0 -206
|
@@ -4,7 +4,7 @@ extensively everywhere, so I included them.</p>
|
|
|
4
4
|
</div><div class="tsd-type-declaration"><h4>Type Declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5 id="only"><span class="tsd-kind-method">only</span><span class="tsd-signature-symbol">:</span> function</h5><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="only-1"><span class="tsd-kind-call-signature">only</span><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> <span class="tsd-signature-type">any</span><a href="#only-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the only child from a children collection.</p>
|
|
5
5
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">children</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><p>The children to read.</p>
|
|
6
6
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4><p>The single child (or null/exception based on the number of children).</p>
|
|
7
|
-
<aside class="tsd-sources"><ul><li>Defined in misc.
|
|
7
|
+
<aside class="tsd-sources"><ul><li>Defined in misc.jsx:109</li></ul></aside></div></li></ul></li><li class="tsd-parameter"><h5 id="toarray"><span class="tsd-kind-method">toArray</span><span class="tsd-signature-symbol">:</span> function</h5><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="toarray-1"><span class="tsd-kind-call-signature">toArray</span><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> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><a href="#toarray-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Converts component children into a flat array.</p>
|
|
8
8
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">children</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><p>The children to convert.</p>
|
|
9
9
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4><p>An array representation of the children.</p>
|
|
10
|
-
<aside class="tsd-sources"><ul><li>Defined in misc.
|
|
10
|
+
<aside class="tsd-sources"><ul><li>Defined in misc.jsx:136</li></ul></aside></div></li></ul></li></ul></div><aside class="tsd-sources"><ul><li>Defined in misc.jsx:101</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>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lilact",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "A Little React/JSX Runtime Implementation for Browser",
|
|
5
5
|
"repository": "github:arashkazemi/lilact",
|
|
6
6
|
"homepage": "https://arashkazemi.github.io/lilact/",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"type": "module",
|
|
21
21
|
"scripts": {
|
|
22
22
|
"http": "http-server root",
|
|
23
|
-
"doc": "
|
|
24
|
-
"build:debug": "
|
|
25
|
-
"build:release": "
|
|
26
|
-
"build:debug.min": "
|
|
27
|
-
"build:release.min": "
|
|
23
|
+
"doc": "cross-env MODE=development MINIFY=false node scripts/preprocess.mjs && node scripts/copy-dist-to-root.mjs && npx typedoc --out docs --tsconfig tsconfig.json && bin/copy-demo.js",
|
|
24
|
+
"build:debug": "cross-env MODE=development MINIFY=false node scripts/preprocess.mjs && cross-env MODE=development MINIFY=false node scripts/build.mjs",
|
|
25
|
+
"build:release": "cross-env MODE=production MINIFY=false node scripts/preprocess.mjs && cross-env MODE=production MINIFY=false node scripts/build.mjs",
|
|
26
|
+
"build:debug.min": "cross-env MODE=development MINIFY=true node scripts/preprocess.mjs && cross-env MODE=development MINIFY=true node scripts/build.mjs",
|
|
27
|
+
"build:release.min": "cross-env MODE=production MINIFY=true node scripts/preprocess.mjs && cross-env MODE=production MINIFY=true node scripts/build.mjs",
|
|
28
28
|
"build": "npm-run-all build:debug.min build:debug build:release.min doc"
|
|
29
29
|
},
|
|
30
30
|
"bin": {
|
|
@@ -34,19 +34,16 @@
|
|
|
34
34
|
"author": "Arash Kazemi <contact.arash.kazemi@gmail.com>",
|
|
35
35
|
"license": "BSD-2-Clause",
|
|
36
36
|
"devDependencies": {
|
|
37
|
+
"cross-env": "^10.1.0",
|
|
38
|
+
"fast-glob": "^3.3.3",
|
|
37
39
|
"http-server": "^14.1.1",
|
|
38
40
|
"npm-run-all": "^4.1.5",
|
|
39
|
-
"typedoc": "^0.28.19"
|
|
40
|
-
"webpack-cli": "^6.0.1",
|
|
41
|
-
"webpack-dev": "^1.1.1"
|
|
41
|
+
"typedoc": "^0.28.19"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@emotion/css": "^11.13.5",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"redux": "^5.0.1",
|
|
48
|
-
"style-loader": "^4.0.0",
|
|
49
|
-
"webpack": "^5.97.1"
|
|
45
|
+
"esbuild": "^0.28.1",
|
|
46
|
+
"redux": "^5.0.1"
|
|
50
47
|
},
|
|
51
48
|
"exports": {
|
|
52
49
|
".": "./dist/lilact.development.js",
|
package/root/index.html
CHANGED
|
@@ -155,6 +155,7 @@ function DemoView({ entry })
|
|
|
155
155
|
const resource = createResource("demos/"+entry[0]);
|
|
156
156
|
const code = resource.read(); // Suspense will handle the promise
|
|
157
157
|
|
|
158
|
+
//console.log(code);
|
|
158
159
|
if(isOpen) {
|
|
159
160
|
useEffect(() => {
|
|
160
161
|
const Comp = run(code, "demos/"+entry[0]);
|
|
@@ -188,6 +189,7 @@ function DemoView({ entry })
|
|
|
188
189
|
function DemoBlock({entry})
|
|
189
190
|
{
|
|
190
191
|
if(typeof(entry)==='string') return <h3><br/><center>{entry}</center></h3>;
|
|
192
|
+
|
|
191
193
|
return <div key={entry[0]} className={demobox}>
|
|
192
194
|
<Suspense fallback={<Spinner/>}>
|
|
193
195
|
<DemoView entry={entry} />
|