@tamagui/core 1.0.1-beta.75 → 1.0.1-beta.78

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 (201) hide show
  1. package/dist/cjs/ThemeManager.js +6 -22
  2. package/dist/cjs/ThemeManager.js.map +2 -2
  3. package/dist/cjs/createComponent.js +13 -10
  4. package/dist/cjs/createComponent.js.map +2 -2
  5. package/dist/cjs/createFont.js.map +1 -1
  6. package/dist/cjs/createTamagui.js +2 -2
  7. package/dist/cjs/createTamagui.js.map +2 -2
  8. package/dist/cjs/createVariable.js +9 -1
  9. package/dist/cjs/createVariable.js.map +2 -2
  10. package/dist/cjs/helpers/createPropMapper.js +4 -16
  11. package/dist/cjs/helpers/createPropMapper.js.map +2 -2
  12. package/dist/cjs/helpers/generateAtomicStyles.js +55 -70
  13. package/dist/cjs/helpers/generateAtomicStyles.js.map +2 -2
  14. package/dist/cjs/helpers/getSplitStyles.js +18 -10
  15. package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
  16. package/dist/cjs/helpers/getStylesAtomic.js +4 -2
  17. package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
  18. package/dist/cjs/helpers/insertStyleRule.js +12 -10
  19. package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
  20. package/dist/cjs/helpers/{pseudos.js → pseudoDescriptors.js} +7 -7
  21. package/dist/cjs/helpers/pseudoDescriptors.js.map +7 -0
  22. package/dist/cjs/index.js +1 -1
  23. package/dist/cjs/index.js.map +2 -2
  24. package/dist/cjs/insertFont.js +16 -4
  25. package/dist/cjs/insertFont.js.map +2 -2
  26. package/dist/cjs/static.js +1 -1
  27. package/dist/cjs/static.js.map +2 -2
  28. package/dist/cjs/types.js.map +1 -1
  29. package/dist/esm/ThemeManager.js +6 -22
  30. package/dist/esm/ThemeManager.js.map +2 -2
  31. package/dist/esm/constants/constants.js +23 -8
  32. package/dist/esm/constants/constants.js.map +1 -1
  33. package/dist/esm/createComponent.js +228 -121
  34. package/dist/esm/createComponent.js.map +2 -2
  35. package/dist/esm/createFont.js.map +1 -1
  36. package/dist/esm/createTamagui.js +28 -10
  37. package/dist/esm/createTamagui.js.map +2 -2
  38. package/dist/esm/createVariable.js +9 -1
  39. package/dist/esm/createVariable.js.map +2 -2
  40. package/dist/esm/helpers/createPropMapper.js +4 -5
  41. package/dist/esm/helpers/createPropMapper.js.map +2 -2
  42. package/dist/esm/helpers/createShallowUpdate.js +17 -1
  43. package/dist/esm/helpers/createShallowUpdate.js.map +1 -1
  44. package/dist/esm/helpers/createTamaguiProvider.js +39 -9
  45. package/dist/esm/helpers/createTamaguiProvider.js.map +1 -1
  46. package/dist/esm/helpers/extendStaticConfig.js +28 -27
  47. package/dist/esm/helpers/extendStaticConfig.js.map +1 -1
  48. package/dist/esm/helpers/fixNativeShadow.native.js +2 -3
  49. package/dist/esm/helpers/fixNativeShadow.native.js.map +1 -1
  50. package/dist/esm/helpers/generateAtomicStyles.js +75 -76
  51. package/dist/esm/helpers/generateAtomicStyles.js.map +2 -2
  52. package/dist/esm/helpers/getSize.js +2 -3
  53. package/dist/esm/helpers/getSize.js.map +1 -1
  54. package/dist/esm/helpers/getSplitStyles.js +50 -30
  55. package/dist/esm/helpers/getSplitStyles.js.map +2 -2
  56. package/dist/esm/helpers/getStackSize.js +1 -2
  57. package/dist/esm/helpers/getStackSize.js.map +1 -1
  58. package/dist/esm/helpers/getStylesAtomic.js +38 -7
  59. package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
  60. package/dist/esm/helpers/insertStyleRule.js +12 -10
  61. package/dist/esm/helpers/insertStyleRule.js.map +2 -2
  62. package/dist/esm/helpers/mergeTransform.js +1 -1
  63. package/dist/esm/helpers/mergeTransform.js.map +1 -1
  64. package/dist/{jsx/helpers/pseudos.js → esm/helpers/pseudoDescriptors.js} +3 -2
  65. package/dist/esm/helpers/pseudoDescriptors.js.map +7 -0
  66. package/dist/esm/helpers/themeable.js +33 -2
  67. package/dist/esm/helpers/themeable.js.map +1 -1
  68. package/dist/esm/helpers/validate.js +30 -5
  69. package/dist/esm/helpers/validate.js.map +1 -1
  70. package/dist/esm/hooks/useFeatures.js +40 -8
  71. package/dist/esm/hooks/useFeatures.js.map +1 -1
  72. package/dist/esm/hooks/useId.js +2 -3
  73. package/dist/esm/hooks/useId.js.map +1 -1
  74. package/dist/esm/hooks/useMedia.js +18 -6
  75. package/dist/esm/hooks/useMedia.js.map +1 -1
  76. package/dist/esm/hooks/usePressable.js +16 -1
  77. package/dist/esm/hooks/usePressable.js.map +1 -1
  78. package/dist/esm/hooks/useTheme.js +24 -7
  79. package/dist/esm/hooks/useTheme.js.map +1 -1
  80. package/dist/esm/index.js +1 -1
  81. package/dist/esm/index.js.map +1 -1
  82. package/dist/esm/insertFont.js +16 -4
  83. package/dist/esm/insertFont.js.map +2 -2
  84. package/dist/esm/static.js +1 -1
  85. package/dist/esm/static.js.map +1 -1
  86. package/dist/esm/styled.js +38 -9
  87. package/dist/esm/styled.js.map +1 -1
  88. package/dist/esm/views/Slot.js +40 -11
  89. package/dist/esm/views/Slot.js.map +1 -1
  90. package/dist/esm/views/Stack.js +21 -3
  91. package/dist/esm/views/Stack.js.map +1 -1
  92. package/dist/esm/views/Text.js +24 -12
  93. package/dist/esm/views/Text.js.map +1 -1
  94. package/dist/esm/views/TextAncestorContext.js +2 -2
  95. package/dist/esm/views/TextAncestorContext.js.map +1 -1
  96. package/package.json +7 -7
  97. package/reset.css +4 -0
  98. package/types/ThemeManager.d.ts +1 -1
  99. package/types/ThemeManager.d.ts.map +1 -1
  100. package/types/createComponent.d.ts +2 -4
  101. package/types/createComponent.d.ts.map +1 -1
  102. package/types/createVariable.d.ts.map +1 -1
  103. package/types/helpers/generateAtomicStyles.d.ts +2 -2
  104. package/types/helpers/generateAtomicStyles.d.ts.map +1 -1
  105. package/types/helpers/getSplitStyles.d.ts +1 -1
  106. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  107. package/types/helpers/getStylesAtomic.d.ts +2 -0
  108. package/types/helpers/getStylesAtomic.d.ts.map +1 -1
  109. package/types/helpers/insertStyleRule.d.ts +1 -1
  110. package/types/helpers/insertStyleRule.d.ts.map +1 -1
  111. package/types/helpers/{pseudos.d.ts → pseudoDescriptors.d.ts} +3 -3
  112. package/types/helpers/pseudoDescriptors.d.ts.map +1 -0
  113. package/types/index.d.ts +1 -1
  114. package/types/index.d.ts.map +1 -1
  115. package/types/insertFont.d.ts +1 -1
  116. package/types/insertFont.d.ts.map +1 -1
  117. package/types/static.d.ts +1 -1
  118. package/types/static.d.ts.map +1 -1
  119. package/types/types.d.ts +2 -2
  120. package/types/types.d.ts.map +1 -1
  121. package/dist/cjs/helpers/pseudos.js.map +0 -7
  122. package/dist/esm/helpers/pseudos.js +0 -18
  123. package/dist/esm/helpers/pseudos.js.map +0 -7
  124. package/dist/jsx/Pressability.js +0 -4
  125. package/dist/jsx/Pressability.native.js +0 -4
  126. package/dist/jsx/Tamagui.js +0 -38
  127. package/dist/jsx/ThemeContext.js +0 -5
  128. package/dist/jsx/ThemeManager.js +0 -194
  129. package/dist/jsx/conf.js +0 -38
  130. package/dist/jsx/constants/constants.js +0 -17
  131. package/dist/jsx/constants/platform.js +0 -25
  132. package/dist/jsx/constants/rnw.js +0 -10
  133. package/dist/jsx/contexts/ButtonInsideButtonContext.js +0 -5
  134. package/dist/jsx/createComponent.js +0 -1036
  135. package/dist/jsx/createFont.js +0 -25
  136. package/dist/jsx/createShorthands.js +0 -6
  137. package/dist/jsx/createTamagui.js +0 -245
  138. package/dist/jsx/createTheme.js +0 -6
  139. package/dist/jsx/createTokens.js +0 -11
  140. package/dist/jsx/createVariable.js +0 -64
  141. package/dist/jsx/createVariables.js +0 -31
  142. package/dist/jsx/defaultComponentState.js +0 -0
  143. package/dist/jsx/helpers/RNComponents.js +0 -11
  144. package/dist/jsx/helpers/areEqualSets.js +0 -13
  145. package/dist/jsx/helpers/calc.js +0 -46
  146. package/dist/jsx/helpers/createMediaStyle.js +0 -29
  147. package/dist/jsx/helpers/createPropMapper.js +0 -243
  148. package/dist/jsx/helpers/createShallowUpdate.js +0 -16
  149. package/dist/jsx/helpers/createTamaguiProvider.js +0 -28
  150. package/dist/jsx/helpers/extendStaticConfig.js +0 -62
  151. package/dist/jsx/helpers/fixNativeShadow.js +0 -5
  152. package/dist/jsx/helpers/fixNativeShadow.native.js +0 -28
  153. package/dist/jsx/helpers/generateAtomicStyles.js +0 -410
  154. package/dist/jsx/helpers/getExpandedShorthands.js +0 -15
  155. package/dist/jsx/helpers/getSize.js +0 -19
  156. package/dist/jsx/helpers/getSplitStyles.js +0 -380
  157. package/dist/jsx/helpers/getStackSize.js +0 -15
  158. package/dist/jsx/helpers/getStylesAtomic.js +0 -61
  159. package/dist/jsx/helpers/getStylesAtomic.native.js +0 -6
  160. package/dist/jsx/helpers/getTextSize.js +0 -31
  161. package/dist/jsx/helpers/getVariantExtras.js +0 -22
  162. package/dist/jsx/helpers/insertStyleRule.js +0 -91
  163. package/dist/jsx/helpers/isObj.js +0 -4
  164. package/dist/jsx/helpers/isTamaguiComponent.js +0 -12
  165. package/dist/jsx/helpers/isTamaguiElement.js +0 -8
  166. package/dist/jsx/helpers/matchMedia.js +0 -15
  167. package/dist/jsx/helpers/matchMedia.native.js +0 -6
  168. package/dist/jsx/helpers/mergeProps.js +0 -15
  169. package/dist/jsx/helpers/mergeTransform.js +0 -16
  170. package/dist/jsx/helpers/nativeGestureHandler.native.js +0 -1
  171. package/dist/jsx/helpers/proxyThemeVariables.js +0 -14
  172. package/dist/jsx/helpers/registerCSSVariable.js +0 -14
  173. package/dist/jsx/helpers/themeable.js +0 -22
  174. package/dist/jsx/helpers/validate.js +0 -73
  175. package/dist/jsx/helpers/withStaticProperties.js +0 -7
  176. package/dist/jsx/helpers/wrapThemeManagerContext.js +0 -7
  177. package/dist/jsx/hooks/useConstant.js +0 -11
  178. package/dist/jsx/hooks/useFeatures.js +0 -165
  179. package/dist/jsx/hooks/useId.js +0 -32
  180. package/dist/jsx/hooks/useIsMounted.js +0 -15
  181. package/dist/jsx/hooks/useIsTouchDevice.js +0 -14
  182. package/dist/jsx/hooks/useMedia.js +0 -153
  183. package/dist/jsx/hooks/usePressable.js +0 -11
  184. package/dist/jsx/hooks/usePrevious.js +0 -0
  185. package/dist/jsx/hooks/useTheme.js +0 -164
  186. package/dist/jsx/hooks/useUnmountEffect.js +0 -7
  187. package/dist/jsx/index.js +0 -64
  188. package/dist/jsx/insertFont.js +0 -51
  189. package/dist/jsx/static.js +0 -18
  190. package/dist/jsx/styled.js +0 -49
  191. package/dist/jsx/types-rnw.js +0 -0
  192. package/dist/jsx/types.js +0 -0
  193. package/dist/jsx/views/Slot.js +0 -70
  194. package/dist/jsx/views/Stack.js +0 -12
  195. package/dist/jsx/views/Text.js +0 -57
  196. package/dist/jsx/views/TextAncestorContext.js +0 -13
  197. package/dist/jsx/views/Theme.js +0 -27
  198. package/dist/jsx/views/ThemeInverse.js +0 -24
  199. package/dist/jsx/views/ThemeProvider.js +0 -34
  200. package/dist/jsx/views/ThemeReset.js +0 -32
  201. package/types/helpers/pseudos.d.ts.map +0 -1
