@enhance-eng/sdk 0.1.160 → 0.1.161

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.
@@ -6281,14 +6281,25 @@ progression: object$1({
6281
6281
  nodeCount: draft.nodes.length
6282
6282
  }
6283
6283
  }));
6284
- object$1({
6284
+ /** A capture that lands as a new editable frame on a page, with no screen layer. */
6285
+ const editableFrameCaptureSchema = object$1({
6286
+ screenId: string$1().min(1),
6287
+ pageId: string$1().min(1)
6288
+ });
6289
+ const editableFrameInputBase = {
6285
6290
  canvasId: uuid$1(),
6286
6291
  documentFormatVersion: canvasDocumentFormatSchema,
6287
6292
  mutationId: uuid$1(),
6288
6293
  baseVersion: number$2().int().positive(),
6289
- screenNodeId: string$1().min(1),
6290
6294
  draft: canvasSubtreeDraftSchema
6291
- });
6295
+ };
6296
+ union$1([strictObject({
6297
+ ...editableFrameInputBase,
6298
+ screenNodeId: string$1().min(1).describe("The screen layer to convert beside itself.")
6299
+ }), strictObject({
6300
+ ...editableFrameInputBase,
6301
+ capture: editableFrameCaptureSchema.describe("The stored page a new capture lands from, and the page its frame goes on.")
6302
+ })]);
6292
6303
  const createEditableFrameResultSchema = object$1({
6293
6304
  canvasId: uuid$1(),
6294
6305
  mutationId: uuid$1(),
@@ -6393,7 +6404,10 @@ progression: object$1({
6393
6404
  recordingId: uuid$1(),
6394
6405
  atMs: number$2().int().nonnegative(),
6395
6406
  screenId: uuid$1(),
6396
- screenNodeId: string$1().min(1),
6407
+ /** Null when the snapshot asked for a place only, so no screen layer was added. */
6408
+ screenNodeId: string$1().min(1).nullable(),
6409
+ /** The page the place is on. */
6410
+ pageId: string$1().min(1).optional(),
6397
6411
  viewport: object$1({
6398
6412
  width: number$2().int().positive(),
6399
6413
  height: number$2().int().positive()
@@ -6557,7 +6571,11 @@ progression: object$1({
6557
6571
  pageId: string$1().min(1).optional(),
6558
6572
  nodeIds: array$1(string$1().min(1))
6559
6573
  }),
6560
- placement: strictObject({ kind: literal$1("below-source") })
6574
+ /**
6575
+ * Below the walkthrough: as a screen layer, which installed CLIs ask for, or as a place only,
6576
+ * where the agent's CLI lands an editable frame.
6577
+ */
6578
+ placement: strictObject({ kind: _enum$1(["below-source", "editable-below-source"]) })
6561
6579
  });
6562
6580
  object$1({
6563
6581
  canvasId: uuid$1(),
@@ -6823,6 +6841,21 @@ progression: object$1({
6823
6841
  "text-align": textStyleValues["text-align"].optional(),
6824
6842
  "white-space": textStyleValues["white-space"].optional()
6825
6843
  });
6844
+ /** Every alignment a browser computes, which conversion stores and Undo must be able to put back. */
6845
+ const storedTextAlignSchema = _enum$1([
6846
+ "start",
6847
+ "end",
6848
+ "left",
6849
+ "right",
6850
+ "center",
6851
+ "justify",
6852
+ "justify-all",
6853
+ "match-parent",
6854
+ "-webkit-left",
6855
+ "-webkit-right",
6856
+ "-webkit-center"
6857
+ ]);
6858
+ const storedFontStyleSchema = union$1([textStyleValues["font-style"], string$1().regex(/^oblique -?(?:\d+(?:\.\d+)?|\.\d+)deg$/u)]);
6826
6859
  const restorableTextStyleValue = union$1([canvasAdditionalStyleSchema.shape.value, canvasNumberSchema]).nullable().optional();
6827
6860
  const canvasTextStylePatchSchema = strictObject({
6828
6861
  "text-decoration": restorableTextStyleValue,
@@ -6845,7 +6878,7 @@ progression: object$1({
6845
6878
  "text-box": canvasAdditionalStyleSchema.shape.value.nullable().optional(),
6846
6879
  "text-box-trim": canvasAdditionalStyleSchema.shape.value.nullable().optional(),
6847
6880
  "text-box-edge": canvasAdditionalStyleSchema.shape.value.nullable().optional(),
6848
- "font-style": textStyleValues["font-style"].nullable().optional(),
6881
+ "font-style": storedFontStyleSchema.nullable().optional(),
6849
6882
  "font-stretch": union$1([_enum$1([
6850
6883
  "normal",
6851
6884
  "ultra-condensed",
@@ -6863,14 +6896,22 @@ progression: object$1({
6863
6896
  literal$1("normal")
6864
6897
  ]).nullable().optional(),
6865
6898
  "line-height": textStyleValues["line-height"].nullable().optional(),
6866
- "text-align": textStyleValues["text-align"].nullable().optional(),
6899
+ "text-align": storedTextAlignSchema.nullable().optional(),
6867
6900
  "text-indent": union$1([canvasNumberSchema, signedPixelLengthSchema]).nullable().optional(),
6868
6901
  "white-space": textStyleValues["white-space"].nullable().optional(),
6869
6902
  "word-spacing": union$1([
6870
6903
  canvasNumberSchema,
6871
6904
  signedPixelLengthSchema,
6872
6905
  literal$1("normal")
6873
- ]).nullable().optional()
6906
+ ]).nullable().optional(),
6907
+ direction: restorableTextStyleValue,
6908
+ "unicode-bidi": restorableTextStyleValue,
6909
+ "hanging-punctuation": restorableTextStyleValue,
6910
+ "text-transform": restorableTextStyleValue,
6911
+ "-webkit-text-stroke": restorableTextStyleValue,
6912
+ "-webkit-text-stroke-width": restorableTextStyleValue,
6913
+ "-webkit-text-stroke-color": restorableTextStyleValue,
6914
+ "paint-order": restorableTextStyleValue
6874
6915
  });
6875
6916
  const overflowStyleValue = canvasAdditionalStyleSchema.shape.value;
6876
6917
  const dimensionalStyleValue = union$1([string$1(), canvasNumberSchema]);
@@ -10862,6 +10903,10 @@ progression: object$1({
10862
10903
  };
10863
10904
  };
10864
10905
  //#endregion
10906
+ //#region ../contract/src/recording/captured-color-scheme.lib.ts
10907
+ const CAPTURED_COLOR_SCHEME_ATTRIBUTE = "data-enhance-captured-color-scheme";
10908
+ const capturedColorSchemeIn = (value) => value === "light" || value === "dark" ? value : null;
10909
+ //#endregion
10865
10910
  //#region ../contract/src/recording/captured-font-evidence.lib.ts
10866
10911
  const CAPTURED_LOADED_FONTS_ATTRIBUTE = "data-enhance-loaded-captured-fonts";
10867
10912
  const CAPTURED_UNAVAILABLE_FONTS_ATTRIBUTE = "data-enhance-unavailable-captured-fonts";
@@ -12091,6 +12136,8 @@ unreadableCount: number$2().int().min(0) });
12091
12136
  });
12092
12137
  object$1({
12093
12138
  screenId: uuid$1(),
12139
+ /** Where the screen's files are stored; a capture names its stored copies by it. */
12140
+ assetBundleId: uuid$1().nullable(),
12094
12141
  /** Re-issued on every call, because the usual reason for a retry is an expired presign. */
12095
12142
  upload: signedUploadSchema,
12096
12143
  alreadyExists: boolean$1(),
@@ -12389,6 +12436,7 @@ unreadableCount: number$2().int().min(0) });
12389
12436
  "clipboard-image-pending",
12390
12437
  "clipboard-image-unavailable",
12391
12438
  "edit-target-unsupported",
12439
+ "edit-result-invalid",
12392
12440
  "react-hook-order",
12393
12441
  "menu-rows-unsupported"
12394
12442
  ]),
@@ -12704,7 +12752,8 @@ unreadableCount: number$2().int().min(0) });
12704
12752
  "delivered",
12705
12753
  "failed",
12706
12754
  "disabled",
12707
- "no-identity"
12755
+ "no-identity",
12756
+ "expired"
12708
12757
  ]).optional()
