@hanzogui/web 7.0.0 → 7.3.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 (246) hide show
  1. package/LICENSE +40 -19
  2. package/dist/cjs/_withStableStyle.cjs +1 -1
  3. package/dist/cjs/_withStableStyle.native.js +1 -1
  4. package/dist/cjs/config.cjs +2 -2
  5. package/dist/cjs/config.native.js +2 -2
  6. package/dist/cjs/config.native.js.map +1 -1
  7. package/dist/cjs/constants/constants.cjs +3 -3
  8. package/dist/cjs/constants/constants.native.js +3 -3
  9. package/dist/cjs/createComponent.cjs +307 -530
  10. package/dist/cjs/createComponent.native.js +265 -588
  11. package/dist/cjs/createComponent.native.js.map +1 -1
  12. package/dist/cjs/createGui.cjs +19 -48
  13. package/dist/cjs/createGui.native.js +22 -65
  14. package/dist/cjs/createGui.native.js.map +1 -1
  15. package/dist/cjs/eventHandling.native.js +19 -9
  16. package/dist/cjs/eventHandling.native.js.map +1 -1
  17. package/dist/cjs/helpers/createDesignSystem.cjs +22 -36
  18. package/dist/cjs/helpers/createDesignSystem.native.js +19 -91
  19. package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
  20. package/dist/cjs/helpers/defaultAnimationDriver.cjs +1 -1
  21. package/dist/cjs/helpers/defaultAnimationDriver.native.js +1 -1
  22. package/dist/cjs/helpers/expandStyle.cjs +11 -74
  23. package/dist/cjs/helpers/expandStyle.native.js +29 -81
  24. package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
  25. package/dist/cjs/helpers/expandStyles.cjs +2 -15
  26. package/dist/cjs/helpers/expandStyles.native.js +7 -13
  27. package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
  28. package/dist/cjs/helpers/getSplitStyles.cjs +233 -557
  29. package/dist/cjs/helpers/getSplitStyles.native.js +204 -659
  30. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  31. package/dist/cjs/helpers/getThemeCSSRules.cjs +8 -16
  32. package/dist/cjs/helpers/getTokenForKey.cjs +32 -54
  33. package/dist/cjs/helpers/getTokenForKey.native.js +40 -59
  34. package/dist/cjs/helpers/getTokenForKey.native.js.map +1 -1
  35. package/dist/cjs/helpers/insertStyleRule.cjs +27 -79
  36. package/dist/cjs/helpers/insertStyleRule.native.js +16 -335
  37. package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
  38. package/dist/cjs/helpers/isActivePlatform.cjs +2 -17
  39. package/dist/cjs/helpers/isActivePlatform.native.js +2 -17
  40. package/dist/cjs/helpers/isActivePlatform.native.js.map +1 -1
  41. package/dist/cjs/helpers/log.cjs +1 -4
  42. package/dist/cjs/helpers/log.native.js +1 -6
  43. package/dist/cjs/helpers/log.native.js.map +1 -1
  44. package/dist/cjs/helpers/propMapper.cjs +37 -110
  45. package/dist/cjs/helpers/propMapper.native.js +54 -131
  46. package/dist/cjs/helpers/propMapper.native.js.map +1 -1
  47. package/dist/cjs/helpers/skipProps.cjs +3 -11
  48. package/dist/cjs/helpers/skipProps.native.js +3 -11
  49. package/dist/cjs/helpers/skipProps.native.js.map +1 -1
  50. package/dist/cjs/helpers/useRenderElement.cjs +7 -18
  51. package/dist/cjs/helpers/useRenderElement.native.js +7 -15
  52. package/dist/cjs/helpers/useRenderElement.native.js.map +1 -1
  53. package/dist/cjs/helpers/wrapStyleTags.cjs +11 -15
  54. package/dist/cjs/helpers/wrapStyleTags.native.js +3 -22
  55. package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
  56. package/dist/cjs/hooks/getThemeProxied.cjs +10 -54
  57. package/dist/cjs/hooks/getThemeProxied.native.js +27 -48
  58. package/dist/cjs/hooks/getThemeProxied.native.js.map +1 -1
  59. package/dist/cjs/hooks/useTheme.cjs +2 -2
  60. package/dist/cjs/hooks/useTheme.native.js +2 -2
  61. package/dist/cjs/hooks/useTheme.native.js.map +1 -1
  62. package/dist/cjs/hooks/useThemeState.cjs +66 -124
  63. package/dist/cjs/hooks/useThemeState.native.js +64 -142
  64. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  65. package/dist/cjs/insertFont.cjs +6 -15
  66. package/dist/cjs/insertFont.native.js +7 -23
  67. package/dist/cjs/insertFont.native.js.map +1 -1
  68. package/dist/cjs/setupReactNative.cjs +4 -24
  69. package/dist/cjs/setupReactNative.native.js +5 -26
  70. package/dist/cjs/setupReactNative.native.js.map +1 -1
  71. package/dist/cjs/views/GuiProvider.cjs +4 -6
  72. package/dist/cjs/views/GuiProvider.native.js +5 -7
  73. package/dist/cjs/views/GuiProvider.native.js.map +1 -1
  74. package/dist/cjs/views/Text.cjs +11 -18
  75. package/dist/cjs/views/Text.native.js +6 -14
  76. package/dist/cjs/views/Text.native.js.map +1 -1
  77. package/dist/cjs/views/ThemeProvider.cjs +9 -11
  78. package/dist/cjs/views/ThemeProvider.native.js +3 -16
  79. package/dist/cjs/views/ThemeProvider.native.js.map +1 -1
  80. package/dist/cjs/views/View.native.js.map +1 -1
  81. package/dist/esm/_withStableStyle.mjs +1 -1
  82. package/dist/esm/_withStableStyle.mjs.map +1 -1
  83. package/dist/esm/_withStableStyle.native.js +1 -1
  84. package/dist/esm/config.mjs +2 -2
  85. package/dist/esm/config.mjs.map +1 -1
  86. package/dist/esm/config.native.js +2 -2
  87. package/dist/esm/config.native.js.map +1 -1
  88. package/dist/esm/constants/constants.mjs +3 -3
  89. package/dist/esm/constants/constants.native.js +3 -3
  90. package/dist/esm/createComponent.mjs +311 -536
  91. package/dist/esm/createComponent.mjs.map +1 -1
  92. package/dist/esm/createComponent.native.js +265 -591
  93. package/dist/esm/createComponent.native.js.map +1 -1
  94. package/dist/esm/createGui.mjs +20 -51
  95. package/dist/esm/createGui.mjs.map +1 -1
  96. package/dist/esm/createGui.native.js +24 -70
  97. package/dist/esm/createGui.native.js.map +1 -1
  98. package/dist/esm/createVariables.mjs.map +1 -1
  99. package/dist/esm/createVariables.native.js.map +1 -1
  100. package/dist/esm/eventHandling.native.js +19 -9
  101. package/dist/esm/eventHandling.native.js.map +1 -1
  102. package/dist/esm/helpers/createDesignSystem.mjs +22 -36
  103. package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
  104. package/dist/esm/helpers/createDesignSystem.native.js +18 -90
  105. package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
  106. package/dist/esm/helpers/defaultAnimationDriver.mjs +1 -1
  107. package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -1
  108. package/dist/esm/helpers/defaultAnimationDriver.native.js +1 -1
  109. package/dist/esm/helpers/expandStyle.mjs +12 -73
  110. package/dist/esm/helpers/expandStyle.mjs.map +1 -1
  111. package/dist/esm/helpers/expandStyle.native.js +28 -80
  112. package/dist/esm/helpers/expandStyle.native.js.map +1 -1
  113. package/dist/esm/helpers/expandStyles.mjs +2 -15
  114. package/dist/esm/helpers/expandStyles.mjs.map +1 -1
  115. package/dist/esm/helpers/expandStyles.native.js +7 -13
  116. package/dist/esm/helpers/expandStyles.native.js.map +1 -1
  117. package/dist/esm/helpers/getSplitStyles.mjs +236 -560
  118. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  119. package/dist/esm/helpers/getSplitStyles.native.js +205 -662
  120. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  121. package/dist/esm/helpers/getThemeCSSRules.mjs +8 -16
  122. package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
  123. package/dist/esm/helpers/getTokenForKey.mjs +32 -54
  124. package/dist/esm/helpers/getTokenForKey.mjs.map +1 -1
  125. package/dist/esm/helpers/getTokenForKey.native.js +40 -59
  126. package/dist/esm/helpers/getTokenForKey.native.js.map +1 -1
  127. package/dist/esm/helpers/insertStyleRule.mjs +27 -79
  128. package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
  129. package/dist/esm/helpers/insertStyleRule.native.js +14 -333
  130. package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
  131. package/dist/esm/helpers/isActivePlatform.mjs +2 -17
  132. package/dist/esm/helpers/isActivePlatform.mjs.map +1 -1
  133. package/dist/esm/helpers/isActivePlatform.native.js +2 -17
  134. package/dist/esm/helpers/isActivePlatform.native.js.map +1 -1
  135. package/dist/esm/helpers/log.mjs +1 -4
  136. package/dist/esm/helpers/log.mjs.map +1 -1
  137. package/dist/esm/helpers/log.native.js +1 -6
  138. package/dist/esm/helpers/log.native.js.map +1 -1
  139. package/dist/esm/helpers/propMapper.mjs +37 -108
  140. package/dist/esm/helpers/propMapper.mjs.map +1 -1
  141. package/dist/esm/helpers/propMapper.native.js +54 -131
  142. package/dist/esm/helpers/propMapper.native.js.map +1 -1
  143. package/dist/esm/helpers/skipProps.mjs +3 -10
  144. package/dist/esm/helpers/skipProps.mjs.map +1 -1
  145. package/dist/esm/helpers/skipProps.native.js +2 -10
  146. package/dist/esm/helpers/skipProps.native.js.map +1 -1
  147. package/dist/esm/helpers/useRenderElement.mjs +9 -22
  148. package/dist/esm/helpers/useRenderElement.mjs.map +1 -1
  149. package/dist/esm/helpers/useRenderElement.native.js +8 -17
  150. package/dist/esm/helpers/useRenderElement.native.js.map +1 -1
  151. package/dist/esm/helpers/wrapStyleTags.mjs +11 -15
  152. package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
  153. package/dist/esm/helpers/wrapStyleTags.native.js +1 -20
  154. package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -1
  155. package/dist/esm/hooks/getThemeProxied.mjs +11 -52
  156. package/dist/esm/hooks/getThemeProxied.mjs.map +1 -1
  157. package/dist/esm/hooks/getThemeProxied.native.js +27 -48
  158. package/dist/esm/hooks/getThemeProxied.native.js.map +1 -1
  159. package/dist/esm/hooks/useTheme.mjs +2 -2
  160. package/dist/esm/hooks/useTheme.mjs.map +1 -1
  161. package/dist/esm/hooks/useTheme.native.js +2 -2
  162. package/dist/esm/hooks/useTheme.native.js.map +1 -1
  163. package/dist/esm/hooks/useThemeState.mjs +67 -124
  164. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  165. package/dist/esm/hooks/useThemeState.native.js +64 -142
  166. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  167. package/dist/esm/insertFont.mjs +7 -17
  168. package/dist/esm/insertFont.mjs.map +1 -1
  169. package/dist/esm/insertFont.native.js +7 -24
  170. package/dist/esm/insertFont.native.js.map +1 -1
  171. package/dist/esm/setupReactNative.mjs +4 -24
  172. package/dist/esm/setupReactNative.mjs.map +1 -1
  173. package/dist/esm/setupReactNative.native.js +5 -26
  174. package/dist/esm/setupReactNative.native.js.map +1 -1
  175. package/dist/esm/views/GuiProvider.mjs +4 -6
  176. package/dist/esm/views/GuiProvider.mjs.map +1 -1
  177. package/dist/esm/views/GuiProvider.native.js +5 -7
  178. package/dist/esm/views/GuiProvider.native.js.map +1 -1
  179. package/dist/esm/views/Slot.mjs.map +1 -1
  180. package/dist/esm/views/Text.mjs +11 -18
  181. package/dist/esm/views/Text.mjs.map +1 -1
  182. package/dist/esm/views/Text.native.js +5 -12
  183. package/dist/esm/views/Text.native.js.map +1 -1
  184. package/dist/esm/views/Theme.mjs.map +1 -1
  185. package/dist/esm/views/ThemeProvider.mjs +9 -11
  186. package/dist/esm/views/ThemeProvider.mjs.map +1 -1
  187. package/dist/esm/views/ThemeProvider.native.js +1 -14
  188. package/dist/esm/views/ThemeProvider.native.js.map +1 -1
  189. package/dist/esm/views/View.mjs.map +1 -1
  190. package/dist/esm/views/View.native.js.map +1 -1
  191. package/package.json +34 -22
  192. package/src/_withStableStyle.tsx +2 -2
  193. package/src/config.ts +7 -4
  194. package/src/constants/accessibilityDirectMap.tsx +1 -1
  195. package/src/constants/constants.ts +3 -3
  196. package/src/createComponent.tsx +31 -2
  197. package/src/createGui.ts +2 -2
  198. package/src/eventHandling.native.ts +31 -10
  199. package/src/helpers/createMediaStyle.ts +1 -1
  200. package/src/helpers/defaultAnimationDriver.tsx +1 -1
  201. package/src/helpers/getSplitStyles.tsx +1 -1
  202. package/src/helpers/getTokenForKey.ts +42 -29
  203. package/src/helpers/insertStyleRule.tsx +2 -2
  204. package/src/helpers/isActivePlatform.ts +5 -5
  205. package/src/helpers/mergeProps.ts +1 -1
  206. package/src/helpers/skipProps.ts +1 -1
  207. package/src/helpers/useRenderElement.tsx +4 -1
  208. package/src/hooks/useTheme.tsx +2 -2
  209. package/src/interfaces/GuiComponentPropsBaseBase.tsx +10 -4
  210. package/src/styled.tsx +2 -2
  211. package/src/types.tsx +33 -24
  212. package/src/views/View.tsx +6 -1
  213. package/types/config.d.ts.map +1 -1
  214. package/types/eventHandling.native.d.ts.map +1 -1
  215. package/types/helpers/getTokenForKey.d.ts.map +1 -1
  216. package/types/helpers/isActivePlatform.d.ts +5 -5
  217. package/types/helpers/skipProps.d.ts +1 -1
  218. package/types/helpers/useRenderElement.d.ts.map +1 -1
  219. package/types/helpers/wrapStyleTags.d.ts +1 -1
  220. package/types/helpers/wrapStyleTags.d.ts.map +1 -1
  221. package/types/interfaces/GuiComponentPropsBaseBase.d.ts +3 -3
  222. package/types/interfaces/GuiComponentPropsBaseBase.d.ts.map +1 -1
  223. package/types/styled.d.ts +1 -1
  224. package/types/types.d.ts +17 -17
  225. package/types/types.d.ts.map +1 -1
  226. package/types/views/Configuration.d.ts +1 -1
  227. package/types/views/Configuration.d.ts.map +1 -1
  228. package/types/views/FontLanguage.d.ts +1 -1
  229. package/types/views/FontLanguage.native.d.ts +2 -1
  230. package/types/views/FontLanguage.native.d.ts.map +1 -1
  231. package/types/views/GuiProvider.d.ts +2 -1
  232. package/types/views/GuiProvider.d.ts.map +1 -1
  233. package/types/views/GuiRoot.d.ts +1 -1
  234. package/types/views/GuiRoot.d.ts.map +1 -1
  235. package/types/views/Slot.d.ts +1 -1
  236. package/types/views/ThemeProvider.d.ts +1 -1
  237. package/types/views/ThemeProvider.d.ts.map +1 -1
  238. package/types/views/View.d.ts.map +1 -1
  239. package/.turbo/turbo-build.log +0 -2
  240. package/inject-styles/index.cjs +0 -2
  241. package/inject-styles/index.js +0 -2
  242. package/tsconfig.json +0 -44
  243. package/tsconfig.test.json +0 -9
  244. package/vitest.config.d.ts +0 -3
  245. package/vitest.config.d.ts.map +0 -1
  246. package/vitest.config.ts +0 -14
