@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.
Files changed (112) hide show
  1. package/dist/cjs/clamp.cjs +16 -19
  2. package/dist/cjs/clamp.native.cjs +30 -0
  3. package/dist/cjs/clamp.native.js +17 -19
  4. package/dist/cjs/clamp.native.js.map +1 -1
  5. package/dist/cjs/composeEventHandlers.cjs +26 -32
  6. package/dist/cjs/composeEventHandlers.native.cjs +43 -0
  7. package/dist/cjs/composeEventHandlers.native.js +28 -34
  8. package/dist/cjs/composeEventHandlers.native.js.map +1 -1
  9. package/dist/cjs/index.cjs +13 -11
  10. package/dist/cjs/index.native.cjs +31 -0
  11. package/dist/cjs/index.native.js +13 -10
  12. package/dist/cjs/index.native.js.map +1 -1
  13. package/dist/cjs/reservedThemeProps.cjs +43 -0
  14. package/dist/cjs/reservedThemeProps.native.cjs +45 -0
  15. package/dist/cjs/reservedThemeProps.native.js +47 -0
  16. package/dist/cjs/reservedThemeProps.native.js.map +1 -0
  17. package/dist/cjs/shouldRenderNativePlatform.cjs +38 -37
  18. package/dist/cjs/shouldRenderNativePlatform.native.cjs +71 -0
  19. package/dist/cjs/shouldRenderNativePlatform.native.js +55 -59
  20. package/dist/cjs/shouldRenderNativePlatform.native.js.map +1 -1
  21. package/dist/cjs/themeClassNames.cjs +39 -0
  22. package/dist/cjs/themeClassNames.native.cjs +42 -0
  23. package/dist/cjs/themeClassNames.native.js +44 -0
  24. package/dist/cjs/themeClassNames.native.js.map +1 -0
  25. package/dist/cjs/tokenCategories.cjs +79 -0
  26. package/dist/cjs/tokenCategories.native.cjs +80 -0
  27. package/dist/cjs/tokenCategories.native.js +82 -0
  28. package/dist/cjs/tokenCategories.native.js.map +1 -0
  29. package/dist/cjs/types.cjs +19 -20
  30. package/dist/cjs/types.native.cjs +37 -0
  31. package/dist/cjs/types.native.js +19 -19
  32. package/dist/cjs/types.native.js.map +1 -1
  33. package/dist/cjs/validStyleProps.cjs +240 -297
  34. package/dist/cjs/validStyleProps.native.cjs +277 -0
  35. package/dist/cjs/validStyleProps.native.js +236 -290
  36. package/dist/cjs/validStyleProps.native.js.map +1 -1
  37. package/dist/cjs/webOnlyStyleProps.cjs +85 -86
  38. package/dist/cjs/webOnlyStyleProps.native.cjs +106 -0
  39. package/dist/cjs/webOnlyStyleProps.native.js +85 -85
  40. package/dist/cjs/webOnlyStyleProps.native.js.map +1 -1
  41. package/dist/cjs/withStaticProperties.cjs +25 -30
  42. package/dist/cjs/withStaticProperties.native.cjs +38 -0
  43. package/dist/cjs/withStaticProperties.native.js +26 -30
  44. package/dist/cjs/withStaticProperties.native.js.map +1 -1
  45. package/dist/esm/clamp.mjs +2 -1
  46. package/dist/esm/clamp.mjs.map +1 -1
  47. package/dist/esm/clamp.native.js +3 -2
  48. package/dist/esm/clamp.native.js.map +1 -1
  49. package/dist/esm/composeEventHandlers.mjs +12 -14
  50. package/dist/esm/composeEventHandlers.mjs.map +1 -1
  51. package/dist/esm/composeEventHandlers.native.js +14 -17
  52. package/dist/esm/composeEventHandlers.native.js.map +1 -1
  53. package/dist/esm/index.js +21 -9
  54. package/dist/esm/index.mjs +21 -9
  55. package/dist/esm/index.native.js +21 -9
  56. package/dist/esm/reservedThemeProps.mjs +22 -0
  57. package/dist/esm/reservedThemeProps.mjs.map +1 -0
  58. package/dist/esm/reservedThemeProps.native.js +22 -0
  59. package/dist/esm/reservedThemeProps.native.js.map +1 -0
  60. package/dist/esm/shouldRenderNativePlatform.mjs +25 -19
  61. package/dist/esm/shouldRenderNativePlatform.mjs.map +1 -1
  62. package/dist/esm/shouldRenderNativePlatform.native.js +42 -42
  63. package/dist/esm/shouldRenderNativePlatform.native.js.map +1 -1
  64. package/dist/esm/themeClassNames.mjs +18 -0
  65. package/dist/esm/themeClassNames.mjs.map +1 -0
  66. package/dist/esm/themeClassNames.native.js +19 -0
  67. package/dist/esm/themeClassNames.native.js.map +1 -0
  68. package/dist/esm/tokenCategories.mjs +58 -0
  69. package/dist/esm/tokenCategories.mjs.map +1 -0
  70. package/dist/esm/tokenCategories.native.js +57 -0
  71. package/dist/esm/tokenCategories.native.js.map +1 -0
  72. package/dist/esm/types.mjs +1 -0
  73. package/dist/esm/types.mjs.map +1 -1
  74. package/dist/esm/types.native.js +1 -0
  75. package/dist/esm/types.native.js.map +1 -1
  76. package/dist/esm/validStyleProps.mjs +218 -272
  77. package/dist/esm/validStyleProps.mjs.map +1 -1
  78. package/dist/esm/validStyleProps.native.js +214 -266
  79. package/dist/esm/validStyleProps.native.js.map +1 -1
  80. package/dist/esm/webOnlyStyleProps.mjs +68 -67
  81. package/dist/esm/webOnlyStyleProps.mjs.map +1 -1
  82. package/dist/esm/webOnlyStyleProps.native.js +68 -67
  83. package/dist/esm/webOnlyStyleProps.native.js.map +1 -1
  84. package/dist/esm/withStaticProperties.mjs +11 -12
  85. package/dist/esm/withStaticProperties.mjs.map +1 -1
  86. package/dist/esm/withStaticProperties.native.js +12 -13
  87. package/dist/esm/withStaticProperties.native.js.map +1 -1
  88. package/package.json +13 -4
  89. package/src/composeEventHandlers.ts +6 -10
  90. package/src/index.ts +3 -0
  91. package/src/reservedThemeProps.ts +29 -0
  92. package/src/themeClassNames.ts +28 -0
  93. package/src/tokenCategories.ts +67 -0
  94. package/src/validStyleProps.ts +37 -79
  95. package/src/webOnlyStyleProps.ts +6 -3
  96. package/types/composeEventHandlers.d.ts.map +1 -1
  97. package/types/index.d.ts +3 -0
  98. package/types/index.d.ts.map +1 -1
  99. package/types/reservedThemeProps.d.ts +12 -0
  100. package/types/reservedThemeProps.d.ts.map +1 -0
  101. package/types/themeClassNames.d.ts +11 -0
  102. package/types/themeClassNames.d.ts.map +1 -0
  103. package/types/tokenCategories.d.ts +58 -0
  104. package/types/tokenCategories.d.ts.map +1 -0
  105. package/types/validStyleProps.d.ts +535 -560
  106. package/types/validStyleProps.d.ts.map +1 -1
  107. package/types/webOnlyStyleProps.d.ts +31 -29
  108. package/types/webOnlyStyleProps.d.ts.map +1 -1
  109. package/types/withStaticProperties.d.ts.map +1 -1
  110. package/dist/esm/index.js.map +0 -1
  111. package/dist/esm/index.mjs.map +0 -1
  112. package/dist/esm/index.native.js.map +0 -1
