@juxtapose/core 0.2.0 → 0.5.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.
Files changed (141) hide show
  1. package/dist/agent/handoff.d.ts +8 -1
  2. package/dist/agent/handoff.js +75 -7
  3. package/dist/agent/handoff.js.map +1 -1
  4. package/dist/analysis/affected.d.ts +58 -0
  5. package/dist/analysis/affected.js +134 -22
  6. package/dist/analysis/affected.js.map +1 -1
  7. package/dist/analysis/cause.d.ts +32 -0
  8. package/dist/analysis/cause.js +187 -0
  9. package/dist/analysis/cause.js.map +1 -0
  10. package/dist/baseline/approve.d.ts +24 -0
  11. package/dist/baseline/approve.js +54 -0
  12. package/dist/baseline/approve.js.map +1 -0
  13. package/dist/baseline/git-store.d.ts +4 -0
  14. package/dist/baseline/git-store.js +22 -0
  15. package/dist/baseline/git-store.js.map +1 -1
  16. package/dist/browser/acquire.d.ts +11 -0
  17. package/dist/browser/acquire.js +15 -0
  18. package/dist/browser/acquire.js.map +1 -0
  19. package/dist/browser/browser.d.ts +53 -0
  20. package/dist/browser/browser.js +122 -0
  21. package/dist/browser/browser.js.map +1 -0
  22. package/dist/browser/cdp.d.ts +81 -0
  23. package/dist/browser/cdp.js +230 -0
  24. package/dist/browser/cdp.js.map +1 -0
  25. package/dist/browser/index.d.ts +9 -0
  26. package/dist/browser/index.js +10 -0
  27. package/dist/browser/index.js.map +1 -0
  28. package/dist/browser/install.d.ts +33 -0
  29. package/dist/browser/install.js +167 -0
  30. package/dist/browser/install.js.map +1 -0
  31. package/dist/browser/launch.d.ts +37 -0
  32. package/dist/browser/launch.js +265 -0
  33. package/dist/browser/launch.js.map +1 -0
  34. package/dist/browser/page.d.ts +125 -0
  35. package/dist/browser/page.js +564 -0
  36. package/dist/browser/page.js.map +1 -0
  37. package/dist/browser/pins.d.ts +12 -0
  38. package/dist/browser/pins.js +57 -0
  39. package/dist/browser/pins.js.map +1 -0
  40. package/dist/browser/resolve.d.ts +25 -0
  41. package/dist/browser/resolve.js +115 -0
  42. package/dist/browser/resolve.js.map +1 -0
  43. package/dist/browser/selectors.d.ts +10 -0
  44. package/dist/browser/selectors.js +60 -0
  45. package/dist/browser/selectors.js.map +1 -0
  46. package/dist/browser/transport.d.ts +39 -0
  47. package/dist/browser/transport.js +99 -0
  48. package/dist/browser/transport.js.map +1 -0
  49. package/dist/browser/zip.d.ts +27 -0
  50. package/dist/browser/zip.js +241 -0
  51. package/dist/browser/zip.js.map +1 -0
  52. package/dist/capture/capture.d.ts +7 -1
  53. package/dist/capture/capture.js +27 -3
  54. package/dist/capture/capture.js.map +1 -1
  55. package/dist/capture/env.d.ts +8 -0
  56. package/dist/capture/env.js +38 -0
  57. package/dist/capture/env.js.map +1 -0
  58. package/dist/capture/launch.d.ts +19 -1
  59. package/dist/capture/launch.js +91 -1
  60. package/dist/capture/launch.js.map +1 -1
  61. package/dist/capture/pool.d.ts +1 -1
  62. package/dist/capture/pool.js +41 -8
  63. package/dist/capture/pool.js.map +1 -1
  64. package/dist/capture/settle.d.ts +1 -1
  65. package/dist/capture/settle.js +2 -0
  66. package/dist/capture/settle.js.map +1 -1
  67. package/dist/capture/snap.d.ts +43 -0
  68. package/dist/capture/snap.js +103 -0
  69. package/dist/capture/snap.js.map +1 -0
  70. package/dist/capture/structure.d.ts +77 -0
  71. package/dist/capture/structure.js +498 -0
  72. package/dist/capture/structure.js.map +1 -0
  73. package/dist/diff/compare.d.ts +19 -0
  74. package/dist/diff/compare.js +19 -0
  75. package/dist/diff/compare.js.map +1 -0
  76. package/dist/diff/crops.d.ts +26 -0
  77. package/dist/diff/crops.js +92 -0
  78. package/dist/diff/crops.js.map +1 -0
  79. package/dist/diff/structural/classify.d.ts +29 -0
  80. package/dist/diff/structural/classify.js +113 -0
  81. package/dist/diff/structural/classify.js.map +1 -0
  82. package/dist/diff/structural/coverage.d.ts +11 -0
  83. package/dist/diff/structural/coverage.js +37 -0
  84. package/dist/diff/structural/coverage.js.map +1 -0
  85. package/dist/diff/structural/deltas.d.ts +29 -0
  86. package/dist/diff/structural/deltas.js +218 -0
  87. package/dist/diff/structural/deltas.js.map +1 -0
  88. package/dist/diff/structural/disambiguate.d.ts +3 -0
  89. package/dist/diff/structural/disambiguate.js +89 -0
  90. package/dist/diff/structural/disambiguate.js.map +1 -0
  91. package/dist/diff/structural/label.d.ts +15 -0
  92. package/dist/diff/structural/label.js +64 -0
  93. package/dist/diff/structural/label.js.map +1 -0
  94. package/dist/diff/structural/match.d.ts +13 -0
  95. package/dist/diff/structural/match.js +135 -0
  96. package/dist/diff/structural/match.js.map +1 -0
  97. package/dist/diff/structural/shift.d.ts +2 -0
  98. package/dist/diff/structural/shift.js +144 -0
  99. package/dist/diff/structural/shift.js.map +1 -0
  100. package/dist/diff/structural/summary.d.ts +31 -0
  101. package/dist/diff/structural/summary.js +420 -0
  102. package/dist/diff/structural/summary.js.map +1 -0
  103. package/dist/diff/structural.d.ts +40 -0
  104. package/dist/diff/structural.js +219 -0
  105. package/dist/diff/structural.js.map +1 -0
  106. package/dist/index.d.ts +34 -12
  107. package/dist/index.js +55 -11
  108. package/dist/index.js.map +1 -1
  109. package/dist/platform.d.ts +1 -1
  110. package/dist/platforms/urls.d.ts +3 -0
  111. package/dist/platforms/urls.js +89 -0
  112. package/dist/platforms/urls.js.map +1 -0
  113. package/dist/report/comment.d.ts +2 -1
  114. package/dist/report/comment.js +305 -57
  115. package/dist/report/comment.js.map +1 -1
  116. package/dist/report/format.d.ts +20 -0
  117. package/dist/report/format.js +32 -0
  118. package/dist/report/format.js.map +1 -0
  119. package/dist/report/github.d.ts +12 -0
  120. package/dist/report/github.js +21 -0
  121. package/dist/report/github.js.map +1 -1
  122. package/dist/report/html.d.ts +12 -0
  123. package/dist/report/html.js +202 -0
  124. package/dist/report/html.js.map +1 -0
  125. package/dist/run/groups.d.ts +2 -0
  126. package/dist/run/groups.js +45 -0
  127. package/dist/run/groups.js.map +1 -0
  128. package/dist/run/phases.d.ts +19 -0
  129. package/dist/run/phases.js +50 -0
  130. package/dist/run/phases.js.map +1 -0
  131. package/dist/run/run.d.ts +10 -2
  132. package/dist/run/run.js +97 -9
  133. package/dist/run/run.js.map +1 -1
  134. package/dist/shell-quote.d.ts +2 -0
  135. package/dist/shell-quote.js +10 -0
  136. package/dist/shell-quote.js.map +1 -0
  137. package/dist/types.d.ts +234 -3
  138. package/dist/url-platform.d.ts +2 -2
  139. package/dist/url-platform.js +2 -2
  140. package/dist/url-platform.js.map +1 -1
  141. package/package.json +14 -10
