@remotion/studio 4.0.526 → 4.0.528

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 (309) hide show
  1. package/dist/components/AgentPrompt.js +1 -2
  2. package/dist/components/AudioWaveform.d.ts +1 -0
  3. package/dist/components/AudioWaveform.js +10 -14
  4. package/dist/components/Canvas.js +88 -26
  5. package/dist/components/CanvasCaptureDropHandler.js +63 -0
  6. package/dist/components/CanvasOrLoading.js +10 -2
  7. package/dist/components/CodeFrame.js +1 -1
  8. package/dist/components/ColorPicker/checker.d.ts +1 -1
  9. package/dist/components/CompositionSelectorItem.js +1 -0
  10. package/dist/components/CurrentAsset.js +4 -2
  11. package/dist/components/EditorRuler/Ruler.js +6 -3
  12. package/dist/components/EffectPickerModal.js +69 -43
  13. package/dist/components/ElementInstallConfirmation.js +3 -3
  14. package/dist/components/ElementLibrariesSettings.d.ts +2 -0
  15. package/dist/components/ElementLibrariesSettings.js +200 -0
  16. package/dist/components/InitialCompositionLoader.js +4 -2
  17. package/dist/components/InlineDropdown.js +26 -2
  18. package/dist/components/InlineEditableTitle.js +1 -0
  19. package/dist/components/InspectorOpenInEditor.js +13 -0
  20. package/dist/components/InspectorPanel/AlignmentControls.js +28 -9
  21. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +2 -1
  22. package/dist/components/InspectorPanel/CompositionInspector.js +3 -3
  23. package/dist/components/InspectorPanel/CompositionMetadata.js +4 -0
  24. package/dist/components/InspectorPanel/EasingInspector.js +6 -2
  25. package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -1
  26. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
  27. package/dist/components/InspectorPanel/KeyframeInspector.js +28 -24
  28. package/dist/components/InspectorPanel/MultiSequenceInspector.js +32 -1
  29. package/dist/components/InspectorPanel/MultiSequenceNumberField.js +1 -1
  30. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -1
  31. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +70 -2
  32. package/dist/components/InspectorPanel/SequenceWrapAction.d.ts +8 -0
  33. package/dist/components/InspectorPanel/SequenceWrapAction.js +151 -0
  34. package/dist/components/InspectorPanel/common.js +1 -0
  35. package/dist/components/InspectorPanel/easing-inspector-selection.d.ts +2 -1
  36. package/dist/components/InspectorPanel/easing-inspector-selection.js +4 -3
  37. package/dist/components/InspectorPanel/keyframe-inspector-frame.d.ts +2 -1
  38. package/dist/components/InspectorPanel/keyframe-inspector-frame.js +2 -2
  39. package/dist/components/InspectorPanel/styles.js +2 -0
  40. package/dist/components/InspectorPanel/use-composition-actions.js +1 -0
  41. package/dist/components/InspectorSequenceSection.d.ts +1 -0
  42. package/dist/components/InspectorSequenceSection.js +7 -5
  43. package/dist/components/InspectorSourceLocation.js +3 -0
  44. package/dist/components/KeyboardShortcutsSettings.js +1 -1
  45. package/dist/components/Menu/styles.d.ts +2 -2
  46. package/dist/components/MenuBuildIndicator.js +1 -0
  47. package/dist/components/Modals.js +7 -6
  48. package/dist/components/ModelManager.js +10 -9
  49. package/dist/components/NewComposition/CancelButton.js +11 -5
  50. package/dist/components/NewComposition/InputDragger.d.ts +3 -1
  51. package/dist/components/NewComposition/InputDragger.js +28 -9
  52. package/dist/components/NewComposition/NewComposition.js +7 -6
  53. package/dist/components/NewComposition/RemInput.d.ts +1 -1
  54. package/dist/components/NewComposition/menu-typeahead.js +1 -1
  55. package/dist/components/Preview.js +4 -0
  56. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -0
  57. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
  58. package/dist/components/RadioButton.js +1 -0
  59. package/dist/components/RenderModal/DataEditor.js +4 -1
  60. package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +1 -2
  61. package/dist/components/RenderModal/WebRenderModalPicture.js +1 -2
  62. package/dist/components/RenderQueue/CaptionQueueItem.js +19 -7
  63. package/dist/components/RenderQueue/CaptionQueueProcessor.js +65 -15
  64. package/dist/components/RenderQueue/QueueJobError.d.ts +8 -0
  65. package/dist/components/RenderQueue/QueueJobError.js +24 -0
  66. package/dist/components/RenderQueue/QueueJobErrorModal.d.ts +8 -0
  67. package/dist/components/RenderQueue/QueueJobErrorModal.js +63 -0
  68. package/dist/components/RenderQueue/RenderQueueItemCancelButton.d.ts +3 -1
  69. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +11 -4
  70. package/dist/components/RenderQueue/RenderQueueRepeat.d.ts +3 -1
  71. package/dist/components/RenderQueue/RenderQueueRepeat.js +20 -3
  72. package/dist/components/RenderQueue/VideoMattingQueueItem.js +25 -27
  73. package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +68 -28
  74. package/dist/components/RenderQueue/caption-job-types.d.ts +9 -1
  75. package/dist/components/RenderQueue/context.d.ts +4 -0
  76. package/dist/components/RenderQueue/context.js +58 -8
  77. package/dist/components/RenderQueue/index.js +3 -3
  78. package/dist/components/RenderQueue/load-model-for-job.d.ts +2 -1
  79. package/dist/components/RenderQueue/load-model-for-job.js +5 -1
  80. package/dist/components/RenderQueue/video-matting-job-types.d.ts +13 -6
  81. package/dist/components/RendersTab.js +2 -0
  82. package/dist/components/SelectedOutlineCropControls.js +2 -1
  83. package/dist/components/SelectedOutlineEditingHandles.js +9 -2
  84. package/dist/components/SelectedOutlineElement.js +9 -3
  85. package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -4
  86. package/dist/components/SelectedOutlineKeyboardControls.js +4 -22
  87. package/dist/components/SelectedOutlineOverlay.js +152 -106
  88. package/dist/components/SelectedOutlinePathPoints.d.ts +8 -0
  89. package/dist/components/SelectedOutlinePathPoints.js +433 -0
  90. package/dist/components/SelectedOutlinePolygon.js +21 -46
  91. package/dist/components/SelectedOutlineRenderer.d.ts +3 -5
  92. package/dist/components/SelectedOutlineRenderer.js +32 -136
  93. package/dist/components/SelectedOutlineSnapIndicators.d.ts +6 -0
  94. package/dist/components/SelectedOutlineSnapIndicators.js +16 -12
  95. package/dist/components/SelectedOutlineTransformOriginHandle.js +3 -2
  96. package/dist/components/SelectedOutlineUvControls.js +12 -7
  97. package/dist/components/SequencePropsSubscriptionProvider.d.ts +3 -0
  98. package/dist/components/SequencePropsSubscriptionProvider.js +8 -6
  99. package/dist/components/SettingsModal.js +30 -3
  100. package/dist/components/SettingsModalFooter.d.ts +1 -0
  101. package/dist/components/SettingsModalFooter.js +7 -3
  102. package/dist/components/ShowOutlinesProvider.js +1 -1
  103. package/dist/components/SkillsSettings.d.ts +0 -1
  104. package/dist/components/SkillsSettings.js +13 -14
  105. package/dist/components/Splitter/SplitterElement.js +1 -2
  106. package/dist/components/TimeValue.js +1 -1
  107. package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +1 -0
  108. package/dist/components/Timeline/LoopedTimelineIndicators.js +7 -6
  109. package/dist/components/Timeline/TimelineArrayField.js +1 -1
  110. package/dist/components/Timeline/TimelineClipboardKeybindings.js +0 -1
  111. package/dist/components/Timeline/TimelineColorField.js +1 -1
  112. package/dist/components/Timeline/TimelineDeleteKeybindings.js +6 -9
  113. package/dist/components/Timeline/TimelineDragHandler.js +1 -1
  114. package/dist/components/Timeline/TimelineEffectItem.js +1 -0
  115. package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
  116. package/dist/components/Timeline/TimelineEffectPropItem.js +12 -5
  117. package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -0
  118. package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -0
  119. package/dist/components/Timeline/TimelineExpandedRow.js +6 -4
  120. package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -0
  121. package/dist/components/Timeline/TimelineExpandedSection.js +2 -2
  122. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +1 -0
  123. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +3 -1
  124. package/dist/components/Timeline/TimelineFieldLabel.js +1 -0
  125. package/dist/components/Timeline/TimelineFontFamilyField.js +12 -12
  126. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -0
  127. package/dist/components/Timeline/TimelineKeyframeControls.js +40 -28
  128. package/dist/components/Timeline/TimelineLayerChildren.js +1 -1
  129. package/dist/components/Timeline/TimelineList.js +1 -1
  130. package/dist/components/Timeline/TimelineNumberField.js +2 -4
  131. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
  132. package/dist/components/Timeline/TimelineSelection.d.ts +9 -9
  133. package/dist/components/Timeline/TimelineSelection.js +16 -9
  134. package/dist/components/Timeline/TimelineSequence.d.ts +3 -1
  135. package/dist/components/Timeline/TimelineSequence.js +65 -21
  136. package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
  137. package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
  138. package/dist/components/Timeline/TimelineSequenceItem.js +46 -8
  139. package/dist/components/Timeline/TimelineSequencePropItem.d.ts +3 -0
  140. package/dist/components/Timeline/TimelineSequencePropItem.js +262 -25
  141. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +11 -13
  142. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +98 -77
  143. package/dist/components/Timeline/TimelineTextContentField.js +27 -4
  144. package/dist/components/Timeline/TimelineTimeIndicators.js +10 -5
  145. package/dist/components/Timeline/TimelineTrack.js +1 -1
  146. package/dist/components/Timeline/TimelineTrimTooltip.d.ts +11 -0
  147. package/dist/components/Timeline/TimelineTrimTooltip.js +41 -0
  148. package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
  149. package/dist/components/Timeline/TimelineVideoInfo.js +13 -10
  150. package/dist/components/Timeline/TimelineViewport.d.ts +1 -0
  151. package/dist/components/Timeline/TimelineViewport.js +10 -1
  152. package/dist/components/Timeline/delete-selected-keyframe.js +22 -8
  153. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +1 -5
  154. package/dist/components/Timeline/delete-selected-timeline-item.js +9 -95
  155. package/dist/components/Timeline/get-animation-item-selection-for-frame.d.ts +2 -1
  156. package/dist/components/Timeline/get-animation-item-selection-for-frame.js +7 -5
  157. package/dist/components/Timeline/get-keyframed-sequence-drag-targets.d.ts +23 -0
  158. package/dist/components/Timeline/get-keyframed-sequence-drag-targets.js +57 -0
  159. package/dist/components/Timeline/get-node-keyframes.d.ts +2 -1
  160. package/dist/components/Timeline/get-node-keyframes.js +6 -4
  161. package/dist/components/Timeline/get-playback-rate-keyframe-changes.d.ts +21 -0
  162. package/dist/components/Timeline/get-playback-rate-keyframe-changes.js +142 -0
  163. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
  164. package/dist/components/Timeline/get-sequence-context-menu-items.js +13 -1
  165. package/dist/components/Timeline/get-timeline-keyframes.d.ts +15 -2
  166. package/dist/components/Timeline/get-timeline-keyframes.js +44 -6
  167. package/dist/components/Timeline/keyframe-clipboard.js +17 -3
  168. package/dist/components/Timeline/split-selected-timeline-item.d.ts +13 -10
  169. package/dist/components/Timeline/split-selected-timeline-item.js +61 -35
  170. package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
  171. package/dist/components/Timeline/timeline-field-row-layout.js +1 -0
  172. package/dist/components/Timeline/use-delete-timeline-items.js +17 -11
  173. package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +2 -1
  174. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +3 -1
  175. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -3
  176. package/dist/components/Timeline/use-timeline-keyframe-drag.js +28 -19
  177. package/dist/components/TimelineCombobox.js +1 -0
  178. package/dist/components/Transcription/Models.js +1 -1
  179. package/dist/components/Transcription/TranscriptionModal.js +18 -11
  180. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +1 -1
  181. package/dist/components/Transcription/resample-media-to-16-khz.d.ts +2 -1
  182. package/dist/components/Transcription/resample-media-to-16-khz.js +20 -2
  183. package/dist/components/UpdatesSettings.js +2 -0
  184. package/dist/components/VideoMatting/Models.js +1 -1
  185. package/dist/components/VideoMatting/VideoMattingModal.js +30 -47
  186. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +1 -1
  187. package/dist/components/WebMcp.js +23 -40
  188. package/dist/components/composition-drop-preview.d.ts +9 -2
  189. package/dist/components/composition-drop-preview.js +8 -4
  190. package/dist/components/composition-menu-items.js +4 -4
  191. package/dist/components/delete-jsx-nodes-api.d.ts +2 -0
  192. package/dist/components/{delete-jsx-node-api.js → delete-jsx-nodes-api.js} +5 -5
  193. package/dist/components/effect-drag-and-drop.d.ts +13 -5
  194. package/dist/components/effect-drag-and-drop.js +19 -4
  195. package/dist/components/get-open-in-menu-items.d.ts +2 -1
  196. package/dist/components/get-open-in-menu-items.js +24 -8
  197. package/dist/components/keyboard-shortcuts.d.ts +4 -4
  198. package/dist/components/keyboard-shortcuts.js +3 -1
  199. package/dist/components/public-output-name.d.ts +1 -0
  200. package/dist/components/public-output-name.js +7 -3
  201. package/dist/components/selected-outline-drag.d.ts +1 -6
  202. package/dist/components/selected-outline-drag.js +22 -6
  203. package/dist/components/selected-outline-geometry.d.ts +2 -18
  204. package/dist/components/selected-outline-measurement.d.ts +23 -41
  205. package/dist/components/selected-outline-measurement.js +14 -252
  206. package/dist/components/selected-outline-order.d.ts +4 -11
  207. package/dist/components/selected-outline-order.js +2 -254
  208. package/dist/components/selected-outline-snap.d.ts +1 -1
  209. package/dist/components/selected-outline-snap.js +2 -1
  210. package/dist/components/selected-outline-types.d.ts +18 -28
  211. package/dist/components/selected-outline-uv.d.ts +4 -4
  212. package/dist/components/selected-outline-uv.js +6 -111
  213. package/dist/components/sequence-props-api.js +0 -10
  214. package/dist/components/use-selected-outline-control-target.js +12 -21
  215. package/dist/components/wrap-jsx-node-api.d.ts +2 -0
  216. package/dist/components/wrap-jsx-node-api.js +13 -0
  217. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +45 -2
  218. package/dist/error-overlay/remotion-overlay/StackFrame.js +32 -3
  219. package/dist/esm/{CaptionQueueProcessor-k0yrm3dj.mjs → CaptionQueueProcessor-nr7hjcga.mjs} +96 -19
  220. package/dist/esm/LazyModels-ajkn7fs3.mjs +12 -0
  221. package/dist/esm/LazyModels-g1g7cf4e.mjs +12 -0
  222. package/dist/esm/{TranscriptionModal-ymnx1c7m.mjs → TranscriptionModal-e18bzbkb.mjs} +30 -22
  223. package/dist/esm/{VideoMattingModal-05vpczks.mjs → VideoMattingModal-5bz2s4rs.mjs} +47 -62
  224. package/dist/esm/{VideoMattingQueueProcessor-t1hgm2rm.mjs → VideoMattingQueueProcessor-4tkj0f4k.mjs} +69 -26
  225. package/dist/esm/{index-v4tr1bft.mjs → index-09txs1bj.mjs} +5 -0
  226. package/dist/esm/{index-4dsz9035.mjs → index-5ycb9e9q.mjs} +2 -4
  227. package/dist/esm/index-890dd9b3.mjs +768 -0
  228. package/dist/esm/{index-5bfxbpca.mjs → index-8nt6a0mw.mjs} +3 -3
  229. package/dist/esm/{index-5gd8k9yv.mjs → index-9q9w8v9p.mjs} +3 -3
  230. package/dist/esm/{index-x40wwfmt.mjs → index-c2wabcdt.mjs} +8 -6
  231. package/dist/esm/index-dfy1t576.mjs +129 -0
  232. package/dist/esm/index-dh3zk2hv.mjs +220 -0
  233. package/dist/esm/{index-0gewwxse.mjs → index-dpyss74p.mjs} +6179 -5011
  234. package/dist/esm/{index-9x6e1dq0.mjs → index-hqxc6tzp.mjs} +40 -6
  235. package/dist/esm/{index-cdy8v54v.mjs → index-qve7mdfp.mjs} +36 -539
  236. package/dist/esm/{index-eb5txqp6.mjs → index-s6qya2gg.mjs} +8 -88
  237. package/dist/esm/index-t7tbt980.mjs +103 -0
  238. package/dist/esm/{index-g7k2dvar.mjs → index-t7xnxdf8.mjs} +44 -26
  239. package/dist/esm/index-wqc43mw0.mjs +158 -0
  240. package/dist/esm/{index-bs39wngg.mjs → index-x6r9bn12.mjs} +5623 -6218
  241. package/dist/esm/{index-f97r9e2g.mjs → index-xac20sv4.mjs} +46 -57
  242. package/dist/esm/index.mjs +4 -4
  243. package/dist/esm/internals.mjs +13 -10
  244. package/dist/esm/previewEntry.mjs +18 -12
  245. package/dist/esm/renderEntry.mjs +5 -1
  246. package/dist/esm/{resolve-composition-component-location-bt2d6qxq.mjs → resolve-composition-component-location-2hgf6g0a.mjs} +1 -1
  247. package/dist/helpers/calculate-timeline.d.ts +5 -1
  248. package/dist/helpers/calculate-timeline.js +1 -1
  249. package/dist/helpers/checkerboard-background.d.ts +2 -2
  250. package/dist/helpers/colors.d.ts +132 -112
  251. package/dist/helpers/colors.js +117 -95
  252. package/dist/helpers/copy-text.js +1 -16
  253. package/dist/helpers/create-folder-tree.js +2 -1
  254. package/dist/helpers/editor-guide-selection.d.ts +1 -1
  255. package/dist/helpers/editor-ruler.js +23 -12
  256. package/dist/helpers/get-connected-compositions.d.ts +6 -1
  257. package/dist/helpers/get-connected-compositions.js +1 -1
  258. package/dist/helpers/get-sequence-double-click-action.js +1 -1
  259. package/dist/helpers/get-sequence-visible-range.d.ts +1 -1
  260. package/dist/helpers/get-sequence-visible-range.js +2 -5
  261. package/dist/helpers/get-timeline-nestedness.d.ts +1 -1
  262. package/dist/helpers/get-timeline-nestedness.js +1 -1
  263. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
  264. package/dist/helpers/get-timeline-sequence-sort-key.js +1 -1
  265. package/dist/helpers/hoverable.js +6 -5
  266. package/dist/helpers/inject-css.js +5 -7
  267. package/dist/helpers/open-in-editor.js +1 -1
  268. package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -1
  269. package/dist/helpers/prism-vsc-dark-plus.js +52 -51
  270. package/dist/helpers/resolve-studio-color.d.ts +1 -0
  271. package/dist/helpers/resolve-studio-color.js +11 -0
  272. package/dist/helpers/studio-css-variables.d.ts +1 -0
  273. package/dist/helpers/studio-css-variables.js +105 -0
  274. package/dist/helpers/studio-pixel-ratio.d.ts +1 -0
  275. package/dist/helpers/studio-pixel-ratio.js +7 -0
  276. package/dist/helpers/studio-runtime-config.d.ts +1 -1
  277. package/dist/helpers/timeline-node-path-key.d.ts +1 -1
  278. package/dist/helpers/timeline-node-path-key.js +2 -2
  279. package/dist/helpers/use-keybinding.d.ts +1 -1
  280. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
  281. package/dist/helpers/use-menu-structure.js +15 -9
  282. package/dist/helpers/use-runtime-values.js +2 -28
  283. package/dist/hot-middleware-client/client.js +5 -3
  284. package/dist/icons/align-center-horizontal.js +2 -1
  285. package/dist/icons/align-left.js +2 -1
  286. package/dist/icons/align-right.js +2 -1
  287. package/dist/icons/{separation.d.ts → background-removal.d.ts} +1 -1
  288. package/dist/icons/background-removal.js +9 -0
  289. package/dist/icons/wrap.d.ts +4 -0
  290. package/dist/icons/wrap.js +10 -0
  291. package/dist/previewEntry.js +2 -0
  292. package/dist/renderEntry.js +2 -0
  293. package/dist/state/modals.d.ts +20 -1
  294. package/dist/state/timeline-sequence-hover.d.ts +6 -16
  295. package/dist/state/timeline-sequence-hover.js +6 -67
  296. package/dist/state/timeline-zoom.js +4 -0
  297. package/package.json +20 -19
  298. package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.d.ts +0 -15
  299. package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.js +0 -31
  300. package/dist/components/delete-jsx-node-api.d.ts +0 -2
  301. package/dist/esm/LazyModels-mtggyjye.mjs +0 -11
  302. package/dist/esm/LazyModels-nk7py0zt.mjs +0 -11
  303. package/dist/esm/index-cw0pnpg5.mjs +0 -50
  304. package/dist/esm/index-k426ye99.mjs +0 -139
  305. package/dist/helpers/get-box-quads-polyfill-internals.d.ts +0 -82
  306. package/dist/helpers/get-box-quads-polyfill-internals.js +0 -2403
  307. package/dist/helpers/get-box-quads-ponyfill.d.ts +0 -10
  308. package/dist/helpers/get-box-quads-ponyfill.js +0 -23
  309. package/dist/icons/separation.js +0 -7
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRulerScaleRange = exports.getRulerPoints = exports.drawMarkingOnRulerCanvas = void 0;
4
4
  const editor_rulers_1 = require("../state/editor-rulers");
