@tamagui/web 1.88.4 → 1.88.5

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 (111) hide show
  1. package/dist/cjs/createComponent.js.map +1 -1
  2. package/dist/cjs/createComponent.native.js.map +1 -1
  3. package/dist/cjs/helpers/getSplitStyles.js +22 -3
  4. package/dist/cjs/helpers/getSplitStyles.js.map +1 -1
  5. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  6. package/dist/cjs/interfaces/KeyTypes.js +14 -0
  7. package/dist/cjs/interfaces/KeyTypes.js.map +6 -0
  8. package/dist/cjs/interfaces/KeyTypes.native.js +15 -0
  9. package/dist/cjs/interfaces/KeyTypes.native.js.map +6 -0
  10. package/dist/cjs/interfaces/TamaguiComponentEvents.js +14 -0
  11. package/dist/cjs/interfaces/TamaguiComponentEvents.js.map +6 -0
  12. package/dist/cjs/interfaces/TamaguiComponentEvents.native.js +15 -0
  13. package/dist/cjs/interfaces/TamaguiComponentEvents.native.js.map +6 -0
  14. package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.js +14 -0
  15. package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.js.map +6 -0
  16. package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.js +15 -0
  17. package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.js.map +6 -0
  18. package/dist/cjs/interfaces/TamaguiComponentState.js +14 -0
  19. package/dist/cjs/interfaces/TamaguiComponentState.js.map +6 -0
  20. package/dist/cjs/interfaces/TamaguiComponentState.native.js +15 -0
  21. package/dist/cjs/interfaces/TamaguiComponentState.native.js.map +6 -0
  22. package/dist/cjs/interfaces/WebOnlyPressEvents.js +14 -0
  23. package/dist/cjs/interfaces/WebOnlyPressEvents.js.map +6 -0
  24. package/dist/cjs/interfaces/WebOnlyPressEvents.native.js +15 -0
  25. package/dist/cjs/interfaces/WebOnlyPressEvents.native.js.map +6 -0
  26. package/dist/cjs/internalWithTheme.js +1 -1
  27. package/dist/cjs/internalWithTheme.js.map +1 -1
  28. package/dist/cjs/internalWithTheme.native.js +1 -1
  29. package/dist/cjs/internalWithTheme.native.js.map +1 -1
  30. package/dist/cjs/types.js +3 -1
  31. package/dist/cjs/types.js.map +1 -1
  32. package/dist/cjs/types.native.js +8 -1
  33. package/dist/cjs/types.native.js.map +1 -1
  34. package/dist/cjs/views/View.js.map +1 -1
  35. package/dist/cjs/views/View.native.js.map +1 -1
  36. package/dist/esm/createComponent.js.map +1 -1
  37. package/dist/esm/createComponent.native.js.map +1 -1
  38. package/dist/esm/helpers/getSplitStyles.js +22 -3
  39. package/dist/esm/helpers/getSplitStyles.js.map +1 -1
  40. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  41. package/dist/esm/interfaces/KeyTypes.js +1 -0
  42. package/dist/esm/interfaces/KeyTypes.js.map +6 -0
  43. package/dist/esm/interfaces/KeyTypes.native.js +15 -0
  44. package/dist/esm/interfaces/KeyTypes.native.js.map +6 -0
  45. package/dist/esm/interfaces/TamaguiComponentEvents.js +1 -0
  46. package/dist/esm/interfaces/TamaguiComponentEvents.js.map +6 -0
  47. package/dist/esm/interfaces/TamaguiComponentEvents.native.js +15 -0
  48. package/dist/esm/interfaces/TamaguiComponentEvents.native.js.map +6 -0
  49. package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.js +1 -0
  50. package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.js.map +6 -0
  51. package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.js +15 -0
  52. package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.js.map +6 -0
  53. package/dist/esm/interfaces/TamaguiComponentState.js +1 -0
  54. package/dist/esm/interfaces/TamaguiComponentState.js.map +6 -0
  55. package/dist/esm/interfaces/TamaguiComponentState.native.js +15 -0
  56. package/dist/esm/interfaces/TamaguiComponentState.native.js.map +6 -0
  57. package/dist/esm/interfaces/WebOnlyPressEvents.js +1 -0
  58. package/dist/esm/interfaces/WebOnlyPressEvents.js.map +6 -0
  59. package/dist/esm/interfaces/WebOnlyPressEvents.native.js +15 -0
  60. package/dist/esm/interfaces/WebOnlyPressEvents.native.js.map +6 -0
  61. package/dist/esm/internalWithTheme.js +1 -1
  62. package/dist/esm/internalWithTheme.js.map +1 -1
  63. package/dist/esm/internalWithTheme.native.js +1 -1
  64. package/dist/esm/internalWithTheme.native.js.map +1 -1
  65. package/dist/esm/types.js +2 -0
  66. package/dist/esm/types.js.map +2 -2
  67. package/dist/esm/types.native.js +8 -1
  68. package/dist/esm/types.native.js.map +1 -1
  69. package/dist/esm/views/View.js.map +1 -1
  70. package/dist/esm/views/View.native.js.map +1 -1
  71. package/package.json +10 -10
  72. package/src/createComponent.tsx +3 -6
  73. package/src/defaultComponentState.tsx +1 -1
  74. package/src/helpers/getSplitStyles.tsx +29 -6
  75. package/src/hooks/useProps.tsx +2 -2
  76. package/src/interfaces/KeyTypes.tsx +79 -0
  77. package/src/interfaces/TamaguiComponentEvents.tsx +18 -0
  78. package/src/interfaces/TamaguiComponentPropsBaseBase.tsx +202 -0
  79. package/src/interfaces/TamaguiComponentState.tsx +15 -0
  80. package/src/interfaces/WebOnlyPressEvents.tsx +17 -0
  81. package/src/internalWithTheme.tsx +4 -8
  82. package/src/setupHooks.ts +2 -2
  83. package/src/types.tsx +17 -346
  84. package/src/views/Stack.tsx +2 -2
  85. package/src/views/View.tsx +4 -2
  86. package/types/createComponent.d.ts.map +1 -1
  87. package/types/defaultComponentState.d.ts +1 -1
  88. package/types/defaultComponentState.d.ts.map +1 -1
  89. package/types/helpers/getSplitStyles.d.ts +2 -1
  90. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  91. package/types/hooks/useProps.d.ts +2 -2
  92. package/types/hooks/useProps.d.ts.map +1 -1
  93. package/types/interfaces/KeyTypes.d.ts +4 -0
  94. package/types/interfaces/KeyTypes.d.ts.map +1 -0
  95. package/types/interfaces/TamaguiComponentEvents.d.ts +19 -0
  96. package/types/interfaces/TamaguiComponentEvents.d.ts.map +1 -0
  97. package/types/interfaces/TamaguiComponentPropsBaseBase.d.ts +81 -0
  98. package/types/interfaces/TamaguiComponentPropsBaseBase.d.ts.map +1 -0
  99. package/types/interfaces/TamaguiComponentState.d.ts +14 -0
  100. package/types/interfaces/TamaguiComponentState.d.ts.map +1 -0
  101. package/types/interfaces/WebOnlyPressEvents.d.ts +17 -0
  102. package/types/interfaces/WebOnlyPressEvents.d.ts.map +1 -0
  103. package/types/internalWithTheme.d.ts.map +1 -1
  104. package/types/setupHooks.d.ts +3 -1
  105. package/types/setupHooks.d.ts.map +1 -1
  106. package/types/types.d.ts +17 -140
  107. package/types/types.d.ts.map +1 -1
  108. package/types/views/Stack.d.ts +2 -2
  109. package/types/views/Stack.d.ts.map +1 -1
  110. package/types/views/View.d.ts +4 -3
  111. package/types/views/View.d.ts.map +1 -1
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from == "object" || typeof from == "function")
8
+ for (let key of __getOwnPropNames(from))
9
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ return to;
11
+ };
12
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
13
+ var TamaguiComponentPropsBaseBase_exports = {};
14
+ module.exports = __toCommonJS(TamaguiComponentPropsBaseBase_exports);
15
+ //# sourceMappingURL=TamaguiComponentPropsBaseBase.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/interfaces/TamaguiComponentPropsBaseBase.tsx"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;",
5
+ "names": []
6
+ }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=TamaguiComponentState.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "mappings": "",
5
+ "names": []
6
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from == "object" || typeof from == "function")
8
+ for (let key of __getOwnPropNames(from))
9
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ return to;
11
+ };
12
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
13
+ var TamaguiComponentState_exports = {};
14
+ module.exports = __toCommonJS(TamaguiComponentState_exports);
15
+ //# sourceMappingURL=TamaguiComponentState.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/interfaces/TamaguiComponentState.tsx"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;",
5
+ "names": []
6
+ }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=WebOnlyPressEvents.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "mappings": "",
5
+ "names": []
6
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from == "object" || typeof from == "function")
8
+ for (let key of __getOwnPropNames(from))
9
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ return to;
11
+ };
12
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
13
+ var WebOnlyPressEvents_exports = {};
14
+ module.exports = __toCommonJS(WebOnlyPressEvents_exports);
15
+ //# sourceMappingURL=WebOnlyPressEvents.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/interfaces/WebOnlyPressEvents.tsx"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;",
5
+ "names": []
6
+ }
@@ -2,7 +2,7 @@ import { useTheme } from "./hooks/useTheme";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  const internalWithTheme = (Component, styleProvider) => (props) => {
4
4
  const { expressions, ...rest } = props, theme = useTheme();
5
- return /* @__PURE__ */ jsx(Component, { style: styleProvider(theme, props.expressions), ...rest });
5
+ return /* @__PURE__ */ jsx(Component, { style: styleProvider(theme, expressions), ...rest });
6
6
  };
