@tamagui/helpers 1.14.0 → 1.14.2
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/clamp.js +30 -1
- package/dist/cjs/clamp.js.map +2 -2
- package/dist/cjs/composeEventHandlers.js +39 -1
- package/dist/cjs/composeEventHandlers.js.map +2 -2
- package/dist/cjs/concatClassName.js +89 -1
- package/dist/cjs/concatClassName.js.map +2 -2
- package/dist/cjs/index.js +23 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/types.js +16 -1
- package/dist/cjs/types.js.map +2 -2
- package/dist/cjs/validStyleProps.js +214 -1
- package/dist/cjs/validStyleProps.js.map +2 -2
- package/dist/esm/clamp.js +6 -1
- package/dist/esm/clamp.js.map +2 -2
- package/dist/esm/clamp.mjs +6 -1
- package/dist/esm/clamp.mjs.map +2 -2
- package/dist/esm/composeEventHandlers.js +15 -1
- package/dist/esm/composeEventHandlers.js.map +2 -2
- package/dist/esm/composeEventHandlers.mjs +15 -1
- package/dist/esm/composeEventHandlers.mjs.map +2 -2
- package/dist/esm/concatClassName.js +65 -1
- package/dist/esm/concatClassName.js.map +2 -2
- package/dist/esm/concatClassName.mjs +65 -1
- package/dist/esm/concatClassName.mjs.map +2 -2
- package/dist/esm/index.js +6 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +6 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/validStyleProps.js +182 -1
- package/dist/esm/validStyleProps.js.map +2 -2
- package/dist/esm/validStyleProps.mjs +182 -1
- package/dist/esm/validStyleProps.mjs.map +2 -2
- package/package.json +3 -3
|
@@ -1,2 +1,183 @@
|
|
|
1
|
-
const
|
|
1
|
+
const stylePropsTransform = Object.freeze({
|
|
2
|
+
x: true,
|
|
3
|
+
y: true,
|
|
4
|
+
scale: true,
|
|
5
|
+
perspective: true,
|
|
6
|
+
scaleX: true,
|
|
7
|
+
scaleY: true,
|
|
8
|
+
skewX: true,
|
|
9
|
+
skewY: true,
|
|
10
|
+
matrix: true,
|
|
11
|
+
rotate: true,
|
|
12
|
+
rotateY: true,
|
|
13
|
+
rotateX: true,
|
|
14
|
+
rotateZ: true
|
|
15
|
+
});
|
|
16
|
+
const validStylesOnBaseProps = Object.freeze({
|
|
17
|
+
placeholderTextColor: true
|
|
18
|
+
});
|
|
19
|
+
const stylePropsView = Object.freeze({
|
|
20
|
+
backfaceVisibility: true,
|
|
21
|
+
backgroundColor: true,
|
|
22
|
+
borderBottomColor: true,
|
|
23
|
+
borderBottomEndRadius: true,
|
|
24
|
+
borderBottomLeftRadius: true,
|
|
25
|
+
borderBottomRightRadius: true,
|
|
26
|
+
borderBottomStartRadius: true,
|
|
27
|
+
borderBottomWidth: true,
|
|
28
|
+
borderColor: true,
|
|
29
|
+
borderEndColor: true,
|
|
30
|
+
borderLeftColor: true,
|
|
31
|
+
borderLeftWidth: true,
|
|
32
|
+
borderRadius: true,
|
|
33
|
+
borderRightColor: true,
|
|
34
|
+
borderRightWidth: true,
|
|
35
|
+
borderStartColor: true,
|
|
36
|
+
borderStyle: true,
|
|
37
|
+
borderTopColor: true,
|
|
38
|
+
borderTopEndRadius: true,
|
|
39
|
+
borderTopLeftRadius: true,
|
|
40
|
+
borderTopRightRadius: true,
|
|
41
|
+
borderTopStartRadius: true,
|
|
42
|
+
borderTopWidth: true,
|
|
43
|
+
borderWidth: true,
|
|
44
|
+
opacity: true,
|
|
45
|
+
transform: true,
|
|
46
|
+
alignContent: true,
|
|
47
|
+
alignItems: true,
|
|
48
|
+
alignSelf: true,
|
|
49
|
+
aspectRatio: true,
|
|
50
|
+
borderEndWidth: true,
|
|
51
|
+
borderStartWidth: true,
|
|
52
|
+
bottom: true,
|
|
53
|
+
display: true,
|
|
54
|
+
end: true,
|
|
55
|
+
flex: true,
|
|
56
|
+
flexBasis: true,
|
|
57
|
+
flexDirection: true,
|
|
58
|
+
flexGrow: true,
|
|
59
|
+
flexShrink: true,
|
|
60
|
+
flexWrap: true,
|
|
61
|
+
gap: true,
|
|
62
|
+
columnGap: true,
|
|
63
|
+
rowGap: true,
|
|
64
|
+
height: true,
|
|
65
|
+
justifyContent: true,
|
|
66
|
+
left: true,
|
|
67
|
+
margin: true,
|
|
68
|
+
marginBottom: true,
|
|
69
|
+
marginEnd: true,
|
|
70
|
+
marginHorizontal: true,
|
|
71
|
+
marginLeft: true,
|
|
72
|
+
marginRight: true,
|
|
73
|
+
marginStart: true,
|
|
74
|
+
marginTop: true,
|
|
75
|
+
marginVertical: true,
|
|
76
|
+
maxHeight: true,
|
|
77
|
+
maxWidth: true,
|
|
78
|
+
minHeight: true,
|
|
79
|
+
minWidth: true,
|
|
80
|
+
overflow: true,
|
|
81
|
+
padding: true,
|
|
82
|
+
paddingBottom: true,
|
|
83
|
+
paddingEnd: true,
|
|
84
|
+
paddingHorizontal: true,
|
|
85
|
+
paddingLeft: true,
|
|
86
|
+
paddingRight: true,
|
|
87
|
+
paddingStart: true,
|
|
88
|
+
paddingTop: true,
|
|
89
|
+
paddingVertical: true,
|
|
90
|
+
position: true,
|
|
91
|
+
right: true,
|
|
92
|
+
start: true,
|
|
93
|
+
top: true,
|
|
94
|
+
width: true,
|
|
95
|
+
zIndex: true,
|
|
96
|
+
direction: true,
|
|
97
|
+
shadowColor: true,
|
|
98
|
+
shadowOffset: true,
|
|
99
|
+
shadowOpacity: true,
|
|
100
|
+
shadowRadius: true,
|
|
101
|
+
...validStylesOnBaseProps,
|
|
102
|
+
...stylePropsTransform,
|
|
103
|
+
// allow a few web only ones
|
|
104
|
+
...process.env.TAMAGUI_TARGET === "web" && {
|
|
105
|
+
// RN doesn't support specific border styles per-edge
|
|
106
|
+
borderBottomStyle: true,
|
|
107
|
+
borderTopStyle: true,
|
|
108
|
+
borderLeftStyle: true,
|
|
109
|
+
borderRightStyle: true,
|
|
110
|
+
overflowX: true,
|
|
111
|
+
overflowY: true,
|
|
112
|
+
userSelect: true,
|
|
113
|
+
cursor: true,
|
|
114
|
+
contain: true,
|
|
115
|
+
pointerEvents: true,
|
|
116
|
+
boxSizing: true,
|
|
117
|
+
boxShadow: true,
|
|
118
|
+
outlineColor: true,
|
|
119
|
+
outlineStyle: true,
|
|
120
|
+
outlineOffset: true,
|
|
121
|
+
outlineWidth: true
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
const stylePropsFont = Object.freeze({
|
|
125
|
+
fontFamily: true,
|
|
126
|
+
fontSize: true,
|
|
127
|
+
fontStyle: true,
|
|
128
|
+
fontWeight: true,
|
|
129
|
+
letterSpacing: true,
|
|
130
|
+
lineHeight: true,
|
|
131
|
+
textTransform: true
|
|
132
|
+
});
|
|
133
|
+
const stylePropsTextOnly = Object.freeze({
|
|
134
|
+
color: true,
|
|
135
|
+
...stylePropsFont,
|
|
136
|
+
textAlign: true,
|
|
137
|
+
textDecorationLine: true,
|
|
138
|
+
textDecorationStyle: true,
|
|
139
|
+
textDecorationColor: true,
|
|
140
|
+
textShadowColor: true,
|
|
141
|
+
textShadowOffset: true,
|
|
142
|
+
textShadowRadius: true,
|
|
143
|
+
// allow some web only ones
|
|
144
|
+
...process.env.TAMAGUI_TARGET === "web" && {
|
|
145
|
+
whiteSpace: true,
|
|
146
|
+
wordWrap: true,
|
|
147
|
+
textOverflow: true,
|
|
148
|
+
textDecorationDistance: true,
|
|
149
|
+
userSelect: true,
|
|
150
|
+
selectable: true,
|
|
151
|
+
cursor: true,
|
|
152
|
+
WebkitLineClamp: true,
|
|
153
|
+
WebkitBoxOrient: true
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
const stylePropsText = Object.freeze({
|
|
157
|
+
...stylePropsView,
|
|
158
|
+
...stylePropsTextOnly
|
|
159
|
+
});
|
|
160
|
+
const stylePropsAll = stylePropsText;
|
|
161
|
+
const validPseudoKeys = Object.freeze({
|
|
162
|
+
enterStyle: true,
|
|
163
|
+
exitStyle: true,
|
|
164
|
+
hoverStyle: true,
|
|
165
|
+
pressStyle: true,
|
|
166
|
+
focusStyle: true
|
|
167
|
+
});
|
|
168
|
+
const validStyles = Object.freeze({
|
|
169
|
+
...validPseudoKeys,
|
|
170
|
+
...stylePropsView
|
|
171
|
+
});
|
|
172
|
+
export {
|
|
173
|
+
stylePropsAll,
|
|
174
|
+
stylePropsFont,
|
|
175
|
+
stylePropsText,
|
|
176
|
+
stylePropsTextOnly,
|
|
177
|
+
stylePropsTransform,
|
|
178
|
+
stylePropsView,
|
|
179
|
+
validPseudoKeys,
|
|
180
|
+
validStyles,
|
|
181
|
+
validStylesOnBaseProps
|
|
182
|
+
};
|
|
2
183
|
//# sourceMappingURL=validStyleProps.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/validStyleProps.ts"],
|
|
4
4
|
"sourcesContent": ["// flat transform props\nexport const stylePropsTransform = Object.freeze({\n x: true,\n y: true,\n scale: true,\n perspective: true,\n scaleX: true,\n scaleY: true,\n skewX: true,\n skewY: true,\n matrix: true,\n rotate: true,\n rotateY: true,\n rotateX: true,\n rotateZ: true,\n})\n\nexport const validStylesOnBaseProps = Object.freeze({\n placeholderTextColor: true,\n})\n\nexport const stylePropsView = Object.freeze({\n backfaceVisibility: true,\n backgroundColor: true,\n borderBottomColor: true,\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderBottomWidth: true,\n borderColor: true,\n borderEndColor: true,\n borderLeftColor: true,\n borderLeftWidth: true,\n borderRadius: true,\n borderRightColor: true,\n borderRightWidth: true,\n borderStartColor: true,\n borderStyle: true,\n borderTopColor: true,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n borderTopWidth: true,\n borderWidth: true,\n opacity: true,\n transform: true,\n alignContent: true,\n alignItems: true,\n alignSelf: true,\n aspectRatio: true,\n borderEndWidth: true,\n borderStartWidth: true,\n bottom: true,\n display: true,\n end: true,\n flex: true,\n flexBasis: true,\n flexDirection: true,\n flexGrow: true,\n flexShrink: true,\n flexWrap: true,\n gap: true,\n columnGap: true,\n rowGap: true,\n height: true,\n justifyContent: true,\n left: true,\n margin: true,\n marginBottom: true,\n marginEnd: true,\n marginHorizontal: true,\n marginLeft: true,\n marginRight: true,\n marginStart: true,\n marginTop: true,\n marginVertical: true,\n maxHeight: true,\n maxWidth: true,\n minHeight: true,\n minWidth: true,\n overflow: true,\n padding: true,\n paddingBottom: true,\n paddingEnd: true,\n paddingHorizontal: true,\n paddingLeft: true,\n paddingRight: true,\n paddingStart: true,\n paddingTop: true,\n paddingVertical: true,\n position: true,\n right: true,\n start: true,\n top: true,\n width: true,\n zIndex: true,\n direction: true,\n shadowColor: true,\n shadowOffset: true,\n shadowOpacity: true,\n shadowRadius: true,\n ...validStylesOnBaseProps,\n ...stylePropsTransform,\n\n // allow a few web only ones\n\n ...(process.env.TAMAGUI_TARGET === 'web' && {\n // RN doesn't support specific border styles per-edge\n borderBottomStyle: true,\n borderTopStyle: true,\n borderLeftStyle: true,\n borderRightStyle: true,\n\n overflowX: true,\n overflowY: true,\n userSelect: true,\n cursor: true,\n contain: true,\n pointerEvents: true,\n boxSizing: true,\n boxShadow: true,\n outlineColor: true,\n outlineStyle: true,\n outlineOffset: true,\n outlineWidth: true,\n }),\n})\n\nexport const stylePropsFont = Object.freeze({\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontWeight: true,\n letterSpacing: true,\n lineHeight: true,\n textTransform: true,\n})\n\nexport const stylePropsTextOnly = Object.freeze({\n color: true,\n ...stylePropsFont,\n textAlign: true,\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationColor: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n\n // allow some web only ones\n ...(process.env.TAMAGUI_TARGET === 'web' && {\n whiteSpace: true,\n wordWrap: true,\n textOverflow: true,\n textDecorationDistance: true,\n userSelect: true,\n selectable: true,\n cursor: true,\n WebkitLineClamp: true,\n WebkitBoxOrient: true,\n }),\n})\n\nexport const stylePropsText = Object.freeze({\n ...stylePropsView,\n ...stylePropsTextOnly,\n})\n\nexport const stylePropsAll = stylePropsText\n\nexport const validPseudoKeys = Object.freeze({\n enterStyle: true,\n exitStyle: true,\n hoverStyle: true,\n pressStyle: true,\n focusStyle: true,\n})\n\nexport const validStyles = Object.freeze({\n ...validPseudoKeys,\n ...stylePropsView,\n})\n"],
|
|
5
|
-
"mappings": "AACO,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AACO,MAAM,sBAAsB,OAAO,OAAO;AAAA,EAC/C,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX,CAAC;AAEM,MAAM,yBAAyB,OAAO,OAAO;AAAA,EAClD,sBAAsB;AACxB,CAAC;AAEM,MAAM,iBAAiB,OAAO,OAAO;AAAA,EAC1C,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,yBAAyB;AAAA,EACzB,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,SAAS;AAAA,EACT,WAAW;AAAA,EACX,cAAc;AAAA,EACd,YAAY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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.14.
|
|
22
|
+
"@tamagui/simple-hash": "1.14.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@tamagui/build": "1.14.
|
|
25
|
+
"@tamagui/build": "1.14.2"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|