@mizchi/vlmkit-core 0.24.0 → 0.28.0
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/a11y-semantic.d.mts +1 -3
- package/dist/a11y-semantic.mjs +1 -2
- package/dist/animated-image.d.mts +1 -3
- package/dist/animated-image.mjs +1 -2
- package/dist/apng.d.mts +1 -3
- package/dist/apng.mjs +1 -2
- package/dist/arg-reader.d.mts +1 -3
- package/dist/arg-reader.mjs +1 -2
- package/dist/auth-state.d.mts +1 -3
- package/dist/auth-state.mjs +1 -2
- package/dist/authored-style-capture.d.mts +1 -3
- package/dist/authored-style-capture.mjs +1 -2
- package/dist/authored-style-diff.d.mts +2 -4
- package/dist/authored-style-diff.mjs +1 -2
- package/dist/bitmap-font.d.mts +1 -3
- package/dist/bitmap-font.mjs +1 -2
- package/dist/browser-launch.d.mts +1 -3
- package/dist/browser-launch.mjs +1 -2
- package/dist/cli-args.d.mts +1 -3
- package/dist/cli-args.mjs +1 -2
- package/dist/cli-error.d.mts +0 -2
- package/dist/cli-error.mjs +1 -2
- package/dist/computed-style-capture.d.mts +1 -3
- package/dist/computed-style-capture.mjs +1 -2
- package/dist/computed-style-diff.d.mts +0 -2
- package/dist/computed-style-diff.mjs +1 -2
- package/dist/diff-regions.d.mts +1 -3
- package/dist/diff-regions.mjs +1 -2
- package/dist/dom-equivalence.d.mts +1 -3
- package/dist/dom-equivalence.mjs +1 -2
- package/dist/dom-position-styles.d.mts +1 -3
- package/dist/dom-position-styles.mjs +1 -2
- package/dist/element-compare.d.mts +1 -3
- package/dist/element-compare.mjs +2 -3
- package/dist/filmstrip.d.mts +1 -3
- package/dist/filmstrip.mjs +1 -2
- package/dist/gate-config.d.mts +1 -3
- package/dist/gate-config.mjs +8 -4
- package/dist/gate-exit.d.mts +1 -3
- package/dist/gate-exit.mjs +1 -2
- package/dist/gif.d.mts +1 -3
- package/dist/gif.mjs +1 -2
- package/dist/heatmap-regions.d.mts +1 -3
- package/dist/heatmap-regions.mjs +1 -2
- package/dist/heatmap.d.mts +1 -3
- package/dist/heatmap.mjs +12 -8
- package/dist/image-resize.d.mts +1 -3
- package/dist/image-resize.mjs +1 -2
- package/dist/image-timing.d.mts +1 -3
- package/dist/image-timing.mjs +1 -2
- package/dist/index.d.mts +12 -12
- package/dist/index.mjs +11 -11
- package/dist/mask.d.mts +1 -3
- package/dist/mask.mjs +1 -2
- package/dist/motion-spec.d.mts +97 -0
- package/dist/motion-spec.mjs +145 -0
- package/dist/navigation-redirect.d.mts +1 -3
- package/dist/navigation-redirect.mjs +1 -2
- package/dist/page-load.d.mts +28 -3
- package/dist/page-load.mjs +34 -5
- package/dist/page-open.d.mts +5 -3
- package/dist/page-open.mjs +4 -3
- package/dist/plugin/args.d.mts +1 -3
- package/dist/plugin/args.mjs +3 -3
- package/dist/plugin/browser.d.mts +3 -3
- package/dist/plugin/browser.mjs +2 -2
- package/dist/plugin/cli-entry.d.mts +1 -3
- package/dist/plugin/cli-entry.mjs +1 -2
- package/dist/plugin/contract.d.mts +1 -3
- package/dist/plugin/contract.mjs +1 -2
- package/dist/plugin/index.d.mts +4 -6
- package/dist/plugin/index.mjs +7 -8
- package/dist/plugin/load.d.mts +1 -3
- package/dist/plugin/load.mjs +1 -2
- package/dist/plugin/registry.d.mts +1 -3
- package/dist/plugin/registry.mjs +1 -2
- package/dist/plugin/rule-prose.d.mts +1 -3
- package/dist/plugin/rule-prose.mjs +1 -2
- package/dist/plugin/rule-tier.d.mts +1 -3
- package/dist/plugin/rule-tier.mjs +1 -2
- package/dist/plugin/rules.d.mts +1 -3
- package/dist/plugin/rules.mjs +1 -2
- package/dist/plugin/runner.d.mts +1 -3
- package/dist/plugin/runner.mjs +14 -6
- package/dist/png-decode.d.mts +1 -3
- package/dist/png-decode.mjs +1 -2
- package/dist/png-utils.d.mts +1 -3
- package/dist/png-utils.mjs +1 -2
- package/dist/project-config.d.mts +1 -3
- package/dist/project-config.mjs +1 -2
- package/dist/rect-overlap.d.mts +1 -3
- package/dist/rect-overlap.mjs +1 -2
- package/dist/region-shift.d.mts +1 -2
- package/dist/region-shift.mjs +1 -2
- package/dist/run-ledger.d.mts +1 -3
- package/dist/run-ledger.mjs +1 -2
- package/dist/stable-selector.d.mts +1 -3
- package/dist/stable-selector.mjs +1 -2
- package/dist/terminal-colors.d.mts +1 -3
- package/dist/terminal-colors.mjs +1 -2
- package/dist/text-rows.d.mts +1 -3
- package/dist/text-rows.mjs +1 -2
- package/dist/types.d.mts +1 -3
- package/dist/version.d.mts +1 -3
- package/dist/version.mjs +2 -3
- package/dist/video-decode.d.mts +1 -3
- package/dist/video-decode.mjs +35 -32
- package/dist/video-frames.d.mts +11 -7
- package/dist/video-frames.mjs +23 -12
- package/dist/webp.d.mts +1 -3
- package/dist/webp.mjs +1 -2
- package/package.json +5 -5
package/dist/version.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/version.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* The one place the shipped version number is written.
|
|
4
3
|
*
|
|
@@ -15,5 +14,4 @@
|
|
|
15
14
|
* every `package.json` and that the CHANGELOG has a section for it, so the literal cannot drift
|
|
16
15
|
* from the release either.
|
|
17
16
|
*/
|
|
18
|
-
export declare const VLMKIT_VERSION = "0.
|
|
19
|
-
//#endregion
|
|
17
|
+
export declare const VLMKIT_VERSION = "0.28.0";
|
package/dist/version.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/version.ts
|
|
2
2
|
/**
|
|
3
3
|
* The one place the shipped version number is written.
|
|
4
4
|
*
|
|
@@ -15,6 +15,5 @@
|
|
|
15
15
|
* every `package.json` and that the CHANGELOG has a section for it, so the literal cannot drift
|
|
16
16
|
* from the release either.
|
|
17
17
|
*/
|
|
18
|
-
const VLMKIT_VERSION = "0.
|
|
19
|
-
//#endregion
|
|
18
|
+
const VLMKIT_VERSION = "0.28.0";
|
|
20
19
|
export { VLMKIT_VERSION };
|
package/dist/video-decode.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SelectionRequest, VideoStream } from "./video-frames.mjs";
|
|
2
2
|
import { FramesManifest } from "@mizchi/vlmkit-judge/frames.ts";
|
|
3
|
-
//#region src/video-decode.d.ts
|
|
4
3
|
/** Frame files are named `NNNN-…`: past 9999 a glob no longer sorts them in order. */
|
|
5
4
|
export declare const MAX_SCAN_FRAMES = 9999;
|
|
6
5
|
/** Refused above this unless asked for: a minute at 60fps, already gigabytes of PNG at 1080p. */
|
|
@@ -142,5 +141,4 @@ export declare function parsePtsTable(text: string, file: string): {
|
|
|
142
141
|
export declare function importFrames(options: ImportFramesOptions): Promise<{
|
|
143
142
|
manifestPath: string;
|
|
144
143
|
manifest: FramesManifest;
|
|
145
|
-
}>;
|
|
146
|
-
//#endregion
|
|
144
|
+
}>;
|
package/dist/video-decode.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { spawn } from "node:child_process";
|
|
|
9
9
|
import { hostname } from "node:os";
|
|
10
10
|
import { WINDOW_MS } from "@mizchi/vlmkit-judge/flash.ts";
|
|
11
11
|
import { FRAMES_FORMAT, frameFileName } from "@mizchi/vlmkit-judge/frames.ts";
|
|
12
|
-
|
|
12
|
+
// src/video-decode.ts
|
|
13
13
|
/**
|
|
14
14
|
* Decode a recording into a `vlmkit-frames/1` sequence with the user's own ffmpeg and ffprobe.
|
|
15
15
|
*
|
|
@@ -545,7 +545,9 @@ async function scanVideo(options) {
|
|
|
545
545
|
const outputs = [];
|
|
546
546
|
for (const g of graphs) {
|
|
547
547
|
await mkdir(join(work, g.name));
|
|
548
|
-
|
|
548
|
+
const output = [];
|
|
549
|
+
outputs.push(output);
|
|
550
|
+
output.push("-map", `0:${stream.index}`, "-an", "-sn", "-dn", "-fps_mode", "passthrough", "-vf", filterChain({
|
|
549
551
|
select: selectExpression(g.decoded, probedFrames.length),
|
|
550
552
|
fields: g.split,
|
|
551
553
|
...g.split && fieldPlan?.order ? { fieldOrder: fieldPlan.order } : {},
|
|
@@ -560,35 +562,37 @@ async function scanVideo(options) {
|
|
|
560
562
|
const written = new Map(graphs.map((g) => [g.name, []]));
|
|
561
563
|
const showTimeBase = /* @__PURE__ */ new Map();
|
|
562
564
|
const stderrAll = [];
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
if (
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
565
|
+
for (const [gi, g] of graphs.entries()) {
|
|
566
|
+
const decoded = await run(decoder.ffmpeg, [
|
|
567
|
+
"-hide_banner",
|
|
568
|
+
"-nostdin",
|
|
569
|
+
"-nostats",
|
|
570
|
+
"-loglevel",
|
|
571
|
+
"level+info",
|
|
572
|
+
"-sws_flags",
|
|
573
|
+
"accurate_rnd+full_chroma_int",
|
|
574
|
+
"-copyts",
|
|
575
|
+
...stream.alpha === "libvpx" || stream.alpha === "libvpx-vp9" ? ["-c:v", stream.alpha] : [],
|
|
576
|
+
"-reinit_filter",
|
|
577
|
+
"0",
|
|
578
|
+
...rotate.length > 0 ? ["-noautorotate"] : [],
|
|
579
|
+
...demuxer,
|
|
580
|
+
"-i",
|
|
581
|
+
asInput(file),
|
|
582
|
+
...outputs[gi]
|
|
583
|
+
], (line) => {
|
|
584
|
+
stderrAll.push(line);
|
|
585
|
+
const parsed = parseShowinfoLine(line);
|
|
586
|
+
if (!parsed) return;
|
|
587
|
+
const name = ("timeBase" in parsed ? parsed.instance : parsed.frame.instance) ?? g.name;
|
|
588
|
+
if ("timeBase" in parsed) {
|
|
589
|
+
if (!showTimeBase.has(name)) showTimeBase.set(name, parsed.timeBase);
|
|
590
|
+
} else written.get(name)?.push(parsed.frame);
|
|
591
|
+
}).catch((e) => spawnFailure(e, decoder.ffmpeg, "ffmpeg"));
|
|
592
|
+
if (decoded.code !== 0) {
|
|
593
|
+
const why = reason(decoded.stderr);
|
|
594
|
+
throw new UsageError(/Unknown decoder|Decoder .* not found/i.test(why) && stream.alpha?.startsWith("libvpx") ? `${shown}: its alpha decodes only with libvpx, which this ffmpeg lacks (${why}); use an ffmpeg built with libvpx` : `${decoder.ffmpeg} cannot decode ${shown} (${stream.codec}): ${why}`);
|
|
595
|
+
}
|
|
592
596
|
}
|
|
593
597
|
for (const g of graphs) checkWritten(written.get(g.name), showTimeBase.get(g.name) ?? null, g.decoded.map((d) => probedFrames[d]), g.split ? 2 : 1, stream, shown);
|
|
594
598
|
const all = graphs.flatMap((g) => written.get(g.name));
|
|
@@ -932,5 +936,4 @@ async function importFrames(options) {
|
|
|
932
936
|
manifest
|
|
933
937
|
};
|
|
934
938
|
}
|
|
935
|
-
//#endregion
|
|
936
939
|
export { CORRUPT_PACKET, DEFAULT_MAX_FRAMES, MAX_SCAN_FRAMES, STALE_UNKNOWN_MS, VIDEO_EXTENSIONS, alive, apngDeclaredFrames, decodeErrors, defaultFramesDir, findDecoder, importFrames, isVideoFile, onPath, parsePtsFile, parsePtsTable, processIdentity, scanVideo };
|
package/dist/video-frames.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ImageTiming } from "./image-timing.mjs";
|
|
2
2
|
import { FramesVideo } from "@mizchi/vlmkit-judge/frames.ts";
|
|
3
|
-
//#region src/video-frames.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Codecs whose decoded frames are what was encoded, bit for bit (modulo a chroma subsampling the
|
|
6
5
|
* encoder chose). Anything else is treated as lossy: x264 at `-qp 0` is lossless too, but nothing
|
|
@@ -279,7 +278,7 @@ export interface FilterPlan {
|
|
|
279
278
|
fieldOrder?: "tff" | "bff";
|
|
280
279
|
/** Each frame is one field (HEVC field pictures): line-double it to the picture's height, never split it. */
|
|
281
280
|
lineDouble?: boolean;
|
|
282
|
-
/** Turn the frames (after the field split), for a decode that runs with `-
|
|
281
|
+
/** Turn the frames (after the field split), for a decode that runs with `-noautorotate`. */
|
|
283
282
|
rotate?: readonly string[];
|
|
284
283
|
/** The showinfo instance's name, so two graphs in one run are told apart. */
|
|
285
284
|
name?: string;
|
|
@@ -291,16 +290,21 @@ export interface FilterPlan {
|
|
|
291
290
|
/** Resample non-square pixels to square (in RGB, nearest: exact, no blended colours). */
|
|
292
291
|
sampleAspect: boolean;
|
|
293
292
|
}
|
|
293
|
+
/**
|
|
294
|
+
* Limited-range grey expanded to full by arithmetic: (v - 16·2^s) · (2^d - 1) / (219·2^s), rounded
|
|
295
|
+
* and clipped, for d bits (s = d - 8). On 8 bits 16 → 0, 235 → 255 and 150 → 156, the levels
|
|
296
|
+
* ffmpeg 6.1's scaler gave.
|
|
297
|
+
*/
|
|
298
|
+
export declare function grayExpansion(pixelFormat: string): string;
|
|
294
299
|
/**
|
|
295
300
|
* The filter chain. Measured, each step's place: `select` first (it counts decoded frames);
|
|
296
301
|
* fields split before the colour conversion, and the line-doubling's doubled sample aspect undone
|
|
297
302
|
* (`scale` keeps the display aspect, so an 8:9 field came out 16:9 and the frame twice as wide);
|
|
298
|
-
* then the turn, if the chain does it; alpha composited after the conversion, by
|
|
299
|
-
* black) or
|
|
300
|
-
* timestamp — an `overlay` on a colour source would take that source's constant rate; the SAR
|
|
303
|
+
* then the turn, if the chain does it; alpha composited after the conversion, by multiplying the
|
|
304
|
+
* colour by its own alpha plane (over black) or the negative and negating back (over white), so every
|
|
305
|
+
* frame keeps its timestamp — an `overlay` on a colour source would take that source's constant rate; the SAR
|
|
301
306
|
* resample after RGB, nearest, since bicubic in YUV blended a red/blue edge into (197,0,52); the
|
|
302
307
|
* colour tags and an ICC profile stripped only after `format=rgb24` (before it, the matrix falls
|
|
303
308
|
* back to BT.601); and showinfo without its checksums, which doubled the cost of a 1080p decode.
|
|
304
309
|
*/
|
|
305
|
-
export declare function filterChain(plan: FilterPlan): string;
|
|
306
|
-
//#endregion
|
|
310
|
+
export declare function filterChain(plan: FilterPlan): string;
|
package/dist/video-frames.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { browserDelayMs } from "./image-timing.mjs";
|
|
2
2
|
import { UsageError } from "@mizchi/vlmkit-judge/errors.ts";
|
|
3
|
-
|
|
3
|
+
// src/video-frames.ts
|
|
4
4
|
/**
|
|
5
5
|
* The pure half of loading a recording through a decoder the user supplies (`vlmkit scan video`):
|
|
6
6
|
* which frames to keep, how big the frames are shown, and which codecs reproduce their input.
|
|
@@ -475,8 +475,8 @@ function colorPlan(stream, file, override = {}) {
|
|
|
475
475
|
assumedRange.push("range");
|
|
476
476
|
}
|
|
477
477
|
return {
|
|
478
|
-
before: `scale=in_range
|
|
479
|
-
scale: `in_color_matrix=bt601:in_range
|
|
478
|
+
before: [...range === "tv" ? [grayExpansion(stream.pixelFormat)] : [], `scale=in_range=pc:out_range=pc,${/^gray$/.test(stream.pixelFormat) ? "format=yuv444p" : "format=yuv444p16le"}`].join(","),
|
|
479
|
+
scale: `in_color_matrix=bt601:in_range=pc:flags=accurate_rnd+full_chroma_int`,
|
|
480
480
|
color: {
|
|
481
481
|
matrix: "gray",
|
|
482
482
|
range,
|
|
@@ -524,22 +524,34 @@ function colorPlan(stream, file, override = {}) {
|
|
|
524
524
|
};
|
|
525
525
|
}
|
|
526
526
|
/**
|
|
527
|
+
* Limited-range grey expanded to full by arithmetic: (v - 16·2^s) · (2^d - 1) / (219·2^s), rounded
|
|
528
|
+
* and clipped, for d bits (s = d - 8). On 8 bits 16 → 0, 235 → 255 and 150 → 156, the levels
|
|
529
|
+
* ffmpeg 6.1's scaler gave.
|
|
530
|
+
*/
|
|
531
|
+
function grayExpansion(pixelFormat) {
|
|
532
|
+
const depth = Number(/^gray(\d+)/.exec(pixelFormat)?.[1] ?? 8);
|
|
533
|
+
const shift = depth - 8;
|
|
534
|
+
const lo = 16 << shift;
|
|
535
|
+
const span = 219 << shift;
|
|
536
|
+
const max = 2 ** depth - 1;
|
|
537
|
+
return `lut=c0='clip(round((val-${lo})*${max}/${span})\\,0\\,${max})'`;
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
527
540
|
* The filter chain. Measured, each step's place: `select` first (it counts decoded frames);
|
|
528
541
|
* fields split before the colour conversion, and the line-doubling's doubled sample aspect undone
|
|
529
542
|
* (`scale` keeps the display aspect, so an 8:9 field came out 16:9 and the frame twice as wide);
|
|
530
|
-
* then the turn, if the chain does it; alpha composited after the conversion, by
|
|
531
|
-
* black) or
|
|
532
|
-
* timestamp — an `overlay` on a colour source would take that source's constant rate; the SAR
|
|
543
|
+
* then the turn, if the chain does it; alpha composited after the conversion, by multiplying the
|
|
544
|
+
* colour by its own alpha plane (over black) or the negative and negating back (over white), so every
|
|
545
|
+
* frame keeps its timestamp — an `overlay` on a colour source would take that source's constant rate; the SAR
|
|
533
546
|
* resample after RGB, nearest, since bicubic in YUV blended a red/blue edge into (197,0,52); the
|
|
534
547
|
* colour tags and an ICC profile stripped only after `format=rgb24` (before it, the matrix falls
|
|
535
548
|
* back to BT.601); and showinfo without its checksums, which doubled the cost of a 1080p decode.
|
|
536
549
|
*/
|
|
537
550
|
function filterChain(plan) {
|
|
538
551
|
const rgb = plan.alpha ? "format=rgba" : "format=rgb24";
|
|
539
|
-
const composite = plan.alpha ?
|
|
540
|
-
"negate"
|
|
541
|
-
"
|
|
542
|
-
"negate",
|
|
552
|
+
const composite = plan.alpha ? [
|
|
553
|
+
`split[vlmkit_c][vlmkit_m];[vlmkit_m]alphaextract,format=gbrp[vlmkit_a];[vlmkit_c]format=gbrp${plan.alpha.background === "black" ? "" : ",negate"}[vlmkit_n];[vlmkit_n][vlmkit_a]blend=all_mode=multiply`,
|
|
554
|
+
...plan.alpha.background === "black" ? [] : ["negate"],
|
|
543
555
|
"format=rgb24"
|
|
544
556
|
] : [];
|
|
545
557
|
return [
|
|
@@ -561,5 +573,4 @@ function filterChain(plan) {
|
|
|
561
573
|
plan.name ? `showinfo@${plan.name}=checksum=0` : "showinfo=checksum=0"
|
|
562
574
|
].filter(Boolean).join(",");
|
|
563
575
|
}
|
|
564
|
-
|
|
565
|
-
export { COLOR_MATRICES, LOSSLESS_CODECS, MAX_DISPLAY_PX, MAX_LOOP_ROWS, chooseFrames, colorPlan, displayGeometry, filterChain, frameAt, gopNumbers, imageTimeline, parseFrameTable, parseShowinfoLine, pickVideoStream, recordingEndMs, rotationFilters, videoTimeline };
|
|
576
|
+
export { COLOR_MATRICES, LOSSLESS_CODECS, MAX_DISPLAY_PX, MAX_LOOP_ROWS, chooseFrames, colorPlan, displayGeometry, filterChain, frameAt, gopNumbers, grayExpansion, imageTimeline, parseFrameTable, parseShowinfoLine, pickVideoStream, recordingEndMs, rotationFilters, videoTimeline };
|
package/dist/webp.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PngData } from "./png-utils.mjs";
|
|
2
|
-
//#region src/webp.d.ts
|
|
3
2
|
export declare const WEBP_ENCODER_PACKAGE = "@jsquash/webp";
|
|
4
3
|
export interface WebpEncodeOptions {
|
|
5
4
|
/**
|
|
@@ -25,5 +24,4 @@ export declare function encodeWebp(image: PngData, options?: WebpEncodeOptions):
|
|
|
25
24
|
* second flag, and an unknown extension is PNG rather than an error — the caller
|
|
26
25
|
* asked for a file, not for a format quiz.
|
|
27
26
|
*/
|
|
28
|
-
export declare function imageFormatForPath(path: string): "png" | "webp";
|
|
29
|
-
//#endregion
|
|
27
|
+
export declare function imageFormatForPath(path: string): "png" | "webp";
|
package/dist/webp.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
|
-
|
|
3
|
+
// src/webp.ts
|
|
4
4
|
/**
|
|
5
5
|
* Lossless WebP encoding for the strip/sheet outputs, via libwebp compiled to
|
|
6
6
|
* WASM (`@jsquash/webp`).
|
|
@@ -102,5 +102,4 @@ async function encodeWebp(image, options = {}) {
|
|
|
102
102
|
function imageFormatForPath(path) {
|
|
103
103
|
return /\.webp$/i.test(path) ? "webp" : "png";
|
|
104
104
|
}
|
|
105
|
-
//#endregion
|
|
106
105
|
export { WEBP_ENCODER_PACKAGE, WebpEncoderMissingError, encodeWebp, formatMissingWebpEncoderError, imageFormatForPath, webpEncoderAvailable };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mizchi/vlmkit-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "VRT diff engine + shared types — pure image / DOM / a11y / visual comparison primitives.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "mizchi",
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"pixelmatch": "^
|
|
47
|
+
"pixelmatch": "^8.0.0",
|
|
48
48
|
"pngjs": "^7.0.0",
|
|
49
|
-
"@mizchi/vlmkit-judge": "0.
|
|
49
|
+
"@mizchi/vlmkit-judge": "0.28.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"
|
|
53
|
-
"
|
|
52
|
+
"@jsquash/webp": "^1",
|
|
53
|
+
"playwright": ">=1.61 <2"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
56
56
|
"@jsquash/webp": {
|