@hyperframes/studio 0.8.93 → 0.8.94

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 (39) hide show
  1. package/dist/assets/{hyperframes-player-CkV9KK6A.js → hyperframes-player-Bkm-3G56.js} +1 -1
  2. package/dist/assets/{index-BlLFipOk.js → index-BUn5H_np.js} +1 -1
  3. package/dist/assets/{index-CYk0NwSv.js → index-BupvpoiM.js} +175 -175
  4. package/dist/assets/{index-V3fzEfOD.js → index-n2ZRiO44.js} +1 -1
  5. package/dist/index.d.ts +62 -46
  6. package/dist/index.html +1 -1
  7. package/dist/index.js +142 -98
  8. package/dist/index.js.map +1 -1
  9. package/package.json +8 -8
  10. package/src/components/TimelineToolbar.test.tsx +17 -0
  11. package/src/components/TimelineToolbar.tsx +3 -1
  12. package/src/components/editor/ConnectedDomEditOverlay.test.tsx +2 -0
  13. package/src/components/editor/ConnectedDomEditOverlay.tsx +3 -1
  14. package/src/components/editor/DomEditCropHandles.test.tsx +87 -1
  15. package/src/components/editor/DomEditCropHandles.tsx +64 -62
  16. package/src/components/editor/DomEditOverlay.test.ts +39 -0
  17. package/src/components/editor/DomEditOverlay.tsx +6 -1
  18. package/src/components/editor/DomEditSelectionChrome.test.tsx +114 -1
  19. package/src/components/editor/DomEditSelectionChrome.tsx +17 -10
  20. package/src/components/editor/PreviewOverlayProvider.test.tsx +19 -0
  21. package/src/components/editor/PreviewOverlayProvider.tsx +1 -1
  22. package/src/components/editor/SnapToolbar.tsx +1 -1
  23. package/src/components/editor/domEditOverlayGeometry.ts +2 -0
  24. package/src/components/nle/PreviewOverlays.tsx +3 -3
  25. package/src/hooks/gsapResizeIntercept.test.ts +40 -0
  26. package/src/hooks/gsapResizeIntercept.ts +8 -4
  27. package/src/index.ts +4 -0
  28. package/src/player/components/PlayerControls.tsx +2 -15
  29. package/src/player/components/ShortcutsPanel.test.tsx +33 -1
  30. package/src/player/components/ShortcutsPanel.tsx +26 -0
  31. package/src/player/components/Timeline.trackPadding.test.tsx +157 -0
  32. package/src/player/components/TimelineCanvas.tsx +16 -19
  33. package/src/player/components/TimelineTypes.ts +2 -0
  34. package/src/player/components/timelineLayout.test.ts +47 -0
  35. package/src/player/components/timelineLayout.ts +22 -15
  36. package/src/player/components/useTimelineProviderState.tsx +2 -0
  37. package/src/player/components/useTimelineTrackLayout.ts +11 -2
  38. package/src/player/components/useTimelineVirtualRows.test.tsx +32 -0
  39. package/src/player/components/useTimelineVirtualRows.ts +2 -2
