lilact 0.31.2 → 0.31.4

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 CHANGED
@@ -29,7 +29,7 @@ If you find Lilact useful, please consider sponsoring. Your support funds ongoin
29
29
 
30
30
  ## Overview
31
31
 
32
- `Lilact` is a very lightweight implementation of the React API designed to run in the browser. It can be used as a single script that is around `98kb` minified and around `34kb` gzipped and includes its whole API. It is tested and works on **Chrome**, **Firefox**, **Edge**, and **Safari**.
32
+ `Lilact` is a very lightweight implementation of the React API designed to run in the browser. It can be used as a single script that is around `108kb` minified and around `37kb` gzipped and includes its whole API. It is tested and works on **Chrome**, **Firefox**, **Edge**, and **Safari**.
33
33
 
34
34
  `Lilact` is very fast, uses minimal resources, and handles memory very efficiently.
35
35
 
@@ -70,7 +70,7 @@ and helper components like:
70
70
  - `SplitPane`
71
71
  - `DragHandle`
72
72
 
73
- It also includes a specific timeout implementation that can be paused and resumed at will. `Lilact`’s `Suspense` includes additional features beyond the standard API.
73
+ `Lilact` supports module **hot-reload** and **async (lazy)** loading of components. It also includes an internal timeout implementation that can be paused and resumed at will. `Lilact`’s `Suspense` includes additional features beyond the standard API.
74
74
 
75
75
  You can see all available members and methods in the documentation. There is also a list of demos you can view alongside their code at:
76
76
  [Lilact Demo Examples](https://arashkazemi.github.io/lilact/static)
@@ -84,10 +84,10 @@ Note: modules are separated in the documentation to improve structure, but in pr
84
84
  An `ESBuild` based bundler is available in the `bin` directory. It can be used like this:
85
85
 
86
86
  ```bash
87
- npx lilact-bundle --watch --minify --entry client/App.jsx --mode production --name bundle.js --out public/dist
87
+ npx lilact-bundler --watch --minify --entry client/App.jsx --mode production --name bundle --out public/dist
88
88
  ```
89
89
 
90
- If you add a `--watch` argument, the bundler will stay running and keep watching the input file(s),
90
+ If you add the `--watch` argument, the bundler will stay running and keep watching the input file(s),
91
91
  and update the bundle if any file is changed.
92
92
 
93
93
  ---
@@ -4079,6 +4079,8 @@ function lazy(factory) {
4079
4079
  } catch (error2) {
4080
4080
  status = "error";
4081
4081
  result2 = error2;
4082
+ } finally {
4083
+ lilact_default[LAZY] = false;
4082
4084
  }
4083
4085
  if (lilact_default.isThenable(result2)) {
4084
4086
  result2.then(
@@ -4095,13 +4097,10 @@ function lazy(factory) {
4095
4097
  status = "success";
4096
4098
  }
4097
4099
  function LazyComponent(props) {
4098
- if (status === "pending") {
4099
- throw result2;
4100
- }
4101
- if (status === "error") {
4100
+ if (status === "pending" || status === "error") {
4102
4101
  throw result2;
4103
4102
  }
4104
- const Component2 = result2;
4103
+ const Component2 = result2?.default ?? result2;
4105
4104
  return createComponent(Component2, { ...props });
4106
4105
  }
4107
4106
  return LazyComponent;