@tamagui/popover 2.7.7 → 3.0.0-beta.1091.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/cjs/Popover.cjs +522 -665
  2. package/dist/cjs/Popover.native.cjs +615 -0
  3. package/dist/cjs/Popover.native.js +549 -692
  4. package/dist/cjs/Popover.native.js.map +1 -1
  5. package/dist/cjs/index.cjs +9 -11
  6. package/dist/cjs/index.native.cjs +21 -0
  7. package/dist/cjs/index.native.js +9 -10
  8. package/dist/cjs/index.native.js.map +1 -1
  9. package/dist/cjs/useFloatingContext.cjs +213 -234
  10. package/dist/cjs/useFloatingContext.native.cjs +35 -0
  11. package/dist/cjs/useFloatingContext.native.js +19 -27
  12. package/dist/cjs/useFloatingContext.native.js.map +1 -1
  13. package/dist/esm/Popover.mjs +487 -618
  14. package/dist/esm/Popover.mjs.map +1 -1
  15. package/dist/esm/Popover.native.js +513 -645
  16. package/dist/esm/Popover.native.js.map +1 -1
  17. package/dist/esm/index.js +3 -3
  18. package/dist/esm/index.mjs +3 -3
  19. package/dist/esm/index.native.js +3 -3
  20. package/dist/esm/useFloatingContext.mjs +198 -208
  21. package/dist/esm/useFloatingContext.mjs.map +1 -1
  22. package/dist/esm/useFloatingContext.native.js +4 -2
  23. package/dist/esm/useFloatingContext.native.js.map +1 -1
  24. package/dist/jsx/Popover.mjs +487 -618
  25. package/dist/jsx/Popover.mjs.map +1 -1
  26. package/dist/jsx/Popover.native.cjs +615 -0
  27. package/dist/jsx/Popover.native.js +549 -692
  28. package/dist/jsx/Popover.native.js.map +1 -1
  29. package/dist/jsx/index.js +3 -3
  30. package/dist/jsx/index.mjs +3 -3
  31. package/dist/jsx/index.native.cjs +21 -0
  32. package/dist/jsx/index.native.js +9 -10
  33. package/dist/jsx/index.native.js.map +1 -1
  34. package/dist/jsx/useFloatingContext.mjs +198 -208
  35. package/dist/jsx/useFloatingContext.mjs.map +1 -1
  36. package/dist/jsx/useFloatingContext.native.cjs +35 -0
  37. package/dist/jsx/useFloatingContext.native.js +19 -27
  38. package/dist/jsx/useFloatingContext.native.js.map +1 -1
  39. package/package.json +24 -23
  40. package/src/Popover.tsx +157 -154
  41. package/src/useFloatingContext.tsx +15 -7
  42. package/types/Popover.d.ts +40 -112
  43. package/types/Popover.d.ts.map +1 -1
  44. package/types/useFloatingContext.d.ts +5 -2
  45. package/types/useFloatingContext.d.ts.map +1 -1
  46. package/dist/esm/index.js.map +0 -1
  47. package/dist/esm/index.mjs.map +0 -1
  48. package/dist/esm/index.native.js.map +0 -1
  49. package/dist/jsx/index.js.map +0 -1
  50. package/dist/jsx/index.mjs.map +0 -1
@@ -5,245 +5,224 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
12
  };
13
13
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
21
  };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: true
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
30
25
  }) : target, mod));
31
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: true
33
- }), mod);
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
27
  var useFloatingContext_exports = {};
35
- __export(useFloatingContext_exports, {
36
- useFloatingContext: () => useFloatingContext
37
- });
28
+ __export(useFloatingContext_exports, { useFloatingContext: () => useFloatingContext });
38
29
  module.exports = __toCommonJS(useFloatingContext_exports);
39
30
  var import_react = __toESM(require("react"), 1);
40
31
  var import_floating = require("@tamagui/floating");