@@ -1,4 +1,4 @@
1
- import{n as Qi}from"./index-CYk0NwSv.js";/*!
1
+ import{n as Qi}from"./index-BupvpoiM.js";/*!
2
2
  * Copyright (c) 2026-present, Vanilagy and contributors
3
3
  *
4
4
  * This Source Code Form is subject to the terms of the Mozilla Public
package/dist/index.d.ts CHANGED
@@ -1126,6 +1126,53 @@ interface TimelineTheme {
1126
1126
  transitionBadgeInk: string;
1127
1127
  }
1128
1128
 
1129
+ interface TimelineTimeRange {
1130
+ readonly start: number;
1131
+ readonly end: number;
1132
+ }
1133
+ interface TimelineClipInterval {
1134
+ readonly element: TimelineElement;
1135
+ readonly identity: string;
1136
+ readonly ordinal: number;
1137
+ readonly start: number;
1138
+ readonly end: number;
1139
+ }
1140
+ interface TimelineClipRowIndex {
1141
+ readonly byStart: readonly TimelineClipInterval[];
1142
+ readonly treeLeafCount: number;
1143
+ readonly maxPositiveEndTree: readonly number[];
1144
+ readonly maxPointStartTree: readonly number[];
1145
+ readonly byIdentity: ReadonlyMap<string, readonly TimelineClipInterval[]>;
1146
+ }
1147
+ interface TimelineClipIndex {
1148
+ readonly rows: ReadonlyMap<number, TimelineClipRowIndex>;
1149
+ }
1150
+
1151
+ declare const TRACK_H = 48;
1152
+ interface TimelineTrackPadding {
1153
+ top?: number;
1154
+ bottom?: number;
1155
+ }
1156
+ interface TimelineRowGeometry {
1157
+ readonly rowKeys: readonly number[];
1158
+ readonly rowHeights: readonly number[];
1159
+ /** Cumulative row boundaries, including the final bottom boundary. */
1160
+ readonly rowOffsets: readonly number[];
1161
+ readonly rowsHeight: number;
1162
+ readonly padding: Readonly<Required<TimelineTrackPadding>>;
1163
+ readonly canvasHeight: number;
1164
+ getRowIndex(rowKey: number): number;
1165
+ getRowHeight(row: number): number;
1166
+ getRowTop(row: number): number;
1167
+ getRowFromY(contentY: number): number;
1168
+ getRowPositionFromY(contentY: number): {
1169
+ rowFloat: number;
1170
+ row: number;
1171
+ fraction: number;
1172
+ rowHeight: number;
1173
+ };
1174
+ }
1175
+
1129
1176
  type TimelineEditOverrides = Pick<TimelineEditCallbacks, "onMoveElement" | "onMoveElements" | "onResizeElement" | "onResizeElements" | "onBlockedEditAttempt" | "onSplitElement">;
1130
1177
 
1131
1178
  /** With both set, a lane move restacks the preview's z-index to match the rows; each overrides Studio's own. */
@@ -1163,6 +1210,7 @@ interface TimelineProps extends TimelineDropCallbacks, TimelineEditOverrides, Ti
1163
1210
  theme?: Partial<TimelineTheme>;
1164
1211
  showAudioEffects?: boolean;
1165
1212
  showKeyframes?: boolean;
1213
+ trackPadding?: TimelineTrackPadding;
1166
1214
  }
1167
1215
 
