@hyperframes/studio 0.8.129 → 0.8.130

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/index.d.ts CHANGED
@@ -3767,6 +3767,66 @@ interface ConnectedDomEditOverlayProps extends HostInputProps {
3767
3767
  }
3768
3768
  declare function ConnectedDomEditOverlay({ activeCompositionPath, showHoverSelection, shouldShowSelectedDomBounds, isGestureRecording, canvasInput, allowBodyDrag, onTextEditingChange, onSelectionBoxClick, }: ConnectedDomEditOverlayProps): react_jsx_runtime.JSX.Element;
3769
3769
 
3770
+ interface StudioShellValue {
3771
+ projectId: string;
3772
+ activeCompPath: string | null;
3773
+ setActiveCompPath: (path: string | null) => void;
3774
+ showToast: (message: string, tone?: "error" | "info") => void;
3775
+ previewIframeRef: React.MutableRefObject<HTMLIFrameElement | null>;
3776
+ editHistory: {
3777
+ canUndo: boolean;
3778
+ canRedo: boolean;
3779
+ undoLabel: string | undefined;
3780
+ redoLabel: string | undefined;
3781
+ };
3782
+ /**
3783
+ * Why a composition write would be refused right now, or null when writes
3784
+ * are possible. Derived from the paused save queue and the external-file
3785
+ * conflict state, both of which are otherwise banners with no lock behind
3786
+ * them. One field rather than two, so there is one owner of the question.
3787
+ */
3788
+ writeBlockedReason: string | null;
3789
+ handleUndo: () => Promise<void>;
3790
+ handleRedo: () => Promise<void>;
3791
+ renderQueue: {
3792
+ jobs: unknown[];
3793
+ isRendering: boolean;
3794
+ loadError: string | null;
3795
+ actionError: string | null;
3796
+ dismissActionError: () => void;
3797
+ reloadRenders: () => void;
3798
+ deleteRender: (jobId: string) => void;
3799
+ cancelRender: (jobId: string) => void;
3800
+ clearCompleted: () => void;
3801
+ startRender: (options: unknown) => Promise<void>;
3802
+ /** Encoder availability. `null` means "no answer", not "missing". */
3803
+ ffmpeg: FfmpegStatus | null;
3804
+ /** True only when the server positively reported no usable FFmpeg. */
3805
+ ffmpegMissing: boolean;
3806
+ ffmpegChecking: boolean;
3807
+ recheckFfmpeg: () => void;
3808
+ };
3809
+ compositionDimensions: CompositionDimensions | null;
3810
+ waitForPendingDomEditSaves: () => Promise<void>;
3811
+ handlePreviewIframeRef: (iframe: HTMLIFrameElement | null) => void;
3812
+ }
3813
+ interface StudioPlaybackValue {
3814
+ captionEditMode: boolean;
3815
+ compositionLoading: boolean;
3816
+ refreshKey: number;
3817
+ setRefreshKey: React.Dispatch<React.SetStateAction<number>>;
3818
+ timelineElements: TimelineElement[];
3819
+ isPlaying: boolean;
3820
+ refreshPreviewDocumentVersion: () => void;
3821
+ }
3822
+
3823
+ /** Studio state the panel reads; passed by hosts outside Studio's providers. Keep previewIframeRef stable,
3824
+ * and bump refreshKey when the preview document is rebuilt without an iframe load. */
3825
+ type LayersPanelHost = Pick<StudioShellValue, "previewIframeRef" | "activeCompPath" | "showToast"> & Pick<StudioPlaybackValue, "timelineElements" | "isPlaying"> & Partial<Pick<StudioPlaybackValue, "refreshKey" | "compositionLoading">>;
3826
+ declare const LayersPanel: react.NamedExoticComponent<{
3827
+ host?: LayersPanelHost;
3828
+ }>;
3829
+
3770
3830
  interface DomEditZOrder {
3771
3831
  /** False in a read-only preview, for an element no longer in the live preview, or at that end of its stacking set. */
3772
3832
  enabled: (sel: DomEditSelection, action: ZOrderAction) => boolean;
@@ -4230,4 +4290,4 @@ declare function buildStudioTools(depsRef: {
4230
4290
  readonly current: StudioAgentToolsDeps;
4231
4291
  }): ModelContextTool[];
4232
4292
 
4233
- export { type AgentModalAnchorPoint, type AgentPromptElementInfo, AskAgentModal, type AskAgentModalProps, AudioMeterStrip, type AudioMeterStripProps, AudioWaveform, type AudioWaveformProps, type BlockedTimelineEditIntent, type CanEditTimelineElement, ColorField, CompositionBreadcrumb, type CompositionDimensions, type CompositionLevel, CompositionThumbnail, ConnectedDomEditOverlay, type ConnectedDomEditOverlayProps, DEFAULT_SHORTCUT_SECTIONS, Dock, type DockController, type DomEditCapabilities, type DomEditCommitDeclineReason, type DomEditCommitOutcome, type DomEditGroupPathOffsetCommit, DomEditOverlay, type DomEditOverlayProps, DomEditProvider, type DomEditSelection, type DomEditZOrder, type DomGeometryCommits, type EditHistoryHandle, EditorShell, type EditorShellProps, type ExternalFileChangeBlockedState, type ExternalFileChangeCoordinatorHandle, ExternalFileConflictBanner, type FadeEdge, type FadeHandleBox, type FadeHandleClipBox, type FfmpegStatus, FileTree, GradientField, GridOverlay, ImageThumbnail, type ImageThumbnailProps, type LinkShortcutCallbacks, type MarqueeGestures, type MarqueeGesturesDeps, MarqueeOverlay, type MarqueeOverlayProps, type Rect$1 as MarqueeRect, type ModelContextTool, NLEPreview, type PanelId, type PatchOperation, type PersistedRenderSettings, type PickedElement, PlayerControls, type PlayerHandle, type PlayerHandleElement, type PlayerHandleListener, type PlayerHandleTimeListener, type DomEditCompositionRect as PreviewCompositionRect, PreviewGuides, PreviewOverlayProvider, type PreviewOverlayProviderProps, type PreviewPromotion, PreviewReadOnlyProvider, type PreviewSnapPreferences, PropertyPanel, type RenderJob, RenderQueue, type RenderQueueProps, type ResolutionPreset, SNAP_THRESHOLD_PX, type ShortcutHint, type ShortcutSection, ShortcutsButton, type ShortcutsButtonProps, type SnapContext, type SnapEdge, type SnapGuide, SnapGuideOverlay, type SnapGuideOverlayProps, type SnapGuidesState, type Rect as SnapRect, type SnapResult, type SnapTarget, SnapToolbar, SourceEditor, type SpacingGuide, type StartRenderOptions, type StudioAgentToolsDeps, StudioApp, StudioFileConflictError, type StudioLookSnapshot, type StudioPendingEditsDrainResult, TRACK_H, type ThumbnailPriority, type ThumbnailStill, Timeline, TimelineClipMenu, type TimelineClipMenuItem, type TimelineClipRenderContext, type TimelineEditCallbacks, type TimelineEditOutcome, type TimelineEditPermission, TimelineEditPopover, TimelineEditProvider, type TimelineElement, TimelineEmptyStatePart, TimelineFrame, TimelineGapMenu, TimelineHistoryButtons, type TimelineHistoryButtonsProps, TimelineKeyframeMenu, TimelineLanes, TimelineOverlays, TimelinePane, type TimelinePaneProps, TimelinePlayhead, TimelineProvider, TimelineRazorGuide, TimelineRuler, TimelineShortcutHint, type TimelineTheme, type TimelineTimeRange$1 as TimelineTimeRange, TimelineToolbar, type TimelineToolbarProps, type TimelineTrackPadding, type TimelineZIndexReorderCommit, type ToolResult, type UseClipboardOptions, type UseDomEditSessionParams, type UseDomGeometryCommitOptions, type UseDomStyleCommitOptions, type UseEditHistoryActionsOptions, type UsePersistentEditHistoryOptions, type UsePreviewPersistenceParams, type UseProjectFileWriterOptions, type UseRenderClipContentOptions, type UseThumbnailStillOptions, type UseTimelineEditingOptions, VideoThumbnail, type ZOrderAction, applyPatch, buildCompositionSnapTarget, buildGridSnapEdges, buildPickerAgentContextPreview, buildPickerAgentPrompt, buildStudioTools, collectSnapContext, collectStudioLookScene, dispatchLinkShortcut, displayTrackOrder, extractSnapTargets, fadeHandleBoxes, findElementBlock, flushStudioPendingEdits, formatTime, getPersistedRenderSettings, liveTime, mergeStyleIntoTag, openAudioGainDialog, parseStyleString, persistRenderSettings, resolveDomEditSelection, resolveEquidistanceGuides, resolveGuideLineRect, resolveIframe, resolveSnapAdjustment, resolveSourceFile, revertNewestStudioPendingEdit, snapEngagedForTravel, useAudioGainDialogStore, useAudioMetersVisible, useClipboard, useCompositionStack, useDockLayoutStore, useDomEditSelectionContext, useDomEditSession, useDomEditZOrder, useDomGeometryCommit, useDomStyleCommit, useEditHistoryActions, useElementPicker, useLivePreviewIframe, useMarqueeGestures, usePersistentEditHistory, usePlayerHandle, usePlayerStore, usePreviewCompositionRect, usePreviewGuidesStore, usePreviewIframeStore, usePreviewOverlayContext, usePreviewPersistence, useProjectFileWriter, useRenderClipContent, useRenderQueue, useThumbnailStill, useTimelineContext, useTimelineEditing, useTimelinePlayer };
4293
+ export { type AgentModalAnchorPoint, type AgentPromptElementInfo, AskAgentModal, type AskAgentModalProps, AudioMeterStrip, type AudioMeterStripProps, AudioWaveform, type AudioWaveformProps, type BlockedTimelineEditIntent, type CanEditTimelineElement, ColorField, CompositionBreadcrumb, type CompositionDimensions, type CompositionLevel, CompositionThumbnail, ConnectedDomEditOverlay, type ConnectedDomEditOverlayProps, DEFAULT_SHORTCUT_SECTIONS, Dock, type DockController, type DomEditCapabilities, type DomEditCommitDeclineReason, type DomEditCommitOutcome, type DomEditGroupPathOffsetCommit, DomEditOverlay, type DomEditOverlayProps, DomEditProvider, type DomEditSelection, type DomEditZOrder, type DomGeometryCommits, type EditHistoryHandle, EditorShell, type EditorShellProps, type ExternalFileChangeBlockedState, type ExternalFileChangeCoordinatorHandle, ExternalFileConflictBanner, type FadeEdge, type FadeHandleBox, type FadeHandleClipBox, type FfmpegStatus, FileTree, GradientField, GridOverlay, ImageThumbnail, type ImageThumbnailProps, LayersPanel, type LayersPanelHost, type LinkShortcutCallbacks, type MarqueeGestures, type MarqueeGesturesDeps, MarqueeOverlay, type MarqueeOverlayProps, type Rect$1 as MarqueeRect, type ModelContextTool, NLEPreview, type PanelId, type PatchOperation, type PersistedRenderSettings, type PickedElement, PlayerControls, type PlayerHandle, type PlayerHandleElement, type PlayerHandleListener, type PlayerHandleTimeListener, type DomEditCompositionRect as PreviewCompositionRect, PreviewGuides, PreviewOverlayProvider, type PreviewOverlayProviderProps, type PreviewPromotion, PreviewReadOnlyProvider, type PreviewSnapPreferences, PropertyPanel, type RenderJob, RenderQueue, type RenderQueueProps, type ResolutionPreset, SNAP_THRESHOLD_PX, type ShortcutHint, type ShortcutSection, ShortcutsButton, type ShortcutsButtonProps, type SnapContext, type SnapEdge, type SnapGuide, SnapGuideOverlay, type SnapGuideOverlayProps, type SnapGuidesState, type Rect as SnapRect, type SnapResult, type SnapTarget, SnapToolbar, SourceEditor, type SpacingGuide, type StartRenderOptions, type StudioAgentToolsDeps, StudioApp, StudioFileConflictError, type StudioLookSnapshot, type StudioPendingEditsDrainResult, TRACK_H, type ThumbnailPriority, type ThumbnailStill, Timeline, TimelineClipMenu, type TimelineClipMenuItem, type TimelineClipRenderContext, type TimelineEditCallbacks, type TimelineEditOutcome, type TimelineEditPermission, TimelineEditPopover, TimelineEditProvider, type TimelineElement, TimelineEmptyStatePart, TimelineFrame, TimelineGapMenu, TimelineHistoryButtons, type TimelineHistoryButtonsProps, TimelineKeyframeMenu, TimelineLanes, TimelineOverlays, TimelinePane, type TimelinePaneProps, TimelinePlayhead, TimelineProvider, TimelineRazorGuide, TimelineRuler, TimelineShortcutHint, type TimelineTheme, type TimelineTimeRange$1 as TimelineTimeRange, TimelineToolbar, type TimelineToolbarProps, type TimelineTrackPadding, type TimelineZIndexReorderCommit, type ToolResult, type UseClipboardOptions, type UseDomEditSessionParams, type UseDomGeometryCommitOptions, type UseDomStyleCommitOptions, type UseEditHistoryActionsOptions, type UsePersistentEditHistoryOptions, type UsePreviewPersistenceParams, type UseProjectFileWriterOptions, type UseRenderClipContentOptions, type UseThumbnailStillOptions, type UseTimelineEditingOptions, VideoThumbnail, type ZOrderAction, applyPatch, buildCompositionSnapTarget, buildGridSnapEdges, buildPickerAgentContextPreview, buildPickerAgentPrompt, buildStudioTools, collectSnapContext, collectStudioLookScene, dispatchLinkShortcut, displayTrackOrder, extractSnapTargets, fadeHandleBoxes, findElementBlock, flushStudioPendingEdits, formatTime, getPersistedRenderSettings, liveTime, mergeStyleIntoTag, openAudioGainDialog, parseStyleString, persistRenderSettings, resolveDomEditSelection, resolveEquidistanceGuides, resolveGuideLineRect, resolveIframe, resolveSnapAdjustment, resolveSourceFile, revertNewestStudioPendingEdit, snapEngagedForTravel, useAudioGainDialogStore, useAudioMetersVisible, useClipboard, useCompositionStack, useDockLayoutStore, useDomEditSelectionContext, useDomEditSession, useDomEditZOrder, useDomGeometryCommit, useDomStyleCommit, useEditHistoryActions, useElementPicker, useLivePreviewIframe, useMarqueeGestures, usePersistentEditHistory, usePlayerHandle, usePlayerStore, usePreviewCompositionRect, usePreviewGuidesStore, usePreviewIframeStore, usePreviewOverlayContext, usePreviewPersistence, useProjectFileWriter, useRenderClipContent, useRenderQueue, useThumbnailStill, useTimelineContext, useTimelineEditing, useTimelinePlayer };
package/dist/index.html CHANGED
@@ -14,7 +14,7 @@
14
14
  document.documentElement.dataset.theme = "paper";
15
15
  }
