@tamagui/floating 1.13.2 → 1.13.4

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 (41) hide show
  1. package/dist/cjs/Floating.js +1 -18
  2. package/dist/cjs/Floating.js.map +2 -2
  3. package/dist/cjs/Floating.native.js +1 -18
  4. package/dist/cjs/Floating.native.js.map +2 -2
  5. package/dist/cjs/index.js +1 -32
  6. package/dist/cjs/index.js.map +2 -2
  7. package/dist/cjs/useFloating.js +1 -47
  8. package/dist/cjs/useFloating.js.map +2 -2
  9. package/dist/esm/Floating.js +1 -1
  10. package/dist/esm/Floating.js.map +1 -1
  11. package/dist/esm/Floating.mjs +1 -1
  12. package/dist/esm/Floating.mjs.map +1 -1
  13. package/dist/esm/Floating.native.js +1 -1
  14. package/dist/esm/Floating.native.js.map +1 -1
  15. package/dist/esm/Floating.native.mjs +1 -1
  16. package/dist/esm/Floating.native.mjs.map +1 -1
  17. package/dist/esm/index.js +1 -9
  18. package/dist/esm/index.js.map +2 -2
  19. package/dist/esm/index.mjs +1 -9
  20. package/dist/esm/index.mjs.map +2 -2
  21. package/dist/esm/useFloating.js +1 -12
  22. package/dist/esm/useFloating.js.map +2 -2
  23. package/dist/esm/useFloating.mjs +1 -12
  24. package/dist/esm/useFloating.mjs.map +2 -2
  25. package/dist/jsx/Floating.js +1 -1
  26. package/dist/jsx/Floating.js.map +1 -1
  27. package/dist/jsx/Floating.mjs +1 -1
  28. package/dist/jsx/Floating.mjs.map +1 -1
  29. package/dist/jsx/Floating.native.js +1 -1
  30. package/dist/jsx/Floating.native.js.map +1 -1
  31. package/dist/jsx/Floating.native.mjs +1 -1
  32. package/dist/jsx/Floating.native.mjs.map +1 -1
  33. package/dist/jsx/index.js +1 -9
  34. package/dist/jsx/index.js.map +2 -2
  35. package/dist/jsx/index.mjs +1 -9
  36. package/dist/jsx/index.mjs.map +2 -2
  37. package/dist/jsx/useFloating.js +1 -11
  38. package/dist/jsx/useFloating.js.map +2 -2
  39. package/dist/jsx/useFloating.mjs +1 -11
  40. package/dist/jsx/useFloating.mjs.map +2 -2
  41. package/package.json +2 -2
@@ -1,19 +1,2 @@
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 __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- 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
- }
12
- 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);
16
- var Floating_exports = {};
17
- module.exports = __toCommonJS(Floating_exports);
18
- __reExport(Floating_exports, require("@floating-ui/react-dom"), module.exports);
1
+ "use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("@floating-ui/react-dom"),module.exports);
19
2
  //# sourceMappingURL=Floating.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Floating.tsx"],
4
4
  "sourcesContent": ["export * from '@floating-ui/react-dom'\n"],
5
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,6BAAc,mCAAd;",
6
- "names": []
5
+ "mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAAE,EAAAF,EAAc,kCAAd",
6
+ "names": ["Floating_exports", "__toCommonJS", "__reExport"]
7
7
  }
@@ -1,19 +1,2 @@
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 __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- 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
- }
12
- 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);
16
- var Floating_native_exports = {};
17
- module.exports = __toCommonJS(Floating_native_exports);
18
- __reExport(Floating_native_exports, require("@floating-ui/react-native"), module.exports);
1
+ "use strict";var l=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var a=(n,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of d(e))!s.call(n,t)&&t!==o&&l(n,t,{get:()=>e[t],enumerable:!(i=y(e,t))||i.enumerable});return n},f=(n,e,o)=>(a(n,e,"default"),o&&a(o,e,"default"));var c=n=>a(l({},"__esModule",{value:!0}),n);var r={};module.exports=c(r);f(r,require("@floating-ui/react-native"),module.exports);
19
2
  //# sourceMappingURL=Floating.native.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Floating.native.tsx"],
