@tamagui/portal 1.0.1-beta.70 → 1.0.1-beta.73
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/Portal.js +2 -3
- package/dist/cjs/Portal.js.map +1 -1
- package/dist/esm/Portal.js +2 -4
- package/dist/esm/Portal.js.map +1 -1
- package/dist/jsx/Portal.js +2 -4
- package/package.json +3 -4
- package/types/Portal.d.ts +0 -0
- package/types/Portal.d.ts.map +0 -0
- package/types/index.d.ts +0 -0
- package/types/index.d.ts.map +0 -0
package/dist/cjs/Portal.js
CHANGED
|
@@ -18,7 +18,6 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
}
|
|
19
19
|
return a;
|
|
20
20
|
};
|
|
21
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
22
21
|
var __export = (target, all) => {
|
|
23
22
|
for (var name in all)
|
|
24
23
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -44,7 +43,7 @@ var import_stacks = require("@tamagui/stacks");
|
|
|
44
43
|
var React = __toESM(require("react"));
|
|
45
44
|
var import_react_dom = require("react-dom");
|
|
46
45
|
var import_react_native = require("react-native");
|
|
47
|
-
const Portal =
|
|
46
|
+
const Portal = (props) => {
|
|
48
47
|
const contents = /* @__PURE__ */ React.createElement(import_stacks.YStack, __spreadValues({
|
|
49
48
|
pointerEvents: "none",
|
|
50
49
|
fullscreen: true
|
|
@@ -65,7 +64,7 @@ const Portal = /* @__PURE__ */ __name((props) => {
|
|
|
65
64
|
return (0, import_react_dom.createPortal)(contents, hostElement);
|
|
66
65
|
}
|
|
67
66
|
return null;
|
|
68
|
-
}
|
|
67
|
+
};
|
|
69
68
|
// Annotate the CommonJS export names for ESM import in node:
|
|
70
69
|
0 && (module.exports = {
|
|
71
70
|
Portal
|
package/dist/cjs/Portal.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Portal.tsx"],
|
|
4
4
|
"sourcesContent": ["import '@tamagui/polyfill-dev'\n\nimport { isWeb, useIsomorphicLayoutEffect } from '@tamagui/core'\nimport { YStack, YStackProps } from '@tamagui/stacks'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\nimport { Modal } from 'react-native'\n\nexport type PortalProps = YStackProps\n\nexport const Portal = (props: PortalProps) => {\n const contents = <YStack pointerEvents=\"none\" fullscreen {...props} />\n\n if (!isWeb) {\n // check if theme stays in context here\n return (\n <Modal visible transparent pointerEvents=\"none\">\n {contents}\n </Modal>\n )\n }\n\n const [hostElement, setHostElement] = React.useState<any>(null)\n\n useIsomorphicLayoutEffect(() => {\n setHostElement(globalThis.document?.body)\n }, [])\n\n if (hostElement) {\n return createPortal(contents, hostElement)\n }\n\n // ssr return null\n return null\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAO;AAEP,kBAAiD;AACjD,oBAAoC;AACpC,YAAuB;AACvB,uBAA6B;AAC7B,0BAAsB;AAIf,MAAM,SAAS,CAAC,UAAuB;AAC5C,QAAM,WAAW,oCAAC;AAAA,IAAO,eAAc;AAAA,IAAO,YAAU;AAAA,KAAK,MAAO;AAEpE,MAAI,CAAC,mBAAO;AAEV,WACE,oCAAC;AAAA,MAAM,SAAO;AAAA,MAAC,aAAW;AAAA,MAAC,eAAc;AAAA,OACtC,QACH;AAAA,EAEJ;AAEA,QAAM,CAAC,aAAa,kBAAkB,MAAM,SAAc,IAAI;AAE9D,6CAA0B,MAAM;AAxBlC;AAyBI,mBAAe,iBAAW,aAAX,mBAAqB,IAAI;AAAA,EAC1C,GAAG,CAAC,CAAC;AAEL,MAAI,aAAa;AACf,WAAO,mCAAa,UAAU,WAAW;AAAA,EAC3C;AAGA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/Portal.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import "@tamagui/polyfill-dev";
|
|
4
2
|
import { isWeb, useIsomorphicLayoutEffect } from "@tamagui/core";
|
|
5
3
|
import { YStack } from "@tamagui/stacks";
|
|
6
4
|
import * as React from "react";
|
|
7
5
|
import { createPortal } from "react-dom";
|
|
8
6
|
import { Modal } from "react-native";
|
|
9
|
-
const Portal =
|
|
7
|
+
const Portal = (props) => {
|
|
10
8
|
const contents = /* @__PURE__ */ React.createElement(YStack, {
|
|
11
9
|
pointerEvents: "none",
|
|
12
10
|
fullscreen: true,
|
|
@@ -28,7 +26,7 @@ const Portal = /* @__PURE__ */ __name((props) => {
|
|
|
28
26
|
return createPortal(contents, hostElement);
|
|
29
27
|
}
|
|
30
28
|
return null;
|
|
31
|
-
}
|
|
29
|
+
};
|
|
32
30
|
export {
|
|
33
31
|
Portal
|
|
34
32
|
};
|
package/dist/esm/Portal.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Portal.tsx"],
|
|
4
4
|
"sourcesContent": ["import '@tamagui/polyfill-dev'\n\nimport { isWeb, useIsomorphicLayoutEffect } from '@tamagui/core'\nimport { YStack, YStackProps } from '@tamagui/stacks'\nimport * as React from 'react'\nimport { createPortal } from 'react-dom'\nimport { Modal } from 'react-native'\n\nexport type PortalProps = YStackProps\n\nexport const Portal = (props: PortalProps) => {\n const contents = <YStack pointerEvents=\"none\" fullscreen {...props} />\n\n if (!isWeb) {\n // check if theme stays in context here\n return (\n <Modal visible transparent pointerEvents=\"none\">\n {contents}\n </Modal>\n )\n }\n\n const [hostElement, setHostElement] = React.useState<any>(null)\n\n useIsomorphicLayoutEffect(() => {\n setHostElement(globalThis.document?.body)\n }, [])\n\n if (hostElement) {\n return createPortal(contents, hostElement)\n }\n\n // ssr return null\n return null\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA;AAEA;AACA;AACA;AACA;AACA;AAIO,MAAM,SAAS,CAAC,UAAuB;AAC5C,QAAM,WAAW,oCAAC;AAAA,IAAO,eAAc;AAAA,IAAO,YAAU;AAAA,IAAE,GAAG;AAAA,GAAO;AAEpE,MAAI,CAAC,OAAO;AAEV,WACE,oCAAC;AAAA,MAAM,SAAO;AAAA,MAAC,aAAW;AAAA,MAAC,eAAc;AAAA,OACtC,QACH;AAAA,EAEJ;AAEA,QAAM,CAAC,aAAa,kBAAkB,MAAM,SAAc,IAAI;AAE9D,4BAA0B,MAAM;AAxBlC;AAyBI,mBAAe,iBAAW,aAAX,mBAAqB,IAAI;AAAA,EAC1C,GAAG,CAAC,CAAC;AAEL,MAAI,aAAa;AACf,WAAO,aAAa,UAAU,WAAW;AAAA,EAC3C;AAGA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/Portal.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import "@tamagui/polyfill-dev";
|
|
4
2
|
import { isWeb, useIsomorphicLayoutEffect } from "@tamagui/core";
|
|
5
3
|
import { YStack } from "@tamagui/stacks";
|
|
6
4
|
import * as React from "react";
|
|
7
5
|
import { createPortal } from "react-dom";
|
|
8
6
|
import { Modal } from "react-native";
|
|
9
|
-
const Portal =
|
|
7
|
+
const Portal = (props) => {
|
|
10
8
|
const contents = <YStack pointerEvents="none" fullscreen {...props} />;
|
|
11
9
|
if (!isWeb) {
|
|
12
10
|
return <Modal visible transparent pointerEvents="none">{contents}</Modal>;
|
|
@@ -20,7 +18,7 @@ const Portal = /* @__PURE__ */ __name((props) => {
|
|
|
20
18
|
return createPortal(contents, hostElement);
|
|
21
19
|
}
|
|
22
20
|
return null;
|
|
23
|
-
}
|
|
21
|
+
};
|
|
24
22
|
export {
|
|
25
23
|
Portal
|
|
26
24
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/portal",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
4
|
-
"sideEffects": true,
|
|
3
|
+
"version": "1.0.1-beta.73",
|
|
5
4
|
"source": "src/index.ts",
|
|
6
5
|
"types": "./types/index.d.ts",
|
|
7
6
|
"main": "dist/cjs",
|
|
@@ -19,7 +18,7 @@
|
|
|
19
18
|
"clean:build": "tamagui-build clean:build"
|
|
20
19
|
},
|
|
21
20
|
"dependencies": {
|
|
22
|
-
"@tamagui/stacks": "^1.0.1-beta.
|
|
21
|
+
"@tamagui/stacks": "^1.0.1-beta.73"
|
|
23
22
|
},
|
|
24
23
|
"peerDependencies": {
|
|
25
24
|
"react": "*",
|
|
@@ -27,7 +26,7 @@
|
|
|
27
26
|
"react-native": "*"
|
|
28
27
|
},
|
|
29
28
|
"devDependencies": {
|
|
30
|
-
"@tamagui/build": "^1.0.1-beta.
|
|
29
|
+
"@tamagui/build": "^1.0.1-beta.73",
|
|
31
30
|
"@types/react-native": "^0.67.3",
|
|
32
31
|
"react": "*",
|
|
33
32
|
"react-dom": "*",
|
package/types/Portal.d.ts
CHANGED
|
File without changes
|
package/types/Portal.d.ts.map
CHANGED
|
File without changes
|
package/types/index.d.ts
CHANGED
|
File without changes
|
package/types/index.d.ts.map
CHANGED
|
File without changes
|