@tamagui/helpers 2.0.0-rc.4 → 2.0.0-rc.40
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.cjs +12 -10
- package/dist/cjs/clamp.native.js +12 -10
- package/dist/cjs/clamp.native.js.map +1 -1
- package/dist/cjs/composeEventHandlers.cjs +22 -14
- package/dist/cjs/composeEventHandlers.native.js +23 -15
- package/dist/cjs/composeEventHandlers.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -5
- package/dist/cjs/index.native.js +7 -5
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/shouldRenderNativePlatform.cjs +28 -15
- package/dist/cjs/shouldRenderNativePlatform.native.js +44 -28
- package/dist/cjs/shouldRenderNativePlatform.native.js.map +1 -1
- package/dist/cjs/types.cjs +17 -15
- package/dist/cjs/types.native.js +17 -15
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/validStyleProps.cjs +308 -273
- package/dist/cjs/validStyleProps.native.js +303 -268
- package/dist/cjs/validStyleProps.native.js.map +1 -1
- package/dist/cjs/webOnlyStyleProps.cjs +88 -78
- package/dist/cjs/webOnlyStyleProps.native.js +88 -78
- package/dist/cjs/webOnlyStyleProps.native.js.map +1 -1
- package/dist/cjs/withStaticProperties.cjs +18 -12
- package/dist/cjs/withStaticProperties.native.js +18 -14
- package/dist/cjs/withStaticProperties.native.js.map +1 -1
- package/dist/esm/composeEventHandlers.mjs +10 -4
- package/dist/esm/composeEventHandlers.mjs.map +1 -1
- package/dist/esm/composeEventHandlers.native.js +11 -5
- package/dist/esm/composeEventHandlers.native.js.map +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/index.js.map +1 -6
- package/dist/esm/shouldRenderNativePlatform.mjs +16 -5
- package/dist/esm/shouldRenderNativePlatform.mjs.map +1 -1
- package/dist/esm/shouldRenderNativePlatform.native.js +30 -16
- package/dist/esm/shouldRenderNativePlatform.native.js.map +1 -1
- package/dist/esm/types.mjs +5 -5
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +5 -5
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/validStyleProps.mjs +294 -263
- package/dist/esm/validStyleProps.mjs.map +1 -1
- package/dist/esm/validStyleProps.native.js +288 -257
- package/dist/esm/validStyleProps.native.js.map +1 -1
- package/dist/esm/webOnlyStyleProps.mjs +75 -69
- package/dist/esm/webOnlyStyleProps.mjs.map +1 -1
- package/dist/esm/webOnlyStyleProps.native.js +75 -69
- package/dist/esm/webOnlyStyleProps.native.js.map +1 -1
- package/dist/esm/withStaticProperties.mjs +6 -2
- package/dist/esm/withStaticProperties.mjs.map +1 -1
- package/dist/esm/withStaticProperties.native.js +6 -4
- package/dist/esm/withStaticProperties.native.js.map +1 -1
- package/package.json +7 -10
- package/src/validStyleProps.ts +104 -38
- package/src/webOnlyStyleProps.ts +40 -29
- package/types/validStyleProps.d.ts +337 -238
- package/types/validStyleProps.d.ts.map +1 -1
- package/types/webOnlyStyleProps.d.ts +60 -20
- package/types/webOnlyStyleProps.d.ts.map +1 -1
- package/dist/cjs/clamp.js +0 -23
- package/dist/cjs/clamp.js.map +0 -6
- package/dist/cjs/composeEventHandlers.js +0 -27
- package/dist/cjs/composeEventHandlers.js.map +0 -6
- package/dist/cjs/index.js +0 -22
- package/dist/cjs/index.js.map +0 -6
- package/dist/cjs/shouldRenderNativePlatform.js +0 -35
- package/dist/cjs/shouldRenderNativePlatform.js.map +0 -6
- package/dist/cjs/types.js +0 -25
- package/dist/cjs/types.js.map +0 -6
- package/dist/cjs/validStyleProps.js +0 -283
- package/dist/cjs/validStyleProps.js.map +0 -6
- package/dist/cjs/webOnlyStyleProps.js +0 -89
- package/dist/cjs/webOnlyStyleProps.js.map +0 -6
- package/dist/cjs/withStaticProperties.js +0 -21
- package/dist/cjs/withStaticProperties.js.map +0 -6
- package/dist/esm/clamp.js +0 -7
- package/dist/esm/clamp.js.map +0 -6
- package/dist/esm/composeEventHandlers.js +0 -11
- package/dist/esm/composeEventHandlers.js.map +0 -6
- package/dist/esm/shouldRenderNativePlatform.js +0 -19
- package/dist/esm/shouldRenderNativePlatform.js.map +0 -6
- package/dist/esm/types.js +0 -9
- package/dist/esm/types.js.map +0 -6
- package/dist/esm/validStyleProps.js +0 -268
- package/dist/esm/validStyleProps.js.map +0 -6
- package/dist/esm/webOnlyStyleProps.js +0 -73
- package/dist/esm/webOnlyStyleProps.js.map +0 -6
- package/dist/esm/withStaticProperties.js +0 -5
- package/dist/esm/withStaticProperties.js.map +0 -6
|
@@ -3,93 +3,103 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
14
|
get: () => from[key],
|
|
14
15
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
18
20
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
-
value:
|
|
21
|
+
value: true
|
|
20
22
|
}), mod);
|
|
21
23
|
var webOnlyStyleProps_exports = {};
|
|
22
24
|
__export(webOnlyStyleProps_exports, {
|
|
25
|
+
nonAnimatableWebTextProps: () => nonAnimatableWebTextProps,
|
|
26
|
+
nonAnimatableWebViewProps: () => nonAnimatableWebViewProps,
|
|
23
27
|
webOnlyStylePropsText: () => webOnlyStylePropsText,
|
|
24
28
|
webOnlyStylePropsView: () => webOnlyStylePropsView
|
|
25
29
|
});
|
|
26
30
|
module.exports = __toCommonJS(webOnlyStyleProps_exports);
|
|
31
|
+
const nonAnimatableWebViewProps = {
|
|
32
|
+
backgroundAttachment: true,
|
|
33
|
+
backgroundBlendMode: true,
|
|
34
|
+
backgroundClip: true,
|
|
35
|
+
backgroundOrigin: true,
|
|
36
|
+
backgroundRepeat: true,
|
|
37
|
+
borderBottomStyle: true,
|
|
38
|
+
borderLeftStyle: true,
|
|
39
|
+
borderRightStyle: true,
|
|
40
|
+
borderTopStyle: true,
|
|
41
|
+
contain: true,
|
|
42
|
+
containerType: true,
|
|
43
|
+
content: true,
|
|
44
|
+
float: true,
|
|
45
|
+
maskBorderMode: true,
|
|
46
|
+
maskBorderRepeat: true,
|
|
47
|
+
maskClip: true,
|
|
48
|
+
maskComposite: true,
|
|
49
|
+
maskMode: true,
|
|
50
|
+
maskOrigin: true,
|
|
51
|
+
maskRepeat: true,
|
|
52
|
+
maskType: true,
|
|
53
|
+
objectFit: true,
|
|
54
|
+
overflowBlock: true,
|
|
55
|
+
overflowInline: true,
|
|
56
|
+
overflowX: true,
|
|
57
|
+
overflowY: true,
|
|
58
|
+
// NOTE: pointerEvents is NOT web-only - it's a core React Native View prop (not a style)
|
|
59
|
+
pointerEvents: true,
|
|
60
|
+
scrollbarWidth: true,
|
|
61
|
+
textWrap: true,
|
|
62
|
+
touchAction: true,
|
|
63
|
+
transformStyle: true,
|
|
64
|
+
willChange: true
|
|
65
|
+
};
|
|
66
|
+
const nonAnimatableWebTextProps = {
|
|
67
|
+
whiteSpace: true,
|
|
68
|
+
wordWrap: true,
|
|
69
|
+
textOverflow: true,
|
|
70
|
+
WebkitBoxOrient: true
|
|
71
|
+
};
|
|
27
72
|
const webOnlyStylePropsView = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
maskBorderSource: !0,
|
|
62
|
-
maskBorderWidth: !0,
|
|
63
|
-
maskClip: !0,
|
|
64
|
-
maskComposite: !0,
|
|
65
|
-
maskImage: !0,
|
|
66
|
-
maskMode: !0,
|
|
67
|
-
maskOrigin: !0,
|
|
68
|
-
maskPosition: !0,
|
|
69
|
-
maskRepeat: !0,
|
|
70
|
-
maskSize: !0,
|
|
71
|
-
maskType: !0,
|
|
72
|
-
objectFit: !0,
|
|
73
|
-
objectPosition: !0,
|
|
74
|
-
overflowBlock: !0,
|
|
75
|
-
overflowInline: !0,
|
|
76
|
-
overflowX: !0,
|
|
77
|
-
overflowY: !0,
|
|
78
|
-
// NOTE: pointerEvents is NOT web-only - it's a core React Native View prop (not a style)
|
|
79
|
-
pointerEvents: !0,
|
|
80
|
-
scrollbarWidth: !0,
|
|
81
|
-
textEmphasis: !0,
|
|
82
|
-
touchAction: !0,
|
|
83
|
-
transformStyle: !0,
|
|
84
|
-
userSelect: !0,
|
|
85
|
-
willChange: !0
|
|
86
|
-
},
|
|
87
|
-
webOnlyStylePropsText = {
|
|
88
|
-
whiteSpace: !0,
|
|
89
|
-
wordWrap: !0,
|
|
90
|
-
textOverflow: !0,
|
|
91
|
-
textDecorationDistance: !0,
|
|
92
|
-
// cursor: now cross-platform - in stylePropsView
|
|
93
|
-
WebkitLineClamp: !0,
|
|
94
|
-
WebkitBoxOrient: !0
|
|
95
|
-
};
|
|
73
|
+
...nonAnimatableWebViewProps,
|
|
74
|
+
transition: true,
|
|
75
|
+
backdropFilter: true,
|
|
76
|
+
WebkitBackdropFilter: true,
|
|
77
|
+
background: true,
|
|
78
|
+
borderTop: true,
|
|
79
|
+
borderRight: true,
|
|
80
|
+
borderBottom: true,
|
|
81
|
+
borderLeft: true,
|
|
82
|
+
backgroundPosition: true,
|
|
83
|
+
backgroundSize: true,
|
|
84
|
+
borderImage: true,
|
|
85
|
+
caretColor: true,
|
|
86
|
+
clipPath: true,
|
|
87
|
+
mask: true,
|
|
88
|
+
maskBorder: true,
|
|
89
|
+
maskBorderOutset: true,
|
|
90
|
+
maskBorderSlice: true,
|
|
91
|
+
maskBorderSource: true,
|
|
92
|
+
maskBorderWidth: true,
|
|
93
|
+
maskImage: true,
|
|
94
|
+
maskPosition: true,
|
|
95
|
+
maskSize: true,
|
|
96
|
+
objectPosition: true,
|
|
97
|
+
textEmphasis: true,
|
|
98
|
+
userSelect: true
|
|
99
|
+
};
|
|
100
|
+
const webOnlyStylePropsText = {
|
|
101
|
+
...nonAnimatableWebTextProps,
|
|
102
|
+
textDecorationDistance: true,
|
|
103
|
+
// cursor: now cross-platform - in stylePropsView
|
|
104
|
+
WebkitLineClamp: true
|
|
105
|
+
};
|
|
@@ -5,94 +5,104 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
23
|
+
value: true
|
|
22
24
|
}), mod);
|
|
23
25
|
var webOnlyStyleProps_exports = {};
|
|
24
26
|
__export(webOnlyStyleProps_exports, {
|
|
27
|
+
nonAnimatableWebTextProps: () => nonAnimatableWebTextProps,
|
|
28
|
+
nonAnimatableWebViewProps: () => nonAnimatableWebViewProps,
|
|
25
29
|
webOnlyStylePropsText: () => webOnlyStylePropsText,
|
|
26
30
|
webOnlyStylePropsView: () => webOnlyStylePropsView
|
|
27
31
|
});
|
|
28
32
|
module.exports = __toCommonJS(webOnlyStyleProps_exports);
|
|
33
|
+
var nonAnimatableWebViewProps = {
|
|
34
|
+
backgroundAttachment: true,
|
|
35
|
+
backgroundBlendMode: true,
|
|
36
|
+
backgroundClip: true,
|
|
37
|
+
backgroundOrigin: true,
|
|
38
|
+
backgroundRepeat: true,
|
|
39
|
+
borderBottomStyle: true,
|
|
40
|
+
borderLeftStyle: true,
|
|
41
|
+
borderRightStyle: true,
|
|
42
|
+
borderTopStyle: true,
|
|
43
|
+
contain: true,
|
|
44
|
+
containerType: true,
|
|
45
|
+
content: true,
|
|
46
|
+
float: true,
|
|
47
|
+
maskBorderMode: true,
|
|
48
|
+
maskBorderRepeat: true,
|
|
49
|
+
maskClip: true,
|
|
50
|
+
maskComposite: true,
|
|
51
|
+
maskMode: true,
|
|
52
|
+
maskOrigin: true,
|
|
53
|
+
maskRepeat: true,
|
|
54
|
+
maskType: true,
|
|
55
|
+
objectFit: true,
|
|
56
|
+
overflowBlock: true,
|
|
57
|
+
overflowInline: true,
|
|
58
|
+
overflowX: true,
|
|
59
|
+
overflowY: true,
|
|
60
|
+
// NOTE: pointerEvents is NOT web-only - it's a core React Native View prop (not a style)
|
|
61
|
+
pointerEvents: true,
|
|
62
|
+
scrollbarWidth: true,
|
|
63
|
+
textWrap: true,
|
|
64
|
+
touchAction: true,
|
|
65
|
+
transformStyle: true,
|
|
66
|
+
willChange: true
|
|
67
|
+
};
|
|
68
|
+
var nonAnimatableWebTextProps = {
|
|
69
|
+
whiteSpace: true,
|
|
70
|
+
wordWrap: true,
|
|
71
|
+
textOverflow: true,
|
|
72
|
+
WebkitBoxOrient: true
|
|
73
|
+
};
|
|
29
74
|
var webOnlyStylePropsView = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
maskBorderSource: !0,
|
|
64
|
-
maskBorderWidth: !0,
|
|
65
|
-
maskClip: !0,
|
|
66
|
-
maskComposite: !0,
|
|
67
|
-
maskImage: !0,
|
|
68
|
-
maskMode: !0,
|
|
69
|
-
maskOrigin: !0,
|
|
70
|
-
maskPosition: !0,
|
|
71
|
-
maskRepeat: !0,
|
|
72
|
-
maskSize: !0,
|
|
73
|
-
maskType: !0,
|
|
74
|
-
objectFit: !0,
|
|
75
|
-
objectPosition: !0,
|
|
76
|
-
overflowBlock: !0,
|
|
77
|
-
overflowInline: !0,
|
|
78
|
-
overflowX: !0,
|
|
79
|
-
overflowY: !0,
|
|
80
|
-
// NOTE: pointerEvents is NOT web-only - it's a core React Native View prop (not a style)
|
|
81
|
-
pointerEvents: !0,
|
|
82
|
-
scrollbarWidth: !0,
|
|
83
|
-
textEmphasis: !0,
|
|
84
|
-
touchAction: !0,
|
|
85
|
-
transformStyle: !0,
|
|
86
|
-
userSelect: !0,
|
|
87
|
-
willChange: !0
|
|
88
|
-
},
|
|
89
|
-
webOnlyStylePropsText = {
|
|
90
|
-
whiteSpace: !0,
|
|
91
|
-
wordWrap: !0,
|
|
92
|
-
textOverflow: !0,
|
|
93
|
-
textDecorationDistance: !0,
|
|
94
|
-
// cursor: now cross-platform - in stylePropsView
|
|
95
|
-
WebkitLineClamp: !0,
|
|
96
|
-
WebkitBoxOrient: !0
|
|
97
|
-
};
|
|
75
|
+
...nonAnimatableWebViewProps,
|
|
76
|
+
transition: true,
|
|
77
|
+
backdropFilter: true,
|
|
78
|
+
WebkitBackdropFilter: true,
|
|
79
|
+
background: true,
|
|
80
|
+
borderTop: true,
|
|
81
|
+
borderRight: true,
|
|
82
|
+
borderBottom: true,
|
|
83
|
+
borderLeft: true,
|
|
84
|
+
backgroundPosition: true,
|
|
85
|
+
backgroundSize: true,
|
|
86
|
+
borderImage: true,
|
|
87
|
+
caretColor: true,
|
|
88
|
+
clipPath: true,
|
|
89
|
+
mask: true,
|
|
90
|
+
maskBorder: true,
|
|
91
|
+
maskBorderOutset: true,
|
|
92
|
+
maskBorderSlice: true,
|
|
93
|
+
maskBorderSource: true,
|
|
94
|
+
maskBorderWidth: true,
|
|
95
|
+
maskImage: true,
|
|
96
|
+
maskPosition: true,
|
|
97
|
+
maskSize: true,
|
|
98
|
+
objectPosition: true,
|
|
99
|
+
textEmphasis: true,
|
|
100
|
+
userSelect: true
|
|
101
|
+
};
|
|
102
|
+
var webOnlyStylePropsText = {
|
|
103
|
+
...nonAnimatableWebTextProps,
|
|
104
|
+
textDecorationDistance: true,
|
|
105
|
+
// cursor: now cross-platform - in stylePropsView
|
|
106
|
+
WebkitLineClamp: true
|
|
107
|
+
};
|
|
98
108
|
//# sourceMappingURL=webOnlyStyleProps.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","webOnlyStyleProps_exports","__export","webOnlyStylePropsText","webOnlyStylePropsView","module","exports","
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","webOnlyStyleProps_exports","__export","nonAnimatableWebTextProps","nonAnimatableWebViewProps","webOnlyStylePropsText","webOnlyStylePropsView","module","exports","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundOrigin","backgroundRepeat","borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle","contain","containerType","content","float","maskBorderMode","maskBorderRepeat","maskClip","maskComposite","maskMode","maskOrigin","maskRepeat","maskType","objectFit","overflowBlock","overflowInline","overflowX","overflowY","pointerEvents","scrollbarWidth","textWrap","touchAction","transformStyle","willChange","whiteSpace","wordWrap","textOverflow","WebkitBoxOrient","transition","backdropFilter","WebkitBackdropFilter","background","borderTop","borderRight","borderBottom","borderLeft","backgroundPosition","backgroundSize","borderImage","caretColor","clipPath","mask","maskBorder","maskBorderOutset","maskBorderSlice","maskBorderSource","maskBorderWidth","maskImage","maskPosition","maskSize","objectPosition","textEmphasis","userSelect","textDecorationDistance","WebkitLineClamp"],"sources":["../../src/webOnlyStyleProps.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,yBAAA;AAAAC,QAAA,CAAAD,yBAAA;EAAAE,yBAAA,EAAAA,CAAA,KAAAA,yBAAA;EAAAC,yBAAA,EAAAA,CAAA,KAAAA,yBAAA;EAAAC,qBAAA,EAAAA,CAAA,KAAAA,qBAAA;EAAAC,qBAAA,EAAAA,CAAA,KAAAA;AAAA;AAMOC,MAAM,CAAAC,OAAA,GAAAZ,YAAA,CAAAK,yBAA4B;AAAA,IACvCG,yBAAsB;EACtBK,oBAAA,EAAqB;EACrBC,mBAAgB;EAChBC,cAAA,MAAkB;EAClBC,gBAAA,EAAkB;EAClBC,gBAAA,MAAmB;EACnBC,iBAAiB;EACjBC,eAAA,MAAkB;EAClBC,gBAAgB;EAChBC,cAAS;EACTC,OAAA;EACAC,aAAS;EACTC,OAAO;EACPC,KAAA;EACAC,cAAA,MAAkB;EAClBC,gBAAU;EACVC,QAAA;EACAC,aAAU;EACVC,QAAA,MAAY;EACZC,UAAA,EAAY;EACZC,UAAU;EACVC,QAAA,MAAW;EACXC,SAAA,MAAe;EACfC,aAAA,MAAgB;EAChBC,cAAW;EACXC,SAAA,EAAW;EAAAC,SAAA;EAEX;EACAC,aAAA,MAAgB;EAChBC,cAAU;EACVC,QAAA,MAAa;EACbC,WAAA,MAAgB;EAChBC,cAAY;EACdC,UAAA;AAGO;AAAkC,IACvCrC,yBAAY;EACZsC,UAAU;EACVC,QAAA,MAAc;EACdC,YAAA,MAAiB;EACnBC,eAAA;AAEO;AAA8B,IACnCtC,qBAAG;EACH,GAAAF,yBAAY;EACZyC,UAAA,MAAgB;EAChBC,cAAA;EACAC,oBAAY;EACZC,UAAA,EAAW;EACXC,SAAA,MAAa;EACbC,WAAA,MAAc;EACdC,YAAY;EACZC,UAAA;EACAC,kBAAgB;EAChBC,cAAa;EACbC,WAAA,EAAY;EACZC,UAAU;EACVC,QAAM;EACNC,IAAA;EACAC,UAAA;EACAC,gBAAA,EAAiB;EACjBC,eAAA,MAAkB;EAClBC,gBAAA,EAAiB;EACjBC,eAAW;EACXC,SAAA,MAAc;EACdC,YAAU;EACVC,QAAA;EACAC,cAAc;EACdC,YAAY;EACdC,UAAA;AAEO;AAA8B,IACnChE,qBAAG;EACH,GAAAF,yBAAwB;EAAAmE,sBAAA;EAExB;EACFC,eAAA","ignoreList":[]}
|
|
@@ -3,25 +3,31 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
14
|
get: () => from[key],
|
|
14
15
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
18
20
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
-
value:
|
|
21
|
+
value: true
|
|
20
22
|
}), mod);
|
|
21
23
|
var withStaticProperties_exports = {};
|
|
22
24
|
__export(withStaticProperties_exports, {
|
|
23
25
|
withStaticProperties: () => withStaticProperties
|
|
24
26
|
});
|
|
25
27
|
module.exports = __toCommonJS(withStaticProperties_exports);
|
|
26
|
-
const Decorated = /* @__PURE__ */Symbol()
|
|
27
|
-
|
|
28
|
+
const Decorated = /* @__PURE__ */Symbol();
|
|
29
|
+
const withStaticProperties = (component, staticProps) => {
|
|
30
|
+
Object.assign(component, staticProps);
|
|
31
|
+
component[Decorated] = true;
|
|
32
|
+
return component;
|
|
33
|
+
};
|
|
@@ -5,28 +5,32 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
23
|
+
value: true
|
|
22
24
|
}), mod);
|
|
23
25
|
var withStaticProperties_exports = {};
|
|
24
26
|
__export(withStaticProperties_exports, {
|
|
25
27
|
withStaticProperties: () => withStaticProperties
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(withStaticProperties_exports);
|
|
28
|
-
var Decorated = /* @__PURE__ */Symbol()
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
var Decorated = /* @__PURE__ */Symbol();
|
|
31
|
+
var withStaticProperties = function (component, staticProps) {
|
|
32
|
+
Object.assign(component, staticProps);
|
|
33
|
+
component[Decorated] = true;
|
|
34
|
+
return component;
|
|
35
|
+
};
|
|
32
36
|
//# sourceMappingURL=withStaticProperties.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","withStaticProperties_exports","__export","withStaticProperties","module","exports"],"sources":["../../src/withStaticProperties.tsx"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","withStaticProperties_exports","__export","withStaticProperties","module","exports","Decorated","Symbol","component","staticProps","Object","assign"],"sources":["../../src/withStaticProperties.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,4BAAA;AAAAC,QAAA,CAAAD,4BAAA;EAAAE,oBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAM,CAAAC,OAAA,GAAAT,YAAY,CAAAK,4BAAO;AAIlB,IAAAK,SAAM,kBACXC,MAAA;AAIA,IAAAJ,oBAAc,GAAW,SAAAA,CAAAK,SAAW,EAAAC,WAAA;EACpCC,MAAA,CAAAC,MAAU,CAAAH,SAAa,EAAAC,WAAA;EAEvBD,SAAO,CAAAF,SAAA;EACT,OAAAE,SAAA","ignoreList":[]}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
function composeEventHandlers(og, next, {
|
|
2
|
-
checkDefaultPrevented =
|
|
2
|
+
checkDefaultPrevented = true
|
|
3
3
|
} = {}) {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
if (!og || !next) {
|
|
5
|
+
return next || og || void 0;
|
|
6
|
+
}
|
|
7
|
+
return event => {
|
|
8
|
+
og?.(event);
|
|
9
|
+
if (!event || !(checkDefaultPrevented && typeof event === "object" && "defaultPrevented" in event) ||
|
|
6
10
|
// @ts-ignore
|
|
7
|
-
"defaultPrevented" in event && !event.defaultPrevented)
|
|
11
|
+
"defaultPrevented" in event && !event.defaultPrevented) {
|
|
12
|
+
return next?.(event);
|
|
13
|
+
}
|
|
8
14
|
};
|
|
9
15
|
}
|
|
10
16
|
export { composeEventHandlers };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["composeEventHandlers","og","next","checkDefaultPrevented","event","defaultPrevented"],"sources":["../../src/composeEventHandlers.ts"],"sourcesContent":[null],"mappings":"AAIO,SAASA,qBACdC,EAAA,EACAC,IAAA,EACA;EAAEC,qBAAA,GAAwB;AAAK,IAAI,CAAC,GACpC;EACA,
|
|
1
|
+
{"version":3,"names":["composeEventHandlers","og","next","checkDefaultPrevented","event","defaultPrevented"],"sources":["../../src/composeEventHandlers.ts"],"sourcesContent":[null],"mappings":"AAIO,SAASA,qBACdC,EAAA,EACAC,IAAA,EACA;EAAEC,qBAAA,GAAwB;AAAK,IAAI,CAAC,GACpC;EACA,IAAI,CAACF,EAAA,IAAM,CAACC,IAAA,EAAM;IAChB,OAAOA,IAAA,IAAQD,EAAA,IAAM;EACvB;EACA,OAAQG,KAAA,IAAa;IACnBH,EAAA,GAAKG,KAAK;IACV,IACE,CAACA,KAAA,IACD,EACED,qBAAA,IACA,OAAOC,KAAA,KAAU,YACjB,sBAAsBA,KAAA;IAAA;IAGvB,sBAAsBA,KAAA,IAAS,CAACA,KAAA,CAAMC,gBAAA,EACvC;MACA,OAAOH,IAAA,GAAOE,KAAK;IACrB;EACF;AACF","ignoreList":[]}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
function _type_of(obj) {
|
|
2
2
|
"@swc/helpers - typeof";
|
|
3
3
|
|
|
4
|
-
return obj && typeof Symbol
|
|
4
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
5
5
|
}
|
|
6
6
|
function composeEventHandlers(og, next) {
|
|
7
7
|
var {
|
|
8
|
-
checkDefaultPrevented =
|
|
8
|
+
checkDefaultPrevented = true
|
|
9
9
|
} = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
if (!og || !next) {
|
|
11
|
+
return next || og || void 0;
|
|
12
|
+
}
|
|
13
|
+
return function (event) {
|
|
14
|
+
og === null || og === void 0 ? void 0 : og(event);
|
|
15
|
+
if (!event || !(checkDefaultPrevented && (typeof event === "undefined" ? "undefined" : _type_of(event)) === "object" && "defaultPrevented" in event) ||
|
|
12
16
|
// @ts-ignore
|
|
13
|
-
"defaultPrevented" in event && !event.defaultPrevented)
|
|
17
|
+
"defaultPrevented" in event && !event.defaultPrevented) {
|
|
18
|
+
return next === null || next === void 0 ? void 0 : next(event);
|
|
19
|
+
}
|
|
14
20
|
};
|
|
15
21
|
}
|
|
16
22
|
export { composeEventHandlers };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_type_of","obj","Symbol","constructor","composeEventHandlers","og","next","checkDefaultPrevented","arguments","length","event"],"sources":["../../src/composeEventHandlers.ts"],"sourcesContent":[null],"mappings":"AAIO,SAASA,SAAAC,GAAA;EAKd,
|
|
1
|
+
{"version":3,"names":["_type_of","obj","Symbol","constructor","composeEventHandlers","og","next","checkDefaultPrevented","arguments","length","event"],"sources":["../../src/composeEventHandlers.ts"],"sourcesContent":[null],"mappings":"AAIO,SAASA,SAAAC,GAAA;EAKd,uBAAkB;;EAChB,OAAAA,GAAO,WAAQC,MAAM,oBAAAD,GAAA,CAAAE,WAAA,KAAAD,MAAA,qBAAAD,GAAA;AAAA;AAEvB,SAAOG,oBAAcA,CAAAC,EAAA,EAAAC,IAAA;EACnB;IAAAC,qBAAU;EAAA,IAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;EACV,KAAAH,EACG,KAAAC,IACD,EACE;IAKD,OAAAA,IAAA,IAAAD,EAAA,SAAsB;EAEvB;EAAmB,OACrB,UAAAK,KAAA;IACFL,EAAA,aAAAA,EAAA,uBAAAA,EAAA,CAAAK,KAAA;IACF,KAAAA,KAAA,MAAAH,qBAAA,YAAAG,KAAA,iCAAAV,QAAA,CAAAU,KAAA,yCAAAA,KAAA;IAAA","ignoreList":[]}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export * from "@tamagui/simple-hash";
|
|
2
|
-
export * from "./clamp";
|
|
3
|
-
export * from "./composeEventHandlers";
|
|
4
|
-
export * from "./types";
|
|
5
|
-
export * from "./shouldRenderNativePlatform";
|
|
6
|
-
export * from "./validStyleProps";
|
|
7
|
-
export * from "./withStaticProperties";
|
|
8
|
-
export * from "./webOnlyStyleProps";
|
|
2
|
+
export * from "./clamp.mjs";
|
|
3
|
+
export * from "./composeEventHandlers.mjs";
|
|
4
|
+
export * from "./types.mjs";
|
|
5
|
+
export * from "./shouldRenderNativePlatform.mjs";
|
|
6
|
+
export * from "./validStyleProps.mjs";
|
|
7
|
+
export * from "./withStaticProperties.mjs";
|
|
8
|
+
export * from "./webOnlyStyleProps.mjs";
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.ts"],
|
|
4
|
-
"mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import { currentPlatform } from "@tamagui/constants";
|
|
2
2
|
const ALL_PLATFORMS = ["web", "android", "ios"];
|
|
3
3
|
function shouldRenderNativePlatform(nativeProp) {
|
|
4
|
-
if (!nativeProp)
|
|
4
|
+
if (!nativeProp) {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
5
7
|
const userRequestedPlatforms = resolvePlatformNames(nativeProp);
|
|
6
|
-
for (const platform of ALL_PLATFORMS)
|
|
8
|
+
for (const platform of ALL_PLATFORMS) {
|
|
9
|
+
if (platform === currentPlatform && userRequestedPlatforms.has(platform)) {
|
|
10
|
+
return platform;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
7
13
|
return null;
|
|
8
14
|
}
|
|
9
15
|
function resolvePlatformNames(nativeProp) {
|
|
10
|
-
const platforms = nativeProp ===
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
const platforms = nativeProp === true ? ALL_PLATFORMS : nativeProp === false ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp];
|
|
17
|
+
const set = new Set(platforms);
|
|
18
|
+
if (set.has("mobile")) {
|
|
19
|
+
set.add("android");
|
|
20
|
+
set.add("ios");
|
|
21
|
+
set.delete("mobile");
|
|
22
|
+
}
|
|
23
|
+
return set;
|
|
13
24
|
}
|
|
14
25
|
export { shouldRenderNativePlatform };
|
|
15
26
|
//# sourceMappingURL=shouldRenderNativePlatform.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["currentPlatform","ALL_PLATFORMS","shouldRenderNativePlatform","nativeProp","userRequestedPlatforms","resolvePlatformNames","platform","has","platforms","Array","isArray","set","Set","add","delete"],"sources":["../../src/shouldRenderNativePlatform.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuB;AAuBhC,MAAMC,aAAA,GAA0C,CAAC,OAAO,WAAW,KAAK;AAajE,SAASC,2BAA2BC,UAAA,EAA0B;EACnE,IAAI,CAACA,UAAA,
|
|
1
|
+
{"version":3,"names":["currentPlatform","ALL_PLATFORMS","shouldRenderNativePlatform","nativeProp","userRequestedPlatforms","resolvePlatformNames","platform","has","platforms","Array","isArray","set","Set","add","delete"],"sources":["../../src/shouldRenderNativePlatform.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuB;AAuBhC,MAAMC,aAAA,GAA0C,CAAC,OAAO,WAAW,KAAK;AAajE,SAASC,2BAA2BC,UAAA,EAA0B;EACnE,IAAI,CAACA,UAAA,EAAY;IACf,OAAO;EACT;EACA,MAAMC,sBAAA,GAAyBC,oBAAA,CAAqBF,UAAU;EAE9D,WAAWG,QAAA,IAAYL,aAAA,EAAe;IACpC,IAAIK,QAAA,KAAaN,eAAA,IAAmBI,sBAAA,CAAuBG,GAAA,CAAID,QAAQ,GAAG;MACxE,OAAOA,QAAA;IACT;EACF;EAEA,OAAO;AACT;AAEA,SAASD,qBAAqBF,UAAA,EAAyB;EACrD,MAAMK,SAAA,GACJL,UAAA,KAAe,OACXF,aAAA,GACAE,UAAA,KAAe,QACb,EAAC,GACDM,KAAA,CAAMC,OAAA,CAAQP,UAAU,IACtBA,UAAA,GACA,CAACA,UAAU;EACrB,MAAMQ,GAAA,GAAM,IAAIC,GAAA,CAAIJ,SAAS;EAE7B,IAAIG,GAAA,CAAIJ,GAAA,CAAI,QAAQ,GAAG;IAErBI,GAAA,CAAIE,GAAA,CAAI,SAAS;IACjBF,GAAA,CAAIE,GAAA,CAAI,KAAK;IACbF,GAAA,CAAIG,MAAA,CAAO,QAAQ;EACrB;EACA,OAAOH,GAAA;AACT","ignoreList":[]}
|