4
4
  "sourcesContent": ["import { ComputePositionReturn } from '@floating-ui/react-native'\nimport { RefObject } from 'react'\n\nexport * from '@floating-ui/react-native'\n\nexport declare type UseFloatingReturn = Data & {\n update: () => void\n offsetParent: (node: any) => void\n floating: (node: any) => void\n reference: (node: any) => void\n refs: {\n reference: RefObject<any>\n floating: RefObject<any>\n offsetParent: RefObject<any>\n setReference: (node: any) => void\n setFloating: (node: any) => void\n setOffsetParent: (node: any) => void\n }\n elements: {\n reference: any\n floating: any\n offsetParent: any\n }\n scrollProps: {\n onScroll: (event: {\n nativeEvent: {\n contentOffset: {\n x: number\n y: number\n }\n }\n }) => void\n scrollEventThrottle: 16\n }\n}\n\ntype Data = Omit<ComputePositionReturn, 'x' | 'y'> & {\n x: number | null\n y: number | null\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAGA,oCAAc,sCAHd;",
6
- "names": []
5
+ "mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAGAE,EAAAF,EAAc,qCAHd",
6
+ "names": ["Floating_native_exports", "__toCommonJS", "__reExport"]
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -1,33 +1,2 @@
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: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- 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
- }
16
- 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);
20
- var src_exports = {};
21
- __export(src_exports, {
22
- FloatingOverrideContext: () => import_useFloating.FloatingOverrideContext,
23
- useFloating: () => import_useFloating.useFloating
24
- });
25
- module.exports = __toCommonJS(src_exports);
26
- __reExport(src_exports, require("./Floating"), module.exports);
27
- var import_useFloating = require("./useFloating");
28
- // Annotate the CommonJS export names for ESM import in node:
29
- 0 && (module.exports = {
30
- FloatingOverrideContext,
31
- useFloating
32
- });
1
+ "use strict";var F=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var y=(t,e)=>{for(var o in e)F(t,o,{get:e[o],enumerable:!0})},p=(t,e,o,g)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of s(e))!x.call(t,n)&&n!==o&&F(t,n,{get:()=>e[n],enumerable:!(g=l(e,n))||g.enumerable});return t},a=(t,e,o)=>(p(t,e,"default"),o&&p(o,e,"default"));var U=t=>p(F({},"__esModule",{value:!0}),t);var r={};y(r,{FloatingOverrideContext:()=>i.FloatingOverrideContext,useFloating:()=>i.useFloating});module.exports=U(r);a(r,require("./Floating"),module.exports);var i=require("./useFloating");0&&(module.exports={FloatingOverrideContext,useFloating});
33
2
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
4
  "sourcesContent": ["export * from './Floating'\nexport {\n useFloating,\n FloatingOverrideContext,\n type UseFloatingProps,\n type UseFloatingReturn,\n type UseFloatingFn,\n} from './useFloating'\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,uBAAd;AACA,yBAMO;",
6
- "names": []
5
+ "mappings": "2dAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sGAAAE,EAAAF,GAAAG,EAAAH,EAAc,sBAAd,gBACA,IAAAI,EAMO",
6
+ "names": ["src_exports", "__export", "__toCommonJS", "__reExport", "import_useFloating"]
7
7
  }
