@tamagui/core 2.0.0-1768024152500 → 2.0.0-1768202210244
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 +11 -11
- package/dist/test.native.cjs +11 -11
- package/package.json +11 -11
package/dist/native.cjs
CHANGED
|
@@ -9657,13 +9657,15 @@ var cache$1 = /* @__PURE__ */ new WeakMap(), getVariantExtras = function(styleSt
|
|
|
9657
9657
|
props,
|
|
9658
9658
|
conf: conf2,
|
|
9659
9659
|
context,
|
|
9660
|
-
theme
|
|
9661
|
-
|
|
9660
|
+
theme,
|
|
9661
|
+
styleProps: styleProps2
|
|
9662
|
+
} = styleState, styledContext = styleProps2.styledContext, fonts = conf2.fontsParsed;
|
|
9662
9663
|
(context == null ? void 0 : context.language) && (fonts = getFontsForLanguage(conf2.fontsParsed, context.language));
|
|
9663
9664
|
var next = {
|
|
9664
9665
|
fonts,
|
|
9665
9666
|
tokens: conf2.tokensParsed,
|
|
9666
9667
|
theme,
|
|
9668
|
+
context: styledContext,
|
|
9667
9669
|
get fontFamily() {
|
|
9668
9670
|
return getVariableValue(styleState.fontFamily || styleState.props.fontFamily) || props.fontFamily || getVariableValue(getSetting("defaultFont"));
|
|
9669
9671
|
},
|
|
@@ -9769,9 +9771,9 @@ var _c = webOnlyStylePropsView, {
|
|
|
9769
9771
|
});
|
|
9770
9772
|
var skipProps = {
|
|
9771
9773
|
untilMeasured: 1,
|
|
9772
|
-
|
|
9774
|
+
transition: 1,
|
|
9773
9775
|
space: 1,
|
|
9774
|
-
|
|
9776
|
+
transitionOnly: 1,
|
|
9775
9777
|
disableClassName: 1,
|
|
9776
9778
|
debug: 1,
|
|
9777
9779
|
componentName: 1,
|
|
@@ -9780,7 +9782,7 @@ var skipProps = {
|
|
|
9780
9782
|
style: 1,
|
|
9781
9783
|
// handled after loop so pseudos set usedKeys and override it if necessary
|
|
9782
9784
|
group: 1,
|
|
9783
|
-
|
|
9785
|
+
transitionPresence: 1
|
|
9784
9786
|
};
|
|
9785
9787
|
Object.assign(skipProps, webPropsToSkip);
|
|
9786
9788
|
function _type_of$3(obj) {
|
|
@@ -10675,7 +10677,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
|
10675
10677
|
stateRef.current || (stateRef.current = {
|
|
10676
10678
|
startedUnhydrated: needsHydration && !isHydrated
|
|
10677
10679
|
});
|
|
10678
|
-
var hasAnimationProp = !!(!isHOC && "
|
|
10680
|
+
var hasAnimationProp = !!(!isHOC && "transition" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSS = animationDriver == null ? void 0 : animationDriver.supportsCSS, curStateRef = stateRef.current;
|
|
10679
10681
|
!needsHydration && hasAnimationProp && (curStateRef.hasAnimated = true);
|
|
10680
10682
|
var willBeAnimatedClient = (function() {
|
|
10681
10683
|
var next = !!(hasAnimationProp && !isHOC && useAnimations);
|
|
@@ -10684,7 +10686,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
|
10684
10686
|
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = true);
|
|
10685
10687
|
var {
|
|
10686
10688
|
disableClassName
|
|
10687
|
-
} = props, presence = !isHOC && willBeAnimated && props.
|
|
10689
|
+
} = props, presence = !isHOC && willBeAnimated && props.transitionPresence !== false && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === false, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === true && presenceState.initial !== false, hasEnterStyle = !!props.enterStyle, hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated, canImmediatelyEnter = hasEnterStyle || isEntering, shouldEnter = !isHOC && (hasEnterStyle || isEntering || hasAnimationThatNeedsHydrate || // disableClassName doesnt work server side, only client, so needs hydrate
|
|
10688
10690
|
// this is just for a better ux, supports css variables for light/dark, media queries, etc
|
|
10689
10691
|
disableClassName), initialState = shouldEnter ? (
|
|
10690
10692
|
// on the very first render we switch all spring animation drivers to css rendering
|
|
@@ -10941,12 +10943,12 @@ function createComponent(staticConfig) {
|
|
|
10941
10943
|
group,
|
|
10942
10944
|
hasDynGroupChildren,
|
|
10943
10945
|
unmounted,
|
|
10944
|
-
|
|
10946
|
+
transition
|
|
10945
10947
|
} = _a2, childrenGroupState = __objRest(_a2, [
|
|
10946
10948
|
"group",
|
|
10947
10949
|
"hasDynGroupChildren",
|
|
10948
10950
|
"unmounted",
|
|
10949
|
-
"
|
|
10951
|
+
"transition"
|
|
10950
10952
|
]);
|
|
10951
10953
|
notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState);
|
|
10952
10954
|
}
|
|
@@ -11791,7 +11793,6 @@ var useIsTouchDevice = function() {
|
|
|
11791
11793
|
return true;
|
|
11792
11794
|
};
|
|
11793
11795
|
var Stack$1 = createComponent({
|
|
11794
|
-
componentName: "Stack",
|
|
11795
11796
|
acceptsClassName: true,
|
|
11796
11797
|
defaultProps: stackDefaultStyles,
|
|
11797
11798
|
validStyles
|
|
@@ -11957,7 +11958,6 @@ var ellipsisStyle = {
|
|
|
11957
11958
|
});
|
|
11958
11959
|
Text$1.displayName = "Text";
|
|
11959
11960
|
var View$1 = createComponent({
|
|
11960
|
-
componentName: "View",
|
|
11961
11961
|
acceptsClassName: true,
|
|
11962
11962
|
defaultProps: stackDefaultStyles,
|
|
11963
11963
|
validStyles
|
package/dist/test.native.cjs
CHANGED
|
@@ -2350,13 +2350,15 @@ var cache$1 = /* @__PURE__ */ new WeakMap(), getVariantExtras = function(styleSt
|
|
|
2350
2350
|
props,
|
|
2351
2351
|
conf: conf2,
|
|
2352
2352
|
context,
|
|
2353
|
-
theme
|
|
2354
|
-
|
|
2353
|
+
theme,
|
|
2354
|
+
styleProps
|
|
2355
|
+
} = styleState, styledContext = styleProps.styledContext, fonts = conf2.fontsParsed;
|
|
2355
2356
|
(context == null ? void 0 : context.language) && (fonts = getFontsForLanguage(conf2.fontsParsed, context.language));
|
|
2356
2357
|
var next = {
|
|
2357
2358
|
fonts,
|
|
2358
2359
|
tokens: conf2.tokensParsed,
|
|
2359
2360
|
theme,
|
|
2361
|
+
context: styledContext,
|
|
2360
2362
|
get fontFamily() {
|
|
2361
2363
|
return getVariableValue(styleState.fontFamily || styleState.props.fontFamily) || props.fontFamily || getVariableValue(getSetting("defaultFont"));
|
|
2362
2364
|
},
|
|
@@ -2462,9 +2464,9 @@ var _a = webOnlyStylePropsView, {
|
|
|
2462
2464
|
});
|
|
2463
2465
|
var skipProps = {
|
|
2464
2466
|
untilMeasured: 1,
|
|
2465
|
-
|
|
2467
|
+
transition: 1,
|
|
2466
2468
|
space: 1,
|
|
2467
|
-
|
|
2469
|
+
transitionOnly: 1,
|
|
2468
2470
|
disableClassName: 1,
|
|
2469
2471
|
debug: 1,
|
|
2470
2472
|
componentName: 1,
|
|
@@ -2473,7 +2475,7 @@ var skipProps = {
|
|
|
2473
2475
|
style: 1,
|
|
2474
2476
|
// handled after loop so pseudos set usedKeys and override it if necessary
|
|
2475
2477
|
group: 1,
|
|
2476
|
-
|
|
2478
|
+
transitionPresence: 1
|
|
2477
2479
|
};
|
|
2478
2480
|
skipProps["data-test-renders"] = 1;
|
|
2479
2481
|
Object.assign(skipProps, webPropsToSkip);
|
|
@@ -3370,7 +3372,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
|
3370
3372
|
stateRef.current || (stateRef.current = {
|
|
3371
3373
|
startedUnhydrated: needsHydration && !isHydrated
|
|
3372
3374
|
});
|
|
3373
|
-
var hasAnimationProp = !!(!isHOC && "
|
|
3375
|
+
var hasAnimationProp = !!(!isHOC && "transition" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSS = animationDriver == null ? void 0 : animationDriver.supportsCSS, curStateRef = stateRef.current;
|
|
3374
3376
|
!needsHydration && hasAnimationProp && (curStateRef.hasAnimated = true);
|
|
3375
3377
|
var willBeAnimatedClient = (function() {
|
|
3376
3378
|
var next = !!(hasAnimationProp && !isHOC && useAnimations);
|
|
@@ -3379,7 +3381,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
|
3379
3381
|
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = true);
|
|
3380
3382
|
var {
|
|
3381
3383
|
disableClassName
|
|
3382
|
-
} = props, presence = !isHOC && willBeAnimated && props.
|
|
3384
|
+
} = props, presence = !isHOC && willBeAnimated && props.transitionPresence !== false && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === false, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === true && presenceState.initial !== false, hasEnterStyle = !!props.enterStyle, hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated, canImmediatelyEnter = hasEnterStyle || isEntering, shouldEnter = !isHOC && (hasEnterStyle || isEntering || hasAnimationThatNeedsHydrate || // disableClassName doesnt work server side, only client, so needs hydrate
|
|
3383
3385
|
// this is just for a better ux, supports css variables for light/dark, media queries, etc
|
|
3384
3386
|
disableClassName), initialState = shouldEnter ? (
|
|
3385
3387
|
// on the very first render we switch all spring animation drivers to css rendering
|
|
@@ -3640,12 +3642,12 @@ function createComponent(staticConfig) {
|
|
|
3640
3642
|
group,
|
|
3641
3643
|
hasDynGroupChildren,
|
|
3642
3644
|
unmounted,
|
|
3643
|
-
|
|
3645
|
+
transition
|
|
3644
3646
|
} = _a2, childrenGroupState = __objRest(_a2, [
|
|
3645
3647
|
"group",
|
|
3646
3648
|
"hasDynGroupChildren",
|
|
3647
3649
|
"unmounted",
|
|
3648
|
-
"
|
|
3650
|
+
"transition"
|
|
3649
3651
|
]);
|
|
3650
3652
|
notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState);
|
|
3651
3653
|
}
|
|
@@ -4491,7 +4493,6 @@ var useIsTouchDevice = function() {
|
|
|
4491
4493
|
return true;
|
|
4492
4494
|
};
|
|
4493
4495
|
var Stack$1 = createComponent({
|
|
4494
|
-
componentName: "Stack",
|
|
4495
4496
|
acceptsClassName: true,
|
|
4496
4497
|
defaultProps: stackDefaultStyles,
|
|
4497
4498
|
validStyles
|
|
@@ -4657,7 +4658,6 @@ var ellipsisStyle = {
|
|
|
4657
4658
|
});
|
|
4658
4659
|
Text$1.displayName = "Text";
|
|
4659
4660
|
var View$1 = createComponent({
|
|
4660
|
-
componentName: "View",
|
|
4661
4661
|
acceptsClassName: true,
|
|
4662
4662
|
defaultProps: stackDefaultStyles,
|
|
4663
4663
|
validStyles
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/core",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-1768202210244",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
"native-test.d.ts"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tamagui/helpers": "2.0.0-
|
|
37
|
-
"@tamagui/react-native-media-driver": "2.0.0-
|
|
38
|
-
"@tamagui/react-native-use-pressable": "2.0.0-
|
|
39
|
-
"@tamagui/react-native-use-responder-events": "2.0.0-
|
|
40
|
-
"@tamagui/use-element-layout": "2.0.0-
|
|
41
|
-
"@tamagui/use-event": "2.0.0-
|
|
42
|
-
"@tamagui/web": "2.0.0-
|
|
36
|
+
"@tamagui/helpers": "2.0.0-1768202210244",
|
|
37
|
+
"@tamagui/react-native-media-driver": "2.0.0-1768202210244",
|
|
38
|
+
"@tamagui/react-native-use-pressable": "2.0.0-1768202210244",
|
|
39
|
+
"@tamagui/react-native-use-responder-events": "2.0.0-1768202210244",
|
|
40
|
+
"@tamagui/use-element-layout": "2.0.0-1768202210244",
|
|
41
|
+
"@tamagui/use-event": "2.0.0-1768202210244",
|
|
42
|
+
"@tamagui/web": "2.0.0-1768202210244"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@tamagui/build": "2.0.0-
|
|
46
|
-
"@tamagui/native-bundle": "2.0.0-
|
|
47
|
-
"@tamagui/react-native-web-lite": "2.0.0-
|
|
45
|
+
"@tamagui/build": "2.0.0-1768202210244",
|
|
46
|
+
"@tamagui/native-bundle": "2.0.0-1768202210244",
|
|
47
|
+
"@tamagui/react-native-web-lite": "2.0.0-1768202210244",
|
|
48
48
|
"@testing-library/react": "^16.1.0",
|
|
49
49
|
"csstype": "^3.0.10",
|
|
50
50
|
"react": "*",
|