@tamagui/floating 1.61.2 → 1.62.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.
@@ -1,18 +1,14 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
5
  var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
6
+ if (from && typeof from == "object" || typeof from == "function")
8
7
  for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
8
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
9
  return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
10
+ }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
12
  var Floating_exports = {};
17
13
  module.exports = __toCommonJS(Floating_exports);
18
14
  __reExport(Floating_exports, require("@floating-ui/react-dom"), module.exports);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Floating.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,6BAAc,mCAAd;",
4
+ "mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,6BAAc,mCAAd;",
5
5
  "names": []
6
6
  }
@@ -5,18 +5,14 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
6
  var __export = (target, all) => {
7
7
  for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
12
11
  for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
13
  return to;
17
- };
18
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
20
16
  var Floating_native_exports = {};
21
17
  __export(Floating_native_exports, {
22
18
  autoUpdate: () => autoUpdate
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Floating.native.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,oCAAc,sCALd;AAGO,MAAM,aAAa,MAAM;AAAC;",
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,oCAAc,sCALd;AAGO,MAAM,aAAa,MAAM;AAAC;",
5
5
  "names": []
6
6
  }
package/dist/cjs/index.js CHANGED
@@ -1,22 +1,17 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
5
  var __export = (target, all) => {
7
6
  for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
12
10
  for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
12
  return to;
17
- };
18
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
13
+ }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
20
15
  var src_exports = {};
21
16
  __export(src_exports, {
22
17
  FloatingOverrideContext: () => import_useFloating.FloatingOverrideContext,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,uBAAd;AACA,yBAMO;",
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,uBAAd;AACA,yBAMO;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
+ var src_exports = {};
17
+ __export(src_exports, {
18
+ FloatingOverrideContext: () => import_useFloating.FloatingOverrideContext,
19
+ useFloating: () => import_useFloating.useFloating
20
+ });
21
+ module.exports = __toCommonJS(src_exports);
22
+ __reExport(src_exports, require("./Floating"), module.exports);
23
+ var import_useFloating = require("./useFloating");
24
+ // Annotate the CommonJS export names for ESM import in node:
25
+ 0 && (module.exports = {
26
+ FloatingOverrideContext,
27
+ useFloating,
28
+ ...require("./Floating")
29
+ });
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,uBAAd;AACA,yBAMO;",
5
+ "names": []
6
+ }
@@ -1,20 +1,15 @@
1
- "use strict";
2
1
  var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
14
11
  for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
13
  return to;
19
14
  };
20
15
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
@@ -22,24 +17,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
17
  // file that has been converted to a CommonJS file using a Babel-
23
18
  // compatible transform (i.e. "__esModule" has not been set), then set
24
19
  // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
20
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
26
21
  mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
29
23
  var useFloating_exports = {};
30
24
  __export(useFloating_exports, {
31
25
  FloatingOverrideContext: () => FloatingOverrideContext,
32
26
  useFloating: () => useFloating
33
27
  });
34
28
  module.exports = __toCommonJS(useFloating_exports);
35
- var import_react = require("react");
36
- var Floating = __toESM(require("./Floating"));
37
- const FloatingOverrideContext = (0, import_react.createContext)(null);
38
- const useFloating = (props) => {
39
- var _a;
40
- const context = (0, import_react.useContext)(FloatingOverrideContext);
41
- return (_a = context || Floating.useFloating) == null ? void 0 : _a(props);
42
- };
29
+ var import_react = require("react"), Floating = __toESM(require("./Floating"));
30
+ const FloatingOverrideContext = (0, import_react.createContext)(null), useFloating = (props) => ((0, import_react.useContext)(FloatingOverrideContext) || Floating.useFloating)?.(props);
43
31
  // Annotate the CommonJS export names for ESM import in node:
44
32
  0 && (module.exports = {
45
33
  FloatingOverrideContext,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/useFloating.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAE1C,eAA0B;AAkBnB,MAAM,8BAA0B,4BAAoC,IAAI;AAExE,MAAM,cAAc,CAAC,UAA+C;AAtB3E;AAuBE,QAAM,cAAU,yBAAW,uBAAuB;AAClD,UAAQ,gBAAW,SAAS,gBAApB,mBAAmC;AAC7C;",
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C,kBAE1C,WAA0B;AAkBnB,MAAM,8BAA0B,4BAAoC,IAAI,GAElE,cAAc,CAAC,eACV,yBAAW,uBAAuB,KAC/B,SAAS,eAAe,KAAK;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: !0 });
10
+ }, __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from == "object" || typeof from == "function")
12
+ for (let key of __getOwnPropNames(from))
13
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
+ mod
23
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
24
+ var useFloating_exports = {};
25
+ __export(useFloating_exports, {
26
+ FloatingOverrideContext: () => FloatingOverrideContext,
27
+ useFloating: () => useFloating
28
+ });
29
+ module.exports = __toCommonJS(useFloating_exports);
30
+ var import_react = require("react"), Floating = __toESM(require("./Floating"));
31
+ const FloatingOverrideContext = (0, import_react.createContext)(null), useFloating = (props) => ((0, import_react.useContext)(FloatingOverrideContext) || Floating.useFloating)?.(props);
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {
34
+ FloatingOverrideContext,
35
+ useFloating
36
+ });
37
+ //# sourceMappingURL=useFloating.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/useFloating.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C,kBAE1C,WAA0B;AAkBnB,MAAM,8BAA0B,4BAAoC,IAAI,GAElE,cAAc,CAAC,eACV,yBAAW,uBAAuB,KAC/B,SAAS,eAAe,KAAK;",
5
+ "names": []
6
+ }
@@ -1,11 +1,6 @@
1
1
  import { createContext, useContext } from "react";
