chrome-devtools-mcp 1.8.0 → 1.10.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/README.md +20 -908
- package/build/src/BrowserManager.js +401 -0
- package/build/src/McpContext.js +43 -26
- package/build/src/McpPage.js +112 -4
- package/build/src/McpResponse.js +68 -3
- package/build/src/ToolHandler.js +184 -160
- package/build/src/bin/chrome-devtools-mcp-main.js +12 -7
- package/build/src/bin/chrome-devtools.js +6 -12
- package/build/src/collectors/PageCollector.js +66 -3
- package/build/src/config/browser-options.js +125 -0
- package/build/src/config/category-options.js +89 -0
- package/build/src/config/cli-commands.js +26 -0
- package/build/src/config/cli-options.js +34 -2
- package/build/src/config/mcp-options.js +86 -147
- package/build/src/daemon/utils.js +6 -0
- package/build/src/devtools/DevToolsCommentBridge.js +91 -0
- package/build/src/devtools/DevtoolsUtils.js +27 -21
- package/build/src/formatters/CommentFormatter.js +82 -0
- package/build/src/formatters/CssFormatter.js +812 -0
- package/build/src/formatters/NetworkFormatter.js +5 -2
- package/build/src/index.js +175 -128
- package/build/src/processors/ChunkedTraceParser.js +361 -0
- package/build/src/processors/PerformanceTrace.js +60 -13
- package/build/src/telemetry/ClearcutLogger.js +95 -37
- package/build/src/telemetry/metricsRegistry.js +3 -0
- package/build/src/telemetry/persistence.js +17 -7
- package/build/src/telemetry/transformation.js +53 -4
- package/build/src/telemetry/types.js +1 -0
- package/build/src/third_party/THIRD_PARTY_NOTICES +687 -133
- package/build/src/third_party/bundled-packages.json +6 -3
- package/build/src/third_party/devtools-formatter-worker.js +158 -5
- package/build/src/third_party/devtools-heap-snapshot-worker.js +589 -6
- package/build/src/third_party/index.js +59173 -38013
- package/build/src/third_party/issue-descriptions/webInstallManifestMissingId.md +3 -0
- package/build/src/third_party/issue-descriptions/webInstallManifestMissingNameOrShortName.md +3 -0
- package/build/src/third_party/issue-descriptions/webInstallManifestParsingOrNetworkError.md +3 -0
- package/build/src/third_party/issue-descriptions/webInstallNoManifest.md +3 -0
- package/build/src/third_party/issue-descriptions/webInstallStartUrlInvalid.md +3 -0
- package/build/src/tools/ToolDefinition.js +28 -21
- package/build/src/tools/categories.js +0 -6
- package/build/src/tools/comments.js +169 -0
- package/build/src/tools/console.js +3 -3
- package/build/src/tools/css.js +45 -0
- package/build/src/tools/emulation.js +5 -5
- package/build/src/tools/extensions.js +10 -10
- package/build/src/tools/input.js +159 -87
- package/build/src/tools/lighthouse.js +18 -7
- package/build/src/tools/memory.js +26 -26
- package/build/src/tools/network.js +5 -5
- package/build/src/tools/pages.js +34 -19
- package/build/src/tools/performance.js +7 -6
- package/build/src/tools/pwa.js +8 -8
- package/build/src/tools/screencast.js +5 -4
- package/build/src/tools/screenshot.js +2 -2
- package/build/src/tools/script.js +8 -7
- package/build/src/tools/slim/tools.js +45 -37
- package/build/src/tools/snapshot.js +4 -4
- package/build/src/tools/thirdPartyDeveloper.js +4 -4
- package/build/src/tools/tools.js +6 -9
- package/build/src/tools/webmcp.js +4 -4
- package/build/src/types.js +4 -1
- package/build/src/utils/WaitForHelper.js +26 -9
- package/build/src/utils/logger.js +7 -6
- package/build/src/utils/url.js +73 -0
- package/build/src/version.js +1 -1
- package/package.json +9 -6
- package/skills/chrome-devtools/SKILL.md +2 -1
- package/skills/chrome-devtools-cli/SKILL.md +3 -7
- package/skills/cookie-debugging/SKILL.md +149 -0
- package/skills/memory-leak-debugging/SKILL.md +4 -0
- package/build/src/browser.js +0 -244
- package/build/src/third_party/issue-descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +0 -4
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"@modelcontextprotocol/
|
|
2
|
+
"@modelcontextprotocol/client": "2.0.0",
|
|
3
|
+
"@modelcontextprotocol/core": "2.0.0",
|
|
4
|
+
"@modelcontextprotocol/server": "2.0.0",
|
|
3
5
|
"core-js": "3.50.0",
|
|
4
6
|
"lighthouse": "13.4.1",
|
|
5
7
|
"semver": "7.8.5",
|
|
6
8
|
"yargs": "18.1.0",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
+
"zod": "4.6.2",
|
|
10
|
+
"puppeteer-core": "25.11.0",
|
|
11
|
+
"https://github.com/ChromeDevTools/devtools-frontend": "61277feec01840bfa7cffb21d90bed500f973c70"
|
|
9
12
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as Fs from 'node:fs';
|
|
2
|
+
import * as Url from 'node:url';
|
|
1
3
|
import * as WorkerThreads from 'node:worker_threads';
|
|
2
4
|
|
|
3
5
|
// Copyright 2020 The Chromium Authors
|
|
@@ -80,6 +82,55 @@ class WebWorker {
|
|
|
80
82
|
});
|
|
81
83
|
}
|
|
82
84
|
}
|
|
85
|
+
let lastScreenshotBlobUrl = null;
|
|
86
|
+
function revokeLastScreenshotUrl() {
|
|
87
|
+
if (lastScreenshotBlobUrl) {
|
|
88
|
+
URL.revokeObjectURL(lastScreenshotBlobUrl);
|
|
89
|
+
lastScreenshotBlobUrl = null;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async function saveScreenshot(options) {
|
|
93
|
+
const pageImage = new Image();
|
|
94
|
+
await new Promise((resolve, reject) => {
|
|
95
|
+
pageImage.onload = () => resolve();
|
|
96
|
+
pageImage.onerror = () => reject(new Error('Failed to load image for screenshot'));
|
|
97
|
+
pageImage.src = 'data:image/png;base64,' + options.base64Png;
|
|
98
|
+
});
|
|
99
|
+
let canvas;
|
|
100
|
+
if (options.clip) {
|
|
101
|
+
const scale = pageImage.naturalWidth / options.clip.screenRectWidth;
|
|
102
|
+
const screenRectWidth = options.clip.screenRectWidth * scale;
|
|
103
|
+
const screenRectHeight = options.clip.screenRectHeight * scale;
|
|
104
|
+
const contentLeft = options.clip.visiblePageRectLeft * scale;
|
|
105
|
+
const contentTop = options.clip.visiblePageRectTop * scale;
|
|
106
|
+
canvas = new OffscreenCanvas(Math.floor(screenRectWidth),
|
|
107
|
+
Math.min(1 << 14, Math.floor(screenRectHeight)));
|
|
108
|
+
const ctx = canvas.getContext('2d', { willReadFrequently: true });
|
|
109
|
+
if (!ctx) {
|
|
110
|
+
throw new Error('Could not get 2d context from canvas.');
|
|
111
|
+
}
|
|
112
|
+
ctx.imageSmoothingEnabled = false;
|
|
113
|
+
ctx.drawImage(pageImage, Math.floor(contentLeft), Math.floor(contentTop));
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
canvas = new OffscreenCanvas(pageImage.naturalWidth, Math.min(1 << 14, Math.floor(pageImage.naturalHeight)));
|
|
117
|
+
const ctx = canvas.getContext('2d', { willReadFrequently: true });
|
|
118
|
+
if (!ctx) {
|
|
119
|
+
throw new Error('Could not get 2d context for base64 screenshot.');
|
|
120
|
+
}
|
|
121
|
+
ctx.imageSmoothingEnabled = false;
|
|
122
|
+
ctx.drawImage(pageImage, 0, 0);
|
|
123
|
+
}
|
|
124
|
+
revokeLastScreenshotUrl();
|
|
125
|
+
const link = document.createElement('a');
|
|
126
|
+
link.download = options.fileName + '.png';
|
|
127
|
+
const blob = await canvas.convertToBlob({ type: 'image/png' });
|
|
128
|
+
const blobUrl = URL.createObjectURL(blob);
|
|
129
|
+
lastScreenshotBlobUrl = blobUrl;
|
|
130
|
+
link.href = blobUrl;
|
|
131
|
+
link.click();
|
|
132
|
+
}
|
|
133
|
+
let cssEvaluationElement = null;
|
|
83
134
|
const HOST_RUNTIME$2 = {
|
|
84
135
|
createWorker(url) {
|
|
85
136
|
return new WebWorker(url);
|
|
@@ -94,6 +145,44 @@ const HOST_RUNTIME$2 = {
|
|
|
94
145
|
getLocalStorage() {
|
|
95
146
|
return 'localStorage' in globalThis ? globalThis.localStorage : undefined;
|
|
96
147
|
},
|
|
148
|
+
getCacheStorage() {
|
|
149
|
+
return 'caches' in globalThis ? globalThis.caches : undefined;
|
|
150
|
+
},
|
|
151
|
+
getDevicePixelRatio() {
|
|
152
|
+
return window.devicePixelRatio;
|
|
153
|
+
},
|
|
154
|
+
saveScreenshot,
|
|
155
|
+
revokeLastScreenshotUrl,
|
|
156
|
+
async loadTextFile(url) {
|
|
157
|
+
const response = await fetch(url);
|
|
158
|
+
return await response.text();
|
|
159
|
+
},
|
|
160
|
+
evaluateCSS(dataValue, customExpr) {
|
|
161
|
+
if (!cssEvaluationElement || !cssEvaluationElement.isConnected) {
|
|
162
|
+
cssEvaluationElement = document.getElementById('css-evaluation-element');
|
|
163
|
+
if (!cssEvaluationElement) {
|
|
164
|
+
cssEvaluationElement = document.createElement('div');
|
|
165
|
+
cssEvaluationElement.id = 'css-evaluation-element';
|
|
166
|
+
cssEvaluationElement.setAttribute('style', 'hidden: true; --evaluation: attr(data-custom-expr type(*))');
|
|
167
|
+
document.body.appendChild(cssEvaluationElement);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (dataValue !== null) {
|
|
171
|
+
cssEvaluationElement.setAttribute('data-value', dataValue);
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
cssEvaluationElement.removeAttribute('data-value');
|
|
175
|
+
}
|
|
176
|
+
cssEvaluationElement.setAttribute('data-custom-expr', customExpr);
|
|
177
|
+
return cssEvaluationElement.computedStyleMap().get('--evaluation')?.toString() ?? null;
|
|
178
|
+
},
|
|
179
|
+
removeCSSEvaluationElement() {
|
|
180
|
+
const element = cssEvaluationElement ?? document.getElementById('css-evaluation-element');
|
|
181
|
+
if (element) {
|
|
182
|
+
element.remove();
|
|
183
|
+
}
|
|
184
|
+
cssEvaluationElement = null;
|
|
185
|
+
},
|
|
97
186
|
};
|
|
98
187
|
|
|
99
188
|
var HostRuntime$1 = /*#__PURE__*/Object.freeze({
|
|
@@ -120,13 +209,15 @@ class NodeWorkerScope {
|
|
|
120
209
|
}
|
|
121
210
|
}
|
|
122
211
|
class NodeWorker {
|
|
212
|
+
#worker;
|
|
123
213
|
#workerPromise;
|
|
124
214
|
#disposed = false;
|
|
125
215
|
#rejectWorkerPromise;
|
|
126
216
|
constructor(url) {
|
|
217
|
+
const worker = new WorkerThreads.Worker(new URL(url));
|
|
218
|
+
this.#worker = worker;
|
|
127
219
|
this.#workerPromise = new Promise((resolve, reject) => {
|
|
128
220
|
this.#rejectWorkerPromise = reject;
|
|
129
|
-
const worker = new WorkerThreads.Worker(new URL(url));
|
|
130
221
|
worker.once('message', (message) => {
|
|
131
222
|
if (message === 'workerReady') {
|
|
132
223
|
resolve(worker);
|
|
@@ -134,6 +225,7 @@ class NodeWorker {
|
|
|
134
225
|
});
|
|
135
226
|
worker.on('error', reject);
|
|
136
227
|
});
|
|
228
|
+
this.#workerPromise.catch(() => { });
|
|
137
229
|
}
|
|
138
230
|
postMessage(message, transfer) {
|
|
139
231
|
void this.#workerPromise.then(worker => {
|
|
@@ -144,7 +236,7 @@ class NodeWorker {
|
|
|
144
236
|
}
|
|
145
237
|
dispose() {
|
|
146
238
|
this.#disposed = true;
|
|
147
|
-
void this.#
|
|
239
|
+
void this.#worker.terminate();
|
|
148
240
|
}
|
|
149
241
|
terminate(immediately) {
|
|
150
242
|
if (immediately) {
|
|
@@ -171,6 +263,30 @@ class NodeWorker {
|
|
|
171
263
|
});
|
|
172
264
|
}
|
|
173
265
|
}
|
|
266
|
+
class NodeCacheEntry {
|
|
267
|
+
#entries = new Map();
|
|
268
|
+
async put(url, response) {
|
|
269
|
+
this.#entries.set(url, response.clone());
|
|
270
|
+
}
|
|
271
|
+
async match(url) {
|
|
272
|
+
return this.#entries.get(url)?.clone();
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
class NodeCacheStorage {
|
|
276
|
+
#caches = new Map();
|
|
277
|
+
async open(name) {
|
|
278
|
+
let cache = this.#caches.get(name);
|
|
279
|
+
if (!cache) {
|
|
280
|
+
cache = new NodeCacheEntry();
|
|
281
|
+
this.#caches.set(name, cache);
|
|
282
|
+
}
|
|
283
|
+
return cache;
|
|
284
|
+
}
|
|
285
|
+
async delete(name) {
|
|
286
|
+
return this.#caches.delete(name);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
const nodeCacheStorage = new NodeCacheStorage();
|
|
174
290
|
const HOST_RUNTIME$1 = {
|
|
175
291
|
createWorker(url) {
|
|
176
292
|
return new NodeWorker(url);
|
|
@@ -185,6 +301,21 @@ const HOST_RUNTIME$1 = {
|
|
|
185
301
|
getLocalStorage() {
|
|
186
302
|
return undefined;
|
|
187
303
|
},
|
|
304
|
+
getCacheStorage() {
|
|
305
|
+
return nodeCacheStorage;
|
|
306
|
+
},
|
|
307
|
+
getDevicePixelRatio() {
|
|
308
|
+
return 1;
|
|
309
|
+
},
|
|
310
|
+
async saveScreenshot(_options) { },
|
|
311
|
+
revokeLastScreenshotUrl() { },
|
|
312
|
+
async loadTextFile(url) {
|
|
313
|
+
return await Fs.promises.readFile(Url.fileURLToPath(url), 'utf-8');
|
|
314
|
+
},
|
|
315
|
+
evaluateCSS(_dataValue, _customExpr) {
|
|
316
|
+
return null;
|
|
317
|
+
},
|
|
318
|
+
removeCSSEvaluationElement() { },
|
|
188
319
|
};
|
|
189
320
|
|
|
190
321
|
var HostRuntime = /*#__PURE__*/Object.freeze({
|
|
@@ -8531,9 +8662,9 @@ class ColorConverter {
|
|
|
8531
8662
|
static xyzd65ToOklab(x, y, z) {
|
|
8532
8663
|
const xyzInput = new Vector3([x, y, z]);
|
|
8533
8664
|
const lmsIntermediate = XYZ_TO_LMS_MATRIX.multiply(xyzInput);
|
|
8534
|
-
lmsIntermediate.values[0] = Math.
|
|
8535
|
-
lmsIntermediate.values[1] = Math.
|
|
8536
|
-
lmsIntermediate.values[2] = Math.
|
|
8665
|
+
lmsIntermediate.values[0] = Math.cbrt(lmsIntermediate.values[0]);
|
|
8666
|
+
lmsIntermediate.values[1] = Math.cbrt(lmsIntermediate.values[1]);
|
|
8667
|
+
lmsIntermediate.values[2] = Math.cbrt(lmsIntermediate.values[2]);
|
|
8537
8668
|
const labOutput = LMS_TO_OKLAB_MATRIX.multiply(lmsIntermediate);
|
|
8538
8669
|
return [labOutput.values[0], labOutput.values[1], labOutput.values[2]];
|
|
8539
8670
|
}
|
|
@@ -8557,6 +8688,16 @@ class ColorConverter {
|
|
|
8557
8688
|
const rgbOutput = NAMED_GAMUTS.displayP3_INVERSE.multiply(xyzInput);
|
|
8558
8689
|
return applyTransferFns(NAMED_TRANSFER_FN.sRGB_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]);
|
|
8559
8690
|
}
|
|
8691
|
+
static displayP3LinearToXyzd50(r, g, b) {
|
|
8692
|
+
const rgbInput = new Vector3([r, g, b]);
|
|
8693
|
+
const xyzOutput = NAMED_GAMUTS.displayP3.multiply(rgbInput);
|
|
8694
|
+
return xyzOutput.values;
|
|
8695
|
+
}
|
|
8696
|
+
static xyzd50ToDisplayP3Linear(x, y, z) {
|
|
8697
|
+
const xyzInput = new Vector3([x, y, z]);
|
|
8698
|
+
const rgbResult = NAMED_GAMUTS.displayP3_INVERSE.multiply(xyzInput);
|
|
8699
|
+
return rgbResult.values;
|
|
8700
|
+
}
|
|
8560
8701
|
static proPhotoToXyzd50(r, g, b) {
|
|
8561
8702
|
const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.proPhotoRGB, r, g, b);
|
|
8562
8703
|
const rgbInput = new Vector3([mappedR, mappedG, mappedB]);
|
|
@@ -8756,6 +8897,8 @@ function getColorSpace(colorSpaceText) {
|
|
|
8756
8897
|
return "srgb-linear" ;
|
|
8757
8898
|
case "display-p3" :
|
|
8758
8899
|
return "display-p3" ;
|
|
8900
|
+
case "display-p3-linear" :
|
|
8901
|
+
return "display-p3-linear" ;
|
|
8759
8902
|
case "a98-rgb" :
|
|
8760
8903
|
return "a98-rgb" ;
|
|
8761
8904
|
case "prophoto-rgb" :
|
|
@@ -8974,6 +9117,7 @@ class Lab {
|
|
|
8974
9117
|
["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha),
|
|
8975
9118
|
["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha),
|
|
8976
9119
|
["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha),
|
|
9120
|
+
["display-p3-linear" ]: (self) => new ColorFunction("display-p3-linear" , ...ColorConverter.xyzd50ToDisplayP3Linear(...self.#toXyzd50()), self.alpha),
|
|
8977
9121
|
["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha),
|
|
8978
9122
|
["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha),
|
|
8979
9123
|
["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha),
|
|
@@ -9090,6 +9234,7 @@ class LCH {
|
|
|
9090
9234
|
["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha),
|
|
9091
9235
|
["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha),
|
|
9092
9236
|
["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha),
|
|
9237
|
+
["display-p3-linear" ]: (self) => new ColorFunction("display-p3-linear" , ...ColorConverter.xyzd50ToDisplayP3Linear(...self.#toXyzd50()), self.alpha),
|
|
9093
9238
|
["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha),
|
|
9094
9239
|
["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha),
|
|
9095
9240
|
["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha),
|
|
@@ -9208,6 +9353,7 @@ class Oklab {
|
|
|
9208
9353
|
["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha),
|
|
9209
9354
|
["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha),
|
|
9210
9355
|
["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha),
|
|
9356
|
+
["display-p3-linear" ]: (self) => new ColorFunction("display-p3-linear" , ...ColorConverter.xyzd50ToDisplayP3Linear(...self.#toXyzd50()), self.alpha),
|
|
9211
9357
|
["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha),
|
|
9212
9358
|
["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha),
|
|
9213
9359
|
["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha),
|
|
@@ -9324,6 +9470,7 @@ class Oklch {
|
|
|
9324
9470
|
["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha),
|
|
9325
9471
|
["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha),
|
|
9326
9472
|
["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha),
|
|
9473
|
+
["display-p3-linear" ]: (self) => new ColorFunction("display-p3-linear" , ...ColorConverter.xyzd50ToDisplayP3Linear(...self.#toXyzd50()), self.alpha),
|
|
9327
9474
|
["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha),
|
|
9328
9475
|
["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha),
|
|
9329
9476
|
["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha),
|
|
@@ -9443,6 +9590,7 @@ class ColorFunction {
|
|
|
9443
9590
|
["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha),
|
|
9444
9591
|
["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha),
|
|
9445
9592
|
["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha),
|
|
9593
|
+
["display-p3-linear" ]: (self) => new ColorFunction("display-p3-linear" , ...ColorConverter.xyzd50ToDisplayP3Linear(...self.#toXyzd50()), self.alpha),
|
|
9446
9594
|
["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha),
|
|
9447
9595
|
["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha),
|
|
9448
9596
|
["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha),
|
|
@@ -9459,6 +9607,8 @@ class ColorFunction {
|
|
|
9459
9607
|
return ColorConverter.srgbLinearToXyzd50(p0, p1, p2);
|
|
9460
9608
|
case "display-p3" :
|
|
9461
9609
|
return ColorConverter.displayP3ToXyzd50(p0, p1, p2);
|
|
9610
|
+
case "display-p3-linear" :
|
|
9611
|
+
return ColorConverter.displayP3LinearToXyzd50(p0, p1, p2);
|
|
9462
9612
|
case "a98-rgb" :
|
|
9463
9613
|
return ColorConverter.adobeRGBToXyzd50(p0, p1, p2);
|
|
9464
9614
|
case "prophoto-rgb" :
|
|
@@ -9614,6 +9764,7 @@ class HSL {
|
|
|
9614
9764
|
["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha),
|
|
9615
9765
|
["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha),
|
|
9616
9766
|
["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha),
|
|
9767
|
+
["display-p3-linear" ]: (self) => new ColorFunction("display-p3-linear" , ...ColorConverter.xyzd50ToDisplayP3Linear(...self.#toXyzd50()), self.alpha),
|
|
9617
9768
|
["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha),
|
|
9618
9769
|
["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha),
|
|
9619
9770
|
["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha),
|
|
@@ -9741,6 +9892,7 @@ class HWB {
|
|
|
9741
9892
|
["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha),
|
|
9742
9893
|
["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha),
|
|
9743
9894
|
["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha),
|
|
9895
|
+
["display-p3-linear" ]: (self) => new ColorFunction("display-p3-linear" , ...ColorConverter.xyzd50ToDisplayP3Linear(...self.#toXyzd50()), self.alpha),
|
|
9744
9896
|
["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha),
|
|
9745
9897
|
["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha),
|
|
9746
9898
|
["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha),
|
|
@@ -9969,6 +10121,7 @@ class Legacy {
|
|
|
9969
10121
|
["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha),
|
|
9970
10122
|
["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha),
|
|
9971
10123
|
["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha),
|
|
10124
|
+
["display-p3-linear" ]: (self) => new ColorFunction("display-p3-linear" , ...ColorConverter.xyzd50ToDisplayP3Linear(...self.#toXyzd50()), self.alpha),
|
|
9972
10125
|
["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha),
|
|
9973
10126
|
["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha),
|
|
9974
10127
|
["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha),
|