@tamagui/portal 2.0.0-rc.9 → 2.1.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 (104) hide show
  1. package/dist/cjs/GorhomPortal.cjs +177 -178
  2. package/dist/cjs/GorhomPortal.native.js +206 -203
  3. package/dist/cjs/GorhomPortal.native.js.map +1 -1
  4. package/dist/cjs/GorhomPortalItem.cjs +48 -27
  5. package/dist/cjs/GorhomPortalItem.native.js +100 -75
  6. package/dist/cjs/GorhomPortalItem.native.js.map +1 -1
  7. package/dist/cjs/Portal.cjs +54 -46
  8. package/dist/cjs/Portal.native.js +43 -38
  9. package/dist/cjs/Portal.native.js.map +1 -1
  10. package/dist/cjs/PortalProps.cjs +7 -5
  11. package/dist/cjs/PortalProps.native.js +7 -5
  12. package/dist/cjs/PortalProps.native.js.map +1 -1
  13. package/dist/cjs/constants.cjs +24 -18
  14. package/dist/cjs/constants.native.js +25 -21
  15. package/dist/cjs/constants.native.js.map +1 -1
  16. package/dist/cjs/helpers.cjs +19 -13
  17. package/dist/cjs/helpers.native.js +21 -19
  18. package/dist/cjs/helpers.native.js.map +1 -1
  19. package/dist/cjs/index.cjs +13 -11
  20. package/dist/cjs/index.native.js +13 -11
  21. package/dist/cjs/index.native.js.map +1 -1
  22. package/dist/cjs/native-portal.cjs +31 -30
  23. package/dist/cjs/native-portal.native.js +36 -35
  24. package/dist/cjs/native-portal.native.js.map +1 -1
  25. package/dist/cjs/types.cjs +7 -5
  26. package/dist/cjs/types.native.js +7 -5
  27. package/dist/cjs/types.native.js.map +1 -1
  28. package/dist/esm/GorhomPortal.mjs +148 -151
  29. package/dist/esm/GorhomPortal.mjs.map +1 -1
  30. package/dist/esm/GorhomPortal.native.js +176 -175
  31. package/dist/esm/GorhomPortal.native.js.map +1 -1
  32. package/dist/esm/GorhomPortalItem.mjs +31 -12
  33. package/dist/esm/GorhomPortalItem.mjs.map +1 -1
  34. package/dist/esm/GorhomPortalItem.native.js +81 -58
  35. package/dist/esm/GorhomPortalItem.native.js.map +1 -1
  36. package/dist/esm/Portal.mjs +24 -19
  37. package/dist/esm/Portal.mjs.map +1 -1
  38. package/dist/esm/Portal.native.js +22 -19
  39. package/dist/esm/Portal.native.js.map +1 -1
  40. package/dist/esm/constants.mjs +10 -6
  41. package/dist/esm/constants.mjs.map +1 -1
  42. package/dist/esm/constants.native.js +10 -8
  43. package/dist/esm/constants.native.js.map +1 -1
  44. package/dist/esm/helpers.mjs +7 -3
  45. package/dist/esm/helpers.mjs.map +1 -1
  46. package/dist/esm/helpers.native.js +7 -7
  47. package/dist/esm/helpers.native.js.map +1 -1
  48. package/dist/esm/index.js +7 -10
  49. package/dist/esm/index.js.map +1 -6
  50. package/dist/esm/native-portal.mjs +19 -20
  51. package/dist/esm/native-portal.mjs.map +1 -1
  52. package/dist/esm/native-portal.native.js +24 -25
  53. package/dist/esm/native-portal.native.js.map +1 -1
  54. package/package.json +13 -13
  55. package/src/GorhomPortal.tsx +30 -15
  56. package/src/GorhomPortalItem.tsx +7 -2
  57. package/src/Portal.tsx +15 -20
  58. package/src/PortalProps.tsx +10 -2
  59. package/types/GorhomPortal.d.ts.map +1 -1
  60. package/types/GorhomPortalItem.d.ts +1 -1
  61. package/types/GorhomPortalItem.d.ts.map +1 -1
  62. package/types/Portal.d.ts +1 -1
  63. package/types/Portal.d.ts.map +1 -1
  64. package/types/PortalProps.d.ts +9 -2
  65. package/types/PortalProps.d.ts.map +1 -1
  66. package/dist/cjs/GorhomPortal.js +0 -159
  67. package/dist/cjs/GorhomPortal.js.map +0 -6
  68. package/dist/cjs/GorhomPortalItem.js +0 -41
  69. package/dist/cjs/GorhomPortalItem.js.map +0 -6
  70. package/dist/cjs/Portal.js +0 -59
  71. package/dist/cjs/Portal.js.map +0 -6
  72. package/dist/cjs/PortalProps.js +0 -14
  73. package/dist/cjs/PortalProps.js.map +0 -6
  74. package/dist/cjs/constants.js +0 -28
  75. package/dist/cjs/constants.js.map +0 -6
  76. package/dist/cjs/helpers.js +0 -26
  77. package/dist/cjs/helpers.js.map +0 -6
  78. package/dist/cjs/index.js +0 -27
  79. package/dist/cjs/index.js.map +0 -6
  80. package/dist/cjs/native-portal.js +0 -40
  81. package/dist/cjs/native-portal.js.map +0 -6
  82. package/dist/cjs/setup-native.js +0 -29
  83. package/dist/cjs/setup-native.js.map +0 -1
  84. package/dist/cjs/types.js +0 -14
  85. package/dist/cjs/types.js.map +0 -6
  86. package/dist/esm/GorhomPortal.js +0 -148
  87. package/dist/esm/GorhomPortal.js.map +0 -6
  88. package/dist/esm/GorhomPortalItem.js +0 -30
  89. package/dist/esm/GorhomPortalItem.js.map +0 -6
  90. package/dist/esm/Portal.js +0 -42
  91. package/dist/esm/Portal.js.map +0 -6
  92. package/dist/esm/PortalProps.js +0 -1
  93. package/dist/esm/PortalProps.js.map +0 -6
  94. package/dist/esm/constants.js +0 -13
  95. package/dist/esm/constants.js.map +0 -6
  96. package/dist/esm/helpers.js +0 -10
  97. package/dist/esm/helpers.js.map +0 -6
  98. package/dist/esm/native-portal.js +0 -24
  99. package/dist/esm/native-portal.js.map +0 -6
  100. package/dist/esm/setup-native.js +0 -3
  101. package/dist/esm/setup-native.js.map +0 -1
  102. package/dist/esm/types.js +0 -1
  103. package/dist/esm/types.js.map +0 -6
  104. package/types/setup-native.d.ts.map +0 -1
