@tamagui/types 3.0.0-beta.655.1 → 3.0.0-beta.669.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/package.json +1 -1
- package/types.d.ts +187 -172
- package/types.ts +13 -0
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,180 +1,195 @@
|
|
|
1
1
|
export interface TamaguiBuildOptions {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
2
|
+
/** Project root used to resolve compiler config and component modules. */
|
|
3
|
+
root?: string
|
|
4
|
+
/**
|
|
5
|
+
* module paths you want to compile with tamagui (for example ['tamagui'])
|
|
6
|
+
* */
|
|
7
|
+
components?: string[]
|
|
8
|
+
/**
|
|
9
|
+
* Dangerous escape hatch for runtime-only modules that the compiler should
|
|
10
|
+
* not evaluate while loading the Tamagui config and configured components.
|
|
11
|
+
*
|
|
12
|
+
* Ignored modules receive an empty object during static evaluation, which
|
|
13
|
+
* weakens the compiler's correctness check. Only add a module when its
|
|
14
|
+
* exports are not used to create the config or components.
|
|
15
|
+
*/
|
|
16
|
+
dangerouslyIgnoreStaticEvaluationModules?: string[]
|
|
17
|
+
/**
|
|
18
|
+
* relative path to your tamagui.config.ts
|
|
19
|
+
*/
|
|
20
|
+
config?: string
|
|
21
|
+
/**
|
|
22
|
+
* Use the new ThemeBuilder in `@tamagui/create-theme` to create beautiful theme sets,
|
|
23
|
+
* see docs at https://tamagui.dev/docs/guides/theme-builder
|
|
24
|
+
* This helps you automate generating the build themes typescript file which loads fastere
|
|
25
|
+
* and has smaller bundle size.
|
|
26
|
+
*/
|
|
27
|
+
themeBuilder?: {
|
|
28
|
+
input: string
|
|
29
|
+
output: string
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Emit design system related CSS during build step for usage with frameworks
|
|
33
|
+
*/
|
|
34
|
+
outputCSS?: string | null | false
|
|
35
|
+
/**
|
|
36
|
+
* (Experimental) outputs themes using CSS Nesting https://caniuse.com/css-nesting
|
|
37
|
+
* Which can cut them in half due to no media query duplication.
|
|
38
|
+
*/
|
|
39
|
+
useCSSNesting?: boolean
|
|
40
|
+
/**
|
|
41
|
+
* Tamagui can follow imports and evaluate them when parsing styles, leading to
|
|
42
|
+
* higher percent of flattened / optimized views. We normalize this to be the
|
|
43
|
+
* full path of the file, always ending in ".js".
|
|
44
|
+
*
|
|
45
|
+
* So to have Tamagui partially evaluate "app/src/constants.tsx" you can put
|
|
46
|
+
* ["app/src/constants.js"].
|
|
47
|
+
*/
|
|
48
|
+
importsWhitelist?: string[]
|
|
49
|
+
/**
|
|
50
|
+
* Whitelist file extensions to evaluate
|
|
51
|
+
*
|
|
52
|
+
* @default ['.tsx', '.jsx']
|
|
53
|
+
*/
|
|
54
|
+
includeExtensions?: string[]
|
|
55
|
+
/**
|
|
56
|
+
* Web-only. Allows you to trim the bundle size of react-native-web.
|
|
57
|
+
* Pass in values like ['Switch', 'Modal'].
|
|
58
|
+
*/
|
|
59
|
+
excludeReactNativeWebExports?: string[]
|
|
60
|
+
/**
|
|
61
|
+
* Enable logging the time it takes to extract.
|
|
62
|
+
*
|
|
63
|
+
* @default true
|
|
64
|
+
*/
|
|
65
|
+
logTimings?: boolean
|
|
66
|
+
/**
|
|
67
|
+
* Custom prefix for the timing logs
|
|
68
|
+
*/
|
|
69
|
+
prefixLogs?: string
|
|
70
|
+
/**
|
|
71
|
+
* (Advanced) Enables Tamagui to try and evaluate components outside the `components` option.
|
|
72
|
+
* When true, Tamagui will bundle and load components as its running across every file,
|
|
73
|
+
* if it loads them successfully it will perform all optimiziations inline.
|
|
74
|
+
*/
|
|
75
|
+
enableDynamicEvaluation?: boolean
|
|
76
|
+
/**
|
|
77
|
+
* Completely disable tamagui for these files
|
|
78
|
+
*/
|
|
79
|
+
disable?: boolean | string[]
|
|
80
|
+
/**
|
|
81
|
+
* Disable just optimization for these files, but enable helpful debug attributes.
|
|
82
|
+
*/
|
|
83
|
+
disableExtraction?: boolean | string[]
|
|
84
|
+
/**
|
|
85
|
+
* Disable partial extraction (extracting static style props into CSS beside
|
|
86
|
+
* retained runtime props on the same element). Elements with dynamic style
|
|
87
|
+
* props stay fully on the runtime path instead.
|
|
88
|
+
*/
|
|
89
|
+
disablePartialExtraction?: boolean
|
|
90
|
+
/**
|
|
91
|
+
* Disable just the addition of data- attributes that are added in dev mode to help
|
|
92
|
+
* tie DOM to your filename/component-name.
|
|
93
|
+
*/
|
|
94
|
+
disableDebugAttr?: boolean
|
|
95
|
+
/**
|
|
96
|
+
* (Advanced) Disable evaluation of useMedia() hook
|
|
97
|
+
*/
|
|
98
|
+
disableExtractInlineMedia?: boolean
|
|
99
|
+
/**
|
|
100
|
+
* (Advanced) Disable just view flattening.
|
|
101
|
+
*/
|
|
102
|
+
disableFlattening?: boolean
|
|
103
|
+
/**
|
|
104
|
+
* (Advanced) Disable extracting to theme variables.
|
|
105
|
+
*/
|
|
106
|
+
disableExtractVariables?: boolean | 'theme'
|
|
107
|
+
/**
|
|
108
|
+
* (Advanced) Disables the initial build and attempts to load from the .tamagui directory
|
|
109
|
+
*/
|
|
110
|
+
disableInitialBuild?: boolean
|
|
111
|
+
/**
|
|
112
|
+
* If you have a tamagui.build.ts file that describes your compiler setup, you can set it here
|
|
113
|
+
*/
|
|
114
|
+
buildFile?: string
|
|
115
|
+
evaluateVars?: boolean
|
|
116
|
+
cssPath?: string
|
|
117
|
+
cssData?: any
|
|
118
|
+
deoptProps?: Set<string>
|
|
119
|
+
excludeProps?: Set<string>
|
|
120
|
+
inlineProps?: Set<string>
|
|
121
|
+
/**
|
|
122
|
+
* Use react-native-web-lite for better tree shaking on web.
|
|
123
|
+
* Set to 'without-animated' to exclude animated components.
|
|
124
|
+
*/
|
|
125
|
+
useReactNativeWebLite?: boolean | 'without-animated'
|
|
126
|
+
disableWatchTamaguiConfig?: boolean
|
|
127
|
+
experimental?: {
|
|
128
|
+
/**
|
|
129
|
+
* Web runtime capabilities that can be removed from the bundle when the
|
|
130
|
+
* application does not use them. Omitted fields stay enabled.
|
|
131
|
+
*/
|
|
132
|
+
webRuntimeFeatures?: {
|
|
133
|
+
/** Inline theme-key props and createTamagui({ variables }). */
|
|
134
|
+
inlineThemeValues?: boolean
|
|
135
|
+
/** Runtime parsing of flat style and variant modifier strings. */
|
|
136
|
+
styleValueGrammar?: boolean
|
|
137
|
+
/** Safe-area style values and subscriptions. */
|
|
138
|
+
safeArea?: boolean
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Emit native flattened views with theme-token mappings for the experimental
|
|
142
|
+
* native style engine. Web output is unaffected.
|
|
143
|
+
*/
|
|
144
|
+
nativeFastPath?: boolean
|
|
145
|
+
/**
|
|
146
|
+
* (Experimental, web only) Build a zero-runtime web entry graph.
|
|
62
147
|
*
|
|
63
|
-
*
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
*
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Completely disable tamagui for these files
|
|
78
|
-
*/
|
|
79
|
-
disable?: boolean | string[];
|
|
80
|
-
/**
|
|
81
|
-
* Disable just optimization for these files, but enable helpful debug attributes.
|
|
82
|
-
*/
|
|
83
|
-
disableExtraction?: boolean | string[];
|
|
84
|
-
/**
|
|
85
|
-
* Disable partial extraction (extracting static style props into CSS beside
|
|
86
|
-
* retained runtime props on the same element). Elements with dynamic style
|
|
87
|
-
* props stay fully on the runtime path instead.
|
|
88
|
-
*/
|
|
89
|
-
disablePartialExtraction?: boolean;
|
|
90
|
-
/**
|
|
91
|
-
* Disable just the addition of data- attributes that are added in dev mode to help
|
|
92
|
-
* tie DOM to your filename/component-name.
|
|
93
|
-
*/
|
|
94
|
-
disableDebugAttr?: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* (Advanced) Disable evaluation of useMedia() hook
|
|
97
|
-
*/
|
|
98
|
-
disableExtractInlineMedia?: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* (Advanced) Disable just view flattening.
|
|
101
|
-
*/
|
|
102
|
-
disableFlattening?: boolean;
|
|
103
|
-
/**
|
|
104
|
-
* (Advanced) Disable extracting to theme variables.
|
|
105
|
-
*/
|
|
106
|
-
disableExtractVariables?: boolean | 'theme';
|
|
107
|
-
/**
|
|
108
|
-
* (Advanced) Disables the initial build and attempts to load from the .tamagui directory
|
|
109
|
-
*/
|
|
110
|
-
disableInitialBuild?: boolean;
|
|
111
|
-
/**
|
|
112
|
-
* If you have a tamagui.build.ts file that describes your compiler setup, you can set it here
|
|
113
|
-
*/
|
|
114
|
-
buildFile?: string;
|
|
115
|
-
evaluateVars?: boolean;
|
|
116
|
-
cssPath?: string;
|
|
117
|
-
cssData?: any;
|
|
118
|
-
deoptProps?: Set<string>;
|
|
119
|
-
excludeProps?: Set<string>;
|
|
120
|
-
inlineProps?: Set<string>;
|
|
121
|
-
/**
|
|
122
|
-
* Use react-native-web-lite for better tree shaking on web.
|
|
123
|
-
* Set to 'without-animated' to exclude animated components.
|
|
124
|
-
*/
|
|
125
|
-
useReactNativeWebLite?: boolean | 'without-animated';
|
|
126
|
-
disableWatchTamaguiConfig?: boolean;
|
|
127
|
-
experimental?: {
|
|
128
|
-
/**
|
|
129
|
-
* Emit native flattened views with theme-token mappings for the experimental
|
|
130
|
-
* native style engine. Web output is unaffected.
|
|
131
|
-
*/
|
|
132
|
-
nativeFastPath?: boolean;
|
|
133
|
-
/**
|
|
134
|
-
* (Experimental, web only) Build a zero-runtime web entry graph.
|
|
135
|
-
*
|
|
136
|
-
* - `'report'` runs every zero analysis and writes the report, but keeps the
|
|
137
|
-
* full runtime and exits successfully.
|
|
138
|
-
* - `true` enforces the contract and builds one zero-runtime entry graph.
|
|
139
|
-
* - `{ islands }` also treats each listed module glob as the root of a
|
|
140
|
-
* separately compiled full-runtime entry.
|
|
141
|
-
*/
|
|
142
|
-
zeroRuntime?: true | 'report' | {
|
|
143
|
-
islands: string[];
|
|
144
|
-
};
|
|
145
|
-
};
|
|
148
|
+
* - `'report'` runs every zero analysis and writes the report, but keeps the
|
|
149
|
+
* full runtime and exits successfully.
|
|
150
|
+
* - `true` enforces the contract and builds one zero-runtime entry graph.
|
|
151
|
+
* - `{ islands }` also treats each listed module glob as the root of a
|
|
152
|
+
* separately compiled full-runtime entry.
|
|
153
|
+
*/
|
|
154
|
+
zeroRuntime?:
|
|
155
|
+
| true
|
|
156
|
+
| 'report'
|
|
157
|
+
| {
|
|
158
|
+
islands: string[]
|
|
159
|
+
}
|
|
160
|
+
}
|
|
146
161
|
}
|
|
147
162
|
export interface TamaguiOptions extends TamaguiBuildOptions {
|
|
148
|
-
|
|
163
|
+
platform?: 'native' | 'web'
|
|
149
164
|
}
|
|
150
165
|
export type CLIUserOptions = {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
166
|
+
root?: string
|
|
167
|
+
host?: string
|
|
168
|
+
tsconfigPath?: string
|
|
169
|
+
tamaguiOptions: Partial<TamaguiOptions>
|
|
170
|
+
debug?: boolean | 'verbose'
|
|
171
|
+
loadTamaguiOptions?: boolean
|
|
172
|
+
}
|
|
158
173
|
export type CLIResolvedOptions = {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
174
|
+
root: string
|
|
175
|
+
port?: number
|
|
176
|
+
host?: string
|
|
177
|
+
mode: 'development' | 'production'
|
|
178
|
+
debug?: CLIUserOptions['debug']
|
|
179
|
+
tsconfigPath: string
|
|
180
|
+
tamaguiOptions: TamaguiOptions
|
|
181
|
+
pkgJson: {
|
|
182
|
+
name?: string
|
|
183
|
+
main?: string
|
|
184
|
+
module?: string
|
|
185
|
+
source?: string
|
|
186
|
+
exports?: Record<string, Record<string, string>>
|
|
187
|
+
}
|
|
188
|
+
paths: {
|
|
189
|
+
root: string
|
|
190
|
+
dotDir: string
|
|
191
|
+
conf: string
|
|
192
|
+
types: string
|
|
193
|
+
}
|
|
194
|
+
}
|
|
180
195
|
//# sourceMappingURL=types.d.ts.map
|
package/types.ts
CHANGED
|
@@ -150,6 +150,19 @@ export interface TamaguiBuildOptions {
|
|
|
150
150
|
disableWatchTamaguiConfig?: boolean
|
|
151
151
|
|
|
152
152
|
experimental?: {
|
|
153
|
+
/**
|
|
154
|
+
* Web runtime capabilities that can be removed from the bundle when the
|
|
155
|
+
* application does not use them. Omitted fields stay enabled.
|
|
156
|
+
*/
|
|
157
|
+
webRuntimeFeatures?: {
|
|
158
|
+
/** Inline theme-key props and createTamagui({ variables }). */
|
|
159
|
+
inlineThemeValues?: boolean
|
|
160
|
+
/** Runtime parsing of flat style and variant modifier strings. */
|
|
161
|
+
styleValueGrammar?: boolean
|
|
162
|
+
/** Safe-area style values and subscriptions. */
|
|
163
|
+
safeArea?: boolean
|
|
164
|
+
}
|
|
165
|
+
|
|
153
166
|
/**
|
|
154
167
|
* Emit native flattened views with theme-token mappings for the experimental
|
|
155
168
|
* native style engine. Web output is unaffected.
|