lilact 0.26.16 → 0.27.0
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 +236 -337
- package/dist/lilact.development.js.map +3 -3
- package/dist/lilact.development.min.js +34 -34
- package/dist/lilact.development.min.js.map +3 -3
- package/dist/lilact.production.min.js +34 -34
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- 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/errors.globalErrorHandler.html +1 -2
- package/docs/functions/errors.scanBlockLabels.html +1 -2
- package/docs/functions/errors.traceError.html +1 -3
- package/docs/functions/hooks.startTransition.html +1 -1
- package/docs/functions/hooks.useActionState.html +1 -1
- package/docs/functions/hooks.useDebugValue.html +1 -1
- package/docs/functions/hooks.useDeferredValue.html +1 -1
- package/docs/functions/hooks.useEffect.html +1 -1
- package/docs/functions/hooks.useImperativeHandle.html +1 -1
- package/docs/functions/hooks.useInsertionEffect.html +1 -1
- package/docs/functions/hooks.useMemo.html +1 -1
- package/docs/functions/hooks.useReducer.html +1 -1
- package/docs/functions/run.lazy.html +1 -2
- package/docs/functions/run.require.html +1 -2
- package/docs/functions/run.run.html +1 -2
- package/docs/functions/run.runScripts.html +1 -1
- package/docs/functions/timers.timeoutPromise.html +3 -3
- package/docs/modules/errors.html +1 -1
- package/docs/modules/run.html +1 -1
- package/docs/static/index.html +1 -1
- package/docs/static/lilact.development.js +236 -337
- package/docs/static/lilact.development.js.map +3 -3
- package/docs/static/lilact.development.min.js +34 -34
- package/docs/static/lilact.development.min.js.map +3 -3
- package/docs/static/lilact.production.min.js +34 -34
- package/docs/variables/components.cloneElement.html +1 -1
- package/docs/variables/errors.blocks_info.html +1 -1
- package/docs/variables/errors.error.html +1 -1
- package/docs/variables/run.required_scripts.html +1 -0
- package/examples/index.html +1 -1
- package/examples/lilact.development.js +236 -337
- package/examples/lilact.development.js.map +3 -3
- package/examples/lilact.development.min.js +34 -34
- package/examples/lilact.development.min.js.map +3 -3
- package/examples/lilact.production.min.js +34 -34
- package/package.json +1 -1
- package/src/components.jsx +10 -4
- package/src/errors.jsx +179 -364
- package/src/expscan.js +1 -1
- package/src/hooks.jsx +8 -5
- package/src/jsx.js +14 -14
- package/src/lilact.jsx +1 -1
- package/src/run.jsx +119 -157
- package/docs/functions/errors.mapLocation.html +0 -1
package/package.json
CHANGED
package/src/components.jsx
CHANGED
|
@@ -371,7 +371,7 @@ if(DEBUG) {
|
|
|
371
371
|
if(this.outlet!==undefined) {
|
|
372
372
|
for(let c of this.outlet) {
|
|
373
373
|
if(c.cleanup) {
|
|
374
|
-
c.cleanup();
|
|
374
|
+
promises.push(c.cleanup());
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
}
|
|
@@ -379,7 +379,7 @@ if(DEBUG) {
|
|
|
379
379
|
if(this.props?.children!==undefined) {
|
|
380
380
|
for(let c of this.props.children) {
|
|
381
381
|
if(c.cleanup) {
|
|
382
|
-
c.cleanup();
|
|
382
|
+
promises.push(c.cleanup());
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
}
|
|
@@ -387,10 +387,12 @@ if(DEBUG) {
|
|
|
387
387
|
if(this.hooks!==undefined) {
|
|
388
388
|
for(let h of this.hooks) {
|
|
389
389
|
if(h.cleanup) {
|
|
390
|
-
h.cleanup();
|
|
390
|
+
promises.push(h.cleanup());
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
+
|
|
395
|
+
await Promise.all(promises);
|
|
394
396
|
}
|
|
395
397
|
|
|
396
398
|
catch(e) {
|
|
@@ -400,6 +402,9 @@ if(DEBUG) {
|
|
|
400
402
|
|
|
401
403
|
updateElementProps(patch, force=false)
|
|
402
404
|
{
|
|
405
|
+
// note: string.slice(0,undefined) returns the complete string. that's why
|
|
406
|
+
// the slices are correct even if maxLength is not set.
|
|
407
|
+
|
|
403
408
|
if(this.entity==="input") {
|
|
404
409
|
if(!patch?.type) patch.type = 'text';
|
|
405
410
|
if(patch.type!==this.element.type) {
|
|
@@ -432,7 +437,7 @@ if(DEBUG) {
|
|
|
432
437
|
this.event_detachers[al]();
|
|
433
438
|
}
|
|
434
439
|
else {
|
|
435
|
-
this.element.
|
|
440
|
+
this.element.removeAttribute(a);
|
|
436
441
|
}
|
|
437
442
|
}
|
|
438
443
|
}
|
|
@@ -485,6 +490,7 @@ if(DEBUG) {
|
|
|
485
490
|
}
|
|
486
491
|
else if(boolean_html_attributes_set.has(a)) { // not lower cased(al), as it is set as a js property
|
|
487
492
|
this.element[a] = toBool(patch[a]);
|
|
493
|
+
if(!this.element[a]) this.element.removeAttribute(a);
|
|
488
494
|
}
|
|
489
495
|
else if(a==='autoFocus') { // not lower cased(al), as it is set as a js property
|
|
490
496
|
this.element['autofocus'] = toBool(patch[a]);
|