@tamagui/helpers 1.2.9 → 1.2.10
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/esm/clamp.mjs +7 -0
- package/dist/esm/clamp.mjs.map +7 -0
- package/dist/esm/composeEventHandlers.mjs +16 -0
- package/dist/esm/composeEventHandlers.mjs.map +7 -0
- package/dist/esm/concatClassName.mjs +66 -0
- package/dist/esm/concatClassName.mjs.map +7 -0
- package/dist/esm/index.mjs +7 -0
- package/dist/esm/index.mjs.map +7 -0
- package/dist/esm/types.mjs +1 -0
- package/dist/esm/types.mjs.map +7 -0
- package/dist/esm/validStyleProps.mjs +175 -0
- package/dist/esm/validStyleProps.mjs.map +7 -0
- package/package.json +4 -4
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/clamp.ts"],
|
|
4
|
+
"sourcesContent": ["export function clamp(value: number, [min, max]: [number, number]): number {\n return Math.min(max, Math.max(min, value))\n}\n"],
|
|
5
|
+
"mappings": "AAAO,SAAS,MAAM,OAAe,CAAC,KAAK,GAAG,GAA6B;AACzE,SAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function composeEventHandlers(og, next, { checkDefaultPrevented = true } = {}) {
|
|
2
|
+
if (!og || !next) {
|
|
3
|
+
return next || og;
|
|
4
|
+
}
|
|
5
|
+
return function composedEventHandler(event) {
|
|
6
|
+
og == null ? void 0 : og(event);
|
|
7
|
+
if (!event || !(checkDefaultPrevented && "defaultPrevented" in event) || // @ts-ignore
|
|
8
|
+
"defaultPrevented" in event && !event.defaultPrevented) {
|
|
9
|
+
return next == null ? void 0 : next(event);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
composeEventHandlers
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=composeEventHandlers.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/composeEventHandlers.ts"],
|
|
4
|
+
"sourcesContent": ["type Events = Object\n\nexport type EventHandler<E extends Events> = (event: E) => void\n\nexport function composeEventHandlers<E extends Events>(\n og?: EventHandler<E>,\n next?: EventHandler<E>,\n { checkDefaultPrevented = true } = {}\n) {\n if (!og || !next) {\n return next || og\n }\n return function composedEventHandler(event: E) {\n og?.(event)\n if (\n !event ||\n !(checkDefaultPrevented && 'defaultPrevented' in event) ||\n // @ts-ignore\n ('defaultPrevented' in event && !event.defaultPrevented)\n ) {\n return next?.(event)\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AAIO,SAAS,qBACd,IACA,MACA,EAAE,wBAAwB,KAAK,IAAI,CAAC,GACpC;AACA,MAAI,CAAC,MAAM,CAAC,MAAM;AAChB,WAAO,QAAQ;AAAA,EACjB;AACA,SAAO,SAAS,qBAAqB,OAAU;AAC7C,6BAAK;AACL,QACE,CAAC,SACD,EAAE,yBAAyB,sBAAsB;AAAA,IAEhD,sBAAsB,SAAS,CAAC,MAAM,kBACvC;AACA,aAAO,6BAAO;AAAA,IAChB;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
function concatClassName(_cn) {
|
|
2
|
+
const args = arguments;
|
|
3
|
+
const usedPrefixes = [];
|
|
4
|
+
let final = "";
|
|
5
|
+
const len = args.length;
|
|
6
|
+
let propObjects = null;
|
|
7
|
+
for (let x = len; x >= 0; x--) {
|
|
8
|
+
const cns = args[x];
|
|
9
|
+
if (!cns)
|
|
10
|
+
continue;
|
|
11
|
+
if (!Array.isArray(cns) && typeof cns !== "string") {
|
|
12
|
+
propObjects = propObjects || [];
|
|
13
|
+
propObjects.push(cns);
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
const names = Array.isArray(cns) ? cns : cns.split(" ");
|
|
17
|
+
const numNames = names.length;
|
|
18
|
+
for (let i = numNames - 1; i >= 0; i--) {
|
|
19
|
+
const name = names[i];
|
|
20
|
+
if (!name || name === " ")
|
|
21
|
+
continue;
|
|
22
|
+
if (name[0] !== "_") {
|
|
23
|
+
final = name + " " + final;
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
const splitIndex = name.indexOf("-");
|
|
27
|
+
if (splitIndex < 1) {
|
|
28
|
+
final = name + " " + final;
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
const nextChar = name[splitIndex + 1];
|
|
32
|
+
const isMediaQuery = nextChar === "_";
|
|
33
|
+
const styleKey = name.slice(1, name.lastIndexOf("-"));
|
|
34
|
+
const mediaKey = isMediaQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null;
|
|
35
|
+
const uid = mediaKey ? styleKey + mediaKey : styleKey;
|
|
36
|
+
if (usedPrefixes.indexOf(uid) > -1) {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
usedPrefixes.push(uid);
|
|
40
|
+
const propName = styleKey;
|
|
41
|
+
if (propName && propObjects) {
|
|
42
|
+
if (propObjects.some((po) => {
|
|
43
|
+
if (mediaKey) {
|
|
44
|
+
const propKey = pseudoInvert[mediaKey];
|
|
45
|
+
return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
|
|
46
|
+
}
|
|
47
|
+
const res = po && propName in po && po[propName] !== null;
|
|
48
|
+
return res;
|
|
49
|
+
})) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
final = name + " " + final;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return final;
|
|
57
|
+
}
|
|
58
|
+
const pseudoInvert = {
|
|
59
|
+
hover: "hoverStyle",
|
|
60
|
+
focus: "focusStyle",
|
|
61
|
+
press: "pressStyle"
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
concatClassName
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=concatClassName.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/concatClassName.ts"],
|
|
4
|
+
"sourcesContent": ["// perf sensitive so doing some weird stuff\n\n/**\n * next - take objects:\n *\n * { _shorthand: 'postfix' }\n *\n */\n\nexport function concatClassName(...args: any[]): any\nexport function concatClassName(_cn: Record<string, any> | null | undefined): string {\n const args = arguments\n const usedPrefixes: string[] = []\n let final = ''\n\n const len = args.length\n let propObjects: any = null\n for (let x = len; x >= 0; x--) {\n const cns = args[x]\n\n if (!cns) continue\n if (!Array.isArray(cns) && typeof cns !== 'string') {\n // is prop object\n propObjects = propObjects || []\n propObjects.push(cns)\n continue\n }\n\n const names = Array.isArray(cns) ? cns : cns.split(' ')\n const numNames = names.length\n for (let i = numNames - 1; i >= 0; i--) {\n const name = names[i]\n\n if (!name || name === ' ') continue\n if (name[0] !== '_') {\n // not snack style (todo slightly stronger heuristic)\n final = name + ' ' + final\n continue\n }\n\n const splitIndex = name.indexOf('-')\n if (splitIndex < 1) {\n final = name + ' ' + final\n // if (shouldDebug) console.log('debug exclude:', name, final)\n continue\n }\n\n const nextChar = name[splitIndex + 1]\n // synced to static-ui constants\n // MEDIA_SEP\n const isMediaQuery = nextChar === '_'\n // PSEUDO_SEP\n // commenting out three things to make pseudos override properly\n // (leave in for a bit to see if other bugs pop up later):\n // 1. const isPseudoQuery = nextChar === '0'\n const styleKey = name.slice(1, name.lastIndexOf('-'))\n // 2. isMediaQuery || isPseudoQuery\n const mediaKey = isMediaQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null\n const uid = mediaKey ? styleKey + mediaKey : styleKey\n // 3. && !isPseudoQuery\n\n if (usedPrefixes.indexOf(uid) > -1) {\n // if (shouldDebug) console.log('debug exclude:', usedPrefixes, name)\n continue\n }\n usedPrefixes.push(uid)\n\n // overrides for full safety\n const propName = styleKey\n if (propName && propObjects) {\n if (\n propObjects.some((po) => {\n if (mediaKey) {\n const propKey = pseudoInvert[mediaKey]\n return po && po[propKey] && propName in po[propKey] && po[propKey] !== null\n }\n const res = po && propName in po && po[propName] !== null\n return res\n })\n ) {\n // if (shouldDebug) console.log('debug exclude:', name)\n continue\n }\n }\n\n final = name + ' ' + final\n }\n }\n\n return final\n}\n\nconst pseudoInvert = {\n hover: 'hoverStyle',\n focus: 'focusStyle',\n press: 'pressStyle',\n}\n"],
|
|
5
|
+
"mappings": "AAUO,SAAS,gBAAgB,KAAqD;AACnF,QAAM,OAAO;AACb,QAAM,eAAyB,CAAC;AAChC,MAAI,QAAQ;AAEZ,QAAM,MAAM,KAAK;AACjB,MAAI,cAAmB;AACvB,WAAS,IAAI,KAAK,KAAK,GAAG,KAAK;AAC7B,UAAM,MAAM,KAAK,CAAC;AAElB,QAAI,CAAC;AAAK;AACV,QAAI,CAAC,MAAM,QAAQ,GAAG,KAAK,OAAO,QAAQ,UAAU;AAElD,oBAAc,eAAe,CAAC;AAC9B,kBAAY,KAAK,GAAG;AACpB;AAAA,IACF;AAEA,UAAM,QAAQ,MAAM,QAAQ,GAAG,IAAI,MAAM,IAAI,MAAM,GAAG;AACtD,UAAM,WAAW,MAAM;AACvB,aAAS,IAAI,WAAW,GAAG,KAAK,GAAG,KAAK;AACtC,YAAM,OAAO,MAAM,CAAC;AAEpB,UAAI,CAAC,QAAQ,SAAS;AAAK;AAC3B,UAAI,KAAK,CAAC,MAAM,KAAK;AAEnB,gBAAQ,OAAO,MAAM;AACrB;AAAA,MACF;AAEA,YAAM,aAAa,KAAK,QAAQ,GAAG;AACnC,UAAI,aAAa,GAAG;AAClB,gBAAQ,OAAO,MAAM;AAErB;AAAA,MACF;AAEA,YAAM,WAAW,KAAK,aAAa,CAAC;AAGpC,YAAM,eAAe,aAAa;AAKlC,YAAM,WAAW,KAAK,MAAM,GAAG,KAAK,YAAY,GAAG,CAAC;AAEpD,YAAM,WAAW,eAAe,KAAK,MAAM,aAAa,GAAG,aAAa,CAAC,IAAI;AAC7E,YAAM,MAAM,WAAW,WAAW,WAAW;AAG7C,UAAI,aAAa,QAAQ,GAAG,IAAI,IAAI;AAElC;AAAA,MACF;AACA,mBAAa,KAAK,GAAG;AAGrB,YAAM,WAAW;AACjB,UAAI,YAAY,aAAa;AAC3B,YACE,YAAY,KAAK,CAAC,OAAO;AACvB,cAAI,UAAU;AACZ,kBAAM,UAAU,aAAa,QAAQ;AACrC,mBAAO,MAAM,GAAG,OAAO,KAAK,YAAY,GAAG,OAAO,KAAK,GAAG,OAAO,MAAM;AAAA,UACzE;AACA,gBAAM,MAAM,MAAM,YAAY,MAAM,GAAG,QAAQ,MAAM;AACrD,iBAAO;AAAA,QACT,CAAC,GACD;AAEA;AAAA,QACF;AAAA,MACF;AAEA,cAAQ,OAAO,MAAM;AAAA,IACvB;AAAA,EACF;AAEA,SAAO;AACT;AAEA,MAAM,eAAe;AAAA,EACnB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["export * from './clamp'\nexport * from './composeEventHandlers'\nexport * from './concatClassName'\nexport * from './validStyleProps'\nexport * from './types'\nexport * from '@tamagui/simple-hash'\n"],
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -0,0 +1,175 @@
|
|
|
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
|
+
borderBottomStyle: true,
|
|
24
|
+
borderTopStyle: true,
|
|
25
|
+
borderLeftStyle: true,
|
|
26
|
+
borderRightStyle: true,
|
|
27
|
+
borderBottomEndRadius: true,
|
|
28
|
+
borderBottomLeftRadius: true,
|
|
29
|
+
borderBottomRightRadius: true,
|
|
30
|
+
borderBottomStartRadius: true,
|
|
31
|
+
borderBottomWidth: true,
|
|
32
|
+
borderColor: true,
|
|
33
|
+
borderEndColor: true,
|
|
34
|
+
borderLeftColor: true,
|
|
35
|
+
borderLeftWidth: true,
|
|
36
|
+
borderRadius: true,
|
|
37
|
+
borderRightColor: true,
|
|
38
|
+
borderRightWidth: true,
|
|
39
|
+
borderStartColor: true,
|
|
40
|
+
borderStyle: true,
|
|
41
|
+
borderTopColor: true,
|
|
42
|
+
borderTopEndRadius: true,
|
|
43
|
+
borderTopLeftRadius: true,
|
|
44
|
+
borderTopRightRadius: true,
|
|
45
|
+
borderTopStartRadius: true,
|
|
46
|
+
borderTopWidth: true,
|
|
47
|
+
borderWidth: true,
|
|
48
|
+
opacity: true,
|
|
49
|
+
transform: true,
|
|
50
|
+
alignContent: true,
|
|
51
|
+
alignItems: true,
|
|
52
|
+
alignSelf: true,
|
|
53
|
+
aspectRatio: true,
|
|
54
|
+
borderEndWidth: true,
|
|
55
|
+
borderStartWidth: true,
|
|
56
|
+
bottom: true,
|
|
57
|
+
display: true,
|
|
58
|
+
end: true,
|
|
59
|
+
flex: true,
|
|
60
|
+
flexBasis: true,
|
|
61
|
+
flexDirection: true,
|
|
62
|
+
flexGrow: true,
|
|
63
|
+
flexShrink: true,
|
|
64
|
+
flexWrap: true,
|
|
65
|
+
height: true,
|
|
66
|
+
justifyContent: true,
|
|
67
|
+
left: true,
|
|
68
|
+
margin: true,
|
|
69
|
+
marginBottom: true,
|
|
70
|
+
marginEnd: true,
|
|
71
|
+
marginHorizontal: true,
|
|
72
|
+
marginLeft: true,
|
|
73
|
+
marginRight: true,
|
|
74
|
+
marginStart: true,
|
|
75
|
+
marginTop: true,
|
|
76
|
+
marginVertical: true,
|
|
77
|
+
maxHeight: true,
|
|
78
|
+
maxWidth: true,
|
|
79
|
+
minHeight: true,
|
|
80
|
+
minWidth: true,
|
|
81
|
+
overflow: true,
|
|
82
|
+
padding: true,
|
|
83
|
+
paddingBottom: true,
|
|
84
|
+
paddingEnd: true,
|
|
85
|
+
paddingHorizontal: true,
|
|
86
|
+
paddingLeft: true,
|
|
87
|
+
paddingRight: true,
|
|
88
|
+
paddingStart: true,
|
|
89
|
+
paddingTop: true,
|
|
90
|
+
paddingVertical: true,
|
|
91
|
+
position: true,
|
|
92
|
+
right: true,
|
|
93
|
+
start: true,
|
|
94
|
+
top: true,
|
|
95
|
+
width: true,
|
|
96
|
+
zIndex: true,
|
|
97
|
+
direction: true,
|
|
98
|
+
shadowColor: true,
|
|
99
|
+
shadowOffset: true,
|
|
100
|
+
shadowOpacity: true,
|
|
101
|
+
shadowRadius: true,
|
|
102
|
+
...validStylesOnBaseProps,
|
|
103
|
+
...stylePropsTransform,
|
|
104
|
+
// allow a few web only ones
|
|
105
|
+
...process.env.TAMAGUI_TARGET === "web" && {
|
|
106
|
+
overflowX: true,
|
|
107
|
+
overflowY: true,
|
|
108
|
+
userSelect: true,
|
|
109
|
+
cursor: true,
|
|
110
|
+
contain: true,
|
|
111
|
+
pointerEvents: true,
|
|
112
|
+
boxSizing: true,
|
|
113
|
+
boxShadow: true,
|
|
114
|
+
outlineColor: true,
|
|
115
|
+
outlineStyle: true,
|
|
116
|
+
outlineOffset: true,
|
|
117
|
+
outlineWidth: true
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
const stylePropsTextOnly = Object.freeze({
|
|
121
|
+
color: true,
|
|
122
|
+
fontFamily: true,
|
|
123
|
+
fontSize: true,
|
|
124
|
+
fontStyle: true,
|
|
125
|
+
fontWeight: true,
|
|
126
|
+
letterSpacing: true,
|
|
127
|
+
lineHeight: true,
|
|
128
|
+
textAlign: true,
|
|
129
|
+
textDecorationLine: true,
|
|
130
|
+
textDecorationStyle: true,
|
|
131
|
+
textDecorationColor: true,
|
|
132
|
+
textShadowColor: true,
|
|
133
|
+
textShadowOffset: true,
|
|
134
|
+
textShadowRadius: true,
|
|
135
|
+
textTransform: true,
|
|
136
|
+
// allow some web only ones
|
|
137
|
+
...process.env.TAMAGUI_TARGET === "web" && {
|
|
138
|
+
whiteSpace: true,
|
|
139
|
+
wordWrap: true,
|
|
140
|
+
textOverflow: true,
|
|
141
|
+
textDecorationDistance: true,
|
|
142
|
+
userSelect: true,
|
|
143
|
+
selectable: true,
|
|
144
|
+
cursor: true,
|
|
145
|
+
WebkitLineClamp: true,
|
|
146
|
+
WebkitBoxOrient: true
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
const stylePropsText = Object.freeze({
|
|
150
|
+
...stylePropsView,
|
|
151
|
+
...stylePropsTextOnly
|
|
152
|
+
});
|
|
153
|
+
const stylePropsAll = stylePropsText;
|
|
154
|
+
const validPseudoKeys = Object.freeze({
|
|
155
|
+
enterStyle: true,
|
|
156
|
+
exitStyle: true,
|
|
157
|
+
hoverStyle: true,
|
|
158
|
+
pressStyle: true,
|
|
159
|
+
focusStyle: true
|
|
160
|
+
});
|
|
161
|
+
const validStyles = Object.freeze({
|
|
162
|
+
...validPseudoKeys,
|
|
163
|
+
...stylePropsView
|
|
164
|
+
});
|
|
165
|
+
export {
|
|
166
|
+
stylePropsAll,
|
|
167
|
+
stylePropsText,
|
|
168
|
+
stylePropsTextOnly,
|
|
169
|
+
stylePropsTransform,
|
|
170
|
+
stylePropsView,
|
|
171
|
+
validPseudoKeys,
|
|
172
|
+
validStyles,
|
|
173
|
+
validStylesOnBaseProps
|
|
174
|
+
};
|
|
175
|
+
//# sourceMappingURL=validStyleProps.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/validStyleProps.ts"],
|
|
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 borderBottomStyle: true,\n borderTopStyle: true,\n borderLeftStyle: true,\n borderRightStyle: 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 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 ...(process.env.TAMAGUI_TARGET === 'web' && {\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 stylePropsTextOnly = Object.freeze({\n color: true,\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontWeight: true,\n letterSpacing: true,\n lineHeight: true,\n textAlign: true,\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationColor: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n textTransform: 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 validSty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AqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,eAAe;AAAA;AAAA,EAGf,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,CAAC;AAEM,MAAM,iBAAiB,OAAO,OAAO;AAAA,EAC1C,GAAG;AAAA,EACH,GAAG;AACL,CAAC;AAEM,MAAM,gBAAgB;AAEtB,MAAM,kBAAkB,OAAO,OAAO;AAAA,EAC3C,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AACd,CAAC;AAEM,MAAM,cAAc,OAAO,OAAO;AAAA,EACvC,GAAG;AAAA,EACH,GAAG;AACL,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.10",
|
|
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.2.
|
|
22
|
+
"@tamagui/simple-hash": "^1.2.10"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@tamagui/build": "^1.2.
|
|
25
|
+
"@tamagui/build": "^1.2.10"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"./package.json": "./package.json",
|
|
32
32
|
".": {
|
|
33
33
|
"types": "./types/index.d.ts",
|
|
34
|
-
"import": "./dist/esm/index.
|
|
34
|
+
"import": "./dist/esm/index.mjs",
|
|
35
35
|
"require": "./dist/cjs/index.js"
|
|
36
36
|
}
|
|
37
37
|
},
|