@tamagui/types 2.7.7 → 3.0.0-beta.643.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 +4 -3
- package/types.d.ts +180 -0
- package/types.ts +38 -4
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.643.1",
|
|
4
4
|
"files": [
|
|
5
|
-
"types.ts"
|
|
5
|
+
"types.ts",
|
|
6
|
+
"types.d.ts"
|
|
6
7
|
],
|
|
7
8
|
"type": "module",
|
|
8
9
|
"sideEffects": false,
|
|
9
|
-
"types": "./types.ts",
|
|
10
|
+
"types": "./types.d.ts",
|
|
10
11
|
"exports": {
|
|
11
12
|
".": {
|
|
12
13
|
"types": "./types.ts"
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
export interface TamaguiBuildOptions {
|
|
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
|
+
* 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
|
+
};
|
|
146
|
+
}
|
|
147
|
+
export interface TamaguiOptions extends TamaguiBuildOptions {
|
|
148
|
+
platform?: 'native' | 'web';
|
|
149
|
+
}
|
|
150
|
+
export type CLIUserOptions = {
|
|
151
|
+
root?: string;
|
|
152
|
+
host?: string;
|
|
153
|
+
tsconfigPath?: string;
|
|
154
|
+
tamaguiOptions: Partial<TamaguiOptions>;
|
|
155
|
+
debug?: boolean | 'verbose';
|
|
156
|
+
loadTamaguiOptions?: boolean;
|
|
157
|
+
};
|
|
158
|
+
export type CLIResolvedOptions = {
|
|
159
|
+
root: string;
|
|
160
|
+
port?: number;
|
|
161
|
+
host?: string;
|
|
162
|
+
mode: 'development' | 'production';
|
|
163
|
+
debug?: CLIUserOptions['debug'];
|
|
164
|
+
tsconfigPath: string;
|
|
165
|
+
tamaguiOptions: TamaguiOptions;
|
|
166
|
+
pkgJson: {
|
|
167
|
+
name?: string;
|
|
168
|
+
main?: string;
|
|
169
|
+
module?: string;
|
|
170
|
+
source?: string;
|
|
171
|
+
exports?: Record<string, Record<string, string>>;
|
|
172
|
+
};
|
|
173
|
+
paths: {
|
|
174
|
+
root: string;
|
|
175
|
+
dotDir: string;
|
|
176
|
+
conf: string;
|
|
177
|
+
types: string;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
//# sourceMappingURL=types.d.ts.map
|
package/types.ts
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
export interface TamaguiBuildOptions {
|
|
2
|
+
/** Project root used to resolve compiler config and component modules. */
|
|
3
|
+
root?: string
|
|
4
|
+
|
|
2
5
|
/**
|
|
3
6
|
* module paths you want to compile with tamagui (for example ['tamagui'])
|
|
4
7
|
* */
|
|
5
8
|
components?: string[]
|
|
6
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Dangerous escape hatch for runtime-only modules that the compiler should
|
|
12
|
+
* not evaluate while loading the Tamagui config and configured components.
|
|
13
|
+
*
|
|
14
|
+
* Ignored modules receive an empty object during static evaluation, which
|
|
15
|
+
* weakens the compiler's correctness check. Only add a module when its
|
|
16
|
+
* exports are not used to create the config or components.
|
|
17
|
+
*/
|
|
18
|
+
dangerouslyIgnoreStaticEvaluationModules?: string[]
|
|
19
|
+
|
|
7
20
|
/**
|
|
8
21
|
* relative path to your tamagui.config.ts
|
|
9
22
|
*/
|
|
@@ -83,6 +96,13 @@ export interface TamaguiBuildOptions {
|
|
|
83
96
|
*/
|
|
84
97
|
disableExtraction?: boolean | string[]
|
|
85
98
|
|
|
99
|
+
/**
|
|
100
|
+
* Disable partial extraction (extracting static style props into CSS beside
|
|
101
|
+
* retained runtime props on the same element). Elements with dynamic style
|
|
102
|
+
* props stay fully on the runtime path instead.
|
|
103
|
+
*/
|
|
104
|
+
disablePartialExtraction?: boolean
|
|
105
|
+
|
|
86
106
|
/**
|
|
87
107
|
* Disable just the addition of data- attributes that are added in dev mode to help
|
|
88
108
|
* tie DOM to your filename/component-name.
|
|
@@ -129,10 +149,24 @@ export interface TamaguiBuildOptions {
|
|
|
129
149
|
useReactNativeWebLite?: boolean | 'without-animated'
|
|
130
150
|
disableWatchTamaguiConfig?: boolean
|
|
131
151
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
152
|
+
experimental?: {
|
|
153
|
+
/**
|
|
154
|
+
* Emit native flattened views with theme-token mappings for the experimental
|
|
155
|
+
* native style engine. Web output is unaffected.
|
|
156
|
+
*/
|
|
157
|
+
nativeFastPath?: boolean
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* (Experimental, web only) Build a zero-runtime web entry graph.
|
|
161
|
+
*
|
|
162
|
+
* - `'report'` runs every zero analysis and writes the report, but keeps the
|
|
163
|
+
* full runtime and exits successfully.
|
|
164
|
+
* - `true` enforces the contract and builds one zero-runtime entry graph.
|
|
165
|
+
* - `{ islands }` also treats each listed module glob as the root of a
|
|
166
|
+
* separately compiled full-runtime entry.
|
|
167
|
+
*/
|
|
168
|
+
zeroRuntime?: true | 'report' | { islands: string[] }
|
|
169
|
+
}
|
|
136
170
|
}
|
|
137
171
|
|
|
138
172
|
export interface TamaguiOptions extends TamaguiBuildOptions {
|