@hyperframes/inspector 0.9.79 → 0.9.81

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.
@@ -19,6 +19,13 @@ export declare function mapStartTagsAndStyles(html: string, map: {
19
19
  tag: (tag: string) => string;
20
20
  style: (css: string) => string;
21
21
  }): string;
22
+ export interface SourceTag {
23
+ start: number;
24
+ endAfterBracket: number;
25
+ lowercaseName: string;
26
+ closing: boolean;
27
+ }
28
+ export declare function tagsOutsideCommentsAndRawText(html: string): Generator<SourceTag>;
22
29
  export declare function findStartTags(html: string, name: string): number[];
23
30
  export declare function hasCompositionOutsideTemplates(html: string): boolean;
24
31
  /** Insert markup before the document's own `</head>`, `</body>` or `</template>`; null if it has none. */
@@ -2,4 +2,9 @@
2
2
  export declare function parseLayoutDimension(value: string | null | undefined): number | null;
3
3
  /** The size the runtime reports to its host: whole px, read with `parseInt` as the renderer does. */
4
4
  export declare function parseCompositionDimension(value: string | null | undefined): number | null;
5
+ /** The composition's size as a document alone gives it: the composition root's, else any element that declares both. */
6
+ export declare function readCompositionSizeFromDocument(doc: ParentNode | null | undefined): {
7
+ width: number;
8
+ height: number;
9
+ } | null;
5
10
  export declare function findRootCompositionElement(doc?: ParentNode): HTMLElement | null;
@@ -0,0 +1,6 @@
1
+ export declare function rememberSourceLength(media: HTMLMediaElement): void;
2
+ /** The source length: the element's own, else the one measured for the same `src` before a reload emptied it; NaN. */
3
+ export declare function sourceLengthOf(media: {
4
+ duration: number;
5
+ src?: string;
6
+ }): number;
@@ -0,0 +1,2 @@
1
+ export declare const TRANSITION_LABEL_PREFIX = "hf:transition:";
2
+ export declare function transitionLabelsForDocument(doc: Document, timelines: Readonly<Record<string, object | undefined>> | undefined): ReadonlyMap<Element, string>;
@@ -71,6 +71,7 @@ export type RuntimeTimelineClip = RuntimeTimelineClipIdentity & {
71
71
  timelineGroup: string | null;
72
72
  timelinePriority: number | null;
73
73
  text: TextLayerRead | null;
74
+ transitionLabel: string | null;
74
75
  };
75
76
  export type RuntimeTimelineScene = {
76
77
  id: string;
@@ -131,6 +132,14 @@ export type RuntimePickerCancelledMessage = {
131
132
  source: "hf-preview";
132
133
  type: "pick-mode-cancelled";
133
134
  };
135
+ /** The document's own length and size, posted before the runtime boots (`compositionLength.readStaticComposition`). */
136
+ export type RuntimeStaticCompositionMessage = {
137
+ source: "hf-preview";
138
+ type: "static-composition";
139
+ durationSeconds: number;
140
+ width: number | null;
141
+ height: number | null;
142
+ };
134
143
  export type RuntimeStageSizeMessage = {
135
144
  source: "hf-preview";
136
145
  type: "stage-size";
@@ -279,7 +288,7 @@ export type RuntimePreviewFactsMessage = {
279
288
  copiesReady: boolean;
280
289
  };
281
290
  };
282
- export type RuntimeOutboundMessage = RuntimeStateMessage | RuntimePreviewCopiesMessage | RuntimePreviewHealthMessage | RuntimePreviewFactsMessage | RuntimeTimelineMessage | RuntimeDiagnosticMessage | RuntimePickerHoveredMessage | RuntimePickerCandidatesMessage | RuntimePickerPickedMessage | RuntimePickerPickedManyMessage | RuntimePickerCancelledMessage | RuntimeStageSizeMessage | RuntimeMediaAutoplayBlockedMessage | RuntimeReadyMessage | RuntimeAssetsReadyMessage | RuntimeDataErrorMessage | RuntimeDataAppliedMessage | RuntimeAnalyticsMessage | RuntimePerformanceMessage | RuntimeGroupLevelsMessage;
291
+ export type RuntimeOutboundMessage = RuntimeStateMessage | RuntimePreviewCopiesMessage | RuntimePreviewHealthMessage | RuntimePreviewFactsMessage | RuntimeTimelineMessage | RuntimeDiagnosticMessage | RuntimePickerHoveredMessage | RuntimePickerCandidatesMessage | RuntimePickerPickedMessage | RuntimePickerPickedManyMessage | RuntimePickerCancelledMessage | RuntimeStageSizeMessage | RuntimeStaticCompositionMessage | RuntimeMediaAutoplayBlockedMessage | RuntimeReadyMessage | RuntimeAssetsReadyMessage | RuntimeDataErrorMessage | RuntimeDataAppliedMessage | RuntimeAnalyticsMessage | RuntimePerformanceMessage | RuntimeGroupLevelsMessage;
283
292
  export type HeldSeek = Promise<void> | void;
284
293
  export type RuntimePlayer = {
285
294
  _timeline: RuntimeTimelineLike | null;
@@ -20,6 +20,10 @@ export declare function realpathOff(path: string): Promise<string>;
20
20
  * does not, and cannot by itself, defend against.)
21
21
  */
22
22
  export declare function isSafePath(base: string, resolved: string): boolean;
23
+ /** The containment rule once both sides are real paths. */
24
+ export declare const realPathWithin: (baseReal: string, targetReal: string) => boolean;
25
+ /** `resolveWithinProject` off the event loop: the absolute path of an existing entry inside `base`, else null. */
26
+ export declare function resolveExistingWithinProjectOff(base: string, relativePath: string): Promise<string | null>;
23
27
  /**
24
28
  * Resolve `relativePath` against `base` and return the absolute path only if it
25
29
  * stays within `base` (after symlink resolution); otherwise return `null`.
@@ -1,3 +1,4 @@
1
+ export { TRANSITION_LABEL_PREFIX, transitionLabelsForDocument, } from "./runtime/transitionLabels.js";
1
2
  export declare const STUDIO_PREVIEW_MARK_META = "hyperframes-studio-preview";
2
3
  export declare const PREVIEW_SEEK_HOLD_ATTR = "data-hf-preview-seek-hold";
3
4
  export declare const PREVIEW_VIDEO_FRAME_ATTR = "data-hf-preview-video-frame";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/inspector",
3
- "version": "0.9.79",
3
+ "version": "0.9.81",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/heygen-com/hyperframes",
@@ -43,8 +43,8 @@
43
43
  "htmlparser2": "^10.1.0",
44
44
  "postcss": "^8.5.8",
45
45
  "puppeteer-core": "^25.8.0",
46
- "@hyperframes/parsers": "0.9.79",
47
- "@hyperframes/core": "0.9.79"
46
+ "@hyperframes/parsers": "0.9.81",
47
+ "@hyperframes/core": "0.9.81"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/node": "^25.0.10",