41
- const useFloatingContext = ({
42
- open,
43
- setOpen,
44
- disable,
45
- disableFocus,
46
- hoverable,
47
- role: roleProp = "dialog",
48
- focus: focusProp,
49
- groupId,
50
- delay: delayProp,
51
- restMs: restMsProp
52
- }) => {
53
- "use no memo";
54
-
55
- const openRef = import_react.default.useRef(open);
56
- openRef.current = open;
57
- const hoverableRef = import_react.default.useRef(hoverable);
58
- hoverableRef.current = hoverable;
59
- const disableRef = import_react.default.useRef(disable);
60
- disableRef.current = disable;
61
- const disableFocusRef = import_react.default.useRef(disableFocus);
62
- disableFocusRef.current = disableFocus;
63
- const roleRef = import_react.default.useRef(roleProp);
64
- roleRef.current = roleProp;
65
- const focusRef = import_react.default.useRef(focusProp);
66
- focusRef.current = focusProp;
67
- const groupIdRef = import_react.default.useRef(groupId);
68
- groupIdRef.current = groupId;
69
- const delayRef = import_react.default.useRef(delayProp);
70
- delayRef.current = delayProp;
71
- const restMsRef = import_react.default.useRef(restMsProp);
72
- restMsRef.current = restMsProp;
73
- const events = import_react.default.useMemo(() => (0, import_floating.createFloatingEvents)(), []);
74
- const triggerElements = import_react.default.useMemo(() => new import_floating.PopupTriggerMap(), []);
75
- import_react.default.useEffect(() => {
76
- events.emit("openchange", {
77
- open
78
- });
79
- }, [open, events]);
80
- return import_react.default.useCallback(props => {
81
- const onTriggerRef = import_react.default.useRef(false);
82
- const restTimerRef = import_react.default.useRef(void 0);
83
- const graceRef = import_react.default.useRef(void 0);
84
- const pendingCloseRef = import_react.default.useRef(false);
85
- const isOverFloatingRef = import_react.default.useRef(false);
86
- const handleCloseActiveRef = import_react.default.useRef(false);
87
- import_react.default.useEffect(() => {
88
- return () => {
89
- clearTimeout(restTimerRef.current);
90
- clearTimeout(graceRef.current);
91
- };
92
- }, []);
93
- const onOpenChange = (val, event) => {
94
- if (val && event?.type === "mouseenter") {
95
- return;
96
- }
97
- if (!val && onTriggerRef.current && (event?.type === "mousemove" || event?.type === "mouseleave")) {
98
- pendingCloseRef.current = true;
99
- return;
100
- }
101
- const type = event?.type === "mousemove" || event?.type === "mouseenter" || event?.type === "mouseleave" ? "hover" : "press";
102
- setOpen(val, type);
103
- };
104
- const floating = (0, import_floating.useFloatingRaw)({
105
- ...props,
106
- open: openRef.current
107
- });
108
- const currentHoverable = hoverableRef.current;
109
- const dataRef = import_react.default.useRef({});
110
- dataRef.current.placement = floating.placement;
111
- const floatingRefs = floating.refs;
112
- const nullRef = {
113
- current: null
114
- };
115
- const interactionContext = {
116
- open: openRef.current,
117
- onOpenChange,
118
- refs: {
119
- reference: floatingRefs?.reference || nullRef,
120
- floating: floatingRefs?.floating || nullRef,
121
- domReference: floatingRefs?.reference || nullRef
122
- },
123
- elements: {
124
- get reference() {
125
- return floatingRefs?.reference?.current || null;
126
- },
127
- get floating() {
128
- return floatingRefs?.floating?.current || null;
129
- },
130
- get domReference() {
131
- return floatingRefs?.reference?.current || null;
132
- }
133
- },
134
- dataRef,
135
- events,
136
- triggerElements,
137
- handleCloseActiveRef
138
- };
139
- const {
140
- delay: groupDelay,
141
- currentId: groupCurrentId
142
- } = (0, import_floating.useDelayGroup)(interactionContext, {
143
- id: groupIdRef.current
144
- });
145
- const isInActiveGroup = groupIdRef.current && groupCurrentId != null && typeof groupDelay === "object";
146
- let delay;
147
- let restMs;
148
- if (isInActiveGroup) {
149
- delay = groupDelay;
150
- restMs = 0;
151
- } else if (delayRef.current !== void 0) {
152
- delay = delayRef.current;
153
- restMs = restMsRef.current ?? 0;
154
- } else {
155
- delay = currentHoverable && typeof currentHoverable === "object" ? currentHoverable.delay ?? 0 : 0;
156
- restMs = currentHoverable && typeof currentHoverable === "object" ? currentHoverable.restMs ?? 0 : 0;
157
- }
158
- const currentRole = roleRef.current;
159
- const currentFocus = focusRef.current;
160
- const {
161
- getReferenceProps,
162
- getFloatingProps: getFloatingPropsInner
163
- } = (0, import_floating.useInteractions)([currentHoverable ? (0, import_floating.useHover)(interactionContext, {
164
- enabled: !disableRef.current && !!currentHoverable,
165
- delay,
166
- restMs,
167
- handleClose: (0, import_floating.safePolygon)({
168
- requireIntent: true,
169
- buffer: 1,
170
- __debug: typeof window !== "undefined" && new URLSearchParams(window.location.search).get("debug") === "safePolygon"
171
- }),
172
- ...(typeof currentHoverable === "object" && currentHoverable)
173
- }) : (0, import_floating.useHover)(interactionContext, {
174
- enabled: false
175
- }), (0, import_floating.useFocus)(interactionContext, {
176
- enabled: !disableRef.current && !disableFocusRef.current,
177
- visibleOnly: true,
178
- ...currentFocus
179
- }), (0, import_floating.useRole)(interactionContext, {
180
- role: currentRole
181
- })]);
182
- const getFloatingProps = currentHoverable ? userProps => {
183
- const merged = getFloatingPropsInner(userProps);
184
- const origEnter = merged.onMouseEnter;
185
- const origLeave = merged.onMouseLeave;
186
- return {
187
- ...merged,
188
- onMouseEnter: e => {
189
- isOverFloatingRef.current = true;
190
- origEnter?.(e);
191
- },
192
- onMouseLeave: e => {
193
- isOverFloatingRef.current = false;
194
- origLeave?.(e);
195
- }
196
- };
197
- } : getFloatingPropsInner;
198
- const openDelay = typeof delay === "number" ? delay : delay?.open ?? 0;
199
- const closeDelay = typeof delay === "number" ? delay : delay?.close ?? 0;
200
- const setOpenWithDelay = () => {
201
- clearTimeout(restTimerRef.current);
202
- if (restMs && !openDelay) {
203
- restTimerRef.current = setTimeout(() => {
204
- setOpen(true, "hover");
205
- }, restMs);
206
- } else if (openDelay) {
207
- restTimerRef.current = setTimeout(() => {
208
- setOpen(true, "hover");
209
- }, openDelay);
210
- } else {
211
- setOpen(true, "hover");
212
- }
213
- };
214
- return {
215
- ...floating,
216
- open: openRef.current,
217
- triggerElements,
218
- getReferenceProps,
219
- getFloatingProps,
220
- onHoverReference: currentHoverable ? _event => {
221
- clearTimeout(graceRef.current);
222
- onTriggerRef.current = true;
223
- pendingCloseRef.current = false;
224
- clearTimeout(restTimerRef.current);
225
- if (openRef.current) return;
226
- setOpenWithDelay();
227
- } : void 0,
228
- onLeaveReference: currentHoverable ? () => {
229
- clearTimeout(restTimerRef.current);
230
- clearTimeout(graceRef.current);
231
- graceRef.current = setTimeout(() => {
232
- onTriggerRef.current = false;
233
- if (pendingCloseRef.current) {
234
- pendingCloseRef.current = false;
235
- setOpen(false, "hover");
236
- return;
237
- }
238
- if (openRef.current) {
239
- graceRef.current = setTimeout(() => {
240
- if (openRef.current && !isOverFloatingRef.current && !handleCloseActiveRef.current) {
241
- setOpen(false, "hover");
242
- }
243
- }, Math.max(250, closeDelay));
244
- }
245
- }, 40);
246
- } : void 0
247
- };
248
- }, [setOpen]);
249
- };
32
+ const useFloatingContext = ({ open, setOpen, disable, disableFocus, hoverable, role: roleProp = "dialog", focus: focusProp, groupId, delay: delayProp, restMs: restMsProp, closeReasonRef }) => {
33
+ "use no memo";
34
+ const openRef = import_react.default.useRef(open);
35
+ openRef.current = open;
36
+ const hoverableRef = import_react.default.useRef(hoverable);
37
+ hoverableRef.current = hoverable;
38
+ const disableRef = import_react.default.useRef(disable);
39
+ disableRef.current = disable;
40
+ const disableFocusRef = import_react.default.useRef(disableFocus);
41
+ disableFocusRef.current = disableFocus;
42
+ const roleRef = import_react.default.useRef(roleProp);
43
+ roleRef.current = roleProp;
44
+ const focusRef = import_react.default.useRef(focusProp);
45
+ focusRef.current = focusProp;
46
+ const groupIdRef = import_react.default.useRef(groupId);
47
+ groupIdRef.current = groupId;
48
+ const delayRef = import_react.default.useRef(delayProp);
49
+ delayRef.current = delayProp;
50
+ const restMsRef = import_react.default.useRef(restMsProp);
51
+ restMsRef.current = restMsProp;
52
+ const events = import_react.default.useMemo(() => (0, import_floating.createFloatingEvents)(), []);
53
+ const triggerElements = import_react.default.useMemo(() => new import_floating.PopupTriggerMap(), []);
54
+ import_react.default.useEffect(() => {
55
+ const reason = closeReasonRef?.current;
56
+ if (closeReasonRef) {
57
+ closeReasonRef.current = void 0;
58
+ }
59
+ events.emit("openchange", {
60
+ open,
61
+ reason: open ? void 0 : reason
62
+ });
63
+ }, [
64
+ open,
65
+ events,
66
+ closeReasonRef
67
+ ]);
68
+ return import_react.default.useCallback((props) => {
69
+ const onTriggerRef = import_react.default.useRef(false);
70
+ const restTimerRef = import_react.default.useRef(void 0);
71
+ const graceRef = import_react.default.useRef(void 0);
72
+ const pendingCloseRef = import_react.default.useRef(false);
73
+ const isOverFloatingRef = import_react.default.useRef(false);
74
+ const handleCloseActiveRef = import_react.default.useRef(false);
75
+ import_react.default.useEffect(() => {
76
+ return () => {
77
+ clearTimeout(restTimerRef.current);
78
+ clearTimeout(graceRef.current);
79
+ };
80
+ }, []);
81
+ const onOpenChange = (val, event, reason) => {
82
+ if (val && event?.type === "mouseenter") {
83
+ return;
84
+ }
85
+ if (!val && onTriggerRef.current && (event?.type === "mousemove" || event?.type === "mouseleave")) {
86
+ pendingCloseRef.current = true;
87
+ return;
88
+ }
89
+ const type = event?.type === "mousemove" || event?.type === "mouseenter" || event?.type === "mouseleave" ? "hover" : "press";
90
+ if (closeReasonRef) closeReasonRef.current = reason;
91
+ setOpen(val, type);
92
+ };
93
+ const floating = (0, import_floating.useFloatingRaw)({
94
+ ...props,
95
+ open: openRef.current
96
+ });
97
+ const currentHoverable = hoverableRef.current;
98
+ const dataRef = import_react.default.useRef({});
99
+ dataRef.current.placement = floating.placement;
100
+ const floatingRefs = floating.refs;
101
+ const nullRef = { current: null };
102
+ const interactionContext = {
103
+ open: openRef.current,
104
+ onOpenChange,
105
+ refs: {
106
+ reference: floatingRefs?.reference || nullRef,
107
+ floating: floatingRefs?.floating || nullRef,
108
+ domReference: floatingRefs?.reference || nullRef
109
+ },
110
+ elements: {
111
+ get reference() {
112
+ return floatingRefs?.reference?.current || null;
113
+ },
114
+ get floating() {
115
+ return floatingRefs?.floating?.current || null;
116
+ },
117
+ get domReference() {
118
+ return floatingRefs?.reference?.current || null;
119
+ }
120
+ },
121
+ dataRef,
122
+ events,
123
+ triggerElements,
124
+ handleCloseActiveRef
125
+ };
126
+ const { delay: groupDelay, currentId: groupCurrentId } = (0, import_floating.useDelayGroup)(interactionContext, { id: groupIdRef.current });
127
+ const isInActiveGroup = groupIdRef.current && groupCurrentId != null && typeof groupDelay === "object";
128
+ let delay;
129
+ let restMs;
130
+ if (isInActiveGroup) {
131
+ delay = groupDelay;
132
+ restMs = 0;
133
+ } else if (delayRef.current !== void 0) {
134
+ delay = delayRef.current;
135
+ restMs = restMsRef.current ?? 0;
136
+ } else {
137
+ delay = currentHoverable && typeof currentHoverable === "object" ? currentHoverable.delay ?? 0 : 0;
138
+ restMs = currentHoverable && typeof currentHoverable === "object" ? currentHoverable.restMs ?? 0 : 0;
139
+ }
140
+ const currentRole = roleRef.current;
141
+ const currentFocus = focusRef.current;
142
+ const { getReferenceProps, getFloatingProps: getFloatingPropsInner } = (0, import_floating.useInteractions)([
143
+ currentHoverable ? (0, import_floating.useHover)(interactionContext, {
144
+ enabled: !disableRef.current && !!currentHoverable,
145
+ delay,
146
+ restMs,
147
+ handleClose: (0, import_floating.safePolygon)({
148
+ requireIntent: true,
149
+ buffer: 1,
150
+ __debug: typeof window !== "undefined" && new URLSearchParams(window.location.search).get("debug") === "safePolygon"
151
+ }),
152
+ ...typeof currentHoverable === "object" && currentHoverable
153
+ }) : (0, import_floating.useHover)(interactionContext, { enabled: false }),
154
+ (0, import_floating.useFocus)(interactionContext, {
155
+ enabled: !disableRef.current && !disableFocusRef.current,
156
+ visibleOnly: true,
157
+ ...currentFocus
158
+ }),
159
+ (0, import_floating.useRole)(interactionContext, { role: currentRole })
160
+ ]);
161
+ const getFloatingProps = currentHoverable ? (userProps) => {
162
+ const merged = getFloatingPropsInner(userProps);
163
+ const origEnter = merged.onMouseEnter;
164
+ const origLeave = merged.onMouseLeave;
165
+ return {
166
+ ...merged,
167
+ onMouseEnter: (e) => {
168
+ isOverFloatingRef.current = true;
169
+ origEnter?.(e);
170
+ },
171
+ onMouseLeave: (e) => {
172
+ isOverFloatingRef.current = false;
173
+ origLeave?.(e);
174
+ }
175
+ };
176
+ } : getFloatingPropsInner;
177
+ const openDelay = typeof delay === "number" ? delay : delay?.open ?? 0;
178
+ const closeDelay = typeof delay === "number" ? delay : delay?.close ?? 0;
179
+ const setOpenWithDelay = () => {
180
+ clearTimeout(restTimerRef.current);
181
+ if (restMs && !openDelay) {
182
+ restTimerRef.current = setTimeout(() => {
183
+ setOpen(true, "hover");
184
+ }, restMs);
185
+ } else if (openDelay) {
186
+ restTimerRef.current = setTimeout(() => {
187
+ setOpen(true, "hover");
188
+ }, openDelay);
189
+ } else {
190
+ setOpen(true, "hover");
191
+ }
192
+ };
193
+ return {
194
+ ...floating,
195
+ open: openRef.current,
196
+ triggerElements,
197
+ getReferenceProps,
198
+ getFloatingProps,
199
+ onHoverReference: currentHoverable ? (_event) => {
200
+ clearTimeout(graceRef.current);
201
+ onTriggerRef.current = true;
202
+ pendingCloseRef.current = false;
203
+ clearTimeout(restTimerRef.current);
204
+ if (openRef.current) return;
205
+ setOpenWithDelay();
206
+ } : void 0,
207
+ onLeaveReference: currentHoverable ? () => {
208
+ clearTimeout(restTimerRef.current);
209
+ clearTimeout(graceRef.current);
210
+ graceRef.current = setTimeout(() => {
211
+ onTriggerRef.current = false;
212
+ if (pendingCloseRef.current) {
213
+ pendingCloseRef.current = false;
214
+ setOpen(false, "hover");
215
+ return;
216
+ }
217
+ if (openRef.current) {
218
+ graceRef.current = setTimeout(() => {
219
+ if (openRef.current && !isOverFloatingRef.current && !handleCloseActiveRef.current) {
220
+ setOpen(false, "hover");
221
+ }
222
+ }, Math.max(250, closeDelay));
223
+ }
224
+ }, 40);
225
+ } : void 0
226
+ };
227
+ }, [setOpen, closeReasonRef]);
228
+ };
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
+ get: () => from[key],
19
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
+ });
21
+ }
22
+ return to;
23
+ };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
25
+ value: mod,
26
+ enumerable: true
27
+ }) : target, mod));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var useFloatingContext_native_exports = {};
30
+ __export(useFloatingContext_native_exports, { useFloatingContext: () => useFloatingContext });
31
+ module.exports = __toCommonJS(useFloatingContext_native_exports);
32
+ var import_react = __toESM(require("react"), 1);
33
+ var useFloatingContext = function() {
34
+ return import_react.default.useCallback(function() {}, []);
35
+ };
@@ -7,39 +7,31 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: true
13
- });
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
14
  };