12709
12758
  });
12710
12759
  discriminatedUnion$1("type", [object$1({ type: literal$1("enhance3:extension-probe") }).strict(), object$1({ type: literal$1("enhance3:extension-present") }).strict()]);
@@ -17791,6 +17840,24 @@ unreadableCount: number$2().int().min(0) });
17791
17840
  style: `${typeof style === "string" ? style : ""};${rootStyle}`
17792
17841
  };
17793
17842
  };
17843
+ /**
17844
+ * The scheme the page showed. A replay's `matchMedia` answers for its viewer, so a capture from one
17845
+ * keeps the replay's fact. A document with no media queries to ask records no scheme, and its
17846
+ * screen behaves as a screen captured before schemes were recorded: it follows its viewer.
17847
+ */
17848
+ const captureColorScheme = (document) => {
17849
+ const recorded = capturedColorSchemeIn(document.documentElement.getAttribute(CAPTURED_COLOR_SCHEME_ATTRIBUTE));
17850
+ if (recorded !== null) return recorded;
17851
+ const view = document.defaultView;
17852
+ const matchMedia = view === null ? void 0 : Reflect.get(view, "matchMedia");
17853
+ if (view === null || typeof matchMedia !== "function") return void 0;
17854
+ const query = Reflect.apply(matchMedia, view, ["(prefers-color-scheme: dark)"]);
17855
+ return typeof query === "object" && query !== null && Reflect.get(query, "matches") === true ? "dark" : "light";
17856
+ };
17857
+ const withColorScheme = (attributes, colorScheme) => colorScheme === void 0 ? attributes : {
17858
+ ...attributes,
17859
+ [CAPTURED_COLOR_SCHEME_ATTRIBUTE]: colorScheme
17860
+ };
17794
17861
  //#endregion
