@remotion/cli 3.1.11 → 3.2.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.
- package/dist/editor/components/Editor.js +3 -1
- package/dist/editor/components/InitialCompositionLoader.js +13 -0
- package/dist/editor/components/PlayPause.js +41 -23
- package/dist/editor/components/PreviewToolbar.js +2 -2
- package/dist/editor/components/Splitter/SplitterElement.js +1 -0
- package/dist/editor/components/TimeValue.js +9 -5
- package/dist/editor/components/Timeline/MaxTimelineTracks.d.ts +1 -0
- package/dist/editor/components/Timeline/MaxTimelineTracks.js +5 -3
- package/dist/editor/components/Timeline/Timeline.js +11 -4
- package/dist/editor/components/Timeline/TimelineDragHandler.js +120 -23
- package/dist/editor/components/Timeline/TimelineList.js +5 -4
- package/dist/editor/components/Timeline/TimelineListItem.d.ts +1 -0
- package/dist/editor/components/Timeline/TimelineListItem.js +8 -4
- package/dist/editor/components/Timeline/TimelinePlayCursorSyncer.d.ts +2 -0
- package/dist/editor/components/Timeline/TimelinePlayCursorSyncer.js +76 -0
- package/dist/editor/components/Timeline/TimelineScrollable.js +4 -2
- package/dist/editor/components/Timeline/TimelineSlider.d.ts +3 -0
- package/dist/editor/components/Timeline/TimelineSlider.js +35 -2
- package/dist/editor/components/Timeline/TimelineSliderHandle.js +1 -3
- package/dist/editor/components/Timeline/TimelineTimeIndicators.d.ts +5 -0
- package/dist/editor/components/Timeline/TimelineTimeIndicators.js +168 -0
- package/dist/editor/components/Timeline/TimelineTracks.js +14 -9
- package/dist/editor/components/Timeline/TimelineZoomControls.js +18 -2
- package/dist/editor/components/Timeline/imperative-state.d.ts +12 -0
- package/dist/editor/components/Timeline/imperative-state.js +39 -0
- package/dist/editor/components/Timeline/timeline-refs.d.ts +2 -0
- package/dist/editor/components/Timeline/timeline-refs.js +3 -1
- package/dist/editor/components/Timeline/timeline-scroll-logic.d.ts +40 -0
- package/dist/editor/components/Timeline/timeline-scroll-logic.js +206 -1
- package/dist/editor/components/ZoomPersistor.d.ts +4 -0
- package/dist/editor/components/ZoomPersistor.js +37 -0
- package/dist/editor/helpers/colors.d.ts +1 -0
- package/dist/editor/helpers/colors.js +2 -1
- package/dist/editor/helpers/get-left-of-timeline-slider.d.ts +1 -0
- package/dist/editor/helpers/get-left-of-timeline-slider.js +7 -4
- package/dist/editor/helpers/get-timeline-sequence-layout.js +29 -9
- package/dist/editor/icons/minus.d.ts +3 -0
- package/dist/editor/icons/minus.js +8 -0
- package/dist/editor/icons/plus.d.ts +3 -0
- package/dist/editor/icons/plus.js +8 -0
- package/dist/editor/state/timeline-zoom.d.ts +1 -1
- package/dist/editor/state/timeline-zoom.js +15 -1
- package/dist/handle-common-errors.js +5 -0
- package/dist/preview-server/live-events.js +4 -0
- package/dist/preview-server/routes.js +16 -2
- package/dist/preview-server/start-server.js +1 -1
- package/dist/upgrade.js +1 -0
- package/dist/versions.js +1 -0
- package/package.json +7 -7
- package/dist/bundle-on-cli.d.ts +0 -2
- package/dist/bundle-on-cli.js +0 -41
- package/dist/bundle.d.ts +0 -1
- package/dist/bundle.js +0 -31
- package/dist/chalk/symbols.d.ts +0 -111
- package/dist/chalk/symbols.js +0 -75
- package/dist/chalk/utilities.d.ts +0 -2
- package/dist/chalk/utilities.js +0 -37
- package/dist/editor/components/CompositionManager.d.ts +0 -4
- package/dist/editor/components/CompositionManager.js +0 -60
- package/dist/editor/components/LoadingIndicator.d.ts +0 -2
- package/dist/editor/components/LoadingIndicator.js +0 -35
- package/dist/prepare-entry-point.d.ts +0 -11
- package/dist/prepare-entry-point.js +0 -36
- package/dist/preview-server/fast-refresh/helpers.d.ts +0 -39
- package/dist/preview-server/fast-refresh/helpers.js +0 -145
- package/dist/preview-server/fast-refresh/index.d.ts +0 -30
- package/dist/preview-server/fast-refresh/index.js +0 -86
- package/dist/preview-server/fast-refresh/loader.d.ts +0 -35
- package/dist/preview-server/fast-refresh/loader.js +0 -81
- package/dist/preview-server/fast-refresh/runtime.d.ts +0 -35
- package/dist/preview-server/fast-refresh/runtime.js +0 -32
- package/dist/preview-server/static-preview.d.ts +0 -1
- package/dist/preview-server/static-preview.js +0 -40
- package/dist/preview-server/webpack-cache.d.ts +0 -12
- package/dist/preview-server/webpack-cache.js +0 -66
- package/dist/webpack-cache.d.ts +0 -12
- package/dist/webpack-cache.js +0 -66
package/dist/bundle.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bundleCommand = void 0;
|
|
4
|
-
const get_cli_options_1 = require("./get-cli-options");
|
|
5
|
-
const initialize_render_cli_1 = require("./initialize-render-cli");
|
|
6
|
-
const log_1 = require("./log");
|
|
7
|
-
const parse_command_line_1 = require("./parse-command-line");
|
|
8
|
-
const prepare_entry_point_1 = require("./prepare-entry-point");
|
|
9
|
-
const bundleCommand = async () => {
|
|
10
|
-
const file = parse_command_line_1.parsedCli._[1];
|
|
11
|
-
if (!file) {
|
|
12
|
-
log_1.Log.error('No entry point specified. Pass more arguments:');
|
|
13
|
-
log_1.Log.error(' npx remotion bundle [entry-point]');
|
|
14
|
-
log_1.Log.error('Documentation: https://www.remotion.dev/docs/render');
|
|
15
|
-
process.exit(1);
|
|
16
|
-
}
|
|
17
|
-
await (0, initialize_render_cli_1.initializeRenderCli)('bundle');
|
|
18
|
-
const { publicPath, bundleOutDir } = await (0, get_cli_options_1.getCliOptions)({
|
|
19
|
-
isLambda: false,
|
|
20
|
-
type: 'get-compositions-or-bundle',
|
|
21
|
-
});
|
|
22
|
-
const { urlOrBundle } = await (0, prepare_entry_point_1.prepareEntryPoint)({
|
|
23
|
-
file,
|
|
24
|
-
otherSteps: [],
|
|
25
|
-
outDir: bundleOutDir,
|
|
26
|
-
publicPath,
|
|
27
|
-
});
|
|
28
|
-
log_1.Log.info();
|
|
29
|
-
log_1.Log.info(urlOrBundle);
|
|
30
|
-
};
|
|
31
|
-
exports.bundleCommand = bundleCommand;
|
package/dist/chalk/symbols.d.ts
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
declare const isHyper: boolean;
|
|
2
|
-
declare const isWindows: boolean;
|
|
3
|
-
declare const isLinux: boolean;
|
|
4
|
-
declare const common: {
|
|
5
|
-
ballotDisabled: string;
|
|
6
|
-
ballotOff: string;
|
|
7
|
-
ballotOn: string;
|
|
8
|
-
bullet: string;
|
|
9
|
-
bulletWhite: string;
|
|
10
|
-
fullBlock: string;
|
|
11
|
-
heart: string;
|
|
12
|
-
identicalTo: string;
|
|
13
|
-
line: string;
|
|
14
|
-
mark: string;
|
|
15
|
-
middot: string;
|
|
16
|
-
minus: string;
|
|
17
|
-
multiplication: string;
|
|
18
|
-
obelus: string;
|
|
19
|
-
pencilDownRight: string;
|
|
20
|
-
pencilRight: string;
|
|
21
|
-
pencilUpRight: string;
|
|
22
|
-
percent: string;
|
|
23
|
-
pilcrow2: string;
|
|
24
|
-
pilcrow: string;
|
|
25
|
-
plusMinus: string;
|
|
26
|
-
question: string;
|
|
27
|
-
section: string;
|
|
28
|
-
starsOff: string;
|
|
29
|
-
starsOn: string;
|
|
30
|
-
upDownArrow: string;
|
|
31
|
-
};
|
|
32
|
-
declare const windows: {
|
|
33
|
-
check: string;
|
|
34
|
-
cross: string;
|
|
35
|
-
ellipsisLarge: string;
|
|
36
|
-
ellipsis: string;
|
|
37
|
-
info: string;
|
|
38
|
-
questionSmall: string;
|
|
39
|
-
pointer: string;
|
|
40
|
-
pointerSmall: string;
|
|
41
|
-
radioOff: string;
|
|
42
|
-
radioOn: string;
|
|
43
|
-
warning: string;
|
|
44
|
-
ballotDisabled: string;
|
|
45
|
-
ballotOff: string;
|
|
46
|
-
ballotOn: string;
|
|
47
|
-
bullet: string;
|
|
48
|
-
bulletWhite: string;
|
|
49
|
-
fullBlock: string;
|
|
50
|
-
heart: string;
|
|
51
|
-
identicalTo: string;
|
|
52
|
-
line: string;
|
|
53
|
-
mark: string;
|
|
54
|
-
middot: string;
|
|
55
|
-
minus: string;
|
|
56
|
-
multiplication: string;
|
|
57
|
-
obelus: string;
|
|
58
|
-
pencilDownRight: string;
|
|
59
|
-
pencilRight: string;
|
|
60
|
-
pencilUpRight: string;
|
|
61
|
-
percent: string;
|
|
62
|
-
pilcrow2: string;
|
|
63
|
-
pilcrow: string;
|
|
64
|
-
plusMinus: string;
|
|
65
|
-
question: string;
|
|
66
|
-
section: string;
|
|
67
|
-
starsOff: string;
|
|
68
|
-
starsOn: string;
|
|
69
|
-
upDownArrow: string;
|
|
70
|
-
};
|
|
71
|
-
declare const other: {
|
|
72
|
-
ballotCross: string;
|
|
73
|
-
check: string;
|
|
74
|
-
cross: string;
|
|
75
|
-
ellipsisLarge: string;
|
|
76
|
-
ellipsis: string;
|
|
77
|
-
info: string;
|
|
78
|
-
questionFull: string;
|
|
79
|
-
questionSmall: string;
|
|
80
|
-
pointer: string;
|
|
81
|
-
pointerSmall: string;
|
|
82
|
-
radioOff: string;
|
|
83
|
-
radioOn: string;
|
|
84
|
-
warning: string;
|
|
85
|
-
ballotDisabled: string;
|
|
86
|
-
ballotOff: string;
|
|
87
|
-
ballotOn: string;
|
|
88
|
-
bullet: string;
|
|
89
|
-
bulletWhite: string;
|
|
90
|
-
fullBlock: string;
|
|
91
|
-
heart: string;
|
|
92
|
-
identicalTo: string;
|
|
93
|
-
line: string;
|
|
94
|
-
mark: string;
|
|
95
|
-
middot: string;
|
|
96
|
-
minus: string;
|
|
97
|
-
multiplication: string;
|
|
98
|
-
obelus: string;
|
|
99
|
-
pencilDownRight: string;
|
|
100
|
-
pencilRight: string;
|
|
101
|
-
pencilUpRight: string;
|
|
102
|
-
percent: string;
|
|
103
|
-
pilcrow2: string;
|
|
104
|
-
pilcrow: string;
|
|
105
|
-
plusMinus: string;
|
|
106
|
-
question: string;
|
|
107
|
-
section: string;
|
|
108
|
-
starsOff: string;
|
|
109
|
-
starsOn: string;
|
|
110
|
-
upDownArrow: string;
|
|
111
|
-
};
|
package/dist/chalk/symbols.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const isHyper = typeof process !== 'undefined' && process.env.TERM_PROGRAM === 'Hyper';
|
|
3
|
-
const isWindows = typeof process !== 'undefined' && process.platform === 'win32';
|
|
4
|
-
const isLinux = typeof process !== 'undefined' && process.platform === 'linux';
|
|
5
|
-
const common = {
|
|
6
|
-
ballotDisabled: '☒',
|
|
7
|
-
ballotOff: '☐',
|
|
8
|
-
ballotOn: '☑',
|
|
9
|
-
bullet: '•',
|
|
10
|
-
bulletWhite: '◦',
|
|
11
|
-
fullBlock: '█',
|
|
12
|
-
heart: '❤',
|
|
13
|
-
identicalTo: '≡',
|
|
14
|
-
line: '─',
|
|
15
|
-
mark: '※',
|
|
16
|
-
middot: '·',
|
|
17
|
-
minus: '-',
|
|
18
|
-
multiplication: '×',
|
|
19
|
-
obelus: '÷',
|
|
20
|
-
pencilDownRight: '✎',
|
|
21
|
-
pencilRight: '✏',
|
|
22
|
-
pencilUpRight: '✐',
|
|
23
|
-
percent: '%',
|
|
24
|
-
pilcrow2: '❡',
|
|
25
|
-
pilcrow: '¶',
|
|
26
|
-
plusMinus: '±',
|
|
27
|
-
question: '?',
|
|
28
|
-
section: '§',
|
|
29
|
-
starsOff: '☆',
|
|
30
|
-
starsOn: '★',
|
|
31
|
-
upDownArrow: '↕',
|
|
32
|
-
};
|
|
33
|
-
const windows = {
|
|
34
|
-
...common,
|
|
35
|
-
check: '√',
|
|
36
|
-
cross: '×',
|
|
37
|
-
ellipsisLarge: '...',
|
|
38
|
-
ellipsis: '...',
|
|
39
|
-
info: 'i',
|
|
40
|
-
questionSmall: '?',
|
|
41
|
-
pointer: '>',
|
|
42
|
-
pointerSmall: '»',
|
|
43
|
-
radioOff: '( )',
|
|
44
|
-
radioOn: '(*)',
|
|
45
|
-
warning: '‼',
|
|
46
|
-
};
|
|
47
|
-
const other = {
|
|
48
|
-
...common,
|
|
49
|
-
ballotCross: '✘',
|
|
50
|
-
check: '✔',
|
|
51
|
-
cross: '✖',
|
|
52
|
-
ellipsisLarge: '⋯',
|
|
53
|
-
ellipsis: '…',
|
|
54
|
-
info: 'ℹ',
|
|
55
|
-
questionFull: '?',
|
|
56
|
-
questionSmall: '﹖',
|
|
57
|
-
pointer: isLinux ? '▸' : '❯',
|
|
58
|
-
pointerSmall: isLinux ? '‣' : '›',
|
|
59
|
-
radioOff: '◯',
|
|
60
|
-
radioOn: '◉',
|
|
61
|
-
warning: '⚠',
|
|
62
|
-
};
|
|
63
|
-
module.exports = isWindows && !isHyper ? windows : other;
|
|
64
|
-
Reflect.defineProperty(module.exports, 'common', {
|
|
65
|
-
enumerable: false,
|
|
66
|
-
value: common,
|
|
67
|
-
});
|
|
68
|
-
Reflect.defineProperty(module.exports, 'windows', {
|
|
69
|
-
enumerable: false,
|
|
70
|
-
value: windows,
|
|
71
|
-
});
|
|
72
|
-
Reflect.defineProperty(module.exports, 'other', {
|
|
73
|
-
enumerable: false,
|
|
74
|
-
value: other,
|
|
75
|
-
});
|
package/dist/chalk/utilities.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stringEncaseCRLFWithFirstIndex = exports.stringReplaceAll = void 0;
|
|
4
|
-
function stringReplaceAll(string, substring, replacer) {
|
|
5
|
-
let index = string.indexOf(substring);
|
|
6
|
-
if (index === -1) {
|
|
7
|
-
return string;
|
|
8
|
-
}
|
|
9
|
-
const substringLength = substring.length;
|
|
10
|
-
let endIndex = 0;
|
|
11
|
-
let returnValue = '';
|
|
12
|
-
do {
|
|
13
|
-
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
14
|
-
endIndex = index + substringLength;
|
|
15
|
-
index = string.indexOf(substring, endIndex);
|
|
16
|
-
} while (index !== -1);
|
|
17
|
-
returnValue += string.slice(endIndex);
|
|
18
|
-
return returnValue;
|
|
19
|
-
}
|
|
20
|
-
exports.stringReplaceAll = stringReplaceAll;
|
|
21
|
-
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
22
|
-
let endIndex = 0;
|
|
23
|
-
let returnValue = '';
|
|
24
|
-
do {
|
|
25
|
-
const gotCR = string[index - 1] === '\r';
|
|
26
|
-
returnValue +=
|
|
27
|
-
string.slice(endIndex, gotCR ? index - 1 : index) +
|
|
28
|
-
prefix +
|
|
29
|
-
(gotCR ? '\r\n' : '\n') +
|
|
30
|
-
postfix;
|
|
31
|
-
endIndex = index + 1;
|
|
32
|
-
index = string.indexOf('\n', endIndex);
|
|
33
|
-
} while (index !== -1);
|
|
34
|
-
returnValue += string.slice(endIndex);
|
|
35
|
-
return returnValue;
|
|
36
|
-
}
|
|
37
|
-
exports.stringEncaseCRLFWithFirstIndex = stringEncaseCRLFWithFirstIndex;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InitialCompositionLoader = exports.useSelectComposition = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const remotion_1 = require("remotion");
|
|
6
|
-
const folders_1 = require("../state/folders");
|
|
7
|
-
const marks_1 = require("../state/marks");
|
|
8
|
-
const CompositionSelector_1 = require("./CompositionSelector");
|
|
9
|
-
const FramePersistor_1 = require("./FramePersistor");
|
|
10
|
-
const TimelineInOutToggle_1 = require("./TimelineInOutToggle");
|
|
11
|
-
const useSelectComposition = () => {
|
|
12
|
-
const setCurrentFrame = remotion_1.Internals.Timeline.useTimelineSetFrame();
|
|
13
|
-
const { setCurrentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
14
|
-
const { setFoldersExpanded } = (0, react_1.useContext)(folders_1.FolderContext);
|
|
15
|
-
return (c) => {
|
|
16
|
-
var _a;
|
|
17
|
-
(_a = TimelineInOutToggle_1.inOutHandles.current) === null || _a === void 0 ? void 0 : _a.setMarks((0, marks_1.loadMarks)(c.id, c.durationInFrames));
|
|
18
|
-
window.history.pushState({}, 'Preview', `/${c.id}`);
|
|
19
|
-
const frame = (0, FramePersistor_1.getFrameForComposition)(c.id);
|
|
20
|
-
const frameInBounds = Math.min(c.durationInFrames - 1, frame);
|
|
21
|
-
setCurrentFrame(frameInBounds);
|
|
22
|
-
setCurrentComposition(c.id);
|
|
23
|
-
const { folderName, parentFolderName } = c;
|
|
24
|
-
if (folderName !== null) {
|
|
25
|
-
setFoldersExpanded((ex) => {
|
|
26
|
-
const keysToExpand = (0, CompositionSelector_1.getKeysToExpand)(folderName, parentFolderName);
|
|
27
|
-
const newState = {
|
|
28
|
-
...ex,
|
|
29
|
-
};
|
|
30
|
-
for (const key of keysToExpand) {
|
|
31
|
-
newState[key] = true;
|
|
32
|
-
}
|
|
33
|
-
return newState;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
exports.useSelectComposition = useSelectComposition;
|
|
39
|
-
const InitialCompositionLoader = () => {
|
|
40
|
-
const { compositions, currentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
41
|
-
const selectComposition = (0, exports.useSelectComposition)();
|
|
42
|
-
(0, react_1.useEffect)(() => {
|
|
43
|
-
if (currentComposition) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const compositionFromUrl = (0, FramePersistor_1.getCurrentCompositionFromUrl)();
|
|
47
|
-
if (compositionFromUrl) {
|
|
48
|
-
const exists = compositions.find((c) => c.id === compositionFromUrl);
|
|
49
|
-
if (exists) {
|
|
50
|
-
selectComposition(exists);
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (compositions.length > 0) {
|
|
55
|
-
selectComposition(compositions[0]);
|
|
56
|
-
}
|
|
57
|
-
}, [compositions, currentComposition, selectComposition]);
|
|
58
|
-
return null;
|
|
59
|
-
};
|
|
60
|
-
exports.InitialCompositionLoader = InitialCompositionLoader;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Loading = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const remotion_1 = require("remotion");
|
|
6
|
-
const rotate = {
|
|
7
|
-
transform: `rotate(90deg)`,
|
|
8
|
-
};
|
|
9
|
-
const ICON_SIZE = 40;
|
|
10
|
-
const label = {
|
|
11
|
-
color: '#555',
|
|
12
|
-
fontSize: 14,
|
|
13
|
-
fontFamily: 'sans-serif',
|
|
14
|
-
};
|
|
15
|
-
const container = {
|
|
16
|
-
justifyContent: 'center',
|
|
17
|
-
alignItems: 'center',
|
|
18
|
-
};
|
|
19
|
-
const Loading = () => {
|
|
20
|
-
return ((0, jsx_runtime_1.jsxs)(remotion_1.AbsoluteFill, { style: container, id: "remotion-comp-loading", children: [(0, jsx_runtime_1.jsx)("style", { type: "text/css", children: `
|
|
21
|
-
@keyframes anim {
|
|
22
|
-
from {
|
|
23
|
-
opacity: 0
|
|
24
|
-
}
|
|
25
|
-
to {
|
|
26
|
-
opacity: 1
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
#remotion-comp-loading {
|
|
30
|
-
animation: anim 2s;
|
|
31
|
-
animation-fill-mode: forwards;
|
|
32
|
-
}
|
|
33
|
-
` }), (0, jsx_runtime_1.jsx)("svg", { width: ICON_SIZE, height: ICON_SIZE, viewBox: "-100 -100 400 400", style: rotate, children: (0, jsx_runtime_1.jsx)("path", { fill: "#555", stroke: "#555", strokeWidth: "100", strokeLinejoin: "round", d: "M 2 172 a 196 100 0 0 0 195 5 A 196 240 0 0 0 100 2.259 A 196 240 0 0 0 2 172 z" }) }), (0, jsx_runtime_1.jsx)("p", { style: label, children: "Loading..." })] }));
|
|
34
|
-
};
|
|
35
|
-
exports.Loading = Loading;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { RenderStep } from './step';
|
|
2
|
-
export declare const prepareEntryPoint: ({ file, otherSteps, publicPath, outDir, }: {
|
|
3
|
-
file: string;
|
|
4
|
-
otherSteps: RenderStep[];
|
|
5
|
-
outDir: string | null;
|
|
6
|
-
publicPath: string | null;
|
|
7
|
-
}) => Promise<{
|
|
8
|
-
urlOrBundle: string;
|
|
9
|
-
steps: RenderStep[];
|
|
10
|
-
shouldDelete: boolean;
|
|
11
|
-
}>;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.prepareEntryPoint = void 0;
|
|
7
|
-
const renderer_1 = require("@remotion/renderer");
|
|
8
|
-
const promises_1 = require("fs/promises");
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const process_1 = require("process");
|
|
11
|
-
const log_1 = require("./log");
|
|
12
|
-
const setup_cache_1 = require("./setup-cache");
|
|
13
|
-
const prepareEntryPoint = async ({ file, otherSteps, publicPath, outDir, }) => {
|
|
14
|
-
if (renderer_1.RenderInternals.isServeUrl(file)) {
|
|
15
|
-
return { urlOrBundle: file, steps: otherSteps, shouldDelete: false };
|
|
16
|
-
}
|
|
17
|
-
const joined = path_1.default.resolve(process.cwd(), file);
|
|
18
|
-
try {
|
|
19
|
-
const stats = await (0, promises_1.stat)(joined);
|
|
20
|
-
if (stats.isDirectory()) {
|
|
21
|
-
return { urlOrBundle: joined, steps: otherSteps, shouldDelete: false };
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
catch (err) {
|
|
25
|
-
log_1.Log.error(`No file or directory exists at ${joined}.`);
|
|
26
|
-
(0, process_1.exit)(1);
|
|
27
|
-
}
|
|
28
|
-
const urlOrBundle = await (0, setup_cache_1.bundleOnCli)({
|
|
29
|
-
fullPath: joined,
|
|
30
|
-
steps: ['bundling', ...otherSteps],
|
|
31
|
-
outDir,
|
|
32
|
-
publicPath,
|
|
33
|
-
});
|
|
34
|
-
return { urlOrBundle, steps: ['bundling', ...otherSteps], shouldDelete: true };
|
|
35
|
-
};
|
|
36
|
-
exports.prepareEntryPoint = prepareEntryPoint;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* MIT License
|
|
6
|
-
*
|
|
7
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
-
*
|
|
9
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
* in the Software without restriction, including without limitation the rights
|
|
12
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
* furnished to do so, subject to the following conditions:
|
|
15
|
-
*
|
|
16
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
17
|
-
* copies or substantial portions of the Software.
|
|
18
|
-
*
|
|
19
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
-
* SOFTWARE.
|
|
26
|
-
*/
|
|
27
|
-
declare function registerExportsForReactRefresh(moduleExports: unknown, moduleID: unknown): void;
|
|
28
|
-
declare function isReactRefreshBoundary(moduleExports: unknown): boolean;
|
|
29
|
-
declare function shouldInvalidateReactRefreshBoundary(prevExports: unknown, nextExports: unknown): boolean;
|
|
30
|
-
declare function getRefreshBoundarySignature(moduleExports: unknown): any[];
|
|
31
|
-
declare function scheduleUpdate(): void;
|
|
32
|
-
declare const _default: {
|
|
33
|
-
registerExportsForReactRefresh: typeof registerExportsForReactRefresh;
|
|
34
|
-
isReactRefreshBoundary: typeof isReactRefreshBoundary;
|
|
35
|
-
shouldInvalidateReactRefreshBoundary: typeof shouldInvalidateReactRefreshBoundary;
|
|
36
|
-
getRefreshBoundarySignature: typeof getRefreshBoundarySignature;
|
|
37
|
-
scheduleUpdate: typeof scheduleUpdate;
|
|
38
|
-
};
|
|
39
|
-
export default _default;
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* MIT License
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
|
-
*
|
|
10
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
* in the Software without restriction, including without limitation the rights
|
|
13
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
* furnished to do so, subject to the following conditions:
|
|
16
|
-
*
|
|
17
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
* copies or substantial portions of the Software.
|
|
19
|
-
*
|
|
20
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
-
* SOFTWARE.
|
|
27
|
-
*/
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
// This file is copied from the Metro JavaScript bundler, with minor tweaks for
|
|
30
|
-
// webpack compatibility.
|
|
31
|
-
//
|
|
32
|
-
// https://github.com/facebook/metro/blob/d6b9685c730d0d63577db40f41369157f28dfa3a/packages/metro/src/lib/polyfills/require.js
|
|
33
|
-
const RefreshRuntime = require('react-refresh/runtime');
|
|
34
|
-
function isSafeExport(key) {
|
|
35
|
-
return (key === '__esModule' ||
|
|
36
|
-
key === '__N_SSG' ||
|
|
37
|
-
key === '__N_SSP' ||
|
|
38
|
-
key === 'config');
|
|
39
|
-
}
|
|
40
|
-
function registerExportsForReactRefresh(moduleExports, moduleID) {
|
|
41
|
-
RefreshRuntime.register(moduleExports, moduleID + ' %exports%');
|
|
42
|
-
if (moduleExports === null ||
|
|
43
|
-
moduleExports === undefined ||
|
|
44
|
-
typeof moduleExports !== 'object') {
|
|
45
|
-
// Exit if we can't iterate over exports.
|
|
46
|
-
// (This is important for legacy environments.)
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
for (const key in moduleExports) {
|
|
50
|
-
if (isSafeExport(key)) {
|
|
51
|
-
continue;
|
|
52
|
-
}
|
|
53
|
-
// @ts-expect-error
|
|
54
|
-
const exportValue = moduleExports[key];
|
|
55
|
-
const typeID = moduleID + ' %exports% ' + key;
|
|
56
|
-
RefreshRuntime.register(exportValue, typeID);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function isReactRefreshBoundary(moduleExports) {
|
|
60
|
-
if (RefreshRuntime.isLikelyComponentType(moduleExports)) {
|
|
61
|
-
return true;
|
|
62
|
-
}
|
|
63
|
-
if (moduleExports === null ||
|
|
64
|
-
moduleExports === undefined ||
|
|
65
|
-
typeof moduleExports !== 'object') {
|
|
66
|
-
// Exit if we can't iterate over exports.
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
let hasExports = false;
|
|
70
|
-
let areAllExportsComponents = true;
|
|
71
|
-
for (const key in moduleExports) {
|
|
72
|
-
hasExports = true;
|
|
73
|
-
if (isSafeExport(key)) {
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
// @ts-expect-error
|
|
77
|
-
const exportValue = moduleExports[key];
|
|
78
|
-
if (!RefreshRuntime.isLikelyComponentType(exportValue)) {
|
|
79
|
-
areAllExportsComponents = false;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return hasExports && areAllExportsComponents;
|
|
83
|
-
}
|
|
84
|
-
function shouldInvalidateReactRefreshBoundary(prevExports, nextExports) {
|
|
85
|
-
const prevSignature = getRefreshBoundarySignature(prevExports);
|
|
86
|
-
const nextSignature = getRefreshBoundarySignature(nextExports);
|
|
87
|
-
if (prevSignature.length !== nextSignature.length) {
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
for (let i = 0; i < nextSignature.length; i++) {
|
|
91
|
-
if (prevSignature[i] !== nextSignature[i]) {
|
|
92
|
-
return true;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
function getRefreshBoundarySignature(moduleExports) {
|
|
98
|
-
const signature = [];
|
|
99
|
-
signature.push(RefreshRuntime.getFamilyByType(moduleExports));
|
|
100
|
-
if (moduleExports === null ||
|
|
101
|
-
moduleExports === undefined ||
|
|
102
|
-
typeof moduleExports !== 'object') {
|
|
103
|
-
// Exit if we can't iterate over exports.
|
|
104
|
-
// (This is important for legacy environments.)
|
|
105
|
-
return signature;
|
|
106
|
-
}
|
|
107
|
-
for (const key in moduleExports) {
|
|
108
|
-
if (isSafeExport(key)) {
|
|
109
|
-
continue;
|
|
110
|
-
}
|
|
111
|
-
// @ts-expect-error
|
|
112
|
-
const exportValue = moduleExports[key];
|
|
113
|
-
signature.push(key);
|
|
114
|
-
signature.push(RefreshRuntime.getFamilyByType(exportValue));
|
|
115
|
-
}
|
|
116
|
-
return signature;
|
|
117
|
-
}
|
|
118
|
-
function scheduleUpdate() {
|
|
119
|
-
var _a, _b;
|
|
120
|
-
const execute = () => {
|
|
121
|
-
try {
|
|
122
|
-
RefreshRuntime.performReactRefresh();
|
|
123
|
-
}
|
|
124
|
-
catch (err) {
|
|
125
|
-
console.warn('Warning: Failed to re-render. We will retry on the next Fast Refresh event.\n' +
|
|
126
|
-
err);
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
// Only trigger refresh if the webpack HMR state is idle
|
|
130
|
-
if (((_a = module.hot) === null || _a === void 0 ? void 0 : _a.status()) === 'idle') {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
(_b = module.hot) === null || _b === void 0 ? void 0 : _b.addStatusHandler((status) => {
|
|
134
|
-
if (status === 'idle') {
|
|
135
|
-
execute();
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
exports.default = {
|
|
140
|
-
registerExportsForReactRefresh,
|
|
141
|
-
isReactRefreshBoundary,
|
|
142
|
-
shouldInvalidateReactRefreshBoundary,
|
|
143
|
-
getRefreshBoundarySignature,
|
|
144
|
-
scheduleUpdate,
|
|
145
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* The MIT License (MIT)
|
|
6
|
-
*
|
|
7
|
-
* Copyright (c) 2020 Vercel, Inc.
|
|
8
|
-
*
|
|
9
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
* in the Software without restriction, including without limitation the rights
|
|
12
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
* furnished to do so, subject to the following conditions:
|
|
15
|
-
*
|
|
16
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
17
|
-
* copies or substantial portions of the Software.
|
|
18
|
-
*
|
|
19
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
-
* SOFTWARE.
|
|
26
|
-
*/
|
|
27
|
-
import webpack from 'webpack';
|
|
28
|
-
export declare class ReactFreshWebpackPlugin {
|
|
29
|
-
apply(compiler: webpack.Compiler): void;
|
|
30
|
-
}
|