lilact 0.31.7 → 0.31.8
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 +12 -6
- 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.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/static/lilact.development.js +12 -6
- 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 +12 -6
- 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 +1 -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"),
|
|
@@ -2543,7 +2546,7 @@ var ComponentCache = class {
|
|
|
2543
2546
|
if (ex.cleanup) {
|
|
2544
2547
|
ex.cleanup();
|
|
2545
2548
|
} else if (ex.element && !ex.portal) {
|
|
2546
|
-
ex.element.parentElement
|
|
2549
|
+
ex.element.parentElement?.removeChild?.(ex.element);
|
|
2547
2550
|
}
|
|
2548
2551
|
});
|
|
2549
2552
|
});
|
|
@@ -2610,6 +2613,9 @@ var ComponentCore = class {
|
|
|
2610
2613
|
...next_props || {}
|
|
2611
2614
|
};
|
|
2612
2615
|
}
|
|
2616
|
+
if (next_props?.style && typeof next_props.style === "object" && !next_props.style[CLONED_STYLE]) {
|
|
2617
|
+
next_props.style = { ...next_props.style, [CLONED_STYLE]: true };
|
|
2618
|
+
}
|
|
2613
2619
|
if (this?.parent?.component?.context || this?.parent?.component?.getChildContext) {
|
|
2614
2620
|
this.context = { ...this.parent.component.context, ...this.parent.component.getChildContext?.() };
|
|
2615
2621
|
if (this.component.constructor.contextTypes) {
|
|
@@ -2717,7 +2723,7 @@ var ComponentCore = class {
|
|
|
2717
2723
|
if (typeof this.props.ref === "function") {
|
|
2718
2724
|
this.props.ref(null);
|
|
2719
2725
|
} else {
|
|
2720
|
-
this.props.current = null;
|
|
2726
|
+
this.props.ref.current = null;
|
|
2721
2727
|
}
|
|
2722
2728
|
}
|
|
2723
2729
|
if (this.component.componentWillUnmount) {
|
|
@@ -2811,7 +2817,7 @@ var ComponentCore = class {
|
|
|
2811
2817
|
this.element.style = "";
|
|
2812
2818
|
} else {
|
|
2813
2819
|
for (let p in this.props.style) {
|
|
2814
|
-
if (!patch.style.hasOwnProperty(p)) {
|
|
2820
|
+
if (p !== CLONED_STYLE && !patch.style.hasOwnProperty(p)) {
|
|
2815
2821
|
this.element.style[p] = "";
|
|
2816
2822
|
}
|
|
2817
2823
|
}
|
|
@@ -2833,7 +2839,7 @@ var ComponentCore = class {
|
|
|
2833
2839
|
}
|
|
2834
2840
|
} else if (a === "autoFocus") {
|
|
2835
2841
|
this.element["autofocus"] = toBool(patch[a]);
|
|
2836
|
-
} else if (a === "htmlFor") {
|
|
2842
|
+
} else if (a === "htmlFor" || a === "for") {
|
|
2837
2843
|
this.element.setAttribute("for", patch[a]);
|
|
2838
2844
|
} else if (al !== "value" || ["input", "textarea", "select"].indexOf(this.entity) === -1) {
|
|
2839
2845
|
this.element.setAttribute(al, patch[a]);
|
|
@@ -3719,8 +3725,7 @@ function useActionState(action, initialState) {
|
|
|
3719
3725
|
async () => {
|
|
3720
3726
|
const form_data = new FormData(event.target, event.submitter);
|
|
3721
3727
|
hk.state = await action(hk.state, form_data);
|
|
3722
|
-
}
|
|
3723
|
-
[]
|
|
3728
|
+
}
|
|
3724
3729
|
);
|
|
3725
3730
|
return false;
|
|
3726
3731
|
};
|
|
@@ -7221,6 +7226,7 @@ export {
|
|
|
7221
7226
|
CALLBACK,
|
|
7222
7227
|
CHILD_CLASS_ADDENDUM,
|
|
7223
7228
|
CLEARED,
|
|
7229
|
+
CLONED_STYLE,
|
|
7224
7230
|
COMPONENT,
|
|
7225
7231
|
CORE,
|
|
7226
7232
|
CSSTransition,
|