@tamagui/core 1.74.11 → 1.74.13

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.
@@ -1455,7 +1455,7 @@ var require_insertStyleRule_native = __commonJS({
1455
1455
  } catch (err) {
1456
1456
  console.groupCollapsed(
1457
1457
  `Error inserting rule into CSSStyleSheet: ${String(err)}`
1458
- ), console.log({ rule, rulesToInsert }), console.trace(), console.groupEnd();
1458
+ ), console.info({ rule, rulesToInsert }), console.trace(), console.groupEnd();
1459
1459
  }
1460
1460
  }
1461
1461
  }
@@ -4481,7 +4481,7 @@ var require_createComponent_native = __commonJS({
4481
4481
  validStyles: validStyles2 = {},
4482
4482
  variants = {}
4483
4483
  } = staticConfig, defaultComponentClassName = `is_${staticConfig.componentName}`, defaultProps = staticConfig.defaultProps, component = (0, import_react.forwardRef)((propsIn, forwardedRef) => {
4484
- var _a2, _b, _c, _d, _e, _f, _i, _j, _k, _l, _m;
4484
+ var _a2, _b, _c, _d, _e, _f, _i, _j, _k, _l, _m, _n, _o;
4485
4485
  if (!hasSetupBaseViews) {
4486
4486
  hasSetupBaseViews = !0;
4487
4487
  let baseViews = (_b = (_a2 = import_setupHooks.hooks).getBaseViews) == null ? void 0 : _b.call(_a2);
@@ -4500,8 +4500,8 @@ var require_createComponent_native = __commonJS({
4500
4500
  propVal === void 0 ? contextValue && (key in validStyles2 || key in variants) && (styledContextProps ||= {}, styledContextProps[key] = contextValue[key]) : (overriddenContextProps ||= {}, overriddenContextProps[key] = propVal);
4501
4501
  }
4502
4502
  }
4503
- let curDefaultProps = styledContextProps ? { ...defaultProps, ...styledContextProps } : defaultProps, props;
4504
- curDefaultProps ? props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn) : props = propsIn;
4503
+ let curDefaultProps = styledContextProps ? { ...defaultProps, ...styledContextProps } : defaultProps, props = propsIn;
4504
+ curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
4505
4505
  let debugProp = props.debug, componentName = props.componentName || staticConfig.componentName, isHydrated = config != null && config.disableSSR ? !0 : (0, import_use_did_finish_ssr.useDidFinishSSR)(), stateRef = (0, import_react.useRef)(
4506
4506
  void 0
4507
4507
  );
@@ -4740,7 +4740,7 @@ var require_createComponent_native = __commonJS({
4740
4740
  isZStack,
4741
4741
  debug: debugProp
4742
4742
  });
4743
- asChild && (elementType = import_Slot.Slot, Object.assign(viewProps, { onPress, onLongPress })), content = (0, import_react.createElement)(elementType, viewProps, content);
4743
+ asChild && (elementType = import_Slot.Slot, Object.assign(viewProps, { onPress, onLongPress })), content = (0, import_react.createElement)(elementType, viewProps, content), import_setupHooks.hooks.useChildren && (content = (_m = (_l = import_setupHooks.hooks).useChildren) == null ? void 0 : _m.call(_l, content, viewProps, events, staticConfig));
4744
4744
  let subGroupContext = (0, import_react.useMemo)(() => {
4745
4745
  if (groupName)
4746
4746
  return {
@@ -6365,7 +6365,7 @@ var idFn_default, init_idFn = __esm({
6365
6365
  }
6366
6366
  });
6367
6367
 
6368
- // src/index.ts
6368
+ // src/index.tsx
6369
6369
  var src_exports = {};
6370
6370
  __export(src_exports, {
6371
6371
  Stack: () => Stack,
@@ -6379,7 +6379,8 @@ function getBaseViews() {
6379
6379
  let native = require("react-native");
6380
6380
  return {
6381
6381
  View: native.View || native.default.View,
6382
- Text: native.Text || native.default.Text
6382
+ Text: native.Text || native.default.Text,
6383
+ Pressable: native.Pressable || native.default.Pressable
6383
6384
  };
6384
6385
  }
6385
6386
 
@@ -6456,7 +6457,7 @@ function usePlatformMethods(hostRef) {
6456
6457
  // src/vendor/Pressability.native.tsx
6457
6458
  var Pressability = require_fake_react_native().default, usePressability = (init_idFn(), __toCommonJS(idFn_exports)).default;
6458
6459
 
6459
- // src/index.ts
6460
+ // src/index.tsx
6460
6461
  __reExport(src_exports, __toESM(require_index_native9()), module.exports);
6461
6462
  var Stack = import_web2.Stack, Text = import_web2.Text;
6462
6463
  (0, import_web2.setupHooks)({
@@ -6518,9 +6519,15 @@ var Stack = import_web2.Stack, Text = import_web2.Text;
6518
6519
  setStateShallow({ focus: !0 });
6519
6520
  }), viewProps.onBlur = (0, import_web2.composeEventHandlers)(viewProps.onBlur, () => {
6520
6521
  setStateShallow({ focus: !1 });
6521
- })), staticConfig.isInput)
6522
- Object.assign(viewProps, events);
6523
- else {
6522
+ })), staticConfig.isInput) {
6523
+ if (events) {
6524
+ let { onPressIn, onPressOut, onPress } = events, inputEvents = {
6525
+ onPressIn,
6526
+ onPressOut: onPressOut || onPress
6527
+ };
6528
+ onPressOut && onPress && (inputEvents.onPressOut = (0, import_web2.composeEventHandlers)(onPress, onPressOut)), Object.assign(viewProps, inputEvents);
6529
+ }
6530
+ } else {
6524
6531
  events && viewProps.hitSlop && (events.hitSlop = viewProps.hitSlop);
6525
6532
  let pressability = usePressability(events || null);
6526
6533
  if (events && events.onPress)
@@ -6530,6 +6537,21 @@ var Stack = import_web2.Stack, Text = import_web2.Text;
6530
6537
  }
6531
6538
  }
6532
6539
  }
6540
+ // attempt at properly fixing RN input, but <Pressable><TextInput /> just doesnt work on RN
6541
+ // useChildren(children, viewProps, events, staticConfig) {
6542
+ // if (process.env.TAMAGUI_TARGET === 'native') {
6543
+ // if (staticConfig.isInput && !staticConfig.isHOC) {
6544
+ // const Pressable = getBaseViews().Pressable
6545
+ // console.log(
6546
+ // 'wrapping in pressable',
6547
+ // events?.['onPressIn']?.toString(),
6548
+ // viewProps['onPressIn']
6549
+ // )
6550
+ // // we need to wrap it in a view?
6551
+ // return <Pressable {...events}>{children}</Pressable>
6552
+ // }
6553
+ // }
6554
+ // },
6533
6555
  });
6534
6556
  var dontComposePressabilityKeys = {
6535
6557
  onClick: !0