@tamagui/floating 1.1.8

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.
@@ -0,0 +1,19 @@
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);
19
+ //# sourceMappingURL=Floating.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Floating.tsx"],
4
+ "sourcesContent": ["export * from '@floating-ui/react-dom'\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,6BAAc,mCAAd;",
6
+ "names": []
7
+ }
@@ -0,0 +1,19 @@
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);
19
+ //# sourceMappingURL=Floating.native.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Floating.native.tsx"],
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": []
7
+ }
@@ -0,0 +1,33 @@
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
+ });
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx"],
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": []
7
+ }
@@ -0,0 +1,44 @@
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
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var useFloating_exports = {};
26
+ __export(useFloating_exports, {
27
+ FloatingOverrideContext: () => FloatingOverrideContext,
28
+ useFloating: () => useFloating
29
+ });
30
+ module.exports = __toCommonJS(useFloating_exports);
31
+ var import_react = require("react");
32
+ var Floating = __toESM(require("./Floating"));
33
+ const FloatingOverrideContext = (0, import_react.createContext)(null);
34
+ const useFloating = (props) => {
35
+ var _a;
36
+ const context = (0, import_react.useContext)(FloatingOverrideContext);
37
+ return (_a = context || Floating.useFloating) == null ? void 0 : _a(props);
38
+ };
39
+ // Annotate the CommonJS export names for ESM import in node:
40
+ 0 && (module.exports = {
41
+ FloatingOverrideContext,
42
+ useFloating
43
+ });
44
+ //# sourceMappingURL=useFloating.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/useFloating.tsx"],
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": []
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from "@floating-ui/react-dom";
2
+ //# sourceMappingURL=Floating.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Floating.tsx"],
4
+ "sourcesContent": ["export * from '@floating-ui/react-dom'\n"],
5
+ "mappings": "AAAA,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from "@floating-ui/react-native";
2
+ //# sourceMappingURL=Floating.native.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Floating.native.tsx"],
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;",
6
+ "names": []
7
+ }
@@ -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,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx"],
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": []
7
+ }
@@ -0,0 +1,13 @@
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
+ };
13
+ //# sourceMappingURL=useFloating.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/useFloating.tsx"],
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": []
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from "@floating-ui/react-dom";
2
+ //# sourceMappingURL=Floating.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Floating.tsx"],
4
+ "sourcesContent": ["export * from '@floating-ui/react-dom'\n"],
5
+ "mappings": "AAAA,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from "@floating-ui/react-native";
2
+ //# sourceMappingURL=Floating.native.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Floating.native.tsx"],
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;",
6
+ "names": []
7
+ }
@@ -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,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx"],
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": []
7
+ }
@@ -0,0 +1,12 @@
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
+ };
12
+ //# sourceMappingURL=useFloating.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/useFloating.tsx"],
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": []
7
+ }
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@tamagui/floating",
3
+ "version": "1.1.8",
4
+ "sideEffects": true,
5
+ "source": "src/index.ts",
6
+ "types": "./types/index.d.ts",
7
+ "main": "dist/cjs",
8
+ "module": "dist/esm",
9
+ "module:jsx": "dist/jsx",
10
+ "files": [
11
+ "src",
12
+ "types",
13
+ "dist"
14
+ ],
15
+ "exports": {
16
+ "./package.json": "./package.json",
17
+ ".": {
18
+ "types": "./types/index.d.ts",
19
+ "import": "./dist/esm/index.js",
20
+ "require": "./dist/cjs/index.js"
21
+ }
22
+ },
23
+ "scripts": {
24
+ "build": "tamagui-build",
25
+ "watch": "tamagui-build --watch",
26
+ "lint": "../../node_modules/.bin/rome check src",
27
+ "lint:fix": "../../node_modules/.bin/rome check --apply-suggested src",
28
+ "clean": "tamagui-build clean",
29
+ "clean:build": "tamagui-build clean:build"
30
+ },
31
+ "peerDependencies": {
32
+ "react": "*",
33
+ "react-dom": "*"
34
+ },
35
+ "publishConfig": {
36
+ "access": "public"
37
+ },
38
+ "dependencies": {
39
+ "@floating-ui/react-dom": "1.0.0",
40
+ "@floating-ui/react-native": "0.8.0"
41
+ },
42
+ "devDependencies": {
43
+ "@tamagui/build": "^1.1.8",
44
+ "@types/react-dom": "^18.0.3",
45
+ "react": "^18.2.0",
46
+ "react-dom": "^18.2.0",
47
+ "react-native": "*"
48
+ }
49
+ }
@@ -0,0 +1,40 @@
1
+ import { ComputePositionReturn } from '@floating-ui/react-native'
2
+ import { RefObject } from 'react'
3
+
4
+ export * from '@floating-ui/react-native'
5
+
6
+ export declare type UseFloatingReturn = Data & {
7
+ update: () => void
8
+ offsetParent: (node: any) => void
9
+ floating: (node: any) => void
10
+ reference: (node: any) => void
11
+ refs: {
12
+ reference: RefObject<any>
13
+ floating: RefObject<any>
14
+ offsetParent: RefObject<any>
15
+ setReference: (node: any) => void
16
+ setFloating: (node: any) => void
17
+ setOffsetParent: (node: any) => void
18
+ }
19
+ elements: {
20
+ reference: any
21
+ floating: any
22
+ offsetParent: any
23
+ }
24
+ scrollProps: {
25
+ onScroll: (event: {
26
+ nativeEvent: {
27
+ contentOffset: {
28
+ x: number
29
+ y: number
30
+ }
31
+ }
32
+ }) => void
33
+ scrollEventThrottle: 16
34
+ }
35
+ }
36
+
37
+ type Data = Omit<ComputePositionReturn, 'x' | 'y'> & {
38
+ x: number | null
39
+ y: number | null
40
+ }
@@ -0,0 +1 @@
1
+ export * from '@floating-ui/react-dom'
package/src/index.tsx ADDED
@@ -0,0 +1,8 @@
1
+ export * from './Floating'
2
+ export {
3
+ useFloating,
4
+ FloatingOverrideContext,
5
+ type UseFloatingProps,
6
+ type UseFloatingReturn,
7
+ type UseFloatingFn,
8
+ } from './useFloating'
@@ -0,0 +1,25 @@
1
+ import { useContext, createContext } from 'react';
2
+ import * as Floating from './Floating'
3
+
4
+ export type UseFloatingFn = typeof Floating.useFloating;
5
+
6
+ type InferFloatingProps = UseFloatingFn extends (props: infer Props) => any
7
+ ? Props
8
+ : never
9
+
10
+ export type UseFloatingProps = InferFloatingProps & {
11
+ sameScrollView?: boolean
12
+ }
13
+
14
+ export type UseFloatingReturn = Floating.UseFloatingReturn & {
15
+ context?: any
16
+ getFloatingProps?: (props: { ref: any; [key: string]: any }) => any
17
+ getReferenceProps?: (props: { ref: any; [key: string]: any }) => any
18
+ }
19
+
20
+ export const FloatingOverrideContext = createContext<UseFloatingFn | null>(null)
21
+
22
+ export const useFloating = (props: UseFloatingProps):UseFloatingReturn => {
23
+ const context = useContext(FloatingOverrideContext)
24
+ return (context || Floating.useFloating)?.(props)
25
+ }
@@ -0,0 +1,2 @@
1
+ export * from '@floating-ui/react-dom';
2
+ //# sourceMappingURL=Floating.d.ts.map
@@ -0,0 +1,38 @@
1
+ import { ComputePositionReturn } from '@floating-ui/react-native';
2
+ import { RefObject } from 'react';
3
+ export * from '@floating-ui/react-native';
4
+ export declare type UseFloatingReturn = Data & {
5
+ update: () => void;
6
+ offsetParent: (node: any) => void;
7
+ floating: (node: any) => void;
8
+ reference: (node: any) => void;
9
+ refs: {
10
+ reference: RefObject<any>;
11
+ floating: RefObject<any>;
12
+ offsetParent: RefObject<any>;
13
+ setReference: (node: any) => void;
14
+ setFloating: (node: any) => void;
15
+ setOffsetParent: (node: any) => void;
16
+ };
17
+ elements: {
18
+ reference: any;
19
+ floating: any;
20
+ offsetParent: any;
21
+ };
22
+ scrollProps: {
23
+ onScroll: (event: {
24
+ nativeEvent: {
25
+ contentOffset: {
26
+ x: number;
27
+ y: number;
28
+ };
29
+ };
30
+ }) => void;
31
+ scrollEventThrottle: 16;
32
+ };
33
+ };
34
+ type Data = Omit<ComputePositionReturn, 'x' | 'y'> & {
35
+ x: number | null;
36
+ y: number | null;
37
+ };
38
+ //# sourceMappingURL=Floating.native.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './Floating';
2
+ export { useFloating, FloatingOverrideContext, type UseFloatingProps, type UseFloatingReturn, type UseFloatingFn, } from './useFloating';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ import * as Floating from './Floating';
3
+ export type UseFloatingFn = typeof Floating.useFloating;
4
+ type InferFloatingProps = UseFloatingFn extends (props: infer Props) => any ? Props : never;
5
+ export type UseFloatingProps = InferFloatingProps & {
6
+ sameScrollView?: boolean;
7
+ };
8
+ export type UseFloatingReturn = Floating.UseFloatingReturn & {
9
+ context?: any;
10
+ getFloatingProps?: (props: {
11
+ ref: any;
12
+ [key: string]: any;
13
+ }) => any;
14
+ getReferenceProps?: (props: {
15
+ ref: any;
16
+ [key: string]: any;
17
+ }) => any;
18
+ };
19
+ export declare const FloatingOverrideContext: import("react").Context<typeof Floating.useFloating | null>;
20
+ export declare const useFloating: (props: UseFloatingProps) => UseFloatingReturn;
21
+ export {};
22
+ //# sourceMappingURL=useFloating.d.ts.map