@enhance-eng/sdk 0.1.165 → 0.1.166
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.
- package/dist/browser/kernel.iife.js +95 -21
- package/dist/{capture-client.client-C_8yINru.mjs → capture-client.client-GeV8SAsY.mjs} +1 -1
- package/dist/{capture-context.lib-D4OEonRp.mjs → capture-context.lib-DQn7JA02.mjs} +1 -1
- package/dist/client.mjs +1 -1
- package/dist/{environment.config-Ctm1VHM9.mjs → environment.config-uvF4VFma.mjs} +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{package-C-PfWfSh.mjs → package-362fShMl.mjs} +1 -1
- package/dist/playwright/index.mjs +3 -3
- package/dist/playwright/reporter.mjs +3 -3
- package/dist/{stall-watch.lib-JRTp4jPK.mjs → stall-watch.lib-DL_Gnxep.mjs} +68 -12
- package/package.json +4 -4
|
@@ -6303,13 +6303,14 @@ progression: object$1({
|
|
|
6303
6303
|
props: record(string$1(), unknown()).optional(),
|
|
6304
6304
|
box: canvasSceneBoxSchema.optional()
|
|
6305
6305
|
});
|
|
6306
|
+
const canvasSceneRelationshipSchema = object$1({
|
|
6307
|
+
parentId: string$1().min(1),
|
|
6308
|
+
sortKey: string$1().min(1)
|
|
6309
|
+
});
|
|
6306
6310
|
const canvasSceneDocumentSchema = object$1({
|
|
6307
6311
|
version: literal$1(15),
|
|
6308
6312
|
nodes: record(string$1(), canvasSceneNodeSchema),
|
|
6309
|
-
relationships: record(string$1(),
|
|
6310
|
-
parentId: string$1().min(1),
|
|
6311
|
-
sortKey: string$1().min(1)
|
|
6312
|
-
})),
|
|
6313
|
+
relationships: record(string$1(), canvasSceneRelationshipSchema),
|
|
6313
6314
|
tombstones: record(string$1(), literal$1(true)).default({})
|
|
6314
6315
|
});
|
|
6315
6316
|
const legacyRecordSchema = record(string$1(), unknown());
|
|
@@ -6333,6 +6334,10 @@ progression: object$1({
|
|
|
6333
6334
|
relationships: {},
|
|
6334
6335
|
tombstones: {}
|
|
6335
6336
|
});
|
|
6337
|
+
canvasSceneDocumentSchema.extend({
|
|
6338
|
+
nodes: record(string$1(), unknown()),
|
|
6339
|
+
relationships: record(string$1(), unknown())
|
|
6340
|
+
});
|
|
6336
6341
|
//#endregion
|
|
6337
6342
|
//#region ../contract/src/canvas/canvas-conversion-draft.schema.ts
|
|
6338
6343
|
const temporaryIdSchema = string$1().min(1);
|
|
@@ -11272,6 +11277,7 @@ progression: object$1({
|
|
|
11272
11277
|
/** The attribute each media element shows its picture through, without a live source. */
|
|
11273
11278
|
const MEDIA_PICTURE_ATTRIBUTES = {
|
|
11274
11279
|
embed: "src",
|
|
11280
|
+
img: "src",
|
|
11275
11281
|
object: "data",
|
|
11276
11282
|
video: "poster"
|
|
11277
11283
|
};
|
|
@@ -11279,7 +11285,8 @@ progression: object$1({
|
|
|
11279
11285
|
crossSite: "This video comes from another site that does not allow its frames to be copied.",
|
|
11280
11286
|
protected: "This video is protected, so its frame cannot be copied.",
|
|
11281
11287
|
embeddedPage: "This is an embedded web page or plugin, which Enhance does not draw.",
|
|
11282
|
-
notStored: "The picture this element showed could not be stored with the page."
|
|
11288
|
+
notStored: "The picture this element showed could not be stored with the page.",
|
|
11289
|
+
pageOnly: "This image was made by the page while it ran and was not finished when it was captured, so it could not be stored."
|
|
11283
11290
|
};
|
|
11284
11291
|
const ELEMENT$5 = 2;
|
|
11285
11292
|
const HAVE_CURRENT_DATA = 2;
|
|
@@ -11312,28 +11319,45 @@ progression: object$1({
|
|
|
11312
11319
|
return typeof method === "function" ? Reflect.apply(method, target, args) : void 0;
|
|
11313
11320
|
};
|
|
11314
11321
|
const isSecurityError = (error) => isObject$4(error) && Reflect.get(error, "name") === "SecurityError";
|
|
11315
|
-
/**
|
|
11316
|
-
const
|
|
11322
|
+
/** Draws a decoded image at its own size as a PNG address, or says why it could not be read. */
|
|
11323
|
+
const pictureOf = (element, width, height, ifUnread) => {
|
|
11317
11324
|
try {
|
|
11318
|
-
const owner = Reflect.get(
|
|
11325
|
+
const owner = Reflect.get(element, "ownerDocument");
|
|
11319
11326
|
const canvas = isObject$4(owner) ? call(owner, "createElement", ["canvas"]) : null;
|
|
11320
11327
|
if (!isObject$4(canvas)) return unreadable(MEDIA_REASONS.notStored);
|
|
11321
|
-
Reflect.set(canvas, "width",
|
|
11322
|
-
Reflect.set(canvas, "height",
|
|
11328
|
+
Reflect.set(canvas, "width", width);
|
|
11329
|
+
Reflect.set(canvas, "height", height);
|
|
11323
11330
|
const context = call(canvas, "getContext", ["2d"]);
|
|
11324
11331
|
if (!isObject$4(context)) return unreadable(MEDIA_REASONS.notStored);
|
|
11325
11332
|
call(context, "drawImage", [
|
|
11326
|
-
|
|
11333
|
+
element,
|
|
11327
11334
|
0,
|
|
11328
11335
|
0
|
|
11329
11336
|
]);
|
|
11330
11337
|
const encoded = String(call(canvas, "toDataURL", ["image/png"]));
|
|
11331
11338
|
return inlineDataAssetReference(encoded)?.contentType === "image/png" ? picture(encoded) : unreadable(MEDIA_REASONS.notStored);
|
|
11332
11339
|
} catch (error) {
|
|
11333
|
-
return unreadable(isSecurityError(error) ?
|
|
11340
|
+
return unreadable(isSecurityError(error) ? ifUnread : MEDIA_REASONS.notStored);
|
|
11334
11341
|
}
|
|
11335
11342
|
};
|
|
11336
11343
|
/**
|
|
11344
|
+
* The current frame, drawn at the video's own size, or why it could not be read: the browser
|
|
11345
|
+
* refuses to read a frame from another site that did not allow it.
|
|
11346
|
+
*/
|
|
11347
|
+
const frameOf = (video) => pictureOf(video, numberOf(video, "videoWidth"), numberOf(video, "videoHeight"), MEDIA_REASONS.crossSite);
|
|
11348
|
+
/**
|
|
11349
|
+
* An image whose address the page made with `URL.createObjectURL` exists only inside that page,
|
|
11350
|
+
* so its decoded picture is what the capture keeps. Any other image is stored by its address.
|
|
11351
|
+
*/
|
|
11352
|
+
const pageOnlyImageOf = (image) => {
|
|
11353
|
+
const current = stringOf(image, "currentSrc");
|
|
11354
|
+
if (!(current === "" ? stringOf(image, "src") : current).startsWith("blob:")) return null;
|
|
11355
|
+
const width = numberOf(image, "naturalWidth");
|
|
11356
|
+
const height = numberOf(image, "naturalHeight");
|
|
11357
|
+
if (width === 0 || height === 0 || Reflect.get(image, "complete") !== true) return unreadable(MEDIA_REASONS.pageOnly);
|
|
11358
|
+
return pictureOf(image, width, height, MEDIA_REASONS.notStored);
|
|
11359
|
+
};
|
|
11360
|
+
/**
|
|
11337
11361
|
* A video shows its poster until it has played or been moved to another time, and while it has
|
|
11338
11362
|
* no frame; otherwise its current frame.
|
|
11339
11363
|
*/
|
|
@@ -11374,11 +11398,12 @@ progression: object$1({
|
|
|
11374
11398
|
case "video": return videoMediaOf(element);
|
|
11375
11399
|
case "object": return embeddedMediaOf(element, "data");
|
|
11376
11400
|
case "embed": return embeddedMediaOf(element, "src");
|
|
11401
|
+
case "img": return pageOnlyImageOf(element);
|
|
11377
11402
|
default: return null;
|
|
11378
11403
|
}
|
|
11379
11404
|
};
|
|
11380
11405
|
/** Attributes that make a media element play or load from the live page. */
|
|
11381
|
-
const isLiveSourceAttribute = (name, tagName) => name.startsWith("rr_media") || name === "autoplay" || tagName === "video" && name === "src" || (tagName === "object" || tagName === "embed") && (name === "type" || name === "typemustmatch");
|
|
11406
|
+
const isLiveSourceAttribute = (name, tagName) => name.startsWith("rr_media") || name === "autoplay" || tagName === "video" && name === "src" || tagName === "img" && name === "srcset" || (tagName === "object" || tagName === "embed") && (name === "type" || name === "typemustmatch");
|
|
11382
11407
|
const withoutLiveSources = (attributes, tagName) => Object.fromEntries(Object.entries(attributes).filter(([name]) => !isLiveSourceAttribute(name, tagName)));
|
|
11383
11408
|
/** A media element's attributes with what it showed written on them and its live sources gone. */
|
|
11384
11409
|
const capturedMediaAttributes = (tagName, attributes, media) => {
|
|
@@ -11702,10 +11727,11 @@ progression: object$1({
|
|
|
11702
11727
|
const source = attributes["src"] ?? attributes["srcdoc"];
|
|
11703
11728
|
return typeof source === "string" && source.startsWith("blob:") ? "Embedded content not supported" : null;
|
|
11704
11729
|
};
|
|
11730
|
+
const CROSS_LINE = "transparent calc(50% - 2px), rgba(255, 255, 255, 0.85) calc(50% - 1px), #a8a8b0 50%, rgba(255, 255, 255, 0.85) calc(50% + 1px), transparent calc(50% + 2px)";
|
|
11705
11731
|
[`[data-enhance-unsupported]:not([data-enhance-unsupported-hidden]):not([style*="display: none"]) {
|
|
11706
11732
|
align-items: center !important;
|
|
11707
|
-
background-color:
|
|
11708
|
-
background-image: linear-gradient(to top right,
|
|
11733
|
+
background-color: transparent !important;
|
|
11734
|
+
background-image: ${`linear-gradient(to top right, ${CROSS_LINE}), linear-gradient(to bottom right, ${CROSS_LINE})`} !important;
|
|
11709
11735
|
border: 1px solid #c7c7cc !important;
|
|
11710
11736
|
box-sizing: border-box !important;
|
|
11711
11737
|
color: #4f4f55 !important;
|
|
@@ -12987,6 +13013,21 @@ unreadableCount: number$2().int().min(0) });
|
|
|
12987
13013
|
const MAX_COUNT$1 = 1e6;
|
|
12988
13014
|
const MAX_BYTES = 1073741824;
|
|
12989
13015
|
const MAX_PROTOTYPE_OPEN_ATTEMPTS = 16;
|
|
13016
|
+
const MAX_SCRIPT_POSITION = 1e8;
|
|
13017
|
+
/** What the person was doing when a long frame ended; `idle` is nothing at all. */
|
|
13018
|
+
const longFrameActionSchema = _enum$1([
|
|
13019
|
+
"pan",
|
|
13020
|
+
"zoom",
|
|
13021
|
+
"drag",
|
|
13022
|
+
"typing",
|
|
13023
|
+
"paste",
|
|
13024
|
+
"undo",
|
|
13025
|
+
"redo",
|
|
13026
|
+
"edit",
|
|
13027
|
+
"opening",
|
|
13028
|
+
"loading",
|
|
13029
|
+
"idle"
|
|
13030
|
+
]);
|
|
12990
13031
|
/** How the read of a canvas's unsaved browser copy ended when the canvas opened. */
|
|
12991
13032
|
const browserCopyCheckSchema = _enum$1([
|
|
12992
13033
|
"answered",
|
|
@@ -13001,6 +13042,12 @@ unreadableCount: number$2().int().min(0) });
|
|
|
13001
13042
|
releaseIdentity: string$1().min(1).max(100),
|
|
13002
13043
|
capabilityVersion: number$2().int().min(1).max(MAX_CAPABILITY_VERSION$1)
|
|
13003
13044
|
};
|
|
13045
|
+
const scriptSourceSchema = _enum$1([
|
|
13046
|
+
"app",
|
|
13047
|
+
"extension",
|
|
13048
|
+
"third-party",
|
|
13049
|
+
"unknown"
|
|
13050
|
+
]);
|
|
13004
13051
|
const mainThreadWork = {
|
|
13005
13052
|
longTaskCount: countSchema,
|
|
13006
13053
|
longTaskTotalMs: durationSchema$1,
|
|
@@ -13010,12 +13057,7 @@ unreadableCount: number$2().int().min(0) });
|
|
|
13010
13057
|
loafLongestBlockingMs: durationSchema$1,
|
|
13011
13058
|
loafStyleAndLayoutMs: durationSchema$1,
|
|
13012
13059
|
loafTopScriptMs: durationSchema$1,
|
|
13013
|
-
loafTopScriptSource:
|
|
13014
|
-
"app",
|
|
13015
|
-
"extension",
|
|
13016
|
-
"third-party",
|
|
13017
|
-
"unknown"
|
|
13018
|
-
])
|
|
13060
|
+
loafTopScriptSource: scriptSourceSchema
|
|
13019
13061
|
};
|
|
13020
13062
|
discriminatedUnion$1("name", [
|
|
13021
13063
|
object$1({
|
|
@@ -13076,10 +13118,42 @@ unreadableCount: number$2().int().min(0) });
|
|
|
13076
13118
|
durationMs: durationSchema$1,
|
|
13077
13119
|
frameCount: countSchema,
|
|
13078
13120
|
slowFrameCount: countSchema,
|
|
13121
|
+
over16FrameCount: countSchema.optional(),
|
|
13122
|
+
over33FrameCount: countSchema.optional(),
|
|
13079
13123
|
worstFrameMs: durationSchema$1,
|
|
13080
13124
|
nodeCount: countSchema,
|
|
13081
13125
|
replayCount: countSchema
|
|
13082
13126
|
}),
|
|
13127
|
+
object$1({
|
|
13128
|
+
...base$1,
|
|
13129
|
+
name: literal$1("canvas_long_frame"),
|
|
13130
|
+
source: _enum$1(["long-animation-frame", "longtask"]),
|
|
13131
|
+
action: longFrameActionSchema,
|
|
13132
|
+
durationMs: durationSchema$1,
|
|
13133
|
+
blockingMs: durationSchema$1,
|
|
13134
|
+
styleAndLayoutMs: durationSchema$1,
|
|
13135
|
+
topScriptMs: durationSchema$1,
|
|
13136
|
+
topScriptSource: scriptSourceSchema,
|
|
13137
|
+
topScriptInvoker: _enum$1([
|
|
13138
|
+
"event-listener",
|
|
13139
|
+
"user-callback",
|
|
13140
|
+
"resolve-promise",
|
|
13141
|
+
"reject-promise",
|
|
13142
|
+
"classic-script",
|
|
13143
|
+
"module-script",
|
|
13144
|
+
"none"
|
|
13145
|
+
]),
|
|
13146
|
+
topScriptEvent: string$1().regex(/^[a-z]{1,32}$/u).optional(),
|
|
13147
|
+
topScriptFile: string$1().regex(/^[\w-][\w.-]{0,124}\.js$/u).optional(),
|
|
13148
|
+
topScriptFunction: string$1().regex(/^[\w$.]{1,80}$/u).optional(),
|
|
13149
|
+
topScriptPosition: number$2().int().min(0).max(MAX_SCRIPT_POSITION).optional(),
|
|
13150
|
+
layerCount: countSchema,
|
|
13151
|
+
topLayerCount: countSchema,
|
|
13152
|
+
builtLayerCount: countSchema,
|
|
13153
|
+
zoomPercent: countSchema,
|
|
13154
|
+
frameNumber: countSchema,
|
|
13155
|
+
skippedCount: countSchema
|
|
13156
|
+
}),
|
|
13083
13157
|
object$1({
|
|
13084
13158
|
...base$1,
|
|
13085
13159
|
name: literal$1("canvas_measurement"),
|
|
@@ -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-
|
|
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-DL_Gnxep.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { openAsBlob } from "node:fs";
|
|
4
4
|
import nodePath from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as captureRunDescriptorSchema, S as captureError } from "./stall-watch.lib-
|
|
1
|
+
import { H as captureRunDescriptorSchema, S as captureError } from "./stall-watch.lib-DL_Gnxep.mjs";
|
|
2
2
|
import nodePath from "node:path";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { readFile } from "node:fs/promises";
|
package/dist/client.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createEnhance } from "./capture-client.client-
|
|
1
|
+
import { t as createEnhance } from "./capture-client.client-GeV8SAsY.mjs";
|
|
2
2
|
export { createEnhance };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as captureError } from "./stall-watch.lib-
|
|
2
|
-
import { t as version } from "./package-
|
|
3
|
-
import { t as createEnhance$1 } from "./capture-client.client-
|
|
1
|
+
import { S as captureError } from "./stall-watch.lib-DL_Gnxep.mjs";
|
|
2
|
+
import { t as version } from "./package-362fShMl.mjs";
|
|
3
|
+
import { t as createEnhance$1 } from "./capture-client.client-GeV8SAsY.mjs";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
import { homedir } from "node:os";
|
|
6
6
|
import nodePath from "node:path";
|
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-
|
|
2
|
-
import { t as createEnhance } from "./environment.config-
|
|
1
|
+
import { A as captureSelection, M as selectedCaptures, V as captureManifestSchema, j as mergeCaptureManifests, z as captureArtifactSchema } from "./stall-watch.lib-DL_Gnxep.mjs";
|
|
2
|
+
import { t as createEnhance } from "./environment.config-uvF4VFma.mjs";
|
|
3
3
|
export { captureArtifactSchema, captureManifestSchema, captureSelection, createEnhance, mergeCaptureManifests, selectedCaptures };
|
|
@@ -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-
|
|
2
|
-
import { t as version } from "../package-
|
|
3
|
-
import { n as awaitCaptureRun, r as captureContextDirectory, t as LEFT_OUT_ATTACHMENT } from "../capture-context.lib-
|
|
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-DL_Gnxep.mjs";
|
|
2
|
+
import { t as version } from "../package-362fShMl.mjs";
|
|
3
|
+
import { n as awaitCaptureRun, r as captureContextDirectory, t as LEFT_OUT_ATTACHMENT } from "../capture-context.lib-DQn7JA02.mjs";
|
|
4
4
|
import { openAsBlob } from "node:fs";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
6
|
import nodePath from "node:path";
|
|
@@ -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-
|
|
2
|
-
import { t as createEnhance } from "../environment.config-
|
|
3
|
-
import { i as setCaptureDirectory } from "../capture-context.lib-
|
|
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-DL_Gnxep.mjs";
|
|
2
|
+
import { t as createEnhance } from "../environment.config-uvF4VFma.mjs";
|
|
3
|
+
import { i as setCaptureDirectory } from "../capture-context.lib-DQn7JA02.mjs";
|
|
4
4
|
import nodePath from "node:path";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import { mkdir, readFile } from "node:fs/promises";
|
|
@@ -2579,13 +2579,14 @@ const canvasSceneNodeSchema = z.looseObject({
|
|
|
2579
2579
|
props: z.record(z.string(), z.unknown()).optional(),
|
|
2580
2580
|
box: canvasSceneBoxSchema.optional()
|
|
2581
2581
|
});
|
|
2582
|
+
const canvasSceneRelationshipSchema = z.object({
|
|
2583
|
+
parentId: z.string().min(1),
|
|
2584
|
+
sortKey: z.string().min(1)
|
|
2585
|
+
});
|
|
2582
2586
|
const canvasSceneDocumentSchema = z.object({
|
|
2583
2587
|
version: z.literal(15),
|
|
2584
2588
|
nodes: z.record(z.string(), canvasSceneNodeSchema),
|
|
2585
|
-
relationships: z.record(z.string(),
|
|
2586
|
-
parentId: z.string().min(1),
|
|
2587
|
-
sortKey: z.string().min(1)
|
|
2588
|
-
})),
|
|
2589
|
+
relationships: z.record(z.string(), canvasSceneRelationshipSchema),
|
|
2589
2590
|
tombstones: z.record(z.string(), z.literal(true)).default({})
|
|
2590
2591
|
});
|
|
2591
2592
|
const legacyRecordSchema = z.record(z.string(), z.unknown());
|
|
@@ -2609,6 +2610,10 @@ const emptyCanvasSceneDocument = () => ({
|
|
|
2609
2610
|
relationships: {},
|
|
2610
2611
|
tombstones: {}
|
|
2611
2612
|
});
|
|
2613
|
+
canvasSceneDocumentSchema.extend({
|
|
2614
|
+
nodes: z.record(z.string(), z.unknown()),
|
|
2615
|
+
relationships: z.record(z.string(), z.unknown())
|
|
2616
|
+
});
|
|
2612
2617
|
//#endregion
|
|
2613
2618
|
//#region ../contract/src/canvas/canvas-conversion-draft.schema.ts
|
|
2614
2619
|
const temporaryIdSchema = z.string().min(1);
|
|
@@ -7388,10 +7393,13 @@ const missingReplayAssetSourceIn = (url) => {
|
|
|
7388
7393
|
return null;
|
|
7389
7394
|
}
|
|
7390
7395
|
};
|
|
7396
|
+
//#endregion
|
|
7397
|
+
//#region ../contract/src/recording/unsupported-surface-style.lib.ts
|
|
7398
|
+
const CROSS_LINE = "transparent calc(50% - 2px), rgba(255, 255, 255, 0.85) calc(50% - 1px), #a8a8b0 50%, rgba(255, 255, 255, 0.85) calc(50% + 1px), transparent calc(50% + 2px)";
|
|
7391
7399
|
[`[data-enhance-unsupported]:not([data-enhance-unsupported-hidden]):not([style*="display: none"]) {
|
|
7392
7400
|
align-items: center !important;
|
|
7393
|
-
background-color:
|
|
7394
|
-
background-image: linear-gradient(to top right,
|
|
7401
|
+
background-color: transparent !important;
|
|
7402
|
+
background-image: ${`linear-gradient(to top right, ${CROSS_LINE}), linear-gradient(to bottom right, ${CROSS_LINE})`} !important;
|
|
7395
7403
|
border: 1px solid #c7c7cc !important;
|
|
7396
7404
|
box-sizing: border-box !important;
|
|
7397
7405
|
color: #4f4f55 !important;
|
|
@@ -7824,6 +7832,21 @@ const MAX_DURATION_MS$1 = 18e5;
|
|
|
7824
7832
|
const MAX_COUNT$1 = 1e6;
|
|
7825
7833
|
const MAX_BYTES = 1073741824;
|
|
7826
7834
|
const MAX_PROTOTYPE_OPEN_ATTEMPTS = 16;
|
|
7835
|
+
const MAX_SCRIPT_POSITION = 1e8;
|
|
7836
|
+
/** What the person was doing when a long frame ended; `idle` is nothing at all. */
|
|
7837
|
+
const longFrameActionSchema = z.enum([
|
|
7838
|
+
"pan",
|
|
7839
|
+
"zoom",
|
|
7840
|
+
"drag",
|
|
7841
|
+
"typing",
|
|
7842
|
+
"paste",
|
|
7843
|
+
"undo",
|
|
7844
|
+
"redo",
|
|
7845
|
+
"edit",
|
|
7846
|
+
"opening",
|
|
7847
|
+
"loading",
|
|
7848
|
+
"idle"
|
|
7849
|
+
]);
|
|
7827
7850
|
/** How the read of a canvas's unsaved browser copy ended when the canvas opened. */
|
|
7828
7851
|
const browserCopyCheckSchema = z.enum([
|
|
7829
7852
|
"answered",
|
|
@@ -7838,6 +7861,12 @@ const base$1 = {
|
|
|
7838
7861
|
releaseIdentity: z.string().min(1).max(100),
|
|
7839
7862
|
capabilityVersion: z.number().int().min(1).max(MAX_CAPABILITY_VERSION$1)
|
|
7840
7863
|
};
|
|
7864
|
+
const scriptSourceSchema = z.enum([
|
|
7865
|
+
"app",
|
|
7866
|
+
"extension",
|
|
7867
|
+
"third-party",
|
|
7868
|
+
"unknown"
|
|
7869
|
+
]);
|
|
7841
7870
|
const mainThreadWork = {
|
|
7842
7871
|
longTaskCount: countSchema,
|
|
7843
7872
|
longTaskTotalMs: durationSchema$1,
|
|
@@ -7847,12 +7876,7 @@ const mainThreadWork = {
|
|
|
7847
7876
|
loafLongestBlockingMs: durationSchema$1,
|
|
7848
7877
|
loafStyleAndLayoutMs: durationSchema$1,
|
|
7849
7878
|
loafTopScriptMs: durationSchema$1,
|
|
7850
|
-
loafTopScriptSource:
|
|
7851
|
-
"app",
|
|
7852
|
-
"extension",
|
|
7853
|
-
"third-party",
|
|
7854
|
-
"unknown"
|
|
7855
|
-
])
|
|
7879
|
+
loafTopScriptSource: scriptSourceSchema
|
|
7856
7880
|
};
|
|
7857
7881
|
z.discriminatedUnion("name", [
|
|
7858
7882
|
z.object({
|
|
@@ -7913,10 +7937,42 @@ z.discriminatedUnion("name", [
|
|
|
7913
7937
|
durationMs: durationSchema$1,
|
|
7914
7938
|
frameCount: countSchema,
|
|
7915
7939
|
slowFrameCount: countSchema,
|
|
7940
|
+
over16FrameCount: countSchema.optional(),
|
|
7941
|
+
over33FrameCount: countSchema.optional(),
|
|
7916
7942
|
worstFrameMs: durationSchema$1,
|
|
7917
7943
|
nodeCount: countSchema,
|
|
7918
7944
|
replayCount: countSchema
|
|
7919
7945
|
}),
|
|
7946
|
+
z.object({
|
|
7947
|
+
...base$1,
|
|
7948
|
+
name: z.literal("canvas_long_frame"),
|
|
7949
|
+
source: z.enum(["long-animation-frame", "longtask"]),
|
|
7950
|
+
action: longFrameActionSchema,
|
|
7951
|
+
durationMs: durationSchema$1,
|
|
7952
|
+
blockingMs: durationSchema$1,
|
|
7953
|
+
styleAndLayoutMs: durationSchema$1,
|
|
7954
|
+
topScriptMs: durationSchema$1,
|
|
7955
|
+
topScriptSource: scriptSourceSchema,
|
|
7956
|
+
topScriptInvoker: z.enum([
|
|
7957
|
+
"event-listener",
|
|
7958
|
+
"user-callback",
|
|
7959
|
+
"resolve-promise",
|
|
7960
|
+
"reject-promise",
|
|
7961
|
+
"classic-script",
|
|
7962
|
+
"module-script",
|
|
7963
|
+
"none"
|
|
7964
|
+
]),
|
|
7965
|
+
topScriptEvent: z.string().regex(/^[a-z]{1,32}$/u).optional(),
|
|
7966
|
+
topScriptFile: z.string().regex(/^[\w-][\w.-]{0,124}\.js$/u).optional(),
|
|
7967
|
+
topScriptFunction: z.string().regex(/^[\w$.]{1,80}$/u).optional(),
|
|
7968
|
+
topScriptPosition: z.number().int().min(0).max(MAX_SCRIPT_POSITION).optional(),
|
|
7969
|
+
layerCount: countSchema,
|
|
7970
|
+
topLayerCount: countSchema,
|
|
7971
|
+
builtLayerCount: countSchema,
|
|
7972
|
+
zoomPercent: countSchema,
|
|
7973
|
+
frameNumber: countSchema,
|
|
7974
|
+
skippedCount: countSchema
|
|
7975
|
+
}),
|
|
7920
7976
|
z.object({
|
|
7921
7977
|
...base$1,
|
|
7922
7978
|
name: z.literal("canvas_measurement"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enhance-eng/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.166",
|
|
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/capture-browser": "0.0.0",
|
|
53
|
-
"@enhance3/contract": "0.0.0",
|
|
54
52
|
"@enhance3/eslint-config": "0.0.0",
|
|
55
|
-
"@enhance3/tsconfig": "0.0.0"
|
|
53
|
+
"@enhance3/tsconfig": "0.0.0",
|
|
54
|
+
"@enhance3/capture-browser": "0.0.0",
|
|
55
|
+
"@enhance3/contract": "0.0.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@playwright/test": ">=1.62.0 <2"
|