hyperframes 0.8.47 → 0.8.49
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/cli.js +1808 -1499
- package/dist/fontLocalizeCli.js +76 -13
- package/dist/hyperframe-runtime.js +34 -27
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +34 -27
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/studio/assets/hyperframes-player-CqON2Rzo.js +464 -0
- package/dist/studio/assets/index-B9LfWNyM.css +1 -0
- package/dist/studio/assets/{index-ryL7q1QG.js → index-BGovDksE.js} +1 -1
- package/dist/studio/assets/{index-j-4hCrZU.js → index-Bgmx2h7W.js} +208 -208
- package/dist/studio/assets/{index-B50xQfSG.js → index-mIgSsKqs.js} +1 -1
- package/dist/studio/index.d.ts +70 -26
- package/dist/studio/index.html +2 -2
- package/dist/studio/index.js +1452 -918
- package/dist/studio/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/studio/assets/hyperframes-player-B7fsB8C2.js +0 -464
- package/dist/studio/assets/index-DnRfAiK2.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as P}from"./index-
|
|
1
|
+
import{g as P}from"./index-Bgmx2h7W.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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode, RefObject } from 'react';
|
|
4
|
-
import { RuntimeTimelineClipIdentity } from '@hyperframes/core';
|
|
4
|
+
import { RuntimeTimelineClipIdentity, HyperframePickerElementInfo } from '@hyperframes/core';
|
|
5
5
|
import { GsapAnimation, PropertyGroupName } from '@hyperframes/core/gsap-parser';
|
|
6
6
|
import * as zustand from 'zustand';
|
|
7
7
|
import { StoreApi } from 'zustand';
|
|
@@ -252,9 +252,10 @@ interface ThumbnailSlice {
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
/** Gates `timelineReady` on the composition's declared readiness inputs
|
|
255
|
-
* (media,
|
|
256
|
-
* is module-scope, not store state: it
|
|
257
|
-
* something a component reads, so
|
|
255
|
+
* (media, compute, and the paint-and-idle default) instead of just a known
|
|
256
|
+
* duration. The generation counter is module-scope, not store state: it
|
|
257
|
+
* guards an in-flight settlement, not something a component reads, so
|
|
258
|
+
* bumping it shouldn't trigger a render. */
|
|
258
259
|
|
|
259
260
|
interface PlaybackReadinessSlice {
|
|
260
261
|
timelineReady: boolean;
|
|
@@ -443,14 +444,14 @@ interface PlayerState extends PlayerStoreSlices {
|
|
|
443
444
|
/** Timeline magnet toggle — when false, clip drags/trims/drops never snap. */
|
|
444
445
|
timelineSnapEnabled: boolean;
|
|
445
446
|
setTimelineSnapEnabled: (enabled: boolean) => void;
|
|
447
|
+
/** Keeps the main track gapless on delete; distinct from the magnet above. */
|
|
448
|
+
rippleEditEnabled: boolean;
|
|
449
|
+
setRippleEditEnabled: (enabled: boolean) => void;
|
|
446
450
|
/** Transport + ruler readout: timecode ("time") or frame number ("frame"). */
|
|
447
451
|
timeDisplayMode: TimelineTimeDisplayMode;
|
|
448
452
|
setTimeDisplayMode: (mode: TimelineTimeDisplayMode) => void;
|
|
449
|
-
/**
|
|
450
|
-
*
|
|
451
|
-
* edit, so a subsequent duration change (which recomputes fit-pps) stops
|
|
452
|
-
* rescaling every clip. No-op once already pinned (mode is "manual").
|
|
453
|
-
*/
|
|
453
|
+
/** Pin the timeline zoom to its current scale before a duration change, so
|
|
454
|
+
* it stops rescaling every clip. No-op once already pinned. */
|
|
454
455
|
pinTimelineZoom: (currentPixelsPerSecond: number, fitPixelsPerSecond: number) => void;
|
|
455
456
|
/** The timeline's live pixels-per-second + fit basis, published by <Timeline>. */
|
|
456
457
|
timelinePps: number;
|
|
@@ -482,25 +483,15 @@ interface PlayerState extends PlayerStoreSlices {
|
|
|
482
483
|
beginTimelineSession: (projectId: string) => void;
|
|
483
484
|
/** Clears project data without creating a new hard-project session. */
|
|
484
485
|
reset: () => void;
|
|
485
|
-
/**
|
|
486
|
-
*
|
|
487
|
-
* useTimelinePlayer subscribes and calls adapter.seek() + liveTime.notify().
|
|
488
|
-
*/
|
|
486
|
+
/** Request a seek from outside the player loop (e.g. Layers panel);
|
|
487
|
+
* useTimelinePlayer subscribes and calls adapter.seek() + liveTime.notify(). */
|
|
489
488
|
requestedSeekTime: number | null;
|
|
490
489
|
requestSeek: (time: number) => void;
|
|
491
490
|
clearSeekRequest: () => void;
|
|
492
|
-
/**
|
|
493
|
-
*
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
* silent while the transport is paused — so hovering one has to start
|
|
497
|
-
* playback, and leaving has to put the playhead back where it was. Hovering is
|
|
498
|
-
* not an edit and must not cost the author their place.
|
|
499
|
-
*
|
|
500
|
-
* A nonce rather than a bare boolean: two hovers in a row both want play, and
|
|
501
|
-
* without it the second request is indistinguishable from the first having
|
|
502
|
-
* already been served.
|
|
503
|
-
*/
|
|
491
|
+
/** Request the transport start or stop from outside the player loop: the FX
|
|
492
|
+
* rack starts playback to audition a preset (silent while paused) and
|
|
493
|
+
* restores the playhead on leave, without costing the author their place.
|
|
494
|
+
* A nonce, not a bare boolean, so two hovers in a row both register. */
|
|
504
495
|
playbackRequest: {
|
|
505
496
|
playing: boolean;
|
|
506
497
|
returnTo: number | null;
|
|
@@ -675,6 +666,45 @@ interface DomEditSelection extends PatchTarget {
|
|
|
675
666
|
gsapAnimations?: GsapAnimation$1[];
|
|
676
667
|
}
|
|
677
668
|
|
|
669
|
+
/**
|
|
670
|
+
* Agent prompt builder for HyperFrames element edit requests.
|
|
671
|
+
*/
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* The subset of an element selection shared by the Studio DOM editor (`DomEditSelection`) and the
|
|
675
|
+
* runtime picker (`HyperframePickerElementInfo`); a field absent from a caller's type is simply omitted.
|
|
676
|
+
*/
|
|
677
|
+
interface AgentPromptElementInfo {
|
|
678
|
+
id: string | null;
|
|
679
|
+
selector?: string | null;
|
|
680
|
+
/** Disambiguates duplicate selectors in `DomEditSelection`. The picker
|
|
681
|
+
* payload has no such concept (one picked node, not a candidate list), so
|
|
682
|
+
* a picker-built prompt always prints index 0 — expected, not a gap. */
|
|
683
|
+
selectorIndex?: number;
|
|
684
|
+
tagName: string;
|
|
685
|
+
label?: string;
|
|
686
|
+
boundingBox: {
|
|
687
|
+
x: number;
|
|
688
|
+
y: number;
|
|
689
|
+
width: number;
|
|
690
|
+
height: number;
|
|
691
|
+
};
|
|
692
|
+
textContent: string | null;
|
|
693
|
+
src?: string | null;
|
|
694
|
+
textFields?: DomEditTextField[];
|
|
695
|
+
inlineStyles?: Record<string, string>;
|
|
696
|
+
computedStyles?: Record<string, string>;
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* Same convention as `buildElementAgentPrompt`, for a host app embedding only the player: built from
|
|
700
|
+
* the runtime picker's own payload, not `DomEditSelection`. Null selection yields a bare prompt, no guardrails.
|
|
701
|
+
*/
|
|
702
|
+
declare function buildPickerAgentPrompt({ selection, userInstruction, }: {
|
|
703
|
+
selection: HyperframePickerElementInfo | null;
|
|
704
|
+
userInstruction?: string;
|
|
705
|
+
}): string;
|
|
706
|
+
declare function buildPickerAgentContextPreview(selection: HyperframePickerElementInfo | null): string;
|
|
707
|
+
|
|
678
708
|
type BlockedTimelineEditIntent = "move" | "resize-start" | "resize-end";
|
|
679
709
|
|
|
680
710
|
type TimelineMoveOperation = "timing" | "lane-reorder" | "track-insert";
|
|
@@ -1216,6 +1246,20 @@ declare const FileTree: react.NamedExoticComponent<FileTreeProps>;
|
|
|
1216
1246
|
|
|
1217
1247
|
declare function StudioApp(): react_jsx_runtime.JSX.Element;
|
|
1218
1248
|
|
|
1249
|
+
interface AgentModalAnchorPoint {
|
|
1250
|
+
x: number;
|
|
1251
|
+
y: number;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
interface AskAgentModalProps {
|
|
1255
|
+
selectionLabel: string;
|
|
1256
|
+
contextPreview?: string;
|
|
1257
|
+
anchorPoint?: AgentModalAnchorPoint | null;
|
|
1258
|
+
onSubmit: (instruction: string) => void;
|
|
1259
|
+
onClose: () => void;
|
|
1260
|
+
}
|
|
1261
|
+
declare function AskAgentModal({ selectionLabel, contextPreview, anchorPoint, onSubmit, onClose, }: AskAgentModalProps): react_jsx_runtime.JSX.Element;
|
|
1262
|
+
|
|
1219
1263
|
interface PickedElement {
|
|
1220
1264
|
id: string | null;
|
|
1221
1265
|
tagName: string;
|
|
@@ -1291,4 +1335,4 @@ declare function findElementBlock(html: string, elementId: string): {
|
|
|
1291
1335
|
isSelfClosing: boolean;
|
|
1292
1336
|
} | null;
|
|
1293
1337
|
|
|
1294
|
-
export { CompositionBreadcrumb, type CompositionLevel, CompositionThumbnail, EditorShell, FileTree, NLEPreview, type PatchOperation, type PickedElement, Player, PlayerControls, PropertyPanel, SourceEditor, StudioApp, Timeline, type TimelineElement, VideoThumbnail, applyPatch, findElementBlock, formatTime, liveTime, mergeStyleIntoTag, parseStyleString, resolveIframe, resolveSourceFile, useElementPicker, usePlayerStore, useTimelinePlayer };
|
|
1338
|
+
export { type AgentModalAnchorPoint, type AgentPromptElementInfo, AskAgentModal, type AskAgentModalProps, CompositionBreadcrumb, type CompositionLevel, CompositionThumbnail, EditorShell, FileTree, NLEPreview, type PatchOperation, type PickedElement, Player, PlayerControls, PropertyPanel, SourceEditor, StudioApp, Timeline, type TimelineElement, VideoThumbnail, applyPatch, buildPickerAgentContextPreview, buildPickerAgentPrompt, findElementBlock, formatTime, liveTime, mergeStyleIntoTag, parseStyleString, resolveIframe, resolveSourceFile, useElementPicker, usePlayerStore, useTimelinePlayer };
|
package/dist/studio/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-Bgmx2h7W.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-B9LfWNyM.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div data-hf-id="hf-aph5" id="root"></div>
|