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.
- package/dist/_chunks/{App-BpSMhQIR.js → App-BrAGe1KP.js} +4 -4
- package/dist/_chunks/{App-CWCkeXGo.mjs → App-SlDn2xdO.mjs} +4 -4
- package/dist/_chunks/{LicensePage-DuV_uXao.js → LicensePage-C6TBYCWM.js} +2 -2
- package/dist/_chunks/{LicensePage-DunwoRaq.mjs → LicensePage-zaYXFrKs.mjs} +2 -2
- package/dist/_chunks/{LiveCollaborationPanel-Cszm9ewD.js → LiveCollaborationPanel-CGt57XG1.js} +1 -1
- package/dist/_chunks/{LiveCollaborationPanel-C-xwOtK-.mjs → LiveCollaborationPanel-yNC8e1Qb.mjs} +1 -1
- package/dist/_chunks/{Settings-DvH7epUa.js → Settings-BH0Ttu_5.js} +1 -1
- package/dist/_chunks/{Settings-CDbiC2pb.mjs → Settings-BXoP5tm9.mjs} +1 -1
- package/dist/_chunks/{getTranslation-BFYSgCMJ.js → getTranslation-D21ValYk.js} +1 -1
- package/dist/_chunks/{getTranslation-DP4KaXRi.mjs → getTranslation-D2oq0PyC.mjs} +1 -1
- package/dist/_chunks/{index-B_gIy3qL.js → index-BnTvuHf2.js} +5 -5
- package/dist/_chunks/{index-JeJFUWv9.mjs → index-CUTx2oym.mjs} +3 -3
- package/dist/_chunks/{index-C2pIXifO.js → index-Czk5HVLJ.js} +3 -3
- package/dist/_chunks/{index-BYzgJaH8.mjs → index-tbHD7slZ.mjs} +5 -5
- package/dist/_chunks/{tools-Qb0aXrud.mjs → tools-BGR6Cw4p.mjs} +11 -18
- package/dist/_chunks/{tools-CZFxM_lD.js → tools-D4Y_iEui.js} +11 -18
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
11
|
-
const tools = require("./tools-
|
|
12
|
-
const index = require("./index-
|
|
13
|
-
const LicensePage = require("./LicensePage-
|
|
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-
|
|
9
|
-
import { g as getTools } from "./tools-
|
|
10
|
-
import { P as PLUGIN_ID } from "./index-
|
|
11
|
-
import LicensePage from "./LicensePage-
|
|
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-
|
|
6
|
+
const getTranslation = require("./getTranslation-D21ValYk.js");
|
|
7
7
|
const styled = require("styled-components");
|
|
8
|
-
const index = require("./index-
|
|
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-
|
|
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-
|
|
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;
|
package/dist/_chunks/{LiveCollaborationPanel-Cszm9ewD.js → LiveCollaborationPanel-CGt57XG1.js}
RENAMED
|
@@ -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-
|
|
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);
|
package/dist/_chunks/{LiveCollaborationPanel-C-xwOtK-.mjs → LiveCollaborationPanel-yNC8e1Qb.mjs}
RENAMED
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
9
|
+
const tools = require("./tools-D4Y_iEui.js");
|
|
10
10
|
const admin = require("@strapi/strapi/admin");
|
|
11
|
-
const index = require("./index-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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:
|
|
401
|
+
position: fixed;
|
|
402
402
|
background: white;
|
|
403
403
|
border: 1px solid #e2e8f0;
|
|
404
|
-
border-radius:
|
|
405
|
-
box-shadow: 0
|
|
406
|
-
padding:
|
|
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:
|
|
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
|
|
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
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
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:
|
|
434
|
+
position: fixed;
|
|
435
435
|
background: white;
|
|
436
436
|
border: 1px solid #e2e8f0;
|
|
437
|
-
border-radius:
|
|
438
|
-
box-shadow: 0
|
|
439
|
-
padding:
|
|
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:
|
|
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
|
|
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
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
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
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED
package/dist/server/index.js
CHANGED
|
@@ -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.
|
|
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",
|
package/dist/server/index.mjs
CHANGED
|
@@ -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.
|
|
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