one 2.0.0-beta.167.1 → 2.0.0-beta.168.1

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.
@@ -128,10 +128,14 @@ function PortalHost({ name, children, style, testID, nativeID, accessibilityLabe
128
128
  "aria-label": accessibilityLabel,
129
129
  style: {
130
130
  ...import_DomView.VIEW_BASE,
131
- ...(0, import_DomView.domStyle)(style)
131
+ ...(0, import_DomView.domStyle)(style),
132
+ pointerEvents: "none"
132
133
  },
133
134
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
134
- style: { display: "contents" },
135
+ style: {
136
+ display: "contents",
137
+ pointerEvents: "auto"
138
+ },
135
139
  children
136
140
  })
137
141
  });
@@ -44,5 +44,8 @@ function Portal(param) {
44
44
  });
45
45
  }
46
46
  function PortalHost(props) {
47
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_OneNativePortalHostViewNativeComponent.default, { ...props });
47
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_OneNativePortalHostViewNativeComponent.default, {
48
+ pointerEvents: "box-none",
49
+ ...props
50
+ });
48
51
  }
@@ -44,7 +44,10 @@ function Portal(param) {
44
44
  });
45
45
  }
46
46
  function PortalHost(props) {
47
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_OneNativePortalHostViewNativeComponent.default, { ...props });
47
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_OneNativePortalHostViewNativeComponent.default, {
48
+ pointerEvents: "box-none",
49
+ ...props
50
+ });
48
51
  }
49
52
 
50
53
  //# sourceMappingURL=Portal.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.native.js","names":[],"sources":["cjs/platform/ui/Portal.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Portal_native_exports = {};\n__export(Portal_native_exports, {\n Portal: () => Portal,\n PortalHost: () => PortalHost\n});\nmodule.exports = __toCommonJS(Portal_native_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_OneNativePortalViewNativeComponent = __toESM(require(\"../specs/OneNativePortalViewNativeComponent\"), 1);\nvar import_OneNativePortalHostViewNativeComponent = __toESM(require(\"../specs/OneNativePortalHostViewNativeComponent\"), 1);\nfunction Portal(param) {\n var { hostName = \"\", name = \"\", ...props } = param;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_OneNativePortalViewNativeComponent.default, {\n ...props,\n hostName,\n name\n });\n}\nfunction PortalHost(props) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_OneNativePortalHostViewNativeComponent.default, {\n ...props\n });\n}\n//# sourceMappingURL=Portal.native.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBA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,IAAG,CAAE,0CAA0C,SAAS;EACpG,GAAG;EACH;EACA;CACF,CAAC;AACH;AACA,SAAS,WAAW,OAAO;CACzB,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,8CAA8C,SAAS,EACxG,GAAG,MACL,CAAC;AACH"}