15
15
  var __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from === "object" || typeof from === "function") {
17
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
- get: () => from[key],
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
+ get: () => from[key],
19
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
+ });
21
+ }
22
+ return to;
23
23
  };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
- // If the importer is in node compatibility mode or this is not an ESM
26
- // file that has been converted to a CommonJS file using a Babel-
27
- // compatible transform (i.e. "__esModule" has not been set), then set
28
- // "default" to the CommonJS "module.exports" for node compatibility.
29
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
- value: mod,
31
- enumerable: true
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
25
+ value: mod,
26
+ enumerable: true
32
27
  }) : target, mod));
33
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
- value: true
35
- }), mod);
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
29
  var useFloatingContext_native_exports = {};
37
- __export(useFloatingContext_native_exports, {
38
- useFloatingContext: () => useFloatingContext
39
- });
30
+ __export(useFloatingContext_native_exports, { useFloatingContext: () => useFloatingContext });
40
31
  module.exports = __toCommonJS(useFloatingContext_native_exports);
41
32
  var import_react = __toESM(require("react"), 1);
42
- var useFloatingContext = function () {
43
- return import_react.default.useCallback(function () {}, []);
33
+ var useFloatingContext = function() {
34
+ return import_react.default.useCallback(function() {}, []);
44
35
  };
36
+
45
37
  //# sourceMappingURL=useFloatingContext.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useFloatingContext_native_exports","__export","useFloatingContext","module","exports","__toCommonJS","import_react","__toESM","require","default","useCallback"],"sources":["../../src/useFloatingContext.native.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,iCAAA;AAAAC,QAAA,CAAAD,iCAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAL,iCAAA;AAAA,IAAAM,YAAA,GAAkBC,OAAA,CAAAC,OAAA;AAEX,IAAIN,kBAAA,GAAqB,SAAAA,CAAA,EAAW;EACvC,OAAOI,YAAA,CAAAG,OAAA,CAAMC,WAAA,CAAY,YAAW,CAAC,GAAG,EAAE;AAC9C","ignoreList":[]}
1
+ {"version":3,"file":"useFloatingContext.native.js","names":[],"sources":["cjs/useFloatingContext.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar useFloatingContext_native_exports = {};\n__export(useFloatingContext_native_exports, {\n useFloatingContext: () => useFloatingContext\n});\nmodule.exports = __toCommonJS(useFloatingContext_native_exports);\nvar import_react = __toESM(require(\"react\"), 1);\nvar useFloatingContext = function() {\n return import_react.default.useCallback(function() {\n }, []);\n};\n//# sourceMappingURL=useFloatingContext.native.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,oCAAoC,CAAC;AACzC,SAAS,mCAAmC,EAC1C,0BAA0B,mBAC5B,CAAC;AACD,OAAO,UAAU,aAAa,iCAAiC;AAC/D,IAAI,eAAe,QAAQ,QAAQ,OAAO,GAAG,CAAC;AAC9C,IAAI,qBAAqB,WAAW;CAClC,OAAO,aAAa,QAAQ,YAAY,WAAW,CACnD,GAAG,CAAC,CAAC;AACP"}