7
7
  export {
8
8
  internalWithTheme
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/internalWithTheme.tsx"],
4
- "mappings": "AAEA,SAAS,gBAAgB;AAQd;AAJJ,MAAM,oBAAoB,CAAC,WAAgB,kBACzC,CAAC,UAAU;AAChB,QAAM,EAAE,aAAa,GAAG,KAAK,IAAI,OAC3B,QAAQ,SAAS;AACvB,SAAO,oBAAC,aAAU,OAAO,cAAc,OAAO,MAAM,WAAW,GAAI,GAAG,MAAM;AAC9E;",
4
+ "mappings": "AAAA,SAAS,gBAAgB;AAOhB;AAHF,MAAM,oBAAoB,CAAC,WAAgB,kBAAuB,CAAC,UAAU;AAClF,QAAM,EAAE,aAAa,GAAG,KAAK,IAAI,OAC3B,QAAQ,SAAS;AACvB,SAAO,oBAAC,aAAU,OAAO,cAAc,OAAO,WAAW,GAAI,GAAG,MAAM;AACxE;",
5
5
  "names": []
6
6
  }
@@ -21,7 +21,7 @@ module.exports = __toCommonJS(internalWithTheme_exports);
21
21
  var import_useTheme = require("./hooks/useTheme"), import_jsx_runtime = require("react/jsx-runtime");
