lilact 0.31.7 → 0.31.9
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 -10
- package/dist/lilact.development.js.map +2 -2
- package/dist/lilact.development.min.js +26 -26
- package/dist/lilact.development.min.js.map +3 -3
- package/dist/lilact.production.min.js +26 -26
- 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/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.useImperativeHandle.html +1 -1
- package/docs/functions/hooks.useReducer.html +1 -1
- package/docs/functions/misc.deepEqual.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/static/lilact.development.js +18 -10
- package/docs/static/lilact.development.js.map +2 -2
- package/docs/static/lilact.development.min.js +26 -26
- package/docs/static/lilact.development.min.js.map +3 -3
- package/docs/static/lilact.production.min.js +26 -26
- package/docs/variables/components.cloneElement.html +1 -1
- package/examples/lilact.development.js +18 -10
- package/examples/lilact.development.js.map +2 -2
- package/examples/lilact.development.min.js +26 -26
- package/examples/lilact.development.min.js.map +3 -3
- package/examples/lilact.production.min.js +26 -26
- package/package.json +1 -1
- package/src/components.jsx +9 -5
- package/src/hooks.jsx +6 -7
- package/src/lilact.jsx +2 -2
- package/src/misc.jsx +4 -2
- package/src/symbols.jsx +2 -0
|
@@ -1709,6 +1709,7 @@ __export(symbols_exports, {
|
|
|
1709
1709
|
CALLBACK: () => CALLBACK,
|
|
1710
1710
|
CHILD_CLASS_ADDENDUM: () => CHILD_CLASS_ADDENDUM,
|
|
1711
1711
|
CLEARED: () => CLEARED,
|
|
1712
|
+
CLONED_STYLE: () => CLONED_STYLE,
|
|
1712
1713
|
COMPONENT: () => COMPONENT,
|
|
1713
1714
|
CORE: () => CORE,
|
|
1714
1715
|
DUE: () => DUE,
|
|
@@ -1731,6 +1732,7 @@ var [
|
|
|
1731
1732
|
CHILD_CLASS_ADDENDUM,
|
|
1732
1733
|
MEMOIZED,
|
|
1733
1734
|
LAZY,
|
|
1735
|
+
CLONED_STYLE,
|
|
1734
1736
|
DUE,
|
|
1735
1737
|
REPEAT,
|
|
1736
1738
|
CLEARED,
|
|
@@ -1747,6 +1749,7 @@ var [
|
|
|
1747
1749
|
/* @__PURE__ */ Symbol.for("LILACT:CHILD_CLASS_ADDENDUM"),
|
|
1748
1750
|
/* @__PURE__ */ Symbol.for("LILACT:MEMOIZED"),
|
|
1749
1751
|
/* @__PURE__ */ Symbol.for("LILACT:LAZY"),
|
|
1752
|
+
/* @__PURE__ */ Symbol.for("LILACT:CLONED_STYLE"),
|
|
1750
1753
|
/* @__PURE__ */ Symbol.for("LILACT:TIMERS:DUE"),
|
|
1751
1754
|
/* @__PURE__ */ Symbol.for("LILACT:TIMERS:REPEAT"),
|
|
1752
1755
|
/* @__PURE__ */ Symbol.for("LILACT:TIMERS:CLEARED"),
|
|
@@ -1936,7 +1939,6 @@ function getComponentUnderPointer() {
|
|
|
1936
1939
|
});
|
|
1937
1940
|
const overlay = document.createElement("div");
|
|
1938
1941
|
overlay.style.cssText = "position:fixed;inset:0;z-index:2147483647;cursor:crosshair;background:transparent;";
|
|
1939
|
-
document.body.appendChild(overlay);
|
|
1940
1942
|
function click_handler(event) {
|
|
1941
1943
|
event.stopImmediatePropagation();
|
|
1942
1944
|
window.removeEventListener("click", click_handler, true);
|
|
@@ -1949,7 +1951,10 @@ function getComponentUnderPointer() {
|
|
|
1949
1951
|
resolve_func(t[COMPONENT]);
|
|
1950
1952
|
return false;
|
|
1951
1953
|
}
|
|
1952
|
-
|
|
1954
|
+
setTimeout(() => {
|
|
1955
|
+
document.body.appendChild(overlay);
|
|
1956
|
+
window.addEventListener("click", click_handler, true);
|
|
1957
|
+
}, 50);
|
|
1953
1958
|
return pr;
|
|
1954
1959
|
}
|
|
1955
1960
|
function isEmpty(value) {
|
|
@@ -2543,7 +2548,7 @@ var ComponentCache = class {
|
|
|
2543
2548
|
if (ex.cleanup) {
|
|
2544
2549
|
ex.cleanup();
|
|
2545
2550
|
} else if (ex.element && !ex.portal) {
|
|
2546
|
-
ex.element.parentElement
|
|
2551
|
+
ex.element.parentElement?.removeChild?.(ex.element);
|
|
2547
2552
|
}
|
|
2548
2553
|
});
|
|
2549
2554
|
});
|
|
@@ -2610,6 +2615,9 @@ var ComponentCore = class {
|
|
|
2610
2615
|
...next_props || {}
|
|
2611
2616
|
};
|
|
2612
2617
|
}
|
|
2618
|
+
if (next_props?.style && typeof next_props.style === "object" && !next_props.style[CLONED_STYLE]) {
|
|
2619
|
+
next_props.style = { ...next_props.style, [CLONED_STYLE]: true };
|
|
2620
|
+
}
|
|
2613
2621
|
if (this?.parent?.component?.context || this?.parent?.component?.getChildContext) {
|
|
2614
2622
|
this.context = { ...this.parent.component.context, ...this.parent.component.getChildContext?.() };
|
|
2615
2623
|
if (this.component.constructor.contextTypes) {
|
|
@@ -2717,7 +2725,7 @@ var ComponentCore = class {
|
|
|
2717
2725
|
if (typeof this.props.ref === "function") {
|
|
2718
2726
|
this.props.ref(null);
|
|
2719
2727
|
} else {
|
|
2720
|
-
this.props.current = null;
|
|
2728
|
+
this.props.ref.current = null;
|
|
2721
2729
|
}
|
|
2722
2730
|
}
|
|
2723
2731
|
if (this.component.componentWillUnmount) {
|
|
@@ -2811,7 +2819,7 @@ var ComponentCore = class {
|
|
|
2811
2819
|
this.element.style = "";
|
|
2812
2820
|
} else {
|
|
2813
2821
|
for (let p in this.props.style) {
|
|
2814
|
-
if (!patch
|
|
2822
|
+
if (p !== CLONED_STYLE && !patch?.style?.hasOwnProperty?.(p)) {
|
|
2815
2823
|
this.element.style[p] = "";
|
|
2816
2824
|
}
|
|
2817
2825
|
}
|
|
@@ -2833,7 +2841,7 @@ var ComponentCore = class {
|
|
|
2833
2841
|
}
|
|
2834
2842
|
} else if (a === "autoFocus") {
|
|
2835
2843
|
this.element["autofocus"] = toBool(patch[a]);
|
|
2836
|
-
} else if (a === "htmlFor") {
|
|
2844
|
+
} else if (a === "htmlFor" || a === "for") {
|
|
2837
2845
|
this.element.setAttribute("for", patch[a]);
|
|
2838
2846
|
} else if (al !== "value" || ["input", "textarea", "select"].indexOf(this.entity) === -1) {
|
|
2839
2847
|
this.element.setAttribute(al, patch[a]);
|
|
@@ -3719,8 +3727,7 @@ function useActionState(action, initialState) {
|
|
|
3719
3727
|
async () => {
|
|
3720
3728
|
const form_data = new FormData(event.target, event.submitter);
|
|
3721
3729
|
hk.state = await action(hk.state, form_data);
|
|
3722
|
-
}
|
|
3723
|
-
[]
|
|
3730
|
+
}
|
|
3724
3731
|
);
|
|
3725
3732
|
return false;
|
|
3726
3733
|
};
|
|
@@ -7213,14 +7220,15 @@ if (true) {
|
|
|
7213
7220
|
});
|
|
7214
7221
|
}
|
|
7215
7222
|
if (true) {
|
|
7216
|
-
console.
|
|
7217
|
-
console.
|
|
7223
|
+
console.info(`Lilact (Version: ${Lilact2.VERSION}) - Debug Mode`);
|
|
7224
|
+
console.info(`Copyright(C) 2024-2026 Arash Kazemi <contact.arash.kazemi@gmail.com>`);
|
|
7218
7225
|
}
|
|
7219
7226
|
export {
|
|
7220
7227
|
ARGS,
|
|
7221
7228
|
CALLBACK,
|
|
7222
7229
|
CHILD_CLASS_ADDENDUM,
|
|
7223
7230
|
CLEARED,
|
|
7231
|
+
CLONED_STYLE,
|
|
7224
7232
|
COMPONENT,
|
|
7225
7233
|
CORE,
|
|
7226
7234
|
CSSTransition,
|