@@ -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 helpers_exports = {};
22
24
  __export(helpers_exports, {
@@ -25,8 +27,12 @@ __export(helpers_exports, {
25
27
  });
26
28
  module.exports = __toCommonJS(helpers_exports);
27
29
  var import_web = require("@tamagui/web");
28
- const getStackedZIndexProps = propsIn => ({
30
+ const getStackedZIndexProps = propsIn => {
31
+ return {
29
32
  stackZIndex: propsIn.stackZIndex,
30
33
  zIndex: resolveViewZIndex(propsIn.zIndex)
31
- }),
32
- resolveViewZIndex = zIndex => typeof zIndex > "u" ? void 0 : typeof zIndex == "number" ? zIndex : (0, import_web.getTokenValue)(zIndex, "zIndex");
34
+ };
35
+ };
36
+ const resolveViewZIndex = zIndex => {
37
+ return typeof zIndex === "undefined" ? void 0 : typeof zIndex === "number" ? zIndex : (0, import_web.getTokenValue)(zIndex, "zIndex");
38
+ };
@@ -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 helpers_exports = {};
24
26
  __export(helpers_exports, {
@@ -26,14 +28,14 @@ __export(helpers_exports, {
26
28
  resolveViewZIndex: () => resolveViewZIndex
27
29
  });
28
30
  module.exports = __toCommonJS(helpers_exports);
29
- var import_web = require("@tamagui/web"),
30
- getStackedZIndexProps = function (propsIn) {
31
- return {
32
- stackZIndex: propsIn.stackZIndex,
33
- zIndex: resolveViewZIndex(propsIn.zIndex)
34
- };
35
- },
36
- resolveViewZIndex = function (zIndex) {
37
- return typeof zIndex > "u" ? void 0 : typeof zIndex == "number" ? zIndex : (0, import_web.getTokenValue)(zIndex, "zIndex");
31
+ var import_web = require("@tamagui/web");
32
+ var getStackedZIndexProps = function (propsIn) {
33
+ return {
34
+ stackZIndex: propsIn.stackZIndex,
35
+ zIndex: resolveViewZIndex(propsIn.zIndex)
38
36
  };
37
+ };
38
+ var resolveViewZIndex = function (zIndex) {
39
+ return typeof zIndex === "undefined" ? void 0 : typeof zIndex === "number" ? zIndex : (0, import_web.getTokenValue)(zIndex, "zIndex");
40
+ };
39
41
  //# sourceMappingURL=helpers.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","helpers_exports","__export","getStackedZIndexProps","resolveViewZIndex","module","exports","import_web","require","propsIn","stackZIndex","zIndex"],"sources":["../../src/helpers.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,qBAAA,EAAAA,CAAA,KAAAA,qBAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAA8CV,YAAA,CAAAK,eAAA;AAGvC,IAAAM,UAAM,GAAAC,OAAA,eAAyB;EAAAL,qBAC7B,YAAAA,CAAAM,OAAA;IACL;MACAC,WAAQ,EAAAD,OAAA,CAAAC,WAA0B;MAIzBC,MAAA,EAAAP,iBAAqB,CAAAK,OACzB,CAAAE,MAAO","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","helpers_exports","__export","getStackedZIndexProps","resolveViewZIndex","module","exports","import_web","require","propsIn","stackZIndex","zIndex","getTokenValue"],"sources":["../../src/helpers.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,qBAAA,EAAAA,CAAA,KAAAA,qBAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAA8CV,YAAA,CAAAK,eAAA;AAGvC,IAAAM,UAAM,GAAAC,OAAA,eAAyB;AACpC,IAAAL,qBAAO,YAAAA,CAAAM,OAAA;EAAA,OACL;IACAC,WAAQ,EAAAD,OAAA,CAAAC,WAAkB;IAC5BC,MAAA,EAAAP,iBAAA,CAAAK,OAAA,CAAAE,MAAA;EACF;AAEO;AACL,IAAAP,iBAAc,YAAAA,CAAWO,MAAA,EACrB;EAIN,cAAAA,MAAA,mCAAAA,MAAA,gBAAAA,MAAA,OAAAJ,UAAA,CAAAK,aAAA,EAAAD,MAAA","ignoreList":[]}
@@ -3,21 +3,23 @@ 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
- },
18
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
+ }
18
+ return to;
19
+ };
20
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
19
21
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
20
- value: !0
22
+ value: true
21
23
  }), mod);