@@ -41,113 +41,6 @@ var debugKeyListeners;
41
41
  var startVisualizer;
42
42
  var componentSetStates = /* @__PURE__ */new Set();
43
43
  var avoidReRenderKeys = /* @__PURE__ */new Set(["hover", "press", "pressIn", "group", "focus", "focusWithin", "media", "group"]);
44
- if (false) {
45
- var cancelPresses = function () {
46
- componentSetStates.forEach(function (setState) {
47
- return setState(function (prev) {
48
- if (prev.press || prev.pressIn) {
49
- return {
50
- ...prev,
51
- press: false,
52
- pressIn: false
53
- };
54
- }
55
- return prev;
56
- });
57
- });
58
- componentSetStates.clear();
59
- };
60
- var cancelTouches = function () {
61
- componentSetStates.forEach(function (setState) {
62
- return setState(function (prev) {
63
- if (prev.press || prev.pressIn || prev.hover) {
64
- return {
65
- ...prev,
66
- press: false,
67
- pressIn: false,
68
- hover: false
69
- };
70
- }
71
- return prev;
72
- });
73
- });
74
- componentSetStates.clear();
75
- };
76
- addEventListener("mouseup", cancelPresses);
77
- addEventListener("touchend", cancelTouches);
78
- addEventListener("touchcancel", cancelTouches);
79
- if (process.env.NODE_ENV === "development") {
80
- startVisualizer = function () {
81
- var devVisualizerConfig = devConfig === null || devConfig === void 0 ? void 0 : devConfig.visualizer;
82
- if (devVisualizerConfig && !globalThis.__guiDevVisualizer) {
83
- let show2 = function (val) {
84
- clearTimeout(tm);
85
- isShowing = val;
86
- debugKeyListeners === null || debugKeyListeners === void 0 ? void 0 : debugKeyListeners.forEach(function (l) {
87
- return l(val);
88
- });
89
- if (!val && resizeListener) {
90
- window.removeEventListener("resize", resizeListener);
91
- resizeListener = null;
92
- }
93
- },
94
- cancelShow2 = function () {
95
- clearTimeout(tm);
96
- if (resizeListener) {
97
- window.removeEventListener("resize", resizeListener);
98
- resizeListener = null;
99
- }
100
- };
101
- var show = show2,
102
- cancelShow = cancelShow2;
103
- globalThis.__guiDevVisualizer = true;
104
- debugKeyListeners = /* @__PURE__ */new Set();
105
- var tm;
106
- var isShowing = false;
107
- var resizeListener = null;
108
- var options = {
109
- key: "Alt",
110
- delay: 800,
111
- ...((typeof devVisualizerConfig === "undefined" ? "undefined" : _type_of(devVisualizerConfig)) === "object" ? devVisualizerConfig : {})
112
- };
113
- window.addEventListener("blur", function () {
114
- show2(false);
115
- });
116
- window.addEventListener("keydown", function (param) {
117
- var {
118
- key,
119
- metaKey,
120
- defaultPrevented
121
- } = param;
122
- clearTimeout(tm);
123
- if (defaultPrevented) return;
124
- if (metaKey) return;
125
- if (key === options.key) {
126
- if (!resizeListener) {
127
- resizeListener = function () {
128
- return cancelShow2();
129
- };
130
- window.addEventListener("resize", resizeListener);
131
- }
132
- tm = setTimeout(function () {
133
- show2(true);
134
- }, options.delay);
135
- }
136
- });
137
- window.addEventListener("keyup", function (param) {
138
- var {
139
- defaultPrevented
140
- } = param;
141
- if (defaultPrevented) return;
142
- cancelShow2();
143
- if (isShowing) {
144
- show2(false);
145
- }
146
- });
147
- }
148
- };
149
- }
150
- }
151
44
  var BaseText;
