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
@@ -1,6 +1,7 @@
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-bLklCCaI.mjs";
3
+ import { useIntl } from "react-intl";
4
+ import { C, g as getTranslation } from "./getTranslation-2OiEgVGt.mjs";
4
5
  import styled, { css, keyframes } from "styled-components";
5
6
  const pulse = keyframes`
6
7
  0%, 100% {
@@ -192,7 +193,7 @@ const LiveCollaborationPanel = ({ documentId, model, document }) => {
192
193
  const isConnected = status === "connected";
193
194
  return {
194
195
  title: t("collab.title", "Live Collaboration"),
195
- content: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 4, alignItems: "stretch", style: { width: "100%" }, children: [
196
+ content: /* @__PURE__ */ jsxs(C, { direction: "column", gap: 4, alignItems: "stretch", style: { width: "100%" }, children: [
196
197
  /* @__PURE__ */ jsxs(StatusCard, { $status: status, children: [
197
198
  /* @__PURE__ */ jsx(StatusDot, { $status: status }),
198
199
  /* @__PURE__ */ jsxs(StatusText, { children: [
@@ -202,7 +203,7 @@ const LiveCollaborationPanel = ({ documentId, model, document }) => {
202
203
  ] }),
203
204
  isConnected && peers.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
204
205
  /* @__PURE__ */ jsx(SectionTitle, { children: t("collab.activePeers", "Active Collaborators ({count})", { count: peers.length }) }),
205
- /* @__PURE__ */ jsx(Flex, { direction: "column", gap: 2, alignItems: "stretch", children: peers.map((peer, idx) => /* @__PURE__ */ jsxs(PeerItem, { children: [
206
+ /* @__PURE__ */ jsx(C, { direction: "column", gap: 2, alignItems: "stretch", children: peers.map((peer, idx) => /* @__PURE__ */ jsxs(PeerItem, { children: [
206
207
  /* @__PURE__ */ jsx(PeerAvatar, { $color: PEER_COLORS[idx % PEER_COLORS.length], children: getPeerInitials(peer) }),
207
208
  /* @__PURE__ */ jsxs(PeerInfo, { children: [
208
209
  /* @__PURE__ */ jsx(PeerName, { children: getPeerName(peer, t) }),
@@ -0,0 +1,441 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const s = require("react");
5
+ const getTranslation = require("./getTranslation-DQ_WJ-7M.js");
6
+ const admin = require("@strapi/strapi/admin");
7
+ const reactIntl = require("react-intl");
8
+ const outline = require("@heroicons/react/24/outline");
9
+ const styled = require("styled-components");
10
+ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
11
+ const styled__default = /* @__PURE__ */ _interopDefault(styled);
12
+ const theme = {
13
+ borderRadius: { lg: "12px" }
14
+ };
15
+ const fadeIn = styled.keyframes`
16
+ from { opacity: 0; transform: translateY(10px); }
17
+ to { opacity: 1; transform: translateY(0); }
18
+ `;
19
+ const shimmer = styled.keyframes`
20
+ 0% { background-position: -200% 0; }
21
+ 100% { background-position: 200% 0; }
22
+ `;
23
+ const Container = styled__default.default(getTranslation.S)`
24
+ ${styled.css`animation: ${fadeIn} 0.5s;`}
25
+ max-width: 1400px;
26
+ margin: 0 auto;
27
+ `;
28
+ const StickySaveBar = styled__default.default(getTranslation.S)`
29
+ position: sticky;
30
+ top: 0;
31
+ z-index: 10;
32
+ background: ${(props) => props.theme.colors.neutral0};
33
+ border-bottom: 1px solid ${(props) => props.theme.colors.neutral200};
34
+ box-shadow: 0 1px 3px rgba(0,0,0,0.1);
35
+ `;
36
+ const LicenseKeyBanner = styled__default.default(getTranslation.S)`
37
+ background: linear-gradient(135deg, #7C3AED 0%, #6d28d9 100%);
38
+ border-radius: ${theme.borderRadius.lg};
39
+ padding: 28px 32px;
40
+ color: white;
41
+ position: relative;
42
+ overflow: hidden;
43
+ box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
44
+ margin-bottom: 24px;
45
+
46
+ &::after {
47
+ content: '';
48
+ position: absolute;
49
+ top: -50%;
50
+ right: -50%;
51
+ width: 200%;
52
+ height: 200%;
53
+ background: linear-gradient(
54
+ 45deg,
55
+ transparent,
56
+ rgba(255, 255, 255, 0.08),
57
+ transparent
58
+ );
59
+ ${styled.css`animation: ${shimmer} 3s infinite;`}
60
+ pointer-events: none;
61
+ z-index: 0;
62
+ }
63
+
64
+ & > * {
65
+ position: relative;
66
+ z-index: 1;
67
+ }
68
+ `;
69
+ const LoaderContainer = styled__default.default(getTranslation.C)`
70
+ min-height: 400px;
71
+ align-items: center;
72
+ justify-content: center;
73
+ flex-direction: column;
74
+ gap: 16px;
75
+ `;
76
+ const Settings = () => {
77
+ const { formatMessage } = reactIntl.useIntl();
78
+ const t = (id, defaultMessage, values) => formatMessage({ id: getTranslation.getTranslation(id), defaultMessage }, values);
79
+ const { get } = admin.useFetchClient();
80
+ const { toggleNotification } = admin.useNotification();
81
+ const [loading, setLoading] = s.useState(true);
82
+ const [licenseData, setLicenseData] = s.useState(null);
83
+ const [limits, setLimits] = s.useState(null);
84
+ const [error, setError] = s.useState(null);
85
+ const fetchLicenseStatus = async () => {
86
+ setLoading(true);
87
+ setError(null);
88
+ try {
89
+ const [statusRes, limitsRes] = await Promise.all([
90
+ get("/magic-editor-x/license/status"),
91
+ get("/magic-editor-x/license/limits")
92
+ ]);
93
+ setLicenseData(statusRes.data);
94
+ setLimits(limitsRes.data);
95
+ } catch (err) {
96
+ console.error("[Magic Editor X] Error fetching license:", err);
97
+ setError("Failed to load license information");
98
+ } finally {
99
+ setLoading(false);
100
+ }
101
+ };
102
+ const handleCopyLicenseKey = async () => {
103
+ try {
104
+ await navigator.clipboard.writeText(licenseData?.data?.licenseKey || "");
105
+ toggleNotification({
106
+ type: "success",
107
+ message: t("license.copied", "License key copied to clipboard!")
108
+ });
109
+ } catch (err) {
110
+ toggleNotification({
111
+ type: "danger",
112
+ message: t("license.copyFailed", "Failed to copy license key")
113
+ });
114
+ }
115
+ };
116
+ const handleDownloadLicenseKey = () => {
117
+ try {
118
+ const data2 = licenseData?.data || {};
119
+ const licenseKey = data2.licenseKey || "";
120
+ const email = data2.email || "N/A";
121
+ const firstName = data2.firstName || "";
122
+ const lastName = data2.lastName || "";
123
+ const fullName = `${firstName} ${lastName}`.trim() || "N/A";
124
+ const tier2 = licenseData?.tier || "free";
125
+ const content = `Magic Editor X - License Key
126
+ ===================================
127
+
128
+ License Key: ${licenseKey}
129
+
130
+ License Holder Information:
131
+ ----------------------------------
132
+ Name: ${fullName}
133
+ Email: ${email}
134
+
135
+ License Status:
136
+ ----------------------------------
137
+ Status: ${data2.isActive ? "ACTIVE" : "INACTIVE"}
138
+ Tier: ${tier2.toUpperCase()}
139
+ Expires: ${data2.expiresAt ? new Date(data2.expiresAt).toLocaleDateString() : "Never"}
140
+
141
+ Features:
142
+ ----------------------------------
143
+ Premium: ${data2.features?.premium ? "Enabled" : "Disabled"}
144
+ Advanced: ${data2.features?.advanced ? "Enabled" : "Disabled"}
145
+ Enterprise: ${data2.features?.enterprise ? "Enabled" : "Disabled"}
146
+
147
+ ===================================
148
+ Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
149
+ `;
150
+ const blob = new Blob([content], { type: "text/plain" });
151
+ const url = window.URL.createObjectURL(blob);
152
+ const link = document.createElement("a");
153
+ link.href = url;
154
+ link.download = `magic-editor-x-license-${licenseKey.substring(0, 8)}.txt`;
155
+ document.body.appendChild(link);
156
+ link.click();
157
+ document.body.removeChild(link);
158
+ window.URL.revokeObjectURL(url);
159
+ toggleNotification({
160
+ type: "success",
161
+ message: t("license.downloaded", "License key downloaded successfully!")
162
+ });
163
+ } catch (err) {
164
+ toggleNotification({
165
+ type: "danger",
166
+ message: t("license.downloadFailed", "Failed to download license key")
167
+ });
168
+ }
169
+ };
170
+ s.useEffect(() => {
171
+ fetchLicenseStatus();
172
+ }, []);
173
+ if (loading) {
174
+ return /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsx(LoaderContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.kt, { children: t("license.loading", "Loading license information...") }) }) });
175
+ }
176
+ if (error) {
177
+ return /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.S, { padding: 8, children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.ud, { variant: "danger", title: "Error", closeLabel: "Close", children: error }) }) });
178
+ }
179
+ const isValid = licenseData?.valid;
180
+ const isDemo = licenseData?.demo;
181
+ const tier = licenseData?.tier || "free";
182
+ const data = licenseData?.data || {};
183
+ const collaborators = limits?.limits?.collaborators || { current: 0, max: 2, unlimited: false };
184
+ return /* @__PURE__ */ jsxRuntime.jsxs(Container, { children: [
185
+ /* @__PURE__ */ jsxRuntime.jsx(StickySaveBar, { paddingTop: 5, paddingBottom: 5, paddingLeft: 6, paddingRight: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.C, { justifyContent: "space-between", alignItems: "flex-start", children: [
186
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.C, { direction: "column", gap: 1, alignItems: "flex-start", children: [
187
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "alpha", fontWeight: "bold", children: t("license.title", "License Management") }),
188
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "epsilon", textColor: "neutral600", children: t("license.subtitle", "View your Magic Editor X plugin license") })
189
+ ] }),
190
+ /* @__PURE__ */ jsxRuntime.jsx(
191
+ getTranslation.Ct,
192
+ {
193
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathIcon, { style: { width: 20, height: 20 } }),
194
+ onClick: fetchLicenseStatus,
195
+ size: "L",
196
+ style: {
197
+ background: "linear-gradient(135deg, #7C3AED 0%, #6d28d9 100%)",
198
+ color: "white",
199
+ fontWeight: "600",
200
+ border: "none"
201
+ },
202
+ children: t("license.refresh", "Refresh Status")
203
+ }
204
+ )
205
+ ] }) }),
206
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.S, { paddingTop: 6, paddingLeft: 6, paddingRight: 6, paddingBottom: 10, children: [
207
+ isDemo ? /* @__PURE__ */ jsxRuntime.jsx(getTranslation.ud, { 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.ud, { 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.ud, { 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.") }),
208
+ data.licenseKey && /* @__PURE__ */ jsxRuntime.jsx(getTranslation.S, { marginTop: 6, children: /* @__PURE__ */ jsxRuntime.jsx(LicenseKeyBanner, { children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.C, { justifyContent: "space-between", alignItems: "flex-start", children: [
209
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.S, { style: { flex: 1 }, children: [
210
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { 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") }),
211
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { style: { color: "white", fontFamily: "monospace", fontSize: "28px", fontWeight: "bold", wordBreak: "break-all", marginBottom: "16px" }, children: data.licenseKey }),
212
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.C, { gap: 2, children: [
213
+ /* @__PURE__ */ jsxRuntime.jsx(
214
+ getTranslation.Ct,
215
+ {
216
+ onClick: handleCopyLicenseKey,
217
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(outline.DocumentDuplicateIcon, { style: { width: 16, height: 16 } }),
218
+ size: "S",
219
+ variant: "secondary",
220
+ style: {
221
+ backgroundColor: "rgba(255,255,255,0.2)",
222
+ color: "white",
223
+ border: "1px solid rgba(255,255,255,0.3)",
224
+ fontWeight: "600"
225
+ },
226
+ children: t("license.copyKey", "Copy Key")
227
+ }
228
+ ),
229
+ /* @__PURE__ */ jsxRuntime.jsx(
230
+ getTranslation.Ct,
231
+ {
232
+ onClick: handleDownloadLicenseKey,
233
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowDownTrayIcon, { style: { width: 16, height: 16 } }),
234
+ size: "S",
235
+ variant: "secondary",
236
+ style: {
237
+ backgroundColor: "rgba(255,255,255,0.2)",
238
+ color: "white",
239
+ border: "1px solid rgba(255,255,255,0.3)",
240
+ fontWeight: "600"
241
+ },
242
+ children: t("license.downloadTxt", "Download as TXT")
243
+ }
244
+ )
245
+ ] })
246
+ ] }),
247
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.C, { direction: "column", gap: 2, alignItems: "flex-end", children: [
248
+ /* @__PURE__ */ jsxRuntime.jsx(
249
+ getTranslation.Nr,
250
+ {
251
+ backgroundColor: data.isActive ? "success100" : "danger100",
252
+ textColor: data.isActive ? "success700" : "danger700",
253
+ style: { fontSize: "11px", fontWeight: "700", padding: "6px 12px" },
254
+ children: data.isActive ? "ACTIVE" : "INACTIVE"
255
+ }
256
+ ),
257
+ /* @__PURE__ */ jsxRuntime.jsx(
258
+ getTranslation.Nr,
259
+ {
260
+ style: {
261
+ fontSize: "11px",
262
+ fontWeight: "700",
263
+ padding: "6px 12px",
264
+ background: tier === "free" ? "#6B7280" : "#7C3AED",
265
+ color: "white"
266
+ },
267
+ children: tier.toUpperCase()
268
+ }
269
+ )
270
+ ] })
271
+ ] }) }) }),
272
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.S, { marginTop: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.dd.Root, { defaultValue: "account", collapsible: true, children: [
273
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.dd.Item, { value: "account", children: [
274
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Trigger, { icon: () => /* @__PURE__ */ jsxRuntime.jsx(outline.UserIcon, { style: { width: 16, height: 16 } }), children: t("license.section.account", "Account Information") }) }),
275
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.S, { padding: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.C, { gap: 8, wrap: "wrap", children: [
276
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.S, { style: { flex: "1", minWidth: "200px" }, children: [
277
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.email", "Email Address") }),
278
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "omega", fontWeight: "semiBold", children: data.email || t("license.notProvided", "Not provided") })
279
+ ] }),
280
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.S, { style: { flex: "1", minWidth: "200px" }, children: [
281
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.holder", "License Holder") }),
282
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "omega", fontWeight: "semiBold", children: data.firstName && data.lastName ? `${data.firstName} ${data.lastName}` : t("license.notSpecified", "Not specified") })
283
+ ] })
284
+ ] }) }) })
285
+ ] }),
286
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.dd.Item, { value: "collaborators", children: [
287
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Trigger, { icon: () => /* @__PURE__ */ jsxRuntime.jsx(outline.UsersIcon, { style: { width: 16, height: 16 } }), children: t("license.section.collaborators", "Collaborator Limits") }) }),
288
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.S, { padding: 6, children: [
289
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.C, { gap: 8, wrap: "wrap", alignItems: "center", children: [
290
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.S, { style: { flex: "1", minWidth: "200px" }, children: [
291
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.currentUsage", "Current Usage") }),
292
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.A, { variant: "omega", fontWeight: "semiBold", style: { fontSize: "24px" }, children: [
293
+ collaborators.current,
294
+ " / ",
295
+ collaborators.unlimited ? t("license.unlimited", "Unlimited") : collaborators.max
296
+ ] })
297
+ ] }),
298
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.S, { style: { flex: "1", minWidth: "200px" }, children: [
299
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.status", "Status") }),
300
+ /* @__PURE__ */ jsxRuntime.jsx(
301
+ getTranslation.Nr,
302
+ {
303
+ backgroundColor: collaborators.canAdd ? "success100" : "danger100",
304
+ textColor: collaborators.canAdd ? "success700" : "danger700",
305
+ style: { fontSize: "12px", fontWeight: "600", padding: "6px 12px" },
306
+ children: collaborators.canAdd ? t("license.canAddMore", "Can add more") : t("license.limitReached", "Limit reached")
307
+ }
308
+ )
309
+ ] })
310
+ ] }),
311
+ !collaborators.canAdd && !collaborators.unlimited && /* @__PURE__ */ jsxRuntime.jsx(getTranslation.S, { marginTop: 4, padding: 4, background: "warning100", hasRadius: true, children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "omega", textColor: "warning700", children: t("license.upgradeMessage", "Upgrade your plan to add more collaborators. Visit https://store.magicdx.dev/") }) })
312
+ ] }) })
313
+ ] }),
314
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.dd.Item, { value: "details", children: [
315
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Trigger, { icon: () => /* @__PURE__ */ jsxRuntime.jsx(outline.ShieldCheckIcon, { style: { width: 16, height: 16 } }), children: t("license.section.details", "License Details") }) }),
316
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.S, { padding: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.C, { gap: 8, wrap: "wrap", children: [
317
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.S, { style: { flex: "1", minWidth: "180px" }, children: [
318
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: data.isExpired ? t("license.expiredOn", "Expired On") : t("license.expiresOn", "Expires On") }),
319
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "omega", fontWeight: "semiBold", children: data.expiresAt ? new Date(data.expiresAt).toLocaleDateString("en-US", {
320
+ year: "numeric",
321
+ month: "long",
322
+ day: "numeric"
323
+ }) : t("license.never", "Never") })
324
+ ] }),
325
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.S, { style: { flex: "1", minWidth: "180px" }, children: [
326
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.deviceName", "Device Name") }),
327
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "omega", fontWeight: "semiBold", children: data.deviceName || t("license.unknown", "Unknown") })
328
+ ] })
329
+ ] }) }) })
330
+ ] }),
331
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.dd.Item, { value: "features", children: [
332
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Trigger, { icon: () => /* @__PURE__ */ jsxRuntime.jsx(outline.SparklesIcon, { style: { width: 16, height: 16 } }), children: t("license.section.features", "Features & Capabilities") }) }),
333
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Content, { children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.S, { padding: 6, children: [
334
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.C, { gap: 3, style: { marginBottom: "32px" }, children: [
335
+ /* @__PURE__ */ jsxRuntime.jsxs(
336
+ getTranslation.Nr,
337
+ {
338
+ backgroundColor: tier === "free" ? "success100" : "neutral100",
339
+ textColor: tier === "free" ? "success700" : "neutral600",
340
+ style: {
341
+ fontSize: "13px",
342
+ fontWeight: "700",
343
+ padding: "8px 16px",
344
+ border: tier === "free" ? "2px solid #dcfce7" : "2px solid #e5e7eb"
345
+ },
346
+ children: [
347
+ tier === "free" ? "[ACTIVE]" : "",
348
+ " FREE"
349
+ ]
350
+ }
351
+ ),
352
+ /* @__PURE__ */ jsxRuntime.jsxs(
353
+ getTranslation.Nr,
354
+ {
355
+ backgroundColor: tier === "premium" ? "primary100" : "neutral100",
356
+ textColor: tier === "premium" ? "primary700" : "neutral600",
357
+ style: {
358
+ fontSize: "13px",
359
+ fontWeight: "700",
360
+ padding: "8px 16px",
361
+ border: tier === "premium" ? "2px solid #ede9fe" : "2px solid #e5e7eb"
362
+ },
363
+ children: [
364
+ tier === "premium" ? "[ACTIVE]" : "",
365
+ " PREMIUM"
366
+ ]
367
+ }
368
+ ),
369
+ /* @__PURE__ */ jsxRuntime.jsxs(
370
+ getTranslation.Nr,
371
+ {
372
+ backgroundColor: tier === "advanced" || tier === "enterprise" ? "secondary100" : "neutral100",
373
+ textColor: tier === "advanced" || tier === "enterprise" ? "secondary700" : "neutral600",
374
+ style: {
375
+ fontSize: "13px",
376
+ fontWeight: "700",
377
+ padding: "8px 16px",
378
+ border: tier === "advanced" || tier === "enterprise" ? "2px solid #ddd6fe" : "2px solid #e5e7eb"
379
+ },
380
+ children: [
381
+ tier === "advanced" || tier === "enterprise" ? "[ACTIVE]" : "",
382
+ " ADVANCED"
383
+ ]
384
+ }
385
+ )
386
+ ] }),
387
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.S, { padding: 5, background: "neutral100", hasRadius: true, children: [
388
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "delta", fontWeight: "bold", style: { marginBottom: "16px", display: "block" }, children: t("license.yourPlanIncludes", "Your Plan Includes:") }),
389
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.C, { direction: "column", gap: 2, children: [
390
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.A, { variant: "omega", style: { fontSize: "14px" }, children: [
391
+ "[OK] ",
392
+ t("license.feature.fullAccess", "Full Editor Access (all tools)")
393
+ ] }),
394
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.A, { variant: "omega", style: { fontSize: "14px" }, children: [
395
+ "[OK] ",
396
+ t("license.feature.realtimeCollab", "Real-Time Collaboration")
397
+ ] }),
398
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.A, { variant: "omega", style: { fontSize: "14px" }, children: [
399
+ "[OK] ",
400
+ collaborators.unlimited ? t("license.feature.collaboratorsUnlimited", "Unlimited Collaborators") : t("license.feature.collaborators", "{count} Collaborator(s)", { count: collaborators.max })
401
+ ] }),
402
+ (tier === "premium" || tier === "advanced" || tier === "enterprise") && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
403
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.A, { variant: "omega", style: { fontSize: "14px" }, children: [
404
+ "[OK] ",
405
+ t("license.feature.aiAssistant", "AI Assistant (Usage-based)")
406
+ ] }),
407
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.A, { variant: "omega", style: { fontSize: "14px" }, children: [
408
+ "[OK] ",
409
+ t("license.feature.versionHistory", "Version History")
410
+ ] }),
411
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.A, { variant: "omega", style: { fontSize: "14px" }, children: [
412
+ "[OK] ",
413
+ t("license.feature.prioritySupport", "Priority Support")
414
+ ] })
415
+ ] })
416
+ ] })
417
+ ] })
418
+ ] }) })
419
+ ] }),
420
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.dd.Item, { value: "status", children: [
421
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Trigger, { icon: () => /* @__PURE__ */ jsxRuntime.jsx(outline.ChartBarIcon, { style: { width: 16, height: 16 } }), children: t("license.section.status", "System Status") }) }),
422
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.dd.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.S, { padding: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.C, { gap: 8, wrap: "wrap", children: [
423
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.S, { style: { flex: "1", minWidth: "150px" }, children: [
424
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.licenseStatus", "License Status") }),
425
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "omega", fontWeight: "semiBold", children: data.isActive ? t("license.active", "Active") : t("license.inactive", "Inactive") })
426
+ ] }),
427
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.S, { style: { flex: "1", minWidth: "150px" }, children: [
428
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.connection", "Connection") }),
429
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "omega", fontWeight: "semiBold", children: data.isOnline ? t("license.online", "Online") : t("license.offline", "Offline") })
430
+ ] }),
431
+ /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.S, { style: { flex: "1", minWidth: "150px" }, children: [
432
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "sigma", textColor: "neutral600", textTransform: "uppercase", style: { marginBottom: "8px", display: "block" }, children: t("license.lastSync", "Last Sync") }),
433
+ /* @__PURE__ */ jsxRuntime.jsx(getTranslation.A, { variant: "omega", fontWeight: "semiBold", children: data.lastPingAt ? new Date(data.lastPingAt).toLocaleTimeString() : t("license.never", "Never") })
434
+ ] })
435
+ ] }) }) })
436
+ ] })
437
+ ] }) })
438
+ ] })
439
+ ] });
440
+ };
441
+ exports.default = Settings;