@tamagui/web 1.129.12 → 1.129.13
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/contexts/ComponentContext.cjs +1 -6
- package/dist/cjs/contexts/ComponentContext.js +1 -6
- package/dist/cjs/contexts/ComponentContext.js.map +1 -1
- package/dist/cjs/contexts/ComponentContext.native.js +1 -6
- package/dist/cjs/contexts/ComponentContext.native.js.map +2 -2
- package/dist/cjs/contexts/GroupContext.cjs +27 -0
- package/dist/cjs/contexts/GroupContext.js +22 -0
- package/dist/cjs/contexts/GroupContext.js.map +6 -0
- package/dist/cjs/contexts/GroupContext.native.js +26 -0
- package/dist/cjs/contexts/GroupContext.native.js.map +6 -0
- package/dist/cjs/createComponent.cjs +131 -90
- package/dist/cjs/createComponent.js +139 -94
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createComponent.native.js +156 -106
- package/dist/cjs/createComponent.native.js.map +2 -2
- package/dist/cjs/helpers/createStyledContext.js.map +1 -1
- package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +68 -49
- package/dist/cjs/helpers/getSplitStyles.js +64 -55
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.native.js +82 -63
- package/dist/cjs/helpers/getSplitStyles.native.js.map +2 -2
- package/dist/cjs/helpers/pseudoDescriptors.cjs +12 -12
- package/dist/cjs/helpers/pseudoDescriptors.js +12 -12
- package/dist/cjs/helpers/pseudoDescriptors.js.map +1 -1
- package/dist/cjs/helpers/pseudoDescriptors.native.js +12 -12
- package/dist/cjs/helpers/pseudoDescriptors.native.js.map +1 -1
- package/dist/cjs/helpers/subscribeToContextGroup.cjs +48 -31
- package/dist/cjs/helpers/subscribeToContextGroup.js +36 -20
- package/dist/cjs/helpers/subscribeToContextGroup.js.map +1 -1
- package/dist/cjs/helpers/subscribeToContextGroup.native.js +48 -20
- package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +2 -2
- package/dist/cjs/hooks/useComponentState.cjs +2 -40
- package/dist/cjs/hooks/useComponentState.js +2 -30
- package/dist/cjs/hooks/useComponentState.js.map +2 -2
- package/dist/cjs/hooks/useComponentState.native.js +3 -43
- package/dist/cjs/hooks/useComponentState.native.js.map +2 -2
- package/dist/cjs/hooks/useConfiguration.cjs +1 -17
- package/dist/cjs/hooks/useConfiguration.js +2 -9
- package/dist/cjs/hooks/useConfiguration.js.map +1 -1
- package/dist/cjs/hooks/useConfiguration.native.js +2 -7
- package/dist/cjs/hooks/useConfiguration.native.js.map +2 -2
- package/dist/cjs/hooks/useMedia.cjs +4 -3
- package/dist/cjs/hooks/useMedia.js +3 -3
- package/dist/cjs/hooks/useMedia.js.map +1 -1
- package/dist/cjs/hooks/useMedia.native.js +3 -3
- package/dist/cjs/hooks/useMedia.native.js.map +2 -2
- package/dist/cjs/hooks/useProps.cjs +7 -6
- package/dist/cjs/hooks/useProps.js +13 -11
- package/dist/cjs/hooks/useProps.js.map +1 -1
- package/dist/cjs/hooks/useProps.native.js +11 -10
- package/dist/cjs/hooks/useProps.native.js.map +2 -2
- package/dist/cjs/hooks/useThemeState.cjs +2 -2
- package/dist/cjs/hooks/useThemeState.js +2 -2
- package/dist/cjs/hooks/useThemeState.js.map +1 -1
- package/dist/cjs/hooks/useThemeState.native.js +2 -2
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +2 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
- package/dist/esm/contexts/ComponentContext.js +1 -6
- package/dist/esm/contexts/ComponentContext.js.map +1 -1
- package/dist/esm/contexts/ComponentContext.mjs +1 -6
- package/dist/esm/contexts/ComponentContext.mjs.map +1 -1
- package/dist/esm/contexts/ComponentContext.native.js +1 -6
- package/dist/esm/contexts/ComponentContext.native.js.map +1 -1
- package/dist/esm/contexts/GroupContext.js +6 -0
- package/dist/esm/contexts/GroupContext.js.map +6 -0
- package/dist/esm/contexts/GroupContext.mjs +4 -0
- package/dist/esm/contexts/GroupContext.mjs.map +1 -0
- package/dist/esm/contexts/GroupContext.native.js +4 -0
- package/dist/esm/contexts/GroupContext.native.js.map +1 -0
- package/dist/esm/createComponent.js +141 -94
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createComponent.mjs +132 -91
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +152 -102
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/helpers/createStyledContext.js.map +1 -1
- package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.js +68 -56
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/getSplitStyles.mjs +68 -49
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +72 -53
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/pseudoDescriptors.js +12 -12
- package/dist/esm/helpers/pseudoDescriptors.js.map +1 -1
- package/dist/esm/helpers/pseudoDescriptors.mjs +12 -12
- package/dist/esm/helpers/pseudoDescriptors.mjs.map +1 -1
- package/dist/esm/helpers/pseudoDescriptors.native.js +12 -12
- package/dist/esm/helpers/pseudoDescriptors.native.js.map +1 -1
- package/dist/esm/helpers/subscribeToContextGroup.js +36 -20
- package/dist/esm/helpers/subscribeToContextGroup.js.map +1 -1
- package/dist/esm/helpers/subscribeToContextGroup.mjs +47 -30
- package/dist/esm/helpers/subscribeToContextGroup.mjs.map +1 -1
- package/dist/esm/helpers/subscribeToContextGroup.native.js +64 -36
- package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
- package/dist/esm/hooks/useComponentState.js +2 -30
- package/dist/esm/hooks/useComponentState.js.map +2 -2
- package/dist/esm/hooks/useComponentState.mjs +2 -40
- package/dist/esm/hooks/useComponentState.mjs.map +1 -1
- package/dist/esm/hooks/useComponentState.native.js +3 -46
- package/dist/esm/hooks/useComponentState.native.js.map +1 -1
- package/dist/esm/hooks/useConfiguration.js +1 -9
- package/dist/esm/hooks/useConfiguration.js.map +1 -1
- package/dist/esm/hooks/useConfiguration.mjs +1 -17
- package/dist/esm/hooks/useConfiguration.mjs.map +1 -1
- package/dist/esm/hooks/useConfiguration.native.js +1 -15
- package/dist/esm/hooks/useConfiguration.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.js +3 -3
- package/dist/esm/hooks/useMedia.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs +4 -3
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +4 -3
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/useProps.js +13 -10
- package/dist/esm/hooks/useProps.js.map +1 -1
- package/dist/esm/hooks/useProps.mjs +7 -6
- package/dist/esm/hooks/useProps.mjs.map +1 -1
- package/dist/esm/hooks/useProps.native.js +7 -6
- package/dist/esm/hooks/useProps.native.js.map +1 -1
- package/dist/esm/hooks/useThemeState.js +2 -2
- package/dist/esm/hooks/useThemeState.js.map +1 -1
- package/dist/esm/hooks/useThemeState.mjs +2 -2
- package/dist/esm/hooks/useThemeState.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.native.js +2 -2
- package/dist/esm/hooks/useThemeState.native.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +1 -0
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
- package/package.json +12 -12
- package/src/contexts/ComponentContext.tsx +0 -5
- package/src/contexts/GroupContext.tsx +4 -0
- package/src/createComponent.tsx +251 -107
- package/src/helpers/createStyledContext.tsx +1 -1
- package/src/helpers/getSplitStyles.tsx +77 -56
- package/src/helpers/pseudoDescriptors.ts +15 -19
- package/src/helpers/subscribeToContextGroup.tsx +70 -34
- package/src/hooks/useComponentState.ts +2 -46
- package/src/hooks/useConfiguration.tsx +1 -9
- package/src/hooks/useMedia.tsx +4 -2
- package/src/hooks/useProps.tsx +15 -10
- package/src/hooks/useThemeState.ts +2 -2
- package/src/index.ts +1 -0
- package/src/interfaces/TamaguiComponentState.tsx +4 -3
- package/src/types.tsx +33 -36
- package/src/views/TamaguiProvider.tsx +1 -0
- package/types/contexts/ComponentContext.d.ts.map +1 -1
- package/types/contexts/GroupContext.d.ts +3 -0
- package/types/contexts/GroupContext.d.ts.map +1 -0
- package/types/createComponent.d.ts +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +2 -2
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/pseudoDescriptors.d.ts +14 -13
- package/types/helpers/pseudoDescriptors.d.ts.map +1 -1
- package/types/helpers/subscribeToContextGroup.d.ts +7 -6
- package/types/helpers/subscribeToContextGroup.d.ts.map +1 -1
- package/types/hooks/useComponentState.d.ts +3 -3
- package/types/hooks/useComponentState.d.ts.map +1 -1
- package/types/hooks/useConfiguration.d.ts +1 -121
- package/types/hooks/useConfiguration.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts +2 -2
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useProps.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/interfaces/TamaguiComponentState.d.ts +2 -2
- package/types/interfaces/TamaguiComponentState.d.ts.map +1 -1
- package/types/types.d.ts +22 -33
- package/types/types.d.ts.map +1 -1
- package/types/views/TamaguiProvider.d.ts.map +1 -1
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import { getConfig } from '../config'
|
|
4
3
|
import { ComponentContext } from '../contexts/ComponentContext'
|
|
5
4
|
|
|
6
5
|
export const useConfiguration = () => {
|
|
7
|
-
|
|
8
|
-
React.useContext(ComponentContext)
|
|
9
|
-
const { animations, ...restConfig } = getConfig()
|
|
10
|
-
return {
|
|
11
|
-
...restConfig,
|
|
12
|
-
...restComponentConfig,
|
|
13
|
-
animationDriver: animationDriver ?? getConfig().animations,
|
|
14
|
-
}
|
|
6
|
+
return React.useContext(ComponentContext)
|
|
15
7
|
}
|
package/src/hooks/useMedia.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import { pseudoDescriptors } from '../helpers/pseudoDescriptors'
|
|
|
6
6
|
import type {
|
|
7
7
|
ComponentContextI,
|
|
8
8
|
DebugProp,
|
|
9
|
+
GetStyleState,
|
|
9
10
|
IsMediaType,
|
|
10
11
|
MediaQueries,
|
|
11
12
|
MediaQueryObject,
|
|
@@ -265,14 +266,15 @@ export function getMediaState(mediaGroups: Set<string>, layout: WidthHeight) {
|
|
|
265
266
|
export const getMediaImportanceIfMoreImportant = (
|
|
266
267
|
mediaKey: string,
|
|
267
268
|
key: string,
|
|
268
|
-
|
|
269
|
+
styleState: GetStyleState,
|
|
269
270
|
isSizeMedia: boolean
|
|
270
271
|
) => {
|
|
271
272
|
const importance =
|
|
272
273
|
isSizeMedia && !getSetting('mediaPropOrder')
|
|
273
274
|
? getMediaKeyImportance(mediaKey)
|
|
274
275
|
: defaultMediaImportance
|
|
275
|
-
|
|
276
|
+
const usedKeys = styleState.usedKeys
|
|
277
|
+
return !usedKeys[key] || importance > usedKeys[key] ? importance : null
|
|
276
278
|
}
|
|
277
279
|
|
|
278
280
|
function camelToHyphen(str: string) {
|
package/src/hooks/useProps.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import { useIsomorphicLayoutEffect } from '@tamagui/constants'
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { getConfig } from '../config'
|
|
4
4
|
import { ComponentContext } from '../contexts/ComponentContext'
|
|
5
|
+
import { GroupContext } from '../contexts/GroupContext'
|
|
5
6
|
import { useSplitStyles } from '../helpers/getSplitStyles'
|
|
6
7
|
import { subscribeToContextGroup } from '../helpers/subscribeToContextGroup'
|
|
7
8
|
import type { SplitStyleProps, StaticConfig, ThemeParsed, UseMediaState } from '../types'
|
|
@@ -87,10 +88,11 @@ export function usePropsAndStyle<A extends PropsLikeObject>(
|
|
|
87
88
|
return true
|
|
88
89
|
},
|
|
89
90
|
})
|
|
90
|
-
const componentContext = React.useContext(ComponentContext
|
|
91
|
+
const componentContext = React.useContext(ComponentContext)
|
|
92
|
+
const groupContext = React.useContext(GroupContext)
|
|
91
93
|
const { state, disabled, setStateShallow } = useComponentState(
|
|
92
94
|
props,
|
|
93
|
-
componentContext,
|
|
95
|
+
componentContext.animationDriver,
|
|
94
96
|
staticConfig,
|
|
95
97
|
getConfig()
|
|
96
98
|
)
|
|
@@ -116,7 +118,8 @@ export function usePropsAndStyle<A extends PropsLikeObject>(
|
|
|
116
118
|
...opts,
|
|
117
119
|
},
|
|
118
120
|
null,
|
|
119
|
-
componentContext
|
|
121
|
+
componentContext,
|
|
122
|
+
groupContext
|
|
120
123
|
)
|
|
121
124
|
|
|
122
125
|
const { mediaGroups, pseudoGroups } = splitStyles
|
|
@@ -131,15 +134,17 @@ export function usePropsAndStyle<A extends PropsLikeObject>(
|
|
|
131
134
|
return
|
|
132
135
|
}
|
|
133
136
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
if (groupContext) {
|
|
138
|
+
return subscribeToContextGroup({
|
|
139
|
+
groupContext,
|
|
140
|
+
setStateShallow,
|
|
141
|
+
mediaGroups,
|
|
142
|
+
pseudoGroups,
|
|
143
|
+
})
|
|
144
|
+
}
|
|
141
145
|
}, [
|
|
142
146
|
disabled,
|
|
147
|
+
groupContext,
|
|
143
148
|
pseudoGroups ? Object.keys([...pseudoGroups]).join('') : 0,
|
|
144
149
|
mediaGroups ? Object.keys([...mediaGroups]).join('') : 0,
|
|
145
150
|
])
|
|
@@ -146,7 +146,7 @@ export const useThemeState = (
|
|
|
146
146
|
props.debug &&
|
|
147
147
|
props.debug !== 'profile'
|
|
148
148
|
) {
|
|
149
|
-
console.groupCollapsed(` ${id}
|
|
149
|
+
console.groupCollapsed(` ${id} getSnapshot ${rerender}`, local.name, '>', next.name)
|
|
150
150
|
console.info({ props, propsKey, isRoot, parentId, local, next, needsUpdate })
|
|
151
151
|
console.groupEnd()
|
|
152
152
|
}
|
|
@@ -221,7 +221,7 @@ const getNextState = (
|
|
|
221
221
|
)
|
|
222
222
|
|
|
223
223
|
if (process.env.NODE_ENV === 'development' && debug && debug !== 'profile') {
|
|
224
|
-
const message = ` · useTheme(${id}) => ${name} needsUpdate ${needsUpdate} shouldRerender ${shouldRerender}`
|
|
224
|
+
const message = ` · useTheme(${id}) getNextState => ${name} needsUpdate ${needsUpdate} shouldRerender ${shouldRerender}`
|
|
225
225
|
if (process.env.TAMAGUI_TARGET === 'native') {
|
|
226
226
|
console.info(message)
|
|
227
227
|
} else {
|
package/src/index.ts
CHANGED
|
@@ -37,6 +37,7 @@ export { setNonce } from './helpers/insertStyleRule'
|
|
|
37
37
|
export * from './constants/constants'
|
|
38
38
|
|
|
39
39
|
export * from './contexts/ComponentContext'
|
|
40
|
+
export * from './contexts/GroupContext'
|
|
40
41
|
|
|
41
42
|
export * from './_withStableStyle'
|
|
42
43
|
export * from './helpers/createMediaStyle'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChildGroupState } from '../types'
|
|
2
2
|
|
|
3
3
|
export type TamaguiComponentState = {
|
|
4
4
|
unmounted: boolean | 'should-enter'
|
|
@@ -13,7 +13,8 @@ export type TamaguiComponentState = {
|
|
|
13
13
|
style?: any
|
|
14
14
|
avoidClasses?: boolean
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
group
|
|
16
|
+
|
|
17
|
+
// this is used by the component itself to figure out group styles:
|
|
18
|
+
group?: Record<string, ChildGroupState>
|
|
18
19
|
hasDynGroupChildren?: boolean
|
|
19
20
|
}
|
package/src/types.tsx
CHANGED
|
@@ -84,13 +84,17 @@ export type ReactComponentWithRef<Props, Ref> = ForwardRefExoticComponent<
|
|
|
84
84
|
Props & RefAttributes<Ref>
|
|
85
85
|
>
|
|
86
86
|
|
|
87
|
+
// needs to be cb style for subscribeToContextGroup to be able to poke through to last state
|
|
88
|
+
export type ComponentSetStateShallow = React.Dispatch<
|
|
89
|
+
React.SetStateAction<Partial<TamaguiComponentState>>
|
|
90
|
+
>
|
|
91
|
+
|
|
87
92
|
export type ComponentContextI = {
|
|
88
93
|
disableSSR?: boolean
|
|
89
94
|
inText: boolean
|
|
90
95
|
language: LanguageContextType | null
|
|
91
96
|
animationDriver: AnimationDriver | null
|
|
92
|
-
|
|
93
|
-
setParentFocusState: ((next: Partial<TamaguiComponentState>) => void) | null
|
|
97
|
+
setParentFocusState: ComponentSetStateShallow | null
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
export type TamaguiComponentStateRef = {
|
|
@@ -103,22 +107,19 @@ export type TamaguiComponentStateRef = {
|
|
|
103
107
|
hasEverThemed?: boolean | 'wrapped'
|
|
104
108
|
isListeningToTheme?: boolean
|
|
105
109
|
unPress?: Function
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
nextComponentState?: TamaguiComponentState
|
|
111
|
+
setStateShallow?: ComponentSetStateShallow
|
|
108
112
|
useStyleListener?: UseStyleListener
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
subscribe: (cb: GroupStateListener) => () => void
|
|
114
|
-
}
|
|
113
|
+
|
|
114
|
+
// this is only used by group="" components
|
|
115
|
+
// sets up a context object to track current state + emit
|
|
116
|
+
group?: ComponentGroupEmitter
|
|
115
117
|
}
|
|
116
118
|
|
|
117
|
-
export type
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
subscribe: (cb: ComponentStateListener) => () => void
|
|
119
|
+
export type ComponentGroupEmitter = {
|
|
120
|
+
listeners: Set<GroupStateListener>
|
|
121
|
+
emit: GroupStateListener
|
|
122
|
+
subscribe: (cb: GroupStateListener) => () => void
|
|
122
123
|
}
|
|
123
124
|
|
|
124
125
|
export type WidthHeight = {
|
|
@@ -126,36 +127,32 @@ export type WidthHeight = {
|
|
|
126
127
|
height: number
|
|
127
128
|
}
|
|
128
129
|
|
|
129
|
-
type
|
|
130
|
+
export type ChildGroupState = {
|
|
130
131
|
pseudo?: PseudoGroupState
|
|
131
|
-
|
|
132
|
+
media?: Record<MediaQueryKey extends number ? never : MediaQueryKey, boolean>
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
emit: GroupStateListener
|
|
138
|
-
subscribe: (cb: GroupStateListener) => DisposeFn
|
|
139
|
-
state: Record<string, ComponentGroupEvent>
|
|
140
|
-
layout?: LayoutValue
|
|
135
|
+
export type ComponentGroupState = {
|
|
136
|
+
pseudo?: PseudoGroupState
|
|
137
|
+
layout?: WidthHeight
|
|
141
138
|
}
|
|
142
139
|
|
|
143
|
-
export type GroupStateListener = (
|
|
140
|
+
export type GroupStateListener = (state: ComponentGroupState) => void
|
|
144
141
|
|
|
145
|
-
type
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
focus?: boolean
|
|
149
|
-
focusVisible?: boolean
|
|
150
|
-
focusWithin?: boolean
|
|
142
|
+
export type SingleGroupContext = {
|
|
143
|
+
subscribe: (cb: GroupStateListener) => DisposeFn
|
|
144
|
+
state: ComponentGroupState
|
|
151
145
|
}
|
|
152
146
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
pseudo?: PseudoGroupState
|
|
156
|
-
media?: Record<MediaQueryKey extends number ? never : MediaQueryKey, boolean>
|
|
147
|
+
export type AllGroupContexts = {
|
|
148
|
+
[GroupName: string]: SingleGroupContext
|
|
157
149
|
}
|
|
158
150
|
|
|
151
|
+
export type PseudoGroupState = Pick<
|
|
152
|
+
TamaguiComponentState,
|
|
153
|
+
'disabled' | 'hover' | 'press' | 'pressIn' | 'focus' | 'focusVisible' | 'focusWithin'
|
|
154
|
+
>
|
|
155
|
+
|
|
159
156
|
export type LayoutEvent = {
|
|
160
157
|
nativeEvent: {
|
|
161
158
|
layout: LayoutValue
|
|
@@ -2545,7 +2542,7 @@ export type UseAnimatedNumberReaction<
|
|
|
2545
2542
|
|
|
2546
2543
|
export type UseAnimatedNumberStyle<
|
|
2547
2544
|
V extends UniversalAnimatedNumber<any> = UniversalAnimatedNumber<any>,
|
|
2548
|
-
> = (val: V, getStyle: (current:
|
|
2545
|
+
> = (val: V, getStyle: (current: any) => any) => any
|
|
2549
2546
|
|
|
2550
2547
|
export type UseAnimatedNumber<
|
|
2551
2548
|
N extends UniversalAnimatedNumber<any> = UniversalAnimatedNumber<any>,
|
|
@@ -12,6 +12,7 @@ import { updateMediaListeners } from '../hooks/useMedia'
|
|
|
12
12
|
import type { TamaguiProviderProps } from '../types'
|
|
13
13
|
import { ThemeProvider } from './ThemeProvider'
|
|
14
14
|
import { stopAccumulatingRules } from '../helpers/insertStyleRule'
|
|
15
|
+
import { Configuration } from './Configuration'
|
|
15
16
|
|
|
16
17
|
export function TamaguiProvider({
|
|
17
18
|
children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentContext.d.ts","sourceRoot":"","sources":["../../src/contexts/ComponentContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAsB,MAAM,UAAU,CAAA;AAErE,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ComponentContext.d.ts","sourceRoot":"","sources":["../../src/contexts/ComponentContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAsB,MAAM,UAAU,CAAA;AAErE,eAAO,MAAM,gBAAgB,2EAM3B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupContext.d.ts","sourceRoot":"","sources":["../../src/contexts/GroupContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD,eAAO,MAAM,YAAY,kDAA+C,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { TamaguiComponentState } from './interfaces/TamaguiComponentState';
|
|
3
|
-
import type { DebugProp, SpaceDirection,
|
|
3
|
+
import type { DebugProp, SpaceDirection, SpacerProps, SpacerStyleProps, SpaceValue, StackNonStyleProps, StaticConfig, TamaguiComponent, TamaguiElement } from './types';
|
|
4
4
|
type ComponentSetState = React.Dispatch<React.SetStateAction<TamaguiComponentState>>;
|
|
5
5
|
export declare const componentSetStates: Set<ComponentSetState>;
|
|
6
6
|
export declare function createComponent<ComponentPropTypes extends Record<string, any> = {}, Ref extends TamaguiElement = TamaguiElement, BaseProps = never, BaseStyles extends Object = never>(staticConfig: StaticConfig): TamaguiComponent<ComponentPropTypes, Ref, BaseProps, BaseStyles, {}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAoBxE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAG/E,OAAO,KAAK,EAGV,SAAS,EAMT,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAElB,YAAY,EAEZ,gBAAgB,EAEhB,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;AA8G9D,wBAAgB,eAAe,CAC7B,kBAAkB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,EACnD,GAAG,SAAS,cAAc,GAAG,cAAc,EAC3C,SAAS,GAAG,KAAK,EACjB,UAAU,SAAS,MAAM,GAAG,KAAK,EACjC,YAAY,EAAE,YAAY,wEA6yC3B;AAoBD,wBAAgB,QAAQ,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE,OAEjD;yBAFe,QAAQ;;;AAkBxB,eAAO,MAAM,MAAM,yFA0CjB,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,cAAc,GAAG,OAAO,CAAA;IACpC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,CAAA;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,mBAgGxD"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { TamaguiComponentState } from '../interfaces/TamaguiComponentState';
|
|
2
|
-
import type { ComponentContextI, DebugProp, GetStyleResult, GetStyleState, SplitStyleProps, StaticConfig, TextStyle, ThemeParsed } from '../types';
|
|
2
|
+
import type { ComponentContextI, DebugProp, GetStyleResult, GetStyleState, AllGroupContexts, SplitStyleProps, StaticConfig, TextStyle, ThemeParsed } from '../types';
|
|
3
3
|
export type SplitStyles = ReturnType<typeof getSplitStyles>;
|
|
4
4
|
export type SplitStyleResult = ReturnType<typeof getSplitStyles>;
|
|
5
5
|
type StyleSplitter = (props: {
|
|
6
6
|
[key: string]: any;
|
|
7
|
-
}, staticConfig: StaticConfig, theme: ThemeParsed, themeName: string, componentState: TamaguiComponentState, styleProps: SplitStyleProps, parentSplitStyles?: GetStyleResult | null, context?: ComponentContextI, elementType?: string, startedUnhydrated?: boolean, debug?: DebugProp) => GetStyleResult;
|
|
7
|
+
}, staticConfig: StaticConfig, theme: ThemeParsed, themeName: string, componentState: TamaguiComponentState, styleProps: SplitStyleProps, parentSplitStyles?: GetStyleResult | null, context?: ComponentContextI, groupContext?: AllGroupContexts | null, elementType?: string, startedUnhydrated?: boolean, debug?: DebugProp) => GetStyleResult;
|
|
8
8
|
export declare const PROP_SPLIT = "-";
|
|
9
9
|
export declare const getSplitStyles: StyleSplitter;
|
|
10
10
|
export declare const getSubStyle: (styleState: GetStyleState, subKey: string, styleIn: Object, avoidMergeTransform?: boolean) => TextStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAChF,OAAO,KAAK,EAEV,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,aAAa,
|
|
1
|
+
{"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAChF,OAAO,KAAK,EAEV,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,aAAa,EACb,gBAAgB,EAOhB,eAAe,EACf,YAAY,EAGZ,SAAS,EACT,WAAW,EAEZ,MAAM,UAAU,CAAA;AAoBjB,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAMhE,KAAK,aAAa,GAAG,CACnB,KAAK,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAC7B,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,qBAAqB,EACrC,UAAU,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,cAAc,CAAA;AAEnB,eAAO,MAAM,UAAU,MAAM,CAAA;AA+B7B,eAAO,MAAM,cAAc,EAAE,aAqvC5B,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,aAU5B,CAAA"}
|
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
export declare const pseudoDescriptorsBase: {
|
|
2
2
|
readonly hoverStyle: {
|
|
3
3
|
readonly name: "hover";
|
|
4
|
-
readonly priority:
|
|
4
|
+
readonly priority: 2;
|
|
5
5
|
};
|
|
6
6
|
readonly pressStyle: {
|
|
7
7
|
readonly name: "active";
|
|
8
8
|
readonly stateKey: "press";
|
|
9
|
-
readonly priority:
|
|
9
|
+
readonly priority: 3;
|
|
10
10
|
};
|
|
11
11
|
readonly focusVisibleStyle: {
|
|
12
12
|
readonly name: "focus-visible";
|
|
13
|
-
readonly priority:
|
|
13
|
+
readonly priority: 4;
|
|
14
14
|
readonly stateKey: "focusVisible";
|
|
15
15
|
};
|
|
16
16
|
readonly focusStyle: {
|
|
17
17
|
readonly name: "focus";
|
|
18
|
-
readonly priority:
|
|
18
|
+
readonly priority: 4;
|
|
19
19
|
};
|
|
20
20
|
readonly focusWithinStyle: {
|
|
21
21
|
readonly name: "focus-within";
|
|
22
|
-
readonly priority:
|
|
22
|
+
readonly priority: 4;
|
|
23
23
|
readonly stateKey: "focusWithin";
|
|
24
24
|
};
|
|
25
25
|
readonly disabledStyle: {
|
|
26
26
|
readonly name: "disabled";
|
|
27
|
-
readonly priority:
|
|
27
|
+
readonly priority: 5;
|
|
28
28
|
readonly stateKey: "disabled";
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
export declare const pseudoPriorities: {
|
|
32
|
-
hover:
|
|
33
|
-
press:
|
|
34
|
-
focus:
|
|
35
|
-
focusVisible:
|
|
36
|
-
focusWithin:
|
|
37
|
-
disabled:
|
|
32
|
+
hover: 2;
|
|
33
|
+
press: 3;
|
|
34
|
+
focus: 4;
|
|
35
|
+
focusVisible: 4;
|
|
36
|
+
focusWithin: 4;
|
|
37
|
+
disabled: 5;
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type PseudoDescriptorKey = keyof typeof pseudoDescriptorsBase;
|
|
40
|
+
export declare const pseudoDescriptors: Record<PseudoDescriptorKey | 'enterStyle' | 'exitStyle', PseudoDescriptor>;
|
|
40
41
|
export type PseudoDescriptor = {
|
|
41
42
|
name: string;
|
|
42
43
|
priority: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pseudoDescriptors.d.ts","sourceRoot":"","sources":["../../src/helpers/pseudoDescriptors.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BxB,CAAA;AAEV,eAAO,MAAM,gBAAgB;;;;;;;CAO5B,CAAA;AAED,
|
|
1
|
+
{"version":3,"file":"pseudoDescriptors.d.ts","sourceRoot":"","sources":["../../src/helpers/pseudoDescriptors.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BxB,CAAA;AAEV,eAAO,MAAM,gBAAgB;;;;;;;CAO5B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,qBAAqB,CAAA;AAEpE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CACpC,mBAAmB,GAAG,YAAY,GAAG,WAAW,EAChD,gBAAgB,CAYjB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;KAC7B,GAAG,IAAI,MAAM,OAAO,iBAAiB,GAAG,gBAAgB;CAC1D,CAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
setStateShallow:
|
|
1
|
+
import type { ComponentSetStateShallow, AllGroupContexts } from '../types';
|
|
2
|
+
type SubscribeToContextGroupProps = {
|
|
3
|
+
setStateShallow: ComponentSetStateShallow;
|
|
4
4
|
pseudoGroups?: Set<string>;
|
|
5
5
|
mediaGroups?: Set<string>;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
groupContext: AllGroupContexts;
|
|
7
|
+
};
|
|
8
|
+
export declare const subscribeToContextGroup: (props: SubscribeToContextGroupProps) => (() => void) | undefined;
|
|
9
|
+
export {};
|
|
9
10
|
//# sourceMappingURL=subscribeToContextGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribeToContextGroup.d.ts","sourceRoot":"","sources":["../../src/helpers/subscribeToContextGroup.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subscribeToContextGroup.d.ts","sourceRoot":"","sources":["../../src/helpers/subscribeToContextGroup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAa,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAErF,KAAK,4BAA4B,GAAG;IAClC,eAAe,EAAE,wBAAwB,CAAA;IACzC,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACzB,YAAY,EAAE,gBAAgB,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,uBAAuB,GAAI,OAAO,4BAA4B,6BAyB1E,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ComponentContextI, StackProps, StaticConfig, TamaguiComponentState, TamaguiComponentStateRef, TamaguiInternalConfig, TextProps } from '../types';
|
|
2
|
-
export declare const useComponentState: (props: StackProps | TextProps | Record<string, any>,
|
|
2
|
+
export declare const useComponentState: (props: StackProps | TextProps | Record<string, any>, animationDriver: ComponentContextI["animationDriver"], staticConfig: StaticConfig, config: TamaguiInternalConfig) => {
|
|
3
3
|
startedUnhydrated: boolean;
|
|
4
4
|
curStateRef: TamaguiComponentStateRef;
|
|
5
5
|
disabled: any;
|
|
6
|
-
groupName: string;
|
|
6
|
+
groupName: string | undefined;
|
|
7
7
|
hasAnimationProp: boolean;
|
|
8
8
|
hasEnterStyle: boolean;
|
|
9
9
|
isAnimated: boolean;
|
|
@@ -12,7 +12,7 @@ export declare const useComponentState: (props: StackProps | TextProps | Record<
|
|
|
12
12
|
presence: import("../types").UsePresenceResult | null;
|
|
13
13
|
presenceState: import("../types").PresenceContextProps | null | undefined;
|
|
14
14
|
setState: import("react").Dispatch<import("react").SetStateAction<TamaguiComponentState>>;
|
|
15
|
-
setStateShallow: (
|
|
15
|
+
setStateShallow: import("react").Dispatch<import("react").SetStateAction<Partial<TamaguiComponentState>>>;
|
|
16
16
|
noClass: boolean | undefined;
|
|
17
17
|
state: TamaguiComponentState;
|
|
18
18
|
stateRef: import("react").RefObject<TamaguiComponentStateRef>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useComponentState.d.ts","sourceRoot":"","sources":["../../src/hooks/useComponentState.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,iBAAiB,
|
|
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;;;;;;;;;;;;;;;;;;;;CAsM9B,CAAA"}
|
|
@@ -1,122 +1,2 @@
|
|
|
1
|
-
export declare const useConfiguration: () =>
|
|
2
|
-
animationDriver: import("..").AnimationDriver<{
|
|
3
|
-
[key: string]: any;
|
|
4
|
-
}>;
|
|
5
|
-
disableSSR?: boolean;
|
|
6
|
-
inText: boolean;
|
|
7
|
-
language: import("../views/FontLanguage.types").LanguageContextType | null;
|
|
8
|
-
setParentFocusState: ((next: Partial<import("..").TamaguiComponentState>) => void) | null;
|
|
9
|
-
unset?: import("..").BaseStyleProps | undefined;
|
|
10
|
-
reactNative?: any;
|
|
11
|
-
defaultFont?: string | undefined;
|
|
12
|
-
selectionStyles?: ((theme: Record<string, string>) => null | {
|
|
13
|
-
backgroundColor?: any;
|
|
14
|
-
color?: any;
|
|
15
|
-
}) | undefined;
|
|
16
|
-
disableRootThemeClass?: boolean | undefined;
|
|
17
|
-
defaultProps?: (Record<string, any> & {
|
|
18
|
-
Stack?: import("..").StackProps;
|
|
19
|
-
Text?: import("..").TextProps;
|
|
20
|
-
Spacer?: import("..").SpacerProps;
|
|
21
|
-
}) | undefined;
|
|
22
|
-
mediaQueryDefaultActive?: Record<string, boolean> | undefined;
|
|
23
|
-
cssStyleSeparator?: string | undefined;
|
|
24
|
-
maxDarkLightNesting?: number | undefined;
|
|
25
|
-
shouldAddPrefersColorThemes?: boolean | undefined;
|
|
26
|
-
themeClassNameOnRoot?: boolean | undefined;
|
|
27
|
-
onlyAllowShorthands?: boolean | undefined;
|
|
28
|
-
fonts: {
|
|
29
|
-
[x: string]: import("..").GenericFont<string | number | symbol>;
|
|
30
|
-
};
|
|
31
|
-
fontLanguages: string[];
|
|
32
|
-
themes: {
|
|
33
|
-
[x: string]: {
|
|
34
|
-
[x: string]: import("..").Variable<any> | import("..").Variable<string> | import("..").Variable<number> | import("..").Variable<import("..").PxValue> | import("..").Variable<import("..").VariableValGeneric>;
|
|
35
|
-
background?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
36
|
-
backgroundHover?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
37
|
-
backgroundPress?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
38
|
-
backgroundFocus?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
39
|
-
color?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
40
|
-
colorHover?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
41
|
-
colorPress?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
42
|
-
colorFocus?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
43
|
-
borderColor?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
44
|
-
borderColorHover?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
45
|
-
borderColorPress?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
46
|
-
borderColorFocus?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
47
|
-
shadowColor?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
48
|
-
shadowColorHover?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
49
|
-
shadowColorPress?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
50
|
-
shadowColorFocus?: import("..").Variable<string> | import("..").Variable<any> | import("..").Variable<undefined> | undefined;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
shorthands: import("..").GenericShorthands;
|
|
54
|
-
media: {
|
|
55
|
-
[key: string]: {
|
|
56
|
-
[key: string]: string | number;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
settings: import("..").GenericTamaguiSettings & Omit<import("..").GenericTamaguiSettings, keyof import("..").GenericTamaguiSettings>;
|
|
60
|
-
tokens: Omit<{
|
|
61
|
-
[x: string]: {
|
|
62
|
-
[x: string]: import("..").Variable<any> | import("..").Variable<string> | import("..").Variable<number> | import("..").Variable<import("..").PxValue> | import("..").Variable<import("..").VariableValGeneric>;
|
|
63
|
-
};
|
|
64
|
-
color?: {
|
|
65
|
-
[x: string]: import("..").Variable<any> | import("..").Variable<string> | import("..").Variable<number> | import("..").Variable<import("..").PxValue> | import("..").Variable<import("..").VariableValGeneric>;
|
|
66
|
-
} | undefined;
|
|
67
|
-
space?: {
|
|
68
|
-
[x: string]: import("..").Variable<any> | import("..").Variable<string> | import("..").Variable<number> | import("..").Variable<import("..").PxValue> | import("..").Variable<import("..").VariableValGeneric>;
|
|
69
|
-
} | undefined;
|
|
70
|
-
size?: {
|
|
71
|
-
[x: string]: import("..").Variable<any> | import("..").Variable<string> | import("..").Variable<number> | import("..").Variable<import("..").PxValue> | import("..").Variable<import("..").VariableValGeneric>;
|
|
72
|
-
} | undefined;
|
|
73
|
-
radius?: {
|
|
74
|
-
[x: string]: import("..").Variable<any> | import("..").Variable<string> | import("..").Variable<number> | import("..").Variable<import("..").PxValue> | import("..").Variable<import("..").VariableValGeneric>;
|
|
75
|
-
} | undefined;
|
|
76
|
-
zIndex?: {
|
|
77
|
-
[x: string]: import("..").Variable<any> | import("..").Variable<string> | import("..").Variable<number> | import("..").Variable<import("..").PxValue> | import("..").Variable<import("..").VariableValGeneric>;
|
|
78
|
-
} | undefined;
|
|
79
|
-
}, import("..").TokenCategories> & {
|
|
80
|
-
color: {};
|
|
81
|
-
space: {};
|
|
82
|
-
size: {};
|
|
83
|
-
radius: {};
|
|
84
|
-
zIndex: {};
|
|
85
|
-
};
|
|
86
|
-
tokensParsed: Omit<{
|
|
87
|
-
[x: string]: {
|
|
88
|
-
[x: string]: import("..").Variable<any> | import("..").Variable<string> | import("..").Variable<number> | import("..").Variable<import("..").PxValue> | import("..").Variable<import("..").VariableValGeneric>;
|
|
89
|
-
};
|
|
90
|
-
color?: {
|
|
91
|
-
[x: string]: import("..").Variable<any> | import("..").Variable<string> | import("..").Variable<number> | import("..").Variable<import("..").PxValue> | import("..").Variable<import("..").VariableValGeneric>;
|
|
92
|
-
} | undefined;
|
|
93
|
-
space?: {
|
|
94
|
-
[x: string]: import("..").Variable<any> | import("..").Variable<string> | import("..").Variable<number> | import("..").Variable<import("..").PxValue> | import("..").Variable<import("..").VariableValGeneric>;
|
|
95
|
-
} | undefined;
|
|
96
|
-
size?: {
|
|
97
|
-
[x: string]: import("..").Variable<any> | import("..").Variable<string> | import("..").Variable<number> | import("..").Variable<import("..").PxValue> | import("..").Variable<import("..").VariableValGeneric>;
|
|
98
|
-
} | undefined;
|
|
99
|
-
radius?: {
|
|
100
|
-
[x: string]: import("..").Variable<any> | import("..").Variable<string> | import("..").Variable<number> | import("..").Variable<import("..").PxValue> | import("..").Variable<import("..").VariableValGeneric>;
|
|
101
|
-
} | undefined;
|
|
102
|
-
zIndex?: {
|
|
103
|
-
[x: string]: import("..").Variable<any> | import("..").Variable<string> | import("..").Variable<number> | import("..").Variable<import("..").PxValue> | import("..").Variable<import("..").VariableValGeneric>;
|
|
104
|
-
} | undefined;
|
|
105
|
-
}, import("..").TokenCategories> & {
|
|
106
|
-
color: {};
|
|
107
|
-
space: {};
|
|
108
|
-
size: {};
|
|
109
|
-
radius: {};
|
|
110
|
-
zIndex: {};
|
|
111
|
-
};
|
|
112
|
-
themeConfig: any;
|
|
113
|
-
fontsParsed: import("..").GenericFonts;
|
|
114
|
-
getCSS: import("..").GetCSS;
|
|
115
|
-
getNewCSS: import("..").GetCSS;
|
|
116
|
-
parsed: boolean;
|
|
117
|
-
inverseShorthands: Record<string, string>;
|
|
118
|
-
fontSizeTokens: Set<string>;
|
|
119
|
-
specificTokens: Record<string, import("..").Variable>;
|
|
120
|
-
defaultFontToken: `${string}`;
|
|
121
|
-
};
|
|
1
|
+
export declare const useConfiguration: () => import("..").ComponentContextI;
|
|
122
2
|
//# sourceMappingURL=useConfiguration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConfiguration.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfiguration.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useConfiguration.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfiguration.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,sCAE5B,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentContextI, DebugProp, IsMediaType, MediaQueries, MediaQueryObject, MediaQueryState, TamaguiInternalConfig, UseMediaState, WidthHeight } from '../types';
|
|
1
|
+
import type { ComponentContextI, DebugProp, GetStyleState, IsMediaType, MediaQueries, MediaQueryObject, MediaQueryState, TamaguiInternalConfig, UseMediaState, WidthHeight } from '../types';
|
|
2
2
|
export declare let mediaState: MediaQueryState;
|
|
3
3
|
export declare const mediaQueryConfig: MediaQueries;
|
|
4
4
|
export declare const getMedia: () => MediaQueryState;
|
|
@@ -16,7 +16,7 @@ export declare function setMediaShouldUpdate(ref: any, enabled?: boolean, keys?:
|
|
|
16
16
|
export declare function useMedia(cc?: ComponentContextI, debug?: DebugProp): UseMediaState;
|
|
17
17
|
export declare function _disableMediaTouch(val: boolean): void;
|
|
18
18
|
export declare function getMediaState(mediaGroups: Set<string>, layout: WidthHeight): Record<string, boolean>;
|
|
19
|
-
export declare const getMediaImportanceIfMoreImportant: (mediaKey: string, key: string,
|
|
19
|
+
export declare const getMediaImportanceIfMoreImportant: (mediaKey: string, key: string, styleState: GetStyleState, isSizeMedia: boolean) => number | null;
|
|
20
20
|
export declare function mediaObjectToString(query: string | MediaQueryObject, key?: string): string;
|
|
21
21
|
export declare function mediaKeyToQuery(key: string): string;
|
|
22
22
|
export declare function mediaKeyMatch(key: string, dimensions: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMedia.d.ts","sourceRoot":"","sources":["../../src/hooks/useMedia.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,WAAW,EACZ,MAAM,UAAU,CAAA;AAEjB,eAAO,IAAI,UAAU,EAAE,eAmBN,CAAA;AAEjB,eAAO,MAAM,gBAAgB,EAAE,YAAiB,CAAA;AAEhD,eAAO,MAAM,QAAQ,uBAAmB,CAAA;AAExC,eAAO,MAAM,SAAS,aAAoB,CAAA;AAI1C,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,WAOxC,CAAA;AAUD,eAAO,MAAM,qBAAqB,GAAI,KAAK,MAAM,WAchD,CAAA;AAMD,eAAO,MAAM,cAAc,GAAI,QAAQ,qBAAqB,SAa3D,CAAA;AAaD,wBAAgB,mBAAmB,SAkClC;AAID,wBAAgB,oBAAoB,SAEnC;AAMD,KAAK,UAAU,GAAG;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;CAC1B,CAAA;AAID,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,GAAG,EACR,OAAO,CAAC,EAAE,OAAO,EACjB,IAAI,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,QAW1B;AASD,wBAAgB,QAAQ,CAAC,EAAE,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,SAAS,GAAG,aAAa,CAuDjF;AAKD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,QAE9C;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,WAAW,2BAa1E;AAED,eAAO,MAAM,iCAAiC,GAC5C,UAAU,MAAM,EAChB,KAAK,MAAM,EACX,
|
|
1
|
+
{"version":3,"file":"useMedia.d.ts","sourceRoot":"","sources":["../../src/hooks/useMedia.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,WAAW,EACZ,MAAM,UAAU,CAAA;AAEjB,eAAO,IAAI,UAAU,EAAE,eAmBN,CAAA;AAEjB,eAAO,MAAM,gBAAgB,EAAE,YAAiB,CAAA;AAEhD,eAAO,MAAM,QAAQ,uBAAmB,CAAA;AAExC,eAAO,MAAM,SAAS,aAAoB,CAAA;AAI1C,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,WAOxC,CAAA;AAUD,eAAO,MAAM,qBAAqB,GAAI,KAAK,MAAM,WAchD,CAAA;AAMD,eAAO,MAAM,cAAc,GAAI,QAAQ,qBAAqB,SAa3D,CAAA;AAaD,wBAAgB,mBAAmB,SAkClC;AAID,wBAAgB,oBAAoB,SAEnC;AAMD,KAAK,UAAU,GAAG;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;CAC1B,CAAA;AAID,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,GAAG,EACR,OAAO,CAAC,EAAE,OAAO,EACjB,IAAI,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,QAW1B;AASD,wBAAgB,QAAQ,CAAC,EAAE,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,SAAS,GAAG,aAAa,CAuDjF;AAKD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,QAE9C;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,WAAW,2BAa1E;AAED,eAAO,MAAM,iCAAiC,GAC5C,UAAU,MAAM,EAChB,KAAK,MAAM,EACX,YAAY,aAAa,EACzB,aAAa,OAAO,kBAQrB,CAAA;AASD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,EAAE,GAAG,CAAC,EAAE,MAAM,UAwBjF;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,UAE1C;AAED,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,UAAU,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,WAY9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProps.d.ts","sourceRoot":"","sources":["../../src/hooks/useProps.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useProps.d.ts","sourceRoot":"","sources":["../../src/hooks/useProps.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAEzF,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAKzD,KAAK,eAAe,GAAG,IAAI,CACzB,eAAe,EACf,UAAU,GAAG,aAAa,GAAG,SAAS,GAAG,eAAe,CACzD,GAAG;IACF,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,YAAY,CAAC,EAAE;QAAE,YAAY,EAAE,YAAY,CAAA;KAAE,CAAA;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI;KAEtC,GAAG,IAAI,MAAM,CAAC,SAAS,IAAI,MAAM,EAAE,GAAG,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC;CACjE,CAAA;AAED,KAAK,eAAe,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,MAAM,CAAA;AACjE,KAAK,eAAe,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,MAAM,CAAA;AAEjE;;;;;KAKK;AACL,wBAAgB,QAAQ,CAAC,CAAC,SAAS,eAAe,EAChD,KAAK,EAAE,CAAC,EACR,IAAI,CAAC,EAAE,eAAe,GACrB,uBAAuB,CAAC,CAAC,CAAC,CAW5B;AAED;;;;;KAKK;AACL,wBAAgB,QAAQ,CAAC,CAAC,SAAS,eAAe,EAChD,KAAK,EAAE,CAAC,EACR,IAAI,CAAC,EAAE,eAAe,GACrB,uBAAuB,CAAC,CAAC,CAAC,CAE5B;AAED;;;;;KAKK;AACL,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,eAAe,EACxD,KAAK,EAAE,CAAC,EACR,IAAI,CAAC,EAAE,eAAe,GACrB,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,uBAAuB,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,aAAa,CAAC,CAwEtF"}
|
package/types/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export { setConfig, getSetting, setupDev, getConfig, getThemes, getTokens, updat
|
|
|
21
21
|
export { setNonce } from './helpers/insertStyleRule';
|
|
22
22
|
export * from './constants/constants';
|
|
23
23
|
export * from './contexts/ComponentContext';
|
|
24
|
+
export * from './contexts/GroupContext';
|
|
24
25
|
export * from './_withStableStyle';
|
|
25
26
|
export * from './helpers/createMediaStyle';
|
|
26
27
|
export * from './helpers/getShorthandValue';
|