1
+ {"version":3,"file":"Portal.native.js","names":[],"sources":["cjs/platform/ui/Portal.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Portal_native_exports = {};\n__export(Portal_native_exports, {\n Portal: () => Portal,\n PortalHost: () => PortalHost\n});\nmodule.exports = __toCommonJS(Portal_native_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_OneNativePortalViewNativeComponent = __toESM(require(\"../specs/OneNativePortalViewNativeComponent\"), 1);\nvar import_OneNativePortalHostViewNativeComponent = __toESM(require(\"../specs/OneNativePortalHostViewNativeComponent\"), 1);\nfunction Portal(param) {\n var { hostName = \"\", name = \"\", ...props } = param;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_OneNativePortalViewNativeComponent.default, {\n ...props,\n hostName,\n name\n });\n}\nfunction PortalHost(props) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_OneNativePortalHostViewNativeComponent.default, {\n pointerEvents: \"box-none\",\n ...props\n });\n}\n//# sourceMappingURL=Portal.native.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,wBAAwB,CAAC;AAC7B,SAAS,uBAAuB;CAC9B,cAAc;CACd,kBAAkB;AACpB,CAAC;AACD,OAAO,UAAU,aAAa,qBAAqB;AACnD,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,4CAA4C,QAAQ,QAAQ,uDAA6C,GAAG,CAAC;AACjH,IAAI,gDAAgD,QAAQ,QAAQ,2DAAiD,GAAG,CAAC;AACzH,SAAS,OAAO,OAAO;CACrB,IAAI,EAAE,WAAW,IAAI,OAAO,IAAI,GAAG,UAAU;CAC7C,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,0CAA0C,SAAS;EACpG,GAAG;EACH;EACA;CACF,CAAC;AACH;AACA,SAAS,WAAW,OAAO;CACzB,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,8CAA8C,SAAS;EACxG,eAAe;EACf,GAAG;CACL,CAAC;AACH"}
@@ -103,10 +103,14 @@ function PortalHost({ name, children, style, testID, nativeID, accessibilityLabe
103
103
  "aria-label": accessibilityLabel,
104
104
  style: {
105
105
  ...VIEW_BASE,
106
- ...domStyle(style)
106
+ ...domStyle(style),
107
+ pointerEvents: "none"
107
108
  },
108
109
  children: /* @__PURE__ */ jsx("div", {
109
- style: { display: "contents" },
110
+ style: {
111
+ display: "contents",
112
+ pointerEvents: "auto"
113
+ },
110
114
  children
111
115
  })
112
116
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.js","names":[],"sources":["esm/platform/ui/Portal.js"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { domStyle, VIEW_BASE } from \"../web/DomView\";\nimport { jsx } from \"react/jsx-runtime\";\nconst hosts = /* @__PURE__ */ new Map();\nconst portals = [];\nfunction refresh() {\n for (let i = 0; i < portals.length; i++) {\n const portal = portals[i];\n const replaced = portal.name != null && portals.slice(i + 1).some((other) => other.name === portal.name);\n if (replaced) {\n portal.content.remove();\n continue;\n }\n const host = portal.hostName == null ? null : hosts.get(portal.hostName);\n const target = host ?? portal.source;\n portal.content.removeAttribute(\"style\");\n Object.assign(\n portal.content.style,\n host ? {\n ...VIEW_BASE,\n ...portal.style,\n position: \"absolute\",\n inset: \"0\",\n width: \"100%\",\n height: \"100%\",\n pointerEvents: \"none\"\n } : { display: \"contents\" }\n );\n portal.source.style.position = host ? \"absolute\" : portal.style.position ?? \"relative\";\n target.appendChild(portal.content);\n }\n}\nfunction Portal({\n hostName,\n name,\n children,\n style,\n testID,\n nativeID,\n accessibilityLabel\n}) {\n const source = useRef(null);\n const entry = useRef(null);\n const [content, setContent] = useState(null);\n useEffect(() => {\n if (!source.current) return;\n const node = document.createElement(\"div\");\n const value = {\n hostName: hostName || void 0,\n name: name || void 0,\n source: source.current,\n content: node,\n style: domStyle(style)\n };\n entry.current = value;\n portals.push(value);\n setContent(node);\n refresh();\n return () => {\n portals.splice(portals.indexOf(value), 1);\n node.remove();\n entry.current = null;\n refresh();\n };\n }, []);\n useEffect(() => {\n const value = entry.current;\n if (!value) return;\n value.hostName = hostName || void 0;\n value.name = name || void 0;\n value.style = domStyle(style);\n refresh();\n }, [hostName, name, style]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: source,\n \"data-testid\": testID,\n id: nativeID,\n \"aria-label\": accessibilityLabel,\n style: {\n ...VIEW_BASE,\n ...domStyle(style)\n },\n children: content ? createPortal(\n /* @__PURE__ */ jsx(\"div\", { style: { display: \"contents\", pointerEvents: \"auto\" }, children }),\n content\n ) : null\n }\n );\n}\nfunction PortalHost({\n name,\n children,\n style,\n testID,\n nativeID,\n accessibilityLabel\n}) {\n const ref = useRef(null);\n useEffect(() => {\n const node = ref.current;\n if (!node) return;\n hosts.set(name, node);\n refresh();\n return () => {\n if (hosts.get(name) === node) hosts.delete(name);\n refresh();\n };\n }, [name]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref,\n \"data-testid\": testID,\n id: nativeID,\n \"aria-label\": accessibilityLabel,\n style: { ...VIEW_BASE, ...domStyle(style) },\n children: /* @__PURE__ */ jsx(\"div\", { style: { display: \"contents\" }, children })\n }\n );\n}\nexport {\n Portal,\n PortalHost\n};\n//# sourceMappingURL=Portal.js.map\n"],"mappings":";;;;;;AAIA,MAAM,wBAAwB,IAAI,IAAI;AACtC,MAAM,UAAU,CAAC;AACjB,SAAS,UAAU;CACjB,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;EACvC,MAAM,SAAS,QAAQ;EACvB,MAAM,WAAW,OAAO,QAAQ,QAAQ,QAAQ,MAAM,IAAI,CAAC,CAAC,CAAC,MAAM,UAAU,MAAM,SAAS,OAAO,IAAI;EACvG,IAAI,UAAU;GACZ,OAAO,QAAQ,OAAO;GACtB;EACF;EACA,MAAM,OAAO,OAAO,YAAY,OAAO,OAAO,MAAM,IAAI,OAAO,QAAQ;EACvE,MAAM,SAAS,QAAQ,OAAO;EAC9B,OAAO,QAAQ,gBAAgB,OAAO;EACtC,OAAO,OACL,OAAO,QAAQ,OACf,OAAO;GACL,GAAG;GACH,GAAG,OAAO;GACV,UAAU;GACV,OAAO;GACP,OAAO;GACP,QAAQ;GACR,eAAe;EACjB,IAAI,EAAE,SAAS,WAAW,CAC5B;EACA,OAAO,OAAO,MAAM,WAAW,OAAO,aAAa,OAAO,MAAM,YAAY;EAC5E,OAAO,YAAY,OAAO,OAAO;CACnC;AACF;AACA,SAAS,OAAO,EACd,UACA,MACA,UACA,OACA,QACA,UACA,sBACC;CACD,MAAM,SAAS,OAAO,IAAI;CAC1B,MAAM,QAAQ,OAAO,IAAI;CACzB,MAAM,CAAC,SAAS,cAAc,SAAS,IAAI;CAC3C,gBAAgB;EACd,IAAI,CAAC,OAAO,SAAS;EACrB,MAAM,OAAO,SAAS,cAAc,KAAK;EACzC,MAAM,QAAQ;GACZ,UAAU,YAAY,KAAK;GAC3B,MAAM,QAAQ,KAAK;GACnB,QAAQ,OAAO;GACf,SAAS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al.js","names":[],"sources":["esm/platform/ui/Portal.js"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { domStyle, VIEW_BASE } from \"../web/DomView\";\nimport { jsx } from \"react/jsx-runtime\";\nconst hosts = /* @__PURE__ */ new Map();\nconst portals = [];\nfunction refresh() {\n for (let i = 0; i < portals.length; i++) {\n const portal = portals[i];\n const replaced = portal.name != null && portals.slice(i + 1).some((other) => other.name === portal.name);\n if (replaced) {\n portal.content.remove();\n continue;\n }\n const host = portal.hostName == null ? null : hosts.get(portal.hostName);\n const target = host ?? portal.source;\n portal.content.removeAttribute(\"style\");\n Object.assign(\n portal.content.style,\n host ? {\n ...VIEW_BASE,\n ...portal.style,\n position: \"absolute\",\n inset: \"0\",\n width: \"100%\",\n height: \"100%\",\n pointerEvents: \"none\"\n } : { display: \"contents\" }\n );\n portal.source.style.position = host ? \"absolute\" : portal.style.position ?? \"relative\";\n target.appendChild(portal.content);\n }\n}\nfunction Portal({\n hostName,\n name,\n children,\n style,\n testID,\n nativeID,\n accessibilityLabel\n}) {\n const source = useRef(null);\n const entry = useRef(null);\n const [content, setContent] = useState(null);\n useEffect(() => {\n if (!source.current) return;\n const node = document.createElement(\"div\");\n const value = {\n hostName: hostName || void 0,\n name: name || void 0,\n source: source.current,\n content: node,\n style: domStyle(style)\n };\n entry.current = value;\n portals.push(value);\n setContent(node);\n refresh();\n return () => {\n portals.splice(portals.indexOf(value), 1);\n node.remove();\n entry.current = null;\n refresh();\n };\n }, []);\n useEffect(() => {\n const value = entry.current;\n if (!value) return;\n value.hostName = hostName || void 0;\n value.name = name || void 0;\n value.style = domStyle(style);\n refresh();\n }, [hostName, name, style]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: source,\n \"data-testid\": testID,\n id: nativeID,\n \"aria-label\": accessibilityLabel,\n style: {\n ...VIEW_BASE,\n ...domStyle(style)\n },\n children: content ? createPortal(\n /* @__PURE__ */ jsx(\"div\", { style: { display: \"contents\", pointerEvents: \"auto\" }, children }),\n content\n ) : null\n }\n );\n}\nfunction PortalHost({\n name,\n children,\n style,\n testID,\n nativeID,\n accessibilityLabel\n}) {\n const ref = useRef(null);\n useEffect(() => {\n const node = ref.current;\n if (!node) return;\n hosts.set(name, node);\n refresh();\n return () => {\n if (hosts.get(name) === node) hosts.delete(name);\n refresh();\n };\n }, [name]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref,\n \"data-testid\": testID,\n id: nativeID,\n \"aria-label\": accessibilityLabel,\n style: { ...VIEW_BASE, ...domStyle(style), pointerEvents: \"none\" },\n children: /* @__PURE__ */ jsx(\"div\", { style: { display: \"contents\", pointerEvents: \"auto\" }, children })\n }\n );\n}\nexport {\n Portal,\n PortalHost\n};\n//# sourceMappingURL=Portal.js.map\n"],"mappings":";;;;;;AAIA,MAAM,wBAAwB,IAAI,IAAI;AACtC,MAAM,UAAU,CAAC;AACjB,SAAS,UAAU;CACjB,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;EACvC,MAAM,SAAS,QAAQ;EACvB,MAAM,WAAW,OAAO,QAAQ,QAAQ,QAAQ,MAAM,IAAI,CAAC,CAAC,CAAC,MAAM,UAAU,MAAM,SAAS,OAAO,IAAI;EACvG,IAAI,UAAU;GACZ,OAAO,QAAQ,OAAO;GACtB;EACF;EACA,MAAM,OAAO,OAAO,YAAY,OAAO,OAAO,MAAM,IAAI,OAAO,QAAQ;EACvE,MAAM,SAAS,QAAQ,OAAO;EAC9B,OAAO,QAAQ,gBAAgB,OAAO;EACtC,OAAO,OACL,OAAO,QAAQ,OACf,OAAO;GACL,GAAG;GACH,GAAG,OAAO;GACV,UAAU;GACV,OAAO;GACP,OAAO;GACP,QAAQ;GACR,eAAe;EACjB,IAAI,EAAE,SAAS,WAAW,CAC5B;EACA,OAAO,OAAO,MAAM,WAAW,OAAO,aAAa,OAAO,MAAM,YAAY;EAC5E,OAAO,YAAY,OAAO,OAAO;CACnC;AACF;A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a;GACX,IAAI,MAAM,IAAI,IAAI,MAAM,MAAM,MAAM,OAAO,IAAI;GAC/C,QAAQ;EACV;CACF,GAAG,CAAC,IAAI,CAAC;CACT,OAAuB,oBACrB,OACA;EACE;EACA,eAAe;EACf,IAAI;EACJ,cAAc;EACd,OAAO;GAAE,GAAG;GAAW,GAAG,SAAS,KAAK;GAAG,eAAe;EAAO;EACjE,UAA0B,oBAAI,OAAO;GAAE,OAAO;IAAE,SAAS;IAAY,eAAe;GAAO;GAAG;EAAS,CAAC;CAC1G,CACF;AACF"}
@@ -11,7 +11,10 @@ function Portal(param) {
11
11
  });
