hyperframes 0.8.88 → 0.8.90
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/{add-6EIX4VO2.js → add-QCKUCHLO.js} +5 -5
- package/dist/{asset-BYFQENI4.js → asset-X5G7FLIA.js} +2 -2
- package/dist/{auth-CNYWEFA6.js → auth-HUTOY6UC.js} +1 -1
- package/dist/{autoUpdate-FN4SJBTE.js → autoUpdate-GVXUAVME.js} +2 -2
- package/dist/{backgroundChecks-ODS4VEB5.js → backgroundChecks-DP64TQBS.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{beats-RTVNXBLK.js → beats-2BAVXPN4.js} +4 -4
- package/dist/{benchmark-KKPDM7PU.js → benchmark-AXEIQN5S.js} +5 -5
- package/dist/{browser-ADH34IWX.js → browser-GOL5PWIJ.js} +3 -3
- package/dist/{catalog-5NIRSEF7.js → catalog-UDASP3IK.js} +5 -5
- package/dist/{check-PRVHJKEC.js → check-IMDTJ2RH.js} +12 -12
- package/dist/{checkBrowser-CY3FMWQV.js → checkBrowser-OCN4Z4FT.js} +10 -10
- package/dist/{chunk-UP5KFGFZ.js → chunk-4HDAVJMN.js} +2 -2
- package/dist/{chunk-ZDAF2XYX.js → chunk-6QBQPTRJ.js} +2 -2
- package/dist/{chunk-DDXTUSZ3.js → chunk-77SYQXQN.js} +2 -2
- package/dist/{chunk-XDDHE52R.js → chunk-AAW5AF54.js} +2 -2
- package/dist/{chunk-MIYTJ6RX.js → chunk-CYG65ZCX.js} +12 -4
- package/dist/{chunk-BM25TRQX.js → chunk-DGPMOHUO.js} +3 -3
- package/dist/{chunk-6BPWGLCF.js → chunk-FPWCGP7T.js} +1 -1
- package/dist/{chunk-UX3MPYCP.js → chunk-GK6OCEV7.js} +2 -2
- package/dist/{chunk-ICWOWWC6.js → chunk-GSWG25MG.js} +1 -1
- package/dist/{chunk-RXRF3N5D.js → chunk-GVHRNT6C.js} +1 -1
- package/dist/{chunk-AV7ASJOK.js → chunk-KGDCJK72.js} +1 -1
- package/dist/{chunk-F6D4LJQG.js → chunk-KRXGOOP3.js} +1 -1
- package/dist/{chunk-VGS3ZUDB.js → chunk-OV4CCBM3.js} +1 -1
- package/dist/{chunk-4ARA5OTM.js → chunk-PQ3I6CAC.js} +1 -1
- package/dist/{chunk-I7MD2PC7.js → chunk-TQGNT45W.js} +1 -1
- package/dist/{chunk-RIEQ7B3Q.js → chunk-U325D5ZG.js} +1 -1
- package/dist/{chunk-Q2FGKCVO.js → chunk-WRZG77MO.js} +3 -3
- package/dist/{chunk-2KCIKXV3.js → chunk-YQ5SWLDS.js} +2 -2
- package/dist/{clean-ILEUS4I4.js → clean-F7NNEFPY.js} +4 -4
- package/dist/cli.js +44 -44
- package/dist/{cloud-YKZ6FMFO.js → cloud-GSFIMHVY.js} +4 -4
- package/dist/{compare-A7HXMQA2.js → compare-26UBKHZI.js} +7 -7
- package/dist/{component-GSYJQJH2.js → component-5QG3ILQS.js} +3 -3
- package/dist/{compositions-4K3YFH25.js → compositions-IFRNCQ5G.js} +5 -5
- package/dist/{delete-5R7CYMLA.js → delete-Z2L6F346.js} +2 -2
- package/dist/{doctor-HGGU5EPV.js → doctor-WLSP4XWV.js} +3 -3
- package/dist/{events-CT5MGBWG.js → events-FERXZJ74.js} +3 -3
- package/dist/{events-RQHXK2BA.js → events-SFI5FAYU.js} +2 -2
- package/dist/{feedback-S5TP76SF.js → feedback-6ZIZEN2J.js} +4 -4
- package/dist/{figma-JVTSWBQC.js → figma-OKUQYGPU.js} +3 -3
- package/dist/fontLocalizeCli.js +1 -1
- package/dist/{get-B6QNBIOY.js → get-JFVMDJ4K.js} +2 -2
- package/dist/{grade-compare-53VJQ6AR.js → grade-compare-TGVT536U.js} +7 -7
- package/dist/{help-74I7OBNZ.js → help-JHJAEATI.js} +1 -1
- package/dist/{history-JAICBG5J.js → history-IKW2UMZJ.js} +6 -6
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-DPLY233F.js → info-GOMASHNG.js} +5 -5
- package/dist/{init-GH473WVQ.js → init-VHK4JK2I.js} +6 -6
- package/dist/{inspect-ALZBOAVC.js → inspect-NR4M3D3O.js} +9 -9
- package/dist/{keyframes-3IHD4566.js → keyframes-4Z6UHXTR.js} +6 -6
- package/dist/{layout-DIE6IDNL.js → layout-F5STB2UB.js} +9 -9
- package/dist/{lint-BK7RM2VI.js → lint-XIKDK5NE.js} +6 -6
- package/dist/{list-IETRGPUL.js → list-PV5AVDEA.js} +2 -2
- package/dist/{login-6MOHVUEO.js → login-4JVYU5EP.js} +4 -4
- package/dist/{media-treatment-GLTDA25U.js → media-treatment-DQWRIN3R.js} +5 -5
- package/dist/{motionShot-J2Q4CGMA.js → motionShot-F7PMQYSA.js} +1 -1
- package/dist/{normalize-audio-225AHD54.js → normalize-audio-AVLP7MKR.js} +4 -4
- package/dist/{play-N2G5Z7OL.js → play-4GAAK5T4.js} +7 -7
- package/dist/{present-TVY4QRSP.js → present-WIRBZKR2.js} +7 -7
- package/dist/{preview-H5D4G6V6.js → preview-NUQRYW6F.js} +5 -5
- package/dist/{render-LDKZKOVA.js → render-LUZG33CD.js} +5 -5
- package/dist/{render-JDBG7432.js → render-MDIGXG66.js} +5 -5
- package/dist/skills/media-use/audio/references/bgm.md +2 -0
- package/dist/skills/media-use/audio/references/sfx.md +2 -3
- package/dist/skills/media-use/audio/references/tts.md +1 -1
- package/dist/skills/media-use/audio/scripts/audio.mjs +5 -2
- package/dist/skills/media-use/audio/scripts/audio.test.mjs +61 -8
- package/dist/skills/media-use/audio/scripts/gemini-pipeline.test.mjs +14 -3
- package/dist/skills/media-use/audio/scripts/lib/bgm.mjs +8 -4
- package/dist/skills/media-use/audio/scripts/lib/bgm.test.mjs +45 -1
- package/dist/skills/media-use/audio/scripts/lib/media-record.mjs +43 -2
- package/dist/skills/media-use/audio/scripts/lib/media-record.test.mjs +54 -2
- package/dist/skills/media-use/audio/scripts/lib/sfx.mjs +36 -17
- package/dist/skills/media-use/audio/scripts/lib/sfx.test.mjs +53 -1
- package/dist/skills/media-use/scripts/lib/manifest.mjs +3 -0
- package/dist/skills/media-use/scripts/resolve.mjs +4 -4
- package/dist/{skills-QWPGK2MN.js → skills-YZOZUC2R.js} +5 -5
- package/dist/{skillsUpdateCheck-JY23Q7EF.js → skillsUpdateCheck-V2MIGABK.js} +3 -3
- package/dist/{snapshot-HCLMYOWI.js → snapshot-DEKOD4F6.js} +7 -7
- package/dist/{staticProjectServer-VPVGLNV2.js → staticProjectServer-JSX6RZC3.js} +3 -3
- package/dist/studio/assets/{hyperframes-player-w3Bbv0kd.js → hyperframes-player-DDjER_ii.js} +1 -1
- package/dist/studio/assets/{index-DldknZPp.js → index-5SFeUXP8.js} +1 -1
- package/dist/studio/assets/{index-DE6cZYR5.js → index-BKE3_N4v.js} +180 -180
- package/dist/studio/assets/{index-B6PGJTzp.js → index-CVsCxnlz.js} +1 -1
- package/dist/studio/index.d.ts +39 -5
- package/dist/studio/index.html +1 -1
- package/dist/studio/index.js +156 -65
- package/dist/studio/index.js.map +1 -1
- package/dist/{studio-api-6YLFY6OJ.js → studio-api-JLNPQ3TO.js} +1 -1
- package/dist/{studioServer-LZDGVKYT.js → studioServer-ZCL433KM.js} +8 -5
- package/dist/{telemetry-Z3RLGWGK.js → telemetry-RPKG2UZI.js} +3 -3
- package/dist/{timeline-WOKBCYLM.js → timeline-DUIEKLUY.js} +6 -6
- package/dist/{tokens-RTP2IROL.js → tokens-KPHKWWZ6.js} +2 -2
- package/dist/{transcribe-ASVWZ3GP.js → transcribe-TNYWMNAY.js} +3 -3
- package/dist/{updateCheck-5LM5GJCF.js → updateCheck-PBVAHMGC.js} +2 -2
- package/dist/{upgrade-YWWAFHLF.js → upgrade-CFBD6XYU.js} +2 -2
- package/dist/{validate-EWNJ4VOI.js → validate-INYRDUJN.js} +6 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as P}from"./index-
|
|
1
|
+
import{g as P}from"./index-BKE3_N4v.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/studio/index.d.ts
CHANGED
|
@@ -3348,18 +3348,18 @@ interface DomEditOverlayProps {
|
|
|
3348
3348
|
y: number;
|
|
3349
3349
|
}, modifiers?: {
|
|
3350
3350
|
altKey?: boolean;
|
|
3351
|
-
}) => Promise<
|
|
3352
|
-
onGroupPathOffsetCommit: (updates: DomEditGroupPathOffsetCommit[]) => Promise<
|
|
3351
|
+
}) => Promise<unknown> | void;
|
|
3352
|
+
onGroupPathOffsetCommit: (updates: DomEditGroupPathOffsetCommit[]) => Promise<unknown> | void;
|
|
3353
3353
|
onBoxSizeCommit: (selection: DomEditSelection, next: {
|
|
3354
3354
|
width: number;
|
|
3355
3355
|
height: number;
|
|
3356
3356
|
}, offset?: {
|
|
3357
3357
|
x: number;
|
|
3358
3358
|
y: number;
|
|
3359
|
-
}, restore?: () => void) => Promise<
|
|
3359
|
+
}, restore?: () => void) => Promise<unknown> | void;
|
|
3360
3360
|
onRotationCommit: (selection: DomEditSelection, next: {
|
|
3361
3361
|
angle: number;
|
|
3362
|
-
}) => Promise<
|
|
3362
|
+
}) => Promise<unknown> | void;
|
|
3363
3363
|
onStyleCommit?: (property: string, value: string) => Promise<unknown> | void;
|
|
3364
3364
|
recordingState?: GestureRecordingState;
|
|
3365
3365
|
onToggleRecording?: () => void;
|
|
@@ -3421,6 +3421,40 @@ declare function useDomStyleCommit({ projectId, iframeRef, writeProjectFile, rec
|
|
|
3421
3421
|
waitForPendingSaves: () => Promise<DomEditSaveDrainResult>;
|
|
3422
3422
|
};
|
|
3423
3423
|
|
|
3424
|
+
/**
|
|
3425
|
+
* Studio's `Player` must show the project, with `beginTimelineSession(projectId)` run before it
|
|
3426
|
+
* mounts; drain `waitForPendingSaves` before switching projects.
|
|
3427
|
+
*/
|
|
3428
|
+
interface UseDomGeometryCommitOptions extends UseDomStyleCommitOptions {
|
|
3429
|
+
/** Called when a save cannot patch the preview in place; defaults to reloading the iframe. */
|
|
3430
|
+
reloadPreview?: () => void;
|
|
3431
|
+
}
|
|
3432
|
+
interface DomGeometryCommits {
|
|
3433
|
+
commitPathOffset: (selection: DomEditSelection, next: {
|
|
3434
|
+
x: number;
|
|
3435
|
+
y: number;
|
|
3436
|
+
}, modifiers?: {
|
|
3437
|
+
altKey?: boolean;
|
|
3438
|
+
}) => Promise<DomEditCommitOutcome>;
|
|
3439
|
+
commitGroupPathOffset: (updates: DomEditGroupPathOffsetCommit[]) => Promise<DomEditCommitOutcome>;
|
|
3440
|
+
commitBoxSize: (selection: DomEditSelection, next: {
|
|
3441
|
+
width: number;
|
|
3442
|
+
height: number;
|
|
3443
|
+
}, offset?: {
|
|
3444
|
+
x: number;
|
|
3445
|
+
y: number;
|
|
3446
|
+
}, restore?: () => void) => Promise<DomEditCommitOutcome>;
|
|
3447
|
+
commitRotation: (selection: DomEditSelection, next: {
|
|
3448
|
+
angle: number;
|
|
3449
|
+
}) => Promise<DomEditCommitOutcome>;
|
|
3450
|
+
waitForPendingSaves: () => Promise<void>;
|
|
3451
|
+
}
|
|
3452
|
+
/**
|
|
3453
|
+
* Saves canvas moves, resizes and rotations through Studio's own GSAP-aware commits, for a host
|
|
3454
|
+
* without the editor. A failed save rejects, so DomEditOverlay undoes the live gesture.
|
|
3455
|
+
*/
|
|
3456
|
+
declare function useDomGeometryCommit({ projectId, iframeRef, writeProjectFile, recordEdit, activeCompPath, showToast, reloadPreview, }: UseDomGeometryCommitOptions): DomGeometryCommits;
|
|
3457
|
+
|
|
3424
3458
|
interface MarqueeGesturesDeps<T = DomEditSelection> {
|
|
3425
3459
|
iframeRef: React.RefObject<HTMLIFrameElement | null>;
|
|
3426
3460
|
overlayRef: React.RefObject<HTMLDivElement | null>;
|
|
@@ -3463,4 +3497,4 @@ interface MarqueeOverlayProps {
|
|
|
3463
3497
|
*/
|
|
3464
3498
|
declare function MarqueeOverlay({ candidateRects, marqueeRect }: MarqueeOverlayProps): react_jsx_runtime.JSX.Element;
|
|
3465
3499
|
|
|
3466
|
-
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, type DomEditCapabilities, type DomEditCommitDeclineReason, type DomEditCommitOutcome, type DomEditGroupPathOffsetCommit, DomEditOverlay, type DomEditOverlayProps, DomEditProvider, type DomEditSelection, 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, NLEPreview, type PatchOperation, type PersistedRenderSettings, type PickedElement, PlayerControls, type PlayerHandle, type PlayerHandleElement, type PlayerHandleListener, type PlayerHandleTimeListener, type DomEditCompositionRect as PreviewCompositionRect, PreviewGuides, PreviewOverlayProvider, type PreviewOverlayProviderProps, PreviewReadOnlyProvider, type PreviewSnapPreferences, PropertyPanel, type RenderJob, RenderQueue, type RenderQueueProps, type ResolutionPreset, SNAP_THRESHOLD_PX, type ShortcutHint, type ShortcutSection, 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, StudioApp, StudioFileConflictError, type StudioPendingEditsDrainResult, type ThumbnailPriority, Timeline, TimelineClipMenu, 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 TimelineZIndexReorderCommit, type UseClipboardOptions, type UseDomEditSessionParams, type UseDomStyleCommitOptions, type UseEditHistoryActionsOptions, type UsePersistentEditHistoryOptions, type UsePreviewPersistenceParams, type UseProjectFileWriterOptions, type UseRenderClipContentOptions, type UseTimelineEditingOptions, VideoThumbnail, applyPatch, buildCompositionSnapTarget, buildGridSnapEdges, buildPickerAgentContextPreview, buildPickerAgentPrompt, collectSnapContext, extractSnapTargets, findElementBlock, flushStudioPendingEdits, formatTime, getPersistedRenderSettings, liveTime, mergeStyleIntoTag, parseStyleString, persistRenderSettings, resolveDomEditSelection, resolveEquidistanceGuides, resolveGuideLineRect, resolveIframe, resolveSnapAdjustment, resolveSourceFile, snapEngagedForTravel, useClipboard, useCompositionStack, useDomEditSelectionContext, useDomEditSession, useDomStyleCommit, useEditHistoryActions, useElementPicker, useMarqueeGestures, usePersistentEditHistory, usePlayerHandle, usePlayerStore, usePreviewCompositionRect, usePreviewGuidesStore, usePreviewOverlayContext, usePreviewPersistence, useProjectFileWriter, useRenderClipContent, useRenderQueue, useTimelineContext, useTimelineEditing, useTimelinePlayer };
|
|
3500
|
+
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, type DomEditCapabilities, type DomEditCommitDeclineReason, type DomEditCommitOutcome, type DomEditGroupPathOffsetCommit, DomEditOverlay, type DomEditOverlayProps, DomEditProvider, type DomEditSelection, 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, NLEPreview, type PatchOperation, type PersistedRenderSettings, type PickedElement, PlayerControls, type PlayerHandle, type PlayerHandleElement, type PlayerHandleListener, type PlayerHandleTimeListener, type DomEditCompositionRect as PreviewCompositionRect, PreviewGuides, PreviewOverlayProvider, type PreviewOverlayProviderProps, PreviewReadOnlyProvider, type PreviewSnapPreferences, PropertyPanel, type RenderJob, RenderQueue, type RenderQueueProps, type ResolutionPreset, SNAP_THRESHOLD_PX, type ShortcutHint, type ShortcutSection, 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, StudioApp, StudioFileConflictError, type StudioPendingEditsDrainResult, type ThumbnailPriority, Timeline, TimelineClipMenu, 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 TimelineZIndexReorderCommit, type UseClipboardOptions, type UseDomEditSessionParams, type UseDomGeometryCommitOptions, type UseDomStyleCommitOptions, type UseEditHistoryActionsOptions, type UsePersistentEditHistoryOptions, type UsePreviewPersistenceParams, type UseProjectFileWriterOptions, type UseRenderClipContentOptions, type UseTimelineEditingOptions, VideoThumbnail, applyPatch, buildCompositionSnapTarget, buildGridSnapEdges, buildPickerAgentContextPreview, buildPickerAgentPrompt, collectSnapContext, extractSnapTargets, findElementBlock, flushStudioPendingEdits, formatTime, getPersistedRenderSettings, liveTime, mergeStyleIntoTag, parseStyleString, persistRenderSettings, resolveDomEditSelection, resolveEquidistanceGuides, resolveGuideLineRect, resolveIframe, resolveSnapAdjustment, resolveSourceFile, snapEngagedForTravel, useClipboard, useCompositionStack, useDomEditSelectionContext, useDomEditSession, useDomGeometryCommit, useDomStyleCommit, useEditHistoryActions, useElementPicker, useMarqueeGestures, usePersistentEditHistory, usePlayerHandle, usePlayerStore, usePreviewCompositionRect, usePreviewGuidesStore, usePreviewOverlayContext, usePreviewPersistence, useProjectFileWriter, useRenderClipContent, useRenderQueue, useTimelineContext, useTimelineEditing, useTimelinePlayer };
|
package/dist/studio/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
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-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-BKE3_N4v.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-Dx79V1Se.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dist/studio/index.js
CHANGED
|
@@ -25709,6 +25709,26 @@ function onPreviewContentReplaced(iframe, onReplaced) {
|
|
|
25709
25709
|
iframe.removeEventListener(SCENES_SWAPPED, onReplaced);
|
|
25710
25710
|
};
|
|
25711
25711
|
}
|
|
25712
|
+
function markScenesStale(iframe, files) {
|
|
25713
|
+
const doc = iframe?.contentDocument;
|
|
25714
|
+
const meta = doc?.querySelector('meta[name="hf-scene-parts"]');
|
|
25715
|
+
if (!doc || !meta) return;
|
|
25716
|
+
let parts;
|
|
25717
|
+
try {
|
|
25718
|
+
parts = JSON.parse(meta.content);
|
|
25719
|
+
} catch {
|
|
25720
|
+
return;
|
|
25721
|
+
}
|
|
25722
|
+
for (const file of files) {
|
|
25723
|
+
const hosts = doc.querySelectorAll(`[data-composition-file="${CSS.escape(file)}"]`);
|
|
25724
|
+
if (hosts.length === 0 && file.endsWith(".html")) parts.shared = "";
|
|
25725
|
+
for (const host of hosts) {
|
|
25726
|
+
const scene = host.closest("[data-hf-scene]")?.getAttribute("data-hf-scene");
|
|
25727
|
+
if (scene && scene in parts.scenes) parts.scenes[scene] = "";
|
|
25728
|
+
}
|
|
25729
|
+
}
|
|
25730
|
+
meta.content = JSON.stringify(parts);
|
|
25731
|
+
}
|
|
25712
25732
|
function sceneSwapFor(iframe) {
|
|
25713
25733
|
const win = iframe.contentWindow;
|
|
25714
25734
|
const swap = win?.__hfSwapScenes;
|
|
@@ -29406,24 +29426,6 @@ function resolvePreviewLocalPointer(iframe, doc, win, clientX, clientY) {
|
|
|
29406
29426
|
viewport: { width: rootWidth, height: rootHeight }
|
|
29407
29427
|
};
|
|
29408
29428
|
}
|
|
29409
|
-
var POINTER_EVENTS_OVERRIDE_ID = "__hf_studio_pointer_events_override__";
|
|
29410
|
-
function forcePointerEventsAuto(doc) {
|
|
29411
|
-
try {
|
|
29412
|
-
const style = doc.createElement("style");
|
|
29413
|
-
style.id = POINTER_EVENTS_OVERRIDE_ID;
|
|
29414
|
-
style.textContent = "* { pointer-events: auto !important; }";
|
|
29415
|
-
doc.head.appendChild(style);
|
|
29416
|
-
return style;
|
|
29417
|
-
} catch {
|
|
29418
|
-
return null;
|
|
29419
|
-
}
|
|
29420
|
-
}
|
|
29421
|
-
function removePointerEventsOverride(style) {
|
|
29422
|
-
try {
|
|
29423
|
-
style?.remove();
|
|
29424
|
-
} catch {
|
|
29425
|
-
}
|
|
29426
|
-
}
|
|
29427
29429
|
var pointerEventsInheritanceFallbackByDocument = /* @__PURE__ */ new WeakMap();
|
|
29428
29430
|
function needsPointerEventsInheritanceFallback(doc, win) {
|
|
29429
29431
|
const cached5 = pointerEventsInheritanceFallbackByDocument.get(doc);
|
|
@@ -29520,30 +29522,21 @@ function getPreviewTargetFromPointer(iframe, clientX, clientY, activeComposition
|
|
|
29520
29522
|
if (!doc || !win) return null;
|
|
29521
29523
|
const localPointer = resolvePreviewLocalPointer(iframe, doc, win, clientX, clientY);
|
|
29522
29524
|
if (!localPointer) return null;
|
|
29523
|
-
|
|
29524
|
-
|
|
29525
|
-
|
|
29526
|
-
|
|
29527
|
-
|
|
29528
|
-
|
|
29529
|
-
|
|
29530
|
-
|
|
29531
|
-
|
|
29532
|
-
|
|
29533
|
-
|
|
29534
|
-
|
|
29535
|
-
|
|
29536
|
-
|
|
29537
|
-
|
|
29538
|
-
const fallback = getEventTargetElement(doc.elementFromPoint(localPointer.x, localPointer.y));
|
|
29539
|
-
if (!fallback || !getDomLayerPatchTarget(fallback, activeCompositionPath)) return null;
|
|
29540
|
-
if (hasAuthorPointerEventsNone(fallback)) return null;
|
|
29541
|
-
if (!isElementComputedVisible(fallback)) return null;
|
|
29542
|
-
if (isFullBleedTarget(fallback, localPointer.viewport)) return null;
|
|
29543
|
-
return fallback;
|
|
29544
|
-
} finally {
|
|
29545
|
-
removePointerEventsOverride(overrideStyle);
|
|
29546
|
-
}
|
|
29525
|
+
if (typeof doc.elementsFromPoint === "function") {
|
|
29526
|
+
const elements = doc.elementsFromPoint(localPointer.x, localPointer.y);
|
|
29527
|
+
const candidates = filterAuthorInteractiveTargets(elements, activeCompositionPath);
|
|
29528
|
+
const visualTarget = candidates.find((el) => !isFullBleedTarget(el, localPointer.viewport)) ?? null;
|
|
29529
|
+
if (visualTarget) return visualTarget;
|
|
29530
|
+
}
|
|
29531
|
+
const groupHit = findGroupAtPoint(doc, localPointer.x, localPointer.y);
|
|
29532
|
+
if (groupHit && !hasAuthorPointerEventsNone(groupHit) && getDomLayerPatchTarget(groupHit, activeCompositionPath))
|
|
29533
|
+
return groupHit;
|
|
29534
|
+
const fallback = getEventTargetElement(doc.elementFromPoint(localPointer.x, localPointer.y));
|
|
29535
|
+
if (!fallback || !getDomLayerPatchTarget(fallback, activeCompositionPath)) return null;
|
|
29536
|
+
if (hasAuthorPointerEventsNone(fallback)) return null;
|
|
29537
|
+
if (!isElementComputedVisible(fallback)) return null;
|
|
29538
|
+
if (isFullBleedTarget(fallback, localPointer.viewport)) return null;
|
|
29539
|
+
return fallback;
|
|
29547
29540
|
}
|
|
29548
29541
|
function getAllPreviewTargetsFromPointer(iframe, clientX, clientY, activeCompositionPath) {
|
|
29549
29542
|
let doc = null;
|
|
@@ -29557,27 +29550,18 @@ function getAllPreviewTargetsFromPointer(iframe, clientX, clientY, activeComposi
|
|
|
29557
29550
|
if (!doc || !win) return [];
|
|
29558
29551
|
const localPointer = resolvePreviewLocalPointer(iframe, doc, win, clientX, clientY);
|
|
29559
29552
|
if (!localPointer) return [];
|
|
29560
|
-
|
|
29561
|
-
|
|
29562
|
-
|
|
29563
|
-
|
|
29564
|
-
|
|
29565
|
-
overrideStyle = null;
|
|
29566
|
-
return filterAuthorInteractiveTargets(elements, activeCompositionPath).filter(
|
|
29567
|
-
(el) => !isFullBleedTarget(el, localPointer.viewport)
|
|
29568
|
-
);
|
|
29569
|
-
}
|
|
29570
|
-
const fallback = getEventTargetElement(doc.elementFromPoint(localPointer.x, localPointer.y));
|
|
29571
|
-
if (!fallback || !getDomLayerPatchTarget(fallback, activeCompositionPath)) return [];
|
|
29572
|
-
removePointerEventsOverride(overrideStyle);
|
|
29573
|
-
overrideStyle = null;
|
|
29574
|
-
if (hasAuthorPointerEventsNone(fallback)) return [];
|
|
29575
|
-
if (!isElementComputedVisible(fallback)) return [];
|
|
29576
|
-
if (isFullBleedTarget(fallback, localPointer.viewport)) return [];
|
|
29577
|
-
return [fallback];
|
|
29578
|
-
} finally {
|
|
29579
|
-
removePointerEventsOverride(overrideStyle);
|
|
29553
|
+
if (typeof doc.elementsFromPoint === "function") {
|
|
29554
|
+
const elements = doc.elementsFromPoint(localPointer.x, localPointer.y);
|
|
29555
|
+
return filterAuthorInteractiveTargets(elements, activeCompositionPath).filter(
|
|
29556
|
+
(el) => !isFullBleedTarget(el, localPointer.viewport)
|
|
29557
|
+
);
|
|
29580
29558
|
}
|
|
29559
|
+
const fallback = getEventTargetElement(doc.elementFromPoint(localPointer.x, localPointer.y));
|
|
29560
|
+
if (!fallback || !getDomLayerPatchTarget(fallback, activeCompositionPath)) return [];
|
|
29561
|
+
if (hasAuthorPointerEventsNone(fallback)) return [];
|
|
29562
|
+
if (!isElementComputedVisible(fallback)) return [];
|
|
29563
|
+
if (isFullBleedTarget(fallback, localPointer.viewport)) return [];
|
|
29564
|
+
return [fallback];
|
|
29581
29565
|
}
|
|
29582
29566
|
function objectLike(value) {
|
|
29583
29567
|
return value && (typeof value === "object" || typeof value === "function") ? value : null;
|
|
@@ -68577,9 +68561,13 @@ function hasAmbiguousGsapScriptChange(previous, restored) {
|
|
|
68577
68561
|
if (previousScripts.length <= 1 && restoredScripts.length <= 1) return false;
|
|
68578
68562
|
return previousScripts.length !== restoredScripts.length || previousScripts.some((script, index) => script !== restoredScripts[index]);
|
|
68579
68563
|
}
|
|
68580
|
-
function applyUndoRestoreToPreview(iframe, activeCompPath, files, currentTime,
|
|
68564
|
+
function applyUndoRestoreToPreview(iframe, activeCompPath, files, currentTime, reload) {
|
|
68581
68565
|
const activeDocPath = activeCompPath ?? "index.html";
|
|
68582
68566
|
const paths = files ? Object.keys(files) : [];
|
|
68567
|
+
const reloadPreview = () => {
|
|
68568
|
+
markScenesStale(iframe, paths);
|
|
68569
|
+
reload();
|
|
68570
|
+
};
|
|
68583
68571
|
if (!iframe || !files || paths.length !== 1 || paths[0] !== activeDocPath) {
|
|
68584
68572
|
reloadPreview();
|
|
68585
68573
|
return "full";
|
|
@@ -77146,8 +77134,15 @@ function useGsapAwareEditing({
|
|
|
77146
77134
|
);
|
|
77147
77135
|
const handleGsapAwareBoxSizeCommit = useCallback135(
|
|
77148
77136
|
async (selection, next, offset, restore = () => void 0) => {
|
|
77149
|
-
|
|
77150
|
-
|
|
77137
|
+
let targetAnimations;
|
|
77138
|
+
try {
|
|
77139
|
+
const ownedAnimations = getGsapAnimationsForSelection(selection);
|
|
77140
|
+
targetAnimations = Array.isArray(ownedAnimations) ? ownedAnimations : await ownedAnimations;
|
|
77141
|
+
} catch (error) {
|
|
77142
|
+
restore();
|
|
77143
|
+
trackGsapInteractionFailure(error, selection, "resize", "Resize animated layer");
|
|
77144
|
+
throw error;
|
|
77145
|
+
}
|
|
77151
77146
|
const scaleRoute = targetAnimations.some((anim) => anim.propertyGroup === "scale");
|
|
77152
77147
|
const selector = selectorFromSelection(selection);
|
|
77153
77148
|
const hasLivePositionTween = selector ? hasNonHoldTweenForElement(
|
|
@@ -91832,6 +91827,101 @@ function useDomStyleCommit({
|
|
|
91832
91827
|
return { commitStyle, waitForPendingSaves: queue2.waitForIdle };
|
|
91833
91828
|
}
|
|
91834
91829
|
|
|
91830
|
+
// src/hooks/useDomGeometryCommit.ts
|
|
91831
|
+
import { useCallback as useCallback185, useMemo as useMemo81, useRef as useRef183 } from "react";
|
|
91832
|
+
var noop2 = () => {
|
|
91833
|
+
};
|
|
91834
|
+
var NO_SELECTED_ANIMATIONS = [];
|
|
91835
|
+
var noDomBoxSizeRoute = () => Promise.reject(new Error("Resize has no DOM route here"));
|
|
91836
|
+
function useDomGeometryCommit({
|
|
91837
|
+
projectId,
|
|
91838
|
+
iframeRef,
|
|
91839
|
+
writeProjectFile,
|
|
91840
|
+
recordEdit,
|
|
91841
|
+
activeCompPath = null,
|
|
91842
|
+
showToast = noop2,
|
|
91843
|
+
reloadPreview
|
|
91844
|
+
}) {
|
|
91845
|
+
const projectIdRef = useRef183(projectId);
|
|
91846
|
+
projectIdRef.current = projectId;
|
|
91847
|
+
const pending2 = useRef183(/* @__PURE__ */ new Set()).current;
|
|
91848
|
+
const editHistory = useMemo81(() => ({ recordEdit }), [recordEdit]);
|
|
91849
|
+
const reload = useCallback185(
|
|
91850
|
+
() => reloadPreview ? reloadPreview() : iframeRef.current?.contentWindow?.location.reload(),
|
|
91851
|
+
[reloadPreview, iframeRef]
|
|
91852
|
+
);
|
|
91853
|
+
const { bump: bumpGsapCache } = useGsapCacheVersion();
|
|
91854
|
+
const gsap3 = useGsapScriptCommits({
|
|
91855
|
+
projectIdRef,
|
|
91856
|
+
activeCompPath,
|
|
91857
|
+
previewIframeRef: iframeRef,
|
|
91858
|
+
editHistory,
|
|
91859
|
+
reloadPreview: reload,
|
|
91860
|
+
onCacheInvalidate: bumpGsapCache,
|
|
91861
|
+
showToast,
|
|
91862
|
+
writeProjectFile
|
|
91863
|
+
});
|
|
91864
|
+
const makeFetchFallback = useGsapAnimationFetchFallback(projectId);
|
|
91865
|
+
const trackGsapInteractionFailure = useGsapInteractionFailureTelemetry(activeCompPath, showToast);
|
|
91866
|
+
const {
|
|
91867
|
+
handleGsapAwarePathOffsetCommit,
|
|
91868
|
+
handleGsapAwareGroupPathOffsetCommit,
|
|
91869
|
+
handleGsapAwareBoxSizeCommit,
|
|
91870
|
+
handleGsapAwareRotationCommit
|
|
91871
|
+
} = useGsapAwareEditing({
|
|
91872
|
+
// The host owns selection, so every gesture reads its element's animations from the server.
|
|
91873
|
+
domEditSelection: null,
|
|
91874
|
+
selectedGsapAnimations: NO_SELECTED_ANIMATIONS,
|
|
91875
|
+
gsapCommitMutation: gsap3.commitMutation,
|
|
91876
|
+
previewIframeRef: iframeRef,
|
|
91877
|
+
showToast,
|
|
91878
|
+
bumpGsapCache,
|
|
91879
|
+
makeFetchFallback,
|
|
91880
|
+
trackGsapInteractionFailure,
|
|
91881
|
+
handleDomBoxSizeCommit: noDomBoxSizeRoute,
|
|
91882
|
+
addGsapAnimation: gsap3.addGsapAnimation,
|
|
91883
|
+
convertToKeyframes: gsap3.convertToKeyframes,
|
|
91884
|
+
setArcPath: gsap3.setArcPath,
|
|
91885
|
+
updateArcSegment: gsap3.updateArcSegment
|
|
91886
|
+
});
|
|
91887
|
+
const saved2 = useCallback185(
|
|
91888
|
+
async (commit, restore = noop2) => {
|
|
91889
|
+
const refusal2 = !projectIdRef.current ? "No project is open" : !isPreviewBooted(projectIdRef.current) ? "The preview for this project has not loaded yet" : null;
|
|
91890
|
+
if (refusal2) {
|
|
91891
|
+
restore();
|
|
91892
|
+
showToast(refusal2, "error");
|
|
91893
|
+
throw new Error(refusal2);
|
|
91894
|
+
}
|
|
91895
|
+
const run = commit();
|
|
91896
|
+
pending2.add(run);
|
|
91897
|
+
try {
|
|
91898
|
+
await run;
|
|
91899
|
+
} finally {
|
|
91900
|
+
pending2.delete(run);
|
|
91901
|
+
}
|
|
91902
|
+
return { ok: true };
|
|
91903
|
+
},
|
|
91904
|
+
[pending2, showToast]
|
|
91905
|
+
);
|
|
91906
|
+
return useMemo81(
|
|
91907
|
+
() => ({
|
|
91908
|
+
commitPathOffset: (selection, next, modifiers) => saved2(() => handleGsapAwarePathOffsetCommit(selection, next, modifiers)),
|
|
91909
|
+
commitGroupPathOffset: (updates) => saved2(() => handleGsapAwareGroupPathOffsetCommit(updates)),
|
|
91910
|
+
commitBoxSize: (selection, next, offset, restore) => saved2(() => handleGsapAwareBoxSizeCommit(selection, next, offset, restore), restore),
|
|
91911
|
+
commitRotation: (selection, next) => saved2(() => handleGsapAwareRotationCommit(selection, next)),
|
|
91912
|
+
waitForPendingSaves: () => Promise.allSettled([...pending2]).then(noop2)
|
|
91913
|
+
}),
|
|
91914
|
+
[
|
|
91915
|
+
saved2,
|
|
91916
|
+
pending2,
|
|
91917
|
+
handleGsapAwarePathOffsetCommit,
|
|
91918
|
+
handleGsapAwareGroupPathOffsetCommit,
|
|
91919
|
+
handleGsapAwareBoxSizeCommit,
|
|
91920
|
+
handleGsapAwareRotationCommit
|
|
91921
|
+
]
|
|
91922
|
+
);
|
|
91923
|
+
}
|
|
91924
|
+
|
|
91835
91925
|
// src/index.ts
|
|
91836
91926
|
import {
|
|
91837
91927
|
playSeamTransitionLoop
|
|
@@ -91941,6 +92031,7 @@ export {
|
|
|
91941
92031
|
useCompositionStack,
|
|
91942
92032
|
useDomEditSelectionContext,
|
|
91943
92033
|
useDomEditSession,
|
|
92034
|
+
useDomGeometryCommit,
|
|
91944
92035
|
useDomStyleCommit,
|
|
91945
92036
|
useEditHistoryActions,
|
|
91946
92037
|
useElementPicker,
|