@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.
- package/dist/cjs/PressBoundary.cjs +92 -0
- package/dist/cjs/PressBoundary.native.js +105 -0
- package/dist/cjs/PressBoundary.native.js.map +1 -0
- package/dist/cjs/burntState.cjs +14 -12
- package/dist/cjs/burntState.native.js +18 -16
- package/dist/cjs/burntState.native.js.map +1 -1
- package/dist/cjs/components.cjs +20 -15
- package/dist/cjs/components.native.js +24 -22
- package/dist/cjs/components.native.js.map +1 -1
- package/dist/cjs/gesture-handler.cjs +36 -0
- package/dist/cjs/gesture-handler.native.js +39 -0
- package/dist/cjs/gesture-handler.native.js.map +1 -0
- package/dist/cjs/gestureState.cjs +116 -23
- package/dist/cjs/gestureState.native.js +127 -38
- package/dist/cjs/gestureState.native.js.map +1 -1
- package/dist/cjs/globalState.cjs +17 -11
- package/dist/cjs/globalState.native.js +17 -11
- package/dist/cjs/globalState.native.js.map +1 -1
- package/dist/cjs/index.cjs +26 -21
- package/dist/cjs/index.native.js +26 -21
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/keyboardControllerState.cjs +14 -12
- package/dist/cjs/keyboardControllerState.native.js +23 -21
- package/dist/cjs/keyboardControllerState.native.js.map +1 -1
- package/dist/cjs/linearGradientState.cjs +14 -12
- package/dist/cjs/linearGradientState.native.js +17 -15
- package/dist/cjs/linearGradientState.native.js.map +1 -1
- package/dist/cjs/nativeMenuContext.cjs +13 -11
- package/dist/cjs/nativeMenuContext.native.js +14 -12
- package/dist/cjs/nativeMenuContext.native.js.map +1 -1
- package/dist/cjs/portalState.cjs +14 -12
- package/dist/cjs/portalState.native.js +17 -15
- package/dist/cjs/portalState.native.js.map +1 -1
- package/dist/cjs/safeAreaState.cjs +38 -30
- package/dist/cjs/safeAreaState.native.js +39 -31
- package/dist/cjs/safeAreaState.native.js.map +1 -1
- package/dist/cjs/setup-burnt.cjs +9 -8
- package/dist/cjs/setup-burnt.native.js +9 -8
- package/dist/cjs/setup-burnt.native.js.map +1 -1
- package/dist/cjs/setup-expo-linear-gradient.cjs +9 -8
- package/dist/cjs/setup-expo-linear-gradient.native.js +9 -8
- package/dist/cjs/setup-expo-linear-gradient.native.js.map +1 -1
- package/dist/cjs/setup-gesture-handler.cjs +58 -18
- package/dist/cjs/setup-gesture-handler.native.js +58 -18
- package/dist/cjs/setup-gesture-handler.native.js.map +1 -1
- package/dist/cjs/setup-keyboard-controller.native.js +20 -17
- package/dist/cjs/setup-safe-area.cjs +28 -1
- package/dist/cjs/setup-safe-area.native.js +19 -13
- package/dist/cjs/setup-safe-area.native.js.map +1 -1
- package/dist/cjs/setup-teleport.cjs +13 -13
- package/dist/cjs/setup-teleport.native.js +13 -13
- package/dist/cjs/setup-teleport.native.js.map +1 -1
- package/dist/cjs/setup-worklets.cjs +11 -8
- package/dist/cjs/setup-worklets.native.js +11 -8
- package/dist/cjs/setup-worklets.native.js.map +1 -1
- package/dist/cjs/setup-zeego.cjs +12 -9
- package/dist/cjs/setup-zeego.native.js +12 -9
- package/dist/cjs/setup-zeego.native.js.map +1 -1
- package/dist/cjs/types.cjs +7 -5
- package/dist/cjs/types.native.js +7 -5
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/workletsState.cjs +14 -12
- package/dist/cjs/workletsState.native.js +20 -18
- package/dist/cjs/workletsState.native.js.map +1 -1
- package/dist/cjs/zeegoState.cjs +14 -12
- package/dist/cjs/zeegoState.native.js +18 -16
- package/dist/cjs/zeegoState.native.js.map +1 -1
- package/dist/esm/PressBoundary.mjs +56 -0
- package/dist/esm/PressBoundary.mjs.map +1 -0
- package/dist/esm/PressBoundary.native.js +66 -0
- package/dist/esm/PressBoundary.native.js.map +1 -0
- package/dist/esm/burntState.mjs +2 -2
- package/dist/esm/burntState.native.js +2 -2
- package/dist/esm/components.mjs +6 -3
- package/dist/esm/components.mjs.map +1 -1
- package/dist/esm/components.native.js +10 -10
- package/dist/esm/components.native.js.map +1 -1
- package/dist/esm/gesture-handler.mjs +6 -0
- package/dist/esm/gesture-handler.mjs.map +1 -0
- package/dist/esm/gesture-handler.native.js +6 -0
- package/dist/esm/gesture-handler.native.js.map +1 -0
- package/dist/esm/gestureState.mjs +102 -13
- package/dist/esm/gestureState.mjs.map +1 -1
- package/dist/esm/gestureState.native.js +108 -23
- package/dist/esm/gestureState.native.js.map +1 -1
- package/dist/esm/globalState.mjs +5 -1
- package/dist/esm/globalState.mjs.map +1 -1
- package/dist/esm/globalState.native.js +5 -1
- package/dist/esm/globalState.native.js.map +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +2 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/keyboardControllerState.mjs +2 -2
- package/dist/esm/keyboardControllerState.native.js +2 -2
- package/dist/esm/linearGradientState.mjs +2 -2
- package/dist/esm/linearGradientState.native.js +2 -2
- package/dist/esm/nativeMenuContext.mjs +1 -1
- package/dist/esm/nativeMenuContext.mjs.map +1 -1
- package/dist/esm/nativeMenuContext.native.js +1 -1
- package/dist/esm/nativeMenuContext.native.js.map +1 -1
- package/dist/esm/portalState.mjs +2 -2
- package/dist/esm/portalState.native.js +2 -2
- package/dist/esm/safeAreaState.mjs +26 -20
- package/dist/esm/safeAreaState.mjs.map +1 -1
- package/dist/esm/safeAreaState.native.js +26 -20
- package/dist/esm/safeAreaState.native.js.map +1 -1
- package/dist/esm/setup-burnt.mjs +9 -8
- package/dist/esm/setup-burnt.mjs.map +1 -1
- package/dist/esm/setup-burnt.native.js +9 -8
- package/dist/esm/setup-burnt.native.js.map +1 -1
- package/dist/esm/setup-expo-linear-gradient.mjs +9 -8
- package/dist/esm/setup-expo-linear-gradient.mjs.map +1 -1
- package/dist/esm/setup-expo-linear-gradient.native.js +9 -8
- package/dist/esm/setup-expo-linear-gradient.native.js.map +1 -1
- package/dist/esm/setup-gesture-handler.mjs +31 -18
- package/dist/esm/setup-gesture-handler.mjs.map +1 -1
- package/dist/esm/setup-gesture-handler.native.js +31 -18
- package/dist/esm/setup-gesture-handler.native.js.map +1 -1
- package/dist/esm/setup-keyboard-controller.native.js +20 -17
- package/dist/esm/setup-safe-area.mjs +27 -0
- package/dist/esm/setup-safe-area.mjs.map +1 -1
- package/dist/esm/setup-safe-area.native.js +19 -13
- package/dist/esm/setup-safe-area.native.js.map +1 -1
- package/dist/esm/setup-teleport.mjs +13 -13
- package/dist/esm/setup-teleport.mjs.map +1 -1
- package/dist/esm/setup-teleport.native.js +13 -13
- package/dist/esm/setup-teleport.native.js.map +1 -1
- package/dist/esm/setup-worklets.mjs +11 -8
- package/dist/esm/setup-worklets.mjs.map +1 -1
- package/dist/esm/setup-worklets.native.js +11 -8
- package/dist/esm/setup-worklets.native.js.map +1 -1
- package/dist/esm/setup-zeego.mjs +12 -9
- package/dist/esm/setup-zeego.mjs.map +1 -1
- package/dist/esm/setup-zeego.native.js +12 -9
- package/dist/esm/setup-zeego.native.js.map +1 -1
- package/dist/esm/workletsState.mjs +2 -2
- package/dist/esm/workletsState.native.js +2 -2
- package/dist/esm/zeegoState.mjs +2 -2
- package/dist/esm/zeegoState.native.js +2 -2
- package/gesture-handler/index.cjs +1 -0
- package/gesture-handler/index.js +1 -0
- package/gesture-handler/index.native.cjs +1 -0
- package/gesture-handler/index.native.js +1 -0
- package/gesture-handler.cjs +1 -0
- package/package.json +16 -3
- package/src/PressBoundary.tsx +81 -0
- package/src/gesture-handler.ts +17 -0
- package/src/gestureState.ts +137 -6
- package/src/index.ts +13 -2
- package/src/setup-burnt.ts +1 -1
- package/src/setup-gesture-handler.ts +38 -11
- package/src/setup-keyboard-controller.ts +1 -1
- package/src/setup-safe-area.ts +3 -3
- package/src/setup-worklets.ts +1 -1
- package/src/setup-zeego.ts +1 -1
- package/types/PressBoundary.d.ts +14 -0
- package/types/gesture-handler.d.ts +8 -0
- package/types/gestureState.d.ts +4 -0
- package/types/index.d.ts +4 -2
- 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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
18
20
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
-
value:
|
|
21
|
+
value: true
|
|
20
22
|
}), mod);
|
|
21
23
|
var gestureState_exports = {};
|
|
22
24
|
__export(gestureState_exports, {
|
|
23
|
-
|
|
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)(
|
|
28
|
-
enabled:
|
|
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 =
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
}
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
23
|
+
value: true
|
|
22
24
|
}), mod);
|
|
23
25
|
var gestureState_exports = {};
|
|
24
26
|
__export(gestureState_exports, {
|
|
25
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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 =
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
|
62
|
-
}
|
|
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
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
|
|
72
|
-
|
|
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
|
-
|
|
75
|
-
|
|
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
|
-
|
|
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":"
|
|
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,Q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GAAA,CAAAgB,OAAA,CAAA9B,MAAA,CAAA8B,OAAA;MAAA,IACF,CAAG9B,MAAA,CAAA+B,WAAkB,EAAC,OAAAjB,GAAA;MACxB,IACCkB,SAAS,GAAA1D,OAAW,CAAA2D,SAAA,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":[]}
|
package/dist/cjs/globalState.cjs
CHANGED
|
@@ -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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
18
20
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
-
value:
|
|
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
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
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
|
-
|
|
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":"
|
|
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":[]}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
18
20
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
-
value:
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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");
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|