22
22
  const internalWithTheme = (Component, styleProvider) => (props) => {
23
23
  const { expressions, ...rest } = props, theme = (0, import_useTheme.useTheme)();
24
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { style: styleProvider(theme, props.expressions), ...rest });
24
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { style: styleProvider(theme, expressions), ...rest });
25
25
  };
26
26
  // Annotate the CommonJS export names for ESM import in node:
27
27
  0 && (module.exports = {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/internalWithTheme.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,sBAAyB,6BAQd;AAJJ,MAAM,oBAAoB,CAAC,WAAgB,kBACzC,CAAC,UAAU;AAChB,QAAM,EAAE,aAAa,GAAG,KAAK,IAAI,OAC3B,YAAQ,0BAAS;AACvB,SAAO,4CAAC,aAAU,OAAO,cAAc,OAAO,MAAM,WAAW,GAAI,GAAG,MAAM;AAC9E;",
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAyB,6BAOhB;AAHF,MAAM,oBAAoB,CAAC,WAAgB,kBAAuB,CAAC,UAAU;AAClF,QAAM,EAAE,aAAa,GAAG,KAAK,IAAI,OAC3B,YAAQ,0BAAS;AACvB,SAAO,4CAAC,aAAU,OAAO,cAAc,OAAO,WAAW,GAAI,GAAG,MAAM;AACxE;",
5
5
  "names": []
6
6
  }
package/dist/esm/types.js CHANGED
@@ -1 +1,3 @@
1
+ export * from "./interfaces/KeyTypes";
2
+ export * from "./interfaces/TamaguiComponentState";
1
3
  //# sourceMappingURL=types.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": [],
4
- "mappings": "",
3
+ "sources": ["../../src/types.tsx"],
4
+ "mappings": "AA+BA,cAAc;AACd,cAAc;",
5
5
  "names": []
6
6
  }
