@remotion/cli 4.0.0-alpha.185 → 4.0.0-alpha.217
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/ansi/ansi-split.d.ts +1 -0
- package/dist/ansi/ansi-split.js +16 -3
- package/dist/benchmark.js +3 -0
- package/dist/color-math.d.ts +2 -1
- package/dist/color-math.js +2 -3
- package/dist/composition-prompts.d.ts +3 -4
- package/dist/composition-prompts.js +0 -1
- package/dist/compositions.js +3 -0
- package/dist/config/browser.d.ts +1 -3
- package/dist/config/browser.js +2 -12
- package/dist/config/index.d.ts +11 -2
- package/dist/config/index.js +6 -1
- package/dist/config/scale.d.ts +2 -1
- package/dist/config/user-agent.d.ts +4 -0
- package/dist/config/user-agent.js +12 -0
- package/dist/download-progress.js +7 -2
- package/dist/editor/components/EditorContexts.js +2 -1
- package/dist/editor/components/Menu/MenuSubItem.d.ts +0 -1
- package/dist/editor/components/Menu/MenuSubItem.js +1 -2
- package/dist/editor/components/ModalContainer.d.ts +2 -0
- package/dist/editor/components/ModalContainer.js +12 -3
- package/dist/editor/components/Modals.js +1 -1
- package/dist/editor/components/NewComposition/InputDragger.d.ts +1 -0
- package/dist/editor/components/NewComposition/InputDragger.js +2 -2
- package/dist/editor/components/NewComposition/NewCompDuration.js +1 -1
- package/dist/editor/components/NewComposition/NewComposition.js +8 -5
- package/dist/editor/components/NewComposition/RemInput.d.ts +2 -1
- package/dist/editor/components/NewComposition/RemInput.js +3 -2
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +0 -1
- package/dist/editor/components/NewComposition/RemInputTypeColor.js +3 -3
- package/dist/editor/components/NewComposition/ValidationMessage.js +2 -2
- package/dist/editor/components/Notifications/ServerDisconnected.d.ts +0 -4
- package/dist/editor/components/Notifications/ServerDisconnected.js +1 -2
- package/dist/editor/components/PlaybackRateSelector.d.ts +0 -2
- package/dist/editor/components/PlaybackRateSelector.js +5 -6
- package/dist/editor/components/Preview.d.ts +0 -1
- package/dist/editor/components/Preview.js +4 -4
- package/dist/editor/components/PreviewToolbar.js +1 -1
- package/dist/editor/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/editor/components/QuickSwitcher/algolia-search.d.ts +0 -27
- package/dist/editor/components/QuickSwitcher/algolia-search.js +2 -3
- package/dist/editor/components/RenderButton.js +9 -2
- package/dist/editor/components/RenderModal/CrfSetting.js +1 -1
- package/dist/editor/components/RenderModal/EnvInput.js +1 -1
- package/dist/editor/components/RenderModal/FrameRangeSetting.js +1 -1
- package/dist/editor/components/RenderModal/NumberOfLoopsSetting.js +1 -1
- package/dist/editor/components/RenderModal/NumberSetting.js +1 -1
- package/dist/editor/components/RenderModal/RenderModal.d.ts +1 -0
- package/dist/editor/components/RenderModal/RenderModal.js +20 -11
- package/dist/editor/components/RenderModal/RenderModalAudio.js +1 -1
- package/dist/editor/components/RenderModal/RenderModalBasic.js +1 -1
- package/dist/editor/components/RenderModal/RenderModalData.js +116 -13
- package/dist/editor/components/RenderModal/RenderModalInput.js +1 -1
- package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.d.ts +1 -2
- package/dist/editor/components/RenderModal/RenderModalPicture.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +9 -42
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +11 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +55 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +10 -5
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +17 -9
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.js +7 -3
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +7 -3
- package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.js +10 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +6 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.js +10 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +11 -4
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +6 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +30 -18
- package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.js +12 -8
- package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.d.ts +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.js +62 -57
- package/dist/editor/components/RenderModal/WarningIndicatorButton.d.ts +6 -0
- package/dist/editor/components/RenderModal/WarningIndicatorButton.js +49 -0
- package/dist/editor/components/RenderModal/get-render-modal-warnings.d.ts +11 -0
- package/dist/editor/components/RenderModal/get-render-modal-warnings.js +26 -0
- package/dist/editor/components/RenderModal/layout.js +0 -1
- package/dist/editor/components/RenderModal/out-name-checker.d.ts +0 -1
- package/dist/editor/components/RenderModal/out-name-checker.js +3 -3
- package/dist/editor/components/RenderQueue/actions.d.ts +0 -2
- package/dist/editor/components/RenderQueue/actions.js +10 -11
- package/dist/editor/components/RenderQueue/index.js +25 -1
- package/dist/editor/components/RenderToolbarIcon.js +25 -10
- package/dist/editor/components/SegmentedControl.d.ts +0 -5
- package/dist/editor/components/SegmentedControl.js +2 -3
- package/dist/editor/components/SizeSelector.d.ts +0 -1
- package/dist/editor/components/SizeSelector.js +3 -3
- package/dist/editor/components/Splitter/SplitterElement.js +1 -0
- package/dist/editor/components/Splitter/SplitterHandle.d.ts +0 -1
- package/dist/editor/components/Splitter/SplitterHandle.js +6 -6
- package/dist/editor/components/Tabs/index.d.ts +0 -1
- package/dist/editor/components/Tabs/index.js +3 -3
- package/dist/editor/components/Tabs/vertical.d.ts +0 -5
- package/dist/editor/components/Tabs/vertical.js +3 -17
- package/dist/editor/components/TimeValue.js +3 -4
- package/dist/editor/components/Timeline/TimelineListItem.js +9 -1
- package/dist/editor/components/Timeline/imperative-state.d.ts +0 -4
- package/dist/editor/components/Timeline/imperative-state.js +13 -13
- package/dist/editor/components/Timeline/timeline-scroll-logic.d.ts +0 -1
- package/dist/editor/components/Timeline/timeline-scroll-logic.js +5 -6
- package/dist/editor/components/ZoomPersistor.d.ts +0 -1
- package/dist/editor/components/ZoomPersistor.js +2 -3
- package/dist/editor/components/get-zod-if-possible.d.ts +10 -0
- package/dist/editor/components/get-zod-if-possible.js +79 -0
- package/dist/editor/helpers/calculate-timeline.d.ts +0 -4
- package/dist/editor/helpers/colors.d.ts +0 -1
- package/dist/editor/helpers/colors.js +3 -3
- package/dist/editor/helpers/create-folder-tree.d.ts +0 -1
- package/dist/editor/helpers/create-folder-tree.js +3 -4
- package/dist/editor/helpers/get-timeline-sequence-sort-key.d.ts +2 -1
- package/dist/editor/icons/caret.d.ts +4 -2
- package/dist/editor/icons/caret.js +17 -3
- package/dist/editor/state/keybindings.d.ts +2 -1
- package/dist/editor/state/modals.d.ts +1 -0
- package/dist/editor/state/preview-size.d.ts +0 -1
- package/dist/editor/state/preview-size.js +3 -4
- package/dist/editor/state/sidebar.d.ts +1 -1
- package/dist/editor/state/timeline-ref.d.ts +2 -1
- package/dist/editor/state/z-index.d.ts +0 -5
- package/dist/editor/state/z-index.js +8 -5
- package/dist/get-cli-options.js +1 -0
- package/dist/get-config-file-name.d.ts +0 -2
- package/dist/get-config-file-name.js +7 -7
- package/dist/index.d.ts +52 -1
- package/dist/list-of-remotion-packages.js +1 -0
- package/dist/parse-command-line.d.ts +3 -1
- package/dist/parse-command-line.js +3 -0
- package/dist/preview-server/api-types.d.ts +0 -4
- package/dist/preview-server/dev-middleware/middleware.d.ts +0 -1
- package/dist/preview-server/dev-middleware/middleware.js +1 -2
- package/dist/preview-server/error-overlay/remotion-overlay/Button.d.ts +8 -5
- package/dist/preview-server/error-overlay/remotion-overlay/Button.js +5 -4
- package/dist/preview-server/hot-middleware/client.js +2 -2
- package/dist/preview-server/public-folder.d.ts +0 -5
- package/dist/preview-server/public-folder.js +3 -4
- package/dist/preview-server/render-queue/job.d.ts +1 -1
- package/dist/preview-server/render-queue/make-retry-payload.js +2 -0
- package/dist/preview-server/render-queue/queue.d.ts +1 -13
- package/dist/preview-server/render-queue/queue.js +13 -9
- package/dist/progress-bar.d.ts +1 -12
- package/dist/progress-bar.js +4 -15
- package/dist/render-flows/render.js +3 -0
- package/dist/render-flows/still.js +6 -0
- package/dist/select-composition.d.ts +2 -1
- package/dist/setup-cache.d.ts +2 -14
- package/dist/setup-cache.js +6 -5
- package/package.json +10 -8
- package/dist/editor/components/CollapsedSidebarExpander.d.ts +0 -5
- package/dist/editor/components/CollapsedSidebarExpander.js +0 -40
- package/dist/editor/components/SidebarContent.d.ts +0 -5
- package/dist/editor/components/SidebarContent.js +0 -53
- package/dist/editor/icons/save.d.ts +0 -2
- package/dist/editor/icons/save.js +0 -8
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type ZodType = Awaited<typeof import('zod')>['z'];
|
|
3
|
+
export declare type ZodColorType = Awaited<typeof import('@remotion/z-color')>;
|
|
4
|
+
export declare const getZodIfPossible: () => Promise<ZodType | null>;
|
|
5
|
+
export declare const getZColorIfPossible: () => Promise<ZodColorType | null>;
|
|
6
|
+
export declare const useZodIfPossible: () => typeof import("zod/lib/external") | null;
|
|
7
|
+
export declare const useZodColorIfPossible: () => typeof import("@remotion/z-color") | null;
|
|
8
|
+
export declare const ZodProvider: React.FC<{
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.ZodProvider = exports.useZodColorIfPossible = exports.useZodIfPossible = exports.getZColorIfPossible = exports.getZodIfPossible = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const react_1 = require("react");
|
|
29
|
+
const getZodIfPossible = async () => {
|
|
30
|
+
try {
|
|
31
|
+
const { z } = await Promise.resolve().then(() => __importStar(require('zod')));
|
|
32
|
+
return z;
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.getZodIfPossible = getZodIfPossible;
|
|
39
|
+
const getZColorIfPossible = async () => {
|
|
40
|
+
try {
|
|
41
|
+
const mod = await Promise.resolve().then(() => __importStar(require('@remotion/z-color')));
|
|
42
|
+
return mod;
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
exports.getZColorIfPossible = getZColorIfPossible;
|
|
49
|
+
const useZodIfPossible = () => {
|
|
50
|
+
var _a;
|
|
51
|
+
const context = (0, react_1.useContext)(ZodContext);
|
|
52
|
+
return (_a = context === null || context === void 0 ? void 0 : context.zod) !== null && _a !== void 0 ? _a : null;
|
|
53
|
+
};
|
|
54
|
+
exports.useZodIfPossible = useZodIfPossible;
|
|
55
|
+
const useZodColorIfPossible = () => {
|
|
56
|
+
var _a;
|
|
57
|
+
const context = (0, react_1.useContext)(ZodContext);
|
|
58
|
+
return (_a = context === null || context === void 0 ? void 0 : context.zodColor) !== null && _a !== void 0 ? _a : null;
|
|
59
|
+
};
|
|
60
|
+
exports.useZodColorIfPossible = useZodColorIfPossible;
|
|
61
|
+
const ZodContext = (0, react_1.createContext)(null);
|
|
62
|
+
const ZodProvider = ({ children }) => {
|
|
63
|
+
const [zod, setZod] = (0, react_1.useState)(null);
|
|
64
|
+
const [zodColor, setZodColor] = (0, react_1.useState)(null);
|
|
65
|
+
(0, react_1.useEffect)(() => {
|
|
66
|
+
(0, exports.getZodIfPossible)().then((z) => setZod(z));
|
|
67
|
+
}, []);
|
|
68
|
+
(0, react_1.useEffect)(() => {
|
|
69
|
+
(0, exports.getZColorIfPossible)().then((z) => setZodColor(z));
|
|
70
|
+
}, []);
|
|
71
|
+
const contextValue = (0, react_1.useMemo)(() => {
|
|
72
|
+
return {
|
|
73
|
+
zod,
|
|
74
|
+
zodColor,
|
|
75
|
+
};
|
|
76
|
+
}, [zod, zodColor]);
|
|
77
|
+
return ((0, jsx_runtime_1.jsx)(ZodContext.Provider, { value: contextValue, children: children }));
|
|
78
|
+
};
|
|
79
|
+
exports.ZodProvider = ZodProvider;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import type { TSequence } from 'remotion';
|
|
2
2
|
import type { TrackWithHash } from './get-timeline-sequence-sort-key';
|
|
3
|
-
export declare type SequenceWithOverlap = {
|
|
4
|
-
sequence: TSequence;
|
|
5
|
-
overlaps: TSequence[];
|
|
6
|
-
};
|
|
7
3
|
export declare const calculateTimeline: ({ sequences, sequenceDuration, }: {
|
|
8
4
|
sequences: TSequence[];
|
|
9
5
|
sequenceDuration: number;
|
|
@@ -5,7 +5,6 @@ export declare const LIGHT_COLOR = "#ddd";
|
|
|
5
5
|
export declare const SELECTED_BACKGROUND = "hsla(0, 0%, 100%, 0.15)";
|
|
6
6
|
export declare const LIGHT_TEXT = "rgba(255, 255, 255, 0.6)";
|
|
7
7
|
export declare const VERY_LIGHT_TEXT = "rgba(255, 255, 255, 0.3)";
|
|
8
|
-
export declare const SELECTED_HOVER_BACKGROUND = "hsla(0, 0%, 100%, 0.25)";
|
|
9
8
|
export declare const CLEAR_HOVER = "rgba(255, 255, 255, 0.06)";
|
|
10
9
|
export declare const INPUT_BORDER_COLOR_UNHOVERED = "rgba(0, 0, 0, 0.6)";
|
|
11
10
|
export declare const INPUT_BORDER_COLOR_HOVERED = "rgba(255, 255, 255, 0.05)";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBackgroundFromHoverState = exports.WARNING_COLOR = exports.FAIL_COLOR = exports.TIMELINE_BACKGROUND = exports.INPUT_BORDER_COLOR_HOVERED = exports.INPUT_BORDER_COLOR_UNHOVERED = exports.CLEAR_HOVER = exports.
|
|
3
|
+
exports.getBackgroundFromHoverState = exports.WARNING_COLOR = exports.FAIL_COLOR = exports.TIMELINE_BACKGROUND = exports.INPUT_BORDER_COLOR_HOVERED = exports.INPUT_BORDER_COLOR_UNHOVERED = exports.CLEAR_HOVER = exports.VERY_LIGHT_TEXT = exports.LIGHT_TEXT = exports.SELECTED_BACKGROUND = exports.LIGHT_COLOR = exports.BORDER_COLOR = exports.INPUT_BACKGROUND = exports.BACKGROUND = void 0;
|
|
4
4
|
exports.BACKGROUND = '#1f2428';
|
|
5
5
|
exports.INPUT_BACKGROUND = '#2f363d';
|
|
6
6
|
exports.BORDER_COLOR = '#000';
|
|
@@ -8,7 +8,7 @@ exports.LIGHT_COLOR = '#ddd';
|
|
|
8
8
|
exports.SELECTED_BACKGROUND = 'hsla(0, 0%, 100%, 0.15)';
|
|
9
9
|
exports.LIGHT_TEXT = 'rgba(255, 255, 255, 0.6)';
|
|
10
10
|
exports.VERY_LIGHT_TEXT = 'rgba(255, 255, 255, 0.3)';
|
|
11
|
-
|
|
11
|
+
const SELECTED_HOVER_BACKGROUND = 'hsla(0, 0%, 100%, 0.25)';
|
|
12
12
|
exports.CLEAR_HOVER = 'rgba(255, 255, 255, 0.06)';
|
|
13
13
|
exports.INPUT_BORDER_COLOR_UNHOVERED = 'rgba(0, 0, 0, 0.6)';
|
|
14
14
|
exports.INPUT_BORDER_COLOR_HOVERED = 'rgba(255, 255, 255, 0.05)';
|
|
@@ -18,7 +18,7 @@ exports.WARNING_COLOR = '#f1c40f';
|
|
|
18
18
|
const getBackgroundFromHoverState = ({ selected, hovered, }) => {
|
|
19
19
|
if (selected) {
|
|
20
20
|
if (hovered) {
|
|
21
|
-
return
|
|
21
|
+
return SELECTED_HOVER_BACKGROUND;
|
|
22
22
|
}
|
|
23
23
|
return exports.SELECTED_BACKGROUND;
|
|
24
24
|
}
|
|
@@ -4,5 +4,4 @@ export declare const splitParentIntoNameAndParent: (name: string | null) => {
|
|
|
4
4
|
name: string | null;
|
|
5
5
|
parent: string | null;
|
|
6
6
|
};
|
|
7
|
-
export declare const findItemListToPush: (items: CompositionSelectorItemType[], folderName: string | null, parentName: string | null) => CompositionSelectorItemType[];
|
|
8
7
|
export declare const createFolderTree: (comps: AnyComposition[], folders: TFolder[], foldersExpanded: Record<string, boolean>) => CompositionSelectorItemType[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createFolderTree = exports.
|
|
3
|
+
exports.createFolderTree = exports.splitParentIntoNameAndParent = void 0;
|
|
4
4
|
const persist_open_folders_1 = require("./persist-open-folders");
|
|
5
5
|
const splitParentIntoNameAndParent = (name) => {
|
|
6
6
|
if (name === null) {
|
|
@@ -44,7 +44,6 @@ const findItemListToPush = (items, folderName, parentName) => {
|
|
|
44
44
|
}
|
|
45
45
|
return folder;
|
|
46
46
|
};
|
|
47
|
-
exports.findItemListToPush = findItemListToPush;
|
|
48
47
|
const createFolderIfDoesNotExist = (items, availableFolders, folderItem, foldersExpanded) => {
|
|
49
48
|
var _a;
|
|
50
49
|
if (doesFolderExist(items, folderItem.name, folderItem.parent)) {
|
|
@@ -58,7 +57,7 @@ const createFolderIfDoesNotExist = (items, availableFolders, folderItem, folders
|
|
|
58
57
|
}
|
|
59
58
|
createFolderIfDoesNotExist(items, availableFolders, parent, foldersExpanded);
|
|
60
59
|
}
|
|
61
|
-
const itemList =
|
|
60
|
+
const itemList = findItemListToPush(items, splitted.name, splitted.parent);
|
|
62
61
|
if (!itemList) {
|
|
63
62
|
throw new Error('why did folder not exist? ' + folderItem.name);
|
|
64
63
|
}
|
|
@@ -93,7 +92,7 @@ const createFolderTree = (comps, folders, foldersExpanded) => {
|
|
|
93
92
|
composition: item,
|
|
94
93
|
key: item.id,
|
|
95
94
|
};
|
|
96
|
-
const list =
|
|
95
|
+
const list = findItemListToPush(items, item.folderName, item.parentFolderName);
|
|
97
96
|
list.push(toPush);
|
|
98
97
|
}
|
|
99
98
|
return items;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TSequence } from 'remotion';
|
|
2
|
-
|
|
2
|
+
declare type Track = {
|
|
3
3
|
sequence: TSequence;
|
|
4
4
|
depth: number;
|
|
5
5
|
};
|
|
@@ -15,3 +15,4 @@ export declare type TrackWithHashAndOriginalTimings = TrackWithHash & {
|
|
|
15
15
|
export declare const getTimelineSequenceSequenceSortKey: (track: TrackWithHash, tracks: TrackWithHash[], sameHashes?: {
|
|
16
16
|
[hash: string]: string[];
|
|
17
17
|
}) => string;
|
|
18
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const CaretLeft: () => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
3
2
|
export declare const CaretRight: () => JSX.Element;
|
|
4
3
|
export declare const CaretDown: () => JSX.Element;
|
|
4
|
+
export declare const AngleDown: React.FC<{
|
|
5
|
+
down: boolean;
|
|
6
|
+
}>;
|
|
@@ -1,18 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AngleDown = exports.CaretDown = exports.CaretRight = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const colors_1 = require("../helpers/colors");
|
|
5
7
|
const caret = {
|
|
6
8
|
height: 12,
|
|
7
9
|
};
|
|
8
10
|
const caretDown = {
|
|
9
11
|
width: 10,
|
|
10
12
|
};
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
+
const angleDown = {
|
|
14
|
+
width: 10,
|
|
15
|
+
};
|
|
13
16
|
const CaretRight = () => ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 192 512", style: caret, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z" }) }));
|
|
14
17
|
exports.CaretRight = CaretRight;
|
|
15
18
|
const CaretDown = () => {
|
|
16
19
|
return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 320 512", style: caretDown, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z" }) }));
|
|
17
20
|
};
|
|
18
21
|
exports.CaretDown = CaretDown;
|
|
22
|
+
const AngleDown = ({ down }) => {
|
|
23
|
+
const style = (0, react_1.useMemo)(() => {
|
|
24
|
+
return {
|
|
25
|
+
...angleDown,
|
|
26
|
+
transform: down ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
27
|
+
marginTop: 1,
|
|
28
|
+
};
|
|
29
|
+
}, [down]);
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)("svg", { style: style, viewBox: "0 0 448 512", children: (0, jsx_runtime_1.jsx)("path", { fill: colors_1.LIGHT_TEXT, d: "M201.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 274.7 86.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z" }) }));
|
|
31
|
+
};
|
|
32
|
+
exports.AngleDown = AngleDown;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare type KeyEventType = 'keydown' | 'keyup' | 'keypress';
|
|
3
|
-
|
|
3
|
+
declare type KeyListenerCallback = (e: KeyboardEvent) => void;
|
|
4
4
|
export declare type RegisteredKeybinding = {
|
|
5
5
|
registeredFromPane: string;
|
|
6
6
|
id: string;
|
|
@@ -17,3 +17,4 @@ export declare const KeybindingContext: React.Context<KeybindingContextType>;
|
|
|
17
17
|
export declare const KeybindingContextProvider: React.FC<{
|
|
18
18
|
children: React.ReactNode;
|
|
19
19
|
}>;
|
|
20
|
+
export {};
|
|
@@ -5,7 +5,6 @@ declare type PreviewSizeCtx = {
|
|
|
5
5
|
setSize: (cb: (oldSize: PreviewSize) => PreviewSize) => void;
|
|
6
6
|
};
|
|
7
7
|
export declare const persistPreviewSizeOption: (option: PreviewSize) => void;
|
|
8
|
-
export declare const loadPreviewSizeOption: () => PreviewSize;
|
|
9
8
|
export declare const PreviewSizeContext: React.Context<PreviewSizeCtx>;
|
|
10
9
|
export declare const PreviewSizeProvider: React.FC<{
|
|
11
10
|
children: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PreviewSizeProvider = exports.PreviewSizeContext = exports.
|
|
3
|
+
exports.PreviewSizeProvider = exports.PreviewSizeContext = exports.persistPreviewSizeOption = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const editor_zoom_gestures_1 = require("./editor-zoom-gestures");
|
|
@@ -22,13 +22,12 @@ const loadPreviewSizeOption = () => {
|
|
|
22
22
|
}
|
|
23
23
|
return JSON.parse(item);
|
|
24
24
|
};
|
|
25
|
-
exports.loadPreviewSizeOption = loadPreviewSizeOption;
|
|
26
25
|
exports.PreviewSizeContext = (0, react_1.createContext)({
|
|
27
26
|
setSize: () => undefined,
|
|
28
|
-
size:
|
|
27
|
+
size: loadPreviewSizeOption(),
|
|
29
28
|
});
|
|
30
29
|
const PreviewSizeProvider = ({ children }) => {
|
|
31
|
-
const [size, setSizeState] = (0, react_1.useState)(() =>
|
|
30
|
+
const [size, setSizeState] = (0, react_1.useState)(() => loadPreviewSizeOption());
|
|
32
31
|
const [translation, setTranslation] = (0, react_1.useState)(() => {
|
|
33
32
|
return {
|
|
34
33
|
x: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare type SidebarCollapsedState = 'collapsed' | 'expanded' | 'responsive';
|
|
3
|
-
|
|
3
|
+
declare type RightSidebarCollapsedState = Exclude<SidebarCollapsedState, 'responsive'>;
|
|
4
4
|
declare type Context = {
|
|
5
5
|
sidebarCollapsedStateLeft: SidebarCollapsedState;
|
|
6
6
|
setSidebarCollapsedState: (options: {
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare type ZIndex = {
|
|
3
|
-
currentIndex: number;
|
|
4
|
-
};
|
|
5
|
-
export declare const ZIndexContext: React.Context<ZIndex>;
|
|
6
2
|
export declare const HigherZIndex: React.FC<{
|
|
7
3
|
onEscape: () => void;
|
|
8
4
|
onOutsideClick: () => void;
|
|
@@ -14,4 +10,3 @@ export declare const useZIndex: () => {
|
|
|
14
10
|
isHighestContext: boolean;
|
|
15
11
|
tabIndex: number;
|
|
16
12
|
};
|
|
17
|
-
export {};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useZIndex = exports.HigherZIndex =
|
|
3
|
+
exports.useZIndex = exports.HigherZIndex = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
7
7
|
const highest_z_index_1 = require("./highest-z-index");
|
|
8
8
|
const input_dragger_click_lock_1 = require("./input-dragger-click-lock");
|
|
9
|
-
|
|
9
|
+
const ZIndexContext = (0, react_1.createContext)({
|
|
10
10
|
currentIndex: 0,
|
|
11
11
|
});
|
|
12
|
+
const margin = {
|
|
13
|
+
margin: 'auto',
|
|
14
|
+
};
|
|
12
15
|
const EscapeHook = ({ onEscape }) => {
|
|
13
16
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
14
17
|
(0, react_1.useEffect)(() => {
|
|
@@ -28,7 +31,7 @@ const EscapeHook = ({ onEscape }) => {
|
|
|
28
31
|
return null;
|
|
29
32
|
};
|
|
30
33
|
const HigherZIndex = ({ children, onEscape, onOutsideClick }) => {
|
|
31
|
-
const context = (0, react_1.useContext)(
|
|
34
|
+
const context = (0, react_1.useContext)(ZIndexContext);
|
|
32
35
|
const highestContext = (0, react_1.useContext)(highest_z_index_1.HighestZIndexContext);
|
|
33
36
|
const containerRef = (0, react_1.useRef)(null);
|
|
34
37
|
const currentIndex = context.currentIndex + 1;
|
|
@@ -75,11 +78,11 @@ const HigherZIndex = ({ children, onEscape, onOutsideClick }) => {
|
|
|
75
78
|
currentIndex,
|
|
76
79
|
};
|
|
77
80
|
}, [currentIndex]);
|
|
78
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
81
|
+
return ((0, jsx_runtime_1.jsxs)(ZIndexContext.Provider, { value: value, children: [(0, jsx_runtime_1.jsx)(EscapeHook, { onEscape: onEscape }), (0, jsx_runtime_1.jsx)("div", { ref: containerRef, style: margin, children: children })] }));
|
|
79
82
|
};
|
|
80
83
|
exports.HigherZIndex = HigherZIndex;
|
|
81
84
|
const useZIndex = () => {
|
|
82
|
-
const context = (0, react_1.useContext)(
|
|
85
|
+
const context = (0, react_1.useContext)(ZIndexContext);
|
|
83
86
|
const highestContext = (0, react_1.useContext)(highest_z_index_1.HighestZIndexContext);
|
|
84
87
|
const isHighestContext = highestContext.highestIndex === context.currentIndex;
|
|
85
88
|
return (0, react_1.useMemo)(() => ({
|
package/dist/get-cli-options.js
CHANGED
|
@@ -79,6 +79,7 @@ const getCliOptions = async (options) => {
|
|
|
79
79
|
ignoreCertificateErrors: config_1.ConfigInternals.getIgnoreCertificateErrors(),
|
|
80
80
|
headless: config_1.ConfigInternals.getChromiumHeadlessMode(),
|
|
81
81
|
gl: (_a = config_1.ConfigInternals.getChromiumOpenGlRenderer()) !== null && _a !== void 0 ? _a : renderer_1.RenderInternals.DEFAULT_OPENGL_RENDERER,
|
|
82
|
+
userAgent: config_1.ConfigInternals.getChromiumUserAgent(),
|
|
82
83
|
};
|
|
83
84
|
const everyNthFrame = config_1.ConfigInternals.getEveryNthFrame();
|
|
84
85
|
const numberOfGifLoops = config_1.ConfigInternals.getNumberOfGifLoops();
|
|
@@ -3,14 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.loadConfig =
|
|
6
|
+
exports.loadConfig = void 0;
|
|
7
7
|
const fs_1 = require("fs");
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const load_config_1 = require("./load-config");
|
|
10
10
|
const log_1 = require("./log");
|
|
11
11
|
const parse_command_line_1 = require("./parse-command-line");
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const defaultConfigFileJavascript = 'remotion.config.js';
|
|
13
|
+
const defaultConfigFileTypescript = 'remotion.config.ts';
|
|
14
14
|
const loadConfig = (remotionRoot) => {
|
|
15
15
|
if (parse_command_line_1.parsedCli.config) {
|
|
16
16
|
const fullPath = path_1.default.resolve(process.cwd(), parse_command_line_1.parsedCli.config);
|
|
@@ -23,11 +23,11 @@ const loadConfig = (remotionRoot) => {
|
|
|
23
23
|
if (remotionRoot === null) {
|
|
24
24
|
return Promise.resolve(null);
|
|
25
25
|
}
|
|
26
|
-
if ((0, fs_1.existsSync)(path_1.default.resolve(remotionRoot,
|
|
27
|
-
return (0, load_config_1.loadConfigFile)(remotionRoot,
|
|
26
|
+
if ((0, fs_1.existsSync)(path_1.default.resolve(remotionRoot, defaultConfigFileTypescript))) {
|
|
27
|
+
return (0, load_config_1.loadConfigFile)(remotionRoot, defaultConfigFileTypescript, false);
|
|
28
28
|
}
|
|
29
|
-
if ((0, fs_1.existsSync)(path_1.default.resolve(remotionRoot,
|
|
30
|
-
return (0, load_config_1.loadConfigFile)(remotionRoot,
|
|
29
|
+
if ((0, fs_1.existsSync)(path_1.default.resolve(remotionRoot, defaultConfigFileJavascript))) {
|
|
30
|
+
return (0, load_config_1.loadConfigFile)(remotionRoot, defaultConfigFileJavascript, true);
|
|
31
31
|
}
|
|
32
32
|
return Promise.resolve(null);
|
|
33
33
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -117,7 +117,58 @@ export declare const CliInternals: {
|
|
|
117
117
|
initializeCli: (remotionRoot: string) => Promise<void>;
|
|
118
118
|
BooleanFlags: string[];
|
|
119
119
|
quietFlagProvided: () => boolean;
|
|
120
|
-
parsedCli:
|
|
120
|
+
parsedCli: {
|
|
121
|
+
"browser-executable": import("@remotion/renderer").BrowserExecutable;
|
|
122
|
+
"pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
123
|
+
"image-format": "png" | "jpeg" | "pdf" | "webp" | "none";
|
|
124
|
+
"prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy";
|
|
125
|
+
"bundle-cache": string;
|
|
126
|
+
"env-file": string;
|
|
127
|
+
"ignore-certificate-errors": string;
|
|
128
|
+
"disable-web-security": string;
|
|
129
|
+
"every-nth-frame": number;
|
|
130
|
+
"number-of-gif-loops": number;
|
|
131
|
+
"number-of-shared-audio-tags": number;
|
|
132
|
+
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
133
|
+
concurrency: number;
|
|
134
|
+
timeout: number;
|
|
135
|
+
config: string;
|
|
136
|
+
"public-dir": string;
|
|
137
|
+
"audio-bitrate": string;
|
|
138
|
+
"video-bitrate": string;
|
|
139
|
+
"audio-codec": "mp3" | "aac" | "pcm-16" | "opus";
|
|
140
|
+
crf: number;
|
|
141
|
+
force: boolean;
|
|
142
|
+
overwrite: boolean;
|
|
143
|
+
png: boolean;
|
|
144
|
+
props: string;
|
|
145
|
+
quality: number;
|
|
146
|
+
"jpeg-quality": number;
|
|
147
|
+
frames: string | number;
|
|
148
|
+
scale: number;
|
|
149
|
+
sequence: boolean;
|
|
150
|
+
quiet: boolean;
|
|
151
|
+
q: boolean;
|
|
152
|
+
log: string;
|
|
153
|
+
help: boolean;
|
|
154
|
+
port: number;
|
|
155
|
+
frame: string | number;
|
|
156
|
+
"disable-headless": boolean;
|
|
157
|
+
"disable-keyboard-shortcuts": boolean;
|
|
158
|
+
muted: boolean;
|
|
159
|
+
height: number;
|
|
160
|
+
width: number;
|
|
161
|
+
runs: number;
|
|
162
|
+
concurrencies: string;
|
|
163
|
+
"enforce-audio-track": boolean;
|
|
164
|
+
gl: "swangle" | "angle" | "egl" | "swiftshader";
|
|
165
|
+
"package-manager": string;
|
|
166
|
+
"webpack-poll": number;
|
|
167
|
+
"no-open": boolean;
|
|
168
|
+
browser: string;
|
|
169
|
+
"browser-args": string;
|
|
170
|
+
"user-agent": string;
|
|
171
|
+
} & {
|
|
121
172
|
_: string[];
|
|
122
173
|
};
|
|
123
174
|
handleCommonError: (err: Error) => Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec, BrowserExecutable, Codec, OpenGlRenderer, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
2
|
-
|
|
2
|
+
declare type CommandLineOptions = {
|
|
3
3
|
['browser-executable']: BrowserExecutable;
|
|
4
4
|
['pixel-format']: PixelFormat;
|
|
5
5
|
['image-format']: VideoImageFormat | StillImageFormat;
|
|
@@ -49,6 +49,7 @@ export declare type CommandLineOptions = {
|
|
|
49
49
|
['no-open']: boolean;
|
|
50
50
|
['browser']: string;
|
|
51
51
|
['browser-args']: string;
|
|
52
|
+
['user-agent']: string;
|
|
52
53
|
};
|
|
53
54
|
export declare const BooleanFlags: string[];
|
|
54
55
|
export declare const parsedCli: CommandLineOptions & {
|
|
@@ -56,3 +57,4 @@ export declare const parsedCli: CommandLineOptions & {
|
|
|
56
57
|
};
|
|
57
58
|
export declare const parseCommandLine: () => void;
|
|
58
59
|
export declare const quietFlagProvided: () => boolean;
|
|
60
|
+
export {};
|
|
@@ -56,6 +56,9 @@ const parseCommandLine = () => {
|
|
|
56
56
|
if (exports.parsedCli['disable-headless']) {
|
|
57
57
|
config_1.Config.setChromiumHeadlessMode(false);
|
|
58
58
|
}
|
|
59
|
+
if (exports.parsedCli['user-agent']) {
|
|
60
|
+
config_1.Config.setChromiumUserAgent(exports.parsedCli['user-agent']);
|
|
61
|
+
}
|
|
59
62
|
if (exports.parsedCli.log) {
|
|
60
63
|
if (!renderer_1.RenderInternals.isValidLogLevel(exports.parsedCli.log)) {
|
|
61
64
|
log_1.Log.error('Invalid `--log` value passed.');
|
|
@@ -8,10 +8,6 @@ export declare type ApiHandler<ReqData, ResData> = (params: {
|
|
|
8
8
|
request: IncomingMessage;
|
|
9
9
|
response: ServerResponse;
|
|
10
10
|
}) => Promise<ResData>;
|
|
11
|
-
export declare type ApiRoute<ReqData, ResData> = {
|
|
12
|
-
handler: ApiHandler<ReqData, ResData>;
|
|
13
|
-
endpoint: string;
|
|
14
|
-
};
|
|
15
11
|
declare type ReqAndRes<A, B> = {
|
|
16
12
|
Request: A;
|
|
17
13
|
Response: B;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { IncomingMessage, ServerResponse } from 'http';
|
|
3
3
|
import type { DevMiddlewareContext } from './types';
|
|
4
|
-
export declare function getFilenameFromUrl(context: DevMiddlewareContext, url: string | undefined): string | undefined;
|
|
5
4
|
export declare function getValueContentRangeHeader(type: string, size: number, range?: {
|
|
6
5
|
start: number;
|
|
7
6
|
end: number;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.middleware = exports.getValueContentRangeHeader =
|
|
6
|
+
exports.middleware = exports.getValueContentRangeHeader = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const querystring_1 = __importDefault(require("querystring"));
|
|
@@ -92,7 +92,6 @@ function getFilenameFromUrl(context, url) {
|
|
|
92
92
|
}
|
|
93
93
|
return foundFilename;
|
|
94
94
|
}
|
|
95
|
-
exports.getFilenameFromUrl = getFilenameFromUrl;
|
|
96
95
|
function getValueContentRangeHeader(type, size, range) {
|
|
97
96
|
return `${type} ${range ? `${range.start}-${range.end}` : '*'}/${size}`;
|
|
98
97
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const Button: React.
|
|
2
|
+
export declare const Button: React.ForwardRefExoticComponent<{
|
|
3
3
|
onClick: () => void;
|
|
4
|
-
disabled?: boolean;
|
|
4
|
+
disabled?: boolean | undefined;
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
-
style?: React.CSSProperties;
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
style?: React.CSSProperties | undefined;
|
|
7
|
+
buttonContainerStyle?: React.CSSProperties | undefined;
|
|
8
|
+
autoFocus?: boolean | undefined;
|
|
9
|
+
title?: string | undefined;
|
|
10
|
+
id?: string | undefined;
|
|
11
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -14,7 +14,7 @@ const button = {
|
|
|
14
14
|
color: 'white',
|
|
15
15
|
flexDirection: 'row',
|
|
16
16
|
};
|
|
17
|
-
const
|
|
17
|
+
const ButtonRefForwardFunction = ({ children, onClick, title, disabled, style, id, autoFocus, buttonContainerStyle, }, ref) => {
|
|
18
18
|
const combined = (0, react_1.useMemo)(() => {
|
|
19
19
|
return {
|
|
20
20
|
...button,
|
|
@@ -27,8 +27,9 @@ const Button = ({ children, onClick, disabled, style, autoFocus }) => {
|
|
|
27
27
|
cursor: disabled ? 'inherit' : 'pointer',
|
|
28
28
|
fontSize: 14,
|
|
29
29
|
opacity: disabled ? 0.7 : 1,
|
|
30
|
+
...(buttonContainerStyle !== null && buttonContainerStyle !== void 0 ? buttonContainerStyle : {}),
|
|
30
31
|
};
|
|
31
|
-
}, [disabled]);
|
|
32
|
-
return ((0, jsx_runtime_1.jsx)("button", { style: combined, type: "button", disabled: disabled, onClick: onClick, autoFocus: autoFocus, children: (0, jsx_runtime_1.jsx)("div", { className: "css-reset", style: buttonContainer, children: children }) }));
|
|
32
|
+
}, [buttonContainerStyle, disabled]);
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)("button", { ref: ref, id: id, style: combined, type: "button", disabled: disabled, onClick: onClick, autoFocus: autoFocus, title: title, children: (0, jsx_runtime_1.jsx)("div", { className: "css-reset", style: buttonContainer, children: children }) }));
|
|
33
34
|
};
|
|
34
|
-
exports.Button =
|
|
35
|
+
exports.Button = (0, react_1.forwardRef)(ButtonRefForwardFunction);
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
* https://github.com/webpack-contrib/webpack-hot-middleware#readme
|
|
7
7
|
* and rewritten in TypeScript. This file is MIT licensed
|
|
8
8
|
*/
|
|
9
|
+
const ansi_split_1 = require("../../ansi/ansi-split");
|
|
9
10
|
const process_update_1 = require("./process-update");
|
|
10
|
-
const strip_ansi_1 = require("./strip-ansi");
|
|
11
11
|
const types_1 = require("./types");
|
|
12
12
|
if (typeof window === 'undefined') {
|
|
13
13
|
// do nothing
|
|
@@ -107,7 +107,7 @@ function createReporter() {
|
|
|
107
107
|
}
|
|
108
108
|
const newProblems = obj[type]
|
|
109
109
|
.map((msg) => {
|
|
110
|
-
return (0,
|
|
110
|
+
return (0, ansi_split_1.stripAnsi)(msg);
|
|
111
111
|
})
|
|
112
112
|
.join('\n');
|
|
113
113
|
if (previousProblems === newProblems) {
|
|
@@ -9,9 +9,4 @@ export declare const fetchFolder: ({ publicDir, staticHash, }: {
|
|
|
9
9
|
publicDir: string;
|
|
10
10
|
staticHash: string;
|
|
11
11
|
}) => void;
|
|
12
|
-
export declare const watchPublicFolder: ({ publicDir, onUpdate, staticHash, }: {
|
|
13
|
-
publicDir: string;
|
|
14
|
-
onUpdate: () => void;
|
|
15
|
-
staticHash: string;
|
|
16
|
-
}) => void;
|
|
17
12
|
export declare const getFiles: () => StaticFile[];
|