@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/native.js
CHANGED
|
@@ -6050,24 +6050,29 @@ var require_createShallowSetState_native = __commonJS({
|
|
|
6050
6050
|
var import_react3 = require("react"), callImmediate = function(cb) {
|
|
6051
6051
|
return cb();
|
|
6052
6052
|
};
|
|
6053
|
-
function createShallowSetState(setter,
|
|
6053
|
+
function createShallowSetState(setter, onlyAllow, transition, debug, callback) {
|
|
6054
6054
|
return (0, import_react3.useCallback)(function(next) {
|
|
6055
6055
|
var wrap = transition ? import_react3.startTransition : callImmediate;
|
|
6056
6056
|
wrap(function() {
|
|
6057
6057
|
setter(function(prev) {
|
|
6058
|
-
var out = mergeIfNotShallowEqual(prev, next,
|
|
6058
|
+
var out = mergeIfNotShallowEqual(prev, next, onlyAllow, debug);
|
|
6059
6059
|
return callback == null || callback(out), out;
|
|
6060
6060
|
});
|
|
6061
6061
|
});
|
|
6062
6062
|
}, [
|
|
6063
6063
|
setter,
|
|
6064
|
-
|
|
6064
|
+
onlyAllow ? onlyAllow.join("") : "",
|
|
6065
6065
|
transition,
|
|
6066
6066
|
debug
|
|
6067
6067
|
]);
|
|
6068
6068
|
}
|
|
6069
|
-
function mergeIfNotShallowEqual(prev, next,
|
|
6070
|
-
if (
|
|
6069
|
+
function mergeIfNotShallowEqual(prev, next, onlyAllow, debug) {
|
|
6070
|
+
if (onlyAllow) {
|
|
6071
|
+
var allowed = {};
|
|
6072
|
+
for (var key in next) onlyAllow.includes(key) && (allowed[key] = next[key]);
|
|
6073
|
+
next = allowed;
|
|
6074
|
+
}
|
|
6075
|
+
if (!prev || !next || isEqualShallow(prev, next)) return prev || next;
|
|
6071
6076
|
if (process.env.NODE_ENV === "development" && debug && (console.info("setStateShallow CHANGE", {
|
|
6072
6077
|
prev,
|
|
6073
6078
|
next
|
|
@@ -7031,7 +7036,9 @@ var require_useComponentState_native = __commonJS({
|
|
|
7031
7036
|
groupContextState[groupName] = next;
|
|
7032
7037
|
};
|
|
7033
7038
|
}
|
|
7034
|
-
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled
|
|
7039
|
+
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled ? [
|
|
7040
|
+
"disabled"
|
|
7041
|
+
] : void 0, !1, props.debug, setStateWrapper);
|
|
7035
7042
|
if (presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
7036
7043
|
process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`has presenceState ${JSON.stringify(presenceState)}`);
|
|
7037
7044
|
var { enterVariant, exitVariant, enterExitVariant, custom } = presenceState;
|
|
@@ -9759,7 +9766,7 @@ var require_useProps_native = __commonJS({
|
|
|
9759
9766
|
resolveValues: "auto",
|
|
9760
9767
|
...opts
|
|
9761
9768
|
}, null, componentContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
9762
|
-
return import_react3.default.
|
|
9769
|
+
return import_react3.default.useLayoutEffect(function() {
|
|
9763
9770
|
if (!disabled) {
|
|
9764
9771
|
if (state.unmounted) {
|
|
9765
9772
|
setStateShallow({
|