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