@tamagui/web 1.53.2 → 1.54.1
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/CSSColorNames.js +17 -0
- package/dist/cjs/CSSColorNames.js.map +6 -0
- package/dist/cjs/GetRef.js +17 -0
- package/dist/cjs/GetRef.js.map +6 -0
- package/dist/cjs/Role.js +17 -0
- package/dist/cjs/Role.js.map +6 -0
- package/dist/cjs/contexts/ComponentContext.js +47 -0
- package/dist/cjs/contexts/ComponentContext.js.map +6 -0
- package/dist/cjs/createComponent.js +67 -20
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createTamagui.js +1 -0
- package/dist/cjs/createTamagui.js.map +1 -1
- package/dist/cjs/helpers/createMediaStyle.js +13 -5
- package/dist/cjs/helpers/createMediaStyle.js.map +1 -1
- package/dist/cjs/helpers/createShallowSetState.js +39 -0
- package/dist/cjs/helpers/createShallowSetState.js.map +6 -0
- package/dist/cjs/helpers/createStyledContext.js +7 -2
- package/dist/cjs/helpers/createStyledContext.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.js +40 -22
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.js.map +1 -1
- package/dist/cjs/helpers/getVariantExtras.js +3 -3
- package/dist/cjs/helpers/getVariantExtras.js.map +1 -1
- package/dist/cjs/helpers/propMapper.js +3 -3
- package/dist/cjs/helpers/propMapper.js.map +1 -1
- package/dist/cjs/helpers/pseudoDescriptors.js +9 -2
- package/dist/cjs/helpers/pseudoDescriptors.js.map +1 -1
- package/dist/cjs/hooks/useAnimationDriver.js +2 -2
- package/dist/cjs/hooks/useAnimationDriver.js.map +1 -1
- package/dist/cjs/hooks/useMedia.js +6 -3
- package/dist/cjs/hooks/useMedia.js.map +1 -1
- package/dist/cjs/hooks/useStyle.js +3 -7
- package/dist/cjs/hooks/useStyle.js.map +1 -1
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/CSSColorNames.js +17 -0
- package/dist/cjs/interfaces/CSSColorNames.js.map +6 -0
- package/dist/cjs/interfaces/GetRef.js +17 -0
- package/dist/cjs/interfaces/GetRef.js.map +6 -0
- package/dist/cjs/interfaces/Role.js +17 -0
- package/dist/cjs/interfaces/Role.js.map +6 -0
- package/dist/cjs/styled.js.map +1 -1
- package/dist/cjs/types/CSSColorNames.js +17 -0
- package/dist/cjs/types/CSSColorNames.js.map +6 -0
- package/dist/cjs/types/GetRef.js +17 -0
- package/dist/cjs/types/GetRef.js.map +6 -0
- package/dist/cjs/types/Role.js +17 -0
- package/dist/cjs/types/Role.js.map +6 -0
- package/dist/cjs/views/AnimationDriverProvider.js +2 -2
- package/dist/cjs/views/AnimationDriverProvider.js.map +1 -1
- package/dist/cjs/views/FontLanguage.native.js +3 -3
- package/dist/cjs/views/FontLanguage.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.js +3 -5
- package/dist/cjs/views/TamaguiProvider.js.map +1 -1
- package/dist/esm/CSSColorNames.js +1 -0
- package/dist/esm/CSSColorNames.js.map +6 -0
- package/dist/esm/GetRef.js +1 -0
- package/dist/esm/GetRef.js.map +6 -0
- package/dist/esm/Role.js +1 -0
- package/dist/esm/Role.js.map +6 -0
- package/dist/esm/contexts/ComponentContext.js +23 -0
- package/dist/esm/contexts/ComponentContext.js.map +6 -0
- package/dist/esm/createComponent.js +68 -20
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createTamagui.js +1 -0
- package/dist/esm/createTamagui.js.map +1 -1
- package/dist/esm/helpers/createMediaStyle.js +13 -5
- package/dist/esm/helpers/createMediaStyle.js.map +1 -1
- package/dist/esm/helpers/createShallowSetState.js +15 -0
- package/dist/esm/helpers/createShallowSetState.js.map +6 -0
- package/dist/esm/helpers/createStyledContext.js +7 -2
- package/dist/esm/helpers/createStyledContext.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.js +41 -23
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.js.map +1 -1
- package/dist/esm/helpers/getVariantExtras.js +3 -3
- package/dist/esm/helpers/getVariantExtras.js.map +1 -1
- package/dist/esm/helpers/propMapper.js +3 -3
- package/dist/esm/helpers/propMapper.js.map +1 -1
- package/dist/esm/helpers/pseudoDescriptors.js +7 -1
- package/dist/esm/helpers/pseudoDescriptors.js.map +1 -1
- package/dist/esm/hooks/useAnimationDriver.js +2 -2
- package/dist/esm/hooks/useAnimationDriver.js.map +1 -1
- package/dist/esm/hooks/useMedia.js +6 -3
- package/dist/esm/hooks/useMedia.js.map +1 -1
- package/dist/esm/hooks/useStyle.js +3 -7
- package/dist/esm/hooks/useStyle.js.map +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/CSSColorNames.js +1 -0
- package/dist/esm/interfaces/CSSColorNames.js.map +6 -0
- package/dist/esm/interfaces/GetRef.js +1 -0
- package/dist/esm/interfaces/GetRef.js.map +6 -0
- package/dist/esm/interfaces/Role.js +1 -0
- package/dist/esm/interfaces/Role.js.map +6 -0
- package/dist/esm/styled.js.map +1 -1
- package/dist/esm/types/CSSColorNames.js +1 -0
- package/dist/esm/types/CSSColorNames.js.map +6 -0
- package/dist/esm/types/GetRef.js +1 -0
- package/dist/esm/types/GetRef.js.map +6 -0
- package/dist/esm/types/Role.js +1 -0
- package/dist/esm/types/Role.js.map +6 -0
- package/dist/esm/views/AnimationDriverProvider.js +2 -2
- package/dist/esm/views/AnimationDriverProvider.js.map +1 -1
- package/dist/esm/views/FontLanguage.native.js +3 -3
- package/dist/esm/views/FontLanguage.native.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.js +3 -5
- package/dist/esm/views/TamaguiProvider.js.map +1 -1
- package/package.json +10 -10
- package/src/contexts/ComponentContext.tsx +22 -0
- package/src/createComponent.tsx +108 -26
- package/src/createTamagui.ts +1 -0
- package/src/helpers/createMediaStyle.ts +14 -5
- package/src/helpers/{useShallowSetState.tsx → createShallowSetState.tsx} +1 -1
- package/src/helpers/createStyledContext.tsx +7 -2
- package/src/helpers/getSplitStyles.tsx +47 -19
- package/src/helpers/getStylesAtomic.ts +1 -1
- package/src/helpers/getVariantExtras.tsx +3 -3
- package/src/helpers/propMapper.ts +5 -5
- package/src/helpers/pseudoDescriptors.ts +7 -0
- package/src/hooks/useAnimationDriver.tsx +2 -2
- package/src/hooks/useMedia.tsx +10 -3
- package/src/hooks/useStyle.tsx +3 -7
- package/src/index.ts +7 -6
- package/src/interfaces/CSSColorNames.tsx +141 -0
- package/src/interfaces/GetRef.tsx +23 -0
- package/src/interfaces/Role.tsx +68 -0
- package/src/styled.tsx +1 -1
- package/src/types.tsx +91 -272
- package/src/views/AnimationDriverProvider.tsx +3 -3
- package/src/views/FontLanguage.native.tsx +3 -3
- package/src/views/TamaguiProvider.tsx +11 -19
- package/types/CSSColorNames.d.ts +2 -0
- package/types/CSSColorNames.d.ts.map +1 -0
- package/types/GetRef.d.ts +23 -0
- package/types/GetRef.d.ts.map +1 -0
- package/types/Role.d.ts +2 -0
- package/types/Role.d.ts.map +1 -0
- package/types/contexts/ComponentContext.d.ts +3 -0
- package/types/contexts/ComponentContext.d.ts.map +1 -0
- package/types/createComponent.d.ts +2 -2
- package/types/createComponent.d.ts.map +1 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/helpers/createMediaStyle.d.ts.map +1 -1
- package/types/helpers/createShallowSetState.d.ts +4 -0
- package/types/helpers/createShallowSetState.d.ts.map +1 -0
- package/types/helpers/createStyledContext.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +2 -3
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/pseudoDescriptors.d.ts +5 -0
- package/types/helpers/pseudoDescriptors.d.ts.map +1 -1
- package/types/hooks/useAnimationDriver.d.ts +3 -1
- package/types/hooks/useAnimationDriver.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts +1 -1
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useStyle.d.ts.map +1 -1
- package/types/index.d.ts +5 -5
- package/types/index.d.ts.map +1 -1
- package/types/interfaces/CSSColorNames.d.ts +2 -0
- package/types/interfaces/CSSColorNames.d.ts.map +1 -0
- package/types/interfaces/GetRef.d.ts +6 -0
- package/types/interfaces/GetRef.d.ts.map +1 -0
- package/types/interfaces/Role.d.ts +2 -0
- package/types/interfaces/Role.d.ts.map +1 -0
- package/types/styled.d.ts +2 -1
- package/types/styled.d.ts.map +1 -1
- package/types/types/CSSColorNames.d.ts +2 -0
- package/types/types/CSSColorNames.d.ts.map +1 -0
- package/types/types/GetRef.d.ts +6 -0
- package/types/types/GetRef.d.ts.map +1 -0
- package/types/types/Role.d.ts +2 -0
- package/types/types/Role.d.ts.map +1 -0
- package/types/types.d.ts +58 -31
- package/types/types.d.ts.map +1 -1
- package/types/views/TamaguiProvider.d.ts.map +1 -1
- package/src/contexts/AnimationDriverContext.tsx +0 -5
- package/src/contexts/ButtonNestingContext.tsx +0 -3
- package/src/contexts/FontLanguageContext.tsx +0 -5
- package/src/contexts/TextAncestorContext.tsx +0 -3
package/src/types.tsx
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
// TODO split this into own package @tamagui/types to share with animations packages
|
|
2
|
-
|
|
3
1
|
import type { StyleObject } from '@tamagui/helpers'
|
|
4
2
|
import type { Properties } from 'csstype'
|
|
5
3
|
import {
|
|
6
|
-
Component,
|
|
7
4
|
ComponentType,
|
|
8
5
|
ForwardRefExoticComponent,
|
|
9
6
|
FunctionComponent,
|
|
10
7
|
HTMLAttributes,
|
|
11
|
-
JSXElementConstructor,
|
|
12
8
|
ReactNode,
|
|
13
|
-
Ref,
|
|
14
9
|
RefAttributes,
|
|
15
10
|
RefObject,
|
|
16
11
|
} from 'react'
|
|
@@ -28,7 +23,9 @@ import type {
|
|
|
28
23
|
import type { Variable } from './createVariable'
|
|
29
24
|
import { StyledContext } from './helpers/createStyledContext'
|
|
30
25
|
import type { ResolveVariableTypes } from './helpers/propMapper'
|
|
31
|
-
import
|
|
26
|
+
import { CSSColorNames } from './interfaces/CSSColorNames'
|
|
27
|
+
import { Role } from './interfaces/Role'
|
|
28
|
+
import type { LanguageContextType } from './views/FontLanguage.types'
|
|
32
29
|
import type { ThemeProviderProps } from './views/ThemeProvider'
|
|
33
30
|
|
|
34
31
|
export type { MediaStyleObject, StyleObject } from '@tamagui/helpers'
|
|
@@ -40,106 +37,6 @@ export type TamaguiTextElement = HTMLElement | RNText
|
|
|
40
37
|
|
|
41
38
|
export type DebugProp = boolean | 'break' | 'verbose' | 'visualize' | 'profile'
|
|
42
39
|
|
|
43
|
-
/**
|
|
44
|
-
* For static / studio
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
type NameToPaths = {
|
|
48
|
-
[key: string]: Set<string>
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export type LoadedComponents = {
|
|
52
|
-
moduleName: string
|
|
53
|
-
nameToInfo: Record<
|
|
54
|
-
string,
|
|
55
|
-
{
|
|
56
|
-
staticConfig: StaticConfig
|
|
57
|
-
}
|
|
58
|
-
>
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export type TamaguiProjectInfo = {
|
|
62
|
-
components: LoadedComponents[]
|
|
63
|
-
tamaguiConfig: TamaguiInternalConfig
|
|
64
|
-
nameToPaths: NameToPaths
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// from react-native Accessibility.d.ts
|
|
68
|
-
export type Role =
|
|
69
|
-
| 'alert'
|
|
70
|
-
| 'alertdialog'
|
|
71
|
-
| 'application'
|
|
72
|
-
| 'article'
|
|
73
|
-
| 'banner'
|
|
74
|
-
| 'button'
|
|
75
|
-
| 'cell'
|
|
76
|
-
| 'checkbox'
|
|
77
|
-
| 'columnheader'
|
|
78
|
-
| 'combobox'
|
|
79
|
-
| 'complementary'
|
|
80
|
-
| 'contentinfo'
|
|
81
|
-
| 'definition'
|
|
82
|
-
| 'dialog'
|
|
83
|
-
| 'directory'
|
|
84
|
-
| 'document'
|
|
85
|
-
| 'feed'
|
|
86
|
-
| 'figure'
|
|
87
|
-
| 'form'
|
|
88
|
-
| 'grid'
|
|
89
|
-
| 'group'
|
|
90
|
-
| 'heading'
|
|
91
|
-
| 'img'
|
|
92
|
-
| 'link'
|
|
93
|
-
| 'list'
|
|
94
|
-
| 'listitem'
|
|
95
|
-
| 'log'
|
|
96
|
-
| 'main'
|
|
97
|
-
| 'marquee'
|
|
98
|
-
| 'math'
|
|
99
|
-
| 'menu'
|
|
100
|
-
| 'menubar'
|
|
101
|
-
| 'menuitem'
|
|
102
|
-
| 'meter'
|
|
103
|
-
| 'navigation'
|
|
104
|
-
| 'none'
|
|
105
|
-
| 'note'
|
|
106
|
-
| 'option'
|
|
107
|
-
| 'presentation'
|
|
108
|
-
| 'progressbar'
|
|
109
|
-
| 'radio'
|
|
110
|
-
| 'radiogroup'
|
|
111
|
-
| 'region'
|
|
112
|
-
| 'row'
|
|
113
|
-
| 'rowgroup'
|
|
114
|
-
| 'rowheader'
|
|
115
|
-
| 'scrollbar'
|
|
116
|
-
| 'searchbox'
|
|
117
|
-
| 'separator'
|
|
118
|
-
| 'slider'
|
|
119
|
-
| 'spinbutton'
|
|
120
|
-
| 'status'
|
|
121
|
-
| 'summary'
|
|
122
|
-
| 'switch'
|
|
123
|
-
| 'tab'
|
|
124
|
-
| 'table'
|
|
125
|
-
| 'tablist'
|
|
126
|
-
| 'tabpanel'
|
|
127
|
-
| 'term'
|
|
128
|
-
| 'timer'
|
|
129
|
-
| 'toolbar'
|
|
130
|
-
| 'tooltip'
|
|
131
|
-
| 'tree'
|
|
132
|
-
| 'treegrid'
|
|
133
|
-
| 'treeitem'
|
|
134
|
-
|
|
135
|
-
// base props that are accepted by createComponent (additional to react-native-web)
|
|
136
|
-
|
|
137
|
-
type DivAttributes = HTMLAttributes<HTMLDivElement>
|
|
138
|
-
|
|
139
|
-
export type TamaguiReactElement<P = {}> = React.ReactElement<P> & {
|
|
140
|
-
type: TamaguiComponent
|
|
141
|
-
}
|
|
142
|
-
|
|
143
40
|
export type TamaguiComponentPropsBase = {
|
|
144
41
|
target?: string
|
|
145
42
|
hitSlop?: PressableProps['hitSlop']
|
|
@@ -148,7 +45,7 @@ export type TamaguiComponentPropsBase = {
|
|
|
148
45
|
children?: any | any[]
|
|
149
46
|
|
|
150
47
|
debug?: DebugProp
|
|
151
|
-
|
|
48
|
+
|
|
152
49
|
disabled?: boolean
|
|
153
50
|
|
|
154
51
|
/**
|
|
@@ -176,6 +73,11 @@ export type TamaguiComponentPropsBase = {
|
|
|
176
73
|
*/
|
|
177
74
|
theme?: ThemeName | null
|
|
178
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Marks this component as a group for use in styling children based on parents named group
|
|
78
|
+
*/
|
|
79
|
+
group?: GroupNames
|
|
80
|
+
|
|
179
81
|
/**
|
|
180
82
|
* Equivalent to "name" property on styled() for automatically applying a theme
|
|
181
83
|
*/
|
|
@@ -206,7 +108,7 @@ export type TamaguiComponentPropsBase = {
|
|
|
206
108
|
* Disables className output of styles, instead using only inline styles
|
|
207
109
|
*/
|
|
208
110
|
disableClassName?: boolean
|
|
209
|
-
|
|
111
|
+
|
|
210
112
|
onPress?: PressableProps['onPress']
|
|
211
113
|
onLongPress?: PressableProps['onLongPress']
|
|
212
114
|
onPressIn?: PressableProps['onPress']
|
|
@@ -223,10 +125,68 @@ export type TamaguiComponentPropsBase = {
|
|
|
223
125
|
onScroll?: (event: React.UIEvent<HTMLDivElement, UIEvent>) => void
|
|
224
126
|
}
|
|
225
127
|
|
|
128
|
+
/**
|
|
129
|
+
* For static / studio
|
|
130
|
+
*/
|
|
131
|
+
|
|
132
|
+
type NameToPaths = {
|
|
133
|
+
[key: string]: Set<string>
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export type LoadedComponents = {
|
|
137
|
+
moduleName: string
|
|
138
|
+
nameToInfo: Record<
|
|
139
|
+
string,
|
|
140
|
+
{
|
|
141
|
+
staticConfig: StaticConfig
|
|
142
|
+
}
|
|
143
|
+
>
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export type TamaguiProjectInfo = {
|
|
147
|
+
components: LoadedComponents[]
|
|
148
|
+
tamaguiConfig: TamaguiInternalConfig
|
|
149
|
+
nameToPaths: NameToPaths
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// base props that are accepted by createComponent (additional to react-native-web)
|
|
153
|
+
|
|
154
|
+
type DivAttributes = HTMLAttributes<HTMLDivElement>
|
|
155
|
+
|
|
156
|
+
export type TamaguiReactElement<P = {}> = React.ReactElement<P> & {
|
|
157
|
+
type: TamaguiComponent
|
|
158
|
+
}
|
|
159
|
+
|
|
226
160
|
export type ReactComponentWithRef<Props, Ref> = ForwardRefExoticComponent<
|
|
227
161
|
Props & RefAttributes<Ref>
|
|
228
162
|
>
|
|
229
163
|
|
|
164
|
+
export type ComponentContextI = {
|
|
165
|
+
inText: boolean
|
|
166
|
+
language: LanguageContextType | null
|
|
167
|
+
animationDriver: AnimationDriver | null
|
|
168
|
+
groups: GroupContextType
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// this object must stay referentially the same always to avoid every component re-rendering
|
|
172
|
+
// instead `state` is mutated and only used on initial mount, after that emit/subscribe
|
|
173
|
+
export type GroupContextType = {
|
|
174
|
+
emit: GroupStateListener
|
|
175
|
+
subscribe: (cb: GroupStateListener) => DisposeFn
|
|
176
|
+
state: Record<string, GroupState>
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export type GroupStateListener = (name: string, state: GroupState) => void
|
|
180
|
+
|
|
181
|
+
// could just be TamaguiComponentState likely
|
|
182
|
+
type GroupState = {
|
|
183
|
+
hover?: boolean
|
|
184
|
+
press?: boolean
|
|
185
|
+
focus?: boolean
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export type DisposeFn = () => void
|
|
189
|
+
|
|
230
190
|
export type ConfigListener = (conf: TamaguiInternalConfig) => void
|
|
231
191
|
|
|
232
192
|
// to prevent things from going circular, hoisting some types in this file
|
|
@@ -360,7 +320,9 @@ export type CreateTamaguiConfig<
|
|
|
360
320
|
// parsed
|
|
361
321
|
themes: {
|
|
362
322
|
[Name in keyof B]: {
|
|
363
|
-
[Key in keyof B[Name]]:
|
|
323
|
+
[Key in keyof B[Name]]: B[Name][Key] extends Variable
|
|
324
|
+
? B[Name][Key]
|
|
325
|
+
: Variable<B[Name][Key]>
|
|
364
326
|
}
|
|
365
327
|
}
|
|
366
328
|
shorthands: C
|
|
@@ -747,8 +709,24 @@ export type ThemeMediaKeys<TK extends keyof Themes = keyof Themes> =
|
|
|
747
709
|
|
|
748
710
|
export type PlatformMediaKeys = `$platform-${AllPlatforms}`
|
|
749
711
|
|
|
712
|
+
type UndefinedPlaceholder = { __undefined: true }
|
|
713
|
+
|
|
714
|
+
export interface TypeOverride {
|
|
715
|
+
groupNames(): 1
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
export type GroupNames = ReturnType<TypeOverride['groupNames']> extends 1
|
|
719
|
+
? never
|
|
720
|
+
: ReturnType<TypeOverride['groupNames']>
|
|
721
|
+
|
|
722
|
+
type ParentMediaStates = 'hovered' | 'pressed' | 'focused'
|
|
723
|
+
|
|
724
|
+
export type GroupMediaKeys =
|
|
725
|
+
| `$group-${GroupNames}`
|
|
726
|
+
| `$group-${GroupNames}-${ParentMediaStates}`
|
|
727
|
+
|
|
750
728
|
export type MediaProps<A> = {
|
|
751
|
-
[key in MediaPropKeys | ThemeMediaKeys | PlatformMediaKeys]?: A
|
|
729
|
+
[key in MediaPropKeys | GroupMediaKeys | ThemeMediaKeys | PlatformMediaKeys]?: A
|
|
752
730
|
}
|
|
753
731
|
|
|
754
732
|
export type MediaQueries = {
|
|
@@ -1335,12 +1313,12 @@ export type GetStyleState = {
|
|
|
1335
1313
|
staticConfig: StaticConfig
|
|
1336
1314
|
theme: ThemeParsed
|
|
1337
1315
|
props: Record<string, any>
|
|
1316
|
+
context?: ComponentContextI
|
|
1338
1317
|
curProps: Record<string, any>
|
|
1339
1318
|
viewProps: Record<string, any>
|
|
1340
1319
|
styleProps: SplitStyleProps
|
|
1341
1320
|
componentState: TamaguiComponentState
|
|
1342
1321
|
conf: TamaguiInternalConfig
|
|
1343
|
-
languageContext?: FontLanguageProps
|
|
1344
1322
|
avoidMergeTransform?: boolean
|
|
1345
1323
|
fontFamily?: string
|
|
1346
1324
|
debug?: DebugProp
|
|
@@ -1764,148 +1742,6 @@ type SpaceKeys =
|
|
|
1764
1742
|
| 'bottom'
|
|
1765
1743
|
| 'shadowOffset'
|
|
1766
1744
|
|
|
1767
|
-
type CSSColorNames =
|
|
1768
|
-
| 'aliceblue'
|
|
1769
|
-
| 'antiquewhite'
|
|
1770
|
-
| 'aqua'
|
|
1771
|
-
| 'aquamarine'
|
|
1772
|
-
| 'azure'
|
|
1773
|
-
| 'beige'
|
|
1774
|
-
| 'bisque'
|
|
1775
|
-
| 'black'
|
|
1776
|
-
| 'blanchedalmond'
|
|
1777
|
-
| 'blue'
|
|
1778
|
-
| 'blueviolet'
|
|
1779
|
-
| 'brown'
|
|
1780
|
-
| 'burlywood'
|
|
1781
|
-
| 'cadetblue'
|
|
1782
|
-
| 'chartreuse'
|
|
1783
|
-
| 'chocolate'
|
|
1784
|
-
| 'coral'
|
|
1785
|
-
| 'cornflowerblue'
|
|
1786
|
-
| 'cornsilk'
|
|
1787
|
-
| 'crimson'
|
|
1788
|
-
| 'cyan'
|
|
1789
|
-
| 'darkblue'
|
|
1790
|
-
| 'darkcyan'
|
|
1791
|
-
| 'darkgoldenrod'
|
|
1792
|
-
| 'darkgray'
|
|
1793
|
-
| 'darkgreen'
|
|
1794
|
-
| 'darkkhaki'
|
|
1795
|
-
| 'darkmagenta'
|
|
1796
|
-
| 'darkolivegreen'
|
|
1797
|
-
| 'darkorange'
|
|
1798
|
-
| 'darkorchid'
|
|
1799
|
-
| 'darkred'
|
|
1800
|
-
| 'darksalmon'
|
|
1801
|
-
| 'darkseagreen'
|
|
1802
|
-
| 'darkslateblue'
|
|
1803
|
-
| 'darkslategray'
|
|
1804
|
-
| 'darkturquoise'
|
|
1805
|
-
| 'darkviolet'
|
|
1806
|
-
| 'deeppink'
|
|
1807
|
-
| 'deepskyblue'
|
|
1808
|
-
| 'dimgray'
|
|
1809
|
-
| 'dodgerblue'
|
|
1810
|
-
| 'firebrick'
|
|
1811
|
-
| 'floralwhite'
|
|
1812
|
-
| 'forestgreen'
|
|
1813
|
-
| 'fuchsia'
|
|
1814
|
-
| 'gainsboro'
|
|
1815
|
-
| 'ghostwhite'
|
|
1816
|
-
| 'gold'
|
|
1817
|
-
| 'goldenrod'
|
|
1818
|
-
| 'gray'
|
|
1819
|
-
| 'green'
|
|
1820
|
-
| 'greenyellow'
|
|
1821
|
-
| 'honeydew'
|
|
1822
|
-
| 'hotpink'
|
|
1823
|
-
| 'indianred '
|
|
1824
|
-
| 'indigo '
|
|
1825
|
-
| 'ivory'
|
|
1826
|
-
| 'khaki'
|
|
1827
|
-
| 'lavender'
|
|
1828
|
-
| 'lavenderblush'
|
|
1829
|
-
| 'lawngreen'
|
|
1830
|
-
| 'lemonchiffon'
|
|
1831
|
-
| 'lightblue'
|
|
1832
|
-
| 'lightcoral'
|
|
1833
|
-
| 'lightcyan'
|
|
1834
|
-
| 'lightgoldenrodyellow'
|
|
1835
|
-
| 'lightgrey'
|
|
1836
|
-
| 'lightgreen'
|
|
1837
|
-
| 'lightpink'
|
|
1838
|
-
| 'lightsalmon'
|
|
1839
|
-
| 'lightseagreen'
|
|
1840
|
-
| 'lightskyblue'
|
|
1841
|
-
| 'lightslategray'
|
|
1842
|
-
| 'lightsteelblue'
|
|
1843
|
-
| 'lightyellow'
|
|
1844
|
-
| 'lime'
|
|
1845
|
-
| 'limegreen'
|
|
1846
|
-
| 'linen'
|
|
1847
|
-
| 'magenta'
|
|
1848
|
-
| 'maroon'
|
|
1849
|
-
| 'mediumaquamarine'
|
|
1850
|
-
| 'mediumblue'
|
|
1851
|
-
| 'mediumorchid'
|
|
1852
|
-
| 'mediumpurple'
|
|
1853
|
-
| 'mediumseagreen'
|
|
1854
|
-
| 'mediumslateblue'
|
|
1855
|
-
| 'mediumspringgreen'
|
|
1856
|
-
| 'mediumturquoise'
|
|
1857
|
-
| 'mediumvioletred'
|
|
1858
|
-
| 'midnightblue'
|
|
1859
|
-
| 'mintcream'
|
|
1860
|
-
| 'mistyrose'
|
|
1861
|
-
| 'moccasin'
|
|
1862
|
-
| 'navajowhite'
|
|
1863
|
-
| 'navy'
|
|
1864
|
-
| 'oldlace'
|
|
1865
|
-
| 'olive'
|
|
1866
|
-
| 'olivedrab'
|
|
1867
|
-
| 'orange'
|
|
1868
|
-
| 'orangered'
|
|
1869
|
-
| 'orchid'
|
|
1870
|
-
| 'palegoldenrod'
|
|
1871
|
-
| 'palegreen'
|
|
1872
|
-
| 'paleturquoise'
|
|
1873
|
-
| 'palevioletred'
|
|
1874
|
-
| 'papayawhip'
|
|
1875
|
-
| 'peachpuff'
|
|
1876
|
-
| 'peru'
|
|
1877
|
-
| 'pink'
|
|
1878
|
-
| 'plum'
|
|
1879
|
-
| 'powderblue'
|
|
1880
|
-
| 'purple'
|
|
1881
|
-
| 'red'
|
|
1882
|
-
| 'rosybrown'
|
|
1883
|
-
| 'royalblue'
|
|
1884
|
-
| 'saddlebrown'
|
|
1885
|
-
| 'salmon'
|
|
1886
|
-
| 'sandybrown'
|
|
1887
|
-
| 'seagreen'
|
|
1888
|
-
| 'seashell'
|
|
1889
|
-
| 'sienna'
|
|
1890
|
-
| 'silver'
|
|
1891
|
-
| 'skyblue'
|
|
1892
|
-
| 'slateblue'
|
|
1893
|
-
| 'slategray'
|
|
1894
|
-
| 'snow'
|
|
1895
|
-
| 'springgreen'
|
|
1896
|
-
| 'steelblue'
|
|
1897
|
-
| 'tan'
|
|
1898
|
-
| 'teal'
|
|
1899
|
-
| 'thistle'
|
|
1900
|
-
| 'tomato'
|
|
1901
|
-
| 'turquoise'
|
|
1902
|
-
| 'violet'
|
|
1903
|
-
| 'wheat'
|
|
1904
|
-
| 'white'
|
|
1905
|
-
| 'whitesmoke'
|
|
1906
|
-
| 'yellow'
|
|
1907
|
-
| 'yellowgreen'
|
|
1908
|
-
|
|
1909
1745
|
export type TamaguiComponentState = {
|
|
1910
1746
|
hover: boolean
|
|
1911
1747
|
press: boolean
|
|
@@ -1916,6 +1752,7 @@ export type TamaguiComponentState = {
|
|
|
1916
1752
|
style?: any
|
|
1917
1753
|
avoidClasses?: boolean
|
|
1918
1754
|
}
|
|
1755
|
+
group?: Record<string, GroupState>
|
|
1919
1756
|
}
|
|
1920
1757
|
|
|
1921
1758
|
export type SplitStyleProps = {
|
|
@@ -2044,6 +1881,7 @@ export type GetStyleResult = {
|
|
|
2044
1881
|
space?: any // SpaceTokens?
|
|
2045
1882
|
hasMedia: boolean | string[]
|
|
2046
1883
|
dynamicThemeAccess?: boolean
|
|
1884
|
+
pseudoGroups?: Set<string>
|
|
2047
1885
|
}
|
|
2048
1886
|
|
|
2049
1887
|
export type ClassNamesObject = Record<string, string>
|
|
@@ -2140,25 +1978,6 @@ type FillInFontValues<
|
|
|
2140
1978
|
: any
|
|
2141
1979
|
}
|
|
2142
1980
|
|
|
2143
|
-
// gets the ref type of any type of react component
|
|
2144
|
-
export type GetRef<C> = C extends TamaguiComponent<any, infer Ref>
|
|
2145
|
-
? Ref
|
|
2146
|
-
: C extends new (props: any) => Component
|
|
2147
|
-
? InstanceType<C>
|
|
2148
|
-
: C extends abstract new (...args: any) => any
|
|
2149
|
-
? InstanceType<C>
|
|
2150
|
-
: C extends Component
|
|
2151
|
-
? C
|
|
2152
|
-
: (
|
|
2153
|
-
C extends JSXElementConstructor<{ ref?: infer R }>
|
|
2154
|
-
? R
|
|
2155
|
-
: C extends keyof JSX.IntrinsicElements
|
|
2156
|
-
? JSX.IntrinsicElements[C]['ref']
|
|
2157
|
-
: unknown
|
|
2158
|
-
) extends Ref<infer T> | string | undefined
|
|
2159
|
-
? T
|
|
2160
|
-
: unknown
|
|
2161
|
-
|
|
2162
1981
|
export type ThemesLikeObject = Record<string, Record<string, string>>
|
|
2163
1982
|
|
|
2164
1983
|
// dedupe themes to avoid duplicate CSS generation
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentContext } from '../contexts/ComponentContext'
|
|
2
2
|
import type { AnimationDriver } from '../types'
|
|
3
3
|
|
|
4
4
|
interface AnimationDriverProviderProps {
|
|
@@ -9,8 +9,8 @@ interface AnimationDriverProviderProps {
|
|
|
9
9
|
// the public provider for users
|
|
10
10
|
export const AnimationDriverProvider = (props: AnimationDriverProviderProps) => {
|
|
11
11
|
return (
|
|
12
|
-
<
|
|
12
|
+
<ComponentContext.Provider animationDriver={props.driver}>
|
|
13
13
|
{props.children}
|
|
14
|
-
</
|
|
14
|
+
</ComponentContext.Provider>
|
|
15
15
|
)
|
|
16
16
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useMemo } from 'react'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { ComponentContext } from '../contexts/ComponentContext'
|
|
4
4
|
import type { FontLanguageProps } from './FontLanguage.types'
|
|
5
5
|
|
|
6
6
|
export const FontLanguage = ({ children, ...props }: FontLanguageProps) => {
|
|
7
7
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8
|
-
const
|
|
8
|
+
const language = useMemo(() => props, [JSON.stringify(props)])
|
|
9
9
|
return (
|
|
10
|
-
<
|
|
10
|
+
<ComponentContext.Provider language={language}>{children}</ComponentContext.Provider>
|
|
11
11
|
)
|
|
12
12
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { isClient, isServer, isWeb } from '@tamagui/constants'
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import { ButtonNestingContext } from '../contexts/ButtonNestingContext'
|
|
6
|
-
import { TextAncestorContext } from '../contexts/TextAncestorContext'
|
|
4
|
+
import { ComponentContext } from '../contexts/ComponentContext'
|
|
7
5
|
import { useMediaListeners } from '../hooks/useMedia'
|
|
8
6
|
import type { TamaguiProviderProps } from '../types'
|
|
9
7
|
import { ThemeProvider } from './ThemeProvider'
|
|
@@ -39,21 +37,15 @@ export function TamaguiProvider({
|
|
|
39
37
|
}
|
|
40
38
|
|
|
41
39
|
return (
|
|
42
|
-
<
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
>
|
|
53
|
-
{children}
|
|
54
|
-
</ThemeProvider>
|
|
55
|
-
</AnimationDriverContext.Provider>
|
|
56
|
-
</TextAncestorContext.Provider>
|
|
57
|
-
</ButtonNestingContext.Provider>
|
|
40
|
+
<ComponentContext.Provider animationDriver={config.animations}>
|
|
41
|
+
<ThemeProvider
|
|
42
|
+
themeClassNameOnRoot={config.themeClassNameOnRoot}
|
|
43
|
+
disableRootThemeClass={config.disableRootThemeClass}
|
|
44
|
+
{...themePropsProvider}
|
|
45
|
+
defaultTheme={themePropsProvider.defaultTheme ?? Object.keys(config.themes)[0]}
|
|
46
|
+
>
|
|
47
|
+
{children}
|
|
48
|
+
</ThemeProvider>
|
|
49
|
+
</ComponentContext.Provider>
|
|
58
50
|
)
|
|
59
51
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type CSSColorNames = 'aliceblue' | 'antiquewhite' | 'aqua' | 'aquamarine' | 'azure' | 'beige' | 'bisque' | 'black' | 'blanchedalmond' | 'blue' | 'blueviolet' | 'brown' | 'burlywood' | 'cadetblue' | 'chartreuse' | 'chocolate' | 'coral' | 'cornflowerblue' | 'cornsilk' | 'crimson' | 'cyan' | 'darkblue' | 'darkcyan' | 'darkgoldenrod' | 'darkgray' | 'darkgreen' | 'darkkhaki' | 'darkmagenta' | 'darkolivegreen' | 'darkorange' | 'darkorchid' | 'darkred' | 'darksalmon' | 'darkseagreen' | 'darkslateblue' | 'darkslategray' | 'darkturquoise' | 'darkviolet' | 'deeppink' | 'deepskyblue' | 'dimgray' | 'dodgerblue' | 'firebrick' | 'floralwhite' | 'forestgreen' | 'fuchsia' | 'gainsboro' | 'ghostwhite' | 'gold' | 'goldenrod' | 'gray' | 'green' | 'greenyellow' | 'honeydew' | 'hotpink' | 'indianred ' | 'indigo ' | 'ivory' | 'khaki' | 'lavender' | 'lavenderblush' | 'lawngreen' | 'lemonchiffon' | 'lightblue' | 'lightcoral' | 'lightcyan' | 'lightgoldenrodyellow' | 'lightgrey' | 'lightgreen' | 'lightpink' | 'lightsalmon' | 'lightseagreen' | 'lightskyblue' | 'lightslategray' | 'lightsteelblue' | 'lightyellow' | 'lime' | 'limegreen' | 'linen' | 'magenta' | 'maroon' | 'mediumaquamarine' | 'mediumblue' | 'mediumorchid' | 'mediumpurple' | 'mediumseagreen' | 'mediumslateblue' | 'mediumspringgreen' | 'mediumturquoise' | 'mediumvioletred' | 'midnightblue' | 'mintcream' | 'mistyrose' | 'moccasin' | 'navajowhite' | 'navy' | 'oldlace' | 'olive' | 'olivedrab' | 'orange' | 'orangered' | 'orchid' | 'palegoldenrod' | 'palegreen' | 'paleturquoise' | 'palevioletred' | 'papayawhip' | 'peachpuff' | 'peru' | 'pink' | 'plum' | 'powderblue' | 'purple' | 'red' | 'rosybrown' | 'royalblue' | 'saddlebrown' | 'salmon' | 'sandybrown' | 'seagreen' | 'seashell' | 'sienna' | 'silver' | 'skyblue' | 'slateblue' | 'slategray' | 'snow' | 'springgreen' | 'steelblue' | 'tan' | 'teal' | 'thistle' | 'tomato' | 'turquoise' | 'violet' | 'wheat' | 'white' | 'whitesmoke' | 'yellow' | 'yellowgreen';
|
|
2
|
+
//# sourceMappingURL=CSSColorNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CSSColorNames.d.ts","sourceRoot":"","sources":["../src/CSSColorNames.tsx"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,cAAc,GACd,MAAM,GACN,YAAY,GACZ,OAAO,GACP,OAAO,GACP,QAAQ,GACR,OAAO,GACP,gBAAgB,GAChB,MAAM,GACN,YAAY,GACZ,OAAO,GACP,WAAW,GACX,WAAW,GACX,YAAY,GACZ,WAAW,GACX,OAAO,GACP,gBAAgB,GAChB,UAAU,GACV,SAAS,GACT,MAAM,GACN,UAAU,GACV,UAAU,GACV,eAAe,GACf,UAAU,GACV,WAAW,GACX,WAAW,GACX,aAAa,GACb,gBAAgB,GAChB,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,YAAY,GACZ,cAAc,GACd,eAAe,GACf,eAAe,GACf,eAAe,GACf,YAAY,GACZ,UAAU,GACV,aAAa,GACb,SAAS,GACT,YAAY,GACZ,WAAW,GACX,aAAa,GACb,aAAa,GACb,SAAS,GACT,WAAW,GACX,YAAY,GACZ,MAAM,GACN,WAAW,GACX,MAAM,GACN,OAAO,GACP,aAAa,GACb,UAAU,GACV,SAAS,GACT,YAAY,GACZ,UAAU,GACV,OAAO,GACP,OAAO,GACP,UAAU,GACV,eAAe,GACf,WAAW,GACX,cAAc,GACd,WAAW,GACX,YAAY,GACZ,WAAW,GACX,sBAAsB,GACtB,WAAW,GACX,YAAY,GACZ,WAAW,GACX,aAAa,GACb,eAAe,GACf,cAAc,GACd,gBAAgB,GAChB,gBAAgB,GAChB,aAAa,GACb,MAAM,GACN,WAAW,GACX,OAAO,GACP,SAAS,GACT,QAAQ,GACR,kBAAkB,GAClB,YAAY,GACZ,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,iBAAiB,GACjB,cAAc,GACd,WAAW,GACX,WAAW,GACX,UAAU,GACV,aAAa,GACb,MAAM,GACN,SAAS,GACT,OAAO,GACP,WAAW,GACX,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,eAAe,GACf,WAAW,GACX,eAAe,GACf,eAAe,GACf,YAAY,GACZ,WAAW,GACX,MAAM,GACN,MAAM,GACN,MAAM,GACN,YAAY,GACZ,QAAQ,GACR,KAAK,GACL,WAAW,GACX,WAAW,GACX,aAAa,GACb,QAAQ,GACR,YAAY,GACZ,UAAU,GACV,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,WAAW,GACX,WAAW,GACX,MAAM,GACN,aAAa,GACb,WAAW,GACX,KAAK,GACL,MAAM,GACN,SAAS,GACT,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,OAAO,GACP,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,aAAa,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Component, JSXElementConstructor, Ref } from 'react'
|
|
2
|
+
|
|
3
|
+
import { TamaguiComponent } from '../types'
|
|
4
|
+
export type GetRef<C> = C extends TamaguiComponent<any, infer Ref>
|
|
5
|
+
? Ref
|
|
6
|
+
: C extends new (props: any) => Component
|
|
7
|
+
? InstanceType<C>
|
|
8
|
+
: C extends abstract new (...args: any) => any
|
|
9
|
+
? InstanceType<C>
|
|
10
|
+
: C extends Component
|
|
11
|
+
? C
|
|
12
|
+
: (
|
|
13
|
+
C extends JSXElementConstructor<{
|
|
14
|
+
ref?: infer R
|
|
15
|
+
}>
|
|
16
|
+
? R
|
|
17
|
+
: C extends keyof JSX.IntrinsicElements
|
|
18
|
+
? JSX.IntrinsicElements[C]['ref']
|
|
19
|
+
: unknown
|
|
20
|
+
) extends Ref<infer T> | string | undefined
|
|
21
|
+
? T
|
|
22
|
+
: unknown
|
|
23
|
+
//# sourceMappingURL=GetRef.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetRef.d.ts","sourceRoot":"","sources":["../src/GetRef.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAI1C,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAC9D,GAAG,GACH,CAAC,SAAS,KAAK,KAAK,EAAE,GAAG,KAAK,SAAS,GACvC,YAAY,CAAC,CAAC,CAAC,GACf,CAAC,SAAS,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,GAC5C,YAAY,CAAC,CAAC,CAAC,GACf,CAAC,SAAS,SAAS,GACnB,CAAC,GACD,CACE,CAAC,SAAS,qBAAqB,CAAC;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC,GAC9C,CAAC,GACD,CAAC,SAAS,MAAM,GAAG,CAAC,iBAAiB,GACrC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAC/B,OAAO,CACZ,SAAS,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,GAAG,SAAS,GAC3C,CAAC,GACD,OAAO,CAAA"}
|
package/types/Role.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type Role = 'alert' | 'alertdialog' | 'application' | 'article' | 'banner' | 'button' | 'cell' | 'checkbox' | 'columnheader' | 'combobox' | 'complementary' | 'contentinfo' | 'definition' | 'dialog' | 'directory' | 'document' | 'feed' | 'figure' | 'form' | 'grid' | 'group' | 'heading' | 'img' | 'link' | 'list' | 'listitem' | 'log' | 'main' | 'marquee' | 'math' | 'menu' | 'menubar' | 'menuitem' | 'meter' | 'navigation' | 'none' | 'note' | 'option' | 'presentation' | 'progressbar' | 'radio' | 'radiogroup' | 'region' | 'row' | 'rowgroup' | 'rowheader' | 'scrollbar' | 'searchbox' | 'separator' | 'slider' | 'spinbutton' | 'status' | 'summary' | 'switch' | 'tab' | 'table' | 'tablist' | 'tabpanel' | 'term' | 'timer' | 'toolbar' | 'tooltip' | 'tree' | 'treegrid' | 'treeitem';
|
|
2
|
+
//# sourceMappingURL=Role.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Role.d.ts","sourceRoot":"","sources":["../src/Role.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,IAAI,GACZ,OAAO,GACP,aAAa,GACb,aAAa,GACb,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,UAAU,GACV,cAAc,GACd,UAAU,GACV,eAAe,GACf,aAAa,GACb,YAAY,GACZ,QAAQ,GACR,WAAW,GACX,UAAU,GACV,MAAM,GACN,QAAQ,GACR,MAAM,GACN,MAAM,GACN,OAAO,GACP,SAAS,GACT,KAAK,GACL,MAAM,GACN,MAAM,GACN,UAAU,GACV,KAAK,GACL,MAAM,GACN,SAAS,GACT,MAAM,GACN,MAAM,GACN,SAAS,GACT,UAAU,GACV,OAAO,GACP,YAAY,GACZ,MAAM,GACN,MAAM,GACN,QAAQ,GACR,cAAc,GACd,aAAa,GACb,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,KAAK,GACL,UAAU,GACV,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,MAAM,GACN,OAAO,GACP,SAAS,GACT,SAAS,GACT,MAAM,GACN,UAAU,GACV,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentContext.d.ts","sourceRoot":"","sources":["../../src/contexts/ComponentContext.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAsB,MAAM,UAAU,CAAA;AAIhE,eAAO,MAAM,gBAAgB,2EAgB3B,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DebugProp, SpaceDirection, SpaceValue, SpacerProps, StaticConfig, TamaguiComponent, TamaguiComponentState, TamaguiElement } from './types';
|
|
2
|
+
import { DebugProp, SpaceDirection, SpaceValue, SpacerProps, StackProps, StaticConfig, TamaguiComponent, TamaguiComponentState, TamaguiElement, TextProps } from './types';
|
|
3
3
|
export declare const defaultComponentState: TamaguiComponentState;
|
|
4
4
|
export declare const mouseUps: Set<Function>;
|
|
5
|
-
export declare function createComponent<ComponentPropTypes extends
|
|
5
|
+
export declare function createComponent<ComponentPropTypes extends StackProps | TextProps = {}, Ref = TamaguiElement, BaseProps = never>(staticConfig: StaticConfig): TamaguiComponent<ComponentPropTypes, Ref, BaseProps, {}>;
|
|
6
6
|
export declare function Unspaced(props: {
|
|
7
7
|
children?: any;
|
|
8
8
|
}): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAaN,MAAM,OAAO,CAAA;AAcd,OAAO,EACL,SAAS,EAGT,cAAc,EACd,UAAU,EACV,WAAW,EACX,UAAU,EACV,YAAY,EACZ,gBAAgB,EAEhB,qBAAqB,EACrB,cAAc,EAEd,SAAS,EAGV,MAAM,SAAS,CAAA;AAQhB,eAAO,MAAM,qBAAqB,EAAE,qBAMnC,CAAA;AAoBD,eAAO,MAAM,QAAQ,eAAsB,CAAA;AAmB3C,wBAAgB,eAAe,CAC7B,kBAAkB,SAAS,UAAU,GAAG,SAAS,GAAG,EAAE,EACtD,GAAG,GAAG,cAAc,EACpB,SAAS,GAAG,KAAK,EACjB,YAAY,EAAE,YAAY,4DA++B3B;AAGD,wBAAgB,QAAQ,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE,OAEjD;AAMD,eAAO,MAAM,MAAM,0DA8CjB,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,CAAA;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,CAAA;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,mBAkGxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTamagui.d.ts","sourceRoot":"","sources":["../src/createTamagui.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,kBAAkB,EAIlB,kBAAkB,EAMnB,MAAM,SAAS,CAAA;AAKhB,wBAAgB,aAAa,CAAC,IAAI,SAAS,kBAAkB,EAC3D,QAAQ,EAAE,IAAI,GACb,kBAAkB,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"createTamagui.d.ts","sourceRoot":"","sources":["../src/createTamagui.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,kBAAkB,EAIlB,kBAAkB,EAMnB,MAAM,SAAS,CAAA;AAKhB,wBAAgB,aAAa,CAAC,IAAI,SAAS,kBAAkB,EAC3D,QAAQ,EAAE,IAAI,GACb,kBAAkB,CAAC,IAAI,CAAC,CA2Q1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMediaStyle.d.ts","sourceRoot":"","sources":["../../src/helpers/createMediaStyle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAI3E,eAAO,MAAM,SAAS,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"createMediaStyle.d.ts","sourceRoot":"","sources":["../../src/helpers/createMediaStyle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAI3E,eAAO,MAAM,SAAS,MAAM,CAAA;AAW5B,eAAO,MAAM,gBAAgB,oCACM,WAAW,YAClC,MAAM,gBACF,YAAY,WACjB,OAAO,aACL,MAAM,KAChB,gBAuFF,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TamaguiComponentState } from '../types';
|
|
3
|
+
export declare function createShallowSetState<State extends TamaguiComponentState>(setter: React.Dispatch<React.SetStateAction<State>>): (next: Partial<State>) => void;
|
|
4
|
+
//# sourceMappingURL=createShallowSetState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createShallowSetState.d.ts","sourceRoot":"","sources":["../../src/helpers/createShallowSetState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAEhD,wBAAgB,qBAAqB,CAAC,KAAK,SAAS,qBAAqB,EACvE,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,UAErC,QAAQ,KAAK,CAAC,UAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createStyledContext.d.ts","sourceRoot":"","sources":["../../src/helpers/createStyledContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAA;AAIjE,MAAM,MAAM,aAAa,CAAC,KAAK,SAAS,MAAM,GAAG,GAAG,IAAI,IAAI,CAC1D,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EACpB,UAAU,CACX,GAAG;IACF,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,KAAK,CAAC,uBAAuB,CACrC,OAAO,CAAC,KAAK,CAAC,GAAG;QACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;KAC3B,CACF,CAAA;CACF,CAAA;AAED,wBAAgB,mBAAmB,CAAC,YAAY,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1E,KAAK,EAAE,YAAY,GAClB,aAAa,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"createStyledContext.d.ts","sourceRoot":"","sources":["../../src/helpers/createStyledContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAA;AAIjE,MAAM,MAAM,aAAa,CAAC,KAAK,SAAS,MAAM,GAAG,GAAG,IAAI,IAAI,CAC1D,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EACpB,UAAU,CACX,GAAG;IACF,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,KAAK,CAAC,uBAAuB,CACrC,OAAO,CAAC,KAAK,CAAC,GAAG;QACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;KAC3B,CACF,CAAA;CACF,CAAA;AAED,wBAAgB,mBAAmB,CAAC,YAAY,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1E,KAAK,EAAE,YAAY,GAClB,aAAa,CAAC,YAAY,CAAC,CAwB7B"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { DebugProp, GetStyleResult, GetStyleState, SplitStyleProps, StaticConfig, TamaguiComponentState, TextStyleProps, ThemeParsed } from '../types';
|
|
2
|
-
import type { LanguageContextType } from '../views/FontLanguage.types';
|
|
1
|
+
import type { ComponentContextI, DebugProp, GetStyleResult, GetStyleState, SplitStyleProps, StaticConfig, TamaguiComponentState, TextStyleProps, ThemeParsed } from '../types';
|
|
3
2
|
export type SplitStyles = ReturnType<typeof getSplitStyles>;
|
|
4
3
|
export type SplitStyleResult = ReturnType<typeof getSplitStyles>;
|
|
5
4
|
type StyleSplitter = (props: {
|
|
6
5
|
[key: string]: any;
|
|
7
|
-
}, staticConfig: StaticConfig, theme: ThemeParsed, themeName: string, componentState: TamaguiComponentState, styleProps: SplitStyleProps, parentSplitStyles?: GetStyleResult | null,
|
|
6
|
+
}, staticConfig: StaticConfig, theme: ThemeParsed, themeName: string, componentState: TamaguiComponentState, styleProps: SplitStyleProps, parentSplitStyles?: GetStyleResult | null, context?: ComponentContextI, elementType?: string, debug?: DebugProp) => GetStyleResult;
|
|
8
7
|
export declare const PROP_SPLIT = "-";
|
|
9
8
|
export declare const getSplitStyles: StyleSplitter;
|
|
10
9
|
export declare const getSubStyle: (styleState: GetStyleState, subKey: string, styleIn: Object, avoidMergeTransform?: boolean) => TextStyleProps;
|