@hyperframes/studio 0.8.115 → 0.8.117

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/assets/{hyperframes-player-C-9N8nk0.js → hyperframes-player-5fcgSstJ.js} +1 -1
  2. package/dist/assets/{index-CAvZ0AA-.js → index-C5qKdpgl.js} +205 -203
  3. package/dist/assets/{index-BoUM6Xqb.js → index-XJSawwYe.js} +1 -1
  4. package/dist/assets/{index-CVuorIMv.js → index-tg2LXUeu.js} +1 -1
  5. package/dist/{chunk-TXZMMOMA.js → chunk-3F47EFCT.js} +100 -2
  6. package/dist/chunk-3F47EFCT.js.map +1 -0
  7. package/dist/{domEditingLayers-D7VYFJJD.js → domEditingLayers-OL7GLSS4.js} +2 -2
  8. package/dist/index.d.ts +132 -41
  9. package/dist/index.html +1 -1
  10. package/dist/index.js +1184 -1084
  11. package/dist/index.js.map +1 -1
  12. package/package.json +8 -8
  13. package/src/captions/hooks/useCaptionSync.ts +10 -6
  14. package/src/components/ProjectUnreachableBanner.tsx +3 -3
  15. package/src/components/editor/DomEditOverlay.tsx +1 -0
  16. package/src/components/editor/domEditOverlayGestures.ts +1 -0
  17. package/src/components/editor/domEditOverlayStartGesture.ts +2 -2
  18. package/src/components/editor/domGroupMoveBy.test.tsx +252 -0
  19. package/src/components/editor/domGroupMoveBy.ts +95 -0
  20. package/src/components/editor/dragUndoPaint.test.ts +5 -5
  21. package/src/components/editor/gestureHoldsPreviewReload.test.tsx +33 -0
  22. package/src/components/editor/manualEditingAvailability.ts +8 -0
  23. package/src/components/editor/manualOffsetDrag.ts +8 -9
  24. package/src/components/editor/motionPathSelection.test.ts +6 -31
  25. package/src/components/editor/plainTranslate.ts +5 -3
  26. package/src/components/editor/probeSourceElement.ts +2 -1
  27. package/src/components/editor/propertyPanelFont.tsx +3 -2
  28. package/src/components/editor/propertyPanelHelpers.ts +2 -2
  29. package/src/components/editor/propertyPanelTransformCommit.ts +2 -2
  30. package/src/components/editor/rotationDraft.ts +2 -1
  31. package/src/components/editor/useColorGradingController.ts +2 -1
  32. package/src/components/editor/useDomEditOverlayGestures.ts +2 -2
  33. package/src/components/editor/useFxCarveNodes.ts +2 -1
  34. package/src/components/editor/useFxLevelling.ts +2 -1
  35. package/src/components/feedback/projectProvenance.ts +2 -1
  36. package/src/components/nle/NLEContext.test.ts +1 -0
  37. package/src/components/nle/NLEContext.tsx +2 -1
  38. package/src/components/nle/NLEPreview.tsx +12 -10
  39. package/src/components/nle/PreviewPoster.tsx +2 -1
  40. package/src/components/renders/useFfmpegStatus.ts +2 -1
  41. package/src/components/renders/useRenderQueue.ts +5 -4
  42. package/src/components/sidebar/AssetsTab.tsx +2 -1
  43. package/src/components/sidebar/GlobalAssetsView.tsx +2 -1
  44. package/src/contexts/DomEditContext.tsx +4 -0
  45. package/src/hooks/domSelectionTestHarness.ts +23 -0
  46. package/src/hooks/domStyleCommit.propertyNames.test.ts +73 -0
  47. package/src/hooks/domStyleCommit.ts +8 -1
  48. package/src/hooks/draggedGsapPosition.ts +10 -0
  49. package/src/hooks/gsapDragCommit.test.ts +75 -164
  50. package/src/hooks/gsapDragCommit.ts +2 -105
  51. package/src/hooks/gsapDragPositionCommit.ts +30 -393
  52. package/src/hooks/gsapEditOutcome.ts +22 -2
  53. package/src/hooks/gsapGroupPreflight.ts +34 -0
  54. package/src/hooks/gsapMutationClient.ts +4 -3
  55. package/src/hooks/gsapParsedTween.test-helpers.ts +75 -0
  56. package/src/hooks/gsapParsedTween.test.ts +62 -0
  57. package/src/hooks/gsapParsedTween.ts +243 -0
  58. package/src/hooks/gsapPositionDetection.test.ts +78 -0
  59. package/src/hooks/gsapPositionDetection.ts +52 -33
  60. package/src/hooks/gsapResizeDropPoint.test.ts +4 -3
  61. package/src/hooks/gsapResizeElementSize.test.tsx +1 -0
  62. package/src/hooks/gsapResizeGeometrySweep.test.ts +13 -25
  63. package/src/hooks/gsapResizeIntercept.test.ts +63 -11
  64. package/src/hooks/gsapResizeIntercept.ts +79 -169
  65. package/src/hooks/gsapResizeSweep.test.ts +16 -33
  66. package/src/hooks/gsapRuntimeBridge.sharedTween.test.ts +6 -8
  67. package/src/hooks/gsapRuntimeBridge.test.ts +41 -6
  68. package/src/hooks/gsapRuntimeBridge.ts +105 -131
  69. package/src/hooks/gsapRuntimeKeyframes.ts +16 -3
  70. package/src/hooks/gsapScriptCommitHelpers.ts +2 -1
  71. package/src/hooks/gsapScriptCommitTypes.ts +9 -1
  72. package/src/hooks/gsapShared.ts +7 -0
  73. package/src/hooks/gsapShared.writeTarget.test.ts +26 -58
  74. package/src/hooks/gsapValueAtPlayhead.browser.test.ts +83 -0
  75. package/src/hooks/gsapValueAtPlayhead.realGsap.test.ts +179 -0
  76. package/src/hooks/gsapValueAtPlayhead.test.ts +552 -0
  77. package/src/hooks/gsapValueAtPlayhead.ts +292 -0
  78. package/src/hooks/gsapWholePropertyOffsetCommit.test.ts +43 -0
  79. package/src/hooks/gsapWholePropertyOffsetCommit.ts +2 -3
  80. package/src/hooks/keyframeCacheAstLoad.ts +2 -1
  81. package/src/hooks/newTweenTarget.test.ts +41 -76
  82. package/src/hooks/plainRotation.ts +5 -1
  83. package/src/hooks/timelineTimingSync.test.ts +1 -0
  84. package/src/hooks/timelineTimingSync.ts +2 -1
  85. package/src/hooks/useAskAgentModal.ts +2 -1
  86. package/src/hooks/useBlockCatalog.ts +2 -1
  87. package/src/hooks/useCaptionDetection.ts +2 -1
  88. package/src/hooks/useCompositionContentLoader.ts +2 -1
  89. package/src/hooks/useDomEditCommitsHelpers.ts +3 -2
  90. package/src/hooks/useDomEditPersist.test.tsx +335 -0
  91. package/src/hooks/useDomEditSession.test.tsx +30 -1
  92. package/src/hooks/useDomEditSession.ts +10 -0
  93. package/src/hooks/useDomEditTextCommits.test.tsx +23 -0
  94. package/src/hooks/useDomEditTextCommits.ts +8 -2
  95. package/src/hooks/useDomGeometryCommit.test.tsx +5 -1
  96. package/src/hooks/useDomGeometryCommit.ts +7 -9
  97. package/src/hooks/useEditHistoryActions.paint.test.tsx +82 -20
  98. package/src/hooks/useEditHistoryActions.test.tsx +15 -0
  99. package/src/hooks/useEditHistoryActions.ts +16 -5
  100. package/src/hooks/useElementLifecycleOps.ts +2 -1
  101. package/src/hooks/useEnableKeyframes.test.ts +32 -1
  102. package/src/hooks/useEnableKeyframes.ts +2 -1
  103. package/src/hooks/useExternalFileChangeCoordinator.test.tsx +19 -0
  104. package/src/hooks/useExternalFileChangeCoordinator.ts +4 -2
  105. package/src/hooks/useFileManager.projectOwnership.test.tsx +6 -1
  106. package/src/hooks/useFileManager.ts +14 -10
  107. package/src/hooks/useFileTree.ts +3 -2
  108. package/src/hooks/useFrameCapture.ts +5 -1
  109. package/src/hooks/useFreezeFrame.test.ts +39 -3
  110. package/src/hooks/useFreezeFrame.ts +7 -3
  111. package/src/hooks/useGroupCommits.ts +2 -1
  112. package/src/hooks/useGsapAwareEditing.groupPlan.test.tsx +160 -0
  113. package/src/hooks/useGsapAwareEditing.test.tsx +42 -29
  114. package/src/hooks/useGsapAwareEditing.testHelpers.tsx +42 -0
  115. package/src/hooks/useGsapAwareEditing.ts +17 -8
  116. package/src/hooks/useGsapAwareGroupMove.ts +18 -18
  117. package/src/hooks/useGsapInteractionFailureTelemetry.ts +10 -4
  118. package/src/hooks/useGsapScriptCommits.test.tsx +72 -2
  119. package/src/hooks/useGsapScriptCommits.ts +21 -17
  120. package/src/hooks/useLintModal.ts +2 -1
  121. package/src/hooks/usePersistentEditHistory.test.ts +302 -3
  122. package/src/hooks/usePersistentEditHistory.ts +50 -17
  123. package/src/hooks/usePreviewPersistence.history.test.tsx +14 -3
  124. package/src/hooks/usePreviewPersistence.ts +13 -11
  125. package/src/hooks/useProjectFileWriter.ts +20 -19
  126. package/src/hooks/useRemoveBackground.ts +2 -1
  127. package/src/hooks/useSdkSession.ts +2 -1
  128. package/src/hooks/useServerConnection.ts +4 -3
  129. package/src/hooks/useStudioSelectionPublisher.ts +2 -1
  130. package/src/hooks/useThumbnailStill.test.ts +100 -0
  131. package/src/hooks/useThumbnailStill.ts +37 -0
  132. package/src/hooks/useTimelineDeleteOps.ts +2 -1
  133. package/src/index.ts +4 -0
  134. package/src/player/components/AudioWaveform.tsx +3 -2
  135. package/src/player/components/CompositionThumbnail.tsx +2 -1
  136. package/src/player/components/clipMenuNormalize.ts +2 -1
  137. package/src/player/components/clipPeakMap.ts +2 -1
  138. package/src/player/hooks/useTimelinePlayer.ts +5 -1
  139. package/src/player/lib/thumbnailScheduler.test.ts +16 -0
  140. package/src/player/lib/thumbnailScheduler.ts +10 -2
  141. package/src/player/sceneSwap.ts +2 -1
  142. package/src/telemetry/client.ts +2 -1
  143. package/src/utils/blockInstaller.ts +2 -1
  144. package/src/utils/elementGsap.test.ts +9 -0
  145. package/src/utils/elementGsap.ts +7 -0
  146. package/src/utils/gsapSoftReload.test.ts +39 -0
  147. package/src/utils/gsapSoftReload.ts +9 -14
  148. package/src/utils/gsapUndoRestore.browser.test.ts +94 -41
  149. package/src/utils/gsapUndoRestore.ts +3 -6
  150. package/src/utils/previewPrefetch.ts +2 -1
  151. package/src/utils/razorSplitTransaction.ts +12 -8
  152. package/src/utils/softReloadTargets.ts +5 -6
  153. package/src/utils/studioApiFetch.test.ts +75 -0
  154. package/src/utils/studioApiFetch.ts +13 -0
  155. package/src/utils/studioFileHistory.ts +5 -1
  156. package/src/utils/studioHelpers.ts +7 -1
  157. package/src/utils/studioPendingEdits.test.ts +23 -6
  158. package/src/utils/studioPendingEdits.ts +32 -8
  159. package/src/utils/studioTelemetry.ts +2 -1
  160. package/src/utils/timelineCompositionInsert.ts +3 -2
  161. package/src/webmcp/StudioAgentTools.tsx +2 -1
  162. package/dist/chunk-TXZMMOMA.js.map +0 -1
  163. /package/dist/{domEditingLayers-D7VYFJJD.js.map → domEditingLayers-OL7GLSS4.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -823,6 +823,17 @@ interface TimelineRangeSelection {
823
823
  anchorY: number;
824
824
  }
825
825
 
826
+ interface RecordEditInput$5 {
827
+ label: string;
828
+ coalesceKey?: string;
829
+ coalesceMs?: number;
830
+ files: Record<string, {
831
+ before: string;
832
+ after: string;
833
+ }>;
834
+ created?: string[];
835
+ }
836
+
826
837
  interface ImportedFontAsset {
827
838
  family: string;
828
839
  path: string;
@@ -856,7 +867,7 @@ type CommitDomAttributeBatch = (selection: DomEditSelection, operations: PatchOp
856
867
  prepareContent?: (html: string) => string;
857
868
  }) => Promise<boolean>;
858
869
 
859
- interface RecordEditInput$5 {
870
+ interface RecordEditInput$4 {
860
871
  label: string;
861
872
  coalesceKey?: string;
862
873
  files: Record<string, {
@@ -880,7 +891,7 @@ interface UseTimelineEditingOptions {
880
891
  showToast: (message: string, tone?: "error" | "info") => void;
881
892
  writeProjectFile: (path: string, content: string, expectedContent?: string) => Promise<void>;
882
893
  observeProjectFileVersion?: (path: string, version: string | null) => void;
883
- recordEdit: (input: RecordEditInput$5) => Promise<void>;
894
+ recordEdit: (input: RecordEditInput$4) => Promise<void>;
884
895
  reloadPreview: () => void;
885
896
  previewIframeRef: RefObject<HTMLIFrameElement | null>;
886
897
  pendingTimelineEditPathRef: MutableRefObject<Set<string>>;
@@ -968,7 +979,7 @@ interface CommitMutationOptions {
968
979
  * error handling — a failed write still throws.
969
980
  */
970
981
  deferPreviewSync?: boolean;
971
- /** Shares an in-place patch miss with the final render of one multi-write action. */
982
+ /** Carries a deferred write not yet on screen (no patch, or a missed one) to the final render. */
972
983
  previewFallbackLatch?: {
973
984
  pending: boolean;
974
985
  };
@@ -2032,9 +2043,31 @@ interface PreviewCompositionSize {
2032
2043
  height: number;
2033
2044
  }
2034
2045
 
2035
- interface NLEPreviewProps {
2046
+ interface CompositionLevel {
2047
+ /** Unique id — "master" or composition file path */
2048
+ id: string;
2049
+ /** Display label — "Master" or filename without extension */
2050
+ label: string;
2051
+ /** Preview URL for this composition level */
2052
+ previewUrl: string;
2053
+ }
2054
+ interface CompositionBreadcrumbProps {
2055
+ stack: CompositionLevel[];
2056
+ onNavigate: (index: number) => void;
2057
+ }
2058
+ declare function CompositionBreadcrumb({ stack, onNavigate }: CompositionBreadcrumbProps): react_jsx_runtime.JSX.Element | null;
2059
+
2060
+ interface NLEContextValue {
2036
2061
  projectId: string;
2037
- iframeRef: RefObject<HTMLIFrameElement | null>;
2062
+ iframeRef: React.MutableRefObject<HTMLIFrameElement | null>;
2063
+ play: () => void;
2064
+ pause: () => void;
2065
+ togglePlay: () => void;
2066
+ seek: (time: number, options?: {
2067
+ keepPlaying?: boolean;
2068
+ follow?: boolean;
2069
+ }) => boolean;
2070
+ refreshPlayer: () => void;
2038
2071
  onIframeLoad: () => void;
2039
2072
  previewSlots: PreviewIframeSlot[];
2040
2073
  onShadowIframeLoad: (gen: number) => void;
@@ -2042,6 +2075,29 @@ interface NLEPreviewProps {
2042
2075
  onShadowError: (gen: number, message: string) => void;
2043
2076
  setShadowIframeNode: (node: HTMLIFrameElement | null) => void;
2044
2077
  resetPreviewSlots: () => void;
2078
+ containerRef: React.MutableRefObject<HTMLDivElement | null>;
2079
+ compositionStack: CompositionLevel[];
2080
+ updateCompositionStack: React.Dispatch<React.SetStateAction<CompositionLevel[]>>;
2081
+ handleNavigateComposition: (index: number) => void;
2082
+ handleDrillDown: (element: TimelineElement) => void;
2083
+ compIdToSrc: Map<string, string>;
2084
+ compositionLoading: boolean;
2085
+ setCompositionLoading: (loading: boolean) => void;
2086
+ timelineDisabled: boolean;
2087
+ timelineSessionEpoch: number;
2088
+ hasLoadedOnceRef: React.MutableRefObject<boolean>;
2089
+ previewCompositionSize: {
2090
+ width: number;
2091
+ height: number;
2092
+ } | null;
2093
+ setPreviewCompositionSize: (size: {
2094
+ width: number;
2095
+ height: number;
2096
+ } | null) => void;
2097
+ }
2098
+
2099
+ interface NLEPreviewProps extends Pick<NLEContextValue, "projectId" | "onIframeLoad" | "previewSlots" | "onShadowIframeLoad" | "onShadowReadyChange" | "onShadowError" | "setShadowIframeNode" | "resetPreviewSlots"> {
2100
+ iframeRef: RefObject<HTMLIFrameElement | null>;
2045
2101
  onCompositionLoadingChange?: (loading: boolean) => void;
2046
2102
  portrait?: boolean;
2047
2103
  directUrl?: string;
@@ -2061,20 +2117,6 @@ interface ShortcutsButtonProps {
2061
2117
  }
2062
2118
  declare function ShortcutsButton({ sections, disabled, onSeek }: ShortcutsButtonProps): react_jsx_runtime.JSX.Element;
2063
2119
 
2064
- interface CompositionLevel {
2065
- /** Unique id — "master" or composition file path */
2066
- id: string;
2067
- /** Display label — "Master" or filename without extension */
2068
- label: string;
2069
- /** Preview URL for this composition level */
2070
- previewUrl: string;
2071
- }
2072
- interface CompositionBreadcrumbProps {
2073
- stack: CompositionLevel[];
2074
- onNavigate: (index: number) => void;
2075
- }
2076
- declare function CompositionBreadcrumb({ stack, onNavigate }: CompositionBreadcrumbProps): react_jsx_runtime.JSX.Element | null;
2077
-
2078
2120
  interface UseCompositionStackOptions {
2079
2121
  projectId: string;
2080
2122
  activeCompositionPath?: string | null;
@@ -2243,6 +2285,21 @@ declare function useRenderClipContent({ projectIdRef, compIdToSrc, activePreview
2243
2285
  label: string;
2244
2286
  }, context?: TimelineClipRenderContext) => ReactNode;
2245
2287
 
2288
+ interface UseThumbnailStillOptions {
2289
+ sessionEpoch?: number;
2290
+ priority?: ThumbnailPriority;
2291
+ }
2292
+ type ThumbnailStill = {
2293
+ status: "loading";
2294
+ } | {
2295
+ status: "ready";
2296
+ url: string;
2297
+ } | {
2298
+ status: "failed";
2299
+ };
2300
+ /** A host picture's server still through the thumbnail scheduler, so it yields to a preview reload. */
2301
+ declare function useThumbnailStill(url: string | null, projectId: string, { sessionEpoch, priority }?: UseThumbnailStillOptions): ThumbnailStill;
2302
+
2246
2303
  interface DomEditCompositionRect {
2247
2304
  left: number;
2248
2305
  top: number;
@@ -2721,18 +2778,10 @@ interface UndoRestoreFile {
2721
2778
  }
2722
2779
  type RestoreFiles = Record<string, UndoRestoreFile>;
2723
2780
 
2724
- interface RecordEditInput$4 {
2725
- label: string;
2726
- coalesceKey?: string;
2727
- coalesceMs?: number;
2728
- files: Record<string, {
2729
- before: string;
2730
- after: string;
2731
- }>;
2732
- }
2733
2781
  interface ApplyCallbacks {
2734
2782
  readFile: (path: string) => Promise<string>;
2735
2783
  serialize?: <T>(paths: readonly string[], task: () => Promise<T>) => Promise<T>;
2784
+ claimedAfter?: number;
2736
2785
  }
2737
2786
  interface UsePersistentEditHistoryOptions {
2738
2787
  projectId: string | null;
@@ -2764,13 +2813,14 @@ declare function usePersistentEditHistory({ projectId }: UsePersistentEditHistor
2764
2813
  createdAt: number;
2765
2814
  }[];
2766
2815
  };
2767
- recordEdit: ({ label, coalesceKey, coalesceMs, files }: RecordEditInput$4) => Promise<void>;
2816
+ recordEdit: ({ label, coalesceKey, coalesceMs, files, created }: RecordEditInput$5) => Promise<void>;
2768
2817
  undo: (callbacks: ApplyCallbacks) => Promise<ApplyResult>;
2769
2818
  redo: (callbacks: ApplyCallbacks) => Promise<ApplyResult>;
2770
2819
  predict: (direction: "undo" | "redo") => {
2771
2820
  id: string;
2772
2821
  files: RestoreFiles;
2773
2822
  } | null;
2823
+ claims: () => number;
2774
2824
  noteOutsideChange: () => void;
2775
2825
  };
2776
2826
 
@@ -2852,7 +2902,9 @@ type StudioSaveDrainResult<Failure = unknown> = {
2852
2902
 
2853
2903
  type StudioPendingEditsDrainResult = StudioSaveDrainResult;
2854
2904
  declare function revertNewestStudioPendingEdit(): (() => void) | null;
2855
- declare function flushStudioPendingEdits(): Promise<StudioPendingEditsDrainResult>;
2905
+ declare function flushStudioPendingEdits({ onlyCurrent, }?: {
2906
+ onlyCurrent?: boolean | undefined;
2907
+ }): Promise<StudioPendingEditsDrainResult>;
2856
2908
 
2857
2909
  interface HistoryResult {
2858
2910
  ok: boolean;
@@ -2867,6 +2919,7 @@ interface HistoryResult {
2867
2919
  interface HistoryFileCallbacks {
2868
2920
  readFile: (path: string) => Promise<string>;
2869
2921
  serialize?: <T>(paths: readonly string[], task: () => Promise<T>) => Promise<T>;
2922
+ claimedAfter?: number;
2870
2923
  }
2871
2924
  interface EditHistoryHandle {
2872
2925
  undo: (cb: HistoryFileCallbacks) => Promise<HistoryResult>;
@@ -2875,6 +2928,7 @@ interface EditHistoryHandle {
2875
2928
  id: string;
2876
2929
  files: RestoreFiles;
2877
2930
  } | null;
2931
+ claims?: () => number;
2878
2932
  state: {
2879
2933
  undo: ReadonlyArray<{
2880
2934
  createdAt: number;
@@ -2885,7 +2939,7 @@ interface EditHistoryHandle {
2885
2939
  };
2886
2940
  }
2887
2941
  interface UseEditHistoryActionsOptions {
2888
- editHistory: Pick<EditHistoryHandle, "undo" | "redo" | "predict">;
2942
+ editHistory: Pick<EditHistoryHandle, "undo" | "redo" | "predict" | "claims">;
2889
2943
  readOptionalProjectFile: (path: string) => Promise<string>;
2890
2944
  readProjectFile: (path: string) => Promise<string>;
2891
2945
  writeProjectFile: (path: string, content: string) => Promise<void>;
@@ -3080,9 +3134,10 @@ interface CssRotationTarget {
3080
3134
  /** An inline box does not transform, so the turn makes it inline-block. */
3081
3135
  inline: boolean;
3082
3136
  }
3137
+ type PressChoseGsap = null;
3083
3138
  type RotationCommit = {
3084
3139
  angle: number;
3085
- plain?: CssRotationTarget;
3140
+ plain?: CssRotationTarget | PressChoseGsap;
3086
3141
  };
3087
3142
 
3088
3143
  declare const SNAP_THRESHOLD_PX = 6;
@@ -3300,6 +3355,15 @@ interface RecordEditInput$2 {
3300
3355
  }>;
3301
3356
  }
3302
3357
 
3358
+ interface DomGroupMove {
3359
+ selection: DomEditSelection;
3360
+ /** Composition px: the element's box moves by exactly this in the film. */
3361
+ delta: {
3362
+ x: number;
3363
+ y: number;
3364
+ };
3365
+ }
3366
+
3303
3367
  interface UseDomEditSessionParams extends DomEditTimelineParams {
3304
3368
  compositionLoading: boolean;
3305
3369
  showToast: (message: string, tone?: "error" | "info") => void;
@@ -3353,7 +3417,7 @@ declare function useDomEditSession({ projectId, activeCompPath, compIdToSrc, cap
3353
3417
  clearDomSelection: () => void;
3354
3418
  refreshDomEditSelectionFromPreview: (selection: DomEditSelection) => Promise<void>;
3355
3419
  handleDomStyleCommit: (property: string, value: string) => Promise<DomEditCommitOutcome>;
3356
- handleDomStyleCommitForSelection: (selection: DomEditSelection, property: string, value: string) => Promise<DomEditCommitOutcome>;
3420
+ handleDomStyleCommitForSelection: (selection: DomEditSelection, propertyOrStylesAsOnePatch: string | Record<string, string>, value?: string) => Promise<DomEditCommitOutcome>;
3357
3421
  handleDomAttributeCommit: (attr: string, value: string) => Promise<void>;
3358
3422
  handleDomAttributeLiveCommit: (attr: string, value: string | null, onSettled?: (ok: boolean) => void, live?: {
3359
3423
  previewOnly?: boolean;
@@ -3366,7 +3430,10 @@ declare function useDomEditSession({ projectId, activeCompPath, compIdToSrc, cap
3366
3430
  x: number;
3367
3431
  y: number;
3368
3432
  }, modifiers?: MoveCommitOptions) => Promise<GeometryCommitResult | undefined>;
3369
- handleDomGroupPathOffsetCommit: (updates: DomEditGroupPathOffsetCommit[]) => Promise<GeometryCommitResult>;
3433
+ handleDomGroupPathOffsetCommit: (updates: DomEditGroupPathOffsetCommit[], options?: {
3434
+ refusalToast?: boolean;
3435
+ }) => Promise<GeometryCommitResult>;
3436
+ handleDomGroupMoveBy: (moves: DomGroupMove[]) => Promise<void>;
3370
3437
  handleDomZIndexReorderCommit: (entries: Array<{
3371
3438
  element: HTMLElement;
3372
3439
  zIndex: number;
@@ -3382,7 +3449,9 @@ declare function useDomEditSession({ projectId, activeCompPath, compIdToSrc, cap
3382
3449
  }, offset?: {
3383
3450
  x: number;
3384
3451
  y: number;
3385
- }, restore?: () => void) => Promise<GeometryCommitResult>;
3452
+ }, restore?: () => void, route?: {
3453
+ plainTranslate: boolean;
3454
+ }) => Promise<GeometryCommitResult>;
3386
3455
  handleDomRotationCommit: (selection: DomEditSelection, next: RotationCommit) => Promise<GeometryCommitResult | undefined>;
3387
3456
  handleDomManualEditsReset: (selection: DomEditSelection) => Promise<DomEditPersistOutcome | undefined>;
3388
3457
  handleDomTextCommit: (value: string, fieldKey?: string) => Promise<DomEditCommitOutcome>;
@@ -3544,7 +3613,7 @@ type DomEditValue = ReturnType<typeof useDomEditSession>;
3544
3613
  interface DomEditSelectionValue extends Pick<DomEditValue, "domEditSelection" | "domEditGroupSelections" | "domEditHoverSelection" | "activeGroupElement" | "domEditSelectionRef" | "selectedGsapAnimations" | "gsapMultipleTimelines" | "gsapUnsupportedTimelinePattern" | "agentModalOpen" | "agentModalAnchorPoint" | "copiedAgentPrompt" | "agentPromptSelectionContext"> {
3545
3614
  }
3546
3615
  declare function useDomEditSelectionContext(): DomEditSelectionValue;
3547
- 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, }: {
3616
+ 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, handleDomGroupMoveBy, 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, }: {
3548
3617
  value: DomEditValue;
3549
3618
  children: ReactNode;
3550
3619
  }): react_jsx_runtime.JSX.Element;
@@ -3639,7 +3708,9 @@ interface DomEditOverlayProps {
3639
3708
  }, offset?: {
3640
3709
  x: number;
3641
3710
  y: number;
3642
- }, restore?: () => void) => Promise<unknown> | void;
3711
+ }, restore?: () => void, route?: {
3712
+ plainTranslate: boolean;
3713
+ }) => Promise<unknown> | void;
3643
3714
  onRotationCommit: (selection: DomEditSelection, next: RotationCommit) => Promise<unknown> | void;
3644
3715
  onStyleCommit?: (property: string, value: string) => Promise<unknown> | void;
3645
3716
  recordingState?: GestureRecordingState;
@@ -3712,13 +3783,31 @@ declare function useDomStyleCommit({ projectId, iframeRef, writeProjectFile, rec
3712
3783
  waitForPendingSaves: () => Promise<DomEditSaveDrainResult>;
3713
3784
  };
3714
3785
 
3786
+ declare function ColorField({ label, value, disabled, onReset, flat, mixed, onPreview, onCommit, }: {
3787
+ label: string;
3788
+ value: string;
3789
+ disabled?: boolean;
3790
+ onReset?: () => void;
3791
+ flat?: boolean;
3792
+ mixed?: boolean;
3793
+ onPreview?: (nextValue: string) => void;
3794
+ onCommit: (nextValue: string) => void;
3795
+ }): react_jsx_runtime.JSX.Element;
3796
+
3797
+ declare function GradientField({ value, fallbackColor, disabled, onCommit, }: {
3798
+ value: string;
3799
+ fallbackColor: string | undefined;
3800
+ disabled?: boolean;
3801
+ onCommit: (nextValue: string) => void;
3802
+ }): react_jsx_runtime.JSX.Element;
3803
+
3715
3804
  /**
3716
3805
  * Studio's `Player` must show the project, with `beginTimelineSession(projectId)` run before it
3717
3806
  * mounts; drain `waitForPendingSaves` before switching projects.
3718
3807
  */
3719
3808
  interface UseDomGeometryCommitOptions extends UseDomStyleCommitOptions {
3720
- /** Called when a save cannot patch the preview in place; defaults to reloading the iframe. */
3721
- reloadPreview?: () => void;
3809
+ /** Reloads the host's preview when a save cannot patch it in place. */
3810
+ reloadPreview: () => void;
3722
3811
  }
3723
3812
  interface DomGeometryCommits {
3724
3813
  commitPathOffset: (selection: DomEditSelection, next: {
@@ -3732,7 +3821,9 @@ interface DomGeometryCommits {
3732
3821
  }, offset?: {
3733
3822
  x: number;
3734
3823
  y: number;
3735
- }, restore?: () => void) => Promise<DomEditCommitOutcome>;
3824
+ }, restore?: () => void, route?: {
3825
+ plainTranslate: boolean;
3826
+ }) => Promise<DomEditCommitOutcome>;
3736
3827
  commitRotation: (selection: DomEditSelection, next: RotationCommit) => Promise<DomEditCommitOutcome>;
3737
3828
  waitForPendingSaves: () => Promise<void>;
3738
3829
  }
@@ -4119,4 +4210,4 @@ declare function buildStudioTools(depsRef: {
4119
4210
  readonly current: StudioAgentToolsDeps;
4120
4211
  }): ModelContextTool[];
4121
4212
 
4122
- 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 FadeEdge, type FadeHandleBox, type FadeHandleClipBox, 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, displayTrackOrder, extractSnapTargets, fadeHandleBoxes, findElementBlock, flushStudioPendingEdits, formatTime, getPersistedRenderSettings, liveTime, mergeStyleIntoTag, openAudioGainDialog, parseStyleString, persistRenderSettings, resolveDomEditSelection, resolveEquidistanceGuides, resolveGuideLineRect, resolveIframe, resolveSnapAdjustment, resolveSourceFile, revertNewestStudioPendingEdit, snapEngagedForTravel, useAudioGainDialogStore, useAudioMetersVisible, useClipboard, useCompositionStack, useDockLayoutStore, useDomEditSelectionContext, useDomEditSession, useDomEditZOrder, useDomGeometryCommit, useDomStyleCommit, useEditHistoryActions, useElementPicker, useLivePreviewIframe, useMarqueeGestures, usePersistentEditHistory, usePlayerHandle, usePlayerStore, usePreviewCompositionRect, usePreviewGuidesStore, usePreviewIframeStore, usePreviewOverlayContext, usePreviewPersistence, useProjectFileWriter, useRenderClipContent, useRenderQueue, useTimelineContext, useTimelineEditing, useTimelinePlayer };
4213
+ export { type AgentModalAnchorPoint, type AgentPromptElementInfo, AskAgentModal, type AskAgentModalProps, AudioMeterStrip, type AudioMeterStripProps, AudioWaveform, type AudioWaveformProps, type BlockedTimelineEditIntent, type CanEditTimelineElement, ColorField, CompositionBreadcrumb, type CompositionDimensions, type CompositionLevel, CompositionThumbnail, ConnectedDomEditOverlay, type ConnectedDomEditOverlayProps, DEFAULT_SHORTCUT_SECTIONS, Dock, type DockController, type DomEditCapabilities, type DomEditCommitDeclineReason, type DomEditCommitOutcome, type DomEditGroupPathOffsetCommit, DomEditOverlay, type DomEditOverlayProps, DomEditProvider, type DomEditSelection, type DomEditZOrder, type DomGeometryCommits, type EditHistoryHandle, EditorShell, type EditorShellProps, type ExternalFileChangeBlockedState, type ExternalFileChangeCoordinatorHandle, ExternalFileConflictBanner, type FadeEdge, type FadeHandleBox, type FadeHandleClipBox, type FfmpegStatus, FileTree, GradientField, GridOverlay, ImageThumbnail, type ImageThumbnailProps, type MarqueeGestures, type MarqueeGesturesDeps, MarqueeOverlay, type MarqueeOverlayProps, type Rect$1 as MarqueeRect, type ModelContextTool, NLEPreview, type PanelId, type PatchOperation, type PersistedRenderSettings, type PickedElement, PlayerControls, type PlayerHandle, type PlayerHandleElement, type PlayerHandleListener, type PlayerHandleTimeListener, type DomEditCompositionRect as PreviewCompositionRect, PreviewGuides, PreviewOverlayProvider, type PreviewOverlayProviderProps, type PreviewPromotion, PreviewReadOnlyProvider, type PreviewSnapPreferences, PropertyPanel, type RenderJob, RenderQueue, type RenderQueueProps, type ResolutionPreset, SNAP_THRESHOLD_PX, type ShortcutHint, type ShortcutSection, ShortcutsButton, type ShortcutsButtonProps, type SnapContext, type SnapEdge, type SnapGuide, SnapGuideOverlay, type SnapGuideOverlayProps, type SnapGuidesState, type Rect as SnapRect, type SnapResult, type SnapTarget, SnapToolbar, SourceEditor, type SpacingGuide, type StartRenderOptions, type StudioAgentToolsDeps, StudioApp, StudioFileConflictError, type StudioLookSnapshot, type StudioPendingEditsDrainResult, TRACK_H, type ThumbnailPriority, type ThumbnailStill, Timeline, TimelineClipMenu, type TimelineClipMenuItem, type TimelineClipRenderContext, type TimelineEditCallbacks, type TimelineEditOutcome, type TimelineEditPermission, TimelineEditPopover, TimelineEditProvider, type TimelineElement, TimelineEmptyStatePart, TimelineFrame, TimelineGapMenu, TimelineHistoryButtons, type TimelineHistoryButtonsProps, TimelineKeyframeMenu, TimelineLanes, TimelineOverlays, TimelinePane, type TimelinePaneProps, TimelinePlayhead, TimelineProvider, TimelineRazorGuide, TimelineRuler, TimelineShortcutHint, type TimelineTheme, type TimelineTimeRange$1 as TimelineTimeRange, TimelineToolbar, type TimelineToolbarProps, type TimelineTrackPadding, type TimelineZIndexReorderCommit, type ToolResult, type UseClipboardOptions, type UseDomEditSessionParams, type UseDomGeometryCommitOptions, type UseDomStyleCommitOptions, type UseEditHistoryActionsOptions, type UsePersistentEditHistoryOptions, type UsePreviewPersistenceParams, type UseProjectFileWriterOptions, type UseRenderClipContentOptions, type UseThumbnailStillOptions, type UseTimelineEditingOptions, VideoThumbnail, type ZOrderAction, applyPatch, buildCompositionSnapTarget, buildGridSnapEdges, buildPickerAgentContextPreview, buildPickerAgentPrompt, buildStudioTools, collectSnapContext, collectStudioLookScene, displayTrackOrder, extractSnapTargets, fadeHandleBoxes, findElementBlock, flushStudioPendingEdits, formatTime, getPersistedRenderSettings, liveTime, mergeStyleIntoTag, openAudioGainDialog, parseStyleString, persistRenderSettings, resolveDomEditSelection, resolveEquidistanceGuides, resolveGuideLineRect, resolveIframe, resolveSnapAdjustment, resolveSourceFile, revertNewestStudioPendingEdit, snapEngagedForTravel, useAudioGainDialogStore, useAudioMetersVisible, useClipboard, useCompositionStack, useDockLayoutStore, useDomEditSelectionContext, useDomEditSession, useDomEditZOrder, useDomGeometryCommit, useDomStyleCommit, useEditHistoryActions, useElementPicker, useLivePreviewIframe, useMarqueeGestures, usePersistentEditHistory, usePlayerHandle, usePlayerStore, usePreviewCompositionRect, usePreviewGuidesStore, usePreviewIframeStore, usePreviewOverlayContext, usePreviewPersistence, useProjectFileWriter, useRenderClipContent, useRenderQueue, useThumbnailStill, useTimelineContext, useTimelineEditing, useTimelinePlayer };
package/dist/index.html CHANGED
@@ -14,7 +14,7 @@
14
14
  document.documentElement.dataset.theme = "paper";
15
15
  }
16
16
  </script>
17
- <script type="module" crossorigin src="/assets/index-CAvZ0AA-.js"></script>
17
+ <script type="module" crossorigin src="/assets/index-C5qKdpgl.js"></script>
18
18
  <link rel="stylesheet" crossorigin href="/assets/index-t1LH6H5H.css">
19
19
  </head>
20
20
  <body>