lilact 0.29.0 → 0.29.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 (37) hide show
  1. package/dist/lilact.development.js +12 -7
  2. package/dist/lilact.development.js.map +3 -3
  3. package/dist/lilact.development.min.js +8 -8
  4. package/dist/lilact.development.min.js.map +3 -3
  5. package/dist/lilact.production.min.js +8 -8
  6. package/docs/classes/accessories.ErrorBoundary.html +8 -8
  7. package/docs/classes/accessories.Suspense.html +7 -7
  8. package/docs/classes/components.Component.html +11 -11
  9. package/docs/classes/components.HTMLComponent.html +11 -11
  10. package/docs/classes/components.RootComponent.html +11 -11
  11. package/docs/functions/components.cloneComponent.html +1 -1
  12. package/docs/functions/components.createComponent.html +1 -1
  13. package/docs/functions/components.createPortal.html +1 -1
  14. package/docs/functions/components.createRoot.html +1 -1
  15. package/docs/functions/components.memo.html +1 -1
  16. package/docs/functions/components.render.html +1 -1
  17. package/docs/functions/run.lazy.html +1 -1
  18. package/docs/functions/run.require.html +1 -1
  19. package/docs/functions/run.run.html +1 -1
  20. package/docs/functions/run.runScripts.html +1 -1
  21. package/docs/static/index.html +1 -1
  22. package/docs/static/lilact.development.js +12 -7
  23. package/docs/static/lilact.development.js.map +3 -3
  24. package/docs/static/lilact.development.min.js +8 -8
  25. package/docs/static/lilact.development.min.js.map +3 -3
  26. package/docs/static/lilact.production.min.js +8 -8
  27. package/docs/variables/components.cloneElement.html +1 -1
  28. package/examples/index.html +1 -1
  29. package/examples/lilact.development.js +12 -7
  30. package/examples/lilact.development.js.map +3 -3
  31. package/examples/lilact.development.min.js +8 -8
  32. package/examples/lilact.development.min.js.map +3 -3
  33. package/examples/lilact.production.min.js +8 -8
  34. package/package.json +1 -1
  35. package/src/components.jsx +18 -6
  36. package/src/lilact.jsx +1 -1
  37. package/src/run.jsx +6 -2
@@ -2781,6 +2781,11 @@ var ComponentCore = class {
2781
2781
  }
2782
2782
  };
2783
2783
  var renderErrorHandler = (c, e) => {
2784
+ const value = e?.error instanceof Error ? e.error : e?.reason !== void 0 ? e.reason : e;
2785
+ const error2 = lilact_default.isThenable(e) ? e : lilact_default.traceError(
2786
+ value,
2787
+ e?.fileName || null
2788
+ );
2784
2789
  const stack = [c];
2785
2790
  while (c && !c.component?.componentDidCatch) {
2786
2791
  c = c.parent;
@@ -2788,14 +2793,14 @@ var renderErrorHandler = (c, e) => {
2788
2793
  }
2789
2794
  if (c?.component?.componentDidCatch) {
2790
2795
  if (c.entity?.getDerivedStateFromError) {
2791
- c.component.setState(c.entity.getDerivedStateFromError.call(c, e));
2796
+ c.component.setState(c.entity.getDerivedStateFromError.call(c, error2));
2792
2797
  }
2793
2798
  }
2794
2799
  let stack_log = Array.prototype.map.call(stack, (x) => `in ${typeof x.component.displayName === "function" ? x.component.displayName() : x.component.displayName}`).join("\n");
2795
- e.componentStack = stack;
2796
- e.componentStackLog = stack_log;
2800
+ error2.componentStack = stack;
2801
+ error2.componentStackLog = stack_log;
2797
2802
  if (c?.component?.componentDidCatch) {
2798
- c.component.componentDidCatch(e, { componentStack: stack, componentStackLog: stack_log });
2803
+ c.component.componentDidCatch(error2, { componentStack: stack, componentStackLog: stack_log });
2799
2804
  } else throw e;
2800
2805
  };
2801
2806
  function constructFunc(core, parent) {
@@ -3758,7 +3763,7 @@ function run(jsx, path = `InlineJSX-${++lilact_default.eval_num}`, {} = {}) {
3758
3763
  globalThis.Lilact = lilact_default;
3759
3764
  globalThis.createComponent = lilact_default.createComponent;
3760
3765
  globalThis.Fragment = lilact_default.Fragment;
3761
- if (!module.importsObject) makeImportsObject(module);
3766
+ makeImportsObject(module);
3762
3767
  lilact_default.scriptImportsObject = module.importsObject;
3763
3768
  const result = eval(processed);
3764
3769
  module.loaded = true;
@@ -3876,7 +3881,7 @@ function require2(path2) {
3876
3881
  module2.loaded = true;
3877
3882
  return void 0;
3878
3883
  }
3879
- return run(request.responseText, path2, { forceReload: options.forceReload });
3884
+ return run(request.responseText, path2, { forceReload: true });
3880
3885
  }
3881
3886
  throw report(
3882
3887
  new Error(
@@ -6957,7 +6962,7 @@ function transpileJSX(jsx2, {
6957
6962
 
6958
6963
  // .tmp/src/lilact.jsx
6959
6964
  var Lilact2 = {
6960
- VERSION: "RC.4",
6965
+ VERSION: "RC.5",
6961
6966
  // Configuration
6962
6967
  defaultTransitionTimeout: 300,
6963
6968
  defaultIsEqual: Object.is,