@tamagui/native 2.0.0-rc.36 → 2.0.0-rc.36-1775243248161
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/.turbo/turbo-build.log +2 -3
- 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/gestureState.cjs +28 -24
- package/dist/cjs/gestureState.native.js +37 -33
- 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 +22 -20
- package/dist/cjs/index.native.js +22 -20
- 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 +20 -16
- package/dist/cjs/setup-gesture-handler.native.js +20 -16
- 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/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/gestureState.mjs +16 -14
- package/dist/esm/gestureState.mjs.map +1 -1
- package/dist/esm/gestureState.native.js +20 -18
- 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/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 +20 -16
- package/dist/esm/setup-gesture-handler.mjs.map +1 -1
- package/dist/esm/setup-gesture-handler.native.js +20 -16
- 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/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
built @tamagui/native in [33m481[39m ms
|
|
1
|
+
$ tamagui-build
|
|
2
|
+
built @tamagui/native in 586 ms
|
package/dist/cjs/burntState.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 burntState_exports = {};
|
|
22
24
|
__export(burntState_exports, {
|
|
@@ -24,8 +26,8 @@ __export(burntState_exports, {
|
|
|
24
26
|
});
|
|
25
27
|
module.exports = __toCommonJS(burntState_exports);
|
|
26
28
|
var import_globalState = require("./globalState.cjs");
|
|
27
|
-
const state = (0, import_globalState.createGlobalState)(
|
|
28
|
-
enabled:
|
|
29
|
+
const state = (0, import_globalState.createGlobalState)(`burnt`, {
|
|
30
|
+
enabled: false,
|
|
29
31
|
toast: null,
|
|
30
32
|
dismissAllAlerts: null
|
|
31
33
|
});
|
|
@@ -5,32 +5,34 @@ 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 burntState_exports = {};
|
|
24
26
|
__export(burntState_exports, {
|
|
25
27
|
getBurnt: () => getBurnt
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(burntState_exports);
|
|
28
|
-
var import_globalState = require("./globalState.native.js")
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
var import_globalState = require("./globalState.native.js");
|
|
31
|
+
var state = (0, import_globalState.createGlobalState)(`burnt`, {
|
|
32
|
+
enabled: false,
|
|
33
|
+
toast: null,
|
|
34
|
+
dismissAllAlerts: null
|
|
35
|
+
});
|
|
34
36
|
function getBurnt() {
|
|
35
37
|
return {
|
|
36
38
|
get isEnabled() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","burntState_exports","__export","getBurnt","module","exports","import_globalState","require","state","createGlobalState","enabled","toast","dismissAllAlerts","isEnabled","get","set","newState"],"sources":["../../src/burntState.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","burntState_exports","__export","getBurnt","module","exports","import_globalState","require","state","createGlobalState","enabled","toast","dismissAllAlerts","isEnabled","get","set","newState"],"sources":["../../src/burntState.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,kBAAA;AAAAC,QAAA,CAAAD,kBAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAkC,CAAAK,kBAAA;AAGlC,IAAAK,kBAAc,GAAAC,OAAA;AAAuC,IACnDC,KAAA,GAAS,IAAAF,kBAAA,CAAAG,iBAAA;EACTC,OAAO;EACPC,KAAA;EACDC,gBAAA;AAQM;AACL,SAAOT,SAAA;EAAA,OACD;IACF,IAAAU,SAAOA,CAAA,EAAM;MACf,OAAAL,KAAA,CAAAM,GAAA,GAAAJ,OAAA;IACA;IACE,IAAAF,KAAOA,CAAA;MACT,OAAAA,KAAA,CAAAM,GAAA;IACA;IACEC,IAAAC,QAAU;MACZR,KAAA,CAAAO,GAAA,CAAAC,QAAA;IACF;EACF","ignoreList":[]}
|
package/dist/cjs/components.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 components_exports = {};
|
|
22
24
|
__export(components_exports, {
|
|
@@ -25,13 +27,14 @@ __export(components_exports, {
|
|
|
25
27
|
NativePortalProvider: () => NativePortalProvider
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(components_exports);
|
|
28
|
-
var import_portalState = require("./portalState.cjs")
|
|
29
|
-
|
|
30
|
+
var import_portalState = require("./portalState.cjs");
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
32
|
function NativePortal({
|
|
31
33
|
hostName = "root",
|
|
32
34
|
children
|
|
33
35
|
}) {
|
|
34
|
-
|
|
36
|
+
const state = (0, import_portalState.getPortal)().state;
|
|
37
|
+
if (state.type !== "teleport") return null;
|
|
35
38
|
const {
|
|
36
39
|
Portal
|
|
37
40
|
} = globalThis.__tamagui_teleport;
|
|
@@ -43,7 +46,8 @@ function NativePortal({
|
|
|
43
46
|
function NativePortalHost({
|
|
44
47
|
name
|
|
45
48
|
}) {
|
|
46
|
-
|
|
49
|
+
const state = (0, import_portalState.getPortal)().state;
|
|
50
|
+
if (state.type !== "teleport") return null;
|
|
47
51
|
const {
|
|
48
52
|
PortalHost
|
|
49
53
|
} = globalThis.__tamagui_teleport;
|
|
@@ -54,7 +58,8 @@ function NativePortalHost({
|
|
|
54
58
|
function NativePortalProvider({
|
|
55
59
|
children
|
|
56
60
|
}) {
|
|
57
|
-
|
|
61
|
+
const state = (0, import_portalState.getPortal)().state;
|
|
62
|
+
if (state.type !== "teleport") return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
58
63
|
children
|
|
59
64
|
});
|
|
60
65
|
const {
|
|
@@ -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 components_exports = {};
|
|
24
26
|
__export(components_exports, {
|
|
@@ -27,14 +29,14 @@ __export(components_exports, {
|
|
|
27
29
|
NativePortalProvider: () => NativePortalProvider
|
|
28
30
|
});
|
|
29
31
|
module.exports = __toCommonJS(components_exports);
|
|
30
|
-
var import_jsx_runtime = require("react/jsx-runtime")
|
|
31
|
-
|
|
32
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
+
var import_portalState = require("./portalState.native.js");
|
|
32
34
|
function NativePortal(param) {
|
|
33
35
|
var {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
hostName = "root",
|
|
37
|
+
children
|
|
38
|
+
} = param;
|
|
39
|
+
var state = (0, import_portalState.getPortal)().state;
|
|
38
40
|
if (state.type !== "teleport") return null;
|
|
39
41
|
var {
|
|
40
42
|
Portal
|
|
@@ -46,9 +48,9 @@ function NativePortal(param) {
|
|
|
46
48
|
}
|
|
47
49
|
function NativePortalHost(param) {
|
|
48
50
|
var {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
name
|
|
52
|
+
} = param;
|
|
53
|
+
var state = (0, import_portalState.getPortal)().state;
|
|
52
54
|
if (state.type !== "teleport") return null;
|
|
53
55
|
var {
|
|
54
56
|
PortalHost
|
|
@@ -59,9 +61,9 @@ function NativePortalHost(param) {
|
|
|
59
61
|
}
|
|
60
62
|
function NativePortalProvider(param) {
|
|
61
63
|
var {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
children
|
|
65
|
+
} = param;
|
|
66
|
+
var state = (0, import_portalState.getPortal)().state;
|
|
65
67
|
if (state.type !== "teleport") return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
66
68
|
children
|
|
67
69
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","components_exports","__export","NativePortal","NativePortalHost","NativePortalProvider","module","exports","import_jsx_runtime","require","import_portalState","param","hostName","children","state","getPortal","type","Portal","globalThis","__tamagui_teleport","jsx","name","PortalHost"],"sources":["../../src/components.tsx"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","components_exports","__export","NativePortal","NativePortalHost","NativePortalProvider","module","exports","import_jsx_runtime","require","import_portalState","param","hostName","children","state","getPortal","type","Portal","globalThis","__tamagui_teleport","jsx","name","PortalHost"],"sources":["../../src/components.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,kBAAA;AAAAC,QAAA,CAAAD,kBAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,oBAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAX,YAA0B,CAAAK,kBAAA;AAqBjB,IAAAO,kBAAA,GAAAC,OAAA;AARF,IAAAC,kBAAsB,GAAAD,OAAA;AAAA,SAC3BN,YAAWA,CAAAQ,KAAA;EACX;IAAAC,QAAA;IAAAC;EAAA,IAAAF,KAAA;EACF,IAAiCG,KAAA,OAAAJ,kBAAA,CAAAK,SAAA,IAAAD,KAAA;EAC/B,IAAAA,KAAM,CAAAE,IAAA,KAAQ;EACd,IAAI;IAAAC;EAAM,IAAAC,UAAS,CAAAC,kBAAmB;EAEtC,OAAM,eAAc,IAAAX,kBAAmB,CAAAY,GAAA,EAAAH,MAAA;IACvCL,QAAO;IACTC;EAMO;AACL;AACA,SAAIT,gBAAeA,CAAAO,KAAA,EAAY;EAE/B;IAAMU;EAAE,IAAAV,KAAW;EACnB,IAAAG,KAAO,OAAAJ,kBAAA,CAAAK,SAAA,IAAAD,KAAC;EACV,IAAAA,KAAA,CAAAE,IAAA;EAMO;IAAAM;EAAS,IAAAJ,UAAuB,CAAAC,kBAAkD;EACvF,OAAM,eAAQ,IAAAX,kBAAA,CAAAY,GAAU,EAAEE,UAAA;IAC1BD;EAEA;AACA;AACF,SAAAhB,qBAAAM,KAAA","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
|
-
|
|
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, {
|
|
@@ -24,8 +26,8 @@ __export(gestureState_exports, {
|
|
|
24
26
|
});
|
|
25
27
|
module.exports = __toCommonJS(gestureState_exports);
|
|
26
28
|
var import_globalState = require("./globalState.cjs");
|
|
27
|
-
const state = (0, import_globalState.createGlobalState)(
|
|
28
|
-
enabled:
|
|
29
|
+
const state = (0, import_globalState.createGlobalState)(`gesture`, {
|
|
30
|
+
enabled: false,
|
|
29
31
|
Gesture: null,
|
|
30
32
|
GestureDetector: null,
|
|
31
33
|
ScrollView: null
|
|
@@ -42,24 +44,26 @@ function getGestureHandler() {
|
|
|
42
44
|
Object.assign(state.get(), updates);
|
|
43
45
|
},
|
|
44
46
|
disable() {
|
|
45
|
-
state.get().enabled =
|
|
47
|
+
state.get().enabled = false;
|
|
46
48
|
},
|
|
47
49
|
createPressGesture(config) {
|
|
48
50
|
const {
|
|
49
51
|
Gesture
|
|
50
52
|
} = state.get();
|
|
51
53
|
if (!Gesture) return null;
|
|
52
|
-
const longPressDuration = config.delayLongPress ?? 500
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if (config.hitSlop
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
const longPressDuration = config.delayLongPress ?? 500;
|
|
55
|
+
const tap = Gesture.Tap().runOnJS(true).maxDuration(1e4).onBegin(e => {
|
|
56
|
+
config.onPressIn?.(e);
|
|
57
|
+
}).onEnd(e => {
|
|
58
|
+
config.onPress?.(e);
|
|
59
|
+
}).onFinalize(e => {
|
|
60
|
+
config.onPressOut?.(e);
|
|
61
|
+
});
|
|
62
|
+
if (config.hitSlop) tap.hitSlop(config.hitSlop);
|
|
63
|
+
if (!config.onLongPress) return tap;
|
|
64
|
+
const longPress = Gesture.LongPress().runOnJS(true).minDuration(longPressDuration).onBegin(e => config.onPressIn?.(e)).onStart(e => config.onLongPress?.(e)).onFinalize(e => config.onPressOut?.(e));
|
|
65
|
+
if (config.hitSlop) longPress.hitSlop(config.hitSlop);
|
|
66
|
+
return Gesture.Exclusive(longPress, tap);
|
|
63
67
|
}
|
|
64
68
|
};
|
|
65
69
|
}
|
|
@@ -5,33 +5,35 @@ 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
|
getGestureHandler: () => getGestureHandler
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(gestureState_exports);
|
|
28
|
-
var import_globalState = require("./globalState.native.js")
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
var import_globalState = require("./globalState.native.js");
|
|
31
|
+
var state = (0, import_globalState.createGlobalState)(`gesture`, {
|
|
32
|
+
enabled: false,
|
|
33
|
+
Gesture: null,
|
|
34
|
+
GestureDetector: null,
|
|
35
|
+
ScrollView: null
|
|
36
|
+
});
|
|
35
37
|
function getGestureHandler() {
|
|
36
38
|
return {
|
|
37
39
|
get isEnabled() {
|
|
@@ -44,27 +46,28 @@ function getGestureHandler() {
|
|
|
44
46
|
Object.assign(state.get(), updates);
|
|
45
47
|
},
|
|
46
48
|
disable() {
|
|
47
|
-
state.get().enabled =
|
|
49
|
+
state.get().enabled = false;
|
|
48
50
|
},
|
|
49
51
|
createPressGesture(config) {
|
|
50
52
|
var {
|
|
51
53
|
Gesture
|
|
52
54
|
} = state.get();
|
|
53
55
|
if (!Gesture) return null;
|
|
54
|
-
var _config_delayLongPress
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (config.hitSlop
|
|
67
|
-
|
|
56
|
+
var _config_delayLongPress;
|
|
57
|
+
var longPressDuration = (_config_delayLongPress = config.delayLongPress) !== null && _config_delayLongPress !== void 0 ? _config_delayLongPress : 500;
|
|
58
|
+
var tap = Gesture.Tap().runOnJS(true).maxDuration(1e4).onBegin(function (e) {
|
|
59
|
+
var _config_onPressIn;
|
|
60
|
+
(_config_onPressIn = config.onPressIn) === null || _config_onPressIn === void 0 ? void 0 : _config_onPressIn.call(config, e);
|
|
61
|
+
}).onEnd(function (e) {
|
|
62
|
+
var _config_onPress;
|
|
63
|
+
(_config_onPress = config.onPress) === null || _config_onPress === void 0 ? void 0 : _config_onPress.call(config, e);
|
|
64
|
+
}).onFinalize(function (e) {
|
|
65
|
+
var _config_onPressOut;
|
|
66
|
+
(_config_onPressOut = config.onPressOut) === null || _config_onPressOut === void 0 ? void 0 : _config_onPressOut.call(config, e);
|
|
67
|
+
});
|
|
68
|
+
if (config.hitSlop) tap.hitSlop(config.hitSlop);
|
|
69
|
+
if (!config.onLongPress) return tap;
|
|
70
|
+
var longPress = Gesture.LongPress().runOnJS(true).minDuration(longPressDuration).onBegin(function (e) {
|
|
68
71
|
var _config_onPressIn;
|
|
69
72
|
return (_config_onPressIn = config.onPressIn) === null || _config_onPressIn === void 0 ? void 0 : _config_onPressIn.call(config, e);
|
|
70
73
|
}).onStart(function (e) {
|
|
@@ -74,7 +77,8 @@ function getGestureHandler() {
|
|
|
74
77
|
var _config_onPressOut;
|
|
75
78
|
return (_config_onPressOut = config.onPressOut) === null || _config_onPressOut === void 0 ? void 0 : _config_onPressOut.call(config, e);
|
|
76
79
|
});
|
|
77
|
-
|
|
80
|
+
if (config.hitSlop) longPress.hitSlop(config.hitSlop);
|
|
81
|
+
return Gesture.Exclusive(longPress, tap);
|
|
78
82
|
}
|
|
79
83
|
};
|
|
80
84
|
}
|
|
@@ -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","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;AAA2C,IACvDC,KAAA,GAAS,IAAAF,kBAAA,CAAAG,iBAAA;EACTC,OAAA,EAAS;EACTC,OAAA;EACAC,eAAY;EACbC,UAAA;AA0BM;AACL,SAAOV,kBAAA;EAAA,OACD;IACF,IAAAW,SAAOA,CAAA,EAAM;MACf,OAAAN,KAAA,CAAAO,GAAA,GAAAL,OAAA;IACA;IACE,IAAAF,KAAOA,CAAA;MACT,OAAAA,KAAA,CAAAO,GAAA;IACA;IACEC,IAAAC,OAAO;MACTC,MAAA,CAAAC,MAAA,CAAAX,KAAA,CAAAO,GAAA,IAAAE,OAAA;IAEA;IACEG,QAAA,EAAM;MACRZ,KAAA,CAAAO,GAAA,GAAAL,OAAA;IAEA;IACEW,kBAAgBA,CAAAC,MAAI;MACpB,IAAI;QAACX;MAAS,IAAAH,KAAO,CAAAO,GAAA;MAErB,KAAAJ,OAAM;MAIN,IAAAY,sBACG;MAGC,IAAAC,iBAAmB,GAAC,CAAAD,sBAAA,GAAAD,MAAA,CAAAG,cAAA,cAAAF,sBAAA,cAAAA,sBAAA;MACtB,IACCG,GAAA,GAAOf,OAAW,CAAAgB,GAAA,GAAAC,OAAA,OAAAC,WAAA,MAAAC,OAAA,WAAAC,CAAA;QACjB,IAAAC,iBAAkB;QACnB,CACAA,iBAAY,GAAWV,MAAA,CAAAW,SAAA,cAAAD,iBAAA,uBAAAA,iBAAA,CAAAE,IAAA,CAAAZ,MAAA,EAAAS,CAAA;MACtB,GAAAI,KAAA,CAAO,UAAAJ,CAAA;QACR,IAAAK,eAAA;QAEH,CAAAA,eAAW,GAASd,MAAI,CAAAe,OAAQ,MAAO,QAAOD,eAAA,uBAAAA,eAAA,CAAAF,IAAA,CAAAZ,MAAA,EAAAS,CAAA;MAG9C,GAAAO,UAAY,WAAAP,CAAa;QAGzB,IAAMQ,kBAAY;QAOlB,CAAAA,kBAAoB,GAAAjB,MAAU,CAAAkB,UAAQ,MAAO,QAAOD,kBAAA,uBAAAA,kBAAA,CAAAL,IAAA,CAAAZ,MAAA,EAAAS,CAAA;MAGpD;MACF,IAAAT,MAAA,CAAAmB,OAAA,EAAAf,GAAA,CAAAe,OAAA,CAAAnB,MAAA,CAAAmB,OAAA;MACF,KAAAnB,MAAA,CAAAoB,WAAA,SAAAhB,GAAA;MACF,IAAAiB,SAAA,GAAAhC,OAAA,CAAAiC,SAAA,GAAAhB,OAAA,OAAAiB,WAAA,CAAArB,iBAAA,EAAAM,OAAA,WAAAC,CAAA","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 = `__tamagui_${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 = `__tamagui_${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,GAAA,EAAAC,YAAgB;EAMnC,IAAAC,UAAS,gBAAoBF,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":[]}
|