@hanzogui/native 3.0.6 → 4.4.0

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 (163) hide show
  1. package/dist/cjs/PressBoundary.cjs +92 -0
  2. package/dist/cjs/PressBoundary.native.js +105 -0
  3. package/dist/cjs/PressBoundary.native.js.map +1 -0
  4. package/dist/cjs/burntState.cjs +14 -12
  5. package/dist/cjs/burntState.native.js +18 -16
  6. package/dist/cjs/burntState.native.js.map +1 -1
  7. package/dist/cjs/components.cjs +20 -15
  8. package/dist/cjs/components.native.js +24 -22
  9. package/dist/cjs/components.native.js.map +1 -1
  10. package/dist/cjs/gesture-handler.cjs +36 -0
  11. package/dist/cjs/gesture-handler.native.js +39 -0
  12. package/dist/cjs/gesture-handler.native.js.map +1 -0
  13. package/dist/cjs/gestureState.cjs +116 -23
  14. package/dist/cjs/gestureState.native.js +127 -38
  15. package/dist/cjs/gestureState.native.js.map +1 -1
  16. package/dist/cjs/globalState.cjs +17 -11
  17. package/dist/cjs/globalState.native.js +17 -11
  18. package/dist/cjs/globalState.native.js.map +1 -1
  19. package/dist/cjs/index.cjs +26 -21
  20. package/dist/cjs/index.native.js +26 -21
  21. package/dist/cjs/index.native.js.map +1 -1
  22. package/dist/cjs/keyboardControllerState.cjs +14 -12
  23. package/dist/cjs/keyboardControllerState.native.js +23 -21
  24. package/dist/cjs/keyboardControllerState.native.js.map +1 -1
  25. package/dist/cjs/linearGradientState.cjs +14 -12
  26. package/dist/cjs/linearGradientState.native.js +17 -15
  27. package/dist/cjs/linearGradientState.native.js.map +1 -1
  28. package/dist/cjs/nativeMenuContext.cjs +13 -11
  29. package/dist/cjs/nativeMenuContext.native.js +14 -12
  30. package/dist/cjs/nativeMenuContext.native.js.map +1 -1
  31. package/dist/cjs/portalState.cjs +14 -12
  32. package/dist/cjs/portalState.native.js +17 -15
  33. package/dist/cjs/portalState.native.js.map +1 -1
  34. package/dist/cjs/safeAreaState.cjs +38 -30
  35. package/dist/cjs/safeAreaState.native.js +39 -31
  36. package/dist/cjs/safeAreaState.native.js.map +1 -1
  37. package/dist/cjs/setup-burnt.cjs +9 -8
  38. package/dist/cjs/setup-burnt.native.js +9 -8
  39. package/dist/cjs/setup-burnt.native.js.map +1 -1
  40. package/dist/cjs/setup-expo-linear-gradient.cjs +9 -8
  41. package/dist/cjs/setup-expo-linear-gradient.native.js +9 -8
  42. package/dist/cjs/setup-expo-linear-gradient.native.js.map +1 -1
  43. package/dist/cjs/setup-gesture-handler.cjs +58 -18
  44. package/dist/cjs/setup-gesture-handler.native.js +58 -18
  45. package/dist/cjs/setup-gesture-handler.native.js.map +1 -1
  46. package/dist/cjs/setup-keyboard-controller.native.js +20 -17
  47. package/dist/cjs/setup-safe-area.cjs +28 -1
  48. package/dist/cjs/setup-safe-area.native.js +19 -13
  49. package/dist/cjs/setup-safe-area.native.js.map +1 -1
  50. package/dist/cjs/setup-teleport.cjs +13 -13
  51. package/dist/cjs/setup-teleport.native.js +13 -13
  52. package/dist/cjs/setup-teleport.native.js.map +1 -1
  53. package/dist/cjs/setup-worklets.cjs +11 -8
  54. package/dist/cjs/setup-worklets.native.js +11 -8
  55. package/dist/cjs/setup-worklets.native.js.map +1 -1
  56. package/dist/cjs/setup-zeego.cjs +12 -9
  57. package/dist/cjs/setup-zeego.native.js +12 -9
  58. package/dist/cjs/setup-zeego.native.js.map +1 -1
  59. package/dist/cjs/types.cjs +7 -5
  60. package/dist/cjs/types.native.js +7 -5
  61. package/dist/cjs/types.native.js.map +1 -1
  62. package/dist/cjs/workletsState.cjs +14 -12
  63. package/dist/cjs/workletsState.native.js +20 -18
  64. package/dist/cjs/workletsState.native.js.map +1 -1
  65. package/dist/cjs/zeegoState.cjs +14 -12
  66. package/dist/cjs/zeegoState.native.js +18 -16
  67. package/dist/cjs/zeegoState.native.js.map +1 -1
  68. package/dist/esm/PressBoundary.mjs +56 -0
  69. package/dist/esm/PressBoundary.mjs.map +1 -0
  70. package/dist/esm/PressBoundary.native.js +66 -0
  71. package/dist/esm/PressBoundary.native.js.map +1 -0
  72. package/dist/esm/burntState.mjs +2 -2
  73. package/dist/esm/burntState.native.js +2 -2
  74. package/dist/esm/components.mjs +6 -3
  75. package/dist/esm/components.mjs.map +1 -1
  76. package/dist/esm/components.native.js +10 -10
  77. package/dist/esm/components.native.js.map +1 -1
  78. package/dist/esm/gesture-handler.mjs +6 -0
  79. package/dist/esm/gesture-handler.mjs.map +1 -0
  80. package/dist/esm/gesture-handler.native.js +6 -0
  81. package/dist/esm/gesture-handler.native.js.map +1 -0
  82. package/dist/esm/gestureState.mjs +102 -13
  83. package/dist/esm/gestureState.mjs.map +1 -1
  84. package/dist/esm/gestureState.native.js +108 -23
  85. package/dist/esm/gestureState.native.js.map +1 -1
  86. package/dist/esm/globalState.mjs +5 -1
  87. package/dist/esm/globalState.mjs.map +1 -1
  88. package/dist/esm/globalState.native.js +5 -1
  89. package/dist/esm/globalState.native.js.map +1 -1
  90. package/dist/esm/index.js +2 -1
  91. package/dist/esm/index.js.map +1 -1
  92. package/dist/esm/index.mjs +2 -1
  93. package/dist/esm/index.mjs.map +1 -1
  94. package/dist/esm/index.native.js +2 -1
  95. package/dist/esm/index.native.js.map +1 -1
  96. package/dist/esm/keyboardControllerState.mjs +2 -2
  97. package/dist/esm/keyboardControllerState.native.js +2 -2
  98. package/dist/esm/linearGradientState.mjs +2 -2
  99. package/dist/esm/linearGradientState.native.js +2 -2
  100. package/dist/esm/nativeMenuContext.mjs +1 -1
  101. package/dist/esm/nativeMenuContext.mjs.map +1 -1
  102. package/dist/esm/nativeMenuContext.native.js +1 -1
  103. package/dist/esm/nativeMenuContext.native.js.map +1 -1
  104. package/dist/esm/portalState.mjs +2 -2
  105. package/dist/esm/portalState.native.js +2 -2
  106. package/dist/esm/safeAreaState.mjs +26 -20
  107. package/dist/esm/safeAreaState.mjs.map +1 -1
  108. package/dist/esm/safeAreaState.native.js +26 -20
  109. package/dist/esm/safeAreaState.native.js.map +1 -1
  110. package/dist/esm/setup-burnt.mjs +9 -8
  111. package/dist/esm/setup-burnt.mjs.map +1 -1
  112. package/dist/esm/setup-burnt.native.js +9 -8
  113. package/dist/esm/setup-burnt.native.js.map +1 -1
  114. package/dist/esm/setup-expo-linear-gradient.mjs +9 -8
  115. package/dist/esm/setup-expo-linear-gradient.mjs.map +1 -1
  116. package/dist/esm/setup-expo-linear-gradient.native.js +9 -8
  117. package/dist/esm/setup-expo-linear-gradient.native.js.map +1 -1
  118. package/dist/esm/setup-gesture-handler.mjs +31 -18
  119. package/dist/esm/setup-gesture-handler.mjs.map +1 -1
  120. package/dist/esm/setup-gesture-handler.native.js +31 -18
  121. package/dist/esm/setup-gesture-handler.native.js.map +1 -1
  122. package/dist/esm/setup-keyboard-controller.native.js +20 -17
  123. package/dist/esm/setup-safe-area.mjs +27 -0
  124. package/dist/esm/setup-safe-area.mjs.map +1 -1
  125. package/dist/esm/setup-safe-area.native.js +19 -13
  126. package/dist/esm/setup-safe-area.native.js.map +1 -1
  127. package/dist/esm/setup-teleport.mjs +13 -13
  128. package/dist/esm/setup-teleport.mjs.map +1 -1
  129. package/dist/esm/setup-teleport.native.js +13 -13
  130. package/dist/esm/setup-teleport.native.js.map +1 -1
  131. package/dist/esm/setup-worklets.mjs +11 -8
  132. package/dist/esm/setup-worklets.mjs.map +1 -1
  133. package/dist/esm/setup-worklets.native.js +11 -8
  134. package/dist/esm/setup-worklets.native.js.map +1 -1
  135. package/dist/esm/setup-zeego.mjs +12 -9
  136. package/dist/esm/setup-zeego.mjs.map +1 -1
  137. package/dist/esm/setup-zeego.native.js +12 -9
  138. package/dist/esm/setup-zeego.native.js.map +1 -1
  139. package/dist/esm/workletsState.mjs +2 -2
  140. package/dist/esm/workletsState.native.js +2 -2
  141. package/dist/esm/zeegoState.mjs +2 -2
  142. package/dist/esm/zeegoState.native.js +2 -2
  143. package/gesture-handler/index.cjs +1 -0
  144. package/gesture-handler/index.js +1 -0
  145. package/gesture-handler/index.native.cjs +1 -0
  146. package/gesture-handler/index.native.js +1 -0
  147. package/gesture-handler.cjs +1 -0
  148. package/package.json +16 -3
  149. package/src/PressBoundary.tsx +81 -0
  150. package/src/gesture-handler.ts +17 -0
  151. package/src/gestureState.ts +137 -6
  152. package/src/index.ts +13 -2
  153. package/src/setup-burnt.ts +1 -1
  154. package/src/setup-gesture-handler.ts +38 -11
  155. package/src/setup-keyboard-controller.ts +1 -1
  156. package/src/setup-safe-area.ts +3 -3
  157. package/src/setup-worklets.ts +1 -1
  158. package/src/setup-zeego.ts +1 -1
  159. package/types/PressBoundary.d.ts +14 -0
  160. package/types/gesture-handler.d.ts +8 -0
  161. package/types/gestureState.d.ts +4 -0
  162. package/types/index.d.ts +4 -2
  163. package/types/setup-gesture-handler.d.ts +8 -1