17795
17862
  //#region ../capture-browser/src/shadow-adopted-stylesheets.lib.ts
17796
17863
  /** @justified clarification This must follow rrweb's host traversal order. */
@@ -17818,7 +17885,6 @@ unreadableCount: number$2().int().min(0) });
17818
17885
  }));
17819
17886
  //#endregion
17820
17887
  //#region ../capture-browser/src/stylesheet-snapshot-hint.lib.ts
17821
- const COLOR_SCHEME_MEDIA = /\bprefers-color-scheme\s*:/iu;
17822
17888
  const stylesheetSnapshotKey = (url) => {
17823
17889
  const location = Reflect.get(globalThis, "location");
17824
17890
  const href = typeof location === "object" && location !== null ? Reflect.get(location, "href") : void 0;
@@ -17827,12 +17893,6 @@ unreadableCount: number$2().int().min(0) });
17827
17893
  const leaf = parsed.pathname.slice(parsed.pathname.lastIndexOf("/") + 1);
17828
17894
  return `${parsed.origin}/${leaf}${parsed.search}`;
17829
17895
  };
17830
- const freezeColorSchemeMedia = (rules, isMatching) => [...rules].map((rule) => {
17831
- const condition = rule.conditionText;
17832
- if (typeof condition !== "string" || !COLOR_SCHEME_MEDIA.test(condition) || rule.cssRules === void 0) return rule.cssText;
17833
- if (!isMatching(condition)) return "";
17834
- return freezeColorSchemeMedia(rule.cssRules, isMatching);
17835
- }).join("\n");
17836
17896
  const EMPTY_SERIALIZED_DECLARATION = /[{;]\s*[-\w]+\s*:\s*;/u;
17837
17897
  const canRoundTripSerializedCss = (cssText) => !EMPTY_SERIALIZED_DECLARATION.test(cssText);
17838
17898
  /** @justified clarification Chromium can erase a valid custom-property shorthand. */
@@ -17840,7 +17900,7 @@ unreadableCount: number$2().int().min(0) });
17840
17900
  if (!canRoundTripSerializedCss(rule.cssText)) return false;
17841
17901
  return rule.cssRules === void 0 || canRoundTripCssRules(rule.cssRules);
17842
17902
  });
17843
- const serializedCssText = (rules, baseHref) => rewriteCssAssetUrls(freezeColorSchemeMedia(rules, (condition) => matchMedia(condition).matches), /* @__PURE__ */ new Map(), baseHref);
17903
+ const serializedCssText = (rules, baseHref) => rewriteCssAssetUrls([...rules].map((rule) => rule.cssText).join("\n"), /* @__PURE__ */ new Map(), baseHref);
17844
17904
  const linkedStylesheetCssText = (sheet, baseHref) => {
17845
17905
  try {
17846
17906
  const rules = sheet?.cssRules;
@@ -17909,12 +17969,14 @@ unreadableCount: number$2().int().min(0) });
17909
17969
  };
