magic-editor-x 1.5.0 → 1.5.1

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.
Files changed (25) hide show
  1. package/dist/_chunks/{App-3CjSGQyL.js → App-DImBvISP.js} +59 -59
  2. package/dist/_chunks/{App-CKlB5p92.mjs → App-iNfbV7cz.mjs} +32 -32
  3. package/dist/_chunks/{CustomBlocksPage-CnJxygIw.js → CustomBlocksPage-Cj-0TTUs.js} +12 -12
  4. package/dist/_chunks/{LicensePage-vJxKYZGQ.js → LicensePage-CmvILX9m.js} +43 -43
  5. package/dist/_chunks/{LicensePage-B2STSez2.mjs → LicensePage-gLRoo8WJ.mjs} +38 -38
  6. package/dist/_chunks/{LiveCollaborationPanel-D70o6EGf.js → LiveCollaborationPanel-BFybu8h0.js} +7 -7
  7. package/dist/_chunks/{LiveCollaborationPanel-uLIJs5z_.mjs → LiveCollaborationPanel-CVgl4IyR.mjs} +3 -3
  8. package/dist/_chunks/{Settings-CdGL1OCi.mjs → Settings-ButYcfrm.mjs} +82 -82
  9. package/dist/_chunks/Settings-BzGqgrxD.js +440 -0
  10. package/dist/_chunks/{getTranslation--JcqVOd5.js → getTranslation-BADoesEn.js} +19120 -12315
  11. package/dist/_chunks/{getTranslation-bLklCCaI.mjs → getTranslation-D3h3Z3gU.mjs} +18708 -11903
  12. package/dist/_chunks/index-BXBnwuRw.js +2158 -0
  13. package/dist/_chunks/index-BvEdg518.mjs +2159 -0
  14. package/dist/_chunks/{index-CRALSDLD.js → index-DDFAuQNT.js} +181 -181
  15. package/dist/_chunks/{index-CdFFlQdx.mjs → index-DEi6nwfM.mjs} +33 -33
  16. package/dist/_chunks/{tools-uudZx91W.mjs → tools-BXzd0lx5.mjs} +3 -3
  17. package/dist/_chunks/{tools-BSMn5LLQ.js → tools-Q0uwDS9E.js} +10 -10
  18. package/dist/admin/index.js +1 -1
  19. package/dist/admin/index.mjs +2 -2
  20. package/dist/server/index.js +142 -135
  21. package/dist/server/index.mjs +142 -135
  22. package/package.json +7 -7
  23. package/dist/_chunks/Settings-CwSNO4_t.js +0 -440
  24. package/dist/_chunks/index-CAPc_Y1F.mjs +0 -2551
  25. package/dist/_chunks/index-CPs6WJDY.js +0 -2550
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
- const React = require("react");
4
+ const m = require("react");
5
5
  const reactRouterDom = require("react-router-dom");
6
6
  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--JcqVOd5.js");
