@@ -13,7 +13,7 @@ import type { HyperframeControlAction } from "../inline-scripts/runtimeContract.
1313import type { HyperframePickerElementInfo } from "../inline-scripts/pickerApi.js" ;
1414import type { RuntimeProtocolV1 } from "./protocol.js" ;
1515
16- export type RuntimeBridgeControlAction =
16+ type RuntimeBridgeControlActionBase =
1717 | HyperframeControlAction
1818 | "tick"
1919 | "set-volume"
@@ -24,7 +24,7 @@ export type RuntimeBridgeControlAction =
2424 | "stop-media"
2525 | "flash-elements" ;
2626
27- export type RuntimeBridgeControlMessage = {
27+ type RuntimeBridgeControlMessageBase = {
2828 source : "hf-parent" ;
2929 type : "control" ;
3030 action : RuntimeBridgeControlAction ;
@@ -50,24 +50,27 @@ export type RuntimeStateMessage = {
5050 playbackRate : number ;
5151} ;
5252
53- export type RuntimeTimelineClip = {
53+ export type RuntimeTimelineClipIdentity = {
5454 id : string | null ;
5555 label : string ;
5656 start : number ;
5757 duration : number ;
5858 track : number ;
59- zIndex : number ;
60- stackingContextId : string | null ;
6159 kind : "video" | "audio" | "image" | "element" | "composition" ;
6260 tagName : string | null ;
6361 compositionId : string | null ;
64- compositionAncestors : string [ ] ;
6562 parentCompositionId : string | null ;
66- nodePath : string | null ;
6763 compositionSrc : string | null ;
64+ assetUrl : string | null ;
65+ } ;
66+
67+ export type RuntimeTimelineClip = RuntimeTimelineClipIdentity & {
68+ zIndex : number ;
69+ stackingContextId : string | null ;
70+ compositionAncestors : string [ ] ;
71+ nodePath : string | null ;
6872 playbackStart : number ;
6973 playbackRate : number ;
70- assetUrl : string | null ;
7174 timelineRole : string | null ;
7275 timelineLabel : string | null ;
7376 timelineGroup : string | null ;
@@ -168,6 +171,13 @@ export type RuntimeReadyMessage = {
168171 type : "ready" ;
169172} ;
170173
174+ export type RuntimeDataErrorMessage = {
175+ source : "hf-preview" ;
176+ type : "runtime-data-error" ;
177+ channel : string ;
178+ message : string ;
179+ } ;
180+
171181/**
172182 * Analytics events emitted by the runtime.
173183 *
@@ -218,6 +228,7 @@ export type RuntimeOutboundMessage =
218228 | RuntimeStageSizeMessage
219229 | RuntimeMediaAutoplayBlockedMessage
220230 | RuntimeReadyMessage
231+ | RuntimeDataErrorMessage
221232 | RuntimeAnalyticsMessage
222233 | RuntimePerformanceMessage
223234 | RuntimeGroupLevelsMessage ;
@@ -317,3 +328,16 @@ export type RuntimeDeterministicAdapter = {
317328export type RuntimeGsapSetTarget = string | Element | Element [ ] | null ;
318329
319330export type RuntimeGsapSetVars = Record < string , string | number | boolean | null | undefined > ;
331+
332+ type RuntimeDataControlFields = {
333+ channel ?: string ;
334+ payload ?: unknown ;
335+ } ;
336+
337+ type RuntimeBridgeControlAction =
338+ | RuntimeBridgeControlActionBase
339+ | "set-runtime-data"
340+ | "clear-runtime-data" ;
341+
342+ export type RuntimeBridgeControlMessage = RuntimeBridgeControlMessageBase &
343+ RuntimeDataControlFields ;
0 commit comments