@@ -1,3 +1,34 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
1
32
  import { composeEventHandlers, stylePropsView, validStyles } from "@tamagui/helpers";
2
33
  import { useForceUpdate } from "@tamagui/use-force-update";
3
34
  import React, {
@@ -82,7 +113,7 @@ function createComponent(configIn, ParentComponent) {
82
113
  let tamaguiDefaultProps;
83
114
  let initialSplitStyles;
84
115
  const component = forwardRef((propsIn, forwardedRef) => {
85
- var _a, _b, _c, _d, _e;
116
+ var _a, _d, _e, _f;
86
117
  let props;
87
118
  if (tamaguiDefaultProps && !propsIn.asChild) {
88
119
  props = mergeProps(tamaguiDefaultProps, propsIn);
@@ -110,32 +141,29 @@ function createComponent(configIn, ParentComponent) {
110
141
  const setStateShallow = createShallowUpdate(statesUsed[1]);
111
142
  let state = statesUsed[0];
112
143
  if (propsIn.forceStyle) {
113
- state = {
114
- ...state,
144
+ state = __spreadProps(__spreadValues({}, state), {
115
145
  [propsIn.forceStyle]: true
116
- };
146
+ });
117
147
  }
118
148
  const shouldAvoidClasses = !!(props.animation && avoidClasses);
119
149
  const shouldForcePseudo = !!propsIn.forceStyle;
120
150
  const hasTextAncestor = !!(isWeb ? useContext(TextAncestorContext) : false);
121
- const splitStyleState = !shouldAvoidClasses && !shouldForcePseudo ? {
122
- ...state,
151
+ const splitStyleState = !shouldAvoidClasses && !shouldForcePseudo ? __spreadProps(__spreadValues({}, state), {
123
152
  hasTextAncestor,
124
153
  dynamicStylesInline: true
125
- } : {
126
- ...state,
154
+ }) : __spreadProps(__spreadValues({}, state), {
127
155
  noClassNames: true,
128
156
  dynamicStylesInline: true,
129
157
  hasTextAncestor,
130
158
  resolveVariablesAs: "value"
131
- };
159
+ });
132
160
  const splitStyles = useSplitStyles(props, staticConfig, theme, splitStyleState, props.asChild ? null : initialSplitStyles.classNames, props["debug"]);
133
161
  const { viewProps: viewPropsIn, pseudos, medias, style, classNames } = splitStyles;
134
162
  const useAnimations = (_a = tamaguiConfig.animations) == null ? void 0 : _a.useAnimations;
135
163
  const isAnimated = !!(useAnimations && props.animation);
136
164
  const hasEnterStyle = !!props.enterStyle;
137
165
  const hostRef = useRef(null);
138
- const animationFeatureStylesIn = props.animation ? { ...defaultNativeStyle, ...style } : null;
166
+ const animationFeatureStylesIn = props.animation ? __spreadValues(__spreadValues({}, defaultNativeStyle), style) : null;
139
167
  const features = useFeatures(props, {
140
168
  forceUpdate,
141
169
  setStateShallow,
@@ -148,7 +176,7 @@ function createComponent(configIn, ParentComponent) {
148
176
  hostRef,
149
177
  onDidAnimate: props.onDidAnimate
150
178
  });
151
- const {
179
+ const _b = viewPropsIn, {
152
180
  tag,
153
181
  hitSlop,
154
182
  asChild,
@@ -170,9 +198,31 @@ function createComponent(configIn, ParentComponent) {
170
198
  forceStyle: _forceStyle,
171
199
  onClick,
172
200
  theme: _themeProp,
173
- defaultVariants,
174
- ...nonTamaguiProps
175
- } = viewPropsIn;
201
+ defaultVariants
202
+ } = _b, nonTamaguiProps = __objRest(_b, [
203
+ "tag",
204
+ "hitSlop",
205
+ "asChild",
206
+ "children",
207
+ "onPress",
208
+ "onPressIn",
209
+ "onPressOut",
210
+ "onHoverIn",
211
+ "onHoverOut",
212
+ "space",
213
+ "spaceDirection",
214
+ "disabled",
215
+ "onMouseUp",
216
+ "onMouseDown",
217
+ "onMouseEnter",
218
+ "onMouseLeave",
219
+ "hrefAttrs",
220
+ "separator",
221
+ "forceStyle",
222
+ "onClick",
223
+ "theme",
224
+ "defaultVariants"
225
+ ]);
176
226
  const isTaggable = !Component || typeof Component === "string";
177
227
  const element = isWeb ? isTaggable ? tag || Component : Component : Component;
178
228
  const BaseTextComponent = !isWeb ? Text : element || "span";
@@ -183,7 +233,7 @@ function createComponent(configIn, ParentComponent) {
183
233
  const disabled = props.accessibilityState != null && props.accessibilityState.disabled === true || props.accessibilityDisabled;
184
234
  let viewProps;
185
235
  if (isWeb && !staticConfig.isReactNativeWeb) {
186
- const {
236
+ const _c = nonTamaguiProps, {
187
237
  onMoveShouldSetResponder,
188
238
  onMoveShouldSetResponderCapture,
189
239
  onResponderEnd,
@@ -252,9 +302,78 @@ function createComponent(configIn, ParentComponent) {
252
302
  accessibilityValue,
253
303
  collapsable,
254
304
  focusable,
255
- onLayout,
256
- ...webProps
257
- } = nonTamaguiProps;
305
+ onLayout
306
+ } = _c, webProps = __objRest(_c, [
307
+ "onMoveShouldSetResponder",
308
+ "onMoveShouldSetResponderCapture",
309
+ "onResponderEnd",
310
+ "onResponderGrant",
311
+ "onResponderMove",
312
+ "onResponderReject",
313
+ "onResponderRelease",
314
+ "onResponderStart",
315
+ "onResponderTerminate",
316
+ "onResponderTerminationRequest",
317
+ "onScrollShouldSetResponder",
318
+ "onScrollShouldSetResponderCapture",
319
+ "onSelectionChangeShouldSetResponder",
320
+ "onSelectionChangeShouldSetResponderCapture",
321
+ "onStartShouldSetResponder",
322
+ "onStartShouldSetResponderCapture",
323
+ "nativeID",
324
+ "accessibilityActiveDescendant",
325
+ "accessibilityAtomic",
326
+ "accessibilityAutoComplete",
327
+ "accessibilityBusy",
328
+ "accessibilityChecked",
329
+ "accessibilityColumnCount",
330
+ "accessibilityColumnIndex",
331
+ "accessibilityColumnSpan",
332
+ "accessibilityControls",
333
+ "accessibilityCurrent",
334
+ "accessibilityDescribedBy",
335
+ "accessibilityDetails",
336
+ "accessibilityDisabled",
337
+ "accessibilityErrorMessage",
338
+ "accessibilityExpanded",
339
+ "accessibilityFlowTo",
340
+ "accessibilityHasPopup",
341
+ "accessibilityHidden",
342
+ "accessibilityInvalid",
343
+ "accessibilityKeyShortcuts",
344
+ "accessibilityLabel",
345
+ "accessibilityLabelledBy",
346
+ "accessibilityLevel",
347
+ "accessibilityLiveRegion",
348
+ "accessibilityModal",
349
+ "accessibilityMultiline",
350
+ "accessibilityMultiSelectable",
351
+ "accessibilityOrientation",
352
+ "accessibilityOwns",
353
+ "accessibilityPlaceholder",
354
+ "accessibilityPosInSet",
355
+ "accessibilityPressed",
356
+ "accessibilityReadOnly",
357
+ "accessibilityRequired",
358
+ "accessibilityRole",
359
+ "accessibilityRoleDescription",
360
+ "accessibilityRowCount",
361
+ "accessibilityRowIndex",
362
+ "accessibilityRowSpan",
363
+ "accessibilitySelected",
364
+ "accessibilitySetSize",
365
+ "accessibilitySort",
366
+ "accessibilityValueMax",
367
+ "accessibilityValueMin",
368
+ "accessibilityValueNow",
369
+ "accessibilityValueText",
370
+ "accessible",
371
+ "accessibilityState",
372
+ "accessibilityValue",
373
+ "collapsable",
374
+ "focusable",
375
+ "onLayout"
376
+ ]);
258
377
  viewProps = webProps;
259
378
  assignNativePropsToWeb(elementType, viewProps, nonTamaguiProps);
260
379
  if (!asChild) {
@@ -358,15 +477,11 @@ function createComponent(configIn, ParentComponent) {
358
477
  let styles;
359
478
  const animationStyles = state.animation ? state.animation.style : null;
360
479
  if (isStringElement && shouldAvoidClasses && !shouldForcePseudo) {
361
- styles = {
362
- ...defaultNativeStyle,
363
- ...animationStyles != null ? animationStyles : style,
364
- ...medias
365
- };
480
+ styles = __spreadValues(__spreadValues(__spreadValues({}, defaultNativeStyle), animationStyles ?? style), medias);
366
481
  } else {
367
482
  styles = [
368
483
  isWeb ? null : defaultNativeStyleSheet ? defaultNativeStyleSheet.base : null,
369
- animationStyles != null ? animationStyles : style,
484
+ animationStyles ?? style,
370
485
  medias
371
486
  ];
372
487
  if (!animationStyles) {
@@ -397,17 +512,16 @@ function createComponent(configIn, ParentComponent) {
397
512
  classNames ? Object.values(classNames).join(" ") : ""
398
513
  ];
399
514
  const className = classList.join(" ");
400
- const style2 = animationStyles != null ? animationStyles : splitStyles.style;
515
+ const style2 = animationStyles ?? splitStyles.style;
401
516
  if (process.env.NODE_ENV === "development" && props["debug"]) {
402
517
  console.log(" \xBB className", { splitStyles, style: style2, isStringElement, pseudos, state, classNames, propsClassName: props.className, classList, className: className.trim().split(" "), themeClassName: theme.className, values: Object.fromEntries(Object.entries(classNames).map(([k, v]) => [v, getAllSelectors()[v]])) });
403
518
  }
404
519
  const isAnimatedReactNativeWeb = props.animation && avoidClasses;
405
520
  if (staticConfig.isReactNativeWeb || isAnimatedReactNativeWeb) {
406
- viewProps.dataSet = {
407
- ...viewProps.dataSet,
521
+ viewProps.dataSet = __spreadProps(__spreadValues({}, viewProps.dataSet), {
408
522
  className,
409
523
  id: props.id
410
- };
524
+ });
411
525
  if (props["data-is"]) {
412
526
  viewProps.dataSet.is = props["data-is"];
413
527
  }
@@ -436,44 +550,44 @@ function createComponent(configIn, ParentComponent) {
436
550
  pressIn: false
437
551
  });
438
552
  }, []);
439
- const events = shouldAttach ? {
553
+ const events = shouldAttach ? __spreadValues(__spreadProps(__spreadValues({
440
554
  [pressOutKey]: attachPress ? (e) => {
441
555
  unPress();
442
556
  onPressOut == null ? void 0 : onPressOut(e);
443
557
  onMouseUp == null ? void 0 : onMouseUp(e);
558
+ } : void 0
559
+ }, isHoverable && {
560
+ onMouseEnter: attachHover ? (e) => {
561
+ let next = {};
562
+ if (attachHover) {
563
+ next.hover = true;
564
+ }
565
+ if (state.pressIn) {
566
+ next.press = true;
567
+ }
568
+ if (Object.keys(next).length) {
569
+ setStateShallow(next);
570
+ }
571
+ onHoverIn == null ? void 0 : onHoverIn(e);
572
+ onMouseEnter == null ? void 0 : onMouseEnter(e);
444
573
  } : void 0,
445
- ...isHoverable && {
446
- onMouseEnter: attachHover ? (e) => {
447
- let next = {};
448
- if (attachHover) {
449
- next.hover = true;
450
- }
451
- if (state.pressIn) {
452
- next.press = true;
453
- }
454
- if (Object.keys(next).length) {
455
- setStateShallow(next);
456
- }
457
- onHoverIn == null ? void 0 : onHoverIn(e);
458
- onMouseEnter == null ? void 0 : onMouseEnter(e);
459
- } : void 0,
460
- onMouseLeave: attachHover ? (e) => {
461
- let next = {};
462
- mouseUps.add(unPress);
463
- if (attachHover) {
464
- next.hover = false;
465
- }
466
- if (state.pressIn) {
467
- next.press = false;
468
- next.pressIn = false;
469
- }
470
- if (Object.keys(next).length) {
471
- setStateShallow(next);
472
- }
473
- onHoverOut == null ? void 0 : onHoverOut(e);
474
- onMouseLeave == null ? void 0 : onMouseLeave(e);
475
- } : void 0
476
- },
574
+ onMouseLeave: attachHover ? (e) => {
575
+ let next = {};
576
+ mouseUps.add(unPress);
577
+ if (attachHover) {
578
+ next.hover = false;
579
+ }
580
+ if (state.pressIn) {
581
+ next.press = false;
582
+ next.pressIn = false;
583
+ }
584
+ if (Object.keys(next).length) {
585
+ setStateShallow(next);
586
+ }
587
+ onHoverOut == null ? void 0 : onHoverOut(e);
588
+ onMouseLeave == null ? void 0 : onMouseLeave(e);
589
+ } : void 0
590
+ }), {
477
591
  [pressInKey]: attachPress ? (e) => {
478
592
  setStateShallow({
479
593
  press: true,
@@ -489,18 +603,17 @@ function createComponent(configIn, ParentComponent) {
489
603
  unPress();
490
604
  onClick == null ? void 0 : onClick(e);
491
605
  onPress == null ? void 0 : onPress(e);
492
- } : null,
493
- ...!isWeb && {
494
- cancelable: !props.rejectResponderTermination,
495
- disabled: props.disabled !== null ? props.disabled : (_b = props.accessibilityState) == null ? void 0 : _b.disabled,
496
- hitSlop: props.hitSlop,
497
- delayLongPress: props.delayLongPress,
498
- delayPressIn: props.delayPressIn,
499
- delayPressOut: props.delayPressOut,
500
- focusable: (_c = viewProps.focusable) != null ? _c : true,
501
- minPressDuration: 0
502
- }
503
- } : null;
606
+ } : null
607
+ }), !isWeb && {
608
+ cancelable: !props.rejectResponderTermination,
609
+ disabled: props.disabled !== null ? props.disabled : (_d = props.accessibilityState) == null ? void 0 : _d.disabled,
610
+ hitSlop: props.hitSlop,
611
+ delayLongPress: props.delayLongPress,
612
+ delayPressIn: props.delayPressIn,
613
+ delayPressOut: props.delayPressOut,
614
+ focusable: viewProps.focusable ?? true,
615
+ minPressDuration: 0
616
+ }) : null;
504
617
  let space = spaceProp;
505
618
  if (features.enabled.mediaQuery) {
506
619
  for (const key in mediaState) {
@@ -521,23 +634,22 @@ function createComponent(configIn, ParentComponent) {
521
634
  let content;
522
635
  if (asChild) {
523
636
  elementType = Slot;
524
- viewProps = {
525
- ...viewProps,
637
+ viewProps = __spreadProps(__spreadValues({}, viewProps), {
526
638
  onPress,
527
639
  onPressIn,
528
640
  onPressOut
529
- };
641
+ });
530
642
  }
531
643
  if (isWeb) {
532
- const [pressableProps] = usePressable(events ? {
533
- disabled,
534
- ...hitSlop && {
535
- hitSlop
536
- },
644
+ const [pressableProps] = usePressable(events ? __spreadProps(__spreadValues({
645
+ disabled
646
+ }, hitSlop && {
647
+ hitSlop
648
+ }), {
537
649
  onPressOut: events[pressOutKey],
538
650
  onPressIn: events[pressInKey],
539
651
  onPress: events[pressKey]
540
- } : {
652
+ }) : {
541
653
  disabled: true
542
654
  });
543
655
  if (events) {
@@ -592,21 +704,20 @@ function createComponent(configIn, ParentComponent) {
592
704
  if (shouldWrapWithHover || shouldWrapWithComponentTheme) {
593
705
  const themeClassName = shouldWrapWithComponentTheme ? `${theme.className}` : "";
594
706
  const hoverClassName = shouldWrapWithHover ? "t_Hoverable" : "";
595
- content = /* @__PURE__ */ React.createElement("span", {
707
+ content = /* @__PURE__ */ React.createElement("span", __spreadValues({
596
708
  className: `${hoverClassName} ${themeClassName}`,
597
709
  style: {
598
710
  display: "contents"
599
- },
600
- ...shouldWrapWithHover && {
601
- onMouseEnter: events.onMouseEnter,
602
- onMouseLeave: events.onMouseLeave
603
711
  }
604
- }, content);
712
+ }, shouldWrapWithHover && {
713
+ onMouseEnter: events.onMouseEnter,
714
+ onMouseLeave: events.onMouseLeave
715
+ }), content);
605
716
  }
606
717
  }
607
718
  if (process.env.NODE_ENV === "development") {
608
719
  if (props["debug"]) {
609
- console.log("\u2B50\uFE0F", { propsIn: { ...props }, propsOut: { ...viewProps }, elementType, state, splitStyles, animationStyles, isStringElement, classNamesIn: (_d = props.className) == null ? void 0 : _d.split(" "), classNamesOut: (_e = viewProps.className) == null ? void 0 : _e.split(" "), events, shouldAttach, ViewComponent: elementType, viewProps, styles, pseudos, content, childEls, shouldAvoidClasses, avoidClasses, animation: props.animation, style, defaultNativeStyle, initialSplitStyles, ...typeof window !== "undefined" ? { theme, themeClassName: theme.className, staticConfig, tamaguiConfig, events, shouldAvoidClasses, shouldForcePseudo } : null });
720
+ console.log("\u2B50\uFE0F", __spreadValues({ propsIn: __spreadValues({}, props), propsOut: __spreadValues({}, viewProps), elementType, state, splitStyles, animationStyles, isStringElement, classNamesIn: (_e = props.className) == null ? void 0 : _e.split(" "), classNamesOut: (_f = viewProps.className) == null ? void 0 : _f.split(" "), events, shouldAttach, ViewComponent: elementType, viewProps, styles, pseudos, content, childEls, shouldAvoidClasses, avoidClasses, animation: props.animation, style, defaultNativeStyle, initialSplitStyles }, typeof window !== "undefined" ? { theme, themeClassName: theme.className, staticConfig, tamaguiConfig, events, shouldAvoidClasses, shouldForcePseudo } : null));
610
721
  }
611
722
  }
612
723
  if (features.elements.length) {
@@ -670,12 +781,14 @@ function createComponent(configIn, ParentComponent) {
670
781
  const defaults = mergeProps(component.defaultProps, initialSplitStyles.viewProps);
671
782
  defaultNativeStyle = {};
672
783
  const validStyles2 = staticConfig.validStyles || stylePropsView;
673
- for (const key in staticConfig.defaultProps) {
674
- const val = staticConfig.defaultProps[key];
675
- if (typeof val === "string" && val[0] === "$" || !validStyles2[key] || val[0] === "_") {
676
- defaults[key] = val;
677
- } else {
678
- defaultNativeStyle[key] = val;
784
+ if (!isWeb) {
785
+ for (const key in staticConfig.defaultProps) {
786
+ const val = staticConfig.defaultProps[key];
787
+ if (typeof val === "string" && val[0] === "$" || !validStyles2[key] || val[0] === "_") {
788
+ defaults[key] = val;
789
+ } else {
790
+ defaultNativeStyle[key] = val;
791
+ }
679
792
  }
680
793
  }
681
794
  defaultNativeStyleSheet = StyleSheet.create({
@@ -700,21 +813,17 @@ function createComponent(configIn, ParentComponent) {
700
813
  if (configIn.memo) {
701
814
  res = memo(res);
702
815
  }
703
- res.staticConfig = {
704
- validStyles: staticConfig.validStyles || stylePropsView,
705
- ...staticConfig
706
- };
816
+ res.staticConfig = __spreadValues({
817
+ validStyles: staticConfig.validStyles || stylePropsView
818
+ }, staticConfig);
707
819
  res.extractable = (Component, conf) => {
708
- Component.staticConfig = extendStaticConfig({
709
- Component,
710
- ...conf,
820
+ Component.staticConfig = extendStaticConfig(__spreadProps(__spreadValues({
821
+ Component
822
+ }, conf), {
711
823
  neverFlatten: true,
712
824
  isExtractable: true,
713
- defaultProps: {
714
- ...Component.defaultProps,
715
- ...conf == null ? void 0 : conf.defaultProps
716
- }
717
- }, res);
825
+ defaultProps: __spreadValues(__spreadValues({}, Component.defaultProps), conf == null ? void 0 : conf.defaultProps)
826
+ }), res);
718
827
  return Component;
719
828
  };
720
829
  return res;
@@ -728,16 +837,14 @@ const Spacer = createComponent({
728
837
  memo: true,
729
838
  componentName: "Spacer",
730
839
  validStyles,
731
- defaultProps: {
732
- ...stackDefaultStyles,
840
+ defaultProps: __spreadProps(__spreadValues({}, stackDefaultStyles), {
733
841
  size: true
734
- },
842
+ }),
735
843
  variants: {
736
844
  size: {
737
845
  "...size": (size, { tokens }) => {
738
- var _a;
739
846
  size = size == true ? "$true" : size;
740
- const sizePx = (_a = tokens.space[size]) != null ? _a : size;
847
+ const sizePx = tokens.space[size] ?? size;
741
848
  return {
742
849
  width: sizePx,
743
850
  height: sizePx,
@@ -759,11 +866,12 @@ const Spacer = createComponent({
759
866
  vertical: {
760
867
  width: 0,
761
868
  minWidth: 0
762
- }
869
+ },
870
+ both: {}
763
871
  }
764
872
  },
765
873
  defaultVariants: {
766
- direction: "horizontal"
874
+ direction: "both"
767
875
  }
768
876
  });
769
877
  function spacedChildren({
@@ -832,14 +940,13 @@ function spacedChildren({
832
940
  return final;
833
941
  }
834
942
  function createSpacer({ key, direction, space, spaceFlex }) {
835
- return /* @__PURE__ */ React.createElement(Spacer, {
943
+ return /* @__PURE__ */ React.createElement(Spacer, __spreadValues({
836
944
  key,
837
- direction: direction === "both" ? void 0 : direction === "row" || direction === "row-reverse" ? "horizontal" : "vertical",
838
945
  size: space,
839
- ...spaceFlex && {
840
- flex: spaceFlex
841
- }
842
- });
946
+ direction
947
+ }, spaceFlex && {
948
+ flex: spaceFlex
949
+ }));
843
950
  }
844
951
  function isUnspaced(child) {
845
952
  var _a, _b;
@@ -1031,7 +1138,7 @@ function addPseudoToStyles(styles, initialPseudos, pseudos, name, force = false)
1031
1138
  const pseudoStyle = pseudos[name];
1032
1139
  const shouldNestObject = isWeb && name !== "enterStyle" && name !== "exitStyle";
1033
1140
  const defaultPseudoStyle = initialPseudos[name];
1034
- const style = defaultPseudoStyle ? { ...defaultPseudoStyle, ...pseudoStyle } : pseudoStyle;
1141
+ const style = defaultPseudoStyle ? __spreadValues(__spreadValues({}, defaultPseudoStyle), pseudoStyle) : pseudoStyle;
1035
1142
  if (style) {
1036
1143
  styles.push(shouldNestObject && !force ? { [name]: style } : style);
1037
1144
  }