@@ -1,48 +1,2 @@
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;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- 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") {
14
- 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
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var useFloating_exports = {};
30
- __export(useFloating_exports, {
31
- FloatingOverrideContext: () => FloatingOverrideContext,
32
- useFloating: () => useFloating
33
- });
34
- 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
- };
43
- // Annotate the CommonJS export names for ESM import in node:
44
- 0 && (module.exports = {
45
- FloatingOverrideContext,
46
- useFloating
47
- });
1
+ "use strict";var l=Object.create;var r=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var u=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},p=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of F(t))!x.call(e,o)&&o!==n&&r(e,o,{get:()=>t[o],enumerable:!(a=g(t,o))||a.enumerable});return e};var c=(e,t,n)=>(n=e!=null?l(y(e)):{},p(t||!e||!e.__esModule?r(n,"default",{value:e,enumerable:!0}):n,e)),f=e=>p(r({},"__esModule",{value:!0}),e);var m={};u(m,{FloatingOverrideContext:()=>i,useFloating:()=>U});module.exports=f(m);var s=require("react"),P=c(require("./Floating"));const i=(0,s.createContext)(null),U=e=>{var n;return(n=(0,s.useContext)(i)||P.useFloating)==null?void 0:n(e)};0&&(module.exports={FloatingOverrideContext,useFloating});
48
2
  //# sourceMappingURL=useFloating.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/useFloating.tsx"],
4
4
  "sourcesContent": ["import { useContext, createContext } from 'react';\nimport * as Floating from './Floating'\n\nexport type UseFloatingFn = typeof Floating.useFloating;\n\ntype InferFloatingProps = UseFloatingFn extends (props: infer Props) => any\n ? Props\n : never\n\nexport type UseFloatingProps = InferFloatingProps & {\n sameScrollView?: boolean\n}\n\nexport type UseFloatingReturn = Floating.UseFloatingReturn & {\n context?: any\n getFloatingProps?: (props: { ref: any; [key: string]: any }) => any\n getReferenceProps?: (props: { ref: any; [key: string]: any }) => any\n}\n\nexport const FloatingOverrideContext = createContext<UseFloatingFn | null>(null)\n\nexport const useFloating = (props: UseFloatingProps):UseFloatingReturn => {\n const context = useContext(FloatingOverrideContext)\n return (context || Floating.useFloating)?.(props)\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAC1C,eAA0B;AAkBnB,MAAM,8BAA0B,4BAAoC,IAAI;AAExE,MAAM,cAAc,CAAC,UAA8C;AArB1E;AAsBE,QAAM,cAAU,yBAAW,uBAAuB;AAClD,UAAQ,gBAAW,SAAS,gBAApB,mBAAmC;AAC7C;",
6
- "names": []
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,6BAAAE,EAAA,gBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAA0C,iBAC1CC,EAA0B,yBAkBnB,MAAMJ,KAA0B,iBAAoC,IAAI,EAElEC,EAAeI,GAA8C,CArB1E,IAAAC,EAuBE,OAAQA,KADQ,cAAWN,CAAuB,GAC/BI,EAAS,cAApB,YAAAE,EAAmCD,EAC7C",
6
+ "names": ["useFloating_exports", "__export", "FloatingOverrideContext", "useFloating", "__toCommonJS", "import_react", "Floating", "props", "_a"]
7
7
  }
@@ -1,2 +1,2 @@
1
- export * from "@floating-ui/react-dom";
1
+ export*from"@floating-ui/react-dom";
2
2
  //# sourceMappingURL=Floating.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Floating.tsx"],
4
4
  "sourcesContent": ["export * from '@floating-ui/react-dom'\n"],
5
- "mappings": "AAAA,cAAc;",
5
+ "mappings": "AAAA,WAAc",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- export * from "@floating-ui/react-dom";
1
+ export*from"@floating-ui/react-dom";
2
2
  //# sourceMappingURL=Floating.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Floating.tsx"],
4
4
  "sourcesContent": ["export * from '@floating-ui/react-dom'\n"],
5
- "mappings": "AAAA,cAAc;",
5
+ "mappings": "AAAA,WAAc",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- export * from "@floating-ui/react-native";
1
+ export*from"@floating-ui/react-native";
2
2
  //# sourceMappingURL=Floating.native.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Floating.native.tsx"],
