lilact 0.28.4 → 0.28.5
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 +18 -13
- package/dist/lilact.development.js.map +2 -2
- package/dist/lilact.development.min.js +22 -22
- package/dist/lilact.development.min.js.map +2 -2
- package/dist/lilact.production.min.js +22 -22
- 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 +0 -2
- package/docs/static/lilact.development.js +18 -13
- package/docs/static/lilact.development.js.map +2 -2
- package/docs/static/lilact.development.min.js +22 -22
- package/docs/static/lilact.development.min.js.map +2 -2
- package/docs/static/lilact.production.min.js +22 -22
- package/docs/variables/components.cloneElement.html +1 -1
- package/examples/lilact.development.js +18 -13
- package/examples/lilact.development.js.map +2 -2
- package/examples/lilact.development.min.js +22 -22
- package/examples/lilact.development.min.js.map +2 -2
- package/examples/lilact.production.min.js +22 -22
- package/package.json +1 -1
- package/src/components.jsx +21 -14
- package/src/run.jsx +1 -0
package/package.json
CHANGED
package/src/components.jsx
CHANGED
|
@@ -310,23 +310,29 @@ if(DEBUG) {
|
|
|
310
310
|
i--;
|
|
311
311
|
}
|
|
312
312
|
else {
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
try {
|
|
314
|
+
const core = prepareCore(this, item);
|
|
315
|
+
this.outlet[i] = core;
|
|
315
316
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}
|
|
320
|
-
else {
|
|
321
|
-
if(!core.element) {
|
|
322
|
-
core.element = document.createTextNode(item[TEXT]);
|
|
323
|
-
core[TEXT] = item[TEXT];
|
|
317
|
+
if(core[TEXT]===undefined) {
|
|
318
|
+
core.container = this.element? this : this.container;
|
|
319
|
+
core.apply(item.props);
|
|
324
320
|
}
|
|
325
|
-
else
|
|
326
|
-
core.element
|
|
327
|
-
|
|
321
|
+
else {
|
|
322
|
+
if(!core.element) {
|
|
323
|
+
core.element = document.createTextNode(item[TEXT]);
|
|
324
|
+
core[TEXT] = item[TEXT];
|
|
325
|
+
}
|
|
326
|
+
else if(core[TEXT]!==item[TEXT]) {
|
|
327
|
+
core.element.textContent = item[TEXT];
|
|
328
|
+
core[TEXT] = item[TEXT];
|
|
329
|
+
}
|
|
328
330
|
}
|
|
329
331
|
}
|
|
332
|
+
catch(e) {
|
|
333
|
+
renderErrorHandler(this, e);
|
|
334
|
+
}
|
|
335
|
+
|
|
330
336
|
}
|
|
331
337
|
}
|
|
332
338
|
|
|
@@ -633,10 +639,12 @@ if(DEBUG) {
|
|
|
633
639
|
const renderErrorHandler = (c, e) =>
|
|
634
640
|
{
|
|
635
641
|
const stack = [c];
|
|
642
|
+
|
|
636
643
|
while(c && !c.component?.componentDidCatch) {
|
|
637
644
|
c = c.parent;
|
|
638
645
|
if(c) stack.push(c);
|
|
639
646
|
}
|
|
647
|
+
|
|
640
648
|
if(c?.component?.componentDidCatch) {
|
|
641
649
|
if(c.entity?.getDerivedStateFromError) {
|
|
642
650
|
c.component.setState(c.entity.getDerivedStateFromError.call(c, e));
|
|
@@ -655,7 +663,6 @@ const renderErrorHandler = (c, e) =>
|
|
|
655
663
|
c.component.componentDidCatch(e, {componentStack: stack, componentStackLog: stack_log});
|
|
656
664
|
}
|
|
657
665
|
else throw(e);
|
|
658
|
-
|
|
659
666
|
}
|
|
660
667
|
|
|
661
668
|
|