@enhance-eng/sdk 0.1.158 → 0.1.160

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.
@@ -16,7 +16,8 @@ var __enhance_capture_kernel__ = (function(exports) {
16
16
  v10: 10,
17
17
  v11: 11,
18
18
  v12: 12,
19
- v13: 13
19
+ v13: 13,
20
+ v14: 14
20
21
  };
21
22
  const LEGACY_CANVAS_ADAPTATIONS = {
22
23
  [LEGACY_CANVAS_FORMATS.v1]: "layout",
@@ -31,7 +32,8 @@ var __enhance_capture_kernel__ = (function(exports) {
31
32
  [LEGACY_CANVAS_FORMATS.v10]: "geometry",
32
33
  [LEGACY_CANVAS_FORMATS.v11]: "css",
33
34
  [LEGACY_CANVAS_FORMATS.v12]: "text-shadow-blend",
34
- [LEGACY_CANVAS_FORMATS.v13]: "format-number"
35
+ [LEGACY_CANVAS_FORMATS.v13]: "format-number",
36
+ [LEGACY_CANVAS_FORMATS.v14]: "format-number"
35
37
  };
36
38
  //#endregion
37
39
  //#region ../canvas-format/src/canvas-edit-support.lib.ts
@@ -289,7 +291,7 @@ var __enhance_capture_kernel__ = (function(exports) {
289
291
  };
290
292
  //#endregion
291
293
  //#region ../canvas-format/src/canvas-format.lib.ts
292
- const READABLE_FORMATS = /* @__PURE__ */ new Set([...Object.values(LEGACY_CANVAS_FORMATS), 14]);
294
+ const READABLE_FORMATS = /* @__PURE__ */ new Set([...Object.values(LEGACY_CANVAS_FORMATS), 15]);
293
295
  const isReadableCanvasFormat = (version) => READABLE_FORMATS.has(version);
294
296
  /** Formats whose adaptation rewrites the stored document in place, keeping its geometry. */
295
297
  const ADAPTED_IN_PLACE = /* @__PURE__ */ new Set([
@@ -313,20 +315,20 @@ var __enhance_capture_kernel__ = (function(exports) {
313
315
  const adaptLegacyFormat = (document) => {
314
316
  const version = document["version"];
315
317
  if (!isReadableCanvasFormat(version)) return null;
316
- if (version === 14 || !isRecord$2(document["nodes"])) return document;
318
+ if (version === 15 || !isRecord$2(document["nodes"])) return document;
317
319
  const adaptation = Object.entries(LEGACY_CANVAS_ADAPTATIONS).find(([format]) => Number(format) === version)?.[1];
318
320
  if (ADAPTED_IN_PLACE.has(adaptation)) return {
319
321
  ...document,
320
- version: 14
322
+ version: 15
321
323
  };
322
324
  if (Object.values(document["nodes"]).some((node) => isRecord$2(node) && node["geometry"] !== void 0)) return null;
323
325
  if (adaptation === "typography") return {
324
326
  ...document,
325
- version: 14
327
+ version: 15
326
328
  };
327
329
  return {
328
330
  ...document,
329
- version: 14,
331
+ version: 15,
330
332
  nodes: Object.fromEntries(Object.entries(document["nodes"]).map(([id, node]) => [id, isRecord$2(node) && node["layout"] !== void 0 ? {
331
333
  ...node,
332
334
  layout: legacyLayout(node["layout"])
@@ -334,15 +336,15 @@ var __enhance_capture_kernel__ = (function(exports) {
334
336
  };
335
337
  };
336
338
  /**
337
- * Adapt known formats in memory, retaining malformed content for each boundary's validator. Format
338
- * 13 differs from the current format only in that its layers cannot hold a box baseline source, so
339
- * it takes only the new format number. Format 12 already has the CSS model, so it takes only the
339
+ * Adapt known formats in memory, retaining malformed content for each boundary's validator. Formats
340
+ * 13 and 14 differ from the current format only in the optional facts their layers cannot hold, so
341
+ * they take only the new format number. Format 12 already has the CSS model, so it takes only the
340
342
  * text shadow step that every older format takes after the CSS adaptation.
341
343
  */
342
344
  const adaptCanvasDocumentFormat = (document) => {
343
345
  const adapted = adaptLegacyFormat(document);
344
346
  if (adapted === null || adapted === document) return adapted;
345
- if (document["version"] === LEGACY_CANVAS_FORMATS.v13) return adapted;
347
+ if (document["version"] === LEGACY_CANVAS_FORMATS.v13 || document["version"] === LEGACY_CANVAS_FORMATS.v14) return adapted;
346
348
  return withoutTextShadowBlends(document["version"] === LEGACY_CANVAS_FORMATS.v12 ? adapted : adaptCanvasCss(adapted));
347
349
  };
348
350
  //#endregion
@@ -5433,6 +5435,22 @@ progression: object$1({
5433
5435
  overflowClip: literal$1(true).optional(),
5434
5436
  lineAboveBorderBottom: canvasNumberSchema.optional()
5435
5437
  }).strict();
5438
+ /** The room a scroll container keeps for its scrollbars, per side, as conversion measured it. */
5439
+ const canvasScrollbarGutterSchema = object$1({
5440
+ top: nonNegativeCanvasNumberSchema.optional(),
5441
+ right: nonNegativeCanvasNumberSchema.optional(),
5442
+ bottom: nonNegativeCanvasNumberSchema.optional(),
5443
+ left: nonNegativeCanvasNumberSchema.optional()
5444
+ }).strict();
5445
+ /** A percentage of the containing block plus pixels; unlike a size limit, either may be negative. */
5446
+ const canvasParentRelativeCoordinateSchema = object$1({
5447
+ ratio: canvasNumberSchema,
5448
+ offset: canvasNumberSchema.optional()
5449
+ }).strict();
5450
+ const canvasPositionParentSchema = object$1({
5451
+ x: canvasParentRelativeCoordinateSchema.optional(),
5452
+ y: canvasParentRelativeCoordinateSchema.optional()
5453
+ }).strict();
5436
5454
  const canvasNodeLayoutSchema = object$1({
5437
5455
  rotation: canvasNumberSchema.optional(),
5438
5456
  flipHorizontal: boolean$1().optional(),
@@ -5469,10 +5487,12 @@ progression: object$1({
5469
5487
  canvasParentSizeBoundSchema
5470
5488
  ]).optional(),
5471
5489
  flowOffset: canvasFlowOffsetSchema.optional(),
5490
+ positionParent: canvasPositionParentSchema.optional(),
5472
5491
  order: canvasNumberSchema.int().optional(),
5473
5492
  margin: canvasFlexMarginSchema.partial().optional(),
5474
5493
  clipContent: boolean$1().optional(),
5475
5494
  baselineSource: canvasBaselineSourceSchema.optional(),
5495
+ scrollbarGutter: canvasScrollbarGutterSchema.optional(),
5476
5496
  container: canvasFlexLayoutSchema.partial().extend({ padding: canvasFlexPaddingSchema.partial().optional() }).optional()
5477
5497
  }).strict();
5478
5498
  //#endregion
@@ -6102,7 +6122,7 @@ progression: object$1({
6102
6122
  //#endregion
6103
6123
  //#region ../contract/src/canvas/canvas-scene.schema.ts
6104
6124
  const CANVAS_COMPOSITING_RETIRED = "Update Enhance: compositing is no longer supported. Use the isolation style or a mask group.";
6105
- const canvasDocumentFormatSchema = literal$1(14, { error: "This editor uses an unsupported document format. Update the editor before changing this canvas." });
6125
+ const canvasDocumentFormatSchema = literal$1(15, { error: "This editor uses an unsupported document format. Update the editor before changing this canvas." });
6106
6126
  object$1({
6107
6127
  signature: string$1().regex(/^[a-f0-9]{16}$/u),
6108
6128
  /** The captured picture of the page's text, inline as written or as its canvas image store path. */
@@ -6153,7 +6173,7 @@ progression: object$1({
6153
6173
  box: canvasSceneBoxSchema.optional()
6154
6174
  });
6155
6175
  const canvasSceneDocumentSchema = object$1({
6156
- version: literal$1(14),
6176
+ version: literal$1(15),
6157
6177
  nodes: record(string$1(), canvasSceneNodeSchema),
6158
6178
  relationships: record(string$1(), object$1({
6159
6179
  parentId: string$1().min(1),
@@ -6169,7 +6189,7 @@ progression: object$1({
6169
6189
  return adaptCanvasDocumentFormat(blob);
6170
6190
  }, canvasSceneDocumentSchema);
6171
6191
  const emptyCanvasSceneDocument = () => ({
6172
- version: 14,
6192
+ version: 15,
6173
6193
  nodes: { root: {
6174
6194
  id: "root",
6175
6195
  label: "Canvas",
@@ -7404,7 +7424,7 @@ progression: object$1({
7404
7424
  kind: string$1().min(1).max(100),
7405
7425
  parentId: string$1().min(1).nullable(),
7406
7426
  childCount: number$2().int().min(0),
7407
- box: canvasWorldBoundsSchema.nullable(),
7427
+ box: canvasSceneBoxSchema.nullable(),
7408
7428
  propertySections: array$1(canvasPropertySectionSchema)
7409
7429
  });
7410
7430
  object$1({ canvasId: uuid$1() });
@@ -7415,7 +7435,7 @@ progression: object$1({
7415
7435
  version: number$2().int().positive(),
7416
7436
  nodeCount: number$2().int().min(0),
7417
7437
  rootChildCount: number$2().int().min(0),
7418
- bounds: canvasWorldBoundsSchema.nullable(),
7438
+ bounds: canvasSceneBoxSchema.nullable(),
7419
7439
  kinds: record(string$1(), number$2().int().min(0)),
7420
7440
  next: array$1(string$1().min(1))
7421
7441
  });
@@ -1,4 +1,4 @@
1
- import { c as CaptureArtifact, f as CaptureReceipt, h as beginCaptureRunInputSchema, l as CaptureBlob, m as CaptureVerdict, n as captureReferenceSchema, p as CaptureRunDescriptor, r as updateCaptureReferenceInputSchema, s as BeginCaptureRunInput, t as CaptureReview, v as getCaptureRunOutputSchema } from "./index-7uzK6oto.mjs";
1
+ import { c as CaptureArtifact, f as CaptureReceipt, h as beginCaptureRunInputSchema, l as CaptureBlob, m as CaptureVerdict, n as captureReferenceSchema, p as CaptureRunDescriptor, r as updateCaptureReferenceInputSchema, s as BeginCaptureRunInput, t as CaptureReview, v as getCaptureRunOutputSchema } from "./index-CDKItTQW.mjs";
2
2
  import { z } from "zod";
3
3
  //#region src/core/not-uploaded.types.d.ts
4
4
  /** A file the SDK gave up uploading, named by its address or by the capture it belongs to. */
@@ -1,4 +1,4 @@
1
- import { A as captureSelection, C as isCaptureError, E as updateCaptureReferenceInputSchema, H as captureRunDescriptorSchema, L as beginCaptureRunInputSchema, R as beginCaptureRunOutputSchema, S as captureError, T as captureReviewSchema, U as getCaptureRunOutputSchema, W as reserveCaptureBlobsOutputSchema, _ as writeCapturePayload, a as requestOutcomeOf, d as captureDiagnostics, g as writeCaptureJson, h as writeCaptureBlob, j as mergeCaptureManifests, k as captureBlobs, m as verifiedCaptureBlobPath, n as retrying, o as retryAfterMsOf, p as readCaptureManifest, t as startStallWatch, w as captureReferenceSchema, x as captureManifestDigest } from "./stall-watch.lib-C6VmIsz-.mjs";
1
+ import { A as captureSelection, C as isCaptureError, E as updateCaptureReferenceInputSchema, H as captureRunDescriptorSchema, L as beginCaptureRunInputSchema, R as beginCaptureRunOutputSchema, S as captureError, T as captureReviewSchema, U as getCaptureRunOutputSchema, W as reserveCaptureBlobsOutputSchema, _ as writeCapturePayload, a as requestOutcomeOf, d as captureDiagnostics, g as writeCaptureJson, h as writeCaptureBlob, j as mergeCaptureManifests, k as captureBlobs, m as verifiedCaptureBlobPath, n as retrying, o as retryAfterMsOf, p as readCaptureManifest, t as startStallWatch, w as captureReferenceSchema, x as captureManifestDigest } from "./stall-watch.lib-qRMMj0yg.mjs";
2
2
  import { z } from "zod";
3
3
  import process from "node:process";
4
4
  import { mkdir } from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import { H as captureRunDescriptorSchema, S as captureError } from "./stall-watch.lib-C6VmIsz-.mjs";
1
+ import { H as captureRunDescriptorSchema, S as captureError } from "./stall-watch.lib-qRMMj0yg.mjs";
2
2
  import process from "node:process";
3
3
  import { readFile } from "node:fs/promises";
4
4
  import nodePath from "node:path";
package/dist/client.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as createEnhance, i as PublishManifestOptions, n as CaptureRun, o as CapturePublication, r as EnhanceClient, s as CaptureClientOptions, t as BeginCaptureRun } from "./capture-client.client--zU5zvd3.mjs";
1
+ import { a as createEnhance, i as PublishManifestOptions, n as CaptureRun, o as CapturePublication, r as EnhanceClient, s as CaptureClientOptions, t as BeginCaptureRun } from "./capture-client.client-B5R1OWuh.mjs";
2
2
  export { BeginCaptureRun, type CaptureClientOptions, type CapturePublication, CaptureRun, EnhanceClient, PublishManifestOptions, createEnhance };
package/dist/client.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as createEnhance } from "./capture-client.client-YvUy2nGh.mjs";
1
+ import { t as createEnhance } from "./capture-client.client-Dztj8uko.mjs";
2
2
  export { createEnhance };
@@ -1,4 +1,4 @@
1
- import { r as EnhanceClient, s as CaptureClientOptions$1 } from "./capture-client.client--zU5zvd3.mjs";
1
+ import { r as EnhanceClient, s as CaptureClientOptions$1 } from "./capture-client.client-B5R1OWuh.mjs";
2
2
  //#region src/node/environment.config.d.ts
3
3
  type CaptureEnvironment = 'local' | 'development' | 'production';
4
4
  interface CaptureConnectionOptions {
@@ -1,6 +1,6 @@
1
- import { S as captureError } from "./stall-watch.lib-C6VmIsz-.mjs";
2
- import { t as version } from "./package-VWmCi21a.mjs";
3
- import { t as createEnhance$1 } from "./capture-client.client-YvUy2nGh.mjs";
1
+ import { S as captureError } from "./stall-watch.lib-qRMMj0yg.mjs";
2
+ import { t as version } from "./package-Ea2ntT4R.mjs";
3
+ import { t as createEnhance$1 } from "./capture-client.client-Dztj8uko.mjs";
4
4
  import process from "node:process";
5
5
  //#region src/node/environment.config.ts
6
6
  const endpoints = {
@@ -166,8 +166,8 @@ declare const captureManifestSchema: z.ZodObject<{
166
166
  status: z.ZodEnum<{
167
167
  passed: "passed";
168
168
  failed: "failed";
169
- skipped: "skipped";
170
169
  interrupted: "interrupted";
170
+ skipped: "skipped";
171
171
  timedOut: "timedOut";
172
172
  }>;
173
173
  title: z.ZodOptional<z.ZodString>;
@@ -247,8 +247,8 @@ declare const captureManifestSchema: z.ZodObject<{
247
247
  status: z.ZodEnum<{
248
248
  passed: "passed";
249
249
  failed: "failed";
250
- skipped: "skipped";
251
250
  interrupted: "interrupted";
251
+ skipped: "skipped";
252
252
  timedOut: "timedOut";
253
253
  }>;
254
254
  title: z.ZodOptional<z.ZodString>;
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { _ as captureManifestSchema, a as mergeCaptureManifests, c as CaptureArtifact, d as CaptureManifest, f as CaptureReceipt, g as captureArtifactSchema, i as captureSelection, m as CaptureVerdict, o as selectedCaptures, p as CaptureRunDescriptor, t as CaptureReview, u as CaptureLeftOut } from "./index-7uzK6oto.mjs";
2
- import { c as CapturePayload, l as NotUploadedFile, n as CaptureRun, r as EnhanceClient, t as BeginCaptureRun } from "./capture-client.client--zU5zvd3.mjs";
3
- import { i as createEnhance, r as CaptureEnvironment, t as CaptureClientOptions } from "./environment.config-Dx5WHap5.mjs";
1
+ import { _ as captureManifestSchema, a as mergeCaptureManifests, c as CaptureArtifact, d as CaptureManifest, f as CaptureReceipt, g as captureArtifactSchema, i as captureSelection, m as CaptureVerdict, o as selectedCaptures, p as CaptureRunDescriptor, t as CaptureReview, u as CaptureLeftOut } from "./index-CDKItTQW.mjs";
2
+ import { c as CapturePayload, l as NotUploadedFile, n as CaptureRun, r as EnhanceClient, t as BeginCaptureRun } from "./capture-client.client-B5R1OWuh.mjs";
3
+ import { i as createEnhance, r as CaptureEnvironment, t as CaptureClientOptions } from "./environment.config-30cIR7iz.mjs";
4
4
  //#region src/core/capture-error.error.d.ts
5
5
  type CaptureErrorCode = 'configuration' | 'capture' | 'artifact' | 'authorization' | 'conversion' | 'conflict' | 'pending' | 'transport';
6
6
  interface CaptureError extends Error {
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { A as captureSelection, M as selectedCaptures, V as captureManifestSchema, j as mergeCaptureManifests, z as captureArtifactSchema } from "./stall-watch.lib-C6VmIsz-.mjs";
2
- import { t as createEnhance } from "./environment.config-B2WQJWaS.mjs";
1
+ import { A as captureSelection, M as selectedCaptures, V as captureManifestSchema, j as mergeCaptureManifests, z as captureArtifactSchema } from "./stall-watch.lib-qRMMj0yg.mjs";
2
+ import { t as createEnhance } from "./environment.config-BorTlECV.mjs";
3
3
  export { captureArtifactSchema, captureManifestSchema, captureSelection, createEnhance, mergeCaptureManifests, selectedCaptures };
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.1.158";
2
+ var version = "0.1.160";
3
3
  //#endregion
4
4
  export { version as t };
@@ -1,4 +1,4 @@
1
- import "../index-7uzK6oto.mjs";
1
+ import "../index-CDKItTQW.mjs";
2
2
  import { Page } from "@playwright/test";
3
3
  //#region src/playwright/capture-page.lib.d.ts
4
4
  interface CaptureStepOptions {
@@ -1,6 +1,6 @@
1
- import { D as fitCaptureNames, F as filesNotCopiedIssue, I as pageNotSettledIssue, N as canonicalCaptureJson, O as leftOutCapture, P as CAPTURE_LEFT_OUT_REASONS, S as captureError, _ as writeCapturePayload, a as requestOutcomeOf, b as captureFileDigest, c as isReplayAssetContentType, d as captureDiagnostics, f as placeCaptureFile, h as writeCaptureBlob, i as requestFailureOfTransfer, l as inlineDataAssetReference, n as retrying, r as requestFailureOfReply, s as collectCssAssetUrls, t as startStallWatch, u as captureBlobPath, v as writeCaptureStream, y as captureBlobDigest, z as captureArtifactSchema } from "../stall-watch.lib-C6VmIsz-.mjs";
2
- import { t as version } from "../package-VWmCi21a.mjs";
3
- import { n as awaitCaptureRun, r as captureContextDirectory, t as LEFT_OUT_ATTACHMENT } from "../capture-context.lib-BivWcwWc.mjs";
1
+ import { D as fitCaptureNames, F as filesNotCopiedIssue, I as pageNotSettledIssue, N as canonicalCaptureJson, O as leftOutCapture, P as CAPTURE_LEFT_OUT_REASONS, S as captureError, _ as writeCapturePayload, a as requestOutcomeOf, b as captureFileDigest, c as isReplayAssetContentType, d as captureDiagnostics, f as placeCaptureFile, h as writeCaptureBlob, i as requestFailureOfTransfer, l as inlineDataAssetReference, n as retrying, r as requestFailureOfReply, s as collectCssAssetUrls, t as startStallWatch, u as captureBlobPath, v as writeCaptureStream, y as captureBlobDigest, z as captureArtifactSchema } from "../stall-watch.lib-qRMMj0yg.mjs";
2
+ import { t as version } from "../package-Ea2ntT4R.mjs";
3
+ import { n as awaitCaptureRun, r as captureContextDirectory, t as LEFT_OUT_ATTACHMENT } from "../capture-context.lib-Brfs-7h6.mjs";
4
4
  import { mkdir, mkdtemp, readFile, rm, stat, writeFile } from "node:fs/promises";
5
5
  import nodePath from "node:path";
6
6
  import { openAsBlob } from "node:fs";
@@ -1,6 +1,6 @@
1
- import { p as CaptureRunDescriptor } from "../index-7uzK6oto.mjs";
2
- import { t as BeginCaptureRun } from "../capture-client.client--zU5zvd3.mjs";
3
- import { n as CaptureConnectionOptions } from "../environment.config-Dx5WHap5.mjs";
1
+ import { p as CaptureRunDescriptor } from "../index-CDKItTQW.mjs";
2
+ import { t as BeginCaptureRun } from "../capture-client.client-B5R1OWuh.mjs";
3
+ import { n as CaptureConnectionOptions } from "../environment.config-30cIR7iz.mjs";
4
4
  import { Reporter } from "@playwright/test/reporter";
5
5
  //#region src/playwright/capture-reporter.lib.d.ts
6
6
  interface EnhanceReporterOptions extends CaptureConnectionOptions, Omit<BeginCaptureRun, 'runKey'> {
@@ -1,6 +1,6 @@
1
- import { B as captureLeftOutSchema, C as isCaptureError, D as fitCaptureNames, O as leftOutCapture, P as CAPTURE_LEFT_OUT_REASONS, d as captureDiagnostics, g as writeCaptureJson, z as captureArtifactSchema } from "../stall-watch.lib-C6VmIsz-.mjs";
2
- import { t as createEnhance } from "../environment.config-B2WQJWaS.mjs";
3
- import { i as setCaptureDirectory } from "../capture-context.lib-BivWcwWc.mjs";
1
+ import { B as captureLeftOutSchema, C as isCaptureError, D as fitCaptureNames, O as leftOutCapture, P as CAPTURE_LEFT_OUT_REASONS, d as captureDiagnostics, g as writeCaptureJson, z as captureArtifactSchema } from "../stall-watch.lib-qRMMj0yg.mjs";
2
+ import { t as createEnhance } from "../environment.config-BorTlECV.mjs";
3
+ import { i as setCaptureDirectory } from "../capture-context.lib-Brfs-7h6.mjs";
4
4
  import process from "node:process";
5
5
  import { mkdir, readFile } from "node:fs/promises";
6
6
  import nodePath from "node:path";
@@ -842,7 +842,8 @@ const LEGACY_CANVAS_FORMATS = {
842
842
  v10: 10,
843
843
  v11: 11,
844
844
  v12: 12,
845
- v13: 13
845
+ v13: 13,
846
+ v14: 14
846
847
  };
847
848
  const LEGACY_CANVAS_ADAPTATIONS = {
848
849
  [LEGACY_CANVAS_FORMATS.v1]: "layout",
@@ -857,7 +858,8 @@ const LEGACY_CANVAS_ADAPTATIONS = {
857
858
  [LEGACY_CANVAS_FORMATS.v10]: "geometry",
858
859
  [LEGACY_CANVAS_FORMATS.v11]: "css",
859
860
  [LEGACY_CANVAS_FORMATS.v12]: "text-shadow-blend",
860
- [LEGACY_CANVAS_FORMATS.v13]: "format-number"
861
+ [LEGACY_CANVAS_FORMATS.v13]: "format-number",
862
+ [LEGACY_CANVAS_FORMATS.v14]: "format-number"
861
863
  };
862
864
  //#endregion
863
865
  //#region ../canvas-format/src/canvas-edit-support.lib.ts
@@ -1115,7 +1117,7 @@ const withoutTextShadowBlends = (document) => {
1115
1117
  };
1116
1118
  //#endregion
1117
1119
  //#region ../canvas-format/src/canvas-format.lib.ts
1118
- const READABLE_FORMATS = /* @__PURE__ */ new Set([...Object.values(LEGACY_CANVAS_FORMATS), 14]);
1120
+ const READABLE_FORMATS = /* @__PURE__ */ new Set([...Object.values(LEGACY_CANVAS_FORMATS), 15]);
1119
1121
  const isReadableCanvasFormat = (version) => READABLE_FORMATS.has(version);
1120
1122
  /** Formats whose adaptation rewrites the stored document in place, keeping its geometry. */
1121
1123
  const ADAPTED_IN_PLACE = /* @__PURE__ */ new Set([
@@ -1139,20 +1141,20 @@ const legacyLayout = (layout) => {
1139
1141
  const adaptLegacyFormat = (document) => {
1140
1142
  const version = document["version"];
1141
1143
  if (!isReadableCanvasFormat(version)) return null;
1142
- if (version === 14 || !isRecord(document["nodes"])) return document;
1144
+ if (version === 15 || !isRecord(document["nodes"])) return document;
1143
1145
  const adaptation = Object.entries(LEGACY_CANVAS_ADAPTATIONS).find(([format]) => Number(format) === version)?.[1];
1144
1146
  if (ADAPTED_IN_PLACE.has(adaptation)) return {
1145
1147
  ...document,
1146
- version: 14
1148
+ version: 15
1147
1149
  };
1148
1150
  if (Object.values(document["nodes"]).some((node) => isRecord(node) && node["geometry"] !== void 0)) return null;
1149
1151
  if (adaptation === "typography") return {
1150
1152
  ...document,
1151
- version: 14
1153
+ version: 15
1152
1154
  };
1153
1155
  return {
1154
1156
  ...document,
1155
- version: 14,
1157
+ version: 15,
1156
1158
  nodes: Object.fromEntries(Object.entries(document["nodes"]).map(([id, node]) => [id, isRecord(node) && node["layout"] !== void 0 ? {
1157
1159
  ...node,
1158
1160
  layout: legacyLayout(node["layout"])
@@ -1160,15 +1162,15 @@ const adaptLegacyFormat = (document) => {
1160
1162
  };
1161
1163
  };
1162
1164
  /**
1163
- * Adapt known formats in memory, retaining malformed content for each boundary's validator. Format
1164
- * 13 differs from the current format only in that its layers cannot hold a box baseline source, so
1165
- * it takes only the new format number. Format 12 already has the CSS model, so it takes only the
1165
+ * Adapt known formats in memory, retaining malformed content for each boundary's validator. Formats
1166
+ * 13 and 14 differ from the current format only in the optional facts their layers cannot hold, so
1167
+ * they take only the new format number. Format 12 already has the CSS model, so it takes only the
1166
1168
  * text shadow step that every older format takes after the CSS adaptation.
1167
1169
  */
1168
1170
  const adaptCanvasDocumentFormat = (document) => {
1169
1171
  const adapted = adaptLegacyFormat(document);
1170
1172
  if (adapted === null || adapted === document) return adapted;
1171
- if (document["version"] === LEGACY_CANVAS_FORMATS.v13) return adapted;
1173
+ if (document["version"] === LEGACY_CANVAS_FORMATS.v13 || document["version"] === LEGACY_CANVAS_FORMATS.v14) return adapted;
1172
1174
  return withoutTextShadowBlends(document["version"] === LEGACY_CANVAS_FORMATS.v12 ? adapted : adaptCanvasCss(adapted));
1173
1175
  };
1174
1176
  z.strictObject({});
@@ -1691,6 +1693,22 @@ const canvasBaselineSourceSchema = z.object({
1691
1693
  overflowClip: z.literal(true).optional(),
1692
1694
  lineAboveBorderBottom: canvasNumberSchema.optional()
1693
1695
  }).strict();
1696
+ /** The room a scroll container keeps for its scrollbars, per side, as conversion measured it. */
1697
+ const canvasScrollbarGutterSchema = z.object({
1698
+ top: nonNegativeCanvasNumberSchema.optional(),
1699
+ right: nonNegativeCanvasNumberSchema.optional(),
1700
+ bottom: nonNegativeCanvasNumberSchema.optional(),
1701
+ left: nonNegativeCanvasNumberSchema.optional()
1702
+ }).strict();
1703
+ /** A percentage of the containing block plus pixels; unlike a size limit, either may be negative. */
1704
+ const canvasParentRelativeCoordinateSchema = z.object({
1705
+ ratio: canvasNumberSchema,
1706
+ offset: canvasNumberSchema.optional()
1707
+ }).strict();
1708
+ const canvasPositionParentSchema = z.object({
1709
+ x: canvasParentRelativeCoordinateSchema.optional(),
1710
+ y: canvasParentRelativeCoordinateSchema.optional()
1711
+ }).strict();
1694
1712
  const canvasNodeLayoutSchema = z.object({
1695
1713
  rotation: canvasNumberSchema.optional(),
1696
1714
  flipHorizontal: z.boolean().optional(),
@@ -1727,10 +1745,12 @@ const canvasNodeLayoutSchema = z.object({
1727
1745
  canvasParentSizeBoundSchema
1728
1746
  ]).optional(),
1729
1747
  flowOffset: canvasFlowOffsetSchema.optional(),
1748
+ positionParent: canvasPositionParentSchema.optional(),
1730
1749
  order: canvasNumberSchema.int().optional(),
1731
1750
  margin: canvasFlexMarginSchema.partial().optional(),
1732
1751
  clipContent: z.boolean().optional(),
1733
1752
  baselineSource: canvasBaselineSourceSchema.optional(),
1753
+ scrollbarGutter: canvasScrollbarGutterSchema.optional(),
1734
1754
  container: canvasFlexLayoutSchema.partial().extend({ padding: canvasFlexPaddingSchema.partial().optional() }).optional()
1735
1755
  }).strict();
1736
1756
  //#endregion
@@ -2363,7 +2383,7 @@ const canvasGeometrySchema = z.discriminatedUnion("kind", [
2363
2383
  //#endregion
2364
2384
  //#region ../contract/src/canvas/canvas-scene.schema.ts
2365
2385
  const CANVAS_COMPOSITING_RETIRED = "Update Enhance: compositing is no longer supported. Use the isolation style or a mask group.";
2366
- const canvasDocumentFormatSchema = z.literal(14, { error: "This editor uses an unsupported document format. Update the editor before changing this canvas." });
2386
+ const canvasDocumentFormatSchema = z.literal(15, { error: "This editor uses an unsupported document format. Update the editor before changing this canvas." });
2367
2387
  z.object({
2368
2388
  signature: z.string().regex(/^[a-f0-9]{16}$/u),
2369
2389
  /** The captured picture of the page's text, inline as written or as its canvas image store path. */
@@ -2414,7 +2434,7 @@ const canvasSceneNodeSchema = z.looseObject({
2414
2434
  box: canvasSceneBoxSchema.optional()
2415
2435
  });
2416
2436
  const canvasSceneDocumentSchema = z.object({
2417
- version: z.literal(14),
2437
+ version: z.literal(15),
2418
2438
  nodes: z.record(z.string(), canvasSceneNodeSchema),
2419
2439
  relationships: z.record(z.string(), z.object({
2420
2440
  parentId: z.string().min(1),
@@ -2430,7 +2450,7 @@ z.preprocess((value) => {
2430
2450
  return adaptCanvasDocumentFormat(blob);
2431
2451
  }, canvasSceneDocumentSchema);
2432
2452
  const emptyCanvasSceneDocument = () => ({
2433
- version: 14,
2453
+ version: 15,
2434
2454
  nodes: { root: {
2435
2455
  id: "root",
2436
2456
  label: "Canvas",
@@ -3670,7 +3690,7 @@ const canvasInspectNodeSummarySchema = z.object({
3670
3690
  kind: z.string().min(1).max(100),
3671
3691
  parentId: z.string().min(1).nullable(),
3672
3692
  childCount: z.number().int().min(0),
3673
- box: canvasWorldBoundsSchema.nullable(),
3693
+ box: canvasSceneBoxSchema.nullable(),
3674
3694
  propertySections: z.array(canvasPropertySectionSchema)
3675
3695
  });
3676
3696
  z.object({ canvasId: z.uuid() });
@@ -3681,7 +3701,7 @@ z.object({
3681
3701
  version: z.number().int().positive(),
3682
3702
  nodeCount: z.number().int().min(0),
3683
3703
  rootChildCount: z.number().int().min(0),
3684
- bounds: canvasWorldBoundsSchema.nullable(),
3704
+ bounds: canvasSceneBoxSchema.nullable(),
3685
3705
  kinds: z.record(z.string(), z.number().int().min(0)),
3686
3706
  next: z.array(z.string().min(1))
3687
3707
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enhance-eng/sdk",
3
- "version": "0.1.158",
3
+ "version": "0.1.160",
4
4
  "description": "Capture editable customer journeys in Enhance from your tests.",
5
5
  "homepage": "https://enhancelabs.ai",
6
6
  "repository": {
@@ -49,10 +49,10 @@
49
49
  "tsdown": "^0.22.14",
50
50
  "typescript": "^5.9.3",
51
51
  "vitest": "^4.1.10",
52
- "@enhance3/contract": "0.0.0",
53
52
  "@enhance3/capture-browser": "0.0.0",
54
- "@enhance3/tsconfig": "0.0.0",
55
- "@enhance3/eslint-config": "0.0.0"
53
+ "@enhance3/contract": "0.0.0",
54
+ "@enhance3/eslint-config": "0.0.0",
55
+ "@enhance3/tsconfig": "0.0.0"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "@playwright/test": ">=1.62.0 <2"