4
4
  "sourcesContent": ["import { ComputePositionReturn } from '@floating-ui/react-native'\nimport { RefObject } from 'react'\n\nexport * from '@floating-ui/react-native'\n\nexport declare type UseFloatingReturn = Data & {\n update: () => void\n offsetParent: (node: any) => void\n floating: (node: any) => void\n reference: (node: any) => void\n refs: {\n reference: RefObject<any>\n floating: RefObject<any>\n offsetParent: RefObject<any>\n setReference: (node: any) => void\n setFloating: (node: any) => void\n setOffsetParent: (node: any) => void\n }\n elements: {\n reference: any\n floating: any\n offsetParent: any\n }\n scrollProps: {\n onScroll: (event: {\n nativeEvent: {\n contentOffset: {\n x: number\n y: number\n }\n }\n }) => void\n scrollEventThrottle: 16\n }\n}\n\ntype Data = Omit<ComputePositionReturn, 'x' | 'y'> & {\n x: number | null\n y: number | null\n}\n"],
5
- "mappings": "AAGA,cAAc;",
5
+ "mappings": "AAGA,WAAc",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- export * from "@floating-ui/react-native";
1
+ export*from"@floating-ui/react-native";
2
2
  //# sourceMappingURL=Floating.native.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Floating.native.tsx"],
4
4
  "sourcesContent": ["import { ComputePositionReturn } from '@floating-ui/react-native'\nimport { RefObject } from 'react'\n\nexport * from '@floating-ui/react-native'\n\nexport declare type UseFloatingReturn = Data & {\n update: () => void\n offsetParent: (node: any) => void\n floating: (node: any) => void\n reference: (node: any) => void\n refs: {\n reference: RefObject<any>\n floating: RefObject<any>\n offsetParent: RefObject<any>\n setReference: (node: any) => void\n setFloating: (node: any) => void\n setOffsetParent: (node: any) => void\n }\n elements: {\n reference: any\n floating: any\n offsetParent: any\n }\n scrollProps: {\n onScroll: (event: {\n nativeEvent: {\n contentOffset: {\n x: number\n y: number\n }\n }\n }) => void\n scrollEventThrottle: 16\n }\n}\n\ntype Data = Omit<ComputePositionReturn, 'x' | 'y'> & {\n x: number | null\n y: number | null\n}\n"],
5
- "mappings": "AAGA,cAAc;",
5
+ "mappings": "AAGA,WAAc",
6
6
  "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -1,10 +1,2 @@
1
- export * from "./Floating";
2
- import {
3
- useFloating,
4
- FloatingOverrideContext
5
- } from "./useFloating";
6
- export {
7
- FloatingOverrideContext,
8
- useFloating
9
- };
1
+ export*from"./Floating";import{useFloating as n,FloatingOverrideContext as r}from"./useFloating";export{r as FloatingOverrideContext,n as useFloating};
10
2
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
4
  "sourcesContent": ["export * from './Floating'\nexport {\n useFloating,\n FloatingOverrideContext,\n type UseFloatingProps,\n type UseFloatingReturn,\n type UseFloatingFn,\n} from './useFloating'\n"],
5
- "mappings": "AAAA,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OAIK;",
6
- "names": []
5
+ "mappings": "AAAA,WAAc,aACd,OACE,eAAAA,EACA,2BAAAC,MAIK",
6
+ "names": ["useFloating", "FloatingOverrideContext"]
7
7
  }
@@ -1,10 +1,2 @@
1
- export * from "./Floating";
2
- import {
3
- useFloating,
4
- FloatingOverrideContext
5
- } from "./useFloating";
6
- export {
7
- FloatingOverrideContext,
8
- useFloating
9
- };
1
+ export*from"./Floating";import{useFloating as n,FloatingOverrideContext as r}from"./useFloating";export{r as FloatingOverrideContext,n as useFloating};
10
2
  //# sourceMappingURL=index.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
4
  "sourcesContent": ["export * from './Floating'\nexport {\n useFloating,\n FloatingOverrideContext,\n type UseFloatingProps,\n type UseFloatingReturn,\n type UseFloatingFn,\n} from './useFloating'\n"],
