@hyperframes/studio 0.8.6 → 0.8.7
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/{hyperframes-player-DdNgW-Np.js → hyperframes-player-bDcU464i.js} +1 -1
- package/dist/assets/index-Ba9zbpT9.css +1 -0
- package/dist/assets/index-CUXnyoIa.js +428 -0
- package/dist/assets/{index-bv8b5eiQ.js → index-FkAs3zRu.js} +1 -1
- package/dist/assets/{index-Ci7Uy8fR.js → index-MSOSP1-J.js} +1 -1
- package/dist/index.d.ts +98 -17
- package/dist/index.html +2 -2
- package/dist/index.js +10336 -7195
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/src/App.tsx +22 -23
- package/src/captions/components/CaptionAnimationPanel.tsx +46 -13
- package/src/captions/components/CaptionOverlay.tsx +172 -29
- package/src/captions/components/CaptionOverlayUtils.ts +54 -0
- package/src/captions/components/CaptionPropertyPanel.tsx +49 -23
- package/src/captions/components/CaptionTimeline.tsx +36 -79
- package/src/captions/components/shared.tsx +76 -1
- package/src/captions/hooks/useCaptionSync.ts +72 -13
- package/src/captions/keyboard.test.ts +12 -0
- package/src/captions/keyboard.ts +12 -1
- package/src/captions/store.ts +120 -14
- package/src/components/EditorShell.selectionSync.test.tsx +1 -1
- package/src/components/EditorShell.tsx +13 -1
- package/src/components/StudioRightPanel.tsx +2 -0
- package/src/components/StudioRightPanel.types.ts +1 -0
- package/src/components/editor/AnimationCard.tsx +2 -1
- package/src/components/editor/AnimationCardParts.tsx +6 -3
- package/src/components/editor/ArcPathControls.tsx +10 -4
- package/src/components/editor/BlockParamsPanel.test.tsx +170 -0
- package/src/components/editor/BlockParamsPanel.tsx +153 -11
- package/src/components/editor/BorderRadiusEditor.tsx +3 -22
- package/src/components/editor/FileTree.tsx +41 -12
- package/src/components/editor/FileTreeNodes.tsx +90 -20
- package/src/components/editor/GsapAnimationList.tsx +5 -0
- package/src/components/editor/KeyframeDiamond.tsx +3 -1
- package/src/components/editor/KeyframeEaseList.tsx +3 -2
- package/src/components/editor/KeyframeNavigation.tsx +6 -2
- package/src/components/editor/LayersPanel.tsx +11 -2
- package/src/components/editor/MotionPathNode.tsx +1 -0
- package/src/components/editor/PropertyPanel.test.tsx +7 -6
- package/src/components/editor/PropertyPanel.tsx +13 -5
- package/src/components/editor/PropertyPanelFlat.tsx +2 -0
- package/src/components/editor/SnapToolbar.tsx +20 -4
- package/src/components/editor/TimelineFxPopover.test.tsx +113 -0
- package/src/components/editor/TimelineFxPopover.tsx +138 -0
- package/src/components/editor/Transform3DCube.tsx +22 -1
- package/src/components/editor/manualOffsetDrag.test.ts +49 -0
- package/src/components/editor/manualOffsetDrag.ts +13 -1
- package/src/components/editor/propertyPanel3dTransform.tsx +11 -3
- package/src/components/editor/propertyPanelAudioFxGroup.test.tsx +139 -3
- package/src/components/editor/propertyPanelAudioFxGroup.tsx +4 -0
- package/src/components/editor/propertyPanelColor.tsx +9 -1
- package/src/components/editor/propertyPanelColorGradingControls.tsx +28 -7
- package/src/components/editor/propertyPanelCommitField.tsx +9 -1
- package/src/components/editor/propertyPanelFill.tsx +50 -2
- package/src/components/editor/propertyPanelFlatProps.ts +1 -0
- package/src/components/editor/propertyPanelFont.tsx +45 -9
- package/src/components/editor/propertyPanelFxPresetStyle.ts +18 -0
- package/src/components/editor/propertyPanelFxSection.test.tsx +3 -3
- package/src/components/editor/propertyPanelFxSection.tsx +8 -23
- package/src/components/editor/propertyPanelPrimitives.tsx +9 -12
- package/src/components/editor/propertyPanelStyleSections.tsx +21 -2
- package/src/components/editor/propertyPanelTransformCommit.ts +3 -3
- package/src/components/editor/propertyPanelTypes.ts +2 -0
- package/src/components/editor/useApplyAudioFxPreset.ts +36 -0
- package/src/components/editor/useFxCarve.ts +0 -0
- package/src/components/editor/useFxCarveGrouping.ts +132 -0
- package/src/components/nle/PreviewOverlays.tsx +69 -2
- package/src/components/nle/PreviewPane.tsx +1 -0
- package/src/components/nle/useTimelineEditCallbacks.test.tsx +1 -0
- package/src/components/nle/useTimelineEditCallbacks.ts +27 -0
- package/src/components/panels/SlideshowPanel.tsx +81 -12
- package/src/components/panels/SlideshowSubPanels.tsx +61 -7
- package/src/components/sidebar/AssetCard.test.tsx +2 -2
- package/src/components/sidebar/AssetCard.tsx +94 -46
- package/src/components/sidebar/AssetContextMenu.tsx +196 -42
- package/src/components/sidebar/AssetsTab.tsx +156 -96
- package/src/components/sidebar/AudioRow.tsx +95 -40
- package/src/components/sidebar/BlocksTab.tsx +40 -128
- package/src/components/sidebar/CompositionsTab.tsx +46 -34
- package/src/components/sidebar/LeftSidebar.tsx +87 -75
- package/src/components/sidebar/PromptPreviewModal.tsx +126 -0
- package/src/components/sidebar/assetHelpers.ts +8 -0
- package/src/contexts/TimelineEditContext.tsx +5 -0
- package/src/hooks/timelineAudioGroupVolume.ts +148 -0
- package/src/hooks/timelineEditingHelpers.ts +78 -1
- package/src/hooks/timelineElementFxAttribute.ts +150 -0
- package/src/hooks/timelineTrackVisibility.test.ts +222 -1
- package/src/hooks/timelineTrackVisibility.ts +187 -4
- package/src/hooks/useAppHotkeys.ts +22 -0
- package/src/hooks/useAudioSoloBridge.ts +61 -0
- package/src/hooks/useCaptionDetection.ts +22 -2
- package/src/hooks/useDomEditCommits.test.tsx +24 -0
- package/src/hooks/useEffectiveTimelineDuration.ts +20 -0
- package/src/hooks/useGroupLevel.ts +36 -0
- package/src/hooks/useHydrateActiveCompPathFromUrl.ts +36 -0
- package/src/hooks/useMusicBeatAnalysis.ts +13 -0
- package/src/hooks/useTimelineDeleteOps.ts +170 -0
- package/src/hooks/useTimelineEditing.ts +53 -129
- package/src/player/components/AudioWaveform.tsx +29 -26
- package/src/player/components/BeatStrip.test.tsx +5 -9
- package/src/player/components/BeatStrip.tsx +12 -5
- package/src/player/components/ClipContextMenu.tsx +8 -2
- package/src/player/components/EditModal.tsx +48 -7
- package/src/player/components/KeyframeDiamondContextMenu.tsx +90 -10
- package/src/player/components/LayerDisclosureRow.tsx +12 -13
- package/src/player/components/Player.tsx +43 -8
- package/src/player/components/PlayerControls.tsx +107 -63
- package/src/player/components/ShortcutsPanel.tsx +23 -4
- package/src/player/components/SpeedMenu.tsx +34 -42
- package/src/player/components/Timeline.test.ts +7 -7
- package/src/player/components/Timeline.tsx +7 -10
- package/src/player/components/TimelineFxButton.test.tsx +81 -0
- package/src/player/components/TimelineFxButton.tsx +143 -0
- package/src/player/components/TimelineGroupBusStrip.test.tsx +146 -0
- package/src/player/components/TimelineGroupBusStrip.tsx +103 -0
- package/src/player/components/TimelineGroupHeader.tsx +176 -0
- package/src/player/components/TimelineGroupRow.tsx +146 -0
- package/src/player/components/TimelineLanes.test.tsx +5 -0
- package/src/player/components/TimelineLanes.tsx +39 -33
- package/src/player/components/TimelineOverlays.tsx +34 -0
- package/src/player/components/TimelineSoloButton.tsx +32 -0
- package/src/player/components/TimelineTrackHeader.tsx +74 -98
- package/src/player/components/TimelineTrackPlainHeader.tsx +119 -0
- package/src/player/components/VideoThumbnail.tsx +6 -1
- package/src/player/components/menuKeyboardNav.ts +47 -0
- package/src/player/components/timelineCallbacks.ts +26 -0
- package/src/player/components/timelineKeyboardNavigation.test.ts +8 -0
- package/src/player/components/timelineKeyboardNavigation.ts +147 -30
- package/src/player/components/timelineLaneProps.ts +3 -0
- package/src/player/components/timelineLayout.ts +1 -1
- package/src/player/components/timelineNavigationIdentity.ts +4 -0
- package/src/player/components/useTimelineLaneRowIndexes.ts +38 -0
- package/src/player/components/useTimelineLogicalFocus.ts +9 -0
- package/src/player/components/useTimelineLogicalRows.test.tsx +8 -0
- package/src/player/components/useTimelineLogicalRows.ts +17 -12
- package/src/player/components/useTimelineMultiDragActorWindows.ts +30 -0
- package/src/player/components/useTimelineTrackDerivations.ts +150 -6
- package/src/player/components/useTimelineTrackLayout.ts +61 -4
- package/src/player/hooks/previewMessageRouter.ts +127 -0
- package/src/player/hooks/useTimelinePlayer.ts +9 -47
- package/src/player/lib/timelineDOM.ts +51 -0
- package/src/player/store/audioSoloSlice.test.ts +113 -0
- package/src/player/store/audioSoloSlice.ts +43 -0
- package/src/player/store/editingModeSlice.ts +45 -0
- package/src/player/store/groupLevels.ts +33 -0
- package/src/player/store/keyframeSlice.ts +26 -0
- package/src/player/store/playerStore.ts +21 -22
- package/src/player/store/timelineElement.ts +10 -0
- package/src/telemetry/events.ts +12 -0
- package/dist/assets/index-Cy6fGN1u.js +0 -428
- package/dist/assets/index-DcF4s1PG.css +0 -1
|
@@ -63,6 +63,14 @@ export interface KeyframeSlice {
|
|
|
63
63
|
/** Union-expand clips (keyframed clips are expanded by default on load). */
|
|
64
64
|
expandClips: (ids: readonly string[]) => void;
|
|
65
65
|
|
|
66
|
+
/** Groups whose member rows the caret has shown (structural, not lanes). */
|
|
67
|
+
expandedGroupIds: Set<string>;
|
|
68
|
+
toggleGroupExpanded: (id: string) => void;
|
|
69
|
+
|
|
70
|
+
/** Rows (clip id or group id) whose automation-lane rows the `∿` button opened. */
|
|
71
|
+
expandedLaneOwnerIds: Set<string>;
|
|
72
|
+
toggleLaneOwnerExpanded: (id: string) => void;
|
|
73
|
+
|
|
66
74
|
/**
|
|
67
75
|
* Project/session/element-scoped request. Its nonce is monotonic across store
|
|
68
76
|
* resets so a stale consumer can never collide with a later request.
|
|
@@ -119,6 +127,24 @@ export function createKeyframeSlice(
|
|
|
119
127
|
return { expandedClipIds: next };
|
|
120
128
|
}),
|
|
121
129
|
|
|
130
|
+
expandedGroupIds: new Set(),
|
|
131
|
+
toggleGroupExpanded: (id) =>
|
|
132
|
+
set((state) => {
|
|
133
|
+
const next = new Set(state.expandedGroupIds);
|
|
134
|
+
if (next.has(id)) next.delete(id);
|
|
135
|
+
else next.add(id);
|
|
136
|
+
return { expandedGroupIds: next };
|
|
137
|
+
}),
|
|
138
|
+
|
|
139
|
+
expandedLaneOwnerIds: new Set(),
|
|
140
|
+
toggleLaneOwnerExpanded: (id) =>
|
|
141
|
+
set((state) => {
|
|
142
|
+
const next = new Set(state.expandedLaneOwnerIds);
|
|
143
|
+
if (next.has(id)) next.delete(id);
|
|
144
|
+
else next.add(id);
|
|
145
|
+
return { expandedLaneOwnerIds: next };
|
|
146
|
+
}),
|
|
147
|
+
|
|
122
148
|
focusedEaseSegment: null,
|
|
123
149
|
focusedEaseRequestNonce: 0,
|
|
124
150
|
setFocusedEaseSegment: (target) =>
|
|
@@ -16,6 +16,8 @@ import {
|
|
|
16
16
|
} from "./automationSelectionSlice";
|
|
17
17
|
import { createTimelineFocusRequest, type TimelineFocusRequest } from "./timelineFocusState";
|
|
18
18
|
import { createThumbnailSlice, type ThumbnailSlice } from "./thumbnailSlice";
|
|
19
|
+
import { createAudioSoloSlice, type AudioSoloSlice } from "./audioSoloSlice";
|
|
20
|
+
import { createEditingModeSlice, type EditingModeSlice } from "./editingModeSlice";
|
|
19
21
|
|
|
20
22
|
export type { KeyframeCacheEntry } from "./keyframeSlice";
|
|
21
23
|
export { liveTime } from "./liveTime";
|
|
@@ -47,7 +49,13 @@ function resolveElementSelection(
|
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
|
|
50
|
-
interface PlayerState
|
|
52
|
+
interface PlayerState
|
|
53
|
+
extends
|
|
54
|
+
KeyframeSlice,
|
|
55
|
+
AutomationSelectionSlice,
|
|
56
|
+
ThumbnailSlice,
|
|
57
|
+
AudioSoloSlice,
|
|
58
|
+
EditingModeSlice {
|
|
51
59
|
isPlaying: boolean;
|
|
52
60
|
currentTime: number;
|
|
53
61
|
duration: number;
|
|
@@ -87,20 +95,6 @@ interface PlayerState extends KeyframeSlice, AutomationSelectionSlice, Thumbnail
|
|
|
87
95
|
* (drag, resize, rotate) target this instead of recomputing from playhead. */
|
|
88
96
|
activeKeyframePct: number | null;
|
|
89
97
|
setActiveKeyframePct: (pct: number | null) => void;
|
|
90
|
-
/** Motion-path "set destination" mode. Armed from the preview toolbar (replaces
|
|
91
|
-
* the old double-click-on-canvas UX); while armed, one canvas click places the
|
|
92
|
-
* new path's destination. `available` is published by MotionPathOverlay so the
|
|
93
|
-
* toolbar shows the button only when the selected element can take a path. */
|
|
94
|
-
motionPathArmed: boolean;
|
|
95
|
-
setMotionPathArmed: (armed: boolean) => void;
|
|
96
|
-
motionPathCreateAvailable: boolean;
|
|
97
|
-
setMotionPathCreateAvailable: (available: boolean) => void;
|
|
98
|
-
/** Global toggle for the "Add keyframe" diamond in the timeline toolbar (#1808).
|
|
99
|
-
* When false, a manual drag/resize/rotate edit on an element that already has
|
|
100
|
-
* a live tween shifts every keyframe by the edit's delta (preserving the
|
|
101
|
-
* animation's shape) instead of inserting/updating a keyframe at the playhead. */
|
|
102
|
-
autoKeyframeEnabled: boolean;
|
|
103
|
-
setAutoKeyframeEnabled: (enabled: boolean) => void;
|
|
104
98
|
|
|
105
99
|
/** Multi-select: additional selected elements beyond selectedElementId. */
|
|
106
100
|
selectedElementIds: Set<string>;
|
|
@@ -146,7 +140,14 @@ interface PlayerState extends KeyframeSlice, AutomationSelectionSlice, Thumbnail
|
|
|
146
140
|
updates: Partial<
|
|
147
141
|
Pick<
|
|
148
142
|
TimelineElement,
|
|
149
|
-
|
|
143
|
+
| "start"
|
|
144
|
+
| "duration"
|
|
145
|
+
| "track"
|
|
146
|
+
| "zIndex"
|
|
147
|
+
| "hasExplicitZIndex"
|
|
148
|
+
| "playbackStart"
|
|
149
|
+
| "hidden"
|
|
150
|
+
| "audioGroup"
|
|
150
151
|
>
|
|
151
152
|
>,
|
|
152
153
|
) => void;
|
|
@@ -270,6 +271,8 @@ export function createTimelineResetState() {
|
|
|
270
271
|
// paste through `sel.elementKey === paste.elementKey` to a stale t0.
|
|
271
272
|
automationSelection: null,
|
|
272
273
|
expandedClipIds: new Set<string>(),
|
|
274
|
+
expandedGroupIds: new Set<string>(),
|
|
275
|
+
expandedLaneOwnerIds: new Set<string>(),
|
|
273
276
|
focusedEaseSegment: null,
|
|
274
277
|
selectedElementIds: new Set<string>(),
|
|
275
278
|
requestedSeekTime: null,
|
|
@@ -320,15 +323,11 @@ export const usePlayerStore = create<PlayerState>((set, get) => ({
|
|
|
320
323
|
...createThumbnailSlice(set),
|
|
321
324
|
|
|
322
325
|
...createAutomationSelectionSlice(set),
|
|
326
|
+
...createAudioSoloSlice(set, get),
|
|
327
|
+
...createEditingModeSlice(set),
|
|
323
328
|
|
|
324
329
|
activeKeyframePct: null,
|
|
325
330
|
setActiveKeyframePct: (pct) => set({ activeKeyframePct: pct }),
|
|
326
|
-
motionPathArmed: false,
|
|
327
|
-
setMotionPathArmed: (armed) => set({ motionPathArmed: armed }),
|
|
328
|
-
motionPathCreateAvailable: false,
|
|
329
|
-
setMotionPathCreateAvailable: (available) => set({ motionPathCreateAvailable: available }),
|
|
330
|
-
autoKeyframeEnabled: true,
|
|
331
|
-
setAutoKeyframeEnabled: (enabled) => set({ autoKeyframeEnabled: enabled }),
|
|
332
331
|
|
|
333
332
|
selectedElementIds: new Set<string>(),
|
|
334
333
|
setSelection: (ids, anchor) => set(resolveElementSelection(ids, anchor)),
|
|
@@ -67,6 +67,16 @@ export interface TimelineElement {
|
|
|
67
67
|
hidden?: boolean;
|
|
68
68
|
/** Value of data-timeline-role attribute — used to identify music vs. voiceover. */
|
|
69
69
|
timelineRole?: string;
|
|
70
|
+
/** Verbatim `data-audio-group` — the id of the `<hf-audio-group>` this clip belongs to, when any. */
|
|
71
|
+
audioGroup?: string;
|
|
72
|
+
/** The owning group's `data-label` (falls back to its id) — resolved once per parse. */
|
|
73
|
+
audioGroupLabel?: string;
|
|
74
|
+
/** The owning group's `data-volume` (defaults to 1) — resolved once per parse. */
|
|
75
|
+
audioGroupVolume?: number;
|
|
76
|
+
/** The owning group's `data-hidden` (defaults to false) — resolved once per parse. */
|
|
77
|
+
audioGroupHidden?: boolean;
|
|
78
|
+
/** The owning group's serialized `data-fx-chain`, when set — resolved once per parse. */
|
|
79
|
+
audioGroupFxChain?: string;
|
|
70
80
|
/**
|
|
71
81
|
* Set by useExpandedTimelineElements on an inline-expanded sub-composition
|
|
72
82
|
* child: the absolute master-timeline start of the sub-comp host the child
|
package/src/telemetry/events.ts
CHANGED
|
@@ -186,3 +186,15 @@ export function trackStudioFeedback(
|
|
|
186
186
|
source: "studio",
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
|
+
|
|
190
|
+
export function trackBlockParamCommit(props: {
|
|
191
|
+
tone: "saved" | "error" | "confirm";
|
|
192
|
+
blockName: string;
|
|
193
|
+
key: string;
|
|
194
|
+
}): void {
|
|
195
|
+
trackEvent("studio_block_param_commit", {
|
|
196
|
+
tone: props.tone,
|
|
197
|
+
block_name: props.blockName,
|
|
198
|
+
param_key: props.key,
|
|
199
|
+
});
|
|
200
|
+
}
|