@hyperframes/studio 0.8.53-desktop.0 → 0.8.53
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-PTEnAHhg.js → hyperframes-player-DKWM-Ons.js} +1 -1
- package/dist/assets/{index-BnXZuIJD.css → index-DrHQAuGO.css} +1 -1
- package/dist/assets/{index-CNyviK_l.js → index-HfP3sap2.js} +200 -200
- package/dist/assets/{index-BjslOS9g.js → index-UvW6BEwf.js} +1 -1
- package/dist/assets/{index--myXp8ui.js → index-Y4OnpTEM.js} +1 -1
- package/dist/index.d.ts +11 -406
- package/dist/index.html +2 -2
- package/dist/index.js +7570 -7709
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -0
- package/package.json +8 -7
- package/src/components/StudioHeader.tsx +1 -1
- package/src/components/nle/TimelinePane.tsx +0 -7
- package/src/components/renders/RenderQueue.test.tsx +133 -25
- package/src/components/renders/RenderQueue.tsx +99 -92
- package/src/components/renders/RenderQueueItem.tsx +69 -64
- package/src/components/ui/Select.tsx +4 -0
- package/src/headerExports.test.tsx +23 -0
- package/src/hooks/useFileManager.ts +123 -21
- package/src/hooks/usePersistentEditHistory.ts +1 -1
- package/src/hooks/useRightPanelIntents.ts +2 -1
- package/src/hooks/useTimelineDeleteOps.test.tsx +0 -111
- package/src/hooks/useTimelineEditing.test.tsx +3 -322
- package/src/hooks/useTimelineEditing.ts +16 -103
- package/src/hooks/useTimelineEditingTypes.ts +0 -3
- package/src/index.ts +2 -37
- package/src/main.tsx +26 -0
- package/src/player/components/TimelineTrackHeader.test.tsx +5 -26
- package/src/player/components/TimelineTrackHeader.tsx +1 -1
- package/src/player/components/timelineTheme.test.ts +4 -4
- package/src/player/components/timelineTheme.ts +30 -30
- package/src/styles/hex-baseline.json +2 -2
- package/src/styles/theme.css +0 -27
- package/src/hooks/timelineEditPermission.ts +0 -31
- package/src/hooks/useProjectFileWriter.ts +0 -150
- package/src/hooks/useTrackPendingTimelineEdit.test.tsx +0 -62
- package/src/hooks/useTrackPendingTimelineEdit.ts +0 -22
- package/src/hostMount.test.tsx +0 -222
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as P}from"./index-
|
|
1
|
+
import{g as P}from"./index-HfP3sap2.js";function j(c,d){for(var s=0;s<d.length;s++){const a=d[s];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in c)){const l=Object.getOwnPropertyDescriptor(a,i);l&&Object.defineProperty(c,i,l.get?l:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}var v={},w;function k(){if(w)return v;w=1,Object.defineProperty(v,"__esModule",{value:!0}),v.default=d;var c=window.OfflineAudioContext||window.webkitOfflineAudioContext;function d(e){var r=a(e);return r.start(0),[i,y,O(e.sampleRate),s].reduce(function(t,o){return o(t)},r.buffer.getChannelData(0))}function s(e){return e.sort(function(r,t){return t.count-r.count}).splice(0,5)[0].tempo}function a(e){var r=e.length,t=e.numberOfChannels,o=e.sampleRate,n=new c(t,r,o),u=n.createBufferSource();u.buffer=e;var f=n.createBiquadFilter();return f.type="lowpass",u.connect(f),f.connect(n.destination),u}function i(e){for(var r=[],t=.9,o=.3,n=15;r.length<n&&t>=o;)r=l(e,t),t-=.05;if(r.length<n)throw new Error("Could not find enough samples for a reliable detection.");return r}function l(e,r){for(var t=[],o=0,n=e.length;o<n;o+=1)e[o]>r&&(t.push(o),o+=1e4);return t}function y(e){var r=[];return e.forEach(function(t,o){for(var n=function(x){var g=e[o+x]-t,_=r.some(function(h){if(h.interval===g)return h.count+=1});_||r.push({interval:g,count:1})},u=0;u<10;u+=1)n(u)}),r}function O(e){return function(r){var t=[];return r.forEach(function(o){if(o.interval!==0){for(var n=60/(o.interval/e);n<90;)n*=2;for(;n>180;)n/=2;n=Math.round(n);var u=t.some(function(f){if(f.tempo===n)return f.count+=o.count});u||t.push({tempo:n,count:o.count})}}),t}}return v}var p,b;function q(){return b||(b=1,p=k().default),p}var m=q();const A=P(m),D=j({__proto__:null,default:A},[m]);export{D as i};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ButtonHTMLAttributes, ReactNode, ElementType, ComponentPropsWithoutRef, ReactElement, RefObject
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, ElementType, ComponentPropsWithoutRef, ReactElement, RefObject } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
|
|
5
5
|
import * as node_modules_cn_dist_types from 'node_modules/cn/dist/types';
|
|
@@ -13,7 +13,6 @@ import { StoreApi } from 'zustand';
|
|
|
13
13
|
import { MusicBeatAnalysis } from '@hyperframes/core/beats';
|
|
14
14
|
import { GsapAnimation as GsapAnimation$1, ArcPathSegment } from '@hyperframes/parsers/gsap-parser';
|
|
15
15
|
import { CanvasResolution } from '@hyperframes/parsers';
|
|
16
|
-
import { Composition } from '@hyperframes/sdk';
|
|
17
16
|
|
|
18
17
|
type ButtonVariant = "primary" | "secondary" | "danger" | "ghost";
|
|
19
18
|
type ButtonSize = "sm" | "md" | "lg";
|
|
@@ -38,6 +37,11 @@ declare const buttonBase: string;
|
|
|
38
37
|
* repeats the `hover:` and `active:` half exactly; the test pairs them.
|
|
39
38
|
*/
|
|
40
39
|
declare const buttonVariants: Record<ButtonVariant, string>;
|
|
40
|
+
/**
|
|
41
|
+
* The three control heights, 24 / 28 / 32 px, from `--spacing-ctl-*`.
|
|
42
|
+
* Exported so the Capture download `<a href>` can wear the same recipe as a Button.
|
|
43
|
+
*/
|
|
44
|
+
declare const buttonSizes: Record<ButtonSize, string>;
|
|
41
45
|
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
42
46
|
|
|
43
47
|
interface IconButtonProps extends ButtonBaseProps {
|
|
@@ -84,6 +88,8 @@ interface TooltipProps {
|
|
|
84
88
|
}
|
|
85
89
|
declare function Tooltip({ label, children, delay, side }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
86
90
|
|
|
91
|
+
declare function HyperframesLogo(): react_jsx_runtime.JSX.Element;
|
|
92
|
+
|
|
87
93
|
/**
|
|
88
94
|
* Studio's tailwind-merge config: teaches it the two scales `theme.css`
|
|
89
95
|
* invents (`text-step-*`, `ctl`/`ctl-sm`/`ctl-lg`) so overrides replace, not stack.
|
|
@@ -227,6 +233,8 @@ declare function NumberField({ label, value, onCommit, onTrack, unit, min, max,
|
|
|
227
233
|
interface SelectOption {
|
|
228
234
|
label: string;
|
|
229
235
|
value: string;
|
|
236
|
+
/** Offered but not choosable; the label stays visible so the reason stays visible too. */
|
|
237
|
+
disabled?: boolean;
|
|
230
238
|
}
|
|
231
239
|
interface SelectProps {
|
|
232
240
|
/** Accessible name for the trigger. */
|
|
@@ -970,179 +978,8 @@ declare function buildPickerAgentPrompt({ selection, userInstruction, }: {
|
|
|
970
978
|
}): string;
|
|
971
979
|
declare function buildPickerAgentContextPreview(selection: HyperframePickerElementInfo | null): string;
|
|
972
980
|
|
|
973
|
-
type EditHistoryKind = "manual" | "motion" | "timeline" | "source";
|
|
974
|
-
interface EditHistoryFileSnapshot {
|
|
975
|
-
before: string;
|
|
976
|
-
after: string;
|
|
977
|
-
beforeHash: string;
|
|
978
|
-
afterHash: string;
|
|
979
|
-
}
|
|
980
|
-
interface EditHistoryEntry {
|
|
981
|
-
id: string;
|
|
982
|
-
projectId: string;
|
|
983
|
-
label: string;
|
|
984
|
-
kind: EditHistoryKind;
|
|
985
|
-
coalesceKey?: string;
|
|
986
|
-
/** Per-entry coalesce window override (ms). Falls back to the reducer default. */
|
|
987
|
-
coalesceMs?: number;
|
|
988
|
-
createdAt: number;
|
|
989
|
-
files: Record<string, EditHistoryFileSnapshot>;
|
|
990
|
-
}
|
|
991
|
-
interface EditHistoryState {
|
|
992
|
-
version: 1;
|
|
993
|
-
updatedAt: number;
|
|
994
|
-
undo: EditHistoryEntry[];
|
|
995
|
-
redo: EditHistoryEntry[];
|
|
996
|
-
}
|
|
997
|
-
interface BuildEditHistoryEntryInput {
|
|
998
|
-
id: string;
|
|
999
|
-
projectId: string;
|
|
1000
|
-
label: string;
|
|
1001
|
-
kind?: EditHistoryKind;
|
|
1002
|
-
coalesceKey?: string;
|
|
1003
|
-
coalesceMs?: number;
|
|
1004
|
-
now: number;
|
|
1005
|
-
files: Record<string, {
|
|
1006
|
-
before: string;
|
|
1007
|
-
after: string;
|
|
1008
|
-
}>;
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
interface SdkSessionPublication {
|
|
1012
|
-
candidate: Composition;
|
|
1013
|
-
expectedSession: Composition;
|
|
1014
|
-
targetPath: string;
|
|
1015
|
-
}
|
|
1016
|
-
type SdkSessionPublicationResult = "published" | "rejected-active-target" | "rejected-inactive-target";
|
|
1017
|
-
type PublishSdkSession = (publication: SdkSessionPublication) => SdkSessionPublicationResult;
|
|
1018
|
-
|
|
1019
|
-
type TimelineLayerDropPlacement = {
|
|
1020
|
-
type: "onto";
|
|
1021
|
-
layerId: string;
|
|
1022
|
-
} | {
|
|
1023
|
-
type: "between";
|
|
1024
|
-
beforeLayerId: string;
|
|
1025
|
-
afterLayerId: string;
|
|
1026
|
-
} | {
|
|
1027
|
-
type: "above";
|
|
1028
|
-
layerId: string;
|
|
1029
|
-
} | {
|
|
1030
|
-
type: "below";
|
|
1031
|
-
layerId: string;
|
|
1032
|
-
};
|
|
1033
|
-
interface TimelineStackingZIndexChange {
|
|
1034
|
-
key: string;
|
|
1035
|
-
zIndex: number;
|
|
1036
|
-
domId?: string;
|
|
1037
|
-
selector?: string;
|
|
1038
|
-
selectorIndex?: number;
|
|
1039
|
-
sourceFile?: string;
|
|
1040
|
-
}
|
|
1041
|
-
interface TimelineStackingReorderIntent {
|
|
1042
|
-
contextKey: string;
|
|
1043
|
-
placement: TimelineLayerDropPlacement;
|
|
1044
|
-
zIndexChanges: TimelineStackingZIndexChange[];
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
981
|
type BlockedTimelineEditIntent = "move" | "resize-start" | "resize-end";
|
|
1048
982
|
|
|
1049
|
-
/**
|
|
1050
|
-
* Durability report for a patch-batches commit. `durable === false` means the
|
|
1051
|
-
* server could not locate at least one patch target on disk — the preview was
|
|
1052
|
-
* reloaded to reconverge, and dependent follow-up writes (the z→lane timeline
|
|
1053
|
-
* mirror) must be skipped. `allMatched` retains the underlying match detail.
|
|
1054
|
-
* `changed === false` means no source file was written: every patch was a
|
|
1055
|
-
* byte-identical no-op, or the atomic gesture was refused before any write.
|
|
1056
|
-
*/
|
|
1057
|
-
interface DomEditPatchBatchesResult {
|
|
1058
|
-
durable: boolean;
|
|
1059
|
-
allMatched: boolean;
|
|
1060
|
-
changed: boolean;
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
/** A host's verdict on one element: editable, or blocked with a reason to show. */
|
|
1064
|
-
type TimelineEditPermission = true | {
|
|
1065
|
-
blocked: true;
|
|
1066
|
-
reason: string;
|
|
1067
|
-
};
|
|
1068
|
-
type CanEditTimelineElement = (element: TimelineElement) => TimelineEditPermission;
|
|
1069
|
-
|
|
1070
|
-
interface RecordEditInput$1 {
|
|
1071
|
-
label: string;
|
|
1072
|
-
kind: EditHistoryKind;
|
|
1073
|
-
coalesceKey?: string;
|
|
1074
|
-
files: Record<string, {
|
|
1075
|
-
before: string;
|
|
1076
|
-
after: string;
|
|
1077
|
-
}>;
|
|
1078
|
-
}
|
|
1079
|
-
type TimelineZIndexReorderCommit = (entries: Array<{
|
|
1080
|
-
element: HTMLElement;
|
|
1081
|
-
zIndex: number;
|
|
1082
|
-
id?: string;
|
|
1083
|
-
selector?: string;
|
|
1084
|
-
selectorIndex?: number;
|
|
1085
|
-
sourceFile: string;
|
|
1086
|
-
key?: string;
|
|
1087
|
-
}>, coalesceKey?: string) => Promise<DomEditPatchBatchesResult | undefined | void>;
|
|
1088
|
-
interface UseTimelineEditingOptions {
|
|
1089
|
-
projectId: string | null;
|
|
1090
|
-
activeCompPath: string | null;
|
|
1091
|
-
timelineElements: TimelineElement[];
|
|
1092
|
-
showToast: (message: string, tone?: "error" | "info") => void;
|
|
1093
|
-
writeProjectFile: (path: string, content: string, expectedContent?: string) => Promise<void>;
|
|
1094
|
-
observeProjectFileVersion?: (path: string, version: string | null) => void;
|
|
1095
|
-
recordEdit: (input: RecordEditInput$1) => Promise<void>;
|
|
1096
|
-
reloadPreview: () => void;
|
|
1097
|
-
previewIframeRef: RefObject<HTMLIFrameElement | null>;
|
|
1098
|
-
pendingTimelineEditPathRef: MutableRefObject<Set<string>>;
|
|
1099
|
-
uploadProjectFiles: (files: Iterable<File>, dir?: string) => Promise<string[]>;
|
|
1100
|
-
isRecordingRef?: RefObject<boolean>;
|
|
1101
|
-
/** Stage 7 §3.2: SDK session for routing timing ops through setTiming. */
|
|
1102
|
-
sdkSession?: Composition | null;
|
|
1103
|
-
/** Publish a fully persisted candidate SDK session. */
|
|
1104
|
-
publishSdkSession?: PublishSdkSession;
|
|
1105
|
-
/** Resync the SDK session after a server-authoritative timeline write. */
|
|
1106
|
-
forceReloadSdkSession?: () => void;
|
|
1107
|
-
/** Reparse authored animations after a timing rewrite changes their positions. */
|
|
1108
|
-
invalidateGsapCache?: () => void;
|
|
1109
|
-
handleDomZIndexReorderCommitRef?: MutableRefObject<TimelineZIndexReorderCommit | null>;
|
|
1110
|
-
/** Refuses a hand edit at the persist boundary when set; absent = Studio unchanged. */
|
|
1111
|
-
canEdit?: CanEditTimelineElement;
|
|
1112
|
-
}
|
|
1113
|
-
/** What a timeline move commits: the new start and track, plus the z-index
|
|
1114
|
-
* reorder a vertical drag resolves to (absent for a pure horizontal move). */
|
|
1115
|
-
type TimelineMoveUpdates = Pick<TimelineElement, "start" | "track"> & {
|
|
1116
|
-
stackingReorder?: TimelineStackingReorderIntent | null;
|
|
1117
|
-
};
|
|
1118
|
-
|
|
1119
|
-
interface TimelineGroupMoveChange {
|
|
1120
|
-
element: TimelineElement;
|
|
1121
|
-
start: number;
|
|
1122
|
-
track?: number;
|
|
1123
|
-
}
|
|
1124
|
-
interface TimelineGroupResizeChange {
|
|
1125
|
-
element: TimelineElement;
|
|
1126
|
-
start: number;
|
|
1127
|
-
duration: number;
|
|
1128
|
-
playbackStart?: number;
|
|
1129
|
-
}
|
|
1130
|
-
interface TimelineGroupCommitOptions {
|
|
1131
|
-
beforeTiming?: Promise<void>;
|
|
1132
|
-
coalesceKey?: string;
|
|
1133
|
-
/** Per-entry undo coalesce window override (ms) — see EditHistoryEntry.coalesceMs. */
|
|
1134
|
-
coalesceMs?: number;
|
|
1135
|
-
/** Overrides the default "Move timeline clips" undo-history label. Coalescing
|
|
1136
|
-
* keeps the LAST entry's label (editHistory.ts), so a mechanical follow-up
|
|
1137
|
-
* move folded into another gesture's coalesceKey (e.g. the ripple after a
|
|
1138
|
-
* delete) should carry that gesture's own label, not its own. */
|
|
1139
|
-
label?: string;
|
|
1140
|
-
/** Skips this call's own generic failure toast (the error is still logged
|
|
1141
|
-
* to the console) — for a caller that shows its own more specific message
|
|
1142
|
-
* on the same failure, so the user isn't told about one action twice. */
|
|
1143
|
-
suppressFailureToast?: boolean;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
983
|
type TimelineMoveOperation = "timing" | "lane-reorder" | "track-insert";
|
|
1147
984
|
|
|
1148
985
|
interface TimelineKeyframeTarget {
|
|
@@ -1912,236 +1749,4 @@ declare function findElementBlock(html: string, elementId: string): {
|
|
|
1912
1749
|
isSelfClosing: boolean;
|
|
1913
1750
|
} | null;
|
|
1914
1751
|
|
|
1915
|
-
|
|
1916
|
-
get(projectId: string): Promise<EditHistoryState | null>;
|
|
1917
|
-
set(projectId: string, state: EditHistoryState): Promise<void>;
|
|
1918
|
-
delete(projectId: string): Promise<void>;
|
|
1919
|
-
}
|
|
1920
|
-
|
|
1921
|
-
interface RecordEditInput {
|
|
1922
|
-
label: string;
|
|
1923
|
-
kind: EditHistoryKind;
|
|
1924
|
-
coalesceKey?: string;
|
|
1925
|
-
coalesceMs?: number;
|
|
1926
|
-
files: BuildEditHistoryEntryInput["files"];
|
|
1927
|
-
}
|
|
1928
|
-
interface ApplyCallbacks {
|
|
1929
|
-
readFile: (path: string) => Promise<string>;
|
|
1930
|
-
writeFile: (path: string, content: string) => Promise<void>;
|
|
1931
|
-
serialize?: <T>(paths: readonly string[], task: () => Promise<T>) => Promise<T>;
|
|
1932
|
-
}
|
|
1933
|
-
interface UsePersistentEditHistoryOptions {
|
|
1934
|
-
projectId: string | null;
|
|
1935
|
-
storage?: EditHistoryStorageAdapter;
|
|
1936
|
-
now?: () => number;
|
|
1937
|
-
}
|
|
1938
|
-
/**
|
|
1939
|
-
* Per-file content the restore just applied. `restored` is the bytes written to
|
|
1940
|
-
* disk (the undo/redo target); `previous` is what was on disk immediately before
|
|
1941
|
-
* (the current live preview state). The undo preview-sync diffs these to decide
|
|
1942
|
-
* whether the restore is soft-reloadable (attributes/style/GSAP-script only) or
|
|
1943
|
-
* needs a full iframe reload.
|
|
1944
|
-
*/
|
|
1945
|
-
interface ApplyRestoredFile {
|
|
1946
|
-
previous: string;
|
|
1947
|
-
restored: string;
|
|
1948
|
-
}
|
|
1949
|
-
interface ApplyResult {
|
|
1950
|
-
ok: boolean;
|
|
1951
|
-
reason?: "empty" | "content-mismatch";
|
|
1952
|
-
label?: string;
|
|
1953
|
-
paths?: string[];
|
|
1954
|
-
files?: Record<string, ApplyRestoredFile>;
|
|
1955
|
-
}
|
|
1956
|
-
declare function usePersistentEditHistory(options: UsePersistentEditHistoryOptions): {
|
|
1957
|
-
recordEdit: (input: RecordEditInput) => Promise<void>;
|
|
1958
|
-
undo: (callbacks: ApplyCallbacks) => Promise<ApplyResult>;
|
|
1959
|
-
redo: (callbacks: ApplyCallbacks) => Promise<ApplyResult>;
|
|
1960
|
-
canUndo: boolean;
|
|
1961
|
-
canRedo: boolean;
|
|
1962
|
-
undoLabel: string;
|
|
1963
|
-
redoLabel: string;
|
|
1964
|
-
undoPaths: string[];
|
|
1965
|
-
redoPaths: string[];
|
|
1966
|
-
state: EditHistoryState;
|
|
1967
|
-
loaded: boolean;
|
|
1968
|
-
};
|
|
1969
|
-
|
|
1970
|
-
declare function useTimelineEditing({ projectId, activeCompPath, timelineElements, showToast, writeProjectFile, observeProjectFileVersion, recordEdit, reloadPreview, previewIframeRef, pendingTimelineEditPathRef, uploadProjectFiles, isRecordingRef, sdkSession, publishSdkSession, forceReloadSdkSession, invalidateGsapCache, handleDomZIndexReorderCommitRef, canEdit, }: UseTimelineEditingOptions): {
|
|
1971
|
-
handleTimelineElementMove: (element: TimelineElement, updates: TimelineMoveUpdates) => Promise<void>;
|
|
1972
|
-
handleTimelineElementResize: (element: TimelineElement, updates: Pick<TimelineElement, "start" | "duration" | "playbackStart">) => Promise<void>;
|
|
1973
|
-
handleToggleTrackHidden: (track: number, hidden: boolean, displayNumber?: number | null | undefined) => Promise<void>;
|
|
1974
|
-
handleToggleElementHidden: (elementKey: string | readonly string[], hidden: boolean) => Promise<void>;
|
|
1975
|
-
handleAutoGroupCarveSources: (clipIds: readonly string[], groupId: string, groupLabel?: string | undefined) => Promise<void>;
|
|
1976
|
-
setAudioGroupAttribute: {
|
|
1977
|
-
setQuiet: (groupId: string, attr: string, value: string | null, label: string) => Promise<void>;
|
|
1978
|
-
setLive: (groupId: string, attr: string, value: string | null) => void;
|
|
1979
|
-
};
|
|
1980
|
-
setElementFxAttribute: {
|
|
1981
|
-
setQuiet: (element: TimelineElement, attr: string, value: string | null, label: string) => Promise<void>;
|
|
1982
|
-
setLive: (element: TimelineElement, attr: string, value: string | null) => void;
|
|
1983
|
-
};
|
|
1984
|
-
handleTimelineElementDelete: (element: TimelineElement) => Promise<void>;
|
|
1985
|
-
handleTimelineElementsDelete: (selection: TimelineElement[]) => Promise<void>;
|
|
1986
|
-
handleTimelineElementSplit: (element: TimelineElement, splitTime: number) => Promise<void>;
|
|
1987
|
-
handleRazorSplit: (element: TimelineElement, splitTime: number) => Promise<void>;
|
|
1988
|
-
handleRazorSplitAll: (splitTime: number) => Promise<void>;
|
|
1989
|
-
handleTimelineAssetDrop: (assetPath: string, placement: TimelineDropPlacement, durationOverride?: number | undefined) => Promise<void>;
|
|
1990
|
-
handleTimelineFileDrop: (files: File[], placement?: TimelineDropPlacement | undefined) => Promise<void>;
|
|
1991
|
-
handleTimelineCompositionDrop: (sourcePath: string, placement: Pick<TimelineElement, "track" | "start">) => Promise<void>;
|
|
1992
|
-
handleBlockedTimelineEdit: (element: TimelineElement) => void;
|
|
1993
|
-
handleTimelineGroupMove: (changes: TimelineGroupMoveChange[], options?: TimelineGroupCommitOptions | undefined) => Promise<void>;
|
|
1994
|
-
handleTimelineGroupResize: (changes: TimelineGroupResizeChange[], options?: TimelineGroupCommitOptions | undefined) => Promise<void>;
|
|
1995
|
-
};
|
|
1996
|
-
|
|
1997
|
-
declare class StudioSaveHttpError extends Error {
|
|
1998
|
-
readonly statusCode: number;
|
|
1999
|
-
readonly alreadyToasted: boolean;
|
|
2000
|
-
constructor(message: string, statusCode: number, options?: {
|
|
2001
|
-
alreadyToasted?: boolean;
|
|
2002
|
-
});
|
|
2003
|
-
}
|
|
2004
|
-
declare class StudioFileConflictError extends StudioSaveHttpError {
|
|
2005
|
-
readonly filePath: string;
|
|
2006
|
-
readonly currentVersion: string | null;
|
|
2007
|
-
readonly currentContent: string | null;
|
|
2008
|
-
readonly attemptedContent: string;
|
|
2009
|
-
constructor(input: {
|
|
2010
|
-
filePath: string;
|
|
2011
|
-
currentVersion: string | null;
|
|
2012
|
-
currentContent: string | null;
|
|
2013
|
-
attemptedContent: string;
|
|
2014
|
-
});
|
|
2015
|
-
}
|
|
2016
|
-
type StudioSaveDrainResult<Failure = unknown> = {
|
|
2017
|
-
status: "clean";
|
|
2018
|
-
} | {
|
|
2019
|
-
status: "conflict";
|
|
2020
|
-
error: StudioFileConflictError;
|
|
2021
|
-
} | {
|
|
2022
|
-
status: "failed";
|
|
2023
|
-
error: Failure;
|
|
2024
|
-
};
|
|
2025
|
-
|
|
2026
|
-
type StudioPendingEditsDrainResult = StudioSaveDrainResult;
|
|
2027
|
-
declare function flushStudioPendingEdits(): Promise<StudioPendingEditsDrainResult>;
|
|
2028
|
-
|
|
2029
|
-
interface HistoryResult {
|
|
2030
|
-
ok: boolean;
|
|
2031
|
-
reason?: string;
|
|
2032
|
-
label?: string;
|
|
2033
|
-
paths?: string[];
|
|
2034
|
-
/** Per-file restored/previous content, used to soft-apply the preview. */
|
|
2035
|
-
files?: Record<string, {
|
|
2036
|
-
previous: string;
|
|
2037
|
-
restored: string;
|
|
2038
|
-
}>;
|
|
2039
|
-
}
|
|
2040
|
-
interface HistoryFileCallbacks {
|
|
2041
|
-
readFile: (path: string) => Promise<string>;
|
|
2042
|
-
writeFile: (path: string, content: string) => Promise<void>;
|
|
2043
|
-
serialize?: <T>(paths: readonly string[], task: () => Promise<T>) => Promise<T>;
|
|
2044
|
-
}
|
|
2045
|
-
interface EditHistoryHandle {
|
|
2046
|
-
undo: (cb: HistoryFileCallbacks) => Promise<HistoryResult>;
|
|
2047
|
-
redo: (cb: HistoryFileCallbacks) => Promise<HistoryResult>;
|
|
2048
|
-
state: {
|
|
2049
|
-
undo: ReadonlyArray<{
|
|
2050
|
-
createdAt: number;
|
|
2051
|
-
}>;
|
|
2052
|
-
redo: ReadonlyArray<{
|
|
2053
|
-
createdAt: number;
|
|
2054
|
-
}>;
|
|
2055
|
-
};
|
|
2056
|
-
}
|
|
2057
|
-
interface UseEditHistoryActionsOptions {
|
|
2058
|
-
editHistory: Pick<EditHistoryHandle, "undo" | "redo">;
|
|
2059
|
-
readOptionalProjectFile: (path: string) => Promise<string>;
|
|
2060
|
-
readProjectFile: (path: string) => Promise<string>;
|
|
2061
|
-
writeProjectFile: (path: string, content: string) => Promise<void>;
|
|
2062
|
-
showToast: (message: string, tone?: "error" | "info") => void;
|
|
2063
|
-
syncHistoryPreviewAfterApply: (restore: Pick<HistoryResult, "paths" | "files">) => Promise<void>;
|
|
2064
|
-
waitForPendingDomEditSaves: () => Promise<void>;
|
|
2065
|
-
onAfterUndoRedo?: () => void;
|
|
2066
|
-
/** Active composition path — decides whether undo/redo must resync the SDK session. */
|
|
2067
|
-
activeCompPath?: string | null;
|
|
2068
|
-
/** Reloads the SDK session after a revert of the active comp, past the self-write suppress window. */
|
|
2069
|
-
forceReloadSdkSession?: () => void;
|
|
2070
|
-
}
|
|
2071
|
-
/** Applies one persisted file-history step: the single owner of undo/redo over project files. */
|
|
2072
|
-
declare function useEditHistoryActions({ editHistory, readOptionalProjectFile, readProjectFile, writeProjectFile, showToast, syncHistoryPreviewAfterApply, waitForPendingDomEditSaves, onAfterUndoRedo, activeCompPath, forceReloadSdkSession, }: UseEditHistoryActionsOptions): {
|
|
2073
|
-
undo: () => Promise<void>;
|
|
2074
|
-
redo: () => Promise<void>;
|
|
2075
|
-
};
|
|
2076
|
-
|
|
2077
|
-
interface UseProjectFileWriterOptions {
|
|
2078
|
-
projectId: string | null;
|
|
2079
|
-
}
|
|
2080
|
-
declare function useProjectFileWriter({ projectId }: UseProjectFileWriterOptions): {
|
|
2081
|
-
fileVersions: Map<string, string | null>;
|
|
2082
|
-
readProjectFile: (path: string) => Promise<string>;
|
|
2083
|
-
writeProjectFile: (path: string, content: string, expectedContent?: string) => Promise<void>;
|
|
2084
|
-
readOptionalProjectFile: (path: string) => Promise<string>;
|
|
2085
|
-
observeProjectFileVersion: (path: string, version: string | null) => void;
|
|
2086
|
-
};
|
|
2087
|
-
|
|
2088
|
-
type ExternalFileChangeBlockedState = {
|
|
2089
|
-
status: "conflict";
|
|
2090
|
-
generation: number;
|
|
2091
|
-
error: StudioFileConflictError;
|
|
2092
|
-
payload: unknown;
|
|
2093
|
-
} | {
|
|
2094
|
-
status: "failed";
|
|
2095
|
-
generation: number;
|
|
2096
|
-
path: string;
|
|
2097
|
-
error: unknown;
|
|
2098
|
-
payload: unknown;
|
|
2099
|
-
studioContent: string | null;
|
|
2100
|
-
recovered: boolean;
|
|
2101
|
-
};
|
|
2102
|
-
interface ExternalFileChangeCoordinatorHandle {
|
|
2103
|
-
blocked: ExternalFileChangeBlockedState | null;
|
|
2104
|
-
retry: () => Promise<void>;
|
|
2105
|
-
useExternalFile: () => Promise<void>;
|
|
2106
|
-
keepStudioFile: () => Promise<void>;
|
|
2107
|
-
}
|
|
2108
|
-
|
|
2109
|
-
declare function ExternalFileConflictBanner({ coordinator, }: {
|
|
2110
|
-
coordinator: ExternalFileChangeCoordinatorHandle;
|
|
2111
|
-
}): react_jsx_runtime.JSX.Element | null;
|
|
2112
|
-
|
|
2113
|
-
interface TimelinePaneProps {
|
|
2114
|
-
/** Slot rendered above the timeline tracks (toolbar with split, delete, zoom) */
|
|
2115
|
-
timelineToolbar?: ReactNode;
|
|
2116
|
-
/** Slot rendered below the timeline tracks */
|
|
2117
|
-
timelineFooter?: ReactNode;
|
|
2118
|
-
/** Slot for a host's own overlay spanning the whole timeline area (e.g. a draft/ghost
|
|
2119
|
-
* clip), positioned absolutely the same way PreviewPane's previewOverlay is. */
|
|
2120
|
-
timelineOverlay?: ReactNode;
|
|
2121
|
-
/** Custom clip content renderer for timeline (thumbnails, waveforms, etc.) */
|
|
2122
|
-
renderClipContent?: (element: TimelineElement, style: {
|
|
2123
|
-
clip: string;
|
|
2124
|
-
label: string;
|
|
2125
|
-
}) => ReactNode;
|
|
2126
|
-
onFileDrop?: (files: File[], placement?: Pick<TimelineElement, "start" | "track">) => Promise<void> | void;
|
|
2127
|
-
onDeleteElement?: (element: TimelineElement) => Promise<void> | void;
|
|
2128
|
-
onAssetDrop?: (assetPath: string, placement: Pick<TimelineElement, "start" | "track">) => Promise<void> | void;
|
|
2129
|
-
onBlockDrop?: (blockName: string, placement: Pick<TimelineElement, "start" | "track">) => Promise<void> | void;
|
|
2130
|
-
onCompositionDrop?: (sourcePath: string, placement: Pick<TimelineElement, "start" | "track">) => Promise<void> | void;
|
|
2131
|
-
onBlockedEditAttempt?: (element: TimelineElement, intent: BlockedTimelineEditIntent) => void;
|
|
2132
|
-
onSelectTimelineElement?: (element: TimelineElement | null) => void;
|
|
2133
|
-
/** Copy/paste/duplicate act on the store's own selection, not a passed
|
|
2134
|
-
* element, so unlike onDeleteElement they need no composition-basis wrapper. */
|
|
2135
|
-
onCopyClip?: () => boolean;
|
|
2136
|
-
onPasteClip?: () => Promise<void>;
|
|
2137
|
-
onDuplicateClip?: () => Promise<boolean>;
|
|
2138
|
-
canPasteClip?: () => boolean;
|
|
2139
|
-
}
|
|
2140
|
-
declare function TimelinePane({ timelineToolbar, timelineFooter, timelineOverlay, renderClipContent, onFileDrop, onDeleteElement, onAssetDrop, onBlockDrop, onCompositionDrop, onBlockedEditAttempt, onSelectTimelineElement, onCopyClip, onPasteClip, onDuplicateClip, canPasteClip, }: TimelinePaneProps): react_jsx_runtime.JSX.Element;
|
|
2141
|
-
|
|
2142
|
-
declare function TimelineEditProvider({ value, children, }: {
|
|
2143
|
-
value: TimelineEditCallbacks;
|
|
2144
|
-
children: ReactNode;
|
|
2145
|
-
}): react_jsx_runtime.JSX.Element;
|
|
2146
|
-
|
|
2147
|
-
export { type AgentModalAnchorPoint, type AgentPromptElementInfo, AskAgentModal, type AskAgentModalProps, type BlockedTimelineEditIntent, Button, type ButtonSize, type ButtonVariant, type CanEditTimelineElement, CompositionBreadcrumb, type CompositionDimensions, type CompositionLevel, CompositionThumbnail, ContextMenu, type EditHistoryHandle, EditorShell, type EditorShellProps, type ExternalFileChangeBlockedState, type ExternalFileChangeCoordinatorHandle, ExternalFileConflictBanner, type FfmpegStatus, FileTree, IconButton, Input, type InputProps, Menu, MenuItem, type MenuItemTone, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, NLEPreview, NumberField, type NumberFieldProps, type PatchOperation, type PersistedRenderSettings, type PickedElement, Player, PlayerControls, Popover, type PopupPreviewState, type DomEditCompositionRect as PreviewCompositionRect, type PreviewState, PropertyPanel, type RenderJob, RenderQueue, type RenderQueueProps, type ResolutionPreset, Select, type SelectOption, type SelectProps, Slider, type SliderProps, SourceEditor, type StartRenderOptions, StudioApp, StudioFileConflictError, type StudioPendingEditsDrainResult, Tab, TabPanel, Tabs, TabsList, Timeline, type TimelineEditCallbacks, type TimelineEditPermission, TimelineEditProvider, type TimelineElement, TimelinePane, type TimelinePaneProps, Toggle, type ToggleProps, Tooltip, type UseEditHistoryActionsOptions, type UsePersistentEditHistoryOptions, type UseProjectFileWriterOptions, type UseTimelineEditingOptions, VideoThumbnail, applyPatch, buildPickerAgentContextPreview, buildPickerAgentPrompt, buttonBase, buttonVariants, cn, fieldBase, fieldText, findElementBlock, flushStudioPendingEdits, formatTime, getPersistedRenderSettings, liveTime, mergeStyleIntoTag, parseStyleString, persistRenderSettings, popupSurface, resolveIframe, resolveSourceFile, useEditHistoryActions, useElementPicker, usePersistentEditHistory, usePlayerStore, usePreviewCompositionRect, useProjectFileWriter, useRenderQueue, useTimelineEditing, useTimelinePlayer };
|
|
1752
|
+
export { type AgentModalAnchorPoint, type AgentPromptElementInfo, AskAgentModal, type AskAgentModalProps, Button, type ButtonSize, type ButtonVariant, CompositionBreadcrumb, type CompositionDimensions, type CompositionLevel, CompositionThumbnail, ContextMenu, EditorShell, type EditorShellProps, type FfmpegStatus, FileTree, HyperframesLogo, IconButton, Input, type InputProps, Menu, MenuItem, type MenuItemTone, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, NLEPreview, NumberField, type NumberFieldProps, type PatchOperation, type PersistedRenderSettings, type PickedElement, Player, PlayerControls, Popover, type PopupPreviewState, type DomEditCompositionRect as PreviewCompositionRect, type PreviewState, PropertyPanel, type RenderJob, RenderQueue, type RenderQueueProps, type ResolutionPreset, Select, type SelectOption, type SelectProps, Slider, type SliderProps, SourceEditor, type StartRenderOptions, StudioApp, Tab, TabPanel, Tabs, TabsList, Timeline, type TimelineElement, Toggle, type ToggleProps, Tooltip, VideoThumbnail, applyPatch, buildPickerAgentContextPreview, buildPickerAgentPrompt, buttonBase, buttonSizes, buttonVariants, cn, fieldBase, fieldText, findElementBlock, formatTime, getPersistedRenderSettings, liveTime, mergeStyleIntoTag, parseStyleString, persistRenderSettings, popupSurface, resolveIframe, resolveSourceFile, useElementPicker, usePlayerStore, usePreviewCompositionRect, useRenderQueue, useTimelinePlayer };
|
package/dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
7
7
|
<title>HyperFrames Studio</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-HfP3sap2.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DrHQAuGO.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div data-hf-id="hf-aph5" id="root"></div>
|