5
- "mappings": "AAAA,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OAIK;",
6
- "names": []
5
+ "mappings": "AAAA,WAAc,aACd,OACE,eAAAA,EACA,2BAAAC,MAIK",
6
+ "names": ["useFloating", "FloatingOverrideContext"]
7
7
  }
@@ -1,13 +1,2 @@
1
- import { useContext, createContext } from "react";
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
- };
9
- export {
10
- FloatingOverrideContext,
11
- useFloating
12
- };
1
+ import{useContext as n,createContext as o}from"react";import*as r from"./Floating";const s=o(null),i=t=>{var e;return(e=n(s)||r.useFloating)==null?void 0:e(t)};export{s as FloatingOverrideContext,i as useFloating};
13
2
  //# sourceMappingURL=useFloating.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/useFloating.tsx"],
4
4
  "sourcesContent": ["import { useContext, createContext } from 'react';\nimport * as Floating from './Floating'\n\nexport type UseFloatingFn = typeof Floating.useFloating;\n\ntype InferFloatingProps = UseFloatingFn extends (props: infer Props) => any\n ? Props\n : never\n\nexport type UseFloatingProps = InferFloatingProps & {\n sameScrollView?: boolean\n}\n\nexport type UseFloatingReturn = Floating.UseFloatingReturn & {\n context?: any\n getFloatingProps?: (props: { ref: any; [key: string]: any }) => any\n getReferenceProps?: (props: { ref: any; [key: string]: any }) => any\n}\n\nexport const FloatingOverrideContext = createContext<UseFloatingFn | null>(null)\n\nexport const useFloating = (props: UseFloatingProps):UseFloatingReturn => {\n const context = useContext(FloatingOverrideContext)\n return (context || Floating.useFloating)?.(props)\n}"],
5
- "mappings": "AAAA,SAAS,YAAY,qBAAqB;AAC1C,YAAY,cAAc;AAkBnB,MAAM,0BAA0B,cAAoC,IAAI;AAExE,MAAM,cAAc,CAAC,UAA8C;AArB1E;AAsBE,QAAM,UAAU,WAAW,uBAAuB;AAClD,UAAQ,gBAAW,SAAS,gBAApB,mBAAmC;AAC7C;",
6
- "names": []
5
+ "mappings": "AAAA,OAAS,cAAAA,EAAY,iBAAAC,MAAqB,QAC1C,UAAYC,MAAc,aAkBnB,MAAMC,EAA0BF,EAAoC,IAAI,EAElEG,EAAeC,GAA8C,CArB1E,IAAAC,EAuBE,OAAQA,EADQN,EAAWG,CAAuB,GAC/BD,EAAS,cAApB,YAAAI,EAAmCD,EAC7C",
6
+ "names": ["useContext", "createContext", "Floating", "FloatingOverrideContext", "useFloating", "props", "_a"]
7
7
  }
@@ -1,13 +1,2 @@
1
- import { useContext, createContext } from "react";
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
- };
9
- export {
10
- FloatingOverrideContext,
11
- useFloating
12
- };
1
+ import{useContext as n,createContext as o}from"react";import*as r from"./Floating";const s=o(null),i=t=>{var e;return(e=n(s)||r.useFloating)==null?void 0:e(t)};export{s as FloatingOverrideContext,i as useFloating};
13
2
  //# sourceMappingURL=useFloating.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/useFloating.tsx"],
4
4
  "sourcesContent": ["import { useContext, createContext } from 'react';\nimport * as Floating from './Floating'\n\nexport type UseFloatingFn = typeof Floating.useFloating;\n\ntype InferFloatingProps = UseFloatingFn extends (props: infer Props) => any\n ? Props\n : never\n\nexport type UseFloatingProps = InferFloatingProps & {\n sameScrollView?: boolean\n}\n\nexport type UseFloatingReturn = Floating.UseFloatingReturn & {\n context?: any\n getFloatingProps?: (props: { ref: any; [key: string]: any }) => any\n getReferenceProps?: (props: { ref: any; [key: string]: any }) => any\n}\n\nexport const FloatingOverrideContext = createContext<UseFloatingFn | null>(null)\n\nexport const useFloating = (props: UseFloatingProps):UseFloatingReturn => {\n const context = useContext(FloatingOverrideContext)\n return (context || Floating.useFloating)?.(props)\n}"],