152
45
  var BaseView;
153
46
  var hasSetupBaseViews = false;
@@ -159,19 +52,13 @@ var lastInteractionWasTouch = {
159
52
  };
160
53
  if (isWeb && typeof document !== "undefined") {
161
54
  document.addEventListener("keydown", function () {
162
- if (!lastInteractionWasKeyboard.value) {
163
- lastInteractionWasKeyboard.value = true;
164
- }
55
+ if (!lastInteractionWasKeyboard.value) lastInteractionWasKeyboard.value = true;
165
56
  });
166
57
  document.addEventListener("mousedown", function () {
167
- if (lastInteractionWasKeyboard.value) {
168
- lastInteractionWasKeyboard.value = false;
169
- }
58
+ if (lastInteractionWasKeyboard.value) lastInteractionWasKeyboard.value = false;
170
59
  });
171
60
  document.addEventListener("mousemove", function () {
172
- if (lastInteractionWasKeyboard.value) {
173
- lastInteractionWasKeyboard.value = false;
174
- }
61
+ if (lastInteractionWasKeyboard.value) lastInteractionWasKeyboard.value = false;
175
62
  lastInteractionWasTouch.value = false;
176
63
  });
177
64
  document.addEventListener("touchstart", function () {
@@ -197,15 +84,13 @@ function createComponent(staticConfig) {
197
84
  startVisualizer = void 0;
198
85
  }
199
86
  }
200
- if (true) {
201
- if (!hasSetupBaseViews) {
202
- var _hooks_getBaseViews;
203
- hasSetupBaseViews = true;
204
- var baseViews = (_hooks_getBaseViews = hooks.getBaseViews) === null || _hooks_getBaseViews === void 0 ? void 0 : _hooks_getBaseViews.call(hooks);
205
- if (baseViews) {
206
- BaseText = baseViews.Text;
207
- BaseView = baseViews.View;
208
- }
87
+ if (!hasSetupBaseViews) {
88
+ var _hooks_getBaseViews;
89
+ hasSetupBaseViews = true;
90
+ var baseViews = (_hooks_getBaseViews = hooks.getBaseViews) === null || _hooks_getBaseViews === void 0 ? void 0 : _hooks_getBaseViews.call(hooks);
91
+ if (baseViews) {
92
+ BaseText = baseViews.Text;
93
+ BaseView = baseViews.View;
209
94
  }
210
95
  }
211
96
  if (process.env.NODE_ENV === "test") {
@@ -224,76 +109,66 @@ function createComponent(staticConfig) {
224
109
  var overriddenContextProps = null;
225
110
  var componentContext = React.useContext(ComponentContext);
226
111
  var hasTextAncestor = !!(isWeb && isText ? componentContext.inText : false);
227
- var isInsideNativeMenu = true ? React.useContext(NativeMenuContext) : false;
112
+ var isInsideNativeMenu = React.useContext(NativeMenuContext);
228
113
  if (!process.env.GUI_IS_CORE_NODE && process.env.NODE_ENV === "development" && debugProp === "profile" && !time) {
229
- var timer = require("@hanzogui/timer").timer();
230
- time = timer.start();
114
+ time = require("@hanzogui/timer").timer().start();
231
115
  globalThis["time"] = time;
232
116
  }
233
- if (process.env.NODE_ENV === "development" && !time && globalThis.time) {
234
- time = globalThis.time;
235
- }
236
- if (process.env.NODE_ENV === "development" && time) time`non-tamagui time (ignore)`;
117
+ if (process.env.NODE_ENV === "development" && !time && globalThis.time) time = globalThis.time;
118
+ if (process.env.NODE_ENV === "development" && time) time`non-gui time (ignore)`;
237
119
  var props = propsIn;
238
120
  var componentName = props.componentName || staticConfig.componentName;
239
- var defaultProps = getDefaultProps(staticConfig, props.componentName);
240
- var [nextProps, overrides] = mergeComponentProps(defaultProps, styledContextValue, propsIn);
121
+ var [nextProps, overrides] = mergeComponentProps(getDefaultProps(staticConfig, props.componentName), styledContextValue, propsIn);
241
122
  props = nextProps;
242
123
  overriddenContextProps = overrides;
243
- if (process.env.NODE_ENV === "development" && isClient) {
244
- React.useEffect(function () {
245
- var node;
246
- var overlay = null;
247
- var remove = function () {
248
- if (overlay) {
249
- try {
250
- var _overlay_parentNode;
251
- (_overlay_parentNode = overlay.parentNode) === null || _overlay_parentNode === void 0 ? void 0 : _overlay_parentNode.removeChild(overlay);
252
- overlay = null;
253
- } catch (e) {}
254
- }
255
- };
256
- var debugVisualizerHandler = function () {
257
- var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
258
- node = stateRef.current.host;
259
- if (!node) return;
260
- if (show) {
261
- if (!overlay) {
262
- overlay = document.createElement("span");
263
- overlay.style.inset = "0px";
264
- overlay.style.zIndex = "1000000";
265
- overlay.style.position = "absolute";
266
- overlay.style.borderColor = "red";
267
- overlay.style.borderWidth = "1px";
268
- overlay.style.borderStyle = "dotted";
269
- }
270
- var dataAt = node.getAttribute("data-at") || "";
271
- var dataIn = node.getAttribute("data-in") || "";
272
- var tooltip = document.createElement("span");
273
- tooltip.style.position = "absolute";
274
- tooltip.style.top = "0px";
275
- tooltip.style.left = "0px";
276
- tooltip.style.padding = "3px";
277
- tooltip.style.background = "rgba(0,0,0,0.75)";
278
- tooltip.style.color = "rgba(255,255,255,1)";
279
- tooltip.style.fontSize = "12px";
280
- tooltip.style.lineHeight = "12px";
281
- tooltip.style.fontFamily = "monospace";
282
- tooltip.innerText = `${componentName || ""} ${dataAt} ${dataIn}`.trim();
283
- overlay.appendChild(tooltip);
284
- node.appendChild(overlay);
285
- } else {
286
- remove();
124
+ if (process.env.NODE_ENV === "development" && isClient) React.useEffect(function () {
125
+ var node;
126
+ var overlay = null;
127
+ var remove = function () {
128
+ if (overlay) try {
129
+ var _overlay_parentNode;
130
+ (_overlay_parentNode = overlay.parentNode) === null || _overlay_parentNode === void 0 || _overlay_parentNode.removeChild(overlay);
131
+ overlay = null;
132
+ } catch (e) {}
133
+ };
134
+ var debugVisualizerHandler = function () {
135
+ var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
136
+ node = stateRef.current.host;
137
+ if (!node) return;
138
+ if (show) {
139
+ if (!overlay) {
140
+ overlay = document.createElement("span");
141
+ overlay.style.inset = "0px";
142
+ overlay.style.zIndex = "1000000";
143
+ overlay.style.position = "absolute";
144
+ overlay.style.borderColor = "red";
145
+ overlay.style.borderWidth = "1px";
146
+ overlay.style.borderStyle = "dotted";
287
147
  }
288
- };
289
- debugKeyListeners = debugKeyListeners || /* @__PURE__ */new Set();
290
- debugKeyListeners.add(debugVisualizerHandler);
291
- return function () {
292
- remove();
293
- debugKeyListeners === null || debugKeyListeners === void 0 ? void 0 : debugKeyListeners.delete(debugVisualizerHandler);
294
- };
295
- }, [componentName]);
296
- }
148
+ var dataAt = node.getAttribute("data-at") || "";
149
+ var dataIn = node.getAttribute("data-in") || "";
150
+ var tooltip = document.createElement("span");
151
+ tooltip.style.position = "absolute";
152
+ tooltip.style.top = "0px";
153
+ tooltip.style.left = "0px";
154
+ tooltip.style.padding = "3px";
155
+ tooltip.style.background = "rgba(0,0,0,0.75)";
156
+ tooltip.style.color = "rgba(255,255,255,1)";
157
+ tooltip.style.fontSize = "12px";
158
+ tooltip.style.lineHeight = "12px";
159
+ tooltip.style.fontFamily = "monospace";
160
+ tooltip.innerText = `${componentName || ""} ${dataAt} ${dataIn}`.trim();
161
+ overlay.appendChild(tooltip);
162
+ node.appendChild(overlay);
163
+ } else remove();
164
+ };
165
+ debugKeyListeners = debugKeyListeners || /* @__PURE__ */new Set();
166
+ debugKeyListeners.add(debugVisualizerHandler);
167
+ return function () {
168
+ remove();
169
+ debugKeyListeners === null || debugKeyListeners === void 0 || debugKeyListeners.delete(debugVisualizerHandler);
170
+ };
171
+ }, [componentName]);
297
172
  var groupContextParent = React.useContext(GroupContext);
298
173
  var animationDriver = function () {
299
174
  if (props.animatedBy && config) {
@@ -328,22 +203,18 @@ function createComponent(staticConfig) {
328
203
  willBeAnimatedClient,
329
204
  startedUnhydrated
330
205
  } = componentState;
331
- if (hasAnimationProp && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders)) {
332
- useIsomorphicLayoutEffect(function () {
333
- var pendingState = stateRef.current.nextState;
334
- if (pendingState) {
335
- stateRef.current.nextState = void 0;
336
- componentState.setStateShallow(pendingState);
337
- }
338
- });
339
- }
206
+ if (hasAnimationProp && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders)) useIsomorphicLayoutEffect(function () {
207
+ var pendingState = stateRef.current.nextState;
208
+ if (pendingState) {
209
+ stateRef.current.nextState = void 0;
210
+ componentState.setStateShallow(pendingState);
211
+ }
212
+ });
340
213
  var allGroupContexts = useMemo(function () {
341
214
  var _stateRef_current_group_listeners, _stateRef_current_group;
342
- if (!groupName || props.passThrough) {
343
- return groupContextParent;
344
- }
215
+ if (!groupName || props.passThrough) return groupContextParent;
345
216
  var listeners = /* @__PURE__ */new Set();
346
- (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 ? void 0 : (_stateRef_current_group_listeners = _stateRef_current_group.listeners) === null || _stateRef_current_group_listeners === void 0 ? void 0 : _stateRef_current_group_listeners.clear();
217
+ (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || (_stateRef_current_group_listeners = _stateRef_current_group.listeners) == null || _stateRef_current_group_listeners.clear();
347
218
  stateRef.current.group = {
348
219
  listeners,
349
220
  emit(state2) {
@@ -353,18 +224,14 @@ function createComponent(staticConfig) {
353
224
  },
354
225
  subscribe(cb) {
355
226
  listeners.add(cb);
356
- if (listeners.size === 1) {
357
- setStateShallow({
358
- hasDynGroupChildren: true
359
- });
360
- }
227
+ if (listeners.size === 1) setStateShallow({
228
+ hasDynGroupChildren: true
229
+ });
361
230
  return function () {
362
231
  listeners.delete(cb);
363
- if (listeners.size === 0) {
364
- setStateShallow({
365
- hasDynGroupChildren: false
366
- });
367
- }
232
+ if (listeners.size === 0) setStateShallow({
233
+ hasDynGroupChildren: false
234
+ });
368
235
  };
369
236
  }
370
237
  };
@@ -378,7 +245,7 @@ function createComponent(staticConfig) {
378
245
  var _stateRef_current_group2;
379
246
  var dispose = (_stateRef_current_group2 = stateRef.current.group) === null || _stateRef_current_group2 === void 0 ? void 0 : _stateRef_current_group2.subscribe(listener);
380
247
  return function () {
381
- dispose === null || dispose === void 0 ? void 0 : dispose();
248
+ dispose === null || dispose === void 0 || dispose();
382
249
  };
383
250
  }
384
251
  }
@@ -387,18 +254,11 @@ function createComponent(staticConfig) {
387
254
  var setStateShallow = componentState.setStateShallow;
388
255
  if (process.env.NODE_ENV === "development" && time) time`use-state`;
389
256
  var renderProp = props.render;
390
- var isRenderString = !Component || typeof Component === "string";
391
- var element = isWeb ? isRenderString ? renderProp || Component : Component : Component;
392
- var BaseTextComponent = BaseText || element || "span";
393
- var BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div");
394
- var BaseComponent = isText ? BaseTextComponent : BaseViewComponent;
257
+ var element = isWeb ? !Component || typeof Component === "string" ? renderProp || Component : Component : Component;
258
+ var BaseComponent = isText ? BaseText || element || "span" : BaseView || element || (hasTextAncestor ? "span" : "div");
395
259
  var elementType = BaseComponent;
396
- var isAnimatedCustomComponent = animationDriver && isAnimated && animationDriver.needsCustomComponent;
397
- if (isAnimatedCustomComponent) {
398
- elementType = animationDriver[isText ? "Text" : "View"] || elementType;
399
- }
400
- var disableThemeProp = true ? false : props["data-disable-theme"];
401
- var disableTheme = disableThemeProp || isHOC;
260
+ if (animationDriver && isAnimated && animationDriver.needsCustomComponent) elementType = animationDriver[isText ? "Text" : "View"] || elementType;
261
+ var disableTheme = isHOC;
402
262
  if (process.env.NODE_ENV === "development" && time) time`theme-props`;
403
263
  var themeStateProps = {
404
264
  componentName,
@@ -407,15 +267,11 @@ function createComponent(staticConfig) {
407
267
  debug: debugProp,
408
268
  unstyled: props.unstyled
409
269
  };
410
- if ("theme" in props) {
411
- themeStateProps.name = props.theme;
412
- }
270
+ if ("theme" in props) themeStateProps.name = props.theme;
413
271
  themeStateProps.needsUpdate = function () {
414
272
  return !!stateRef.current.isListeningToTheme;
415
273
  };
416
- if (true) {
417
- themeStateProps.deopt = willBeAnimated;
418
- }
274
+ themeStateProps.deopt = willBeAnimated;
419
275
  if (process.env.NODE_ENV === "development") {
420
276
  if (debugProp && debugProp !== "profile") {
421
277
  var name = `${componentName || (Component === null || Component === void 0 ? void 0 : Component.displayName) || (Component === null || Component === void 0 ? void 0 : Component.name) || "[Unnamed Component]"}`;
@@ -424,19 +280,15 @@ function createComponent(staticConfig) {
424
280
  var banner = `<${name} /> ${internalID} ${dataIs ? ` ${dataIs}` : ""} ${type.trim()} (hydrated: ${isHydrated}) (unmounted: ${state.unmounted})`;
425
281
  var ch = propsIn.children;
426
282
  var childLog = typeof ch === "string" ? ch.length > 4 ? ch.slice(0, 4) + "..." : ch : "";
427
- if (childLog.length) {
428
- childLog = `(children: ${childLog})`;
429
- }
283
+ if (childLog.length) childLog = `(children: ${childLog})`;
430
284
  if (isWeb) {
431
285
  console.info(`%c ${banner}`, "background: green; color: white;");
432
- if (isServer) {
433
- log({
434
- noClass,
435
- isAnimated,
436
- isWeb,
437
- inputStyle
438
- });
439
- } else {
286
+ if (isServer) log({
287
+ noClass,
288
+ isAnimated,
289
+ isWeb,
290
+ inputStyle
291
+ });else {
440
292
  console.groupEnd();
441
293
  console.groupCollapsed(`${childLog} [inspect props, state, context \u{1F447}]`);
442
294
  log("props in:", propsIn);
@@ -490,13 +342,10 @@ ${banner}
490
342
  var mediaState = useMedia(componentContext, debugProp);
491
343
  setDidGetVariableValue(false);
492
344
  if (process.env.NODE_ENV === "development" && time) time`media`;
493
- var resolveValues =
494
- // if HOC + mounted + has animation prop, resolve as value so it passes non-variable to child
495
- isAnimated && inputStyle !== "css" || isHOC && state.unmounted == false && hasAnimationProp ? "value" : "auto";
496
345
  var styleProps = {
497
346
  mediaState,
498
347
  noClass,
499
- resolveValues,
348
+ resolveValues: isAnimated && inputStyle !== "css" || isHOC && state.unmounted == false && hasAnimationProp ? "value" : "auto",
500
349
  isExiting,
501
350
  isAnimated,
502
351
  willBeAnimated,
@@ -515,24 +364,18 @@ ${banner}
515
364
  overriddenContextProps = overriddenContextProps || {};
516
365
  overriddenContextProps[key] = splitStyles.overriddenContextProps[key];
517
366
  }
518
- if (!staticConfig.context) {
519
- contextForOverride = contextForProps;
520
- }
367
+ if (!staticConfig.context) contextForOverride = contextForProps;
521
368
  }
522
369
  }
523
370
  var groupContext = groupName ? (allGroupContexts === null || allGroupContexts === void 0 ? void 0 : allGroupContexts[groupName]) || null : null;
524
- if (!isPassthrough && groupContext &&
525
- // avoids onLayout if we don't need it
526
- props.containerType !== "normal") {
371
+ if (!isPassthrough && groupContext && props.containerType !== "normal") {
527
372
  var groupState = groupContext === null || groupContext === void 0 ? void 0 : groupContext.state;
528
373
  if (groupState && groupState.layout === void 0) {
529
374
  var _splitStyles_style, _splitStyles_style1;
530
- if (((_splitStyles_style = splitStyles.style) === null || _splitStyles_style === void 0 ? void 0 : _splitStyles_style.width) || ((_splitStyles_style1 = splitStyles.style) === null || _splitStyles_style1 === void 0 ? void 0 : _splitStyles_style1.height)) {
531
- groupState.layout = {
532
- width: fromPx(splitStyles.style.width),
533
- height: fromPx(splitStyles.style.height)
534
- };
535
- }
375
+ if (((_splitStyles_style = splitStyles.style) === null || _splitStyles_style === void 0 ? void 0 : _splitStyles_style.width) || ((_splitStyles_style1 = splitStyles.style) === null || _splitStyles_style1 === void 0 ? void 0 : _splitStyles_style1.height)) groupState.layout = {
376
+ width: fromPx(splitStyles.style.width),
377
+ height: fromPx(splitStyles.style.height)
378
+ };
536
379
  }
537
380
  }
538
381
  var hasEnterExitTransition = props.transition && _type_of(props.transition) === "object" && !Array.isArray(props.transition) && ("enter" in props.transition || "exit" in props.transition);
@@ -550,7 +393,6 @@ ${banner}
550
393
  notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState);
551
394
  }
552
395
  };
553
- var updateGroupListeners = updateGroupListeners2;
554
396
  var ogSetStateShallow = setStateShallow;
555
397
  stateRef.current.updateStyleListener = function () {
556
398
  var useStyleListener = stateRef.current.useStyleListener;
@@ -577,12 +419,12 @@ ${banner}
577
419
  var updateListener = function (next) {
578
420
  var _stateRef_current_updateStyleListener, _stateRef_current;
579
421
  stateRef.current.nextMedia = next;
580
- (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 ? void 0 : _stateRef_current_updateStyleListener.call(_stateRef_current);
422
+ (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
581
423
  };
582
424
  componentContext.mediaEmitListeners.add(updateListener);
583
425
  stateRef.current.mediaEmitCleanup = function () {
584
426
  var _componentContext_mediaEmitListeners;
585
- (_componentContext_mediaEmitListeners = componentContext.mediaEmitListeners) === null || _componentContext_mediaEmitListeners === void 0 ? void 0 : _componentContext_mediaEmitListeners.delete(updateListener);
427
+ (_componentContext_mediaEmitListeners = componentContext.mediaEmitListeners) === null || _componentContext_mediaEmitListeners === void 0 || _componentContext_mediaEmitListeners.delete(updateListener);
586
428
  };
587
429
  }
588
430
  componentContext.mediaEmit = componentContext.mediaEmit || function (next) {
@@ -599,22 +441,16 @@ ${banner}
599
441
  _iteratorError = err;
600
442
  } finally {
601
443
  try {
602
- if (!_iteratorNormalCompletion && _iterator.return != null) {
603
- _iterator.return();
604
- }
444
+ if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
605
445
  } finally {
606
- if (_didIteratorError) {
607
- throw _iteratorError;
608
- }
446
+ if (_didIteratorError) throw _iteratorError;
609
447
  }
610
448
  }
611
449
  };
612
450
  stateRef.current.setStateShallow = function (nextOrGetNext) {
613
451
  var prev = stateRef.current.nextState || state;
614
452
  var next = typeof nextOrGetNext === "function" ? nextOrGetNext(prev) : nextOrGetNext;
615
- if (next === prev || isEqualShallow(prev, next)) {
616
- return;
617
- }
453
+ if (next === prev || isEqualShallow(prev, next)) return;
618
454
  var canAvoidReRender = Object.keys(next).every(function (key3) {
619
455
  return avoidReRenderKeys.has(key3);
620
456
  });
@@ -634,20 +470,18 @@ ${banner}
634
470
  console.groupEnd();
635
471
  }
636
472
  updateGroupListeners2();
637
- (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 ? void 0 : _stateRef_current_updateStyleListener.call(_stateRef_current);
473
+ (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
638
474
  } else {
639
- if (process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
640
- console.info(`[\u{1F40C}] re-render`, {
641
- canAvoidReRender,
642
- next
643
- });
644
- }
475
+ if (process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") console.info(`[\u{1F40C}] re-render`, {
476
+ canAvoidReRender,
477
+ next
478
+ });
645
479
  ogSetStateShallow(next);
646
480
  }
647
481
  };
648
482
  setStateShallow = function (state2) {
649
483
  var _stateRef_current_setStateShallow, _stateRef_current;
650
- (_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 ? void 0 : _stateRef_current_setStateShallow.call(_stateRef_current, state2);
484
+ (_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, state2);
651
485
  };
652
486
  }
653
487
  if (process.env.NODE_ENV === "development" && time) time`split-styles`;
@@ -656,16 +490,12 @@ ${banner}
656
490
  splitStyles.style = splitStyles.style || {};
657
491
  splitStyles.style.opacity = 0;
658
492
  }
659
- if (splitStyles.dynamicThemeAccess != null) {
660
- stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess;
661
- }
493
+ if (splitStyles.dynamicThemeAccess != null) stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess;
662
494
  }
663
495
  var hasRuntimeMediaKeys = (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.hasMedia) && splitStyles.hasMedia !== true;
664
496
  var shouldListenForMedia = didGetVariableValue() || hasRuntimeMediaKeys || noClass && (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.hasMedia) === true;
665
497
  var mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
666
- if (process.env.NODE_ENV === "development" && debugProp === "verbose") {
667
- console.info(`useMedia() createComponent`, shouldListenForMedia, mediaListeningKeys);
668
- }
498
+ if (process.env.NODE_ENV === "development" && debugProp === "verbose") console.info(`useMedia() createComponent`, shouldListenForMedia, mediaListeningKeys);
669
499
  setMediaShouldUpdate(componentContext, shouldListenForMedia, mediaListeningKeys);
670
500
  var {
671
501
  viewProps: viewPropsIn,
@@ -694,48 +524,33 @@ ${banner}
694
524
  onFocus,
695
525
  onBlur,
696
526
  separator,
697
- // ignore from here on out
698
527
  passThrough,
699
528
  forceStyle: _forceStyle,
700
- // @ts-ignore for next/link compat etc
701
529
  onClick,
702
530
  theme: _themeProp,
703
531
  ...nonGuiProps
704
532
  } = viewPropsIn || {};
705
533
  var viewProps = nonGuiProps;
706
- if (props.forceStyle) {
707
- viewProps.forceStyle = props.forceStyle;
708
- }
534
+ if (props.forceStyle) viewProps.forceStyle = props.forceStyle;
709
535
  if (isHOC) {
710
- if (typeof _themeProp !== "undefined") {
711
- viewProps.theme = _themeProp;
712
- }
713
- if (typeof passThrough !== "undefined") {
714
- viewProps.passThrough = passThrough;
715
- }
536
+ if (typeof _themeProp !== "undefined") viewProps.theme = _themeProp;
537
+ if (typeof passThrough !== "undefined") viewProps.passThrough = passThrough;
716
538
  }
717
539
  var animationStyles;
718
- var shouldUseAnimation =
719
- // if it supports css vars we run it on server too to get matching initial style
720
- (inputStyle === "css" ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC;
540
+ var shouldUseAnimation = (inputStyle === "css" ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC;
721
541
  var animatedRef;
722
542
  if (shouldUseAnimation) {
723
543
  var useStyleEmitter = (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) ? function (listener) {
724
544
  stateRef.current.useStyleListener = listener;
725
545
  } : void 0;
726
546
  var effectiveTransition = resolveEffectivePseudoTransition(stateRef.current.prevPseudoState, state, splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.pseudoTransitions, props.transition);
727
- if (splitStyles) {
728
- splitStyles.effectiveTransition = effectiveTransition;
729
- }
547
+ if (splitStyles) splitStyles.effectiveTransition = effectiveTransition;
730
548
  stateRef.current.prevPseudoState = extractPseudoState(state);
731
549
  var animations = useAnimations({
732
550
  props: propsWithAnimation,
733
- // clone style to prevent animation driver mutations from leaking to viewProps
734
- // during SSR/pre-hydration (CSS driver mutates style.transition in place)
735
551
  style: isHydrated ? splitStylesStyle || {} : {
736
552
  ...splitStylesStyle
737
553
  },
738
- // @ts-ignore
739
554
  styleState: splitStyles,
740
555
  useStyleEmitter,
741
556
  presence,
@@ -748,61 +563,43 @@ ${banner}
748
563
  stateRef
749
564
  });
750
565
  if (animations) {
751
- if (animations.ref) {
752
- animatedRef = animations.ref;
753
- }
566
+ if (animations.ref) animatedRef = animations.ref;
754
567
  if (isHydrated && animations) {
755
568
  animationStyles = animations.style;
756
569
  viewProps.style = animationStyles;
757
- if (animations.className) {
758
- viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`;
759
- }
570
+ if (animations.className) viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`;
760
571
  }
761
572
  }
762
573
  if (process.env.NODE_ENV === "development" && time) time`animations`;
763
574
  }
764
- if (process.env.NODE_ENV === "development" && props.untilMeasured && !props.group) {
765
- console.warn(`You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
575
+ if (process.env.NODE_ENV === "development" && props.untilMeasured && !props.group) console.warn(`You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
766
576
 
767
577
  If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`);
768
- }
769
578
  if (process.env.NODE_ENV === "development" && time) time`destructure`;
770
- if (!isPassthrough && groupContext &&
771
- // avoids onLayout if we don't need it
772
- props.containerType !== "normal") {
773
- nonGuiProps.onLayout = composeEventHandlers(nonGuiProps.onLayout, function (e) {
774
- var _stateRef_current_group;
775
- var layout = e.nativeEvent.layout;
776
- groupContext.state.layout = layout;
777
- (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 ? void 0 : _stateRef_current_group.emit({
778
- layout
779
- });
780
- if (!stateRef.current.hasMeasured && props.untilMeasured === "hide") {
781
- setState(function (prev) {
782
- return {
783
- ...prev
784
- };
785
- });
786
- }
787
- stateRef.current.hasMeasured = true;
579
+ if (!isPassthrough && groupContext && props.containerType !== "normal") nonGuiProps.onLayout = composeEventHandlers(nonGuiProps.onLayout, function (e) {
580
+ var _stateRef_current_group;
581
+ var layout = e.nativeEvent.layout;
582
+ groupContext.state.layout = layout;
583
+ (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
584
+ layout
788
585
  });
789
- }
586
+ if (!stateRef.current.hasMeasured && props.untilMeasured === "hide") setState(function (prev) {
587
+ return {
588
+ ...prev
589
+ };
590
+ });
591
+ stateRef.current.hasMeasured = true;
592
+ });
790
593
  viewProps = ((_hooks_usePropsTransform = hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(hooks, elementType, nonGuiProps, stateRef, stateRef.current.willHydrate)) || nonGuiProps;
791
- if (!stateRef.current.composedRef) {
792
- stateRef.current.composedRef = composeRefs(function (x) {
793
- return stateRef.current.host = x;
794
- }, forwardedRef, setElementProps, animatedRef);
795
- }
594
+ if (!stateRef.current.composedRef) stateRef.current.composedRef = composeRefs(function (x) {
595
+ return stateRef.current.host = x;
596
+ }, forwardedRef, setElementProps, animatedRef);
796
597
  viewProps.ref = stateRef.current.composedRef;
797
598
  usePointerEvents(props, viewProps);
798
599
  if (process.env.NODE_ENV === "development") {
799
- if (!isReactNative && !isText && isWeb && !isHOC) {
800
- React.Children.toArray(props.children).forEach(function (item) {
801
- if (typeof item === "string" && item !== "\n") {
802
- console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <${staticConfig.componentName || propsIn.tag || "View"}>.`, props);
803
- }
804
- });
805
- }
600
+ if (!isReactNative && !isText && isWeb && !isHOC) React.Children.toArray(props.children).forEach(function (item) {
601
+ if (typeof item === "string" && item !== "\n") console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <${staticConfig.componentName || propsIn.tag || "View"}>.`, props);
602
+ });
806
603
  }
807
604
  if (process.env.NODE_ENV === "development" && time) time`events-hooks`;
808
605
  var unPress = function () {
@@ -811,26 +608,23 @@ If you meant to do this, you can disable this warning - either change untilMeasu
811
608
  pressIn: false
812
609
  });
813
610
  };
814
- if (process.env.NODE_ENV === "development" && isWeb) {
815
- useIsomorphicLayoutEffect(function () {
816
- if (debugProp === "verbose") {
817
- let cssStyleDeclarationToObject2 = function (style) {
818
- var styleObject = {};
819
- for (var i = 0; i < style.length; i++) {
820
- var prop = style[i];
821
- styleObject[prop] = style.getPropertyValue(prop);
822
- }
823
- return styleObject;
824
- };
825
- var cssStyleDeclarationToObject = cssStyleDeclarationToObject2;
826
- var computed = stateRef.current.host ? cssStyleDeclarationToObject2(getComputedStyle(stateRef.current.host)) : {};
827
- console.groupCollapsed(`Rendered > (opacity: ${computed.opacity})`);
828
- console.warn(stateRef.current.host);
829
- console.warn(computed);
830
- console.groupEnd();
831
- }
832
- });
833
- }
611
+ if (process.env.NODE_ENV === "development" && isWeb) useIsomorphicLayoutEffect(function () {
612
+ if (debugProp === "verbose") {
613
+ let cssStyleDeclarationToObject2 = function (style) {
614
+ var styleObject = {};
615
+ for (var i = 0; i < style.length; i++) {
616
+ var prop = style[i];
617
+ styleObject[prop] = style.getPropertyValue(prop);
618
+ }
619
+ return styleObject;
620
+ };
621
+ var computed = stateRef.current.host ? cssStyleDeclarationToObject2(getComputedStyle(stateRef.current.host)) : {};
622
+ console.groupCollapsed(`Rendered > (opacity: ${computed.opacity})`);
623
+ console.warn(stateRef.current.host);
624
+ console.warn(computed);
625
+ console.groupEnd();
626
+ }
627
+ });
834
628
  useIsomorphicLayoutEffect(function () {
835
629
  if (state.unmounted === true && hasEnterStyle) {
836
630
  setStateShallow({
@@ -861,7 +655,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
861
655
  return function () {
862
656
  var _stateRef_current_mediaEmitCleanup, _stateRef_current;
863
657
  componentSetStates.delete(setState);
864
- (_stateRef_current_mediaEmitCleanup = (_stateRef_current = stateRef.current).mediaEmitCleanup) === null || _stateRef_current_mediaEmitCleanup === void 0 ? void 0 : _stateRef_current_mediaEmitCleanup.call(_stateRef_current);
658
+ (_stateRef_current_mediaEmitCleanup = (_stateRef_current = stateRef.current).mediaEmitCleanup) === null || _stateRef_current_mediaEmitCleanup === void 0 || _stateRef_current_mediaEmitCleanup.call(_stateRef_current);
865
659
  };
866
660
  }, [state.unmounted, inputStyle]);
867
661
  useIsomorphicLayoutEffect(function () {
@@ -892,85 +686,64 @@ If you meant to do this, you can disable this warning - either change untilMeasu
892
686
  var shouldAttach = !disabled && !props.asChild && Boolean(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle);
893
687
  var needsPressState = Boolean(hasDynamicGroupChildren || runtimePressStyle);
894
688
  if (process.env.NODE_ENV === "development" && time) time`events-setup`;
895
- if (process.env.NODE_ENV === "development" && debugProp === "verbose") {
896
- log(`\u{1FAA9} events()`, {
897
- runtimeFocusStyle,
898
- runtimePressStyle,
899
- runtimeHoverStyle,
900
- runtimeFocusVisibleStyle,
901
- attachPress,
902
- attachFocus,
903
- attachHover,
904
- shouldAttach,
905
- needsHoverState,
906
- pseudos
907
- });
908
- }
689
+ if (process.env.NODE_ENV === "development" && debugProp === "verbose") log(`\u{1FAA9} events()`, {
690
+ runtimeFocusStyle,
691
+ runtimePressStyle,
692
+ runtimeHoverStyle,
693
+ runtimeFocusVisibleStyle,
694
+ attachPress,
695
+ attachFocus,
696
+ attachHover,
697
+ shouldAttach,
698
+ needsHoverState,
699
+ pseudos
700
+ });
909
701
  var events = shouldAttach ? {
910
702
  onPressOut: attachPress ? function (e) {
911
703
  unPress();
912
- onPressOut === null || onPressOut === void 0 ? void 0 : onPressOut(e);
913
- onMouseUp === null || onMouseUp === void 0 ? void 0 : onMouseUp(e);
704
+ onPressOut === null || onPressOut === void 0 || onPressOut(e);
705
+ onMouseUp === null || onMouseUp === void 0 || onMouseUp(e);
914
706
  } : void 0,
915
707
  ...((attachHover || attachPress) && {
916
708
  onMouseEnter: function (e) {
917
709
  var next = {};
918
- if (needsHoverState && !lastInteractionWasTouch.value) {
919
- next.hover = true;
920
- }
710
+ if (needsHoverState && !lastInteractionWasTouch.value) next.hover = true;
921
711
  if (needsPressState) {
922
- if (state.pressIn) {
923
- next.press = true;
924
- }
712
+ if (state.pressIn) next.press = true;
925
713
  }
926
714
  setStateShallow(next);
927
- onHoverIn === null || onHoverIn === void 0 ? void 0 : onHoverIn(e);
928
- onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
715
+ onHoverIn === null || onHoverIn === void 0 || onHoverIn(e);
716
+ onMouseEnter === null || onMouseEnter === void 0 || onMouseEnter(e);
929
717
  },
930
718
  onMouseLeave: function (e) {
931
719
  var next = {};
932
- if (needsHoverState) {
933
- next.hover = false;
934
- }
720
+ if (needsHoverState) next.hover = false;
935
721
  if (needsPressState) {
936
722
  next.press = false;
937
723
  next.pressIn = false;
938
724
  }
939
725
  setStateShallow(next);
940
- onHoverOut === null || onHoverOut === void 0 ? void 0 : onHoverOut(e);
941
- onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
726
+ onHoverOut === null || onHoverOut === void 0 || onHoverOut(e);
727
+ onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave(e);
942
728
  }
943
729
  }),
944
730
  onPressIn: attachPress ? function (e) {
945
- if (needsPressState) {
946
- setStateShallow({
947
- press: true,
948
- pressIn: true
949
- });
950
- }
951
- onPressIn === null || onPressIn === void 0 ? void 0 : onPressIn(e);
952
- onMouseDown === null || onMouseDown === void 0 ? void 0 : onMouseDown(e);
953
- if (isWeb) {
954
- componentSetStates.add(setState);
955
- }
731
+ if (needsPressState) setStateShallow({
732
+ press: true,
733
+ pressIn: true
734
+ });
735
+ onPressIn === null || onPressIn === void 0 || onPressIn(e);
736
+ onMouseDown === null || onMouseDown === void 0 || onMouseDown(e);
737
+ if (isWeb) componentSetStates.add(setState);
956
738
  } : void 0,
957
739
  onPress: attachPress ? function (e) {
958
740
  unPress();
959
- if (false) {
960
- onClick === null || onClick === void 0 ? void 0 : onClick(e);
961
- if (onPress || onClick) {
962
- e.stopPropagation();
963
- }
964
- }
965
- onPress === null || onPress === void 0 ? void 0 : onPress(e);
966
- if (false) {
967
- onLongPress === null || onLongPress === void 0 ? void 0 : onLongPress(e);
968
- }
741
+ onPress === null || onPress === void 0 || onPress(e);
969
742
  } : void 0,
970
743
  ...(attachPress && onLongPress && {
971
744
  onLongPress: function (e) {
972
745
  unPress();
973
- onLongPress === null || onLongPress === void 0 ? void 0 : onLongPress(e);
746
+ onLongPress === null || onLongPress === void 0 || onLongPress(e);
974
747
  }
975
748
  }),
976
749
  ...(attachFocus && {
@@ -983,29 +756,21 @@ If you meant to do this, you can disable this warning - either change untilMeasu
983
756
  next.focusWithin = true;
984
757
  }
985
758
  if (pseudos === null || pseudos === void 0 ? void 0 : pseudos.focusVisibleStyle) {
986
- if (lastInteractionWasKeyboard.value) {
987
- next.focusVisible = true;
988
- } else {
989
- next.focus = true;
990
- }
991
- } else {
992
- next.focus = true;
993
- }
759
+ if (lastInteractionWasKeyboard.value) next.focusVisible = true;else next.focus = true;
760
+ } else next.focus = true;
994
761
  setStateShallow(next);
995
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
762
+ onFocus === null || onFocus === void 0 || onFocus(e);
996
763
  },
997
764
  onBlur: function (e) {
998
- if (componentContext.setParentFocusState) {
999
- componentContext.setParentFocusState({
1000
- focusWithin: false
1001
- });
1002
- }
765
+ if (componentContext.setParentFocusState) componentContext.setParentFocusState({
766
+ focusWithin: false
767
+ });
1003
768
  setStateShallow({
1004
769
  focus: false,
1005
770
  focusVisible: false,
1006
771
  focusWithin: false
1007
772
  });
1008
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
773
+ onBlur === null || onBlur === void 0 || onBlur(e);
1009
774
  }
1010
775
  })
1011
776
  } : null;
@@ -1022,58 +787,33 @@ If you meant to do this, you can disable this warning - either change untilMeasu
1022
787
  minPressDuration: 0
1023
788
  });
1024
789
  }
1025
- if (false) {
1026
- Object.assign(viewProps, getWebEvents(events));
1027
- }
1028
790
  if (process.env.NODE_ENV === "development" && time) time`events`;
1029
- if (process.env.NODE_ENV === "development" && debugProp === "verbose") {
1030
- log(`events`, {
1031
- events,
1032
- attachHover,
1033
- attachPress
1034
- });
1035
- }
791
+ if (process.env.NODE_ENV === "development" && debugProp === "verbose") log(`events`, {
792
+ events,
793
+ attachHover,
794
+ attachPress
795
+ });
1036
796
  var propsWithHref = props;
1037
797
  var propsInWithHref = propsIn;
1038
798
  var _props_testID, _ref, _ref1, _ref2, _ref3;
1039
- var pressDebugDetail = (_ref3 = (_ref2 = (_ref1 = (_ref = (_props_testID = props.testID) !== null && _props_testID !== void 0 ? _props_testID : propsIn.testID) !== null && _ref !== void 0 ? _ref : props.accessibilityLabel) !== null && _ref1 !== void 0 ? _ref1 : propsIn.accessibilityLabel) !== null && _ref2 !== void 0 ? _ref2 : typeof propsWithHref.href === "string" ? propsWithHref.href : null) !== null && _ref3 !== void 0 ? _ref3 : typeof propsInWithHref.href === "string" ? propsInWithHref.href : null;
1040
- var pressDebugName = [componentName, pressDebugDetail].filter(Boolean).join(":") || null;
1041
- var pressGesture = true ? useEvents(events, viewProps, stateRef, staticConfig, isHOC, isInsideNativeMenu, pressDebugName) : null;
799
+ var pressDebugName = [componentName, (_ref3 = (_ref2 = (_ref1 = (_ref = (_props_testID = props.testID) !== null && _props_testID !== void 0 ? _props_testID : propsIn.testID) !== null && _ref !== void 0 ? _ref : props.accessibilityLabel) !== null && _ref1 !== void 0 ? _ref1 : propsIn.accessibilityLabel) !== null && _ref2 !== void 0 ? _ref2 : typeof propsWithHref.href === "string" ? propsWithHref.href : null) !== null && _ref3 !== void 0 ? _ref3 : typeof propsInWithHref.href === "string" ? propsInWithHref.href : null].filter(Boolean).join(":") || null;
800
+ var pressGesture = useEvents(events, viewProps, stateRef, staticConfig, isHOC, isInsideNativeMenu, pressDebugName);
1042
801
  if (process.env.NODE_ENV === "development" && time) time`hooks`;
1043
802
  if (asChild) {
1044
803
  elementType = Slot;
1045
- if (false) {
1046
- var webStyleEvents = asChild === "web" || asChild === "except-style-web";
1047
- var passEvents = getWebEvents({
1048
- onPress,
1049
- onLongPress,
1050
- onPressIn,
1051
- onPressOut,
1052
- onMouseUp,
1053
- onMouseDown,
1054
- onMouseEnter,
1055
- onMouseLeave
1056
- }, webStyleEvents);
1057
- Object.assign(viewProps, passEvents);
1058
- } else {
1059
- Object.assign(viewProps, {
1060
- onPress,
1061
- onLongPress
1062
- });
1063
- }
804
+ Object.assign(viewProps, {
805
+ onPress,
806
+ onLongPress
807
+ });
1064
808
  }
1065
809
  if (process.env.NODE_ENV === "development" && time) time`spaced-as-child`;
1066
810
  var content;
1067
- if (isPassthrough) {
1068
- content = /* @__PURE__ */React.createElement(BaseComponent, {
1069
- style: {
1070
- display: "contents"
1071
- }
1072
- }, propsIn.children);
1073
- } else {
1074
- if (hooks.useChildren) {
1075
- content = hooks.useChildren(elementType, content || children, viewProps);
811
+ if (isPassthrough) content = /* @__PURE__ */React.createElement(BaseComponent, {
812
+ style: {
813
+ display: "contents"
1076
814
  }
815
+ }, propsIn.children);else {
816
+ if (hooks.useChildren) content = hooks.useChildren(elementType, content || children, viewProps);
1077
817
  var isRenderPropString = typeof renderProp === "string";
1078
818
  if (renderProp && !isRenderPropString) {
1079
819
  var out = getCustomRender(renderProp, content || children, viewProps, componentState);
@@ -1083,76 +823,38 @@ If you meant to do this, you can disable this warning - either change untilMeasu
1083
823
  }
1084
824
  }
1085
825
  if (!content) {
1086
- if (isRenderPropString) {
1087
- viewProps.render === renderProp;
1088
- }
826
+ if (isRenderPropString) viewProps.render;
1089
827
  content = /* @__PURE__ */React.createElement(elementType, viewProps, content || children);
1090
828
  }
1091
829
  if (process.env.NODE_ENV === "development" && time) time`use-children`;
1092
830
  }
1093
- if (true) {
1094
- var isCompositeComponent = !isHOC && Component && typeof Component !== "string";
1095
- content = wrapWithGestureDetector(content, pressGesture, stateRef, isHOC, isCompositeComponent);
1096
- }
831
+ content = wrapWithGestureDetector(content, pressGesture, stateRef, isHOC, !isHOC && Component && typeof Component !== "string");
1097
832
  var ResetPresence = animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.ResetPresence;
1098
833
  var needsReset = Boolean(
1099
834
  // not when passing down to child
1100
- !asChild &&
1101
- // not when passThrough
1102
- splitStyles &&
1103
- // not when HOC
1104
- !isHOC && ResetPresence && willBeAnimated && (hasEnterStyle || presenceState));
835
+ !asChild && splitStyles && !isHOC && ResetPresence && willBeAnimated && (hasEnterStyle || presenceState));
1105
836
  var hasEverReset = stateRef.current.hasEverResetPresence;
1106
- if (needsReset && !hasEverReset) {
1107
- stateRef.current.hasEverResetPresence = true;
1108
- }
1109
- var renderReset = needsReset || hasEverReset;
1110
- if (renderReset && ResetPresence) {
1111
- content = /* @__PURE__ */_jsx(ResetPresence, {
1112
- disabled: !needsReset,
1113
- children: content
1114
- });
1115
- }
837
+ if (needsReset && !hasEverReset) stateRef.current.hasEverResetPresence = true;
838
+ if ((needsReset || hasEverReset) && ResetPresence) content = /* @__PURE__ */_jsx(ResetPresence, {
839
+ disabled: !needsReset,
840
+ children: content
841
+ });
1116
842
  if (process.env.NODE_ENV === "development" && time) time`create-element`;
1117
- if ("focusWithinStyle" in propsIn || (pseudos === null || pseudos === void 0 ? void 0 : pseudos.focusWithinStyle)) {
1118
- content = /* @__PURE__ */_jsx(ComponentContext.Provider, {
1119
- ...componentContext,
1120
- setParentFocusState: setStateShallow,
1121
- children: content
1122
- });
1123
- }
1124
- if ("group" in props) {
1125
- content = /* @__PURE__ */_jsx(GroupContext.Provider, {
1126
- value: allGroupContexts,
1127
- children: content
1128
- });
1129
- }
1130
- if (false) {
1131
- content = /* @__PURE__ */_jsx(ComponentContext.Provider, {
1132
- ...componentContext,
1133
- inText: true,
1134
- children: content
1135
- });
1136
- }
843
+ if ("focusWithinStyle" in propsIn || (pseudos === null || pseudos === void 0 ? void 0 : pseudos.focusWithinStyle)) content = /* @__PURE__ */_jsx(ComponentContext.Provider, {
844
+ ...componentContext,
845
+ setParentFocusState: setStateShallow,
846
+ children: content
847
+ });
848
+ if ("group" in props) content = /* @__PURE__ */_jsx(GroupContext.Provider, {
849
+ value: allGroupContexts,
850
+ children: content
851
+ });
1137
852
  if (process.env.NODE_ENV === "development" && time) time`group-context`;
1138
853
  content = disableTheme || !splitStyles ? content : getThemedChildren(themeState, content, themeStateProps, false, stateRef);
1139
854
  if (process.env.NODE_ENV === "development" && time) time`themed-children`;
1140
- if (false) {
1141
- if (isReactNative && !asChild) {
1142
- content = /* @__PURE__ */_jsx("span", {
1143
- className: "_dsp_contents",
1144
- ...(!isPassthrough && isHydrated && events && getWebEvents(events)),
1145
- children: content
1146
- });
1147
- }
1148
- }
1149
855
  if (overriddenContextProps && contextForOverride) {
1150
856
  var Provider = contextForOverride.Provider;
1151
- for (var key1 in styledContextValue) {
1152
- if (!(key1 in overriddenContextProps)) {
1153
- overriddenContextProps[key1] = styledContextValue[key1];
1154
- }
1155
- }
857
+ for (var key1 in styledContextValue) if (!(key1 in overriddenContextProps)) overriddenContextProps[key1] = styledContextValue[key1];
1156
858
  content = /* @__PURE__ */_jsx(Provider, {
1157
859
  __disableMergeDefaultValues: true,
1158
860
  ...overriddenContextProps,
@@ -1160,62 +862,49 @@ If you meant to do this, you can disable this warning - either change untilMeasu
1160
862
  });
1161
863
  }
1162
864
  if (process.env.NODE_ENV === "development" && time) time`context-override`;
1163
- if (false) {
1164
- content = /* @__PURE__ */_jsxs(_Fragment, {
1165
- children: [content, /* we surpress hydration warnings */
1166
- !isHydrated ? getStyleTags(Object.values(splitStyles.rulesToInsert)) : null]
1167
- });
1168
- }
1169
865
  if (process.env.NODE_ENV === "development" && time) time`style-tags`;
1170
866
  if (process.env.NODE_ENV === "development") {
1171
867
  if (debugProp && debugProp !== "profile") {
1172
- var element1 = typeof elementType === "string" ? elementType : "Component";
1173
- var title = `render <${element1} /> (${internalID}) with props`;
868
+ var title = `render <${typeof elementType === "string" ? elementType : "Component"} /> (${internalID}) with props`;
1174
869
  if (!isWeb || !isClient) {
1175
870
  log(title);
1176
871
  log(`state: `, state);
1177
- if (isDevTools) {
1178
- log("viewProps", viewProps);
1179
- }
872
+ if (isDevTools) log("viewProps", viewProps);
1180
873
  log(`final styles:`);
1181
- for (var key2 in splitStylesStyle) {
1182
- log(key2, splitStylesStyle[key2]);
1183
- }
874
+ for (var key2 in splitStylesStyle) log(key2, splitStylesStyle[key2]);
1184
875
  } else {
1185
876
  console.groupCollapsed(title);
1186
877
  try {
1187
878
  log("viewProps", viewProps);
1188
879
  log("children", content);
1189
- if (typeof window !== "undefined") {
1190
- log({
1191
- propsIn,
1192
- props,
1193
- attachPress,
1194
- animationStyles,
1195
- classNames,
1196
- content,
1197
- elementType,
1198
- events,
1199
- isAnimated,
1200
- hasRuntimeMediaKeys,
1201
- isStringElement,
1202
- mediaListeningKeys,
1203
- pseudos,
1204
- shouldAttach,
1205
- noClass,
1206
- shouldListenForMedia,
1207
- splitStyles,
1208
- splitStylesStyle,
1209
- state,
1210
- stateRef,
1211
- staticConfig,
1212
- styleProps,
1213
- themeState,
1214
- viewProps,
1215
- willBeAnimated,
1216
- startedUnhydrated
1217
- });
1218
- }
880
+ if (typeof window !== "undefined") log({
881
+ propsIn,
882
+ props,
883
+ attachPress,
884
+ animationStyles,
885
+ classNames,
886
+ content,
887
+ elementType,
888
+ events,
889
+ isAnimated,
890
+ hasRuntimeMediaKeys,
891
+ isStringElement,
892
+ mediaListeningKeys,
893
+ pseudos,
894
+ shouldAttach,
895
+ noClass,
896
+ shouldListenForMedia,
897
+ splitStyles,
898
+ splitStylesStyle,
899
+ state,
900
+ stateRef,
901
+ staticConfig,
902
+ styleProps,
903
+ themeState,
904
+ viewProps,
905
+ willBeAnimated,
906
+ startedUnhydrated
907
+ });
1219
908
  } catch (e) {} finally {
1220
909
  console.groupEnd();
1221
910
  }
@@ -1237,9 +926,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
1237
926
  return content;
1238
927
  });
1239
928
  function notifyGroupSubscribers(groupContext, groupEmitter, pseudo) {
1240
- if (!groupContext || !groupEmitter) {
1241
- return;
1242
- }
929
+ if (!groupContext || !groupEmitter) return;
1243
930
  var nextState = {
1244
931
  ...groupContext.state,
1245
932
  pseudo
@@ -1247,9 +934,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
1247
934
  groupEmitter.emit(nextState);
1248
935
  groupContext.state = nextState;
1249
936
  }
1250
- if (staticConfig.componentName) {
1251
- component.displayName = staticConfig.componentName;
1252
- }
937
+ if (staticConfig.componentName) component.displayName = staticConfig.componentName;
1253
938
  var res = component;
1254
939
  res = /* @__PURE__ */React.memo(res);
1255
940
  res.staticConfig = staticConfig;
@@ -1263,13 +948,10 @@ If you meant to do this, you can disable this warning - either change untilMeasu
1263
948
  };
1264
949
  }
1265
950
  function styleable(Component2, options) {
1266
- var skipForwardRef = typeof Component2 === "function" && Component2.length === 1;
1267
- var out = skipForwardRef ? Component2 : /* @__PURE__ */React.forwardRef(Component2);
951
+ var out = typeof Component2 === "function" && Component2.length === 1 ? Component2 : /* @__PURE__ */React.forwardRef(Component2);
1268
952
  var extendedConfig = extendStyledConfig(options === null || options === void 0 ? void 0 : options.staticConfig);
1269
953
  out = (options === null || options === void 0 ? void 0 : options.disableTheme) ? out : themeable(out, extendedConfig, true);
1270
- if (extendedConfig.memo || process.env.TAMAGUI_MEMOIZE_STYLEABLE) {
1271
- out = /* @__PURE__ */React.memo(out);
1272
- }
954
+ if (extendedConfig.memo || process.env.GUI_MEMOIZE_STYLEABLE) out = /* @__PURE__ */React.memo(out);
1273
955
  out.staticConfig = extendedConfig;
1274
956
  out.styleable = styleable;
1275
957
  return out;
@@ -1283,14 +965,10 @@ var fromPx = function (val) {
1283
965
  return 0;
1284
966
  };
1285
967
  var getCustomRender = function (renderProp, content, viewProps, state) {
1286
- if (typeof renderProp === "function") {
1287
- var out = renderProp(viewProps, state);
1288
- renderProp = getRenderElementForPlatform(out);
1289
- }
968
+ if (typeof renderProp === "function") renderProp = getRenderElementForPlatform(renderProp(viewProps, state));
1290
969
  if (renderProp) {
1291
970
  if ((typeof renderProp === "undefined" ? "undefined" : _type_of(renderProp)) === "object" && /* @__PURE__ */React.isValidElement(renderProp)) {
1292
- var renderElement = getRenderElementForPlatform(renderProp);
1293
- if (renderElement) {
971
+ if (getRenderElementForPlatform(renderProp)) {
1294
972
  var elementProps = renderProp.props;
1295
973
  var mergedProps = elementProps ? mergeRenderElementProps(elementProps, viewProps, content) : viewProps;
1296
974
  return {
@@ -1302,11 +980,7 @@ var getCustomRender = function (renderProp, content, viewProps, state) {
1302
980
  }
1303
981
  };
1304
982
  function getRenderElementForPlatform(potential) {
1305
- if (true) {
1306
- if (isHTMLElement(potential)) {
1307
- return;
1308
- }
1309
- }
983
+ if (isHTMLElement(potential)) return;
1310
984
  return potential;
1311
985
  }
1312
986
  function isHTMLElement(el) {