@remotion/studio 4.0.463 → 4.0.464

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/components/CanvasOrLoading.js +1 -1
  2. package/dist/components/ColorPicker/AlphaSlider.d.ts +9 -0
  3. package/dist/components/ColorPicker/AlphaSlider.js +88 -0
  4. package/dist/components/ColorPicker/ColorPicker.d.ts +18 -0
  5. package/dist/components/ColorPicker/ColorPicker.js +176 -0
  6. package/dist/components/ColorPicker/ColorPickerPopup.d.ts +8 -0
  7. package/dist/components/ColorPicker/ColorPickerPopup.js +276 -0
  8. package/dist/components/ColorPicker/HueSlider.d.ts +6 -0
  9. package/dist/components/ColorPicker/HueSlider.js +68 -0
  10. package/dist/components/ColorPicker/SaturationValueArea.d.ts +14 -0
  11. package/dist/components/ColorPicker/SaturationValueArea.js +93 -0
  12. package/dist/components/ColorPicker/checker.d.ts +4 -0
  13. package/dist/components/ColorPicker/checker.js +9 -0
  14. package/dist/components/ExpandedTracksProvider.d.ts +2 -0
  15. package/dist/components/ExpandedTracksProvider.js +18 -1
  16. package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +8 -47
  17. package/dist/components/Timeline/Padder.js +2 -2
  18. package/dist/components/Timeline/SubscribeToNodePaths.d.ts +1 -1
  19. package/dist/components/Timeline/SubscribeToNodePaths.js +9 -4
  20. package/dist/components/Timeline/Timeline.js +4 -7
  21. package/dist/components/Timeline/TimelineColorField.js +18 -156
  22. package/dist/components/Timeline/TimelineEffectFieldRow.d.ts +1 -2
  23. package/dist/components/Timeline/TimelineEffectFieldRow.js +22 -31
  24. package/dist/components/Timeline/TimelineEffectGroupRow.d.ts +1 -2
  25. package/dist/components/Timeline/TimelineEffectGroupRow.js +15 -12
  26. package/dist/components/Timeline/TimelineExpandedRow.js +15 -30
  27. package/dist/components/Timeline/TimelineFieldRow.d.ts +1 -2
  28. package/dist/components/Timeline/TimelineFieldRow.js +19 -16
  29. package/dist/components/Timeline/TimelineImageInfo.js +5 -17
  30. package/dist/components/Timeline/TimelineListItem.d.ts +0 -1
  31. package/dist/components/Timeline/TimelineListItem.js +12 -14
  32. package/dist/components/Timeline/TimelineRowChrome.d.ts +8 -0
  33. package/dist/components/Timeline/TimelineRowChrome.js +21 -0
  34. package/dist/components/Timeline/TimelineTracks.js +0 -4
  35. package/dist/components/Timeline/save-effect-prop.d.ts +2 -1
  36. package/dist/components/Timeline/save-effect-prop.js +2 -13
  37. package/dist/components/Timeline/save-prop-queue.d.ts +1 -2
  38. package/dist/components/Timeline/save-prop-queue.js +3 -12
  39. package/dist/components/Timeline/save-sequence-prop.d.ts +2 -1
  40. package/dist/components/Timeline/save-sequence-prop.js +2 -11
  41. package/dist/components/Timeline/should-show-track-in-timeline.d.ts +2 -0
  42. package/dist/components/Timeline/should-show-track-in-timeline.js +23 -0
  43. package/dist/components/Timeline/timeline-field-row-layout.d.ts +2 -0
  44. package/dist/components/Timeline/timeline-field-row-layout.js +14 -0
  45. package/dist/components/Timeline/timeline-indent.d.ts +1 -0
  46. package/dist/components/Timeline/timeline-indent.js +4 -0
  47. package/dist/components/Timeline/timeline-row-layout.d.ts +11 -0
  48. package/dist/components/Timeline/timeline-row-layout.js +27 -0
  49. package/dist/components/Timeline/use-resolved-stack-react-to-change.d.ts +2 -0
  50. package/dist/components/Timeline/use-resolved-stack-react-to-change.js +59 -0
  51. package/dist/components/Timeline/use-sequence-props-subscription.js +27 -1
  52. package/dist/error-overlay/remotion-overlay/ShortcutHint.js +5 -3
  53. package/dist/esm/chunk-6jf1natv.js +25 -0
  54. package/dist/esm/{chunk-b0m62frw.js → chunk-mawnnpzg.js} +4811 -3975
  55. package/dist/esm/index.mjs +16 -0
  56. package/dist/esm/internals.mjs +4824 -3973
  57. package/dist/esm/previewEntry.mjs +4835 -3985
  58. package/dist/esm/renderEntry.mjs +4 -3
  59. package/dist/helpers/client-id.d.ts +2 -9
  60. package/dist/helpers/client-id.js +15 -40
  61. package/dist/helpers/color-conversion.d.ts +36 -0
  62. package/dist/helpers/color-conversion.js +121 -0
  63. package/dist/helpers/inject-css.js +4 -7
  64. package/dist/helpers/migrate-expanded-tracks-for-subscription-key.d.ts +3 -0
  65. package/dist/helpers/migrate-expanded-tracks-for-subscription-key.js +26 -0
  66. package/dist/helpers/preview-server-events.d.ts +15 -0
  67. package/dist/helpers/preview-server-events.js +81 -0
  68. package/dist/helpers/timeline-layout.d.ts +0 -1
  69. package/dist/helpers/timeline-layout.js +29 -25
  70. package/dist/hot-middleware-client/client.js +10 -16
  71. package/package.json +10 -10
  72. package/dist/components/NewComposition/RemInputTypeColor.d.ts +0 -8
  73. package/dist/components/NewComposition/RemInputTypeColor.js +0 -53
  74. package/dist/components/Timeline/is-collapsed.d.ts +0 -2
  75. package/dist/components/Timeline/is-collapsed.js +0 -10
  76. package/dist/esm/chunk-5gtx3pza.js +0 -9
  77. package/dist/helpers/color-math.d.ts +0 -1
  78. package/dist/helpers/color-math.js +0 -13