5
- "mappings": "AAAA,SAAS,YAAY,qBAAqB;AAC1C,YAAY,cAAc;AAkBnB,MAAM,0BAA0B,cAAoC,IAAI;AAExE,MAAM,cAAc,CAAC,UAA8C;AArB1E;AAsBE,QAAM,UAAU,WAAW,uBAAuB;AAClD,UAAQ,gBAAW,SAAS,gBAApB,mBAAmC;AAC7C;",
6
- "names": []
5
+ "mappings": "AAAA,OAAS,cAAAA,EAAY,iBAAAC,MAAqB,QAC1C,UAAYC,MAAc,aAkBnB,MAAMC,EAA0BF,EAAoC,IAAI,EAElEG,EAAeC,GAA8C,CArB1E,IAAAC,EAuBE,OAAQA,EADQN,EAAWG,CAAuB,GAC/BD,EAAS,cAApB,YAAAI,EAAmCD,EAC7C",
6
+ "names": ["useContext", "createContext", "Floating", "FloatingOverrideContext", "useFloating", "props", "_a"]
7
7
  }
@@ -1,2 +1,2 @@
1
- export * from "@floating-ui/react-dom";
1
+ export*from"@floating-ui/react-dom";
2
2
  //# sourceMappingURL=Floating.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Floating.tsx"],
4
4
  "sourcesContent": ["export * from '@floating-ui/react-dom'\n"],
5
- "mappings": "AAAA,cAAc;",
5
+ "mappings": "AAAA,WAAc",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- export * from "@floating-ui/react-dom";
1
+ export*from"@floating-ui/react-dom";
2
2
  //# sourceMappingURL=Floating.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Floating.tsx"],
4
4
  "sourcesContent": ["export * from '@floating-ui/react-dom'\n"],
5
- "mappings": "AAAA,cAAc;",
5
+ "mappings": "AAAA,WAAc",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- export * from "@floating-ui/react-native";
1
+ export*from"@floating-ui/react-native";
2
2
  //# sourceMappingURL=Floating.native.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Floating.native.tsx"],
4
4
  "sourcesContent": ["import { ComputePositionReturn } from '@floating-ui/react-native'\nimport { RefObject } from 'react'\n\nexport * from '@floating-ui/react-native'\n\nexport declare type UseFloatingReturn = Data & {\n update: () => void\n offsetParent: (node: any) => void\n floating: (node: any) => void\n reference: (node: any) => void\n refs: {\n reference: RefObject<any>\n floating: RefObject<any>\n offsetParent: RefObject<any>\n setReference: (node: any) => void\n setFloating: (node: any) => void\n setOffsetParent: (node: any) => void\n }\n elements: {\n reference: any\n floating: any\n offsetParent: any\n }\n scrollProps: {\n onScroll: (event: {\n nativeEvent: {\n contentOffset: {\n x: number\n y: number\n }\n }\n }) => void\n scrollEventThrottle: 16\n }\n}\n\ntype Data = Omit<ComputePositionReturn, 'x' | 'y'> & {\n x: number | null\n y: number | null\n}\n"],
5
- "mappings": "AAGA,cAAc;",
5
+ "mappings": "AAGA,WAAc",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- export * from "@floating-ui/react-native";
1
+ export*from"@floating-ui/react-native";
2
2
  //# sourceMappingURL=Floating.native.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Floating.native.tsx"],
