@camstack/addon-post-analysis 1.1.26 → 1.1.28
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/{dist-DytVmDZg.mjs → dist-Blpsv-M0.mjs} +1042 -56
- package/dist/{dist-BEx5ST1W.js → dist-Bnb58pyL.js} +1051 -89
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +1 -1
- package/dist/{node-Cg_cGqs0.js → node-Cvhwrf43.js} +1 -1
- package/dist/pipeline-analytics/_stub.js +107 -107
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-p-r6oXq8.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-CZZpqsjV.mjs} +3 -3
- package/dist/pipeline-analytics/{_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-C6LbOCa9.mjs → _virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DBgBsiUM.mjs} +2 -2
- package/dist/pipeline-analytics/{hostInit-2UZIpU0W.mjs → hostInit-D-KSUwyU.mjs} +3 -3
- package/dist/pipeline-analytics/index.js +2845 -129
- package/dist/pipeline-analytics/index.mjs +2841 -125
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/package.json +1 -19
- package/dist/enrichment-engine/index.js +0 -857
- package/dist/enrichment-engine/index.mjs +0 -852
- package/dist/resolve-frame-CT1T1tWy.mjs +0 -44
- package/dist/resolve-frame-Cbm_NFuq.js +0 -57
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import sharp from "sharp";
|
|
2
|
-
//#region src/shared/frame/crop-extractor.ts
|
|
3
|
-
/**
|
|
4
|
-
* Extracts a JPEG-encoded crop from a raw frame buffer using a normalized bounding box.
|
|
5
|
-
* Coordinates are clamped to frame bounds to avoid out-of-range errors.
|
|
6
|
-
*/
|
|
7
|
-
async function extractCrop(frameData, frameWidth, frameHeight, bbox) {
|
|
8
|
-
const rawLeft = Math.round(bbox.x * frameWidth);
|
|
9
|
-
const rawTop = Math.round(bbox.y * frameHeight);
|
|
10
|
-
const rawWidth = Math.round(bbox.w * frameWidth);
|
|
11
|
-
const rawHeight = Math.round(bbox.h * frameHeight);
|
|
12
|
-
const left = Math.max(0, Math.min(rawLeft, frameWidth - 1));
|
|
13
|
-
const top = Math.max(0, Math.min(rawTop, frameHeight - 1));
|
|
14
|
-
const width = Math.max(1, Math.min(rawWidth, frameWidth - left));
|
|
15
|
-
const height = Math.max(1, Math.min(rawHeight, frameHeight - top));
|
|
16
|
-
return {
|
|
17
|
-
crop: await sharp(frameData, { raw: {
|
|
18
|
-
width: frameWidth,
|
|
19
|
-
height: frameHeight,
|
|
20
|
-
channels: 3
|
|
21
|
-
} }).extract({
|
|
22
|
-
left,
|
|
23
|
-
top,
|
|
24
|
-
width,
|
|
25
|
-
height
|
|
26
|
-
}).jpeg({ quality: 90 }).toBuffer(),
|
|
27
|
-
width,
|
|
28
|
-
height
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/shared/frame/resolve-frame.ts
|
|
33
|
-
/**
|
|
34
|
-
* Resolve the pixels a `FrameHandle` refers to. Local shm read when the
|
|
35
|
-
* handle's `nodeId` matches `deps.ownNodeId`, else routed via
|
|
36
|
-
* `deps.getRemoteFrame`. Returns `null` when the frame is no longer
|
|
37
|
-
* available (slot recycled locally, or the remote node reports no frame).
|
|
38
|
-
*/
|
|
39
|
-
async function resolveFrame(handle, deps) {
|
|
40
|
-
if (handle.nodeId === deps.ownNodeId) return deps.readers.read(handle);
|
|
41
|
-
return deps.getRemoteFrame(handle);
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
44
|
-
export { extractCrop as n, resolveFrame as t };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
const require_dist = require("./dist-BEx5ST1W.js");
|
|
2
|
-
let sharp = require("sharp");
|
|
3
|
-
sharp = require_dist.__toESM(sharp);
|
|
4
|
-
//#region src/shared/frame/crop-extractor.ts
|
|
5
|
-
/**
|
|
6
|
-
* Extracts a JPEG-encoded crop from a raw frame buffer using a normalized bounding box.
|
|
7
|
-
* Coordinates are clamped to frame bounds to avoid out-of-range errors.
|
|
8
|
-
*/
|
|
9
|
-
async function extractCrop(frameData, frameWidth, frameHeight, bbox) {
|
|
10
|
-
const rawLeft = Math.round(bbox.x * frameWidth);
|
|
11
|
-
const rawTop = Math.round(bbox.y * frameHeight);
|
|
12
|
-
const rawWidth = Math.round(bbox.w * frameWidth);
|
|
13
|
-
const rawHeight = Math.round(bbox.h * frameHeight);
|
|
14
|
-
const left = Math.max(0, Math.min(rawLeft, frameWidth - 1));
|
|
15
|
-
const top = Math.max(0, Math.min(rawTop, frameHeight - 1));
|
|
16
|
-
const width = Math.max(1, Math.min(rawWidth, frameWidth - left));
|
|
17
|
-
const height = Math.max(1, Math.min(rawHeight, frameHeight - top));
|
|
18
|
-
return {
|
|
19
|
-
crop: await (0, sharp.default)(frameData, { raw: {
|
|
20
|
-
width: frameWidth,
|
|
21
|
-
height: frameHeight,
|
|
22
|
-
channels: 3
|
|
23
|
-
} }).extract({
|
|
24
|
-
left,
|
|
25
|
-
top,
|
|
26
|
-
width,
|
|
27
|
-
height
|
|
28
|
-
}).jpeg({ quality: 90 }).toBuffer(),
|
|
29
|
-
width,
|
|
30
|
-
height
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region src/shared/frame/resolve-frame.ts
|
|
35
|
-
/**
|
|
36
|
-
* Resolve the pixels a `FrameHandle` refers to. Local shm read when the
|
|
37
|
-
* handle's `nodeId` matches `deps.ownNodeId`, else routed via
|
|
38
|
-
* `deps.getRemoteFrame`. Returns `null` when the frame is no longer
|
|
39
|
-
* available (slot recycled locally, or the remote node reports no frame).
|
|
40
|
-
*/
|
|
41
|
-
async function resolveFrame(handle, deps) {
|
|
42
|
-
if (handle.nodeId === deps.ownNodeId) return deps.readers.read(handle);
|
|
43
|
-
return deps.getRemoteFrame(handle);
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
Object.defineProperty(exports, "extractCrop", {
|
|
47
|
-
enumerable: true,
|
|
48
|
-
get: function() {
|
|
49
|
-
return extractCrop;
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
Object.defineProperty(exports, "resolveFrame", {
|
|
53
|
-
enumerable: true,
|
|
54
|
-
get: function() {
|
|
55
|
-
return resolveFrame;
|
|
56
|
-
}
|
|
57
|
-
});
|