@@ -1,77 +1,78 @@
1
1
  const nonAnimatableWebViewProps = {
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
- content: true,
14
- float: true,
15
- maskBorderMode: true,
16
- maskBorderRepeat: true,
17
- maskClip: true,
18
- maskComposite: true,
19
- maskMode: true,
20
- maskOrigin: true,
21
- maskRepeat: true,
22
- maskType: true,
23
- objectFit: true,
24
- overflowBlock: true,
25
- overflowInline: true,
26
- overflowX: true,
27
- overflowY: true,
28
- // NOTE: pointerEvents is NOT web-only - it's a core React Native View prop (not a style)
29
- pointerEvents: true,
30
- scrollbarWidth: true,
31
- textWrap: true,
32
- touchAction: true,
33
- transformStyle: true,
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
- whiteSpace: true,
38
- wordWrap: true,
39
- textOverflow: true,
40
- WebkitBoxOrient: true
36
+ whiteSpace: true,
37
+ wordWrap: true,
38
+ textOverflow: true,
39
+ WebkitBoxOrient: true
41
40
  };
42
41
  const webOnlyStylePropsView = {
43
- ...nonAnimatableWebViewProps,
44
- transition: true,
45
- backdropFilter: true,
46
- WebkitBackdropFilter: true,
47
- background: true,
48
- borderTop: true,
49
- borderRight: true,
50
- borderBottom: true,
51
- borderLeft: true,
52
- backgroundPosition: true,
53
- backgroundSize: true,
54
- borderImage: true,
55
- caretColor: true,
56
- clipPath: true,
57
- mask: true,
58
- maskBorder: true,
59
- maskBorderOutset: true,
60
- maskBorderSlice: true,
61
- maskBorderSource: true,
62
- maskBorderWidth: true,
63
- maskImage: true,
64
- maskPosition: true,
65
- maskSize: true,
66
- objectPosition: true,
67
- textEmphasis: true,
68
- userSelect: true
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
- ...nonAnimatableWebTextProps,
72
- textDecorationDistance: true,
73
- // cursor: now cross-platform - in stylePropsView
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,"names":["nonAnimatableWebViewProps","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","nonAnimatableWebTextProps","whiteSpace","wordWrap","textOverflow","WebkitBoxOrient","webOnlyStylePropsView","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","webOnlyStylePropsText","textDecorationDistance","WebkitLineClamp"],"sources":["../../src/webOnlyStyleProps.ts"],"sourcesContent":[null],"mappings":"AAMO,MAAMA,yBAAA,GAA4B;EACvCC,oBAAA,EAAsB;EACtBC,mBAAA,EAAqB;EACrBC,cAAA,EAAgB;EAChBC,gBAAA,EAAkB;EAClBC,gBAAA,EAAkB;EAClBC,iBAAA,EAAmB;EACnBC,eAAA,EAAiB;EACjBC,gBAAA,EAAkB;EAClBC,cAAA,EAAgB;EAChBC,OAAA,EAAS;EACTC,aAAA,EAAe;EACfC,OAAA,EAAS;EACTC,KAAA,EAAO;EACPC,cAAA,EAAgB;EAChBC,gBAAA,EAAkB;EAClBC,QAAA,EAAU;EACVC,aAAA,EAAe;EACfC,QAAA,EAAU;EACVC,UAAA,EAAY;EACZC,UAAA,EAAY;EACZC,QAAA,EAAU;EACVC,SAAA,EAAW;EACXC,aAAA,EAAe;EACfC,cAAA,EAAgB;EAChBC,SAAA,EAAW;EACXC,SAAA,EAAW;EAAA;EAEXC,aAAA,EAAe;EACfC,cAAA,EAAgB;EAChBC,QAAA,EAAU;EACVC,WAAA,EAAa;EACbC,cAAA,EAAgB;EAChBC,UAAA,EAAY;AACd;AAGO,MAAMC,yBAAA,GAA4B;EACvCC,UAAA,EAAY;EACZC,QAAA,EAAU;EACVC,YAAA,EAAc;EACdC,eAAA,EAAiB;AACnB;AAEO,MAAMC,qBAAA,GAAwB;EACnC,GAAGtC,yBAAA;EACHuC,UAAA,EAAY;EACZC,cAAA,EAAgB;EAChBC,oBAAA,EAAsB;EACtBC,UAAA,EAAY;EACZC,SAAA,EAAW;EACXC,WAAA,EAAa;EACbC,YAAA,EAAc;EACdC,UAAA,EAAY;EACZC,kBAAA,EAAoB;EACpBC,cAAA,EAAgB;EAChBC,WAAA,EAAa;EACbC,UAAA,EAAY;EACZC,QAAA,EAAU;EACVC,IAAA,EAAM;EACNC,UAAA,EAAY;EACZC,gBAAA,EAAkB;EAClBC,eAAA,EAAiB;EACjBC,gBAAA,EAAkB;EAClBC,eAAA,EAAiB;EACjBC,SAAA,EAAW;EACXC,YAAA,EAAc;EACdC,QAAA,EAAU;EACVC,cAAA,EAAgB;EAChBC,YAAA,EAAc;EACdC,UAAA,EAAY;AACd;AAEO,MAAMC,qBAAA,GAAwB;EACnC,GAAG/B,yBAAA;EACHgC,sBAAA,EAAwB;EAAA;EAExBC,eAAA,EAAiB;AACnB","ignoreList":[]}
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
- 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
- content: true,
14
- float: true,
15
- maskBorderMode: true,
16
- maskBorderRepeat: true,
17
- maskClip: true,
18
- maskComposite: true,
19
- maskMode: true,
20
- maskOrigin: true,
21
- maskRepeat: true,
22
- maskType: true,
23
- objectFit: true,
24
- overflowBlock: true,
25
- overflowInline: true,
26
- overflowX: true,
27
- overflowY: true,
28
- // NOTE: pointerEvents is NOT web-only - it's a core React Native View prop (not a style)
29
- pointerEvents: true,
30
- scrollbarWidth: true,
31
- textWrap: true,
32
- touchAction: true,
33
- transformStyle: true,
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
- whiteSpace: true,
38
- wordWrap: true,
39
- textOverflow: true,
40
- WebkitBoxOrient: true
36
+ whiteSpace: true,
37
+ wordWrap: true,
38
+ textOverflow: true,
39
+ WebkitBoxOrient: true
41
40
  };