1168
1216
  interface TimelineEmptyStateProps {
@@ -1256,47 +1304,6 @@ interface BlockedClipState {
1256
1304
  started: boolean;
1257
1305
  }
1258
1306
 
1259
- interface TimelineTimeRange {
1260
- readonly start: number;
1261
- readonly end: number;
1262
- }
1263
- interface TimelineClipInterval {
1264
- readonly element: TimelineElement;
1265
- readonly identity: string;
1266
- readonly ordinal: number;
1267
- readonly start: number;
1268
- readonly end: number;
1269
- }
1270
- interface TimelineClipRowIndex {
1271
- readonly byStart: readonly TimelineClipInterval[];
1272
- readonly treeLeafCount: number;
1273
- readonly maxPositiveEndTree: readonly number[];
1274
- readonly maxPointStartTree: readonly number[];
1275
- readonly byIdentity: ReadonlyMap<string, readonly TimelineClipInterval[]>;
1276
- }
1277
- interface TimelineClipIndex {
1278
- readonly rows: ReadonlyMap<number, TimelineClipRowIndex>;
1279
- }
1280
-
1281
- interface TimelineRowGeometry {
1282
- readonly rowKeys: readonly number[];
1283
- readonly rowHeights: readonly number[];
1284
- /** Cumulative row boundaries, including the final bottom boundary. */
1285
- readonly rowOffsets: readonly number[];
1286
- readonly rowsHeight: number;
1287
- readonly canvasHeight: number;
1288
- getRowIndex(rowKey: number): number;
1289
- getRowHeight(row: number): number;
1290
- getRowTop(row: number): number;
1291
- getRowFromY(contentY: number): number;
1292
- getRowPositionFromY(contentY: number): {
1293
- rowFloat: number;
1294
- row: number;
1295
- fraction: number;
1296
- rowHeight: number;
1297
- };
1298
- }
1299
-
1300
1307
  type TrackVisualStyle = TimelineTrackStyle;
1301
1308
 
1302
1309
  interface TimelineVirtualRow {
@@ -1949,6 +1956,13 @@ interface NLEPreviewProps {
1949
1956
  }
1950
1957
  declare const NLEPreview: react.NamedExoticComponent<NLEPreviewProps>;
1951
1958
 
1959
+ interface ShortcutsButtonProps {
1960
+ sections?: readonly ShortcutSection[];
1961
+ disabled?: boolean;
1962
+ onSeek?: (time: number) => void;
1963
+ }
1964
+ declare function ShortcutsButton({ sections, disabled, onSeek }: ShortcutsButtonProps): react_jsx_runtime.JSX.Element;
1965
+
1952
1966
  interface CompositionLevel {
1953
1967
  /** Unique id — "master" or composition file path */
1954
1968
  id: string;
@@ -2766,11 +2780,12 @@ interface TimelineToolbarProps {
2766
2780
  domEditSession?: DomEditSessionSlice;
2767
2781
  onSplitElement?: (element: TimelineElement, splitTime: number) => void;
2768
2782
  history?: TimelineHistoryButtonsProps;
2783
+ showHistory?: boolean;
2769
2784
  showAddBeat?: boolean;
2770
2785
  /** Hides Add keyframe and auto-record, and turns off auto-record and the K shortcut with them. */
2771
2786
  showKeyframes?: boolean;
2772
2787
  }
2773
- declare function TimelineToolbar({ domEditSession, onSplitElement, history, showAddBeat, showKeyframes, }: TimelineToolbarProps): react_jsx_runtime.JSX.Element;
2788
+ declare function TimelineToolbar({ domEditSession, onSplitElement, history, showHistory, showAddBeat, showKeyframes, }: TimelineToolbarProps): react_jsx_runtime.JSX.Element;
2774
2789
 
2775
2790
  interface AudioMeterStripProps {
2776
2791
  /** Pass a stable ref (useRef): a new object each render restarts the meter loop. */
@@ -3331,7 +3346,8 @@ interface DomEditOverlayProps {
3331
3346
  groupSelections?: DomEditSelection[];
3332
3347
  hoverSelection: DomEditSelection | null;
3333
3348
  allowCanvasMovement?: boolean;
3334
- /** "host": no hover, marquee or box re-select; Enter with nothing focused still opens text. */
3349
+ allowBodyDrag?: boolean;
3350
+ /** "host": no hover, marquee, box re-select, or body drag if allowBodyDrag is false; Enter still opens text. */
3335
3351
  canvasInput?: "overlay" | "host";
3336
3352
  onTextEditingChange?: (editing: boolean) => void;
3337
3353
  /** A click on a single selection's box, in either mode; the event may be the pointerup. */
@@ -3388,7 +3404,7 @@ interface DomEditOverlayProps {
3388
3404
  }
3389
3405
  declare const DomEditOverlay: react.NamedExoticComponent<DomEditOverlayProps>;
3390
3406
 
3391
- type HostInputProps = Pick<ComponentProps<typeof DomEditOverlay>, "canvasInput" | "onSelectionBoxClick">;
3407
+ type HostInputProps = Pick<ComponentProps<typeof DomEditOverlay>, "canvasInput" | "onSelectionBoxClick" | "allowBodyDrag">;
3392
3408
  interface ConnectedDomEditOverlayProps extends HostInputProps {
3393
3409
  activeCompositionPath: string | null;
3394
3410
  showHoverSelection: boolean;
@@ -3397,7 +3413,7 @@ interface ConnectedDomEditOverlayProps extends HostInputProps {
3397
3413
  /** True when an in-place text edit opens its caret, false when it ends or unmounts. */
3398
3414
  onTextEditingChange?: (editing: boolean) => void;
3399
3415
  }
3400
- declare function ConnectedDomEditOverlay({ activeCompositionPath, showHoverSelection, shouldShowSelectedDomBounds, isGestureRecording, canvasInput, onTextEditingChange, onSelectionBoxClick, }: ConnectedDomEditOverlayProps): react_jsx_runtime.JSX.Element;
3416
+ declare function ConnectedDomEditOverlay({ activeCompositionPath, showHoverSelection, shouldShowSelectedDomBounds, isGestureRecording, canvasInput, allowBodyDrag, onTextEditingChange, onSelectionBoxClick, }: ConnectedDomEditOverlayProps): react_jsx_runtime.JSX.Element;
3401
3417
 
3402
3418
  interface RecordEditInput {
3403
3419
  label: string;
@@ -3501,4 +3517,4 @@ interface MarqueeOverlayProps {
3501
3517
  */
3502
3518
  declare function MarqueeOverlay({ candidateRects, marqueeRect }: MarqueeOverlayProps): react_jsx_runtime.JSX.Element;
3503
3519
 
3504
- export { type AgentModalAnchorPoint, type AgentPromptElementInfo, AskAgentModal, type AskAgentModalProps, AudioMeterStrip, type AudioMeterStripProps, AudioWaveform, type AudioWaveformProps, type BlockedTimelineEditIntent, type CanEditTimelineElement, CompositionBreadcrumb, type CompositionDimensions, type CompositionLevel, CompositionThumbnail, ConnectedDomEditOverlay, type ConnectedDomEditOverlayProps, DEFAULT_SHORTCUT_SECTIONS, type DomEditCapabilities, type DomEditCommitDeclineReason, type DomEditCommitOutcome, type DomEditGroupPathOffsetCommit, DomEditOverlay, type DomEditOverlayProps, DomEditProvider, type DomEditSelection, type DomGeometryCommits, type EditHistoryHandle, EditorShell, type EditorShellProps, type ExternalFileChangeBlockedState, type ExternalFileChangeCoordinatorHandle, ExternalFileConflictBanner, type FfmpegStatus, FileTree, GridOverlay, ImageThumbnail, type ImageThumbnailProps, type MarqueeGestures, type MarqueeGesturesDeps, MarqueeOverlay, type MarqueeOverlayProps, type Rect$1 as MarqueeRect, NLEPreview, type PatchOperation, type PersistedRenderSettings, type PickedElement, PlayerControls, type PlayerHandle, type PlayerHandleElement, type PlayerHandleListener, type PlayerHandleTimeListener, type DomEditCompositionRect as PreviewCompositionRect, PreviewGuides, PreviewOverlayProvider, type PreviewOverlayProviderProps, PreviewReadOnlyProvider, type PreviewSnapPreferences, PropertyPanel, type RenderJob, RenderQueue, type RenderQueueProps, type ResolutionPreset, SNAP_THRESHOLD_PX, type ShortcutHint, type ShortcutSection, 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, StudioApp, StudioFileConflictError, type StudioPendingEditsDrainResult, type ThumbnailPriority, Timeline, TimelineClipMenu, 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 TimelineZIndexReorderCommit, type UseClipboardOptions, type UseDomEditSessionParams, type UseDomGeometryCommitOptions, type UseDomStyleCommitOptions, type UseEditHistoryActionsOptions, type UsePersistentEditHistoryOptions, type UsePreviewPersistenceParams, type UseProjectFileWriterOptions, type UseRenderClipContentOptions, type UseTimelineEditingOptions, VideoThumbnail, applyPatch, buildCompositionSnapTarget, buildGridSnapEdges, buildPickerAgentContextPreview, buildPickerAgentPrompt, collectSnapContext, extractSnapTargets, findElementBlock, flushStudioPendingEdits, formatTime, getPersistedRenderSettings, liveTime, mergeStyleIntoTag, parseStyleString, persistRenderSettings, resolveDomEditSelection, resolveEquidistanceGuides, resolveGuideLineRect, resolveIframe, resolveSnapAdjustment, resolveSourceFile, snapEngagedForTravel, useClipboard, useCompositionStack, useDomEditSelectionContext, useDomEditSession, useDomGeometryCommit, useDomStyleCommit, useEditHistoryActions, useElementPicker, useMarqueeGestures, usePersistentEditHistory, usePlayerHandle, usePlayerStore, usePreviewCompositionRect, usePreviewGuidesStore, usePreviewOverlayContext, usePreviewPersistence, useProjectFileWriter, useRenderClipContent, useRenderQueue, useTimelineContext, useTimelineEditing, useTimelinePlayer };
3520
+ export { type AgentModalAnchorPoint, type AgentPromptElementInfo, AskAgentModal, type AskAgentModalProps, AudioMeterStrip, type AudioMeterStripProps, AudioWaveform, type AudioWaveformProps, type BlockedTimelineEditIntent, type CanEditTimelineElement, CompositionBreadcrumb, type CompositionDimensions, type CompositionLevel, CompositionThumbnail, ConnectedDomEditOverlay, type ConnectedDomEditOverlayProps, DEFAULT_SHORTCUT_SECTIONS, type DomEditCapabilities, type DomEditCommitDeclineReason, type DomEditCommitOutcome, type DomEditGroupPathOffsetCommit, DomEditOverlay, type DomEditOverlayProps, DomEditProvider, type DomEditSelection, type DomGeometryCommits, type EditHistoryHandle, EditorShell, type EditorShellProps, type ExternalFileChangeBlockedState, type ExternalFileChangeCoordinatorHandle, ExternalFileConflictBanner, type FfmpegStatus, FileTree, GridOverlay, ImageThumbnail, type ImageThumbnailProps, type MarqueeGestures, type MarqueeGesturesDeps, MarqueeOverlay, type MarqueeOverlayProps, type Rect$1 as MarqueeRect, NLEPreview, type PatchOperation, type PersistedRenderSettings, type PickedElement, PlayerControls, type PlayerHandle, type PlayerHandleElement, type PlayerHandleListener, type PlayerHandleTimeListener, type DomEditCompositionRect as PreviewCompositionRect, PreviewGuides, PreviewOverlayProvider, type PreviewOverlayProviderProps, 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, StudioApp, StudioFileConflictError, type StudioPendingEditsDrainResult, TRACK_H, type ThumbnailPriority, Timeline, TimelineClipMenu, 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 UseClipboardOptions, type UseDomEditSessionParams, type UseDomGeometryCommitOptions, type UseDomStyleCommitOptions, type UseEditHistoryActionsOptions, type UsePersistentEditHistoryOptions, type UsePreviewPersistenceParams, type UseProjectFileWriterOptions, type UseRenderClipContentOptions, type UseTimelineEditingOptions, VideoThumbnail, applyPatch, buildCompositionSnapTarget, buildGridSnapEdges, buildPickerAgentContextPreview, buildPickerAgentPrompt, collectSnapContext, extractSnapTargets, findElementBlock, flushStudioPendingEdits, formatTime, getPersistedRenderSettings, liveTime, mergeStyleIntoTag, parseStyleString, persistRenderSettings, resolveDomEditSelection, resolveEquidistanceGuides, resolveGuideLineRect, resolveIframe, resolveSnapAdjustment, resolveSourceFile, snapEngagedForTravel, useClipboard, useCompositionStack, useDomEditSelectionContext, useDomEditSession, useDomGeometryCommit, useDomStyleCommit, useEditHistoryActions, useElementPicker, useMarqueeGestures, usePersistentEditHistory, usePlayerHandle, usePlayerStore, usePreviewCompositionRect, usePreviewGuidesStore, usePreviewOverlayContext, usePreviewPersistence, useProjectFileWriter, useRenderClipContent, useRenderQueue, useTimelineContext, useTimelineEditing, useTimelinePlayer };
package/dist/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6
6
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
7
7
  <title>HyperFrames Studio</title>
8
- <script type="module" crossorigin src="/assets/index-CYk0NwSv.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-BupvpoiM.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-Dx79V1Se.css">
10
10
  </head>
11
11
  <body>