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.
Files changed (114) hide show
  1. package/README.md +7 -6
  2. package/bin/bundle.cjs +148 -60
  3. package/dist/lilact.development.js +5332 -10264
  4. package/dist/lilact.development.js.map +7 -1
  5. package/dist/lilact.development.min.js +54 -11
  6. package/dist/lilact.development.min.js.map +7 -1
  7. package/dist/lilact.production.min.js +53 -10
  8. package/docs/assets/hierarchy.js +1 -1
  9. package/docs/classes/accessories.ErrorBoundary.html +11 -11
  10. package/docs/classes/accessories.Suspense.html +10 -10
  11. package/docs/classes/components.Component.html +11 -11
  12. package/docs/classes/components.HTMLComponent.html +11 -11
  13. package/docs/classes/components.RootComponent.html +11 -11
  14. package/docs/functions/accessories.DragHandle.html +1 -1
  15. package/docs/functions/accessories.Spinner.html +1 -1
  16. package/docs/functions/components.createComponent.html +1 -1
  17. package/docs/functions/components.createRoot.html +1 -1
  18. package/docs/functions/components.render.html +1 -1
  19. package/docs/functions/errors.globalErrorHandler.html +1 -1
  20. package/docs/functions/errors.traceError.html +1 -1
  21. package/docs/functions/hooks.createContext.html +1 -1
  22. package/docs/functions/hooks.useActionState.html +1 -1
  23. package/docs/functions/hooks.useCallback.html +1 -1
  24. package/docs/functions/hooks.useContext.html +1 -1
  25. package/docs/functions/hooks.useDeferredValue.html +1 -1
  26. package/docs/functions/hooks.useEffect.html +1 -1
  27. package/docs/functions/hooks.useHook.html +1 -1
  28. package/docs/functions/hooks.useId.html +1 -1
  29. package/docs/functions/hooks.useImperativeHandle.html +1 -1
  30. package/docs/functions/hooks.useLayoutEffect.html +1 -1
  31. package/docs/functions/hooks.useLocalStorage.html +1 -1
  32. package/docs/functions/hooks.useMemo.html +1 -1
  33. package/docs/functions/hooks.useReducer.html +1 -1
  34. package/docs/functions/hooks.useRef.html +1 -1
  35. package/docs/functions/hooks.useState.html +1 -1
  36. package/docs/functions/hooks.useTransition.html +1 -1
  37. package/docs/functions/misc.Fragment.html +2 -2
  38. package/docs/functions/misc.deepEqual.html +1 -1
  39. package/docs/functions/misc.findDOMNode.html +1 -1
  40. package/docs/functions/misc.forwardRef.html +1 -1
  41. package/docs/functions/misc.getComponentByPointer.html +1 -1
  42. package/docs/functions/misc.isAsync.html +1 -1
  43. package/docs/functions/misc.isClass.html +1 -1
  44. package/docs/functions/misc.isEmpty.html +1 -1
  45. package/docs/functions/misc.isError.html +1 -1
  46. package/docs/functions/misc.isThenable.html +1 -1
  47. package/docs/functions/misc.isValidElement.html +1 -1
  48. package/docs/functions/misc.shallowEqual.html +1 -1
  49. package/docs/functions/misc.toBool.html +1 -1
  50. package/docs/functions/redux.Provider.html +1 -1
  51. package/docs/functions/redux.combineReducers.html +1 -1
  52. package/docs/functions/redux.connect.html +1 -1
  53. package/docs/functions/redux.useDispatch.html +1 -1
  54. package/docs/functions/redux.useSelector.html +1 -1
  55. package/docs/functions/redux.useStore.html +1 -1
  56. package/docs/functions/router.HashRouter.html +1 -1
  57. package/docs/functions/router.Link.html +1 -1
  58. package/docs/functions/router.NavLink.html +1 -1
  59. package/docs/functions/router.Route.html +1 -1
  60. package/docs/functions/router.Routes.html +1 -1
  61. package/docs/functions/router.useLocation.html +1 -1
  62. package/docs/functions/router.useNavigate.html +1 -1
  63. package/docs/functions/run.lazy.html +1 -1
  64. package/docs/functions/run.require.html +1 -1
  65. package/docs/functions/run.run.html +1 -1
  66. package/docs/functions/run.runScripts.html +1 -1
  67. package/docs/functions/timers.animationFramePromise.html +1 -1
  68. package/docs/functions/timers.clearInterval.html +1 -1
  69. package/docs/functions/timers.clearTimeout.html +1 -1
  70. package/docs/functions/timers.grabTimers.html +1 -1
  71. package/docs/functions/timers.pauseTimers.html +1 -1
  72. package/docs/functions/timers.releaseTimers.html +1 -1
  73. package/docs/functions/timers.resetTimers.html +1 -1
  74. package/docs/functions/timers.resumeTimers.html +1 -1
  75. package/docs/functions/timers.setInterval.html +1 -1
  76. package/docs/functions/timers.setTimeout.html +1 -1
  77. package/docs/functions/timers.timeoutPromise.html +12 -12
  78. package/docs/functions/transition.CSSTransition.html +1 -1
  79. package/docs/functions/transition.SwitchTransition.html +1 -1
  80. package/docs/functions/transition.Transition.html +1 -1
  81. package/docs/functions/transition.TransitionGroup.html +1 -1
  82. package/docs/hierarchy.html +1 -1
  83. package/docs/index.html +8 -7
  84. package/docs/static/index.html +2 -0
  85. package/docs/static/lilact.development.js +5332 -10264
  86. package/docs/static/lilact.development.js.map +7 -0
  87. package/docs/static/lilact.development.min.js +54 -11
  88. package/docs/static/lilact.development.min.js.map +7 -0
  89. package/docs/static/lilact.production.min.js +53 -10
  90. package/docs/variables/accessories.SplitPane.html +1 -1
  91. package/docs/variables/misc.Children.html +2 -2
  92. package/package.json +11 -14
  93. package/root/index.html +2 -0
  94. package/root/lilact.development.js +5332 -10264
  95. package/root/lilact.development.js.map +7 -0
  96. package/root/lilact.development.min.js +54 -11
  97. package/root/lilact.development.min.js.map +7 -0
  98. package/root/lilact.production.min.js +53 -10
  99. package/{webpack.config.factory.cjs → scripts/build.mjs} +48 -73
  100. package/scripts/copy-dist-to-root.mjs +13 -0
  101. package/scripts/esbuild-preprocessor-plugin.cjs +29 -0
  102. package/scripts/preprocess.mjs +42 -0
  103. package/src/accessories.jsx +2 -28
  104. package/src/components.jsx +1 -1
  105. package/src/hooks.jsx +5 -6
  106. package/src/jsx.js +30 -26
  107. package/src/lilact.jsx +3 -2
  108. package/src/proptypes.jsx +407 -0
  109. package/tsconfig.json +1 -2
  110. package/typedoc.json +13 -13
  111. package/dist/lilact.development.min.js.LICENSE.txt +0 -83
  112. package/dist/lilact.production.min.js.map +0 -1
  113. package/src/loader.cjs +0 -59
  114. 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.js: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>
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.js:136</li></ul></aside></div></li></ul></li></ul></div><aside class="tsd-sources"><ul><li>Defined in misc.js: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>
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.15.4",
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": "bin/transpile-dir.js --inDir src --outDir .tmp && npx typedoc --out docs --tsconfig tsconfig.json && bin/copy-demo.js",
24
- "build:debug": "webpack --mode development",
25
- "build:release": "webpack --mode production",
26
- "build:debug.min": "webpack --mode development --env minify=true",
27
- "build:release.min": "webpack --mode production --env minify=true",
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
- "css-loader": "^7.1.4",
46
- "prop-types": "^15.8.1",
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} />