@@ -8,8 +8,15 @@ var __copyProps = (to, from, except, desc) => {
8
8
  for (let key of __getOwnPropNames(from))
9
9
  !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
10
  return to;
11
- };
11
+ }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
12
12
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
13
13
  var types_exports = {};
14
14
  module.exports = __toCommonJS(types_exports);
15
+ __reExport(types_exports, require("./interfaces/KeyTypes"), module.exports);
16
+ __reExport(types_exports, require("./interfaces/TamaguiComponentState"), module.exports);
17
+ // Annotate the CommonJS export names for ESM import in node:
18
+ 0 && (module.exports = {
19
+ ...require("./interfaces/KeyTypes"),
20
+ ...require("./interfaces/TamaguiComponentState")
21
+ });
15
22
  //# sourceMappingURL=types.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/types.tsx"],
4
- "mappings": ";;;;;;;;;;;;AAAA;AAAA;",
4
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;AA+BA,0BAAc,kCA/Bd;AAgCA,0BAAc,+CAhCd;",
5
5
  "names": []
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/View.tsx"],
4
- "mappings": "AAAA,SAAS,mBAAmB;AAE5B,SAAS,0BAA0B;AACnC,SAAS,uBAAuB;AAazB,MAAM,OAAO,gBAKlB;AAAA,EACA,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd;AACF,CAAC;",
4
+ "mappings": "AAAA,SAAS,mBAAmB;AAE5B,SAAS,0BAA0B;AACnC,SAAS,uBAAuB;AAezB,MAAM,OAAO,gBAKlB;AAAA,EACA,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd;AACF,CAAC;",
5
5
  "names": []
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/View.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA4B,6BAE5B,mBAAmC,mCACnC,yBAAgC;AAazB,MAAM,WAAO,wCAKlB;AAAA,EACA,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd;AACF,CAAC;",
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA4B,6BAE5B,mBAAmC,mCACnC,yBAAgC;AAezB,MAAM,WAAO,wCAKlB;AAAA,EACA,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd;AACF,CAAC;",
5
5
  "names": []
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/web",
3
- "version": "1.88.4",
3
+ "version": "1.88.5",
4
4
  "source": "src/index.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -27,19 +27,19 @@
27
27
  "reset.css"
28
28
  ],
