@tamagui/helpers 2.7.7 → 3.0.0-beta.637.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/clamp.cjs +16 -19
- package/dist/cjs/clamp.native.cjs +30 -0
- package/dist/cjs/clamp.native.js +17 -19
- package/dist/cjs/clamp.native.js.map +1 -1
- package/dist/cjs/composeEventHandlers.cjs +26 -32
- package/dist/cjs/composeEventHandlers.native.cjs +43 -0
- package/dist/cjs/composeEventHandlers.native.js +28 -34
- package/dist/cjs/composeEventHandlers.native.js.map +1 -1
- package/dist/cjs/index.cjs +13 -11
- package/dist/cjs/index.native.cjs +31 -0
- package/dist/cjs/index.native.js +13 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/reservedThemeProps.cjs +43 -0
- package/dist/cjs/reservedThemeProps.native.cjs +45 -0
- package/dist/cjs/reservedThemeProps.native.js +47 -0
- package/dist/cjs/reservedThemeProps.native.js.map +1 -0
- package/dist/cjs/shouldRenderNativePlatform.cjs +38 -37
- package/dist/cjs/shouldRenderNativePlatform.native.cjs +71 -0
- package/dist/cjs/shouldRenderNativePlatform.native.js +55 -59
- package/dist/cjs/shouldRenderNativePlatform.native.js.map +1 -1
- package/dist/cjs/themeClassNames.cjs +39 -0
- package/dist/cjs/themeClassNames.native.cjs +42 -0
- package/dist/cjs/themeClassNames.native.js +44 -0
- package/dist/cjs/themeClassNames.native.js.map +1 -0
- package/dist/cjs/tokenCategories.cjs +79 -0
- package/dist/cjs/tokenCategories.native.cjs +80 -0
- package/dist/cjs/tokenCategories.native.js +82 -0
- package/dist/cjs/tokenCategories.native.js.map +1 -0
- package/dist/cjs/types.cjs +19 -20
- package/dist/cjs/types.native.cjs +37 -0
- package/dist/cjs/types.native.js +19 -19
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/validStyleProps.cjs +240 -297
- package/dist/cjs/validStyleProps.native.cjs +277 -0
- package/dist/cjs/validStyleProps.native.js +236 -290
- package/dist/cjs/validStyleProps.native.js.map +1 -1
- package/dist/cjs/webOnlyStyleProps.cjs +85 -86
- package/dist/cjs/webOnlyStyleProps.native.cjs +106 -0
- package/dist/cjs/webOnlyStyleProps.native.js +85 -85
- package/dist/cjs/webOnlyStyleProps.native.js.map +1 -1
- package/dist/cjs/withStaticProperties.cjs +25 -30
- package/dist/cjs/withStaticProperties.native.cjs +38 -0
- package/dist/cjs/withStaticProperties.native.js +26 -30
- package/dist/cjs/withStaticProperties.native.js.map +1 -1
- package/dist/esm/clamp.mjs +2 -1
- package/dist/esm/clamp.mjs.map +1 -1
- package/dist/esm/clamp.native.js +3 -2
- package/dist/esm/clamp.native.js.map +1 -1
- package/dist/esm/composeEventHandlers.mjs +12 -14
- package/dist/esm/composeEventHandlers.mjs.map +1 -1
- package/dist/esm/composeEventHandlers.native.js +14 -17
- package/dist/esm/composeEventHandlers.native.js.map +1 -1
- package/dist/esm/index.js +21 -9
- package/dist/esm/index.mjs +21 -9
- package/dist/esm/index.native.js +21 -9
- package/dist/esm/reservedThemeProps.mjs +22 -0
- package/dist/esm/reservedThemeProps.mjs.map +1 -0
- package/dist/esm/reservedThemeProps.native.js +22 -0
- package/dist/esm/reservedThemeProps.native.js.map +1 -0
- package/dist/esm/shouldRenderNativePlatform.mjs +25 -19
- package/dist/esm/shouldRenderNativePlatform.mjs.map +1 -1
- package/dist/esm/shouldRenderNativePlatform.native.js +42 -42
- package/dist/esm/shouldRenderNativePlatform.native.js.map +1 -1
- package/dist/esm/themeClassNames.mjs +18 -0
- package/dist/esm/themeClassNames.mjs.map +1 -0
- package/dist/esm/themeClassNames.native.js +19 -0
- package/dist/esm/themeClassNames.native.js.map +1 -0
- package/dist/esm/tokenCategories.mjs +58 -0
- package/dist/esm/tokenCategories.mjs.map +1 -0
- package/dist/esm/tokenCategories.native.js +57 -0
- package/dist/esm/tokenCategories.native.js.map +1 -0
- package/dist/esm/types.mjs +1 -0
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +1 -0
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/validStyleProps.mjs +218 -272
- package/dist/esm/validStyleProps.mjs.map +1 -1
- package/dist/esm/validStyleProps.native.js +214 -266
- package/dist/esm/validStyleProps.native.js.map +1 -1
- package/dist/esm/webOnlyStyleProps.mjs +68 -67
- package/dist/esm/webOnlyStyleProps.mjs.map +1 -1
- package/dist/esm/webOnlyStyleProps.native.js +68 -67
- package/dist/esm/webOnlyStyleProps.native.js.map +1 -1
- package/dist/esm/withStaticProperties.mjs +11 -12
- package/dist/esm/withStaticProperties.mjs.map +1 -1
- package/dist/esm/withStaticProperties.native.js +12 -13
- package/dist/esm/withStaticProperties.native.js.map +1 -1
- package/package.json +13 -4
- package/src/composeEventHandlers.ts +6 -10
- package/src/index.ts +3 -0
- package/src/reservedThemeProps.ts +29 -0
- package/src/themeClassNames.ts +28 -0
- package/src/tokenCategories.ts +67 -0
- package/src/validStyleProps.ts +37 -79
- package/src/webOnlyStyleProps.ts +6 -3
- package/types/composeEventHandlers.d.ts.map +1 -1
- package/types/index.d.ts +3 -0
- package/types/index.d.ts.map +1 -1
- package/types/reservedThemeProps.d.ts +12 -0
- package/types/reservedThemeProps.d.ts.map +1 -0
- package/types/themeClassNames.d.ts +11 -0
- package/types/themeClassNames.d.ts.map +1 -0
- package/types/tokenCategories.d.ts +58 -0
- package/types/tokenCategories.d.ts.map +1 -0
- package/types/validStyleProps.d.ts +535 -560
- package/types/validStyleProps.d.ts.map +1 -1
- package/types/webOnlyStyleProps.d.ts +31 -29
- package/types/webOnlyStyleProps.d.ts.map +1 -1
- package/types/withStaticProperties.d.ts.map +1 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
|
@@ -1,77 +1,78 @@
|
|
|
1
1
|
const nonAnimatableWebViewProps = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
willChange: true
|
|
2
|
+
backgroundAttachment: true,
|
|
3
|
+
backgroundBlendMode: true,
|
|
4
|
+
backgroundClip: true,
|
|
5
|
+
backgroundOrigin: true,
|
|
6
|
+
backgroundRepeat: true,
|
|
7
|
+
borderBottomStyle: true,
|
|
8
|
+
borderLeftStyle: true,
|
|
9
|
+
borderRightStyle: true,
|
|
10
|
+
borderTopStyle: true,
|
|
11
|
+
contain: true,
|
|
12
|
+
containerType: true,
|
|
13
|
+
containerName: true,
|
|
14
|
+
content: true,
|
|
15
|
+
float: true,
|
|
16
|
+
maskBorderMode: true,
|
|
17
|
+
maskBorderRepeat: true,
|
|
18
|
+
maskClip: true,
|
|
19
|
+
maskComposite: true,
|
|
20
|
+
maskMode: true,
|
|
21
|
+
maskOrigin: true,
|
|
22
|
+
maskRepeat: true,
|
|
23
|
+
maskType: true,
|
|
24
|
+
objectFit: true,
|
|
25
|
+
overflowBlock: true,
|
|
26
|
+
overflowInline: true,
|
|
27
|
+
overflowX: true,
|
|
28
|
+
overflowY: true,
|
|
29
|
+
scrollbarWidth: true,
|
|
30
|
+
textWrap: true,
|
|
31
|
+
touchAction: true,
|
|
32
|
+
transformStyle: true,
|
|
33
|
+
willChange: true
|
|
35
34
|
};
|
|
36
35
|
const nonAnimatableWebTextProps = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
whiteSpace: true,
|
|
37
|
+
wordWrap: true,
|
|
38
|
+
textOverflow: true,
|
|
39
|
+
WebkitBoxOrient: true
|
|
41
40
|
};
|
|
42
41
|
const webOnlyStylePropsView = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
42
|
+
...nonAnimatableWebViewProps,
|
|
43
|
+
transition: true,
|
|
44
|
+
backdropFilter: true,
|
|
45
|
+
WebkitBackdropFilter: true,
|
|
46
|
+
borderTop: true,
|
|
47
|
+
borderRight: true,
|
|
48
|
+
borderBottom: true,
|
|
49
|
+
borderLeft: true,
|
|
50
|
+
backgroundPosition: true,
|
|
51
|
+
backgroundSize: true,
|
|
52
|
+
borderImage: true,
|
|
53
|
+
caretColor: true,
|
|
54
|
+
clipPath: true,
|
|
55
|
+
mask: true,
|
|
56
|
+
maskBorder: true,
|
|
57
|
+
maskBorderOutset: true,
|
|
58
|
+
maskBorderSlice: true,
|
|
59
|
+
maskBorderSource: true,
|
|
60
|
+
maskBorderWidth: true,
|
|
61
|
+
maskImage: true,
|
|
62
|
+
maskPosition: true,
|
|
63
|
+
maskSize: true,
|
|
64
|
+
objectPosition: true,
|
|
65
|
+
textEmphasis: true,
|
|
66
|
+
userSelect: true,
|
|
67
|
+
overflowWrap: true,
|
|
68
|
+
wordWrap: true,
|
|
69
|
+
resize: true
|
|
69
70
|
};
|
|
70
71
|
const webOnlyStylePropsText = {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
WebkitLineClamp: true
|
|
72
|
+
...nonAnimatableWebTextProps,
|
|
73
|
+
textDecorationDistance: true,
|
|
74
|
+
WebkitLineClamp: true
|
|
75
75
|
};
|
|
76
|
+
|
|
76
77
|
export { nonAnimatableWebTextProps, nonAnimatableWebViewProps, webOnlyStylePropsText, webOnlyStylePropsView };
|
|
77
78
|
//# sourceMappingURL=webOnlyStyleProps.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"webOnlyStyleProps.js","names":[],"sources":["esm/webOnlyStyleProps.js"],"sourcesContent":["const nonAnimatableWebViewProps = {\n backgroundAttachment: true,\n backgroundBlendMode: true,\n backgroundClip: true,\n backgroundOrigin: true,\n backgroundRepeat: true,\n borderBottomStyle: true,\n borderLeftStyle: true,\n borderRightStyle: true,\n borderTopStyle: true,\n contain: true,\n containerType: true,\n containerName: true,\n content: true,\n float: true,\n maskBorderMode: true,\n maskBorderRepeat: true,\n maskClip: true,\n maskComposite: true,\n maskMode: true,\n maskOrigin: true,\n maskRepeat: true,\n maskType: true,\n objectFit: true,\n overflowBlock: true,\n overflowInline: true,\n overflowX: true,\n overflowY: true,\n scrollbarWidth: true,\n textWrap: true,\n touchAction: true,\n transformStyle: true,\n willChange: true\n};\nconst nonAnimatableWebTextProps = {\n whiteSpace: true,\n wordWrap: true,\n textOverflow: true,\n WebkitBoxOrient: true\n};\nconst webOnlyStylePropsView = {\n ...nonAnimatableWebViewProps,\n transition: true,\n backdropFilter: true,\n WebkitBackdropFilter: true,\n borderTop: true,\n borderRight: true,\n borderBottom: true,\n borderLeft: true,\n backgroundPosition: true,\n backgroundSize: true,\n borderImage: true,\n caretColor: true,\n clipPath: true,\n mask: true,\n maskBorder: true,\n maskBorderOutset: true,\n maskBorderSlice: true,\n maskBorderSource: true,\n maskBorderWidth: true,\n maskImage: true,\n maskPosition: true,\n maskSize: true,\n objectPosition: true,\n textEmphasis: true,\n userSelect: true,\n // real style keys, not DOM attributes: without these an authored value falls\n // through to viewProps and reaches the element as an unknown attribute\n overflowWrap: true,\n wordWrap: true,\n resize: true\n};\nconst webOnlyStylePropsText = {\n ...nonAnimatableWebTextProps,\n textDecorationDistance: true,\n // cursor: now cross-platform - in stylePropsView\n WebkitLineClamp: true\n};\nexport {\n nonAnimatableWebTextProps,\n nonAnimatableWebViewProps,\n webOnlyStylePropsText,\n webOnlyStylePropsView\n};\n//# sourceMappingURL=webOnlyStyleProps.js.map\n"],"mappings":";AAAA,MAAM,4BAA4B;CAChC,sBAAsB;CACtB,qBAAqB;CACrB,gBAAgB;CAChB,kBAAkB;CAClB,kBAAkB;CAClB,mBAAmB;CACnB,iBAAiB;CACjB,kBAAkB;CAClB,gBAAgB;CAChB,SAAS;CACT,eAAe;CACf,eAAe;CACf,SAAS;CACT,OAAO;CACP,gBAAgB;CAChB,kBAAkB;CAClB,UAAU;CACV,eAAe;CACf,UAAU;CACV,YAAY;CACZ,YAAY;CACZ,UAAU;CACV,WAAW;CACX,eAAe;CACf,gBAAgB;CAChB,WAAW;CACX,WAAW;CACX,gBAAgB;CAChB,UAAU;CACV,aAAa;CACb,gBAAgB;CAChB,YAAY;AACd;AACA,MAAM,4BAA4B;CAChC,YAAY;CACZ,UAAU;CACV,cAAc;CACd,iBAAiB;AACnB;AACA,MAAM,wBAAwB;CAC5B,GAAG;CACH,YAAY;CACZ,gBAAgB;CAChB,sBAAsB;CACtB,WAAW;CACX,aAAa;CACb,cAAc;CACd,YAAY;CACZ,oBAAoB;CACpB,gBAAgB;CAChB,aAAa;CACb,YAAY;CACZ,UAAU;CACV,MAAM;CACN,YAAY;CACZ,kBAAkB;CAClB,iBAAiB;CACjB,kBAAkB;CAClB,iBAAiB;CACjB,WAAW;CACX,cAAc;CACd,UAAU;CACV,gBAAgB;CAChB,cAAc;CACd,YAAY;CAGZ,cAAc;CACd,UAAU;CACV,QAAQ;AACV;AACA,MAAM,wBAAwB;CAC5B,GAAG;CACH,wBAAwB;CAExB,iBAAiB;AACnB"}
|
|
@@ -1,77 +1,78 @@
|
|
|
1
1
|
var nonAnimatableWebViewProps = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
willChange: true
|
|
2
|
+
backgroundAttachment: true,
|
|
3
|
+
backgroundBlendMode: true,
|
|
4
|
+
backgroundClip: true,
|
|
5
|
+
backgroundOrigin: true,
|
|
6
|
+
backgroundRepeat: true,
|
|
7
|
+
borderBottomStyle: true,
|
|
8
|
+
borderLeftStyle: true,
|
|
9
|
+
borderRightStyle: true,
|
|
10
|
+
borderTopStyle: true,
|
|
11
|
+
contain: true,
|
|
12
|
+
containerType: true,
|
|
13
|
+
containerName: true,
|
|
14
|
+
content: true,
|
|
15
|
+
float: true,
|
|
16
|
+
maskBorderMode: true,
|
|
17
|
+
maskBorderRepeat: true,
|
|
18
|
+
maskClip: true,
|
|
19
|
+
maskComposite: true,
|
|
20
|
+
maskMode: true,
|
|
21
|
+
maskOrigin: true,
|
|
22
|
+
maskRepeat: true,
|
|
23
|
+
maskType: true,
|
|
24
|
+
objectFit: true,
|
|
25
|
+
overflowBlock: true,
|
|
26
|
+
overflowInline: true,
|
|
27
|
+
overflowX: true,
|
|
28
|
+
overflowY: true,
|
|
29
|
+
scrollbarWidth: true,
|
|
30
|
+
textWrap: true,
|
|
31
|
+
touchAction: true,
|
|
32
|
+
transformStyle: true,
|
|
33
|
+
willChange: true
|
|
35
34
|
};
|
|
36
35
|
var nonAnimatableWebTextProps = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
whiteSpace: true,
|
|
37
|
+
wordWrap: true,
|
|
38
|
+
textOverflow: true,
|
|
39
|
+
WebkitBoxOrient: true
|
|
41
40
|
};
|
|
42
41
|
var webOnlyStylePropsView = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
42
|
+
...nonAnimatableWebViewProps,
|
|
43
|
+
transition: true,
|
|
44
|
+
backdropFilter: true,
|
|
45
|
+
WebkitBackdropFilter: true,
|
|
46
|
+
borderTop: true,
|
|
47
|
+
borderRight: true,
|
|
48
|
+
borderBottom: true,
|
|
49
|
+
borderLeft: true,
|
|
50
|
+
backgroundPosition: true,
|
|
51
|
+
backgroundSize: true,
|
|
52
|
+
borderImage: true,
|
|
53
|
+
caretColor: true,
|
|
54
|
+
clipPath: true,
|
|
55
|
+
mask: true,
|
|
56
|
+
maskBorder: true,
|
|
57
|
+
maskBorderOutset: true,
|
|
58
|
+
maskBorderSlice: true,
|
|
59
|
+
maskBorderSource: true,
|
|
60
|
+
maskBorderWidth: true,
|
|
61
|
+
maskImage: true,
|
|
62
|
+
maskPosition: true,
|
|
63
|
+
maskSize: true,
|
|
64
|
+
objectPosition: true,
|
|
65
|
+
textEmphasis: true,
|
|
66
|
+
userSelect: true,
|
|
67
|
+
overflowWrap: true,
|
|
68
|
+
wordWrap: true,
|
|
69
|
+
resize: true
|
|
69
70
|
};
|
|
70
71
|
var webOnlyStylePropsText = {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
WebkitLineClamp: true
|
|
72
|
+
...nonAnimatableWebTextProps,
|
|
73
|
+
textDecorationDistance: true,
|
|
74
|
+
WebkitLineClamp: true
|
|
75
75
|
};
|
|
76
|
+
|
|
76
77
|
export { nonAnimatableWebTextProps, nonAnimatableWebViewProps, webOnlyStylePropsText, webOnlyStylePropsView };
|
|
77
78
|
//# sourceMappingURL=webOnlyStyleProps.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"webOnlyStyleProps.native.js","names":[],"sources":["esm/webOnlyStyleProps.native.js"],"sourcesContent":["var nonAnimatableWebViewProps = {\n backgroundAttachment: true,\n backgroundBlendMode: true,\n backgroundClip: true,\n backgroundOrigin: true,\n backgroundRepeat: true,\n borderBottomStyle: true,\n borderLeftStyle: true,\n borderRightStyle: true,\n borderTopStyle: true,\n contain: true,\n containerType: true,\n containerName: true,\n content: true,\n float: true,\n maskBorderMode: true,\n maskBorderRepeat: true,\n maskClip: true,\n maskComposite: true,\n maskMode: true,\n maskOrigin: true,\n maskRepeat: true,\n maskType: true,\n objectFit: true,\n overflowBlock: true,\n overflowInline: true,\n overflowX: true,\n overflowY: true,\n scrollbarWidth: true,\n textWrap: true,\n touchAction: true,\n transformStyle: true,\n willChange: true\n};\nvar nonAnimatableWebTextProps = {\n whiteSpace: true,\n wordWrap: true,\n textOverflow: true,\n WebkitBoxOrient: true\n};\nvar webOnlyStylePropsView = {\n ...nonAnimatableWebViewProps,\n transition: true,\n backdropFilter: true,\n WebkitBackdropFilter: true,\n borderTop: true,\n borderRight: true,\n borderBottom: true,\n borderLeft: true,\n backgroundPosition: true,\n backgroundSize: true,\n borderImage: true,\n caretColor: true,\n clipPath: true,\n mask: true,\n maskBorder: true,\n maskBorderOutset: true,\n maskBorderSlice: true,\n maskBorderSource: true,\n maskBorderWidth: true,\n maskImage: true,\n maskPosition: true,\n maskSize: true,\n objectPosition: true,\n textEmphasis: true,\n userSelect: true,\n // real style keys, not DOM attributes: without these an authored value falls\n // through to viewProps and reaches the element as an unknown attribute\n overflowWrap: true,\n wordWrap: true,\n resize: true\n};\nvar webOnlyStylePropsText = {\n ...nonAnimatableWebTextProps,\n textDecorationDistance: true,\n // cursor: now cross-platform - in stylePropsView\n WebkitLineClamp: true\n};\nexport {\n nonAnimatableWebTextProps,\n nonAnimatableWebViewProps,\n webOnlyStylePropsText,\n webOnlyStylePropsView\n};\n//# sourceMappingURL=webOnlyStyleProps.js.map\n"],"mappings":";AAAA,IAAI,4BAA4B;CAC9B,sBAAsB;CACtB,qBAAqB;CACrB,gBAAgB;CAChB,kBAAkB;CAClB,kBAAkB;CAClB,mBAAmB;CACnB,iBAAiB;CACjB,kBAAkB;CAClB,gBAAgB;CAChB,SAAS;CACT,eAAe;CACf,eAAe;CACf,SAAS;CACT,OAAO;CACP,gBAAgB;CAChB,kBAAkB;CAClB,UAAU;CACV,eAAe;CACf,UAAU;CACV,YAAY;CACZ,YAAY;CACZ,UAAU;CACV,WAAW;CACX,eAAe;CACf,gBAAgB;CAChB,WAAW;CACX,WAAW;CACX,gBAAgB;CAChB,UAAU;CACV,aAAa;CACb,gBAAgB;CAChB,YAAY;AACd;AACA,IAAI,4BAA4B;CAC9B,YAAY;CACZ,UAAU;CACV,cAAc;CACd,iBAAiB;AACnB;AACA,IAAI,wBAAwB;CAC1B,GAAG;CACH,YAAY;CACZ,gBAAgB;CAChB,sBAAsB;CACtB,WAAW;CACX,aAAa;CACb,cAAc;CACd,YAAY;CACZ,oBAAoB;CACpB,gBAAgB;CAChB,aAAa;CACb,YAAY;CACZ,UAAU;CACV,MAAM;CACN,YAAY;CACZ,kBAAkB;CAClB,iBAAiB;CACjB,kBAAkB;CAClB,iBAAiB;CACjB,WAAW;CACX,cAAc;CACd,UAAU;CACV,gBAAgB;CAChB,cAAc;CACd,YAAY;CAGZ,cAAc;CACd,UAAU;CACV,QAAQ;AACV;AACA,IAAI,wBAAwB;CAC1B,GAAG;CACH,wBAAwB;CAExB,iBAAiB;AACnB"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
const Decorated = /* @__PURE__ */Symbol();
|
|
1
|
+
const Decorated = /* @__PURE__ */ Symbol();
|
|
2
2
|
const withStaticProperties = (component, staticProps) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
out[Decorated] = true;
|
|
13
|
-
return out;
|
|
3
|
+
const out = (() => {
|
|
4
|
+
if (component[Decorated]) {
|
|
5
|
+
return typeof component === "function" ? Object.assign(component.bind(null), component) : { ...component };
|
|
6
|
+
}
|
|
7
|
+
return component;
|
|
8
|
+
})();
|
|
9
|
+
Object.assign(out, staticProps);
|
|
10
|
+
out[Decorated] = true;
|
|
11
|
+
return out;
|
|
14
12
|
};
|
|
13
|
+
|
|
15
14
|
export { withStaticProperties };
|
|
16
15
|
//# sourceMappingURL=withStaticProperties.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"withStaticProperties.js","names":[],"sources":["esm/withStaticProperties.js"],"sourcesContent":["const Decorated = /* @__PURE__ */ Symbol();\nconst withStaticProperties = (component, staticProps) => {\n const out = (() => {\n if (component[Decorated]) {\n return typeof component === \"function\" ? Object.assign(component.bind(null), component) : { ...component };\n }\n return component;\n })();\n Object.assign(out, staticProps);\n out[Decorated] = true;\n return out;\n};\nexport {\n withStaticProperties\n};\n//# sourceMappingURL=withStaticProperties.js.map\n"],"mappings":";AAAA,MAAM,YAA4B,uBAAO;AACzC,MAAM,wBAAwB,WAAW,gBAAgB;CACvD,MAAM,aAAa;EACjB,IAAI,UAAU,YAAY;GACxB,OAAO,OAAO,cAAc,aAAa,OAAO,OAAO,UAAU,KAAK,IAAI,GAAG,SAAS,IAAI,EAAE,GAAG,UAAU;EAC3G;EACA,OAAO;CACT,GAAG;CACH,OAAO,OAAO,KAAK,WAAW;CAC9B,IAAI,aAAa;CACjB,OAAO;AACT"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
var Decorated = /* @__PURE__ */Symbol();
|
|
2
|
-
var withStaticProperties = function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
out[Decorated] = true;
|
|
13
|
-
return out;
|
|
1
|
+
var Decorated = /* @__PURE__ */ Symbol();
|
|
2
|
+
var withStaticProperties = function(component, staticProps) {
|
|
3
|
+
var out = (function() {
|
|
4
|
+
if (component[Decorated]) {
|
|
5
|
+
return typeof component === "function" ? Object.assign(component.bind(null), component) : { ...component };
|
|
6
|
+
}
|
|
7
|
+
return component;
|
|
8
|
+
})();
|
|
9
|
+
Object.assign(out, staticProps);
|
|
10
|
+
out[Decorated] = true;
|
|
11
|
+
return out;
|
|
14
12
|
};
|
|
13
|
+
|
|
15
14
|
export { withStaticProperties };
|
|
16
15
|
//# sourceMappingURL=withStaticProperties.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"withStaticProperties.native.js","names":[],"sources":["esm/withStaticProperties.native.js"],"sourcesContent":["var Decorated = /* @__PURE__ */ Symbol();\nvar withStaticProperties = function(component, staticProps) {\n var out = (function() {\n if (component[Decorated]) {\n return typeof component === \"function\" ? Object.assign(component.bind(null), component) : {\n ...component\n };\n }\n return component;\n })();\n Object.assign(out, staticProps);\n out[Decorated] = true;\n return out;\n};\nexport {\n withStaticProperties\n};\n//# sourceMappingURL=withStaticProperties.js.map\n"],"mappings":";AAAA,IAAI,YAA4B,uBAAO;AACvC,IAAI,uBAAuB,SAAS,WAAW,aAAa;CAC1D,IAAI,OAAO,WAAW;EACpB,IAAI,UAAU,YAAY;GACxB,OAAO,OAAO,cAAc,aAAa,OAAO,OAAO,UAAU,KAAK,IAAI,GAAG,SAAS,IAAI,EACxF,GAAG,UACL;EACF;EACA,OAAO;CACT,GAAG;CACH,OAAO,OAAO,KAAK,WAAW;CAC9B,IAAI,aAAa;CACjB,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.637.1",
|
|
4
4
|
"gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -15,6 +15,15 @@
|
|
|
15
15
|
"types": "./types/index.d.ts",
|
|
16
16
|
"exports": {
|
|
17
17
|
"./package.json": "./package.json",
|
|
18
|
+
"./tokenCategories": {
|
|
19
|
+
"types": "./types/tokenCategories.d.ts",
|
|
20
|
+
"react-native": "./dist/esm/tokenCategories.mjs",
|
|
21
|
+
"browser": "./dist/esm/tokenCategories.mjs",
|
|
22
|
+
"module": "./dist/esm/tokenCategories.mjs",
|
|
23
|
+
"import": "./dist/esm/tokenCategories.mjs",
|
|
24
|
+
"require": "./dist/cjs/tokenCategories.cjs",
|
|
25
|
+
"default": "./dist/esm/tokenCategories.mjs"
|
|
26
|
+
},
|
|
18
27
|
".": {
|
|
19
28
|
"types": "./types/index.d.ts",
|
|
20
29
|
"react-native": "./dist/esm/index.native.js",
|
|
@@ -35,11 +44,11 @@
|
|
|
35
44
|
"clean:build": "tamagui-build clean:build"
|
|
36
45
|
},
|
|
37
46
|
"dependencies": {
|
|
38
|
-
"@tamagui/constants": "
|
|
39
|
-
"@tamagui/simple-hash": "
|
|
47
|
+
"@tamagui/constants": "3.0.0-beta.637.1",
|
|
48
|
+
"@tamagui/simple-hash": "3.0.0-beta.637.1"
|
|
40
49
|
},
|
|
41
50
|
"devDependencies": {
|
|
42
|
-
"@tamagui/build": "
|
|
51
|
+
"@tamagui/build": "3.0.0-beta.637.1",
|
|
43
52
|
"react": ">=19"
|
|
44
53
|
},
|
|
45
54
|
"peerDependencies": {
|
|
@@ -12,16 +12,12 @@ export function composeEventHandlers<E extends Events>(
|
|
|
12
12
|
}
|
|
13
13
|
return (event: E) => {
|
|
14
14
|
og?.(event)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
) ||
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
('defaultPrevented' in event && !event.defaultPrevented)
|
|
24
|
-
) {
|
|
15
|
+
const isPrevented =
|
|
16
|
+
!!event &&
|
|
17
|
+
typeof event === 'object' &&
|
|
18
|
+
(('defaultPrevented' in event && Boolean(event.defaultPrevented)) ||
|
|
19
|
+
('isCanceled' in event && Boolean(event.isCanceled)))
|
|
20
|
+
if (!event || !checkDefaultPrevented || !isPrevented) {
|
|
25
21
|
return next?.(event)
|
|
26
22
|
}
|
|
27
23
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export * from '@tamagui/simple-hash'
|
|
2
2
|
export * from './clamp'
|
|
3
|
+
export * from './reservedThemeProps'
|
|
4
|
+
export * from './themeClassNames'
|
|
3
5
|
export * from './composeEventHandlers'
|
|
4
6
|
export * from './types'
|
|
5
7
|
export * from './shouldRenderNativePlatform'
|
|
8
|
+
export * from './tokenCategories'
|
|
6
9
|
export * from './validStyleProps'
|
|
7
10
|
export * from './withStaticProperties'
|
|
8
11
|
export * from './webOnlyStyleProps'
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The props `<Theme>` owns. Every other prop on it is read as a theme key, so
|
|
3
|
+
* these names can't be used as theme keys or config variables. development
|
|
4
|
+
* builds report a collision instead of silently dropping the value.
|
|
5
|
+
*
|
|
6
|
+
* It lives here, in a side-effect-free package, because the compiler classifies
|
|
7
|
+
* static `<Theme>` props with the same table the runtime uses. One table, so a
|
|
8
|
+
* new reserved prop can never mean one thing at build time and another at
|
|
9
|
+
* runtime.
|
|
10
|
+
*/
|
|
11
|
+
export const reservedThemeProps: Record<string, true> = {
|
|
12
|
+
_isRoot: true,
|
|
13
|
+
children: true,
|
|
14
|
+
className: true,
|
|
15
|
+
contain: true,
|
|
16
|
+
debug: true,
|
|
17
|
+
deopt: true,
|
|
18
|
+
disable: true,
|
|
19
|
+
'disable-child-theme': true,
|
|
20
|
+
forceClassName: true,
|
|
21
|
+
inlineClassName: true,
|
|
22
|
+
inlineValues: true,
|
|
23
|
+
name: true,
|
|
24
|
+
nativeUpdate: true,
|
|
25
|
+
needsUpdate: true,
|
|
26
|
+
passThrough: true,
|
|
27
|
+
reset: true,
|
|
28
|
+
shallow: true,
|
|
29
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const schemePrefix = /^(dark|light)_/
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The theme classes a `<Theme>` span carries for a resolved theme name.
|
|
5
|
+
*
|
|
6
|
+
* Every level of a compound name gets its own class so CSS variables inherit
|
|
7
|
+
* through the whole chain ("red_surface1" is `t_red t_red_surface1`). The zero
|
|
8
|
+
* compiler emits these directly, so this has to be the only implementation:
|
|
9
|
+
* a compiled span that spells its classes differently would resolve different
|
|
10
|
+
* variables than the runtime does for the same authored tree.
|
|
11
|
+
*/
|
|
12
|
+
export function getThemeClassNames(name: string, isRoot = false): string {
|
|
13
|
+
const themeClassName = name.replace(schemePrefix, '')
|
|
14
|
+
const fullThemeClassName = name === themeClassName ? '' : ` t_${name}`
|
|
15
|
+
|
|
16
|
+
const themeNameParts = themeClassName.split('_')
|
|
17
|
+
let themeClasses = `t_${themeClassName}${fullThemeClassName}`
|
|
18
|
+
|
|
19
|
+
if (themeNameParts.length > 1) {
|
|
20
|
+
const hierarchyClasses: string[] = []
|
|
21
|
+
for (let i = 1; i <= themeNameParts.length; i++) {
|
|
22
|
+
hierarchyClasses.push(`t_${themeNameParts.slice(0, i).join('_')}`)
|
|
23
|
+
}
|
|
24
|
+
themeClasses = `${hierarchyClasses.join(' ')}${fullThemeClassName}`
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return `${isRoot ? '' : 't_sub_theme'} ${themeClasses}`
|
|
28
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Canonical prop-to-token-category table shared by runtime style resolution and tooling.
|
|
2
|
+
// Keep this module platform-neutral: build-time consumers such as @tamagui/to-tailwind must be
|
|
3
|
+
// able to load it under the react-native export condition without importing the React Native
|
|
4
|
+
// runtime through @tamagui/helpers' main barrel.
|
|
5
|
+
export const tokenCategories = {
|
|
6
|
+
radius: {
|
|
7
|
+
borderRadius: true,
|
|
8
|
+
borderTopLeftRadius: true,
|
|
9
|
+
borderTopRightRadius: true,
|
|
10
|
+
borderBottomLeftRadius: true,
|
|
11
|
+
borderBottomRightRadius: true,
|
|
12
|
+
borderTopStartRadius: true,
|
|
13
|
+
borderTopEndRadius: true,
|
|
14
|
+
borderBottomStartRadius: true,
|
|
15
|
+
borderBottomEndRadius: true,
|
|
16
|
+
|
|
17
|
+
// logical
|
|
18
|
+
borderStartStartRadius: true,
|
|
19
|
+
borderStartEndRadius: true,
|
|
20
|
+
borderEndStartRadius: true,
|
|
21
|
+
borderEndEndRadius: true,
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
width: true,
|
|
25
|
+
height: true,
|
|
26
|
+
minWidth: true,
|
|
27
|
+
minHeight: true,
|
|
28
|
+
maxWidth: true,
|
|
29
|
+
maxHeight: true,
|
|
30
|
+
blockSize: true,
|
|
31
|
+
minBlockSize: true,
|
|
32
|
+
maxBlockSize: true,
|
|
33
|
+
inlineSize: true,
|
|
34
|
+
minInlineSize: true,
|
|
35
|
+
maxInlineSize: true,
|
|
36
|
+
shadowRadius: true,
|
|
37
|
+
},
|
|
38
|
+
zIndex: {
|
|
39
|
+
zIndex: true,
|
|
40
|
+
},
|
|
41
|
+
color: {
|
|
42
|
+
backgroundColor: true,
|
|
43
|
+
borderColor: true,
|
|
44
|
+
borderBlockStartColor: true,
|
|
45
|
+
borderBlockEndColor: true,
|
|
46
|
+
borderBlockColor: true,
|
|
47
|
+
borderBottomColor: true,
|
|
48
|
+
borderInlineColor: true,
|
|
49
|
+
borderInlineStartColor: true,
|
|
50
|
+
borderInlineEndColor: true,
|
|
51
|
+
borderTopColor: true,
|
|
52
|
+
borderLeftColor: true,
|
|
53
|
+
borderRightColor: true,
|
|
54
|
+
borderEndColor: true,
|
|
55
|
+
borderStartColor: true,
|
|
56
|
+
shadowColor: true,
|
|
57
|
+
color: true,
|
|
58
|
+
textDecorationColor: true,
|
|
59
|
+
textShadowColor: true,
|
|
60
|
+
// outlineColor is supported on RN 0.77+ (New Architecture)
|
|
61
|
+
outlineColor: true,
|
|
62
|
+
// caretColor is web-only
|
|
63
|
+
...(process.env.TAMAGUI_TARGET === 'web' && {
|
|
64
|
+
caretColor: true,
|
|
65
|
+
}),
|
|
66
|
+
},
|
|
67
|
+
}
|