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
package/package.json
CHANGED
package/src/components.jsx
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
import Lilact from './lilact.jsx';
|
|
32
32
|
|
|
33
|
-
import { CORE, COMPONENT, TEXT, IS_ZOMBIE, IDX, CHILD_CLASS_ADDENDUM, MEMOIZED, LOCATION } from "./symbols.jsx"
|
|
33
|
+
import { CORE, COMPONENT, TEXT, IS_ZOMBIE, IDX, CHILD_CLASS_ADDENDUM, MEMOIZED, LOCATION, CLONED_STYLE } from "./symbols.jsx"
|
|
34
34
|
import { shallowEqual, toBool, isClass, isThenable } from "./misc.jsx";
|
|
35
35
|
|
|
36
36
|
import { PropTypes } from './proptypes.jsx';
|
|
@@ -298,7 +298,7 @@ class ComponentCache
|
|
|
298
298
|
ex.cleanup();
|
|
299
299
|
}
|
|
300
300
|
else if(ex.element && !ex.portal) {
|
|
301
|
-
ex.element.parentElement
|
|
301
|
+
ex.element.parentElement?.removeChild?.(ex.element);
|
|
302
302
|
}
|
|
303
303
|
});
|
|
304
304
|
});
|
|
@@ -401,6 +401,10 @@ class ComponentCore
|
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
403
|
|
|
404
|
+
if(next_props?.style && typeof next_props.style === 'object' && !next_props.style[CLONED_STYLE]) {
|
|
405
|
+
next_props.style = { ...next_props.style, [CLONED_STYLE]: true };
|
|
406
|
+
}
|
|
407
|
+
|
|
404
408
|
if(this?.parent?.component?.context || this?.parent?.component?.getChildContext ) {
|
|
405
409
|
this.context = { ...this.parent.component.context, ...this.parent.component.getChildContext?.() };
|
|
406
410
|
|
|
@@ -553,7 +557,7 @@ class ComponentCore
|
|
|
553
557
|
this.props.ref(null);
|
|
554
558
|
}
|
|
555
559
|
else {
|
|
556
|
-
this.props.current = null;
|
|
560
|
+
this.props.ref.current = null;
|
|
557
561
|
}
|
|
558
562
|
}
|
|
559
563
|
|
|
@@ -679,7 +683,7 @@ class ComponentCore
|
|
|
679
683
|
}
|
|
680
684
|
else {
|
|
681
685
|
for(let p in this.props.style) {
|
|
682
|
-
if( !patch.style.hasOwnProperty(p) ) {
|
|
686
|
+
if( p!==CLONED_STYLE && !patch.style.hasOwnProperty(p) ) {
|
|
683
687
|
this.element.style[p] = "";
|
|
684
688
|
}
|
|
685
689
|
}
|
|
@@ -705,7 +709,7 @@ class ComponentCore
|
|
|
705
709
|
else if(a==='autoFocus') { // not lower cased(al), as it is set as a js property
|
|
706
710
|
this.element['autofocus'] = toBool(patch[a]);
|
|
707
711
|
}
|
|
708
|
-
else if(a==='htmlFor') { // not lower cased(al), as it is set as a js property
|
|
712
|
+
else if(a==='htmlFor' || a==='for') { // not lower cased(al), as it is set as a js property
|
|
709
713
|
this.element.setAttribute('for', patch[a]);
|
|
710
714
|
}
|
|
711
715
|
else if(al!=='value' || ['input', 'textarea', 'select'].indexOf(this.entity)===-1) {
|
package/src/hooks.jsx
CHANGED
package/src/symbols.jsx
CHANGED
|
@@ -40,6 +40,7 @@ export const [
|
|
|
40
40
|
CHILD_CLASS_ADDENDUM,
|
|
41
41
|
MEMOIZED,
|
|
42
42
|
LAZY,
|
|
43
|
+
CLONED_STYLE,
|
|
43
44
|
|
|
44
45
|
DUE,
|
|
45
46
|
REPEAT,
|
|
@@ -59,6 +60,7 @@ export const [
|
|
|
59
60
|
Symbol.for('LILACT:CHILD_CLASS_ADDENDUM'),
|
|
60
61
|
Symbol.for('LILACT:MEMOIZED'),
|
|
61
62
|
Symbol.for('LILACT:LAZY'),
|
|
63
|
+
Symbol.for('LILACT:CLONED_STYLE'),
|
|
62
64
|
|
|
63
65
|
Symbol.for('LILACT:TIMERS:DUE'),
|
|
64
66
|
Symbol.for('LILACT:TIMERS:REPEAT'),
|