@tamagui/core 1.82.0 → 1.82.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/core",
3
- "version": "1.82.0",
3
+ "version": "1.82.2",
4
4
  "source": "src/index.tsx",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -35,16 +35,16 @@
35
35
  "native-test.d.ts"
36
36
  ],
37
37
  "dependencies": {
38
- "@tamagui/react-native-use-pressable": "1.82.0",
39
- "@tamagui/react-native-use-responder-events": "1.82.0",
40
- "@tamagui/use-event": "1.82.0",
41
- "@tamagui/web": "1.82.0"
38
+ "@tamagui/react-native-use-pressable": "1.82.2",
39
+ "@tamagui/react-native-use-responder-events": "1.82.2",
40
+ "@tamagui/use-event": "1.82.2",
41
+ "@tamagui/web": "1.82.2"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": "*"
45
45
  },
46
46
  "devDependencies": {
47
- "@tamagui/build": "1.82.0",
47
+ "@tamagui/build": "1.82.2",
48
48
  "@testing-library/react": "^14.0.0",
49
49
  "csstype": "^3.0.10",
50
50
  "react": "^18.2.0",
package/src/index.tsx CHANGED
@@ -147,7 +147,10 @@ setupHooks({
147
147
  if (events.onBlur) {
148
148
  viewProps['onBlur'] = events.onBlur
149
149
  }
150
- if (staticConfig.isInput) {
150
+ }
151
+
152
+ if (staticConfig.isInput) {
153
+ if (events) {
151
154
  const { onPressIn, onPressOut, onPress } = events
152
155
  const inputEvents = {
153
156
  onPressIn,
@@ -158,14 +161,18 @@ setupHooks({
158
161
  inputEvents.onPressOut = composeEventHandlers(onPress, onPressOut)
159
162
  }
160
163
  Object.assign(viewProps, inputEvents)
161
- } else {
162
- // use Pressability to get smooth unPress when you press + hold + move out
163
- // only ever create once, use .configure() to update later
164
- if (viewProps.hitSlop) {
165
- events.hitSlop = viewProps.hitSlop
166
- }
167
- const pressability = usePressability(events)
164
+ }
165
+ } else {
166
+ // use Pressability to get smooth unPress when you press + hold + move out
167
+ // only ever create once, use .configure() to update later
168
+ if (events && viewProps.hitSlop) {
169
+ events.hitSlop = viewProps.hitSlop
170
+ }
171
+
172
+ // note we do events checks more than we should because we need this hook to always run
173
+ const pressability = usePressability(events)
168
174
 
175
+ if (events) {
169
176
  if (process.env.NODE_ENV === 'development') {
170
177
  if (viewProps['debug']) {
171
178
  console.info(