29
29
  "dependencies": {
30
- "@tamagui/compose-refs": "1.88.4",
31
- "@tamagui/constants": "1.88.4",
32
- "@tamagui/helpers": "1.88.4",
33
- "@tamagui/normalize-css-color": "1.88.4",
34
- "@tamagui/timer": "1.88.4",
35
- "@tamagui/use-did-finish-ssr": "1.88.4",
36
- "@tamagui/use-event": "1.88.4",
37
- "@tamagui/use-force-update": "1.88.4",
30
+ "@tamagui/compose-refs": "1.88.5",
31
+ "@tamagui/constants": "1.88.5",
32
+ "@tamagui/helpers": "1.88.5",
33
+ "@tamagui/normalize-css-color": "1.88.5",
34
+ "@tamagui/timer": "1.88.5",
35
+ "@tamagui/use-did-finish-ssr": "1.88.5",
36
+ "@tamagui/use-event": "1.88.5",
37
+ "@tamagui/use-force-update": "1.88.5",
38
38
  "react": "^18.2.0",
39
39
  "react-dom": "^18.2.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@tamagui/build": "1.88.4",
42
+ "@tamagui/build": "1.88.5",
43
43
  "@testing-library/react": "^14.0.0",
44
44
  "csstype": "^3.0.10",
45
45
  "typescript": "^5.3.3",
@@ -54,8 +54,6 @@ import {
54
54
  StaticConfig,
55
55
  StyleableOptions,
56
56
  TamaguiComponent,
57
- TamaguiComponentEvents,
58
- TamaguiComponentState,
59
57
  TamaguiComponentStateRef,
60
58
  TamaguiElement,
61
59
  TamaguiInternalConfig,
@@ -63,15 +61,14 @@ import {
63
61
  UseAnimationHook,
64
62
  UseAnimationProps,
65
63
  UseThemeWithStateProps,
66
- WebOnlyPressEvents,
67
64
  } from './types'
65
+ import { WebOnlyPressEvents } from './interfaces/WebOnlyPressEvents'
66
+ import { TamaguiComponentState } from './interfaces/TamaguiComponentState'
67
+ import { TamaguiComponentEvents } from './interfaces/TamaguiComponentEvents'
68
68
  import { Slot } from './views/Slot'
69
69
  import { getThemedChildren } from './views/Theme'
70
70
  import { ThemeDebug } from './views/ThemeDebug'
71
71
 
72
- // this appears to fix expo / babel not picking this up sometimes? really odd
73
- process.env.TAMAGUI_TARGET
74
-
75
72
  /**
76
73
  * All things that need one-time setup after createTamagui is called
77
74
  */
@@ -1,4 +1,4 @@
1
- import { TamaguiComponentState } from './types'
1
+ import { TamaguiComponentState } from './interfaces/TamaguiComponentState'
2
2
 
3
3
  export const defaultComponentState: TamaguiComponentState = {
4
4
  hover: false,
@@ -48,12 +48,12 @@ import type {
48
48
  SplitStyleProps,
49
49
  StaticConfig,
50
50
  StyleObject,
51
- TamaguiComponentState,
52
51
  TamaguiInternalConfig,
53
52
  TextStyleProps,
54
53
  ThemeParsed,
55
54
  ViewStyleWithPseudos,
56
55
  } from '../types'
56
+ import type { TamaguiComponentState } from '../interfaces/TamaguiComponentState'
57
57
  import { createMediaStyle } from './createMediaStyle'
58
58
  import { fixStyles } from './expandStyles'
59
59
  import { getGroupPropParts } from './getGroupPropParts'
@@ -1494,11 +1494,34 @@ if (process.env.TAMAGUI_TARGET === 'native') {
1494
1494
  outlineColor: 1,
1495
1495
  })
1496
1496
  } else {
1497
- Object.assign(skipProps, {
1498
- elevationAndroid: 1,
1499
- allowFontScaling: true,
1500
- adjustsFontSizeToFit: true,
1501
- })
1497
+ if (process.env.NODE_ENV !== 'production') {
1498
+ // native only, not web props
1499
+ // we only skip them in dev to avoid warnings, in prod they silently drop
1500
+ Object.assign(skipProps, {
1501
+ accessibilityElementsHidden: 1,
1502
+ accessibilityIgnoresInvertColors: 1,
1503
+ accessibilityLanguage: 1,
1504
+ adjustsFontSizeToFit: 1,
1505
+ allowFontScaling: 1,
1506
+ dataDetectorType: 1,
1507
+ dynamicTypeRamp: 1,
1508
+ elevationAndroid: 1,
1509
+ importantForAccessibility: 1,
1510
+ lineBreakStrategyIOS: 1,
1511
+ minimumFontScale: 1,
1512
+ needsOffscreenAlphaCompositing: 1,
1513
+ nextFocusDown: 1,
1514
+ nextFocusForward: 1,
1515
+ nextFocusLeft: 1,
1516
+ nextFocusRight: 1,
1517
+ nextFocusUp: 1,
1518
+ onMagicTap: 1,
1519
+ selectionColor: 1,
1520
+ shouldRasterizeIOS: 1,
1521
+ suppressHighlighting: 1,
1522
+ textBreakStrategy: 1,
1523
+ })
1524
+ }
1502
1525
  }
1503
1526
 
1504
1527
  const accessibilityRoleToWebRole = {
@@ -5,7 +5,7 @@ import { defaultComponentStateMounted } from '../defaultComponentState'
5
5
  import { useSplitStyles } from '../helpers/getSplitStyles'
6
6
  import {
7
7
  SplitStyleProps,
8
- StackStyleProps,
8
+ StackStyle,
9
9
  StaticConfig,
10
10
  ThemeParsed,
11
11
  UseMediaState,
@@ -27,7 +27,7 @@ export type PropsWithoutMediaStyles<A> = {
27
27
  [Key in keyof A extends `$${string}` ? never : keyof A]?: A[Key]
28
28
  }
29
29
 
30
- type StyleLikeObject = (StackStyleProps & Record<string, any>) | Object
30
+ type StyleLikeObject = (StackStyle & Record<string, any>) | Object
31
31
 
32
32
  /**
33
33
  * Returns props and style as a single object, expanding and merging shorthands and media queries.
@@ -0,0 +1,79 @@
1
+ export type SizeKeys =
2
+ | 'width'
3
+ | 'height'
4
+ | 'minWidth'
5
+ | 'minHeight'
6
+ | 'maxWidth'
7
+ | 'maxHeight'
8
+ | 'shadowRadius'
9
+
10
+ export type ColorKeys =
11
+ | 'color'
12
+ | 'backgroundColor'
13
+ | 'borderColor'
14
+ | 'borderBottomColor'
15
+ | 'borderTopColor'
16
+ | 'borderLeftColor'
17
+ | 'borderRightColor'
18
+ | 'shadowColor'
19
+ | 'outlineColor'
20
+ | 'textShadowColor'
21
+ | 'borderBlockColor'
22
+ | 'borderBlockEndColor'
23
+ | 'borderBlockStartColor'
24
+
25
+ export type SpaceKeys =
26
+ | 'space'
27
+ | 'padding'
28
+ | 'paddingHorizontal'
29
+ | 'paddingVertical'
30
+ | 'paddingLeft'
31
+ | 'paddingTop'
32
+ | 'paddingBottom'
33
+ | 'paddingLeft'
34
+ | 'paddingRight'
35
+ | 'paddingEnd'
36
+ | 'paddingStart'
37
+ | 'margin'
38
+ | 'marginHorizontal'
39
+ | 'marginVertical'
40
+ | 'marginLeft'
41
+ | 'marginTop'
42
+ | 'marginBottom'
43
+ | 'marginLeft'
44
+ | 'marginRight'
45
+ | 'marginEnd'
46
+ | 'marginStart'
47
+ | 'x'
48
+ | 'y'
49
+ | 'gap'
50
+ | 'rowGap'
51
+ | 'columnGap'
52
+ | 'scale'
53
+ | 'scaleX'
54
+ | 'scaleY'
55
+ | 'borderTopEndRadius'
56
+ | 'borderTopLeftRadius'
57
+ | 'borderTopRightRadius'
58
+ | 'borderTopStartRadius'
59
+ | 'borderBottomEndRadius'
60
+ | 'borderBottomLeftRadius'
61
+ | 'borderBottomRightRadius'
62
+ | 'borderBottomStartRadius'
63
+ | 'borderBottomWidth'
64
+ | 'borderLeftWidth'
65
+ | 'borderRadius'
66
+ | 'borderRightWidth'
67
+ | 'borderTopEndRadius'
68
+ | 'borderTopLeftRadius'
69
+ | 'borderTopRightRadius'
70
+ | 'borderEndWidth'
71
+ | 'borderStartWidth'
72
+ | 'borderTopStartRadius'
73
+ | 'borderTopWidth'
74
+ | 'borderWidth'
75
+ | 'left'
76
+ | 'top'
77
+ | 'right'
78
+ | 'bottom'
79
+ | 'shadowOffset'
@@ -0,0 +1,18 @@
1
+ export type TamaguiComponentEvents = {
2
+ cancelable?: boolean | undefined
3
+ disabled?: any
4
+ hitSlop?: any
5
+ delayLongPress?: any
6
+ delayPressIn?: any
7
+ delayPressOut?: any
8
+ focusable?: any
9
+ minPressDuration?: number | undefined
10
+ onPressIn: ((e: any) => void) | undefined
11
+ onPress: ((e: any) => void) | undefined
12
+ onLongPress?: ((e: any) => void) | undefined
13
+ onMouseEnter?: ((e: any) => void) | undefined
14
+ onMouseLeave?: ((e: any) => void) | undefined
15
+ onPressOut: ((e: any) => void) | undefined
16
+ onFocus?: ((e: any) => void) | undefined
17
+ onBlur?: ((e: any) => void) | undefined
18
+ }
@@ -0,0 +1,202 @@
1
+ import { Role } from './Role'
2
+ import { DebugProp, ThemeName, GroupNames } from '../types'
3
+
4
+ export type TamaguiComponentPropsBaseBase = {
5
+ target?: string
6
+
7
+ /**
8
+ * When truthy passes through all props to a single child element, and avoids rendering its own element.
9
+ * Must pass just one child React element that will receive all the props.
10
+ *
11
+ * The option "except-style" will avoid passing any style related props.
12
+ *
13
+ * The option "web" will map all React Native style props to web props (onPress becomes onClick).
14
+ *
15
+ * The option "except-style-web" combines the except-style and web options.
16
+ *
17
+ */
18
+ asChild?: boolean | 'except-style' | 'except-style-web' | 'web'
19
+
20
+ dangerouslySetInnerHTML?: { __html: string }
21
+ children?: any | any[]
22
+
23
+ debug?: DebugProp
24
+
25
+ disabled?: boolean
26
+
27
+ /**
28
+ * Same as the web className property, useful for applying styles from CSS on web only
29
+ */
30
+ className?: string
31
+
32
+ /**
33
+ * If given a theme it will only apply to this element, instead of passing down to children
34
+ */
35
+ themeShallow?: boolean
36
+
37
+ themeInverse?: boolean
38
+
39
+ /**
40
+ * Same as the web id property for setting a uid on an element
41
+ */
42
+ id?: string
43
+
44
+ /**
45
+ * Controls the output tag on web
46
+ * {@see https://developer.mozilla.org/en-US/docs/Web/HTML/Element}
47
+ */
48
+ tag?:
49
+ | (string & {})
50
+ | 'address'
51
+ | 'article'
52
+ | 'aside'
53
+ | 'footer'
54
+ | 'header'
55
+ | 'h1'
56
+ | 'h2'
57
+ | 'h3'
58
+ | 'h4'
59
+ | 'h5'
60
+ | 'h6'
61
+ | 'main'
62
+ | 'nav'
63
+ | 'section'
64
+ | 'search'
65
+ | 'blockquote'
66
+ | 'dd'
67
+ | 'div'
68
+ | 'dl'
69
+ | 'dt'
70
+ | 'figcaption'
71
+ | 'figure'
72
+ | 'hr'
73
+ | 'li'
74
+ | 'ol'
75
+ | 'ul'
76
+ | 'p'
77
+ | 'pre'
78
+ | 'a'
79
+ | 'abbr'
80
+ | 'p'
81
+ | 'b'
82
+ | 'abbr'
83
+ | 'bdi'
84
+ | 'bdo'
85
+ | 'br'
86
+ | 'cite'
87
+ | 'code'
88
+ | 'data'
89
+ | 'dfn'
90
+ | 'em'
91
+ | 'i'
92
+ | 'kbd'
93
+ | 'mark'
94
+ | 'q'
95
+ | 'rp'
96
+ | 'rt'
97
+ | 'rtc'
98
+ | 'ruby'
99
+ | 's'
100
+ | 'samp'
101
+ | 'small'
102
+ | 'span'
103
+ | 'strong'
104
+ | 'sub'
105
+ | 'sup'
106
+ | 'time'
107
+ | 'u'
108
+ | 'var'
109
+ | 'wbr'
110
+ | 'area'
111
+ | 'audio'
112
+ | 'img'
113
+ | 'map'
114
+ | 'track'
115
+ | 'video'
116
+ | 'embed'
117
+ | 'object'
118
+ | 'param'
119
+ | 'picture'
120
+ | 'source'
121
+ | 'canvas'
122
+ | 'noscript'
123
+ | 'script'
124
+ | 'del'
125
+ | 'ins'
126
+ | 'caption'
127
+ | 'col'
128
+ | 'colgroup'
129
+ | 'table'
130
+ | 'thead'
131
+ | 'tbody'
132
+ | 'td'
133
+ | 'th'
134
+ | 'tr'
135
+ | 'button'
136
+ | 'datalist'
137
+ | 'fieldset'
138
+ | 'form'
139
+ | 'input'
140
+ | 'label'
141
+ | 'legend'
142
+ | 'meter'
143
+ | 'optgroup'
144
+ | 'option'
145
+ | 'output'
146
+ | 'progress'
147
+ | 'select'
148
+ | 'textarea'
149
+ | 'details'
150
+ | 'dialog'
151
+ | 'menu'
152
+ | 'summary'
153
+ | 'template'
154
+
155
+ /**
156
+ * Applies a theme to this element
157
+ */
158
+ theme?: ThemeName | null
159
+
160
+ /**
161
+ * Marks this component as a group for use in styling children based on parents named group
162
+ * See: https://tamagui.dev/docs/intro/props
163
+ */
164
+ group?: GroupNames
165
+
166
+ /**
167
+ * Works only alongside group, when children of the group are using container based sizing on native you can hide them until parent is measured.
168
+ * See: https://tamagui.dev/docs/intro/props
169
+ */
170
+ untilMeasured?: 'hide' | 'show'
171
+
172
+ /**
173
+ * Equivalent to "name" property on styled() for automatically applying a theme
174
+ */
175
+ componentName?: string
176
+
177
+ /**
178
+ * Used for controlling the order of focus with keyboard or assistive device enavigation
179
+ * See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
180
+ */
181
+ tabIndex?: string | number
182
+
183
+ /**
184
+ * Equivalent to role="" attribute on web for accessibility
185
+ */
186
+ role?: Role
187
+
188
+ /**
189
+ * Disable all compiler optimization
190
+ */
191
+ disableOptimization?: boolean
192
+
193
+ /**
194
+ * Forces the pseudo style state to be on
195
+ */
196
+ forceStyle?: 'hover' | 'press' | 'focus'
197
+
198
+ /**
199
+ * Disables className output of styles, instead using only inline styles
200
+ */
201
+ disableClassName?: boolean
202
+ }
@@ -0,0 +1,15 @@
1
+ import { GroupState } from '../types'
2
+
3
+ export type TamaguiComponentState = {
4
+ hover: boolean
5
+ press: boolean
6
+ pressIn: boolean
7
+ focus: boolean
8
+ unmounted: boolean | 'should-enter'
9
+ animation?: null | {
10
+ style?: any
11
+ avoidClasses?: boolean
12
+ }
13
+ // for groups:
14
+ group?: Record<string, GroupState>
15
+ }