@tamagui/web 1.138.1 → 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/cjs/createComponent.cjs +16 -14
- package/dist/cjs/createComponent.js +18 -15
- package/dist/cjs/createComponent.js.map +1 -1
- package/dist/cjs/createComponent.native.js +18 -10
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createTamagui.cjs +3 -2
- package/dist/cjs/createTamagui.js +3 -4
- package/dist/cjs/createTamagui.js.map +1 -1
- package/dist/cjs/createTamagui.native.js +3 -2
- package/dist/cjs/createTamagui.native.js.map +1 -1
- package/dist/cjs/helpers/createEmptyAnimationDriver.cjs +38 -0
- package/dist/cjs/helpers/createEmptyAnimationDriver.js +34 -0
- package/dist/cjs/helpers/createEmptyAnimationDriver.js.map +6 -0
- package/dist/cjs/helpers/createEmptyAnimationDriver.native.js +55 -0
- package/dist/cjs/helpers/createEmptyAnimationDriver.native.js.map +1 -0
- package/dist/cjs/helpers/defaultAnimationDriver.cjs +42 -0
- package/dist/cjs/helpers/defaultAnimationDriver.js +37 -0
- package/dist/cjs/helpers/defaultAnimationDriver.js.map +6 -0
- package/dist/cjs/helpers/defaultAnimationDriver.native.js +59 -0
- package/dist/cjs/helpers/defaultAnimationDriver.native.js.map +1 -0
- package/dist/cjs/helpers/getSplitStyles.cjs +15 -12
- package/dist/cjs/helpers/getSplitStyles.js +16 -12
- package/dist/cjs/helpers/getSplitStyles.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.native.js +15 -12
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/propMapper.cjs +4 -0
- package/dist/cjs/helpers/propMapper.js +4 -0
- package/dist/cjs/helpers/propMapper.js.map +1 -1
- package/dist/cjs/helpers/propMapper.native.js +7 -0
- package/dist/cjs/helpers/propMapper.native.js.map +1 -1
- package/dist/cjs/helpers/wrapStyleTags.cjs +1 -0
- package/dist/cjs/helpers/wrapStyleTags.js +1 -0
- package/dist/cjs/helpers/wrapStyleTags.js.map +1 -1
- package/dist/cjs/hooks/useComponentState.cjs +11 -6
- package/dist/cjs/hooks/useComponentState.js +11 -3
- package/dist/cjs/hooks/useComponentState.js.map +1 -1
- package/dist/cjs/hooks/useComponentState.native.js +11 -6
- package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
- package/dist/esm/createComponent.js +18 -15
- package/dist/esm/createComponent.js.map +1 -1
- package/dist/esm/createComponent.mjs +16 -14
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +18 -10
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createTamagui.js +3 -3
- package/dist/esm/createTamagui.js.map +1 -1
- package/dist/esm/createTamagui.mjs +3 -2
- package/dist/esm/createTamagui.mjs.map +1 -1
- package/dist/esm/createTamagui.native.js +3 -2
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/helpers/createEmptyAnimationDriver.js +18 -0
- package/dist/esm/helpers/createEmptyAnimationDriver.js.map +6 -0
- package/dist/esm/helpers/createEmptyAnimationDriver.mjs +15 -0
- package/dist/esm/helpers/createEmptyAnimationDriver.mjs.map +1 -0
- package/dist/esm/helpers/createEmptyAnimationDriver.native.js +29 -0
- package/dist/esm/helpers/createEmptyAnimationDriver.native.js.map +1 -0
- package/dist/esm/helpers/defaultAnimationDriver.js +21 -0
- package/dist/esm/helpers/defaultAnimationDriver.js.map +6 -0
- package/dist/esm/helpers/defaultAnimationDriver.mjs +19 -0
- package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -0
- package/dist/esm/helpers/defaultAnimationDriver.native.js +33 -0
- package/dist/esm/helpers/defaultAnimationDriver.native.js.map +1 -0
- package/dist/esm/helpers/getSplitStyles.js +16 -12
- package/dist/esm/helpers/getSplitStyles.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +15 -12
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +15 -12
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/propMapper.js +4 -0
- package/dist/esm/helpers/propMapper.js.map +1 -1
- package/dist/esm/helpers/propMapper.mjs +4 -0
- package/dist/esm/helpers/propMapper.mjs.map +1 -1
- package/dist/esm/helpers/propMapper.native.js +7 -0
- package/dist/esm/helpers/propMapper.native.js.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.js +1 -0
- package/dist/esm/helpers/wrapStyleTags.js.map +1 -1
- package/dist/esm/helpers/wrapStyleTags.mjs +1 -0
- package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
- package/dist/esm/hooks/useComponentState.js +11 -3
- package/dist/esm/hooks/useComponentState.js.map +1 -1
- package/dist/esm/hooks/useComponentState.mjs +11 -6
- package/dist/esm/hooks/useComponentState.mjs.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +11 -6
- package/dist/esm/hooks/useComponentState.native.js.map +1 -1
- package/package.json +12 -12
- package/src/createComponent.tsx +28 -23
- package/src/createTamagui.ts +4 -7
- package/src/helpers/defaultAnimationDriver.tsx +23 -0
- package/src/helpers/getSplitStyles.tsx +28 -12
- package/src/helpers/propMapper.ts +15 -0
- package/src/helpers/wrapStyleTags.tsx +2 -0
- package/src/hooks/useComponentState.ts +21 -7
- package/src/types.tsx +10 -0
- package/types/createComponent.d.ts.map +1 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/helpers/createEmptyAnimationDriver.d.ts +3 -0
- package/types/helpers/createEmptyAnimationDriver.d.ts.map +1 -0
- package/types/helpers/defaultAnimationDriver.d.ts +3 -0
- package/types/helpers/defaultAnimationDriver.d.ts.map +1 -0
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/propMapper.d.ts.map +1 -1
- package/types/helpers/wrapStyleTags.d.ts.map +1 -1
- package/types/hooks/useComponentState.d.ts.map +1 -1
- package/types/types.d.ts +7 -0
- package/types/types.d.ts.map +1 -1
- package/dist/cjs/hooks/useConfiguration.js +0 -30
- package/dist/cjs/hooks/useConfiguration.js.map +0 -6
- package/dist/cjs/hooks/useConfiguration.native.js +0 -32
- package/dist/cjs/hooks/useConfiguration.native.js.map +0 -6
- package/dist/cjs/interfaces/KeyTypes.js +0 -14
- package/dist/cjs/interfaces/KeyTypes.js.map +0 -6
- package/dist/cjs/interfaces/KeyTypes.native.js +0 -15
- package/dist/cjs/interfaces/KeyTypes.native.js.map +0 -6
- package/dist/cjs/interfaces/Role.js +0 -14
- package/dist/cjs/interfaces/Role.js.map +0 -6
- package/dist/cjs/interfaces/Role.native.js +0 -15
- package/dist/cjs/interfaces/Role.native.js.map +0 -6
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.cjs +0 -16
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.js +0 -14
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.js.map +0 -6
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.js +0 -19
- package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.js.map +0 -1
- package/dist/cjs/interfaces/TamaguiComponentState.js +0 -14
- package/dist/cjs/interfaces/TamaguiComponentState.js.map +0 -6
- package/dist/cjs/interfaces/TamaguiComponentState.native.js +0 -15
- package/dist/cjs/interfaces/TamaguiComponentState.native.js.map +0 -6
- package/dist/cjs/interfaces/WebOnlyPressEvents.js +0 -14
- package/dist/cjs/interfaces/WebOnlyPressEvents.js.map +0 -6
- package/dist/cjs/interfaces/WebOnlyPressEvents.native.js +0 -15
- package/dist/cjs/interfaces/WebOnlyPressEvents.native.js.map +0 -6
- package/dist/cjs/views/FontLanguage.types.js +0 -14
- package/dist/cjs/views/FontLanguage.types.js.map +0 -6
- package/dist/cjs/views/FontLanguage.types.native.js +0 -15
- package/dist/cjs/views/FontLanguage.types.native.js.map +0 -6
- package/dist/esm/hooks/useConfiguration.js +0 -7
- package/dist/esm/hooks/useConfiguration.js.map +0 -6
- package/dist/esm/hooks/useConfiguration.native.js +0 -9
- package/dist/esm/hooks/useConfiguration.native.js.map +0 -6
- package/dist/esm/interfaces/KeyTypes.js +0 -1
- package/dist/esm/interfaces/KeyTypes.js.map +0 -6
- package/dist/esm/interfaces/KeyTypes.native.js +0 -1
- package/dist/esm/interfaces/KeyTypes.native.js.map +0 -6
- package/dist/esm/interfaces/Role.js +0 -1
- package/dist/esm/interfaces/Role.js.map +0 -6
- package/dist/esm/interfaces/Role.native.js +0 -1
- package/dist/esm/interfaces/Role.native.js.map +0 -6
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.js +0 -1
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.js.map +0 -6
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.mjs +0 -2
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.mjs.map +0 -1
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.js +0 -2
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.js.map +0 -1
- package/dist/esm/interfaces/TamaguiComponentState.js +0 -1
- package/dist/esm/interfaces/TamaguiComponentState.js.map +0 -6
- package/dist/esm/interfaces/TamaguiComponentState.native.js +0 -1
- package/dist/esm/interfaces/TamaguiComponentState.native.js.map +0 -6
- package/dist/esm/interfaces/WebOnlyPressEvents.js +0 -1
- package/dist/esm/interfaces/WebOnlyPressEvents.js.map +0 -6
- package/dist/esm/interfaces/WebOnlyPressEvents.native.js +0 -1
- package/dist/esm/interfaces/WebOnlyPressEvents.native.js.map +0 -6
- package/dist/esm/views/FontLanguage.types.js +0 -1
- package/dist/esm/views/FontLanguage.types.js.map +0 -6
- package/dist/esm/views/FontLanguage.types.native.js +0 -1
- package/dist/esm/views/FontLanguage.types.native.js.map +0 -6
- package/types/hooks/useConfiguration.d.ts.map +0 -1
- package/types/interfaces/KeyTypes.d.ts.map +0 -1
- package/types/interfaces/Role.d.ts.map +0 -1
- package/types/interfaces/TamaguiComponentPropsBaseBase.d.ts.map +0 -1
- package/types/interfaces/TamaguiComponentState.d.ts.map +0 -1
- package/types/interfaces/WebOnlyPressEvents.d.ts.map +0 -1
- package/types/views/FontLanguage.types.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isServer","isWeb","useCreateShallowSetState","useDidFinishSSR","useIsClientOnly","useRef","useState","defaultComponentState","defaultComponentStateMounted","defaultComponentStateShouldEnter","isObj","log","_type_of","obj","Symbol","constructor","useComponentState","props","animationDriver","staticConfig","config","_animationDriver_usePresence","isHydrated","needsHydration","
|
|
1
|
+
{"version":3,"names":["isServer","isWeb","useCreateShallowSetState","useDidFinishSSR","useIsClientOnly","useRef","useState","defaultComponentState","defaultComponentStateMounted","defaultComponentStateShouldEnter","isObj","log","_type_of","obj","Symbol","constructor","useComponentState","props","animationDriver","staticConfig","config","_animationDriver_usePresence","isHydrated","needsHydration","useAnimations","isStub","isHOC","stateRef","current","startedUnhydrated","hasAnimationProp","style","hasAnimatedStyleValue","supportsCSS","curStateRef","hasAnimated","willBeAnimatedClient","next","willBeAnimated","disableClassName","presence","animatePresence","usePresence","call","presenceState","isExiting","isPresent","isEntering","initial","hasEnterStyle","enterStyle","hasAnimationThatNeedsHydrate","isReactNative","canImmediatelyEnter","shouldEnter","initialState","disabled","isDisabled","states","state","forceStyle","setState","isAnimated","willHydrate","Object","assign","_","groupName","group","setStateShallow","debug","variants","process","env","NODE_ENV","console","warn","JSON","stringify","enterVariant","exitVariant","enterExitVariant","custom","exv","unmounted","noClass","isAnimatedAndHydrated","isClassNameDisabled","acceptsClassName","disableSSR","isDisabledManually","classNameAnimation"],"sources":["../../../src/hooks/useComponentState.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,QAAA,EAAUC,KAAA,QAAa;AAChC,SAASC,wBAAA,QAAgC;AACzC,SAASC,eAAA,EAAiBC,eAAA,QAAuB;AACjD,SAASC,MAAA,EAAQC,QAAA,QAAgB;AACjC,SAAAC,qBAAA,EAAAC,4BAAA,EAAAC,gC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qB,UAAA;IACL,IAAAgE,qBAAmB,GAAAxB,UAAY,IAAAxC,UAAA;MAAAiE,mBAAA,IAAApE,YAAA,CAAAqE,gBAAA,KAAApE,MAAA,CAAAqE,UAAA,KAAA9B,KAAA,CAAAyB,SAAA;MAAAM,kBAAA,GAAAnD,gBAAA,KAAAoB,KAAA,CAAAyB,SAAA;IAC/B;IACA,CAAAE,qBAAA,KAAApE,eAAA,EAAAyE,kBAAA,IAAAD,kBAAA,IAAAH,mBAAA,MAAAF,OAAA,OAAAb,OAAA,CAAAC,GAAA,CAAAC,QAAA,sBAAAzD,KAAA,CAAAqD,KAAA,kBAAA3D,GAAA;MACA2E,qBAAA;MACAI,kBAAA;MACAH;IACA;EAAA;EACA,OACA;IACA1D,iBAAA,EAAAK,WAAA,CAAAL,iBAAA;IACAK,WAAA;IACAsB,QAAA;IACAW,SAAA;IACArC,gBAAA;IACAmB,aAAA;IACAa,UAAA;IACAjB,SAAA;IACAvB,UAAA;IACAkB,QAAA;IACFI,aAAA;IACFiB,QAAA;IAEAQ,eAAS;IACPgB,OAAO;IACL1B,KAAA;IACAhC,QAAO;IACRM,WAAA;IACHK,cAAA;IAEAF","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/web",
|
|
3
|
-
"version": "1.138.
|
|
3
|
+
"version": "1.138.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
"reset.css"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@tamagui/compose-refs": "1.138.
|
|
32
|
-
"@tamagui/constants": "1.138.
|
|
33
|
-
"@tamagui/helpers": "1.138.
|
|
34
|
-
"@tamagui/is-equal-shallow": "1.138.
|
|
35
|
-
"@tamagui/normalize-css-color": "1.138.
|
|
36
|
-
"@tamagui/timer": "1.138.
|
|
37
|
-
"@tamagui/types": "1.138.
|
|
38
|
-
"@tamagui/use-did-finish-ssr": "1.138.
|
|
39
|
-
"@tamagui/use-event": "1.138.
|
|
40
|
-
"@tamagui/use-force-update": "1.138.
|
|
31
|
+
"@tamagui/compose-refs": "1.138.3",
|
|
32
|
+
"@tamagui/constants": "1.138.3",
|
|
33
|
+
"@tamagui/helpers": "1.138.3",
|
|
34
|
+
"@tamagui/is-equal-shallow": "1.138.3",
|
|
35
|
+
"@tamagui/normalize-css-color": "1.138.3",
|
|
36
|
+
"@tamagui/timer": "1.138.3",
|
|
37
|
+
"@tamagui/types": "1.138.3",
|
|
38
|
+
"@tamagui/use-did-finish-ssr": "1.138.3",
|
|
39
|
+
"@tamagui/use-event": "1.138.3",
|
|
40
|
+
"@tamagui/use-force-update": "1.138.3"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": "*",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"react-native": "*"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@tamagui/build": "1.138.
|
|
48
|
+
"@tamagui/build": "1.138.3",
|
|
49
49
|
"@testing-library/react": "^16.1.0",
|
|
50
50
|
"csstype": "^3.0.10",
|
|
51
51
|
"react": "*",
|
package/src/createComponent.tsx
CHANGED
|
@@ -379,7 +379,7 @@ export function createComponent<
|
|
|
379
379
|
|
|
380
380
|
const componentState = useComponentState(
|
|
381
381
|
props,
|
|
382
|
-
animationDriver,
|
|
382
|
+
animationDriver?.isStub ? null : animationDriver,
|
|
383
383
|
staticConfig,
|
|
384
384
|
config!
|
|
385
385
|
)
|
|
@@ -639,6 +639,26 @@ export function createComponent<
|
|
|
639
639
|
|
|
640
640
|
// splitStyles === null === passThrough
|
|
641
641
|
|
|
642
|
+
// Merge variant-resolved context values (issue #3669)
|
|
643
|
+
// When a variant maps to another variant that's also a context key,
|
|
644
|
+
// we need to add it to overriddenContextProps so it propagates to children
|
|
645
|
+
// Use either the component's own context or its parent's context (for styled() inheritance)
|
|
646
|
+
let contextForOverride = staticConfig.context
|
|
647
|
+
if (splitStyles?.resolvedContextVariants) {
|
|
648
|
+
const contextForVariants =
|
|
649
|
+
staticConfig.context || staticConfig.parentStaticConfig?.context
|
|
650
|
+
if (contextForVariants) {
|
|
651
|
+
for (const key in splitStyles.resolvedContextVariants) {
|
|
652
|
+
overriddenContextProps ||= {}
|
|
653
|
+
overriddenContextProps[key] = splitStyles.resolvedContextVariants[key]
|
|
654
|
+
}
|
|
655
|
+
// Use parent's context if this component doesn't have its own
|
|
656
|
+
if (!staticConfig.context) {
|
|
657
|
+
contextForOverride = contextForVariants
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
|
|
642
662
|
const groupContext = groupName ? allGroupContexts?.[groupName] || null : null
|
|
643
663
|
|
|
644
664
|
// one tiny mutation 🙏 get width/height optimistically from raw values if possible
|
|
@@ -1397,19 +1417,8 @@ export function createComponent<
|
|
|
1397
1417
|
}
|
|
1398
1418
|
}
|
|
1399
1419
|
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
// const contextProps = staticConfig.context.props
|
|
1403
|
-
// for (const key in contextProps) {
|
|
1404
|
-
// if ((viewProps.style && key in viewProps.style) || key in viewProps) {
|
|
1405
|
-
// overriddenContextProps ||= {}
|
|
1406
|
-
// overriddenContextProps[key] = viewProps.style?.[key] ?? viewProps[key]
|
|
1407
|
-
// }
|
|
1408
|
-
// }
|
|
1409
|
-
// }
|
|
1410
|
-
|
|
1411
|
-
if (overriddenContextProps) {
|
|
1412
|
-
const Provider = staticConfig.context!.Provider!
|
|
1420
|
+
if (overriddenContextProps && contextForOverride) {
|
|
1421
|
+
const Provider = contextForOverride.Provider!
|
|
1413
1422
|
|
|
1414
1423
|
// make sure we re-order styled context keys based on how we pass them here:
|
|
1415
1424
|
for (const key in styledContextValue) {
|
|
@@ -1431,18 +1440,14 @@ export function createComponent<
|
|
|
1431
1440
|
|
|
1432
1441
|
if (process.env.NODE_ENV === 'development' && time) time`context-override`
|
|
1433
1442
|
|
|
1434
|
-
//
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
const styleTags = useMemo(() => {
|
|
1438
|
-
if (isPassthrough) return
|
|
1439
|
-
return getStyleTags(Object.values(splitStyles.rulesToInsert))
|
|
1440
|
-
}, [])
|
|
1441
|
-
// this is only to appease react hydration really
|
|
1443
|
+
// SSR style support - for non compiled styles we render them inline until client takes over
|
|
1444
|
+
// on client we then switch over to our global sheet insert, because rendering inline is expensive
|
|
1445
|
+
if (process.env.TAMAGUI_TARGET === 'web' && startedUnhydrated && splitStyles) {
|
|
1442
1446
|
content = (
|
|
1443
1447
|
<>
|
|
1444
1448
|
{content}
|
|
1445
|
-
{
|
|
1449
|
+
{/* we surpress hydration warnings */}
|
|
1450
|
+
{!isHydrated ? getStyleTags(Object.values(splitStyles.rulesToInsert)) : null}
|
|
1446
1451
|
</>
|
|
1447
1452
|
)
|
|
1448
1453
|
}
|
package/src/createTamagui.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { isWeb } from '@tamagui/constants'
|
|
|
2
2
|
import { configListeners, setConfig, setTokens } from './config'
|
|
3
3
|
import type { DeepVariableObject } from './createVariables'
|
|
4
4
|
import { createVariables } from './createVariables'
|
|
5
|
+
import { defaultAnimationDriver } from './helpers/defaultAnimationDriver'
|
|
5
6
|
import { getThemeCSSRules } from './helpers/getThemeCSSRules'
|
|
6
7
|
import { getAllRules, scanAllSheets } from './helpers/insertStyleRule'
|
|
7
8
|
import { proxyThemesToParents } from './helpers/proxyThemeToParents'
|
|
@@ -272,7 +273,7 @@ export function createTamagui<Conf extends CreateTamaguiProps>(
|
|
|
272
273
|
fonts: {},
|
|
273
274
|
onlyAllowShorthands: false,
|
|
274
275
|
fontLanguages: [],
|
|
275
|
-
animations:
|
|
276
|
+
animations: defaultAnimationDriver,
|
|
276
277
|
media: {},
|
|
277
278
|
...configIn,
|
|
278
279
|
unset,
|
|
@@ -368,12 +369,8 @@ function getThemesDeduped(
|
|
|
368
369
|
|
|
369
370
|
// ensure each theme object unique for dedupe
|
|
370
371
|
// is ThemeParsed because we call ensureThemeVariable
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
// automatically merge color tokens into themes
|
|
374
|
-
if (colorTokens) {
|
|
375
|
-
Object.assign(theme, colorTokens)
|
|
376
|
-
}
|
|
372
|
+
// color tokens are spread first as fallbacks, theme values take precedence
|
|
373
|
+
const theme = { ...colorTokens, ...rawTheme } as any as ThemeParsed
|
|
377
374
|
|
|
378
375
|
// parse into variables
|
|
379
376
|
for (const key in theme) {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AnimationDriver } from '../types'
|
|
2
|
+
|
|
3
|
+
const noAnimationDriver = (method: string): any => {
|
|
4
|
+
console.warn(
|
|
5
|
+
`No animation driver configured. To use ${method}, you must pass \`animations\` to createTamagui. See: https://tamagui.dev/docs/core/animations`
|
|
6
|
+
)
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const createEmptyAnimationDriver = (): AnimationDriver => ({
|
|
10
|
+
isReactNative: false,
|
|
11
|
+
supportsCSS: true,
|
|
12
|
+
classNameAnimation: true,
|
|
13
|
+
isStub: true,
|
|
14
|
+
animations: {},
|
|
15
|
+
useAnimations: () => noAnimationDriver('animations'),
|
|
16
|
+
usePresence: () => noAnimationDriver('usePresence'),
|
|
17
|
+
ResetPresence: () => noAnimationDriver('ResetPresence'),
|
|
18
|
+
useAnimatedNumber: () => noAnimationDriver('useAnimatedNumber'),
|
|
19
|
+
useAnimatedNumberStyle: () => noAnimationDriver('useAnimatedNumberStyle'),
|
|
20
|
+
useAnimatedNumberReaction: () => noAnimationDriver('useAnimatedNumberReaction'),
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
export const defaultAnimationDriver = createEmptyAnimationDriver()
|
|
@@ -96,6 +96,27 @@ type StyleSplitter = (
|
|
|
96
96
|
|
|
97
97
|
export const PROP_SPLIT = '-'
|
|
98
98
|
|
|
99
|
+
// Normalize group keys like $group-press to $group-true-press when the group name
|
|
100
|
+
// doesn't exist in context (defaults to the unnamed 'true' group)
|
|
101
|
+
function normalizeGroupKey(
|
|
102
|
+
key: string,
|
|
103
|
+
groupContext: AllGroupContexts | null | undefined
|
|
104
|
+
): string {
|
|
105
|
+
const parts = key.split('-')
|
|
106
|
+
const plen = parts.length
|
|
107
|
+
if (
|
|
108
|
+
// check if its actually a simple group selector to avoid breaking selectors
|
|
109
|
+
plen === 2 ||
|
|
110
|
+
(plen === 3 && pseudoPriorities[parts[parts.length - 1]])
|
|
111
|
+
) {
|
|
112
|
+
const name = parts[1]
|
|
113
|
+
if (groupContext && !groupContext[name]) {
|
|
114
|
+
return key.replace('$group-', '$group-true-')
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return key
|
|
118
|
+
}
|
|
119
|
+
|
|
99
120
|
// if you need and easier way to test performance, you can do something like this
|
|
100
121
|
// add this early return somewhere in this file and you can see roughly where it slows down:
|
|
101
122
|
|
|
@@ -498,18 +519,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
498
519
|
let isMediaOrPseudo = Boolean(isMedia || isPseudo)
|
|
499
520
|
|
|
500
521
|
if (isMediaOrPseudo && isMedia === 'group') {
|
|
501
|
-
|
|
502
|
-
const plen = parts.length
|
|
503
|
-
if (
|
|
504
|
-
// check if its actually a simple group selector to avoid breaking selectors
|
|
505
|
-
plen === 2 ||
|
|
506
|
-
(plen === 3 && pseudoPriorities[parts[parts.length - 1]])
|
|
507
|
-
) {
|
|
508
|
-
const name = parts[1]
|
|
509
|
-
if (groupContext && !groupContext?.[name]) {
|
|
510
|
-
keyInit = keyInit.replace('$group-', `$group-true-`)
|
|
511
|
-
}
|
|
512
|
-
}
|
|
522
|
+
keyInit = normalizeGroupKey(keyInit, groupContext)
|
|
513
523
|
}
|
|
514
524
|
|
|
515
525
|
const isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || (isVariant && !noExpand)
|
|
@@ -646,6 +656,11 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
646
656
|
isMediaOrPseudo = Boolean(isMedia || isPseudo)
|
|
647
657
|
isVariant = variants && key in variants
|
|
648
658
|
|
|
659
|
+
// handle group key transformation for variant-expanded keys (issue #3613)
|
|
660
|
+
if (isMedia === 'group') {
|
|
661
|
+
key = normalizeGroupKey(key, groupContext)
|
|
662
|
+
}
|
|
663
|
+
|
|
649
664
|
if (
|
|
650
665
|
inlineProps?.has(key) ||
|
|
651
666
|
(process.env.IS_STATIC === 'is_static' && inlineWhenUnflattened?.has(key))
|
|
@@ -1314,6 +1329,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
1314
1329
|
dynamicThemeAccess,
|
|
1315
1330
|
pseudoGroups,
|
|
1316
1331
|
mediaGroups,
|
|
1332
|
+
resolvedContextVariants: styleState.resolvedContextVariants,
|
|
1317
1333
|
}
|
|
1318
1334
|
|
|
1319
1335
|
const asChildExceptStyleLike =
|
|
@@ -236,6 +236,21 @@ const resolveTokensAndVariants: StyleResolver<Object> = (
|
|
|
236
236
|
res[subKey] = val
|
|
237
237
|
} else {
|
|
238
238
|
if (variants && subKey in variants) {
|
|
239
|
+
// Track context variant resolutions (issue #3669)
|
|
240
|
+
// When a variant maps to another variant that's also a context key,
|
|
241
|
+
// we need to track it so it can be propagated via context to children
|
|
242
|
+
// Check both current context and parent's context (in case child doesn't explicitly set context)
|
|
243
|
+
if (staticConfig) {
|
|
244
|
+
const contextProps =
|
|
245
|
+
staticConfig.context?.props || staticConfig.parentStaticConfig?.context?.props
|
|
246
|
+
if (contextProps && subKey in contextProps) {
|
|
247
|
+
if (!styleState.resolvedContextVariants) {
|
|
248
|
+
styleState.resolvedContextVariants = {}
|
|
249
|
+
}
|
|
250
|
+
styleState.resolvedContextVariants[subKey] = val
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
239
254
|
// avoids infinite loop if variant is matching a style prop
|
|
240
255
|
// eg: { variants: { flex: { true: { flex: 2 } } } }
|
|
241
256
|
if (parentVariantKey && parentVariantKey === key) {
|
|
@@ -18,6 +18,8 @@ export function getStyleTags(styles: StyleObject[]) {
|
|
|
18
18
|
href={`t_${identifier}`}
|
|
19
19
|
// @ts-ignore
|
|
20
20
|
precedence="default"
|
|
21
|
+
// we remove after first render in favor of inserting to a global stylesheet (faster)
|
|
22
|
+
suppressHydrationWarning
|
|
21
23
|
>
|
|
22
24
|
{styleObject[StyleObjectRules].join('\n')}
|
|
23
25
|
</style>
|
|
@@ -29,11 +29,22 @@ export const useComponentState = (
|
|
|
29
29
|
const isHydrated = useDidFinishSSR()
|
|
30
30
|
const needsHydration = !useIsClientOnly()
|
|
31
31
|
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const useAnimations = animationDriver?.isStub
|
|
33
|
+
? undefined
|
|
34
|
+
: (animationDriver?.useAnimations as UseAnimationHook | undefined)
|
|
35
|
+
|
|
34
36
|
const { isHOC } = staticConfig
|
|
35
37
|
|
|
36
|
-
const stateRef = useRef<TamaguiComponentStateRef>(
|
|
38
|
+
const stateRef = useRef<TamaguiComponentStateRef>(
|
|
39
|
+
// performance: avoid creating object every render
|
|
40
|
+
undefined as unknown as TamaguiComponentStateRef
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
if (!stateRef.current) {
|
|
44
|
+
stateRef.current = {
|
|
45
|
+
startedUnhydrated: needsHydration && !isHydrated,
|
|
46
|
+
}
|
|
47
|
+
}
|
|
37
48
|
|
|
38
49
|
// after we get states mount we need to turn off isAnimated for server side
|
|
39
50
|
const hasAnimationProp = Boolean(
|
|
@@ -183,8 +194,6 @@ export const useComponentState = (
|
|
|
183
194
|
// no matter what if fully unmounted or on the server we use className
|
|
184
195
|
// only once we hydrate do we switch to spring animation drivers or disableClassName etc
|
|
185
196
|
if (isWeb && isHydrated) {
|
|
186
|
-
// the reason we disable class even for css animation driver is i guess due to the logic around looking at transform
|
|
187
|
-
// in the driver to determine the transition - but that could be improved to not need it and just use classnames
|
|
188
197
|
const isAnimatedAndHydrated = isAnimated && isHydrated
|
|
189
198
|
|
|
190
199
|
const isClassNameDisabled =
|
|
@@ -192,7 +201,12 @@ export const useComponentState = (
|
|
|
192
201
|
|
|
193
202
|
const isDisabledManually = disableClassName && !state.unmounted
|
|
194
203
|
|
|
195
|
-
if (
|
|
204
|
+
if (
|
|
205
|
+
// Only disable className for animation drivers that need inline styles
|
|
206
|
+
(isAnimatedAndHydrated && !animationDriver?.classNameAnimation) ||
|
|
207
|
+
isDisabledManually ||
|
|
208
|
+
isClassNameDisabled
|
|
209
|
+
) {
|
|
196
210
|
noClass = true
|
|
197
211
|
|
|
198
212
|
if (process.env.NODE_ENV === 'development' && props.debug === 'verbose') {
|
|
@@ -207,7 +221,7 @@ export const useComponentState = (
|
|
|
207
221
|
}
|
|
208
222
|
|
|
209
223
|
return {
|
|
210
|
-
startedUnhydrated,
|
|
224
|
+
startedUnhydrated: curStateRef.startedUnhydrated,
|
|
211
225
|
curStateRef,
|
|
212
226
|
disabled,
|
|
213
227
|
groupName,
|
package/src/types.tsx
CHANGED
|
@@ -471,6 +471,8 @@ export type ComponentContextI = {
|
|
|
471
471
|
}
|
|
472
472
|
|
|
473
473
|
export type TamaguiComponentStateRef = {
|
|
474
|
+
startedUnhydrated: boolean
|
|
475
|
+
|
|
474
476
|
host?: TamaguiElement
|
|
475
477
|
composedRef?: (x: TamaguiElement) => void
|
|
476
478
|
willHydrate?: boolean
|
|
@@ -2500,6 +2502,8 @@ export type GetStyleState = {
|
|
|
2500
2502
|
fontFamily?: string
|
|
2501
2503
|
debug?: DebugProp
|
|
2502
2504
|
flatTransforms?: Record<string, any>
|
|
2505
|
+
// Track variant resolutions that map to context keys (for issue #3669)
|
|
2506
|
+
resolvedContextVariants?: Record<string, any>
|
|
2503
2507
|
}
|
|
2504
2508
|
|
|
2505
2509
|
export type StyleResolver<Response = PropMappedValue> = (
|
|
@@ -2940,6 +2944,10 @@ export type AnimationDriver<A extends AnimationConfig = AnimationConfig> = {
|
|
|
2940
2944
|
supportsCSS?: boolean
|
|
2941
2945
|
needsWebStyles?: boolean
|
|
2942
2946
|
avoidReRenders?: boolean
|
|
2947
|
+
/** When true, this is a stub driver with no real animation support */
|
|
2948
|
+
isStub?: boolean
|
|
2949
|
+
/** When true, the driver uses CSS classes for animations (doesn't need inline styles) */
|
|
2950
|
+
classNameAnimation?: boolean
|
|
2943
2951
|
useAnimations: UseAnimationHook
|
|
2944
2952
|
usePresence: () => UsePresenceResult
|
|
2945
2953
|
ResetPresence: (props: {
|
|
@@ -2999,6 +3007,8 @@ export type GetStyleResult = {
|
|
|
2999
3007
|
dynamicThemeAccess?: boolean
|
|
3000
3008
|
pseudoGroups?: Set<string>
|
|
3001
3009
|
mediaGroups?: Set<string>
|
|
3010
|
+
// Variant resolutions that map to context keys (for issue #3669)
|
|
3011
|
+
resolvedContextVariants?: Record<string, any>
|
|
3002
3012
|
}
|
|
3003
3013
|
|
|
3004
3014
|
export type ClassNamesObject = Record<string, string>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAqBtC,OAAO,KAAK,EAGV,SAAS,EAMT,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAElB,YAAY,EAEZ,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EAQf,MAAM,SAAS,CAAA;AAYhB,KAAK,iBAAiB,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC,CAAA;AAEpF,eAAO,MAAM,kBAAkB,wBAA+B,CAAA;AAmI9D,wBAAgB,eAAe,CAC7B,kBAAkB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,EACnD,GAAG,SAAS,cAAc,GAAG,cAAc,EAC3C,SAAS,GAAG,K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C,EAAE,SAAS,CAAA;CAClB,CAAA;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,mBAgGxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTamagui.d.ts","sourceRoot":"","sources":["../src/createTamagui.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createTamagui.d.ts","sourceRoot":"","sources":["../src/createTamagui.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,kBAAkB,EAKlB,kBAAkB,EAOnB,MAAM,SAAS,CAAA;AAiBhB,wBAAgB,aAAa,CAAC,IAAI,SAAS,kBAAkB,EAC3D,QAAQ,EAAE,IAAI,GACb,kBAAkB,CAAC,IAAI,CAAC,CAmS1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createEmptyAnimationDriver.d.ts","sourceRoot":"","sources":["../../src/helpers/createEmptyAnimationDriver.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAQ/C,eAAO,MAAM,0BAA0B,QAAO,eAS5C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultAnimationDriver.d.ts","sourceRoot":"","sources":["../../src/helpers/defaultAnimationDriver.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAsB/C,eAAO,MAAM,sBAAsB,iBAA+B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EACV,gBAAgB,EAEhB,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,aAAa,EAIb,eAAe,EACf,YAAY,EAEZ,qBAAqB,EAErB,SAAS,EACT,WAAW,EAEZ,MAAM,UAAU,CAAA;AAoBjB,MAAM,MAAM,W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AAU,EAAE,eAAe,EAC3B,iBAAiB,CAAC,EAAE,cAAc,GAAG,IAAI,EACzC,OAAO,CAAC,EAAE,iBAAiB,EAC3B,YAAY,CAAC,EAAE,gBAAgB,GAAG,IAAI,EAEtC,WAAW,CAAC,EAAE,MAAM,EACpB,iBAAiB,CAAC,EAAE,OAAO,EAC3B,KAAK,CAAC,EAAE,SAAS,KACd,IAAI,GAAG,cAAc,CAAA;AAE1B,eAAO,MAAM,UAAU,MAAM,CAAA;AAoD7B,eAAO,MAAM,cAAc,EAAE,aAiwC5B,CAAA;AAgDD,eAAO,MAAM,WAAW,GACtB,YAAY,aAAa,EACzB,QAAQ,MAAM,EACd,SAAS,MAAM,EACf,sBAAsB,OAAO,KAC5B,SA6CF,CAAA;AAQD,eAAO,MAAM,cAAc,EAAE,aAY5B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propMapper.d.ts","sourceRoot":"","sources":["../../src/helpers/propMapper.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EAEV,eAAe,EAEf,qBAAqB,EAGtB,MAAM,UAAU,CAAA;AAQjB,eAAO,MAAM,UAAU,EAAE,UAoExB,CAAA;AAoGD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,qBAAqB,sBAkBtF;
|
|
1
|
+
{"version":3,"file":"propMapper.d.ts","sourceRoot":"","sources":["../../src/helpers/propMapper.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EAEV,eAAe,EAEf,qBAAqB,EAGtB,MAAM,UAAU,CAAA;AAQjB,eAAO,MAAM,UAAU,EAAE,UAoExB,CAAA;AAoGD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,qBAAqB,sBAkBtF;AAiKD,eAAO,MAAM,cAAc,GACzB,KAAK,MAAM,EACX,OAAO,MAAM,EACb,YAAY,eAAe,EAC3B,YAAY,OAAO,CAAC,aAAa,CAAC,QAsInC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapStyleTags.d.ts","sourceRoot":"","sources":["../../src/helpers/wrapStyleTags.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAI3C,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"wrapStyleTags.d.ts","sourceRoot":"","sources":["../../src/helpers/wrapStyleTags.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAI3C,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,uDAyBjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useComponentState.d.ts","sourceRoot":"","sources":["../../src/hooks/useComponentState.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,SAAS,EAEV,MAAM,UAAU,CAAA;AAEjB,eAAO,MAAM,iBAAiB,GAC5B,OAAO,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnD,iBAAiB,iBAAiB,CAAC,iBAAiB,CAAC,EACrD,cAAc,YAAY,EAC1B,QAAQ,qBAAqB;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useComponentState.d.ts","sourceRoot":"","sources":["../../src/hooks/useComponentState.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,SAAS,EAEV,MAAM,UAAU,CAAA;AAEjB,eAAO,MAAM,iBAAiB,GAC5B,OAAO,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnD,iBAAiB,iBAAiB,CAAC,iBAAiB,CAAC,EACrD,cAAc,YAAY,EAC1B,QAAQ,qBAAqB;;;;;;;;;;;;;;;;;;;;CAyN9B,CAAA"}
|
package/types/types.d.ts
CHANGED
|
@@ -220,6 +220,7 @@ export type ComponentContextI = {
|
|
|
220
220
|
mediaEmit?: (state: UseMediaState) => void;
|
|
221
221
|
};
|
|
222
222
|
export type TamaguiComponentStateRef = {
|
|
223
|
+
startedUnhydrated: boolean;
|
|
223
224
|
host?: TamaguiElement;
|
|
224
225
|
composedRef?: (x: TamaguiElement) => void;
|
|
225
226
|
willHydrate?: boolean;
|
|
@@ -1496,6 +1497,7 @@ export type GetStyleState = {
|
|
|
1496
1497
|
fontFamily?: string;
|
|
1497
1498
|
debug?: DebugProp;
|
|
1498
1499
|
flatTransforms?: Record<string, any>;
|
|
1500
|
+
resolvedContextVariants?: Record<string, any>;
|
|
1499
1501
|
};
|
|
1500
1502
|
export type StyleResolver<Response = PropMappedValue> = (key: string, value: any, props: SplitStyleProps, state: GetStyleState, parentVariantKey: string) => Response;
|
|
1501
1503
|
export type PropMapper = (key: string, value: any, state: GetStyleState, disabled: boolean, map: (key: string, val: any) => void) => void;
|
|
@@ -1733,6 +1735,10 @@ export type AnimationDriver<A extends AnimationConfig = AnimationConfig> = {
|
|
|
1733
1735
|
supportsCSS?: boolean;
|
|
1734
1736
|
needsWebStyles?: boolean;
|
|
1735
1737
|
avoidReRenders?: boolean;
|
|
1738
|
+
/** When true, this is a stub driver with no real animation support */
|
|
1739
|
+
isStub?: boolean;
|
|
1740
|
+
/** When true, the driver uses CSS classes for animations (doesn't need inline styles) */
|
|
1741
|
+
classNameAnimation?: boolean;
|
|
1736
1742
|
useAnimations: UseAnimationHook;
|
|
1737
1743
|
usePresence: () => UsePresenceResult;
|
|
1738
1744
|
ResetPresence: (props: {
|
|
@@ -1783,6 +1789,7 @@ export type GetStyleResult = {
|
|
|
1783
1789
|
dynamicThemeAccess?: boolean;
|
|
1784
1790
|
pseudoGroups?: Set<string>;
|
|
1785
1791
|
mediaGroups?: Set<string>;
|
|
1792
|
+
resolvedContextVariants?: Record<string, any>;
|
|
1786
1793
|
};
|
|
1787
1794
|
export type ClassNamesObject = Record<string, string>;
|
|
1788
1795
|
export type ModifyTamaguiComponentStyleProps<Comp extends TamaguiComponent, ChangedProps extends Object> = Comp extends TamaguiComponent<infer A, infer B, infer C, infer D, infer E> ? A extends Object ? TamaguiComponent<Omit<A, keyof ChangedProps> & ChangedProps, B, C, D, E> : never : never;
|