@tamagui/types 1.89.0-1706483140977 → 1.89.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types.d.ts +30 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/types",
3
- "version": "1.89.0-1706483140977",
3
+ "version": "1.89.0",
4
4
  "types": "./types.d.ts",
5
5
  "files": [
6
6
  "types.d.ts"
package/types.d.ts CHANGED
@@ -1,19 +1,19 @@
1
- export interface TamaguiOptions {
2
- platform: 'native' | 'web'
3
-
1
+ export interface TamaguiBuildOptions {
4
2
  /**
5
3
  * module paths you want to compile with tamagui (for example ['tamagui'])
6
4
  * */
7
5
  components: string[]
8
6
 
9
7
  /**
10
- * your tamagui.config.ts
8
+ * relative path to your tamagui.config.ts
11
9
  */
12
10
  config?: string
13
11
 
14
12
  /**
15
13
  * Use the new ThemeBuilder in `@tamagui/create-theme` to create beautiful theme sets,
16
14
  * see docs at https://tamagui.dev/docs/guides/theme-builder
15
+ * This helps you automate generating the build themes typescript file which loads fastere
16
+ * and has smaller bundle size.
17
17
  */
18
18
  themeBuilder?: {
19
19
  input: string
@@ -25,6 +25,12 @@ export interface TamaguiOptions {
25
25
  */
26
26
  outputCSS?: string | null | false
27
27
 
28
+ /**
29
+ * (Experimental) outputs themes using CSS Nesting https://caniuse.com/css-nesting
30
+ * Which can cut them in half due to no media query duplication.
31
+ */
32
+ useCSSNesting?: boolean
33
+
28
34
  /**
29
35
  * Tamagui can follow imports and evaluate them when parsing styles, leading to
30
36
  * higher percent of flattened / optimized views. We normalize this to be the
@@ -34,23 +40,27 @@ export interface TamaguiOptions {
34
40
  * ["app/src/constants.js"].
35
41
  */
36
42
  importsWhitelist?: string[]
43
+
37
44
  /**
38
45
  * Whitelist file extensions to evaluate
39
46
  *
40
47
  * @default ['.tsx', '.jsx']
41
48
  */
42
49
  includeExtensions?: string[]
50
+
43
51
  /**
44
52
  * Web-only. Allows you to trim the bundle size of react-native-web.
45
53
  * Pass in values like ['Switch', 'Modal'].
46
54
  */
47
55
  excludeReactNativeWebExports?: string[]
56
+
48
57
  /**
49
58
  * Enable logging the time it takes to extract.
50
59
  *
51
60
  * @default true
52
61
  */
53
62
  logTimings?: boolean
63
+
54
64
  /**
55
65
  * Custom prefix for the timing logs
56
66
  */
@@ -67,23 +77,29 @@ export interface TamaguiOptions {
67
77
  * Completely disable tamagui for these files
68
78
  */
69
79
  disable?: boolean | string[]
80
+
70
81
  /**
71
82
  * Disable just optimization for these files, but enable helpful debug attributes.
72
83
  */
73
84
  disableExtraction?: boolean | string[]
85
+
74
86
  /**
75
87
  * Disable just the addition of data- attributes that are added in dev mode to help
76
88
  * tie DOM to your filename/component-name.
77
89
  */
90
+
78
91
  disableDebugAttr?: boolean
92
+
79
93
  /**
80
94
  * (Advanced) Disable evaluation of useMedia() hook
81
95
  */
82
96
  disableExtractInlineMedia?: boolean
97
+
83
98
  /**
84
99
  * (Advanced) Disable just view flattening.
85
100
  */
86
101
  disableFlattening?: boolean
102
+
87
103
  /**
88
104
  * (Advanced) Disable extracting to theme variables.
89
105
  */
@@ -99,6 +115,11 @@ export interface TamaguiOptions {
99
115
  */
100
116
  disableMinifyCSS?: boolean
101
117
 
118
+ /**
119
+ * If you have a tamagui.build.ts file that describes your compiler setup, you can set it here
120
+ */
121
+ buildFile?: string
122
+
102
123
  evaluateVars?: boolean
103
124
  cssPath?: string
104
125
  cssData?: any
@@ -117,6 +138,10 @@ export interface TamaguiOptions {
117
138
  emitSingleCSSFile?: boolean
118
139
  }
119
140
 
141
+ export interface TamaguiOptions extends TamaguiBuildOptions {
142
+ platform: 'native' | 'web'
143
+ }
144
+
120
145
  // for cli
121
146
 
122
147
  export type CLIUserOptions = {
@@ -125,6 +150,7 @@ export type CLIUserOptions = {
125
150
  tsconfigPath?: string
126
151
  tamaguiOptions: Partial<TamaguiOptions>
127
152
  debug?: boolean | 'verbose'
153
+ loadTamaguiOptions?: boolean
128
154
  }
129
155
 
130
156
  export type CLIResolvedOptions = {