@hyperframes/studio 0.8.106 → 0.8.108
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-dl6K6ABp.js → hyperframes-player-BakGew45.js} +1 -1
- package/dist/assets/{index-ooaZZhKf.js → index-C5dyUHwk.js} +1 -1
- package/dist/assets/{index-CMiYVGv5.js → index-C842tcVa.js} +203 -208
- package/dist/assets/{index-DKT5NF1Y.js → index-CPe7d_wO.js} +1 -1
- package/dist/assets/{index-lrT-gfHa.css → index-ncVJ5IVu.css} +1 -1
- package/dist/chunk-6LUNLTHR.js +611 -0
- package/dist/chunk-6LUNLTHR.js.map +1 -0
- package/dist/{chunk-ICTZJPQQ.js → chunk-AOWVEVEU.js} +3 -494
- package/dist/chunk-AOWVEVEU.js.map +1 -0
- package/dist/{chunk-46XP7J3B.js → chunk-PQFEBX32.js} +5 -3
- package/dist/chunk-PQFEBX32.js.map +1 -0
- package/dist/{domEditingLayers-AQBDFNUC.js → domEditingLayers-JQPQGGT7.js} +3 -3
- package/dist/index.d.ts +377 -12
- package/dist/index.html +2 -2
- package/dist/index.js +13445 -11874
- package/dist/index.js.map +1 -1
- package/dist/player.js +2 -2
- package/dist/styles.css +1 -1
- package/package.json +8 -8
- package/src/App.tsx +6 -3
- package/src/agentToolsExport.test.ts +8 -0
- package/src/captions/keyboard.test.ts +6 -0
- package/src/components/EditorShell.tsx +2 -0
- package/src/components/StudioRightPanels.tsx +2 -0
- package/src/components/TimelineToolbar.test.tsx +27 -0
- package/src/components/TimelineToolbar.tsx +2 -5
- package/src/components/editor/CropPresetBar.tsx +69 -0
- package/src/components/editor/DomEditCropHandles.test.tsx +44 -0
- package/src/components/editor/DomEditCropHandles.tsx +123 -95
- package/src/components/editor/DomEditOverlay.tsx +12 -18
- package/src/components/editor/PropertyPanel.tsx +1 -14
- package/src/components/editor/PropertyPanelFlat.tsx +3 -6
- package/src/components/editor/SnapToolbar.test.tsx +32 -1
- package/src/components/editor/SnapToolbar.tsx +3 -4
- package/src/components/editor/carveOutput.ts +54 -0
- package/src/components/editor/cropPresetStore.ts +33 -0
- package/src/components/editor/cropPresets.test.ts +41 -0
- package/src/components/editor/cropPresets.ts +24 -0
- package/src/components/editor/domEditOverlayStartGesture.ts +5 -2
- package/src/components/editor/domEditingLayers.test.ts +21 -0
- package/src/components/editor/domEditingLayers.ts +2 -0
- package/src/components/editor/dragUndoPaint.test.ts +71 -0
- package/src/components/editor/fontAssets.test.ts +12 -22
- package/src/components/editor/gestureHoldsPreviewReload.test.tsx +96 -33
- package/src/components/editor/gsapAnimatesProperty.ts +3 -0
- package/src/components/editor/manualEdits.test.ts +4 -3
- package/src/components/editor/manualEditsDom.ts +28 -5
- package/src/components/editor/manualEditsDomPatches.ts +5 -1
- package/src/components/editor/manualOffsetDrag.ts +15 -1
- package/src/components/editor/mediaAudioEdits.test.ts +271 -0
- package/src/components/editor/mediaAudioEdits.ts +282 -0
- package/src/components/editor/propertyPanelAudioFxGroup.test.tsx +32 -4
- package/src/components/editor/propertyPanelAudioFxGroup.tsx +3 -1
- package/src/components/editor/propertyPanelFlatMediaSection.test.tsx +290 -87
- package/src/components/editor/propertyPanelFlatMediaSection.tsx +17 -20
- package/src/components/editor/propertyPanelFlatProps.ts +1 -0
- package/src/components/editor/propertyPanelMediaSection.tsx +17 -27
- package/src/components/editor/propertyPanelTypes.ts +2 -0
- package/src/components/editor/useDomEditNudge.test.tsx +134 -2
- package/src/components/editor/useDomEditNudge.ts +46 -23
- package/src/components/editor/useDomEditOverlayGestures.ts +17 -6
- package/src/components/editor/useFxCarve.ts +3 -61
- package/src/components/editor/useFxCarveGrouping.test.ts +13 -0
- package/src/components/editor/useFxCarveGrouping.ts +8 -3
- package/src/components/nle/AudioMeterStrip.test.tsx +53 -0
- package/src/components/nle/AudioMeterStrip.tsx +60 -2
- package/src/components/nle/useTimelineEditCallbacks.ts +4 -0
- package/src/components/panels/SlideshowPanel.test.ts +27 -0
- package/src/components/panels/SlideshowPanel.tsx +12 -7
- package/src/contexts/DomEditContext.test.tsx +62 -0
- package/src/contexts/DomEditContext.tsx +94 -77
- package/src/contexts/TimelineEditContext.tsx +1 -0
- package/src/hooks/canvasQuickSaves.test.tsx +72 -7
- package/src/hooks/domEditCommitTypes.ts +10 -0
- package/src/hooks/domEditPersistFailure.ts +12 -1
- package/src/hooks/domStyleCommit.fonts.test.ts +5 -4
- package/src/hooks/domStyleCommit.ts +2 -8
- package/src/hooks/gsapDragCommit.ts +3 -8
- package/src/hooks/gsapDragPositionCommit.ts +6 -1
- package/src/hooks/gsapEditOutcome.ts +2 -1
- package/src/hooks/gsapResizeElementSize.test.tsx +136 -0
- package/src/hooks/gsapResizeGeometrySweep.test.ts +3 -1
- package/src/hooks/gsapResizeIntercept.test.ts +3 -11
- package/src/hooks/gsapResizeIntercept.ts +6 -2
- package/src/hooks/gsapResizeMixedTween.test.ts +1 -2
- package/src/hooks/gsapRuntimeBridge.test.ts +55 -0
- package/src/hooks/gsapRuntimeBridge.ts +5 -3
- package/src/hooks/gsapRuntimeKeyframes.ts +1 -3
- package/src/hooks/inspectorSaveReload.test.tsx +107 -0
- package/src/hooks/useAppHotkeys.previewForwarding.test.tsx +16 -1
- package/src/hooks/useAppHotkeys.test.ts +17 -0
- package/src/hooks/useAppHotkeys.textEditing.test.tsx +1 -1
- package/src/hooks/useAppHotkeys.ts +3 -3
- package/src/hooks/useAutomationSelectionKeyboard.test.tsx +17 -0
- package/src/hooks/useAutomationSelectionKeyboard.ts +3 -9
- package/src/hooks/useDomEditAttributeCommits.ts +71 -29
- package/src/hooks/useDomEditCommits.test.tsx +172 -92
- package/src/hooks/useDomEditCommits.ts +2 -0
- package/src/hooks/useDomEditCommitsHelpers.ts +4 -6
- package/src/hooks/useDomEditPersist.ts +28 -13
- package/src/hooks/useDomEditPositionPatchCommit.ts +2 -0
- package/src/hooks/useDomEditSession.ts +2 -3
- package/src/hooks/useDomEditTextCommits.ts +4 -8
- package/src/hooks/useDomGeometryCommits.ts +11 -2
- package/src/hooks/useEditHistoryActions.paint.test.tsx +163 -3
- package/src/hooks/useEditHistoryActions.ts +13 -4
- package/src/hooks/useElementPicker.test.ts +62 -13
- package/src/hooks/useElementPicker.ts +10 -2
- package/src/hooks/useFreezeFrame.test.ts +56 -0
- package/src/hooks/useFreezeFrame.ts +121 -0
- package/src/hooks/useGsapAwareEditing.ts +6 -6
- package/src/hooks/useGsapScriptCommits.test.tsx +19 -0
- package/src/hooks/useGsapScriptCommits.ts +5 -4
- package/src/hooks/useInlineTextEdit.test.tsx +27 -0
- package/src/hooks/useInlineTextEdit.ts +9 -7
- package/src/hooks/useKeyframeKeyboard.test.tsx +15 -0
- package/src/hooks/useKeyframeKeyboard.ts +2 -8
- package/src/hooks/usePersistentEditHistory.test.ts +9 -6
- package/src/hooks/usePersistentEditHistory.ts +1 -1
- package/src/hooks/usePreviewPersistence.ts +6 -0
- package/src/hooks/useRazorSplit.ts +14 -1
- package/src/hooks/useRenderClipContent.test.ts +102 -0
- package/src/hooks/useRenderClipContent.ts +30 -23
- package/src/hooks/useTimelineEditing.ts +2 -2
- package/src/hooks/useTrackPendingTimelineEdit.ts +2 -6
- package/src/index.ts +8 -0
- package/src/player/components/AudibleVideoClipContent.tsx +29 -0
- package/src/player/components/ClipBadges.test.tsx +82 -0
- package/src/player/components/ClipBadges.tsx +67 -0
- package/src/player/components/ClipContextMenu.tsx +22 -0
- package/src/player/components/ClipPeakMarks.test.tsx +41 -0
- package/src/player/components/ClipPeakMarks.tsx +71 -0
- package/src/player/components/Timeline.test.ts +0 -21
- package/src/player/components/Timeline.tsx +0 -1
- package/src/player/components/TimelineClip.tsx +2 -0
- package/src/player/components/TimelineFxButton.test.tsx +2 -2
- package/src/player/components/TimelineTrackHeader.test.tsx +37 -0
- package/src/player/components/TimelineTrackHeader.tsx +12 -25
- package/src/player/components/clipMenuAudioItems.test.tsx +125 -0
- package/src/player/components/clipMenuAudioItems.tsx +108 -0
- package/src/player/components/clipMenuDuck.test.ts +117 -0
- package/src/player/components/clipMenuDuck.ts +142 -0
- package/src/player/components/clipMenuNormalize.test.ts +95 -0
- package/src/player/components/clipMenuNormalize.ts +96 -0
- package/src/player/components/clipMenuToolItems.test.tsx +139 -0
- package/src/player/components/clipMenuToolItems.tsx +235 -0
- package/src/player/components/clipPeakRuns.test.ts +38 -0
- package/src/player/components/clipPeakRuns.ts +59 -0
- package/src/player/components/clipToolAttrs.test.ts +161 -0
- package/src/player/components/clipToolAttrs.ts +187 -0
- package/src/player/components/timelineCallbacks.ts +1 -0
- package/src/player/components/timelineLayout.ts +0 -28
- package/src/player/components/useClipToolState.ts +92 -0
- package/src/player/hooks/usePlaybackKeyboard.test.ts +43 -0
- package/src/player/lib/playbackShortcuts.ts +3 -7
- package/src/player/lib/timelineElementHelpers.test.ts +16 -0
- package/src/player/lib/timelineElementHelpers.ts +25 -2
- package/src/player/lib/timelineViewportBudgets.test.ts +2 -0
- package/src/player/lib/timelineViewportBudgets.ts +4 -0
- package/src/timelineChromeExports.test.tsx +7 -0
- package/src/utils/audioMeterMath.test.ts +37 -0
- package/src/utils/audioMeterMath.ts +9 -3
- package/src/utils/exportPeakCeiling.ts +1 -0
- package/src/utils/gsapSoftReload.ts +3 -2
- package/src/utils/gsapUndoRestore.browser.test.ts +94 -0
- package/src/utils/gsapUndoRestore.test.ts +145 -1
- package/src/utils/gsapUndoRestore.ts +70 -21
- package/src/utils/previewRelativePath.ts +19 -0
- package/src/utils/sourcePatcher.ts +2 -2
- package/src/utils/studioFontHelpers.ts +2 -23
- package/src/utils/studioHelpers.test.ts +30 -0
- package/src/utils/studioHelpers.ts +18 -4
- package/src/utils/studioPendingEdits.test.ts +129 -0
- package/src/utils/studioPendingEdits.ts +61 -18
- package/src/utils/timelineInspector.test.ts +33 -2
- package/src/utils/timelineInspector.ts +16 -4
- package/src/utils/typingTarget.test.ts +13 -0
- package/src/utils/typingTarget.ts +5 -2
- package/src/webmcp/useStudioAgentTools.ts +3 -1
- package/dist/chunk-46XP7J3B.js.map +0 -1
- package/dist/chunk-DI4LCJHL.js +0 -102
- package/dist/chunk-DI4LCJHL.js.map +0 -1
- package/dist/chunk-ICTZJPQQ.js.map +0 -1
- /package/dist/{domEditingLayers-AQBDFNUC.js.map → domEditingLayers-JQPQGGT7.js.map} +0 -0
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
resolveDomEditCapabilities,
|
|
21
21
|
resolveDomEditSelection,
|
|
22
22
|
serializeDomEditTextFields
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-PQFEBX32.js";
|
|
24
|
+
import "./chunk-6LUNLTHR.js";
|
|
25
25
|
import "./chunk-PZ5AY32C.js";
|
|
26
26
|
export {
|
|
27
27
|
buildDefaultDomEditTextField,
|
|
@@ -46,4 +46,4 @@ export {
|
|
|
46
46
|
resolveDomEditSelection,
|
|
47
47
|
serializeDomEditTextFields
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=domEditingLayers-
|
|
49
|
+
//# sourceMappingURL=domEditingLayers-JQPQGGT7.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -4,12 +4,12 @@ import * as react from 'react';
|
|
|
4
4
|
import { RefObject, MutableRefObject, ReactNode, DragEventHandler, ComponentProps, RefCallback, MouseEvent, CSSProperties, UIEvent, PointerEvent } from 'react';
|
|
5
5
|
import { RuntimeTimelineClipIdentity, HyperframePickerElementInfo } from '@hyperframes/core';
|
|
6
6
|
import { GsapAnimation, ParsedGsap, PropertyGroupName } from '@hyperframes/core/gsap-parser';
|
|
7
|
+
import { GsapAnimation as GsapAnimation$1, ArcPathSegment } from '@hyperframes/parsers/gsap-parser';
|
|
7
8
|
import { Composition } from '@hyperframes/sdk';
|
|
8
9
|
import * as zustand from 'zustand';
|
|
9
10
|
import { StoreApi } from 'zustand';
|
|
10
11
|
export { Player } from './player.js';
|
|
11
12
|
import { MusicBeatAnalysis } from '@hyperframes/core/beats';
|
|
12
|
-
import { GsapAnimation as GsapAnimation$1, ArcPathSegment } from '@hyperframes/parsers/gsap-parser';
|
|
13
13
|
import * as _hyperframes_parsers from '@hyperframes/parsers';
|
|
14
14
|
import { CanvasResolution } from '@hyperframes/parsers';
|
|
15
15
|
export { SeamTransitionFrameSource, SeamTransitionLoopHandle, SeamTransitionLoopOptions, playSeamTransitionLoop } from '@hyperframes/shader-transitions';
|
|
@@ -699,6 +699,19 @@ interface DomEditSelection extends PatchTarget {
|
|
|
699
699
|
capabilities: DomEditCapabilities;
|
|
700
700
|
gsapAnimations?: GsapAnimation$1[];
|
|
701
701
|
}
|
|
702
|
+
interface DomEditLayerItem {
|
|
703
|
+
key: string;
|
|
704
|
+
element: HTMLElement;
|
|
705
|
+
label: string;
|
|
706
|
+
tagName: string;
|
|
707
|
+
depth: number;
|
|
708
|
+
childCount: number;
|
|
709
|
+
id?: string;
|
|
710
|
+
hfId?: string;
|
|
711
|
+
selector?: string;
|
|
712
|
+
selectorIndex?: number;
|
|
713
|
+
sourceFile: string;
|
|
714
|
+
}
|
|
702
715
|
interface DomEditContextOptions {
|
|
703
716
|
activeCompositionPath: string | null;
|
|
704
717
|
isMasterView: boolean;
|
|
@@ -797,6 +810,14 @@ interface TimelineRangeSelection {
|
|
|
797
810
|
anchorY: number;
|
|
798
811
|
}
|
|
799
812
|
|
|
813
|
+
interface ImportedFontAsset {
|
|
814
|
+
family: string;
|
|
815
|
+
path: string;
|
|
816
|
+
url: string;
|
|
817
|
+
weight?: string;
|
|
818
|
+
style?: "normal" | "italic";
|
|
819
|
+
}
|
|
820
|
+
|
|
800
821
|
/** Durable evidence returned by the one Studio DOM persistence actor. */
|
|
801
822
|
interface DomEditPersistOutcome {
|
|
802
823
|
sourceFile: string;
|
|
@@ -816,6 +837,11 @@ interface DomEditPatchBatchesResult {
|
|
|
816
837
|
allMatched: boolean;
|
|
817
838
|
changed: boolean;
|
|
818
839
|
}
|
|
840
|
+
/** Several data-* and HTML attribute ops on one element as ONE persist and ONE undo entry. */
|
|
841
|
+
type CommitDomAttributeBatch = (selection: DomEditSelection, operations: PatchOperation[], options: {
|
|
842
|
+
label: string;
|
|
843
|
+
prepareContent?: (html: string) => string;
|
|
844
|
+
}) => Promise<boolean>;
|
|
819
845
|
|
|
820
846
|
interface RecordEditInput$5 {
|
|
821
847
|
label: string;
|
|
@@ -1080,6 +1106,7 @@ interface TimelineEditCallbacks {
|
|
|
1080
1106
|
onSplitElement?: (element: TimelineElement, splitTime: number) => Promise<void> | void;
|
|
1081
1107
|
onRazorSplit?: (element: TimelineElement, splitTime: number) => Promise<void> | void;
|
|
1082
1108
|
onRazorSplitAll?: (splitTime: number) => Promise<void> | void;
|
|
1109
|
+
onFreezeFrame?: (element: TimelineElement, time: number) => Promise<void> | void;
|
|
1083
1110
|
onDeleteKeyframe?: (elementId: string, keyframe: TimelineKeyframeTarget) => void;
|
|
1084
1111
|
onDeleteAllKeyframes?: (element: TimelineElement, animationId?: string) => void;
|
|
1085
1112
|
onMoveKeyframeToPlayhead?: (element: TimelineElement, keyframe: TimelineKeyframeTarget) => void;
|
|
@@ -1882,6 +1909,7 @@ interface TimelineEditCallbackDeps {
|
|
|
1882
1909
|
handleTimelineElementSplit: (element: TimelineElement, splitTime: number) => Promise<void> | void;
|
|
1883
1910
|
handleRazorSplit: (element: TimelineElement, splitTime: number) => Promise<void> | void;
|
|
1884
1911
|
handleRazorSplitAll: (splitTime: number) => Promise<void> | void;
|
|
1912
|
+
handleFreezeFrame?: (element: TimelineElement, time: number) => Promise<void> | void;
|
|
1885
1913
|
/** C1's ungrouped-track FX pointer — same auto-grouping write B6's carve uses. */
|
|
1886
1914
|
handleGroupClips?: (clipIds: readonly string[], groupId: string, groupLabel?: string) => Promise<void>;
|
|
1887
1915
|
/** C1's single-clip FX write, addressed by the clip itself. */
|
|
@@ -1941,7 +1969,7 @@ interface EditorShellProps extends TimelineEditCallbackDeps {
|
|
|
1941
1969
|
/** Short text shown on disabled hand-edit controls while `readOnlyPreview` is set. */
|
|
1942
1970
|
readOnlyPreviewReason?: string;
|
|
1943
1971
|
}
|
|
1944
|
-
declare function EditorShell({ panels, timelineToolbar, renderClipContent, handleTimelineElementDelete, handleTimelineAssetDrop, handleTimelineBlockDrop, handleTimelineCompositionDrop, handlePreviewBlockDrop, handleTimelineFileDrop, handleTimelineElementMove, handleTimelineElementsMove, handleTimelineElementResize, handleTimelineGroupResize, handleToggleTrackHidden, setAudioGroupAttribute, handleGroupClips, setElementFxAttribute, handleBlockedTimelineEdit, handleTimelineElementSplit, handleRazorSplit, handleRazorSplitAll, onCopyClip, onPasteClip, onDuplicateClip, canPasteClip, clipMenuItems, setCompIdToSrc, setCompositionLoading, shouldShowMotionPath, shouldShowSelectedDomBounds, isGestureRecording, recordingState, onToggleRecording, blockPreview, gestureOverlay, readOnlyPreview, readOnlyPreviewReason, }: EditorShellProps): react_jsx_runtime.JSX.Element;
|
|
1972
|
+
declare function EditorShell({ panels, timelineToolbar, renderClipContent, handleTimelineElementDelete, handleTimelineAssetDrop, handleTimelineBlockDrop, handleTimelineCompositionDrop, handlePreviewBlockDrop, handleTimelineFileDrop, handleTimelineElementMove, handleTimelineElementsMove, handleTimelineElementResize, handleTimelineGroupResize, handleToggleTrackHidden, setAudioGroupAttribute, handleGroupClips, setElementFxAttribute, handleBlockedTimelineEdit, handleTimelineElementSplit, handleRazorSplit, handleRazorSplitAll, handleFreezeFrame, onCopyClip, onPasteClip, onDuplicateClip, canPasteClip, clipMenuItems, setCompIdToSrc, setCompositionLoading, shouldShowMotionPath, shouldShowSelectedDomBounds, isGestureRecording, recordingState, onToggleRecording, blockPreview, gestureOverlay, readOnlyPreview, readOnlyPreviewReason, }: EditorShellProps): react_jsx_runtime.JSX.Element;
|
|
1945
1973
|
|
|
1946
1974
|
interface PreviewCompositionSize {
|
|
1947
1975
|
width: number;
|
|
@@ -2182,14 +2210,6 @@ interface SourceEditorProps {
|
|
|
2182
2210
|
}
|
|
2183
2211
|
declare const SourceEditor: react.NamedExoticComponent<SourceEditorProps>;
|
|
2184
2212
|
|
|
2185
|
-
interface ImportedFontAsset {
|
|
2186
|
-
family: string;
|
|
2187
|
-
path: string;
|
|
2188
|
-
url: string;
|
|
2189
|
-
weight?: string;
|
|
2190
|
-
style?: "normal" | "italic";
|
|
2191
|
-
}
|
|
2192
|
-
|
|
2193
2213
|
/**
|
|
2194
2214
|
* Edit callbacks shared by GsapAnimationSection and each AnimationCard it
|
|
2195
2215
|
* renders. Extracted so the two prop interfaces don't duplicate the (large)
|
|
@@ -2277,6 +2297,7 @@ interface PropertyPanelProps {
|
|
|
2277
2297
|
changedElements: number;
|
|
2278
2298
|
}>;
|
|
2279
2299
|
onSetHtmlAttribute: (attr: string, value: string | null) => void | Promise<void>;
|
|
2300
|
+
onSetAttributeBatch: CommitDomAttributeBatch;
|
|
2280
2301
|
onRemoveBackground?: (inputPath: string, options: {
|
|
2281
2302
|
createBackgroundPlate?: boolean;
|
|
2282
2303
|
quality?: "fast" | "balanced" | "best";
|
|
@@ -2678,6 +2699,7 @@ declare function useTimelineEditing({ projectId, activeCompPath, timelineElement
|
|
|
2678
2699
|
handleTimelineElementsDelete: (selection: TimelineElement[]) => Promise<void>;
|
|
2679
2700
|
handleTimelineElementSplit: (element: TimelineElement, splitTime: number) => Promise<void>;
|
|
2680
2701
|
handleRazorSplit: (element: TimelineElement, splitTime: number) => Promise<void>;
|
|
2702
|
+
handleFreezeFrame: (element: TimelineElement, playhead: number) => Promise<void>;
|
|
2681
2703
|
handleRazorSplitAll: (splitTime: number) => Promise<void>;
|
|
2682
2704
|
handleTimelineAssetDrop: (assetPath: string, placement: TimelineDropPlacement, durationOverride?: number | undefined) => Promise<void>;
|
|
2683
2705
|
handleTimelineFileDrop: (files: File[], placement?: TimelineDropPlacement | undefined) => Promise<void>;
|
|
@@ -2887,6 +2909,12 @@ interface AudioMeterStripProps {
|
|
|
2887
2909
|
}
|
|
2888
2910
|
declare const AudioMeterStrip: react.NamedExoticComponent<AudioMeterStripProps>;
|
|
2889
2911
|
|
|
2912
|
+
/** Whether the audio meter strip is shown; persisted, off unless the user showed it. */
|
|
2913
|
+
declare const useAudioMetersVisible: zustand.UseBoundStore<zustand.StoreApi<{
|
|
2914
|
+
visible: boolean;
|
|
2915
|
+
setVisible: (visible: boolean) => void;
|
|
2916
|
+
}>>;
|
|
2917
|
+
|
|
2890
2918
|
type InPlace = {
|
|
2891
2919
|
inPlace?: boolean;
|
|
2892
2920
|
};
|
|
@@ -3216,6 +3244,7 @@ declare function useDomEditSession({ projectId, activeCompPath, compIdToSrc, cap
|
|
|
3216
3244
|
handleDomAttributeQuietCommit: (attr: string, value: string | null) => Promise<void>;
|
|
3217
3245
|
handleDomHtmlAttributeCommit: (attr: string, value: string | null) => Promise<void>;
|
|
3218
3246
|
handleDomAttributesCommit: (selection: DomEditSelection, attrs: Record<string, string>) => Promise<void>;
|
|
3247
|
+
handleDomAttributeBatchCommit: CommitDomAttributeBatch;
|
|
3219
3248
|
handleDomPathOffsetCommit: (selection: DomEditSelection, next: {
|
|
3220
3249
|
x: number;
|
|
3221
3250
|
y: number;
|
|
@@ -3388,6 +3417,7 @@ declare function usePreviewPersistence({ showToast, readOptionalProjectFile: _re
|
|
|
3388
3417
|
error: unknown;
|
|
3389
3418
|
}>;
|
|
3390
3419
|
waitForPendingDomEditSaves: () => Promise<void>;
|
|
3420
|
+
settlePendingEdits: () => Promise<void>;
|
|
3391
3421
|
domEditSaveQueuePaused: string | null;
|
|
3392
3422
|
resetDomEditSaveQueueBreaker: () => void;
|
|
3393
3423
|
applyCurrentStudioManualEditsToPreview: (iframe?: HTMLIFrameElement | null) => void;
|
|
@@ -3400,7 +3430,7 @@ type DomEditValue = ReturnType<typeof useDomEditSession>;
|
|
|
3400
3430
|
interface DomEditSelectionValue extends Pick<DomEditValue, "domEditSelection" | "domEditGroupSelections" | "domEditHoverSelection" | "activeGroupElement" | "domEditSelectionRef" | "selectedGsapAnimations" | "gsapMultipleTimelines" | "gsapUnsupportedTimelinePattern" | "agentModalOpen" | "agentModalAnchorPoint" | "copiedAgentPrompt" | "agentPromptSelectionContext"> {
|
|
3401
3431
|
}
|
|
3402
3432
|
declare function useDomEditSelectionContext(): DomEditSelectionValue;
|
|
3403
|
-
declare function DomEditProvider({ value: { domEditSelection, domEditGroupSelections, domEditHoverSelection, agentModalOpen, agentModalAnchorPoint, copiedAgentPrompt, agentPromptSelectionContext, domEditSelectionRef, handleTimelineElementSelect, handlePreviewCanvasMouseDown, handlePreviewCanvasPointerMove, handlePreviewCanvasPointerLeave, applyDomSelection, clearDomSelection, refreshDomEditSelectionFromPreview, handleDomStyleCommit, handleDomStyleCommitForSelection, handleDomAttributeCommit, handleDomAttributeLiveCommit, handleDomAttributeQuietCommit, handleDomHtmlAttributeCommit, handleDomAttributesCommit, handleDomPathOffsetCommit, handleDomGroupPathOffsetCommit, handleDomZIndexReorderCommit, handleDomBoxSizeCommit, handleDomRotationCommit, handleDomManualEditsReset, handleDomTextCommit, handleDomTextCommitForSelection, handleDomRichTextCommit, handleDomTextFieldStyleCommit, handleDomAddTextField, handleDomRemoveTextField, getGsapAnimationsForSelection, handleAskAgent, handleAgentModalSubmit, handleBlockedDomMove, handleDomManualDragStart, handleDomEditElementDelete, handleGroupSelection, handleUngroupSelection, setActiveGroupElement, activeGroupElement, buildDomSelectionFromTarget, buildDomSelectionForTimelineElement, updateDomEditHoverSelection, resolveImportedFontAsset, setAgentModalOpen, setAgentPromptSelectionContext, setAgentModalAnchorPoint, selectedGsapAnimations, gsapMultipleTimelines, gsapUnsupportedTimelinePattern, handleGsapUpdateProperty, handleGsapUpdateMeta, handleGsapDeleteAnimation, handleGsapDeleteAllForElement, handleGsapAddAnimation, handleGsapAddProperty, handleGsapRemoveProperty, handleGsapUpdateFromProperty, handleGsapAddFromProperty, handleGsapRemoveFromProperty, handleGsapAddKeyframe, handleGsapAddKeyframeBatch, handleGsapRemoveKeyframe, handleGsapMoveKeyframeToPlayhead, handleGsapMoveKeyframe, handleGsapResizeKeyframedTween, handleGsapConvertToKeyframes, handleGsapRemoveAllKeyframes, handleResetSelectedElementKeyframes, commitAnimatedProperty, commitAnimatedProperties, handleSetArcPath, handleUpdateArcSegment, handleUnroll, invalidateGsapCache, previewIframeRef, commitMutation, applyMarqueeSelection, handleUpdateKeyframeEase, handleUpdateSegmentEase, handleSetAllKeyframeEases, }, children, }: {
|
|
3433
|
+
declare function DomEditProvider({ value: { domEditSelection, domEditGroupSelections, domEditHoverSelection, agentModalOpen, agentModalAnchorPoint, copiedAgentPrompt, agentPromptSelectionContext, domEditSelectionRef, handleTimelineElementSelect, handlePreviewCanvasMouseDown, handlePreviewCanvasPointerMove, handlePreviewCanvasPointerLeave, applyDomSelection, clearDomSelection, refreshDomEditSelectionFromPreview, handleDomStyleCommit, handleDomStyleCommitForSelection, handleDomAttributeCommit, handleDomAttributeLiveCommit, handleDomAttributeQuietCommit, handleDomHtmlAttributeCommit, handleDomAttributesCommit, handleDomAttributeBatchCommit, handleDomPathOffsetCommit, handleDomGroupPathOffsetCommit, handleDomZIndexReorderCommit, handleDomBoxSizeCommit, handleDomRotationCommit, handleDomManualEditsReset, handleDomTextCommit, handleDomTextCommitForSelection, handleDomRichTextCommit, handleDomTextFieldStyleCommit, handleDomAddTextField, handleDomRemoveTextField, getGsapAnimationsForSelection, handleAskAgent, handleAgentModalSubmit, handleBlockedDomMove, handleDomManualDragStart, handleDomEditElementDelete, handleGroupSelection, handleUngroupSelection, setActiveGroupElement, activeGroupElement, buildDomSelectionFromTarget, buildDomSelectionForTimelineElement, updateDomEditHoverSelection, resolveImportedFontAsset, setAgentModalOpen, setAgentPromptSelectionContext, setAgentModalAnchorPoint, selectedGsapAnimations, gsapMultipleTimelines, gsapUnsupportedTimelinePattern, handleGsapUpdateProperty, handleGsapUpdateMeta, handleGsapDeleteAnimation, handleGsapDeleteAllForElement, handleGsapAddAnimation, handleGsapAddProperty, handleGsapRemoveProperty, handleGsapUpdateFromProperty, handleGsapAddFromProperty, handleGsapRemoveFromProperty, handleGsapAddKeyframe, handleGsapAddKeyframeBatch, handleGsapRemoveKeyframe, handleGsapMoveKeyframeToPlayhead, handleGsapMoveKeyframe, handleGsapResizeKeyframedTween, handleGsapConvertToKeyframes, handleGsapRemoveAllKeyframes, handleResetSelectedElementKeyframes, commitAnimatedProperty, commitAnimatedProperties, handleSetArcPath, handleUpdateArcSegment, handleUnroll, invalidateGsapCache, previewIframeRef, commitMutation, applyMarqueeSelection, handleUpdateKeyframeEase, handleUpdateSegmentEase, handleSetAllKeyframeEases, }, children, }: {
|
|
3404
3434
|
value: DomEditValue;
|
|
3405
3435
|
children: ReactNode;
|
|
3406
3436
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -3640,4 +3670,339 @@ interface MarqueeOverlayProps {
|
|
|
3640
3670
|
*/
|
|
3641
3671
|
declare function MarqueeOverlay({ candidateRects, marqueeRect }: MarqueeOverlayProps): react_jsx_runtime.JSX.Element;
|
|
3642
3672
|
|
|
3643
|
-
|
|
3673
|
+
/**
|
|
3674
|
+
* The slice of the WebMCP browser API that Studio uses.
|
|
3675
|
+
*
|
|
3676
|
+
* Mirrors the WebIDL in the W3C spec (`webmachinelearning/webmcp`, `index.bs`)
|
|
3677
|
+
* as of 2026-08-26. Two things worth knowing before editing this file:
|
|
3678
|
+
*
|
|
3679
|
+
* - The API hangs off `document`, NOT `navigator`. `navigator.modelContext` is
|
|
3680
|
+
* a polyfill compatibility shim, not a spec member, so feature-detecting it
|
|
3681
|
+
* is wrong even where an article's sample "works".
|
|
3682
|
+
* - The spec is pre-stable (Origin Trial). This file and `registrar.ts` are the
|
|
3683
|
+
* only places that touch the API, so a spec change is a two-file edit. Re-read
|
|
3684
|
+
* `index.bs` rather than trusting this transcription.
|
|
3685
|
+
*
|
|
3686
|
+
* Only the surface Studio registers against is declared. `getTools` and
|
|
3687
|
+
* `executeTool` are the consumer side; Studio registers, it does not call.
|
|
3688
|
+
*
|
|
3689
|
+
* These stay hand-written rather than imported from `@mcp-b/webmcp-types`,
|
|
3690
|
+
* which the polyfill pulls in. That package's `registerTool` is overloaded to
|
|
3691
|
+
* infer argument types from a literal `inputSchema`, which is useful when you
|
|
3692
|
+
* register one tool inline and actively hostile when you register a uniform
|
|
3693
|
+
* list of them, as `registerStudioTools` does. Narrower is the safe operation
|
|
3694
|
+
* here. It does mean this file can drift from the spec, hence the note above.
|
|
3695
|
+
*/
|
|
3696
|
+
interface ModelContextToolAnnotations {
|
|
3697
|
+
/** The tool does not change state. Lets an agent decide when calling is free. */
|
|
3698
|
+
readOnlyHint?: boolean;
|
|
3699
|
+
/** The tool's output contains data the page's author does not vouch for. */
|
|
3700
|
+
untrustedContentHint?: boolean;
|
|
3701
|
+
}
|
|
3702
|
+
interface ToolExecuteCallbackOptions {
|
|
3703
|
+
/**
|
|
3704
|
+
* Aborted when the caller cancels. Studio's commit path is not cancellable
|
|
3705
|
+
* once dispatched, so tools check this BEFORE dispatching and document that a
|
|
3706
|
+
* late abort does not unwind a write.
|
|
3707
|
+
*/
|
|
3708
|
+
signal: AbortSignal;
|
|
3709
|
+
}
|
|
3710
|
+
interface ModelContextTool {
|
|
3711
|
+
/**
|
|
3712
|
+
* Max 128 characters, ASCII alphanumeric plus `_`, `-`, `.`. Registering a
|
|
3713
|
+
* name that already exists REJECTS with InvalidStateError; it does not
|
|
3714
|
+
* replace.
|
|
3715
|
+
*/
|
|
3716
|
+
name: string;
|
|
3717
|
+
title?: string;
|
|
3718
|
+
/** Required and non-empty; an empty string rejects with InvalidStateError. */
|
|
3719
|
+
description: string;
|
|
3720
|
+
/** JSON Schema. Nothing in the platform validates input against it. */
|
|
3721
|
+
inputSchema?: object;
|
|
3722
|
+
/**
|
|
3723
|
+
* The user agent JSON-serializes whatever this resolves with, so it must
|
|
3724
|
+
* return an object. Returning `undefined` fails the serialization.
|
|
3725
|
+
*
|
|
3726
|
+
* A rejection is NOT a usable error channel: the spec discards the reason and
|
|
3727
|
+
* rejects the caller with a bare UnknownError. Resolve with a tagged failure
|
|
3728
|
+
* instead. See `toolResult.ts`.
|
|
3729
|
+
*
|
|
3730
|
+
* `options` is optional here although the spec always passes it: the
|
|
3731
|
+
* `@mcp-b/global` polyfill (through 5.1.0) calls `execute(input)` with no
|
|
3732
|
+
* second argument, so a Studio handler must not depend on receiving one.
|
|
3733
|
+
*/
|
|
3734
|
+
execute: (input: object, options?: ToolExecuteCallbackOptions) => Promise<unknown>;
|
|
3735
|
+
annotations?: ModelContextToolAnnotations;
|
|
3736
|
+
}
|
|
3737
|
+
|
|
3738
|
+
/**
|
|
3739
|
+
* The shape every Studio tool resolves with.
|
|
3740
|
+
*
|
|
3741
|
+
* Tools resolve, they never reject. That is forced by the spec, not a style
|
|
3742
|
+
* choice: a rejected `execute` has its reason DISCARDED and the caller is
|
|
3743
|
+
* rejected with a bare `UnknownError` (`index.bs`, the execute-tool completion
|
|
3744
|
+
* steps). Rejecting would therefore guarantee the agent cannot see why the edit
|
|
3745
|
+
* failed, which is the one thing it needs most.
|
|
3746
|
+
*
|
|
3747
|
+
* There is no `outputSchema` in the platform yet, so this discriminant is
|
|
3748
|
+
* invisible to the agent's schema layer. Every tool's `description` has to say
|
|
3749
|
+
* that it returns `ok`.
|
|
3750
|
+
*/
|
|
3751
|
+
type ToolFailureKind =
|
|
3752
|
+
/** A real state the agent can route around: save queue paused, capability off. */
|
|
3753
|
+
"blocked"
|
|
3754
|
+
/** The agent's fault: unknown handle, bad enum, out of range. */
|
|
3755
|
+
| "invalid"
|
|
3756
|
+
/** Exogenous: the server said no, the patch target could not be resolved. */
|
|
3757
|
+
| "failed"
|
|
3758
|
+
/** Our bug. Reported AND re-thrown, so it is findable instead of plausible. */
|
|
3759
|
+
| "internal";
|
|
3760
|
+
interface ToolFailure {
|
|
3761
|
+
ok: false;
|
|
3762
|
+
kind: ToolFailureKind;
|
|
3763
|
+
reason: string;
|
|
3764
|
+
/** What to try instead. This is what turns a failure into a next action. */
|
|
3765
|
+
hint?: string;
|
|
3766
|
+
}
|
|
3767
|
+
type ToolResult<T> = ({
|
|
3768
|
+
ok: true;
|
|
3769
|
+
} & T) | ToolFailure;
|
|
3770
|
+
|
|
3771
|
+
/**
|
|
3772
|
+
* `studio_look`: the one call that orients an agent.
|
|
3773
|
+
*
|
|
3774
|
+
* Deliberately fat. Every field here is one the agent would otherwise have to
|
|
3775
|
+
* spend a round trip discovering.
|
|
3776
|
+
*
|
|
3777
|
+
* The building is a pure function over a snapshot so it can be tested with
|
|
3778
|
+
* values. Gathering the snapshot is the React layer's job.
|
|
3779
|
+
*/
|
|
3780
|
+
|
|
3781
|
+
type StudioLookSceneSnapshot = {
|
|
3782
|
+
status: "loading";
|
|
3783
|
+
} | {
|
|
3784
|
+
status: "ready";
|
|
3785
|
+
items: readonly DomEditLayerItem[];
|
|
3786
|
+
drillInItem: DomEditLayerItem | null;
|
|
3787
|
+
};
|
|
3788
|
+
interface StudioLookSnapshot {
|
|
3789
|
+
projectId: string | null;
|
|
3790
|
+
compositionPath: string | null;
|
|
3791
|
+
currentTime: number;
|
|
3792
|
+
duration: number;
|
|
3793
|
+
isPlaying: boolean;
|
|
3794
|
+
elements: readonly TimelineElement[];
|
|
3795
|
+
scene: StudioLookSceneSnapshot;
|
|
3796
|
+
selection: DomEditSelection | null;
|
|
3797
|
+
/** Live animations for the current selection arrive outside DomEditSelection. */
|
|
3798
|
+
selectionAnimationCount: number;
|
|
3799
|
+
/**
|
|
3800
|
+
* The undo stack as Studio's shell actually exposes it.
|
|
3801
|
+
*
|
|
3802
|
+
* This is a weaker signal than a revision counter, and deliberately not
|
|
3803
|
+
* dressed up as one: the depth lives in component-local state and is not
|
|
3804
|
+
* reachable here without plumbing it through the shell context. What an agent
|
|
3805
|
+
* CAN do is checkpoint `undoLabel` before a batch and notice it change to
|
|
3806
|
+
* something it did not do, which means a human pressed undo and its earlier
|
|
3807
|
+
* edits are gone.
|
|
3808
|
+
*/
|
|
3809
|
+
history: {
|
|
3810
|
+
canUndo: boolean;
|
|
3811
|
+
canRedo: boolean;
|
|
3812
|
+
undoLabel: string | null;
|
|
3813
|
+
redoLabel: string | null;
|
|
3814
|
+
};
|
|
3815
|
+
}
|
|
3816
|
+
/** Gather the live scene once per tool call. The response never retains DOM nodes. */
|
|
3817
|
+
declare function collectStudioLookScene(doc: Document | null, activeCompositionPath: string | null, activeGroupElement: HTMLElement | null): StudioLookSceneSnapshot;
|
|
3818
|
+
|
|
3819
|
+
/**
|
|
3820
|
+
* `studio_select` and `studio_seek`: pointing the human and the agent at the
|
|
3821
|
+
* same thing.
|
|
3822
|
+
*
|
|
3823
|
+
* Selection is shared human-visible state. Element writes do not infer their
|
|
3824
|
+
* target from it: they resolve an explicit source-safe handle per call. Keeping
|
|
3825
|
+
* these contracts separate means a human click cannot redirect an agent write.
|
|
3826
|
+
*/
|
|
3827
|
+
|
|
3828
|
+
interface SelectionToolDeps {
|
|
3829
|
+
/** The preview iframe's document, or null before it mounts. */
|
|
3830
|
+
getPreviewDocument: () => Document | null;
|
|
3831
|
+
getCompositionPath: () => string | null;
|
|
3832
|
+
getProjectId: () => string | null;
|
|
3833
|
+
buildSelection: (element: HTMLElement) => Promise<DomEditSelection | null>;
|
|
3834
|
+
applySelection: (selection: DomEditSelection) => void;
|
|
3835
|
+
/** Out-of-loop seek. `requestSeek`, not `setCurrentTime`. */
|
|
3836
|
+
requestSeek: (time: number) => void;
|
|
3837
|
+
readPlayhead: () => {
|
|
3838
|
+
currentTime: number;
|
|
3839
|
+
duration: number;
|
|
3840
|
+
isPlaying: boolean;
|
|
3841
|
+
};
|
|
3842
|
+
}
|
|
3843
|
+
|
|
3844
|
+
/**
|
|
3845
|
+
* `studio_frame`: the eyes.
|
|
3846
|
+
*
|
|
3847
|
+
* Without this the tool set is a remote control. With it an agent can author a
|
|
3848
|
+
* change, look at the instant it affects, judge it, and adjust. That loop is the
|
|
3849
|
+
* one thing source alone cannot support, because "what does this look like at
|
|
3850
|
+
* 2.4 seconds" is not a question a file can answer.
|
|
3851
|
+
*
|
|
3852
|
+
* Reuses Studio's existing capture endpoint (`utils/frameCapture`) rather than
|
|
3853
|
+
* inventing a second one. The server renders the composition with Puppeteer, so
|
|
3854
|
+
* the frame reflects the file on disk, not the live preview DOM.
|
|
3855
|
+
*/
|
|
3856
|
+
|
|
3857
|
+
interface FrameToolDeps {
|
|
3858
|
+
getProjectId: () => string | null;
|
|
3859
|
+
getCompositionPath: () => string | null;
|
|
3860
|
+
readPlayhead: () => {
|
|
3861
|
+
currentTime: number;
|
|
3862
|
+
duration: number;
|
|
3863
|
+
isPlaying: boolean;
|
|
3864
|
+
};
|
|
3865
|
+
requestSeek: (time: number) => void;
|
|
3866
|
+
/** Confirms the URL renders. Injected so tests need no network. */
|
|
3867
|
+
probeFrame: (url: string) => Promise<{
|
|
3868
|
+
ok: boolean;
|
|
3869
|
+
status: number;
|
|
3870
|
+
}>;
|
|
3871
|
+
wait: (ms: number) => Promise<void>;
|
|
3872
|
+
}
|
|
3873
|
+
|
|
3874
|
+
/**
|
|
3875
|
+
* `studio_inspect`: everything about one element, in one call.
|
|
3876
|
+
*
|
|
3877
|
+
* The point is to prevent a failed write. Every field here either tells the
|
|
3878
|
+
* agent what it can change (`can`, with `reasonIfDisabled` verbatim) or what it
|
|
3879
|
+
* would be changing (the resolved styles, the text fields, the animations).
|
|
3880
|
+
* An agent that reads this first should never attempt an edit the element will
|
|
3881
|
+
* refuse.
|
|
3882
|
+
*
|
|
3883
|
+
* The GSAP diagnostics are here for the same reason: `multipleTimelines` and
|
|
3884
|
+
* `unsupportedTimelinePattern` are states where animation editing is off, and
|
|
3885
|
+
* learning that from a read is cheaper than learning it from a failed write.
|
|
3886
|
+
*/
|
|
3887
|
+
|
|
3888
|
+
interface InspectToolDeps extends SelectionToolDeps {
|
|
3889
|
+
/** What the human currently has selected, used when no handle is given. */
|
|
3890
|
+
getCurrentSelection: () => DomEditSelection | null;
|
|
3891
|
+
getGsapDiagnostics: () => {
|
|
3892
|
+
animations: readonly GsapAnimation$1[];
|
|
3893
|
+
multipleTimelines: boolean;
|
|
3894
|
+
unsupportedTimelinePattern: boolean;
|
|
3895
|
+
};
|
|
3896
|
+
}
|
|
3897
|
+
|
|
3898
|
+
interface TargetedWriteDeps {
|
|
3899
|
+
getPreviewDocument: () => Document | null;
|
|
3900
|
+
getProjectId: () => string | null;
|
|
3901
|
+
getWriteBlockedReason: () => string | null;
|
|
3902
|
+
buildSelection: (element: HTMLElement) => Promise<DomEditSelection | null>;
|
|
3903
|
+
applySelection: (selection: DomEditSelection) => void;
|
|
3904
|
+
}
|
|
3905
|
+
|
|
3906
|
+
/**
|
|
3907
|
+
* `studio_set_text` and `studio_set_style`: the first tools that change the file.
|
|
3908
|
+
*
|
|
3909
|
+
* The explicit source-safe handle is resolved to one selection per invocation.
|
|
3910
|
+
* That captured selection is passed into Studio's existing commit actor; visible
|
|
3911
|
+
* selection is presentation only and cannot redirect the write.
|
|
3912
|
+
*/
|
|
3913
|
+
|
|
3914
|
+
interface ContentToolDeps extends TargetedWriteDeps {
|
|
3915
|
+
setText: (selection: DomEditSelection, value: string, fieldKey?: string) => Promise<DomEditCommitOutcome>;
|
|
3916
|
+
setStyle: (selection: DomEditSelection, property: string, value: string) => Promise<DomEditCommitOutcome>;
|
|
3917
|
+
}
|
|
3918
|
+
|
|
3919
|
+
/**
|
|
3920
|
+
* `studio_transform`: move, resize and rotate, as a drag would.
|
|
3921
|
+
*
|
|
3922
|
+
* This tool reads the element's box back after every write and reports what
|
|
3923
|
+
* ACTUALLY changed. That is not belt-and-braces, it is the only thing standing
|
|
3924
|
+
* between an agent and a silent lie, because two of the three handlers can do
|
|
3925
|
+
* nothing and resolve:
|
|
3926
|
+
*
|
|
3927
|
+
* - The handlers exposed on `DomEditActionsValue` are the GSAP-AWARE wrappers
|
|
3928
|
+
* (`useDomEditSession.ts` aliases them), not the CSS ones in
|
|
3929
|
+
* `useDomGeometryCommits.ts`.
|
|
3930
|
+
* - `handleGsapAwarePathOffsetCommit` and `handleGsapAwareRotationCommit` are
|
|
3931
|
+
* `if (gsapCommitMutation) { ...intercept... }` with NO else branch. In a
|
|
3932
|
+
* composition with no GSAP they return having done nothing. The adjacent
|
|
3933
|
+
* comments confirm that is deliberate: there is no CSS fallback to write to.
|
|
3934
|
+
* - `handleGsapAwareBoxSizeCommit` is different. It runs through
|
|
3935
|
+
* `runGestureTransaction` with a scale route and a width/height route, so
|
|
3936
|
+
* resize works more generally than the other two.
|
|
3937
|
+
*
|
|
3938
|
+
* Read back, do not assume.
|
|
3939
|
+
*/
|
|
3940
|
+
|
|
3941
|
+
interface ElementBox {
|
|
3942
|
+
x: number;
|
|
3943
|
+
y: number;
|
|
3944
|
+
width: number;
|
|
3945
|
+
height: number;
|
|
3946
|
+
}
|
|
3947
|
+
interface TransformToolDeps extends TargetedWriteDeps {
|
|
3948
|
+
/** The element's box as it renders right now. */
|
|
3949
|
+
readBox: (selection: DomEditSelection) => ElementBox;
|
|
3950
|
+
moveTo: (selection: DomEditSelection, next: {
|
|
3951
|
+
x: number;
|
|
3952
|
+
y: number;
|
|
3953
|
+
}) => Promise<DomEditCommitOutcome | void>;
|
|
3954
|
+
resizeTo: (selection: DomEditSelection, next: {
|
|
3955
|
+
width: number;
|
|
3956
|
+
height: number;
|
|
3957
|
+
}) => Promise<DomEditCommitOutcome | void>;
|
|
3958
|
+
rotateTo: (selection: DomEditSelection, next: {
|
|
3959
|
+
angle: number;
|
|
3960
|
+
}) => Promise<DomEditCommitOutcome | void>;
|
|
3961
|
+
}
|
|
3962
|
+
|
|
3963
|
+
/**
|
|
3964
|
+
* `studio_animate`: author motion.
|
|
3965
|
+
*
|
|
3966
|
+
* Add, update, and delete await the shared GSAP commit pipeline. Its promise is
|
|
3967
|
+
* the single settlement boundary for persistence and live-preview sync, so a
|
|
3968
|
+
* successful tool response never races ahead of the pixels the user sees.
|
|
3969
|
+
* Keyframe writes still report dispatch because their existing actor catches
|
|
3970
|
+
* its own failure instead of returning a landed signal.
|
|
3971
|
+
*/
|
|
3972
|
+
|
|
3973
|
+
type GsapMethod = "to" | "from" | "set" | "fromTo";
|
|
3974
|
+
interface AnimationToolDeps extends TargetedWriteDeps {
|
|
3975
|
+
getAnimationsForSelection: (selection: DomEditSelection) => Promise<readonly {
|
|
3976
|
+
id: string;
|
|
3977
|
+
}[]>;
|
|
3978
|
+
readPlayhead: () => {
|
|
3979
|
+
currentTime: number;
|
|
3980
|
+
duration: number;
|
|
3981
|
+
isPlaying: boolean;
|
|
3982
|
+
};
|
|
3983
|
+
addAnimation: (selection: DomEditSelection, method: GsapMethod) => Promise<boolean>;
|
|
3984
|
+
updateAnimation: (selection: DomEditSelection, animationId: string, updates: {
|
|
3985
|
+
duration?: number;
|
|
3986
|
+
ease?: string;
|
|
3987
|
+
position?: number;
|
|
3988
|
+
}) => Promise<boolean>;
|
|
3989
|
+
addKeyframe: (selection: DomEditSelection, animationId: string, percent: number, properties: Record<string, number | string>) => Promise<void>;
|
|
3990
|
+
deleteAnimation: (selection: DomEditSelection, animationId: string) => Promise<boolean>;
|
|
3991
|
+
}
|
|
3992
|
+
|
|
3993
|
+
interface StudioAgentToolsDeps extends SelectionToolDeps, FrameToolDeps, InspectToolDeps, ContentToolDeps, TransformToolDeps, AnimationToolDeps {
|
|
3994
|
+
/** Read Studio's current state. Called per tool invocation, never cached. */
|
|
3995
|
+
getSnapshot: () => StudioLookSnapshot;
|
|
3996
|
+
}
|
|
3997
|
+
/**
|
|
3998
|
+
* Build the tool list once.
|
|
3999
|
+
*
|
|
4000
|
+
* Every `execute` reads `depsRef.current` at CALL time rather than closing over
|
|
4001
|
+
* a snapshot, which is what lets the list be built once and still see live
|
|
4002
|
+
* state. That is the whole point of the ref: see the registration note below.
|
|
4003
|
+
*/
|
|
4004
|
+
declare function buildStudioTools(depsRef: {
|
|
4005
|
+
readonly current: StudioAgentToolsDeps;
|
|
4006
|
+
}): ModelContextTool[];
|
|
4007
|
+
|
|
4008
|
+
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, 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 FfmpegStatus, FileTree, GridOverlay, ImageThumbnail, type ImageThumbnailProps, 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, 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 UseTimelineEditingOptions, VideoThumbnail, type ZOrderAction, applyPatch, buildCompositionSnapTarget, buildGridSnapEdges, buildPickerAgentContextPreview, buildPickerAgentPrompt, buildStudioTools, collectSnapContext, collectStudioLookScene, extractSnapTargets, findElementBlock, flushStudioPendingEdits, formatTime, getPersistedRenderSettings, liveTime, mergeStyleIntoTag, parseStyleString, persistRenderSettings, resolveDomEditSelection, resolveEquidistanceGuides, resolveGuideLineRect, resolveIframe, resolveSnapAdjustment, resolveSourceFile, snapEngagedForTravel, useAudioMetersVisible, useClipboard, useCompositionStack, useDockLayoutStore, useDomEditSelectionContext, useDomEditSession, useDomEditZOrder, useDomGeometryCommit, useDomStyleCommit, useEditHistoryActions, useElementPicker, useLivePreviewIframe, useMarqueeGestures, usePersistentEditHistory, usePlayerHandle, usePlayerStore, usePreviewCompositionRect, usePreviewGuidesStore, usePreviewOverlayContext, usePreviewPersistence, useProjectFileWriter, useRenderClipContent, useRenderQueue, useTimelineContext, useTimelineEditing, useTimelinePlayer };
|
package/dist/index.html
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
document.documentElement.dataset.theme = "paper";
|
|
15
15
|
}
|
|
16
16
|
</script>
|
|
17
|
-
<script type="module" crossorigin src="/assets/index-
|
|
18
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/assets/index-C842tcVa.js"></script>
|
|
18
|
+
<link rel="stylesheet" crossorigin href="/assets/index-ncVJ5IVu.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|
|
21
21
|
<div data-hf-id="hf-aph5" id="root"></div>
|