@hyperframes/inspector 0.9.68 → 0.9.70

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.
@@ -10,11 +10,13 @@ interface IdSelectorAlias {
10
10
  id: string;
11
11
  replacement: string;
12
12
  }
13
+ export declare function recordedSvgIds(references: readonly SvgReferenceAlias[]): ReadonlySet<string>;
14
+ type Namespaces = ReadonlyMap<string, string | null>;
13
15
  /**
14
16
  * With `namespaces` (a live sheet's bindings) only prefixed attribute selectors are
15
17
  * rewritten; without it they stay as authored and everything else is rewritten.
16
18
  */
17
- export declare function rewriteSvgSelectors(selector: string, ids: readonly IdSelectorAlias[], references: readonly SvgReferenceAlias[], namespaces?: ReadonlyMap<string, string | null>): string;
19
+ export declare function rewriteSvgSelectors(selector: string, ids: readonly IdSelectorAlias[], references: readonly SvgReferenceAlias[], namespaces?: Namespaces): string;
18
20
  /** Metadata records actual writes; selectors still match current native attribute values. */
19
21
  export declare function readSvgReferenceAliases(root: {
20
22
  querySelectorAll(selector: string): Iterable<Element>;
@@ -0,0 +1,84 @@
1
+ /** Names an element's source file. The parent resolves it: `file`, else its composition map. */
2
+ export interface EditingElementSource {
3
+ /** `data-composition-file`, else `data-composition-src`, of the nearest element with either. */
4
+ file: string | null;
5
+ /** The nearest `data-composition-id`, and that element's `data-hf-original-composition-id`. */
6
+ compositionId: string | null;
7
+ originalCompositionId: string | null;
8
+ }
9
+ /** `<load>:<n>`, never reused. One from another page load, or of a removed element, reads as null. */
10
+ export type EditingElementHandle = string;
11
+ export declare const EDITING_ELEMENT_HANDLE: RegExp;
12
+ export interface EditingRect {
13
+ x: number;
14
+ y: number;
15
+ width: number;
16
+ height: number;
17
+ }
18
+ export interface EditingElementHit {
19
+ handle: EditingElementHandle;
20
+ tag: string;
21
+ /** `getBoundingClientRect()`, in the frame's CSS pixels. */
22
+ rect: EditingRect;
23
+ }
24
+ /**
25
+ * An element as plain data, cut at the MAX_ELEMENT_* limits; a `data:` value over its limit keeps only its header.
26
+ * `truncated` says something was cut, so the description is not safe to write back to source.
27
+ */
28
+ export interface EditingElementDescription extends EditingElementHit {
29
+ label?: string;
30
+ parent: EditingElementHandle | null;
31
+ id: string | null;
32
+ selector: string | null;
33
+ /**
34
+ * A class selector's earlier matches, counted per source. The element's index in its file is the
35
+ * sum of the counts whose source resolves to that file. Null for other selectors, or too many.
36
+ */
37
+ matchesBefore: Array<{
38
+ source: EditingElementSource;
39
+ count: number;
40
+ }> | null;
41
+ source: EditingElementSource;
42
+ /** The element or an ancestor carries `data-timeline-locked`. */
43
+ locked: boolean;
44
+ /** Every attribute but `style`. */
45
+ attributes: Array<[name: string, value: string]>;
46
+ inlineStyles: Record<string, string>;
47
+ /** Rendered-tree text: `<script>` and `<style>` contents are left out, as from `children`. */
48
+ text: string;
49
+ children: Array<{
50
+ handle: EditingElementHandle;
51
+ } | {
52
+ text: string;
53
+ }>;
54
+ truncated: boolean;
55
+ }
56
+ export interface EditingElementMatch {
57
+ handle: EditingElementHandle;
58
+ source: EditingElementSource;
59
+ }
60
+ export declare const MAX_ELEMENT_ENTRIES = 256;
61
+ export declare const MAX_ELEMENT_TEXT = 10000;
62
+ export declare const MAX_ELEMENT_VALUE = 2000;
63
+ export declare const MAX_SOURCE_GROUPS = 64;
64
+ export declare const MAX_DESCRIBE_HANDLES = 256;
65
+ export declare const MAX_POINT_STACK = 64;
66
+ export declare const MAX_QUERY_MATCHES = 2048;
67
+ export declare const MAX_TIMELINE_TEXT = 200;
68
+ export declare function isEditableTextLeaf(el: HTMLElement): boolean;
69
+ /** A text layer's words and computed look, as its timeline row draws them. */
70
+ export interface TextLayerRead {
71
+ value: string;
72
+ fontFamily: string;
73
+ fontWeight: string;
74
+ color: string;
75
+ backgroundColor: string;
76
+ }
77
+ /** A layer that paints only text on a flat colour, read; null for anything painted beyond that. */
78
+ export declare function readTextLayer(el: Element): TextLayerRead | null;
79
+ /** A text layer as the runtime's clip list sends it: the words and each style value capped. */
80
+ export declare function readSentTextLayer(el: Element): TextLayerRead | null;
81
+ export declare function escapeCssString(value: string): string;
82
+ export declare function buildStableSelector(el: Element): string | undefined;
83
+ export declare function getPreferredClassSelector(el: Element): string | undefined;
84
+ export declare function readElementSource(el: Element): EditingElementSource;
@@ -1,6 +1,7 @@
1
1
  import type { HfColorGradingTarget } from "../colorGrading.js";
2
2
  import type { PreviewTarget } from "../studioPreviewMark.js";
3
3
  import type { RuntimeAnalyticsEvent } from "./analytics.js";
4
+ import type { TextLayerRead } from "./editingElement.js";
4
5
  import type { AudioFades } from "../audioFade.js";
5
6
  import type { RateSpec } from "../speedRamp.js";
6
7
  import type { VolumeKeyframe } from "./mediaVolumeEnvelope.js";
@@ -69,6 +70,7 @@ export type RuntimeTimelineClip = RuntimeTimelineClipIdentity & {
69
70
  timelineLabel: string | null;
70
71
  timelineGroup: string | null;
71
72
  timelinePriority: number | null;
73
+ text: TextLayerRead | null;
72
74
  };
73
75
  export type RuntimeTimelineScene = {
74
76
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/inspector",
3
- "version": "0.9.68",
3
+ "version": "0.9.70",
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/core": "0.9.68",
47
- "@hyperframes/parsers": "0.9.68"
46
+ "@hyperframes/core": "0.9.70",
47
+ "@hyperframes/parsers": "0.9.70"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/node": "^25.0.10",