lilact 0.24.0 → 0.24.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.
Files changed (36) hide show
  1. package/README.md +3 -1
  2. package/dist/lilact.development.js +6 -1
  3. package/dist/lilact.development.js.map +2 -2
  4. package/dist/lilact.development.min.js +19 -19
  5. package/dist/lilact.development.min.js.map +3 -3
  6. package/dist/lilact.production.min.js +21 -21
  7. package/docs/classes/accessories.ErrorBoundary.html +8 -8
  8. package/docs/classes/accessories.Suspense.html +7 -7
  9. package/docs/classes/components.Component.html +11 -11
  10. package/docs/classes/components.HTMLComponent.html +11 -11
  11. package/docs/classes/components.RootComponent.html +11 -11
  12. package/docs/functions/components.cloneComponent.html +1 -1
  13. package/docs/functions/components.createComponent.html +1 -1
  14. package/docs/functions/components.createPortal.html +1 -1
  15. package/docs/functions/components.createRoot.html +1 -1
  16. package/docs/functions/components.memo.html +1 -1
  17. package/docs/functions/components.render.html +1 -1
  18. package/docs/index.html +2 -1
  19. package/docs/static/demos/cloneelement.jsx +1 -1
  20. package/docs/static/index.html +1 -1
  21. package/docs/static/lilact.development.js +6 -1
  22. package/docs/static/lilact.development.js.map +2 -2
  23. package/docs/static/lilact.development.min.js +19 -19
  24. package/docs/static/lilact.development.min.js.map +3 -3
  25. package/docs/static/lilact.production.min.js +21 -21
  26. package/docs/variables/components.cloneElement.html +1 -1
  27. package/examples/demos/cloneelement.jsx +1 -1
  28. package/examples/index.html +1 -1
  29. package/examples/lilact.development.js +6 -1
  30. package/examples/lilact.development.js.map +2 -2
  31. package/examples/lilact.development.min.js +19 -19
  32. package/examples/lilact.development.min.js.map +3 -3
  33. package/examples/lilact.production.min.js +21 -21
  34. package/package.json +1 -1
  35. package/src/components.jsx +8 -1
  36. package/impexptest.js +0 -51
package/README.md CHANGED
@@ -212,7 +212,7 @@ render(<App/>, document.body);
212
212
 
213
213
  ## Learn More / Examples / Beta Status
214
214
 
215
- `Lilact` tries to mimic `React` API as close as possible. So the [Official React API Reference](https://react.dev/reference/react) can be used as a perfect resource. Most of its examples would work in `Lilact` with just substituting import source "react" with "lilact"! There are a few differences that are mentioned in `Lilact` documentation. You can even do:
215
+ `Lilact` tries to mimic `React` API as close as possible. So the [Official React API Reference](https://react.dev/reference/react) can be used as a perfect resource. Most of its examples would work in `Lilact` with just substituting import source "react" with "lilact"! You can even do:
216
216
 
217
217
  ```jsx
218
218
  import React from "lilact"
@@ -226,6 +226,8 @@ import redux from "redux";
226
226
  import emotion from "@emotion/css";
227
227
  ```
228
228
 
229
+ Some functions are not implemented in `Lilact`, mostly because `Lilact` is only client side and doesn't need server side API. Besides that, a few missing hooks and components like `Profiler` or `StrictMode` exist, which will be implemented in the future. There are also a few differences that are mentioned in the `Lilact` documentation.
230
+
229
231
  To know more about using `Lilact`, see the included examples:
230
232
  [Lilact Examples](https://arashkazemi.github.io/lilact/static)
231
233
 
@@ -2332,6 +2332,7 @@ __export(components_exports, {
2332
2332
  update_set: () => update_set,
2333
2333
  update_timeout: () => update_timeout
2334
2334
  });
2335
+ var SVG_NS = "http://www.w3.org/2000/svg";
2335
2336
  var ComponentCache = class {
2336
2337
  constructor(owner) {
2337
2338
  __publicField(this, "owner");
@@ -2445,7 +2446,11 @@ var ComponentCore = class {
2445
2446
  if (this.component.shouldComponentUpdate && !this.component.shouldComponentUpdate(next_state, next_props, this.context)) return;
2446
2447
  if (typeof this.entity === "string") {
2447
2448
  if (!(this.element instanceof Element)) {
2448
- this.element = document.createElement(this.entity);
2449
+ if (this.parent.entity === "svg" || this.entity === "svg") {
2450
+ this.element = document.createElementNS(SVG_NS, this.entity);
2451
+ } else {
2452
+ this.element = document.createElement(this.entity);
2453
+ }
2449
2454
  if (next_props == null ? void 0 : next_props.defaultValue) this.element.value = String(next_props.defaultValue).slice(0, next_props == null ? void 0 : next_props.maxLength);
2450
2455
  if (next_props == null ? void 0 : next_props.defaultChecked) this.element.checked = next_props.defaultChecked;
2451
2456
  }