@@ -3,33 +3,75 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var gestureState_exports = {};
22
24
  __export(gestureState_exports, {
23
- getGestureHandler: () => getGestureHandler
25
+ claimExternalPressOwnership: () => claimExternalPressOwnership,
26
+ getGestureHandler: () => getGestureHandler,
27
+ releaseExternalPressOwnership: () => releaseExternalPressOwnership
24
28
  });
25
29
  module.exports = __toCommonJS(gestureState_exports);
26
30
  var import_globalState = require("./globalState.cjs");
27
- const state = (0, import_globalState.createGlobalState)("gesture", {
28
- enabled: !1,
31
+ const state = (0, import_globalState.createGlobalState)(`gesture`, {
32
+ enabled: false,
29
33
  Gesture: null,
30
34
  GestureDetector: null,
31
35
  ScrollView: null
32
36
  });
37
+ let pressGestureDebugId = 0;
38
+ let externalPressDebugId = 0;
39
+ const pressState = {
40
+ owner: null,
41
+ ownerId: null,
42
+ ownerSource: null,
43
+ timestamp: 0
44
+ };
45
+ function resetPressOwner() {
46
+ pressState.owner = null;
47
+ pressState.ownerId = null;
48
+ pressState.ownerSource = null;
49
+ pressState.timestamp = 0;
50
+ }
51
+ function resetStaleOwner(now, debugName) {
52
+ if (now - pressState.timestamp > 2e3) {
53
+ resetPressOwner();
54
+ }
55
+ }
56
+ function claimExternalPressOwnership(debugName) {
57
+ const now = Date.now();
58
+ resetStaleOwner(now, debugName);
59
+ const token = {};
60
+ const ownerId = ++externalPressDebugId;
61
+ const previousOwnerId = pressState.ownerId;
62
+ const previousOwnerSource = pressState.ownerSource;
63
+ pressState.owner = token;
64
+ pressState.ownerId = ownerId;
65
+ pressState.ownerSource = "external";
66
+ pressState.timestamp = now;
67
+ return token;
68
+ }
69
+ function releaseExternalPressOwnership(token, debugName) {
70
+ if (!token || pressState.owner !== token) {
71
+ return;
72
+ }
73
+ resetPressOwner();
74
+ }
33
75
  function getGestureHandler() {
34
76
  return {
35
77
  get isEnabled() {
@@ -42,24 +84,75 @@ function getGestureHandler() {
42
84
  Object.assign(state.get(), updates);
43
85
  },
44
86
  disable() {
45
- state.get().enabled = !1;
87
+ state.get().enabled = false;
46
88
  },
47
89
  createPressGesture(config) {
48
90
  const {
49
91
  Gesture
50
92
  } = state.get();
51
93
  if (!Gesture) return null;
52
- const longPressDuration = config.delayLongPress ?? 500,
53
- tap = Gesture.Tap().runOnJS(!0).maxDuration(1e4).onBegin(e => {
54
- config.onPressIn?.(e);
55
- }).onEnd(e => {
94
+ const longPressDuration = config.delayLongPress ?? 500;
95
+ const myToken = {};
96
+ const myDebugId = ++pressGestureDebugId;
97
+ const GRACE_PERIOD_MS = process.env.TAMAGUI_RNGH_PRESS_DELAY ? +process.env.TAMAGUI_RNGH_PRESS_DELAY : 24;
98
+ const tryClaimOwnership = () => {
99
+ const now = Date.now();
100
+ resetStaleOwner(now, config.debugName);
101
+ const withinGrace = now - pressState.timestamp < GRACE_PERIOD_MS;
102
+ const previousOwnerId = pressState.ownerId;
103
+ const previousOwnerSource = pressState.ownerSource;
104
+ if (pressState.owner === null || withinGrace && pressState.ownerSource !== "external") {
105
+ pressState.owner = myToken;
106
+ pressState.ownerId = myDebugId;
107
+ pressState.ownerSource = "internal";
108
+ pressState.timestamp = now;
109
+ }
110
+ return pressState.owner === myToken;
111
+ };
112
+ const isOwner = () => pressState.owner === myToken;
113
+ const releaseOwnership = () => {
114
+ if (pressState.owner === myToken) {
115
+ resetPressOwner();
116
+ }
117
+ };
118
+ const tap = Gesture.Tap().runOnJS(true).maxDuration(1e4).onBegin(e => {
119
+ tryClaimOwnership();
120
+ setTimeout(() => {
121
+ if (isOwner()) {
122
+ config.onPressIn?.(e);
123
+ }
124
+ }, GRACE_PERIOD_MS + 1);
125
+ }).onEnd(e => {
126
+ if (isOwner()) {
56
127
  config.onPress?.(e);
57
- }).onFinalize(e => {
128
+ }
129
+ }).onFinalize(e => {
130
+ if (isOwner()) {
131
+ config.onPressOut?.(e);
132
+ releaseOwnership();
133
+ }
134
+ });
135
+ if (config.hitSlop) tap.hitSlop(config.hitSlop);
136
+ if (!config.onLongPress) return tap;
137
+ const longPress = Gesture.LongPress().runOnJS(true).minDuration(longPressDuration).onBegin(e => {
138
+ tryClaimOwnership();
139
+ setTimeout(() => {
140
+ if (isOwner()) {
141
+ config.onPressIn?.(e);
142
+ }
143
+ }, GRACE_PERIOD_MS + 1);
144
+ }).onStart(e => {
145
+ if (isOwner()) {
146
+ config.onLongPress?.(e);
147
+ }
148
+ }).onFinalize(e => {
149
+ if (isOwner()) {
58
150
  config.onPressOut?.(e);
59
- });
60
- if (config.hitSlop && tap.hitSlop(config.hitSlop), !config.onLongPress) return tap;
61
- const longPress = Gesture.LongPress().runOnJS(!0).minDuration(longPressDuration).onBegin(e => config.onPressIn?.(e)).onStart(e => config.onLongPress?.(e)).onFinalize(e => config.onPressOut?.(e));
62
- return config.hitSlop && longPress.hitSlop(config.hitSlop), Gesture.Exclusive(longPress, tap);
151
+ releaseOwnership();
152
+ }
153
+ });
154
+ if (config.hitSlop) longPress.hitSlop(config.hitSlop);
155
+ return Gesture.Exclusive(longPress, tap);
63
156
  }
64
157
  };
65
158
  }
@@ -5,33 +5,75 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var gestureState_exports = {};
24
26
  __export(gestureState_exports, {
25
- getGestureHandler: () => getGestureHandler
27
+ claimExternalPressOwnership: () => claimExternalPressOwnership,
28
+ getGestureHandler: () => getGestureHandler,
29
+ releaseExternalPressOwnership: () => releaseExternalPressOwnership
26
30
  });
27
31
  module.exports = __toCommonJS(gestureState_exports);
28
- var import_globalState = require("./globalState.native.js"),
29
- state = (0, import_globalState.createGlobalState)("gesture", {
30
- enabled: !1,
31
- Gesture: null,
32
- GestureDetector: null,
33
- ScrollView: null
34
- });
32
+ var import_globalState = require("./globalState.native.js");
33
+ var state = (0, import_globalState.createGlobalState)(`gesture`, {
34
+ enabled: false,
35
+ Gesture: null,
36
+ GestureDetector: null,
37
+ ScrollView: null
38
+ });
39
+ var pressGestureDebugId = 0;
40
+ var externalPressDebugId = 0;
41
+ var pressState = {
42
+ owner: null,
43
+ ownerId: null,
44
+ ownerSource: null,
45
+ timestamp: 0
46
+ };
47
+ function resetPressOwner() {
48
+ pressState.owner = null;
49
+ pressState.ownerId = null;
50
+ pressState.ownerSource = null;
51
+ pressState.timestamp = 0;
52
+ }
53
+ function resetStaleOwner(now, debugName) {
54
+ if (now - pressState.timestamp > 2e3) {
55
+ resetPressOwner();
56
+ }
57
+ }
58
+ function claimExternalPressOwnership(debugName) {
59
+ var now = Date.now();
60
+ resetStaleOwner(now, debugName);
61
+ var token = {};
62
+ var ownerId = ++externalPressDebugId;
63
+ var previousOwnerId = pressState.ownerId;
64
+ var previousOwnerSource = pressState.ownerSource;
65
+ pressState.owner = token;
66
+ pressState.ownerId = ownerId;
67
+ pressState.ownerSource = "external";
68
+ pressState.timestamp = now;
69
+ return token;
70
+ }
71
+ function releaseExternalPressOwnership(token, debugName) {
72
+ if (!token || pressState.owner !== token) {
73
+ return;
74
+ }
75
+ resetPressOwner();
76
+ }
35
77
  function getGestureHandler() {
36
78
  return {
37
79
  get isEnabled() {
@@ -44,37 +86,84 @@ function getGestureHandler() {
44
86
  Object.assign(state.get(), updates);
45
87
  },
46
88
  disable() {
47
- state.get().enabled = !1;
89
+ state.get().enabled = false;
48
90
  },
49
91
  createPressGesture(config) {
50
92
  var {
51
93
  Gesture
52
94
  } = state.get();
53
95
  if (!Gesture) return null;
54
- var _config_delayLongPress,
55
- longPressDuration = (_config_delayLongPress = config.delayLongPress) !== null && _config_delayLongPress !== void 0 ? _config_delayLongPress : 500,
56
- tap = Gesture.Tap().runOnJS(!0).maxDuration(1e4).onBegin(function (e) {
57
- var _config_onPressIn;
58
- (_config_onPressIn = config.onPressIn) === null || _config_onPressIn === void 0 || _config_onPressIn.call(config, e);
59
- }).onEnd(function (e) {
96
+ var _config_delayLongPress;
97
+ var longPressDuration = (_config_delayLongPress = config.delayLongPress) !== null && _config_delayLongPress !== void 0 ? _config_delayLongPress : 500;
98
+ var myToken = {};
99
+ var myDebugId = ++pressGestureDebugId;
100
+ var GRACE_PERIOD_MS = process.env.TAMAGUI_RNGH_PRESS_DELAY ? +process.env.TAMAGUI_RNGH_PRESS_DELAY : 24;
101
+ var tryClaimOwnership = function () {
102
+ var now = Date.now();
103
+ resetStaleOwner(now, config.debugName);
104
+ var withinGrace = now - pressState.timestamp < GRACE_PERIOD_MS;
105
+ var previousOwnerId = pressState.ownerId;
106
+ var previousOwnerSource = pressState.ownerSource;
107
+ if (pressState.owner === null || withinGrace && pressState.ownerSource !== "external") {
108
+ pressState.owner = myToken;
109
+ pressState.ownerId = myDebugId;
110
+ pressState.ownerSource = "internal";
111
+ pressState.timestamp = now;
112
+ }
113
+ return pressState.owner === myToken;
114
+ };
115
+ var isOwner = function () {
116
+ return pressState.owner === myToken;
117
+ };
118
+ var releaseOwnership = function () {
119
+ if (pressState.owner === myToken) {
120
+ resetPressOwner();
121
+ }
122
+ };
123
+ var tap = Gesture.Tap().runOnJS(true).maxDuration(1e4).onBegin(function (e) {
124
+ tryClaimOwnership();
125
+ setTimeout(function () {
126
+ if (isOwner()) {
127
+ var _config_onPressIn;
128
+ (_config_onPressIn = config.onPressIn) === null || _config_onPressIn === void 0 ? void 0 : _config_onPressIn.call(config, e);
129
+ }
130
+ }, GRACE_PERIOD_MS + 1);
131
+ }).onEnd(function (e) {
132
+ if (isOwner()) {
60
133
  var _config_onPress;
61
- (_config_onPress = config.onPress) === null || _config_onPress === void 0 || _config_onPress.call(config, e);
62
- }).onFinalize(function (e) {
134
+ (_config_onPress = config.onPress) === null || _config_onPress === void 0 ? void 0 : _config_onPress.call(config, e);
135
+ }
136
+ }).onFinalize(function (e) {
137
+ if (isOwner()) {
63
138
  var _config_onPressOut;
64
- (_config_onPressOut = config.onPressOut) === null || _config_onPressOut === void 0 || _config_onPressOut.call(config, e);
65
- });
66
- if (config.hitSlop && tap.hitSlop(config.hitSlop), !config.onLongPress) return tap;
67
- var longPress = Gesture.LongPress().runOnJS(!0).minDuration(longPressDuration).onBegin(function (e) {
68
- var _config_onPressIn;
69
- return (_config_onPressIn = config.onPressIn) === null || _config_onPressIn === void 0 ? void 0 : _config_onPressIn.call(config, e);
139
+ (_config_onPressOut = config.onPressOut) === null || _config_onPressOut === void 0 ? void 0 : _config_onPressOut.call(config, e);
140
+ releaseOwnership();
141
+ }
142
+ });
143
+ if (config.hitSlop) tap.hitSlop(config.hitSlop);
144
+ if (!config.onLongPress) return tap;
145
+ var longPress = Gesture.LongPress().runOnJS(true).minDuration(longPressDuration).onBegin(function (e) {
146
+ tryClaimOwnership();
147
+ setTimeout(function () {
148
+ if (isOwner()) {
149
+ var _config_onPressIn;
150
+ (_config_onPressIn = config.onPressIn) === null || _config_onPressIn === void 0 ? void 0 : _config_onPressIn.call(config, e);
151
+ }
152
+ }, GRACE_PERIOD_MS + 1);
70
153
  }).onStart(function (e) {
71
- var _config_onLongPress;
72
- return (_config_onLongPress = config.onLongPress) === null || _config_onLongPress === void 0 ? void 0 : _config_onLongPress.call(config, e);
154
+ if (isOwner()) {
155
+ var _config_onLongPress;
156
+ (_config_onLongPress = config.onLongPress) === null || _config_onLongPress === void 0 ? void 0 : _config_onLongPress.call(config, e);
157
+ }
73
158
  }).onFinalize(function (e) {
74
- var _config_onPressOut;
75
- return (_config_onPressOut = config.onPressOut) === null || _config_onPressOut === void 0 ? void 0 : _config_onPressOut.call(config, e);
159
+ if (isOwner()) {
160
+ var _config_onPressOut;
161
+ (_config_onPressOut = config.onPressOut) === null || _config_onPressOut === void 0 ? void 0 : _config_onPressOut.call(config, e);
162
+ releaseOwnership();
163
+ }
76
164
  });
77
- return config.hitSlop && longPress.hitSlop(config.hitSlop), Gesture.Exclusive(longPress, tap);
165
+ if (config.hitSlop) longPress.hitSlop(config.hitSlop);
166
+ return Gesture.Exclusive(longPress, tap);
78
167
  }
79
168
  };
80
169
  }
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","gestureState_exports","__export","getGestureHandler","module","exports","import_globalState","require","state","createGlobalState","enabled","Gesture","GestureDetector","ScrollView","isEnabled","get","set","updates","Object","assign","disable","createPressGesture","config","_config_delayLongPress","longPressDuration","delayLongPress","tap","Tap","runOnJS","maxDuration","onBegin","e","_config_onPressIn","onPressIn","call","onEnd","_config_onPress","onPress","onFinalize","_config_onPressOut","onPressOut","hitSlop","onLongPress","longPress","LongPress","minDuration"],"sources":["../../src/gestureState.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAkC,CAAAK,oBAAA;AAGlC,IAAAK,kBAAc,GAAAC,OAAA;EAAAC,KAAgC,OAAAF,kBAAW,CAAAG,iBAAA;IACvDC,OAAA,EAAS;IACTC,OAAA,EAAS;IACTC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AAA,CAAAZ,MAAc,EACzCS,CAAA;QAGH;MAIF,IAAAT,MAAA,CAAAmB,OAAA,IAAAf,GAAA,CAAAe,OAAA,CAAAnB,MAAA,CAAAmB,OAAA,IAAAnB,MAAA,CAAAoB,WAAA,SAAAhB,GAAA;MACF,IAAAiB,SAAA,GAAAhC,OAAA,CAAAiC,SAAA,GAAAhB,OAAA,KAAAiB,WAAA,CAAArB,iBAAA,EAAAM,OAAA,WAAAC,CAAA;QACF,IAAAC,iBAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","gestureState_exports","__export","claimExternalPressOwnership","getGestureHandler","releaseExternalPressOwnership","module","exports","import_globalState","require","state","createGlobalState","enabled","Gesture","GestureDetector","ScrollView","pressGestureDebugId","externalPressDebugId","pressState","owner","ownerId","ownerSource","timestamp","resetPressOwner","resetStaleOwner","now","debugName","Date","token","previousOwnerId","previousOwnerSource","isEnabled","get","set","updates","Object","assign","disable","createPressGesture","config","_config_delayLongPress","longPressDuration","delayLongPress","myToken","myDebugId","GRACE_PERIOD_MS","process","env","TAMAGUI_RNGH_PRESS_DELAY","tryClaimOwnership","withinGrace","isOwner","releaseOwnership","tap","Tap","runOnJS","maxDuration","onBegin","e","setTimeout","_config_onPressIn","onPressIn","call","onEnd","_config_onPress","onPress","onFinalize","_config_onPressOut","onPressOut","hitSlop","onLongPress","longPress","LongPress","minDuration","onStart","_config_onLongPress"],"sources":["../../src/gestureState.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,2BAAA,EAAAA,CAAA,KAAAA,2BAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,6BAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAA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AA,GAAAjB,OAAA,OAAAkB,WAAA,CAAAhC,iBAAA,EAAAgB,OAAA,WAAAC,CAAA;QACnBT,iBAAe;QACbU,UAAO;UACT,IAAAR,OAAA;YAED,IAAAS,iBAAuB;YAClB,CAAAA,iBAAW,GAAArB,MAAA,CAAAsB,SAAA,cAAAD,iBAAA,uBAAAA,iBAAA,CAAAE,IAAA,CAAAvB,MAAA,EAAAmB,CAAA;UACb;QACA,GAAAb,eAAA,GAAiB;MAAA,EACnB,CAAA6B,OAAA,WAAAhB,CAAA;QACD,IAAAP,OAAA;UAEC,IAAAwB,mBAAgB;UAGpB,CAAAA,mBAAe,GAAUpC,MAAA,CAAA+B,WAAc,cAAAK,mBAAA,uBAAAA,mBAAA,CAAAb,IAAA,CAAAvB,MAAA,EAAAmB,CAAA;QACzC;MACF,GAAAQ,UAAA,WAAAR,CAAA;QACF,IAAAP,OAAA","ignoreList":[]}
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var globalState_exports = {};
22
24
  __export(globalState_exports, {
@@ -27,9 +29,13 @@ function createGlobalState(key, defaultValue) {
27
29
  const GLOBAL_KEY = `__gui_${key}__`;
28
30
  function getGlobalState() {
29
31
  const g = globalThis;
30
- return g[GLOBAL_KEY] || (g[GLOBAL_KEY] = defaultValue), g[GLOBAL_KEY];
32
+ if (!g[GLOBAL_KEY]) {
33
+ g[GLOBAL_KEY] = defaultValue;
34
+ }
35
+ return g[GLOBAL_KEY];
31
36
  }
32
37
  function setGlobalState(newState) {
38
+ ;
33
39
  globalThis[GLOBAL_KEY] = newState;
34
40
  }
35
41
  return {
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var globalState_exports = {};
24
26
  __export(globalState_exports, {
@@ -29,9 +31,13 @@ function createGlobalState(key, defaultValue) {
29
31
  var GLOBAL_KEY = `__gui_${key}__`;
30
32
  function getGlobalState() {
31
33
  var g = globalThis;
32
- return g[GLOBAL_KEY] || (g[GLOBAL_KEY] = defaultValue), g[GLOBAL_KEY];
34
+ if (!g[GLOBAL_KEY]) {
35
+ g[GLOBAL_KEY] = defaultValue;
36
+ }
37
+ return g[GLOBAL_KEY];
33
38
  }
34
39
  function setGlobalState(newState) {
40
+ ;
35
41
  globalThis[GLOBAL_KEY] = newState;
36
42
  }
37
43
  return {
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","globalState_exports","__export","createGlobalState","module","exports","key","defaultValue","GLOBAL_KEY","getGlobalState","g","globalThis","setGlobalState","newState","get","set"],"sources":["../../src/globalState.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAOC,MAAA,CAAAC,OAAS,GAAAT,YACd,CAAAK,mBAKA;AACA,SAAME,iBAAaA,CAAAG,GAAS,EAAAC,YAAG;EAM/B,IAAAC,UAAS,YAAoBF,GAAA;EAC3B,SAAMG,cAAIA,CAAA;IACV,IAAAC,CAAA,GAAKC,UAAE;IAMT,OAAAD,CAAA,CAAAF,UAAA,MAAAE,CAAA,CAAAF,UAAA,IAAAD,YAAA,GAAAG,CAAA,CAAAF,UAAA;EAEA;EACG,SAACI,cAAmCA,CAAAC,QAAI;IAC3CF,UAAA,CAAAH,UAAA,IAAAK,QAAA;EAEA;EAAO,OACA;IACLC,GAAA,EAAKL,cAAA;IACPM,GAAA,EAAAH;EACF","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","globalState_exports","__export","createGlobalState","module","exports","key","defaultValue","GLOBAL_KEY","getGlobalState","g","globalThis","setGlobalState","newState","get","set"],"sources":["../../src/globalState.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAOC,MAAA,CAAAC,OAAS,GAAAT,YACd,CAAAK,mBAKA;AACA,SAAME,iBAAaA,CAAAG,GAAS,EAAAC,YAAG;EAM/B,IAAAC,UAAS,YAAoBF,GAAA;EAC3B,SAAMG,cAAIA,CAAA;IACV,IAAIC,CAAC,GAAEC,UAAU;IAGf,IAAE,CAAAD,CAAA,CAAAF,UAAU,CAAI;MAClBE,CAAA,CAAAF,UAAA,IAAAD,YAAA;IACA;IACF,OAAAG,CAAA,CAAAF,UAAA;EAEA;EACE,SAAAI,eAAAC,QAAA;IAAE;IACJF,UAAA,CAAAH,UAAA,IAAAK,QAAA;EAEA;EAAO,OACA;IACLC,GAAA,EAAKL,cAAA;IACPM,GAAA,EAAAH;EACF","ignoreList":[]}
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var index_exports = {};
22
24
  __export(index_exports, {
@@ -33,16 +35,19 @@ __export(index_exports, {
33
35
  getWorklets: () => import_workletsState.getWorklets,
34
36
  getZeego: () => import_zeegoState.getZeego,
35
37
  isKeyboardControllerEnabled: () => import_keyboardControllerState.isKeyboardControllerEnabled,
36
- setKeyboardControllerState: () => import_keyboardControllerState.setKeyboardControllerState
38
+ setKeyboardControllerState: () => import_keyboardControllerState.setKeyboardControllerState,
39
+ unstable_claimExternalPressOwnership: () => import_gestureState2.claimExternalPressOwnership,
40
+ unstable_releaseExternalPressOwnership: () => import_gestureState2.releaseExternalPressOwnership
37
41
  });
38
42
  module.exports = __toCommonJS(index_exports);
39
- var import_portalState = require("./portalState.cjs"),
40
- import_gestureState = require("./gestureState.cjs"),
41
- import_workletsState = require("./workletsState.cjs"),
42
- import_safeAreaState = require("./safeAreaState.cjs"),
43
- import_linearGradientState = require("./linearGradientState.cjs"),
44
- import_keyboardControllerState = require("./keyboardControllerState.cjs"),
45
- import_zeegoState = require("./zeegoState.cjs"),
46
- import_nativeMenuContext = require("./nativeMenuContext.cjs"),
47
- import_burntState = require("./burntState.cjs"),
48
- import_components = require("./components.cjs");
43
+ var import_portalState = require("./portalState.cjs");
44
+ var import_gestureState = require("./gestureState.cjs");
45
+ var import_gestureState2 = require("./gestureState.cjs");
46
+ var import_workletsState = require("./workletsState.cjs");
47
+ var import_safeAreaState = require("./safeAreaState.cjs");
48
+ var import_linearGradientState = require("./linearGradientState.cjs");
49
+ var import_keyboardControllerState = require("./keyboardControllerState.cjs");
50
+ var import_zeegoState = require("./zeegoState.cjs");
51
+ var import_nativeMenuContext = require("./nativeMenuContext.cjs");
52
+ var import_burntState = require("./burntState.cjs");
53
+ var import_components = require("./components.cjs");
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var index_exports = {};
24
26
  __export(index_exports, {
@@ -35,17 +37,20 @@ __export(index_exports, {
35
37
  getWorklets: () => import_workletsState.getWorklets,
36
38
  getZeego: () => import_zeegoState.getZeego,
37
39
  isKeyboardControllerEnabled: () => import_keyboardControllerState.isKeyboardControllerEnabled,
38
- setKeyboardControllerState: () => import_keyboardControllerState.setKeyboardControllerState
40
+ setKeyboardControllerState: () => import_keyboardControllerState.setKeyboardControllerState,
41
+ unstable_claimExternalPressOwnership: () => import_gestureState2.claimExternalPressOwnership,
42
+ unstable_releaseExternalPressOwnership: () => import_gestureState2.releaseExternalPressOwnership
39
43
  });
40
44
  module.exports = __toCommonJS(index_exports);
41
- var import_portalState = require("./portalState.native.js"),
42
- import_gestureState = require("./gestureState.native.js"),
43
- import_workletsState = require("./workletsState.native.js"),
44
- import_safeAreaState = require("./safeAreaState.native.js"),
45
- import_linearGradientState = require("./linearGradientState.native.js"),
46
- import_keyboardControllerState = require("./keyboardControllerState.native.js"),
47
- import_zeegoState = require("./zeegoState.native.js"),
48
- import_nativeMenuContext = require("./nativeMenuContext.native.js"),
49
- import_burntState = require("./burntState.native.js"),
50
- import_components = require("./components.native.js");
45
+ var import_portalState = require("./portalState.native.js");
46
+ var import_gestureState = require("./gestureState.native.js");
47
+ var import_gestureState2 = require("./gestureState.native.js");
48
+ var import_workletsState = require("./workletsState.native.js");
49
+ var import_safeAreaState = require("./safeAreaState.native.js");
50
+ var import_linearGradientState = require("./linearGradientState.native.js");
51
+ var import_keyboardControllerState = require("./keyboardControllerState.native.js");
52
+ var import_zeegoState = require("./zeegoState.native.js");
53
+ var import_nativeMenuContext = require("./nativeMenuContext.native.js");
54
+ var import_burntState = require("./burntState.native.js");
55
+ var import_components = require("./components.native.js");
51
56
  //# sourceMappingURL=index.native.js.map