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