@tamagui/core 1.124.9 → 1.124.10
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/native.js +14 -7
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +14 -7
- package/dist/test.native.js.map +1 -1
- package/package.json +7 -7
package/dist/test.native.js
CHANGED
|
@@ -5671,24 +5671,29 @@ var require_createShallowSetState_native = __commonJS({
|
|
|
5671
5671
|
var import_react3 = require("react"), callImmediate = function(cb) {
|
|
5672
5672
|
return cb();
|
|
5673
5673
|
};
|
|
5674
|
-
function createShallowSetState(setter,
|
|
5674
|
+
function createShallowSetState(setter, onlyAllow, transition, debug, callback) {
|
|
5675
5675
|
return (0, import_react3.useCallback)(function(next) {
|
|
5676
5676
|
var wrap = transition ? import_react3.startTransition : callImmediate;
|
|
5677
5677
|
wrap(function() {
|
|
5678
5678
|
setter(function(prev) {
|
|
5679
|
-
var out = mergeIfNotShallowEqual(prev, next,
|
|
5679
|
+
var out = mergeIfNotShallowEqual(prev, next, onlyAllow, debug);
|
|
5680
5680
|
return callback == null || callback(out), out;
|
|
5681
5681
|
});
|
|
5682
5682
|
});
|
|
5683
5683
|
}, [
|
|
5684
5684
|
setter,
|
|
5685
|
-
|
|
5685
|
+
onlyAllow ? onlyAllow.join("") : "",
|
|
5686
5686
|
transition,
|
|
5687
5687
|
debug
|
|
5688
5688
|
]);
|
|
5689
5689
|
}
|
|
5690
|
-
function mergeIfNotShallowEqual(prev, next,
|
|
5691
|
-
|
|
5690
|
+
function mergeIfNotShallowEqual(prev, next, onlyAllow, debug) {
|
|
5691
|
+
if (onlyAllow) {
|
|
5692
|
+
var allowed = {};
|
|
5693
|
+
for (var key in next) onlyAllow.includes(key) && (allowed[key] = next[key]);
|
|
5694
|
+
next = allowed;
|
|
5695
|
+
}
|
|
5696
|
+
return !prev || !next || isEqualShallow(prev, next) ? prev || next : {
|
|
5692
5697
|
...prev,
|
|
5693
5698
|
...next
|
|
5694
5699
|
};
|
|
@@ -6615,7 +6620,9 @@ var require_useComponentState_native = __commonJS({
|
|
|
6615
6620
|
groupContextState[groupName] = next;
|
|
6616
6621
|
};
|
|
6617
6622
|
}
|
|
6618
|
-
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled
|
|
6623
|
+
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled ? [
|
|
6624
|
+
"disabled"
|
|
6625
|
+
] : void 0, !1, props.debug, setStateWrapper);
|
|
6619
6626
|
if (presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
6620
6627
|
var { enterVariant, exitVariant, enterExitVariant, custom } = presenceState;
|
|
6621
6628
|
(0, import_isObj.isObj)(custom) && Object.assign(props, custom);
|
|
@@ -9180,7 +9187,7 @@ var require_useProps_native = __commonJS({
|
|
|
9180
9187
|
resolveValues: "auto",
|
|
9181
9188
|
...opts
|
|
9182
9189
|
}, null, componentContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
9183
|
-
return import_react3.default.
|
|
9190
|
+
return import_react3.default.useLayoutEffect(function() {
|
|
9184
9191
|
if (!disabled) {
|
|
9185
9192
|
if (state.unmounted) {
|
|
9186
9193
|
setStateShallow({
|