lilact 0.27.0 → 0.27.2
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 +238 -135
- package/dist/lilact.development.js.map +3 -3
- package/dist/lilact.development.min.js +57 -57
- package/dist/lilact.development.min.js.map +3 -3
- package/dist/lilact.production.min.js +57 -57
- package/docs/classes/accessories.ErrorBoundary.html +3 -3
- package/docs/classes/accessories.Suspense.html +2 -2
- package/docs/classes/components.Component.html +3 -3
- package/docs/classes/components.HTMLComponent.html +4 -4
- package/docs/classes/components.RootComponent.html +5 -5
- 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/hooks.createContext.html +1 -1
- package/docs/functions/hooks.startTransition.html +1 -1
- package/docs/functions/hooks.useActionState.html +1 -1
- package/docs/functions/hooks.useContext.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.useId.html +1 -1
- package/docs/functions/hooks.useImperativeHandle.html +1 -1
- package/docs/functions/hooks.useInsertionEffect.html +1 -1
- package/docs/functions/hooks.useLayoutEffect.html +1 -1
- package/docs/functions/hooks.useLocalStorage.html +1 -1
- package/docs/functions/hooks.useMemo.html +1 -1
- package/docs/functions/hooks.useReducer.html +1 -1
- package/docs/functions/hooks.useRef.html +1 -1
- package/docs/functions/hooks.useTransition.html +1 -1
- package/docs/functions/misc.Fragment.html +2 -2
- package/docs/functions/misc.Portal.html +2 -2
- package/docs/functions/misc.deepEqual.html +1 -1
- package/docs/functions/misc.findDOMNode.html +1 -1
- package/docs/functions/misc.forwardRef.html +1 -1
- package/docs/functions/misc.getComponentByPointer.html +1 -1
- package/docs/functions/misc.isAsync.html +1 -1
- package/docs/functions/misc.isClass.html +1 -1
- package/docs/functions/misc.isEmpty.html +1 -1
- package/docs/functions/misc.isError.html +1 -1
- package/docs/functions/misc.isThenable.html +1 -1
- package/docs/functions/misc.shallowEqual.html +1 -1
- package/docs/functions/misc.toBool.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/functions/timers.timeoutPromise.html +10 -10
- package/docs/static/index.html +1 -1
- package/docs/static/lilact.development.js +238 -135
- package/docs/static/lilact.development.js.map +3 -3
- package/docs/static/lilact.development.min.js +57 -57
- package/docs/static/lilact.development.min.js.map +3 -3
- package/docs/static/lilact.production.min.js +57 -57
- package/docs/variables/components.cloneElement.html +1 -1
- package/docs/variables/misc.Children.html +10 -10
- package/docs/variables/misc.isValidElement.html +1 -1
- package/docs/variables/run.required_scripts.html +1 -1
- package/examples/index.html +1 -1
- package/examples/lilact.development.js +238 -135
- package/examples/lilact.development.js.map +3 -3
- package/examples/lilact.development.min.js +57 -57
- package/examples/lilact.development.min.js.map +3 -3
- package/examples/lilact.production.min.js +57 -57
- package/package.json +1 -1
- package/src/components.jsx +24 -13
- package/src/errors.jsx +310 -310
- package/src/hooks.jsx +60 -44
- package/src/lilact.jsx +4 -2
- package/src/misc.jsx +46 -18
- package/src/run.jsx +406 -291
package/package.json
CHANGED
package/src/components.jsx
CHANGED
|
@@ -639,9 +639,9 @@ const renderErrorHandler = (c, e) =>
|
|
|
639
639
|
}
|
|
640
640
|
|
|
641
641
|
let stack_log = Array.prototype
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
642
|
+
.map.call(stack, x => (`in ${typeof(x.component.displayName)==='function'?
|
|
643
|
+
x.component.displayName():x.component.displayName}` ) )
|
|
644
|
+
.join('\n');
|
|
645
645
|
|
|
646
646
|
e.componentStack = stack;
|
|
647
647
|
e.componentStackLog = stack_log;
|
|
@@ -774,8 +774,8 @@ function doUpdates()
|
|
|
774
774
|
- Layout effects (run immediately after insertion effects, still before paint).
|
|
775
775
|
- Passive effects (useEffect)
|
|
776
776
|
|
|
777
|
-
|
|
778
|
-
|
|
777
|
+
schedule them for after paint using requestAnimationFrame, typically:
|
|
778
|
+
run the “after paint” work in the next frame or in a callback scheduled such that it runs after the browser has performed the paint.
|
|
779
779
|
|
|
780
780
|
|
|
781
781
|
Current task: render → DOM updates → insertion effects → layout effects
|
|
@@ -971,15 +971,26 @@ export class Component
|
|
|
971
971
|
* It can also be set for function components.
|
|
972
972
|
* @type {string}
|
|
973
973
|
*/
|
|
974
|
-
displayName()
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
if(
|
|
978
|
-
|
|
979
|
-
|
|
974
|
+
displayName() {
|
|
975
|
+
const entity = this[CORE].entity;
|
|
976
|
+
|
|
977
|
+
if (entity?.displayName) {
|
|
978
|
+
return typeof entity.displayName === "function"
|
|
979
|
+
? entity.displayName()
|
|
980
|
+
: entity.displayName;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
if (typeof entity === "string") {
|
|
984
|
+
return entity;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
if (typeof entity === "function") {
|
|
988
|
+
return entity.name || "Component";
|
|
989
|
+
}
|
|
990
|
+
|
|
980
991
|
return "Component";
|
|
981
992
|
}
|
|
982
|
-
|
|
993
|
+
|
|
983
994
|
constructor(props)
|
|
984
995
|
{
|
|
985
996
|
this[CORE] = new ComponentCore(this, props);
|
|
@@ -1385,7 +1396,7 @@ export const events_set = new Set([
|
|
|
1385
1396
|
/** @ignore */
|
|
1386
1397
|
export const capture_events_set = {};
|
|
1387
1398
|
for (const x of events_set) {
|
|
1388
|
-
|
|
1399
|
+
capture_events_set[x+"capture"] = x;
|
|
1389
1400
|
}
|
|
1390
1401
|
|
|
1391
1402
|
/** @ignore */
|