4
4
  "sourcesContent": ["import { ComputePositionReturn } from '@floating-ui/react-native'\nimport { RefObject } from 'react'\n\nexport * from '@floating-ui/react-native'\n\nexport declare type UseFloatingReturn = Data & {\n update: () => void\n offsetParent: (node: any) => void\n floating: (node: any) => void\n reference: (node: any) => void\n refs: {\n reference: RefObject<any>\n floating: RefObject<any>\n offsetParent: RefObject<any>\n setReference: (node: any) => void\n setFloating: (node: any) => void\n setOffsetParent: (node: any) => void\n }\n elements: {\n reference: any\n floating: any\n offsetParent: any\n }\n scrollProps: {\n onScroll: (event: {\n nativeEvent: {\n contentOffset: {\n x: number\n y: number\n }\n }\n }) => void\n scrollEventThrottle: 16\n }\n}\n\ntype Data = Omit<ComputePositionReturn, 'x' | 'y'> & {\n x: number | null\n y: number | null\n}\n"],
5
- "mappings": "AAGA,cAAc;",
5
+ "mappings": "AAGA,WAAc",
6
6
  "names": []
7
7
  }
package/dist/jsx/index.js CHANGED
@@ -1,10 +1,2 @@
1
- export * from "./Floating";
2
- import {
3
- useFloating,
4
- FloatingOverrideContext
5
- } from "./useFloating";
6
- export {
7
- FloatingOverrideContext,
8
- useFloating
9
- };
1
+ export*from"./Floating";import{useFloating as n,FloatingOverrideContext as r}from"./useFloating";export{r as FloatingOverrideContext,n as useFloating};
10
2
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
4
  "sourcesContent": ["export * from './Floating'\nexport {\n useFloating,\n FloatingOverrideContext,\n type UseFloatingProps,\n type UseFloatingReturn,\n type UseFloatingFn,\n} from './useFloating'\n"],
5
- "mappings": "AAAA,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OAIK;",
6
- "names": []
5
+ "mappings": "AAAA,WAAc,aACd,OACE,eAAAA,EACA,2BAAAC,MAIK",
6
+ "names": ["useFloating", "FloatingOverrideContext"]
7
7
  }
@@ -1,10 +1,2 @@
1
- export * from "./Floating";
2
- import {
3
- useFloating,
4
- FloatingOverrideContext
5
- } from "./useFloating";
6
- export {
7
- FloatingOverrideContext,
8
- useFloating
9
- };
1
+ export*from"./Floating";import{useFloating as n,FloatingOverrideContext as r}from"./useFloating";export{r as FloatingOverrideContext,n as useFloating};
10
2
  //# sourceMappingURL=index.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
4
  "sourcesContent": ["export * from './Floating'\nexport {\n useFloating,\n FloatingOverrideContext,\n type UseFloatingProps,\n type UseFloatingReturn,\n type UseFloatingFn,\n} from './useFloating'\n"],
5
- "mappings": "AAAA,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OAIK;",
6
- "names": []
5
+ "mappings": "AAAA,WAAc,aACd,OACE,eAAAA,EACA,2BAAAC,MAIK",
6
+ "names": ["useFloating", "FloatingOverrideContext"]
7
7
  }
@@ -1,12 +1,2 @@
1
- import { useContext, createContext } from "react";
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
- };
8
- export {
9
- FloatingOverrideContext,
10
- useFloating
11
- };
1
+ import{useContext as t,createContext as n}from"react";import*as o from"./Floating";const r=n(null),p=e=>(t(r)||o.useFloating)?.(e);export{r as FloatingOverrideContext,p as useFloating};
12
2
  //# sourceMappingURL=useFloating.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/useFloating.tsx"],
4
4
  "sourcesContent": ["import { useContext, createContext } from 'react';\nimport * as Floating from './Floating'\n\nexport type UseFloatingFn = typeof Floating.useFloating;\n\ntype InferFloatingProps = UseFloatingFn extends (props: infer Props) => any\n ? Props\n : never\n\nexport type UseFloatingProps = InferFloatingProps & {\n sameScrollView?: boolean\n}\n\nexport type UseFloatingReturn = Floating.UseFloatingReturn & {\n context?: any\n getFloatingProps?: (props: { ref: any; [key: string]: any }) => any\n getReferenceProps?: (props: { ref: any; [key: string]: any }) => any\n}\n\nexport const FloatingOverrideContext = createContext<UseFloatingFn | null>(null)\n\nexport const useFloating = (props: UseFloatingProps):UseFloatingReturn => {\n const context = useContext(FloatingOverrideContext)\n return (context || Floating.useFloating)?.(props)\n}"],