5
5
  const colors_1 = require("./colors");
6
+ const resolve_studio_color_1 = require("./resolve-studio-color");
7
+ const studio_pixel_ratio_1 = require("./studio-pixel-ratio");
6
8
  const drawLabel = ({ orientation, context, label, originDistance, color, }) => {
7
9
  context.fillStyle = color;
8
10
  if (orientation === 'horizontal') {
@@ -14,22 +16,25 @@ const drawLabel = ({ orientation, context, label, originDistance, color, }) => {
14
16
  context.rotate(Math.PI / 2);
15
17
  }
16
18
  };
17
- const drawGradient = ({ orientation, context, originDistance, canvasHeight, canvasWidth, }) => {
19
+ const drawGradient = ({ orientation, context, computedStyle, originDistance, canvasHeight, canvasWidth, }) => {
18
20
  const size = 250;
19
21
  const startX = orientation === 'horizontal' ? originDistance - size / 2 : 0;
20
22
  const startY = orientation === 'horizontal' ? 0 : originDistance - size / 2;
21
23
  const endX = orientation === 'horizontal' ? originDistance + size / 2 : canvasWidth;
22
24
  const endY = orientation === 'horizontal' ? canvasHeight : originDistance + size / 2;
23
25
  const grd = context.createLinearGradient(startX, startY, endX, endY);
24
- grd.addColorStop(0, colors_1.BACKGROUND__TRANSPARENT);
25
- grd.addColorStop(0.25, colors_1.BACKGROUND);
26
- grd.addColorStop(0.75, colors_1.BACKGROUND);
27
- grd.addColorStop(1, colors_1.BACKGROUND__TRANSPARENT);
26
+ const background = (0, resolve_studio_color_1.resolveStudioColor)(colors_1.BACKGROUND, computedStyle);
27
+ const transparentBackground = (0, resolve_studio_color_1.resolveStudioColor)(colors_1.BACKGROUND__TRANSPARENT, computedStyle);
28
+ grd.addColorStop(0, transparentBackground);
29
+ grd.addColorStop(0.25, background);
30
+ grd.addColorStop(0.75, background);
31
+ grd.addColorStop(1, transparentBackground);
28
32
  context.fillStyle = grd;
29
33
  context.fillRect(startX, startY, endX - startX, endY - startY);
30
34
  };
31
- const drawGuide = ({ guideHighlight, scale, startMarking, context, canvasHeight, canvasWidth, orientation, originOffset, }) => {
32
- const { guide, color } = guideHighlight;
35
+ const drawGuide = ({ guideHighlight, scale, startMarking, context, computedStyle, canvasHeight, canvasWidth, orientation, originOffset, }) => {
36
+ const { guide } = guideHighlight;
37
+ const color = (0, resolve_studio_color_1.resolveStudioColor)(guideHighlight.color, computedStyle);
33
38
  const originDistance = rulerValueToPosition({
34
39
  value: guide.position,
35
40
  startMarking,
@@ -41,6 +46,7 @@ const drawGuide = ({ guideHighlight, scale, startMarking, context, canvasHeight,
41
46
  drawGradient({
42
47
  canvasHeight,
43
48
  context,
49
+ computedStyle,
44
50
  orientation,
45
51
  originDistance,
46
52
  canvasWidth,
@@ -85,15 +91,19 @@ const drawMarkingOnRulerCanvas = ({ scale, points, startMarking, originOffset, m
85
91
  const context = canvas.getContext('2d');
86
92
  if (!context)
87
93
  return;
94
+ const computedStyle = getComputedStyle(canvas);
95
+ const tickColor = (0, resolve_studio_color_1.resolveStudioColor)(colors_1.WHITE_ALPHA_15, computedStyle);
96
+ const labelColor = (0, resolve_studio_color_1.resolveStudioColor)(colors_1.LIGHT_TEXT, computedStyle);
88
97
  canvas.width = canvasWidth;
89
98
  canvas.height = canvasHeight;
90
- context.scale(window.devicePixelRatio, window.devicePixelRatio);
99
+ const pixelRatio = (0, studio_pixel_ratio_1.getStudioPixelRatio)();
100
+ context.scale(pixelRatio, pixelRatio);
91
101
  context.clearRect(0, 0, canvasWidth, canvasHeight);
92
- context.strokeStyle = colors_1.WHITE_ALPHA_15;
102
+ context.strokeStyle = tickColor;
93
103
  context.lineWidth = 1;
94
104
  context.beginPath();
95
105
  points.forEach((point) => {
96
- context.strokeStyle = colors_1.WHITE_ALPHA_15;
106
+ context.strokeStyle = tickColor;
97
107
  context.lineWidth = 1;
98
108
  const originDistance = point.position + originOffset - startMarking * scale;
99
109
  context.beginPath();
@@ -119,17 +129,18 @@ const drawMarkingOnRulerCanvas = ({ scale, points, startMarking, originOffset, m
119
129
  context.stroke();
120
130
  context.font = '10px Arial, Helvetica, sans-serif';
121
131
  context.textAlign = 'left';
122
- context.fillStyle = colors_1.LIGHT_TEXT;
132
+ context.fillStyle = labelColor;
123
133
  drawLabel({
124
134
  orientation,
125
135
  context,
126
136
  label: point.value.toString(),
127
137
  originDistance,
128
- color: colors_1.LIGHT_TEXT,
138
+ color: labelColor,
129
139
  });
130
140
  });
131
141
  if (guideHighlight && orientation !== guideHighlight.guide.orientation) {
132
142
  drawGuide({
143
+ computedStyle,
133
144
  canvasHeight,
134
145
  canvasWidth,
135
146
  context,
@@ -1 +1,6 @@
1
- export { getConnectedCompositions } from '@remotion/canvas';
1
+ export declare const getConnectedCompositions: <Composition extends {
2
+ readonly componentFromProps?: unknown;
3
+ }>({ compositions, singleChildComponent, }: {
4
+ readonly compositions: readonly Composition[];
5
+ readonly singleChildComponent: unknown;
6
+ }) => Composition[];
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getConnectedCompositions = void 0;
4
4
  const canvas_1 = require("@remotion/canvas");
5
- Object.defineProperty(exports, "getConnectedCompositions", { enumerable: true, get: function () { return canvas_1.getConnectedCompositions; } });
5
+ ({ getConnectedCompositions: exports.getConnectedCompositions } = canvas_1.CanvasInternals);
@@ -23,6 +23,6 @@ const getConnectedCompositionFrame = ({ timelinePosition, sequence, sequenceFram
23
23
  if (relativeFrame < 0 || relativeFrame >= sequence.duration) {
24
24
  return null;
25
25
  }
26
- return (_a = sequence.frozenFrame) !== null && _a !== void 0 ? _a : relativeFrame + sequenceFrameOffset;
26
+ return ((_a = sequence.frozenFrame) !== null && _a !== void 0 ? _a : relativeFrame * sequence.sequencePlaybackRate + sequenceFrameOffset);
27
27
  };
28
28
  exports.getConnectedCompositionFrame = getConnectedCompositionFrame;
@@ -1 +1 @@
1
- export { getCascadedStart, getCascadedStartWithTrim, getTimelineVisibleDuration, getTimelineVisibleStart, } from '@remotion/canvas';
1
+ export declare const getParentSequencePlaybackRate: (sequence: import("remotion").TSequence, sequences: import("remotion").TSequence[]) => number, getCascadedStart: (sequence: import("remotion").TSequence, sequences: import("remotion").TSequence[]) => number, getCascadedStartWithTrim: (sequence: import("remotion").TSequence, sequences: import("remotion").TSequence[]) => number, getTimelineVisibleDuration: (sequence: import("remotion").TSequence, sequences: import("remotion").TSequence[]) => number, getTimelineVisibleStart: (sequence: import("remotion").TSequence, sequences: import("remotion").TSequence[]) => number;
@@ -1,8 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTimelineVisibleStart = exports.getTimelineVisibleDuration = exports.getCascadedStartWithTrim = exports.getCascadedStart = void 0;
3
+ exports.getTimelineVisibleStart = exports.getTimelineVisibleDuration = exports.getCascadedStartWithTrim = exports.getCascadedStart = exports.getParentSequencePlaybackRate = void 0;
4
4
  const canvas_1 = require("@remotion/canvas");
5
- Object.defineProperty(exports, "getCascadedStart", { enumerable: true, get: function () { return canvas_1.getCascadedStart; } });
6
- Object.defineProperty(exports, "getCascadedStartWithTrim", { enumerable: true, get: function () { return canvas_1.getCascadedStartWithTrim; } });
7
- Object.defineProperty(exports, "getTimelineVisibleDuration", { enumerable: true, get: function () { return canvas_1.getTimelineVisibleDuration; } });
8
- Object.defineProperty(exports, "getTimelineVisibleStart", { enumerable: true, get: function () { return canvas_1.getTimelineVisibleStart; } });
5
+ ({ getParentSequencePlaybackRate: exports.getParentSequencePlaybackRate, getCascadedStart: exports.getCascadedStart, getCascadedStartWithTrim: exports.getCascadedStartWithTrim, getTimelineVisibleDuration: exports.getTimelineVisibleDuration, getTimelineVisibleStart: exports.getTimelineVisibleStart } = canvas_1.CanvasInternals);
@@ -1 +1 @@
1
- export { getTimelineNestedLevel } from '@remotion/canvas';
1
+ export declare const getTimelineNestedLevel: (sequence: import("remotion").TSequence, allSequences: import("remotion").TSequence[], depth: number) => number;
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getTimelineNestedLevel = void 0;
4
4
  const canvas_1 = require("@remotion/canvas");
5
- Object.defineProperty(exports, "getTimelineNestedLevel", { enumerable: true, get: function () { return canvas_1.getTimelineNestedLevel; } });
5
+ ({ getTimelineNestedLevel: exports.getTimelineNestedLevel } = canvas_1.CanvasInternals);
@@ -1,2 +1,2 @@
1
- export { getTimelineSequenceSortKey } from '@remotion/canvas';
1
+ export declare const getTimelineSequenceSortKey: (track: import("@remotion/canvas").TimelineTrackData, tracks: import("@remotion/canvas").TimelineTrackData[], sequenceRanks: Map<string, number>) => string;
2
2
  export type { SequenceNodePathInfo, TimelineTrackData, TimelineTrackWithOriginalTimings, } from '@remotion/canvas';
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getTimelineSequenceSortKey = void 0;
4
4
  const canvas_1 = require("@remotion/canvas");
5
- Object.defineProperty(exports, "getTimelineSequenceSortKey", { enumerable: true, get: function () { return canvas_1.getTimelineSequenceSortKey; } });
5
+ ({ getTimelineSequenceSortKey: exports.getTimelineSequenceSortKey } = canvas_1.CanvasInternals);
@@ -12,10 +12,10 @@ exports.HOVERABLE_CLASS_NAME = '__remotion-hoverable';
12
12
  exports.HOVER_GROUP_CLASS_NAME = '__remotion-hover-group';
13
13
  exports.HOVER_GROUP_REVEAL_CLASS_NAME = '__remotion-hover-group-reveal';
14
14
  exports.FOCUS_VISIBLE_ONLY_CLASS_NAME = '__remotion-focus-visible-only';
15
- const BG_VARIABLE = '--remotion-hoverable-bg';
16
- const HOVER_BG_VARIABLE = '--remotion-hoverable-hover-bg';
17
- const COLOR_VARIABLE = '--remotion-hoverable-color';
18
- const HOVER_COLOR_VARIABLE = '--remotion-hoverable-hover-color';
15
+ const BG_VARIABLE = '--remotion-studio-hoverable-bg';
16
+ const HOVER_BG_VARIABLE = '--remotion-studio-hoverable-hover-bg';
17
+ const COLOR_VARIABLE = '--remotion-studio-hoverable-color';
18
+ const HOVER_COLOR_VARIABLE = '--remotion-studio-hoverable-hover-color';
19
19
  exports.NO_HOVER_BACKGROUND_STYLE = {
20
20
  [HOVER_BG_VARIABLE]: colors_1.TRANSPARENT,
21
21
  };
@@ -77,7 +77,8 @@ const makeHoverableCSS = () => `
77
77
  overflow: hidden;
78
78
  }
79
79
 
80
- ${hoverGroup}:hover ${reveal} {
80
+ ${hoverGroup}:hover ${reveal},
81
+ ${hoverGroup}:has([aria-expanded="true"]) ${reveal} {
81
82
  opacity: 1;
82
83
  width: auto;
83
84
  overflow: visible;
@@ -11,8 +11,6 @@ const makeDefaultGlobalCSS = () => {
11
11
  const fromMiddle = 50 / dragAreaFactor;
12
12
  return `
13
13
  html {
14
- --remotion-cli-internals-blue: ${colors_1.BLUE};
15
- --remotion-cli-internals-blue-hovered: ${colors_1.BLUE_HOVERED};
16
14
  overscroll-behavior-y: none;
17
15
  }
18
16
 
@@ -99,7 +97,7 @@ const makeDefaultGlobalCSS = () => {
99
97
 
100
98
  .__remotion_thumb {
101
99
  appearance: none;
102
- background: transparent;
100
+ background: ${colors_1.TRANSPARENT};
103
101
  border: 0;
104
102
  height: 100%;
105
103
  left: 0;
@@ -114,13 +112,13 @@ const makeDefaultGlobalCSS = () => {
114
112
  }
115
113
 
116
114
  .__remotion_thumb::-moz-range-track {
117
- background: transparent;
115
+ background: ${colors_1.TRANSPARENT};
118
116
  border: 0;
119
117
  height: 6px;
120
118
  }
121
119
 
122
120
  .__remotion_thumb::-webkit-slider-runnable-track {
123
- background: transparent;
121
+ background: ${colors_1.TRANSPARENT};
124
122
  border: 0;
125
123
  height: 6px;
126
124
  }
@@ -152,11 +150,11 @@ const makeDefaultGlobalCSS = () => {
152
150
  }
153
151
 
154
152
  .__remotion_input_dragger:hover > span:first-child {
155
- color: var(--remotion-cli-internals-blue-hovered) !important;
153
+ color: ${colors_1.BLUE_HOVERED} !important;
156
154
  }
157
155
 
158
156
  .${scroll_to_default_props_path_1.DEFAULT_PROPS_PATH_ACTIVE_CLASSNAME} span {
159
- color: var(--remotion-cli-internals-blue) !important;
157
+ color: ${colors_1.BLUE} !important;
160
158
  transition: color 0.2s ease-in-out;
161
159
  }
162
160
 
@@ -174,7 +174,7 @@ const loadCompositionComponentInfo = async ({ compositionFile, compositionId, })
174
174
  if (files === null) {
175
175
  throw new Error(`Could not find source map contents for ${compositionFile}`);
176
176
  }
177
- const { resolveCompositionComponentLocation } = await Promise.resolve().then(() => __importStar(require('@remotion/studio-codemods/resolve-composition-component-location')));
177
+ const { resolveCompositionComponentLocation } = await Promise.resolve().then(() => __importStar(require('@remotion/codemods/resolve-composition-component-location')));
178
178
  return {
179
179
  canAddSequence: false,
180
180
  location: resolveCompositionComponentLocation({
@@ -1 +1 @@
1
- export declare const prismVscDarkPlus = "pre[class*=\"language-\"],\ncode[class*=\"language-\"] {\n\tcolor: #d4d4d4;\n\tfont-size: 13px;\n\ttext-shadow: none;\n\tfont-family: Menlo, Monaco, Consolas, \"Andale Mono\", \"Ubuntu Mono\", \"Courier New\", monospace;\n\tdirection: ltr;\n\ttext-align: left;\n\twhite-space: pre;\n\tword-spacing: normal;\n\tword-break: normal;\n\tline-height: 1.5;\n\t-moz-tab-size: 4;\n\t-o-tab-size: 4;\n\ttab-size: 4;\n\t-webkit-hyphens: none;\n\t-moz-hyphens: none;\n\t-ms-hyphens: none;\n\thyphens: none;\n}\n\npre[class*=\"language-\"]::selection,\ncode[class*=\"language-\"]::selection,\npre[class*=\"language-\"] *::selection,\ncode[class*=\"language-\"] *::selection {\n\ttext-shadow: none;\n\tbackground: #264F78;\n}\n\n@media print {\n\tpre[class*=\"language-\"],\n\tcode[class*=\"language-\"] {\n\t\ttext-shadow: none;\n\t}\n}\n\npre[class*=\"language-\"] {\n\tpadding: 1em;\n\tmargin: .5em 0;\n\toverflow: auto;\n\tbackground: #1e1e1e;\n}\n\n:not(pre) > code[class*=\"language-\"] {\n\tpadding: .1em .3em;\n\tborder-radius: .3em;\n\tcolor: #db4c69;\n\tbackground: #1e1e1e;\n}\n/*********************************************************\n* Tokens\n*/\n.namespace {\n\topacity: .7;\n}\n\n.token.doctype .token.doctype-tag {\n\tcolor: #569CD6;\n}\n\n.token.doctype .token.name {\n\tcolor: #9cdcfe;\n}\n\n.token.comment,\n.token.prolog {\n\tcolor: #6a9955;\n}\n\n.token.punctuation,\n.language-html .language-css .token.punctuation,\n.language-html .language-javascript .token.punctuation {\n\tcolor: #d4d4d4;\n}\n\n.token.property,\n.token.tag,\n.token.boolean,\n.token.number,\n.token.constant,\n.token.symbol,\n.token.inserted,\n.token.unit {\n\tcolor: #b5cea8;\n}\n\n.token.selector,\n.token.attr-name,\n.token.string,\n.token.char,\n.token.builtin,\n.token.deleted {\n\tcolor: #ce9178;\n}\n\n.language-css .token.string.url {\n\ttext-decoration: underline;\n}\n\n.token.operator,\n.token.entity {\n\tcolor: #d4d4d4;\n}\n\n.token.operator.arrow {\n\tcolor: #569CD6;\n}\n\n.token.atrule {\n\tcolor: #ce9178;\n}\n\n.token.atrule .token.rule {\n\tcolor: #c586c0;\n}\n\n.token.atrule .token.url {\n\tcolor: #9cdcfe;\n}\n\n.token.atrule .token.url .token.function {\n\tcolor: #dcdcaa;\n}\n\n.token.atrule .token.url .token.punctuation {\n\tcolor: #d4d4d4;\n}\n\n.token.keyword {\n\tcolor: #569CD6;\n}\n\n.token.keyword.module,\n.token.keyword.control-flow {\n\tcolor: #c586c0;\n}\n\n.token.function,\n.token.function .token.maybe-class-name {\n\tcolor: #dcdcaa;\n}\n\n.token.regex {\n\tcolor: #d16969;\n}\n\n.token.important {\n\tcolor: #569cd6;\n}\n\n.token.italic {\n\tfont-style: italic;\n}\n\n.token.constant {\n\tcolor: #9cdcfe;\n}\n\n.token.class-name,\n.token.maybe-class-name {\n\tcolor: #4ec9b0;\n}\n\n.token.console {\n\tcolor: #9cdcfe;\n}\n\n.token.parameter {\n\tcolor: #9cdcfe;\n}\n\n.token.interpolation {\n\tcolor: #9cdcfe;\n}\n\n.token.punctuation.interpolation-punctuation {\n\tcolor: #569cd6;\n}\n\n.token.boolean {\n\tcolor: #569cd6;\n}\n\n.token.property,\n.token.variable,\n.token.imports .token.maybe-class-name,\n.token.exports .token.maybe-class-name {\n\tcolor: #9cdcfe;\n}\n\n.token.selector {\n\tcolor: #d7ba7d;\n}\n\n.token.escape {\n\tcolor: #d7ba7d;\n}\n\n.token.tag {\n\tcolor: #569cd6;\n}\n\n.token.tag .token.punctuation {\n\tcolor: #808080;\n}\n\n.token.cdata {\n\tcolor: #808080;\n}\n\n.token.attr-name {\n\tcolor: #9cdcfe;\n}\n\n.token.attr-value,\n.token.attr-value .token.punctuation {\n\tcolor: #ce9178;\n}\n\n.token.attr-value .token.punctuation.attr-equals {\n\tcolor: #d4d4d4;\n}\n\n.token.entity {\n\tcolor: #569cd6;\n}\n\n.token.namespace {\n\tcolor: #4ec9b0;\n}\n/*********************************************************\n* Language Specific\n*/\n\npre[class*=\"language-javascript\"],\ncode[class*=\"language-javascript\"],\npre[class*=\"language-jsx\"],\ncode[class*=\"language-jsx\"],\npre[class*=\"language-typescript\"],\ncode[class*=\"language-typescript\"],\npre[class*=\"language-tsx\"],\ncode[class*=\"language-tsx\"] {\n\tcolor: #9cdcfe;\n}\n\npre[class*=\"language-css\"],\ncode[class*=\"language-css\"] {\n\tcolor: #ce9178;\n}\n\npre[class*=\"language-html\"],\ncode[class*=\"language-html\"] {\n\tcolor: #d4d4d4;\n}\n\n.language-regex .token.anchor {\n\tcolor: #dcdcaa;\n}\n\n.language-html .token.punctuation {\n\tcolor: #808080;\n}\n/*********************************************************\n* Line highlighting\n*/\npre[class*=\"language-\"] > code[class*=\"language-\"] {\n\tposition: relative;\n\tz-index: 1;\n}\n\n.line-highlight.line-highlight {\n\tbackground: #f7ebc6;\n\tbox-shadow: inset 5px 0 0 #f7d87c;\n\tz-index: 0;\n}\n";
1
+ export declare const prismVscDarkPlus = "pre[class*=\"language-\"],\ncode[class*=\"language-\"] {\n\tcolor: var(--remotion-studio-prism-text-color);\n\tfont-size: 13px;\n\ttext-shadow: none;\n\tfont-family: Menlo, Monaco, Consolas, \"Andale Mono\", \"Ubuntu Mono\", \"Courier New\", monospace;\n\tdirection: ltr;\n\ttext-align: left;\n\twhite-space: pre;\n\tword-spacing: normal;\n\tword-break: normal;\n\tline-height: 1.5;\n\t-moz-tab-size: 4;\n\t-o-tab-size: 4;\n\ttab-size: 4;\n\t-webkit-hyphens: none;\n\t-moz-hyphens: none;\n\t-ms-hyphens: none;\n\thyphens: none;\n}\n\npre[class*=\"language-\"]::selection,\ncode[class*=\"language-\"]::selection,\npre[class*=\"language-\"] *::selection,\ncode[class*=\"language-\"] *::selection {\n\ttext-shadow: none;\n\tbackground: var(--remotion-studio-prism-selection-background);\n}\n\n@media print {\n\tpre[class*=\"language-\"],\n\tcode[class*=\"language-\"] {\n\t\ttext-shadow: none;\n\t}\n}\n\npre[class*=\"language-\"] {\n\tpadding: 1em;\n\tmargin: .5em 0;\n\toverflow: auto;\n\tbackground: var(--remotion-studio-prism-background);\n}\n\n:not(pre) > code[class*=\"language-\"] {\n\tpadding: .1em .3em;\n\tborder-radius: .3em;\n\tcolor: var(--remotion-studio-prism-inline-color);\n\tbackground: var(--remotion-studio-prism-background);\n}\n/*********************************************************\n* Tokens\n*/\n.namespace {\n\topacity: .7;\n}\n\n.token.doctype .token.doctype-tag {\n\tcolor: var(--remotion-studio-prism-keyword-color);\n}\n\n.token.doctype .token.name {\n\tcolor: var(--remotion-studio-prism-variable-color);\n}\n\n.token.comment,\n.token.prolog {\n\tcolor: var(--remotion-studio-prism-comment-color);\n}\n\n.token.punctuation,\n.language-html .language-css .token.punctuation,\n.language-html .language-javascript .token.punctuation {\n\tcolor: var(--remotion-studio-prism-text-color);\n}\n\n.token.property,\n.token.tag,\n.token.boolean,\n.token.number,\n.token.constant,\n.token.symbol,\n.token.inserted,\n.token.unit {\n\tcolor: var(--remotion-studio-prism-number-color);\n}\n\n.token.selector,\n.token.attr-name,\n.token.string,\n.token.char,\n.token.builtin,\n.token.deleted {\n\tcolor: var(--remotion-studio-prism-string-color);\n}\n\n.language-css .token.string.url {\n\ttext-decoration: underline;\n}\n\n.token.operator,\n.token.entity {\n\tcolor: var(--remotion-studio-prism-text-color);\n}\n\n.token.operator.arrow {\n\tcolor: var(--remotion-studio-prism-keyword-color);\n}\n\n.token.atrule {\n\tcolor: var(--remotion-studio-prism-string-color);\n}\n\n.token.atrule .token.rule {\n\tcolor: var(--remotion-studio-prism-control-flow-color);\n}\n\n.token.atrule .token.url {\n\tcolor: var(--remotion-studio-prism-variable-color);\n}\n\n.token.atrule .token.url .token.function {\n\tcolor: var(--remotion-studio-prism-function-color);\n}\n\n.token.atrule .token.url .token.punctuation {\n\tcolor: var(--remotion-studio-prism-text-color);\n}\n\n.token.keyword {\n\tcolor: var(--remotion-studio-prism-keyword-color);\n}\n\n.token.keyword.module,\n.token.keyword.control-flow {\n\tcolor: var(--remotion-studio-prism-control-flow-color);\n}\n\n.token.function,\n.token.function .token.maybe-class-name {\n\tcolor: var(--remotion-studio-prism-function-color);\n}\n\n.token.regex {\n\tcolor: var(--remotion-studio-prism-regex-color);\n}\n\n.token.important {\n\tcolor: var(--remotion-studio-prism-keyword-color);\n}\n\n.token.italic {\n\tfont-style: italic;\n}\n\n.token.constant {\n\tcolor: var(--remotion-studio-prism-variable-color);\n}\n\n.token.class-name,\n.token.maybe-class-name {\n\tcolor: var(--remotion-studio-prism-class-name-color);\n}\n\n.token.console {\n\tcolor: var(--remotion-studio-prism-variable-color);\n}\n\n.token.parameter {\n\tcolor: var(--remotion-studio-prism-variable-color);\n}\n\n.token.interpolation {\n\tcolor: var(--remotion-studio-prism-variable-color);\n}\n\n.token.punctuation.interpolation-punctuation {\n\tcolor: var(--remotion-studio-prism-keyword-color);\n}\n\n.token.boolean {\n\tcolor: var(--remotion-studio-prism-keyword-color);\n}\n\n.token.property,\n.token.variable,\n.token.imports .token.maybe-class-name,\n.token.exports .token.maybe-class-name {\n\tcolor: var(--remotion-studio-prism-variable-color);\n}\n\n.token.selector {\n\tcolor: var(--remotion-studio-prism-selector-color);\n}\n\n.token.escape {\n\tcolor: var(--remotion-studio-prism-selector-color);\n}\n\n.token.tag {\n\tcolor: var(--remotion-studio-prism-keyword-color);\n}\n\n.token.tag .token.punctuation {\n\tcolor: var(--remotion-studio-ruler-color);\n}\n\n.token.cdata {\n\tcolor: var(--remotion-studio-ruler-color);\n}\n\n.token.attr-name {\n\tcolor: var(--remotion-studio-prism-variable-color);\n}\n\n.token.attr-value,\n.token.attr-value .token.punctuation {\n\tcolor: var(--remotion-studio-prism-string-color);\n}\n\n.token.attr-value .token.punctuation.attr-equals {\n\tcolor: var(--remotion-studio-prism-text-color);\n}\n\n.token.entity {\n\tcolor: var(--remotion-studio-prism-keyword-color);\n}\n\n.token.namespace {\n\tcolor: var(--remotion-studio-prism-class-name-color);\n}\n/*********************************************************\n* Language Specific\n*/\n\npre[class*=\"language-javascript\"],\ncode[class*=\"language-javascript\"],\npre[class*=\"language-jsx\"],\ncode[class*=\"language-jsx\"],\npre[class*=\"language-typescript\"],\ncode[class*=\"language-typescript\"],\npre[class*=\"language-tsx\"],\ncode[class*=\"language-tsx\"] {\n\tcolor: var(--remotion-studio-prism-variable-color);\n}\n\npre[class*=\"language-css\"],\ncode[class*=\"language-css\"] {\n\tcolor: var(--remotion-studio-prism-string-color);\n}\n\npre[class*=\"language-html\"],\ncode[class*=\"language-html\"] {\n\tcolor: var(--remotion-studio-prism-text-color);\n}\n\n.language-regex .token.anchor {\n\tcolor: var(--remotion-studio-prism-function-color);\n}\n\n.language-html .token.punctuation {\n\tcolor: var(--remotion-studio-ruler-color);\n}\n/*********************************************************\n* Line highlighting\n*/\npre[class*=\"language-\"] > code[class*=\"language-\"] {\n\tposition: relative;\n\tz-index: 1;\n}\n\n.line-highlight.line-highlight {\n\tbackground: var(--remotion-studio-prism-line-highlight-background);\n\tbox-shadow: inset 5px 0 0 var(--remotion-studio-prism-line-highlight-border-color);\n\tz-index: 0;\n}\n";
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.prismVscDarkPlus = void 0;
4
- // Unmodified prism-themes@1.9.0/themes/prism-vsc-dark-plus.css, stored as a
5
- // string for Studio’s CSS injection (including Browser Studio, which has no
6
- // CSS loader).
4
+ const colors_1 = require("./colors");
5
+ // Adapted from prism-themes@1.9.0/themes/prism-vsc-dark-plus.css to use the
6
+ // Studio palette. Stored as a string for CSS injection (including Browser
7
+ // Studio, which has no CSS loader).
7
8
  /*
8
9
  The MIT License (MIT)
9
10
 
@@ -29,7 +30,7 @@ SOFTWARE.
29
30
  */
30
31
  exports.prismVscDarkPlus = `pre[class*="language-"],
31
32
  code[class*="language-"] {
32
- color: #d4d4d4;
33
+ color: ${colors_1.PRISM_TEXT_COLOR};
33
34
  font-size: 13px;
34
35
  text-shadow: none;
35
36
  font-family: Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;
@@ -53,7 +54,7 @@ code[class*="language-"]::selection,
53
54
  pre[class*="language-"] *::selection,
54
55
  code[class*="language-"] *::selection {
55
56
  text-shadow: none;
56
- background: #264F78;
57
+ background: ${colors_1.PRISM_SELECTION_BACKGROUND};
57
58
  }
58
59
 
59
60
  @media print {
@@ -67,14 +68,14 @@ pre[class*="language-"] {
67
68
  padding: 1em;
68
69
  margin: .5em 0;
69
70
  overflow: auto;
70
- background: #1e1e1e;
71
+ background: ${colors_1.PRISM_BACKGROUND};
71
72
  }
72
73
 
73
74
  :not(pre) > code[class*="language-"] {
74
75
  padding: .1em .3em;
75
76
  border-radius: .3em;
76
- color: #db4c69;
77
- background: #1e1e1e;
77
+ color: ${colors_1.PRISM_INLINE_COLOR};
78
+ background: ${colors_1.PRISM_BACKGROUND};
78
79
  }
79
80
  /*********************************************************
80
81
  * Tokens
@@ -84,22 +85,22 @@ pre[class*="language-"] {
84
85
  }
85
86
 
86
87
  .token.doctype .token.doctype-tag {
87
- color: #569CD6;
88
+ color: ${colors_1.PRISM_KEYWORD_COLOR};
88
89
  }
89
90
 
90
91
  .token.doctype .token.name {
91
- color: #9cdcfe;
92
+ color: ${colors_1.PRISM_VARIABLE_COLOR};
92
93
  }
93
94
 
94
95
  .token.comment,
95
96
  .token.prolog {
96
- color: #6a9955;
97
+ color: ${colors_1.PRISM_COMMENT_COLOR};
97
98
  }
98
99
 
99
100
  .token.punctuation,
100
101
  .language-html .language-css .token.punctuation,
101
102
  .language-html .language-javascript .token.punctuation {
102
- color: #d4d4d4;
103
+ color: ${colors_1.PRISM_TEXT_COLOR};
103
104
  }
104
105
 
105
106
  .token.property,
@@ -110,7 +111,7 @@ pre[class*="language-"] {
110
111
  .token.symbol,
111
112
  .token.inserted,
112
113
  .token.unit {
113
- color: #b5cea8;
114
+ color: ${colors_1.PRISM_NUMBER_COLOR};
114
115
  }
115
116
 
116
117
  .token.selector,
@@ -119,7 +120,7 @@ pre[class*="language-"] {
119
120
  .token.char,
120
121
  .token.builtin,
121
122
  .token.deleted {
122
- color: #ce9178;
123
+ color: ${colors_1.PRISM_STRING_COLOR};
123
124
  }
124
125
 
125
126
  .language-css .token.string.url {
@@ -128,53 +129,53 @@ pre[class*="language-"] {
128
129
 
129
130
  .token.operator,
130
131
  .token.entity {
131
- color: #d4d4d4;
132
+ color: ${colors_1.PRISM_TEXT_COLOR};
132
133
  }
133
134
 
134
135
  .token.operator.arrow {
135
- color: #569CD6;
136
+ color: ${colors_1.PRISM_KEYWORD_COLOR};
136
137
  }
137
138
 
138
139
  .token.atrule {
139
- color: #ce9178;
140
+ color: ${colors_1.PRISM_STRING_COLOR};
140
141
  }
141
142
 
142
143
  .token.atrule .token.rule {
143
- color: #c586c0;
144
+ color: ${colors_1.PRISM_CONTROL_FLOW_COLOR};
144
145
  }
145
146
 
146
147
  .token.atrule .token.url {
147
- color: #9cdcfe;
148
+ color: ${colors_1.PRISM_VARIABLE_COLOR};
148
149
  }
149
150
 
150
151
  .token.atrule .token.url .token.function {
151
- color: #dcdcaa;
152
+ color: ${colors_1.PRISM_FUNCTION_COLOR};
152
153
  }
153
154
 
154
155
  .token.atrule .token.url .token.punctuation {
155
- color: #d4d4d4;
156
+ color: ${colors_1.PRISM_TEXT_COLOR};
156
157
  }
157
158
 
158
159
  .token.keyword {
159
- color: #569CD6;
160
+ color: ${colors_1.PRISM_KEYWORD_COLOR};
160
161
  }
161
162
 
162
163
  .token.keyword.module,
163
164
  .token.keyword.control-flow {
164
- color: #c586c0;
165
+ color: ${colors_1.PRISM_CONTROL_FLOW_COLOR};
165
166
  }
166
167
 
167
168
  .token.function,
168
169
  .token.function .token.maybe-class-name {
169
- color: #dcdcaa;
170
+ color: ${colors_1.PRISM_FUNCTION_COLOR};
170
171
  }
171
172
 
172
173
  .token.regex {
173
- color: #d16969;
174
+ color: ${colors_1.PRISM_REGEX_COLOR};
174
175
  }
175
176
 
176
177
  .token.important {
177
- color: #569cd6;
178
+ color: ${colors_1.PRISM_KEYWORD_COLOR};
178
179
  }
179
180
 
180
181
  .token.italic {
@@ -182,80 +183,80 @@ pre[class*="language-"] {
182
183
  }
183
184
 
184
185
  .token.constant {
185
- color: #9cdcfe;
186
+ color: ${colors_1.PRISM_VARIABLE_COLOR};
186
187
  }
187
188
 
188
189
  .token.class-name,
189
190
  .token.maybe-class-name {
190
- color: #4ec9b0;
191
+ color: ${colors_1.PRISM_CLASS_NAME_COLOR};
191
192
  }
192
193
 
193
194
  .token.console {
194
- color: #9cdcfe;
195
+ color: ${colors_1.PRISM_VARIABLE_COLOR};
195
196
  }
196
197
 
197
198
  .token.parameter {
198
- color: #9cdcfe;
199
+ color: ${colors_1.PRISM_VARIABLE_COLOR};
199
200
  }
200
201
 
201
202
  .token.interpolation {
202
- color: #9cdcfe;
203
+ color: ${colors_1.PRISM_VARIABLE_COLOR};
203
204
  }
204
205
 
205
206
  .token.punctuation.interpolation-punctuation {
206
- color: #569cd6;
207
+ color: ${colors_1.PRISM_KEYWORD_COLOR};
207
208
  }
208
209
 
209
210
  .token.boolean {
210
- color: #569cd6;
211
+ color: ${colors_1.PRISM_KEYWORD_COLOR};
211
212
  }
212
213
 
213
214
  .token.property,
214
215
  .token.variable,
215
216
  .token.imports .token.maybe-class-name,
216
217
  .token.exports .token.maybe-class-name {
217
- color: #9cdcfe;
218
+ color: ${colors_1.PRISM_VARIABLE_COLOR};
218
219
  }
219
220
 
220
221
  .token.selector {
221
- color: #d7ba7d;
222
+ color: ${colors_1.PRISM_SELECTOR_COLOR};
222
223
  }
223
224
 
224
225
  .token.escape {
225
- color: #d7ba7d;
226
+ color: ${colors_1.PRISM_SELECTOR_COLOR};
226
227
  }
227
228
 
228
229
  .token.tag {
229
- color: #569cd6;
230
+ color: ${colors_1.PRISM_KEYWORD_COLOR};
230
231
  }
231
232
 
232
233
  .token.tag .token.punctuation {
233
- color: #808080;
234
+ color: ${colors_1.RULER_COLOR};
234
235
  }
235
236
 
236
237
  .token.cdata {
237
- color: #808080;
238
+ color: ${colors_1.RULER_COLOR};
238
239
  }
239
240
 
240
241
  .token.attr-name {
241
- color: #9cdcfe;
242
+ color: ${colors_1.PRISM_VARIABLE_COLOR};
242
243
  }
243
244
 
244
245
  .token.attr-value,
245
246
  .token.attr-value .token.punctuation {
246
- color: #ce9178;
247
+ color: ${colors_1.PRISM_STRING_COLOR};
247
248
  }
248
249
 
249
250
  .token.attr-value .token.punctuation.attr-equals {
250
- color: #d4d4d4;
251
+ color: ${colors_1.PRISM_TEXT_COLOR};
251
252
  }
252
253
 
253
254
  .token.entity {
254
- color: #569cd6;
255
+ color: ${colors_1.PRISM_KEYWORD_COLOR};
255
256
  }
256
257
 
257
258
  .token.namespace {
258
- color: #4ec9b0;
259
+ color: ${colors_1.PRISM_CLASS_NAME_COLOR};
259
260
  }
260
261
  /*********************************************************
261
262
  * Language Specific
@@ -269,25 +270,25 @@ pre[class*="language-typescript"],
269
270
  code[class*="language-typescript"],
270
271
  pre[class*="language-tsx"],
271
272
  code[class*="language-tsx"] {
272
- color: #9cdcfe;
273
+ color: ${colors_1.PRISM_VARIABLE_COLOR};
273
274
  }
274
275
 
275
276
  pre[class*="language-css"],
276
277
  code[class*="language-css"] {
277
- color: #ce9178;
278
+ color: ${colors_1.PRISM_STRING_COLOR};
278
279
  }
279
280
 
280
281
  pre[class*="language-html"],
281
282
  code[class*="language-html"] {
282
- color: #d4d4d4;
283
+ color: ${colors_1.PRISM_TEXT_COLOR};
283
284
  }
284
285
 
285
286
  .language-regex .token.anchor {
286
- color: #dcdcaa;
287
+ color: ${colors_1.PRISM_FUNCTION_COLOR};
287
288
  }
288
289
 
289
290
  .language-html .token.punctuation {
290
- color: #808080;
291
+ color: ${colors_1.RULER_COLOR};
291
292
  }
292
293
  /*********************************************************
293
294
  * Line highlighting
@@ -298,8 +299,8 @@ pre[class*="language-"] > code[class*="language-"] {
298
299
  }
299
300
 
300
301
  .line-highlight.line-highlight {
301
- background: #f7ebc6;
302
- box-shadow: inset 5px 0 0 #f7d87c;
302
+ background: ${colors_1.PRISM_LINE_HIGHLIGHT_BACKGROUND};
303
+ box-shadow: inset 5px 0 0 ${colors_1.PRISM_LINE_HIGHLIGHT_BORDER_COLOR};
303
304
  z-index: 0;
304
305
  }
305
306
  `;
@@ -0,0 +1 @@
1
+ export declare const resolveStudioColor: (color: string, computedStyle: CSSStyleDeclaration) => string;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveStudioColor = void 0;
4
+ // Canvas and JavaScript color parsers need concrete colors rather than CSS var().
5
+ // Reuse the computed style for all colors in a draw to avoid repeated style reads.
6
+ const resolveStudioColor = (color, computedStyle) => {
7
+ return color.replace(/var\((--remotion-studio-[a-z0-9-]+)\)/g, (_, name) => {
8
+ return computedStyle.getPropertyValue(name).trim();
9
+ });
10
+ };
11
+ exports.resolveStudioColor = resolveStudioColor;
@@ -0,0 +1 @@
1
+ export declare const studioCssVariables = "\n:where(:root) {\n --remotion-studio-black: black;\n --remotion-studio-white: white;\n --remotion-studio-red: red;\n --remotion-studio-transparent: transparent;\n --remotion-studio-current-color: currentColor;\n --remotion-studio-background: rgb(31,36,40);\n --remotion-studio-background-transparent: rgba(31,36,40, 0);\n --remotion-studio-input-background: #2f363d;\n --remotion-studio-light-color: #ddd;\n --remotion-studio-light-text: #A6A7A9;\n --remotion-studio-ruler-color: #808080;\n --remotion-studio-white-alpha-05: rgba(255, 255, 255, 0.05);\n --remotion-studio-white-alpha-06: rgba(255, 255, 255, 0.06);\n --remotion-studio-white-alpha-08: rgba(255, 255, 255, 0.08);\n --remotion-studio-white-alpha-10: rgba(255, 255, 255, 0.1);\n --remotion-studio-white-alpha-12: rgba(255, 255, 255, 0.12);\n --remotion-studio-white-alpha-15: rgba(255, 255, 255, 0.15);\n --remotion-studio-white-alpha-20: rgba(255, 255, 255, 0.2);\n --remotion-studio-white-alpha-25: rgba(255, 255, 255, 0.25);\n --remotion-studio-white-alpha-30: rgba(255, 255, 255, 0.3);\n --remotion-studio-white-alpha-35: rgba(255, 255, 255, 0.35);\n --remotion-studio-white-alpha-40: rgba(255, 255, 255, 0.4);\n --remotion-studio-white-alpha-45: rgba(255, 255, 255, 0.45);\n --remotion-studio-white-alpha-50: rgba(255, 255, 255, 0.5);\n --remotion-studio-white-alpha-60: rgba(255, 255, 255, 0.6);\n --remotion-studio-white-alpha-70: rgba(255, 255, 255, 0.7);\n --remotion-studio-white-alpha-72: rgba(255, 255, 255, 0.72);\n --remotion-studio-white-alpha-80: rgba(255, 255, 255, 0.8);\n --remotion-studio-white-alpha-90: rgba(255, 255, 255, 0.9);\n --remotion-studio-black-alpha-10: rgba(0, 0, 0, 0.1);\n --remotion-studio-black-alpha-28: rgba(0, 0, 0, 0.28);\n --remotion-studio-black-alpha-30: rgba(0, 0, 0, 0.3);\n --remotion-studio-black-alpha-40: rgba(0, 0, 0, 0.4);\n --remotion-studio-black-alpha-50: rgba(0, 0, 0, 0.5);\n --remotion-studio-black-alpha-60: rgba(0, 0, 0, 0.6);\n --remotion-studio-black-alpha-80: rgba(0, 0, 0, 0.8);\n --remotion-studio-black-alpha-85: rgba(0, 0, 0, 0.85);\n --remotion-studio-black-alpha-90: rgba(0, 0, 0, 0.9);\n --remotion-studio-fail-color: #ff3232;\n --remotion-studio-warning-color: #f1c40f;\n --remotion-studio-blue: #0b84f3;\n --remotion-studio-blue-hovered: #4da3f7;\n --remotion-studio-blue-disabled: #284f73;\n --remotion-studio-unselected-guide: #7e1219;\n --remotion-studio-selected-guide: #d22d3a;\n --remotion-studio-line-color: #363A3E;\n --remotion-studio-timeline-track-separator: #13161B;\n --remotion-studio-light-gray: #ccc;\n --remotion-studio-keyboard-shortcut-key-color: #eee;\n --remotion-studio-notification-background: #111111;\n --remotion-studio-render-status-background: #222;\n --remotion-studio-error-code-frame-background: #070707;\n --remotion-studio-error-code-frame-line-background: #121212;\n --remotion-studio-error-link-color: #58a6ff;\n --remotion-studio-info-blue: #60a5fa;\n --remotion-studio-server-disconnected-background: #e74c3c;\n --remotion-studio-timeline-background-color: #15181B;\n --remotion-studio-timeline-negative-start-background-color: #2C2F32;\n --remotion-studio-timeline-negative-start-border-color: #414446;\n --remotion-studio-timeline-selected-background-color: #3B3F42;\n --remotion-studio-timeline-selected-label-background-color: #B0B0B0;\n --remotion-studio-timeline-blue: #0b84ff;\n --remotion-studio-timeline-playhead-color: #f02c00;\n --remotion-studio-timeline-drop-blue-alpha-12: rgba(0, 155, 255, 0.12);\n --remotion-studio-timeline-drop-blue-alpha-16: rgba(0, 155, 255, 0.16);\n --remotion-studio-timeline-drop-blue-alpha-75: rgba(0, 155, 255, 0.75);\n --remotion-studio-timeline-marquee-blue-alpha-16: rgba(70, 130, 255, 0.16);\n --remotion-studio-timeline-marquee-blue-alpha-75: rgba(70, 130, 255, 0.75);\n --remotion-studio-easing-selected-background: rgba(11, 132, 243, 0.18);\n --remotion-studio-info-blue-background: rgba(59, 130, 246, 0.15);\n --remotion-studio-color-picker-checker-background-color: #444;\n --remotion-studio-color-picker-hue-gradient: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n --remotion-studio-timeline-audio-gradient: linear-gradient(rgb(16 171 58), rgb(43 165 63) 60%);\n --remotion-studio-timeline-video-gradient: linear-gradient(to top, #8e44ad, #9b59b6);\n --remotion-studio-focus-color: #555;\n --remotion-studio-color-picker-checker-color: #888;\n --remotion-studio-info-blue-border-color: rgba(59, 130, 246, 0.4);\n --remotion-studio-black-alpha-22: rgba(0, 0, 0, 0.22);\n --remotion-studio-font-family-error-color: #ff8a8a;\n --remotion-studio-selected-outline-snap-color: #ff00ff;\n --remotion-studio-prism-text-color: #d4d4d4;\n --remotion-studio-prism-selection-background: #264f78;\n --remotion-studio-prism-background: #1e1e1e;\n --remotion-studio-prism-inline-color: #db4c69;\n --remotion-studio-prism-keyword-color: #569cd6;\n --remotion-studio-prism-variable-color: #9cdcfe;\n --remotion-studio-prism-comment-color: #6a9955;\n --remotion-studio-prism-number-color: #b5cea8;\n --remotion-studio-prism-string-color: #ce9178;\n --remotion-studio-prism-control-flow-color: #c586c0;\n --remotion-studio-prism-function-color: #dcdcaa;\n --remotion-studio-prism-regex-color: #d16969;\n --remotion-studio-prism-class-name-color: #4ec9b0;\n --remotion-studio-prism-selector-color: #d7ba7d;\n --remotion-studio-prism-line-highlight-background: #f7ebc6;\n --remotion-studio-prism-line-highlight-border-color: #f7d87c;\n}\n";