@flighthq/capture 0.2.1-next.841.373388f → 0.3.0-next.1032.e2b99fc
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/captureBaseline.d.ts +1 -1
- package/dist/captureBaseline.d.ts.map +1 -1
- package/dist/captureComparison.d.ts +2 -2
- package/dist/captureComparison.d.ts.map +1 -1
- package/dist/captureComparison.js +5 -5
- package/dist/captureComparison.js.map +1 -1
- package/dist/contract.d.ts +3 -0
- package/dist/contract.d.ts.map +1 -0
- package/dist/contract.js +3 -0
- package/dist/contract.js.map +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +7 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CaptureBaseline, CaptureColumnBaseline } from '@flighthq/types';
|
|
1
|
+
import type { CaptureBaseline, CaptureColumnBaseline } from '@flighthq/types/contract';
|
|
2
2
|
/** Allocates an empty baseline record. Columns are added via setCaptureBaselineField. */
|
|
3
3
|
export declare function createCaptureBaseline(): CaptureBaseline;
|
|
4
4
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captureBaseline.d.ts","sourceRoot":"","sources":["../src/captureBaseline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"captureBaseline.d.ts","sourceRoot":"","sources":["../src/captureBaseline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEvF,yFAAyF;AACzF,wBAAgB,qBAAqB,IAAI,eAAe,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,GAAG,MAAM,CAUjF;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,EACnC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,qBAAqB,GACjC,MAAM,GAAG,IAAI,CAEf;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CASzE;AAED,8FAA8F;AAC9F,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,qBAAqB,EAClC,KAAK,EAAE,MAAM,GACZ,IAAI,CAEN"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { CaptureCheckResult } from '@flighthq/types';
|
|
1
|
+
import type { CaptureCheckResult } from '@flighthq/types/contract';
|
|
2
2
|
export declare const CAPTURE_PARITY_TOLERANCE = 15;
|
|
3
3
|
export declare const CAPTURE_REGRESSION_TOLERANCE = 5;
|
|
4
4
|
/**
|
|
5
5
|
* The tolerant distance between two coarse render fingerprints in `<gridSize>:<hex>` text form (see
|
|
6
|
-
*
|
|
6
|
+
* formatBitmapFingerprint): the mean absolute per-channel difference (0..255), where ~0 is identical
|
|
7
7
|
* and larger values mean a real visual change. Returns `Number.POSITIVE_INFINITY` as a sentinel when
|
|
8
8
|
* either string fails to parse, or when the two fingerprints use different grid sizes and so are not
|
|
9
9
|
* comparable — Infinity fails any finite tolerance, so a corrupt or mismatched baseline reads as a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captureComparison.d.ts","sourceRoot":"","sources":["../src/captureComparison.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"captureComparison.d.ts","sourceRoot":"","sources":["../src/captureComparison.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAInE,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAK3C,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAKvE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,SAA2B,GAAG,kBAAkB,CAGpH;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,mBAAmB,EAAE,MAAM,EAC3B,SAAS,SAA+B,GACvC,kBAAkB,CAGpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { compareBitmapFingerprints, parseBitmapFingerprint } from '@flighthq/bitmap/contract';
|
|
2
2
|
// Default parity tolerance (mean absolute per-channel difference, 0..255). Cross-backend agreement is
|
|
3
3
|
// ≤ ~6.5 even for antialiasing-heavy scenes, so real divergence between two backends is well over 15.
|
|
4
4
|
export const CAPTURE_PARITY_TOLERANCE = 15;
|
|
@@ -8,18 +8,18 @@ export const CAPTURE_PARITY_TOLERANCE = 15;
|
|
|
8
8
|
export const CAPTURE_REGRESSION_TOLERANCE = 5;
|
|
9
9
|
/**
|
|
10
10
|
* The tolerant distance between two coarse render fingerprints in `<gridSize>:<hex>` text form (see
|
|
11
|
-
*
|
|
11
|
+
* formatBitmapFingerprint): the mean absolute per-channel difference (0..255), where ~0 is identical
|
|
12
12
|
* and larger values mean a real visual change. Returns `Number.POSITIVE_INFINITY` as a sentinel when
|
|
13
13
|
* either string fails to parse, or when the two fingerprints use different grid sizes and so are not
|
|
14
14
|
* comparable — Infinity fails any finite tolerance, so a corrupt or mismatched baseline reads as a
|
|
15
15
|
* failing check rather than crashing.
|
|
16
16
|
*/
|
|
17
17
|
export function compareCaptureFingerprints(a, b) {
|
|
18
|
-
const fa =
|
|
19
|
-
const fb =
|
|
18
|
+
const fa = parseBitmapFingerprint(a);
|
|
19
|
+
const fb = parseBitmapFingerprint(b);
|
|
20
20
|
if (fa === null || fb === null || fa.gridSize !== fb.gridSize)
|
|
21
21
|
return Number.POSITIVE_INFINITY;
|
|
22
|
-
return
|
|
22
|
+
return compareBitmapFingerprints(fa, fb);
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Parity: whether two render backends rendering the same scene in the same run agree within
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captureComparison.js","sourceRoot":"","sources":["../src/captureComparison.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"captureComparison.js","sourceRoot":"","sources":["../src/captureComparison.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAG9F,sGAAsG;AACtG,sGAAsG;AACtG,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE3C,uGAAuG;AACvG,uGAAuG;AACvG,iEAAiE;AACjE,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAE9C;;;;;;;GAOG;AACH,MAAM,UAAU,0BAA0B,CAAC,CAAS,EAAE,CAAS;IAC7D,MAAM,EAAE,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC;IACrC,MAAM,EAAE,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC;IACrC,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC,QAAQ,KAAK,EAAE,CAAC,QAAQ;QAAE,OAAO,MAAM,CAAC,iBAAiB,CAAC;IAC/F,OAAO,yBAAyB,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,CAAS,EAAE,CAAS,EAAE,SAAS,GAAG,wBAAwB;IAC9F,MAAM,UAAU,GAAG,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpD,OAAO,EAAE,IAAI,EAAE,UAAU,IAAI,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;AAClE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CACvC,WAAmB,EACnB,mBAA2B,EAC3B,SAAS,GAAG,4BAA4B;IAExC,MAAM,UAAU,GAAG,0BAA0B,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;IAChF,OAAO,EAAE,IAAI,EAAE,UAAU,IAAI,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"}
|
package/dist/contract.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './captureComparison.js';
|
|
1
|
+
export { CAPTURE_PARITY_TOLERANCE, CAPTURE_REGRESSION_TOLERANCE, compareCaptureFingerprints, createCaptureBaseline, evaluateCaptureParity, evaluateCaptureRegression, formatCaptureBaseline, getCaptureBaselineField, parseCaptureBaseline, setCaptureBaselineField, } from './contract';
|
|
3
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,0BAA0B,EAC1B,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './captureComparison.js';
|
|
1
|
+
export { CAPTURE_PARITY_TOLERANCE, CAPTURE_REGRESSION_TOLERANCE, compareCaptureFingerprints, createCaptureBaseline, evaluateCaptureParity, evaluateCaptureRegression, formatCaptureBaseline, getCaptureBaselineField, parseCaptureBaseline, setCaptureBaselineField, } from './contract';
|
|
3
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,0BAA0B,EAC1B,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/capture",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-next.1032.e2b99fc",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/flighthq/flight.git",
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
".": {
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./contract": {
|
|
18
|
+
"types": "./dist/contract.d.ts",
|
|
19
|
+
"default": "./dist/contract.js"
|
|
16
20
|
}
|
|
17
21
|
},
|
|
18
22
|
"files": [
|
|
@@ -32,8 +36,8 @@
|
|
|
32
36
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
33
37
|
},
|
|
34
38
|
"dependencies": {
|
|
35
|
-
"@flighthq/
|
|
36
|
-
"@flighthq/types": "0.
|
|
39
|
+
"@flighthq/bitmap": "0.3.0-next.1032.e2b99fc",
|
|
40
|
+
"@flighthq/types": "0.3.0-next.1032.e2b99fc"
|
|
37
41
|
},
|
|
38
42
|
"devDependencies": {
|
|
39
43
|
"typescript": "^5.3.0"
|