@tamagui/helpers 1.0.1-beta.227 → 1.0.1-beta.228
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/log.js +32 -0
- package/dist/cjs/log.js.map +7 -0
- package/dist/esm/log.js +8 -0
- package/dist/esm/log.js.map +7 -0
- package/dist/jsx/clamp.js +7 -0
- package/dist/jsx/clamp.js.map +7 -0
- package/dist/jsx/composeEventHandlers.js +12 -0
- package/dist/jsx/composeEventHandlers.js.map +7 -0
- package/dist/jsx/concatClassName.js +66 -0
- package/dist/jsx/concatClassName.js.map +7 -0
- package/dist/jsx/index.js +7 -0
- package/dist/jsx/index.js.map +7 -0
- package/dist/jsx/log.js +8 -0
- package/dist/jsx/log.js.map +7 -0
- package/dist/jsx/types.js +1 -0
- package/dist/jsx/types.js.map +7 -0
- package/dist/jsx/validStyleProps.js +169 -0
- package/dist/jsx/validStyleProps.js.map +7 -0
- package/package.json +3 -3
package/dist/cjs/log.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var log_exports = {};
|
|
20
|
+
__export(log_exports, {
|
|
21
|
+
log: () => log
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(log_exports);
|
|
24
|
+
const log = (...args) => {
|
|
25
|
+
console.log(...args);
|
|
26
|
+
return args[0];
|
|
27
|
+
};
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
log
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=log.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/log.ts"],
|
|
4
|
+
"sourcesContent": ["export const log = (...args: any) => {\n console.log(...args)\n return args[0]\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,MAAM,IAAI,SAAc;AACnC,UAAQ,IAAI,GAAG,IAAI;AACnB,SAAO,KAAK;AACd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/log.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/log.ts"],
|
|
4
|
+
"sourcesContent": ["export const log = (...args: any) => {\n console.log(...args)\n return args[0]\n}\n"],
|
|
5
|
+
"mappings": "AAAO,MAAM,MAAM,IAAI,SAAc;AACnC,UAAQ,IAAI,GAAG,IAAI;AACnB,SAAO,KAAK;AACd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -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,12 @@
|
|
|
1
|
+
function composeEventHandlers(og, next, { checkDefaultPrevented = true } = {}) {
|
|
2
|
+
return function composedEventHandler(event) {
|
|
3
|
+
og?.(event);
|
|
4
|
+
if (!checkDefaultPrevented || !("defaultPrevented" in event) || "defaultPrevented" in event && !event.defaultPrevented) {
|
|
5
|
+
return next?.(event);
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
composeEventHandlers
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=composeEventHandlers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/composeEventHandlers.ts"],
|
|
4
|
+
"sourcesContent": ["type Events = any\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 return function composedEventHandler(event: E) {\n og?.(event)\n if (\n !checkDefaultPrevented ||\n // @ts-ignore\n !('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,SAAO,SAAS,qBAAqB,OAAU;AAC7C,SAAK,KAAK;AACV,QACE,CAAC,yBAED,EAAE,sBAAsB,UAEvB,sBAAsB,SAAS,CAAC,MAAM,kBACvC;AACA,aAAO,OAAO,KAAK;AAAA,IACrB;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.js.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;AAEjB,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;AAEnB,UAAI,CAAC,QAAQ,SAAS;AAAK;AAC3B,UAAI,KAAK,OAAO,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;AAGnC,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;AAC7B,mBAAO,MAAM,GAAG,YAAY,YAAY,GAAG,YAAY,GAAG,aAAa;AAAA,UACzE;AACA,gBAAM,MAAM,MAAM,YAAY,MAAM,GAAG,cAAc;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
|
+
}
|
package/dist/jsx/log.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/log.ts"],
|
|
4
|
+
"sourcesContent": ["export const log = (...args: any) => {\n console.log(...args)\n return args[0]\n}\n"],
|
|
5
|
+
"mappings": "AAAO,MAAM,MAAM,IAAI,SAAc;AACnC,UAAQ,IAAI,GAAG,IAAI;AACnB,SAAO,KAAK;AACd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,169 @@
|
|
|
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
|
+
...process.env.TAMAGUI_TARGET === "web" && {
|
|
105
|
+
overflowX: true,
|
|
106
|
+
overflowY: true,
|
|
107
|
+
userSelect: true,
|
|
108
|
+
cursor: true,
|
|
109
|
+
contain: true,
|
|
110
|
+
pointerEvents: true,
|
|
111
|
+
boxSizing: true,
|
|
112
|
+
boxShadow: true
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
const stylePropsTextOnly = Object.freeze({
|
|
116
|
+
color: true,
|
|
117
|
+
fontFamily: true,
|
|
118
|
+
fontSize: true,
|
|
119
|
+
fontStyle: true,
|
|
120
|
+
fontWeight: true,
|
|
121
|
+
letterSpacing: true,
|
|
122
|
+
lineHeight: true,
|
|
123
|
+
textAlign: true,
|
|
124
|
+
textDecorationLine: true,
|
|
125
|
+
textDecorationStyle: true,
|
|
126
|
+
textDecorationColor: true,
|
|
127
|
+
textShadowColor: true,
|
|
128
|
+
textShadowOffset: true,
|
|
129
|
+
textShadowRadius: true,
|
|
130
|
+
textTransform: true,
|
|
131
|
+
...process.env.TAMAGUI_TARGET === "web" && {
|
|
132
|
+
whiteSpace: true,
|
|
133
|
+
wordWrap: true,
|
|
134
|
+
textOverflow: true,
|
|
135
|
+
textDecorationDistance: true,
|
|
136
|
+
userSelect: true,
|
|
137
|
+
selectable: true,
|
|
138
|
+
cursor: true,
|
|
139
|
+
WebkitLineClamp: true,
|
|
140
|
+
WebkitBoxOrient: true
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
const stylePropsText = Object.freeze({
|
|
144
|
+
...stylePropsView,
|
|
145
|
+
...stylePropsTextOnly
|
|
146
|
+
});
|
|
147
|
+
const stylePropsAll = stylePropsText;
|
|
148
|
+
const validPseudoKeys = Object.freeze({
|
|
149
|
+
enterStyle: true,
|
|
150
|
+
exitStyle: true,
|
|
151
|
+
hoverStyle: true,
|
|
152
|
+
pressStyle: true,
|
|
153
|
+
focusStyle: true
|
|
154
|
+
});
|
|
155
|
+
const validStyles = Object.freeze({
|
|
156
|
+
...validPseudoKeys,
|
|
157
|
+
...stylePropsView
|
|
158
|
+
});
|
|
159
|
+
export {
|
|
160
|
+
stylePropsAll,
|
|
161
|
+
stylePropsText,
|
|
162
|
+
stylePropsTextOnly,
|
|
163
|
+
stylePropsTransform,
|
|
164
|
+
stylePropsView,
|
|
165
|
+
validPseudoKeys,
|
|
166
|
+
validStyles,
|
|
167
|
+
validStylesOnBaseProps
|
|
168
|
+
};
|
|
169
|
+
//# sourceMappingURL=validStyleProps.js.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 }),\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 validStyles = Object.freeze({\n ...validPseudoKeys,\n ...stylePropsView,\n})\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.228",
|
|
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.0.1-beta.
|
|
22
|
+
"@tamagui/simple-hash": "^1.0.1-beta.228"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@tamagui/build": "^1.0.1-beta.
|
|
25
|
+
"@tamagui/build": "^1.0.1-beta.228"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|