@tamagui/helpers 1.46.2 → 1.47.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/validStyleProps.js +91 -40
- package/dist/cjs/validStyleProps.js.map +1 -1
- package/dist/esm/validStyleProps.js +89 -40
- package/dist/esm/validStyleProps.js.map +1 -1
- package/package.json +3 -3
- package/src/validStyleProps.ts +92 -41
- package/types/validStyleProps.d.ts +729 -565
- package/types/validStyleProps.d.ts.map +1 -1
|
@@ -23,14 +23,82 @@ __export(validStyleProps_exports, {
|
|
|
23
23
|
stylePropsText: () => stylePropsText,
|
|
24
24
|
stylePropsTextOnly: () => stylePropsTextOnly,
|
|
25
25
|
stylePropsTransform: () => stylePropsTransform,
|
|
26
|
+
stylePropsUnitless: () => stylePropsUnitless,
|
|
26
27
|
stylePropsView: () => stylePropsView,
|
|
28
|
+
tokenCategories: () => tokenCategories,
|
|
27
29
|
validPseudoKeys: () => validPseudoKeys,
|
|
28
30
|
validStyles: () => validStyles,
|
|
29
31
|
validStylesOnBaseProps: () => validStylesOnBaseProps
|
|
30
32
|
});
|
|
31
33
|
module.exports = __toCommonJS(validStyleProps_exports);
|
|
32
34
|
var import_constants = require("@tamagui/constants");
|
|
33
|
-
const
|
|
35
|
+
const tokenCategories = {
|
|
36
|
+
radius: {
|
|
37
|
+
borderRadius: true,
|
|
38
|
+
borderTopLeftRadius: true,
|
|
39
|
+
borderTopRightRadius: true,
|
|
40
|
+
borderBottomLeftRadius: true,
|
|
41
|
+
borderBottomRightRadius: true
|
|
42
|
+
},
|
|
43
|
+
size: {
|
|
44
|
+
width: true,
|
|
45
|
+
height: true,
|
|
46
|
+
minWidth: true,
|
|
47
|
+
minHeight: true,
|
|
48
|
+
maxWidth: true,
|
|
49
|
+
maxHeight: true
|
|
50
|
+
},
|
|
51
|
+
zIndex: {
|
|
52
|
+
zIndex: true
|
|
53
|
+
},
|
|
54
|
+
color: {
|
|
55
|
+
color: true,
|
|
56
|
+
backgroundColor: true,
|
|
57
|
+
borderColor: true,
|
|
58
|
+
borderBottomColor: true,
|
|
59
|
+
borderTopColor: true,
|
|
60
|
+
borderLeftColor: true,
|
|
61
|
+
borderRightColor: true
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const stylePropsUnitless = {
|
|
65
|
+
WebkitLineClamp: true,
|
|
66
|
+
animationIterationCount: true,
|
|
67
|
+
aspectRatio: true,
|
|
68
|
+
borderImageOutset: true,
|
|
69
|
+
borderImageSlice: true,
|
|
70
|
+
borderImageWidth: true,
|
|
71
|
+
columnCount: true,
|
|
72
|
+
flex: true,
|
|
73
|
+
flexGrow: true,
|
|
74
|
+
flexOrder: true,
|
|
75
|
+
flexPositive: true,
|
|
76
|
+
flexShrink: true,
|
|
77
|
+
flexNegative: true,
|
|
78
|
+
fontWeight: true,
|
|
79
|
+
gridRow: true,
|
|
80
|
+
gridRowEnd: true,
|
|
81
|
+
gridRowGap: true,
|
|
82
|
+
gridRowStart: true,
|
|
83
|
+
gridColumn: true,
|
|
84
|
+
gridColumnEnd: true,
|
|
85
|
+
gridColumnGap: true,
|
|
86
|
+
gridColumnStart: true,
|
|
87
|
+
lineClamp: true,
|
|
88
|
+
opacity: true,
|
|
89
|
+
order: true,
|
|
90
|
+
orphans: true,
|
|
91
|
+
tabSize: true,
|
|
92
|
+
widows: true,
|
|
93
|
+
zIndex: true,
|
|
94
|
+
zoom: true,
|
|
95
|
+
scale: true,
|
|
96
|
+
scaleX: true,
|
|
97
|
+
scaleY: true,
|
|
98
|
+
scaleZ: true,
|
|
99
|
+
shadowOpacity: true
|
|
100
|
+
};
|
|
101
|
+
const stylePropsTransform = {
|
|
34
102
|
x: true,
|
|
35
103
|
y: true,
|
|
36
104
|
scale: true,
|
|
@@ -44,56 +112,39 @@ const stylePropsTransform = Object.freeze({
|
|
|
44
112
|
rotateY: true,
|
|
45
113
|
rotateX: true,
|
|
46
114
|
rotateZ: true
|
|
47
|
-
}
|
|
48
|
-
const validStylesOnBaseProps =
|
|
115
|
+
};
|
|
116
|
+
const validStylesOnBaseProps = {
|
|
49
117
|
placeholderTextColor: true
|
|
50
|
-
}
|
|
51
|
-
const stylePropsView =
|
|
118
|
+
};
|
|
119
|
+
const stylePropsView = {
|
|
52
120
|
backfaceVisibility: true,
|
|
53
|
-
backgroundColor: true,
|
|
54
|
-
borderBottomColor: true,
|
|
55
121
|
borderBottomEndRadius: true,
|
|
56
|
-
borderBottomLeftRadius: true,
|
|
57
|
-
borderBottomRightRadius: true,
|
|
58
122
|
borderBottomStartRadius: true,
|
|
59
123
|
borderBottomWidth: true,
|
|
60
|
-
borderColor: true,
|
|
61
124
|
borderEndColor: true,
|
|
62
|
-
borderLeftColor: true,
|
|
63
125
|
borderLeftWidth: true,
|
|
64
|
-
borderRadius: true,
|
|
65
|
-
borderRightColor: true,
|
|
66
126
|
borderRightWidth: true,
|
|
67
127
|
borderStartColor: true,
|
|
68
128
|
borderStyle: true,
|
|
69
|
-
borderTopColor: true,
|
|
70
129
|
borderTopEndRadius: true,
|
|
71
|
-
borderTopLeftRadius: true,
|
|
72
|
-
borderTopRightRadius: true,
|
|
73
130
|
borderTopStartRadius: true,
|
|
74
131
|
borderTopWidth: true,
|
|
75
132
|
borderWidth: true,
|
|
76
|
-
opacity: true,
|
|
77
133
|
transform: true,
|
|
78
134
|
alignContent: true,
|
|
79
135
|
alignItems: true,
|
|
80
136
|
alignSelf: true,
|
|
81
|
-
aspectRatio: true,
|
|
82
137
|
borderEndWidth: true,
|
|
83
138
|
borderStartWidth: true,
|
|
84
139
|
bottom: true,
|
|
85
140
|
display: true,
|
|
86
141
|
end: true,
|
|
87
|
-
flex: true,
|
|
88
142
|
flexBasis: true,
|
|
89
143
|
flexDirection: true,
|
|
90
|
-
flexGrow: true,
|
|
91
|
-
flexShrink: true,
|
|
92
144
|
flexWrap: true,
|
|
93
145
|
gap: true,
|
|
94
146
|
columnGap: true,
|
|
95
147
|
rowGap: true,
|
|
96
|
-
height: true,
|
|
97
148
|
justifyContent: true,
|
|
98
149
|
left: true,
|
|
99
150
|
margin: true,
|
|
@@ -105,10 +156,6 @@ const stylePropsView = Object.freeze({
|
|
|
105
156
|
marginStart: true,
|
|
106
157
|
marginTop: true,
|
|
107
158
|
marginVertical: true,
|
|
108
|
-
maxHeight: true,
|
|
109
|
-
maxWidth: true,
|
|
110
|
-
minHeight: true,
|
|
111
|
-
minWidth: true,
|
|
112
159
|
overflow: true,
|
|
113
160
|
padding: true,
|
|
114
161
|
paddingBottom: true,
|
|
@@ -123,15 +170,17 @@ const stylePropsView = Object.freeze({
|
|
|
123
170
|
right: true,
|
|
124
171
|
start: true,
|
|
125
172
|
top: true,
|
|
126
|
-
width: true,
|
|
127
|
-
zIndex: true,
|
|
128
173
|
direction: true,
|
|
129
174
|
shadowColor: true,
|
|
130
175
|
shadowOffset: true,
|
|
131
|
-
shadowOpacity: true,
|
|
132
176
|
shadowRadius: true,
|
|
177
|
+
...tokenCategories.color,
|
|
178
|
+
...tokenCategories.radius,
|
|
179
|
+
...tokenCategories.size,
|
|
180
|
+
...tokenCategories.radius,
|
|
133
181
|
...validStylesOnBaseProps,
|
|
134
182
|
...stylePropsTransform,
|
|
183
|
+
...stylePropsUnitless,
|
|
135
184
|
// allow a few web only ones
|
|
136
185
|
...process.env.TAMAGUI_TARGET === "web" && {
|
|
137
186
|
// RN doesn't support specific border styles per-edge
|
|
@@ -153,8 +202,8 @@ const stylePropsView = Object.freeze({
|
|
|
153
202
|
outlineWidth: true
|
|
154
203
|
},
|
|
155
204
|
...import_constants.isAndroid ? { elevationAndroid: true } : {}
|
|
156
|
-
}
|
|
157
|
-
const stylePropsFont =
|
|
205
|
+
};
|
|
206
|
+
const stylePropsFont = {
|
|
158
207
|
fontFamily: true,
|
|
159
208
|
fontSize: true,
|
|
160
209
|
fontStyle: true,
|
|
@@ -162,8 +211,8 @@ const stylePropsFont = Object.freeze({
|
|
|
162
211
|
letterSpacing: true,
|
|
163
212
|
lineHeight: true,
|
|
164
213
|
textTransform: true
|
|
165
|
-
}
|
|
166
|
-
const stylePropsTextOnly =
|
|
214
|
+
};
|
|
215
|
+
const stylePropsTextOnly = {
|
|
167
216
|
color: true,
|
|
168
217
|
...stylePropsFont,
|
|
169
218
|
textAlign: true,
|
|
@@ -185,23 +234,23 @@ const stylePropsTextOnly = Object.freeze({
|
|
|
185
234
|
WebkitLineClamp: true,
|
|
186
235
|
WebkitBoxOrient: true
|
|
187
236
|
}
|
|
188
|
-
}
|
|
189
|
-
const stylePropsText =
|
|
237
|
+
};
|
|
238
|
+
const stylePropsText = {
|
|
190
239
|
...stylePropsView,
|
|
191
240
|
...stylePropsTextOnly
|
|
192
|
-
}
|
|
241
|
+
};
|
|
193
242
|
const stylePropsAll = stylePropsText;
|
|
194
|
-
const validPseudoKeys =
|
|
243
|
+
const validPseudoKeys = {
|
|
195
244
|
enterStyle: true,
|
|
196
245
|
exitStyle: true,
|
|
197
246
|
hoverStyle: true,
|
|
198
247
|
pressStyle: true,
|
|
199
248
|
focusStyle: true
|
|
200
|
-
}
|
|
201
|
-
const validStyles =
|
|
249
|
+
};
|
|
250
|
+
const validStyles = {
|
|
202
251
|
...validPseudoKeys,
|
|
203
252
|
...stylePropsView
|
|
204
|
-
}
|
|
253
|
+
};
|
|
205
254
|
// Annotate the CommonJS export names for ESM import in node:
|
|
206
255
|
0 && (module.exports = {
|
|
207
256
|
stylePropsAll,
|
|
@@ -209,7 +258,9 @@ const validStyles = Object.freeze({
|
|
|
209
258
|
stylePropsText,
|
|
210
259
|
stylePropsTextOnly,
|
|
211
260
|
stylePropsTransform,
|
|
261
|
+
stylePropsUnitless,
|
|
212
262
|
stylePropsView,
|
|
263
|
+
tokenCategories,
|
|
213
264
|
validPseudoKeys,
|
|
214
265
|
validStyles,
|
|
215
266
|
validStylesOnBaseProps
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/validStyleProps.ts"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A;AAAA,EAGlB,GAAI,QAAQ,IAAI,mBAAmB,SAAS;AAAA,IAC1C,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,cAAc;AAAA,IACd,wBAAwB;AAAA,IACxB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,EACnB;AACF;AAEO,MAAM,iBAAiB;AAAA,EAC5B,GAAG;AAAA,EACH,GAAG;AACL;AAEO,MAAM,gBAAgB;AAEtB,MAAM,kBAAkB;AAAA,EAC7B,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AACd;AAEO,MAAM,cAAc;AAAA,EACzB,GAAG;AAAA,EACH,GAAG;AACL;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
import { isAndroid } from "@tamagui/constants";
|
|
2
|
-
const
|
|
2
|
+
const tokenCategories = {
|
|
3
|
+
radius: {
|
|
4
|
+
borderRadius: true,
|
|
5
|
+
borderTopLeftRadius: true,
|
|
6
|
+
borderTopRightRadius: true,
|
|
7
|
+
borderBottomLeftRadius: true,
|
|
8
|
+
borderBottomRightRadius: true
|
|
9
|
+
},
|
|
10
|
+
size: {
|
|
11
|
+
width: true,
|
|
12
|
+
height: true,
|
|
13
|
+
minWidth: true,
|
|
14
|
+
minHeight: true,
|
|
15
|
+
maxWidth: true,
|
|
16
|
+
maxHeight: true
|
|
17
|
+
},
|
|
18
|
+
zIndex: {
|
|
19
|
+
zIndex: true
|
|
20
|
+
},
|
|
21
|
+
color: {
|
|
22
|
+
color: true,
|
|
23
|
+
backgroundColor: true,
|
|
24
|
+
borderColor: true,
|
|
25
|
+
borderBottomColor: true,
|
|
26
|
+
borderTopColor: true,
|
|
27
|
+
borderLeftColor: true,
|
|
28
|
+
borderRightColor: true
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const stylePropsUnitless = {
|
|
32
|
+
WebkitLineClamp: true,
|
|
33
|
+
animationIterationCount: true,
|
|
34
|
+
aspectRatio: true,
|
|
35
|
+
borderImageOutset: true,
|
|
36
|
+
borderImageSlice: true,
|
|
37
|
+
borderImageWidth: true,
|
|
38
|
+
columnCount: true,
|
|
39
|
+
flex: true,
|
|
40
|
+
flexGrow: true,
|
|
41
|
+
flexOrder: true,
|
|
42
|
+
flexPositive: true,
|
|
43
|
+
flexShrink: true,
|
|
44
|
+
flexNegative: true,
|
|
45
|
+
fontWeight: true,
|
|
46
|
+
gridRow: true,
|
|
47
|
+
gridRowEnd: true,
|
|
48
|
+
gridRowGap: true,
|
|
49
|
+
gridRowStart: true,
|
|
50
|
+
gridColumn: true,
|
|
51
|
+
gridColumnEnd: true,
|
|
52
|
+
gridColumnGap: true,
|
|
53
|
+
gridColumnStart: true,
|
|
54
|
+
lineClamp: true,
|
|
55
|
+
opacity: true,
|
|
56
|
+
order: true,
|
|
57
|
+
orphans: true,
|
|
58
|
+
tabSize: true,
|
|
59
|
+
widows: true,
|
|
60
|
+
zIndex: true,
|
|
61
|
+
zoom: true,
|
|
62
|
+
scale: true,
|
|
63
|
+
scaleX: true,
|
|
64
|
+
scaleY: true,
|
|
65
|
+
scaleZ: true,
|
|
66
|
+
shadowOpacity: true
|
|
67
|
+
};
|
|
68
|
+
const stylePropsTransform = {
|
|
3
69
|
x: true,
|
|
4
70
|
y: true,
|
|
5
71
|
scale: true,
|
|
@@ -13,56 +79,39 @@ const stylePropsTransform = Object.freeze({
|
|
|
13
79
|
rotateY: true,
|
|
14
80
|
rotateX: true,
|
|
15
81
|
rotateZ: true
|
|
16
|
-
}
|
|
17
|
-
const validStylesOnBaseProps =
|
|
82
|
+
};
|
|
83
|
+
const validStylesOnBaseProps = {
|
|
18
84
|
placeholderTextColor: true
|
|
19
|
-
}
|
|
20
|
-
const stylePropsView =
|
|
85
|
+
};
|
|
86
|
+
const stylePropsView = {
|
|
21
87
|
backfaceVisibility: true,
|
|
22
|
-
backgroundColor: true,
|
|
23
|
-
borderBottomColor: true,
|
|
24
88
|
borderBottomEndRadius: true,
|
|
25
|
-
borderBottomLeftRadius: true,
|
|
26
|
-
borderBottomRightRadius: true,
|
|
27
89
|
borderBottomStartRadius: true,
|
|
28
90
|
borderBottomWidth: true,
|
|
29
|
-
borderColor: true,
|
|
30
91
|
borderEndColor: true,
|
|
31
|
-
borderLeftColor: true,
|
|
32
92
|
borderLeftWidth: true,
|
|
33
|
-
borderRadius: true,
|
|
34
|
-
borderRightColor: true,
|
|
35
93
|
borderRightWidth: true,
|
|
36
94
|
borderStartColor: true,
|
|
37
95
|
borderStyle: true,
|
|
38
|
-
borderTopColor: true,
|
|
39
96
|
borderTopEndRadius: true,
|
|
40
|
-
borderTopLeftRadius: true,
|
|
41
|
-
borderTopRightRadius: true,
|
|
42
97
|
borderTopStartRadius: true,
|
|
43
98
|
borderTopWidth: true,
|
|
44
99
|
borderWidth: true,
|
|
45
|
-
opacity: true,
|
|
46
100
|
transform: true,
|
|
47
101
|
alignContent: true,
|
|
48
102
|
alignItems: true,
|
|
49
103
|
alignSelf: true,
|
|
50
|
-
aspectRatio: true,
|
|
51
104
|
borderEndWidth: true,
|
|
52
105
|
borderStartWidth: true,
|
|
53
106
|
bottom: true,
|
|
54
107
|
display: true,
|
|
55
108
|
end: true,
|
|
56
|
-
flex: true,
|
|
57
109
|
flexBasis: true,
|
|
58
110
|
flexDirection: true,
|
|
59
|
-
flexGrow: true,
|
|
60
|
-
flexShrink: true,
|
|
61
111
|
flexWrap: true,
|
|
62
112
|
gap: true,
|
|
63
113
|
columnGap: true,
|
|
64
114
|
rowGap: true,
|
|
65
|
-
height: true,
|
|
66
115
|
justifyContent: true,
|
|
67
116
|
left: true,
|
|
68
117
|
margin: true,
|
|
@@ -74,10 +123,6 @@ const stylePropsView = Object.freeze({
|
|
|
74
123
|
marginStart: true,
|
|
75
124
|
marginTop: true,
|
|
76
125
|
marginVertical: true,
|
|
77
|
-
maxHeight: true,
|
|
78
|
-
maxWidth: true,
|
|
79
|
-
minHeight: true,
|
|
80
|
-
minWidth: true,
|
|
81
126
|
overflow: true,
|
|
82
127
|
padding: true,
|
|
83
128
|
paddingBottom: true,
|
|
@@ -92,15 +137,17 @@ const stylePropsView = Object.freeze({
|
|
|
92
137
|
right: true,
|
|
93
138
|
start: true,
|
|
94
139
|
top: true,
|
|
95
|
-
width: true,
|
|
96
|
-
zIndex: true,
|
|
97
140
|
direction: true,
|
|
98
141
|
shadowColor: true,
|
|
99
142
|
shadowOffset: true,
|
|
100
|
-
shadowOpacity: true,
|
|
101
143
|
shadowRadius: true,
|
|
144
|
+
...tokenCategories.color,
|
|
145
|
+
...tokenCategories.radius,
|
|
146
|
+
...tokenCategories.size,
|
|
147
|
+
...tokenCategories.radius,
|
|
102
148
|
...validStylesOnBaseProps,
|
|
103
149
|
...stylePropsTransform,
|
|
150
|
+
...stylePropsUnitless,
|
|
104
151
|
// allow a few web only ones
|
|
105
152
|
...process.env.TAMAGUI_TARGET === "web" && {
|
|
106
153
|
// RN doesn't support specific border styles per-edge
|
|
@@ -122,8 +169,8 @@ const stylePropsView = Object.freeze({
|
|
|
122
169
|
outlineWidth: true
|
|
123
170
|
},
|
|
124
171
|
...isAndroid ? { elevationAndroid: true } : {}
|
|
125
|
-
}
|
|
126
|
-
const stylePropsFont =
|
|
172
|
+
};
|
|
173
|
+
const stylePropsFont = {
|
|
127
174
|
fontFamily: true,
|
|
128
175
|
fontSize: true,
|
|
129
176
|
fontStyle: true,
|
|
@@ -131,8 +178,8 @@ const stylePropsFont = Object.freeze({
|
|
|
131
178
|
letterSpacing: true,
|
|
132
179
|
lineHeight: true,
|
|
133
180
|
textTransform: true
|
|
134
|
-
}
|
|
135
|
-
const stylePropsTextOnly =
|
|
181
|
+
};
|
|
182
|
+
const stylePropsTextOnly = {
|
|
136
183
|
color: true,
|
|
137
184
|
...stylePropsFont,
|
|
138
185
|
textAlign: true,
|
|
@@ -154,30 +201,32 @@ const stylePropsTextOnly = Object.freeze({
|
|
|
154
201
|
WebkitLineClamp: true,
|
|
155
202
|
WebkitBoxOrient: true
|
|
156
203
|
}
|
|
157
|
-
}
|
|
158
|
-
const stylePropsText =
|
|
204
|
+
};
|
|
205
|
+
const stylePropsText = {
|
|
159
206
|
...stylePropsView,
|
|
160
207
|
...stylePropsTextOnly
|
|
161
|
-
}
|
|
208
|
+
};
|
|
162
209
|
const stylePropsAll = stylePropsText;
|
|
163
|
-
const validPseudoKeys =
|
|
210
|
+
const validPseudoKeys = {
|
|
164
211
|
enterStyle: true,
|
|
165
212
|
exitStyle: true,
|
|
166
213
|
hoverStyle: true,
|
|
167
214
|
pressStyle: true,
|
|
168
215
|
focusStyle: true
|
|
169
|
-
}
|
|
170
|
-
const validStyles =
|
|
216
|
+
};
|
|
217
|
+
const validStyles = {
|
|
171
218
|
...validPseudoKeys,
|
|
172
219
|
...stylePropsView
|
|
173
|
-
}
|
|
220
|
+
};
|
|
174
221
|
export {
|
|
175
222
|
stylePropsAll,
|
|
176
223
|
stylePropsFont,
|
|
177
224
|
stylePropsText,
|
|
178
225
|
stylePropsTextOnly,
|
|
179
226
|
stylePropsTransform,
|
|
227
|
+
stylePropsUnitless,
|
|
180
228
|
stylePropsView,
|
|
229
|
+
tokenCategories,
|
|
181
230
|
validPseudoKeys,
|
|
182
231
|
validStyles,
|
|
183
232
|
validStylesOnBaseProps
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/validStyleProps.ts"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,iBAAiB;AAInB,MAAM,kBAAkB;AAAA,EAC7B,QAAQ;AAAA,IACN,cAAc;AAAA,IACd,qBAAqB;AAAA,IACrB,sBAAsB;AAAA,IACtB,wBAAwB;AAAA,IACxB,yBAAyB;AAAA,EAC3B;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,QAAQ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A,EACH,GAAG;AACL;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.47.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"clean:build": "tamagui-build clean:build"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@tamagui/simple-hash": "1.
|
|
22
|
+
"@tamagui/simple-hash": "1.47.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@tamagui/build": "1.
|
|
25
|
+
"@tamagui/build": "1.47.1"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|