5
- "mappings": "AAAA,SAAS,YAAY,qBAAqB;AAC1C,YAAY,cAAc;AAkBnB,MAAM,0BAA0B,cAAoC,IAAI;AAExE,MAAM,cAAc,CAAC,UAA8C;AACxE,QAAM,UAAU,WAAW,uBAAuB;AAClD,UAAQ,WAAW,SAAS,eAAe,KAAK;AAClD;",
6
- "names": []
5
+ "mappings": "AAAA,OAAS,cAAAA,EAAY,iBAAAC,MAAqB,QAC1C,UAAYC,MAAc,aAkBnB,MAAMC,EAA0BF,EAAoC,IAAI,EAElEG,EAAeC,IACVL,EAAWG,CAAuB,GAC/BD,EAAS,eAAeG,CAAK",
6
+ "names": ["useContext", "createContext", "Floating", "FloatingOverrideContext", "useFloating", "props"]
7
7
  }
@@ -1,12 +1,2 @@
1
- import { useContext, createContext } from "react";
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
- };
8
- export {
9
- FloatingOverrideContext,
10
- useFloating
11
- };
1
+ import{useContext as t,createContext as n}from"react";import*as o from"./Floating";const r=n(null),p=e=>(t(r)||o.useFloating)?.(e);export{r as FloatingOverrideContext,p as useFloating};
12
2
  //# sourceMappingURL=useFloating.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/useFloating.tsx"],
4
4
  "sourcesContent": ["import { useContext, createContext } from 'react';\nimport * as Floating from './Floating'\n\nexport type UseFloatingFn = typeof Floating.useFloating;\n\ntype InferFloatingProps = UseFloatingFn extends (props: infer Props) => any\n ? Props\n : never\n\nexport type UseFloatingProps = InferFloatingProps & {\n sameScrollView?: boolean\n}\n\nexport type UseFloatingReturn = Floating.UseFloatingReturn & {\n context?: any\n getFloatingProps?: (props: { ref: any; [key: string]: any }) => any\n getReferenceProps?: (props: { ref: any; [key: string]: any }) => any\n}\n\nexport const FloatingOverrideContext = createContext<UseFloatingFn | null>(null)\n\nexport const useFloating = (props: UseFloatingProps):UseFloatingReturn => {\n const context = useContext(FloatingOverrideContext)\n return (context || Floating.useFloating)?.(props)\n}"],
5
- "mappings": "AAAA,SAAS,YAAY,qBAAqB;AAC1C,YAAY,cAAc;AAkBnB,MAAM,0BAA0B,cAAoC,IAAI;AAExE,MAAM,cAAc,CAAC,UAA8C;AACxE,QAAM,UAAU,WAAW,uBAAuB;AAClD,UAAQ,WAAW,SAAS,eAAe,KAAK;AAClD;",
6
- "names": []
5
+ "mappings": "AAAA,OAAS,cAAAA,EAAY,iBAAAC,MAAqB,QAC1C,UAAYC,MAAc,aAkBnB,MAAMC,EAA0BF,EAAoC,IAAI,EAElEG,EAAeC,IACVL,EAAWG,CAAuB,GAC/BD,EAAS,eAAeG,CAAK",
6
+ "names": ["useContext", "createContext", "Floating", "FloatingOverrideContext", "useFloating", "props"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/floating",
3
- "version": "1.13.2",
3
+ "version": "1.13.4",
4
4
  "sideEffects": true,
5
5
  "source": "src/index.ts",
6
6
  "types": "./types/index.d.ts",
@@ -39,7 +39,7 @@
39
39
  "@floating-ui/react-native": "^0.9.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@tamagui/build": "1.13.2",
42
+ "@tamagui/build": "1.13.4",
43
43
  "react": "^18.2.0",
44
44
  "react-native": "^0.71.4"
45
45
  }