42
41
  var webOnlyStylePropsView = {
43
- ...nonAnimatableWebViewProps,
44
- transition: true,
45
- backdropFilter: true,
46
- WebkitBackdropFilter: true,
47
- background: true,
48
- borderTop: true,
49
- borderRight: true,
50
- borderBottom: true,
51
- borderLeft: true,
52
- backgroundPosition: true,
53
- backgroundSize: true,
54
- borderImage: true,
55
- caretColor: true,
56
- clipPath: true,
57
- mask: true,
58
- maskBorder: true,
59
- maskBorderOutset: true,
60
- maskBorderSlice: true,
61
- maskBorderSource: true,
62
- maskBorderWidth: true,
63
- maskImage: true,
64
- maskPosition: true,
65
- maskSize: true,
66
- objectPosition: true,
67
- textEmphasis: true,
68
- userSelect: true
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
- ...nonAnimatableWebTextProps,
72
- textDecorationDistance: true,
73
- // cursor: now cross-platform - in stylePropsView
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,"names":["nonAnimatableWebViewProps","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","nonAnimatableWebTextProps","whiteSpace","wordWrap","textOverflow","WebkitBoxOrient","webOnlyStylePropsView","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","webOnlyStylePropsText","textDecorationDistance","WebkitLineClamp"],"sources":["../../src/webOnlyStyleProps.ts"],"sourcesContent":[null],"mappings":"AAMO,IAAAA,yBAAM;EACXC,oBAAA,EAAsB;EACtBC,mBAAA,EAAqB;EACrBC,cAAA,EAAgB;EAChBC,gBAAA,EAAkB;EAClBC,gBAAA,EAAkB;EAClBC,iBAAA,EAAmB;EACnBC,eAAA,EAAiB;EACjBC,gBAAA,EAAkB;EAClBC,cAAA,EAAgB;EAChBC,OAAA,EAAS;EACTC,aAAA,EAAe;EACfC,OAAA,EAAS;EACTC,KAAA,EAAO;EACPC,cAAA,EAAgB;EAChBC,gBAAA,EAAkB;EAClBC,QAAA,EAAU;EACVC,aAAA,EAAe;EACfC,QAAA,EAAU;EACVC,UAAA,EAAY;EACZC,UAAA,EAAY;EACZC,QAAA,EAAU;EACVC,SAAA,EAAW;EACXC,aAAA,EAAe;EACfC,cAAA,EAAgB;EAChBC,SAAA,EAAW;EACXC,SAAA,EAAW;EAAA;EAEXC,aAAA,EAAe;EACfC,cAAA,EAAgB;EAChBC,QAAA,EAAU;EACVC,WAAA,EAAa;EACbC,cAAA,EAAgB;EAChBC,UAAA,EAAY;AACd;AAGO,IAAAC,yBAAM;EACXC,UAAA,EAAY;EACZC,QAAA,EAAU;EACVC,YAAA,EAAc;EACdC,eAAA,EAAiB;AACnB;AAEO,IAAAC,qBAAM;EACX,GAAGtC,yBAAA;EACHuC,UAAA,EAAY;EACZC,cAAA,EAAgB;EAChBC,oBAAA,EAAsB;EACtBC,UAAA,EAAY;EACZC,SAAA,EAAW;EACXC,WAAA,EAAa;EACbC,YAAA,EAAc;EACdC,UAAA,EAAY;EACZC,kBAAA,EAAoB;EACpBC,cAAA,EAAgB;EAChBC,WAAA,EAAa;EACbC,UAAA,EAAY;EACZC,QAAA,EAAU;EACVC,IAAA,EAAM;EACNC,UAAA,EAAY;EACZC,gBAAA,EAAkB;EAClBC,eAAA,EAAiB;EACjBC,gBAAA,EAAkB;EAClBC,eAAA,EAAiB;EACjBC,SAAA,EAAW;EACXC,YAAA,EAAc;EACdC,QAAA,EAAU;EACVC,cAAA,EAAgB;EAChBC,YAAA,EAAc;EACdC,UAAA,EAAY;AACd;AAEO,IAAAC,qBAAM;EACX,GAAG/B,yBAAA;EACHgC,sBAAA,EAAwB;EAAA;EAExBC,eAAA,EAAiB;AACnB","ignoreList":[]}
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
- const out = (() => {
4
- if (component[Decorated]) {
5
- return typeof component === "function" ? Object.assign(component.bind(null), component) : {
6
- ...component
7
- };
8
- }
9
- return component;
10
- })();
11
- Object.assign(out, staticProps);
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,"names":["Decorated","Symbol","withStaticProperties","component","staticProps","out","Object","assign","bind"],"sources":["../../src/withStaticProperties.tsx"],"sourcesContent":[null],"mappings":"AAAA,MAAMA,SAAA,GAAY,eAAAC,MAAA,CAAO;AAIlB,MAAMC,oBAAA,GAAuBA,CAClCC,SAAA,EACAC,WAAA,KACmB;EACnB,MAAMC,GAAA,IAAO,MAAM;IACjB,IAAKF,SAAA,CAAkBH,SAAS,GAAG;MAMjC,OAAO,OAAOG,SAAA,KAAc,aACxBG,MAAA,CAAOC,MAAA,CAAOJ,SAAA,CAAUK,IAAA,CAAK,IAAI,GAAGL,SAAS,IAC7C;QAAE,GAAIA;MAAkB;IAC9B;IACA,OAAOA,SAAA;EACT,GAAG;EAEHG,MAAA,CAAOC,MAAA,CAAOF,GAAA,EAAKD,WAAW;EAC9BC,GAAA,CAAIL,SAAS,IAAI;EAEjB,OAAOK,GAAA;AACT","ignoreList":[]}
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 (component, staticProps) {
3
- var out = function () {
4
- if (component[Decorated]) {
5
- return typeof component === "function" ? Object.assign(component.bind(null), component) : {
6
- ...component
7
- };
8
- }
9
- return component;
10
- }();
11
- Object.assign(out, staticProps);
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,"names":["Decorated","Symbol","withStaticProperties","component","staticProps","out","Object","assign","bind"],"sources":["../../src/withStaticProperties.tsx"],"sourcesContent":[null],"mappings":"AAAA,IAAAA,SAAM,kBAAYC,MAAA;AAIX,IAAAC,oBAAM,YAAAA,CACXC,SACA,EAAAC,WACmB;EACnB,IAAAC,GAAM,eAAa;IACjB,IAAKF,SAAA,CAAkBH,SAAS,GAAG;MAMjC,OAAO,OAAOG,SAAA,KAAc,aACxBG,MAAA,CAAOC,MAAA,CAAOJ,SAAA,CAAUK,IAAA,CAAK,IAAI,GAAGL,SAAS,IAC7C;QACN,GAAAA;MACA;IACF;IAEA,OAAOA,SAAO;EACd,GAAI;EAEJG,MAAA,CAAOC,MAAA,CAAAF,GAAA,EAAAD,WAAA;EACTC,GAAA,CAAAL,SAAA","ignoreList":[]}
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": "2.7.7",
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": "2.7.7",
39
- "@tamagui/simple-hash": "2.7.7"
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": "2.7.7",
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
- if (
16
- !event ||
17
- !(
18
- checkDefaultPrevented &&
19
- typeof event === 'object' &&
20
- 'defaultPrevented' in event
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
+ }