@mizchi/vlmkit-capture 0.23.2 → 0.24.0

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.
@@ -1,13 +1,12 @@
1
1
  import { CraterClient, CraterCssMutation, PaintNode, PaintTreeChange } from "./crater-client.mjs";
2
-
3
2
  //#region src/batch-prescan.d.ts
4
- interface BatchPrescanRequest {
3
+ export interface BatchPrescanRequest {
5
4
  /** Stable id (echoed back in the result). */
6
5
  id: string;
7
6
  /** CSS mutations describing how this variant diverges from the baseline. */
8
7
  mutations: CraterCssMutation[];
9
8
  }
10
- interface BatchPrescanResult {
9
+ export interface BatchPrescanResult {
11
10
  id: string;
12
11
  /** Paint-tree changes vs. the baseline tree. Empty when the variant looks identical. */
13
12
  changes: PaintTreeChange[];
@@ -16,7 +15,7 @@ interface BatchPrescanResult {
16
15
  /** True when Crater silently dropped the variant (no `paintTree` in the response). */
17
16
  missing: boolean;
18
17
  }
19
- interface BatchPrescanOptions {
18
+ export interface BatchPrescanOptions {
20
19
  /** Skip variants whose `mutations` array is empty — Crater would no-op them anyway. */
21
20
  skipEmptyMutations?: boolean;
22
21
  }
@@ -28,7 +27,7 @@ interface BatchPrescanOptions {
28
27
  * The caller is responsible for collecting `baselinePaintTree` (e.g. via
29
28
  * the existing `capturePageStateCrater` flow at the same viewport).
30
29
  */
31
- declare function runBatchPrescan(client: Pick<CraterClient, "batchRender">, baseHtml: string, viewport: {
30
+ export declare function runBatchPrescan(client: Pick<CraterClient, "batchRender">, baseHtml: string, viewport: {
32
31
  width: number;
33
32
  height: number;
34
33
  }, baselinePaintTree: PaintNode, requests: BatchPrescanRequest[], options?: BatchPrescanOptions): Promise<BatchPrescanResult[]>;
@@ -36,16 +35,15 @@ declare function runBatchPrescan(client: Pick<CraterClient, "batchRender">, base
36
35
  * Build a Crater `mutations` payload for "remove a single CSS declaration"
37
36
  * — the css-challenge property-mode trial shape.
38
37
  */
39
- declare function mutationsForPropertyRemoval(selector: string, property: string): CraterCssMutation[];
38
+ export declare function mutationsForPropertyRemoval(selector: string, property: string): CraterCssMutation[];
40
39
  /**
41
40
  * Build a Crater `mutations` payload for "remove every declaration in a
42
41
  * selector block" — the css-challenge selector-mode trial shape.
43
42
  */
44
- declare function mutationsForSelectorBlockRemoval(selector: string, properties: string[]): CraterCssMutation[];
43
+ export declare function mutationsForSelectorBlockRemoval(selector: string, properties: string[]): CraterCssMutation[];
45
44
  /**
46
45
  * True when at least one of the batch-prescan results found a paint-tree
47
46
  * signal. Used to short-circuit follow-up per-viewport captures.
48
47
  */
49
- declare function hasAnyBatchPrescanSignal(results: BatchPrescanResult[]): boolean;
50
- //#endregion
51
- export { BatchPrescanOptions, BatchPrescanRequest, BatchPrescanResult, hasAnyBatchPrescanSignal, mutationsForPropertyRemoval, mutationsForSelectorBlockRemoval, runBatchPrescan };
48
+ export declare function hasAnyBatchPrescanSignal(results: BatchPrescanResult[]): boolean;
49
+ //#endregion
@@ -1,30 +1,30 @@
1
1
  //#region src/capture-config.d.ts
2
- interface CaptureRoute {
2
+ export interface CaptureRoute {
3
3
  name: string;
4
4
  path: string;
5
5
  waitFor?: string;
6
6
  }
7
- interface CaptureConfig {
7
+ export interface CaptureConfig {
8
8
  baseUrl?: string;
9
9
  routes?: CaptureRoute[];
10
10
  }
11
- interface CaptureRouteSet {
11
+ export interface CaptureRouteSet {
12
12
  baseUrl: string;
13
13
  routes: CaptureRoute[];
14
14
  source: "env" | "config" | "default";
15
15
  configPath?: string;
16
16
  }
17
- declare const DEFAULT_CAPTURE_BASE_URL = "http://127.0.0.1:4174";
17
+ export declare const DEFAULT_CAPTURE_BASE_URL = "http://127.0.0.1:4174";
18
18
  /**
19
19
  * Built-in fallback used when no config or env override is provided.
20
20
  * Kept for vlmkit's own development workflow; external projects should
21
21
  * supply their own routes via `vlmkit.config.json`.
22
22
  */
23
- declare const DEFAULT_CAPTURE_ROUTES: CaptureRoute[];
24
- declare const DEFAULT_CAPTURE_CONFIG_FILE = "vlmkit.config.json";
25
- declare function parseCaptureConfig(raw: string): CaptureConfig;
26
- declare function routeNameFromPath(path: string): string;
27
- interface LoadCaptureConfigOptions {
23
+ export declare const DEFAULT_CAPTURE_ROUTES: CaptureRoute[];
24
+ export declare const DEFAULT_CAPTURE_CONFIG_FILE = "vlmkit.config.json";
25
+ export declare function parseCaptureConfig(raw: string): CaptureConfig;
26
+ export declare function routeNameFromPath(path: string): string;
27
+ export interface LoadCaptureConfigOptions {
28
28
  configPath?: string;
29
29
  cwd?: string;
30
30
  envRoutes?: string;
@@ -40,11 +40,10 @@ interface LoadCaptureConfigOptions {
40
40
  * 3. `vlmkit.config.json` discovered in `cwd`
41
41
  * 4. Built-in defaults
42
42
  */
43
- declare function resolveCaptureRoutes(options?: LoadCaptureConfigOptions): CaptureRouteSet;
43
+ export declare function resolveCaptureRoutes(options?: LoadCaptureConfigOptions): CaptureRouteSet;
44
44
  /**
45
45
  * Helper for unit tests / non-Playwright callers: read & normalize a file.
46
46
  */
47
- declare function loadCaptureConfigFromFile(configPath: string): CaptureConfig;
48
- declare function captureConfigDir(configPath: string): string;
49
- //#endregion
50
- export { CaptureConfig, CaptureRoute, CaptureRouteSet, DEFAULT_CAPTURE_BASE_URL, DEFAULT_CAPTURE_CONFIG_FILE, DEFAULT_CAPTURE_ROUTES, LoadCaptureConfigOptions, captureConfigDir, loadCaptureConfigFromFile, parseCaptureConfig, resolveCaptureRoutes, routeNameFromPath };
47
+ export declare function loadCaptureConfigFromFile(configPath: string): CaptureConfig;
48
+ export declare function captureConfigDir(configPath: string): string;
49
+ //#endregion
@@ -1,32 +1,31 @@
1
1
  import { Browser } from "playwright";
2
-
3
2
  //#region src/capturer.d.ts
4
- type CaptureBackendKind = "local" | "cloudflare-cdp";
5
- interface CaptureBackend {
3
+ export type CaptureBackendKind = "local" | "cloudflare-cdp";
4
+ export interface CaptureBackend {
6
5
  readonly kind: CaptureBackendKind;
7
6
  /** Human-readable label used in logs. */
8
7
  readonly label: string;
9
8
  launch(): Promise<Browser>;
10
9
  close(browser: Browser): Promise<void>;
11
10
  }
12
- interface CloudflareCdpOptions {
11
+ export interface CloudflareCdpOptions {
13
12
  accountId: string;
14
13
  apiToken: string;
15
14
  /** Override the default CF CDP URL (useful for tests / private deployments). */
16
15
  endpoint?: string;
17
16
  }
18
- declare function buildCloudflareCdpUrl(opts: {
17
+ export declare function buildCloudflareCdpUrl(opts: {
19
18
  accountId: string;
20
19
  endpoint?: string;
21
20
  }): string;
22
- declare function createLocalCapturer(): CaptureBackend;
23
- declare function createCloudflareCdpCapturer(opts: CloudflareCdpOptions): CaptureBackend;
24
- interface ResolveCaptureBackendOptions {
21
+ export declare function createLocalCapturer(): CaptureBackend;
22
+ export declare function createCloudflareCdpCapturer(opts: CloudflareCdpOptions): CaptureBackend;
23
+ export interface ResolveCaptureBackendOptions {
25
24
  /** Value from `--backend` CLI flag (e.g. "local", "cloudflare"). */
26
25
  backendFlag?: string;
27
26
  env?: NodeJS.ProcessEnv;
28
27
  }
29
- interface ResolvedCaptureBackend {
28
+ export interface ResolvedCaptureBackend {
30
29
  backend: CaptureBackend;
31
30
  source: "flag" | "env" | "default";
32
31
  }
@@ -40,6 +39,5 @@ interface ResolvedCaptureBackend {
40
39
  * + `CLOUDFLARE_API_TOKEN`) regardless of how the backend was selected, so
41
40
  * CI configs can stay declarative.
42
41
  */
43
- declare function resolveCaptureBackend(options?: ResolveCaptureBackendOptions): ResolvedCaptureBackend;
44
- //#endregion
45
- export { CaptureBackend, CaptureBackendKind, CloudflareCdpOptions, ResolveCaptureBackendOptions, ResolvedCaptureBackend, buildCloudflareCdpUrl, createCloudflareCdpCapturer, createLocalCapturer, resolveCaptureBackend };
42
+ export declare function resolveCaptureBackend(options?: ResolveCaptureBackendOptions): ResolvedCaptureBackend;
43
+ //#endregion
@@ -1,23 +1,23 @@
1
1
  //#region src/cloudflare-quick-actions.d.ts
2
- type CloudflareQuickAction = "screenshot" | "crawl";
3
- interface CloudflareQuickActionsConfig {
2
+ export type CloudflareQuickAction = "screenshot" | "crawl";
3
+ export interface CloudflareQuickActionsConfig {
4
4
  accountId: string;
5
5
  apiToken: string;
6
6
  apiBase?: string;
7
7
  fetch?: typeof fetch;
8
8
  }
9
- interface CloudflareQuickActionsEnv {
9
+ export interface CloudflareQuickActionsEnv {
10
10
  CLOUDFLARE_ACCOUNT_ID?: string;
11
11
  CLOUDFLARE_API_TOKEN?: string;
12
12
  CLOUDFLARE_BROWSER_RENDERING_API_BASE?: string;
13
13
  }
14
- interface CloudflareQuickActionEndpointInput {
14
+ export interface CloudflareQuickActionEndpointInput {
15
15
  accountId: string;
16
16
  action: CloudflareQuickAction;
17
17
  jobId?: string;
18
18
  apiBase?: string;
19
19
  }
20
- interface CloudflareScreenshotRequest {
20
+ export interface CloudflareScreenshotRequest {
21
21
  url?: string;
22
22
  html?: string;
23
23
  viewport?: {
@@ -46,12 +46,12 @@ interface CloudflareScreenshotRequest {
46
46
  addStyleTag?: Array<Record<string, unknown>>;
47
47
  userAgent?: string;
48
48
  }
49
- interface CloudflareScreenshotResult {
49
+ export interface CloudflareScreenshotResult {
50
50
  bytes: ArrayBuffer;
51
51
  contentType: string;
52
52
  browserMsUsed?: number;
53
53
  }
54
- interface CloudflareCrawlRequest {
54
+ export interface CloudflareCrawlRequest {
55
55
  url: string;
56
56
  limit?: number;
57
57
  depth?: number;
@@ -70,11 +70,11 @@ interface CloudflareCrawlRequest {
70
70
  setExtraHTTPHeaders?: Record<string, string>;
71
71
  rejectResourceTypes?: string[];
72
72
  }
73
- interface CloudflareCrawlStartResult {
73
+ export interface CloudflareCrawlStartResult {
74
74
  jobId: string;
75
75
  }
76
- type CloudflareCrawlRecordStatus = "queued" | "errored" | "completed" | "disallowed" | "skipped" | "cancelled";
77
- interface CloudflareCrawlRecord {
76
+ export type CloudflareCrawlRecordStatus = "queued" | "errored" | "completed" | "disallowed" | "skipped" | "cancelled";
77
+ export interface CloudflareCrawlRecord {
78
78
  url: string;
79
79
  status: CloudflareCrawlRecordStatus;
80
80
  metadata?: {
@@ -86,7 +86,7 @@ interface CloudflareCrawlRecord {
86
86
  markdown?: string;
87
87
  json?: unknown;
88
88
  }
89
- interface CloudflareCrawlResult {
89
+ export interface CloudflareCrawlResult {
90
90
  id: string;
91
91
  status: string;
92
92
  browserSecondsUsed?: number;
@@ -94,21 +94,20 @@ interface CloudflareCrawlResult {
94
94
  finished?: number;
95
95
  records: CloudflareCrawlRecord[];
96
96
  }
97
- interface CloudflareCrawlRoute {
97
+ export interface CloudflareCrawlRoute {
98
98
  url: string;
99
99
  path: string;
100
100
  title?: string;
101
101
  }
102
- interface ExtractCloudflareCrawlRoutesOptions {
102
+ export interface ExtractCloudflareCrawlRoutesOptions {
103
103
  baseUrl?: string;
104
104
  }
105
- declare function buildCloudflareQuickActionEndpoint(input: CloudflareQuickActionEndpointInput): string;
106
- declare function resolveCloudflareQuickActionsConfig(env?: CloudflareQuickActionsEnv): CloudflareQuickActionsConfig;
107
- declare function createCloudflareQuickActionsClient(config: CloudflareQuickActionsConfig): {
105
+ export declare function buildCloudflareQuickActionEndpoint(input: CloudflareQuickActionEndpointInput): string;
106
+ export declare function resolveCloudflareQuickActionsConfig(env?: CloudflareQuickActionsEnv): CloudflareQuickActionsConfig;
107
+ export declare function createCloudflareQuickActionsClient(config: CloudflareQuickActionsConfig): {
108
108
  screenshot(input: CloudflareScreenshotRequest): Promise<CloudflareScreenshotResult>;
109
109
  startCrawl(input: CloudflareCrawlRequest): Promise<CloudflareCrawlStartResult>;
110
110
  getCrawlResult(jobId: string): Promise<CloudflareCrawlResult>;
111
111
  };
112
- declare function extractCloudflareCrawlRoutes(result: CloudflareCrawlResult, options?: ExtractCloudflareCrawlRoutesOptions): CloudflareCrawlRoute[];
113
- //#endregion
114
- export { CloudflareCrawlRecord, CloudflareCrawlRecordStatus, CloudflareCrawlRequest, CloudflareCrawlResult, CloudflareCrawlRoute, CloudflareCrawlStartResult, CloudflareQuickAction, CloudflareQuickActionEndpointInput, CloudflareQuickActionsConfig, CloudflareQuickActionsEnv, CloudflareScreenshotRequest, CloudflareScreenshotResult, ExtractCloudflareCrawlRoutesOptions, buildCloudflareQuickActionEndpoint, createCloudflareQuickActionsClient, extractCloudflareCrawlRoutes, resolveCloudflareQuickActionsConfig };
112
+ export declare function extractCloudflareCrawlRoutes(result: CloudflareCrawlResult, options?: ExtractCloudflareCrawlRoutesOptions): CloudflareCrawlRoute[];
113
+ //#endregion
@@ -1,16 +1,16 @@
1
1
  //#region src/crater-client.d.ts
2
- declare const DEFAULT_BIDI_URL = "ws://127.0.0.1:9222";
3
- declare const VLMKIT_CRATER_BIDI_URL_ENV = "VLMKIT_CRATER_BIDI_URL";
4
- declare const CRATER_BIDI_URL_ENV = "CRATER_BIDI_URL";
5
- declare const VLMKIT_CRATER_ROOT_ENV = "VLMKIT_CRATER_ROOT";
6
- declare const CRATER_ROOT_ENV = "CRATER_ROOT";
7
- interface ResolveCraterBidiUrlOptions {
2
+ export declare const DEFAULT_BIDI_URL = "ws://127.0.0.1:9222";
3
+ export declare const VLMKIT_CRATER_BIDI_URL_ENV = "VLMKIT_CRATER_BIDI_URL";
4
+ export declare const CRATER_BIDI_URL_ENV = "CRATER_BIDI_URL";
5
+ export declare const VLMKIT_CRATER_ROOT_ENV = "VLMKIT_CRATER_ROOT";
6
+ export declare const CRATER_ROOT_ENV = "CRATER_ROOT";
7
+ export interface ResolveCraterBidiUrlOptions {
8
8
  env?: Partial<Record<typeof VLMKIT_CRATER_BIDI_URL_ENV | typeof CRATER_BIDI_URL_ENV | typeof VLMKIT_CRATER_ROOT_ENV | typeof CRATER_ROOT_ENV, string | undefined>>;
9
9
  craterRoot?: string;
10
10
  urlFile?: string;
11
11
  }
12
- declare function resolveCraterBidiUrl(options?: ResolveCraterBidiUrlOptions): string;
13
- interface CraterResponsiveBreakpoint {
12
+ export declare function resolveCraterBidiUrl(options?: ResolveCraterBidiUrlOptions): string;
13
+ export interface CraterResponsiveBreakpoint {
14
14
  axis: "width";
15
15
  op: "ge" | "gt" | "le" | "lt";
16
16
  valuePx: number;
@@ -19,24 +19,24 @@ interface CraterResponsiveBreakpoint {
19
19
  guards: string[];
20
20
  ruleCount: number;
21
21
  }
22
- interface CraterBreakpointDiscoveryDiagnostics {
22
+ export interface CraterBreakpointDiscoveryDiagnostics {
23
23
  stylesheetCount: number;
24
24
  ruleCount: number;
25
25
  externalStylesheetLinks: string[];
26
26
  ignoredQueries: string[];
27
27
  unsupportedQueries: string[];
28
28
  }
29
- interface CraterRuleViewportMapEntry {
29
+ export interface CraterRuleViewportMapEntry {
30
30
  selector: string;
31
31
  properties: string[];
32
32
  mediaCondition: string;
33
33
  activeAtWidths: number[];
34
34
  inactiveAtWidths: number[];
35
35
  }
36
- interface CraterRuleViewportMap {
36
+ export interface CraterRuleViewportMap {
37
37
  rules: CraterRuleViewportMapEntry[];
38
38
  }
39
- interface CraterComputedStyleWithState {
39
+ export interface CraterComputedStyleWithState {
40
40
  normal: Record<string, string>;
41
41
  forced: Record<string, string>;
42
42
  diff: Array<{
@@ -45,29 +45,29 @@ interface CraterComputedStyleWithState {
45
45
  forced: string;
46
46
  }>;
47
47
  }
48
- type CraterCssMutationAction = "remove" | {
48
+ export type CraterCssMutationAction = "remove" | {
49
49
  override: string;
50
50
  };
51
- interface CraterCssMutation {
51
+ export interface CraterCssMutation {
52
52
  selector: string;
53
53
  property: string;
54
54
  action?: CraterCssMutationAction;
55
55
  }
56
- interface CraterRenderVariant {
56
+ export interface CraterRenderVariant {
57
57
  id: string;
58
58
  mutations: CraterCssMutation[];
59
59
  }
60
- interface CraterBatchRenderResult {
60
+ export interface CraterBatchRenderResult {
61
61
  results: Array<{
62
62
  id: string;
63
63
  paintTree?: PaintNode | null;
64
64
  }>;
65
65
  }
66
- interface CraterBreakpointDiscoveryResult {
66
+ export interface CraterBreakpointDiscoveryResult {
67
67
  breakpoints: CraterResponsiveBreakpoint[];
68
68
  diagnostics?: CraterBreakpointDiscoveryDiagnostics;
69
69
  }
70
- declare class CraterClient {
70
+ export declare class CraterClient {
71
71
  private ws;
72
72
  private commandId;
73
73
  private pendingCommands;
@@ -122,7 +122,7 @@ declare class CraterClient {
122
122
  /** Paint tree (render tree JSON) */
123
123
  capturePaintTree(): Promise<PaintNode>;
124
124
  }
125
- interface PaintNode {
125
+ export interface PaintNode {
126
126
  id?: string;
127
127
  tag?: string;
128
128
  x: number;
@@ -135,7 +135,7 @@ interface PaintNode {
135
135
  text?: string;
136
136
  ch?: PaintNode[];
137
137
  }
138
- interface PaintProps {
138
+ export interface PaintProps {
139
139
  op?: number;
140
140
  c?: number[];
141
141
  bg?: number[];
@@ -144,7 +144,7 @@ interface PaintProps {
144
144
  vis?: string;
145
145
  br?: number[];
146
146
  }
147
- interface PaintTreeChange {
147
+ export interface PaintTreeChange {
148
148
  path: string;
149
149
  type: "geometry" | "paint" | "text" | "added" | "removed";
150
150
  property?: string;
@@ -152,8 +152,7 @@ interface PaintTreeChange {
152
152
  after?: string;
153
153
  }
154
154
  /** Compare two paint trees and return the diff */
155
- declare function diffPaintTrees(baseline: PaintNode, current: PaintNode, path?: string): PaintTreeChange[];
155
+ export declare function diffPaintTrees(baseline: PaintNode, current: PaintNode, path?: string): PaintTreeChange[];
156
156
  /** Check if crater server is running */
157
- declare function isCraterAvailable(url?: string): Promise<boolean>;
158
- //#endregion
159
- export { CRATER_BIDI_URL_ENV, CRATER_ROOT_ENV, CraterBatchRenderResult, CraterBreakpointDiscoveryDiagnostics, CraterBreakpointDiscoveryResult, CraterClient, CraterComputedStyleWithState, CraterCssMutation, CraterCssMutationAction, CraterRenderVariant, CraterResponsiveBreakpoint, CraterRuleViewportMap, CraterRuleViewportMapEntry, DEFAULT_BIDI_URL, PaintNode, PaintProps, PaintTreeChange, ResolveCraterBidiUrlOptions, VLMKIT_CRATER_BIDI_URL_ENV, VLMKIT_CRATER_ROOT_ENV, diffPaintTrees, isCraterAvailable, resolveCraterBidiUrl };
157
+ export declare function isCraterAvailable(url?: string): Promise<boolean>;
158
+ //#endregion
@@ -48,7 +48,8 @@ var CraterClient = class {
48
48
  this.ws = new WebSocket(this.url);
49
49
  this.ws.on("open", async () => {
50
50
  try {
51
- this.contextId = (await this.sendBidi("browsingContext.create", { type: "tab" })).result.context;
51
+ const resp = await this.sendBidi("browsingContext.create", { type: "tab" });
52
+ this.contextId = resp.result.context;
52
53
  resolve();
53
54
  } catch (error) {
54
55
  reject(error);
@@ -138,7 +139,8 @@ var CraterClient = class {
138
139
  async captureComputedStyles(properties) {
139
140
  const nativeSnapshot = await this.captureNativeComputedStyles(properties);
140
141
  if (nativeSnapshot) return nativeSnapshot;
141
- const snapshot = parseComputedStyleSnapshot(await this.evaluate(buildComputedStyleCaptureJsonExpression(properties)));
142
+ const rawSnapshot = await this.evaluate(buildComputedStyleCaptureJsonExpression(properties));
143
+ const snapshot = parseComputedStyleSnapshot(rawSnapshot);
142
144
  if (!hasMeaningfulComputedStyleSnapshot(snapshot)) return /* @__PURE__ */ new Map();
143
145
  return computedStyleSnapshotToMap(snapshot);
144
146
  }
@@ -1,7 +1,6 @@
1
1
  import { RuleView } from "@mizchi/vlmkit-core/plugin/contract.ts";
2
-
3
2
  //#region src/crater-smoke.d.ts
4
- interface CraterSmokeClient {
3
+ export interface CraterSmokeClient {
5
4
  connect(): Promise<void>;
6
5
  close(): Promise<void>;
7
6
  setViewport(width: number, height: number): Promise<void>;
@@ -57,20 +56,20 @@ interface CraterSmokeClient {
57
56
  }>;
58
57
  }>;
59
58
  }
60
- type CraterSmokeStatus = "pass" | "skip" | "fail";
61
- interface CraterSmokeCheck {
59
+ export type CraterSmokeStatus = "pass" | "skip" | "fail";
60
+ export interface CraterSmokeCheck {
62
61
  name: string;
63
62
  status: CraterSmokeStatus;
64
63
  elapsedMs: number;
65
64
  message: string;
66
65
  }
67
- interface CraterSmokeReport {
66
+ export interface CraterSmokeReport {
68
67
  status: CraterSmokeStatus;
69
68
  url: string;
70
69
  checks: CraterSmokeCheck[];
71
70
  elapsedMs: number;
72
71
  }
73
- interface CraterSmokeOptions {
72
+ export interface CraterSmokeOptions {
74
73
  url?: string;
75
74
  html?: string;
76
75
  viewport?: {
@@ -88,17 +87,22 @@ interface CraterSmokeOptions {
88
87
  isAvailable?: (url: string) => Promise<boolean>;
89
88
  createClient?: (url: string) => CraterSmokeClient;
90
89
  }
91
- declare function runCraterBidiSmoke(options?: CraterSmokeOptions): Promise<CraterSmokeReport>;
92
- declare function formatCraterSmokeReport(report: CraterSmokeReport, rules?: RuleView): string;
90
+ export declare function runCraterBidiSmoke(options?: CraterSmokeOptions): Promise<CraterSmokeReport>;
91
+ export declare function formatCraterSmokeReport(report: CraterSmokeReport, rules?: RuleView): string;
93
92
  /**
94
93
  * Read this gate's own flags. `--help` and `--json` are no longer handled
95
94
  * here: the core gate runner owns both, and a parser that called
96
95
  * `process.exit(0)` for help could not be used by anything but a CLI.
97
96
  */
98
- declare function parseCraterSmokeArgs(argv: readonly string[], env?: NodeJS.ProcessEnv | Partial<NodeJS.ProcessEnv>): {
97
+ export declare function parseCraterSmokeArgs(argv: readonly string[], env?: NodeJS.ProcessEnv | Partial<NodeJS.ProcessEnv>): {
99
98
  url: string;
100
99
  requireAvailable: boolean;
101
100
  deep: boolean;
102
101
  };
103
- //#endregion
104
- export { CraterSmokeCheck, CraterSmokeClient, CraterSmokeOptions, CraterSmokeReport, CraterSmokeStatus, formatCraterSmokeReport, parseCraterSmokeArgs, runCraterBidiSmoke };
102
+ /**
103
+ * CLI entry removed: this module is measurement code now, not a command.
104
+ * `check crater` is declared in `./gates/crater.gate.ts` and driven by the core runner
105
+ * (`@mizchi/vlmkit-core/plugin/runner.ts`), which owns argument parsing,
106
+ * `--json`, `--advisory`, the run ledger and the exit code.
107
+ */
108
+ //#endregion
@@ -1,17 +1,17 @@
1
1
  //#region src/crater-wasm.d.ts
2
- declare const CRATER_WASM_MODULE_ENV = "VLMKIT_CRATER_WASM_MODULE";
3
- interface CraterWasmViewport {
2
+ export declare const CRATER_WASM_MODULE_ENV = "VLMKIT_CRATER_WASM_MODULE";
3
+ export interface CraterWasmViewport {
4
4
  width: number;
5
5
  height: number;
6
6
  label?: string;
7
7
  }
8
- interface CraterBoxRect {
8
+ export interface CraterBoxRect {
9
9
  top: number;
10
10
  right: number;
11
11
  bottom: number;
12
12
  left: number;
13
13
  }
14
- interface CraterLayoutNode {
14
+ export interface CraterLayoutNode {
15
15
  id: string;
16
16
  x: number;
17
17
  y: number;
@@ -22,22 +22,22 @@ interface CraterLayoutNode {
22
22
  border: CraterBoxRect;
23
23
  children: CraterLayoutNode[];
24
24
  }
25
- interface CraterLayoutRootBox {
25
+ export interface CraterLayoutRootBox {
26
26
  x: number;
27
27
  y: number;
28
28
  width: number;
29
29
  height: number;
30
30
  }
31
- interface CraterLayoutDiagnostics {
31
+ export interface CraterLayoutDiagnostics {
32
32
  nodeCount: number;
33
33
  maxDepth: number;
34
34
  rootBox: CraterLayoutRootBox;
35
35
  }
36
- interface CraterWasmRenderRequest {
36
+ export interface CraterWasmRenderRequest {
37
37
  html: string;
38
38
  viewport: CraterWasmViewport;
39
39
  }
40
- interface CraterWasmRenderResult {
40
+ export interface CraterWasmRenderResult {
41
41
  backend: "crater-wasm";
42
42
  viewport: CraterWasmViewport;
43
43
  layout: CraterLayoutNode;
@@ -45,21 +45,20 @@ interface CraterWasmRenderResult {
45
45
  elapsedMs: number;
46
46
  diagnostics: CraterLayoutDiagnostics;
47
47
  }
48
- interface CraterWasmModule {
48
+ export interface CraterWasmModule {
49
49
  renderHtmlToJsonForWpt(html: string, width: number, height: number): string | Promise<string>;
50
50
  }
51
- interface CraterWasmLayoutBackend {
51
+ export interface CraterWasmLayoutBackend {
52
52
  kind: "crater-wasm-layout";
53
53
  renderLayout(request: CraterWasmRenderRequest): Promise<CraterWasmRenderResult>;
54
54
  }
55
- interface LoadCraterWasmModuleOptions {
55
+ export interface LoadCraterWasmModuleOptions {
56
56
  modulePath?: string;
57
57
  env?: Partial<Record<typeof CRATER_WASM_MODULE_ENV | "CRATER_WASM_MODULE", string | undefined>>;
58
58
  cwd?: string;
59
59
  }
60
- declare function createCraterWasmLayoutBackend(module: CraterWasmModule): CraterWasmLayoutBackend;
61
- declare function loadCraterWasmModule(options?: LoadCraterWasmModuleOptions): Promise<CraterWasmModule>;
62
- declare function normalizeCraterLayoutJson(raw: string | unknown): CraterLayoutNode;
63
- declare function summarizeCraterLayout(layout: CraterLayoutNode): CraterLayoutDiagnostics;
64
- //#endregion
65
- export { CRATER_WASM_MODULE_ENV, CraterBoxRect, CraterLayoutDiagnostics, CraterLayoutNode, CraterLayoutRootBox, CraterWasmLayoutBackend, CraterWasmModule, CraterWasmRenderRequest, CraterWasmRenderResult, CraterWasmViewport, LoadCraterWasmModuleOptions, createCraterWasmLayoutBackend, loadCraterWasmModule, normalizeCraterLayoutJson, summarizeCraterLayout };
60
+ export declare function createCraterWasmLayoutBackend(module: CraterWasmModule): CraterWasmLayoutBackend;
61
+ export declare function loadCraterWasmModule(options?: LoadCraterWasmModuleOptions): Promise<CraterWasmModule>;
62
+ export declare function normalizeCraterLayoutJson(raw: string | unknown): CraterLayoutNode;
63
+ export declare function summarizeCraterLayout(layout: CraterLayoutNode): CraterLayoutDiagnostics;
64
+ //#endregion
@@ -3,7 +3,7 @@
3
3
  * Capture-level detection result shared across capture backends
4
4
  * (Playwright, Crater BiDi) and downstream detection classifiers.
5
5
  */
6
- interface ViewportDetectionResult {
6
+ export interface ViewportDetectionResult {
7
7
  width: number;
8
8
  height: number;
9
9
  visualDiffDetected: boolean;
@@ -21,5 +21,4 @@ interface ViewportDetectionResult {
21
21
  */
22
22
  visualCaptureSkipped?: boolean;
23
23
  }
24
- //#endregion
25
- export { ViewportDetectionResult };
24
+ //#endregion
@@ -1,12 +1,10 @@
1
1
  import { CraterSmokeOptions, CraterSmokeReport } from "../crater-smoke.mjs";
2
- import * as _$_mizchi_vlmkit_core_plugin_contract_ts0 from "@mizchi/vlmkit-core/plugin/contract.ts";
3
-
4
2
  //#region src/gates/crater.gate.d.ts
5
3
  /** The gate needs `requireAvailable` at verdict time, not just at run time. */
6
- interface CraterGateOptions extends CraterSmokeOptions {
4
+ export interface CraterGateOptions extends CraterSmokeOptions {
7
5
  requireAvailable: boolean;
8
6
  }
9
- declare const craterGate: _$_mizchi_vlmkit_core_plugin_contract_ts0.GateDefinition<CraterSmokeReport, CraterGateOptions>;
10
- declare const captureGatesPlugin: _$_mizchi_vlmkit_core_plugin_contract_ts0.VlmkitPlugin;
7
+ export declare const craterGate: import("@mizchi/vlmkit-core/plugin/contract.ts").GateDefinition<CraterSmokeReport, CraterGateOptions>;
8
+ export declare const captureGatesPlugin: import("@mizchi/vlmkit-core/plugin/contract.ts").VlmkitPlugin;
11
9
  //#endregion
12
- export { CraterGateOptions, captureGatesPlugin, captureGatesPlugin as default, craterGate };
10
+ export { captureGatesPlugin as default };
@@ -1,19 +1,18 @@
1
1
  import { Attachment, VrtSnapshot } from "@mizchi/vlmkit-core/types.ts";
2
-
3
2
  //#region src/playwright-analyzer.d.ts
4
- interface AnalyzedReport {
3
+ export interface AnalyzedReport {
5
4
  snapshots: VrtSnapshot[];
6
5
  failedTests: FailedTest[];
7
6
  stats: ReportStats;
8
7
  }
9
- interface FailedTest {
8
+ export interface FailedTest {
10
9
  testId: string;
11
10
  title: string;
12
11
  project: string;
13
12
  errors: string[];
14
13
  attachments: Attachment[];
15
14
  }
16
- interface ReportStats {
15
+ export interface ReportStats {
17
16
  total: number;
18
17
  passed: number;
19
18
  failed: number;
@@ -24,15 +23,14 @@ interface ReportStats {
24
23
  /**
25
24
  * Playwright JSON レポートを読み込み、構造化された VRT データに変換する
26
25
  */
27
- declare function analyzeReport(reportPath: string): Promise<AnalyzedReport>;
26
+ export declare function analyzeReport(reportPath: string): Promise<AnalyzedReport>;
28
27
  /**
29
28
  * test-results ディレクトリからスクリーンショットファイルを収集し、
30
29
  * ベースラインとの対応関係を構築する
31
30
  */
32
- declare function collectScreenshots(resultsDir: string, baselineDir: string): Promise<VrtSnapshot[]>;
31
+ export declare function collectScreenshots(resultsDir: string, baselineDir: string): Promise<VrtSnapshot[]>;
33
32
  /**
34
33
  * レポートの統計サマリを人間可読な文字列にする
35
34
  */
36
- declare function formatStats(stats: ReportStats): string;
37
- //#endregion
38
- export { AnalyzedReport, FailedTest, ReportStats, analyzeReport, collectScreenshots, formatStats };
35
+ export declare function formatStats(stats: ReportStats): string;
36
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/playwright-launch-error.d.ts
2
- declare function isPlaywrightSandboxRestrictionError(error: unknown): boolean;
2
+ export declare function isPlaywrightSandboxRestrictionError(error: unknown): boolean;
3
3
  /**
4
4
  * The `diagnose` hook for `launchBrowser` / `withBrowser`.
5
5
  *
@@ -13,9 +13,8 @@ declare function isPlaywrightSandboxRestrictionError(error: unknown): boolean;
13
13
  * throw new Error(formatPlaywrightLaunchError(e, …))` block that had been copied
14
14
  * to 4 launch sites (css-challenge x2, css-challenge-core, migration-compare).
15
15
  */
16
- declare function diagnoseSandboxLaunchFailure(error: unknown): string | null;
17
- declare function formatPlaywrightLaunchError(error: unknown, options?: {
16
+ export declare function diagnoseSandboxLaunchFailure(error: unknown): string | null;
17
+ export declare function formatPlaywrightLaunchError(error: unknown, options?: {
18
18
  commandHint?: string;
19
19
  }): string;
20
- //#endregion
21
- export { diagnoseSandboxLaunchFailure, formatPlaywrightLaunchError, isPlaywrightSandboxRestrictionError };
20
+ //#endregion
@@ -35,7 +35,9 @@ function formatPlaywrightLaunchError(error, options = {}) {
35
35
  const message = normalizeErrorMessage(error);
36
36
  if (!isPlaywrightSandboxRestrictionError(error)) return message;
37
37
  if (message.includes(FORMATTED_SANDBOX_MARKER)) return message;
38
- return `Playwright browser launch is blocked by a ${FORMATTED_SANDBOX_MARKER}. Chromium itself is likely fine.${` ${!options.commandHint ? "Re-run outside the Codex sandbox or in CI" : /re-?run outside the codex sandbox/i.test(options.commandHint) ? options.commandHint : `Re-run outside the Codex sandbox or ${options.commandHint}`}.`}\nOriginal error: ${message.split("\n").find((line) => line.trim().length > 0) ?? message}`;
38
+ const hint = ` ${!options.commandHint ? "Re-run outside the Codex sandbox or in CI" : /re-?run outside the codex sandbox/i.test(options.commandHint) ? options.commandHint : `Re-run outside the Codex sandbox or ${options.commandHint}`}.`;
39
+ const originalLine = message.split("\n").find((line) => line.trim().length > 0) ?? message;
40
+ return `Playwright browser launch is blocked by a ${FORMATTED_SANDBOX_MARKER}. Chromium itself is likely fine.${hint}\nOriginal error: ${originalLine}`;
39
41
  }
40
42
  //#endregion
41
43
  export { diagnoseSandboxLaunchFailure, formatPlaywrightLaunchError, isPlaywrightSandboxRestrictionError };
@@ -1,10 +1,9 @@
1
1
  import { ViewportDetectionResult } from "./detection-types.mjs";
2
-
3
2
  //#region src/prescanner.d.ts
4
- type PrescannerResolvedBy = "crater" | "chromium" | "none";
3
+ export type PrescannerResolvedBy = "crater" | "chromium" | "none";
5
4
  /** Which Crater metadata signal first fired for a trial resolved by crater. */
6
- type PrescannerCraterSignal = "paint-tree" | "computed-style" | "forced-state" | "visual" | "none";
7
- interface PrescannerTrialResolution {
5
+ export type PrescannerCraterSignal = "paint-tree" | "computed-style" | "forced-state" | "visual" | "none";
6
+ export interface PrescannerTrialResolution {
8
7
  craterDetected: boolean;
9
8
  fallbackUsed: boolean;
10
9
  finalDetected: boolean;
@@ -14,7 +13,7 @@ interface PrescannerTrialResolution {
14
13
  /** First crater signal type that fired (paint-tree wins over computed-style → forced-state → visual). */
15
14
  craterSignal: PrescannerCraterSignal;
16
15
  }
17
- interface PrescannerTrialSummary {
16
+ export interface PrescannerTrialSummary {
18
17
  total: number;
19
18
  detected: number;
20
19
  craterResolved: number;
@@ -31,9 +30,8 @@ interface PrescannerTrialSummary {
31
30
  visual: number;
32
31
  };
33
32
  }
34
- declare function hasCraterPrescanSignal(viewports: ViewportDetectionResult[]): boolean;
35
- declare function hasAnyDetectionSignal(viewports: ViewportDetectionResult[]): boolean;
36
- declare function resolvePrescannerTrial(craterViewports: ViewportDetectionResult[], chromiumViewports?: ViewportDetectionResult[]): PrescannerTrialResolution;
37
- declare function summarizePrescannerTrials(resolutions: PrescannerTrialResolution[]): PrescannerTrialSummary;
38
- //#endregion
39
- export { PrescannerCraterSignal, PrescannerResolvedBy, PrescannerTrialResolution, PrescannerTrialSummary, hasAnyDetectionSignal, hasCraterPrescanSignal, resolvePrescannerTrial, summarizePrescannerTrials };
33
+ export declare function hasCraterPrescanSignal(viewports: ViewportDetectionResult[]): boolean;
34
+ export declare function hasAnyDetectionSignal(viewports: ViewportDetectionResult[]): boolean;
35
+ export declare function resolvePrescannerTrial(craterViewports: ViewportDetectionResult[], chromiumViewports?: ViewportDetectionResult[]): PrescannerTrialResolution;
36
+ export declare function summarizePrescannerTrials(resolutions: PrescannerTrialResolution[]): PrescannerTrialSummary;
37
+ //#endregion
@@ -1,12 +1,11 @@
1
1
  import { CaptureRoute } from "./capture-config.mjs";
2
-
3
2
  //#region src/route-capture.d.ts
4
3
  /** The viewport the old `vrt-desktop` project used, and vlmkit's default elsewhere. */
5
- declare const DEFAULT_CAPTURE_VIEWPORT: {
4
+ export declare const DEFAULT_CAPTURE_VIEWPORT: {
6
5
  readonly width: 1280;
7
6
  readonly height: 720;
8
7
  };
9
- interface RouteCaptureOptions {
8
+ export interface RouteCaptureOptions {
10
9
  baseUrl: string;
11
10
  routes: readonly CaptureRoute[];
12
11
  /** Directory that receives `<name>.png` and `<name>.a11y.json`. */
@@ -18,7 +17,7 @@ interface RouteCaptureOptions {
18
17
  /** Settling delay after load, matching the spec's `waitForTimeout(500)`. */
19
18
  settleMs?: number;
20
19
  }
21
- interface RouteCaptureEntry {
20
+ export interface RouteCaptureEntry {
22
21
  name: string;
23
22
  url: string;
24
23
  screenshotPath: string;
@@ -39,12 +38,12 @@ interface RouteCaptureEntry {
39
38
  /** `waitFor` was given and never matched — the capture happened anyway, as before. */
40
39
  waitForTimedOut?: boolean;
41
40
  }
42
- interface RouteCaptureFailure {
41
+ export interface RouteCaptureFailure {
43
42
  name: string;
44
43
  url: string;
45
44
  error: string;
46
45
  }
47
- interface RouteCaptureResult {
46
+ export interface RouteCaptureResult {
48
47
  viewport: {
49
48
  width: number;
50
49
  height: number;
@@ -56,7 +55,7 @@ interface RouteCaptureResult {
56
55
  /** Captured, but the server did not return 2xx — an error page about to become a baseline. */
57
56
  notOk: RouteCaptureEntry[];
58
57
  }
59
- declare function captureRoutes(options: RouteCaptureOptions): Promise<RouteCaptureResult>;
58
+ export declare function captureRoutes(options: RouteCaptureOptions): Promise<RouteCaptureResult>;
60
59
  interface CdpAxNode {
61
60
  nodeId: string;
62
61
  parentId?: string;
@@ -82,6 +81,5 @@ interface CdpAxNode {
82
81
  * are compared against baselines captured by the old path, so changing the shape here would
83
82
  * report every baseline as a semantic diff.
84
83
  */
85
- declare function cdpNodesToTree(nodes: readonly CdpAxNode[]): unknown;
86
- //#endregion
87
- export { DEFAULT_CAPTURE_VIEWPORT, RouteCaptureEntry, RouteCaptureFailure, RouteCaptureOptions, RouteCaptureResult, captureRoutes, cdpNodesToTree };
84
+ export declare function cdpNodesToTree(nodes: readonly CdpAxNode[]): unknown;
85
+ //#endregion
@@ -5,12 +5,12 @@
5
5
  * Extracts breakpoints from @media queries and generates viewport lists
6
6
  * at boundary +/-1px + random samples within ranges (quickcheck-style).
7
7
  */
8
- interface Breakpoint {
8
+ export interface Breakpoint {
9
9
  value: number;
10
10
  type: "min-width" | "max-width";
11
11
  raw: string;
12
12
  }
13
- interface ResponsiveBreakpoint {
13
+ export interface ResponsiveBreakpoint {
14
14
  axis: "width";
15
15
  op: "ge" | "gt" | "le" | "lt";
16
16
  valuePx: number;
@@ -20,8 +20,8 @@ interface ResponsiveBreakpoint {
20
20
  ruleCount: number;
21
21
  }
22
22
  /** Where a viewport candidate originated. */
23
- type ViewportSource = "standard" | "regex-boundary" | "regex-sample" | "crater-required" | "crater-rule-map";
24
- interface ViewportSpec {
23
+ export type ViewportSource = "standard" | "regex-boundary" | "regex-sample" | "crater-required" | "crater-rule-map";
24
+ export interface ViewportSpec {
25
25
  width: number;
26
26
  height: number;
27
27
  label: string;
@@ -33,7 +33,7 @@ interface ViewportSpec {
33
33
  */
34
34
  source?: ViewportSource;
35
35
  }
36
- interface DiscoveryResult {
36
+ export interface DiscoveryResult {
37
37
  breakpoints: Breakpoint[];
38
38
  responsiveBreakpoints: ResponsiveBreakpoint[];
39
39
  viewports: ViewportSpec[];
@@ -48,16 +48,16 @@ interface DiscoveryResult {
48
48
  }
49
49
  type ViewportBreakpoint = Breakpoint | ResponsiveBreakpoint;
50
50
  /** Extract all breakpoints from CSS text */
51
- declare function extractBreakpoints(css: string): Breakpoint[];
51
+ export declare function extractBreakpoints(css: string): Breakpoint[];
52
52
  /** Extract breakpoints from HTML <style> */
53
- declare function extractBreakpointsFromHtml(html: string): Breakpoint[];
54
- declare function extractStylesheetHrefsFromHtml(html: string): string[];
55
- declare function extractBreakpointsFromHtmlWithStylesheets(html: string, stylesheetTexts: string[]): Breakpoint[];
56
- declare function toResponsiveBreakpoints(breakpoints: ViewportBreakpoint[]): ResponsiveBreakpoint[];
57
- declare function mergeResponsiveBreakpoints(...collections: ViewportBreakpoint[][]): ResponsiveBreakpoint[];
58
- declare function extractResponsiveBreakpointsFromHtml(html: string): ResponsiveBreakpoint[];
59
- declare function extractResponsiveBreakpointsFromHtmlWithStylesheets(html: string, stylesheetTexts: string[]): ResponsiveBreakpoint[];
60
- interface ViewportOptions {
53
+ export declare function extractBreakpointsFromHtml(html: string): Breakpoint[];
54
+ export declare function extractStylesheetHrefsFromHtml(html: string): string[];
55
+ export declare function extractBreakpointsFromHtmlWithStylesheets(html: string, stylesheetTexts: string[]): Breakpoint[];
56
+ export declare function toResponsiveBreakpoints(breakpoints: ViewportBreakpoint[]): ResponsiveBreakpoint[];
57
+ export declare function mergeResponsiveBreakpoints(...collections: ViewportBreakpoint[][]): ResponsiveBreakpoint[];
58
+ export declare function extractResponsiveBreakpointsFromHtml(html: string): ResponsiveBreakpoint[];
59
+ export declare function extractResponsiveBreakpointsFromHtmlWithStylesheets(html: string, stylesheetTexts: string[]): ResponsiveBreakpoint[];
60
+ export interface ViewportOptions {
61
61
  height?: number;
62
62
  maxViewports?: number;
63
63
  randomSamples?: number;
@@ -72,12 +72,12 @@ interface ViewportOptions {
72
72
  * - boundary -1px: just before breakpoint activates
73
73
  * - (optional) random samples within range
74
74
  */
75
- declare function generateViewports(breakpoints: ViewportBreakpoint[], options?: ViewportOptions): ViewportSpec[];
75
+ export declare function generateViewports(breakpoints: ViewportBreakpoint[], options?: ViewportOptions): ViewportSpec[];
76
76
  /**
77
77
  * Discover breakpoints from HTML and generate boundary-check viewports.
78
78
  */
79
- declare function discoverViewports(html: string, options?: ViewportOptions): DiscoveryResult;
80
- interface CraterViewportSource {
79
+ export declare function discoverViewports(html: string, options?: ViewportOptions): DiscoveryResult;
80
+ export interface CraterViewportSource {
81
81
  getRequiredTestViewports(): Promise<{
82
82
  viewports: Array<{
83
83
  width: number;
@@ -97,7 +97,7 @@ interface CraterViewportSource {
97
97
  * breakpoints the renderer itself determined are load-bearing for the
98
98
  * current document. Falls back gracefully when either RPC fails.
99
99
  */
100
- declare function discoverViewportsViaCrater(client: CraterViewportSource, options?: ViewportOptions): Promise<{
100
+ export declare function discoverViewportsViaCrater(client: CraterViewportSource, options?: ViewportOptions): Promise<{
101
101
  viewports: ViewportSpec[];
102
102
  widthsSeen: Set<number>;
103
103
  }>;
@@ -107,8 +107,7 @@ declare function discoverViewportsViaCrater(client: CraterViewportSource, option
107
107
  * didn't surface, and tag each viewport with its `source`. The returned
108
108
  * `backend` field tells downstream reports which path supplied the list.
109
109
  */
110
- declare function discoverViewportsWithBackend(html: string, options?: ViewportOptions & {
110
+ export declare function discoverViewportsWithBackend(html: string, options?: ViewportOptions & {
111
111
  craterClient?: CraterViewportSource | null;
112
112
  }): Promise<DiscoveryResult>;
113
- //#endregion
114
- export { Breakpoint, CraterViewportSource, DiscoveryResult, ResponsiveBreakpoint, ViewportOptions, ViewportSource, ViewportSpec, discoverViewports, discoverViewportsViaCrater, discoverViewportsWithBackend, extractBreakpoints, extractBreakpointsFromHtml, extractBreakpointsFromHtmlWithStylesheets, extractResponsiveBreakpointsFromHtml, extractResponsiveBreakpointsFromHtmlWithStylesheets, extractStylesheetHrefsFromHtml, generateViewports, mergeResponsiveBreakpoints, toResponsiveBreakpoints };
113
+ //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mizchi/vlmkit-capture",
3
- "version": "0.23.2",
3
+ "version": "0.24.0",
4
4
  "description": "Playwright + Crater capture infrastructure for VRT — viewport discovery, multi-route capture, prescanner.",
5
5
  "license": "MIT",
6
6
  "author": "mizchi",
@@ -38,13 +38,13 @@
38
38
  "dependencies": {
39
39
  "pngjs": "^7.0.0",
40
40
  "ws": "^8.20.0",
41
- "@mizchi/vlmkit-core": "0.23.2"
41
+ "@mizchi/vlmkit-core": "0.24.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "playwright": ">=1.61 <2"
45
45
  },
46
46
  "scripts": {
47
- "build": "pnpm --dir ../.. exec tsdown --config tsdown.packages.config.ts --filter @mizchi/vlmkit-capture",
48
- "test": "pnpm --dir ../.. exec vitest run packages/vlmkit-capture/src"
47
+ "build": "pnpm --dir ../.. exec vp pack --filter @mizchi/vlmkit-capture",
48
+ "test": "pnpm --dir ../.. exec vp test run packages/vlmkit-capture/src"
49
49
  }
50
50
  }