magic-editor-x 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{App-3CjSGQyL.js → App-DImBvISP.js} +59 -59
- package/dist/_chunks/{App-CKlB5p92.mjs → App-iNfbV7cz.mjs} +32 -32
- package/dist/_chunks/{CustomBlocksPage-CnJxygIw.js → CustomBlocksPage-Cj-0TTUs.js} +12 -12
- package/dist/_chunks/{LicensePage-vJxKYZGQ.js → LicensePage-CmvILX9m.js} +43 -43
- package/dist/_chunks/{LicensePage-B2STSez2.mjs → LicensePage-gLRoo8WJ.mjs} +38 -38
- package/dist/_chunks/{LiveCollaborationPanel-D70o6EGf.js → LiveCollaborationPanel-BFybu8h0.js} +7 -7
- package/dist/_chunks/{LiveCollaborationPanel-uLIJs5z_.mjs → LiveCollaborationPanel-CVgl4IyR.mjs} +3 -3
- package/dist/_chunks/{Settings-CdGL1OCi.mjs → Settings-ButYcfrm.mjs} +82 -82
- package/dist/_chunks/Settings-BzGqgrxD.js +440 -0
- package/dist/_chunks/{getTranslation--JcqVOd5.js → getTranslation-BADoesEn.js} +19120 -12315
- package/dist/_chunks/{getTranslation-bLklCCaI.mjs → getTranslation-D3h3Z3gU.mjs} +18708 -11903
- package/dist/_chunks/index-BXBnwuRw.js +2158 -0
- package/dist/_chunks/index-BvEdg518.mjs +2159 -0
- package/dist/_chunks/{index-CRALSDLD.js → index-DDFAuQNT.js} +181 -181
- package/dist/_chunks/{index-CdFFlQdx.mjs → index-DEi6nwfM.mjs} +33 -33
- package/dist/_chunks/{tools-uudZx91W.mjs → tools-BXzd0lx5.mjs} +3 -3
- package/dist/_chunks/{tools-BSMn5LLQ.js → tools-Q0uwDS9E.js} +10 -10
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +2 -2
- package/dist/server/index.js +142 -135
- package/dist/server/index.mjs +142 -135
- package/package.json +7 -7
- package/dist/_chunks/Settings-CwSNO4_t.js +0 -440
- package/dist/_chunks/index-CAPc_Y1F.mjs +0 -2551
- package/dist/_chunks/index-CPs6WJDY.js +0 -2550
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const
|
|
4
|
+
const m = require("react");
|
|
5
5
|
const admin = require("@strapi/strapi/admin");
|
|
6
|
-
const getTranslation = require("./getTranslation
|
|
6
|
+
const getTranslation = require("./getTranslation-BADoesEn.js");
|
|
7
7
|
const styled = require("styled-components");
|
|
8
|
-
const index = require("./index-
|
|
8
|
+
const index = require("./index-BXBnwuRw.js");
|
|
9
9
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
10
10
|
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
11
|
-
const Container = styled__default.default(getTranslation.
|
|
11
|
+
const Container = styled__default.default(getTranslation.R)`
|
|
12
12
|
padding: 32px;
|
|
13
13
|
max-width: 1400px;
|
|
14
14
|
margin: 0 auto;
|
|
15
15
|
`;
|
|
16
|
-
const Header = styled__default.default(getTranslation.
|
|
16
|
+
const Header = styled__default.default(getTranslation.R)`
|
|
17
17
|
text-align: center;
|
|
18
18
|
margin-bottom: 48px;
|
|
19
19
|
display: flex;
|
|
@@ -21,7 +21,7 @@ const Header = styled__default.default(getTranslation.Box)`
|
|
|
21
21
|
align-items: center;
|
|
22
22
|
gap: 8px;
|
|
23
23
|
`;
|
|
24
|
-
const Title = styled__default.default(getTranslation.
|
|
24
|
+
const Title = styled__default.default(getTranslation.I)`
|
|
25
25
|
font-size: 2.5rem;
|
|
26
26
|
font-weight: 700;
|
|
27
27
|
margin-bottom: 8px;
|
|
@@ -30,13 +30,13 @@ const Title = styled__default.default(getTranslation.Typography)`
|
|
|
30
30
|
-webkit-text-fill-color: transparent;
|
|
31
31
|
display: block;
|
|
32
32
|
`;
|
|
33
|
-
const Subtitle = styled__default.default(getTranslation.
|
|
33
|
+
const Subtitle = styled__default.default(getTranslation.I)`
|
|
34
34
|
font-size: 1.125rem;
|
|
35
35
|
color: ${(props) => props.theme.colors.neutral600};
|
|
36
36
|
line-height: 1.6;
|
|
37
37
|
display: block;
|
|
38
38
|
`;
|
|
39
|
-
const TierGrid = styled__default.default(getTranslation.
|
|
39
|
+
const TierGrid = styled__default.default(getTranslation.T)`
|
|
40
40
|
gap: 32px;
|
|
41
41
|
margin: 0 auto 48px;
|
|
42
42
|
max-width: 1080px;
|
|
@@ -44,13 +44,13 @@ const TierGrid = styled__default.default(getTranslation.Flex)`
|
|
|
44
44
|
flex-wrap: wrap;
|
|
45
45
|
align-items: stretch;
|
|
46
46
|
`;
|
|
47
|
-
const TierWrapper = styled__default.default(getTranslation.
|
|
47
|
+
const TierWrapper = styled__default.default(getTranslation.R)`
|
|
48
48
|
flex: 1;
|
|
49
49
|
min-width: 280px;
|
|
50
50
|
max-width: 340px;
|
|
51
51
|
display: flex;
|
|
52
52
|
`;
|
|
53
|
-
const TierCard = styled__default.default(getTranslation.
|
|
53
|
+
const TierCard = styled__default.default(getTranslation.R)`
|
|
54
54
|
background: ${(props) => props.theme.colors.neutral0};
|
|
55
55
|
border-radius: 16px;
|
|
56
56
|
padding: 32px;
|
|
@@ -67,7 +67,7 @@ const TierCard = styled__default.default(getTranslation.Box)`
|
|
|
67
67
|
box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
|
|
68
68
|
}
|
|
69
69
|
`;
|
|
70
|
-
const PopularBadge = styled__default.default(getTranslation.
|
|
70
|
+
const PopularBadge = styled__default.default(getTranslation.Ps)`
|
|
71
71
|
position: absolute;
|
|
72
72
|
top: -12px;
|
|
73
73
|
right: 24px;
|
|
@@ -77,7 +77,7 @@ const PopularBadge = styled__default.default(getTranslation.Badge)`
|
|
|
77
77
|
font-size: 12px;
|
|
78
78
|
font-weight: 600;
|
|
79
79
|
`;
|
|
80
|
-
const TierIcon = styled__default.default(getTranslation.
|
|
80
|
+
const TierIcon = styled__default.default(getTranslation.R)`
|
|
81
81
|
width: 48px;
|
|
82
82
|
height: 48px;
|
|
83
83
|
border-radius: 12px;
|
|
@@ -93,30 +93,30 @@ const TierIcon = styled__default.default(getTranslation.Box)`
|
|
|
93
93
|
color: white;
|
|
94
94
|
}
|
|
95
95
|
`;
|
|
96
|
-
const TierName = styled__default.default(getTranslation.
|
|
96
|
+
const TierName = styled__default.default(getTranslation.I)`
|
|
97
97
|
font-size: 1.5rem;
|
|
98
98
|
font-weight: 700;
|
|
99
99
|
margin-bottom: 8px;
|
|
100
100
|
`;
|
|
101
|
-
const TierPrice = styled__default.default(getTranslation.
|
|
101
|
+
const TierPrice = styled__default.default(getTranslation.I)`
|
|
102
102
|
font-size: 2rem;
|
|
103
103
|
font-weight: 800;
|
|
104
104
|
margin-bottom: 4px;
|
|
105
105
|
`;
|
|
106
|
-
const TierDescription = styled__default.default(getTranslation.
|
|
106
|
+
const TierDescription = styled__default.default(getTranslation.I)`
|
|
107
107
|
color: ${(props) => props.theme.colors.neutral600};
|
|
108
108
|
margin-bottom: 24px;
|
|
109
109
|
`;
|
|
110
|
-
const FeatureList = styled__default.default(getTranslation.
|
|
110
|
+
const FeatureList = styled__default.default(getTranslation.R)`
|
|
111
111
|
margin-bottom: 24px;
|
|
112
112
|
flex: 1;
|
|
113
113
|
`;
|
|
114
|
-
const Feature = styled__default.default(getTranslation.
|
|
114
|
+
const Feature = styled__default.default(getTranslation.T)`
|
|
115
115
|
gap: 12px;
|
|
116
116
|
margin-bottom: 12px;
|
|
117
117
|
align-items: flex-start;
|
|
118
118
|
`;
|
|
119
|
-
const FeatureIcon = styled__default.default(getTranslation.
|
|
119
|
+
const FeatureIcon = styled__default.default(getTranslation.R)`
|
|
120
120
|
width: 20px;
|
|
121
121
|
height: 20px;
|
|
122
122
|
border-radius: 50%;
|
|
@@ -134,7 +134,7 @@ const FeatureIcon = styled__default.default(getTranslation.Box)`
|
|
|
134
134
|
svg { color: #DC2626; }
|
|
135
135
|
`}
|
|
136
136
|
`;
|
|
137
|
-
const UpgradeButton = styled__default.default(getTranslation.
|
|
137
|
+
const UpgradeButton = styled__default.default(getTranslation.zn)`
|
|
138
138
|
width: 100%;
|
|
139
139
|
height: 48px;
|
|
140
140
|
font-weight: 600;
|
|
@@ -148,7 +148,7 @@ const UpgradeButton = styled__default.default(getTranslation.Button)`
|
|
|
148
148
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
149
149
|
}
|
|
150
150
|
`;
|
|
151
|
-
const CurrentPlanBadge = styled__default.default(getTranslation.
|
|
151
|
+
const CurrentPlanBadge = styled__default.default(getTranslation.Ps)`
|
|
152
152
|
width: 100%;
|
|
153
153
|
height: 48px;
|
|
154
154
|
display: flex;
|
|
@@ -159,7 +159,7 @@ const CurrentPlanBadge = styled__default.default(getTranslation.Badge)`
|
|
|
159
159
|
font-weight: 600;
|
|
160
160
|
font-size: 15px;
|
|
161
161
|
`;
|
|
162
|
-
const UsageBox = styled__default.default(getTranslation.
|
|
162
|
+
const UsageBox = styled__default.default(getTranslation.R)`
|
|
163
163
|
background: ${(props) => props.theme.colors.neutral100};
|
|
164
164
|
border: 1px solid ${(props) => props.theme.colors.neutral200};
|
|
165
165
|
border-radius: 12px;
|
|
@@ -184,10 +184,10 @@ const LicensePage = () => {
|
|
|
184
184
|
const t = (id, defaultMessage, values) => formatMessage({ id: getTranslation.getTranslation(id), defaultMessage }, values);
|
|
185
185
|
const { get } = admin.useFetchClient();
|
|
186
186
|
const { toggleNotification } = admin.useNotification();
|
|
187
|
-
const [currentTier, setCurrentTier] =
|
|
188
|
-
const [limits, setLimits] =
|
|
189
|
-
const [loading, setLoading] =
|
|
190
|
-
|
|
187
|
+
const [currentTier, setCurrentTier] = m.useState("free");
|
|
188
|
+
const [limits, setLimits] = m.useState(null);
|
|
189
|
+
const [loading, setLoading] = m.useState(true);
|
|
190
|
+
m.useEffect(() => {
|
|
191
191
|
fetchLicenseInfo();
|
|
192
192
|
}, []);
|
|
193
193
|
const fetchLicenseInfo = async () => {
|
|
@@ -229,7 +229,7 @@ const LicensePage = () => {
|
|
|
229
229
|
price: "$0",
|
|
230
230
|
period: "forever",
|
|
231
231
|
description: "Perfect for small projects and testing",
|
|
232
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(index.
|
|
232
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(index.Sn, {}),
|
|
233
233
|
color: "linear-gradient(135deg, #6B7280, #4B5563)",
|
|
234
234
|
features: [
|
|
235
235
|
{ name: "Full Editor Access", included: true },
|
|
@@ -254,7 +254,7 @@ const LicensePage = () => {
|
|
|
254
254
|
price: "$9.90",
|
|
255
255
|
period: "/month",
|
|
256
256
|
description: "Enhanced collaboration for teams",
|
|
257
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(index.
|
|
257
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(index.C3, {}),
|
|
258
258
|
color: "linear-gradient(135deg, #8B5CF6, #7C3AED)",
|
|
259
259
|
featured: true,
|
|
260
260
|
features: [
|
|
@@ -280,7 +280,7 @@ const LicensePage = () => {
|
|
|
280
280
|
price: "$24.90",
|
|
281
281
|
period: "/month",
|
|
282
282
|
description: "Unlimited collaboration for enterprises",
|
|
283
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(index.
|
|
283
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(index.ln, {}),
|
|
284
284
|
color: "linear-gradient(135deg, #7C3AED, #6d28d9)",
|
|
285
285
|
features: [
|
|
286
286
|
{ name: "Full Editor Access", included: true },
|
|
@@ -304,7 +304,7 @@ const LicensePage = () => {
|
|
|
304
304
|
window.open("https://store.magicdx.dev/", "_blank");
|
|
305
305
|
};
|
|
306
306
|
if (loading) {
|
|
307
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.
|
|
307
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.T, { justifyContent: "center", alignItems: "center", style: { minHeight: "400px" }, children: /* @__PURE__ */ jsxRuntime.jsx(getTranslation.Vd, { children: t("license.loading", "Loading license information...") }) }) });
|
|
308
308
|
}
|
|
309
309
|
const collaboratorUsage = limits?.collaborators ? {
|
|
310
310
|
current: limits.collaborators.current || 0,
|
|
@@ -318,14 +318,14 @@ const LicensePage = () => {
|
|
|
318
318
|
/* @__PURE__ */ jsxRuntime.jsx(Subtitle, { variant: "omega", children: t("upgradePage.subtitle", "Choose your plan for collaborative editing") })
|
|
319
319
|
] }),
|
|
320
320
|
/* @__PURE__ */ jsxRuntime.jsxs(UsageBox, { children: [
|
|
321
|
-
/* @__PURE__ */ jsxRuntime.jsxs(getTranslation.
|
|
322
|
-
/* @__PURE__ */ jsxRuntime.jsx(getTranslation.
|
|
323
|
-
/* @__PURE__ */ jsxRuntime.jsx(getTranslation.
|
|
321
|
+
/* @__PURE__ */ jsxRuntime.jsxs(getTranslation.T, { justifyContent: "space-between", alignItems: "center", children: [
|
|
322
|
+
/* @__PURE__ */ jsxRuntime.jsx(getTranslation.I, { variant: "beta", fontWeight: "bold", children: t("upgradePage.currentUsage", "Current Usage") }),
|
|
323
|
+
/* @__PURE__ */ jsxRuntime.jsx(getTranslation.Ps, { style: { background: currentTier === "free" ? "#6B7280" : "#7C3AED", color: "white" }, children: currentTier.toUpperCase() })
|
|
324
324
|
] }),
|
|
325
|
-
/* @__PURE__ */ jsxRuntime.jsxs(getTranslation.
|
|
326
|
-
/* @__PURE__ */ jsxRuntime.jsxs(getTranslation.
|
|
327
|
-
/* @__PURE__ */ jsxRuntime.jsx(getTranslation.
|
|
328
|
-
/* @__PURE__ */ jsxRuntime.jsxs(getTranslation.
|
|
325
|
+
/* @__PURE__ */ jsxRuntime.jsxs(getTranslation.R, { marginTop: 4, children: [
|
|
326
|
+
/* @__PURE__ */ jsxRuntime.jsxs(getTranslation.T, { justifyContent: "space-between", children: [
|
|
327
|
+
/* @__PURE__ */ jsxRuntime.jsx(getTranslation.I, { variant: "omega", children: t("upgradePage.collaborators", "Collaborators") }),
|
|
328
|
+
/* @__PURE__ */ jsxRuntime.jsxs(getTranslation.I, { variant: "omega", fontWeight: "bold", children: [
|
|
329
329
|
collaboratorUsage.current,
|
|
330
330
|
" / ",
|
|
331
331
|
collaboratorUsage.unlimited ? t("license.unlimited", "Unlimited") : collaboratorUsage.max
|
|
@@ -338,25 +338,25 @@ const LicensePage = () => {
|
|
|
338
338
|
tier.featured && /* @__PURE__ */ jsxRuntime.jsx(PopularBadge, { children: t("upgradePage.mostPopular", "MOST POPULAR") }),
|
|
339
339
|
/* @__PURE__ */ jsxRuntime.jsx(TierIcon, { $color: tier.color, children: tier.icon }),
|
|
340
340
|
/* @__PURE__ */ jsxRuntime.jsx(TierName, { variant: "beta", children: tier.name }),
|
|
341
|
-
/* @__PURE__ */ jsxRuntime.jsxs(getTranslation.
|
|
341
|
+
/* @__PURE__ */ jsxRuntime.jsxs(getTranslation.T, { alignItems: "baseline", gap: 1, children: [
|
|
342
342
|
/* @__PURE__ */ jsxRuntime.jsx(TierPrice, { variant: "alpha", children: tier.price }),
|
|
343
|
-
/* @__PURE__ */ jsxRuntime.jsx(getTranslation.
|
|
343
|
+
/* @__PURE__ */ jsxRuntime.jsx(getTranslation.I, { variant: "omega", style: { color: "#6B7280" }, children: tier.period })
|
|
344
344
|
] }),
|
|
345
345
|
/* @__PURE__ */ jsxRuntime.jsx(TierDescription, { variant: "omega", children: tier.description }),
|
|
346
346
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
347
|
-
getTranslation.
|
|
347
|
+
getTranslation.R,
|
|
348
348
|
{
|
|
349
349
|
background: "neutral100",
|
|
350
350
|
hasRadius: true,
|
|
351
351
|
padding: 3,
|
|
352
352
|
marginBottom: 5,
|
|
353
353
|
children: [
|
|
354
|
-
/* @__PURE__ */ jsxRuntime.jsxs(getTranslation.
|
|
354
|
+
/* @__PURE__ */ jsxRuntime.jsxs(getTranslation.I, { variant: "pi", style: { fontSize: "13px", display: "block", marginBottom: "4px" }, children: [
|
|
355
355
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "Collaborators:" }),
|
|
356
356
|
" ",
|
|
357
357
|
tier.limits.collaborators
|
|
358
358
|
] }),
|
|
359
|
-
/* @__PURE__ */ jsxRuntime.jsxs(getTranslation.
|
|
359
|
+
/* @__PURE__ */ jsxRuntime.jsxs(getTranslation.I, { variant: "pi", style: { fontSize: "13px", display: "block" }, children: [
|
|
360
360
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "Custom Blocks:" }),
|
|
361
361
|
" ",
|
|
362
362
|
tier.limits.customBlocks
|
|
@@ -365,9 +365,9 @@ const LicensePage = () => {
|
|
|
365
365
|
}
|
|
366
366
|
),
|
|
367
367
|
/* @__PURE__ */ jsxRuntime.jsx(FeatureList, { children: tier.features.map((feature, index$1) => /* @__PURE__ */ jsxRuntime.jsxs(Feature, { children: [
|
|
368
|
-
/* @__PURE__ */ jsxRuntime.jsx(FeatureIcon, { $included: feature.included, children: feature.included ? /* @__PURE__ */ jsxRuntime.jsx(index.
|
|
368
|
+
/* @__PURE__ */ jsxRuntime.jsx(FeatureIcon, { $included: feature.included, children: feature.included ? /* @__PURE__ */ jsxRuntime.jsx(index.t5, { style: { width: 14, height: 14 } }) : /* @__PURE__ */ jsxRuntime.jsx(index.C5, { style: { width: 14, height: 14 } }) }),
|
|
369
369
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
370
|
-
getTranslation.
|
|
370
|
+
getTranslation.I,
|
|
371
371
|
{
|
|
372
372
|
variant: "omega",
|
|
373
373
|
textColor: feature.included ? "neutral800" : "neutral500",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
3
|
import { useFetchClient, useNotification } from "@strapi/strapi/admin";
|
|
4
|
-
import { u as useIntl,
|
|
4
|
+
import { u as useIntl, T, V as Vd, I, P as Ps, R, g as getTranslation, z as zn } from "./getTranslation-D3h3Z3gU.mjs";
|
|
5
5
|
import styled from "styled-components";
|
|
6
|
-
import {
|
|
7
|
-
const Container = styled(
|
|
6
|
+
import { t as t5, C as C5, S as Sn, a as C3, l as ln } from "./index-BvEdg518.mjs";
|
|
7
|
+
const Container = styled(R)`
|
|
8
8
|
padding: 32px;
|
|
9
9
|
max-width: 1400px;
|
|
10
10
|
margin: 0 auto;
|
|
11
11
|
`;
|
|
12
|
-
const Header = styled(
|
|
12
|
+
const Header = styled(R)`
|
|
13
13
|
text-align: center;
|
|
14
14
|
margin-bottom: 48px;
|
|
15
15
|
display: flex;
|
|
@@ -17,7 +17,7 @@ const Header = styled(Box)`
|
|
|
17
17
|
align-items: center;
|
|
18
18
|
gap: 8px;
|
|
19
19
|
`;
|
|
20
|
-
const Title = styled(
|
|
20
|
+
const Title = styled(I)`
|
|
21
21
|
font-size: 2.5rem;
|
|
22
22
|
font-weight: 700;
|
|
23
23
|
margin-bottom: 8px;
|
|
@@ -26,13 +26,13 @@ const Title = styled(Typography)`
|
|
|
26
26
|
-webkit-text-fill-color: transparent;
|
|
27
27
|
display: block;
|
|
28
28
|
`;
|
|
29
|
-
const Subtitle = styled(
|
|
29
|
+
const Subtitle = styled(I)`
|
|
30
30
|
font-size: 1.125rem;
|
|
31
31
|
color: ${(props) => props.theme.colors.neutral600};
|
|
32
32
|
line-height: 1.6;
|
|
33
33
|
display: block;
|
|
34
34
|
`;
|
|
35
|
-
const TierGrid = styled(
|
|
35
|
+
const TierGrid = styled(T)`
|
|
36
36
|
gap: 32px;
|
|
37
37
|
margin: 0 auto 48px;
|
|
38
38
|
max-width: 1080px;
|
|
@@ -40,13 +40,13 @@ const TierGrid = styled(Flex)`
|
|
|
40
40
|
flex-wrap: wrap;
|
|
41
41
|
align-items: stretch;
|
|
42
42
|
`;
|
|
43
|
-
const TierWrapper = styled(
|
|
43
|
+
const TierWrapper = styled(R)`
|
|
44
44
|
flex: 1;
|
|
45
45
|
min-width: 280px;
|
|
46
46
|
max-width: 340px;
|
|
47
47
|
display: flex;
|
|
48
48
|
`;
|
|
49
|
-
const TierCard = styled(
|
|
49
|
+
const TierCard = styled(R)`
|
|
50
50
|
background: ${(props) => props.theme.colors.neutral0};
|
|
51
51
|
border-radius: 16px;
|
|
52
52
|
padding: 32px;
|
|
@@ -63,7 +63,7 @@ const TierCard = styled(Box)`
|
|
|
63
63
|
box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
|
|
64
64
|
}
|
|
65
65
|
`;
|
|
66
|
-
const PopularBadge = styled(
|
|
66
|
+
const PopularBadge = styled(Ps)`
|
|
67
67
|
position: absolute;
|
|
68
68
|
top: -12px;
|
|
69
69
|
right: 24px;
|
|
@@ -73,7 +73,7 @@ const PopularBadge = styled(Badge)`
|
|
|
73
73
|
font-size: 12px;
|
|
74
74
|
font-weight: 600;
|
|
75
75
|
`;
|
|
76
|
-
const TierIcon = styled(
|
|
76
|
+
const TierIcon = styled(R)`
|
|
77
77
|
width: 48px;
|
|
78
78
|
height: 48px;
|
|
79
79
|
border-radius: 12px;
|
|
@@ -89,30 +89,30 @@ const TierIcon = styled(Box)`
|
|
|
89
89
|
color: white;
|
|
90
90
|
}
|
|
91
91
|
`;
|
|
92
|
-
const TierName = styled(
|
|
92
|
+
const TierName = styled(I)`
|
|
93
93
|
font-size: 1.5rem;
|
|
94
94
|
font-weight: 700;
|
|
95
95
|
margin-bottom: 8px;
|
|
96
96
|
`;
|
|
97
|
-
const TierPrice = styled(
|
|
97
|
+
const TierPrice = styled(I)`
|
|
98
98
|
font-size: 2rem;
|
|
99
99
|
font-weight: 800;
|
|
100
100
|
margin-bottom: 4px;
|
|
101
101
|
`;
|
|
102
|
-
const TierDescription = styled(
|
|
102
|
+
const TierDescription = styled(I)`
|
|
103
103
|
color: ${(props) => props.theme.colors.neutral600};
|
|
104
104
|
margin-bottom: 24px;
|
|
105
105
|
`;
|
|
106
|
-
const FeatureList = styled(
|
|
106
|
+
const FeatureList = styled(R)`
|
|
107
107
|
margin-bottom: 24px;
|
|
108
108
|
flex: 1;
|
|
109
109
|
`;
|
|
110
|
-
const Feature = styled(
|
|
110
|
+
const Feature = styled(T)`
|
|
111
111
|
gap: 12px;
|
|
112
112
|
margin-bottom: 12px;
|
|
113
113
|
align-items: flex-start;
|
|
114
114
|
`;
|
|
115
|
-
const FeatureIcon = styled(
|
|
115
|
+
const FeatureIcon = styled(R)`
|
|
116
116
|
width: 20px;
|
|
117
117
|
height: 20px;
|
|
118
118
|
border-radius: 50%;
|
|
@@ -130,7 +130,7 @@ const FeatureIcon = styled(Box)`
|
|
|
130
130
|
svg { color: #DC2626; }
|
|
131
131
|
`}
|
|
132
132
|
`;
|
|
133
|
-
const UpgradeButton = styled(
|
|
133
|
+
const UpgradeButton = styled(zn)`
|
|
134
134
|
width: 100%;
|
|
135
135
|
height: 48px;
|
|
136
136
|
font-weight: 600;
|
|
@@ -144,7 +144,7 @@ const UpgradeButton = styled(Button)`
|
|
|
144
144
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
145
145
|
}
|
|
146
146
|
`;
|
|
147
|
-
const CurrentPlanBadge = styled(
|
|
147
|
+
const CurrentPlanBadge = styled(Ps)`
|
|
148
148
|
width: 100%;
|
|
149
149
|
height: 48px;
|
|
150
150
|
display: flex;
|
|
@@ -155,7 +155,7 @@ const CurrentPlanBadge = styled(Badge)`
|
|
|
155
155
|
font-weight: 600;
|
|
156
156
|
font-size: 15px;
|
|
157
157
|
`;
|
|
158
|
-
const UsageBox = styled(
|
|
158
|
+
const UsageBox = styled(R)`
|
|
159
159
|
background: ${(props) => props.theme.colors.neutral100};
|
|
160
160
|
border: 1px solid ${(props) => props.theme.colors.neutral200};
|
|
161
161
|
border-radius: 12px;
|
|
@@ -225,7 +225,7 @@ const LicensePage = () => {
|
|
|
225
225
|
price: "$0",
|
|
226
226
|
period: "forever",
|
|
227
227
|
description: "Perfect for small projects and testing",
|
|
228
|
-
icon: /* @__PURE__ */ jsx(
|
|
228
|
+
icon: /* @__PURE__ */ jsx(Sn, {}),
|
|
229
229
|
color: "linear-gradient(135deg, #6B7280, #4B5563)",
|
|
230
230
|
features: [
|
|
231
231
|
{ name: "Full Editor Access", included: true },
|
|
@@ -250,7 +250,7 @@ const LicensePage = () => {
|
|
|
250
250
|
price: "$9.90",
|
|
251
251
|
period: "/month",
|
|
252
252
|
description: "Enhanced collaboration for teams",
|
|
253
|
-
icon: /* @__PURE__ */ jsx(
|
|
253
|
+
icon: /* @__PURE__ */ jsx(C3, {}),
|
|
254
254
|
color: "linear-gradient(135deg, #8B5CF6, #7C3AED)",
|
|
255
255
|
featured: true,
|
|
256
256
|
features: [
|
|
@@ -276,7 +276,7 @@ const LicensePage = () => {
|
|
|
276
276
|
price: "$24.90",
|
|
277
277
|
period: "/month",
|
|
278
278
|
description: "Unlimited collaboration for enterprises",
|
|
279
|
-
icon: /* @__PURE__ */ jsx(
|
|
279
|
+
icon: /* @__PURE__ */ jsx(ln, {}),
|
|
280
280
|
color: "linear-gradient(135deg, #7C3AED, #6d28d9)",
|
|
281
281
|
features: [
|
|
282
282
|
{ name: "Full Editor Access", included: true },
|
|
@@ -300,7 +300,7 @@ const LicensePage = () => {
|
|
|
300
300
|
window.open("https://store.magicdx.dev/", "_blank");
|
|
301
301
|
};
|
|
302
302
|
if (loading) {
|
|
303
|
-
return /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(
|
|
303
|
+
return /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(T, { justifyContent: "center", alignItems: "center", style: { minHeight: "400px" }, children: /* @__PURE__ */ jsx(Vd, { children: t("license.loading", "Loading license information...") }) }) });
|
|
304
304
|
}
|
|
305
305
|
const collaboratorUsage = limits?.collaborators ? {
|
|
306
306
|
current: limits.collaborators.current || 0,
|
|
@@ -314,14 +314,14 @@ const LicensePage = () => {
|
|
|
314
314
|
/* @__PURE__ */ jsx(Subtitle, { variant: "omega", children: t("upgradePage.subtitle", "Choose your plan for collaborative editing") })
|
|
315
315
|
] }),
|
|
316
316
|
/* @__PURE__ */ jsxs(UsageBox, { children: [
|
|
317
|
-
/* @__PURE__ */ jsxs(
|
|
318
|
-
/* @__PURE__ */ jsx(
|
|
319
|
-
/* @__PURE__ */ jsx(
|
|
317
|
+
/* @__PURE__ */ jsxs(T, { justifyContent: "space-between", alignItems: "center", children: [
|
|
318
|
+
/* @__PURE__ */ jsx(I, { variant: "beta", fontWeight: "bold", children: t("upgradePage.currentUsage", "Current Usage") }),
|
|
319
|
+
/* @__PURE__ */ jsx(Ps, { style: { background: currentTier === "free" ? "#6B7280" : "#7C3AED", color: "white" }, children: currentTier.toUpperCase() })
|
|
320
320
|
] }),
|
|
321
|
-
/* @__PURE__ */ jsxs(
|
|
322
|
-
/* @__PURE__ */ jsxs(
|
|
323
|
-
/* @__PURE__ */ jsx(
|
|
324
|
-
/* @__PURE__ */ jsxs(
|
|
321
|
+
/* @__PURE__ */ jsxs(R, { marginTop: 4, children: [
|
|
322
|
+
/* @__PURE__ */ jsxs(T, { justifyContent: "space-between", children: [
|
|
323
|
+
/* @__PURE__ */ jsx(I, { variant: "omega", children: t("upgradePage.collaborators", "Collaborators") }),
|
|
324
|
+
/* @__PURE__ */ jsxs(I, { variant: "omega", fontWeight: "bold", children: [
|
|
325
325
|
collaboratorUsage.current,
|
|
326
326
|
" / ",
|
|
327
327
|
collaboratorUsage.unlimited ? t("license.unlimited", "Unlimited") : collaboratorUsage.max
|
|
@@ -334,25 +334,25 @@ const LicensePage = () => {
|
|
|
334
334
|
tier.featured && /* @__PURE__ */ jsx(PopularBadge, { children: t("upgradePage.mostPopular", "MOST POPULAR") }),
|
|
335
335
|
/* @__PURE__ */ jsx(TierIcon, { $color: tier.color, children: tier.icon }),
|
|
336
336
|
/* @__PURE__ */ jsx(TierName, { variant: "beta", children: tier.name }),
|
|
337
|
-
/* @__PURE__ */ jsxs(
|
|
337
|
+
/* @__PURE__ */ jsxs(T, { alignItems: "baseline", gap: 1, children: [
|
|
338
338
|
/* @__PURE__ */ jsx(TierPrice, { variant: "alpha", children: tier.price }),
|
|
339
|
-
/* @__PURE__ */ jsx(
|
|
339
|
+
/* @__PURE__ */ jsx(I, { variant: "omega", style: { color: "#6B7280" }, children: tier.period })
|
|
340
340
|
] }),
|
|
341
341
|
/* @__PURE__ */ jsx(TierDescription, { variant: "omega", children: tier.description }),
|
|
342
342
|
/* @__PURE__ */ jsxs(
|
|
343
|
-
|
|
343
|
+
R,
|
|
344
344
|
{
|
|
345
345
|
background: "neutral100",
|
|
346
346
|
hasRadius: true,
|
|
347
347
|
padding: 3,
|
|
348
348
|
marginBottom: 5,
|
|
349
349
|
children: [
|
|
350
|
-
/* @__PURE__ */ jsxs(
|
|
350
|
+
/* @__PURE__ */ jsxs(I, { variant: "pi", style: { fontSize: "13px", display: "block", marginBottom: "4px" }, children: [
|
|
351
351
|
/* @__PURE__ */ jsx("strong", { children: "Collaborators:" }),
|
|
352
352
|
" ",
|
|
353
353
|
tier.limits.collaborators
|
|
354
354
|
] }),
|
|
355
|
-
/* @__PURE__ */ jsxs(
|
|
355
|
+
/* @__PURE__ */ jsxs(I, { variant: "pi", style: { fontSize: "13px", display: "block" }, children: [
|
|
356
356
|
/* @__PURE__ */ jsx("strong", { children: "Custom Blocks:" }),
|
|
357
357
|
" ",
|
|
358
358
|
tier.limits.customBlocks
|
|
@@ -361,9 +361,9 @@ const LicensePage = () => {
|
|
|
361
361
|
}
|
|
362
362
|
),
|
|
363
363
|
/* @__PURE__ */ jsx(FeatureList, { children: tier.features.map((feature, index) => /* @__PURE__ */ jsxs(Feature, { children: [
|
|
364
|
-
/* @__PURE__ */ jsx(FeatureIcon, { $included: feature.included, children: feature.included ? /* @__PURE__ */ jsx(
|
|
364
|
+
/* @__PURE__ */ jsx(FeatureIcon, { $included: feature.included, children: feature.included ? /* @__PURE__ */ jsx(t5, { style: { width: 14, height: 14 } }) : /* @__PURE__ */ jsx(C5, { style: { width: 14, height: 14 } }) }),
|
|
365
365
|
/* @__PURE__ */ jsx(
|
|
366
|
-
|
|
366
|
+
I,
|
|
367
367
|
{
|
|
368
368
|
variant: "omega",
|
|
369
369
|
textColor: feature.included ? "neutral800" : "neutral500",
|
package/dist/_chunks/{LiveCollaborationPanel-D70o6EGf.js → LiveCollaborationPanel-BFybu8h0.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const
|
|
5
|
-
const getTranslation = require("./getTranslation
|
|
4
|
+
const m = require("react");
|
|
5
|
+
const getTranslation = require("./getTranslation-BADoesEn.js");
|
|
6
6
|
const styled = require("styled-components");
|
|
7
7
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
8
8
|
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
@@ -152,12 +152,12 @@ const getPeerName = (user = {}, t) => {
|
|
|
152
152
|
const LiveCollaborationPanel = ({ documentId, model, document }) => {
|
|
153
153
|
const { formatMessage } = getTranslation.useIntl();
|
|
154
154
|
const t = (id, defaultMessage, values) => formatMessage({ id: getTranslation.getTranslation(id), defaultMessage }, values);
|
|
155
|
-
const [collabState, setCollabState] =
|
|
155
|
+
const [collabState, setCollabState] = m.useState({
|
|
156
156
|
status: "disabled",
|
|
157
157
|
peers: [],
|
|
158
158
|
error: null
|
|
159
159
|
});
|
|
160
|
-
|
|
160
|
+
m.useEffect(() => {
|
|
161
161
|
const handleCollabUpdate = (event) => {
|
|
162
162
|
if (event.detail) {
|
|
163
163
|
setCollabState(event.detail);
|
|
@@ -172,7 +172,7 @@ const LiveCollaborationPanel = ({ documentId, model, document }) => {
|
|
|
172
172
|
};
|
|
173
173
|
}, []);
|
|
174
174
|
const { status, peers, error } = collabState;
|
|
175
|
-
const statusLabel =
|
|
175
|
+
const statusLabel = m.useMemo(() => {
|
|
176
176
|
switch (status) {
|
|
177
177
|
case "connected":
|
|
178
178
|
return t("collab.live", "Live");
|
|
@@ -196,7 +196,7 @@ const LiveCollaborationPanel = ({ documentId, model, document }) => {
|
|
|
196
196
|
const isConnected = status === "connected";
|
|
197
197
|
return {
|
|
198
198
|
title: t("collab.title", "Live Collaboration"),
|
|
199
|
-
content: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.
|
|
199
|
+
content: /* @__PURE__ */ jsxRuntime.jsxs(getTranslation.T, { direction: "column", gap: 4, alignItems: "stretch", style: { width: "100%" }, children: [
|
|
200
200
|
/* @__PURE__ */ jsxRuntime.jsxs(StatusCard, { $status: status, children: [
|
|
201
201
|
/* @__PURE__ */ jsxRuntime.jsx(StatusDot, { $status: status }),
|
|
202
202
|
/* @__PURE__ */ jsxRuntime.jsxs(StatusText, { children: [
|
|
@@ -206,7 +206,7 @@ const LiveCollaborationPanel = ({ documentId, model, document }) => {
|
|
|
206
206
|
] }),
|
|
207
207
|
isConnected && peers.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
208
208
|
/* @__PURE__ */ jsxRuntime.jsx(SectionTitle, { children: t("collab.activePeers", "Active Collaborators ({count})", { count: peers.length }) }),
|
|
209
|
-
/* @__PURE__ */ jsxRuntime.jsx(getTranslation.
|
|
209
|
+
/* @__PURE__ */ jsxRuntime.jsx(getTranslation.T, { direction: "column", gap: 2, alignItems: "stretch", children: peers.map((peer, idx) => /* @__PURE__ */ jsxRuntime.jsxs(PeerItem, { children: [
|
|
210
210
|
/* @__PURE__ */ jsxRuntime.jsx(PeerAvatar, { $color: PEER_COLORS[idx % PEER_COLORS.length], children: getPeerInitials(peer) }),
|
|
211
211
|
/* @__PURE__ */ jsxRuntime.jsxs(PeerInfo, { children: [
|
|
212
212
|
/* @__PURE__ */ jsxRuntime.jsx(PeerName, { children: getPeerName(peer, t) }),
|
package/dist/_chunks/{LiveCollaborationPanel-uLIJs5z_.mjs → LiveCollaborationPanel-CVgl4IyR.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect, useMemo } from "react";
|
|
3
|
-
import { u as useIntl,
|
|
3
|
+
import { u as useIntl, T, g as getTranslation } from "./getTranslation-D3h3Z3gU.mjs";
|
|
4
4
|
import styled, { css, keyframes } from "styled-components";
|
|
5
5
|
const pulse = keyframes`
|
|
6
6
|
0%, 100% {
|
|
@@ -192,7 +192,7 @@ const LiveCollaborationPanel = ({ documentId, model, document }) => {
|
|
|
192
192
|
const isConnected = status === "connected";
|
|
193
193
|
return {
|
|
194
194
|
title: t("collab.title", "Live Collaboration"),
|
|
195
|
-
content: /* @__PURE__ */ jsxs(
|
|
195
|
+
content: /* @__PURE__ */ jsxs(T, { direction: "column", gap: 4, alignItems: "stretch", style: { width: "100%" }, children: [
|
|
196
196
|
/* @__PURE__ */ jsxs(StatusCard, { $status: status, children: [
|
|
197
197
|
/* @__PURE__ */ jsx(StatusDot, { $status: status }),
|
|
198
198
|
/* @__PURE__ */ jsxs(StatusText, { children: [
|
|
@@ -202,7 +202,7 @@ const LiveCollaborationPanel = ({ documentId, model, document }) => {
|
|
|
202
202
|
] }),
|
|
203
203
|
isConnected && peers.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
204
204
|
/* @__PURE__ */ jsx(SectionTitle, { children: t("collab.activePeers", "Active Collaborators ({count})", { count: peers.length }) }),
|
|
205
|
-
/* @__PURE__ */ jsx(
|
|
205
|
+
/* @__PURE__ */ jsx(T, { direction: "column", gap: 2, alignItems: "stretch", children: peers.map((peer, idx) => /* @__PURE__ */ jsxs(PeerItem, { children: [
|
|
206
206
|
/* @__PURE__ */ jsx(PeerAvatar, { $color: PEER_COLORS[idx % PEER_COLORS.length], children: getPeerInitials(peer) }),
|
|
207
207
|
/* @__PURE__ */ jsxs(PeerInfo, { children: [
|
|
208
208
|
/* @__PURE__ */ jsx(PeerName, { children: getPeerName(peer, t) }),
|