2
2
  import * as Floating from "./Floating";
3
- const FloatingOverrideContext = createContext(null);
4
- const useFloating = (props) => {
5
- var _a;
6
- const context = useContext(FloatingOverrideContext);
7
- return (_a = context || Floating.useFloating) == null ? void 0 : _a(props);
8
- };
3
+ const FloatingOverrideContext = createContext(null), useFloating = (props) => (useContext(FloatingOverrideContext) || Floating.useFloating)?.(props);
9
4
  export {
10
5
  FloatingOverrideContext,
11
6
  useFloating
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/useFloating.tsx"],
4
- "mappings": "AAAA,SAAS,eAAe,kBAAkB;AAE1C,YAAY,cAAc;AAkBnB,MAAM,0BAA0B,cAAoC,IAAI;AAExE,MAAM,cAAc,CAAC,UAA+C;AAtB3E;AAuBE,QAAM,UAAU,WAAW,uBAAuB;AAClD,UAAQ,gBAAW,SAAS,gBAApB,mBAAmC;AAC7C;",
4
+ "mappings": "AAAA,SAAS,eAAe,kBAAkB;AAE1C,YAAY,cAAc;AAkBnB,MAAM,0BAA0B,cAAoC,IAAI,GAElE,cAAc,CAAC,WACV,WAAW,uBAAuB,KAC/B,SAAS,eAAe,KAAK;",
5
5
  "names": []
6
6
  }
@@ -1,6 +1,6 @@
1
+ export * from "@floating-ui/react-native";
1
2
  const autoUpdate = () => {
2
3
  };
3
- export * from "@floating-ui/react-native";
4
4
  export {
5
5
  autoUpdate
6
6
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Floating.native.tsx"],
4
- "mappings": "AAGO,MAAM,aAAa,MAAM;AAAC;AAEjC,cAAc;",
4
+ "mappings": "AAKA,cAAc;AAFP,MAAM,aAAa,MAAM;AAAC;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,10 @@
1
+ export * from "./Floating";
2
+ import {
3
+ useFloating,
4
+ FloatingOverrideContext
5
+ } from "./useFloating";
6
+ export {
7
+ FloatingOverrideContext,
8
+ useFloating
9
+ };
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx"],
4
+ "mappings": "AAAA,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OAIK;",
5
+ "names": []
6
+ }
@@ -1,10 +1,6 @@
1
1
  import { createContext, useContext } from "react";
2
2
  import * as Floating from "./Floating";
3
- const FloatingOverrideContext = createContext(null);
4
- const useFloating = (props) => {
5
- const context = useContext(FloatingOverrideContext);
6
- return (context || Floating.useFloating)?.(props);
7
- };
3
+ const FloatingOverrideContext = createContext(null), useFloating = (props) => (useContext(FloatingOverrideContext) || Floating.useFloating)?.(props);
8
4
  export {
9
5
  FloatingOverrideContext,
10
6
  useFloating
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/useFloating.tsx"],
4
- "mappings": "AAAA,SAAS,eAAe,kBAAkB;AAE1C,YAAY,cAAc;AAkBnB,MAAM,0BAA0B,cAAoC,IAAI;AAExE,MAAM,cAAc,CAAC,UAA+C;AACzE,QAAM,UAAU,WAAW,uBAAuB;AAClD,UAAQ,WAAW,SAAS,eAAe,KAAK;AAClD;",
4
+ "mappings": "AAAA,SAAS,eAAe,kBAAkB;AAE1C,YAAY,cAAc;AAkBnB,MAAM,0BAA0B,cAAoC,IAAI,GAElE,cAAc,CAAC,WACV,WAAW,uBAAuB,KAC/B,SAAS,eAAe,KAAK;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,8 @@
1
+ import { createContext, useContext } from "react";
2
+ import * as Floating from "./Floating";
3
+ const FloatingOverrideContext = createContext(null), useFloating = (props) => (useContext(FloatingOverrideContext) || Floating.useFloating)?.(props);
4
+ export {
5
+ FloatingOverrideContext,
6
+ useFloating
7
+ };
8
+ //# sourceMappingURL=useFloating.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/useFloating.tsx"],
4
+ "mappings": "AAAA,SAAS,eAAe,kBAAkB;AAE1C,YAAY,cAAc;AAkBnB,MAAM,0BAA0B,cAAoC,IAAI,GAElE,cAAc,CAAC,WACV,WAAW,uBAAuB,KAC/B,SAAS,eAAe,KAAK;",
5
+ "names": []
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/floating",
3
- "version": "1.61.2",
3
+ "version": "1.62.0",
4
4
  "sideEffects": true,
5
5
  "source": "src/index.ts",
6
6
  "types": "./types/index.d.ts",
@@ -40,7 +40,7 @@
40
40
  "react-dom": "^18.2.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@tamagui/build": "1.61.2",
43
+ "@tamagui/build": "1.62.0",
44
44
  "react": "^18.2.0",
45
45
  "react-native": "^0.72.1"
46
46
  }
@@ -1,7 +0,0 @@
1
- const autoUpdate = () => {
2
- };
3
- export * from "@floating-ui/react-native";
4
- export {
5
- autoUpdate
6
- };
7
- //# sourceMappingURL=Floating.native.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Floating.native.tsx"],
4
- "mappings": "AAGO,MAAM,aAAa,MAAM;AAAC;AAEjC,cAAc;",
5
- "names": []
6
- }