@remotion/studio 4.0.497 → 4.0.498
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/components/Checkbox.js +1 -1
- package/dist/components/ConfigureLicenseModal.d.ts +4 -0
- package/dist/components/ConfigureLicenseModal.js +194 -0
- package/dist/components/Editor.d.ts +0 -1
- package/dist/components/Editor.js +2 -3
- package/dist/components/InspectorPanel/CompositionInspector.js +2 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +4 -4
- package/dist/components/InspectorPanel/use-composition-actions.js +1 -1
- package/dist/components/LicenseKeyValidation.d.ts +17 -0
- package/dist/components/LicenseKeyValidation.js +113 -0
- package/dist/components/Modals.js +2 -1
- package/dist/components/RenderButton.js +0 -1
- package/dist/components/RenderModal/WebRenderModal.js +14 -8
- package/dist/components/SelectedOutlineOverlay.js +1 -1
- package/dist/components/Timeline/MaxTimelineTracks.d.ts +0 -1
- package/dist/components/Timeline/MaxTimelineTracks.js +3 -3
- package/dist/components/Timeline/Timeline.js +9 -8
- package/dist/components/Timeline/TimelineDragHandler.js +1 -1
- package/dist/components/Timeline/TimelineSelection.js +1 -1
- package/dist/components/Timeline/TimelineSequence.js +6 -6
- package/dist/components/Timeline/TimelineSequenceItem.js +5 -5
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +8 -0
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +40 -2
- package/dist/components/Timeline/call-update-keyframe-settings.d.ts +17 -0
- package/dist/components/Timeline/call-update-keyframe-settings.js +43 -1
- package/dist/components/Timeline/update-selected-easing.js +26 -23
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +5 -0
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +16 -9
- package/dist/components/Timeline/use-timeline-asset-drop.js +1 -1
- package/dist/esm/{chunk-5wj95bdd.js → chunk-7a6q9hk2.js} +2454 -2312
- package/dist/esm/index.mjs +0 -19
- package/dist/esm/internals.mjs +2454 -2312
- package/dist/esm/previewEntry.mjs +2457 -2315
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/interactivity-enabled.d.ts +1 -1
- package/dist/helpers/interactivity-enabled.js +2 -2
- package/dist/helpers/retry-payload.js +0 -1
- package/dist/helpers/use-menu-structure.js +9 -3
- package/dist/state/modals.d.ts +3 -1
- package/dist/visual-controls/VisualControls.js +1 -1
- package/package.json +11 -11
- package/dist/components/RenderModal/WebRenderModalLicense.d.ts +0 -9
- package/dist/components/RenderModal/WebRenderModalLicense.js +0 -189
- package/dist/components/RenderModal/WebRenderModalLicenseKeyDetails.d.ts +0 -13
- package/dist/components/RenderModal/WebRenderModalLicenseKeyDetails.js +0 -60
package/dist/esm/renderEntry.mjs
CHANGED
|
@@ -212,7 +212,7 @@ var renderContent = (Root) => {
|
|
|
212
212
|
renderToDOM(/* @__PURE__ */ jsx("div", {
|
|
213
213
|
children: /* @__PURE__ */ jsx(DelayedSpinner, {})
|
|
214
214
|
}));
|
|
215
|
-
import("./chunk-
|
|
215
|
+
import("./chunk-7a6q9hk2.js").then(({ StudioInternals }) => {
|
|
216
216
|
window.remotion_isStudio = true;
|
|
217
217
|
window.remotion_isReadOnlyStudio = true;
|
|
218
218
|
window.remotion_inputProps = "{}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const isStudioInteractivityEnabled: () => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isStudioInteractivityEnabled = void 0;
|
|
4
4
|
const studio_runtime_config_1 = require("./studio-runtime-config");
|
|
5
|
-
exports.
|
|
5
|
+
exports.isStudioInteractivityEnabled = studio_runtime_config_1.getStudioInteractivityEnabled;
|
|
@@ -182,7 +182,6 @@ const makeClientRetryPayload = (job) => {
|
|
|
182
182
|
compositionId: job.compositionId,
|
|
183
183
|
initialFrame: job.type === 'client-still' ? job.frame : 0,
|
|
184
184
|
initialLogLevel: job.logLevel,
|
|
185
|
-
initialLicenseKey: job.licenseKey,
|
|
186
185
|
defaultProps: job.inputProps,
|
|
187
186
|
inFrameMark: job.type === 'client-video' ? job.startFrame : null,
|
|
188
187
|
outFrameMark: job.type === 'client-video' ? job.endFrame : null,
|
|
@@ -269,16 +269,22 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
269
269
|
{
|
|
270
270
|
id: 'license',
|
|
271
271
|
value: 'license',
|
|
272
|
-
label: 'License',
|
|
272
|
+
label: 'Configure License...',
|
|
273
273
|
onClick: () => {
|
|
274
|
+
var _a;
|
|
275
|
+
var _b;
|
|
274
276
|
closeMenu();
|
|
275
|
-
|
|
277
|
+
setSelectedModal({
|
|
278
|
+
type: 'configure-license',
|
|
279
|
+
initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
|
|
280
|
+
});
|
|
276
281
|
},
|
|
277
282
|
type: 'item',
|
|
278
283
|
keyHint: null,
|
|
279
284
|
leftItem: null,
|
|
280
285
|
subMenu: null,
|
|
281
|
-
quickSwitcherLabel: '
|
|
286
|
+
quickSwitcherLabel: 'Configure License...',
|
|
287
|
+
disabled: readOnlyStudio || type !== 'connected',
|
|
282
288
|
},
|
|
283
289
|
{
|
|
284
290
|
id: 'acknowledgements',
|
package/dist/state/modals.d.ts
CHANGED
|
@@ -29,7 +29,6 @@ export type WebRenderModalState = {
|
|
|
29
29
|
initialKeyframeIntervalInSeconds: number | null;
|
|
30
30
|
initialTransparent: boolean | null;
|
|
31
31
|
initialMuted: boolean | null;
|
|
32
|
-
initialLicenseKey: string | null;
|
|
33
32
|
initialMediaCacheSizeInBytes: number | null;
|
|
34
33
|
initialPageResponsiveness: WebRendererPageResponsiveness;
|
|
35
34
|
};
|
|
@@ -143,6 +142,9 @@ export type ModalState = {
|
|
|
143
142
|
relativePath: string;
|
|
144
143
|
} | {
|
|
145
144
|
type: 'input-props-override';
|
|
145
|
+
} | {
|
|
146
|
+
type: 'configure-license';
|
|
147
|
+
initialPublicLicenseKey: string | null;
|
|
146
148
|
} | RenderModalState | WebRenderModalState | {
|
|
147
149
|
type: 'render-progress';
|
|
148
150
|
jobId: string;
|
|
@@ -70,7 +70,7 @@ const VisualControlsProvider = ({ children }) => {
|
|
|
70
70
|
if (!env.isStudio) {
|
|
71
71
|
return value;
|
|
72
72
|
}
|
|
73
|
-
if (!interactivity_enabled_1.
|
|
73
|
+
if (!(0, interactivity_enabled_1.isStudioInteractivityEnabled)()) {
|
|
74
74
|
return value;
|
|
75
75
|
}
|
|
76
76
|
if (!z) {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/studio",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.498",
|
|
7
7
|
"description": "APIs for interacting with the Remotion Studio",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"scripts": {
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"semver": "7.5.3",
|
|
28
|
-
"remotion": "4.0.
|
|
29
|
-
"@remotion/canvas-capture": "4.0.
|
|
30
|
-
"@remotion/player": "4.0.
|
|
31
|
-
"@remotion/media-utils": "4.0.
|
|
32
|
-
"@remotion/renderer": "4.0.
|
|
33
|
-
"@remotion/web-renderer": "4.0.
|
|
34
|
-
"@remotion/studio-shared": "4.0.
|
|
35
|
-
"@remotion/timeline-utils": "4.0.
|
|
36
|
-
"@remotion/zod-types": "4.0.
|
|
28
|
+
"remotion": "4.0.498",
|
|
29
|
+
"@remotion/canvas-capture": "4.0.498",
|
|
30
|
+
"@remotion/player": "4.0.498",
|
|
31
|
+
"@remotion/media-utils": "4.0.498",
|
|
32
|
+
"@remotion/renderer": "4.0.498",
|
|
33
|
+
"@remotion/web-renderer": "4.0.498",
|
|
34
|
+
"@remotion/studio-shared": "4.0.498",
|
|
35
|
+
"@remotion/timeline-utils": "4.0.498",
|
|
36
|
+
"@remotion/zod-types": "4.0.498",
|
|
37
37
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
38
38
|
"mediabunny": "1.50.8",
|
|
39
39
|
"memfs": "3.4.3",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"react": "19.2.3",
|
|
45
45
|
"react-dom": "19.2.3",
|
|
46
46
|
"@types/semver": "7.5.3",
|
|
47
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
47
|
+
"@remotion/eslint-config-internal": "4.0.498",
|
|
48
48
|
"eslint": "9.19.0",
|
|
49
49
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
50
50
|
},
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type WebRenderModalLicenseProps = {
|
|
3
|
-
readonly licenseKey: string | null;
|
|
4
|
-
readonly setLicenseKey: React.Dispatch<React.SetStateAction<string | null>>;
|
|
5
|
-
readonly initialPublicLicenseKey: string | null;
|
|
6
|
-
};
|
|
7
|
-
export declare const row: React.CSSProperties;
|
|
8
|
-
export declare const WebRenderModalLicense: React.FC<WebRenderModalLicenseProps>;
|
|
9
|
-
export {};
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebRenderModalLicense = exports.row = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const colors_1 = require("../../helpers/colors");
|
|
7
|
-
const Checkbox_1 = require("../Checkbox");
|
|
8
|
-
const layout_1 = require("../layout");
|
|
9
|
-
const RemInput_1 = require("../NewComposition/RemInput");
|
|
10
|
-
const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
|
|
11
|
-
const WebRenderModalLicenseKeyDetails_1 = require("./WebRenderModalLicenseKeyDetails");
|
|
12
|
-
exports.row = {
|
|
13
|
-
display: 'flex',
|
|
14
|
-
flexDirection: 'row',
|
|
15
|
-
paddingLeft: 16,
|
|
16
|
-
paddingRight: 16,
|
|
17
|
-
};
|
|
18
|
-
const tabContainer = {
|
|
19
|
-
flex: 1,
|
|
20
|
-
};
|
|
21
|
-
const descriptionStyle = {
|
|
22
|
-
color: colors_1.LIGHT_TEXT,
|
|
23
|
-
fontSize: 14,
|
|
24
|
-
fontFamily: 'sans-serif',
|
|
25
|
-
paddingLeft: 16,
|
|
26
|
-
paddingRight: 16,
|
|
27
|
-
paddingTop: 16,
|
|
28
|
-
paddingBottom: 8,
|
|
29
|
-
lineHeight: 1.5,
|
|
30
|
-
};
|
|
31
|
-
const paddedDescriptionStyle = {
|
|
32
|
-
color: colors_1.LIGHT_TEXT,
|
|
33
|
-
fontSize: 14,
|
|
34
|
-
fontFamily: 'sans-serif',
|
|
35
|
-
padding: 9,
|
|
36
|
-
border: '1px solid ' + colors_1.BLACK_ALPHA_60,
|
|
37
|
-
borderRadius: 8,
|
|
38
|
-
lineHeight: 1.5,
|
|
39
|
-
marginLeft: 16,
|
|
40
|
-
marginRight: 16,
|
|
41
|
-
};
|
|
42
|
-
const descriptionLink = {
|
|
43
|
-
color: colors_1.WHITE,
|
|
44
|
-
fontSize: 14,
|
|
45
|
-
};
|
|
46
|
-
const checkboxLabel = {
|
|
47
|
-
fontSize: 14,
|
|
48
|
-
lineHeight: '40px',
|
|
49
|
-
color: colors_1.LIGHT_TEXT,
|
|
50
|
-
flex: 1,
|
|
51
|
-
fontFamily: 'sans-serif',
|
|
52
|
-
cursor: 'pointer',
|
|
53
|
-
userSelect: 'none',
|
|
54
|
-
};
|
|
55
|
-
const inputStyle = {
|
|
56
|
-
minWidth: 250,
|
|
57
|
-
};
|
|
58
|
-
const justifyCenter = {
|
|
59
|
-
display: 'flex',
|
|
60
|
-
alignItems: 'center',
|
|
61
|
-
gap: 10,
|
|
62
|
-
flex: 1,
|
|
63
|
-
};
|
|
64
|
-
const codeStyle = {
|
|
65
|
-
fontSize: 14,
|
|
66
|
-
fontFamily: 'monospace',
|
|
67
|
-
color: colors_1.BLUE,
|
|
68
|
-
};
|
|
69
|
-
const codeLine = {
|
|
70
|
-
fontSize: 14,
|
|
71
|
-
fontFamily: 'monospace',
|
|
72
|
-
color: colors_1.LIGHT_TEXT,
|
|
73
|
-
backgroundColor: colors_1.INPUT_BACKGROUND,
|
|
74
|
-
padding: 6,
|
|
75
|
-
borderRadius: 3,
|
|
76
|
-
marginTop: 6,
|
|
77
|
-
overflowX: 'auto',
|
|
78
|
-
maxWidth: '100%',
|
|
79
|
-
};
|
|
80
|
-
const codeLineSmall = {
|
|
81
|
-
...codeLine,
|
|
82
|
-
fontSize: 11,
|
|
83
|
-
};
|
|
84
|
-
const LICENSE_KEY_LENGTH = 55;
|
|
85
|
-
const LICENSE_KEY_PREFIX = 'rm_pub_';
|
|
86
|
-
const validateLicenseKey = (key) => {
|
|
87
|
-
if (key.length === 0) {
|
|
88
|
-
return { valid: false, message: null, details: null };
|
|
89
|
-
}
|
|
90
|
-
if (!key.startsWith(LICENSE_KEY_PREFIX)) {
|
|
91
|
-
return {
|
|
92
|
-
valid: false,
|
|
93
|
-
message: `License key must start with "${LICENSE_KEY_PREFIX}"`,
|
|
94
|
-
details: null,
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
const afterPrefix = key.slice(LICENSE_KEY_PREFIX.length);
|
|
98
|
-
if (!/^[a-zA-Z0-9]*$/.test(afterPrefix)) {
|
|
99
|
-
return {
|
|
100
|
-
valid: false,
|
|
101
|
-
message: 'License key must contain only alphanumeric characters after the prefix',
|
|
102
|
-
details: null,
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
if (key.length !== LICENSE_KEY_LENGTH) {
|
|
106
|
-
return {
|
|
107
|
-
valid: false,
|
|
108
|
-
message: `License key must be ${LICENSE_KEY_LENGTH} characters long`,
|
|
109
|
-
details: null,
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
return { valid: true, message: null, details: null };
|
|
113
|
-
};
|
|
114
|
-
const WebRenderModalLicense = ({ licenseKey, setLicenseKey, initialPublicLicenseKey, }) => {
|
|
115
|
-
const [licenseValidation, setLicenseValidation] = (0, react_1.useState)({ valid: true, message: null, details: null });
|
|
116
|
-
const [isLoading, setIsLoading] = (0, react_1.useState)(false);
|
|
117
|
-
(0, react_1.useEffect)(() => {
|
|
118
|
-
if (licenseKey === null || licenseKey === 'free-license') {
|
|
119
|
-
return setLicenseValidation({
|
|
120
|
-
valid: true,
|
|
121
|
-
message: null,
|
|
122
|
-
details: null,
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
const validation = validateLicenseKey(licenseKey);
|
|
126
|
-
if (!validation.valid) {
|
|
127
|
-
return setLicenseValidation(validation);
|
|
128
|
-
}
|
|
129
|
-
setLicenseValidation({ valid: true, message: null, details: null });
|
|
130
|
-
setIsLoading(true);
|
|
131
|
-
(0, WebRenderModalLicenseKeyDetails_1.fetchLicenseKeyDetails)(licenseKey)
|
|
132
|
-
.then((details) => {
|
|
133
|
-
setIsLoading(false);
|
|
134
|
-
if (details.isValid) {
|
|
135
|
-
setLicenseValidation({ valid: true, message: null, details });
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
setLicenseValidation({
|
|
139
|
-
valid: false,
|
|
140
|
-
message: 'License key is invalid or has been reset',
|
|
141
|
-
details: null,
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
})
|
|
145
|
-
.catch(() => {
|
|
146
|
-
setIsLoading(false);
|
|
147
|
-
setLicenseValidation({
|
|
148
|
-
valid: false,
|
|
149
|
-
message: 'Failed to fetch license key details',
|
|
150
|
-
details: null,
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
|
-
}, [licenseKey]);
|
|
154
|
-
const onFreeLicenseChange = (0, react_1.useCallback)(() => {
|
|
155
|
-
setLicenseKey('free-license');
|
|
156
|
-
}, [setLicenseKey]);
|
|
157
|
-
const onCompanyLicenseChange = (0, react_1.useCallback)(() => {
|
|
158
|
-
setLicenseKey(initialPublicLicenseKey !== null && initialPublicLicenseKey !== void 0 ? initialPublicLicenseKey : '');
|
|
159
|
-
}, [initialPublicLicenseKey, setLicenseKey]);
|
|
160
|
-
const onLicenseKeyChange = (0, react_1.useCallback)((e) => {
|
|
161
|
-
setLicenseKey(e.target.value);
|
|
162
|
-
}, [setLicenseKey]);
|
|
163
|
-
return (jsx_runtime_1.jsxs("div", { style: tabContainer, children: [
|
|
164
|
-
jsx_runtime_1.jsxs("div", { style: descriptionStyle, children: ["Remotion is free if you are an individual or company with a headcount of 3 or less. See", ' ', jsx_runtime_1.jsx("a", { style: descriptionLink, href: "https://remotion.dev/license", children: "LICENSE.md" }),
|
|
165
|
-
"."] }), jsx_runtime_1.jsx("div", { style: exports.row, children: jsx_runtime_1.jsxs("div", { style: justifyCenter, children: [
|
|
166
|
-
jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: licenseKey === 'free-license', onChange: onFreeLicenseChange, name: "free-license", rounded: true }), jsx_runtime_1.jsxs("div", { style: checkboxLabel, onClick: onFreeLicenseChange, children: ["I am eligible for the Free License, ", "don't", " print a warning"] })
|
|
167
|
-
] }) }), licenseKey === 'free-license' ? (jsx_runtime_1.jsxs("div", { style: paddedDescriptionStyle, children: ["Enjoy Remotion! Add the following to", ' ', jsx_runtime_1.jsx("code", { style: codeStyle, children: "remotion.config.ts" }),
|
|
168
|
-
" to persist this setting:",
|
|
169
|
-
jsx_runtime_1.jsx("div", { style: codeLine, children: "Config.setPublicLicenseKey('free-license');" })
|
|
170
|
-
] })) : null, jsx_runtime_1.jsx("div", { style: exports.row, children: jsx_runtime_1.jsxs("div", { style: justifyCenter, children: [
|
|
171
|
-
jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: licenseKey !== 'free-license' && licenseKey !== null, onChange: onCompanyLicenseChange, name: "company-license", rounded: true }), jsx_runtime_1.jsx("div", { style: checkboxLabel, onClick: onCompanyLicenseChange, children: "I have a Company License" })
|
|
172
|
-
] }) }), licenseKey !== 'free-license' && licenseKey !== null ? (jsx_runtime_1.jsxs("div", { style: paddedDescriptionStyle, children: ["Add your public license key from", ' ', jsx_runtime_1.jsx("a", { href: "https://remotion.pro/dashboard", target: "_blank", style: descriptionLink, children: "remotion.pro" }), ' ', "below.",
|
|
173
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(RemInput_1.RemotionInput, { value: licenseKey, onChange: onLicenseKeyChange, placeholder: "remotion.pro public license key (starts with rm_pub_)", status: licenseValidation.valid || licenseKey.length === 0
|
|
174
|
-
? 'ok'
|
|
175
|
-
: 'error', rightAlign: false, style: inputStyle, autoFocus: true }), licenseValidation.message ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
176
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: licenseValidation.message, align: "flex-start", type: "error" })
|
|
177
|
-
] })) : null, licenseValidation.valid && licenseKey.length > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
178
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }),
|
|
179
|
-
"Add the following to", ' ', jsx_runtime_1.jsx("code", { style: codeStyle, children: "remotion.config.ts" }),
|
|
180
|
-
" to persist this setting:",
|
|
181
|
-
jsx_runtime_1.jsx("div", { style: codeLineSmall, children: "Config.setPublicLicenseKey('" + licenseKey + "');" })
|
|
182
|
-
] })) : null, isLoading && (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
183
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }),
|
|
184
|
-
"Loading license key details..."] })), licenseValidation.details && (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
185
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(WebRenderModalLicenseKeyDetails_1.WebRenderModalLicenseKeyDetails, { details: licenseValidation.details })
|
|
186
|
-
] }))] })) : null, licenseKey === null ? (jsx_runtime_1.jsxs("div", { style: descriptionStyle, children: ["If you are not eligible for the free license, you need to obtain a", ' ', jsx_runtime_1.jsx("a", { style: descriptionLink, target: "_blank", href: "https://remotion.pro/license", children: "Company License" }),
|
|
187
|
-
"."] })) : null] }));
|
|
188
|
-
};
|
|
189
|
-
exports.WebRenderModalLicense = WebRenderModalLicense;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type LicenseKeyDetails = {
|
|
3
|
-
readonly isValid: boolean;
|
|
4
|
-
readonly hasActiveSubscription: boolean;
|
|
5
|
-
readonly projectName: string;
|
|
6
|
-
readonly projectSlug: string;
|
|
7
|
-
};
|
|
8
|
-
type WebRenderModalLicenseKeyDetailsProps = {
|
|
9
|
-
readonly details: LicenseKeyDetails;
|
|
10
|
-
};
|
|
11
|
-
export declare const fetchLicenseKeyDetails: (licenseKey: string) => Promise<LicenseKeyDetails>;
|
|
12
|
-
export declare const WebRenderModalLicenseKeyDetails: React.FC<WebRenderModalLicenseKeyDetailsProps>;
|
|
13
|
-
export {};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebRenderModalLicenseKeyDetails = exports.fetchLicenseKeyDetails = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const colors_1 = require("../../helpers/colors");
|
|
6
|
-
const check_circle_filled_1 = require("../../icons/check-circle-filled");
|
|
7
|
-
const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
|
|
8
|
-
const textStyle = {
|
|
9
|
-
color: colors_1.LIGHT_TEXT,
|
|
10
|
-
fontSize: 14,
|
|
11
|
-
fontFamily: 'sans-serif',
|
|
12
|
-
lineHeight: 1.5,
|
|
13
|
-
display: 'flex',
|
|
14
|
-
alignItems: 'center',
|
|
15
|
-
};
|
|
16
|
-
const linkStyle = {
|
|
17
|
-
fontSize: 14,
|
|
18
|
-
fontFamily: 'sans-serif',
|
|
19
|
-
lineHeight: 1.5,
|
|
20
|
-
cursor: 'pointer',
|
|
21
|
-
};
|
|
22
|
-
const bulletStyle = {
|
|
23
|
-
display: 'flex',
|
|
24
|
-
alignItems: 'center',
|
|
25
|
-
gap: 6,
|
|
26
|
-
};
|
|
27
|
-
const icon = {
|
|
28
|
-
width: 14,
|
|
29
|
-
height: 14,
|
|
30
|
-
flexShrink: 0,
|
|
31
|
-
};
|
|
32
|
-
const PRO_HOST = 'https://remotion.pro';
|
|
33
|
-
const fetchLicenseKeyDetails = async (licenseKey) => {
|
|
34
|
-
const response = await fetch(`${PRO_HOST}/api/validate-license-key`, {
|
|
35
|
-
method: 'POST',
|
|
36
|
-
body: JSON.stringify({
|
|
37
|
-
licenseKey,
|
|
38
|
-
}),
|
|
39
|
-
headers: {
|
|
40
|
-
'Content-Type': 'application/json',
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
return response.json();
|
|
44
|
-
};
|
|
45
|
-
exports.fetchLicenseKeyDetails = fetchLicenseKeyDetails;
|
|
46
|
-
const WebRenderModalLicenseKeyDetails = ({ details }) => {
|
|
47
|
-
return (jsx_runtime_1.jsxs("div", { children: [
|
|
48
|
-
jsx_runtime_1.jsxs("div", { style: bulletStyle, children: [
|
|
49
|
-
jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { style: { ...icon, fill: colors_1.LIGHT_TEXT } }), jsx_runtime_1.jsxs("div", { style: textStyle, children: ["Belongs to\u00A0",
|
|
50
|
-
jsx_runtime_1.jsx("a", { href: `${PRO_HOST}/projects/${details.projectSlug}`, target: "_blank", style: linkStyle, children: details.projectName }),
|
|
51
|
-
"\u00A0-\u00A0",
|
|
52
|
-
jsx_runtime_1.jsx("a", { href: `${PRO_HOST}/projects/${details.projectSlug}/usage#client-renders-usage`, target: "_blank", style: linkStyle, children: "View usage" })
|
|
53
|
-
] })
|
|
54
|
-
] }), details.hasActiveSubscription ? (jsx_runtime_1.jsxs("div", { style: bulletStyle, children: [
|
|
55
|
-
jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { style: { ...icon, fill: colors_1.LIGHT_TEXT } }), jsx_runtime_1.jsx("div", { style: textStyle, children: "Active Company License" })
|
|
56
|
-
] })) : (jsx_runtime_1.jsxs("div", { style: bulletStyle, children: [
|
|
57
|
-
jsx_runtime_1.jsx(ValidationMessage_1.WarningTriangle, { type: "warning", style: { ...icon, fill: colors_1.WARNING_COLOR } }), jsx_runtime_1.jsx("div", { style: textStyle, children: "No active Company License" })
|
|
58
|
-
] }))] }));
|
|
59
|
-
};
|
|
60
|
-
exports.WebRenderModalLicenseKeyDetails = WebRenderModalLicenseKeyDetails;
|