lilact 0.31.1 → 0.31.3
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 +13 -9
- package/dist/lilact.development.js.map +2 -2
- 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/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/functions/misc.deepEqual.html +1 -1
- package/docs/functions/{misc.getComponentByPointer.html → misc.getComponentUnderPointer.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.runScripts.html +1 -1
- package/docs/modules/misc.html +1 -1
- package/docs/static/index.html +1 -1
- package/docs/static/lilact.development.js +13 -9
- package/docs/static/lilact.development.js.map +2 -2
- 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/examples/index.html +1 -1
- package/examples/lilact.development.js +13 -9
- package/examples/lilact.development.js.map +2 -2
- 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/misc.jsx +24 -17
- package/src/run.jsx +92 -93
|
@@ -1689,7 +1689,7 @@ __export(misc_exports, {
|
|
|
1689
1689
|
eval_num: () => eval_num,
|
|
1690
1690
|
findDOMNode: () => findDOMNode,
|
|
1691
1691
|
forwardRef: () => forwardRef,
|
|
1692
|
-
|
|
1692
|
+
getComponentUnderPointer: () => getComponentUnderPointer,
|
|
1693
1693
|
id_num: () => id_num,
|
|
1694
1694
|
isAsync: () => isAsync,
|
|
1695
1695
|
isClass: () => isClass,
|
|
@@ -1929,15 +1929,20 @@ var forwardRef = (render2) => {
|
|
|
1929
1929
|
forwarded.displayName = "Forwarded " + render2.displayName;
|
|
1930
1930
|
return forwarded;
|
|
1931
1931
|
};
|
|
1932
|
-
function
|
|
1932
|
+
function getComponentUnderPointer() {
|
|
1933
1933
|
let resolve_func;
|
|
1934
1934
|
const pr = new Promise((res, rej) => {
|
|
1935
1935
|
resolve_func = res;
|
|
1936
1936
|
});
|
|
1937
|
+
const overlay = document.createElement("div");
|
|
1938
|
+
overlay.style.cssText = "position:fixed;inset:0;z-index:2147483647;cursor:crosshair;background:transparent;";
|
|
1939
|
+
document.body.appendChild(overlay);
|
|
1937
1940
|
function click_handler(event) {
|
|
1938
1941
|
event.stopImmediatePropagation();
|
|
1939
1942
|
window.removeEventListener("click", click_handler, true);
|
|
1940
|
-
|
|
1943
|
+
overlay.style.display = "none";
|
|
1944
|
+
let t = document.elementFromPoint(event.clientX, event.clientY);
|
|
1945
|
+
overlay.remove();
|
|
1941
1946
|
while (!t[COMPONENT] && t.parentNode) {
|
|
1942
1947
|
t = t.parentNode;
|
|
1943
1948
|
}
|
|
@@ -4074,6 +4079,8 @@ function lazy(factory) {
|
|
|
4074
4079
|
} catch (error2) {
|
|
4075
4080
|
status = "error";
|
|
4076
4081
|
result2 = error2;
|
|
4082
|
+
} finally {
|
|
4083
|
+
lilact_default[LAZY] = false;
|
|
4077
4084
|
}
|
|
4078
4085
|
if (lilact_default.isThenable(result2)) {
|
|
4079
4086
|
result2.then(
|
|
@@ -4090,13 +4097,10 @@ function lazy(factory) {
|
|
|
4090
4097
|
status = "success";
|
|
4091
4098
|
}
|
|
4092
4099
|
function LazyComponent(props) {
|
|
4093
|
-
if (status === "pending") {
|
|
4094
|
-
throw result2;
|
|
4095
|
-
}
|
|
4096
|
-
if (status === "error") {
|
|
4100
|
+
if (status === "pending" || status === "error") {
|
|
4097
4101
|
throw result2;
|
|
4098
4102
|
}
|
|
4099
|
-
const Component2 = result2;
|
|
4103
|
+
const Component2 = result2?.default ?? result2;
|
|
4100
4104
|
return createComponent(Component2, { ...props });
|
|
4101
4105
|
}
|
|
4102
4106
|
return LazyComponent;
|
|
@@ -7245,7 +7249,7 @@ export {
|
|
|
7245
7249
|
events_set,
|
|
7246
7250
|
findDOMNode,
|
|
7247
7251
|
forwardRef,
|
|
7248
|
-
|
|
7252
|
+
getComponentUnderPointer,
|
|
7249
7253
|
globalErrorHandler,
|
|
7250
7254
|
grabTimers,
|
|
7251
7255
|
id_num,
|