magic-editor-x 1.5.0 → 1.6.0

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 (38) hide show
  1. package/README.md +6 -110
  2. package/dist/{_chunks/App-CKlB5p92.mjs → admin/App-BwMEZnS-.mjs} +35 -34
  3. package/dist/{_chunks/App-3CjSGQyL.js → admin/App-HNr2tizR.js} +65 -64
  4. package/dist/{_chunks/CustomBlocksPage-CnJxygIw.js → admin/CustomBlocksPage-BjcA7MGz.js} +13 -13
  5. package/dist/{_chunks/LicensePage-B2STSez2.mjs → admin/LicensePage-D0DMTF41.mjs} +39 -38
  6. package/dist/{_chunks/LicensePage-vJxKYZGQ.js → admin/LicensePage-D0_9yPkw.js} +45 -44
  7. package/dist/{_chunks/LiveCollaborationPanel-D70o6EGf.js → admin/LiveCollaborationPanel-CZAbgAVr.js} +9 -8
  8. package/dist/{_chunks/LiveCollaborationPanel-uLIJs5z_.mjs → admin/LiveCollaborationPanel-D8z72afw.mjs} +4 -3
  9. package/dist/admin/Settings-DRenvRcG.js +441 -0
  10. package/dist/{_chunks/Settings-CdGL1OCi.mjs → admin/Settings-DjyNURlS.mjs} +83 -82
  11. package/dist/{_chunks/getTranslation-bLklCCaI.mjs → admin/getTranslation-2OiEgVGt.mjs} +15204 -16731
  12. package/dist/{_chunks/getTranslation--JcqVOd5.js → admin/getTranslation-DQ_WJ-7M.js} +15612 -17139
  13. package/dist/admin/index-Bn2tfJrC.js +2186 -0
  14. package/dist/{_chunks/index-CRALSDLD.js → admin/index-DAtClhqy.js} +184 -183
  15. package/dist/admin/index-FVEbTfqO.mjs +2187 -0
  16. package/dist/{_chunks/index-CdFFlQdx.mjs → admin/index-gjWl-6E2.mjs} +34 -33
  17. package/dist/admin/index.js +3 -2
  18. package/dist/admin/index.mjs +2 -2
  19. package/dist/{_chunks/tools-uudZx91W.mjs → admin/tools-CzHTZaY_.mjs} +42 -39
  20. package/dist/{_chunks/tools-BSMn5LLQ.js → admin/tools-DALFhvPO.js} +49 -46
  21. package/dist/server/index.js +63527 -37942
  22. package/dist/server/index.mjs +63546 -37934
  23. package/package.json +43 -30
  24. package/dist/_chunks/Settings-CwSNO4_t.js +0 -440
  25. package/dist/_chunks/index-CAPc_Y1F.mjs +0 -2551
  26. package/dist/_chunks/index-CPs6WJDY.js +0 -2550
  27. /package/dist/{_chunks → admin}/CustomBlocksPage-COPOZ2-_.mjs +0 -0
  28. /package/dist/{_chunks → admin}/de-C_0Mj-Zo.mjs +0 -0
  29. /package/dist/{_chunks → admin}/de-DVNVpAt9.js +0 -0
  30. /package/dist/{_chunks → admin}/en-B7AAf1ie.mjs +0 -0
  31. /package/dist/{_chunks → admin}/en-C2hv5GsA.js +0 -0
  32. /package/dist/{_chunks → admin}/es-BzJqcIST.js +0 -0
  33. /package/dist/{_chunks → admin}/es-zdP8sd-f.mjs +0 -0
  34. /package/dist/{_chunks → admin}/fr-CtAgOgH1.mjs +0 -0
  35. /package/dist/{_chunks → admin}/fr-D3GwqAAJ.js +0 -0
  36. /package/dist/{style.css → admin/magic-editor-x.css} +0 -0
  37. /package/dist/{_chunks → admin}/pt-BmUw6YMP.mjs +0 -0
  38. /package/dist/{_chunks → admin}/pt-CFo0nTbj.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-editor-x",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
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",
@@ -34,10 +34,15 @@
34
34
  "pics"
