tamagui 1.138.2 → 1.138.3
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.cjs +70 -25
- package/dist/test.cjs +70 -25
- package/package.json +55 -55
package/dist/native.cjs
CHANGED
|
@@ -3117,6 +3117,10 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
|
|
|
3117
3117
|
if (!(!styleProps2.noSkip && subKey in skipProps)) {
|
|
3118
3118
|
if (styleProps2.noExpand) res[subKey] = val;
|
|
3119
3119
|
else if (variants2 && subKey in variants2) {
|
|
3120
|
+
if (staticConfig) {
|
|
3121
|
+
var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
|
|
3122
|
+
contextProps && subKey in contextProps && (styleState.resolvedContextVariants || (styleState.resolvedContextVariants = {}), styleState.resolvedContextVariants[subKey] = val);
|
|
3123
|
+
}
|
|
3120
3124
|
if (parentVariantKey && parentVariantKey === key) res[subKey] = // SYNC WITH *1
|
|
3121
3125
|
val[0] === "$" ? getTokenForKey(subKey, val, styleProps2, styleState) : val;
|
|
3122
3126
|
else {
|
|
@@ -3279,6 +3283,17 @@ function _type_of$5(obj) {
|
|
|
3279
3283
|
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
3280
3284
|
}
|
|
3281
3285
|
var conf;
|
|
3286
|
+
function normalizeGroupKey(key, groupContext) {
|
|
3287
|
+
var parts = key.split("-"), plen = parts.length;
|
|
3288
|
+
if (
|
|
3289
|
+
// check if its actually a simple group selector to avoid breaking selectors
|
|
3290
|
+
plen === 2 || plen === 3 && pseudoPriorities[parts[parts.length - 1]]
|
|
3291
|
+
) {
|
|
3292
|
+
var name = parts[1];
|
|
3293
|
+
if (groupContext && !groupContext[name]) return key.replace("$group-", "$group-true-");
|
|
3294
|
+
}
|
|
3295
|
+
return key;
|
|
3296
|
+
}
|
|
3282
3297
|
function isValidStyleKey(key, validStyles2, accept) {
|
|
3283
3298
|
return key in validStyles2 ? true : accept && key in accept;
|
|
3284
3299
|
}
|
|
@@ -3305,16 +3320,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
3305
3320
|
return "continue";
|
|
3306
3321
|
}
|
|
3307
3322
|
var isVariant = !isValidStyleKeyInit && variants2 && keyInit in variants2, isStyleLikeKey = isValidStyleKeyInit || isVariant, isPseudo = keyInit in validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo ? getMediaKey(keyInit) : false, isMediaOrPseudo = !!(isMedia || isPseudo);
|
|
3308
|
-
|
|
3309
|
-
var parts = keyInit.split("-"), plen = parts.length;
|
|
3310
|
-
if (
|
|
3311
|
-
// check if its actually a simple group selector to avoid breaking selectors
|
|
3312
|
-
plen === 2 || plen === 3 && pseudoPriorities[parts[parts.length - 1]]
|
|
3313
|
-
) {
|
|
3314
|
-
var name2 = parts[1];
|
|
3315
|
-
groupContext && !(groupContext == null ? void 0 : groupContext[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
3316
|
-
}
|
|
3317
|
-
}
|
|
3323
|
+
isMediaOrPseudo && isMedia === "group" && (keyInit = normalizeGroupKey(keyInit, groupContext));
|
|
3318
3324
|
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
|
|
3319
3325
|
if (isStyleProp && (asChild === "except-style" || asChild === "except-style-web")) return "continue";
|
|
3320
3326
|
var shouldPassProp = !isStyleProp && isHOC || // is in parent variants
|
|
@@ -3338,7 +3344,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
3338
3344
|
mergeStyle(styleState, key4, val2, 1);
|
|
3339
3345
|
return;
|
|
3340
3346
|
}
|
|
3341
|
-
if (isPseudo = key4 in validPseudoKeys, isMedia = isPseudo ? false : getMediaKey(key4), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants2 && key4 in variants2, (inlineProps == null ? void 0 : inlineProps.has(key4)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened == null ? void 0 : inlineWhenUnflattened.has(key4))) {
|
|
3347
|
+
if (isPseudo = key4 in validPseudoKeys, isMedia = isPseudo ? false : getMediaKey(key4), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants2 && key4 in variants2, isMedia === "group" && (key4 = normalizeGroupKey(key4, groupContext)), (inlineProps == null ? void 0 : inlineProps.has(key4)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened == null ? void 0 : inlineWhenUnflattened.has(key4))) {
|
|
3342
3348
|
var _props_key;
|
|
3343
3349
|
viewProps[key4] = (_props_key = props[key4]) !== null && _props_key !== void 0 ? _props_key : val2;
|
|
3344
3350
|
}
|
|
@@ -3557,7 +3563,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
3557
3563
|
rulesToInsert,
|
|
3558
3564
|
dynamicThemeAccess,
|
|
3559
3565
|
pseudoGroups,
|
|
3560
|
-
mediaGroups
|
|
3566
|
+
mediaGroups,
|
|
3567
|
+
resolvedContextVariants: styleState.resolvedContextVariants
|
|
3561
3568
|
}, asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
3562
3569
|
if (!styleProps2.noMergeStyle && !asChildExceptStyleLike) {
|
|
3563
3570
|
var style2 = styleState.style;
|
|
@@ -3865,7 +3872,7 @@ function _type_of$4(obj) {
|
|
|
3865
3872
|
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
3866
3873
|
}
|
|
3867
3874
|
var useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
3868
|
-
var _animationDriver_usePresence, isHydrated = useDidFinishSSR(), needsHydration = !useIsClientOnly(), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, {
|
|
3875
|
+
var _animationDriver_usePresence, isHydrated = useDidFinishSSR(), needsHydration = !useIsClientOnly(), useAnimations = (animationDriver == null ? void 0 : animationDriver.isStub) ? void 0 : animationDriver == null ? void 0 : animationDriver.useAnimations, {
|
|
3869
3876
|
isHOC
|
|
3870
3877
|
} = staticConfig, stateRef = React.useRef(
|
|
3871
3878
|
// performance: avoid creating object every render
|
|
@@ -4022,7 +4029,7 @@ function createComponent(staticConfig) {
|
|
|
4022
4029
|
nextProps && (props = nextProps), overriddenContextProps = overrides;
|
|
4023
4030
|
}
|
|
4024
4031
|
var componentName2 = props.componentName || staticConfig.componentName;
|
|
4025
|
-
var componentContext = React.useContext(ComponentContext), groupContextParent = React.useContext(GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = useComponentState(props, animationDriver, staticConfig), {
|
|
4032
|
+
var componentContext = React.useContext(ComponentContext), groupContextParent = React.useContext(GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = useComponentState(props, (animationDriver == null ? void 0 : animationDriver.isStub) ? null : animationDriver, staticConfig), {
|
|
4026
4033
|
disabled,
|
|
4027
4034
|
groupName,
|
|
4028
4035
|
hasAnimationProp,
|
|
@@ -4112,7 +4119,15 @@ function createComponent(staticConfig) {
|
|
|
4112
4119
|
willBeAnimated,
|
|
4113
4120
|
styledContext: styledContextValue
|
|
4114
4121
|
}, themeName = (themeState == null ? void 0 : themeState.name) || "";
|
|
4115
|
-
var splitStyles = useSplitStyles(props, staticConfig, theme, themeName, state, styleProps2, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), isPassthrough = !splitStyles,
|
|
4122
|
+
var splitStyles = useSplitStyles(props, staticConfig, theme, themeName, state, styleProps2, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), isPassthrough = !splitStyles, contextForOverride = staticConfig.context;
|
|
4123
|
+
if (splitStyles == null ? void 0 : splitStyles.resolvedContextVariants) {
|
|
4124
|
+
var _staticConfig_parentStaticConfig, contextForVariants = staticConfig.context || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : _staticConfig_parentStaticConfig.context);
|
|
4125
|
+
if (contextForVariants) {
|
|
4126
|
+
for (var key in splitStyles.resolvedContextVariants) overriddenContextProps || (overriddenContextProps = {}), overriddenContextProps[key] = splitStyles.resolvedContextVariants[key];
|
|
4127
|
+
staticConfig.context || (contextForOverride = contextForVariants);
|
|
4128
|
+
}
|
|
4129
|
+
}
|
|
4130
|
+
var groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
|
|
4116
4131
|
if (!isPassthrough && groupContext && // avoids onLayout if we don't need it
|
|
4117
4132
|
props.containerType !== "normal") {
|
|
4118
4133
|
var groupState = groupContext == null ? void 0 : groupContext.state;
|
|
@@ -4154,8 +4169,8 @@ function createComponent(staticConfig) {
|
|
|
4154
4169
|
}), stateRef.current.setStateShallow = function(nextOrGetNext) {
|
|
4155
4170
|
var prev = stateRef.current.nextState || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
|
|
4156
4171
|
if (!(next === prev || isEqualShallow(prev, next))) {
|
|
4157
|
-
var canAvoidReRender = Object.keys(next).every(function(
|
|
4158
|
-
return avoidReRenderKeys.has(
|
|
4172
|
+
var canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
4173
|
+
return avoidReRenderKeys.has(key3);
|
|
4159
4174
|
}), updatedState = __spreadValues(__spreadValues({}, prev), next);
|
|
4160
4175
|
if (stateRef.current.nextState = updatedState, canAvoidReRender) {
|
|
4161
4176
|
var _stateRef_current_updateStyleListener, _stateRef_current;
|
|
@@ -4401,9 +4416,9 @@ function createComponent(staticConfig) {
|
|
|
4401
4416
|
}))), "group" in props && (content = /* @__PURE__ */ jsxRuntimeExports.jsx(GroupContext.Provider, {
|
|
4402
4417
|
value: allGroupContexts,
|
|
4403
4418
|
children: content
|
|
4404
|
-
})), content = disableTheme || !splitStyles ? content : getThemedChildren(themeState, content, themeStateProps, false, stateRef), overriddenContextProps) {
|
|
4405
|
-
var Provider =
|
|
4406
|
-
for (var
|
|
4419
|
+
})), content = disableTheme || !splitStyles ? content : getThemedChildren(themeState, content, themeStateProps, false, stateRef), overriddenContextProps && contextForOverride) {
|
|
4420
|
+
var Provider = contextForOverride.Provider;
|
|
4421
|
+
for (var key1 in styledContextValue) key1 in overriddenContextProps || (overriddenContextProps[key1] = styledContextValue[key1]);
|
|
4407
4422
|
debugProp && console.info("overriddenContextProps", overriddenContextProps), content = /* @__PURE__ */ jsxRuntimeExports.jsx(Provider, __spreadProps(__spreadValues({
|
|
4408
4423
|
__disableMergeDefaultValues: true
|
|
4409
4424
|
}, overriddenContextProps), {
|
|
@@ -4749,6 +4764,35 @@ var cache$1 = /* @__PURE__ */ new WeakMap(), createVariables = function(tokens)
|
|
|
4749
4764
|
}
|
|
4750
4765
|
return cache$1.set(res, true), res;
|
|
4751
4766
|
};
|
|
4767
|
+
var noAnimationDriver = function(method) {
|
|
4768
|
+
console.warn(`No animation driver configured. To use ${method}, you must pass \`animations\` to createTamagui. See: https://tamagui.dev/docs/core/animations`);
|
|
4769
|
+
}, createEmptyAnimationDriver = function() {
|
|
4770
|
+
return {
|
|
4771
|
+
isReactNative: false,
|
|
4772
|
+
supportsCSS: true,
|
|
4773
|
+
classNameAnimation: true,
|
|
4774
|
+
isStub: true,
|
|
4775
|
+
animations: {},
|
|
4776
|
+
useAnimations: function() {
|
|
4777
|
+
return noAnimationDriver("animations");
|
|
4778
|
+
},
|
|
4779
|
+
usePresence: function() {
|
|
4780
|
+
return noAnimationDriver("usePresence");
|
|
4781
|
+
},
|
|
4782
|
+
ResetPresence: function() {
|
|
4783
|
+
return noAnimationDriver("ResetPresence");
|
|
4784
|
+
},
|
|
4785
|
+
useAnimatedNumber: function() {
|
|
4786
|
+
return noAnimationDriver("useAnimatedNumber");
|
|
4787
|
+
},
|
|
4788
|
+
useAnimatedNumberStyle: function() {
|
|
4789
|
+
return noAnimationDriver("useAnimatedNumberStyle");
|
|
4790
|
+
},
|
|
4791
|
+
useAnimatedNumberReaction: function() {
|
|
4792
|
+
return noAnimationDriver("useAnimatedNumberReaction");
|
|
4793
|
+
}
|
|
4794
|
+
};
|
|
4795
|
+
}, defaultAnimationDriver = createEmptyAnimationDriver();
|
|
4752
4796
|
function insertFont(name, fontIn) {
|
|
4753
4797
|
var font = createFont(fontIn), tokened = createVariables(font, name), parsed = parseFont(tokened);
|
|
4754
4798
|
return setConfigFont(name, tokened, parsed), parsed;
|
|
@@ -4831,7 +4875,7 @@ function createTamagui$2(configIn) {
|
|
|
4831
4875
|
fonts: {},
|
|
4832
4876
|
onlyAllowShorthands: false,
|
|
4833
4877
|
fontLanguages: [],
|
|
4834
|
-
animations:
|
|
4878
|
+
animations: defaultAnimationDriver,
|
|
4835
4879
|
media: {}
|
|
4836
4880
|
}, configIn), {
|
|
4837
4881
|
unset,
|
|
@@ -4881,8 +4925,7 @@ function getThemesDeduped(themes2, colorTokens) {
|
|
|
4881
4925
|
e2.names.push(themeName);
|
|
4882
4926
|
continue;
|
|
4883
4927
|
}
|
|
4884
|
-
var theme = __spreadValues({}, rawTheme);
|
|
4885
|
-
colorTokens && Object.assign(theme, colorTokens);
|
|
4928
|
+
var theme = __spreadValues(__spreadValues({}, colorTokens), rawTheme);
|
|
4886
4929
|
for (var key1 in theme) ensureThemeVariable(theme, key1);
|
|
4887
4930
|
var deduped = {
|
|
4888
4931
|
names: [themeName],
|
|
@@ -10498,7 +10541,9 @@ var DialogContext = createStyledContext(
|
|
|
10498
10541
|
height: "auto",
|
|
10499
10542
|
// ensure always in frame and right height
|
|
10500
10543
|
maxHeight: "100vh",
|
|
10501
|
-
position: "fixed"
|
|
10544
|
+
position: "fixed",
|
|
10545
|
+
// ensure dialog inherits stacking context from portal wrapper
|
|
10546
|
+
zIndex: 1
|
|
10502
10547
|
}
|
|
10503
10548
|
}
|
|
10504
10549
|
}
|
|
@@ -13938,7 +13983,7 @@ var needsRepropagation = isAndroid || isIos && !USE_NATIVE_PORTAL, PopoverContex
|
|
|
13938
13983
|
virtualRef
|
|
13939
13984
|
}), {
|
|
13940
13985
|
scope,
|
|
13941
|
-
asChild:
|
|
13986
|
+
asChild: true,
|
|
13942
13987
|
children: trigger
|
|
13943
13988
|
}));
|
|
13944
13989
|
}), PopoverContentFrame = styled(PopperContentFrame, {
|
package/dist/test.cjs
CHANGED
|
@@ -3358,6 +3358,10 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
|
|
|
3358
3358
|
if (!(!styleProps2.noSkip && subKey in skipProps)) {
|
|
3359
3359
|
if (styleProps2.noExpand) res[subKey] = val;
|
|
3360
3360
|
else if (variants2 && subKey in variants2) {
|
|
3361
|
+
if (staticConfig) {
|
|
3362
|
+
var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
|
|
3363
|
+
contextProps && subKey in contextProps && (styleState.resolvedContextVariants || (styleState.resolvedContextVariants = {}), styleState.resolvedContextVariants[subKey] = val);
|
|
3364
|
+
}
|
|
3361
3365
|
if (parentVariantKey && parentVariantKey === key) res[subKey] = // SYNC WITH *1
|
|
3362
3366
|
val[0] === "$" ? getTokenForKey(subKey, val, styleProps2, styleState) : val;
|
|
3363
3367
|
else {
|
|
@@ -3520,6 +3524,17 @@ function _type_of$5(obj) {
|
|
|
3520
3524
|
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
3521
3525
|
}
|
|
3522
3526
|
var conf;
|
|
3527
|
+
function normalizeGroupKey(key, groupContext) {
|
|
3528
|
+
var parts = key.split("-"), plen = parts.length;
|
|
3529
|
+
if (
|
|
3530
|
+
// check if its actually a simple group selector to avoid breaking selectors
|
|
3531
|
+
plen === 2 || plen === 3 && pseudoPriorities[parts[parts.length - 1]]
|
|
3532
|
+
) {
|
|
3533
|
+
var name = parts[1];
|
|
3534
|
+
if (groupContext && !groupContext[name]) return key.replace("$group-", "$group-true-");
|
|
3535
|
+
}
|
|
3536
|
+
return key;
|
|
3537
|
+
}
|
|
3523
3538
|
function isValidStyleKey(key, validStyles2, accept) {
|
|
3524
3539
|
return key in validStyles2 ? true : accept && key in accept;
|
|
3525
3540
|
}
|
|
@@ -3547,16 +3562,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
3547
3562
|
return "continue";
|
|
3548
3563
|
}
|
|
3549
3564
|
var isVariant = !isValidStyleKeyInit && variants2 && keyInit in variants2, isStyleLikeKey = isValidStyleKeyInit || isVariant, isPseudo = keyInit in validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo ? getMediaKey(keyInit) : false, isMediaOrPseudo = !!(isMedia || isPseudo);
|
|
3550
|
-
|
|
3551
|
-
var parts = keyInit.split("-"), plen = parts.length;
|
|
3552
|
-
if (
|
|
3553
|
-
// check if its actually a simple group selector to avoid breaking selectors
|
|
3554
|
-
plen === 2 || plen === 3 && pseudoPriorities[parts[parts.length - 1]]
|
|
3555
|
-
) {
|
|
3556
|
-
var name2 = parts[1];
|
|
3557
|
-
groupContext && !(groupContext == null ? void 0 : groupContext[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
3558
|
-
}
|
|
3559
|
-
}
|
|
3565
|
+
isMediaOrPseudo && isMedia === "group" && (keyInit = normalizeGroupKey(keyInit, groupContext));
|
|
3560
3566
|
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
|
|
3561
3567
|
if (isStyleProp && (asChild === "except-style" || asChild === "except-style-web")) return "continue";
|
|
3562
3568
|
var shouldPassProp = !isStyleProp && isHOC || // is in parent variants
|
|
@@ -3580,7 +3586,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
3580
3586
|
mergeStyle(styleState, key4, val2, 1);
|
|
3581
3587
|
return;
|
|
3582
3588
|
}
|
|
3583
|
-
if (isPseudo = key4 in validPseudoKeys, isMedia = isPseudo ? false : getMediaKey(key4), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants2 && key4 in variants2, (inlineProps == null ? void 0 : inlineProps.has(key4)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened == null ? void 0 : inlineWhenUnflattened.has(key4))) {
|
|
3589
|
+
if (isPseudo = key4 in validPseudoKeys, isMedia = isPseudo ? false : getMediaKey(key4), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants2 && key4 in variants2, isMedia === "group" && (key4 = normalizeGroupKey(key4, groupContext)), (inlineProps == null ? void 0 : inlineProps.has(key4)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened == null ? void 0 : inlineWhenUnflattened.has(key4))) {
|
|
3584
3590
|
var _props_key;
|
|
3585
3591
|
viewProps[key4] = (_props_key = props[key4]) !== null && _props_key !== void 0 ? _props_key : val2;
|
|
3586
3592
|
}
|
|
@@ -3799,7 +3805,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
3799
3805
|
rulesToInsert,
|
|
3800
3806
|
dynamicThemeAccess,
|
|
3801
3807
|
pseudoGroups,
|
|
3802
|
-
mediaGroups
|
|
3808
|
+
mediaGroups,
|
|
3809
|
+
resolvedContextVariants: styleState.resolvedContextVariants
|
|
3803
3810
|
}, asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
3804
3811
|
if (!styleProps2.noMergeStyle && !asChildExceptStyleLike) {
|
|
3805
3812
|
var style2 = styleState.style;
|
|
@@ -4107,7 +4114,7 @@ function _type_of$4(obj) {
|
|
|
4107
4114
|
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
4108
4115
|
}
|
|
4109
4116
|
var useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
4110
|
-
var _animationDriver_usePresence, isHydrated = useDidFinishSSR(), needsHydration = !useIsClientOnly(), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, {
|
|
4117
|
+
var _animationDriver_usePresence, isHydrated = useDidFinishSSR(), needsHydration = !useIsClientOnly(), useAnimations = (animationDriver == null ? void 0 : animationDriver.isStub) ? void 0 : animationDriver == null ? void 0 : animationDriver.useAnimations, {
|
|
4111
4118
|
isHOC
|
|
4112
4119
|
} = staticConfig, stateRef = React.useRef(
|
|
4113
4120
|
// performance: avoid creating object every render
|
|
@@ -4268,7 +4275,7 @@ function createComponent(staticConfig) {
|
|
|
4268
4275
|
nextProps && (props = nextProps), overriddenContextProps = overrides;
|
|
4269
4276
|
}
|
|
4270
4277
|
var componentName2 = props.componentName || staticConfig.componentName;
|
|
4271
|
-
var componentContext = React.useContext(ComponentContext), groupContextParent = React.useContext(GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = useComponentState(props, animationDriver, staticConfig), {
|
|
4278
|
+
var componentContext = React.useContext(ComponentContext), groupContextParent = React.useContext(GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = useComponentState(props, (animationDriver == null ? void 0 : animationDriver.isStub) ? null : animationDriver, staticConfig), {
|
|
4272
4279
|
disabled,
|
|
4273
4280
|
groupName,
|
|
4274
4281
|
hasAnimationProp,
|
|
@@ -4358,7 +4365,15 @@ function createComponent(staticConfig) {
|
|
|
4358
4365
|
willBeAnimated,
|
|
4359
4366
|
styledContext: styledContextValue
|
|
4360
4367
|
}, themeName = (themeState == null ? void 0 : themeState.name) || "";
|
|
4361
|
-
var splitStyles = useSplitStyles(props, staticConfig, theme, themeName, state, styleProps2, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), isPassthrough = !splitStyles,
|
|
4368
|
+
var splitStyles = useSplitStyles(props, staticConfig, theme, themeName, state, styleProps2, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), isPassthrough = !splitStyles, contextForOverride = staticConfig.context;
|
|
4369
|
+
if (splitStyles == null ? void 0 : splitStyles.resolvedContextVariants) {
|
|
4370
|
+
var _staticConfig_parentStaticConfig, contextForVariants = staticConfig.context || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : _staticConfig_parentStaticConfig.context);
|
|
4371
|
+
if (contextForVariants) {
|
|
4372
|
+
for (var key in splitStyles.resolvedContextVariants) overriddenContextProps || (overriddenContextProps = {}), overriddenContextProps[key] = splitStyles.resolvedContextVariants[key];
|
|
4373
|
+
staticConfig.context || (contextForOverride = contextForVariants);
|
|
4374
|
+
}
|
|
4375
|
+
}
|
|
4376
|
+
var groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
|
|
4362
4377
|
if (!isPassthrough && groupContext && // avoids onLayout if we don't need it
|
|
4363
4378
|
props.containerType !== "normal") {
|
|
4364
4379
|
var groupState = groupContext == null ? void 0 : groupContext.state;
|
|
@@ -4400,8 +4415,8 @@ function createComponent(staticConfig) {
|
|
|
4400
4415
|
}), stateRef.current.setStateShallow = function(nextOrGetNext) {
|
|
4401
4416
|
var prev = stateRef.current.nextState || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
|
|
4402
4417
|
if (!(next === prev || isEqualShallow(prev, next))) {
|
|
4403
|
-
var canAvoidReRender = Object.keys(next).every(function(
|
|
4404
|
-
return avoidReRenderKeys.has(
|
|
4418
|
+
var canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
4419
|
+
return avoidReRenderKeys.has(key3);
|
|
4405
4420
|
}), updatedState = __spreadValues(__spreadValues({}, prev), next);
|
|
4406
4421
|
if (stateRef.current.nextState = updatedState, canAvoidReRender) {
|
|
4407
4422
|
var _stateRef_current_updateStyleListener, _stateRef_current;
|
|
@@ -4647,9 +4662,9 @@ function createComponent(staticConfig) {
|
|
|
4647
4662
|
}))), "group" in props && (content = /* @__PURE__ */ jsxRuntimeExports.jsx(GroupContext.Provider, {
|
|
4648
4663
|
value: allGroupContexts,
|
|
4649
4664
|
children: content
|
|
4650
|
-
})), content = disableTheme || !splitStyles ? content : getThemedChildren(themeState, content, themeStateProps, false, stateRef), overriddenContextProps) {
|
|
4651
|
-
var Provider =
|
|
4652
|
-
for (var
|
|
4665
|
+
})), content = disableTheme || !splitStyles ? content : getThemedChildren(themeState, content, themeStateProps, false, stateRef), overriddenContextProps && contextForOverride) {
|
|
4666
|
+
var Provider = contextForOverride.Provider;
|
|
4667
|
+
for (var key1 in styledContextValue) key1 in overriddenContextProps || (overriddenContextProps[key1] = styledContextValue[key1]);
|
|
4653
4668
|
debugProp && console.info("overriddenContextProps", overriddenContextProps), content = /* @__PURE__ */ jsxRuntimeExports.jsx(Provider, __spreadProps(__spreadValues({
|
|
4654
4669
|
__disableMergeDefaultValues: true
|
|
4655
4670
|
}, overriddenContextProps), {
|
|
@@ -4995,6 +5010,35 @@ var cache$1 = /* @__PURE__ */ new WeakMap(), createVariables = function(tokens)
|
|
|
4995
5010
|
}
|
|
4996
5011
|
return cache$1.set(res, true), res;
|
|
4997
5012
|
};
|
|
5013
|
+
var noAnimationDriver = function(method) {
|
|
5014
|
+
console.warn(`No animation driver configured. To use ${method}, you must pass \`animations\` to createTamagui. See: https://tamagui.dev/docs/core/animations`);
|
|
5015
|
+
}, createEmptyAnimationDriver = function() {
|
|
5016
|
+
return {
|
|
5017
|
+
isReactNative: false,
|
|
5018
|
+
supportsCSS: true,
|
|
5019
|
+
classNameAnimation: true,
|
|
5020
|
+
isStub: true,
|
|
5021
|
+
animations: {},
|
|
5022
|
+
useAnimations: function() {
|
|
5023
|
+
return noAnimationDriver("animations");
|
|
5024
|
+
},
|
|
5025
|
+
usePresence: function() {
|
|
5026
|
+
return noAnimationDriver("usePresence");
|
|
5027
|
+
},
|
|
5028
|
+
ResetPresence: function() {
|
|
5029
|
+
return noAnimationDriver("ResetPresence");
|
|
5030
|
+
},
|
|
5031
|
+
useAnimatedNumber: function() {
|
|
5032
|
+
return noAnimationDriver("useAnimatedNumber");
|
|
5033
|
+
},
|
|
5034
|
+
useAnimatedNumberStyle: function() {
|
|
5035
|
+
return noAnimationDriver("useAnimatedNumberStyle");
|
|
5036
|
+
},
|
|
5037
|
+
useAnimatedNumberReaction: function() {
|
|
5038
|
+
return noAnimationDriver("useAnimatedNumberReaction");
|
|
5039
|
+
}
|
|
5040
|
+
};
|
|
5041
|
+
}, defaultAnimationDriver = createEmptyAnimationDriver();
|
|
4998
5042
|
function insertFont(name, fontIn) {
|
|
4999
5043
|
var font = createFont(fontIn), tokened = createVariables(font, name), parsed = parseFont(tokened);
|
|
5000
5044
|
return setConfigFont(name, tokened, parsed), parsed;
|
|
@@ -5078,7 +5122,7 @@ function createTamagui$2(configIn) {
|
|
|
5078
5122
|
fonts: {},
|
|
5079
5123
|
onlyAllowShorthands: false,
|
|
5080
5124
|
fontLanguages: [],
|
|
5081
|
-
animations:
|
|
5125
|
+
animations: defaultAnimationDriver,
|
|
5082
5126
|
media: {}
|
|
5083
5127
|
}, configIn), {
|
|
5084
5128
|
unset,
|
|
@@ -5128,8 +5172,7 @@ function getThemesDeduped(themes2, colorTokens) {
|
|
|
5128
5172
|
e2.names.push(themeName);
|
|
5129
5173
|
continue;
|
|
5130
5174
|
}
|
|
5131
|
-
var theme = __spreadValues({}, rawTheme);
|
|
5132
|
-
colorTokens && Object.assign(theme, colorTokens);
|
|
5175
|
+
var theme = __spreadValues(__spreadValues({}, colorTokens), rawTheme);
|
|
5133
5176
|
for (var key1 in theme) ensureThemeVariable(theme, key1);
|
|
5134
5177
|
var deduped = {
|
|
5135
5178
|
names: [themeName],
|
|
@@ -10646,7 +10689,9 @@ var DialogContext = createStyledContext(
|
|
|
10646
10689
|
height: "auto",
|
|
10647
10690
|
// ensure always in frame and right height
|
|
10648
10691
|
maxHeight: "100vh",
|
|
10649
|
-
position: "fixed"
|
|
10692
|
+
position: "fixed",
|
|
10693
|
+
// ensure dialog inherits stacking context from portal wrapper
|
|
10694
|
+
zIndex: 1
|
|
10650
10695
|
}
|
|
10651
10696
|
}
|
|
10652
10697
|
}
|
|
@@ -14086,7 +14131,7 @@ var needsRepropagation = isAndroid || isIos && !USE_NATIVE_PORTAL, PopoverContex
|
|
|
14086
14131
|
virtualRef
|
|
14087
14132
|
}), {
|
|
14088
14133
|
scope,
|
|
14089
|
-
asChild:
|
|
14134
|
+
asChild: true,
|
|
14090
14135
|
children: trigger
|
|
14091
14136
|
}));
|
|
14092
14137
|
}), PopoverContentFrame = styled(PopperContentFrame, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamagui",
|
|
3
|
-
"version": "1.138.
|
|
3
|
+
"version": "1.138.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Style and UI for React (web and native) meet an optimizing compiler",
|
|
6
6
|
"removeSideEffects": true,
|
|
@@ -81,62 +81,62 @@
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@tamagui/accordion": "1.138.
|
|
85
|
-
"@tamagui/adapt": "1.138.
|
|
86
|
-
"@tamagui/alert-dialog": "1.138.
|
|
87
|
-
"@tamagui/animate-presence": "1.138.
|
|
88
|
-
"@tamagui/avatar": "1.138.
|
|
89
|
-
"@tamagui/button": "1.138.
|
|
90
|
-
"@tamagui/card": "1.138.
|
|
91
|
-
"@tamagui/checkbox": "1.138.
|
|
92
|
-
"@tamagui/compose-refs": "1.138.
|
|
93
|
-
"@tamagui/constants": "1.138.
|
|
94
|
-
"@tamagui/core": "1.138.
|
|
95
|
-
"@tamagui/create-context": "1.138.
|
|
96
|
-
"@tamagui/dialog": "1.138.
|
|
97
|
-
"@tamagui/elements": "1.138.
|
|
98
|
-
"@tamagui/fake-react-native": "1.138.
|
|
99
|
-
"@tamagui/focusable": "1.138.
|
|
100
|
-
"@tamagui/font-size": "1.138.
|
|
101
|
-
"@tamagui/form": "1.138.
|
|
102
|
-
"@tamagui/get-button-sized": "1.138.
|
|
103
|
-
"@tamagui/get-font-sized": "1.138.
|
|
104
|
-
"@tamagui/get-token": "1.138.
|
|
105
|
-
"@tamagui/group": "1.138.
|
|
106
|
-
"@tamagui/helpers-tamagui": "1.138.
|
|
107
|
-
"@tamagui/image": "1.138.
|
|
108
|
-
"@tamagui/label": "1.138.
|
|
109
|
-
"@tamagui/linear-gradient": "1.138.
|
|
110
|
-
"@tamagui/list-item": "1.138.
|
|
111
|
-
"@tamagui/polyfill-dev": "1.138.
|
|
112
|
-
"@tamagui/popover": "1.138.
|
|
113
|
-
"@tamagui/popper": "1.138.
|
|
114
|
-
"@tamagui/portal": "1.138.
|
|
115
|
-
"@tamagui/progress": "1.138.
|
|
116
|
-
"@tamagui/radio-group": "1.138.
|
|
117
|
-
"@tamagui/react-native-media-driver": "1.138.
|
|
118
|
-
"@tamagui/scroll-view": "1.138.
|
|
119
|
-
"@tamagui/select": "1.138.
|
|
120
|
-
"@tamagui/separator": "1.138.
|
|
121
|
-
"@tamagui/shapes": "1.138.
|
|
122
|
-
"@tamagui/sheet": "1.138.
|
|
123
|
-
"@tamagui/slider": "1.138.
|
|
124
|
-
"@tamagui/stacks": "1.138.
|
|
125
|
-
"@tamagui/switch": "1.138.
|
|
126
|
-
"@tamagui/tabs": "1.138.
|
|
127
|
-
"@tamagui/text": "1.138.
|
|
128
|
-
"@tamagui/theme": "1.138.
|
|
129
|
-
"@tamagui/toggle-group": "1.138.
|
|
130
|
-
"@tamagui/tooltip": "1.138.
|
|
131
|
-
"@tamagui/use-controllable-state": "1.138.
|
|
132
|
-
"@tamagui/use-debounce": "1.138.
|
|
133
|
-
"@tamagui/use-force-update": "1.138.
|
|
134
|
-
"@tamagui/use-window-dimensions": "1.138.
|
|
135
|
-
"@tamagui/visually-hidden": "1.138.
|
|
136
|
-
"@tamagui/z-index-stack": "1.138.
|
|
84
|
+
"@tamagui/accordion": "1.138.3",
|
|
85
|
+
"@tamagui/adapt": "1.138.3",
|
|
86
|
+
"@tamagui/alert-dialog": "1.138.3",
|
|
87
|
+
"@tamagui/animate-presence": "1.138.3",
|
|
88
|
+
"@tamagui/avatar": "1.138.3",
|
|
89
|
+
"@tamagui/button": "1.138.3",
|
|
90
|
+
"@tamagui/card": "1.138.3",
|
|
91
|
+
"@tamagui/checkbox": "1.138.3",
|
|
92
|
+
"@tamagui/compose-refs": "1.138.3",
|
|
93
|
+
"@tamagui/constants": "1.138.3",
|
|
94
|
+
"@tamagui/core": "1.138.3",
|
|
95
|
+
"@tamagui/create-context": "1.138.3",
|
|
96
|
+
"@tamagui/dialog": "1.138.3",
|
|
97
|
+
"@tamagui/elements": "1.138.3",
|
|
98
|
+
"@tamagui/fake-react-native": "1.138.3",
|
|
99
|
+
"@tamagui/focusable": "1.138.3",
|
|
100
|
+
"@tamagui/font-size": "1.138.3",
|
|
101
|
+
"@tamagui/form": "1.138.3",
|
|
102
|
+
"@tamagui/get-button-sized": "1.138.3",
|
|
103
|
+
"@tamagui/get-font-sized": "1.138.3",
|
|
104
|
+
"@tamagui/get-token": "1.138.3",
|
|
105
|
+
"@tamagui/group": "1.138.3",
|
|
106
|
+
"@tamagui/helpers-tamagui": "1.138.3",
|
|
107
|
+
"@tamagui/image": "1.138.3",
|
|
108
|
+
"@tamagui/label": "1.138.3",
|
|
109
|
+
"@tamagui/linear-gradient": "1.138.3",
|
|
110
|
+
"@tamagui/list-item": "1.138.3",
|
|
111
|
+
"@tamagui/polyfill-dev": "1.138.3",
|
|
112
|
+
"@tamagui/popover": "1.138.3",
|
|
113
|
+
"@tamagui/popper": "1.138.3",
|
|
114
|
+
"@tamagui/portal": "1.138.3",
|
|
115
|
+
"@tamagui/progress": "1.138.3",
|
|
116
|
+
"@tamagui/radio-group": "1.138.3",
|
|
117
|
+
"@tamagui/react-native-media-driver": "1.138.3",
|
|
118
|
+
"@tamagui/scroll-view": "1.138.3",
|
|
119
|
+
"@tamagui/select": "1.138.3",
|
|
120
|
+
"@tamagui/separator": "1.138.3",
|
|
121
|
+
"@tamagui/shapes": "1.138.3",
|
|
122
|
+
"@tamagui/sheet": "1.138.3",
|
|
123
|
+
"@tamagui/slider": "1.138.3",
|
|
124
|
+
"@tamagui/stacks": "1.138.3",
|
|
125
|
+
"@tamagui/switch": "1.138.3",
|
|
126
|
+
"@tamagui/tabs": "1.138.3",
|
|
127
|
+
"@tamagui/text": "1.138.3",
|
|
128
|
+
"@tamagui/theme": "1.138.3",
|
|
129
|
+
"@tamagui/toggle-group": "1.138.3",
|
|
130
|
+
"@tamagui/tooltip": "1.138.3",
|
|
131
|
+
"@tamagui/use-controllable-state": "1.138.3",
|
|
132
|
+
"@tamagui/use-debounce": "1.138.3",
|
|
133
|
+
"@tamagui/use-force-update": "1.138.3",
|
|
134
|
+
"@tamagui/use-window-dimensions": "1.138.3",
|
|
135
|
+
"@tamagui/visually-hidden": "1.138.3",
|
|
136
|
+
"@tamagui/z-index-stack": "1.138.3"
|
|
137
137
|
},
|
|
138
138
|
"devDependencies": {
|
|
139
|
-
"@tamagui/build": "1.138.
|
|
139
|
+
"@tamagui/build": "1.138.3",
|
|
140
140
|
"react": "*",
|
|
141
141
|
"react-native": "0.81.5",
|
|
142
142
|
"react-native-web": "^0.21.0"
|