@tamagui/core 1.129.13 → 1.129.15
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 +57 -66
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +53 -67
- package/dist/test.native.js.map +2 -2
- package/package.json +9 -9
package/dist/test.native.js
CHANGED
|
@@ -1696,39 +1696,39 @@ var require_pseudoDescriptors_native = __commonJS({
|
|
|
1696
1696
|
// order of keys here important! in priority order
|
|
1697
1697
|
hoverStyle: {
|
|
1698
1698
|
name: "hover",
|
|
1699
|
-
priority:
|
|
1699
|
+
priority: 2
|
|
1700
1700
|
},
|
|
1701
1701
|
pressStyle: {
|
|
1702
1702
|
name: "active",
|
|
1703
1703
|
stateKey: "press",
|
|
1704
|
-
priority:
|
|
1704
|
+
priority: 3
|
|
1705
1705
|
},
|
|
1706
1706
|
focusVisibleStyle: {
|
|
1707
1707
|
name: "focus-visible",
|
|
1708
|
-
priority:
|
|
1708
|
+
priority: 4,
|
|
1709
1709
|
stateKey: "focusVisible"
|
|
1710
1710
|
},
|
|
1711
1711
|
focusStyle: {
|
|
1712
1712
|
name: "focus",
|
|
1713
|
-
priority:
|
|
1713
|
+
priority: 4
|
|
1714
1714
|
},
|
|
1715
1715
|
focusWithinStyle: {
|
|
1716
1716
|
name: "focus-within",
|
|
1717
|
-
priority:
|
|
1717
|
+
priority: 4,
|
|
1718
1718
|
stateKey: "focusWithin"
|
|
1719
1719
|
},
|
|
1720
1720
|
disabledStyle: {
|
|
1721
1721
|
name: "disabled",
|
|
1722
|
-
priority:
|
|
1722
|
+
priority: 5,
|
|
1723
1723
|
stateKey: "disabled"
|
|
1724
1724
|
}
|
|
1725
1725
|
}, pseudoPriorities = {
|
|
1726
|
-
hover:
|
|
1727
|
-
press:
|
|
1728
|
-
focus:
|
|
1729
|
-
focusVisible:
|
|
1730
|
-
focusWithin:
|
|
1731
|
-
disabled:
|
|
1726
|
+
hover: pseudoDescriptorsBase.hoverStyle.priority,
|
|
1727
|
+
press: pseudoDescriptorsBase.pressStyle.priority,
|
|
1728
|
+
focus: pseudoDescriptorsBase.focusStyle.priority,
|
|
1729
|
+
focusVisible: pseudoDescriptorsBase.focusVisibleStyle.priority,
|
|
1730
|
+
focusWithin: pseudoDescriptorsBase.focusWithinStyle.priority,
|
|
1731
|
+
disabled: pseudoDescriptorsBase.disabledStyle.priority
|
|
1732
1732
|
}, pseudoDescriptors = {
|
|
1733
1733
|
...pseudoDescriptorsBase,
|
|
1734
1734
|
enterStyle: {
|
|
@@ -1963,9 +1963,9 @@ var require_useMedia_native = __commonJS({
|
|
|
1963
1963
|
}
|
|
1964
1964
|
return res;
|
|
1965
1965
|
}
|
|
1966
|
-
var getMediaImportanceIfMoreImportant = function(mediaKey, key,
|
|
1967
|
-
var importance = isSizeMedia && !(0, import_config.getSetting)("mediaPropOrder") ? getMediaKeyImportance(mediaKey) : defaultMediaImportance;
|
|
1968
|
-
return !
|
|
1966
|
+
var getMediaImportanceIfMoreImportant = function(mediaKey, key, styleState, isSizeMedia) {
|
|
1967
|
+
var importance = isSizeMedia && !(0, import_config.getSetting)("mediaPropOrder") ? getMediaKeyImportance(mediaKey) : defaultMediaImportance, usedKeys = styleState.usedKeys;
|
|
1968
|
+
return !usedKeys[key] || importance > usedKeys[key] ? importance : null;
|
|
1969
1969
|
};
|
|
1970
1970
|
function camelToHyphen(str) {
|
|
1971
1971
|
return str.replace(/[A-Z]/g, function(m) {
|
|
@@ -5158,7 +5158,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5158
5158
|
if (keyInit === "group" && !1) var identifier2, containerType, containerCSS;
|
|
5159
5159
|
return "continue";
|
|
5160
5160
|
}
|
|
5161
|
-
var
|
|
5161
|
+
var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles2, accept);
|
|
5162
5162
|
if (0) var _viewProps2, _dataSet;
|
|
5163
5163
|
if (!isValidStyleKeyInit) {
|
|
5164
5164
|
if (!import_constants.isAndroid && keyInit === "elevationAndroid") return "continue";
|
|
@@ -5172,13 +5172,13 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5172
5172
|
if (0) var didUseKeyInit;
|
|
5173
5173
|
var isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers2.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo = !!(isMedia || isPseudo);
|
|
5174
5174
|
if (isMediaOrPseudo && keyInit.startsWith("$group-")) {
|
|
5175
|
-
var parts = keyInit.split("-");
|
|
5175
|
+
var parts = keyInit.split("-"), plen = parts.length;
|
|
5176
5176
|
if (
|
|
5177
5177
|
// check if its actually a simple group selector to avoid breaking selectors
|
|
5178
|
-
|
|
5178
|
+
plen === 2 || plen === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
|
|
5179
5179
|
) {
|
|
5180
5180
|
var name2 = parts[1];
|
|
5181
|
-
groupContext != null && groupContext[name2]
|
|
5181
|
+
groupContext && !(groupContext != null && groupContext[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
5182
5182
|
}
|
|
5183
5183
|
}
|
|
5184
5184
|
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
|
|
@@ -5249,7 +5249,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5249
5249
|
var _$val = pseudoStyleObject[pkey];
|
|
5250
5250
|
if (isDisabled) applyDefaultStyle(pkey, styleState);
|
|
5251
5251
|
else {
|
|
5252
|
-
var curImportance = usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
5252
|
+
var curImportance = styleState.usedKeys[pkey] || 0, shouldMerge = importance >= curImportance;
|
|
5253
5253
|
if (shouldMerge) {
|
|
5254
5254
|
if (process.env.IS_STATIC === "is_static") {
|
|
5255
5255
|
var _pseudos1, _key1;
|
|
@@ -5261,7 +5261,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5261
5261
|
}
|
|
5262
5262
|
if (!isDisabled) for (var _$key in val2) {
|
|
5263
5263
|
var k = shorthands[_$key] || _$key;
|
|
5264
|
-
usedKeys[k] = Math.max(importance, usedKeys[k] || 0);
|
|
5264
|
+
styleState.usedKeys[k] = Math.max(importance, styleState.usedKeys[k] || 0);
|
|
5265
5265
|
}
|
|
5266
5266
|
}
|
|
5267
5267
|
return;
|
|
@@ -5274,8 +5274,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5274
5274
|
if (mediaStylesSeen += 1, shouldDoClasses) {
|
|
5275
5275
|
var mediaStyle = getSubStyle(styleState, key4, val2, !1);
|
|
5276
5276
|
if (hasSpace && (delete mediaStyle.space, mediaState2[mediaKeyShort])) {
|
|
5277
|
-
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space",
|
|
5278
|
-
importance1 && (space = val2.space, usedKeys.space = importance1);
|
|
5277
|
+
var importance1 = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKeyShort, "space", styleState, !0);
|
|
5278
|
+
importance1 && (space = val2.space, styleState.usedKeys.space = importance1);
|
|
5279
5279
|
}
|
|
5280
5280
|
var mediaStyles = (0, import_getCSSStylesAtomic.getCSSStylesAtomic)(mediaStyle), _iteratorNormalCompletion12 = !0, _didIteratorError12 = !1, _iteratorError12 = void 0;
|
|
5281
5281
|
try {
|
|
@@ -5299,7 +5299,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5299
5299
|
var mergeMediaStyle2 = function(key5, val3) {
|
|
5300
5300
|
var _styleState4;
|
|
5301
5301
|
(_styleState4 = styleState).style || (_styleState4.style = {});
|
|
5302
|
-
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3,
|
|
5302
|
+
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, mediaState2[mediaKeyShort], importanceBump, debug);
|
|
5303
5303
|
didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
|
|
5304
5304
|
}, mergeMediaStyle = mergeMediaStyle2, isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
|
|
5305
5305
|
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia && !mediaState2[mediaKeyShort])
|
|
@@ -5368,7 +5368,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5368
5368
|
conf = conf || (0, import_config.getConfig)();
|
|
5369
5369
|
var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
5370
5370
|
import_constants.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
5371
|
-
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState,
|
|
5371
|
+
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClass && !styleProps.isAnimated, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles2 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers2.stylePropsText : import_helpers2.validStyles), styleState = {
|
|
5372
5372
|
classNames,
|
|
5373
5373
|
conf,
|
|
5374
5374
|
props,
|
|
@@ -5377,7 +5377,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5377
5377
|
staticConfig,
|
|
5378
5378
|
style: null,
|
|
5379
5379
|
theme,
|
|
5380
|
-
usedKeys,
|
|
5380
|
+
usedKeys: {},
|
|
5381
5381
|
viewProps,
|
|
5382
5382
|
context: componentContext,
|
|
5383
5383
|
debug
|
|
@@ -5486,10 +5486,10 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5486
5486
|
});
|
|
5487
5487
|
}
|
|
5488
5488
|
function mergeStyle(styleState, key, val, importance) {
|
|
5489
|
-
var disableNormalize = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, { viewProps, styleProps, staticConfig } = styleState, existingImportance =
|
|
5490
|
-
if (!(
|
|
5491
|
-
var _styleState
|
|
5492
|
-
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}),
|
|
5489
|
+
var disableNormalize = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, { viewProps, styleProps, staticConfig, usedKeys } = styleState, existingImportance = usedKeys[key] || 0;
|
|
5490
|
+
if (!(existingImportance > importance)) if (key in import_helpers2.stylePropsTransform) {
|
|
5491
|
+
var _styleState;
|
|
5492
|
+
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), usedKeys[key] = importance, styleState.flatTransforms[key] = val;
|
|
5493
5493
|
} else {
|
|
5494
5494
|
var shouldNormalize = import_constants.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
5495
5495
|
if (
|
|
@@ -5497,8 +5497,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5497
5497
|
staticConfig.accept && key in staticConfig.accept
|
|
5498
5498
|
) viewProps[key] = out;
|
|
5499
5499
|
else {
|
|
5500
|
-
var _styleState1
|
|
5501
|
-
(_styleState1 = styleState).style || (_styleState1.style = {}),
|
|
5500
|
+
var _styleState1;
|
|
5501
|
+
(_styleState1 = styleState).style || (_styleState1.style = {}), usedKeys[key] = importance, styleState.style[key] = // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
|
|
5502
5502
|
// if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
|
|
5503
5503
|
key === "transform" && Array.isArray(out) ? [
|
|
5504
5504
|
...out
|
|
@@ -5575,10 +5575,10 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5575
5575
|
delete viewProps[key], viewProps[key] = next;
|
|
5576
5576
|
} else viewProps[key] = val;
|
|
5577
5577
|
}
|
|
5578
|
-
function mergeMediaByImportance(styleState, mediaKey, key, value,
|
|
5579
|
-
var importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key,
|
|
5578
|
+
function mergeMediaByImportance(styleState, mediaKey, key, value, isSizeMedia, importanceBump, debugProp) {
|
|
5579
|
+
var usedKeys = styleState.usedKeys, importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, styleState, isSizeMedia);
|
|
5580
5580
|
if (importanceBump && (importance = (importance || 0) + importanceBump), importance === null) return !1;
|
|
5581
|
-
if (
|
|
5581
|
+
if (key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
5582
5582
|
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
|
|
5583
5583
|
if (isDisabled) return !1;
|
|
5584
5584
|
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey], importance);
|
|
@@ -6794,9 +6794,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
6794
6794
|
var states = (0, import_react3.useState)(initialState), state = props.forceStyle ? {
|
|
6795
6795
|
...states[0],
|
|
6796
6796
|
[props.forceStyle]: !0
|
|
6797
|
-
} : states[0], setState = states[1];
|
|
6798
|
-
stateRef.current.nextComponentState && Object.assign(state, stateRef.current.nextComponentState);
|
|
6799
|
-
var isAnimated = willBeAnimated;
|
|
6797
|
+
} : states[0], setState = states[1], isAnimated = willBeAnimated;
|
|
6800
6798
|
import_constants.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(_) {
|
|
6801
6799
|
return {
|
|
6802
6800
|
...state
|
|
@@ -7063,7 +7061,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7063
7061
|
}
|
|
7064
7062
|
});
|
|
7065
7063
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
7066
|
-
var import_jsx_runtime2 = require("react/jsx-runtime"), import_compose_refs = require_index_native4(), import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_is_equal_shallow = require_index_native5(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants2 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_GroupContext = require_GroupContext_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(), componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
7064
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_compose_refs = require_index_native4(), import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_is_equal_shallow = require_index_native5(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants2 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_GroupContext = require_GroupContext_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(), NextState = /* @__PURE__ */ new WeakMap(), componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
7067
7065
|
"hover",
|
|
7068
7066
|
"press",
|
|
7069
7067
|
"pressIn",
|
|
@@ -7077,7 +7075,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7077
7075
|
var BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
|
|
7078
7076
|
value: !1
|
|
7079
7077
|
};
|
|
7080
|
-
import_constants.isWeb &&
|
|
7078
|
+
import_constants.isWeb && typeof document < "u" && (document.addEventListener("keydown", function() {
|
|
7081
7079
|
lastInteractionWasKeyboard.value || (lastInteractionWasKeyboard.value = !0);
|
|
7082
7080
|
}), document.addEventListener("mousedown", function() {
|
|
7083
7081
|
lastInteractionWasKeyboard.value && (lastInteractionWasKeyboard.value = !1);
|
|
@@ -7126,7 +7124,12 @@ var require_createComponent_native = __commonJS({
|
|
|
7126
7124
|
...styledContextProps
|
|
7127
7125
|
} : defaultProps, props = propsIn;
|
|
7128
7126
|
curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
|
|
7129
|
-
var componentName2 = props.componentName || staticConfig.componentName, componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), groupContextParent = import_react3.default.useContext(import_GroupContext.GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props, animationDriver, staticConfig, config), { disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, supportsCSS, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState
|
|
7127
|
+
var componentName2 = props.componentName || staticConfig.componentName, componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), groupContextParent = import_react3.default.useContext(import_GroupContext.GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props, animationDriver, staticConfig, config), { disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, supportsCSS, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState;
|
|
7128
|
+
hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders && (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7129
|
+
var pendingState = NextState.get(stateRef);
|
|
7130
|
+
pendingState && (setStateShallow(pendingState), NextState.set(stateRef, void 0));
|
|
7131
|
+
});
|
|
7132
|
+
var allGroupContexts = (0, import_react3.useMemo)(function() {
|
|
7130
7133
|
var _stateRef_current_group;
|
|
7131
7134
|
if (!groupName) return groupContextParent;
|
|
7132
7135
|
(_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
|
|
@@ -7165,14 +7168,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7165
7168
|
stateRef,
|
|
7166
7169
|
groupName,
|
|
7167
7170
|
groupContextParent
|
|
7168
|
-
]), setStateShallow = componentState.setStateShallow,
|
|
7169
|
-
pendingState && (stateRef.current.nextComponentState = void 0, componentState.setState(function(prev) {
|
|
7170
|
-
return {
|
|
7171
|
-
...prev,
|
|
7172
|
-
...pendingState
|
|
7173
|
-
};
|
|
7174
|
-
}));
|
|
7175
|
-
var hasTextAncestor = !!(import_constants.isWeb && isText && componentContext.inText), isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
|
|
7171
|
+
]), setStateShallow = componentState.setStateShallow, hasTextAncestor = !!(import_constants.isWeb && isText && componentContext.inText), isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
|
|
7176
7172
|
animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
|
|
7177
7173
|
// "needsWebStyles" basically with motion we just animate a plain div, but
|
|
7178
7174
|
// we still have animated.View/Text for Sheet which wants to control
|
|
@@ -7222,7 +7218,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7222
7218
|
if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
7223
7219
|
var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
|
|
7224
7220
|
stateRef.current.setStateShallow = function(nextOrGetNext) {
|
|
7225
|
-
var prev = stateRef
|
|
7221
|
+
var prev = NextState.get(stateRef) || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
|
|
7226
7222
|
if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
|
|
7227
7223
|
var canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
7228
7224
|
return avoidReRenderKeys.has(key3);
|
|
@@ -7232,7 +7228,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7232
7228
|
...prev,
|
|
7233
7229
|
...next
|
|
7234
7230
|
};
|
|
7235
|
-
stateRef
|
|
7231
|
+
NextState.set(stateRef, updatedState);
|
|
7236
7232
|
var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
|
|
7237
7233
|
if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !styleListener) return;
|
|
7238
7234
|
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
|
|
@@ -7362,9 +7358,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7362
7358
|
mediaGroups ? Object.keys([
|
|
7363
7359
|
...mediaGroups
|
|
7364
7360
|
]).join("") : 0
|
|
7365
|
-
])
|
|
7366
|
-
stateRef.current.nextComponentState = void 0;
|
|
7367
|
-
});
|
|
7361
|
+
]);
|
|
7368
7362
|
var groupEmitter = stateRef.current.group;
|
|
7369
7363
|
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7370
7364
|
!groupContext || !groupEmitter || notifyGroupSubscribers(groupContext, groupEmitter, state);
|
|
@@ -7403,24 +7397,16 @@ var require_createComponent_native = __commonJS({
|
|
|
7403
7397
|
},
|
|
7404
7398
|
...attachFocus && {
|
|
7405
7399
|
onFocus: function(e) {
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
}), pseudos != null && pseudos.focusVisibleStyle ? setTimeout(function() {
|
|
7409
|
-
setStateShallow({
|
|
7410
|
-
focus: !0,
|
|
7411
|
-
focusVisible: !!lastInteractionWasKeyboard.value
|
|
7412
|
-
});
|
|
7413
|
-
}, 0) : setStateShallow({
|
|
7414
|
-
focus: !0,
|
|
7415
|
-
focusVisible: !1
|
|
7416
|
-
}), onFocus == null || onFocus(e);
|
|
7400
|
+
var next = {};
|
|
7401
|
+
componentContext.setParentFocusState && (next.focusWithin = !0), pseudos != null && pseudos.focusVisibleStyle && lastInteractionWasKeyboard.value ? next.focusVisible = !0 : next.focus = !0, setStateShallow(next), onFocus == null || onFocus(e);
|
|
7417
7402
|
},
|
|
7418
7403
|
onBlur: function(e) {
|
|
7419
7404
|
componentContext.setParentFocusState && componentContext.setParentFocusState({
|
|
7420
7405
|
focusWithin: !1
|
|
7421
7406
|
}), setStateShallow({
|
|
7422
7407
|
focus: !1,
|
|
7423
|
-
focusVisible: !1
|
|
7408
|
+
focusVisible: !1,
|
|
7409
|
+
focusWithin: !1
|
|
7424
7410
|
}), onBlur == null || onBlur(e);
|
|
7425
7411
|
}
|
|
7426
7412
|
}
|
|
@@ -7461,7 +7447,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7461
7447
|
...componentContext,
|
|
7462
7448
|
setParentFocusState: setStateShallow,
|
|
7463
7449
|
children: content
|
|
7464
|
-
})), "group" in
|
|
7450
|
+
})), "group" in props && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_GroupContext.GroupContext.Provider, {
|
|
7465
7451
|
value: allGroupContexts,
|
|
7466
7452
|
children: content
|
|
7467
7453
|
})), content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), staticConfig.context) {
|