35
35
  ],
36
36
  "scripts": {
37
- "build": "strapi-plugin build",
37
+ "build": "strapi-plugin build && node scripts/build-server-bundle.mjs && npm run verify:runtime",
38
+ "test": "node --test tests/*.test.js",
38
39
  "watch": "strapi-plugin watch",
39
40
  "watch:link": "strapi-plugin watch:link",
40
- "verify": "strapi-plugin verify"
41
+ "verify": "strapi-plugin verify",
42
+ "verify:runtime": "node scripts/verify-server-bundle.mjs"
43
+ },
44
+ "engines": {
45
+ "node": ">=22.22.2 <23"
41
46
  },
42
47
  "dependencies": {
43
48
  "@calumk/editorjs-codeflask": "^1.0.10",
@@ -45,9 +50,9 @@
45
50
  "@editorjs/checklist": "^1.6.0",
46
51
  "@editorjs/code": "^2.9.3",
47
52
  "@editorjs/delimiter": "^1.4.2",
48
- "@editorjs/editorjs": "^2.31.0",
53
+ "@editorjs/editorjs": "^2.31.7",
49
54
  "@editorjs/embed": "^2.7.6",
50
- "@editorjs/header": "^2.8.8",
55
+ "@editorjs/header": "^2.8.9",
51
56
  "@editorjs/image": "^2.10.1",
52
57
  "@editorjs/inline-code": "^1.5.1",
53
58
  "@editorjs/link": "^2.6.2",
@@ -58,9 +63,9 @@
58
63
  "@editorjs/quote": "^2.7.2",
59
64
  "@editorjs/raw": "^2.5.0",
60
65
  "@editorjs/simple-image": "^1.6.0",
61
- "@editorjs/table": "^2.4.2",
66
+ "@editorjs/table": "^2.4.6",
62
67
  "@editorjs/text-variant-tune": "^1.0.2",
63
- "@editorjs/underline": "^1.1.0",
68
+ "@editorjs/underline": "^1.2.1",
64
69
  "@editorjs/warning": "^1.4.0",
65
70
  "@heroicons/react": "^2.2.0",
66
71
  "@sotaproject/strikethrough": "^1.0.1",
@@ -71,42 +76,50 @@
71
76
  "editorjs-toggle-block": "^0.3.16",
72
77
  "editorjs-tooltip": "^1.2.2",
73
78
  "editorjs-undo": "^2.0.28",
74
- "open-graph-scraper": "^6.8.3",
79
+ "ipaddr.js": "^2.5.0",
80
+ "open-graph-scraper": "^6.12.0",
75
81
  "prismjs": "^1.30.0",
76
- "socket.io": "^4.8.1",
77
- "socket.io-client": "^4.8.1",
82
+ "socket.io": "^4.8.4",
83
+ "socket.io-client": "^4.8.4",
78
84
  "y-indexeddb": "^9.0.12",
79
85
  "y-socket.io": "^1.1.3",
80
- "yjs": "^13.6.15"
86
+ "yjs": "^13.6.33"
81
87
  },
