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.
- package/dist/lilact.development.js +12 -7
- package/dist/lilact.development.js.map +3 -3
- package/dist/lilact.development.min.js +8 -8
- package/dist/lilact.development.min.js.map +3 -3
- package/dist/lilact.production.min.js +8 -8
- package/docs/classes/accessories.ErrorBoundary.html +8 -8
- package/docs/classes/accessories.Suspense.html +7 -7
- 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/components.cloneComponent.html +1 -1
- package/docs/functions/components.createComponent.html +1 -1
- package/docs/functions/components.createPortal.html +1 -1
- package/docs/functions/components.createRoot.html +1 -1
- package/docs/functions/components.memo.html +1 -1
- package/docs/functions/components.render.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/static/index.html +1 -1
- package/docs/static/lilact.development.js +12 -7
- package/docs/static/lilact.development.js.map +3 -3
- package/docs/static/lilact.development.min.js +8 -8
- package/docs/static/lilact.development.min.js.map +3 -3
- package/docs/static/lilact.production.min.js +8 -8
- package/docs/variables/components.cloneElement.html +1 -1
- package/examples/index.html +1 -1
- package/examples/lilact.development.js +12 -7
- package/examples/lilact.development.js.map +3 -3
- package/examples/lilact.development.min.js +8 -8
- package/examples/lilact.development.min.js.map +3 -3
- package/examples/lilact.production.min.js +8 -8
- package/package.json +1 -1
- package/src/components.jsx +18 -6
- package/src/lilact.jsx +1 -1
- 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,
|
|
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
|
-
|
|
2796
|
-
|
|
2800
|
+
error2.componentStack = stack;
|
|
2801
|
+
error2.componentStackLog = stack_log;
|
|
2797
2802
|
if (c?.component?.componentDidCatch) {
|
|
2798
|
-
c.component.componentDidCatch(
|
|
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
|
-
|
|
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:
|
|
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.
|
|
6965
|
+
VERSION: "RC.5",
|
|
6961
6966
|
// Configuration
|
|
6962
6967
|
defaultTransitionTimeout: 300,
|
|
6963
6968
|
defaultIsEqual: Object.is,
|