@hyperframes/inspector 0.8.155 → 0.8.157

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.
@@ -24,6 +24,7 @@ export interface ElementRef {
24
24
  hfId: string | null;
25
25
  classes: string[];
26
26
  composition: string | null;
27
+ withinId?: string;
27
28
  }
28
29
  export interface RuntimeAnimation {
29
30
  stack: string | null;
@@ -12,4 +12,4 @@ export interface AnimationValues {
12
12
  ease: DeclaredValue;
13
13
  }
14
14
  /** Authored endpoints, never sampled values or inferred previous-tween state. */
15
- export declare function animationValues(vars: Record<string, unknown>, properties: string[]): AnimationValues;
15
+ export declare function animationValues(vars: Record<string, unknown>, properties: string[], keyframesEase?: unknown): AnimationValues;
@@ -0,0 +1,3 @@
1
+ import type { ElementDom } from "./elementMap.js";
2
+ import type { AuthoredHtml } from "./sources.js";
3
+ export declare function withAuthoredState(snapshot: ElementDom, sources: AuthoredHtml): ElementDom;
@@ -13,8 +13,10 @@ export interface ElementNode {
13
13
  text: string;
14
14
  media: string | null;
15
15
  relative: string;
16
+ position: number;
16
17
  groupSelector: string;
17
18
  siblingMatchCount: number;
19
+ generated?: boolean;
18
20
  children: number[];
19
21
  }
20
22
  export interface ElementDom {
@@ -2,7 +2,7 @@ import type { TimelineRequest } from "../../core/src/runtime/timelineInspection.
2
2
  import { type ElementMap } from "./elementMap.js";
3
3
  import { mapInspection } from "./mapInspection.js";
4
4
  import { type PageRunner } from "./pageQueries.js";
5
- import type { Sources } from "./sources.js";
5
+ import type { AuthoredHtml, Sources } from "./sources.js";
6
6
  import { type TimelineReport } from "./timelineReport.js";
7
7
  import type { InspectRequest, Snippet } from "./types.js";
8
8
  export interface SourceContext {
@@ -14,6 +14,7 @@ export interface InspectionView {
14
14
  readonly sourceVersion: string;
15
15
  readonly pageGeneration?: string;
16
16
  sourceContext(): SourceContext;
17
+ authoredHtml?(): AuthoredHtml;
17
18
  assertCurrent(): Promise<void>;
18
19
  }
19
20
  export type ComponentReport = ReturnType<typeof mapInspection>;
@@ -14,5 +14,4 @@ export interface LiveInspection {
14
14
  export declare function prepareLiveInspection(projectDir: string, html: string, provenance: readonly BundleScriptProvenance[], sourceVersion: string): LiveInspection;
15
15
  export declare function previewGeneration(runner: PageRunner): Promise<string | null>;
16
16
  export { fingerprint } from "./sources.js";
17
- export { componentsTool, timelineTool, toolContent, type InspectionTool } from "./tools.js";
18
- export type { ComponentReport, ElementMapReport, PageRunner, TimelineReport };
17
+ export type { ComponentReport, ElementMapReport, InspectRequest, PageRunner, TimelineReport, TimelineRequest, };
@@ -6,6 +6,7 @@ export interface PageRunner {
6
6
  export interface PageTimeline extends TimelineRuntimeResult {
7
7
  following: TimelineEvent[];
8
8
  generation: string | null;
9
+ duration?: number;
9
10
  }
10
11
  export interface PageRuntimeResponse extends RuntimeResponse {
11
12
  generation: string | null;
@@ -0,0 +1,6 @@
1
+ import { type IncomingMessage, type ServerResponse } from "node:http";
2
+ import { Inspector } from "./service.js";
3
+ export declare function createInspectorServer(project: string): {
4
+ inspector: Inspector;
5
+ server: import("node:http").Server<typeof IncomingMessage, typeof ServerResponse>;
6
+ };
@@ -96,3 +96,4 @@ export declare class Inspector {
96
96
  withPage<T>(fn: (page: Page) => Promise<T>): Promise<T>;
97
97
  dispose(): Promise<void>;
98
98
  }
99
+ export type { InspectRequest, TimelineRequest };
@@ -17,6 +17,22 @@ interface SourceFile {
17
17
  lines: number[];
18
18
  }
19
19
  export declare function fingerprint(project: string): string;
20
+ export interface HtmlTag {
21
+ file: string;
22
+ start: number;
23
+ end: number;
24
+ id?: string;
25
+ hfId?: string;
26
+ classes: string[];
27
+ tag: string;
28
+ }
29
+ export interface AuthoredHtml {
30
+ files: Map<string, {
31
+ text: string;
32
+ }>;
33
+ htmlTags: HtmlTag[];
34
+ }
35
+ export declare function authoredHtml(project: string): AuthoredHtml;
20
36
  export declare class Sources {
21
37
  readonly project: string;
22
38
  readonly files: Map<string, SourceFile>;
@@ -28,15 +44,7 @@ export declare class Sources {
28
44
  start: number;
29
45
  end: number;
30
46
  }[];
31
- readonly htmlTags: {
32
- file: string;
33
- start: number;
34
- end: number;
35
- id?: string;
36
- hfId?: string;
37
- classes: string[];
38
- tag: string;
39
- }[];
47
+ readonly htmlTags: HtmlTag[];
40
48
  constructor(project: string);
41
49
  private addChunk;
42
50
  private addCss;
package/package.json CHANGED
@@ -1,14 +1,18 @@
1
1
  {
2
2
  "name": "@hyperframes/inspector",
3
- "version": "0.8.155",
3
+ "version": "0.8.157",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/heygen-com/hyperframes",
7
7
  "directory": "packages/inspector"
8
8
  },
9
+ "bin": {
10
+ "hyperframes-inspector": "./dist/server.js"
11
+ },
9
12
  "files": [
10
13
  "dist/service.js",
11
14
  "dist/live.js",
15
+ "dist/server.js",
12
16
  "dist/inspection.js",
13
17
  "dist/types",
14
18
  "README.md"
@@ -22,6 +26,10 @@
22
26
  "./live": {
23
27
  "types": "./dist/types/inspector/src/live.d.ts",
24
28
  "default": "./dist/live.js"
29
+ },
30
+ "./server": {
31
+ "types": "./dist/types/inspector/src/server.d.ts",
32
+ "default": "./dist/server.js"
25
33
  }
26
34
  },
27
35
  "publishConfig": {
@@ -34,8 +42,8 @@
34
42
  "eslint-scope": "^9.1.2",
35
43
  "postcss": "^8.5.8",
36
44
  "puppeteer-core": "^25.8.0",
37
- "@hyperframes/core": "0.8.155",
38
- "@hyperframes/parsers": "0.8.155"
45
+ "@hyperframes/parsers": "0.8.157",
46
+ "@hyperframes/core": "0.8.157"
39
47
  },
40
48
  "devDependencies": {
41
49
  "@types/node": "^25.0.10",
@@ -47,7 +55,6 @@
47
55
  "test": "vitest run",
48
56
  "typecheck": "tsc --noEmit",
49
57
  "serve": "bun run build && bun src/server.ts",
50
- "mcp": "bun run build && bun src/mcp.ts",
51
58
  "test:timeline": "bun tests/timeline.ts",
52
59
  "test:timeline-compositions": "bun tests/timelineCompositions.ts",
53
60
  "test:live": "bun run build && bun tests/live.ts",
@@ -1,12 +0,0 @@
1
- export declare const componentOutputSchema: {
2
- type: string;
3
- properties: Record<string, object>;
4
- required: string[];
5
- additionalProperties: boolean;
6
- };
7
- export declare const timelineOutputSchema: {
8
- type: string;
9
- properties: Record<string, object>;
10
- required: string[];
11
- additionalProperties: boolean;
12
- };
@@ -1,18 +0,0 @@
1
- export interface InspectionTool {
2
- readonly description: string;
3
- readonly inputSchema: Record<string, unknown>;
4
- readonly outputSchema: Record<string, unknown>;
5
- }
6
- export declare const componentsTool: InspectionTool;
7
- export declare const timelineTool: InspectionTool;
8
- export declare function toolContent(tool: "components" | "timeline", report: object & {
9
- text?: string;
10
- }): {
11
- content: {
12
- type: "text";
13
- text: string;
14
- }[];
15
- structuredContent: object & {
16
- text?: string;
17
- };
18
- };