82
88
  "devDependencies": {
83
- "@semantic-release/changelog": "^6.0.3",
84
- "@semantic-release/commit-analyzer": "^13.0.0",
85
- "@semantic-release/git": "^10.0.1",
86
- "@semantic-release/github": "^11.0.1",
87
- "@semantic-release/npm": "^12.0.1",
88
- "@semantic-release/release-notes-generator": "^14.0.1",
89
- "@strapi/design-system": "^2.0.0-rc.30",
90
- "@strapi/icons": "^2.0.0-rc.30",
91
- "@strapi/sdk-plugin": "^5.3.2",
92
- "@strapi/strapi": "^5.31.2",
93
- "prettier": "^3.7.3",
89
+ "@semantic-release/changelog": "^7.0.0",
90
+ "@semantic-release/commit-analyzer": "^13.0.1",
91
+ "@semantic-release/git": "^11.0.1",
92
+ "@semantic-release/github": "^12.0.10",
93
+ "@semantic-release/npm": "^13.2.0",
94
+ "@semantic-release/release-notes-generator": "^14.1.1",
95
+ "@strapi/design-system": "^2.2.4",
96
+ "@strapi/icons": "^2.2.4",
97
+ "@strapi/sdk-plugin": "^6.1.1",
98
+ "@strapi/strapi": "^5.57.0",
99
+ "esbuild": "^0.28.2",
100
+ "prettier": "^3.9.10",
94
101
  "react": "^18.3.1",
95
102
  "react-dom": "^18.3.1",
96
- "react-router-dom": "^6.30.2",
97
- "semantic-release": "^25.0.2",
98
- "styled-components": "^6.1.19"
103
+ "react-intl": "^6.8.9",
104
+ "react-router-dom": "^6.30.6",
105
+ "semantic-release": "^25.0.9",
106
+ "styled-components": "^6.6.0"
99
107
  },
100
108
  "peerDependencies": {
101
- "@strapi/sdk-plugin": "^5.3.2",
102
- "@strapi/strapi": "^5.31.2",
109
+ "@strapi/sdk-plugin": "^6.1.1",
110
+ "@strapi/strapi": "^5.57.0",
103
111
  "react": "^18.3.1",
104
112
  "react-dom": "^18.3.1",
105
- "react-router-dom": "^6.30.2",
106
- "styled-components": "^6.1.19"
113
+ "react-intl": "^6.6.2",
114
+ "react-router-dom": "^6.30.6",
115
+ "styled-components": "^6.0.0"
107
116
  },
108
117
  "overrides": {
109
- "prismjs": "^1.30.0"
118
+ "prismjs": "^1.30.0",
119
+ "axios": "^1.20.0",
120
+ "handlebars": "^4.7.10",
121
+ "postcss": "^8.5.30",
122
+ "uuid": "^11.1.1"
110
123
  },
