magic-editor-x 1.3.6 → 1.3.7

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.
@@ -7,10 +7,10 @@ const admin = require("@strapi/strapi/admin");
7
7
  const styled = require("styled-components");
8
8
  const outline = require("@heroicons/react/24/outline");
9
9
  const EditorJS = require("@editorjs/editorjs");
10
- const getTranslation = require("./getTranslation-BFYSgCMJ.js");
11
- const tools = require("./tools-CZFxM_lD.js");
12
- const index = require("./index-B_gIy3qL.js");
13
- const LicensePage = require("./LicensePage-DuV_uXao.js");
10
+ const getTranslation = require("./getTranslation-D21ValYk.js");
11
+ const tools = require("./tools-D4Y_iEui.js");
12
+ const index = require("./index-BnTvuHf2.js");
13
+ const LicensePage = require("./LicensePage-C6TBYCWM.js");
14
14
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
15
15
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
16
16
  const EditorJS__default = /* @__PURE__ */ _interopDefault(EditorJS);
@@ -5,10 +5,10 @@ import { useFetchClient, useNotification, Page } from "@strapi/strapi/admin";
5
5
  import styled, { css, keyframes } from "styled-components";
6
6
  import { HashtagIcon, DocumentTextIcon, ListBulletIcon, CheckIcon, ChatBubbleBottomCenterTextIcon, CodeBracketIcon, PhotoIcon, TableCellsIcon, LinkIcon, ExclamationTriangleIcon, PaperClipIcon, BellAlertIcon, SparklesIcon, BeakerIcon, PlayCircleIcon, ArrowPathIcon, EyeIcon, DocumentDuplicateIcon, ChevronRightIcon, CubeTransparentIcon, Cog6ToothIcon, UserGroupIcon, BookOpenIcon, CommandLineIcon, UserPlusIcon, TrashIcon, CheckCircleIcon, XMarkIcon, KeyIcon } from "@heroicons/react/24/outline";
7
7
  import EditorJS from "@editorjs/editorjs";
8
- import { u as useIntl, g as getTranslation, L as Loader, a as Box, T as Typography, F as Flex, c as TextInput, B as Button$2 } from "./getTranslation-DP4KaXRi.mjs";
9
- import { g as getTools } from "./tools-Qb0aXrud.mjs";
10
- import { P as PLUGIN_ID } from "./index-BYzgJaH8.mjs";
11
- import LicensePage from "./LicensePage-DunwoRaq.mjs";
8
+ import { u as useIntl, g as getTranslation, L as Loader, a as Box, T as Typography, F as Flex, c as TextInput, B as Button$2 } from "./getTranslation-D2oq0PyC.mjs";
9
+ import { g as getTools } from "./tools-BGR6Cw4p.mjs";
10
+ import { P as PLUGIN_ID } from "./index-tbHD7slZ.mjs";
11
+ import LicensePage from "./LicensePage-zaYXFrKs.mjs";
12
12
  const fadeInUp = keyframes`
13
13
  from { opacity: 0; transform: translateY(20px); }
14
14
  to { opacity: 1; transform: translateY(0); }
@@ -3,9 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const admin = require("@strapi/strapi/admin");
6
- const getTranslation = require("./getTranslation-BFYSgCMJ.js");
6
+ const getTranslation = require("./getTranslation-D21ValYk.js");
7
7
  const styled = require("styled-components");
8
- const index = require("./index-B_gIy3qL.js");
8
+ const index = require("./index-BnTvuHf2.js");
9
9
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
10
10
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
11
11
  const Container = styled__default.default(getTranslation.Box)`
@@ -1,9 +1,9 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
3
  import { useFetchClient, useNotification } from "@strapi/strapi/admin";
4
- import { u as useIntl, F as Flex, L as Loader, T as Typography, d as Badge, a as Box, g as getTranslation, B as Button } from "./getTranslation-DP4KaXRi.mjs";
4
+ import { u as useIntl, F as Flex, L as Loader, T as Typography, d as Badge, a as Box, g as getTranslation, B as Button } from "./getTranslation-D2oq0PyC.mjs";
5
5
  import styled from "styled-components";