22
24
  var index_exports = {};
23
25
  __export(index_exports, {
@@ -5,21 +5,23 @@ 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
- },
20
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
19
+ }
20
+ return to;
21
+ };
22
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
23
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
22
- value: !0
24
+ value: true
23
25
  }), mod);
24
26
  var index_exports = {};
25
27
  __export(index_exports, {
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","PortalItem","import_GorhomPortalItem","GorhomPortalItem","resolveViewZIndex","import_helpers","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,UAAA,EAAAA,CAAA,KAAAC,uBAAA,CAAAC,gBAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAC,cAAA,CAAAD;AAAA;AAAAE,MAAA,CAAAC,OAAA,GAAAb,YAAc,CAAAK,aAAA;AACdS,UAAA,CAAAT,aAAA,EAAcU,OAAA,wBAAAH,MADd,CAAAC,OAAA;AAEAC,UAAA,CAAAT,aAAA,EAAcU,OAAA,6BAAAH,MAFd,CAAAC,OAAA;AAGAC,UAAA,CAAAT,aAAA,EAAAU,OAA+C,8BAAAH,MAAA,CAAAC,OAAA;AAC/C,IAAAL,uBAAc,GAAAO,OAAA,+BAJd;AAKAD,UAAA,CAAAT,aAAkC,EAAAU,OAAA,2BAAAH,MAAA,CAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","PortalItem","import_GorhomPortalItem","GorhomPortalItem","resolveViewZIndex","import_helpers","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,UAAA,EAAAA,CAAA,KAAAC,uBAAA,CAAAC,gBAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAC,cAAA,CAAAD;AAAA;AAAAE,MAAA,CAAAC,OAAA,GAAAb,YAAc,CAAAK,aAAA;AACdS,UAAA,CAAAT,aAAA,EAAcU,OAAA,wBAAAH,MADd,CAAAC,OAAA;AAEAC,UAAA,CAAAT,aAAA,EAAcU,OAAA,6BAAAH,MAFd,CAAAC,OAAA;AAGAC,UAAA,CAAAT,aAAA,EAAAU,OAA+C,8BAAAH,MAAA,CAAAC,OAAA;AAC/C,IAAAL,uBAAc,GAAAO,OAAA,+BAJd;AAKAD,UAAA,CAAAT,aAAkC,EAAAU,OAAA,2BAAAH,MAAA,CAAAC,OAAA","ignoreList":[]}
@@ -3,44 +3,45 @@ 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 native_portal_exports = {};
22
24
  __export(native_portal_exports, {
23
25
  setupNativePortal: () => setupNativePortal
24
26
  });
25
27
  module.exports = __toCommonJS(native_portal_exports);
26
- const IS_FABRIC = typeof global < "u" && !!(global._IS_FABRIC ?? global.nativeFabricUIManager),
27
- setupNativePortal = () => {
28
- const g = globalThis;
29
- if (!g.__tamagui_portal_create) {
30
- if (IS_FABRIC) {
31
- try {
32
- const mod = require("react-native/Libraries/Renderer/shims/ReactFabric");
33
- g.__tamagui_portal_create = mod?.default?.createPortal ?? mod.createPortal;
34
- } catch (err) {
35
- console.info("Note: error importing fabric portal, native portals disabled", err);
36
- }
37
- return;
38
- }
39
- try {
40
- const mod = require("react-native/Libraries/Renderer/shims/ReactNative");
41
- g.__tamagui_portal_create = mod?.default?.createPortal ?? mod.createPortal;
42
- } catch (err) {
43
- console.info("Note: error importing native portal, native portals disabled", err);
44
- }
28
+ const IS_FABRIC = typeof global !== "undefined" && Boolean(global._IS_FABRIC ?? global.nativeFabricUIManager);
29
+ const setupNativePortal = () => {
30
+ const g = globalThis;
31
+ if (g.__tamagui_portal_create) return;
32
+ if (IS_FABRIC) {
33
+ try {
34
+ const mod = require("react-native/Libraries/Renderer/shims/ReactFabric");
35
+ g.__tamagui_portal_create = mod?.default?.createPortal ?? mod.createPortal;
36
+ } catch (err) {
37
+ console.info(`Note: error importing fabric portal, native portals disabled`, err);
45
38
  }
46
- };
39
+ return;
40
+ }
41
+ try {
42
+ const mod = require("react-native/Libraries/Renderer/shims/ReactNative");
43
+ g.__tamagui_portal_create = mod?.default?.createPortal ?? mod.createPortal;
44
+ } catch (err) {
45
+ console.info(`Note: error importing native portal, native portals disabled`, err);
46
+ }
47
+ };
@@ -5,50 +5,51 @@ 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 native_portal_exports = {};
24
26
  __export(native_portal_exports, {
25
27
  setupNativePortal: () => setupNativePortal
26
28
  });
27
29
  module.exports = __toCommonJS(native_portal_exports);
28
- var _global__IS_FABRIC,
29
- IS_FABRIC = typeof global < "u" && !!((_global__IS_FABRIC = global._IS_FABRIC) !== null && _global__IS_FABRIC !== void 0 ? _global__IS_FABRIC : global.nativeFabricUIManager),
30
- setupNativePortal = function () {
31
- var g = globalThis;
32
- if (!g.__tamagui_portal_create) {
33
- if (IS_FABRIC) {
34
- try {
35
- var _mod_default,
36
- mod = require("react-native/Libraries/Renderer/shims/ReactFabric"),
37
- _mod_default_createPortal;
38
- g.__tamagui_portal_create = (_mod_default_createPortal = mod == null || (_mod_default = mod.default) === null || _mod_default === void 0 ? void 0 : _mod_default.createPortal) !== null && _mod_default_createPortal !== void 0 ? _mod_default_createPortal : mod.createPortal;
39
- } catch (err) {
40
- console.info("Note: error importing fabric portal, native portals disabled", err);
41
- }
42
- return;
43
- }
44
- try {
45
- var _mod_default1,
46
- mod1 = require("react-native/Libraries/Renderer/shims/ReactNative"),
47
- _mod_default_createPortal1;
48
- g.__tamagui_portal_create = (_mod_default_createPortal1 = mod1 == null || (_mod_default1 = mod1.default) === null || _mod_default1 === void 0 ? void 0 : _mod_default1.createPortal) !== null && _mod_default_createPortal1 !== void 0 ? _mod_default_createPortal1 : mod1.createPortal;
49
- } catch (err) {
50
- console.info("Note: error importing native portal, native portals disabled", err);
51
- }
30
+ var _global__IS_FABRIC;
31
+ var IS_FABRIC = typeof global !== "undefined" && Boolean((_global__IS_FABRIC = global._IS_FABRIC) !== null && _global__IS_FABRIC !== void 0 ? _global__IS_FABRIC : global.nativeFabricUIManager);
32
+ var setupNativePortal = function () {
33
+ var g = globalThis;
34
+ if (g.__tamagui_portal_create) return;
35
+ if (IS_FABRIC) {
36
+ try {
37
+ var _mod_default;
38
+ var mod = require("react-native/Libraries/Renderer/shims/ReactFabric");
39
+ var _mod_default_createPortal;
40
+ g.__tamagui_portal_create = (_mod_default_createPortal = mod === null || mod === void 0 ? void 0 : (_mod_default = mod.default) === null || _mod_default === void 0 ? void 0 : _mod_default.createPortal) !== null && _mod_default_createPortal !== void 0 ? _mod_default_createPortal : mod.createPortal;
41
+ } catch (err) {
42
+ console.info(`Note: error importing fabric portal, native portals disabled`, err);
52
43
  }
53
- };
44
+ return;
45
+ }
46
+ try {
47
+ var _mod_default1;
48
+ var mod1 = require("react-native/Libraries/Renderer/shims/ReactNative");
49
+ var _mod_default_createPortal1;
50
+ g.__tamagui_portal_create = (_mod_default_createPortal1 = mod1 === null || mod1 === void 0 ? void 0 : (_mod_default1 = mod1.default) === null || _mod_default1 === void 0 ? void 0 : _mod_default1.createPortal) !== null && _mod_default_createPortal1 !== void 0 ? _mod_default_createPortal1 : mod1.createPortal;
51
+ } catch (err) {
52
+ console.info(`Note: error importing native portal, native portals disabled`, err);
53
+ }
54
+ };
54
55
  //# sourceMappingURL=native-portal.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","native_portal_exports","__export","setupNativePortal","module","exports","_global__IS_FABRIC","IS_FABRIC","global","_IS_FABRIC","nativeFabricUIManager","g","globalThis","__tamagui_portal_create","_mod_default","require","_mod_default_createPortal","default","createPortal","err","console","info","_mod_default1","mod1","_mod_default_createPortal1"],"sources":["../../src/native-portal.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,qBAAA;AAAAC,QAAA,CAAAD,qBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA;AAAA;AAIAC,MAAM,CAAAC,OAAA,GAAAT,YACG,CAAAK,qBACiB;AAUxB,IAAAK,kBAAU;EAAAC,SAAA,UAAAC,MAAA,cAAAF,kBAAA,GAAAE,MAAA,CAAAC,UAAA,cAAAH,kBAAA,cAAAA,kBAAA,GAAAE,MAAA,CAAAE,qBAAA;EAAAP,iBAAA,YAAAA,CAAA;IACV,IAAIQ,CAAA,GAAEC,UAAA;IAEN,KAAAD,CAAI,CAAAE,uBAAW;MACb,IAAAN,SAAI;QACF;UACA,IAAEO,YAAA;YAAAjB,GAAA,GAAAkB,OAA0B,oDAAkC;YAAAC,yBAAA;UAChEL,CAAA,CAAAE,uBAAc,IAAAG,yBAAA,GAAAnB,GAAA,aAAAiB,YAAA,GAAAjB,GAAA,CAAAoB,OAAA,cAAAH,YAAA,uBAAAA,YAAA,CAAAI,YAAA,cAAAF,yBAAA,cAAAA,yBAAA,GAAAnB,GAAA,CAAAqB,YAAA;QACZ,SAAAC,GAAQ;UACVC,OAAA,CAAAC,IAAA,iEAAAF,GAAA;QACA;QACF;MAEA;MACE;QACA,IAAEG,aAAA;UAAAC,IAAA,GAAAR,OAA+B,oDAA6B;UAAAS,0BAAA;QAChEb,CAAA,CAAAE,uBAAc,IAAAW,0BAAA,GAAAD,IAAA,aAAAD,aAAA,GAAAC,IAAA,CAAAN,OAAA,cAAAK,aAAA,uBAAAA,aAAA,CAAAJ,YAAA,cAAAM,0BAAA,cAAAA,0BAAA,GAAAD,IAAA,CAAAL,YAAA;MACZ,SAAAC,GAAQ;QACVC,OAAA,CAAAC,IAAA,iEAAAF,GAAA;MAAA;IACF","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","native_portal_exports","__export","setupNativePortal","module","exports","_global__IS_FABRIC","IS_FABRIC","global","Boolean","_IS_FABRIC","nativeFabricUIManager","g","globalThis","__tamagui_portal_create","_mod_default","require","_mod_default_createPortal","default","createPortal","err","console","info","_mod_default1","mod1"],"sources":["../../src/native-portal.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,qBAAA;AAAAC,QAAA,CAAAD,qBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA;AAAA;AAIAC,MAAM,CAAAC,OAAA,GAAAT,YACG,CAAAK,qBACP;AASK,IAAAK,kBAAM;AACX,IAAAC,SAAU,UAAAC,MAAA,oBAAAC,OAAA,EAAAH,kBAAA,GAAAE,MAAA,CAAAE,UAAA,cAAAJ,kBAAA,cAAAA,kBAAA,GAAAE,MAAA,CAAAG,qBAAA;AACV,IAAAR,iBAAM,YAAAA,CAAA,EAAyB;EAE/B,IAAIS,CAAA,GAAAC,UAAW;EACb,IAAAD,CAAA,CAAIE,uBAAA;EACF,IAAAP,SAAM;IACN,IAAE;MACJ,IAAAQ,YAAc;MACZ,IAAAlB,GAAA,GAAQmB,OAAK;MACf,IAAAC,yBAAA;MACAL,CAAA,CAAAE,uBAAA,IAAAG,yBAAA,GAAApB,GAAA,aAAAA,GAAA,wBAAAkB,YAAA,GAAAlB,GAAA,CAAAqB,OAAA,cAAAH,YAAA,uBAAAA,YAAA,CAAAI,YAAA,cAAAF,yBAAA,cAAAA,yBAAA,GAAApB,GAAA,CAAAsB,YAAA;IACF,SAAAC,GAAA;MAEIC,OAAA,CAAAC,IAAA,iEAAAF,GAAA;IACF;IACA;EACF;EACE;IACF,IAAAG,aAAA;IACF,IAAAC,IAAA,GAAAR,OAAA","ignoreList":[]}
@@ -3,14 +3,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
7
- get: () => from[key],
8
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
- });
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
8
+ get: () => from[key],
9
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
10
+ });
11
+ }
10
12
  return to;
11
13
  };
12
14
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
13
- value: !0
15
+ value: true
14
16
  }), mod);
15
17
  var types_exports = {};
16
18
  module.exports = __toCommonJS(types_exports);
@@ -5,14 +5,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
- get: () => from[key],
10
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
- });
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
+ get: () => from[key],
11
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
+ });
13
+ }
12
14
  return to;
13
15
  };
14
16
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
15
- value: !0
17
+ value: true
16
18
  }), mod);
17
19
  var types_exports = {};
18
20
  module.exports = __toCommonJS(types_exports);
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","types_exports"],"sources":["../../src/types.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","types_exports"],"sources":["../../src/types.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA","ignoreList":[]}