17910
17970
  const captureSnapshotHints = (document = globalThis.document) => {
17911
17971
  const stylesheets = capturedStylesheets(document);
17972
+ const colorScheme = captureColorScheme(document);
17912
17973
  return {
17913
17974
  adoptedStyleSheets: capturedAdoptedStyleSheets(document, document.baseURI),
17914
17975
  inlinedStylesheets: stylesheets.inlined,
17915
17976
  shadowAdoptedStyleSheets: captureShadowAdoptedStyleSheets(document, capturedAdoptedStyleSheets),
17916
17977
  stylesheets: stylesheets.byKey,
17917
- rootStyle: captureRootStyle(document)
17978
+ rootStyle: captureRootStyle(document),
17979
+ ...colorScheme !== void 0 && { colorScheme }
17918
17980
  };
17919
17981
  };
17920
17982
  //#endregion
@@ -17951,7 +18013,7 @@ unreadableCount: number$2().int().min(0) });
17951
18013
  };
17952
18014
  const hintAttributes = (node, attributes, context) => {
17953
18015
  if (attributes === null) return null;
17954
- const hinted = node["tagName"] === "link" ? hintLinkAttributes(attributes, context.hints, context.stylesheetUses, context.inlinedStylesheets.take) : node["tagName"] === "html" ? withRootStyle(attributes, context.hints.rootStyle) : attributes;
18016
+ const hinted = node["tagName"] === "link" ? hintLinkAttributes(attributes, context.hints, context.stylesheetUses, context.inlinedStylesheets.take) : node["tagName"] === "html" ? withColorScheme(withRootStyle(attributes, context.hints.rootStyle), context.hints.colorScheme) : attributes;
17955
18017
  const id = node["id"];
17956
18018
  const corrected = typeof id === "number" ? withPresentationStyle(hinted, context.cssomStyleCorrections.get(id)) : hinted;
17957
18019
  const presented = typeof id === "number" ? withPresentationStyle(corrected, context.presentationStyles.get(id)) : corrected;
@@ -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-qRMMj0yg.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-DgIzqC3b.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-qRMMj0yg.mjs";
1
+ import { H as captureRunDescriptorSchema, S as captureError } from "./stall-watch.lib-DgIzqC3b.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.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as createEnhance } from "./capture-client.client-Dztj8uko.mjs";
1
+ import { t as createEnhance } from "./capture-client.client-BM_NxOqy.mjs";
2
2
  export { createEnhance };
@@ -1,6 +1,6 @@
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";
1
+ import { S as captureError } from "./stall-watch.lib-DgIzqC3b.mjs";
2
+ import { t as version } from "./package-BFIjCgBc.mjs";
3
+ import { t as createEnhance$1 } from "./capture-client.client-BM_NxOqy.mjs";
4
4
  import process from "node:process";
5
5
  //#region src/node/environment.config.ts
6
6
  const endpoints = {
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-qRMMj0yg.mjs";
2
- import { t as createEnhance } from "./environment.config-BorTlECV.mjs";
1
+ import { A as captureSelection, M as selectedCaptures, V as captureManifestSchema, j as mergeCaptureManifests, z as captureArtifactSchema } from "./stall-watch.lib-DgIzqC3b.mjs";
2
+ import { t as createEnhance } from "./environment.config-BlBA4N5X.mjs";
3
3
  export { captureArtifactSchema, captureManifestSchema, captureSelection, createEnhance, mergeCaptureManifests, selectedCaptures };
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.1.160";
2
+ var version = "0.1.161";
3
3
  //#endregion
4
4
  export { version as t };
@@ -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-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";
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-DgIzqC3b.mjs";
2
+ import { t as version } from "../package-BFIjCgBc.mjs";
3
+ import { n as awaitCaptureRun, r as captureContextDirectory, t as LEFT_OUT_ATTACHMENT } from "../capture-context.lib-LXUORfkL.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 { 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";
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-DgIzqC3b.mjs";
2
+ import { t as createEnhance } from "../environment.config-BlBA4N5X.mjs";
3
+ import { i as setCaptureDirectory } from "../capture-context.lib-LXUORfkL.mjs";
4
4
  import process from "node:process";
5
5
  import { mkdir, readFile } from "node:fs/promises";
6
6
  import nodePath from "node:path";
@@ -2542,14 +2542,25 @@ const canvasSubtreeDraftSchema = z.object({
2542
2542
  nodeCount: draft.nodes.length
2543
2543
  }
2544
2544
  }));
