@tamagui/floating 1.14.1 → 1.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Floating.js +18 -1
- package/dist/cjs/Floating.js.map +2 -2
- package/dist/cjs/Floating.native.js +18 -1
- package/dist/cjs/Floating.native.js.map +2 -2
- package/dist/cjs/index.js +32 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/useFloating.js +47 -1
- package/dist/cjs/useFloating.js.map +2 -2
- package/dist/esm/Floating.js +1 -1
- package/dist/esm/Floating.js.map +1 -1
- package/dist/esm/Floating.mjs +1 -1
- package/dist/esm/Floating.mjs.map +1 -1
- package/dist/esm/Floating.native.js +1 -1
- package/dist/esm/Floating.native.js.map +1 -1
- package/dist/esm/Floating.native.mjs +1 -1
- package/dist/esm/Floating.native.mjs.map +1 -1
- package/dist/esm/index.js +9 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/index.mjs +9 -1
- package/dist/esm/index.mjs.map +2 -2
- package/dist/esm/useFloating.js +12 -1
- package/dist/esm/useFloating.js.map +2 -2
- package/dist/esm/useFloating.mjs +12 -1
- package/dist/esm/useFloating.mjs.map +2 -2
- package/dist/jsx/Floating.js +1 -1
- package/dist/jsx/Floating.js.map +1 -1
- package/dist/jsx/Floating.mjs +1 -1
- package/dist/jsx/Floating.mjs.map +1 -1
- package/dist/jsx/Floating.native.js +1 -1
- package/dist/jsx/Floating.native.js.map +1 -1
- package/dist/jsx/Floating.native.mjs +1 -1
- package/dist/jsx/Floating.native.mjs.map +1 -1
- package/dist/jsx/index.js +9 -1
- package/dist/jsx/index.js.map +2 -2
- package/dist/jsx/index.mjs +9 -1
- package/dist/jsx/index.mjs.map +2 -2
- package/dist/jsx/useFloating.js +11 -1
- package/dist/jsx/useFloating.js.map +2 -2
- package/dist/jsx/useFloating.mjs +11 -1
- package/dist/jsx/useFloating.mjs.map +2 -2
- package/package.json +2 -2
package/dist/cjs/Floating.js
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
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);
|
|
2
19
|
//# sourceMappingURL=Floating.js.map
|
package/dist/cjs/Floating.js.map
CHANGED
|
@@ -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": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,6BAAc,mCAAd;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
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);
|
|
2
19
|
//# 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": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAGA,oCAAc,sCAHd;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
+
});
|
|
2
33
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -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": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,uBAAd;AACA,yBAMO;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/cjs/useFloating.js
CHANGED
|
@@ -1,2 +1,48 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
+
});
|
|
2
48
|
//# 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": "
|
|
6
|
-
"names": [
|
|
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
7
|
}
|
package/dist/esm/Floating.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export*from"@floating-ui/react-dom";
|
|
1
|
+
export * from "@floating-ui/react-dom";
|
|
2
2
|
//# sourceMappingURL=Floating.js.map
|
package/dist/esm/Floating.js.map
CHANGED
package/dist/esm/Floating.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export*from"@floating-ui/react-dom";
|
|
1
|
+
export * from "@floating-ui/react-dom";
|
|
2
2
|
//# sourceMappingURL=Floating.mjs.map
|
|
@@ -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,
|
|
5
|
+
"mappings": "AAGA,cAAc;",
|
|
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,
|
|
5
|
+
"mappings": "AAGA,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
export*from"./Floating";
|
|
1
|
+
export * from "./Floating";
|
|
2
|
+
import {
|
|
3
|
+
useFloating,
|
|
4
|
+
FloatingOverrideContext
|
|
5
|
+
} from "./useFloating";
|
|
6
|
+
export {
|
|
7
|
+
FloatingOverrideContext,
|
|
8
|
+
useFloating
|
|
9
|
+
};
|
|
2
10
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -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,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OAIK;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
export*from"./Floating";
|
|
1
|
+
export * from "./Floating";
|
|
2
|
+
import {
|
|
3
|
+
useFloating,
|
|
4
|
+
FloatingOverrideContext
|
|
5
|
+
} from "./useFloating";
|
|
6
|
+
export {
|
|
7
|
+
FloatingOverrideContext,
|
|
8
|
+
useFloating
|
|
9
|
+
};
|
|
2
10
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -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,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OAIK;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/esm/useFloating.js
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import{useContext
|
|
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
|
+
};
|
|
2
13
|
//# 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,
|
|
6
|
-
"names": [
|
|
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
7
|
}
|
package/dist/esm/useFloating.mjs
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import{useContext
|
|
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
|
+
};
|
|
2
13
|
//# 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,
|
|
6
|
-
"names": [
|
|
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
7
|
}
|
package/dist/jsx/Floating.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export*from"@floating-ui/react-dom";
|
|
1
|
+
export * from "@floating-ui/react-dom";
|
|
2
2
|
//# sourceMappingURL=Floating.js.map
|
package/dist/jsx/Floating.js.map
CHANGED
package/dist/jsx/Floating.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export*from"@floating-ui/react-dom";
|
|
1
|
+
export * from "@floating-ui/react-dom";
|
|
2
2
|
//# sourceMappingURL=Floating.mjs.map
|
|
@@ -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,
|
|
5
|
+
"mappings": "AAGA,cAAc;",
|
|
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,
|
|
5
|
+
"mappings": "AAGA,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/index.js
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
export*from"./Floating";
|
|
1
|
+
export * from "./Floating";
|
|
2
|
+
import {
|
|
3
|
+
useFloating,
|
|
4
|
+
FloatingOverrideContext
|
|
5
|
+
} from "./useFloating";
|
|
6
|
+
export {
|
|
7
|
+
FloatingOverrideContext,
|
|
8
|
+
useFloating
|
|
9
|
+
};
|
|
2
10
|
//# sourceMappingURL=index.js.map
|
package/dist/jsx/index.js.map
CHANGED
|
@@ -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,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OAIK;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/jsx/index.mjs
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
export*from"./Floating";
|
|
1
|
+
export * from "./Floating";
|
|
2
|
+
import {
|
|
3
|
+
useFloating,
|
|
4
|
+
FloatingOverrideContext
|
|
5
|
+
} from "./useFloating";
|
|
6
|
+
export {
|
|
7
|
+
FloatingOverrideContext,
|
|
8
|
+
useFloating
|
|
9
|
+
};
|
|
2
10
|
//# sourceMappingURL=index.mjs.map
|
package/dist/jsx/index.mjs.map
CHANGED
|
@@ -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,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OAIK;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/jsx/useFloating.js
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import{useContext
|
|
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
|
+
};
|
|
2
12
|
//# 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,
|
|
6
|
-
"names": [
|
|
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
7
|
}
|
package/dist/jsx/useFloating.mjs
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import{useContext
|
|
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
|
+
};
|
|
2
12
|
//# 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,
|
|
6
|
-
"names": [
|
|
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
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/floating",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.2",
|
|
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.14.
|
|
42
|
+
"@tamagui/build": "1.14.2",
|
|
43
43
|
"react": "^18.2.0",
|
|
44
44
|
"react-native": "^0.71.4"
|
|
45
45
|
}
|