16
16
  </script>
17
- <script type="module" crossorigin src="/assets/index-C9YkEyN4.js"></script>
17
+ <script type="module" crossorigin src="/assets/index-DDsV6l9T.js"></script>
18
18
  <link rel="stylesheet" crossorigin href="/assets/index-D11atkBt.css">
19
19
  </head>
20
20
  <body>
package/dist/index.js CHANGED
@@ -44064,7 +44064,7 @@ function useMirrorLaneMoveCommit() {
44064
44064
  (selectionKey, coalesceKey, resolveMove) => {
44065
44065
  const els = elementsRef.current;
44066
44066
  const element = selectionKey ? els.find((e) => (e.key ?? e.id) === selectionKey) : void 0;
44067
- if (!element) return Promise.resolve(false);
44067
+ if (!element || !onMoveElements) return Promise.resolve(false);
44068
44068
  const move = resolveMove(element, els);
44069
44069
  if (!move) return Promise.resolve(false);
44070
44070
  return commitZMirrorLaneMove(
@@ -92634,9 +92634,25 @@ function createRafThrottle(run, throttleMs = 100) {
92634
92634
  }
92635
92635
  };
92636
92636
  }
92637
- var LayersPanel = memo50(function LayersPanel2() {
92638
- const { previewIframeRef, activeCompPath, showToast } = useStudioShellContext();
92639
- const { refreshKey, compositionLoading, timelineElements, isPlaying } = useStudioPlaybackContext();
92637
+ function useLayersPanelHost(host) {
92638
+ const shell = useStudioShellContextOptional();
92639
+ const playback = useStudioPlaybackContextOptional();
92640
+ if (host) return host;
92641
+ if (!shell || !playback) {
92642
+ throw new Error("LayersPanel needs a host prop outside Studio's shell and playback providers");
92643
+ }
92644
+ return { ...shell, ...playback };
92645
+ }
92646
+ var LayersPanel = memo50(function LayersPanel2({ host }) {
92647
+ const {
92648
+ previewIframeRef,
92649
+ activeCompPath,
92650
+ showToast,
92651
+ refreshKey,
92652
+ compositionLoading,
92653
+ timelineElements,
92654
+ isPlaying
92655
+ } = useLayersPanelHost(host);
92640
92656
  const currentTime = usePlayerStore((s) => s.currentTime);
92641
92657
  const zEditVersion = usePlayerStore((s) => s.zEditVersion);
92642
92658
  const {
@@ -99543,6 +99559,7 @@ export {
99543
99559
  IconButton,
99544
99560
  ImageThumbnail,
99545
99561
  Input,
99562
+ LayersPanel,
99546
99563
  MarqueeOverlay,
99547
99564
  Menu,
99548
99565
  MenuItem,