@hyperframes/studio 0.7.54 → 0.7.56
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/assets/{index-uBY329wb.js → index-BWnOxAiH.js} +1 -1
- package/dist/assets/{index-CMHYjEZ5.js → index-C4csZims.js} +1 -1
- package/dist/assets/index-CmVCjZjp.js +423 -0
- package/dist/assets/index-D-GyYi2d.css +1 -0
- package/dist/{chunk-SOTCF4DF.js → chunk-5QSIMBEJ.js} +2 -1
- package/dist/chunk-5QSIMBEJ.js.map +1 -0
- package/dist/{domEditingLayers-2ECJK24D.js → domEditingLayers-6LQGKPOI.js} +2 -2
- package/dist/index.d.ts +146 -144
- package/dist/index.html +2 -2
- package/dist/index.js +40582 -37803
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/src/App.tsx +106 -96
- package/src/components/EditorShell.tsx +253 -0
- package/src/components/StudioGlobalDragOverlay.tsx +1 -3
- package/src/components/StudioLeftSidebar.tsx +13 -3
- package/src/components/StudioRightPanel.tsx +8 -3
- package/src/components/TimelineToolbar.test.tsx +2 -2
- package/src/components/TimelineToolbar.tsx +179 -121
- package/src/components/editor/CanvasContextMenu.test.tsx +115 -0
- package/src/components/editor/CanvasContextMenu.tsx +198 -0
- package/src/components/editor/DomEditCropHandles.test.tsx +74 -3
- package/src/components/editor/DomEditCropHandles.tsx +64 -29
- package/src/components/editor/DomEditOverlay.test.ts +245 -279
- package/src/components/editor/DomEditOverlay.tsx +158 -126
- package/src/components/editor/DomEditOverlayHover.test.tsx +90 -0
- package/src/components/editor/DomEditRotateHandle.tsx +38 -18
- package/src/components/editor/DomEditSelectionChrome.test.tsx +80 -0
- package/src/components/editor/DomEditSelectionChrome.tsx +257 -0
- package/src/components/editor/LayersPanel.test.ts +66 -2
- package/src/components/editor/LayersPanel.tsx +43 -1
- package/src/components/editor/OffCanvasIndicators.test.tsx +34 -0
- package/src/components/editor/OffCanvasIndicators.tsx +49 -10
- package/src/components/editor/SnapGuideOverlay.tsx +28 -23
- package/src/components/editor/SnapToolbar.test.tsx +0 -1
- package/src/components/editor/anchoredResizeCommitFeedsOffset.test.ts +214 -0
- package/src/components/editor/anchoredResizeReleaseShift.test.ts +208 -0
- package/src/components/editor/canvasContextMenuZOrder.test.ts +435 -0
- package/src/components/editor/canvasContextMenuZOrder.ts +352 -0
- package/src/components/editor/domEditNudge.test.ts +80 -0
- package/src/components/editor/domEditNudge.ts +44 -0
- package/src/components/editor/domEditOverlayGeometry.test.ts +167 -1
- package/src/components/editor/domEditOverlayGeometry.ts +280 -20
- package/src/components/editor/domEditOverlayGestures.ts +44 -41
- package/src/components/editor/domEditOverlayStartGesture.ts +62 -2
- package/src/components/editor/domEditResizeLocal.test.ts +131 -0
- package/src/components/editor/domEditResizeLocal.ts +125 -0
- package/src/components/editor/domEditingDom.ts +1 -1
- package/src/components/editor/manualEditsDomPatches.test.ts +47 -0
- package/src/components/editor/manualOffsetDrag.ts +55 -12
- package/src/components/editor/offCanvasIndicatorGeometry.ts +31 -10
- package/src/components/editor/offCanvasIndicatorRefresh.test.tsx +25 -1
- package/src/components/editor/resizeDraft.ts +108 -0
- package/src/components/editor/snapEngine.test.ts +12 -78
- package/src/components/editor/snapEngine.ts +13 -53
- package/src/components/editor/useDomEditNudge.test.tsx +228 -0
- package/src/components/editor/useDomEditNudge.ts +254 -0
- package/src/components/editor/useDomEditOverlayGestures.ts +115 -116
- package/src/components/editor/useDomEditOverlayRects.ts +9 -2
- package/src/components/nle/AssetPreviewOverlay.tsx +147 -0
- package/src/components/nle/NLEContext.test.ts +144 -0
- package/src/components/nle/NLEContext.tsx +328 -0
- package/src/components/nle/NLEPreview.tsx +1 -1
- package/src/components/nle/PreviewOverlays.tsx +240 -0
- package/src/components/nle/PreviewPane.tsx +163 -0
- package/src/components/nle/TimelinePane.test.ts +60 -0
- package/src/components/nle/TimelinePane.tsx +293 -0
- package/src/components/nle/TimelineResizeDivider.tsx +8 -2
- package/src/components/nle/useCompositionStack.test.tsx +44 -0
- package/src/components/nle/useCompositionStack.ts +17 -9
- package/src/components/nle/useTimelineEditCallbacks.ts +217 -0
- package/src/components/sidebar/AssetCard.tsx +326 -0
- package/src/components/sidebar/AssetContextMenu.tsx +15 -30
- package/src/components/sidebar/AssetsTab.test.ts +96 -0
- package/src/components/sidebar/AssetsTab.tsx +71 -206
- package/src/components/sidebar/AudioRow.tsx +39 -2
- package/src/components/sidebar/BlocksTab.tsx +8 -1
- package/src/components/sidebar/LeftSidebar.tsx +4 -1
- package/src/components/sidebar/assetHelpers.ts +29 -0
- package/src/contexts/DomEditContext.tsx +9 -0
- package/src/contexts/StudioContext.tsx +9 -8
- package/src/contexts/TimelineEditContext.tsx +3 -7
- package/src/hooks/deleteSelectedKeyframes.ts +35 -0
- package/src/hooks/domEditCommitTypes.ts +12 -1
- package/src/hooks/domSelectionTestHarness.ts +14 -0
- package/src/hooks/gestureTransaction.test.ts +311 -0
- package/src/hooks/gestureTransaction.ts +199 -0
- package/src/hooks/gsapDragCommit.test.ts +141 -41
- package/src/hooks/gsapDragCommit.ts +64 -74
- package/src/hooks/gsapDragStaticSetHelpers.ts +9 -21
- package/src/hooks/gsapResizeIntercept.test.ts +69 -0
- package/src/hooks/gsapResizeIntercept.ts +38 -10
- package/src/hooks/gsapRuntimeBridge.test.ts +49 -13
- package/src/hooks/gsapRuntimeBridge.ts +4 -4
- package/src/hooks/gsapScriptCommitTypes.ts +16 -5
- package/src/hooks/gsapShared.test.ts +19 -1
- package/src/hooks/gsapShared.ts +14 -0
- package/src/hooks/patchDocumentRootDuration.test.ts +71 -0
- package/src/hooks/timelineEditingGsap.ts +14 -0
- package/src/hooks/timelineEditingHelpers.test.ts +34 -1
- package/src/hooks/timelineEditingHelpers.ts +22 -48
- package/src/hooks/timelineMoveAdapter.test.ts +77 -0
- package/src/hooks/timelineMoveAdapter.ts +37 -0
- package/src/hooks/useAnimatedPropertyCommit.test.tsx +36 -8
- package/src/hooks/useAnimatedPropertyCommit.ts +31 -26
- package/src/hooks/useAppHotkeys.ts +16 -25
- package/src/hooks/useBlockHandlers.ts +55 -27
- package/src/hooks/useContextMenuDismiss.ts +31 -7
- package/src/hooks/useDomEditCommits.test.tsx +154 -1
- package/src/hooks/useDomEditCommits.ts +100 -3
- package/src/hooks/useDomEditPositionPatchCommit.ts +2 -0
- package/src/hooks/useDomEditSession.ts +2 -2
- package/src/hooks/useDomEditTextCommits.test.tsx +135 -0
- package/src/hooks/useDomEditTextCommits.ts +8 -3
- package/src/hooks/useDomEditWiring.ts +7 -9
- package/src/hooks/useDomGeometryCommits.ts +17 -2
- package/src/hooks/useDomSelection.test.ts +2 -36
- package/src/hooks/useDomSelection.ts +81 -51
- package/src/hooks/useDomSelectionSelectionGuards.test.ts +276 -0
- package/src/hooks/useElementLifecycleOps.test.tsx +258 -0
- package/src/hooks/useElementLifecycleOps.ts +40 -71
- package/src/hooks/useEnableKeyframes.test.ts +142 -1
- package/src/hooks/useEnableKeyframes.ts +73 -29
- package/src/hooks/useGestureCommit.test.tsx +130 -0
- package/src/hooks/useGestureCommit.ts +32 -8
- package/src/hooks/useGroupCommits.ts +7 -28
- package/src/hooks/useGsapAwareEditing.test.tsx +239 -0
- package/src/hooks/useGsapAwareEditing.ts +115 -20
- package/src/hooks/useGsapKeyframeOps.test.tsx +59 -0
- package/src/hooks/useGsapKeyframeOps.ts +38 -10
- package/src/hooks/useGsapScriptCommits.test.tsx +40 -1
- package/src/hooks/useGsapScriptCommits.ts +134 -50
- package/src/hooks/useGsapSelectionHandlers.ts +49 -16
- package/src/hooks/useMusicBeatAnalysis.ts +72 -36
- package/src/hooks/usePersistentEditHistory.test.ts +33 -0
- package/src/hooks/usePersistentEditHistory.ts +92 -58
- package/src/hooks/usePreviewPersistence.ts +25 -7
- package/src/hooks/useRazorSplit.history.test.tsx +303 -0
- package/src/hooks/useRazorSplit.test.ts +269 -0
- package/src/hooks/useRazorSplit.testHelpers.ts +64 -0
- package/src/hooks/useRazorSplit.ts +107 -36
- package/src/hooks/useRenderClipContent.ts +24 -6
- package/src/hooks/useStudioContextValue.ts +15 -5
- package/src/hooks/useStudioUrlState.ts +2 -4
- package/src/hooks/useTimelineEditing.test.tsx +20 -29
- package/src/hooks/useTimelineEditingTypes.ts +6 -0
- package/src/hooks/useTimelineGroupEditing.ts +18 -4
- package/src/index.ts +1 -1
- package/src/player/components/ImageThumbnail.test.tsx +173 -0
- package/src/player/components/ImageThumbnail.tsx +160 -0
- package/src/player/components/PlayheadIndicator.tsx +50 -5
- package/src/player/components/Timeline.test.ts +102 -19
- package/src/player/components/Timeline.tsx +194 -194
- package/src/player/components/TimelineCanvas.tsx +207 -521
- package/src/player/components/TimelineClip.tsx +4 -1
- package/src/player/components/TimelineClipDiamonds.tsx +9 -40
- package/src/player/components/TimelineEmptyState.tsx +3 -1
- package/src/player/components/TimelineLanes.tsx +487 -0
- package/src/player/components/TimelineOverlays.tsx +122 -0
- package/src/player/components/VideoThumbnail.test.tsx +152 -0
- package/src/player/components/VideoThumbnail.tsx +28 -7
- package/src/player/components/thumbnailUtils.test.ts +127 -0
- package/src/player/components/thumbnailUtils.ts +54 -0
- package/src/player/components/timelineCallbacks.ts +18 -18
- package/src/player/components/timelineClipChildren.tsx +39 -0
- package/src/player/components/timelineClipDragCommit.test.ts +943 -0
- package/src/player/components/timelineClipDragCommit.ts +401 -0
- package/src/player/components/timelineClipDragPreview.test.ts +144 -0
- package/src/player/components/timelineClipDragPreview.ts +323 -38
- package/src/player/components/timelineClipDragTypes.ts +65 -0
- package/src/player/components/timelineCollision.test.ts +477 -0
- package/src/player/components/timelineCollision.ts +263 -0
- package/src/player/components/timelineDragDrop.ts +69 -60
- package/src/player/components/timelineEditCapabilities.ts +52 -0
- package/src/player/components/timelineEditing.test.ts +1 -1
- package/src/player/components/timelineEditing.ts +76 -59
- package/src/player/components/timelineGroupEditing.test.ts +126 -0
- package/src/player/components/timelineGroupEditing.ts +133 -0
- package/src/player/components/timelineGroupResizeCommit.ts +54 -0
- package/src/player/components/timelineLayout.test.ts +95 -23
- package/src/player/components/timelineLayout.ts +120 -61
- package/src/player/components/timelineMarquee.test.ts +197 -0
- package/src/player/components/timelineMarquee.ts +112 -0
- package/src/player/components/timelineMultiDragPreview.test.ts +127 -0
- package/src/player/components/timelineMultiDragPreview.ts +106 -0
- package/src/player/components/timelineOptimisticRevision.ts +42 -0
- package/src/player/components/timelineSnapping.test.ts +134 -0
- package/src/player/components/timelineSnapping.ts +110 -0
- package/src/player/components/timelineStackingSync.test.ts +244 -0
- package/src/player/components/timelineStackingSync.ts +331 -0
- package/src/player/components/timelineTheme.ts +6 -1
- package/src/player/components/timelineZones.test.ts +425 -0
- package/src/player/components/timelineZones.ts +198 -0
- package/src/player/components/timelineZoom.test.ts +67 -0
- package/src/player/components/timelineZoom.ts +51 -0
- package/src/player/components/useResolvedTimelineEditCallbacks.ts +25 -3
- package/src/player/components/useTimelineClipDrag.resize.test.tsx +241 -0
- package/src/player/components/useTimelineClipDrag.ts +380 -386
- package/src/player/components/useTimelineEditPinning.ts +121 -0
- package/src/player/components/useTimelineGeometry.ts +129 -0
- package/src/player/components/useTimelinePlayhead.ts +4 -16
- package/src/player/components/useTimelineRangeSelection.ts +341 -50
- package/src/player/components/useTimelineStackingSync.test.tsx +67 -0
- package/src/player/components/useTimelineStackingSync.ts +83 -0
- package/src/player/hooks/useExpandedTimelineElements.ts +0 -3
- package/src/player/hooks/usePlaybackKeyboard.ts +5 -0
- package/src/player/hooks/useTimelinePlayer.ts +48 -53
- package/src/player/hooks/useTimelinePlayerLoop.ts +85 -0
- package/src/player/hooks/useTimelineSyncCallbacks.test.ts +219 -0
- package/src/player/hooks/useTimelineSyncCallbacks.ts +104 -4
- package/src/player/index.ts +3 -2
- package/src/player/lib/time.test.ts +19 -19
- package/src/player/lib/time.ts +6 -2
- package/src/player/lib/timelineDOM.test.ts +25 -98
- package/src/player/lib/timelineDOM.ts +12 -81
- package/src/player/lib/timelineElementHelpers.ts +54 -5
- package/src/player/lib/timelineIframeHelpers.ts +2 -0
- package/src/player/store/playerStore.ts +62 -3
- package/src/styles/studio.css +27 -0
- package/src/utils/assetClickBehavior.test.ts +104 -0
- package/src/utils/assetClickBehavior.ts +75 -0
- package/src/utils/assetPreviewStore.ts +33 -0
- package/src/utils/blockInstaller.ts +10 -2
- package/src/utils/canvasNudgeGate.test.ts +31 -0
- package/src/utils/canvasNudgeGate.ts +32 -0
- package/src/utils/editHistory.test.ts +35 -0
- package/src/utils/gsapSoftReload.test.ts +119 -1
- package/src/utils/gsapSoftReload.ts +153 -0
- package/src/utils/mediaTypes.ts +3 -2
- package/src/utils/resizeDebug.ts +55 -0
- package/src/utils/rootDuration.test.ts +90 -1
- package/src/utils/rootDuration.ts +76 -13
- package/src/utils/sdkCutover.ts +4 -0
- package/src/utils/studioFileHistory.ts +37 -7
- package/src/utils/studioHelpers.ts +62 -0
- package/src/utils/studioPreviewHelpers.test.ts +65 -8
- package/src/utils/studioPreviewHelpers.ts +10 -0
- package/src/utils/studioTelemetry.ts +4 -1
- package/src/utils/studioUiPreferences.test.ts +38 -0
- package/src/utils/studioUiPreferences.ts +27 -0
- package/src/utils/studioUrlState.test.ts +0 -1
- package/src/utils/timelineAssetDrop.ts +62 -0
- package/src/utils/timelineDiscovery.ts +0 -17
- package/src/utils/timelineInspector.test.ts +121 -0
- package/src/utils/timelineInspector.ts +32 -1
- package/dist/assets/index-Dq7FEg0K.css +0 -1
- package/dist/assets/index-pRhCpGPz.js +0 -423
- package/dist/chunk-SOTCF4DF.js.map +0 -1
- package/src/components/StudioPreviewArea.tsx +0 -500
- package/src/components/nle/NLELayout.test.ts +0 -12
- package/src/components/nle/NLELayout.tsx +0 -591
- package/src/player/components/TimelineLayerGutter.tsx +0 -61
- package/src/player/components/TimelineSelectionOverlays.tsx +0 -55
- package/src/player/components/timelineMarqueeSelection.test.ts +0 -87
- package/src/player/components/timelineSnapTargets.test.ts +0 -144
- package/src/player/components/timelineSnapTargets.ts +0 -164
- package/src/player/components/useTimelineClipDrag.test.tsx +0 -506
- package/src/player/components/useTimelineClipGroupDrag.ts +0 -417
- package/src/player/components/useTimelineMarqueeSelection.test.tsx +0 -231
- package/src/player/components/useTimelineMarqueeSelection.ts +0 -276
- package/src/utils/timelineDiscovery.test.ts +0 -90
- /package/dist/{domEditingLayers-2ECJK24D.js.map → domEditingLayers-6LQGKPOI.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import * as react from 'react';
|
|
2
3
|
import { ReactNode, RefObject } from 'react';
|
|
3
4
|
import * as zustand from 'zustand';
|
|
4
5
|
import { MusicBeatAnalysis } from '@hyperframes/core/beats';
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { GsapAnimation, ArcPathSegment } from '@hyperframes/parsers/gsap-parser';
|
|
7
7
|
|
|
8
8
|
interface PlayerProps {
|
|
@@ -131,6 +131,9 @@ interface TimelineElement {
|
|
|
131
131
|
}
|
|
132
132
|
type ZoomMode = "fit" | "manual";
|
|
133
133
|
type TimelineTool = "select" | "razor";
|
|
134
|
+
interface SelectElementOptions {
|
|
135
|
+
preserveSet?: boolean;
|
|
136
|
+
}
|
|
134
137
|
interface PlayerState {
|
|
135
138
|
isPlaying: boolean;
|
|
136
139
|
currentTime: number;
|
|
@@ -177,6 +180,25 @@ interface PlayerState {
|
|
|
177
180
|
setAutoKeyframeEnabled: (enabled: boolean) => void;
|
|
178
181
|
/** Multi-select: additional selected elements beyond selectedElementId. */
|
|
179
182
|
selectedElementIds: Set<string>;
|
|
183
|
+
clearSelectedElementIds: () => void;
|
|
184
|
+
/** Replace the whole multi-selection at once (marquee live updates). */
|
|
185
|
+
setSelectedElementIds: (ids: Set<string>) => void;
|
|
186
|
+
/** Timeline magnet toggle — when false, clip drags/trims/drops never snap. */
|
|
187
|
+
timelineSnapEnabled: boolean;
|
|
188
|
+
setTimelineSnapEnabled: (enabled: boolean) => void;
|
|
189
|
+
/**
|
|
190
|
+
* Pin the timeline zoom to its current visual scale before a duration-changing
|
|
191
|
+
* edit, so a subsequent duration change (which recomputes fit-pps) stops
|
|
192
|
+
* rescaling every clip. No-op once already pinned (mode is "manual").
|
|
193
|
+
*/
|
|
194
|
+
pinTimelineZoom: (currentPixelsPerSecond: number, fitPixelsPerSecond: number) => void;
|
|
195
|
+
/**
|
|
196
|
+
* The timeline's live pixels-per-second + fit basis, published by <Timeline> on
|
|
197
|
+
* every render. Non-reactive scratch state (never read as a render input).
|
|
198
|
+
*/
|
|
199
|
+
timelinePps: number;
|
|
200
|
+
timelineFitPps: number;
|
|
201
|
+
setTimelineScale: (pps: number, fitPps: number) => void;
|
|
180
202
|
setSelection: (ids: Iterable<string>, anchor?: string | null) => void;
|
|
181
203
|
addSelectedElementId: (id: string) => void;
|
|
182
204
|
toggleSelectedElementId: (id: string) => void;
|
|
@@ -193,7 +215,7 @@ interface PlayerState {
|
|
|
193
215
|
setTimelineReady: (ready: boolean) => void;
|
|
194
216
|
setBeatDragging: (dragging: boolean) => void;
|
|
195
217
|
setElements: (elements: TimelineElement[]) => void;
|
|
196
|
-
setSelectedElementId: (id: string | null) => void;
|
|
218
|
+
setSelectedElementId: (id: string | null, options?: SelectElementOptions) => void;
|
|
197
219
|
/** Move the selection anchor within an active multi-selection without collapsing it. */
|
|
198
220
|
setSelectionAnchor: (id: string | null) => void;
|
|
199
221
|
updateElement: (elementId: string, updates: Partial<Pick<TimelineElement, "start" | "duration" | "track" | "zIndex" | "hasExplicitZIndex" | "playbackStart" | "hidden">>) => void;
|
|
@@ -264,36 +286,6 @@ declare const liveTime: {
|
|
|
264
286
|
};
|
|
265
287
|
declare const usePlayerStore: zustand.UseBoundStore<zustand.StoreApi<PlayerState>>;
|
|
266
288
|
|
|
267
|
-
type TimelineLayerDropPlacement = {
|
|
268
|
-
type: "onto";
|
|
269
|
-
layerId: string;
|
|
270
|
-
} | {
|
|
271
|
-
type: "between";
|
|
272
|
-
beforeLayerId: string;
|
|
273
|
-
afterLayerId: string;
|
|
274
|
-
} | {
|
|
275
|
-
type: "above";
|
|
276
|
-
layerId: string;
|
|
277
|
-
} | {
|
|
278
|
-
type: "below";
|
|
279
|
-
layerId: string;
|
|
280
|
-
};
|
|
281
|
-
interface TimelineStackingZIndexChange {
|
|
282
|
-
key: string;
|
|
283
|
-
zIndex: number;
|
|
284
|
-
domId?: string;
|
|
285
|
-
selector?: string;
|
|
286
|
-
selectorIndex?: number;
|
|
287
|
-
sourceFile?: string;
|
|
288
|
-
}
|
|
289
|
-
interface TimelineStackingReorderIntent {
|
|
290
|
-
contextKey: string;
|
|
291
|
-
placement: TimelineLayerDropPlacement;
|
|
292
|
-
zIndexChanges: TimelineStackingZIndexChange[];
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
type BlockedTimelineEditIntent = "move" | "resize-start" | "resize-end";
|
|
296
|
-
|
|
297
289
|
/**
|
|
298
290
|
* Source Patcher — Maps visual property edits back to source HTML files.
|
|
299
291
|
* Handles inline style updates, attribute changes, and text content.
|
|
@@ -320,21 +312,63 @@ declare function resolveSourceFile(elementId: string | null, selector: string, f
|
|
|
320
312
|
*/
|
|
321
313
|
declare function applyPatch(html: string, elementId: string, op: PatchOperation): string;
|
|
322
314
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
315
|
+
type BlockedTimelineEditIntent = "move" | "resize-start" | "resize-end";
|
|
316
|
+
|
|
317
|
+
interface DomEditCapabilities {
|
|
318
|
+
canSelect: boolean;
|
|
319
|
+
canEditStyles: boolean;
|
|
320
|
+
/** Can take a non-destructive `clip-path: inset()` crop — broader than
|
|
321
|
+
* canEditStyles (a sub-composition host is croppable from the parent view). */
|
|
322
|
+
canCrop: boolean;
|
|
323
|
+
/** Directly editable authored left/top style fields. Canvas drag uses manual edits instead. */
|
|
324
|
+
canMove: boolean;
|
|
325
|
+
/** Directly editable authored width/height style fields. Canvas resize uses manual edits instead. */
|
|
326
|
+
canResize: boolean;
|
|
327
|
+
canApplyManualOffset: boolean;
|
|
328
|
+
canApplyManualSize: boolean;
|
|
329
|
+
canApplyManualRotation: boolean;
|
|
330
|
+
reasonIfDisabled?: string;
|
|
326
331
|
}
|
|
327
|
-
interface
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
+
interface DomEditTextField {
|
|
333
|
+
key: string;
|
|
334
|
+
label: string;
|
|
335
|
+
value: string;
|
|
336
|
+
tagName: string;
|
|
337
|
+
attributes: Array<{
|
|
338
|
+
name: string;
|
|
339
|
+
value: string;
|
|
340
|
+
}>;
|
|
341
|
+
inlineStyles: Record<string, string>;
|
|
342
|
+
computedStyles: Record<string, string>;
|
|
343
|
+
source: "self" | "child" | "text-node";
|
|
344
|
+
sourceChildIndex?: number;
|
|
332
345
|
}
|
|
333
|
-
interface
|
|
334
|
-
|
|
335
|
-
|
|
346
|
+
interface DomEditSelection extends PatchTarget {
|
|
347
|
+
element: HTMLElement;
|
|
348
|
+
label: string;
|
|
349
|
+
tagName: string;
|
|
350
|
+
sourceFile: string;
|
|
351
|
+
compositionPath: string;
|
|
352
|
+
compositionSrc?: string;
|
|
353
|
+
isCompositionHost: boolean;
|
|
354
|
+
isInsideLockedComposition: boolean;
|
|
355
|
+
boundingBox: {
|
|
356
|
+
x: number;
|
|
357
|
+
y: number;
|
|
358
|
+
width: number;
|
|
359
|
+
height: number;
|
|
360
|
+
};
|
|
361
|
+
textContent: string | null;
|
|
362
|
+
dataAttributes: Record<string, string>;
|
|
363
|
+
inlineStyles: Record<string, string>;
|
|
364
|
+
computedStyles: Record<string, string>;
|
|
365
|
+
textFields: DomEditTextField[];
|
|
366
|
+
capabilities: DomEditCapabilities;
|
|
367
|
+
gsapAnimations?: GsapAnimation[];
|
|
336
368
|
}
|
|
337
369
|
|
|
370
|
+
type TimelineMoveOperation = "timing" | "lane-reorder" | "track-insert";
|
|
371
|
+
|
|
338
372
|
/**
|
|
339
373
|
* Shared callback signatures for timeline editing operations.
|
|
340
374
|
* Used by NLELayout, Timeline, and any component that passes through
|
|
@@ -355,16 +389,24 @@ interface TimelineDropCallbacks {
|
|
|
355
389
|
}) => Promise<void> | void;
|
|
356
390
|
}
|
|
357
391
|
interface TimelineEditCallbacks {
|
|
358
|
-
onMoveElement?: (element: TimelineElement, updates: Pick<TimelineElement, "start" | "track">
|
|
359
|
-
|
|
360
|
-
|
|
392
|
+
onMoveElement?: (element: TimelineElement, updates: Pick<TimelineElement, "start" | "track">) => Promise<void> | void;
|
|
393
|
+
/** Atomic multi-clip move (single undo) for main-track ripple + track-insert.
|
|
394
|
+
* `coalesceKey` (drag-commit gesture id) merges the move history entry with a
|
|
395
|
+
* lane change's follow-up z-reorder entry into one undo step. */
|
|
396
|
+
onMoveElements?: (edits: Array<{
|
|
397
|
+
element: TimelineElement;
|
|
398
|
+
updates: Pick<TimelineElement, "start" | "track">;
|
|
399
|
+
}>, coalesceKey?: string, operation?: TimelineMoveOperation) => Promise<void> | void;
|
|
361
400
|
onResizeElement?: (element: TimelineElement, updates: Pick<TimelineElement, "start" | "duration" | "playbackStart">) => Promise<void> | void;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
401
|
+
onResizeElements?: (changes: Array<{
|
|
402
|
+
element: TimelineElement;
|
|
403
|
+
start: number;
|
|
404
|
+
duration: number;
|
|
405
|
+
playbackStart?: number;
|
|
406
|
+
}>, options?: {
|
|
407
|
+
coalesceKey?: string;
|
|
408
|
+
}) => Promise<void> | void;
|
|
366
409
|
onToggleTrackHidden?: (track: number, hidden: boolean) => Promise<void> | void;
|
|
367
|
-
onToggleElementHidden?: (elementKey: string, hidden: boolean) => Promise<void> | void;
|
|
368
410
|
onBlockedEditAttempt?: (element: TimelineElement, intent: BlockedTimelineEditIntent) => void;
|
|
369
411
|
onSplitElement?: (element: TimelineElement, splitTime: number) => Promise<void> | void;
|
|
370
412
|
onRazorSplit?: (element: TimelineElement, splitTime: number) => Promise<void> | void;
|
|
@@ -405,7 +447,7 @@ interface TimelineTheme {
|
|
|
405
447
|
clipRadius: string;
|
|
406
448
|
}
|
|
407
449
|
|
|
408
|
-
type TimelineEditOverrides = Pick<TimelineEditCallbacks, "onMoveElement" | "onResizeElement" | "onBlockedEditAttempt" | "onSplitElement">;
|
|
450
|
+
type TimelineEditOverrides = Pick<TimelineEditCallbacks, "onMoveElement" | "onMoveElements" | "onResizeElement" | "onResizeElements" | "onBlockedEditAttempt" | "onSplitElement">;
|
|
409
451
|
|
|
410
452
|
interface TimelineProps extends TimelineDropCallbacks, TimelineEditOverrides {
|
|
411
453
|
onSeek?: (time: number) => void;
|
|
@@ -498,48 +540,61 @@ declare function useTimelinePlayer(): {
|
|
|
498
540
|
|
|
499
541
|
declare function formatTime(time: number): string;
|
|
500
542
|
|
|
501
|
-
interface
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
543
|
+
interface TimelineEditCallbackDeps {
|
|
544
|
+
handleTimelineElementMove: (element: TimelineElement, updates: Pick<TimelineElement, "start" | "track">) => Promise<void> | void;
|
|
545
|
+
handleTimelineElementsMove: (edits: Array<{
|
|
546
|
+
element: TimelineElement;
|
|
547
|
+
updates: Pick<TimelineElement, "start" | "track">;
|
|
548
|
+
}>, coalesceKey?: string, operation?: TimelineMoveOperation) => Promise<void> | void;
|
|
549
|
+
handleTimelineElementResize: (element: TimelineElement, updates: Pick<TimelineElement, "start" | "duration" | "playbackStart">) => Promise<void> | void;
|
|
550
|
+
handleTimelineGroupResize: NonNullable<TimelineEditCallbacks["onResizeElements"]>;
|
|
551
|
+
handleToggleTrackHidden: (track: number, hidden: boolean) => Promise<void> | void;
|
|
552
|
+
handleBlockedTimelineEdit: (element: TimelineElement, intent: BlockedTimelineEditIntent) => void;
|
|
553
|
+
handleTimelineElementSplit: (element: TimelineElement, splitTime: number) => Promise<void> | void;
|
|
554
|
+
handleRazorSplit: (element: TimelineElement, splitTime: number) => Promise<void> | void;
|
|
555
|
+
handleRazorSplitAll: (splitTime: number) => Promise<void> | void;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
interface BlockPreviewInfo {
|
|
559
|
+
videoUrl?: string;
|
|
560
|
+
posterUrl?: string;
|
|
561
|
+
title: string;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
type GestureRecordingState = "idle" | "recording" | "preview";
|
|
565
|
+
|
|
566
|
+
type RenderClipContent = (element: TimelineElement, style: {
|
|
567
|
+
clip: string;
|
|
568
|
+
label: string;
|
|
569
|
+
}) => ReactNode;
|
|
570
|
+
type TimelineDropPlacement = Pick<TimelineElement, "start" | "track">;
|
|
571
|
+
interface EditorShellProps extends TimelineEditCallbackDeps {
|
|
572
|
+
/** Left sidebar (media/library), rendered in the top row. */
|
|
573
|
+
left: ReactNode;
|
|
574
|
+
/** Right panel (inspector/design) or null when collapsed, in the top row. */
|
|
575
|
+
right: ReactNode;
|
|
576
|
+
/** Hide the whole shell (e.g. while the storyboard view is active). */
|
|
577
|
+
hidden?: boolean;
|
|
578
|
+
timelineToolbar: ReactNode;
|
|
579
|
+
renderClipContent: RenderClipContent;
|
|
580
|
+
handleTimelineElementDelete: (element: TimelineElement) => Promise<void> | void;
|
|
581
|
+
handleTimelineAssetDrop: (assetPath: string, placement: TimelineDropPlacement) => Promise<void> | void;
|
|
582
|
+
handleTimelineBlockDrop?: (blockName: string, placement: TimelineDropPlacement) => Promise<void> | void;
|
|
583
|
+
handlePreviewBlockDrop?: (blockName: string, position: {
|
|
528
584
|
left: number;
|
|
529
585
|
top: number;
|
|
530
586
|
}) => Promise<void> | void;
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
onCompositionLoadingChange?: (loading: boolean) => void;
|
|
587
|
+
handleTimelineFileDrop: (files: File[], placement?: TimelineDropPlacement) => Promise<void> | void;
|
|
588
|
+
setCompIdToSrc: (map: Map<string, string>) => void;
|
|
589
|
+
setCompositionLoading: (loading: boolean) => void;
|
|
590
|
+
shouldShowSelectedDomBounds: boolean;
|
|
591
|
+
blockPreview?: BlockPreviewInfo | null;
|
|
592
|
+
isGestureRecording?: boolean;
|
|
593
|
+
recordingState?: GestureRecordingState;
|
|
594
|
+
onToggleRecording?: () => void;
|
|
595
|
+
gestureOverlay?: ReactNode;
|
|
541
596
|
}
|
|
542
|
-
declare
|
|
597
|
+
declare function EditorShell({ left, right, hidden, timelineToolbar, renderClipContent, handleTimelineElementDelete, handleTimelineAssetDrop, handleTimelineBlockDrop, handlePreviewBlockDrop, handleTimelineFileDrop, handleTimelineElementMove, handleTimelineElementsMove, handleTimelineElementResize, handleTimelineGroupResize, handleToggleTrackHidden, handleBlockedTimelineEdit, handleTimelineElementSplit, handleRazorSplit, handleRazorSplitAll, setCompIdToSrc, setCompositionLoading, shouldShowSelectedDomBounds, isGestureRecording, recordingState, onToggleRecording, blockPreview, gestureOverlay, }: EditorShellProps): react_jsx_runtime.JSX.Element;
|
|
543
598
|
|
|
544
599
|
interface NLEPreviewProps {
|
|
545
600
|
projectId: string;
|
|
@@ -583,59 +638,6 @@ interface SourceEditorProps {
|
|
|
583
638
|
}
|
|
584
639
|
declare const SourceEditor: react.NamedExoticComponent<SourceEditorProps>;
|
|
585
640
|
|
|
586
|
-
interface DomEditCapabilities {
|
|
587
|
-
canSelect: boolean;
|
|
588
|
-
canEditStyles: boolean;
|
|
589
|
-
/** Can take a non-destructive `clip-path: inset()` crop — broader than
|
|
590
|
-
* canEditStyles (a sub-composition host is croppable from the parent view). */
|
|
591
|
-
canCrop: boolean;
|
|
592
|
-
/** Directly editable authored left/top style fields. Canvas drag uses manual edits instead. */
|
|
593
|
-
canMove: boolean;
|
|
594
|
-
/** Directly editable authored width/height style fields. Canvas resize uses manual edits instead. */
|
|
595
|
-
canResize: boolean;
|
|
596
|
-
canApplyManualOffset: boolean;
|
|
597
|
-
canApplyManualSize: boolean;
|
|
598
|
-
canApplyManualRotation: boolean;
|
|
599
|
-
reasonIfDisabled?: string;
|
|
600
|
-
}
|
|
601
|
-
interface DomEditTextField {
|
|
602
|
-
key: string;
|
|
603
|
-
label: string;
|
|
604
|
-
value: string;
|
|
605
|
-
tagName: string;
|
|
606
|
-
attributes: Array<{
|
|
607
|
-
name: string;
|
|
608
|
-
value: string;
|
|
609
|
-
}>;
|
|
610
|
-
inlineStyles: Record<string, string>;
|
|
611
|
-
computedStyles: Record<string, string>;
|
|
612
|
-
source: "self" | "child" | "text-node";
|
|
613
|
-
sourceChildIndex?: number;
|
|
614
|
-
}
|
|
615
|
-
interface DomEditSelection extends PatchTarget {
|
|
616
|
-
element: HTMLElement;
|
|
617
|
-
label: string;
|
|
618
|
-
tagName: string;
|
|
619
|
-
sourceFile: string;
|
|
620
|
-
compositionPath: string;
|
|
621
|
-
compositionSrc?: string;
|
|
622
|
-
isCompositionHost: boolean;
|
|
623
|
-
isInsideLockedComposition: boolean;
|
|
624
|
-
boundingBox: {
|
|
625
|
-
x: number;
|
|
626
|
-
y: number;
|
|
627
|
-
width: number;
|
|
628
|
-
height: number;
|
|
629
|
-
};
|
|
630
|
-
textContent: string | null;
|
|
631
|
-
dataAttributes: Record<string, string>;
|
|
632
|
-
inlineStyles: Record<string, string>;
|
|
633
|
-
computedStyles: Record<string, string>;
|
|
634
|
-
textFields: DomEditTextField[];
|
|
635
|
-
capabilities: DomEditCapabilities;
|
|
636
|
-
gsapAnimations?: GsapAnimation[];
|
|
637
|
-
}
|
|
638
|
-
|
|
639
641
|
interface ImportedFontAsset {
|
|
640
642
|
family: string;
|
|
641
643
|
path: string;
|
|
@@ -845,4 +847,4 @@ declare function findElementBlock(html: string, elementId: string): {
|
|
|
845
847
|
isSelfClosing: boolean;
|
|
846
848
|
} | null;
|
|
847
849
|
|
|
848
|
-
export { CompositionBreadcrumb, type CompositionLevel, CompositionThumbnail,
|
|
850
|
+
export { CompositionBreadcrumb, type CompositionLevel, CompositionThumbnail, EditorShell, FileTree, NLEPreview, type PatchOperation, type PickedElement, Player, PlayerControls, PropertyPanel, SourceEditor, StudioApp, Timeline, type TimelineElement, VideoThumbnail, applyPatch, findElementBlock, formatTime, liveTime, mergeStyleIntoTag, parseStyleString, resolveIframe, resolveSourceFile, useElementPicker, usePlayerStore, useTimelinePlayer };
|
package/dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
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-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-CmVCjZjp.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-D-GyYi2d.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div data-hf-id="hf-aph5" id="root"></div>
|