@monstermann/signals-modal 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/anchor/{getAnchorElement.js → getAnchorElement.mjs} +1 -1
- package/dist/anchor/getAnchorMeasurement.mjs +10 -0
- package/dist/anchor/{setAnchorElement.js → setAnchorElement.mjs} +1 -1
- package/dist/anchor/{withAnchorElement.js → withAnchorElement.mjs} +4 -4
- package/dist/anchor/{withAnchorMeasurement.d.ts → withAnchorMeasurement.d.mts} +1 -1
- package/dist/anchor/{withAnchorMeasurement.js → withAnchorMeasurement.mjs} +9 -9
- package/dist/anchor/{withMouseAnchor.d.ts → withMouseAnchor.d.mts} +1 -1
- package/dist/anchor/{withMouseAnchor.js → withMouseAnchor.mjs} +7 -7
- package/dist/{createModal.js → createModal.mjs} +3 -3
- package/dist/floating/{getFloatingElement.js → getFloatingElement.mjs} +1 -1
- package/dist/floating/{getFloatingMeasurement.js → getFloatingMeasurement.mjs} +2 -2
- package/dist/floating/{setFloatingElement.js → setFloatingElement.mjs} +1 -1
- package/dist/floating/{withFloatingElement.js → withFloatingElement.mjs} +4 -4
- package/dist/floating/{withFloatingMeasurement.d.ts → withFloatingMeasurement.d.mts} +1 -1
- package/dist/floating/{withFloatingMeasurement.js → withFloatingMeasurement.mjs} +8 -8
- package/dist/groups/getDialogs.mjs +10 -0
- package/dist/groups/{getGroupsForModal.js → getGroupsForModal.mjs} +1 -1
- package/dist/groups/{getModalsForGroup.js → getModalsForGroup.mjs} +1 -1
- package/dist/groups/getPopovers.mjs +10 -0
- package/dist/groups/getTooltips.mjs +10 -0
- package/dist/groups/{isDialog.js → isDialog.mjs} +2 -2
- package/dist/groups/{isModalInGroup.js → isModalInGroup.mjs} +1 -1
- package/dist/groups/{isPopover.js → isPopover.mjs} +2 -2
- package/dist/groups/{isTooltip.js → isTooltip.mjs} +2 -2
- package/dist/groups/{withModalGroups.js → withModalGroups.mjs} +8 -8
- package/dist/index.d.mts +63 -0
- package/dist/index.mjs +63 -0
- package/dist/position/{getModalPlacement.d.ts → getModalPlacement.d.mts} +1 -1
- package/dist/position/{getModalPlacement.js → getModalPlacement.mjs} +1 -1
- package/dist/position/{getModalPosition.d.ts → getModalPosition.d.mts} +1 -1
- package/dist/position/{getModalPosition.js → getModalPosition.mjs} +1 -1
- package/dist/position/{internals.js → internals.mjs} +8 -8
- package/dist/position/{withBoundary.d.ts → withBoundary.d.mts} +1 -1
- package/dist/position/{withBoundary.js → withBoundary.mjs} +4 -4
- package/dist/position/{withPlacement.js → withPlacement.mjs} +12 -18
- package/dist/position/{withPosition.d.ts → withPosition.d.mts} +1 -1
- package/dist/position/{withPosition.js → withPosition.mjs} +24 -24
- package/dist/scroll/{withCloseOnScroll.d.ts → withCloseOnScroll.d.mts} +1 -1
- package/dist/scroll/{withCloseOnScroll.js → withCloseOnScroll.mjs} +2 -2
- package/dist/status/{closeAllModals.js → closeAllModals.mjs} +1 -1
- package/dist/status/{closeLastModal.js → closeLastModal.mjs} +2 -2
- package/dist/status/{closeModal.js → closeModal.mjs} +1 -1
- package/dist/status/{getClosedModals.js → getClosedModals.mjs} +1 -1
- package/dist/status/{getClosingModals.js → getClosingModals.mjs} +1 -1
- package/dist/status/{getModalStatus.d.ts → getModalStatus.d.mts} +1 -1
- package/dist/status/{getModalStatus.js → getModalStatus.mjs} +1 -1
- package/dist/status/{getOpenModals.js → getOpenModals.mjs} +1 -1
- package/dist/status/{getOpenedModals.js → getOpenedModals.mjs} +1 -1
- package/dist/status/{getOpeningModals.js → getOpeningModals.mjs} +1 -1
- package/dist/status/{getVisibleModals.js → getVisibleModals.mjs} +1 -1
- package/dist/status/{internals.js → internals.mjs} +7 -7
- package/dist/status/{isAnyModalClosed.js → isAnyModalClosed.mjs} +1 -1
- package/dist/status/{isAnyModalClosing.js → isAnyModalClosing.mjs} +1 -1
- package/dist/status/{isAnyModalOpen.js → isAnyModalOpen.mjs} +1 -1
- package/dist/status/{isAnyModalOpened.js → isAnyModalOpened.mjs} +1 -1
- package/dist/status/{isAnyModalOpening.js → isAnyModalOpening.mjs} +1 -1
- package/dist/status/{isAnyModalVisible.js → isAnyModalVisible.mjs} +1 -1
- package/dist/status/{isModalClosed.js → isModalClosed.mjs} +1 -1
- package/dist/status/{isModalClosing.js → isModalClosing.mjs} +1 -1
- package/dist/status/{isModalOpen.js → isModalOpen.mjs} +2 -2
- package/dist/status/{isModalOpened.js → isModalOpened.mjs} +1 -1
- package/dist/status/{isModalOpening.js → isModalOpening.mjs} +1 -1
- package/dist/status/{isModalVisible.js → isModalVisible.mjs} +1 -1
- package/dist/status/onModalClosed.d.mts +6 -0
- package/dist/status/onModalClosing.d.mts +6 -0
- package/dist/status/{openModal.js → openModal.mjs} +1 -1
- package/dist/status/{setModalStatus.d.ts → setModalStatus.d.mts} +1 -1
- package/dist/status/{setModalStatus.js → setModalStatus.mjs} +1 -1
- package/dist/status/{withModalStatus.d.ts → withModalStatus.d.mts} +1 -1
- package/dist/status/{withModalStatus.js → withModalStatus.mjs} +11 -11
- package/dist/utils/{closeLastModalOnClickOutside.js → closeLastModalOnClickOutside.mjs} +4 -4
- package/dist/utils/{closeLastModalOnEsc.js → closeLastModalOnEsc.mjs} +3 -3
- package/dist/utils/{syncModalGroupsToBody.js → syncModalGroupsToBody.mjs} +2 -2
- package/package.json +11 -11
- package/dist/anchor/getAnchorMeasurement.js +0 -10
- package/dist/groups/getDialogs.js +0 -10
- package/dist/groups/getPopovers.js +0 -10
- package/dist/groups/getTooltips.js +0 -10
- package/dist/index.d.ts +0 -63
- package/dist/index.js +0 -63
- package/dist/status/onModalClosed.d.ts +0 -6
- package/dist/status/onModalClosing.d.ts +0 -6
- /package/dist/anchor/{getAnchorElement.d.ts → getAnchorElement.d.mts} +0 -0
- /package/dist/anchor/{getAnchorMeasurement.d.ts → getAnchorMeasurement.d.mts} +0 -0
- /package/dist/anchor/{internals.js → internals.mjs} +0 -0
- /package/dist/anchor/{setAnchorElement.d.ts → setAnchorElement.d.mts} +0 -0
- /package/dist/anchor/{withAnchorElement.d.ts → withAnchorElement.d.mts} +0 -0
- /package/dist/{createModal.d.ts → createModal.d.mts} +0 -0
- /package/dist/floating/{getFloatingElement.d.ts → getFloatingElement.d.mts} +0 -0
- /package/dist/floating/{getFloatingMeasurement.d.ts → getFloatingMeasurement.d.mts} +0 -0
- /package/dist/floating/{internals.js → internals.mjs} +0 -0
- /package/dist/floating/{setFloatingElement.d.ts → setFloatingElement.d.mts} +0 -0
- /package/dist/floating/{withFloatingElement.d.ts → withFloatingElement.d.mts} +0 -0
- /package/dist/groups/{getDialogs.d.ts → getDialogs.d.mts} +0 -0
- /package/dist/groups/{getGroupsForModal.d.ts → getGroupsForModal.d.mts} +0 -0
- /package/dist/groups/{getModalsForGroup.d.ts → getModalsForGroup.d.mts} +0 -0
- /package/dist/groups/{getPopovers.d.ts → getPopovers.d.mts} +0 -0
- /package/dist/groups/{getTooltips.d.ts → getTooltips.d.mts} +0 -0
- /package/dist/groups/{internals.js → internals.mjs} +0 -0
- /package/dist/groups/{isDialog.d.ts → isDialog.d.mts} +0 -0
- /package/dist/groups/{isModalInGroup.d.ts → isModalInGroup.d.mts} +0 -0
- /package/dist/groups/{isPopover.d.ts → isPopover.d.mts} +0 -0
- /package/dist/groups/{isTooltip.d.ts → isTooltip.d.mts} +0 -0
- /package/dist/groups/{modalGroups.d.ts → modalGroups.d.mts} +0 -0
- /package/dist/groups/{modalGroups.js → modalGroups.mjs} +0 -0
- /package/dist/groups/{withModalGroups.d.ts → withModalGroups.d.mts} +0 -0
- /package/dist/internals/{findParentElement.js → findParentElement.mjs} +0 -0
- /package/dist/internals/{observeDimensions.js → observeDimensions.mjs} +0 -0
- /package/dist/internals/{observePosition.js → observePosition.mjs} +0 -0
- /package/dist/internals/{roundByDPR.js → roundByDPR.mjs} +0 -0
- /package/dist/position/{withPlacement.d.ts → withPlacement.d.mts} +0 -0
- /package/dist/status/{closeAllModals.d.ts → closeAllModals.d.mts} +0 -0
- /package/dist/status/{closeLastModal.d.ts → closeLastModal.d.mts} +0 -0
- /package/dist/status/{closeModal.d.ts → closeModal.d.mts} +0 -0
- /package/dist/status/{getClosedModals.d.ts → getClosedModals.d.mts} +0 -0
- /package/dist/status/{getClosingModals.d.ts → getClosingModals.d.mts} +0 -0
- /package/dist/status/{getOpenModals.d.ts → getOpenModals.d.mts} +0 -0
- /package/dist/status/{getOpenedModals.d.ts → getOpenedModals.d.mts} +0 -0
- /package/dist/status/{getOpeningModals.d.ts → getOpeningModals.d.mts} +0 -0
- /package/dist/status/{getVisibleModals.d.ts → getVisibleModals.d.mts} +0 -0
- /package/dist/status/{isAnyModalClosed.d.ts → isAnyModalClosed.d.mts} +0 -0
- /package/dist/status/{isAnyModalClosing.d.ts → isAnyModalClosing.d.mts} +0 -0
- /package/dist/status/{isAnyModalOpen.d.ts → isAnyModalOpen.d.mts} +0 -0
- /package/dist/status/{isAnyModalOpened.d.ts → isAnyModalOpened.d.mts} +0 -0
- /package/dist/status/{isAnyModalOpening.d.ts → isAnyModalOpening.d.mts} +0 -0
- /package/dist/status/{isAnyModalVisible.d.ts → isAnyModalVisible.d.mts} +0 -0
- /package/dist/status/{isModalClosed.d.ts → isModalClosed.d.mts} +0 -0
- /package/dist/status/{isModalClosing.d.ts → isModalClosing.d.mts} +0 -0
- /package/dist/status/{isModalOpen.d.ts → isModalOpen.d.mts} +0 -0
- /package/dist/status/{isModalOpened.d.ts → isModalOpened.d.mts} +0 -0
- /package/dist/status/{isModalOpening.d.ts → isModalOpening.d.mts} +0 -0
- /package/dist/status/{isModalVisible.d.ts → isModalVisible.d.mts} +0 -0
- /package/dist/status/{onModalClosed.js → onModalClosed.mjs} +0 -0
- /package/dist/status/{onModalClosing.js → onModalClosing.mjs} +0 -0
- /package/dist/status/{onModalOpened.d.ts → onModalOpened.d.mts} +0 -0
- /package/dist/status/{onModalOpened.js → onModalOpened.mjs} +0 -0
- /package/dist/status/{onModalOpening.d.ts → onModalOpening.d.mts} +0 -0
- /package/dist/status/{onModalOpening.js → onModalOpening.mjs} +0 -0
- /package/dist/status/{openModal.d.ts → openModal.d.mts} +0 -0
- /package/dist/status/{types.d.ts → types.d.mts} +0 -0
- /package/dist/utils/{closeLastModalOnClickOutside.d.ts → closeLastModalOnClickOutside.d.mts} +0 -0
- /package/dist/utils/{closeLastModalOnEsc.d.ts → closeLastModalOnEsc.d.mts} +0 -0
- /package/dist/utils/{syncModalGroupsToBody.d.ts → syncModalGroupsToBody.d.mts} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { $anchorMeasurements } from "./internals.mjs";
|
|
2
|
+
import { origin } from "@monstermann/geometry/Rect/origin.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/anchor/getAnchorMeasurement.ts
|
|
5
|
+
function getAnchorMeasurement(key) {
|
|
6
|
+
return $anchorMeasurements().get(key) ?? origin;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { getAnchorMeasurement };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $anchorElements } from "./internals.
|
|
2
|
-
import { currentModal } from "../createModal.
|
|
1
|
+
import { $anchorElements } from "./internals.mjs";
|
|
2
|
+
import { currentModal } from "../createModal.mjs";
|
|
3
3
|
import { INTERNAL, effect, signal } from "@monstermann/signals";
|
|
4
|
-
import { set } from "@monstermann/map/Map/set.
|
|
5
|
-
import { remove } from "@monstermann/map/Map/remove.
|
|
4
|
+
import { set } from "@monstermann/map/Map/set.mjs";
|
|
5
|
+
import { remove } from "@monstermann/map/Map/remove.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/anchor/withAnchorElement.ts
|
|
8
8
|
const path = "@signals-modal/anchor/withAnchorElement.ts";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $anchorMeasurements } from "./internals.
|
|
2
|
-
import { currentModal } from "../createModal.
|
|
3
|
-
import { observePosition } from "../internals/observePosition.
|
|
1
|
+
import { $anchorMeasurements } from "./internals.mjs";
|
|
2
|
+
import { currentModal } from "../createModal.mjs";
|
|
3
|
+
import { observePosition } from "../internals/observePosition.mjs";
|
|
4
4
|
import { INTERNAL, effect, memo, signal } from "@monstermann/signals";
|
|
5
|
-
import { origin } from "@monstermann/geometry/Rect/origin.
|
|
6
|
-
import { set } from "@monstermann/map/Map/set.
|
|
7
|
-
import { remove } from "@monstermann/map/Map/remove.
|
|
8
|
-
import { isEqual } from "@monstermann/geometry/Rect/isEqual.
|
|
9
|
-
import { fromElement } from "@monstermann/geometry/Rect/fromElement.
|
|
10
|
-
import { fromDOMRect } from "@monstermann/geometry/Rect/fromDOMRect.
|
|
5
|
+
import { origin } from "@monstermann/geometry/Rect/origin.mjs";
|
|
6
|
+
import { set } from "@monstermann/map/Map/set.mjs";
|
|
7
|
+
import { remove } from "@monstermann/map/Map/remove.mjs";
|
|
8
|
+
import { isEqual } from "@monstermann/geometry/Rect/isEqual.mjs";
|
|
9
|
+
import { fromElement } from "@monstermann/geometry/Rect/fromElement.mjs";
|
|
10
|
+
import { fromDOMRect } from "@monstermann/geometry/Rect/fromDOMRect.mjs";
|
|
11
11
|
|
|
12
12
|
//#region src/anchor/withAnchorMeasurement.ts
|
|
13
13
|
const path = "@signals-modal/anchor/withAnchorMeasurement.ts";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $anchorMeasurements } from "./internals.
|
|
2
|
-
import { currentModal } from "../createModal.
|
|
1
|
+
import { $anchorMeasurements } from "./internals.mjs";
|
|
2
|
+
import { currentModal } from "../createModal.mjs";
|
|
3
3
|
import { INTERNAL, effect, memo, peek, signal } from "@monstermann/signals";
|
|
4
|
-
import { origin } from "@monstermann/geometry/Rect/origin.
|
|
5
|
-
import { set } from "@monstermann/map/Map/set.
|
|
6
|
-
import { remove } from "@monstermann/map/Map/remove.
|
|
7
|
-
import { isEqual } from "@monstermann/geometry/Rect/isEqual.
|
|
8
|
-
import { isOrigin } from "@monstermann/geometry/Rect/isOrigin.
|
|
4
|
+
import { origin } from "@monstermann/geometry/Rect/origin.mjs";
|
|
5
|
+
import { set } from "@monstermann/map/Map/set.mjs";
|
|
6
|
+
import { remove } from "@monstermann/map/Map/remove.mjs";
|
|
7
|
+
import { isEqual } from "@monstermann/geometry/Rect/isEqual.mjs";
|
|
8
|
+
import { isOrigin } from "@monstermann/geometry/Rect/isOrigin.mjs";
|
|
9
9
|
import { $mouseX, $mouseY } from "@monstermann/signals-web";
|
|
10
10
|
|
|
11
11
|
//#region src/anchor/withMouseAnchor.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { onModalClosed } from "./status/onModalClosed.
|
|
2
|
-
import { closeModal } from "./status/closeModal.
|
|
3
|
-
import { isModalClosed } from "./status/isModalClosed.
|
|
1
|
+
import { onModalClosed } from "./status/onModalClosed.mjs";
|
|
2
|
+
import { closeModal } from "./status/closeModal.mjs";
|
|
3
|
+
import { isModalClosed } from "./status/isModalClosed.mjs";
|
|
4
4
|
import { SILENT, context, disposer, emitter, isDisposed } from "@monstermann/signals";
|
|
5
5
|
|
|
6
6
|
//#region src/createModal.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $floatingMeasurements } from "./internals.
|
|
2
|
-
import { origin } from "@monstermann/geometry/Rect/origin.
|
|
1
|
+
import { $floatingMeasurements } from "./internals.mjs";
|
|
2
|
+
import { origin } from "@monstermann/geometry/Rect/origin.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/floating/getFloatingMeasurement.ts
|
|
5
5
|
function getFloatingMeasurement(key) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { currentModal } from "../createModal.
|
|
2
|
-
import { $floatingElements } from "./internals.
|
|
1
|
+
import { currentModal } from "../createModal.mjs";
|
|
2
|
+
import { $floatingElements } from "./internals.mjs";
|
|
3
3
|
import { INTERNAL, effect, signal } from "@monstermann/signals";
|
|
4
|
-
import { set } from "@monstermann/map/Map/set.
|
|
5
|
-
import { remove } from "@monstermann/map/Map/remove.
|
|
4
|
+
import { set } from "@monstermann/map/Map/set.mjs";
|
|
5
|
+
import { remove } from "@monstermann/map/Map/remove.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/floating/withFloatingElement.ts
|
|
8
8
|
const path = "@signals-modal/floating/withFloatingElement.ts";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { currentModal } from "../createModal.
|
|
2
|
-
import { $floatingMeasurements } from "./internals.
|
|
3
|
-
import { observeDimensions } from "../internals/observeDimensions.
|
|
1
|
+
import { currentModal } from "../createModal.mjs";
|
|
2
|
+
import { $floatingMeasurements } from "./internals.mjs";
|
|
3
|
+
import { observeDimensions } from "../internals/observeDimensions.mjs";
|
|
4
4
|
import { INTERNAL, effect, memo, signal } from "@monstermann/signals";
|
|
5
|
-
import { origin } from "@monstermann/geometry/Rect/origin.
|
|
6
|
-
import { set } from "@monstermann/map/Map/set.
|
|
7
|
-
import { remove } from "@monstermann/map/Map/remove.
|
|
8
|
-
import { isEqual } from "@monstermann/geometry/Rect/isEqual.
|
|
9
|
-
import { fromElement } from "@monstermann/geometry/Rect/fromElement.
|
|
5
|
+
import { origin } from "@monstermann/geometry/Rect/origin.mjs";
|
|
6
|
+
import { set } from "@monstermann/map/Map/set.mjs";
|
|
7
|
+
import { remove } from "@monstermann/map/Map/remove.mjs";
|
|
8
|
+
import { isEqual } from "@monstermann/geometry/Rect/isEqual.mjs";
|
|
9
|
+
import { fromElement } from "@monstermann/geometry/Rect/fromElement.mjs";
|
|
10
10
|
|
|
11
11
|
//#region src/floating/withFloatingMeasurement.ts
|
|
12
12
|
const path = "@signals-modal/floating/withFloatingMeasurement.ts";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getModalsForGroup } from "./getModalsForGroup.mjs";
|
|
2
|
+
import { modalGroups } from "./modalGroups.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/groups/getDialogs.ts
|
|
5
|
+
function getDialogs() {
|
|
6
|
+
return getModalsForGroup(modalGroups.dialog);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { getDialogs };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getModalsForGroup } from "./getModalsForGroup.mjs";
|
|
2
|
+
import { modalGroups } from "./modalGroups.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/groups/getPopovers.ts
|
|
5
|
+
function getPopovers() {
|
|
6
|
+
return getModalsForGroup(modalGroups.popover);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { getPopovers };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getModalsForGroup } from "./getModalsForGroup.mjs";
|
|
2
|
+
import { modalGroups } from "./modalGroups.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/groups/getTooltips.ts
|
|
5
|
+
function getTooltips() {
|
|
6
|
+
return getModalsForGroup(modalGroups.tooltip);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { getTooltips };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { modalGroups } from "./modalGroups.
|
|
2
|
-
import { getGroupsForModal } from "./getGroupsForModal.
|
|
1
|
+
import { modalGroups } from "./modalGroups.mjs";
|
|
2
|
+
import { getGroupsForModal } from "./getGroupsForModal.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/groups/isDialog.ts
|
|
5
5
|
function isDialog(key) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { modalGroups } from "./modalGroups.
|
|
2
|
-
import { getGroupsForModal } from "./getGroupsForModal.
|
|
1
|
+
import { modalGroups } from "./modalGroups.mjs";
|
|
2
|
+
import { getGroupsForModal } from "./getGroupsForModal.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/groups/isPopover.ts
|
|
5
5
|
function isPopover(key) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { modalGroups } from "./modalGroups.
|
|
2
|
-
import { getGroupsForModal } from "./getGroupsForModal.
|
|
1
|
+
import { modalGroups } from "./modalGroups.mjs";
|
|
2
|
+
import { getGroupsForModal } from "./getGroupsForModal.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/groups/isTooltip.ts
|
|
5
5
|
function isTooltip(key) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { currentModal } from "../createModal.
|
|
2
|
-
import { $keysToGroups } from "./internals.
|
|
3
|
-
import { getGroupsForModal } from "./getGroupsForModal.
|
|
1
|
+
import { currentModal } from "../createModal.mjs";
|
|
2
|
+
import { $keysToGroups } from "./internals.mjs";
|
|
3
|
+
import { getGroupsForModal } from "./getGroupsForModal.mjs";
|
|
4
4
|
import { INTERNAL, memo } from "@monstermann/signals";
|
|
5
|
-
import { set } from "@monstermann/map/Map/set.
|
|
6
|
-
import { remove } from "@monstermann/map/Map/remove.
|
|
7
|
-
import { create } from "@monstermann/set/Set/create.
|
|
8
|
-
import { mapOrElse } from "@monstermann/map/Map/mapOrElse.
|
|
9
|
-
import { addAll } from "@monstermann/set/Set/addAll.
|
|
5
|
+
import { set } from "@monstermann/map/Map/set.mjs";
|
|
6
|
+
import { remove } from "@monstermann/map/Map/remove.mjs";
|
|
7
|
+
import { create } from "@monstermann/set/Set/create.mjs";
|
|
8
|
+
import { mapOrElse } from "@monstermann/map/Map/mapOrElse.mjs";
|
|
9
|
+
import { addAll } from "@monstermann/set/Set/addAll.mjs";
|
|
10
10
|
|
|
11
11
|
//#region src/groups/withModalGroups.ts
|
|
12
12
|
const meta = {
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { getAnchorElement } from "./anchor/getAnchorElement.mjs";
|
|
2
|
+
import { getAnchorMeasurement } from "./anchor/getAnchorMeasurement.mjs";
|
|
3
|
+
import { setAnchorElement } from "./anchor/setAnchorElement.mjs";
|
|
4
|
+
import { withAnchorElement } from "./anchor/withAnchorElement.mjs";
|
|
5
|
+
import { ModalStatus } from "./status/types.mjs";
|
|
6
|
+
import { withAnchorMeasurement } from "./anchor/withAnchorMeasurement.mjs";
|
|
7
|
+
import { withMouseAnchor } from "./anchor/withMouseAnchor.mjs";
|
|
8
|
+
import { ModalContext, createModal, currentModal, onModalDisposed } from "./createModal.mjs";
|
|
9
|
+
import { getFloatingElement } from "./floating/getFloatingElement.mjs";
|
|
10
|
+
import { getFloatingMeasurement } from "./floating/getFloatingMeasurement.mjs";
|
|
11
|
+
import { setFloatingElement } from "./floating/setFloatingElement.mjs";
|
|
12
|
+
import { withFloatingElement } from "./floating/withFloatingElement.mjs";
|
|
13
|
+
import { withFloatingMeasurement } from "./floating/withFloatingMeasurement.mjs";
|
|
14
|
+
import { getDialogs } from "./groups/getDialogs.mjs";
|
|
15
|
+
import { getGroupsForModal } from "./groups/getGroupsForModal.mjs";
|
|
16
|
+
import { getModalsForGroup } from "./groups/getModalsForGroup.mjs";
|
|
17
|
+
import { getPopovers } from "./groups/getPopovers.mjs";
|
|
18
|
+
import { getTooltips } from "./groups/getTooltips.mjs";
|
|
19
|
+
import { isDialog } from "./groups/isDialog.mjs";
|
|
20
|
+
import { isModalInGroup } from "./groups/isModalInGroup.mjs";
|
|
21
|
+
import { isPopover } from "./groups/isPopover.mjs";
|
|
22
|
+
import { isTooltip } from "./groups/isTooltip.mjs";
|
|
23
|
+
import { modalGroups } from "./groups/modalGroups.mjs";
|
|
24
|
+
import { withModalGroups } from "./groups/withModalGroups.mjs";
|
|
25
|
+
import { ModalPlacement, ModalPlacementOption, withPlacement } from "./position/withPlacement.mjs";
|
|
26
|
+
import { getModalPlacement } from "./position/getModalPlacement.mjs";
|
|
27
|
+
import { ModalPosition, withPosition } from "./position/withPosition.mjs";
|
|
28
|
+
import { getModalPosition } from "./position/getModalPosition.mjs";
|
|
29
|
+
import { withBoundary } from "./position/withBoundary.mjs";
|
|
30
|
+
import { withCloseOnScroll } from "./scroll/withCloseOnScroll.mjs";
|
|
31
|
+
import { closeAllModals } from "./status/closeAllModals.mjs";
|
|
32
|
+
import { closeLastModal } from "./status/closeLastModal.mjs";
|
|
33
|
+
import { closeModal } from "./status/closeModal.mjs";
|
|
34
|
+
import { getClosedModals } from "./status/getClosedModals.mjs";
|
|
35
|
+
import { getClosingModals } from "./status/getClosingModals.mjs";
|
|
36
|
+
import { getModalStatus } from "./status/getModalStatus.mjs";
|
|
37
|
+
import { getOpenedModals } from "./status/getOpenedModals.mjs";
|
|
38
|
+
import { getOpeningModals } from "./status/getOpeningModals.mjs";
|
|
39
|
+
import { getOpenModals } from "./status/getOpenModals.mjs";
|
|
40
|
+
import { getVisibleModals } from "./status/getVisibleModals.mjs";
|
|
41
|
+
import { isAnyModalClosed } from "./status/isAnyModalClosed.mjs";
|
|
42
|
+
import { isAnyModalClosing } from "./status/isAnyModalClosing.mjs";
|
|
43
|
+
import { isAnyModalOpen } from "./status/isAnyModalOpen.mjs";
|
|
44
|
+
import { isAnyModalOpened } from "./status/isAnyModalOpened.mjs";
|
|
45
|
+
import { isAnyModalOpening } from "./status/isAnyModalOpening.mjs";
|
|
46
|
+
import { isAnyModalVisible } from "./status/isAnyModalVisible.mjs";
|
|
47
|
+
import { isModalClosed } from "./status/isModalClosed.mjs";
|
|
48
|
+
import { isModalClosing } from "./status/isModalClosing.mjs";
|
|
49
|
+
import { isModalOpen } from "./status/isModalOpen.mjs";
|
|
50
|
+
import { isModalOpened } from "./status/isModalOpened.mjs";
|
|
51
|
+
import { isModalOpening } from "./status/isModalOpening.mjs";
|
|
52
|
+
import { isModalVisible } from "./status/isModalVisible.mjs";
|
|
53
|
+
import { onModalClosed } from "./status/onModalClosed.mjs";
|
|
54
|
+
import { onModalClosing } from "./status/onModalClosing.mjs";
|
|
55
|
+
import { onModalOpened } from "./status/onModalOpened.mjs";
|
|
56
|
+
import { onModalOpening } from "./status/onModalOpening.mjs";
|
|
57
|
+
import { openModal } from "./status/openModal.mjs";
|
|
58
|
+
import { setModalStatus } from "./status/setModalStatus.mjs";
|
|
59
|
+
import { withModalStatus } from "./status/withModalStatus.mjs";
|
|
60
|
+
import { closeLastModalOnClickOutside } from "./utils/closeLastModalOnClickOutside.mjs";
|
|
61
|
+
import { closeLastModalOnEsc } from "./utils/closeLastModalOnEsc.mjs";
|
|
62
|
+
import { syncModalGroupsToBody } from "./utils/syncModalGroupsToBody.mjs";
|
|
63
|
+
export { ModalContext, ModalPlacement, ModalPlacementOption, ModalPosition, ModalStatus, closeAllModals, closeLastModal, closeLastModalOnClickOutside, closeLastModalOnEsc, closeModal, createModal, currentModal, getAnchorElement, getAnchorMeasurement, getClosedModals, getClosingModals, getDialogs, getFloatingElement, getFloatingMeasurement, getGroupsForModal, getModalPlacement, getModalPosition, getModalStatus, getModalsForGroup, getOpenModals, getOpenedModals, getOpeningModals, getPopovers, getTooltips, getVisibleModals, isAnyModalClosed, isAnyModalClosing, isAnyModalOpen, isAnyModalOpened, isAnyModalOpening, isAnyModalVisible, isDialog, isModalClosed, isModalClosing, isModalInGroup, isModalOpen, isModalOpened, isModalOpening, isModalVisible, isPopover, isTooltip, modalGroups, onModalClosed, onModalClosing, onModalDisposed, onModalOpened, onModalOpening, openModal, setAnchorElement, setFloatingElement, setModalStatus, syncModalGroupsToBody, withAnchorElement, withAnchorMeasurement, withBoundary, withCloseOnScroll, withFloatingElement, withFloatingMeasurement, withModalGroups, withModalStatus, withMouseAnchor, withPlacement, withPosition };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { getAnchorElement } from "./anchor/getAnchorElement.mjs";
|
|
2
|
+
import { getAnchorMeasurement } from "./anchor/getAnchorMeasurement.mjs";
|
|
3
|
+
import { setAnchorElement } from "./anchor/setAnchorElement.mjs";
|
|
4
|
+
import { onModalClosed } from "./status/onModalClosed.mjs";
|
|
5
|
+
import { onModalOpened } from "./status/onModalOpened.mjs";
|
|
6
|
+
import { onModalOpening } from "./status/onModalOpening.mjs";
|
|
7
|
+
import { closeModal } from "./status/closeModal.mjs";
|
|
8
|
+
import { isModalClosed } from "./status/isModalClosed.mjs";
|
|
9
|
+
import { createModal, currentModal, onModalDisposed } from "./createModal.mjs";
|
|
10
|
+
import { withAnchorElement } from "./anchor/withAnchorElement.mjs";
|
|
11
|
+
import { withAnchorMeasurement } from "./anchor/withAnchorMeasurement.mjs";
|
|
12
|
+
import { withMouseAnchor } from "./anchor/withMouseAnchor.mjs";
|
|
13
|
+
import { getFloatingElement } from "./floating/getFloatingElement.mjs";
|
|
14
|
+
import { getFloatingMeasurement } from "./floating/getFloatingMeasurement.mjs";
|
|
15
|
+
import { setFloatingElement } from "./floating/setFloatingElement.mjs";
|
|
16
|
+
import { withFloatingElement } from "./floating/withFloatingElement.mjs";
|
|
17
|
+
import { withFloatingMeasurement } from "./floating/withFloatingMeasurement.mjs";
|
|
18
|
+
import { getModalsForGroup } from "./groups/getModalsForGroup.mjs";
|
|
19
|
+
import { modalGroups } from "./groups/modalGroups.mjs";
|
|
20
|
+
import { getDialogs } from "./groups/getDialogs.mjs";
|
|
21
|
+
import { getGroupsForModal } from "./groups/getGroupsForModal.mjs";
|
|
22
|
+
import { getPopovers } from "./groups/getPopovers.mjs";
|
|
23
|
+
import { getTooltips } from "./groups/getTooltips.mjs";
|
|
24
|
+
import { isDialog } from "./groups/isDialog.mjs";
|
|
25
|
+
import { isModalInGroup } from "./groups/isModalInGroup.mjs";
|
|
26
|
+
import { isPopover } from "./groups/isPopover.mjs";
|
|
27
|
+
import { isTooltip } from "./groups/isTooltip.mjs";
|
|
28
|
+
import { withModalGroups } from "./groups/withModalGroups.mjs";
|
|
29
|
+
import { getModalPlacement } from "./position/getModalPlacement.mjs";
|
|
30
|
+
import { getModalPosition } from "./position/getModalPosition.mjs";
|
|
31
|
+
import { withBoundary } from "./position/withBoundary.mjs";
|
|
32
|
+
import { withPlacement } from "./position/withPlacement.mjs";
|
|
33
|
+
import { withPosition } from "./position/withPosition.mjs";
|
|
34
|
+
import { withCloseOnScroll } from "./scroll/withCloseOnScroll.mjs";
|
|
35
|
+
import { closeAllModals } from "./status/closeAllModals.mjs";
|
|
36
|
+
import { closeLastModal } from "./status/closeLastModal.mjs";
|
|
37
|
+
import { getClosedModals } from "./status/getClosedModals.mjs";
|
|
38
|
+
import { getClosingModals } from "./status/getClosingModals.mjs";
|
|
39
|
+
import { getModalStatus } from "./status/getModalStatus.mjs";
|
|
40
|
+
import { getOpenedModals } from "./status/getOpenedModals.mjs";
|
|
41
|
+
import { getOpeningModals } from "./status/getOpeningModals.mjs";
|
|
42
|
+
import { getOpenModals } from "./status/getOpenModals.mjs";
|
|
43
|
+
import { getVisibleModals } from "./status/getVisibleModals.mjs";
|
|
44
|
+
import { isAnyModalClosed } from "./status/isAnyModalClosed.mjs";
|
|
45
|
+
import { isAnyModalClosing } from "./status/isAnyModalClosing.mjs";
|
|
46
|
+
import { isAnyModalOpen } from "./status/isAnyModalOpen.mjs";
|
|
47
|
+
import { isAnyModalOpened } from "./status/isAnyModalOpened.mjs";
|
|
48
|
+
import { isAnyModalOpening } from "./status/isAnyModalOpening.mjs";
|
|
49
|
+
import { isAnyModalVisible } from "./status/isAnyModalVisible.mjs";
|
|
50
|
+
import { isModalClosing } from "./status/isModalClosing.mjs";
|
|
51
|
+
import { isModalOpened } from "./status/isModalOpened.mjs";
|
|
52
|
+
import { isModalOpening } from "./status/isModalOpening.mjs";
|
|
53
|
+
import { isModalOpen } from "./status/isModalOpen.mjs";
|
|
54
|
+
import { isModalVisible } from "./status/isModalVisible.mjs";
|
|
55
|
+
import { onModalClosing } from "./status/onModalClosing.mjs";
|
|
56
|
+
import { openModal } from "./status/openModal.mjs";
|
|
57
|
+
import { setModalStatus } from "./status/setModalStatus.mjs";
|
|
58
|
+
import { withModalStatus } from "./status/withModalStatus.mjs";
|
|
59
|
+
import { closeLastModalOnClickOutside } from "./utils/closeLastModalOnClickOutside.mjs";
|
|
60
|
+
import { closeLastModalOnEsc } from "./utils/closeLastModalOnEsc.mjs";
|
|
61
|
+
import { syncModalGroupsToBody } from "./utils/syncModalGroupsToBody.mjs";
|
|
62
|
+
|
|
63
|
+
export { closeAllModals, closeLastModal, closeLastModalOnClickOutside, closeLastModalOnEsc, closeModal, createModal, currentModal, getAnchorElement, getAnchorMeasurement, getClosedModals, getClosingModals, getDialogs, getFloatingElement, getFloatingMeasurement, getGroupsForModal, getModalPlacement, getModalPosition, getModalStatus, getModalsForGroup, getOpenModals, getOpenedModals, getOpeningModals, getPopovers, getTooltips, getVisibleModals, isAnyModalClosed, isAnyModalClosing, isAnyModalOpen, isAnyModalOpened, isAnyModalOpening, isAnyModalVisible, isDialog, isModalClosed, isModalClosing, isModalInGroup, isModalOpen, isModalOpened, isModalOpening, isModalVisible, isPopover, isTooltip, modalGroups, onModalClosed, onModalClosing, onModalDisposed, onModalOpened, onModalOpening, openModal, setAnchorElement, setFloatingElement, setModalStatus, syncModalGroupsToBody, withAnchorElement, withAnchorMeasurement, withBoundary, withCloseOnScroll, withFloatingElement, withFloatingMeasurement, withModalGroups, withModalStatus, withMouseAnchor, withPlacement, withPosition };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { SILENT, signal } from "@monstermann/signals";
|
|
2
|
-
import { setBottom } from "@monstermann/geometry/Rect/setBottom.
|
|
3
|
-
import { top } from "@monstermann/geometry/Rect/top.
|
|
4
|
-
import { setTop } from "@monstermann/geometry/Rect/setTop.
|
|
5
|
-
import { bottom } from "@monstermann/geometry/Rect/bottom.
|
|
6
|
-
import { setRight } from "@monstermann/geometry/Rect/setRight.
|
|
7
|
-
import { left } from "@monstermann/geometry/Rect/left.
|
|
8
|
-
import { setLeft } from "@monstermann/geometry/Rect/setLeft.
|
|
9
|
-
import { right } from "@monstermann/geometry/Rect/right.
|
|
2
|
+
import { setBottom } from "@monstermann/geometry/Rect/setBottom.mjs";
|
|
3
|
+
import { top } from "@monstermann/geometry/Rect/top.mjs";
|
|
4
|
+
import { setTop } from "@monstermann/geometry/Rect/setTop.mjs";
|
|
5
|
+
import { bottom } from "@monstermann/geometry/Rect/bottom.mjs";
|
|
6
|
+
import { setRight } from "@monstermann/geometry/Rect/setRight.mjs";
|
|
7
|
+
import { left } from "@monstermann/geometry/Rect/left.mjs";
|
|
8
|
+
import { setLeft } from "@monstermann/geometry/Rect/setLeft.mjs";
|
|
9
|
+
import { right } from "@monstermann/geometry/Rect/right.mjs";
|
|
10
10
|
|
|
11
11
|
//#region src/position/internals.ts
|
|
12
12
|
const path = "@signals-modal/position/internals.ts";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { currentModal } from "../createModal.
|
|
1
|
+
import { currentModal } from "../createModal.mjs";
|
|
2
2
|
import { INTERNAL, effect, memo, signal } from "@monstermann/signals";
|
|
3
|
-
import { origin } from "@monstermann/geometry/Rect/origin.
|
|
4
|
-
import { isEqual } from "@monstermann/geometry/Rect/isEqual.
|
|
5
|
-
import { fromWindow } from "@monstermann/geometry/Rect/fromWindow.
|
|
3
|
+
import { origin } from "@monstermann/geometry/Rect/origin.mjs";
|
|
4
|
+
import { isEqual } from "@monstermann/geometry/Rect/isEqual.mjs";
|
|
5
|
+
import { fromWindow } from "@monstermann/geometry/Rect/fromWindow.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/position/withBoundary.ts
|
|
8
8
|
const path = "@signals-modal/position/withBoundary.ts";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { currentModal } from "../createModal.
|
|
2
|
-
import { $placements, getBoundaryDown, getBoundaryLeft, getBoundaryRight, getBoundaryUp } from "./internals.
|
|
1
|
+
import { currentModal } from "../createModal.mjs";
|
|
2
|
+
import { $placements, getBoundaryDown, getBoundaryLeft, getBoundaryRight, getBoundaryUp } from "./internals.mjs";
|
|
3
3
|
import { INTERNAL, effect, memo } from "@monstermann/signals";
|
|
4
|
-
import { set } from "@monstermann/map/Map/set.
|
|
5
|
-
import { remove } from "@monstermann/map/Map/remove.
|
|
6
|
-
import { width } from "@monstermann/geometry/Rect/width.
|
|
7
|
-
import { height } from "@monstermann/geometry/Rect/height.
|
|
4
|
+
import { set } from "@monstermann/map/Map/set.mjs";
|
|
5
|
+
import { remove } from "@monstermann/map/Map/remove.mjs";
|
|
6
|
+
import { width } from "@monstermann/geometry/Rect/width.mjs";
|
|
7
|
+
import { height } from "@monstermann/geometry/Rect/height.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/position/withPlacement.ts
|
|
10
10
|
const path = "@signals-modal/position/withPlacement.ts";
|
|
@@ -25,33 +25,27 @@ const placementResolvers = {
|
|
|
25
25
|
"up-center": () => "up-center",
|
|
26
26
|
"horizontal-center": function(o) {
|
|
27
27
|
const left = getBoundaryLeft(o.boundary, o.anchor);
|
|
28
|
-
|
|
29
|
-
return width(right) >= width(left) ? "right-center" : "left-center";
|
|
28
|
+
return width(getBoundaryRight(o.boundary, o.anchor)) >= width(left) ? "right-center" : "left-center";
|
|
30
29
|
},
|
|
31
30
|
"horizontal-down": function(o) {
|
|
32
31
|
const left = getBoundaryLeft(o.boundary, o.anchor);
|
|
33
|
-
|
|
34
|
-
return width(right) >= width(left) ? "right-down" : "left-down";
|
|
32
|
+
return width(getBoundaryRight(o.boundary, o.anchor)) >= width(left) ? "right-down" : "left-down";
|
|
35
33
|
},
|
|
36
34
|
"horizontal-up": function(o) {
|
|
37
35
|
const left = getBoundaryLeft(o.boundary, o.anchor);
|
|
38
|
-
|
|
39
|
-
return width(right) >= width(left) ? "right-up" : "left-up";
|
|
36
|
+
return width(getBoundaryRight(o.boundary, o.anchor)) >= width(left) ? "right-up" : "left-up";
|
|
40
37
|
},
|
|
41
38
|
"vertical-center": function(o) {
|
|
42
39
|
const up = getBoundaryUp(o.boundary, o.anchor);
|
|
43
|
-
|
|
44
|
-
return height(down) >= height(up) ? "down-center" : "up-center";
|
|
40
|
+
return height(getBoundaryDown(o.boundary, o.anchor)) >= height(up) ? "down-center" : "up-center";
|
|
45
41
|
},
|
|
46
42
|
"vertical-left": function(o) {
|
|
47
43
|
const up = getBoundaryUp(o.boundary, o.anchor);
|
|
48
|
-
|
|
49
|
-
return height(down) >= height(up) ? "down-left" : "up-left";
|
|
44
|
+
return height(getBoundaryDown(o.boundary, o.anchor)) >= height(up) ? "down-left" : "up-left";
|
|
50
45
|
},
|
|
51
46
|
"vertical-right": function(o) {
|
|
52
47
|
const up = getBoundaryUp(o.boundary, o.anchor);
|
|
53
|
-
|
|
54
|
-
return height(down) >= height(up) ? "down-right" : "up-right";
|
|
48
|
+
return height(getBoundaryDown(o.boundary, o.anchor)) >= height(up) ? "down-right" : "up-right";
|
|
55
49
|
}
|
|
56
50
|
};
|
|
57
51
|
function withPlacement(options) {
|