tamagui 1.129.12-1751358691172 → 1.129.12-1751386794649
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 +30 -44
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +20 -34
- package/dist/test.native.js.map +2 -2
- package/package.json +55 -55
package/dist/native.js
CHANGED
|
@@ -6641,7 +6641,9 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6641
6641
|
if (groupMediaKey) {
|
|
6642
6642
|
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
6643
6643
|
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
6644
|
-
if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP media ${groupMediaKey} active? ${isActive}
|
|
6644
|
+
if (!mediaState1 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP media ${groupMediaKey} active? ${isActive}`, {
|
|
6645
|
+
...mediaState1
|
|
6646
|
+
}), !isActive) {
|
|
6645
6647
|
for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
|
|
6646
6648
|
return;
|
|
6647
6649
|
}
|
|
@@ -6651,7 +6653,9 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6651
6653
|
pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
|
|
6652
6654
|
var componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
6653
6655
|
componentContext.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
6654
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}
|
|
6656
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`, {
|
|
6657
|
+
...componentGroupPseudoState
|
|
6658
|
+
}), !isActive1) {
|
|
6655
6659
|
for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
|
|
6656
6660
|
return;
|
|
6657
6661
|
}
|
|
@@ -7116,23 +7120,20 @@ var require_index_native13 = __commonJS({
|
|
|
7116
7120
|
});
|
|
7117
7121
|
module2.exports = __toCommonJS2(index_exports2);
|
|
7118
7122
|
var import_react3 = require("react");
|
|
7119
|
-
function useCreateShallowSetState(setter,
|
|
7123
|
+
function useCreateShallowSetState(setter, debug) {
|
|
7120
7124
|
return (0, import_react3.useCallback)(function(next) {
|
|
7121
7125
|
setter(function(prev) {
|
|
7122
|
-
|
|
7126
|
+
var update = mergeIfNotShallowEqual(prev, next);
|
|
7127
|
+
if (process.env.NODE_ENV === "development" && debug && update !== prev && (console.groupCollapsed("setStateShallow CHANGE", prev, "=>", update), console.trace(), console.groupEnd(), debug === "break")) debugger;
|
|
7128
|
+
return update;
|
|
7123
7129
|
});
|
|
7124
7130
|
}, [
|
|
7125
7131
|
setter,
|
|
7126
|
-
|
|
7132
|
+
debug
|
|
7127
7133
|
]);
|
|
7128
7134
|
}
|
|
7129
|
-
function mergeIfNotShallowEqual(prev, next
|
|
7130
|
-
|
|
7131
|
-
if (process.env.NODE_ENV === "development" && debug && (console.info("setStateShallow CHANGE", {
|
|
7132
|
-
prev,
|
|
7133
|
-
next
|
|
7134
|
-
}), debug === "break")) debugger;
|
|
7135
|
-
return {
|
|
7135
|
+
function mergeIfNotShallowEqual(prev, next) {
|
|
7136
|
+
return !prev || !next || isEqualShallow(prev, next) ? prev || next : {
|
|
7136
7137
|
...prev,
|
|
7137
7138
|
...next
|
|
7138
7139
|
};
|
|
@@ -7305,7 +7306,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
7305
7306
|
var _keys_current, _props_needsUpdate, local = localStates.get(id), needsUpdate = isRoot || props.name === "light" || props.name === "dark" || props.name === null ? !0 : HasRenderedOnce.get(keys) ? !(keys == null || (_keys_current = keys.current) === null || _keys_current === void 0) && _keys_current.size ? !0 : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props) : !0, [rerender, next] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
|
|
7306
7307
|
return PendingUpdate.delete(id), (!local || rerender) && (local = {
|
|
7307
7308
|
...next
|
|
7308
|
-
}, localStates.set(id, local)), process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && (console.groupCollapsed(` ${id}
|
|
7309
|
+
}, localStates.set(id, local)), process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && (console.groupCollapsed(` ${id} getSnapshot ${rerender}`, local.name, ">", next.name), console.info({
|
|
7309
7310
|
props,
|
|
7310
7311
|
propsKey,
|
|
7311
7312
|
isRoot,
|
|
@@ -7340,7 +7341,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
7340
7341
|
themes || (themes = (0, import_config.getConfig)().themes);
|
|
7341
7342
|
var name = !propsKey && (!lastState || !(lastState != null && lastState.isNew)) ? null : getNewThemeName(parentState == null ? void 0 : parentState.name, props, pendingUpdate === "force" ? !0 : !!needsUpdate), isSameAsParent = parentState && (!name || name === parentState.name), shouldRerender = !!(needsUpdate && (pendingUpdate || (lastState == null ? void 0 : lastState.name) !== (parentState == null ? void 0 : parentState.name)));
|
|
7342
7343
|
if (process.env.NODE_ENV === "development" && debug && debug !== "profile") {
|
|
7343
|
-
var message = ` \xB7 useTheme(${id}) => ${name} needsUpdate ${needsUpdate} shouldRerender ${shouldRerender}`;
|
|
7344
|
+
var message = ` \xB7 useTheme(${id}) getNextState => ${name} needsUpdate ${needsUpdate} shouldRerender ${shouldRerender}`;
|
|
7344
7345
|
console.info(message);
|
|
7345
7346
|
}
|
|
7346
7347
|
if (isSameAsParent) return [
|
|
@@ -8235,7 +8236,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
8235
8236
|
...states[0],
|
|
8236
8237
|
[props.forceStyle]: !0
|
|
8237
8238
|
} : states[0], setState = states[1];
|
|
8238
|
-
stateRef.current.nextComponentState &&
|
|
8239
|
+
stateRef.current.nextComponentState && Object.assign(state, stateRef.current.nextComponentState);
|
|
8239
8240
|
var isAnimated = willBeAnimated;
|
|
8240
8241
|
import_constants4.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), state.disabled = disabled, setState(function(_) {
|
|
8241
8242
|
return {
|
|
@@ -8279,26 +8280,6 @@ var require_useComponentState_native = __commonJS({
|
|
|
8279
8280
|
}
|
|
8280
8281
|
};
|
|
8281
8282
|
}
|
|
8282
|
-
if (!curStateRef.stateEmitter && hasAnimationProp) {
|
|
8283
|
-
var listeners1 = /* @__PURE__ */ new Set();
|
|
8284
|
-
curStateRef.stateEmitter = {
|
|
8285
|
-
listeners: listeners1,
|
|
8286
|
-
emit(state2) {
|
|
8287
|
-
listeners1.forEach(function(l) {
|
|
8288
|
-
return l(state2);
|
|
8289
|
-
});
|
|
8290
|
-
},
|
|
8291
|
-
subscribe(cb) {
|
|
8292
|
-
return listeners1.add(cb), setStateShallow({
|
|
8293
|
-
hasDynGroupChildren: !0
|
|
8294
|
-
}), function() {
|
|
8295
|
-
listeners1.delete(cb), listeners1.size === 0 && setStateShallow({
|
|
8296
|
-
hasDynGroupChildren: !1
|
|
8297
|
-
});
|
|
8298
|
-
};
|
|
8299
|
-
}
|
|
8300
|
-
};
|
|
8301
|
-
}
|
|
8302
8283
|
return {
|
|
8303
8284
|
startedUnhydrated,
|
|
8304
8285
|
curStateRef,
|
|
@@ -8548,7 +8529,13 @@ var require_createComponent_native = __commonJS({
|
|
|
8548
8529
|
}
|
|
8549
8530
|
});
|
|
8550
8531
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8551
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getShorthandValue = require_getShorthandValue_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), time2, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set()
|
|
8532
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getShorthandValue = require_getShorthandValue_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), time2, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
8533
|
+
"hover",
|
|
8534
|
+
"press",
|
|
8535
|
+
"pressIn",
|
|
8536
|
+
"group",
|
|
8537
|
+
"media"
|
|
8538
|
+
]);
|
|
8552
8539
|
if (0) var cancelTouches;
|
|
8553
8540
|
var BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
|
|
8554
8541
|
value: !1
|
|
@@ -8696,19 +8683,18 @@ var require_createComponent_native = __commonJS({
|
|
|
8696
8683
|
if (hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders) {
|
|
8697
8684
|
var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
|
|
8698
8685
|
setStateShallow = function(next) {
|
|
8699
|
-
var
|
|
8700
|
-
"hover",
|
|
8701
|
-
"press",
|
|
8702
|
-
"pressIn"
|
|
8703
|
-
]), canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
8686
|
+
var canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
8704
8687
|
return avoidReRenderKeys.has(key3);
|
|
8705
8688
|
});
|
|
8706
8689
|
if (canAvoidReRender && styleListener) {
|
|
8707
|
-
var updatedState = {
|
|
8690
|
+
var _curStateRef_group, _curStateRef_group1, updatedState = {
|
|
8708
8691
|
...state,
|
|
8709
8692
|
...next
|
|
8710
8693
|
};
|
|
8711
|
-
|
|
8694
|
+
(_curStateRef_group1 = curStateRef.group) === null || _curStateRef_group1 === void 0 || _curStateRef_group1.emit(groupName, {
|
|
8695
|
+
pseudo: updatedState,
|
|
8696
|
+
layout: (_curStateRef_group = curStateRef.group) === null || _curStateRef_group === void 0 ? void 0 : _curStateRef_group.layout
|
|
8697
|
+
}), stateRef.current.nextComponentState = updatedState;
|
|
8712
8698
|
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, elementType, startedUnhydrated, debugProp);
|
|
8713
8699
|
styleListener(nextStyles.style);
|
|
8714
8700
|
} else ogSetStateShallow(next);
|
|
@@ -8806,7 +8792,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8806
8792
|
console.groupCollapsed(`Rendered > (opacity: ${computed.opacity})`), console.warn(stateRef.current.host), console.warn(computed), console.groupEnd();
|
|
8807
8793
|
}
|
|
8808
8794
|
}), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
8809
|
-
if (state.unmounted === !0 && hasEnterStyle) {
|
|
8795
|
+
if (stateRef.current.nextComponentState = void 0, state.unmounted === !0 && hasEnterStyle) {
|
|
8810
8796
|
setStateShallow({
|
|
8811
8797
|
unmounted: "should-enter"
|
|
8812
8798
|
});
|