11
- const tools = require("./tools-BSMn5LLQ.js");
12
- const index = require("./index-CPs6WJDY.js");
13
- const LicensePage = require("./LicensePage-vJxKYZGQ.js");
10
+ const getTranslation = require("./getTranslation-BADoesEn.js");
11
+ const tools = require("./tools-Q0uwDS9E.js");
12
+ const index = require("./index-BXBnwuRw.js");
13
+ const LicensePage = require("./LicensePage-CmvILX9m.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);
@@ -517,12 +517,12 @@ const HomePage = () => {
517
517
  const navigate = reactRouterDom.useNavigate();
518
518
  const { formatMessage } = getTranslation.useIntl();
519
519
  const t = (id, defaultMessage, values) => formatMessage({ id: getTranslation.getTranslation(id), defaultMessage }, values);
520
- const [activeTab, setActiveTab] = React.useState("playground");
521
- const [editorData, setEditorData] = React.useState(null);
522
- const [isLoading, setIsLoading] = React.useState(false);
523
- const [hasContent, setHasContent] = React.useState(false);
524
- const editorRef = React.useRef(null);
525
- const editorInstanceRef = React.useRef(null);
520
+ const [activeTab, setActiveTab] = m.useState("playground");
521
+ const [editorData, setEditorData] = m.useState(null);
522
+ const [isLoading, setIsLoading] = m.useState(false);
523
+ const [hasContent, setHasContent] = m.useState(false);
524
+ const editorRef = m.useRef(null);
525
+ const editorInstanceRef = m.useRef(null);
526
526
  const toolsData = [
527
527
  { name: t("tools.header", "Header"), desc: t("tools.header.desc", "H1-H6 Headings"), icon: outline.HashtagIcon, color: "linear-gradient(135deg, #7C3AED, #6366f1)" },
528
528
  { name: t("tools.paragraph", "Paragraph"), desc: t("tools.paragraph.desc", "Text paragraphs"), icon: outline.DocumentTextIcon, color: "linear-gradient(135deg, #334155, #475569)" },
@@ -547,7 +547,7 @@ const HomePage = () => {
547
547
  { keys: ["Tab"], label: t("shortcuts.blockMenu", "Block Menu") },
548
548
  { keys: ["⌘", "Z"], label: t("shortcuts.undo", "Undo") }
549
549
  ];
550
- React.useEffect(() => {
550
+ m.useEffect(() => {
551
551
  if (activeTab === "playground" && editorRef.current && !editorInstanceRef.current) {
552
552
  const tools$1 = tools.getTools({
553
553
  mediaLibToggleFunc: () => {
@@ -1274,17 +1274,17 @@ const CollaborationSettings = () => {
1274
1274
  const { formatMessage } = getTranslation.useIntl();
1275
1275
  const t = (id, defaultMessage, values) => formatMessage({ id: getTranslation.getTranslation(id), defaultMessage }, values);
1276
1276
  const { get, post, put, del } = admin.useFetchClient();
1277
- const [loading, setLoading] = React.useState(true);
1278
- const [permissions, setPermissions] = React.useState([]);
1279
- const [users, setUsers] = React.useState([]);
1280
- const [contentTypes, setContentTypes] = React.useState([]);
1281
- const [showAddModal, setShowAddModal] = React.useState(false);
1282
- const [selectedUser, setSelectedUser] = React.useState("");
1283
- const [selectedRole, setSelectedRole] = React.useState("editor");
1284
- const [contentType, setContentType] = React.useState("");
1285
- const [saving, setSaving] = React.useState(false);
1286
- const [limits, setLimits] = React.useState({ current: 0, max: 2, unlimited: false, canAdd: true });
1287
- React.useEffect(() => {
1277
+ const [loading, setLoading] = m.useState(true);
1278
+ const [permissions, setPermissions] = m.useState([]);
1279
+ const [users, setUsers] = m.useState([]);
1280
+ const [contentTypes, setContentTypes] = m.useState([]);
1281
+ const [showAddModal, setShowAddModal] = m.useState(false);
1282
+ const [selectedUser, setSelectedUser] = m.useState("");
1283
+ const [selectedRole, setSelectedRole] = m.useState("editor");
1284
+ const [contentType, setContentType] = m.useState("");
1285
+ const [saving, setSaving] = m.useState(false);
1286
+ const [limits, setLimits] = m.useState({ current: 0, max: 2, unlimited: false, canAdd: true });
1287
+ m.useEffect(() => {
1288
1288
  loadData();
1289
1289
  loadLimits();
1290
1290
  }, []);
@@ -1428,7 +1428,7 @@ const CollaborationSettings = () => {
1428
1428
  return `${first}${last}`.trim();
1429
1429
  };
1430
1430
  if (loading) {
1431
- return /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsx(LoadingContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Loader, {}) }) });
1431
+ return /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsx(LoadingContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Vd, {}) }) });
1432
1432
  }
1433
1433
  return /* @__PURE__ */ jsxRuntime.jsxs(Container, { children: [
1434
1434
  /* @__PURE__ */ jsxRuntime.jsxs(Header, { children: [
@@ -1747,7 +1747,7 @@ const ModalOverlay = styled__default.default.div`
1747
1747
  animation: ${fadeIn} 0.3s ease-out;
1748
1748
  padding: 20px;
1749
1749
  `;
1750
- const ModalContent = styled__default.default(getTranslation.Box)`
1750
+ const ModalContent = styled__default.default(getTranslation.R)`
1751
1751
  background: white;
1752
1752
  border-radius: 16px;
1753
1753
  width: 100%;
@@ -1756,7 +1756,7 @@ const ModalContent = styled__default.default(getTranslation.Box)`
1756
1756
  animation: ${slideUp} 0.4s cubic-bezier(0.4, 0, 0.2, 1);
1757
1757
  overflow: hidden;
1758
1758
  `;
1759
- const GradientHeader = styled__default.default(getTranslation.Box)`
1759
+ const GradientHeader = styled__default.default(getTranslation.R)`
1760
1760
  background: linear-gradient(135deg, #7C3AED 0%, #6d28d9 100%);
1761
1761
  padding: 32px 40px;
1762
1762
  position: relative;
@@ -1841,7 +1841,7 @@ const ToggleButton = styled__default.default.button`
1841
1841
  cursor: not-allowed;
1842
1842
  }
1843
1843
  `;
1844
- const InfoBox = styled__default.default(getTranslation.Box)`
1844
+ const InfoBox = styled__default.default(getTranslation.R)`
1845
1845
  background: #f0fdf4;
1846
1846
  border: 2px solid #bbf7d0;
1847
1847
  border-radius: 8px;
@@ -1854,14 +1854,14 @@ const LicenseGuard = ({ children }) => {
1854
1854
  const { get, post } = admin.useFetchClient();
1855
1855
  const { toggleNotification } = admin.useNotification();
1856
1856
  const navigate = reactRouterDom.useNavigate();
1857
- const [isChecking, setIsChecking] = React.useState(true);
1858
- const [needsLicense, setNeedsLicense] = React.useState(false);
1859
- const [isCreating, setIsCreating] = React.useState(false);
1860
- const [useExistingKey, setUseExistingKey] = React.useState(false);
1861
- const [existingLicenseKey, setExistingLicenseKey] = React.useState("");
1862
- const [existingEmail, setExistingEmail] = React.useState("");
1863
- const [adminUser, setAdminUser] = React.useState(null);
1864
- React.useEffect(() => {
1857
+ const [isChecking, setIsChecking] = m.useState(true);
1858
+ const [needsLicense, setNeedsLicense] = m.useState(false);
1859
+ const [isCreating, setIsCreating] = m.useState(false);
1860
+ const [useExistingKey, setUseExistingKey] = m.useState(false);
1861
+ const [existingLicenseKey, setExistingLicenseKey] = m.useState("");
1862
+ const [existingEmail, setExistingEmail] = m.useState("");
1863
+ const [adminUser, setAdminUser] = m.useState(null);
1864
+ m.useEffect(() => {
1865
1865
  checkLicenseStatus();
1866
1866
  fetchAdminUser();
1867
1867
  }, []);
@@ -1961,16 +1961,16 @@ const LicenseGuard = ({ children }) => {
1961
1961
  navigate("/content-manager");
1962
1962
  };
1963
1963
  if (isChecking) {
1964
- return /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Box, { padding: 8, style: { textAlign: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Loader, { children: t("license.checking", "Checking license...") }) });
1964
+ return /* @__PURE__ */ jsxRuntime.jsx(getTranslation.R, { padding: 8, style: { textAlign: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Vd, { children: t("license.checking", "Checking license...") }) });
1965
1965
  }
1966
1966
  if (needsLicense) {
1967
1967
  return /* @__PURE__ */ jsxRuntime.jsx(ModalOverlay, { children: /* @__PURE__ */ jsxRuntime.jsxs(ModalContent, { children: [
1968
1968
  /* @__PURE__ */ jsxRuntime.jsxs(GradientHeader, { children: [
1969
1969
  /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: handleClose, type: "button", children: /* @__PURE__ */ jsxRuntime.jsx(outline.XMarkIcon, {}) }),
1970
1970
  /* @__PURE__ */ jsxRuntime.jsx(IconWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, {}) }),
1971
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { style: { textAlign: "center", position: "relative" }, children: [
1971
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.R, { style: { textAlign: "center", position: "relative" }, children: [
1972
1972
  /* @__PURE__ */ jsxRuntime.jsx(
1973
- getTranslation.Typography,
1973
+ getTranslation.I,
1974
1974
  {
1975
1975
  variant: "alpha",
1976
1976
  style: {
@@ -1984,7 +1984,7 @@ const LicenseGuard = ({ children }) => {
1984
1984
  }
1985
1985
  ),
1986
1986
  /* @__PURE__ */ jsxRuntime.jsx(
1987
- getTranslation.Typography,
1987
+ getTranslation.I,
1988
1988
  {
1989
1989
  variant: "epsilon",
1990
1990
  style: {
@@ -1997,12 +1997,12 @@ const LicenseGuard = ({ children }) => {
1997
1997
  )
1998
1998
  ] })
1999
1999
  ] }),
2000
- /* @__PURE__ */ jsxRuntime.jsx("form", { onSubmit: useExistingKey ? handleValidateExistingKey : handleAutoCreateLicense, children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Box, { padding: 6, paddingLeft: 8, paddingRight: 8, children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Flex, { direction: "column", gap: 5, style: { width: "100%" }, children: [
2001
- /* @__PURE__ */ jsxRuntime.jsx(InfoBox, { children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Typography, { variant: "omega", style: { fontSize: "13px", lineHeight: "1.6" }, children: [
2000
+ /* @__PURE__ */ jsxRuntime.jsx("form", { onSubmit: useExistingKey ? handleValidateExistingKey : handleAutoCreateLicense, children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.R, { padding: 6, paddingLeft: 8, paddingRight: 8, children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.T, { direction: "column", gap: 5, style: { width: "100%" }, children: [
2001
+ /* @__PURE__ */ jsxRuntime.jsx(InfoBox, { children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.I, { variant: "omega", style: { fontSize: "13px", lineHeight: "1.6" }, children: [
2002
2002
  "[FREE] ",
2003
2003
  t("licenseGuard.info", "The editor is completely FREE to use! Creating a license helps us track usage and provide better support. You get 2 collaborators included.")
2004
2004
  ] }) }),
2005
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Box, { style: { textAlign: "center", width: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(
2005
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.R, { style: { textAlign: "center", width: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(
2006
2006
  ToggleButton,
2007
2007
  {
2008
2008
  type: "button",
@@ -2012,9 +2012,9 @@ const LicenseGuard = ({ children }) => {
2012
2012
  }
2013
2013
  ) }),
2014
2014
  useExistingKey ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2015
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { style: { width: "100%" }, children: [
2015
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.R, { style: { width: "100%" }, children: [
2016
2016
  /* @__PURE__ */ jsxRuntime.jsxs(
2017
- getTranslation.Typography,
2017
+ getTranslation.I,
2018
2018
  {
2019
2019
  variant: "pi",
2020
2020
  fontWeight: "bold",
@@ -2026,7 +2026,7 @@ const LicenseGuard = ({ children }) => {
2026
2026
  }
2027
2027
  ),
2028
2028
  /* @__PURE__ */ jsxRuntime.jsx(
2029
- getTranslation.TextInput,
2029
+ getTranslation.X0,
2030
2030
  {
2031
2031
  placeholder: t("licenseGuard.email.placeholder", "admin@example.com"),
2032
2032
  type: "email",
@@ -2037,9 +2037,9 @@ const LicenseGuard = ({ children }) => {
2037
2037
  }
2038
2038
  )
2039
2039
  ] }),
2040
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { style: { width: "100%" }, children: [
2040
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.R, { style: { width: "100%" }, children: [
2041
2041
  /* @__PURE__ */ jsxRuntime.jsxs(
2042
- getTranslation.Typography,
2042
+ getTranslation.I,
2043
2043
  {
2044
2044
  variant: "pi",
2045
2045
  fontWeight: "bold",
@@ -2051,7 +2051,7 @@ const LicenseGuard = ({ children }) => {
2051
2051
  }
2052
2052
  ),
2053
2053
  /* @__PURE__ */ jsxRuntime.jsx(
2054
- getTranslation.TextInput,
2054
+ getTranslation.X0,
2055
2055
  {
2056
2056
  placeholder: t("licenseGuard.licenseKey.placeholder", "MAGIC-EDITOR-XXXX-XXXX-XXXX"),
2057
2057
  value: existingLicenseKey,
@@ -2062,7 +2062,7 @@ const LicenseGuard = ({ children }) => {
2062
2062
  )
2063
2063
  ] })
2064
2064
  ] }) : adminUser ? /* @__PURE__ */ jsxRuntime.jsxs(
2065
- getTranslation.Box,
2065
+ getTranslation.R,
2066
2066
  {
2067
2067
  background: "success100",
2068
2068
  padding: 5,
@@ -2072,22 +2072,22 @@ const LicenseGuard = ({ children }) => {
2072
2072
  textAlign: "center"
2073
2073
  },
2074
2074
  children: [
2075
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "omega", fontWeight: "bold", style: { marginBottom: "12px", display: "block" }, children: t("licenseGuard.readyToActivate", "Ready to activate with your account:") }),
2076
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Typography, { variant: "pi", style: { marginBottom: "4px", display: "block" }, children: [
2075
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.I, { variant: "omega", fontWeight: "bold", style: { marginBottom: "12px", display: "block" }, children: t("licenseGuard.readyToActivate", "Ready to activate with your account:") }),
2076
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.I, { variant: "pi", style: { marginBottom: "4px", display: "block" }, children: [
2077
2077
  adminUser.firstname || "Admin",
2078
2078
  " ",
2079
2079
  adminUser.lastname || "User"
2080
2080
  ] }),
2081
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "pi", textColor: "neutral600", children: adminUser.email || "Loading..." })
2081
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.I, { variant: "pi", textColor: "neutral600", children: adminUser.email || "Loading..." })
2082
2082
  ]
2083
2083
  }
2084
- ) : /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { padding: 4, background: "neutral100", hasRadius: true, style: { textAlign: "center" }, children: [
2085
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Loader, { small: true }),
2086
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "pi", marginTop: 2, children: t("licenseGuard.loadingUser", "Loading admin user data...") })
2084
+ ) : /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.R, { padding: 4, background: "neutral100", hasRadius: true, style: { textAlign: "center" }, children: [
2085
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Vd, { small: true }),
2086
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.I, { variant: "pi", marginTop: 2, children: t("licenseGuard.loadingUser", "Loading admin user data...") })
2087
2087
  ] }),
2088
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Flex, { gap: 3, justifyContent: "center", style: { marginTop: "16px" }, children: [
2088
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.T, { gap: 3, justifyContent: "center", style: { marginTop: "16px" }, children: [
2089
2089
  /* @__PURE__ */ jsxRuntime.jsx(
2090
- getTranslation.Button,
2090
+ getTranslation.zn,
2091
2091
  {
2092
2092
  variant: "tertiary",
2093
2093
  onClick: handleSkip,
@@ -2096,7 +2096,7 @@ const LicenseGuard = ({ children }) => {
2096
2096
  }
2097
2097
  ),
2098
2098
  useExistingKey ? /* @__PURE__ */ jsxRuntime.jsx(
2099
- getTranslation.Button,
2099
+ getTranslation.zn,
2100
2100
  {
2101
2101
  type: "submit",
2102
2102
  size: "L",
@@ -2112,7 +2112,7 @@ const LicenseGuard = ({ children }) => {
2112
2112
  children: t("licenseGuard.validate", "Validate License")
2113
2113
  }
2114
2114
  ) : /* @__PURE__ */ jsxRuntime.jsx(
2115
- getTranslation.Button,
2115
+ getTranslation.zn,
2116
2116
  {
2117
2117
  type: "submit",
2118
2118
  size: "L",
@@ -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-bLklCCaI.mjs";
9
- import { g as getTools } from "./tools-uudZx91W.mjs";
10
- import { P as PLUGIN_ID } from "./index-CAPc_Y1F.mjs";
11
- import LicensePage from "./LicensePage-B2STSez2.mjs";
8
+ import { u as useIntl, g as getTranslation, V as Vd, R, I, T, X as X0, z as zn } from "./getTranslation-D3h3Z3gU.mjs";
9
+ import { g as getTools } from "./tools-BXzd0lx5.mjs";
10
+ import { P as PLUGIN_ID } from "./index-BvEdg518.mjs";
11
+ import LicensePage from "./LicensePage-gLRoo8WJ.mjs";
12
12
  const fadeInUp = keyframes`
13
13
  from { opacity: 0; transform: translateY(20px); }
14
14
  to { opacity: 1; transform: translateY(0); }
@@ -1423,7 +1423,7 @@ const CollaborationSettings = () => {
1423
1423
  return `${first}${last}`.trim();
1424
1424
  };
1425
1425
  if (loading) {
1426
- return /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(LoadingContainer, { children: /* @__PURE__ */ jsx(Loader, {}) }) });
1426
+ return /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(LoadingContainer, { children: /* @__PURE__ */ jsx(Vd, {}) }) });
1427
1427
  }
1428
1428
  return /* @__PURE__ */ jsxs(Container, { children: [
1429
1429
  /* @__PURE__ */ jsxs(Header, { children: [
@@ -1742,7 +1742,7 @@ const ModalOverlay = styled.div`
1742
1742
  animation: ${fadeIn} 0.3s ease-out;
1743
1743
  padding: 20px;
1744
1744
  `;
1745
- const ModalContent = styled(Box)`
1745
+ const ModalContent = styled(R)`
1746
1746
  background: white;
1747
1747
  border-radius: 16px;
1748
1748
  width: 100%;
@@ -1751,7 +1751,7 @@ const ModalContent = styled(Box)`
1751
1751
  animation: ${slideUp} 0.4s cubic-bezier(0.4, 0, 0.2, 1);
1752
1752
  overflow: hidden;
1753
1753
  `;
1754
- const GradientHeader = styled(Box)`
1754
+ const GradientHeader = styled(R)`
1755
1755
  background: linear-gradient(135deg, #7C3AED 0%, #6d28d9 100%);
1756
1756
  padding: 32px 40px;
1757
1757
  position: relative;
@@ -1836,7 +1836,7 @@ const ToggleButton = styled.button`
1836
1836
  cursor: not-allowed;
1837
1837
  }
1838
1838
  `;
1839
- const InfoBox = styled(Box)`
1839
+ const InfoBox = styled(R)`
1840
1840
  background: #f0fdf4;
1841
1841
  border: 2px solid #bbf7d0;
1842
1842
  border-radius: 8px;
@@ -1956,16 +1956,16 @@ const LicenseGuard = ({ children }) => {
1956
1956
  navigate("/content-manager");
1957
1957
  };
1958
1958
  if (isChecking) {
1959
- return /* @__PURE__ */ jsx(Box, { padding: 8, style: { textAlign: "center" }, children: /* @__PURE__ */ jsx(Loader, { children: t("license.checking", "Checking license...") }) });
1959
+ return /* @__PURE__ */ jsx(R, { padding: 8, style: { textAlign: "center" }, children: /* @__PURE__ */ jsx(Vd, { children: t("license.checking", "Checking license...") }) });
1960
1960
  }
1961
1961
  if (needsLicense) {
1962
1962
  return /* @__PURE__ */ jsx(ModalOverlay, { children: /* @__PURE__ */ jsxs(ModalContent, { children: [
1963
1963
  /* @__PURE__ */ jsxs(GradientHeader, { children: [
1964
1964
  /* @__PURE__ */ jsx(CloseButton, { onClick: handleClose, type: "button", children: /* @__PURE__ */ jsx(XMarkIcon, {}) }),
1965
1965
  /* @__PURE__ */ jsx(IconWrapper, { children: /* @__PURE__ */ jsx(KeyIcon, {}) }),
1966
- /* @__PURE__ */ jsxs(Box, { style: { textAlign: "center", position: "relative" }, children: [
1966
+ /* @__PURE__ */ jsxs(R, { style: { textAlign: "center", position: "relative" }, children: [
1967
1967
  /* @__PURE__ */ jsx(
1968
- Typography,
1968
+ I,
1969
1969
  {
1970
1970
  variant: "alpha",
1971
1971
  style: {
@@ -1979,7 +1979,7 @@ const LicenseGuard = ({ children }) => {
1979
1979
  }
1980
1980
  ),
1981
1981
  /* @__PURE__ */ jsx(
1982
- Typography,
1982
+ I,
1983
1983
  {
1984
1984
  variant: "epsilon",
1985
1985
  style: {
@@ -1992,12 +1992,12 @@ const LicenseGuard = ({ children }) => {
1992
1992
  )
1993
1993
  ] })
1994
1994
  ] }),
1995
- /* @__PURE__ */ jsx("form", { onSubmit: useExistingKey ? handleValidateExistingKey : handleAutoCreateLicense, children: /* @__PURE__ */ jsx(Box, { padding: 6, paddingLeft: 8, paddingRight: 8, children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 5, style: { width: "100%" }, children: [
1996
- /* @__PURE__ */ jsx(InfoBox, { children: /* @__PURE__ */ jsxs(Typography, { variant: "omega", style: { fontSize: "13px", lineHeight: "1.6" }, children: [
1995
+ /* @__PURE__ */ jsx("form", { onSubmit: useExistingKey ? handleValidateExistingKey : handleAutoCreateLicense, children: /* @__PURE__ */ jsx(R, { padding: 6, paddingLeft: 8, paddingRight: 8, children: /* @__PURE__ */ jsxs(T, { direction: "column", gap: 5, style: { width: "100%" }, children: [
1996
+ /* @__PURE__ */ jsx(InfoBox, { children: /* @__PURE__ */ jsxs(I, { variant: "omega", style: { fontSize: "13px", lineHeight: "1.6" }, children: [
1997
1997
  "[FREE] ",
1998
1998
  t("licenseGuard.info", "The editor is completely FREE to use! Creating a license helps us track usage and provide better support. You get 2 collaborators included.")
1999
1999
  ] }) }),
2000
- /* @__PURE__ */ jsx(Box, { style: { textAlign: "center", width: "100%" }, children: /* @__PURE__ */ jsx(
2000
+ /* @__PURE__ */ jsx(R, { style: { textAlign: "center", width: "100%" }, children: /* @__PURE__ */ jsx(
2001
2001
  ToggleButton,
2002
2002
  {
2003
2003
  type: "button",
@@ -2007,9 +2007,9 @@ const LicenseGuard = ({ children }) => {
2007
2007
  }
2008
2008
  ) }),
2009
2009
  useExistingKey ? /* @__PURE__ */ jsxs(Fragment, { children: [
2010
- /* @__PURE__ */ jsxs(Box, { style: { width: "100%" }, children: [
2010
+ /* @__PURE__ */ jsxs(R, { style: { width: "100%" }, children: [
2011
2011
  /* @__PURE__ */ jsxs(
2012
- Typography,
2012
+ I,
2013
2013
  {
2014
2014
  variant: "pi",
2015
2015
  fontWeight: "bold",
@@ -2021,7 +2021,7 @@ const LicenseGuard = ({ children }) => {
2021
2021
  }
2022
2022
  ),
2023
2023
  /* @__PURE__ */ jsx(
2024
- TextInput,
2024
+ X0,
2025
2025
  {
2026
2026
  placeholder: t("licenseGuard.email.placeholder", "admin@example.com"),
2027
2027
  type: "email",
@@ -2032,9 +2032,9 @@ const LicenseGuard = ({ children }) => {
2032
2032
  }
2033
2033
  )
2034
2034
  ] }),
2035
- /* @__PURE__ */ jsxs(Box, { style: { width: "100%" }, children: [
2035
+ /* @__PURE__ */ jsxs(R, { style: { width: "100%" }, children: [
2036
2036
  /* @__PURE__ */ jsxs(
2037
- Typography,
2037
+ I,
2038
2038
  {
2039
2039
  variant: "pi",
2040
2040
  fontWeight: "bold",
@@ -2046,7 +2046,7 @@ const LicenseGuard = ({ children }) => {
2046
2046
  }
2047
2047
  ),
2048
2048
  /* @__PURE__ */ jsx(
2049
- TextInput,
2049
+ X0,
2050
2050
  {
2051
2051
  placeholder: t("licenseGuard.licenseKey.placeholder", "MAGIC-EDITOR-XXXX-XXXX-XXXX"),
2052
2052
  value: existingLicenseKey,
@@ -2057,7 +2057,7 @@ const LicenseGuard = ({ children }) => {
2057
2057
  )
2058
2058
  ] })
2059
2059
  ] }) : adminUser ? /* @__PURE__ */ jsxs(
2060
- Box,
2060
+ R,
2061
2061
  {
2062
2062
  background: "success100",
2063
2063
  padding: 5,
@@ -2067,22 +2067,22 @@ const LicenseGuard = ({ children }) => {
2067
2067
  textAlign: "center"
2068
2068
  },
2069
2069
  children: [
2070
- /* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "bold", style: { marginBottom: "12px", display: "block" }, children: t("licenseGuard.readyToActivate", "Ready to activate with your account:") }),
2071
- /* @__PURE__ */ jsxs(Typography, { variant: "pi", style: { marginBottom: "4px", display: "block" }, children: [
2070
+ /* @__PURE__ */ jsx(I, { variant: "omega", fontWeight: "bold", style: { marginBottom: "12px", display: "block" }, children: t("licenseGuard.readyToActivate", "Ready to activate with your account:") }),
2071
+ /* @__PURE__ */ jsxs(I, { variant: "pi", style: { marginBottom: "4px", display: "block" }, children: [
2072
2072
  adminUser.firstname || "Admin",
2073
2073
  " ",
2074
2074
  adminUser.lastname || "User"
2075
2075
  ] }),
2076
- /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", children: adminUser.email || "Loading..." })
2076
+ /* @__PURE__ */ jsx(I, { variant: "pi", textColor: "neutral600", children: adminUser.email || "Loading..." })
2077
2077
  ]
2078
2078
  }
2079
- ) : /* @__PURE__ */ jsxs(Box, { padding: 4, background: "neutral100", hasRadius: true, style: { textAlign: "center" }, children: [
2080
- /* @__PURE__ */ jsx(Loader, { small: true }),
2081
- /* @__PURE__ */ jsx(Typography, { variant: "pi", marginTop: 2, children: t("licenseGuard.loadingUser", "Loading admin user data...") })
2079
+ ) : /* @__PURE__ */ jsxs(R, { padding: 4, background: "neutral100", hasRadius: true, style: { textAlign: "center" }, children: [
2080
+ /* @__PURE__ */ jsx(Vd, { small: true }),
2081
+ /* @__PURE__ */ jsx(I, { variant: "pi", marginTop: 2, children: t("licenseGuard.loadingUser", "Loading admin user data...") })
2082
2082
  ] }),
2083
- /* @__PURE__ */ jsxs(Flex, { gap: 3, justifyContent: "center", style: { marginTop: "16px" }, children: [
2083
+ /* @__PURE__ */ jsxs(T, { gap: 3, justifyContent: "center", style: { marginTop: "16px" }, children: [
2084
2084
  /* @__PURE__ */ jsx(
2085
- Button$2,
2085
+ zn,
2086
2086
  {
2087
2087
  variant: "tertiary",
2088
2088
  onClick: handleSkip,
@@ -2091,7 +2091,7 @@ const LicenseGuard = ({ children }) => {
2091
2091
  }
2092
2092
  ),
2093
2093
  useExistingKey ? /* @__PURE__ */ jsx(
2094
- Button$2,
2094
+ zn,
2095
2095
  {
2096
2096
  type: "submit",
2097
2097
  size: "L",
@@ -2107,7 +2107,7 @@ const LicenseGuard = ({ children }) => {
2107
2107
  children: t("licenseGuard.validate", "Validate License")
2108
2108
  }
2109
2109
  ) : /* @__PURE__ */ jsx(
2110
- Button$2,
2110
+ zn,
2111
2111
  {
2112
2112
  type: "submit",
2113
2113
  size: "L",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
- const React = require("react");
4
+ const m = require("react");
5
5
  const admin = require("@strapi/strapi/admin");
6
6
  const styled = require("styled-components");
7
7
  const outline = require("@heroicons/react/24/outline");
@@ -802,13 +802,13 @@ const FeatureLockedBadge = styled__default.default.span`
802
802
  const CustomBlocksPage = () => {
803
803
  const { toggleNotification } = admin.useNotification();
804
804
  const { get, post, put, del } = admin.useFetchClient();
805
- const [blocks, setBlocks] = React.useState([]);
806
- const [contentTypes, setContentTypes] = React.useState([]);
807
- const [isLoading, setIsLoading] = React.useState(true);
808
- const [isModalOpen, setIsModalOpen] = React.useState(false);
809
- const [editingBlock, setEditingBlock] = React.useState(null);
810
- const [formData, setFormData] = React.useState(getEmptyFormData());
811
- const [limits, setLimits] = React.useState(null);
805
+ const [blocks, setBlocks] = m.useState([]);
806
+ const [contentTypes, setContentTypes] = m.useState([]);
807
+ const [isLoading, setIsLoading] = m.useState(true);
808
+ const [isModalOpen, setIsModalOpen] = m.useState(false);
809
+ const [editingBlock, setEditingBlock] = m.useState(null);
810
+ const [formData, setFormData] = m.useState(getEmptyFormData());
811
+ const [limits, setLimits] = m.useState(null);
812
812
  function getEmptyFormData() {
813
813
  return {
814
814
  name: "",
@@ -831,7 +831,7 @@ const CustomBlocksPage = () => {
831
831
  enabled: true
832
832
  };
833
833
  }
834
- const fetchBlocks = React.useCallback(async () => {
834
+ const fetchBlocks = m.useCallback(async () => {
835
835
  try {
836
836
  setIsLoading(true);
837
837
  const response = await get(`/${PLUGIN_ID}/custom-blocks?enabledOnly=false`);
@@ -846,7 +846,7 @@ const CustomBlocksPage = () => {
846
846
  setIsLoading(false);
847
847
  }
848
848
  }, [get, toggleNotification]);
849
- const fetchContentTypes = React.useCallback(async () => {
849
+ const fetchContentTypes = m.useCallback(async () => {
850
850
  try {
851
851
  const response = await get(`/${PLUGIN_ID}/content-types`);
852
852
  setContentTypes(response.data?.contentTypes || []);
@@ -854,7 +854,7 @@ const CustomBlocksPage = () => {
854
854
  console.error("[CustomBlocksPage] Error fetching content types:", error);
855
855
  }
856
856
  }, [get]);
857
- const fetchLimits = React.useCallback(async () => {
857
+ const fetchLimits = m.useCallback(async () => {
858
858
  try {
859
859
  const response = await get(`/${PLUGIN_ID}/custom-blocks/limits`);
860
860
  setLimits(response.data?.data || null);
@@ -862,7 +862,7 @@ const CustomBlocksPage = () => {
862
862
  console.error("[CustomBlocksPage] Error fetching limits:", error);
863
863
  }
864
864
  }, [get]);
865
- React.useEffect(() => {
865
+ m.useEffect(() => {
866
866
  fetchBlocks();
867
867
  fetchContentTypes();
868
868
  fetchLimits();