2545
- z.object({
2545
+ /** A capture that lands as a new editable frame on a page, with no screen layer. */
2546
+ const editableFrameCaptureSchema = z.object({
2547
+ screenId: z.string().min(1),
2548
+ pageId: z.string().min(1)
2549
+ });
2550
+ const editableFrameInputBase = {
2546
2551
  canvasId: z.uuid(),
2547
2552
  documentFormatVersion: canvasDocumentFormatSchema,
2548
2553
  mutationId: z.uuid(),
2549
2554
  baseVersion: z.number().int().positive(),
2550
- screenNodeId: z.string().min(1),
2551
2555
  draft: canvasSubtreeDraftSchema
2552
- });
2556
+ };
2557
+ z.union([z.strictObject({
2558
+ ...editableFrameInputBase,
2559
+ screenNodeId: z.string().min(1).describe("The screen layer to convert beside itself.")
2560
+ }), z.strictObject({
2561
+ ...editableFrameInputBase,
2562
+ capture: editableFrameCaptureSchema.describe("The stored page a new capture lands from, and the page its frame goes on.")
2563
+ })]);
2553
2564
  const createEditableFrameResultSchema = z.object({
2554
2565
  canvasId: z.uuid(),
2555
2566
  mutationId: z.uuid(),
@@ -2654,7 +2665,10 @@ const canvasRenderSnapshotResultSchema = z.object({
2654
2665
  recordingId: z.uuid(),
2655
2666
  atMs: z.number().int().nonnegative(),
2656
2667
  screenId: z.uuid(),
2657
- screenNodeId: z.string().min(1),
2668
+ /** Null when the snapshot asked for a place only, so no screen layer was added. */
2669
+ screenNodeId: z.string().min(1).nullable(),
2670
+ /** The page the place is on. */
2671
+ pageId: z.string().min(1).optional(),
2658
2672
  viewport: z.object({
2659
2673
  width: z.number().int().positive(),
2660
2674
  height: z.number().int().positive()
@@ -2819,7 +2833,11 @@ const canvasSnapshotRequestSchema = z.strictObject({
2819
2833
  pageId: z.string().min(1).optional(),
2820
2834
  nodeIds: z.array(z.string().min(1))
2821
2835
  }),
2822
- placement: z.strictObject({ kind: z.literal("below-source") })
2836
+ /**
2837
+ * Below the walkthrough: as a screen layer, which installed CLIs ask for, or as a place only,
2838
+ * where the agent's CLI lands an editable frame.
2839
+ */
2840
+ placement: z.strictObject({ kind: z.enum(["below-source", "editable-below-source"]) })
2823
2841
  });
2824
2842
  z.object({
2825
2843
  canvasId: z.uuid(),
@@ -3086,6 +3104,21 @@ const canvasTextStylesSchema = z.strictObject({
3086
3104
  "text-align": textStyleValues["text-align"].optional(),
3087
3105
  "white-space": textStyleValues["white-space"].optional()
3088
3106
  });
3107
+ /** Every alignment a browser computes, which conversion stores and Undo must be able to put back. */
3108
+ const storedTextAlignSchema = z.enum([
3109
+ "start",
3110
+ "end",
3111
+ "left",
3112
+ "right",
3113
+ "center",
3114
+ "justify",
3115
+ "justify-all",
3116
+ "match-parent",
3117
+ "-webkit-left",
3118
+ "-webkit-right",
3119
+ "-webkit-center"
3120
+ ]);
3121
+ const storedFontStyleSchema = z.union([textStyleValues["font-style"], z.string().regex(/^oblique -?(?:\d+(?:\.\d+)?|\.\d+)deg$/u)]);
3089
3122
  const restorableTextStyleValue = z.union([canvasAdditionalStyleSchema.shape.value, canvasNumberSchema]).nullable().optional();
3090
3123
  const canvasTextStylePatchSchema = z.strictObject({
3091
3124
  "text-decoration": restorableTextStyleValue,
@@ -3108,7 +3141,7 @@ const canvasTextStylePatchSchema = z.strictObject({
3108
3141
  "text-box": canvasAdditionalStyleSchema.shape.value.nullable().optional(),
3109
3142
  "text-box-trim": canvasAdditionalStyleSchema.shape.value.nullable().optional(),
3110
3143
  "text-box-edge": canvasAdditionalStyleSchema.shape.value.nullable().optional(),
3111
- "font-style": textStyleValues["font-style"].nullable().optional(),
3144
+ "font-style": storedFontStyleSchema.nullable().optional(),
3112
3145
  "font-stretch": z.union([z.enum([
3113
3146
  "normal",
3114
3147
  "ultra-condensed",
@@ -3126,14 +3159,22 @@ const canvasTextStylePatchSchema = z.strictObject({
3126
3159
  z.literal("normal")
3127
3160
  ]).nullable().optional(),
3128
3161
  "line-height": textStyleValues["line-height"].nullable().optional(),
3129
- "text-align": textStyleValues["text-align"].nullable().optional(),
3162
+ "text-align": storedTextAlignSchema.nullable().optional(),
3130
3163
  "text-indent": z.union([canvasNumberSchema, signedPixelLengthSchema]).nullable().optional(),
3131
3164
  "white-space": textStyleValues["white-space"].nullable().optional(),
3132
3165
  "word-spacing": z.union([
3133
3166
  canvasNumberSchema,
3134
3167
  signedPixelLengthSchema,
3135
3168
  z.literal("normal")
3136
- ]).nullable().optional()
3169
+ ]).nullable().optional(),
3170
+ direction: restorableTextStyleValue,
3171
+ "unicode-bidi": restorableTextStyleValue,
3172
+ "hanging-punctuation": restorableTextStyleValue,
3173
+ "text-transform": restorableTextStyleValue,
3174
+ "-webkit-text-stroke": restorableTextStyleValue,
3175
+ "-webkit-text-stroke-width": restorableTextStyleValue,
3176
+ "-webkit-text-stroke-color": restorableTextStyleValue,
3177
+ "paint-order": restorableTextStyleValue
3137
3178
  });
3138
3179
  const overflowStyleValue = canvasAdditionalStyleSchema.shape.value;
3139
3180
  const dimensionalStyleValue = z.union([z.string(), canvasNumberSchema]);
@@ -6661,6 +6702,7 @@ z$1.extend(prototypeBridgeConnectRequestSchema, {
6661
6702
  capabilities: z$1.array(z$1.string()),
6662
6703
  release: z$1.string().check(z$1.minLength(1))
6663
6704
  });
6705
+ z$1.extend(prototypeBridgeConnectRequestSchema, { type: z$1.literal("enhance.prototype.capture-blocked") });
6664
6706
  z$1.object({
6665
6707
  protocol: z$1.literal(1),
6666
6708
  type: z$1.literal("enhance.prototype.unloading"),
@@ -7317,6 +7359,8 @@ z.object({
7317
7359
  });
7318
7360
  z.object({
7319
7361
  screenId: z.uuid(),
7362
+ /** Where the screen's files are stored; a capture names its stored copies by it. */
7363
+ assetBundleId: z.uuid().nullable(),
7320
7364
  /** Re-issued on every call, because the usual reason for a retry is an expired presign. */
7321
7365
  upload: signedUploadSchema,
7322
7366
  alreadyExists: z.boolean(),
@@ -7604,6 +7648,7 @@ const clientRenderFailureDetailsSchema = z.strictObject({
7604
7648
  "clipboard-image-pending",
7605
7649
  "clipboard-image-unavailable",
7606
7650
  "edit-target-unsupported",
7651
+ "edit-result-invalid",
7607
7652
  "react-hook-order",
7608
7653
  "menu-rows-unsupported"
7609
7654
  ]),
@@ -7919,7 +7964,8 @@ z.object({
7919
7964
  "delivered",
7920
7965
  "failed",
7921
7966
  "disabled",
7922
- "no-identity"
7967
+ "no-identity",
7968
+ "expired"
7923
7969
  ]).optional()
7924
7970
  });
7925
7971
  z.discriminatedUnion("type", [z.object({ type: z.literal("enhance3:extension-probe") }).strict(), z.object({ type: z.literal("enhance3:extension-present") }).strict()]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enhance-eng/sdk",
3
- "version": "0.1.160",
3
+ "version": "0.1.161",
4
4
  "description": "Capture editable customer journeys in Enhance from your tests.",
5
5
  "homepage": "https://enhancelabs.ai",
6
6
  "repository": {
@@ -50,9 +50,9 @@
50
50
  "typescript": "^5.9.3",
51
51
  "vitest": "^4.1.10",
52
52
  "@enhance3/capture-browser": "0.0.0",
53
- "@enhance3/contract": "0.0.0",
54
53
  "@enhance3/eslint-config": "0.0.0",
55
- "@enhance3/tsconfig": "0.0.0"
54
+ "@enhance3/tsconfig": "0.0.0",
55
+ "@enhance3/contract": "0.0.0"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "@playwright/test": ">=1.62.0 <2"