@@ -8,7 +8,7 @@ const getQueue = (nodePath) => {
8
8
  const key = remotion_1.Internals.makeSequencePropsSubscriptionKey(nodePath);
9
9
  let q = queues.get(key);
10
10
  if (!q) {
11
- q = { chain: Promise.resolve(), cancelled: false, committed: null };
11
+ q = { chain: Promise.resolve(), cancelled: false };
12
12
  queues.set(key, q);
13
13
  }
14
14
  return q;
@@ -19,15 +19,12 @@ const dropQueue = (nodePath, q) => {
19
19
  queues.delete(key);
20
20
  }
21
21
  };
22
- const enqueueSavePropChange = ({ nodePath, setCodeValues, applyOptimistic, apiCall, mergeServerResponse, errorLabel, }) => {
22
+ const enqueueSavePropChange = ({ nodePath, setCodeValues, applyOptimistic, apiCall, errorLabel, }) => {
23
23
  const q = getQueue(nodePath);
24
24
  if (q.cancelled) {
25
25
  return Promise.resolve();
26
26
  }
27
27
  setCodeValues(nodePath, (prev) => {
28
- if (q.committed === null) {
29
- q.committed = prev;
30
- }
31
28
  return applyOptimistic(prev);
32
29
  });
33
30
  const myQueue = q;
@@ -36,12 +33,10 @@ const enqueueSavePropChange = ({ nodePath, setCodeValues, applyOptimistic, apiCa
36
33
  return;
37
34
  }
38
35
  try {
39
- const response = await apiCall();
36
+ await apiCall();
40
37
  if (myQueue.cancelled) {
41
38
  return;
42
39
  }
43
- setCodeValues(nodePath, (prev) => mergeServerResponse(prev, response));
44
- myQueue.committed = mergeServerResponse(myQueue.committed, response);
45
40
  // If nothing more is queued, reset baseline so the next round starts fresh.
46
41
  if (myQueue.chain === next) {
47
42
  dropQueue(nodePath, myQueue);
@@ -49,10 +44,6 @@ const enqueueSavePropChange = ({ nodePath, setCodeValues, applyOptimistic, apiCa
49
44
  }
50
45
  catch (err) {
51
46
  myQueue.cancelled = true;
52
- const { committed } = myQueue;
53
- if (committed !== null) {
54
- setCodeValues(nodePath, () => committed);
55
- }
56
47
  dropQueue(nodePath, myQueue);
57
48
  (0, NotificationCenter_1.showNotification)(`${errorLabel}: ${err instanceof Error ? err.message : String(err)}`, 4000);
58
49
  }
@@ -1,6 +1,6 @@
1
1
  import type { CanUpdateSequencePropsResponse, SequencePropsSubscriptionKey, SequenceSchema } from 'remotion';
2
2
  export type SetCodeValues = (nodePath: SequencePropsSubscriptionKey, values: (prev: CanUpdateSequencePropsResponse) => CanUpdateSequencePropsResponse) => void;
3
- export declare const saveSequenceProp: ({ fileName, nodePath, fieldKey, value, defaultValue, schema, setCodeValues, }: {
3
+ export declare const saveSequenceProp: ({ fileName, nodePath, fieldKey, value, defaultValue, schema, setCodeValues, clientId, }: {
4
4
  fileName: string;
5
5
  nodePath: SequencePropsSubscriptionKey;
6
6
  fieldKey: string;
@@ -8,4 +8,5 @@ export declare const saveSequenceProp: ({ fileName, nodePath, fieldKey, value, d
8
8
  defaultValue: string | null;
9
9
  schema: SequenceSchema;
10
10
  setCodeValues: SetCodeValues;
11
+ clientId: string;
11
12
  }) => Promise<void>;
@@ -4,7 +4,7 @@ exports.saveSequenceProp = void 0;
4
4
  const studio_shared_1 = require("@remotion/studio-shared");
5
5
  const call_api_1 = require("../call-api");
6
6
  const save_prop_queue_1 = require("./save-prop-queue");
7
- const saveSequenceProp = ({ fileName, nodePath, fieldKey, value, defaultValue, schema, setCodeValues, }) => {
7
+ const saveSequenceProp = ({ fileName, nodePath, fieldKey, value, defaultValue, schema, setCodeValues, clientId, }) => {
8
8
  return (0, save_prop_queue_1.enqueueSavePropChange)({
9
9
  nodePath,
10
10
  setCodeValues,
@@ -21,17 +21,8 @@ const saveSequenceProp = ({ fileName, nodePath, fieldKey, value, defaultValue, s
21
21
  value: JSON.stringify(value),
22
22
  defaultValue,
23
23
  schema,
24
+ clientId,
24
25
  }),
25
- mergeServerResponse: (prev, data) => {
26
- if (!data.canUpdate) {
27
- return data;
28
- }
29
- return {
30
- canUpdate: true,
31
- props: data.props,
32
- effects: prev.canUpdate ? prev.effects : [],
33
- };
34
- },
35
26
  errorLabel: 'Could not save sequence prop',
36
27
  });
37
28
  };
@@ -0,0 +1,2 @@
1
+ import type { TrackWithHash } from '../../helpers/get-timeline-sequence-sort-key';
2
+ export declare const shouldShowTrackInTimeline: (track: TrackWithHash, durationInFrames: number) => boolean;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.shouldShowTrackInTimeline = void 0;
4
+ // A track is shown in the timeline list when:
5
+ // - The sequence opted-in via `showInTimeline` (the default).
6
+ // Children of a sequence with `showInTimeline: false` keep being listed
7
+ // on their own; their depth is independently flattened by
8
+ // `getTimelineNestedLevel` so the parent does not contribute an indent.
9
+ // - The sequence has a positive duration.
10
+ // - The sequence starts before the composition ends.
11
+ const shouldShowTrackInTimeline = (track, durationInFrames) => {
12
+ if (!track.sequence.showInTimeline) {
13
+ return false;
14
+ }
15
+ if (track.sequence.duration <= 0) {
16
+ return false;
17
+ }
18
+ if (track.sequence.from > durationInFrames) {
19
+ return false;
20
+ }
21
+ return true;
22
+ };
23
+ exports.shouldShowTrackInTimeline = shouldShowTrackInTimeline;
@@ -0,0 +1,2 @@
1
+ import type React from 'react';
2
+ export declare const getTimelineFieldLabelRowStyle: (depth: number) => React.CSSProperties;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTimelineFieldLabelRowStyle = void 0;
4
+ const timeline_row_layout_1 = require("./timeline-row-layout");
5
+ const getTimelineFieldLabelRowStyle = (depth) => {
6
+ return {
7
+ flex: `0 0 ${(0, timeline_row_layout_1.getTimelineFieldLabelFlexBasis)(depth)}`,
8
+ display: 'flex',
9
+ flexDirection: 'row',
10
+ alignItems: 'center',
11
+ gap: 6,
12
+ };
13
+ };
14
+ exports.getTimelineFieldLabelRowStyle = getTimelineFieldLabelRowStyle;
@@ -0,0 +1 @@
1
+ export declare const TIMELINE_INDENT = 10;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TIMELINE_INDENT = void 0;
4
+ exports.TIMELINE_INDENT = 10;
@@ -0,0 +1,11 @@
1
+ export declare const TIMELINE_ROW_BASE_PADDING = 5;
2
+ export declare const TIMELINE_EYE_COLUMN_WIDTH = 22;
3
+ export declare const TIMELINE_ARROW_COLUMN_WIDTH = 16;
4
+ export declare const TIMELINE_FIELD_LABEL_EXTRA_WIDTH = 15;
5
+ export declare const getTimelineRowIndentWidth: (depth: number) => number;
6
+ export declare const getTimelineRowLeftChromeWidth: (depth: number) => number;
7
+ export declare const getTimelineFieldLabelFlexBasis: (depth: number) => string;
8
+ export declare const getExpandedRowDepth: ({ nestedDepth, treeDepth, }: {
9
+ nestedDepth: number;
10
+ treeDepth: number;
11
+ }) => number;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getExpandedRowDepth = exports.getTimelineFieldLabelFlexBasis = exports.getTimelineRowLeftChromeWidth = exports.getTimelineRowIndentWidth = exports.TIMELINE_FIELD_LABEL_EXTRA_WIDTH = exports.TIMELINE_ARROW_COLUMN_WIDTH = exports.TIMELINE_EYE_COLUMN_WIDTH = exports.TIMELINE_ROW_BASE_PADDING = void 0;
4
+ const timeline_indent_1 = require("./timeline-indent");
5
+ exports.TIMELINE_ROW_BASE_PADDING = 5;
6
+ exports.TIMELINE_EYE_COLUMN_WIDTH = 22;
7
+ exports.TIMELINE_ARROW_COLUMN_WIDTH = 16;
8
+ exports.TIMELINE_FIELD_LABEL_EXTRA_WIDTH = 15;
9
+ const getTimelineRowIndentWidth = (depth) => {
10
+ return depth * timeline_indent_1.TIMELINE_INDENT;
11
+ };
12
+ exports.getTimelineRowIndentWidth = getTimelineRowIndentWidth;
13
+ const getTimelineRowLeftChromeWidth = (depth) => {
14
+ return (exports.TIMELINE_ROW_BASE_PADDING +
15
+ exports.TIMELINE_EYE_COLUMN_WIDTH +
16
+ (0, exports.getTimelineRowIndentWidth)(depth) +
17
+ exports.TIMELINE_ARROW_COLUMN_WIDTH);
18
+ };
19
+ exports.getTimelineRowLeftChromeWidth = getTimelineRowLeftChromeWidth;
20
+ const getTimelineFieldLabelFlexBasis = (depth) => {
21
+ return `calc(50% - ${(0, exports.getTimelineRowLeftChromeWidth)(depth) - exports.TIMELINE_FIELD_LABEL_EXTRA_WIDTH}px)`;
22
+ };
23
+ exports.getTimelineFieldLabelFlexBasis = getTimelineFieldLabelFlexBasis;
24
+ const getExpandedRowDepth = ({ nestedDepth, treeDepth, }) => {
25
+ return nestedDepth + 1 + treeDepth;
26
+ };
27
+ exports.getExpandedRowDepth = getExpandedRowDepth;
@@ -0,0 +1,2 @@
1
+ import type { ResolvedStackLocation } from 'remotion';
2
+ export declare const useResolveStackAndReactToChange: (getStack: () => string | null) => ResolvedStackLocation | null;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useResolveStackAndReactToChange = void 0;
4
+ const react_1 = require("react");
5
+ const client_id_1 = require("../../helpers/client-id");
6
+ const use_resolved_stack_1 = require("./use-resolved-stack");
7
+ // This case: https://github.com/remotion-dev/remotion/issues/7393
8
+ // A code change has been made and we cannot re-calculate the stack right away.
9
+ // In that case, we wait for fast refresh, wait for the new stack trace, triggering a new event.
10
+ const matchesLostNodePathEvent = (event, location) => {
11
+ var _a;
12
+ if (!(location === null || location === void 0 ? void 0 : location.source) || !location.line) {
13
+ return false;
14
+ }
15
+ return (event.fileName === location.source &&
16
+ event.line === location.line &&
17
+ event.column === ((_a = location.column) !== null && _a !== void 0 ? _a : 0));
18
+ };
19
+ const useResolveStackAndReactToChange = (getStack) => {
20
+ const { subscribeToEvent } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
21
+ const [stack, setStack] = (0, react_1.useState)(() => getStack());
22
+ const resolvedLocation = (0, use_resolved_stack_1.useResolvedStack)(stack);
23
+ const resolvedLocationRef = (0, react_1.useRef)(resolvedLocation);
24
+ resolvedLocationRef.current = resolvedLocation;
25
+ (0, react_1.useEffect)(() => {
26
+ let interval = null;
27
+ const handleEvent = (event) => {
28
+ if (event.type !== 'lost-node-path') {
29
+ return;
30
+ }
31
+ if (!matchesLostNodePathEvent(event, resolvedLocationRef.current)) {
32
+ return;
33
+ }
34
+ const initialStack = getStack();
35
+ if (interval !== null) {
36
+ clearInterval(interval);
37
+ }
38
+ interval = setInterval(() => {
39
+ const newStack = getStack();
40
+ if (newStack !== initialStack) {
41
+ if (interval !== null) {
42
+ clearInterval(interval);
43
+ interval = null;
44
+ }
45
+ setStack(newStack);
46
+ }
47
+ }, 10);
48
+ };
49
+ const unsubscribe = subscribeToEvent('lost-node-path', handleEvent);
50
+ return () => {
51
+ unsubscribe();
52
+ if (interval !== null) {
53
+ clearInterval(interval);
54
+ }
55
+ };
56
+ }, [subscribeToEvent, getStack]);
57
+ return resolvedLocation;
58
+ };
59
+ exports.useResolveStackAndReactToChange = useResolveStackAndReactToChange;
@@ -1,16 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useSequencePropsSubscription = void 0;
4
+ const studio_shared_1 = require("@remotion/studio-shared");
4
5
  const react_1 = require("react");
5
6
  const remotion_1 = require("remotion");
6
7
  const client_id_1 = require("../../helpers/client-id");
8
+ const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
7
9
  const sequence_props_subscription_store_1 = require("./sequence-props-subscription-store");
8
10
  const useSequencePropsSubscription = ({ originalLocation, overrideId, schema, effects, }) => {
9
11
  var _a, _b, _c;
10
12
  const { setCodeValues } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
11
13
  const { setOverrideIdToNodePath } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsSettersContext);
14
+ const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
15
+ const { migrateExpandedTracksForSubscriptionKey } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksSetterContext);
12
16
  const { previewServerState: state } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
17
+ const previousNodePathRef = (0, react_1.useRef)(null);
18
+ const overrideIdToNodePathMappingsRef = (0, react_1.useRef)(overrideIdToNodePathMappings);
19
+ overrideIdToNodePathMappingsRef.current = overrideIdToNodePathMappings;
13
20
  const clientId = state.type === 'connected' ? state.clientId : undefined;
21
+ const effectsSignature = (0, react_1.useMemo)(() => effects.map((effect) => (0, studio_shared_1.getAllSchemaKeys)(effect).join('\0')).join('\0\0'), [effects]);
14
22
  const validatedLocation = (0, react_1.useMemo)(() => {
15
23
  var _a;
16
24
  if (!originalLocation ||
@@ -28,6 +36,7 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, schema, ef
28
36
  const locationLine = (_b = validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.line) !== null && _b !== void 0 ? _b : null;
29
37
  const locationColumn = (_c = validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.column) !== null && _c !== void 0 ? _c : null;
30
38
  (0, react_1.useEffect)(() => {
39
+ var _a;
31
40
  if (!clientId ||
32
41
  !locationSource ||
33
42
  !locationLine ||
@@ -35,6 +44,7 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, schema, ef
35
44
  !schema) {
36
45
  return;
37
46
  }
47
+ const nodePathAtResubscribe = (_a = overrideIdToNodePathMappingsRef.current[overrideId]) !== null && _a !== void 0 ? _a : null;
38
48
  const { release } = (0, sequence_props_subscription_store_1.acquireSequencePropsSubscription)({
39
49
  fileName: locationSource,
40
50
  line: locationLine,
@@ -49,10 +59,24 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, schema, ef
49
59
  setCodeValues(result.nodePath, () => result.status);
50
60
  },
51
61
  applyEach: (result) => {
62
+ var _a;
52
63
  if (!result.success) {
53
64
  return;
54
65
  }
55
- setOverrideIdToNodePath(overrideId, result.nodePath);
66
+ const newNodePath = result.nodePath;
67
+ const newNodePathKey = (0, studio_shared_1.stringifySequenceSubscriptionKey)(newNodePath);
68
+ const previousNodePath = (_a = previousNodePathRef.current) !== null && _a !== void 0 ? _a : nodePathAtResubscribe;
69
+ const previousNodePathKey = previousNodePath
70
+ ? (0, studio_shared_1.stringifySequenceSubscriptionKey)(previousNodePath)
71
+ : null;
72
+ if (previousNodePathKey === newNodePathKey) {
73
+ return;
74
+ }
75
+ if (previousNodePath) {
76
+ migrateExpandedTracksForSubscriptionKey(previousNodePath, newNodePath);
77
+ }
78
+ previousNodePathRef.current = newNodePath;
79
+ setOverrideIdToNodePath(overrideId, newNodePath);
56
80
  },
57
81
  });
58
82
  return () => {
@@ -61,9 +85,11 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, schema, ef
61
85
  }, [
62
86
  clientId,
63
87
  effects,
88
+ effectsSignature,
64
89
  locationColumn,
65
90
  locationLine,
66
91
  locationSource,
92
+ migrateExpandedTracksForSubscriptionKey,
67
93
  overrideId,
68
94
  schema,
69
95
  setCodeValues,
@@ -12,7 +12,7 @@ const container = {
12
12
  marginLeft: 6,
13
13
  opacity: 0.6,
14
14
  verticalAlign: 'middle',
15
- fontSize: 14,
15
+ fontSize: 'inherit',
16
16
  };
17
17
  const ShortcutHint = ({ keyToPress, cmdOrCtrl }) => {
18
18
  const style = (0, react_1.useMemo)(() => {
@@ -20,10 +20,12 @@ const ShortcutHint = ({ keyToPress, cmdOrCtrl }) => {
20
20
  return {
21
21
  display: 'inline-block',
22
22
  transform: `translateY(2px)`,
23
- fontSize: 14,
23
+ fontSize: 'inherit',
24
24
  };
25
25
  }
26
- return {};
26
+ return {
27
+ fontSize: 'inherit',
28
+ };
27
29
  }, [keyToPress]);
28
30
  if ((0, use_keybinding_1.areKeyboardShortcutsDisabled)()) {
29
31
  return null;
@@ -0,0 +1,25 @@
1
+ var __create = Object.create;
2
+ var __getProtoOf = Object.getPrototypeOf;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __toESM = (mod, isNodeMode, target) => {
7
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
8
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
9
+ for (let key of __getOwnPropNames(mod))
10
+ if (!__hasOwnProp.call(to, key))
11
+ __defProp(to, key, {
12
+ get: () => mod[key],
13
+ enumerable: true
14
+ });
15
+ return to;
16
+ };
17
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
18
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
19
+ }) : x)(function(x) {
20
+ if (typeof require !== "undefined")
21
+ return require.apply(this, arguments);
22
+ throw Error('Dynamic require of "' + x + '" is not supported');
23
+ });
24
+
25
+ export { __toESM, __require };