111
124
  "strapi": {
112
125
  "kind": "plugin",
@@ -1,440 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const React = require("react");
5
- const getTranslation = require("./getTranslation--JcqVOd5.js");
6
- const admin = require("@strapi/strapi/admin");
7
- const outline = require("@heroicons/react/24/outline");
8
- const styled = require("styled-components");
9
- const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
10
- const styled__default = /* @__PURE__ */ _interopDefault(styled);
11
- const theme = {
12
- borderRadius: { lg: "12px" }
13
- };
14
- const fadeIn = styled.keyframes`
15
- from { opacity: 0; transform: translateY(10px); }
16
- to { opacity: 1; transform: translateY(0); }
17
- `;
18
- const shimmer = styled.keyframes`
19
- 0% { background-position: -200% 0; }
20
- 100% { background-position: 200% 0; }
21
- `;
22
- const Container = styled__default.default(getTranslation.Box)`
23
- ${styled.css`animation: ${fadeIn} 0.5s;`}
24
- max-width: 1400px;
25
- margin: 0 auto;
26
- `;
27
- const StickySaveBar = styled__default.default(getTranslation.Box)`
28
- position: sticky;
29
- top: 0;
30
- z-index: 10;
31
- background: ${(props) => props.theme.colors.neutral0};
32
- border-bottom: 1px solid ${(props) => props.theme.colors.neutral200};
33
- box-shadow: 0 1px 3px rgba(0,0,0,0.1);
34
- `;
35
- const LicenseKeyBanner = styled__default.default(getTranslation.Box)`
36
- background: linear-gradient(135deg, #7C3AED 0%, #6d28d9 100%);
37
- border-radius: ${theme.borderRadius.lg};
38
- padding: 28px 32px;
39
- color: white;
40
- position: relative;
41
- overflow: hidden;
42
- box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
43
- margin-bottom: 24px;
44
-
45
- &::after {
46
- content: '';
47
- position: absolute;
48
- top: -50%;
49
- right: -50%;
50
- width: 200%;
51
- height: 200%;
52
- background: linear-gradient(
53
- 45deg,
54
- transparent,
55
- rgba(255, 255, 255, 0.08),
56
- transparent
57
- );
58
- ${styled.css`animation: ${shimmer} 3s infinite;`}
59
- pointer-events: none;
60
- z-index: 0;
61
- }
62
-
63
- & > * {
64
- position: relative;
65
- z-index: 1;
66
- }
67
- `;
68
- const LoaderContainer = styled__default.default(getTranslation.Flex)`
69
- min-height: 400px;
70
- align-items: center;
71
- justify-content: center;
72
- flex-direction: column;
73
- gap: 16px;
74
- `;
75
- const Settings = () => {
76
- const { formatMessage } = getTranslation.useIntl();
77
- const t = (id, defaultMessage, values) => formatMessage({ id: getTranslation.getTranslation(id), defaultMessage }, values);
78
- const { get } = admin.useFetchClient();
79
- const { toggleNotification } = admin.useNotification();
80
- const [loading, setLoading] = React.useState(true);
81
- const [licenseData, setLicenseData] = React.useState(null);
82
- const [limits, setLimits] = React.useState(null);
83
- const [error, setError] = React.useState(null);
84
- const fetchLicenseStatus = async () => {
85
- setLoading(true);
86
- setError(null);
87
- try {
88
- const [statusRes, limitsRes] = await Promise.all([
89
- get("/magic-editor-x/license/status"),
90
- get("/magic-editor-x/license/limits")
91
- ]);
92
- setLicenseData(statusRes.data);
93
- setLimits(limitsRes.data);
94
- } catch (err) {
95
- console.error("[Magic Editor X] Error fetching license:", err);
96
- setError("Failed to load license information");
97
- } finally {
98
- setLoading(false);
99
- }
100
- };
101
- const handleCopyLicenseKey = async () => {
102
- try {
103
- await navigator.clipboard.writeText(licenseData?.data?.licenseKey || "");
104
- toggleNotification({
105
- type: "success",
106
- message: t("license.copied", "License key copied to clipboard!")
107
- });
108
- } catch (err) {
109
- toggleNotification({
110
- type: "danger",
111
- message: t("license.copyFailed", "Failed to copy license key")
112
- });
113
- }
114
- };
115
- const handleDownloadLicenseKey = () => {
116
- try {
117
- const data2 = licenseData?.data || {};
118
- const licenseKey = data2.licenseKey || "";
119
- const email = data2.email || "N/A";
120
- const firstName = data2.firstName || "";
121
- const lastName = data2.lastName || "";
122
- const fullName = `${firstName} ${lastName}`.trim() || "N/A";
123
- const tier2 = licenseData?.tier || "free";
124
- const content = `Magic Editor X - License Key
125
- ===================================
126
-
127
- License Key: ${licenseKey}
128
-
129
- License Holder Information:
130
- ----------------------------------
131
- Name: ${fullName}
132
- Email: ${email}
133
-
134
- License Status:
135
- ----------------------------------
136
- Status: ${data2.isActive ? "ACTIVE" : "INACTIVE"}
137
- Tier: ${tier2.toUpperCase()}
138
- Expires: ${data2.expiresAt ? new Date(data2.expiresAt).toLocaleDateString() : "Never"}
139
-
140
- Features:
141
- ----------------------------------
142
- Premium: ${data2.features?.premium ? "Enabled" : "Disabled"}
143
- Advanced: ${data2.features?.advanced ? "Enabled" : "Disabled"}
144
- Enterprise: ${data2.features?.enterprise ? "Enabled" : "Disabled"}
145
-
146
- ===================================
147
- Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
148
- `;
149
- const blob = new Blob([content], { type: "text/plain" });
150
- const url = window.URL.createObjectURL(blob);
151
- const link = document.createElement("a");
152
- link.href = url;
153
- link.download = `magic-editor-x-license-${licenseKey.substring(0, 8)}.txt`;
154
- document.body.appendChild(link);
155
- link.click();
156
- document.body.removeChild(link);
157
- window.URL.revokeObjectURL(url);
158
- toggleNotification({
159
- type: "success",
160
- message: t("license.downloaded", "License key downloaded successfully!")
161
- });
162
- } catch (err) {
163
- toggleNotification({
164
- type: "danger",
165
- message: t("license.downloadFailed", "Failed to download license key")
166
- });
167
- }
168
- };
169
- React.useEffect(() => {
170
- fetchLicenseStatus();
171
- }, []);
172
- if (loading) {
173
- return /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsx(LoaderContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Loader, { children: t("license.loading", "Loading license information...") }) }) });
174
- }
175
- if (error) {
176
- return /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Box, { padding: 8, children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Alert, { variant: "danger", title: "Error", closeLabel: "Close", children: error }) }) });
177
- }
178
- const isValid = licenseData?.valid;
179
- const isDemo = licenseData?.demo;
180
- const tier = licenseData?.tier || "free";
181
- const data = licenseData?.data || {};
182
- const collaborators = limits?.limits?.collaborators || { current: 0, max: 2, unlimited: false };
183
- return /* @__PURE__ */ jsxRuntime.jsxs(Container, { children: [
184
- /* @__PURE__ */ jsxRuntime.jsx(StickySaveBar, { paddingTop: 5, paddingBottom: 5, paddingLeft: 6, paddingRight: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Flex, { justifyContent: "space-between", alignItems: "flex-start", children: [
185
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Flex, { direction: "column", gap: 1, alignItems: "flex-start", children: [
186
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "alpha", fontWeight: "bold", children: t("license.title", "License Management") }),
187
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "epsilon", textColor: "neutral600", children: t("license.subtitle", "View your Magic Editor X plugin license") })
188
- ] }),
189
- /* @__PURE__ */ jsxRuntime.jsx(
190
- getTranslation.Button,
191
- {
192
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathIcon, { style: { width: 20, height: 20 } }),
193
- onClick: fetchLicenseStatus,
194
- size: "L",
195
- style: {
196
- background: "linear-gradient(135deg, #7C3AED 0%, #6d28d9 100%)",
197
- color: "white",
198
- fontWeight: "600",
199
- border: "none"
200
- },
201
- children: t("license.refresh", "Refresh Status")
202
- }
203
- )
204
- ] }) }),
205
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { paddingTop: 6, paddingLeft: 6, paddingRight: 6, paddingBottom: 10, children: [
206
- isDemo ? /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Alert, { variant: "warning", title: t("license.alert.free", "FREE Mode"), closeLabel: "Close", children: t("license.alert.free.message", "You're using the FREE version with 2 collaborators. Upgrade for more features.") }) : isValid ? /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Alert, { variant: "success", title: t("license.alert.active", "License Active"), closeLabel: "Close", children: t("license.alert.active.message", "Your license is active and all features are unlocked.") }) : /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Alert, { variant: "danger", title: t("license.alert.issue", "License Issue"), closeLabel: "Close", children: t("license.alert.issue.message", "There's an issue with your license. Please check your license status.") }),
207
- data.licenseKey && /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Box, { marginTop: 6, children: /* @__PURE__ */ jsxRuntime.jsx(LicenseKeyBanner, { children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Flex, { justifyContent: "space-between", alignItems: "flex-start", children: [
208
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { style: { flex: 1 }, children: [
209
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "pi", style: { color: "rgba(255,255,255,0.8)", marginBottom: "12px", textTransform: "uppercase", fontSize: "11px", letterSpacing: "0.5px", display: "block" }, children: t("license.key", "License Key") }),
210
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { style: { color: "white", fontFamily: "monospace", fontSize: "28px", fontWeight: "bold", wordBreak: "break-all", marginBottom: "16px" }, children: data.licenseKey }),
211
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Flex, { gap: 2, children: [
212
- /* @__PURE__ */ jsxRuntime.jsx(
213
- getTranslation.Button,
214
- {
215
- onClick: handleCopyLicenseKey,
216
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(outline.DocumentDuplicateIcon, { style: { width: 16, height: 16 } }),
217
- size: "S",
218
- variant: "secondary",
219
- style: {
220
- backgroundColor: "rgba(255,255,255,0.2)",
221
- color: "white",
222
- border: "1px solid rgba(255,255,255,0.3)",
223
- fontWeight: "600"
224
- },
225
- children: t("license.copyKey", "Copy Key")
226
- }
227
- ),
228
- /* @__PURE__ */ jsxRuntime.jsx(
229
- getTranslation.Button,
230
- {
231
- onClick: handleDownloadLicenseKey,
232
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowDownTrayIcon, { style: { width: 16, height: 16 } }),
233
- size: "S",
234
- variant: "secondary",
235
- style: {
236
- backgroundColor: "rgba(255,255,255,0.2)",
237
- color: "white",
238
- border: "1px solid rgba(255,255,255,0.3)",
239
- fontWeight: "600"
240
- },
241
- children: t("license.downloadTxt", "Download as TXT")
242
- }
243
- )
244
- ] })
245
- ] }),
246
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Flex, { direction: "column", gap: 2, alignItems: "flex-end", children: [
247
- /* @__PURE__ */ jsxRuntime.jsx(
248
- getTranslation.Badge,
249
- {
250
- backgroundColor: data.isActive ? "success100" : "danger100",
251
- textColor: data.isActive ? "success700" : "danger700",
252
- style: { fontSize: "11px", fontWeight: "700", padding: "6px 12px" },
253
- children: data.isActive ? "ACTIVE" : "INACTIVE"
254
- }
255
- ),
256
- /* @__PURE__ */ jsxRuntime.jsx(
257
- getTranslation.Badge,
258
- {
259
- style: {
260
- fontSize: "11px",
261
- fontWeight: "700",
262
- padding: "6px 12px",
263
- background: tier === "free" ? "#6B7280" : "#7C3AED",
264
- color: "white"
265
- },
266
- children: tier.toUpperCase()
267
- }
268
- )
269
- ] })
270
- ] }) }) }),
271
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Box, { marginTop: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Accordion.Root, { defaultValue: "account", collapsible: true, children: [
272
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Accordion.Item, { value: "account", children: [
273
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Trigger, { icon: () => /* @__PURE__ */ jsxRuntime.jsx(outline.UserIcon, { style: { width: 16, height: 16 } }), children: t("license.section.account", "Account Information") }) }),
274
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Box, { padding: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Flex, { gap: 8, wrap: "wrap", children: [
275
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { style: { flex: "1", minWidth: "200px" }, children: [
276
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.email", "Email Address") }),
277
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "omega", fontWeight: "semiBold", children: data.email || t("license.notProvided", "Not provided") })
278
- ] }),
279
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { style: { flex: "1", minWidth: "200px" }, children: [
280
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.holder", "License Holder") }),
281
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "omega", fontWeight: "semiBold", children: data.firstName && data.lastName ? `${data.firstName} ${data.lastName}` : t("license.notSpecified", "Not specified") })
282
- ] })
283
- ] }) }) })
284
- ] }),
285
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Accordion.Item, { value: "collaborators", children: [
286
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Trigger, { icon: () => /* @__PURE__ */ jsxRuntime.jsx(outline.UsersIcon, { style: { width: 16, height: 16 } }), children: t("license.section.collaborators", "Collaborator Limits") }) }),
287
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { padding: 6, children: [
288
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Flex, { gap: 8, wrap: "wrap", alignItems: "center", children: [
289
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { style: { flex: "1", minWidth: "200px" }, children: [
290
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.currentUsage", "Current Usage") }),
291
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Typography, { variant: "omega", fontWeight: "semiBold", style: { fontSize: "24px" }, children: [
292
- collaborators.current,
293
- " / ",
294
- collaborators.unlimited ? t("license.unlimited", "Unlimited") : collaborators.max
295
- ] })
296
- ] }),
297
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { style: { flex: "1", minWidth: "200px" }, children: [
298
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.status", "Status") }),
299
- /* @__PURE__ */ jsxRuntime.jsx(
300
- getTranslation.Badge,
301
- {
302
- backgroundColor: collaborators.canAdd ? "success100" : "danger100",
303
- textColor: collaborators.canAdd ? "success700" : "danger700",
304
- style: { fontSize: "12px", fontWeight: "600", padding: "6px 12px" },
305
- children: collaborators.canAdd ? t("license.canAddMore", "Can add more") : t("license.limitReached", "Limit reached")
306
- }
307
- )
308
- ] })
309
- ] }),
310
- !collaborators.canAdd && !collaborators.unlimited && /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Box, { marginTop: 4, padding: 4, background: "warning100", hasRadius: true, children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "omega", textColor: "warning700", children: t("license.upgradeMessage", "Upgrade your plan to add more collaborators. Visit https://store.magicdx.dev/") }) })
311
- ] }) })
312
- ] }),
313
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Accordion.Item, { value: "details", children: [
314
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Trigger, { icon: () => /* @__PURE__ */ jsxRuntime.jsx(outline.ShieldCheckIcon, { style: { width: 16, height: 16 } }), children: t("license.section.details", "License Details") }) }),
315
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Box, { padding: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Flex, { gap: 8, wrap: "wrap", children: [
316
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { style: { flex: "1", minWidth: "180px" }, children: [
317
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: data.isExpired ? t("license.expiredOn", "Expired On") : t("license.expiresOn", "Expires On") }),
318
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "omega", fontWeight: "semiBold", children: data.expiresAt ? new Date(data.expiresAt).toLocaleDateString("en-US", {
319
- year: "numeric",
320
- month: "long",
321
- day: "numeric"
322
- }) : t("license.never", "Never") })
323
- ] }),
324
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { style: { flex: "1", minWidth: "180px" }, children: [
325
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.deviceName", "Device Name") }),
326
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "omega", fontWeight: "semiBold", children: data.deviceName || t("license.unknown", "Unknown") })
327
- ] })
328
- ] }) }) })
329
- ] }),
330
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Accordion.Item, { value: "features", children: [
331
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Trigger, { icon: () => /* @__PURE__ */ jsxRuntime.jsx(outline.SparklesIcon, { style: { width: 16, height: 16 } }), children: t("license.section.features", "Features & Capabilities") }) }),
332
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { padding: 6, children: [
333
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Flex, { gap: 3, style: { marginBottom: "32px" }, children: [
334
- /* @__PURE__ */ jsxRuntime.jsxs(
335
- getTranslation.Badge,
336
- {
337
- backgroundColor: tier === "free" ? "success100" : "neutral100",
338
- textColor: tier === "free" ? "success700" : "neutral600",
339
- style: {
340
- fontSize: "13px",
341
- fontWeight: "700",
342
- padding: "8px 16px",
343
- border: tier === "free" ? "2px solid #dcfce7" : "2px solid #e5e7eb"
344
- },
345
- children: [
346
- tier === "free" ? "[ACTIVE]" : "",
347
- " FREE"
348
- ]
349
- }
350
- ),
351
- /* @__PURE__ */ jsxRuntime.jsxs(
352
- getTranslation.Badge,
353
- {
354
- backgroundColor: tier === "premium" ? "primary100" : "neutral100",
355
- textColor: tier === "premium" ? "primary700" : "neutral600",
356
- style: {
357
- fontSize: "13px",
358
- fontWeight: "700",
359
- padding: "8px 16px",
360
- border: tier === "premium" ? "2px solid #ede9fe" : "2px solid #e5e7eb"
361
- },
362
- children: [
363
- tier === "premium" ? "[ACTIVE]" : "",
364
- " PREMIUM"
365
- ]
366
- }
367
- ),
368
- /* @__PURE__ */ jsxRuntime.jsxs(
369
- getTranslation.Badge,
370
- {
371
- backgroundColor: tier === "advanced" || tier === "enterprise" ? "secondary100" : "neutral100",
372
- textColor: tier === "advanced" || tier === "enterprise" ? "secondary700" : "neutral600",
373
- style: {
374
- fontSize: "13px",
375
- fontWeight: "700",
376
- padding: "8px 16px",
377
- border: tier === "advanced" || tier === "enterprise" ? "2px solid #ddd6fe" : "2px solid #e5e7eb"
378
- },
379
- children: [
380
- tier === "advanced" || tier === "enterprise" ? "[ACTIVE]" : "",
381
- " ADVANCED"
382
- ]
383
- }
384
- )
385
- ] }),
386
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { padding: 5, background: "neutral100", hasRadius: true, children: [
387
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "delta", fontWeight: "bold", style: { marginBottom: "16px", display: "block" }, children: t("license.yourPlanIncludes", "Your Plan Includes:") }),
388
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Flex, { direction: "column", gap: 2, children: [
389
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Typography, { variant: "omega", style: { fontSize: "14px" }, children: [
390
- "[OK] ",
391
- t("license.feature.fullAccess", "Full Editor Access (all tools)")
392
- ] }),
393
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Typography, { variant: "omega", style: { fontSize: "14px" }, children: [
394
- "[OK] ",
395
- t("license.feature.realtimeCollab", "Real-Time Collaboration")
396
- ] }),
397
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Typography, { variant: "omega", style: { fontSize: "14px" }, children: [
398
- "[OK] ",
399
- collaborators.unlimited ? t("license.feature.collaboratorsUnlimited", "Unlimited Collaborators") : t("license.feature.collaborators", "{count} Collaborator(s)", { count: collaborators.max })
400
- ] }),
401
- (tier === "premium" || tier === "advanced" || tier === "enterprise") && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
402
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Typography, { variant: "omega", style: { fontSize: "14px" }, children: [
403
- "[OK] ",
404
- t("license.feature.aiAssistant", "AI Assistant (Usage-based)")
405
- ] }),
406
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Typography, { variant: "omega", style: { fontSize: "14px" }, children: [
407
- "[OK] ",
408
- t("license.feature.versionHistory", "Version History")
409
- ] }),
410
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Typography, { variant: "omega", style: { fontSize: "14px" }, children: [
411
- "[OK] ",
412
- t("license.feature.prioritySupport", "Priority Support")
413
- ] })
414
- ] })
415
- ] })
416
- ] })
417
- ] }) })
418
- ] }),
419
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Accordion.Item, { value: "status", children: [
420
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Trigger, { icon: () => /* @__PURE__ */ jsxRuntime.jsx(outline.ChartBarIcon, { style: { width: 16, height: 16 } }), children: t("license.section.status", "System Status") }) }),
421
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Accordion.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Box, { padding: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Flex, { gap: 8, wrap: "wrap", children: [
422
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { style: { flex: "1", minWidth: "150px" }, children: [
423
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.licenseStatus", "License Status") }),
424
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "omega", fontWeight: "semiBold", children: data.isActive ? t("license.active", "Active") : t("license.inactive", "Inactive") })
425
- ] }),
426
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { style: { flex: "1", minWidth: "150px" }, children: [
427
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.connection", "Connection") }),
428
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "omega", fontWeight: "semiBold", children: data.isOnline ? t("license.online", "Online") : t("license.offline", "Offline") })
429
- ] }),
430
- /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.Box, { style: { flex: "1", minWidth: "150px" }, children: [
431
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.lastSync", "Last Sync") }),
432
- /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Typography, { variant: "omega", fontWeight: "semiBold", children: data.lastPingAt ? new Date(data.lastPingAt).toLocaleTimeString() : t("license.never", "Never") })
433
- ] })
434
- ] }) }) })
435
- ] })
436
- ] }) })
437
- ] })
438
- ] });
439
- };
440
- exports.default = Settings;