@edifice.io/react 2.0.2 → 2.0.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.
@@ -17,7 +17,7 @@ import TableToolbar from "../Toolbar/TableToolbar.js";
17
17
  import BubbleMenuEditImage from "../BubbleMenuEditImage/BubbleMenuEditImage.js";
18
18
  import LoadingScreen from "../../../../components/LoadingScreen/LoadingScreen.js";
19
19
  import MediaLibrary from "../../../multimedia/MediaLibrary/MediaLibrary.js";
20
- const MathsModal = /* @__PURE__ */ lazy(async () => await import("./MathsModal.js")), ImageEditor = /* @__PURE__ */ lazy(async () => await import("../../../multimedia/ImageEditor/components/ImageEditor.js")), Editor = /* @__PURE__ */ forwardRef(({
20
+ const MathsModal = /* @__PURE__ */ lazy(async () => await import("../MathsModal/MathsModal.js")), ImageEditor = /* @__PURE__ */ lazy(async () => await import("../../../multimedia/ImageEditor/components/ImageEditor.js")), Editor = /* @__PURE__ */ forwardRef(({
21
21
  id,
22
22
  content,
23
23
  mode = "read",
@@ -3,5 +3,5 @@ interface ModalProps {
3
3
  onSuccess?: (formulaEditor: string) => void;
4
4
  onCancel?: () => void;
5
5
  }
6
- declare const MathsModal: ({ isOpen, onSuccess, onCancel }: ModalProps) => import('react').ReactPortal;
6
+ declare const MathsModal: ({ isOpen, onSuccess, onCancel }: ModalProps) => import("react/jsx-runtime").JSX.Element;
7
7
  export default MathsModal;
@@ -3,7 +3,6 @@ import { useState, useEffect } from "react";
3
3
  import Mathematics from "@tiptap-pro/extension-mathematics";
4
4
  import { useEditor, EditorContent } from "@tiptap/react";
5
5
  import StarterKit from "@tiptap/starter-kit";
6
- import { createPortal } from "react-dom";
7
6
  import { useTranslation } from "react-i18next";
8
7
  import Modal from "../../../../components/Modal/Modal.js";
9
8
  import Button from "../../../../components/Button/Button.js";
@@ -29,7 +28,7 @@ const MathsModal = ({
29
28
  }, handleOnCancel = () => {
30
29
  onCancel == null || onCancel();
31
30
  };
32
- return /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "MathsModal", isOpen, onModalClose: handleOnCancel, children: [
31
+ return /* @__PURE__ */ jsxs(Modal, { id: "MathsModal", isOpen, onModalClose: handleOnCancel, children: [
33
32
  /* @__PURE__ */ jsx(Modal.Header, { onModalClose: handleOnCancel, children: t("tiptap.maths.title") }),
34
33
  /* @__PURE__ */ jsxs(Modal.Subtitle, { children: [
35
34
  t("tiptap.maths.subtitle.1"),
@@ -43,7 +42,7 @@ const MathsModal = ({
43
42
  /* @__PURE__ */ jsx(Button, { color: "tertiary", onClick: onCancel, type: "button", variant: "ghost", children: t("tiptap.maths.cancel") }),
44
43
  /* @__PURE__ */ jsx(Button, { color: "primary", onClick: () => onSuccess == null ? void 0 : onSuccess(formulaEditor), type: "button", variant: "filled", children: t("tiptap.maths.add") })
45
44
  ] })
46
- ] }), document.getElementById("portal"));
45
+ ] });
47
46
  };
48
47
  export {
49
48
  MathsModal as default
@@ -0,0 +1 @@
1
+ export { default as MathsModal } from './MathsModal';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -119,9 +119,9 @@
119
119
  "react-slugify": "^3.0.3",
120
120
  "swiper": "^10.1.0",
121
121
  "ua-parser-js": "^1.0.36",
122
- "@edifice.io/bootstrap": "2.0.2",
123
- "@edifice.io/tiptap-extensions": "2.0.2",
124
- "@edifice.io/utilities": "2.0.2"
122
+ "@edifice.io/tiptap-extensions": "2.0.3",
123
+ "@edifice.io/bootstrap": "2.0.3",
124
+ "@edifice.io/utilities": "2.0.3"
125
125
  },
126
126
  "devDependencies": {
127
127
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -147,7 +147,7 @@
147
147
  "typescript-eslint": "^8.8.1",
148
148
  "vite": "^5.4.11",
149
149
  "vite-plugin-dts": "^4.1.0",
150
- "@edifice.io/client": "2.0.2"
150
+ "@edifice.io/client": "2.0.3"
151
151
  },
152
152
  "peerDependencies": {
153
153
  "@react-spring/web": "^9.7.5",