package/dist/types.d.ts CHANGED
@@ -18,6 +18,14 @@ export interface StoryParams {
18
18
  waitForSelector?: string;
19
19
  /** Max ms to wait for render-ready before screenshotting anyway. Default 2000. */
20
20
  captureTimeout?: number;
21
+ /** Selectors to cover with a solid box before the screenshot. For a clock or
22
+ * a random avatar; prefer stubbing the input. Masks the element's bounding
23
+ * box, so give it a fixed size or the box resizes with the content. */
24
+ mask?: string[];
25
+ /** Exclude from watch-mode recapture while leaving normal runs alone. For
26
+ * stories whose play function or delay makes a keystroke-triggered capture
27
+ * cost more than it returns. Default true. */
28
+ liveCapture?: boolean;
21
29
  }
22
30
  export interface Viewport {
23
31
  width: number;
@@ -44,6 +52,49 @@ export interface Snapshot {
44
52
  capturedAt: string;
45
53
  /** Wall time for this story's capture, ms. */
46
54
  durationMs: number;
55
+ /** Visible elements and their styles, from the same frame as `image`.
56
+ * Absent when structure capture failed or was disabled — it explains a
57
+ * failure, it never decides one. */
58
+ structure?: StructureSnapshot;
59
+ }
60
+ export interface StructureRect {
61
+ x: number;
62
+ y: number;
63
+ w: number;
64
+ h: number;
65
+ }
66
+ export interface StructureElement {
67
+ /** tag + (#id | [data-testid] | :nth-of-type) chain from <html>. */
68
+ path: string;
69
+ /** Index of the nearest kept ancestor in `elements`, null at the root. */
70
+ parent: number | null;
71
+ tag: string;
72
+ id?: string;
73
+ testId?: string;
74
+ classes?: string[];
75
+ role?: string;
76
+ name?: string;
77
+ text?: string;
78
+ src?: string;
79
+ rect: StructureRect;
80
+ paintOrder: number;
81
+ /** Compact: see effectiveStyle() in capture/structure.ts. */
82
+ styles: Record<string, string>;
83
+ }
84
+ export interface StructureSnapshot {
85
+ schema: 'juxtapose.structure/v1';
86
+ viewport: Viewport;
87
+ /** sha256 of the canonical JSON of `elements`. Equal ⇒ identical structure
88
+ * and styles, so a pixel difference is render drift. */
89
+ structureHash: string;
90
+ /** Full document height, from CDP. Greater than viewport.height means part
91
+ * of the page was never captured — PR (b)'s `below-fold` flag reads this. */
92
+ contentHeight: number;
93
+ elements: StructureElement[];
94
+ truncated?: {
95
+ kept: number;
96
+ total: number;
97
+ };
47
98
  }
48
99
  export interface ChangedRegion {
49
100
  x: number;
@@ -51,6 +102,126 @@ export interface ChangedRegion {
51
102
  width: number;
52
103
  height: number;
53
104
  }
105
+ /** One changed fact between two structure snapshots. `el` is a short human
106
+ * label (`button[name="Save"]`, `div#row-1`, `div.card`, or a trimmed path). */
107
+ export type Delta = {
108
+ kind: 'text';
109
+ el: string;
110
+ from: string;
111
+ to: string;
112
+ } | {
113
+ kind: 'style';
114
+ el: string;
115
+ prop: string;
116
+ from: string;
117
+ to: string;
118
+ } | {
119
+ kind: 'attr';
120
+ el: string;
121
+ attr: 'src' | 'role' | 'name';
122
+ from: string;
123
+ to: string;
124
+ } | {
125
+ kind: 'added';
126
+ el: string;
127
+ rect: StructureRect;
128
+ } | {
129
+ kind: 'removed';
130
+ el: string;
131
+ rect: StructureRect;
132
+ } | {
133
+ kind: 'moved';
134
+ el: string;
135
+ dx: number;
136
+ dy: number;
137
+ } | {
138
+ kind: 'resized';
139
+ el: string;
140
+ dw: number;
141
+ dh: number;
142
+ }
143
+ /** ≥3 contiguous elements after `after` moved by the same (dx, dy). */
144
+ | {
145
+ kind: 'shift';
146
+ after: string;
147
+ dx: number;
148
+ dy: number;
149
+ count: number;
150
+ };
151
+ export type Classification = 'identical' | 'render-drift' | 'dimension-change' | 'element-added' | 'element-removed' | 'reflow' | 'geometry' | 'text-only' | 'style-only' | 'attr-only' | 'mixed' | 'unknown';
152
+ /** Sub-tags of `style-only`, so "colour tweak" and "spacing change" read
153
+ * differently at a glance. */
154
+ export type StyleTag = 'color' | 'typography' | 'spacing' | 'border' | 'effects';
155
+ export type Flag = 'element-removed' | 'text-changed' | 'large-reflow' | 'unexplained-pixels'
156
+ /** The images differ but the pixel diff marked nothing: the change is below
157
+ * its tolerance, and the structural deltas are the change. */
158
+ | 'sub-threshold' | 'structure-truncated' | 'no-baseline-structure' | 'no-current-structure'
159
+ /** Either side's content is taller than the viewport: changes below the
160
+ * fold are invisible to both pixels and structure. */
161
+ | 'below-fold';
162
+ export type CauseKind =
163
+ /** At least one changed file is in the story's import closure. */
164
+ 'in-closure'
165
+ /** A changed file reaches every story: a root lockfile or a platform config dir. */
166
+ | 'config'
167
+ /** The closure was traced and no changed file is in it: the strongest
168
+ * "this is not your code" the tool can give, especially beside render-drift. */
169
+ | 'none-in-closure'
170
+ /** No --since, no manifest, git failed, or the story is not in the graph. */
171
+ | 'unknown';
172
+ /** Why this story changed: the cheap link only (story → import closure →
173
+ * changed files). Matched CSS rules and source lines are later rows. */
174
+ export interface Cause {
175
+ kind: CauseKind;
176
+ /** At most 5, nearest first; posix paths relative to the project root. */
177
+ files: Array<{
178
+ path: string;
179
+ distance: number;
180
+ }>;
181
+ /** `in-closure` only: the closure was not fully traced (a bundled chunk
182
+ * with no src, or a changed file the manifest never names), so the cause
183
+ * may be a file not listed. Absent, never false, when the trace was full. */
184
+ partial?: true;
185
+ }
186
+ /** Tier-0: what changed, in a few hundred characters, with whether it
187
+ * explains every changed pixel. The whole output of `jux diff`. */
188
+ export interface StructuralVerdict {
189
+ schema: 'juxtapose.verdict/v1';
190
+ classification: Classification;
191
+ /** Empty unless classification is `style-only` or `mixed`. */
192
+ styleTags: StyleTag[];
193
+ /** Templated, deterministic, ≤ 300 chars. */
194
+ summary: string;
195
+ /** The change with every element reduced to role|tag and no per-story
196
+ * tail, ≤ 160 chars: what stories sharing a `signature` have in common.
197
+ * Absent when there are no deltas. */
198
+ change?: string;
199
+ /** At most 20, and only the prefix that keeps the whole verdict within
200
+ * 1,500 chars; `deltaCount` is the total. */
201
+ deltas: Delta[];
202
+ /** Counted after suppression: a child that only followed its parent's
203
+ * move or resize, and a style inherited from where it originated, are not
204
+ * deltas, nor is an added/removed element hidden by the other side's
205
+ * truncation; a shift run counts once. */
206
+ deltaCount: number;
207
+ /** Fraction of changed-region area intersecting some delta's element. */
208
+ coverage: number;
209
+ /** ≥ 0.98 | ≥ 0.5 | below. */
210
+ explained: 'full' | 'partial' | 'none';
211
+ /** The prefix that fits the 1,500-char verdict; `coverage` covers all. */
212
+ unexplainedRegions: ChangedRegion[];
213
+ flags: Flag[];
214
+ /** Present only in `jux run --since`; absent from `jux diff`. */
215
+ cause?: Cause;
216
+ /** sha256 over the classification and the delta set with elements
217
+ * abstracted to role|tag, so two pages with the same change share one.
218
+ * Over the same post-suppression facts `deltaCount` counts. */
219
+ signature: string;
220
+ /** The exact command for tier-3 pixels. */
221
+ escalate: {
222
+ command: string;
223
+ };
224
+ }
54
225
  export type DiffStatus = 'pass' | 'fail' | 'new' | 'stale' | 'skip';
55
226
  export interface DiffResult {
56
227
  storyId: string;
@@ -59,26 +230,72 @@ export interface DiffResult {
59
230
  mismatchPercent: number;
60
231
  /** Bounding boxes of changed clusters. Empty unless status is 'fail'. */
61
232
  changedRegions: ChangedRegion[];
233
+ /** The viewport the capture was taken at — what `changedRegions` coordinates
234
+ * are relative to. Absent only when the capture never produced a snapshot.
235
+ *
236
+ * Recording it here is what lets a consumer describe a region spatially
237
+ * without re-enumerating stories to recover a per-story viewport override,
238
+ * which is both slow and wrong when the override exists. */
239
+ viewport?: Viewport;
62
240
  /** Set when the capture or diff threw. status is 'fail' in that case. */
63
241
  error?: string;
242
+ /** Tier-0 explanation of a failure. Present only when status is 'fail' and
243
+ * the current capture produced a structure; never consulted on pass. */
244
+ structural?: StructuralVerdict;
64
245
  durationMs: number;
65
246
  }
247
+ /** One change seen on several stories: the same signature on ≥2 failing
248
+ * results. Listing them is what turns 40 handoffs into one decision;
249
+ * approving by group is a later row. */
250
+ export interface RunGroup {
251
+ signature: string;
252
+ /** The shared change, as `<change> — N stories`: the verdict's `change`
253
+ * (elements as role|tag), not one page's labelled summary. */
254
+ summary: string;
255
+ /** ≥ 2, code-unit sorted. */
256
+ storyIds: string[];
257
+ }
66
258
  export interface RunReport {
67
259
  runId: string;
68
260
  branch: string;
69
261
  commitSha: string;
262
+ /** What captured these pixels. Optional so a report written by an older
263
+ * version still parses. */
264
+ env?: CaptureEnv;
70
265
  /** How many stories we captured vs how many exist. */
71
266
  capturedCount: number;
72
267
  totalCount: number;
73
268
  results: DiffResult[];
74
269
  summary: Record<DiffStatus, number>;
270
+ /** Present when at least one signature is shared by ≥2 failing stories. */
271
+ groups?: RunGroup[];
75
272
  durationMs: number;
76
273
  startedAt: string;
77
274
  }
275
+ /** What rendered the pixels. Baselines from different environments are not
276
+ * comparable byte-for-byte, so recording this is what lets an all-red suite
277
+ * after a toolchain bump be reported as a bump rather than as N regressions. */
278
+ export interface CaptureEnv {
279
+ /** Playwright's `browser.version()`, e.g. "151.0.7922.34". */
280
+ browser: string;
281
+ /** `${platform}-${arch}`, e.g. "darwin-arm64". */
282
+ os: string;
283
+ /** libvips, which encodes the WebP. Measured to move bytes far more readily
284
+ * than the browser does: a libvips bump changed all 17 example baseline
285
+ * hashes with zero changed pixels, while Chromium 149 -> 151 left 16 of 18
286
+ * byte-identical. */
287
+ encoder: string;
288
+ }
78
289
  export interface ApprovalMeta {
79
290
  commit: string;
80
291
  approvedBy: string;
81
292
  approvedAt: string;
293
+ /** Absent on entries approved before this was recorded. Absent must not read
294
+ * as "matches": an unknown origin is unknown, not current. */
295
+ env?: CaptureEnv;
296
+ /** structureHash of the approved capture's sidecar. Absent when the capture
297
+ * had no structure, or was approved before sidecars existed. */
298
+ structureHash?: string;
82
299
  }
83
300
  export interface BaselineEntry extends ApprovalMeta {
84
301
  /** sha256 of the baseline image bytes. Detects drift between manifest
@@ -91,10 +308,20 @@ export interface BaselineManifest {
91
308
  version: 1;
92
309
  baselines: Record<string, BaselineEntry>;
93
310
  }
311
+ /** One page for the `urls` platform. */
312
+ export interface UrlEntry {
313
+ /** Stable id; used as the story id and for file names. */
314
+ id: string;
315
+ /** Absolute, or relative to --origin. */
316
+ url: string;
317
+ params?: StoryParams;
318
+ }
94
319
  /** Project config, from juxtapose.config.{ts,js,json} or package.json#juxtapose. */
95
320
  export interface ProjectConfig {
96
321
  /** Which workbench. Autodetected when omitted. */
97
- platform?: 'storybook' | 'ladle';
322
+ platform?: 'storybook' | 'ladle' | 'urls';
323
+ /** Pages to capture when `platform` is 'urls'. */
324
+ urls?: UrlEntry[];
98
325
  /** Where the built static workbench lives. */
99
326
  buildDir?: string;
100
327
  /** Capture against an already-running dev server instead of building. */
@@ -110,8 +337,6 @@ export interface ProjectConfig {
110
337
  viewport?: Viewport;
111
338
  threshold?: number;
112
339
  minDiffPercent?: number;
113
- /** Glob patterns of story ids to never capture. */
114
- ignore?: string[];
115
340
  storage?: StorageConfig;
116
341
  }
117
342
  export type StorageConfig = {
@@ -134,4 +359,10 @@ export interface BaselineStore {
134
359
  remove(storyId: string): Promise<void>;
135
360
  readManifest(): Promise<BaselineManifest>;
136
361
  writeManifest(manifest: BaselineManifest): Promise<void>;
362
+ /** Optional: stores that can hold the gzipped structure sidecar. */
363
+ putStructure?(storyId: string, gz: Buffer): Promise<void>;
364
+ getStructure?(storyId: string): Promise<Buffer | null>;
365
+ /** Optional: where the baseline image lives on disk, for stores that keep
366
+ * one. The handoff hands it to `jux diff … --crops`. */
367
+ locate?(storyId: string): string | undefined;
137
368
  }
@@ -1,8 +1,8 @@
1
- import type { Page } from 'playwright';
1
+ import type { Page } from './browser/page.js';
2
2
  /**
3
3
  * Build a `showStory` implementation from a URL builder.
4
4
  *
5
- * Note `waitUntil: 'load'` rather than `networkidle`: the platform's own
5
+ * `page.goto` resolves on the main frame's `load`, not network idle: the platform's own
6
6
  * render signal and core's settle pipeline decide when the page is actually
7
7
  * ready. Waiting for network idle here would be both slower and less reliable
8
8
  * — a story that polls would never satisfy it.
@@ -9,14 +9,14 @@
9
9
  /**
10
10
  * Build a `showStory` implementation from a URL builder.
11
11
  *
12
- * Note `waitUntil: 'load'` rather than `networkidle`: the platform's own
12
+ * `page.goto` resolves on the main frame's `load`, not network idle: the platform's own
13
13
  * render signal and core's settle pipeline decide when the page is actually
14
14
  * ready. Waiting for network idle here would be both slower and less reliable
15
15
  * — a story that polls would never satisfy it.
16
16
  */
17
17
  export function navigateToStory(storyUrl) {
18
18
  return async (page, storyId, baseUrl) => {
19
- await page.goto(storyUrl(baseUrl, storyId), { waitUntil: 'load' });
19
+ await page.goto(storyUrl(baseUrl, storyId));
20
20
  };
21
21
  }
22
22
  //# sourceMappingURL=url-platform.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"url-platform.js","sourceRoot":"","sources":["../src/url-platform.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,8CAA8C;AAC9C,EAAE;AACF,uEAAuE;AACvE,oEAAoE;AAIpE;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,QAAsD;IAEtD,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;QACtC,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;IACrE,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"url-platform.js","sourceRoot":"","sources":["../src/url-platform.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,8CAA8C;AAC9C,EAAE;AACF,uEAAuE;AACvE,oEAAoE;AAIpE;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,QAAsD;IAEtD,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;QACtC,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,16 +1,28 @@
1
1
  {
2
2
  "name": "@juxtapose/core",
3
- "version": "0.2.0",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "description": "Platform-agnostic capture, diff, baseline and analysis core for juxtapose.",
6
+ "keywords": [
7
+ "visual-regression",
8
+ "screenshot-testing",
9
+ "cdp",
10
+ "visual-testing",
11
+ "pixelmatch"
12
+ ],
13
+ "homepage": "https://github.com/juxtapose-dev/juxtapose/tree/main/packages/core#readme",
6
14
  "publishConfig": {
7
15
  "access": "public"
8
16
  },
9
17
  "license": "MIT",
18
+ "engines": {
19
+ "node": ">=22.2.0"
20
+ },
10
21
  "main": "./dist/index.js",
11
22
  "types": "./dist/index.d.ts",
12
23
  "exports": {
13
24
  ".": "./dist/index.js",
25
+ "./format": "./dist/report/format.js",
14
26
  "./package.json": "./package.json"
15
27
  },
16
28
  "files": [
@@ -18,15 +30,7 @@
18
30
  ],
19
31
  "dependencies": {
20
32
  "pixelmatch": "^6.0.0",
21
- "sharp": "^0.33.5"
22
- },
23
- "peerDependencies": {
24
- "playwright": "^1.48.0"
25
- },
26
- "peerDependenciesMeta": {
27
- "playwright": {
28
- "optional": true
29
- }
33
+ "sharp": "^0.35.3"
30
34
  },
31
35
  "devDependencies": {
32
36
  "@types/pixelmatch": "^5.2.6"