Update node-vibrant to v4 (#23718)

This commit is contained in:
Wendelin 2025-01-13 14:18:04 +01:00 committed by GitHub
parent 2e1efecdf7
commit cc42d958ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2033 additions and 495 deletions

View File

@ -93,9 +93,7 @@
"@thomasloven/round-slider": "0.6.0",
"@vaadin/combo-box": "24.6.1",
"@vaadin/vaadin-themable-mixin": "24.6.1",
"@vibrant/color": "3.2.1-alpha.1",
"@vibrant/core": "3.2.1-alpha.1",
"@vibrant/quantizer-mmcq": "3.2.1-alpha.1",
"@vibrant/color": "4.0.0",
"@vue/web-component-wrapper": "1.3.0",
"@webcomponents/scoped-custom-element-registry": "0.0.9",
"@webcomponents/webcomponentsjs": "2.8.0",
@ -128,7 +126,7 @@
"luxon": "3.5.0",
"marked": "15.0.6",
"memoize-one": "6.0.0",
"node-vibrant": "3.2.1-alpha.1",
"node-vibrant": "4.0.1",
"punycode": "2.3.1",
"qr-scanner": "1.4.2",
"qrcode": "1.5.4",

View File

@ -1,7 +1,7 @@
// We import the minified bundle because the unminified bundle
// has some quirks that break wds. See #7784 for unminified version.
import type { Swatch, Vec3 } from "@vibrant/color";
import Vibrant from "node-vibrant/dist/vibrant";
import { Vibrant } from "node-vibrant/browser";
import { getRGBContrastRatio } from "../color/rgb";
const CONTRAST_RATIO = 4.5;
@ -111,7 +111,7 @@ const customGenerator = (colors: Swatch[]) => {
};
};
// Set our custom generator as the default.
// @ts-expect-error
Vibrant._pipeline.generator.register("default", customGenerator);
export const extractColors = (url: string, downsampleColors = 16) =>

2518
yarn.lock

File diff suppressed because it is too large Load Diff