12
12
  }
13
13
  function PortalHost(props) {
14
- return /* @__PURE__ */ jsx(NativePortalHost, { ...props });
14
+ return /* @__PURE__ */ jsx(NativePortalHost, {
15
+ pointerEvents: "box-none",
16
+ ...props
17
+ });
15
18
  }
16
19
 
17
20
  export { Portal, PortalHost };
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.native.js","names":[],"sources":["esm/platform/ui/Portal.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport NativePortal from \"../specs/OneNativePortalViewNativeComponent\";\nimport NativePortalHost from \"../specs/OneNativePortalHostViewNativeComponent\";\nfunction Portal(param) {\n var { hostName = \"\", name = \"\", ...props } = param;\n return /* @__PURE__ */ _jsx(NativePortal, {\n ...props,\n hostName,\n name\n });\n}\nfunction PortalHost(props) {\n return /* @__PURE__ */ _jsx(NativePortalHost, {\n ...props\n });\n}\nexport {\n Portal,\n PortalHost\n};\n//# sourceMappingURL=Portal.native.js.map\n"],"mappings":";;;;;AAGA,SAAS,OAAO,OAAO;CACrB,IAAI,EAAE,WAAW,IAAI,OAAO,IAAI,GAAG,UAAU;CAC7C,OAAuB,oBAAK,cAAc;EACxC,GAAG;EACH;EACA;CACF,CAAC;AACH;AACA,SAAS,WAAW,OAAO;CACzB,OAAuB,oBAAK,kBAAkB,EAC5C,GAAG,MACL,CAAC;AACH"}
1
+ {"version":3,"file":"Portal.native.js","names":[],"sources":["esm/platform/ui/Portal.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport NativePortal from \"../specs/OneNativePortalViewNativeComponent\";\nimport NativePortalHost from \"../specs/OneNativePortalHostViewNativeComponent\";\nfunction Portal(param) {\n var { hostName = \"\", name = \"\", ...props } = param;\n return /* @__PURE__ */ _jsx(NativePortal, {\n ...props,\n hostName,\n name\n });\n}\nfunction PortalHost(props) {\n return /* @__PURE__ */ _jsx(NativePortalHost, {\n pointerEvents: \"box-none\",\n ...props\n });\n}\nexport {\n Portal,\n PortalHost\n};\n//# sourceMappingURL=Portal.native.js.map\n"],"mappings":";;;;;AAGA,SAAS,OAAO,OAAO;CACrB,IAAI,EAAE,WAAW,IAAI,OAAO,IAAI,GAAG,UAAU;CAC7C,OAAuB,oBAAK,cAAc;EACxC,GAAG;EACH;EACA;CACF,CAAC;AACH;AACA,SAAS,WAAW,OAAO;CACzB,OAAuB,oBAAK,kBAAkB;EAC5C,eAAe;EACf,GAAG;CACL,CAAC;AACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "one",
3
- "version": "2.0.0-beta.167.1",
3
+ "version": "2.0.0-beta.168.1",
4
4
  "description": "One is a React framework for web, iOS, and Android apps.",
5
5
  "license": "BSD-3-Clause",
6
6
  "sideEffects": [
@@ -219,18 +219,18 @@
219
219
  "@react-navigation/native-stack": "8.0.0-alpha.52",
220
220
  "@react-navigation/routers": "8.0.0-alpha.17",
221
221
  "@ungap/structured-clone": "^1.2.0",
222
- "@vxrn/color-scheme": "2.0.0-beta.167.1",
223
- "@vxrn/compiler": "2.0.0-beta.167.1",
224
- "@vxrn/resolve": "2.0.0-beta.167.1",
225
- "@vxrn/tslib-lite": "2.0.0-beta.167.1",
226
- "@vxrn/use-isomorphic-layout-effect": "2.0.0-beta.167.1",
227
- "@vxrn/utils": "2.0.0-beta.167.1",
228
- "@vxrn/vite-plugin-metro": "2.0.0-beta.167.1",
222
+ "@vxrn/color-scheme": "2.0.0-beta.168.1",
223
+ "@vxrn/compiler": "2.0.0-beta.168.1",
224
+ "@vxrn/resolve": "2.0.0-beta.168.1",
225
+ "@vxrn/tslib-lite": "2.0.0-beta.168.1",
226
+ "@vxrn/use-isomorphic-layout-effect": "2.0.0-beta.168.1",
227
+ "@vxrn/utils": "2.0.0-beta.168.1",
228
+ "@vxrn/vite-plugin-metro": "2.0.0-beta.168.1",
229
229
  "babel-dead-code-elimination": "1.0.10",
230
230
  "babel-plugin-module-resolver": "^5.0.2",
231
231
  "citty": "^0.1.6",
232
232
  "core-js": "^3.38.1",
233
- "create-vxrn": "2.0.0-beta.167.1",
233
+ "create-vxrn": "2.0.0-beta.168.1",
234
234
  "escape-string-regexp": "^5.0.0",
235
235
  "fast-deep-equal": "^3.1.3",
236
236
  "fast-glob": "^3.3.3",
@@ -252,7 +252,7 @@
252
252
  "tsconfig-paths": "^4",
253
253
  "use-latest-callback": "^0.2.3",
254
254
  "vite": "^8.2.2",
255
- "vxrn": "2.0.0-beta.167.1",
255
+ "vxrn": "2.0.0-beta.168.1",
256
256
  "web-streams-polyfill": "^4.3.0",
257
257
  "ws": "^8.21.0",
258
258
  "xxhashjs": "^0.2.2"
@@ -5,6 +5,8 @@ export type { PortalProps, PortalHostProps } from './portalTypes'
5
5
  export function Portal({ hostName = '', name = '', ...props }: PortalProps) {
6
6
  return <NativePortal {...props} hostName={hostName} name={name} />
7
7
  }
8
+ // a host is never a touch target itself: a full-screen host would otherwise
9
+ // swallow every touch meant for the views beneath it.
8
10
  export function PortalHost(props: PortalHostProps) {
9
- return <NativePortalHost {...props} />
11
+ return <NativePortalHost pointerEvents="box-none" {...props} />
10
12
  }
@@ -133,9 +133,11 @@ export function PortalHost({
133
133
  data-testid={testID}
134
134
  id={nativeID}
135
135
  aria-label={accessibilityLabel}
136
- style={{ ...VIEW_BASE, ...domStyle(style) }}
136
+ // the host passes touches through; its own children and portaled
137
+ // content take them back, so a full-screen host blocks nothing beneath it.
138
+ style={{ ...VIEW_BASE, ...domStyle(style), pointerEvents: 'none' }}
137
139
  >
138
- <div style={{ display: 'contents' }}>{children}</div>
140
+ <div style={{ display: 'contents', pointerEvents: 'auto' }}>{children}</div>
139
141
  </div>
140
142
  )
141
143
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../src/platform/ui/Portal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACjE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AA6CjE,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,MAAM,EACN,QAAQ,EACR,kBAAkB,GACnB,EAAE,WAAW,2CAoDb;AACD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,MAAM,EACN,QAAQ,EACR,kBAAkB,GACnB,EAAE,eAAe,2CAuBjB"}
1
+ {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../src/platform/ui/Portal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACjE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AA6CjE,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,MAAM,EACN,QAAQ,EACR,kBAAkB,GACnB,EAAE,WAAW,2CAoDb;AACD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,MAAM,EACN,QAAQ,EACR,kBAAkB,GACnB,EAAE,eAAe,2CAyBjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.native.d.ts","sourceRoot":"","sources":["../../../src/platform/ui/Portal.native.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACjE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACjE,wBAAgB,MAAM,CAAC,EAAE,QAAa,EAAE,IAAS,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CAEzE;AACD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAEhD"}
1
+ {"version":3,"file":"Portal.native.d.ts","sourceRoot":"","sources":["../../../src/platform/ui/Portal.native.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACjE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACjE,wBAAgB,MAAM,CAAC,EAAE,QAAa,EAAE,IAAS,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CAEzE;AAGD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAEhD"}