@hanzogui/floating 8.3.1 → 8.3.3
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 +5 -0
- package/dist/cjs/Floating.js.map +1 -0
- package/dist/cjs/index.js +57 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/interactions/PopupTriggerMap.js +33 -0
- package/dist/cjs/interactions/PopupTriggerMap.js.map +1 -0
- package/dist/cjs/interactions/createFloatingEvents.js +31 -0
- package/dist/cjs/interactions/createFloatingEvents.js.map +1 -0
- package/dist/cjs/interactions/safePolygon.js +435 -0
- package/dist/cjs/interactions/safePolygon.js.map +1 -0
- package/dist/cjs/interactions/types.js +3 -0
- package/dist/cjs/interactions/types.js.map +1 -0
- package/dist/cjs/interactions/useClick.js +118 -0
- package/dist/cjs/interactions/useClick.js.map +1 -0
- package/dist/cjs/interactions/useDelayGroup.js +84 -0
- package/dist/cjs/interactions/useDelayGroup.js.map +1 -0
- package/dist/cjs/interactions/useFocus.js +118 -0
- package/dist/cjs/interactions/useFocus.js.map +1 -0
- package/dist/cjs/interactions/useHover.js +357 -0
- package/dist/cjs/interactions/useHover.js.map +1 -0
- package/dist/cjs/interactions/useInnerOffset.js +92 -0
- package/dist/cjs/interactions/useInnerOffset.js.map +1 -0
- package/dist/cjs/interactions/useInteractions.js +88 -0
- package/dist/cjs/interactions/useInteractions.js.map +1 -0
- package/dist/cjs/interactions/useListNavigation.js +447 -0
- package/dist/cjs/interactions/useListNavigation.js.map +1 -0
- package/dist/cjs/interactions/useRole.js +69 -0
- package/dist/cjs/interactions/useRole.js.map +1 -0
- package/dist/cjs/interactions/useTypeahead.js +121 -0
- package/dist/cjs/interactions/useTypeahead.js.map +1 -0
- package/dist/cjs/interactions/utils.js +200 -0
- package/dist/cjs/interactions/utils.js.map +1 -0
- package/dist/cjs/middleware/inner.js +82 -0
- package/dist/cjs/middleware/inner.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/useFloating.js +29 -0
- package/dist/cjs/useFloating.js.map +1 -0
- package/dist/esm/Floating.js +2 -0
- package/dist/esm/Floating.js.map +1 -0
- package/dist/esm/index.js +23 -18
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interactions/PopupTriggerMap.js +29 -0
- package/dist/esm/interactions/PopupTriggerMap.js.map +1 -0
- package/dist/esm/interactions/createFloatingEvents.js +28 -0
- package/dist/esm/interactions/createFloatingEvents.js.map +1 -0
- package/dist/esm/interactions/safePolygon.js +432 -0
- package/dist/esm/interactions/safePolygon.js.map +1 -0
- package/dist/esm/interactions/types.js +2 -0
- package/dist/esm/interactions/types.js.map +1 -0
- package/dist/esm/interactions/useClick.js +115 -0
- package/dist/esm/interactions/useClick.js.map +1 -0
- package/dist/esm/interactions/useDelayGroup.js +78 -0
- package/dist/esm/interactions/useDelayGroup.js.map +1 -0
- package/dist/esm/interactions/useFocus.js +115 -0
- package/dist/esm/interactions/useFocus.js.map +1 -0
- package/dist/esm/interactions/useHover.js +352 -0
- package/dist/esm/interactions/useHover.js.map +1 -0
- package/dist/esm/interactions/useInnerOffset.js +88 -0
- package/dist/esm/interactions/useInnerOffset.js.map +1 -0
- package/dist/esm/interactions/useInteractions.js +85 -0
- package/dist/esm/interactions/useInteractions.js.map +1 -0
- package/dist/esm/interactions/useListNavigation.js +444 -0
- package/dist/esm/interactions/useListNavigation.js.map +1 -0
- package/dist/esm/interactions/useRole.js +65 -0
- package/dist/esm/interactions/useRole.js.map +1 -0
- package/dist/esm/interactions/useTypeahead.js +118 -0
- package/dist/esm/interactions/useTypeahead.js.map +1 -0
- package/dist/esm/interactions/utils.js +176 -0
- package/dist/esm/interactions/utils.js.map +1 -0
- package/dist/esm/middleware/inner.js +77 -0
- package/dist/esm/middleware/inner.js.map +1 -0
- package/dist/esm/useFloating.js +24 -0
- package/dist/esm/useFloating.js.map +1 -0
- package/dist/native/Floating.js +5 -0
- package/dist/native/Floating.js.map +1 -0
- package/dist/native/index.js +23 -0
- package/dist/native/index.js.map +1 -0
- package/dist/native/interactions/PopupTriggerMap.js +29 -0
- package/dist/native/interactions/PopupTriggerMap.js.map +1 -0
- package/dist/native/interactions/createFloatingEvents.js +28 -0
- package/dist/native/interactions/createFloatingEvents.js.map +1 -0
- package/dist/native/interactions/safePolygon.js +432 -0
- package/dist/native/interactions/safePolygon.js.map +1 -0
- package/dist/native/interactions/types.js +2 -0
- package/dist/native/interactions/types.js.map +1 -0
- package/dist/native/interactions/useClick.js +115 -0
- package/dist/native/interactions/useClick.js.map +1 -0
- package/dist/native/interactions/useDelayGroup.js +78 -0
- package/dist/native/interactions/useDelayGroup.js.map +1 -0
- package/dist/native/interactions/useFocus.js +115 -0
- package/dist/native/interactions/useFocus.js.map +1 -0
- package/dist/native/interactions/useHover.js +352 -0
- package/dist/native/interactions/useHover.js.map +1 -0
- package/dist/native/interactions/useInnerOffset.js +88 -0
- package/dist/native/interactions/useInnerOffset.js.map +1 -0
- package/dist/native/interactions/useInteractions.js +85 -0
- package/dist/native/interactions/useInteractions.js.map +1 -0
- package/dist/native/interactions/useListNavigation.js +444 -0
- package/dist/native/interactions/useListNavigation.js.map +1 -0
- package/dist/native/interactions/useRole.js +65 -0
- package/dist/native/interactions/useRole.js.map +1 -0
- package/dist/native/interactions/useTypeahead.js +118 -0
- package/dist/native/interactions/useTypeahead.js.map +1 -0
- package/dist/native/interactions/utils.js +176 -0
- package/dist/native/interactions/utils.js.map +1 -0
- package/dist/native/middleware/inner.js +77 -0
- package/dist/native/middleware/inner.js.map +1 -0
- package/dist/native/useFloating.js +24 -0
- package/dist/native/useFloating.js.map +1 -0
- package/package.json +21 -16
- package/src/index.ts +18 -18
- package/src/interactions/safePolygon.ts +2 -2
- package/src/interactions/types.ts +2 -2
- package/src/interactions/useClick.ts +2 -2
- package/src/interactions/useDelayGroup.ts +1 -1
- package/src/interactions/useFocus.ts +2 -2
- package/src/interactions/useHover.ts +2 -2
- package/src/interactions/useInnerOffset.ts +1 -1
- package/src/interactions/useInteractions.ts +1 -1
- package/src/interactions/useListNavigation.ts +2 -2
- package/src/interactions/useRole.ts +1 -1
- package/src/interactions/useTypeahead.ts +6 -2
- package/src/useFloating.tsx +2 -2
- package/types/index.d.ts +18 -18
- package/types/index.d.ts.map +1 -1
- package/types/interactions/PopupTriggerMap.d.ts.map +1 -1
- package/types/interactions/safePolygon.d.ts +1 -1
- package/types/interactions/safePolygon.d.ts.map +1 -1
- package/types/interactions/types.d.ts +2 -2
- package/types/interactions/types.d.ts.map +1 -1
- package/types/interactions/useClick.d.ts +1 -1
- package/types/interactions/useClick.d.ts.map +1 -1
- package/types/interactions/useDelayGroup.d.ts +1 -1
- package/types/interactions/useDelayGroup.d.ts.map +1 -1
- package/types/interactions/useFocus.d.ts +1 -1
- package/types/interactions/useFocus.d.ts.map +1 -1
- package/types/interactions/useHover.d.ts +1 -1
- package/types/interactions/useHover.d.ts.map +1 -1
- package/types/interactions/useInnerOffset.d.ts +1 -1
- package/types/interactions/useInnerOffset.d.ts.map +1 -1
- package/types/interactions/useInteractions.d.ts +1 -1
- package/types/interactions/useInteractions.d.ts.map +1 -1
- package/types/interactions/useListNavigation.d.ts +1 -1
- package/types/interactions/useListNavigation.d.ts.map +1 -1
- package/types/interactions/useRole.d.ts +1 -1
- package/types/interactions/useRole.d.ts.map +1 -1
- package/types/interactions/useTypeahead.d.ts +1 -1
- package/types/interactions/useTypeahead.d.ts.map +1 -1
- package/types/middleware/inner.d.ts.map +1 -1
- package/types/useFloating.d.ts +2 -2
- package/types/useFloating.d.ts.map +1 -1
- package/dist/cjs/Floating.cjs +0 -20
- package/dist/cjs/Floating.native.js +0 -39
- package/dist/cjs/Floating.native.js.map +0 -1
- package/dist/cjs/index.cjs +0 -73
- package/dist/cjs/index.native.js +0 -76
- package/dist/cjs/index.native.js.map +0 -1
- package/dist/cjs/interactions/PopupTriggerMap.cjs +0 -49
- package/dist/cjs/interactions/PopupTriggerMap.native.js +0 -97
- package/dist/cjs/interactions/PopupTriggerMap.native.js.map +0 -1
- package/dist/cjs/interactions/createFloatingEvents.cjs +0 -50
- package/dist/cjs/interactions/createFloatingEvents.native.js +0 -56
- package/dist/cjs/interactions/createFloatingEvents.native.js.map +0 -1
- package/dist/cjs/interactions/safePolygon.cjs +0 -273
- package/dist/cjs/interactions/safePolygon.native.js +0 -284
- package/dist/cjs/interactions/safePolygon.native.js.map +0 -1
- package/dist/cjs/interactions/types.cjs +0 -18
- package/dist/cjs/interactions/types.native.js +0 -21
- package/dist/cjs/interactions/types.native.js.map +0 -1
- package/dist/cjs/interactions/useClick.cjs +0 -124
- package/dist/cjs/interactions/useClick.native.js +0 -132
- package/dist/cjs/interactions/useClick.native.js.map +0 -1
- package/dist/cjs/interactions/useDelayGroup.cjs +0 -115
- package/dist/cjs/interactions/useDelayGroup.native.js +0 -125
- package/dist/cjs/interactions/useDelayGroup.native.js.map +0 -1
- package/dist/cjs/interactions/useFocus.cjs +0 -130
- package/dist/cjs/interactions/useFocus.native.js +0 -139
- package/dist/cjs/interactions/useFocus.native.js.map +0 -1
- package/dist/cjs/interactions/useHover.cjs +0 -357
- package/dist/cjs/interactions/useHover.native.js +0 -373
- package/dist/cjs/interactions/useHover.native.js.map +0 -1
- package/dist/cjs/interactions/useInnerOffset.cjs +0 -128
- package/dist/cjs/interactions/useInnerOffset.native.js +0 -141
- package/dist/cjs/interactions/useInnerOffset.native.js.map +0 -1
- package/dist/cjs/interactions/useInteractions.cjs +0 -105
- package/dist/cjs/interactions/useInteractions.native.js +0 -216
- package/dist/cjs/interactions/useInteractions.native.js.map +0 -1
- package/dist/cjs/interactions/useListNavigation.cjs +0 -418
- package/dist/cjs/interactions/useListNavigation.native.js +0 -433
- package/dist/cjs/interactions/useListNavigation.native.js.map +0 -1
- package/dist/cjs/interactions/useRole.cjs +0 -122
- package/dist/cjs/interactions/useRole.native.js +0 -136
- package/dist/cjs/interactions/useRole.native.js.map +0 -1
- package/dist/cjs/interactions/useTypeahead.cjs +0 -143
- package/dist/cjs/interactions/useTypeahead.native.js +0 -159
- package/dist/cjs/interactions/useTypeahead.native.js.map +0 -1
- package/dist/cjs/interactions/utils.cjs +0 -208
- package/dist/cjs/interactions/utils.native.js +0 -227
- package/dist/cjs/interactions/utils.native.js.map +0 -1
- package/dist/cjs/middleware/inner.cjs +0 -118
- package/dist/cjs/middleware/inner.native.js +0 -130
- package/dist/cjs/middleware/inner.native.js.map +0 -1
- package/dist/cjs/useFloating.cjs +0 -64
- package/dist/cjs/useFloating.native.js +0 -69
- package/dist/cjs/useFloating.native.js.map +0 -1
- package/dist/esm/Floating.mjs +0 -2
- package/dist/esm/Floating.mjs.map +0 -1
- package/dist/esm/Floating.native.js +0 -8
- package/dist/esm/Floating.native.js.map +0 -1
- package/dist/esm/index.mjs +0 -18
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js +0 -18
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/interactions/PopupTriggerMap.mjs +0 -24
- package/dist/esm/interactions/PopupTriggerMap.mjs.map +0 -1
- package/dist/esm/interactions/PopupTriggerMap.native.js +0 -69
- package/dist/esm/interactions/PopupTriggerMap.native.js.map +0 -1
- package/dist/esm/interactions/createFloatingEvents.mjs +0 -25
- package/dist/esm/interactions/createFloatingEvents.mjs.map +0 -1
- package/dist/esm/interactions/createFloatingEvents.native.js +0 -28
- package/dist/esm/interactions/createFloatingEvents.native.js.map +0 -1
- package/dist/esm/interactions/safePolygon.mjs +0 -248
- package/dist/esm/interactions/safePolygon.mjs.map +0 -1
- package/dist/esm/interactions/safePolygon.native.js +0 -256
- package/dist/esm/interactions/safePolygon.native.js.map +0 -1
- package/dist/esm/interactions/types.mjs +0 -2
- package/dist/esm/interactions/types.mjs.map +0 -1
- package/dist/esm/interactions/types.native.js +0 -2
- package/dist/esm/interactions/types.native.js.map +0 -1
- package/dist/esm/interactions/useClick.mjs +0 -99
- package/dist/esm/interactions/useClick.mjs.map +0 -1
- package/dist/esm/interactions/useClick.native.js +0 -104
- package/dist/esm/interactions/useClick.native.js.map +0 -1
- package/dist/esm/interactions/useDelayGroup.mjs +0 -77
- package/dist/esm/interactions/useDelayGroup.mjs.map +0 -1
- package/dist/esm/interactions/useDelayGroup.native.js +0 -84
- package/dist/esm/interactions/useDelayGroup.native.js.map +0 -1
- package/dist/esm/interactions/useFocus.mjs +0 -105
- package/dist/esm/interactions/useFocus.mjs.map +0 -1
- package/dist/esm/interactions/useFocus.native.js +0 -111
- package/dist/esm/interactions/useFocus.native.js.map +0 -1
- package/dist/esm/interactions/useHover.mjs +0 -320
- package/dist/esm/interactions/useHover.mjs.map +0 -1
- package/dist/esm/interactions/useHover.native.js +0 -333
- package/dist/esm/interactions/useHover.native.js.map +0 -1
- package/dist/esm/interactions/useInnerOffset.mjs +0 -92
- package/dist/esm/interactions/useInnerOffset.mjs.map +0 -1
- package/dist/esm/interactions/useInnerOffset.native.js +0 -102
- package/dist/esm/interactions/useInnerOffset.native.js.map +0 -1
- package/dist/esm/interactions/useInteractions.mjs +0 -80
- package/dist/esm/interactions/useInteractions.mjs.map +0 -1
- package/dist/esm/interactions/useInteractions.native.js +0 -188
- package/dist/esm/interactions/useInteractions.native.js.map +0 -1
- package/dist/esm/interactions/useListNavigation.mjs +0 -393
- package/dist/esm/interactions/useListNavigation.mjs.map +0 -1
- package/dist/esm/interactions/useListNavigation.native.js +0 -405
- package/dist/esm/interactions/useListNavigation.native.js.map +0 -1
- package/dist/esm/interactions/useRole.mjs +0 -86
- package/dist/esm/interactions/useRole.mjs.map +0 -1
- package/dist/esm/interactions/useRole.native.js +0 -97
- package/dist/esm/interactions/useRole.native.js.map +0 -1
- package/dist/esm/interactions/useTypeahead.mjs +0 -118
- package/dist/esm/interactions/useTypeahead.mjs.map +0 -1
- package/dist/esm/interactions/useTypeahead.native.js +0 -131
- package/dist/esm/interactions/useTypeahead.native.js.map +0 -1
- package/dist/esm/interactions/utils.mjs +0 -162
- package/dist/esm/interactions/utils.mjs.map +0 -1
- package/dist/esm/interactions/utils.native.js +0 -178
- package/dist/esm/interactions/utils.native.js.map +0 -1
- package/dist/esm/middleware/inner.mjs +0 -82
- package/dist/esm/middleware/inner.mjs.map +0 -1
- package/dist/esm/middleware/inner.native.js +0 -91
- package/dist/esm/middleware/inner.native.js.map +0 -1
- package/dist/esm/useFloating.mjs +0 -27
- package/dist/esm/useFloating.mjs.map +0 -1
- package/dist/esm/useFloating.native.js +0 -29
- package/dist/esm/useFloating.native.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Floating.js","sourceRoot":"","sources":["../../src/Floating.tsx"],"names":[],"mappings":";;;AAAA,iEAAsC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inner = exports.useDelayGroupContext = exports.useDelayGroup = exports.FloatingDelayGroup = exports.useInnerOffset = exports.useTypeahead = exports.useListNavigation = exports.useClick = exports.useRole = exports.useFocus = exports.safePolygon = exports.useHover = exports.useInteractions = exports.PopupTriggerMap = exports.createFloatingEvents = exports.useFloatingRaw = exports.FloatingOverrideContext = exports.useFloating = exports.size = exports.shift = exports.platform = exports.offset = exports.limitShift = exports.inline = exports.hide = exports.getOverflowAncestors = exports.flip = exports.detectOverflow = exports.autoUpdate = exports.autoPlacement = exports.arrow = void 0;
|
|
4
|
+
var Floating_tsx_1 = require("./Floating.js");
|
|
5
|
+
Object.defineProperty(exports, "arrow", { enumerable: true, get: function () { return Floating_tsx_1.arrow; } });
|
|
6
|
+
Object.defineProperty(exports, "autoPlacement", { enumerable: true, get: function () { return Floating_tsx_1.autoPlacement; } });
|
|
7
|
+
Object.defineProperty(exports, "autoUpdate", { enumerable: true, get: function () { return Floating_tsx_1.autoUpdate; } });
|
|
8
|
+
Object.defineProperty(exports, "detectOverflow", { enumerable: true, get: function () { return Floating_tsx_1.detectOverflow; } });
|
|
9
|
+
Object.defineProperty(exports, "flip", { enumerable: true, get: function () { return Floating_tsx_1.flip; } });
|
|
10
|
+
Object.defineProperty(exports, "getOverflowAncestors", { enumerable: true, get: function () { return Floating_tsx_1.getOverflowAncestors; } });
|
|
11
|
+
Object.defineProperty(exports, "hide", { enumerable: true, get: function () { return Floating_tsx_1.hide; } });
|
|
12
|
+
Object.defineProperty(exports, "inline", { enumerable: true, get: function () { return Floating_tsx_1.inline; } });
|
|
13
|
+
Object.defineProperty(exports, "limitShift", { enumerable: true, get: function () { return Floating_tsx_1.limitShift; } });
|
|
14
|
+
Object.defineProperty(exports, "offset", { enumerable: true, get: function () { return Floating_tsx_1.offset; } });
|
|
15
|
+
Object.defineProperty(exports, "platform", { enumerable: true, get: function () { return Floating_tsx_1.platform; } });
|
|
16
|
+
Object.defineProperty(exports, "shift", { enumerable: true, get: function () { return Floating_tsx_1.shift; } });
|
|
17
|
+
Object.defineProperty(exports, "size", { enumerable: true, get: function () { return Floating_tsx_1.size; } });
|
|
18
|
+
var useFloating_tsx_1 = require("./useFloating.js");
|
|
19
|
+
Object.defineProperty(exports, "useFloating", { enumerable: true, get: function () { return useFloating_tsx_1.useFloating; } });
|
|
20
|
+
Object.defineProperty(exports, "FloatingOverrideContext", { enumerable: true, get: function () { return useFloating_tsx_1.FloatingOverrideContext; } });
|
|
21
|
+
// raw useFloating without FloatingOverrideContext — use when building
|
|
22
|
+
// override context factories to avoid infinite recursion
|
|
23
|
+
var Floating_tsx_2 = require("./Floating.js");
|
|
24
|
+
Object.defineProperty(exports, "useFloatingRaw", { enumerable: true, get: function () { return Floating_tsx_2.useFloating; } });
|
|
25
|
+
// event emitter for hook coordination
|
|
26
|
+
var createFloatingEvents_ts_1 = require("./interactions/createFloatingEvents.js");
|
|
27
|
+
Object.defineProperty(exports, "createFloatingEvents", { enumerable: true, get: function () { return createFloatingEvents_ts_1.createFloatingEvents; } });
|
|
28
|
+
// multi-trigger coordination
|
|
29
|
+
var PopupTriggerMap_ts_1 = require("./interactions/PopupTriggerMap.js");
|
|
30
|
+
Object.defineProperty(exports, "PopupTriggerMap", { enumerable: true, get: function () { return PopupTriggerMap_ts_1.PopupTriggerMap; } });
|
|
31
|
+
// interaction hooks
|
|
32
|
+
var useInteractions_ts_1 = require("./interactions/useInteractions.js");
|
|
33
|
+
Object.defineProperty(exports, "useInteractions", { enumerable: true, get: function () { return useInteractions_ts_1.useInteractions; } });
|
|
34
|
+
var useHover_ts_1 = require("./interactions/useHover.js");
|
|
35
|
+
Object.defineProperty(exports, "useHover", { enumerable: true, get: function () { return useHover_ts_1.useHover; } });
|
|
36
|
+
var safePolygon_ts_1 = require("./interactions/safePolygon.js");
|
|
37
|
+
Object.defineProperty(exports, "safePolygon", { enumerable: true, get: function () { return safePolygon_ts_1.safePolygon; } });
|
|
38
|
+
var useFocus_ts_1 = require("./interactions/useFocus.js");
|
|
39
|
+
Object.defineProperty(exports, "useFocus", { enumerable: true, get: function () { return useFocus_ts_1.useFocus; } });
|
|
40
|
+
var useRole_ts_1 = require("./interactions/useRole.js");
|
|
41
|
+
Object.defineProperty(exports, "useRole", { enumerable: true, get: function () { return useRole_ts_1.useRole; } });
|
|
42
|
+
var useClick_ts_1 = require("./interactions/useClick.js");
|
|
43
|
+
Object.defineProperty(exports, "useClick", { enumerable: true, get: function () { return useClick_ts_1.useClick; } });
|
|
44
|
+
var useListNavigation_ts_1 = require("./interactions/useListNavigation.js");
|
|
45
|
+
Object.defineProperty(exports, "useListNavigation", { enumerable: true, get: function () { return useListNavigation_ts_1.useListNavigation; } });
|
|
46
|
+
var useTypeahead_ts_1 = require("./interactions/useTypeahead.js");
|
|
47
|
+
Object.defineProperty(exports, "useTypeahead", { enumerable: true, get: function () { return useTypeahead_ts_1.useTypeahead; } });
|
|
48
|
+
var useInnerOffset_ts_1 = require("./interactions/useInnerOffset.js");
|
|
49
|
+
Object.defineProperty(exports, "useInnerOffset", { enumerable: true, get: function () { return useInnerOffset_ts_1.useInnerOffset; } });
|
|
50
|
+
var useDelayGroup_ts_1 = require("./interactions/useDelayGroup.js");
|
|
51
|
+
Object.defineProperty(exports, "FloatingDelayGroup", { enumerable: true, get: function () { return useDelayGroup_ts_1.FloatingDelayGroup; } });
|
|
52
|
+
Object.defineProperty(exports, "useDelayGroup", { enumerable: true, get: function () { return useDelayGroup_ts_1.useDelayGroup; } });
|
|
53
|
+
Object.defineProperty(exports, "useDelayGroupContext", { enumerable: true, get: function () { return useDelayGroup_ts_1.useDelayGroupContext; } });
|
|
54
|
+
// middleware
|
|
55
|
+
var inner_ts_1 = require("./middleware/inner.js");
|
|
56
|
+
Object.defineProperty(exports, "inner", { enumerable: true, get: function () { return inner_ts_1.inner; } });
|
|
57
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AA6CA,8CAcuB;AAbrB,qGAAA,KAAK,OAAA;AACL,6GAAA,aAAa,OAAA;AACb,0GAAA,UAAU,OAAA;AACV,8GAAA,cAAc,OAAA;AACd,oGAAA,IAAI,OAAA;AACJ,oHAAA,oBAAoB,OAAA;AACpB,oGAAA,IAAI,OAAA;AACJ,sGAAA,MAAM,OAAA;AACN,0GAAA,UAAU,OAAA;AACV,sGAAA,MAAM,OAAA;AACN,wGAAA,QAAQ,OAAA;AACR,qGAAA,KAAK,OAAA;AACL,oGAAA,IAAI,OAAA;AAGN,oDAO0B;AANxB,8GAAA,WAAW,OAAA;AACX,0HAAA,uBAAuB,OAAA;AAOzB,sEAAsE;AACtE,yDAAyD;AACzD,8CAA8D;AAArD,8GAAA,WAAW,OAAkB;AAEtC,sCAAsC;AACtC,kFAA6E;AAApE,+HAAA,oBAAoB,OAAA;AAE7B,6BAA6B;AAC7B,wEAAmE;AAA1D,qHAAA,eAAe,OAAA;AAExB,oBAAoB;AACpB,wEAAmE;AAA1D,qHAAA,eAAe,OAAA;AACxB,0DAAqD;AAA5C,uGAAA,QAAQ,OAAA;AACjB,gEAA2D;AAAlD,6GAAA,WAAW,OAAA;AACpB,0DAAqD;AAA5C,uGAAA,QAAQ,OAAA;AACjB,wDAAmD;AAA1C,qGAAA,OAAO,OAAA;AAChB,0DAAqD;AAA5C,uGAAA,QAAQ,OAAA;AACjB,4EAAuE;AAA9D,yHAAA,iBAAiB,OAAA;AAC1B,kEAA6D;AAApD,+GAAA,YAAY,OAAA;AACrB,sEAAiE;AAAxD,mHAAA,cAAc,OAAA;AACvB,oEAIwC;AAHtC,sHAAA,kBAAkB,OAAA;AAClB,iHAAA,aAAa,OAAA;AACb,wHAAA,oBAAoB,OAAA;AAGtB,aAAa;AACb,kDAA6C;AAApC,iGAAA,KAAK,OAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// tracks trigger elements for multi-trigger tooltip/popover patterns.
|
|
3
|
+
// when multiple triggers share a single floating element (scoped pattern),
|
|
4
|
+
// this lets useHover check if the cursor moved to a sibling trigger
|
|
5
|
+
// and suppress the close.
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.PopupTriggerMap = void 0;
|
|
8
|
+
class PopupTriggerMap {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.map = new Map();
|
|
11
|
+
this.elements = new Set();
|
|
12
|
+
}
|
|
13
|
+
add(id, element) {
|
|
14
|
+
const prev = this.map.get(id);
|
|
15
|
+
if (prev) {
|
|
16
|
+
this.elements.delete(prev);
|
|
17
|
+
}
|
|
18
|
+
this.map.set(id, element);
|
|
19
|
+
this.elements.add(element);
|
|
20
|
+
}
|
|
21
|
+
delete(id) {
|
|
22
|
+
const el = this.map.get(id);
|
|
23
|
+
if (el) {
|
|
24
|
+
this.elements.delete(el);
|
|
25
|
+
this.map.delete(id);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
hasElement(element) {
|
|
29
|
+
return this.elements.has(element);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.PopupTriggerMap = PopupTriggerMap;
|
|
33
|
+
//# sourceMappingURL=PopupTriggerMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopupTriggerMap.js","sourceRoot":"","sources":["../../../src/interactions/PopupTriggerMap.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,2EAA2E;AAC3E,oEAAoE;AACpE,0BAA0B;;;AAE1B;IAAA;QACU,QAAG,GAAG,IAAI,GAAG,EAAmB,CAAA;QAChC,aAAQ,GAAG,IAAI,GAAG,EAAW,CAAA;IAsBvC,CAAC;IApBC,GAAG,CAAC,EAAU,EAAE,OAAgB;QAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QAC7B,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QAC5B,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;QACzB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IAC5B,CAAC;IAED,MAAM,CAAC,EAAU;QACf,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QAC3B,IAAI,EAAE,EAAE,CAAC;YACP,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;YACxB,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;QACrB,CAAC;IACH,CAAC;IAED,UAAU,CAAC,OAAgB;QACzB,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IACnC,CAAC;CACF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// lightweight event emitter for coordinating between interaction hooks.
|
|
3
|
+
// when one hook changes open state (e.g. dismiss via escape), others
|
|
4
|
+
// need to know so they can clear their timers and prevent reopening.
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createFloatingEvents = createFloatingEvents;
|
|
7
|
+
function createFloatingEvents() {
|
|
8
|
+
const listeners = new Map();
|
|
9
|
+
return {
|
|
10
|
+
emit(event, data) {
|
|
11
|
+
listeners.get(event)?.forEach((fn) => fn(data));
|
|
12
|
+
},
|
|
13
|
+
on(event, handler) {
|
|
14
|
+
let set = listeners.get(event);
|
|
15
|
+
if (!set) {
|
|
16
|
+
set = new Set();
|
|
17
|
+
listeners.set(event, set);
|
|
18
|
+
}
|
|
19
|
+
set.add(handler);
|
|
20
|
+
},
|
|
21
|
+
off(event, handler) {
|
|
22
|
+
const set = listeners.get(event);
|
|
23
|
+
if (set) {
|
|
24
|
+
set.delete(handler);
|
|
25
|
+
if (set.size === 0)
|
|
26
|
+
listeners.delete(event);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=createFloatingEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFloatingEvents.js","sourceRoot":"","sources":["../../../src/interactions/createFloatingEvents.ts"],"names":[],"mappings":";AAAA,wEAAwE;AACxE,qEAAqE;AACrE,qEAAqE;;;AAQrE;IACE,MAAM,SAAS,GAAG,IAAI,GAAG,EAAqC,CAAA;IAE9D,OAAO;QACL,IAAI,CAAC,KAAK,EAAE,IAAI;YACd,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;QACjD,CAAC;QACD,EAAE,CAAC,KAAK,EAAE,OAAO;YACf,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YAC9B,IAAI,CAAC,GAAG,EAAE,CAAC;gBACT,GAAG,GAAG,IAAI,GAAG,EAAE,CAAA;gBACf,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;YAC3B,CAAC;YACD,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QAClB,CAAC;QACD,GAAG,CAAC,KAAK,EAAE,OAAO;YAChB,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YAChC,IAAI,GAAG,EAAE,CAAC;gBACR,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;gBACnB,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC;oBAAE,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YAC7C,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.safePolygon = safePolygon;
|
|
4
|
+
const utils_ts_1 = require("./utils.js");
|
|
5
|
+
function isPointInPolygon(point, polygon) {
|
|
6
|
+
const [x, y] = point;
|
|
7
|
+
let isInside = false;
|
|
8
|
+
const length = polygon.length;
|
|
9
|
+
for (let i = 0, j = length - 1; i < length; j = i++) {
|
|
10
|
+
const [xi, yi] = polygon[i] || [0, 0];
|
|
11
|
+
const [xj, yj] = polygon[j] || [0, 0];
|
|
12
|
+
const intersect = yi >= y !== yj >= y && x <= ((xj - xi) * (y - yi)) / (yj - yi) + xi;
|
|
13
|
+
if (intersect) {
|
|
14
|
+
isInside = !isInside;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return isInside;
|
|
18
|
+
}
|
|
19
|
+
function isInside(point, rect) {
|
|
20
|
+
return (point[0] >= rect.x &&
|
|
21
|
+
point[0] <= rect.x + rect.width &&
|
|
22
|
+
point[1] >= rect.y &&
|
|
23
|
+
point[1] <= rect.y + rect.height);
|
|
24
|
+
}
|
|
25
|
+
// generates a safe polygon area that the user can traverse without closing the
|
|
26
|
+
// floating element once leaving the reference element.
|
|
27
|
+
// ported from @floating-ui/react with full polygon geometry.
|
|
28
|
+
//
|
|
29
|
+
// the returned HandleCloseFn is a closure factory: called once on mouseleave
|
|
30
|
+
// with the leave position (x, y), it returns a handler that runs on each
|
|
31
|
+
// subsequent document mousemove. the original leave position is baked into
|
|
32
|
+
// the closure so the polygon anchor stays fixed.
|
|
33
|
+
//
|
|
34
|
+
// unlike @floating-ui/react, we do NOT add a documentElement mouseleave
|
|
35
|
+
// listener, which fixes the window-blur-closing-popover bug.
|
|
36
|
+
// debug overlay — renders polygon + trough as SVG on top of everything
|
|
37
|
+
let debugSvg = null;
|
|
38
|
+
function debugDrawPolygon(polygon, trough, cursor, anchor) {
|
|
39
|
+
if (!debugSvg) {
|
|
40
|
+
debugSvg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
41
|
+
debugSvg.id = '__safe-polygon-debug';
|
|
42
|
+
Object.assign(debugSvg.style, {
|
|
43
|
+
position: 'fixed',
|
|
44
|
+
inset: '0',
|
|
45
|
+
width: '100vw',
|
|
46
|
+
height: '100vh',
|
|
47
|
+
pointerEvents: 'none',
|
|
48
|
+
zIndex: '999999',
|
|
49
|
+
});
|
|
50
|
+
document.body.appendChild(debugSvg);
|
|
51
|
+
}
|
|
52
|
+
debugSvg.innerHTML = '';
|
|
53
|
+
// trough rectangle (blue)
|
|
54
|
+
if (trough.length) {
|
|
55
|
+
const troughEl = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');
|
|
56
|
+
troughEl.setAttribute('points', trough.map((p) => p.join(',')).join(' '));
|
|
57
|
+
troughEl.setAttribute('fill', 'rgba(0,100,255,0.15)');
|
|
58
|
+
troughEl.setAttribute('stroke', 'rgba(0,100,255,0.6)');
|
|
59
|
+
troughEl.setAttribute('stroke-width', '1');
|
|
60
|
+
debugSvg.appendChild(troughEl);
|
|
61
|
+
}
|
|
62
|
+
// safe polygon (red)
|
|
63
|
+
if (polygon.length) {
|
|
64
|
+
const polyEl = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');
|
|
65
|
+
polyEl.setAttribute('points', polygon.map((p) => p.join(',')).join(' '));
|
|
66
|
+
polyEl.setAttribute('fill', 'rgba(255,50,50,0.2)');
|
|
67
|
+
polyEl.setAttribute('stroke', 'rgba(255,50,50,0.8)');
|
|
68
|
+
polyEl.setAttribute('stroke-width', '1.5');
|
|
69
|
+
debugSvg.appendChild(polyEl);
|
|
70
|
+
}
|
|
71
|
+
// anchor point (green circle)
|
|
72
|
+
const anchorCircle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
|
|
73
|
+
anchorCircle.setAttribute('cx', String(anchor[0]));
|
|
74
|
+
anchorCircle.setAttribute('cy', String(anchor[1]));
|
|
75
|
+
anchorCircle.setAttribute('r', '5');
|
|
76
|
+
anchorCircle.setAttribute('fill', 'lime');
|
|
77
|
+
anchorCircle.setAttribute('stroke', 'darkgreen');
|
|
78
|
+
anchorCircle.setAttribute('stroke-width', '1.5');
|
|
79
|
+
debugSvg.appendChild(anchorCircle);
|
|
80
|
+
// cursor point (yellow circle)
|
|
81
|
+
const cursorCircle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
|
|
82
|
+
cursorCircle.setAttribute('cx', String(cursor[0]));
|
|
83
|
+
cursorCircle.setAttribute('cy', String(cursor[1]));
|
|
84
|
+
cursorCircle.setAttribute('r', '4');
|
|
85
|
+
cursorCircle.setAttribute('fill', 'yellow');
|
|
86
|
+
cursorCircle.setAttribute('stroke', 'orange');
|
|
87
|
+
cursorCircle.setAttribute('stroke-width', '1.5');
|
|
88
|
+
debugSvg.appendChild(cursorCircle);
|
|
89
|
+
}
|
|
90
|
+
function debugClear() {
|
|
91
|
+
if (debugSvg) {
|
|
92
|
+
debugSvg.remove();
|
|
93
|
+
debugSvg = null;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function safePolygon(options = {}) {
|
|
97
|
+
const { buffer = 0.5, blockPointerEvents = false, requireIntent = true, __debug = false, } = options;
|
|
98
|
+
const timeoutRef = { current: -1 };
|
|
99
|
+
let hasLanded = false;
|
|
100
|
+
let lastX = null;
|
|
101
|
+
let lastY = null;
|
|
102
|
+
let lastCursorTime = typeof performance !== 'undefined' ? performance.now() : 0;
|
|
103
|
+
function getCursorSpeed(x, y) {
|
|
104
|
+
const currentTime = performance.now();
|
|
105
|
+
const elapsedTime = currentTime - lastCursorTime;
|
|
106
|
+
if (lastX === null || lastY === null || elapsedTime === 0) {
|
|
107
|
+
lastX = x;
|
|
108
|
+
lastY = y;
|
|
109
|
+
lastCursorTime = currentTime;
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
const deltaX = x - lastX;
|
|
113
|
+
const deltaY = y - lastY;
|
|
114
|
+
const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
|
|
115
|
+
const speed = distance / elapsedTime;
|
|
116
|
+
lastX = x;
|
|
117
|
+
lastY = y;
|
|
118
|
+
lastCursorTime = currentTime;
|
|
119
|
+
return speed;
|
|
120
|
+
}
|
|
121
|
+
// called once on mouseleave. x, y = cursor position when leaving.
|
|
122
|
+
// returns the mousemove handler that checks each subsequent position
|
|
123
|
+
// against the polygon anchored at (x, y).
|
|
124
|
+
const fn = ({ x, y, placement, elements, onClose }) => {
|
|
125
|
+
// reset on each new handler creation — each leave starts a fresh session
|
|
126
|
+
hasLanded = false;
|
|
127
|
+
lastX = null;
|
|
128
|
+
lastY = null;
|
|
129
|
+
return function onMouseMove(event) {
|
|
130
|
+
function close() {
|
|
131
|
+
(0, utils_ts_1.clearTimeoutIfSet)(timeoutRef);
|
|
132
|
+
onClose();
|
|
133
|
+
}
|
|
134
|
+
(0, utils_ts_1.clearTimeoutIfSet)(timeoutRef);
|
|
135
|
+
const domReference = elements.domReference ?? elements.reference;
|
|
136
|
+
if (!domReference ||
|
|
137
|
+
!elements.floating ||
|
|
138
|
+
placement == null ||
|
|
139
|
+
x == null ||
|
|
140
|
+
y == null) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const { clientX, clientY } = event;
|
|
144
|
+
const clientPoint = [clientX, clientY];
|
|
145
|
+
const target = (0, utils_ts_1.getTarget)(event);
|
|
146
|
+
const isLeave = event.type === 'mouseleave';
|
|
147
|
+
const isOverFloatingEl = (0, utils_ts_1.contains)(elements.floating, target);
|
|
148
|
+
const isOverReferenceEl = (0, utils_ts_1.contains)(domReference, target);
|
|
149
|
+
const refRect = domReference.getBoundingClientRect();
|
|
150
|
+
const rect = elements.floating.getBoundingClientRect();
|
|
151
|
+
const side = placement.split('-')[0];
|
|
152
|
+
// x, y are from the closure — the position when cursor LEFT the reference.
|
|
153
|
+
// cursorLeaveFromRight/Bottom determine which side of the floating el
|
|
154
|
+
// the leave point is on, to shape the polygon correctly.
|
|
155
|
+
const cursorLeaveFromRight = x > rect.right - rect.width / 2;
|
|
156
|
+
const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;
|
|
157
|
+
const isOverReferenceRect = isInside(clientPoint, refRect);
|
|
158
|
+
const isFloatingWider = rect.width > refRect.width;
|
|
159
|
+
const isFloatingTaller = rect.height > refRect.height;
|
|
160
|
+
const left = (isFloatingWider ? refRect : rect).left;
|
|
161
|
+
const right = (isFloatingWider ? refRect : rect).right;
|
|
162
|
+
const top = (isFloatingTaller ? refRect : rect).top;
|
|
163
|
+
const bottom = (isFloatingTaller ? refRect : rect).bottom;
|
|
164
|
+
if (isOverFloatingEl) {
|
|
165
|
+
hasLanded = true;
|
|
166
|
+
if (!isLeave) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (isOverReferenceEl) {
|
|
171
|
+
hasLanded = false;
|
|
172
|
+
}
|
|
173
|
+
if (isOverReferenceEl && !isLeave) {
|
|
174
|
+
hasLanded = true;
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
// cursor in reference bounding box but outside DOM element (rounded corners)
|
|
178
|
+
if (!isOverReferenceEl && isOverReferenceRect && !isLeave) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
// prevent overlapping floating element from being stuck in an open-close
|
|
182
|
+
// loop: https://github.com/floating-ui/floating-ui/issues/1910
|
|
183
|
+
if (isLeave &&
|
|
184
|
+
event.relatedTarget &&
|
|
185
|
+
(0, utils_ts_1.contains)(elements.floating, event.relatedTarget)) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
// if the pointer is leaving from the opposite side, the "buffer" logic
|
|
189
|
+
// creates a point where the floating element remains open, but should be
|
|
190
|
+
// ignored. a constant of 1 handles floating point rounding errors.
|
|
191
|
+
if ((side === 'top' && y >= refRect.bottom - 1) ||
|
|
192
|
+
(side === 'bottom' && y <= refRect.top + 1) ||
|
|
193
|
+
(side === 'left' && x >= refRect.right - 1) ||
|
|
194
|
+
(side === 'right' && x <= refRect.left + 1)) {
|
|
195
|
+
return close();
|
|
196
|
+
}
|
|
197
|
+
// ignore when the cursor is within the rectangular trough between the
|
|
198
|
+
// two elements. since the polygon is created from the cursor point,
|
|
199
|
+
// which can start beyond the ref element's edge, traversing back and
|
|
200
|
+
// forth from the ref to the floating element can cause it to close. this
|
|
201
|
+
// ensures it always remains open in that case.
|
|
202
|
+
let rectPoly = [];
|
|
203
|
+
switch (side) {
|
|
204
|
+
case 'top':
|
|
205
|
+
rectPoly = [
|
|
206
|
+
[left, refRect.top + 1],
|
|
207
|
+
[left, rect.bottom - 1],
|
|
208
|
+
[right, rect.bottom - 1],
|
|
209
|
+
[right, refRect.top + 1],
|
|
210
|
+
];
|
|
211
|
+
break;
|
|
212
|
+
case 'bottom':
|
|
213
|
+
rectPoly = [
|
|
214
|
+
[left, rect.top + 1],
|
|
215
|
+
[left, refRect.bottom - 1],
|
|
216
|
+
[right, refRect.bottom - 1],
|
|
217
|
+
[right, rect.top + 1],
|
|
218
|
+
];
|
|
219
|
+
break;
|
|
220
|
+
case 'left':
|
|
221
|
+
rectPoly = [
|
|
222
|
+
[rect.right - 1, bottom],
|
|
223
|
+
[rect.right - 1, top],
|
|
224
|
+
[refRect.left + 1, top],
|
|
225
|
+
[refRect.left + 1, bottom],
|
|
226
|
+
];
|
|
227
|
+
break;
|
|
228
|
+
case 'right':
|
|
229
|
+
rectPoly = [
|
|
230
|
+
[refRect.right - 1, bottom],
|
|
231
|
+
[refRect.right - 1, top],
|
|
232
|
+
[rect.left + 1, top],
|
|
233
|
+
[rect.left + 1, bottom],
|
|
234
|
+
];
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
// getPolygon uses the closure's (x, y) — the LEAVE position — as the
|
|
238
|
+
// polygon anchor point, NOT the current cursor position. this creates
|
|
239
|
+
// a stable triangular/trapezoidal safe zone from the leave point toward
|
|
240
|
+
// the floating element's edges.
|
|
241
|
+
function getPolygon([x, y]) {
|
|
242
|
+
switch (side) {
|
|
243
|
+
case 'top': {
|
|
244
|
+
const cursorPointOne = [
|
|
245
|
+
isFloatingWider
|
|
246
|
+
? x + buffer / 2
|
|
247
|
+
: cursorLeaveFromRight
|
|
248
|
+
? x + buffer * 4
|
|
249
|
+
: x - buffer * 4,
|
|
250
|
+
y + buffer + 1,
|
|
251
|
+
];
|
|
252
|
+
const cursorPointTwo = [
|
|
253
|
+
isFloatingWider
|
|
254
|
+
? x - buffer / 2
|
|
255
|
+
: cursorLeaveFromRight
|
|
256
|
+
? x + buffer * 4
|
|
257
|
+
: x - buffer * 4,
|
|
258
|
+
y + buffer + 1,
|
|
259
|
+
];
|
|
260
|
+
const commonPoints = [
|
|
261
|
+
[
|
|
262
|
+
rect.left,
|
|
263
|
+
cursorLeaveFromRight
|
|
264
|
+
? rect.bottom - buffer
|
|
265
|
+
: isFloatingWider
|
|
266
|
+
? rect.bottom - buffer
|
|
267
|
+
: rect.top,
|
|
268
|
+
],
|
|
269
|
+
[
|
|
270
|
+
rect.right,
|
|
271
|
+
cursorLeaveFromRight
|
|
272
|
+
? isFloatingWider
|
|
273
|
+
? rect.bottom - buffer
|
|
274
|
+
: rect.top
|
|
275
|
+
: rect.bottom - buffer,
|
|
276
|
+
],
|
|
277
|
+
];
|
|
278
|
+
return [cursorPointOne, cursorPointTwo, ...commonPoints];
|
|
279
|
+
}
|
|
280
|
+
case 'bottom': {
|
|
281
|
+
const cursorPointOne = [
|
|
282
|
+
isFloatingWider
|
|
283
|
+
? x + buffer / 2
|
|
284
|
+
: cursorLeaveFromRight
|
|
285
|
+
? x + buffer * 4
|
|
286
|
+
: x - buffer * 4,
|
|
287
|
+
y - buffer,
|
|
288
|
+
];
|
|
289
|
+
const cursorPointTwo = [
|
|
290
|
+
isFloatingWider
|
|
291
|
+
? x - buffer / 2
|
|
292
|
+
: cursorLeaveFromRight
|
|
293
|
+
? x + buffer * 4
|
|
294
|
+
: x - buffer * 4,
|
|
295
|
+
y - buffer,
|
|
296
|
+
];
|
|
297
|
+
const commonPoints = [
|
|
298
|
+
[
|
|
299
|
+
rect.left,
|
|
300
|
+
cursorLeaveFromRight
|
|
301
|
+
? rect.top + buffer
|
|
302
|
+
: isFloatingWider
|
|
303
|
+
? rect.top + buffer
|
|
304
|
+
: rect.bottom,
|
|
305
|
+
],
|
|
306
|
+
[
|
|
307
|
+
rect.right,
|
|
308
|
+
cursorLeaveFromRight
|
|
309
|
+
? isFloatingWider
|
|
310
|
+
? rect.top + buffer
|
|
311
|
+
: rect.bottom
|
|
312
|
+
: rect.top + buffer,
|
|
313
|
+
],
|
|
314
|
+
];
|
|
315
|
+
return [cursorPointOne, cursorPointTwo, ...commonPoints];
|
|
316
|
+
}
|
|
317
|
+
case 'left': {
|
|
318
|
+
const cursorPointOne = [
|
|
319
|
+
x + buffer + 1,
|
|
320
|
+
isFloatingTaller
|
|
321
|
+
? y + buffer / 2
|
|
322
|
+
: cursorLeaveFromBottom
|
|
323
|
+
? y + buffer * 4
|
|
324
|
+
: y - buffer * 4,
|
|
325
|
+
];
|
|
326
|
+
const cursorPointTwo = [
|
|
327
|
+
x + buffer + 1,
|
|
328
|
+
isFloatingTaller
|
|
329
|
+
? y - buffer / 2
|
|
330
|
+
: cursorLeaveFromBottom
|
|
331
|
+
? y + buffer * 4
|
|
332
|
+
: y - buffer * 4,
|
|
333
|
+
];
|
|
334
|
+
const commonPoints = [
|
|
335
|
+
[
|
|
336
|
+
cursorLeaveFromBottom
|
|
337
|
+
? rect.right - buffer
|
|
338
|
+
: isFloatingTaller
|
|
339
|
+
? rect.right - buffer
|
|
340
|
+
: rect.left,
|
|
341
|
+
rect.top,
|
|
342
|
+
],
|
|
343
|
+
[
|
|
344
|
+
cursorLeaveFromBottom
|
|
345
|
+
? isFloatingTaller
|
|
346
|
+
? rect.right - buffer
|
|
347
|
+
: rect.left
|
|
348
|
+
: rect.right - buffer,
|
|
349
|
+
rect.bottom,
|
|
350
|
+
],
|
|
351
|
+
];
|
|
352
|
+
return [...commonPoints, cursorPointOne, cursorPointTwo];
|
|
353
|
+
}
|
|
354
|
+
case 'right': {
|
|
355
|
+
const cursorPointOne = [
|
|
356
|
+
x - buffer,
|
|
357
|
+
isFloatingTaller
|
|
358
|
+
? y + buffer / 2
|
|
359
|
+
: cursorLeaveFromBottom
|
|
360
|
+
? y + buffer * 4
|
|
361
|
+
: y - buffer * 4,
|
|
362
|
+
];
|
|
363
|
+
const cursorPointTwo = [
|
|
364
|
+
x - buffer,
|
|
365
|
+
isFloatingTaller
|
|
366
|
+
? y - buffer / 2
|
|
367
|
+
: cursorLeaveFromBottom
|
|
368
|
+
? y + buffer * 4
|
|
369
|
+
: y - buffer * 4,
|
|
370
|
+
];
|
|
371
|
+
const commonPoints = [
|
|
372
|
+
[
|
|
373
|
+
cursorLeaveFromBottom
|
|
374
|
+
? rect.left + buffer
|
|
375
|
+
: isFloatingTaller
|
|
376
|
+
? rect.left + buffer
|
|
377
|
+
: rect.right,
|
|
378
|
+
rect.top,
|
|
379
|
+
],
|
|
380
|
+
[
|
|
381
|
+
cursorLeaveFromBottom
|
|
382
|
+
? isFloatingTaller
|
|
383
|
+
? rect.left + buffer
|
|
384
|
+
: rect.right
|
|
385
|
+
: rect.left + buffer,
|
|
386
|
+
rect.bottom,
|
|
387
|
+
],
|
|
388
|
+
];
|
|
389
|
+
return [cursorPointOne, cursorPointTwo, ...commonPoints];
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
const poly = getPolygon([x, y]);
|
|
394
|
+
if (__debug) {
|
|
395
|
+
debugDrawPolygon(poly, rectPoly, clientPoint, [x, y]);
|
|
396
|
+
}
|
|
397
|
+
if (isPointInPolygon([clientX, clientY], rectPoly)) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
if (hasLanded && !isOverReferenceRect) {
|
|
401
|
+
if (__debug)
|
|
402
|
+
debugClear();
|
|
403
|
+
return close();
|
|
404
|
+
}
|
|
405
|
+
// polygon check first — inside polygon = safe.
|
|
406
|
+
// the polygon geometry itself limits the safe zone to valid cursor
|
|
407
|
+
// paths toward the floating element, so no timeout is needed here.
|
|
408
|
+
// a previous 40ms requireIntent timeout caused premature closures
|
|
409
|
+
// during natural mouse pauses (humans routinely pause >40ms while
|
|
410
|
+
// moving diagonally from trigger to content).
|
|
411
|
+
if (isPointInPolygon([clientX, clientY], poly)) {
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
// speed check only applies outside polygon
|
|
415
|
+
if (!isLeave && requireIntent) {
|
|
416
|
+
const cursorSpeed = getCursorSpeed(clientX, clientY);
|
|
417
|
+
const cursorSpeedThreshold = 0.1;
|
|
418
|
+
if (cursorSpeed !== null && cursorSpeed < cursorSpeedThreshold) {
|
|
419
|
+
if (__debug)
|
|
420
|
+
debugClear();
|
|
421
|
+
return close();
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
// outside polygon — close
|
|
425
|
+
if (__debug)
|
|
426
|
+
debugClear();
|
|
427
|
+
close();
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
fn.__options = {
|
|
431
|
+
blockPointerEvents,
|
|
432
|
+
};
|
|
433
|
+
return fn;
|
|
434
|
+
}
|
|
435
|
+
//# sourceMappingURL=safePol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