@edifice.io/react 2.5.22 → 2.5.23-chore-tiptap-v3.20260930150159
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/components/AppIcon/AppIcon.js +4 -1
- package/dist/components/Avatar/Avatar.d.ts +2 -2
- package/dist/components/Avatar/Avatar.js +2 -1
- package/dist/components/BetaSwitch/BetaSwitch.d.ts +13 -0
- package/dist/components/BetaSwitch/BetaSwitch.js +27 -0
- package/dist/components/BetaSwitch/index.d.ts +1 -0
- package/dist/components/ButtonBeta/ButtonBeta.d.ts +47 -0
- package/dist/components/ButtonBeta/ButtonBeta.js +34 -0
- package/dist/components/ButtonBeta/index.d.ts +2 -0
- package/dist/components/Dropdown/DropdownTrigger.d.ts +1 -1
- package/dist/components/Flex/Flex.js +5 -1
- package/dist/components/Logo/index.d.ts +1 -1
- package/dist/components/LogoBeta/LogoBeta.d.ts +7 -0
- package/dist/components/LogoBeta/LogoBeta.js +14 -0
- package/dist/components/LogoBeta/index.d.ts +2 -0
- package/dist/components/MediaViewer/MediaViewer.d.ts +1 -1
- package/dist/components/MediaViewer/MediaWrapper.d.ts +1 -1
- package/dist/components/PageLayout/PageLayout.d.ts +45 -0
- package/dist/components/PageLayout/PageLayout.js +94 -0
- package/dist/components/PageLayout/PageLayoutContext.d.ts +14 -0
- package/dist/components/PageLayout/PageLayoutContext.js +8 -0
- package/dist/components/PageLayout/components/PageLayoutBreadcrumb.d.ts +9 -0
- package/dist/components/PageLayout/components/PageLayoutBreadcrumb.js +10 -0
- package/dist/components/PageLayout/components/PageLayoutContent.d.ts +9 -0
- package/dist/components/PageLayout/components/PageLayoutContent.js +18 -0
- package/dist/components/PageLayout/components/PageLayoutHeader.d.ts +10 -0
- package/dist/components/PageLayout/components/PageLayoutHeader.js +18 -0
- package/dist/components/PageLayout/components/PageLayoutOverlay.d.ts +15 -0
- package/dist/components/PageLayout/components/PageLayoutOverlay.js +51 -0
- package/dist/components/PageLayout/components/PageLayoutSidebarLeft.d.ts +9 -0
- package/dist/components/PageLayout/components/PageLayoutSidebarLeft.js +18 -0
- package/dist/components/PageLayout/components/PageLayoutSidebarRight.d.ts +9 -0
- package/dist/components/PageLayout/components/PageLayoutSidebarRight.js +18 -0
- package/dist/components/PageLayout/hook/useOverlay.d.ts +5 -0
- package/dist/components/PageLayout/hook/useOverlay.js +15 -0
- package/dist/components/PageLayout/index.d.ts +4 -0
- package/dist/components/PageLayout/store/overlayStore.d.ts +15 -0
- package/dist/components/PageLayout/store/overlayStore.js +12 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/editor.js +2 -0
- package/dist/homepage.js +34 -0
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/useEdificeIcons/useEdificeIcons.js +10 -9
- package/dist/hooks/useScreeb/index.d.ts +1 -1
- package/dist/icons-nav.js +38 -28
- package/dist/index.js +215 -202
- package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js +97 -90
- package/dist/modules/editor/components/BubbleMenuEditInformationPane/BubbleMenuEditInformationPane.js +111 -95
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +3 -2
- package/dist/modules/editor/components/Toolbar/LinkToolbar.FloatingOptions.js +12 -0
- package/dist/modules/editor/components/Toolbar/LinkToolbar.js +5 -4
- package/dist/modules/editor/components/Toolbar/TableToolbar.js +10 -5
- package/dist/modules/editor/hooks/index.d.ts +1 -0
- package/dist/modules/editor/hooks/useCommentEditor.d.ts +1 -1
- package/dist/modules/editor/hooks/useCommentEditor.js +1 -1
- package/dist/modules/editor/hooks/useEditorState.d.ts +20 -0
- package/dist/modules/editor/hooks/useEditorState.js +16 -0
- package/dist/modules/editor/hooks/useTipTapEditor.d.ts +1 -1
- package/dist/modules/editor/hooks/useTipTapEditor.js +4 -8
- package/dist/modules/homepage/components/Favorites/Favorites.d.ts +6 -0
- package/dist/modules/homepage/components/Favorites/Favorites.js +28 -0
- package/dist/modules/homepage/components/Favorites/FavoritesContainer.d.ts +4 -0
- package/dist/modules/homepage/components/Favorites/FavoritesContainer.js +10 -0
- package/dist/modules/homepage/components/Favorites/index.d.ts +2 -0
- package/dist/modules/homepage/components/Header/Header.d.ts +9 -0
- package/dist/modules/homepage/components/Header/Header.js +80 -0
- package/dist/modules/homepage/components/Header/index.d.ts +2 -0
- package/dist/modules/homepage/components/HomeCard/HomeCard.d.ts +37 -0
- package/dist/modules/homepage/components/HomeCard/HomeCard.js +17 -0
- package/dist/modules/homepage/components/HomeCard/HomeCardContent.d.ts +7 -0
- package/dist/modules/homepage/components/HomeCard/HomeCardContent.js +10 -0
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.d.ts +18 -0
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.js +22 -0
- package/dist/modules/homepage/components/HomeCard/index.d.ts +4 -0
- package/dist/modules/homepage/components/LastInfos/LastInfos.d.ts +49 -0
- package/dist/modules/homepage/components/LastInfos/LastInfos.js +58 -0
- package/dist/modules/homepage/components/LastInfos/LastInfosContainer.d.ts +4 -0
- package/dist/modules/homepage/components/LastInfos/LastInfosContainer.js +37 -0
- package/dist/modules/homepage/components/LastInfos/LastInfosList.d.ts +13 -0
- package/dist/modules/homepage/components/LastInfos/LastInfosList.js +31 -0
- package/dist/modules/homepage/components/LastInfos/index.d.ts +4 -0
- package/dist/modules/homepage/components/LastInfos/useLastInfos.d.ts +18 -0
- package/dist/modules/homepage/components/LastInfos/useLastInfos.js +25 -0
- package/dist/modules/homepage/components/MessageFlashList/MessageFlash.d.ts +12 -0
- package/dist/modules/homepage/components/MessageFlashList/MessageFlash.js +65 -0
- package/dist/modules/homepage/components/MessageFlashList/MessageFlashList.d.ts +12 -0
- package/dist/modules/homepage/components/MessageFlashList/MessageFlashList.js +10 -0
- package/dist/modules/homepage/components/MessageFlashList/MessageFlashListContainer.d.ts +5 -0
- package/dist/modules/homepage/components/MessageFlashList/MessageFlashListContainer.js +14 -0
- package/dist/modules/homepage/components/MessageFlashList/hooks/useMessageFlashList.d.ts +16 -0
- package/dist/modules/homepage/components/MessageFlashList/hooks/useMessageFlashList.js +19 -0
- package/dist/modules/homepage/components/MessageFlashList/index.d.ts +4 -0
- package/dist/modules/homepage/components/MessageFlashList/services/api/index.d.ts +4 -0
- package/dist/modules/homepage/components/MessageFlashList/services/api/index.js +5 -0
- package/dist/modules/homepage/components/MessageFlashList/services/api/messagesFlashService.d.ts +20 -0
- package/dist/modules/homepage/components/MessageFlashList/services/api/messagesFlashService.js +21 -0
- package/dist/modules/homepage/components/MessageFlashList/services/queries/messagesFlash.d.ts +13 -0
- package/dist/modules/homepage/components/MessageFlashList/services/queries/messagesFlash.js +31 -0
- package/dist/modules/homepage/components/Notifications/Notification.d.ts +20 -0
- package/dist/modules/homepage/components/Notifications/Notification.js +16 -0
- package/dist/modules/homepage/components/Notifications/NotificationList.d.ts +18 -0
- package/dist/modules/homepage/components/Notifications/NotificationList.js +44 -0
- package/dist/modules/homepage/components/Notifications/NotificationListContainer.d.ts +9 -0
- package/dist/modules/homepage/components/Notifications/NotificationListContainer.js +20 -0
- package/dist/modules/homepage/components/Notifications/NotificationListSkeleton.d.ts +5 -0
- package/dist/modules/homepage/components/Notifications/NotificationListSkeleton.js +17 -0
- package/dist/modules/homepage/components/Notifications/NotificationSkeleton.d.ts +3 -0
- package/dist/modules/homepage/components/Notifications/NotificationSkeleton.js +19 -0
- package/dist/modules/homepage/components/Notifications/components/NotificationItem.d.ts +24 -0
- package/dist/modules/homepage/components/Notifications/components/NotificationItem.js +28 -0
- package/dist/modules/homepage/components/Notifications/components/NotificationResource.d.ts +15 -0
- package/dist/modules/homepage/components/Notifications/components/NotificationResource.js +19 -0
- package/dist/modules/homepage/components/Notifications/components/SystemNotification.d.ts +15 -0
- package/dist/modules/homepage/components/Notifications/components/SystemNotification.js +20 -0
- package/dist/modules/homepage/components/Notifications/components/UserNotification.d.ts +15 -0
- package/dist/modules/homepage/components/Notifications/components/UserNotification.js +25 -0
- package/dist/modules/homepage/components/Notifications/components/notificationAdapter.d.ts +27 -0
- package/dist/modules/homepage/components/Notifications/components/notificationAdapter.js +53 -0
- package/dist/modules/homepage/components/Notifications/hooks/useNotificationList.d.ts +20 -0
- package/dist/modules/homepage/components/Notifications/hooks/useNotificationList.js +26 -0
- package/dist/modules/homepage/components/Notifications/index.d.ts +6 -0
- package/dist/modules/homepage/components/Notifications/services/api/index.d.ts +4 -0
- package/dist/modules/homepage/components/Notifications/services/api/index.js +5 -0
- package/dist/modules/homepage/components/Notifications/services/api/notificationService.d.ts +15 -0
- package/dist/modules/homepage/components/Notifications/services/api/notificationService.js +22 -0
- package/dist/modules/homepage/components/Notifications/services/queries/notification.d.ts +20 -0
- package/dist/modules/homepage/components/Notifications/services/queries/notification.js +40 -0
- package/dist/modules/homepage/components/SchoolSpace/SchoolSpace.d.ts +15 -0
- package/dist/modules/homepage/components/SchoolSpace/SchoolSpace.js +29 -0
- package/dist/modules/homepage/components/SchoolSpace/SchoolSpaceContainer.d.ts +4 -0
- package/dist/modules/homepage/components/SchoolSpace/SchoolSpaceContainer.js +13 -0
- package/dist/modules/homepage/components/SchoolSpace/index.d.ts +3 -0
- package/dist/modules/homepage/components/SchoolSpace/useUserSchools.d.ts +6 -0
- package/dist/modules/homepage/components/SchoolSpace/useUserSchools.js +39 -0
- package/dist/modules/homepage/components/UserSpace/UserSpace.d.ts +13 -0
- package/dist/modules/homepage/components/UserSpace/UserSpace.js +28 -0
- package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.d.ts +7 -0
- package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.js +19 -0
- package/dist/modules/homepage/components/UserSpace/index.d.ts +3 -0
- package/dist/modules/homepage/components/index.d.ts +8 -0
- package/dist/modules/homepage/hooks/useWidget.d.ts +6 -0
- package/dist/modules/homepage/hooks/useWidget.js +83 -0
- package/dist/modules/homepage/hooks/useWidgetPreferences.d.ts +6 -0
- package/dist/modules/homepage/hooks/useWidgetPreferences.js +34 -0
- package/dist/modules/homepage/index.d.ts +1 -0
- package/dist/modules/icons/components/nav/IconCommunitiesBeta.d.ts +7 -0
- package/dist/modules/icons/components/nav/IconCommunitiesBeta.js +18 -0
- package/dist/modules/icons/components/nav/IconHomeBeta.d.ts +7 -0
- package/dist/modules/icons/components/nav/IconHomeBeta.js +13 -0
- package/dist/modules/icons/components/{IconStarFavorite.d.ts → nav/IconMessagesBeta.d.ts} +2 -2
- package/dist/modules/icons/components/nav/IconMessagesBeta.js +18 -0
- package/dist/modules/icons/components/nav/IconMyAppsBeta.d.ts +7 -0
- package/dist/modules/icons/components/nav/IconMyAppsBeta.js +13 -0
- package/dist/modules/icons/components/nav/IconNotificationBeta.d.ts +7 -0
- package/dist/modules/icons/components/nav/IconNotificationBeta.js +14 -0
- package/dist/modules/icons/components/nav/index.d.ts +5 -0
- package/dist/modules/modals/OnboardingModal/index.d.ts +1 -1
- package/dist/node_modules/.pnpm/@tiptap_extension-floating-menu@3.31.3_@floating-ui_dom@1.6.0_@tiptap_core@3.10.2_@tiptap_pm@3.10.2__@tiptap_pm@3.10.2/node_modules/@tiptap/extension-floating-menu/dist/index.js +159 -0
- package/dist/node_modules/.pnpm/@tiptap_react@3.10.2_@floating-ui_dom@1.6.0_@tiptap_core@3.10.2_@tiptap_pm@3.10.2__@tiptap_pm_dubv75vojf3t6hpx6vhaocpyzq/node_modules/@tiptap/react/dist/menus/index.js +89 -0
- package/dist/node_modules/.pnpm/prosemirror-model@1.25.12/node_modules/prosemirror-model/dist/index.js +419 -0
- package/dist/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.js +489 -0
- package/dist/node_modules/.pnpm/prosemirror-transform@1.12.2/node_modules/prosemirror-transform/dist/index.js +607 -0
- package/dist/providers/EdificeClientProvider/EdificeClientProvider.d.ts +0 -7
- package/dist/utilities/create-selectors/createSelectors.d.ts +10 -0
- package/dist/utilities/create-selectors/createSelectors.js +11 -0
- package/package.json +47 -49
- package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.d.ts +0 -2
- package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js +0 -8
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconHomeBeta = ({
|
|
3
|
+
title,
|
|
4
|
+
titleId,
|
|
5
|
+
...props
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
+
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
+
/* @__PURE__ */ jsx("g", { clipPath: "url(#icon-home-beta_svg__a)", children: /* @__PURE__ */ jsx("path", { fill: "#383838", d: "M15.183.28a1.334 1.334 0 0 1 1.636 0l12 9.335c.325.252.515.64.515 1.052v14.666a4 4 0 0 1-4 4H6.668a4 4 0 0 1-4-4V10.667c0-.411.19-.8.515-1.052zM5.334 11.32v14.014a1.335 1.335 0 0 0 1.334 1.334h4v-12c0-.736.597-1.334 1.333-1.334h8c.736 0 1.333.598 1.333 1.334v12h4a1.335 1.335 0 0 0 1.334-1.334V11.32L16.001 3.023zm8 15.348h5.334V16h-5.334z" }) }),
|
|
9
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-home-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
|
|
10
|
+
] });
|
|
11
|
+
export {
|
|
12
|
+
SvgIconHomeBeta as default
|
|
13
|
+
};
|
|
@@ -3,5 +3,5 @@ interface SVGRProps {
|
|
|
3
3
|
title?: string;
|
|
4
4
|
titleId?: string;
|
|
5
5
|
}
|
|
6
|
-
declare const
|
|
7
|
-
export default
|
|
6
|
+
declare const SvgIconMessagesBeta: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconMessagesBeta;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconMessagesBeta = ({
|
|
3
|
+
title,
|
|
4
|
+
titleId,
|
|
5
|
+
...props
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
+
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
+
/* @__PURE__ */ jsxs("g", { clipPath: "url(#icon-messages-beta_svg__a)", children: [
|
|
9
|
+
/* @__PURE__ */ jsx("path", { stroke: "#E5A800", strokeMiterlimit: 10, strokeWidth: 2.667, d: "m5.93 10.246-4.8 3.088v12.267a5.335 5.335 0 0 0 5.334 5.333h24.534v-17.6l-4.689-3.013" }),
|
|
10
|
+
/* @__PURE__ */ jsx("path", { fill: "#FCF3CF", d: "M26.196 15.468v-14.4H5.93v14.4" }),
|
|
11
|
+
/* @__PURE__ */ jsx("path", { stroke: "#FFC403", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M26.196 15.468v-14.4H5.93v14.4" }),
|
|
12
|
+
/* @__PURE__ */ jsx("path", { stroke: "#E5A800", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M9.13 5.334h13.867M10.197 9.6h11.734M1.13 13.334l14.934 8.533 14.933-8.533" })
|
|
13
|
+
] }),
|
|
14
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-messages-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
|
|
15
|
+
] });
|
|
16
|
+
export {
|
|
17
|
+
SvgIconMessagesBeta as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconMyAppsBeta: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconMyAppsBeta;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconMyAppsBeta = ({
|
|
3
|
+
title,
|
|
4
|
+
titleId,
|
|
5
|
+
...props
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
+
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
+
/* @__PURE__ */ jsx("g", { stroke: "#1C1C73", strokeMiterlimit: 10, strokeWidth: 2.667, clipPath: "url(#icon-my-apps-beta_svg__a)", children: /* @__PURE__ */ jsx("path", { d: "M31.117 1H19v12.117h12.117zM13.207 18.884H1.09V31h12.117zM1 1.084c6.688 0 12.117 5.43 12.117 12.117H1zM30.934 18.884H18.816V31h12.118z" }) }),
|
|
9
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-my-apps-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
|
|
10
|
+
] });
|
|
11
|
+
export {
|
|
12
|
+
SvgIconMyAppsBeta as default
|
|
13
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconNotificationBeta: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconNotificationBeta;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconNotificationBeta = ({
|
|
3
|
+
title,
|
|
4
|
+
titleId,
|
|
5
|
+
...props
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
+
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
+
/* @__PURE__ */ jsx("path", { stroke: "#1C1C73", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M13.363 5.348a2.726 2.726 0 1 1 5.383-.622q0 .423-.12.808M19.886 25.184a3.919 3.919 0 1 1-7.559-.26" }),
|
|
9
|
+
/* @__PURE__ */ jsx("path", { stroke: "#1C1C73", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M28.62 18.901H4.058v6.682h24.56z" }),
|
|
10
|
+
/* @__PURE__ */ jsx("path", { stroke: "#1C1C73", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M16.189 4.889c5.639 0 10.22 4.581 10.22 10.22v3.794H5.97V15.11c0-5.639 4.581-10.22 10.22-10.22Z" })
|
|
11
|
+
] });
|
|
12
|
+
export {
|
|
13
|
+
SvgIconNotificationBeta as default
|
|
14
|
+
};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
export { default as IconCommunitiesBeta } from './IconCommunitiesBeta';
|
|
1
2
|
export { default as IconCommunities } from './IconCommunities';
|
|
2
3
|
export { default as IconCommunity } from './IconCommunity';
|
|
3
4
|
export { default as IconDisconnect } from './IconDisconnect';
|
|
5
|
+
export { default as IconHomeBeta } from './IconHomeBeta';
|
|
4
6
|
export { default as IconHome } from './IconHome';
|
|
7
|
+
export { default as IconMessagesBeta } from './IconMessagesBeta';
|
|
8
|
+
export { default as IconMyAppsBeta } from './IconMyAppsBeta';
|
|
5
9
|
export { default as IconMyApps } from './IconMyApps';
|
|
6
10
|
export { default as IconNeoAssistance } from './IconNeoAssistance';
|
|
7
11
|
export { default as IconNeoMessaging } from './IconNeoMessaging';
|
|
8
12
|
export { default as IconNewRelease } from './IconNewRelease';
|
|
13
|
+
export { default as IconNotificationBeta } from './IconNotificationBeta';
|
|
9
14
|
export { default as IconOneAssistance } from './IconOneAssistance';
|
|
10
15
|
export { default as IconOneMessaging } from './IconOneMessaging';
|
|
11
16
|
export { default as IconOneProfile } from './IconOneProfile';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as OnboardingModal } from './OnboardingModal';
|
|
2
|
-
export type { OnboardingModalRef } from './OnboardingModal';
|
|
2
|
+
export type { DisplayRuleCheckResult, OnboardingModalRef, OnboardingProps, } from './OnboardingModal';
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { getText, getTextSerializersFromSchema, posToDOMRect, Extension } from "@tiptap/core";
|
|
2
|
+
import { flip, shift, offset, arrow, size, autoPlacement, hide, inline, computePosition } from "@floating-ui/dom";
|
|
3
|
+
import { Plugin, PluginKey } from "../../../../../prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.js";
|
|
4
|
+
var FloatingMenuView = class {
|
|
5
|
+
getTextContent(node) {
|
|
6
|
+
return getText(node, { textSerializers: getTextSerializersFromSchema(this.editor.schema) });
|
|
7
|
+
}
|
|
8
|
+
get middlewares() {
|
|
9
|
+
const middlewares = [];
|
|
10
|
+
return this.floatingUIOptions.flip && middlewares.push(flip(typeof this.floatingUIOptions.flip != "boolean" ? this.floatingUIOptions.flip : void 0)), this.floatingUIOptions.shift && middlewares.push(shift(typeof this.floatingUIOptions.shift != "boolean" ? this.floatingUIOptions.shift : void 0)), this.floatingUIOptions.offset && middlewares.push(offset(typeof this.floatingUIOptions.offset != "boolean" ? this.floatingUIOptions.offset : void 0)), this.floatingUIOptions.arrow && middlewares.push(arrow(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && middlewares.push(size(typeof this.floatingUIOptions.size != "boolean" ? this.floatingUIOptions.size : void 0)), this.floatingUIOptions.autoPlacement && middlewares.push(autoPlacement(typeof this.floatingUIOptions.autoPlacement != "boolean" ? this.floatingUIOptions.autoPlacement : void 0)), this.floatingUIOptions.hide && middlewares.push(hide(typeof this.floatingUIOptions.hide != "boolean" ? this.floatingUIOptions.hide : void 0)), this.floatingUIOptions.inline && middlewares.push(inline(typeof this.floatingUIOptions.inline != "boolean" ? this.floatingUIOptions.inline : void 0)), middlewares;
|
|
11
|
+
}
|
|
12
|
+
constructor({ editor, element, view, pluginKey = "floatingMenu", updateDelay = 250, resizeDelay = 60, options, appendTo, shouldShow }) {
|
|
13
|
+
var _options$scrollTarget;
|
|
14
|
+
this.preventHide = !1, this.isVisible = !1, this.scrollTarget = window, this.shouldShow = ({ view: view2, state }) => {
|
|
15
|
+
const { selection } = state, { $anchor, empty } = selection, isRootDepth = $anchor.depth === 1, isEmptyTextBlock = $anchor.parent.isTextblock && !$anchor.parent.type.spec.code && !$anchor.parent.textContent && $anchor.parent.childCount === 0 && !this.getTextContent($anchor.parent);
|
|
16
|
+
return !(!view2.hasFocus() || !empty || !isRootDepth || !isEmptyTextBlock || !this.editor.isEditable);
|
|
17
|
+
}, this.floatingUIOptions = {
|
|
18
|
+
strategy: "absolute",
|
|
19
|
+
placement: "right",
|
|
20
|
+
offset: 8,
|
|
21
|
+
flip: {},
|
|
22
|
+
shift: {},
|
|
23
|
+
arrow: !1,
|
|
24
|
+
size: !1,
|
|
25
|
+
autoPlacement: !1,
|
|
26
|
+
hide: !1,
|
|
27
|
+
inline: !1
|
|
28
|
+
}, this.updateHandler = (view2, selectionChanged, docChanged, oldState) => {
|
|
29
|
+
const { composing } = view2;
|
|
30
|
+
if (!(composing || !selectionChanged && !docChanged)) {
|
|
31
|
+
if (!this.getShouldShow(oldState)) {
|
|
32
|
+
this.hide();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
this.updatePosition(), this.show();
|
|
36
|
+
}
|
|
37
|
+
}, this.mousedownHandler = () => {
|
|
38
|
+
this.preventHide = !0;
|
|
39
|
+
}, this.focusHandler = () => {
|
|
40
|
+
setTimeout(() => this.update(this.editor.view));
|
|
41
|
+
}, this.blurHandler = ({ event }) => {
|
|
42
|
+
var _this$element$parentN;
|
|
43
|
+
if (this.preventHide) {
|
|
44
|
+
this.preventHide = !1;
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
event != null && event.relatedTarget && (!((_this$element$parentN = this.element.parentNode) === null || _this$element$parentN === void 0) && _this$element$parentN.contains(event.relatedTarget)) || (event == null ? void 0 : event.relatedTarget) !== this.editor.view.dom && this.hide();
|
|
48
|
+
}, this.transactionHandler = ({ transaction: tr }) => {
|
|
49
|
+
const meta = tr.getMeta(this.pluginKey);
|
|
50
|
+
meta === "updatePosition" ? this.updatePosition() : meta && typeof meta == "object" && meta.type === "updateOptions" ? this.updateOptions(meta.options) : meta === "hide" ? this.hide() : meta === "show" && (this.updatePosition(), this.show());
|
|
51
|
+
}, this.resizeHandler = () => {
|
|
52
|
+
this.resizeDebounceTimer && clearTimeout(this.resizeDebounceTimer), this.resizeDebounceTimer = window.setTimeout(() => {
|
|
53
|
+
this.updatePosition();
|
|
54
|
+
}, this.resizeDelay);
|
|
55
|
+
}, this.editor = editor, this.element = element, this.view = view, this.pluginKey = pluginKey, this.updateDelay = updateDelay, this.resizeDelay = resizeDelay, this.appendTo = appendTo, this.scrollTarget = (_options$scrollTarget = options == null ? void 0 : options.scrollTarget) !== null && _options$scrollTarget !== void 0 ? _options$scrollTarget : window, this.floatingUIOptions = {
|
|
56
|
+
...this.floatingUIOptions,
|
|
57
|
+
...options
|
|
58
|
+
}, this.element.tabIndex = 0, shouldShow && (this.shouldShow = shouldShow), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.editor.on("transaction", this.transactionHandler), window.addEventListener("resize", this.resizeHandler), this.scrollTarget.addEventListener("scroll", this.resizeHandler), this.update(view, view.state), this.getShouldShow() && (this.show(), this.updatePosition());
|
|
59
|
+
}
|
|
60
|
+
getShouldShow(oldState) {
|
|
61
|
+
var _this$shouldShow;
|
|
62
|
+
const { state } = this.view, { selection } = state, { ranges } = selection, from = Math.min(...ranges.map((range) => range.$from.pos)), to = Math.max(...ranges.map((range) => range.$to.pos));
|
|
63
|
+
return (_this$shouldShow = this.shouldShow) === null || _this$shouldShow === void 0 ? void 0 : _this$shouldShow.call(this, {
|
|
64
|
+
editor: this.editor,
|
|
65
|
+
view: this.view,
|
|
66
|
+
state,
|
|
67
|
+
oldState,
|
|
68
|
+
from,
|
|
69
|
+
to
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
updateOptions(newProps) {
|
|
73
|
+
if (newProps.updateDelay !== void 0 && (this.updateDelay = newProps.updateDelay), newProps.resizeDelay !== void 0 && (this.resizeDelay = newProps.resizeDelay), newProps.appendTo !== void 0 && (this.appendTo = newProps.appendTo), newProps.shouldShow !== void 0 && newProps.shouldShow && (this.shouldShow = newProps.shouldShow), newProps.options !== void 0) {
|
|
74
|
+
var _newProps$options$scr;
|
|
75
|
+
const newScrollTarget = (_newProps$options$scr = newProps.options.scrollTarget) !== null && _newProps$options$scr !== void 0 ? _newProps$options$scr : window;
|
|
76
|
+
newScrollTarget !== this.scrollTarget && (this.scrollTarget.removeEventListener("scroll", this.resizeHandler), this.scrollTarget = newScrollTarget, this.scrollTarget.addEventListener("scroll", this.resizeHandler)), this.floatingUIOptions = {
|
|
77
|
+
...this.floatingUIOptions,
|
|
78
|
+
...newProps.options
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
updatePosition() {
|
|
83
|
+
var _this$view;
|
|
84
|
+
if (!(!((_this$view = this.view) === null || _this$view === void 0 || (_this$view = _this$view.dom) === null || _this$view === void 0) && _this$view.parentNode)) return;
|
|
85
|
+
const { selection } = this.editor.state, domRect = posToDOMRect(this.view, selection.from, selection.to);
|
|
86
|
+
computePosition({
|
|
87
|
+
getBoundingClientRect: () => domRect,
|
|
88
|
+
getClientRects: () => [domRect]
|
|
89
|
+
}, this.element, {
|
|
90
|
+
placement: this.floatingUIOptions.placement,
|
|
91
|
+
strategy: this.floatingUIOptions.strategy,
|
|
92
|
+
middleware: this.middlewares
|
|
93
|
+
}).then(({ x, y, strategy, middlewareData }) => {
|
|
94
|
+
var _middlewareData$hide, _middlewareData$hide2;
|
|
95
|
+
if (!((_middlewareData$hide = middlewareData.hide) === null || _middlewareData$hide === void 0) && _middlewareData$hide.referenceHidden || !((_middlewareData$hide2 = middlewareData.hide) === null || _middlewareData$hide2 === void 0) && _middlewareData$hide2.escaped) {
|
|
96
|
+
this.element.style.visibility = "hidden";
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
this.element.style.visibility = "visible", this.element.style.width = "max-content", this.element.style.position = strategy, this.element.style.left = `${x}px`, this.element.style.top = `${y}px`, this.isVisible && this.floatingUIOptions.onUpdate && this.floatingUIOptions.onUpdate();
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
update(view, oldState) {
|
|
103
|
+
const selectionChanged = !(oldState != null && oldState.selection.eq(view.state.selection)), docChanged = !(oldState != null && oldState.doc.eq(view.state.doc));
|
|
104
|
+
this.updateHandler(view, selectionChanged, docChanged, oldState);
|
|
105
|
+
}
|
|
106
|
+
show() {
|
|
107
|
+
var _ref;
|
|
108
|
+
if (this.isVisible) return;
|
|
109
|
+
this.element.style.visibility = "visible", this.element.style.opacity = "1";
|
|
110
|
+
const appendToElement = typeof this.appendTo == "function" ? this.appendTo() : this.appendTo;
|
|
111
|
+
(_ref = appendToElement ?? this.view.dom.parentElement) === null || _ref === void 0 || _ref.appendChild(this.element), this.floatingUIOptions.onShow && this.floatingUIOptions.onShow(), this.isVisible = !0;
|
|
112
|
+
}
|
|
113
|
+
hide() {
|
|
114
|
+
this.isVisible && (this.element.style.visibility = "hidden", this.element.style.opacity = "0", this.element.remove(), this.floatingUIOptions.onHide && this.floatingUIOptions.onHide(), this.isVisible = !1);
|
|
115
|
+
}
|
|
116
|
+
destroy() {
|
|
117
|
+
this.hide(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), window.removeEventListener("resize", this.resizeHandler), this.scrollTarget.removeEventListener("scroll", this.resizeHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler), this.editor.off("transaction", this.transactionHandler), this.floatingUIOptions.onDestroy && this.floatingUIOptions.onDestroy();
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const FloatingMenuPlugin = (options) => new Plugin({
|
|
121
|
+
key: typeof options.pluginKey == "string" ? new PluginKey(options.pluginKey) : options.pluginKey,
|
|
122
|
+
view: (view) => new FloatingMenuView({
|
|
123
|
+
view,
|
|
124
|
+
...options
|
|
125
|
+
})
|
|
126
|
+
});
|
|
127
|
+
Extension.create({
|
|
128
|
+
name: "floatingMenu",
|
|
129
|
+
addOptions() {
|
|
130
|
+
return {
|
|
131
|
+
element: null,
|
|
132
|
+
options: {},
|
|
133
|
+
pluginKey: "floatingMenu",
|
|
134
|
+
updateDelay: void 0,
|
|
135
|
+
resizeDelay: void 0,
|
|
136
|
+
appendTo: void 0,
|
|
137
|
+
shouldShow: null
|
|
138
|
+
};
|
|
139
|
+
},
|
|
140
|
+
addCommands() {
|
|
141
|
+
return { updateFloatingMenuPosition: () => ({ tr, dispatch }) => (dispatch && tr.setMeta(this.options.pluginKey, "updatePosition"), !0) };
|
|
142
|
+
},
|
|
143
|
+
addProseMirrorPlugins() {
|
|
144
|
+
return this.options.element ? [FloatingMenuPlugin({
|
|
145
|
+
pluginKey: this.options.pluginKey,
|
|
146
|
+
editor: this.editor,
|
|
147
|
+
element: this.options.element,
|
|
148
|
+
updateDelay: this.options.updateDelay,
|
|
149
|
+
resizeDelay: this.options.resizeDelay,
|
|
150
|
+
options: this.options.options,
|
|
151
|
+
appendTo: this.options.appendTo,
|
|
152
|
+
shouldShow: this.options.shouldShow
|
|
153
|
+
})] : [];
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
export {
|
|
157
|
+
FloatingMenuPlugin,
|
|
158
|
+
FloatingMenuView
|
|
159
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { BubbleMenuPlugin } from "@tiptap/extension-bubble-menu";
|
|
2
|
+
import { useCurrentEditor } from "@tiptap/react";
|
|
3
|
+
import React, { useRef, useEffect } from "react";
|
|
4
|
+
import { createPortal } from "react-dom";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { FloatingMenuPlugin } from "../../../../../../@tiptap_extension-floating-menu@3.31.3_@floating-ui_dom@1.6.0_@tiptap_core@3.10.2_@tiptap_pm@3.10.2__@tiptap_pm@3.10.2/node_modules/@tiptap/extension-floating-menu/dist/index.js";
|
|
7
|
+
var BubbleMenu = React.forwardRef(
|
|
8
|
+
({
|
|
9
|
+
pluginKey = "bubbleMenu",
|
|
10
|
+
editor,
|
|
11
|
+
updateDelay,
|
|
12
|
+
resizeDelay,
|
|
13
|
+
appendTo,
|
|
14
|
+
shouldShow = null,
|
|
15
|
+
getReferencedVirtualElement,
|
|
16
|
+
options,
|
|
17
|
+
children,
|
|
18
|
+
...restProps
|
|
19
|
+
}, ref) => {
|
|
20
|
+
const menuEl = useRef(document.createElement("div"));
|
|
21
|
+
typeof ref == "function" ? ref(menuEl.current) : ref && (ref.current = menuEl.current);
|
|
22
|
+
const { editor: currentEditor } = useCurrentEditor(), pluginEditor = editor || currentEditor, bubbleMenuPluginProps = {
|
|
23
|
+
updateDelay,
|
|
24
|
+
resizeDelay,
|
|
25
|
+
appendTo,
|
|
26
|
+
pluginKey,
|
|
27
|
+
shouldShow,
|
|
28
|
+
getReferencedVirtualElement,
|
|
29
|
+
options
|
|
30
|
+
}, bubbleMenuPluginPropsRef = useRef(bubbleMenuPluginProps);
|
|
31
|
+
return bubbleMenuPluginPropsRef.current = bubbleMenuPluginProps, useEffect(() => {
|
|
32
|
+
if (pluginEditor != null && pluginEditor.isDestroyed)
|
|
33
|
+
return;
|
|
34
|
+
if (!pluginEditor) {
|
|
35
|
+
console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const bubbleMenuElement = menuEl.current;
|
|
39
|
+
bubbleMenuElement.style.visibility = "hidden", bubbleMenuElement.style.position = "absolute";
|
|
40
|
+
const plugin = BubbleMenuPlugin({
|
|
41
|
+
...bubbleMenuPluginPropsRef.current,
|
|
42
|
+
editor: pluginEditor,
|
|
43
|
+
element: bubbleMenuElement
|
|
44
|
+
});
|
|
45
|
+
pluginEditor.registerPlugin(plugin);
|
|
46
|
+
const createdPluginKey = bubbleMenuPluginPropsRef.current.pluginKey;
|
|
47
|
+
return () => {
|
|
48
|
+
pluginEditor.unregisterPlugin(createdPluginKey), window.requestAnimationFrame(() => {
|
|
49
|
+
bubbleMenuElement.parentNode && bubbleMenuElement.parentNode.removeChild(bubbleMenuElement);
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
}, [pluginEditor]), createPortal(/* @__PURE__ */ jsx("div", { ...restProps, children }), menuEl.current);
|
|
53
|
+
}
|
|
54
|
+
), FloatingMenu = React.forwardRef(
|
|
55
|
+
({ pluginKey = "floatingMenu", editor, appendTo, shouldShow = null, options, children, ...restProps }, ref) => {
|
|
56
|
+
const menuEl = useRef(document.createElement("div"));
|
|
57
|
+
typeof ref == "function" ? ref(menuEl.current) : ref && (ref.current = menuEl.current);
|
|
58
|
+
const { editor: currentEditor } = useCurrentEditor();
|
|
59
|
+
return useEffect(() => {
|
|
60
|
+
const floatingMenuElement = menuEl.current;
|
|
61
|
+
if (floatingMenuElement.style.visibility = "hidden", floatingMenuElement.style.position = "absolute", editor != null && editor.isDestroyed || currentEditor != null && currentEditor.isDestroyed)
|
|
62
|
+
return;
|
|
63
|
+
const attachToEditor = editor || currentEditor;
|
|
64
|
+
if (!attachToEditor) {
|
|
65
|
+
console.warn(
|
|
66
|
+
"FloatingMenu component is not rendered inside of an editor component or does not have editor prop."
|
|
67
|
+
);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const plugin = FloatingMenuPlugin({
|
|
71
|
+
editor: attachToEditor,
|
|
72
|
+
element: floatingMenuElement,
|
|
73
|
+
pluginKey,
|
|
74
|
+
appendTo,
|
|
75
|
+
shouldShow,
|
|
76
|
+
options
|
|
77
|
+
});
|
|
78
|
+
return attachToEditor.registerPlugin(plugin), () => {
|
|
79
|
+
attachToEditor.unregisterPlugin(pluginKey), window.requestAnimationFrame(() => {
|
|
80
|
+
floatingMenuElement.parentNode && floatingMenuElement.parentNode.removeChild(floatingMenuElement);
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
}, [editor, currentEditor, appendTo, pluginKey, shouldShow, options]), createPortal(/* @__PURE__ */ jsx("div", { ...restProps, children }), menuEl.current);
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
export {
|
|
87
|
+
BubbleMenu,
|
|
88
|
+
FloatingMenu
|
|
89
|
+
};
|