6
- import { F as ForwardRef$2o, a as ForwardRef$26, b as ForwardRef$o, c as ForwardRef$1g, d as ForwardRef$y } from "./index-BYzgJaH8.mjs";
6
+ import { F as ForwardRef$2o, a as ForwardRef$26, b as ForwardRef$o, c as ForwardRef$1g, d as ForwardRef$y } from "./index-tbHD7slZ.mjs";
7
7
  const Container = styled(Box)`
8
8
  padding: 32px;
9
9
  max-width: 1400px;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
- const getTranslation = require("./getTranslation-BFYSgCMJ.js");
5
+ const getTranslation = require("./getTranslation-D21ValYk.js");
6
6
  const styled = require("styled-components");
7
7
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
8
8
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useMemo } from "react";
3
- import { u as useIntl, F as Flex, g as getTranslation } from "./getTranslation-DP4KaXRi.mjs";
3
+ import { u as useIntl, F as Flex, g as getTranslation } from "./getTranslation-D2oq0PyC.mjs";
4
4
  import styled, { css, keyframes } from "styled-components";
5
5
  const pulse = keyframes`
6
6
  0%, 100% {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
- const getTranslation = require("./getTranslation-BFYSgCMJ.js");
5
+ const getTranslation = require("./getTranslation-D21ValYk.js");
6
6
  const admin = require("@strapi/strapi/admin");
7
7
  const outline = require("@heroicons/react/24/outline");
8
8
  const styled = require("styled-components");
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
- import { u as useIntl, L as Loader, a as Box, A as Alert, F as Flex, T as Typography, B as Button, d as Badge, e as Accordion, g as getTranslation } from "./getTranslation-DP4KaXRi.mjs";
3
+ import { u as useIntl, L as Loader, a as Box, A as Alert, F as Flex, T as Typography, B as Button, d as Badge, e as Accordion, g as getTranslation } from "./getTranslation-D2oq0PyC.mjs";
4
4
  import { useFetchClient, useNotification } from "@strapi/strapi/admin";
5
5
  import { ArrowPathIcon, DocumentDuplicateIcon, ArrowDownTrayIcon, UserIcon, UsersIcon, ShieldCheckIcon, SparklesIcon, ChartBarIcon } from "@heroicons/react/24/outline";
6
6
  import styled, { css, keyframes } from "styled-components";
@@ -3,7 +3,7 @@ const React = require("react");
3
3
  const styled = require("styled-components");
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
5
  const ReactDOM = require("react-dom");
6
- const index$1 = require("./index-B_gIy3qL.js");
6
+ const index$1 = require("./index-BnTvuHf2.js");
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
9
9
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -4,7 +4,7 @@ import { styled, css, keyframes, createGlobalStyle, useTheme } from "styled-comp
4
4
  import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
5
5
  import * as ReactDOM from "react-dom";
6
6
  import ReactDOM__default, { flushSync, createPortal } from "react-dom";
7
- import { a as ForwardRef$26, e as ForwardRef$2n, f as ForwardRef$2, g as ForwardRef$1l, h as ForwardRef$1b, i as ForwardRef$2v, j as ForwardRef$1U, k as ForwardRef$2j, l as ForwardRef$12, m as ForwardRef$2k, n as ForwardRef$2x, o as ForwardRef$2h, p as ForwardRef$v, P as PLUGIN_ID } from "./index-BYzgJaH8.mjs";
7
+ import { a as ForwardRef$26, e as ForwardRef$2n, f as ForwardRef$2, g as ForwardRef$1l, h as ForwardRef$1b, i as ForwardRef$2v, j as ForwardRef$1U, k as ForwardRef$2j, l as ForwardRef$12, m as ForwardRef$2k, n as ForwardRef$2x, o as ForwardRef$2h, p as ForwardRef$v, P as PLUGIN_ID } from "./index-tbHD7slZ.mjs";
8
8
  var __assign = function() {
9
9
  __assign = Object.assign || function __assign2(t2) {
10
10
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -2384,7 +2384,7 @@ const index = {
2384
2384
  icon: PluginIcon,
2385
2385
  // Input component for Content Manager
2386
2386
  components: {
2387
- Input: async () => Promise.resolve().then(() => require("./index-C2pIXifO.js")).then((module2) => ({
2387
+ Input: async () => Promise.resolve().then(() => require("./index-Czk5HVLJ.js")).then((module2) => ({
2388
2388
  default: module2.default
2389
2389
  }))
2390
2390
  },
@@ -2446,7 +2446,7 @@ const index = {
2446
2446
  defaultMessage: "Magic Editor X"
2447
2447
  },
2448
2448
  // Use lazy import without async wrapper to avoid deprecation warning
2449
- Component: () => Promise.resolve().then(() => require("./App-BpSMhQIR.js")),
2449
+ Component: () => Promise.resolve().then(() => require("./App-BrAGe1KP.js")),
2450
2450
  permissions: []
2451
2451
  });
2452
2452
  app.createSettingSection(
@@ -2465,7 +2465,7 @@ const index = {
2465
2465
  id: "upgrade",
2466
2466
  // relative path (no leading slash)
2467
2467
  to: `${PLUGIN_ID}/upgrade`,
2468
- Component: () => Promise.resolve().then(() => require("./LicensePage-DuV_uXao.js"))
2468
+ Component: () => Promise.resolve().then(() => require("./LicensePage-C6TBYCWM.js"))
2469
2469
  },
2470
2470
  {
2471
2471
  intlLabel: {
@@ -2475,7 +2475,7 @@ const index = {
2475
2475
  id: "license",
2476
2476
  // relative path (no leading slash)
2477
2477
  to: `${PLUGIN_ID}/license`,
2478
- Component: () => Promise.resolve().then(() => require("./Settings-DvH7epUa.js"))
2478
+ Component: () => Promise.resolve().then(() => require("./Settings-BH0Ttu_5.js"))
2479
2479
  }
2480
2480
  ]
2481
2481
  );
@@ -2485,7 +2485,7 @@ const index = {
2485
2485
  * Bootstrap the plugin
2486
2486
  */
2487
2487
  async bootstrap(app) {
2488
- const { default: LiveCollaborationPanel } = await Promise.resolve().then(() => require("./LiveCollaborationPanel-Cszm9ewD.js"));
2488
+ const { default: LiveCollaborationPanel } = await Promise.resolve().then(() => require("./LiveCollaborationPanel-CGt57XG1.js"));
2489
2489
  try {
2490
2490
  const contentManagerPlugin = app.getPlugin("content-manager");
2491
2491
  if (contentManagerPlugin && contentManagerPlugin.apis) {
@@ -1,12 +1,12 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import React__default, { useState, useEffect, useCallback, useRef, useMemo, forwardRef } from "react";
3
- import { u as useIntl, F as Flex, T as Typography, B as Button$2, D as Divider, a as Box, g as getTranslation, b as Field, L as Loader } from "./getTranslation-DP4KaXRi.mjs";
3
+ import { u as useIntl, F as Flex, T as Typography, B as Button$2, D as Divider, a as Box, g as getTranslation, b as Field, L as Loader } from "./getTranslation-D2oq0PyC.mjs";
4
4
  import styled, { createGlobalStyle, css } from "styled-components";
5
5
  import { ClockIcon, ExclamationTriangleIcon, SparklesIcon as SparklesIcon$1, Bars3BottomLeftIcon, ListBulletIcon, CheckCircleIcon, PhotoIcon, LinkIcon, CodeBracketIcon, TableCellsIcon, ChatBubbleBottomCenterTextIcon, MinusIcon, DocumentDuplicateIcon, TrashIcon, ArrowsPointingInIcon, ArrowsPointingOutIcon, EyeIcon, PencilSquareIcon } from "@heroicons/react/24/outline";
6
6
  import EditorJS from "@editorjs/editorjs";
7
- import { M as MagicEditorAPI, t as toastManager, g as getTools, i as initUndoRedo, a as initDragDrop, A as AIToast, b as AIInlineToolbar } from "./tools-Qb0aXrud.mjs";
7
+ import { M as MagicEditorAPI, t as toastManager, g as getTools, i as initUndoRedo, a as initDragDrop, A as AIToast, b as AIInlineToolbar } from "./tools-BGR6Cw4p.mjs";
8
8
  import { useStrapiApp, useFetchClient, useAuth } from "@strapi/strapi/admin";
9
- import { P as PLUGIN_ID } from "./index-BYzgJaH8.mjs";
9
+ import { P as PLUGIN_ID } from "./index-tbHD7slZ.mjs";
10
10
  import { io } from "socket.io-client";
11
11
  import * as Y from "yjs";
12
12
  import { IndexeddbPersistence } from "y-indexeddb";
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
- const getTranslation = require("./getTranslation-BFYSgCMJ.js");
5
+ const getTranslation = require("./getTranslation-D21ValYk.js");
6
6
  const styled = require("styled-components");
7
7
  const outline = require("@heroicons/react/24/outline");
8
8
  const EditorJS = require("@editorjs/editorjs");
9
- const tools = require("./tools-CZFxM_lD.js");
9
+ const tools = require("./tools-D4Y_iEui.js");
10
10
  const admin = require("@strapi/strapi/admin");
11
- const index = require("./index-B_gIy3qL.js");
11
+ const index = require("./index-BnTvuHf2.js");
12
12
  const socket_ioClient = require("socket.io-client");
13
13
  const Y = require("yjs");
14
14
  const yIndexeddb = require("y-indexeddb");
@@ -2383,7 +2383,7 @@ const index = {
2383
2383
  icon: PluginIcon,
2384
2384
  // Input component for Content Manager
2385
2385
  components: {
2386
- Input: async () => import("./index-JeJFUWv9.mjs").then((module) => ({
2386
+ Input: async () => import("./index-CUTx2oym.mjs").then((module) => ({
2387
2387
  default: module.default
2388
2388
  }))
2389
2389
  },
@@ -2445,7 +2445,7 @@ const index = {
2445
2445
  defaultMessage: "Magic Editor X"
2446
2446
  },
2447
2447
  // Use lazy import without async wrapper to avoid deprecation warning
2448
- Component: () => import("./App-CWCkeXGo.mjs"),
2448
+ Component: () => import("./App-SlDn2xdO.mjs"),
2449
2449
  permissions: []
2450
2450
  });
2451
2451
  app.createSettingSection(
@@ -2464,7 +2464,7 @@ const index = {
2464
2464
  id: "upgrade",
2465
2465
  // relative path (no leading slash)
2466
2466
  to: `${PLUGIN_ID}/upgrade`,
2467
- Component: () => import("./LicensePage-DunwoRaq.mjs")
2467
+ Component: () => import("./LicensePage-zaYXFrKs.mjs")
2468
2468
  },
2469
2469
  {
2470
2470
  intlLabel: {
@@ -2474,7 +2474,7 @@ const index = {
2474
2474
  id: "license",
2475
2475
  // relative path (no leading slash)
2476
2476
  to: `${PLUGIN_ID}/license`,
2477
- Component: () => import("./Settings-CDbiC2pb.mjs")
2477
+ Component: () => import("./Settings-BXoP5tm9.mjs")
2478
2478
  }
2479
2479
  ]
2480
2480
  );
@@ -2484,7 +2484,7 @@ const index = {
2484
2484
  * Bootstrap the plugin
2485
2485
  */
2486
2486
  async bootstrap(app) {
2487
- const { default: LiveCollaborationPanel } = await import("./LiveCollaborationPanel-C-xwOtK-.mjs");
2487
+ const { default: LiveCollaborationPanel } = await import("./LiveCollaborationPanel-yNC8e1Qb.mjs");
2488
2488
  try {
2489
2489
  const contentManagerPlugin = app.getPlugin("content-manager");
2490
2490
  if (contentManagerPlugin && contentManagerPlugin.apis) {
@@ -398,14 +398,15 @@ class HyperlinkTool {
398
398
  this.popup = document.createElement("div");
399
399
  this.popup.classList.add("ce-inline-tool-hyperlink-popup");
400
400
  this.popup.style.cssText = `
401
- position: absolute;
401
+ position: fixed;
402
402
  background: white;
403
403
  border: 1px solid #e2e8f0;
404
- border-radius: 8px;
405
- box-shadow: 0 4px 12px rgba(0,0,0,0.15);
406
- padding: 12px;
404
+ border-radius: 12px;
405
+ box-shadow: 0 8px 32px rgba(0,0,0,0.15);
406
+ padding: 16px;
407
407
  z-index: 999999;
408
- min-width: 300px;
408
+ min-width: 360px;
409
+ max-width: 420px;
409
410
  `;
410
411
  const urlContainer = this._createInputContainer("URL", "url", parentAnchor?.href || "");
411
412
  const targetContainer = this._createSelectContainer(
@@ -585,23 +586,15 @@ class HyperlinkTool {
585
586
  return container;
586
587
  }
587
588
  /**
588
- * Positions the popup near the selection
589
+ * Positions the popup centered on screen
589
590
  */
590
591
  _positionPopup() {
591
592
  if (!this.popup) return;
592
- const selection = window.getSelection();
593
- if (!selection.rangeCount) return;
594
- const range = selection.getRangeAt(0);
595
- const rect = range.getBoundingClientRect();
596
593
  const popupRect = this.popup.getBoundingClientRect();
597
- let left = rect.left + rect.width / 2 - popupRect.width / 2;
598
- let top = rect.bottom + 10 + window.scrollY;
599
- if (left < 10) left = 10;
600
- if (left + popupRect.width > window.innerWidth - 10) {
601
- left = window.innerWidth - popupRect.width - 10;
602
- }
603
- this.popup.style.left = `${left}px`;
604
- this.popup.style.top = `${top}px`;
594
+ const left = (window.innerWidth - popupRect.width) / 2;
595
+ const top = (window.innerHeight - popupRect.height) / 2;
596
+ this.popup.style.left = `${Math.max(10, left)}px`;
597
+ this.popup.style.top = `${Math.max(10, top)}px`;
605
598
  }
606
599
  /**
607
600
  * Saves the link with user-entered values
@@ -431,14 +431,15 @@ class HyperlinkTool {
431
431
  this.popup = document.createElement("div");
432
432
  this.popup.classList.add("ce-inline-tool-hyperlink-popup");
433
433
  this.popup.style.cssText = `
434
- position: absolute;
434
+ position: fixed;
435
435
  background: white;
436
436
  border: 1px solid #e2e8f0;
437
- border-radius: 8px;
438
- box-shadow: 0 4px 12px rgba(0,0,0,0.15);
439
- padding: 12px;
437
+ border-radius: 12px;
438
+ box-shadow: 0 8px 32px rgba(0,0,0,0.15);
439
+ padding: 16px;
440
440
  z-index: 999999;
441
- min-width: 300px;
441
+ min-width: 360px;
442
+ max-width: 420px;
442
443
  `;
443
444
  const urlContainer = this._createInputContainer("URL", "url", parentAnchor?.href || "");
444
445
  const targetContainer = this._createSelectContainer(
@@ -618,23 +619,15 @@ class HyperlinkTool {
618
619
  return container;
619
620
  }
620
621
  /**
621
- * Positions the popup near the selection
622
+ * Positions the popup centered on screen
622
623
  */
623
624
  _positionPopup() {
624
625
  if (!this.popup) return;
625
- const selection = window.getSelection();
626
- if (!selection.rangeCount) return;
627
- const range = selection.getRangeAt(0);
628
- const rect = range.getBoundingClientRect();
629
626
  const popupRect = this.popup.getBoundingClientRect();
630
- let left = rect.left + rect.width / 2 - popupRect.width / 2;
631
- let top = rect.bottom + 10 + window.scrollY;
632
- if (left < 10) left = 10;
633
- if (left + popupRect.width > window.innerWidth - 10) {
634
- left = window.innerWidth - popupRect.width - 10;
635
- }
636
- this.popup.style.left = `${left}px`;
637
- this.popup.style.top = `${top}px`;
627
+ const left = (window.innerWidth - popupRect.width) / 2;
628
+ const top = (window.innerHeight - popupRect.height) / 2;
629
+ this.popup.style.left = `${Math.max(10, left)}px`;
630
+ this.popup.style.top = `${Math.max(10, top)}px`;
638
631
  }
639
632
  /**
640
633
  * Saves the link with user-entered values
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-B_gIy3qL.js");
2
+ const index = require("../_chunks/index-BnTvuHf2.js");
3
3
  module.exports = index.index;
@@ -1,4 +1,4 @@
1
- import { q } from "../_chunks/index-BYzgJaH8.mjs";
1
+ import { q } from "../_chunks/index-tbHD7slZ.mjs";
2
2
  export {
3
3
  q as default
4
4
  };
@@ -37941,7 +37941,7 @@ var snapshotService$1 = ({ strapi: strapi2 }) => {
37941
37941
  };
37942
37942
  };
37943
37943
  const name = "magic-editor-x";
37944
- const version = "1.3.5";
37944
+ const version = "1.3.6";
37945
37945
  const description = "Advanced block-based editor for Strapi v5 with Editor.js, Media Library integration, and real-time collaboration support";
37946
37946
  const keywords = [
37947
37947
  "strapi",
@@ -37922,7 +37922,7 @@ var snapshotService$1 = ({ strapi: strapi2 }) => {
37922
37922
  };
37923
37923
  };
37924
37924
  const name = "magic-editor-x";
37925
- const version = "1.3.5";
37925
+ const version = "1.3.6";
37926
37926
  const description = "Advanced block-based editor for Strapi v5 with Editor.js, Media Library integration, and real-time collaboration support";
37927
37927
  const keywords = [
37928
37928
  "strapi",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-editor-x",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "Advanced block-based editor for Strapi v5 with Editor.js, Media Library integration, and real-time collaboration support",
5
5
  "keywords": [
6
6
  "strapi",