extension-develop 4.0.27 → 4.0.29-next.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/0~dev-server.mjs +76 -14
- package/dist/0~rspack-config.mjs +868 -45
- package/dist/101.mjs +1 -1
- package/dist/839.mjs +3 -2
- package/dist/bridge.mjs +1 -1
- package/dist/dev-server/control-bridge/controller-client.d.ts +1 -0
- package/dist/dev-server/index.d.ts +2 -0
- package/dist/extension-js-devtools/chrome/background/service_worker.js +1 -1
- package/dist/extension-js-devtools/chrome/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/chrome/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/chrome/pages/centralized-logger.js +1 -1
- package/dist/extension-js-devtools/chrome/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/chromium/background/service_worker.js +1 -1
- package/dist/extension-js-devtools/chromium/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/chromium/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/chromium/pages/centralized-logger.js +1 -1
- package/dist/extension-js-devtools/chromium/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/edge/background/service_worker.js +1 -1
- package/dist/extension-js-devtools/edge/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/edge/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/edge/pages/centralized-logger.js +1 -1
- package/dist/extension-js-devtools/edge/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/firefox/background/scripts.js +1 -1
- package/dist/extension-js-devtools/firefox/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/firefox/manifest.json +6 -1
- package/dist/extension-js-devtools/firefox/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/firefox/pages/centralized-logger.js +1 -1
- package/dist/extension-js-devtools/firefox/pages/welcome.css +1 -1
- package/dist/extension-js-theme/chrome/manifest.json +20 -5
- package/dist/extension-js-theme/chromium/manifest.json +20 -5
- package/dist/extension-js-theme/edge/manifest.json +20 -5
- package/dist/extension-js-theme/firefox/manifest.json +47 -12
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/named-css-colors.d.ts +1 -0
- package/dist/plugin-web-extension/feature-manifest/manifest-lib/theme-values.d.ts +2 -0
- package/dist/plugin-web-extension/feature-manifest/steps/patch-chromium-theme-colors.d.ts +2 -0
- package/dist/types.d.ts +2 -2
- package/package.json +2 -2
package/dist/0~rspack-config.mjs
CHANGED
|
@@ -1065,8 +1065,15 @@ function getManifestOverrides(manifestPath, manifest) {
|
|
|
1065
1065
|
return JSON.stringify(merged, null, 2);
|
|
1066
1066
|
}
|
|
1067
1067
|
const manifest_cjsRequire = createRequire(import.meta.url);
|
|
1068
|
-
const
|
|
1069
|
-
|
|
1068
|
+
const manifestSourceStore = new WeakMap();
|
|
1069
|
+
function manifestSourceEntry(compilation) {
|
|
1070
|
+
let entry = manifestSourceStore.get(compilation);
|
|
1071
|
+
if (!entry) {
|
|
1072
|
+
entry = {};
|
|
1073
|
+
manifestSourceStore.set(compilation, entry);
|
|
1074
|
+
}
|
|
1075
|
+
return entry;
|
|
1076
|
+
}
|
|
1070
1077
|
function readAssetSource(asset) {
|
|
1071
1078
|
if (!asset) return '';
|
|
1072
1079
|
const source = asset.source;
|
|
@@ -1082,16 +1089,16 @@ function readAssetSource(asset) {
|
|
|
1082
1089
|
return '';
|
|
1083
1090
|
}
|
|
1084
1091
|
function setOriginalManifestContent(compilation, source) {
|
|
1085
|
-
compilation
|
|
1092
|
+
manifestSourceEntry(compilation).original = source;
|
|
1086
1093
|
}
|
|
1087
1094
|
function getOriginalManifestContent(compilation) {
|
|
1088
|
-
return compilation
|
|
1095
|
+
return manifestSourceStore.get(compilation)?.original;
|
|
1089
1096
|
}
|
|
1090
1097
|
function setCurrentManifestContent(compilation, source) {
|
|
1091
|
-
compilation
|
|
1098
|
+
manifestSourceEntry(compilation).current = source;
|
|
1092
1099
|
}
|
|
1093
1100
|
function getCurrentManifestContent(compilation) {
|
|
1094
|
-
return compilation
|
|
1101
|
+
return manifestSourceStore.get(compilation)?.current;
|
|
1095
1102
|
}
|
|
1096
1103
|
function getManifestContent(compilation, manifestPath) {
|
|
1097
1104
|
const currentManifest = getCurrentManifestContent(compilation);
|
|
@@ -10730,6 +10737,15 @@ function collectRequiredManifestFiles(manifest) {
|
|
|
10730
10737
|
const backgroundScripts = background?.scripts;
|
|
10731
10738
|
if (Array.isArray(backgroundScripts)) for (const script of backgroundScripts)addFile(script);
|
|
10732
10739
|
addFile(manifestObj?.side_panel?.default_path);
|
|
10740
|
+
addFile(manifestObj?.action?.default_popup);
|
|
10741
|
+
addFile(manifestObj?.browser_action?.default_popup);
|
|
10742
|
+
addFile(manifestObj?.page_action?.default_popup);
|
|
10743
|
+
addFile(manifestObj?.options_ui?.page);
|
|
10744
|
+
addFile(manifestObj?.options_page);
|
|
10745
|
+
addFile(manifestObj?.devtools_page);
|
|
10746
|
+
addFile(manifestObj?.chrome_url_overrides?.newtab);
|
|
10747
|
+
addFile(manifestObj?.chrome_url_overrides?.history);
|
|
10748
|
+
addFile(manifestObj?.chrome_url_overrides?.bookmarks);
|
|
10733
10749
|
const contentScripts = manifestObj?.content_scripts;
|
|
10734
10750
|
if (Array.isArray(contentScripts)) for (const contentScript of contentScripts){
|
|
10735
10751
|
const js = contentScript?.js;
|
|
@@ -11009,6 +11025,845 @@ function patchChromiumBackground(manifest, browser) {
|
|
|
11009
11025
|
}
|
|
11010
11026
|
};
|
|
11011
11027
|
}
|
|
11028
|
+
const NAMED_CSS_COLORS = {
|
|
11029
|
+
aliceblue: [
|
|
11030
|
+
240,
|
|
11031
|
+
248,
|
|
11032
|
+
255
|
|
11033
|
+
],
|
|
11034
|
+
antiquewhite: [
|
|
11035
|
+
250,
|
|
11036
|
+
235,
|
|
11037
|
+
215
|
|
11038
|
+
],
|
|
11039
|
+
aqua: [
|
|
11040
|
+
0,
|
|
11041
|
+
255,
|
|
11042
|
+
255
|
|
11043
|
+
],
|
|
11044
|
+
aquamarine: [
|
|
11045
|
+
127,
|
|
11046
|
+
255,
|
|
11047
|
+
212
|
|
11048
|
+
],
|
|
11049
|
+
azure: [
|
|
11050
|
+
240,
|
|
11051
|
+
255,
|
|
11052
|
+
255
|
|
11053
|
+
],
|
|
11054
|
+
beige: [
|
|
11055
|
+
245,
|
|
11056
|
+
245,
|
|
11057
|
+
220
|
|
11058
|
+
],
|
|
11059
|
+
bisque: [
|
|
11060
|
+
255,
|
|
11061
|
+
228,
|
|
11062
|
+
196
|
|
11063
|
+
],
|
|
11064
|
+
black: [
|
|
11065
|
+
0,
|
|
11066
|
+
0,
|
|
11067
|
+
0
|
|
11068
|
+
],
|
|
11069
|
+
blanchedalmond: [
|
|
11070
|
+
255,
|
|
11071
|
+
235,
|
|
11072
|
+
205
|
|
11073
|
+
],
|
|
11074
|
+
blue: [
|
|
11075
|
+
0,
|
|
11076
|
+
0,
|
|
11077
|
+
255
|
|
11078
|
+
],
|
|
11079
|
+
blueviolet: [
|
|
11080
|
+
138,
|
|
11081
|
+
43,
|
|
11082
|
+
226
|
|
11083
|
+
],
|
|
11084
|
+
brown: [
|
|
11085
|
+
165,
|
|
11086
|
+
42,
|
|
11087
|
+
42
|
|
11088
|
+
],
|
|
11089
|
+
burlywood: [
|
|
11090
|
+
222,
|
|
11091
|
+
184,
|
|
11092
|
+
135
|
|
11093
|
+
],
|
|
11094
|
+
cadetblue: [
|
|
11095
|
+
95,
|
|
11096
|
+
158,
|
|
11097
|
+
160
|
|
11098
|
+
],
|
|
11099
|
+
chartreuse: [
|
|
11100
|
+
127,
|
|
11101
|
+
255,
|
|
11102
|
+
0
|
|
11103
|
+
],
|
|
11104
|
+
chocolate: [
|
|
11105
|
+
210,
|
|
11106
|
+
105,
|
|
11107
|
+
30
|
|
11108
|
+
],
|
|
11109
|
+
coral: [
|
|
11110
|
+
255,
|
|
11111
|
+
127,
|
|
11112
|
+
80
|
|
11113
|
+
],
|
|
11114
|
+
cornflowerblue: [
|
|
11115
|
+
100,
|
|
11116
|
+
149,
|
|
11117
|
+
237
|
|
11118
|
+
],
|
|
11119
|
+
cornsilk: [
|
|
11120
|
+
255,
|
|
11121
|
+
248,
|
|
11122
|
+
220
|
|
11123
|
+
],
|
|
11124
|
+
crimson: [
|
|
11125
|
+
220,
|
|
11126
|
+
20,
|
|
11127
|
+
60
|
|
11128
|
+
],
|
|
11129
|
+
cyan: [
|
|
11130
|
+
0,
|
|
11131
|
+
255,
|
|
11132
|
+
255
|
|
11133
|
+
],
|
|
11134
|
+
darkblue: [
|
|
11135
|
+
0,
|
|
11136
|
+
0,
|
|
11137
|
+
139
|
|
11138
|
+
],
|
|
11139
|
+
darkcyan: [
|
|
11140
|
+
0,
|
|
11141
|
+
139,
|
|
11142
|
+
139
|
|
11143
|
+
],
|
|
11144
|
+
darkgoldenrod: [
|
|
11145
|
+
184,
|
|
11146
|
+
134,
|
|
11147
|
+
11
|
|
11148
|
+
],
|
|
11149
|
+
darkgray: [
|
|
11150
|
+
169,
|
|
11151
|
+
169,
|
|
11152
|
+
169
|
|
11153
|
+
],
|
|
11154
|
+
darkgreen: [
|
|
11155
|
+
0,
|
|
11156
|
+
100,
|
|
11157
|
+
0
|
|
11158
|
+
],
|
|
11159
|
+
darkgrey: [
|
|
11160
|
+
169,
|
|
11161
|
+
169,
|
|
11162
|
+
169
|
|
11163
|
+
],
|
|
11164
|
+
darkkhaki: [
|
|
11165
|
+
189,
|
|
11166
|
+
183,
|
|
11167
|
+
107
|
|
11168
|
+
],
|
|
11169
|
+
darkmagenta: [
|
|
11170
|
+
139,
|
|
11171
|
+
0,
|
|
11172
|
+
139
|
|
11173
|
+
],
|
|
11174
|
+
darkolivegreen: [
|
|
11175
|
+
85,
|
|
11176
|
+
107,
|
|
11177
|
+
47
|
|
11178
|
+
],
|
|
11179
|
+
darkorange: [
|
|
11180
|
+
255,
|
|
11181
|
+
140,
|
|
11182
|
+
0
|
|
11183
|
+
],
|
|
11184
|
+
darkorchid: [
|
|
11185
|
+
153,
|
|
11186
|
+
50,
|
|
11187
|
+
204
|
|
11188
|
+
],
|
|
11189
|
+
darkred: [
|
|
11190
|
+
139,
|
|
11191
|
+
0,
|
|
11192
|
+
0
|
|
11193
|
+
],
|
|
11194
|
+
darksalmon: [
|
|
11195
|
+
233,
|
|
11196
|
+
150,
|
|
11197
|
+
122
|
|
11198
|
+
],
|
|
11199
|
+
darkseagreen: [
|
|
11200
|
+
143,
|
|
11201
|
+
188,
|
|
11202
|
+
143
|
|
11203
|
+
],
|
|
11204
|
+
darkslateblue: [
|
|
11205
|
+
72,
|
|
11206
|
+
61,
|
|
11207
|
+
139
|
|
11208
|
+
],
|
|
11209
|
+
darkslategray: [
|
|
11210
|
+
47,
|
|
11211
|
+
79,
|
|
11212
|
+
79
|
|
11213
|
+
],
|
|
11214
|
+
darkslategrey: [
|
|
11215
|
+
47,
|
|
11216
|
+
79,
|
|
11217
|
+
79
|
|
11218
|
+
],
|
|
11219
|
+
darkturquoise: [
|
|
11220
|
+
0,
|
|
11221
|
+
206,
|
|
11222
|
+
209
|
|
11223
|
+
],
|
|
11224
|
+
darkviolet: [
|
|
11225
|
+
148,
|
|
11226
|
+
0,
|
|
11227
|
+
211
|
|
11228
|
+
],
|
|
11229
|
+
deeppink: [
|
|
11230
|
+
255,
|
|
11231
|
+
20,
|
|
11232
|
+
147
|
|
11233
|
+
],
|
|
11234
|
+
deepskyblue: [
|
|
11235
|
+
0,
|
|
11236
|
+
191,
|
|
11237
|
+
255
|
|
11238
|
+
],
|
|
11239
|
+
dimgray: [
|
|
11240
|
+
105,
|
|
11241
|
+
105,
|
|
11242
|
+
105
|
|
11243
|
+
],
|
|
11244
|
+
dimgrey: [
|
|
11245
|
+
105,
|
|
11246
|
+
105,
|
|
11247
|
+
105
|
|
11248
|
+
],
|
|
11249
|
+
dodgerblue: [
|
|
11250
|
+
30,
|
|
11251
|
+
144,
|
|
11252
|
+
255
|
|
11253
|
+
],
|
|
11254
|
+
firebrick: [
|
|
11255
|
+
178,
|
|
11256
|
+
34,
|
|
11257
|
+
34
|
|
11258
|
+
],
|
|
11259
|
+
floralwhite: [
|
|
11260
|
+
255,
|
|
11261
|
+
250,
|
|
11262
|
+
240
|
|
11263
|
+
],
|
|
11264
|
+
forestgreen: [
|
|
11265
|
+
34,
|
|
11266
|
+
139,
|
|
11267
|
+
34
|
|
11268
|
+
],
|
|
11269
|
+
fuchsia: [
|
|
11270
|
+
255,
|
|
11271
|
+
0,
|
|
11272
|
+
255
|
|
11273
|
+
],
|
|
11274
|
+
gainsboro: [
|
|
11275
|
+
220,
|
|
11276
|
+
220,
|
|
11277
|
+
220
|
|
11278
|
+
],
|
|
11279
|
+
ghostwhite: [
|
|
11280
|
+
248,
|
|
11281
|
+
248,
|
|
11282
|
+
255
|
|
11283
|
+
],
|
|
11284
|
+
gold: [
|
|
11285
|
+
255,
|
|
11286
|
+
215,
|
|
11287
|
+
0
|
|
11288
|
+
],
|
|
11289
|
+
goldenrod: [
|
|
11290
|
+
218,
|
|
11291
|
+
165,
|
|
11292
|
+
32
|
|
11293
|
+
],
|
|
11294
|
+
gray: [
|
|
11295
|
+
128,
|
|
11296
|
+
128,
|
|
11297
|
+
128
|
|
11298
|
+
],
|
|
11299
|
+
green: [
|
|
11300
|
+
0,
|
|
11301
|
+
128,
|
|
11302
|
+
0
|
|
11303
|
+
],
|
|
11304
|
+
greenyellow: [
|
|
11305
|
+
173,
|
|
11306
|
+
255,
|
|
11307
|
+
47
|
|
11308
|
+
],
|
|
11309
|
+
grey: [
|
|
11310
|
+
128,
|
|
11311
|
+
128,
|
|
11312
|
+
128
|
|
11313
|
+
],
|
|
11314
|
+
honeydew: [
|
|
11315
|
+
240,
|
|
11316
|
+
255,
|
|
11317
|
+
240
|
|
11318
|
+
],
|
|
11319
|
+
hotpink: [
|
|
11320
|
+
255,
|
|
11321
|
+
105,
|
|
11322
|
+
180
|
|
11323
|
+
],
|
|
11324
|
+
indianred: [
|
|
11325
|
+
205,
|
|
11326
|
+
92,
|
|
11327
|
+
92
|
|
11328
|
+
],
|
|
11329
|
+
indigo: [
|
|
11330
|
+
75,
|
|
11331
|
+
0,
|
|
11332
|
+
130
|
|
11333
|
+
],
|
|
11334
|
+
ivory: [
|
|
11335
|
+
255,
|
|
11336
|
+
255,
|
|
11337
|
+
240
|
|
11338
|
+
],
|
|
11339
|
+
khaki: [
|
|
11340
|
+
240,
|
|
11341
|
+
230,
|
|
11342
|
+
140
|
|
11343
|
+
],
|
|
11344
|
+
lavender: [
|
|
11345
|
+
230,
|
|
11346
|
+
230,
|
|
11347
|
+
250
|
|
11348
|
+
],
|
|
11349
|
+
lavenderblush: [
|
|
11350
|
+
255,
|
|
11351
|
+
240,
|
|
11352
|
+
245
|
|
11353
|
+
],
|
|
11354
|
+
lawngreen: [
|
|
11355
|
+
124,
|
|
11356
|
+
252,
|
|
11357
|
+
0
|
|
11358
|
+
],
|
|
11359
|
+
lemonchiffon: [
|
|
11360
|
+
255,
|
|
11361
|
+
250,
|
|
11362
|
+
205
|
|
11363
|
+
],
|
|
11364
|
+
lightblue: [
|
|
11365
|
+
173,
|
|
11366
|
+
216,
|
|
11367
|
+
230
|
|
11368
|
+
],
|
|
11369
|
+
lightcoral: [
|
|
11370
|
+
240,
|
|
11371
|
+
128,
|
|
11372
|
+
128
|
|
11373
|
+
],
|
|
11374
|
+
lightcyan: [
|
|
11375
|
+
224,
|
|
11376
|
+
255,
|
|
11377
|
+
255
|
|
11378
|
+
],
|
|
11379
|
+
lightgoldenrodyellow: [
|
|
11380
|
+
250,
|
|
11381
|
+
250,
|
|
11382
|
+
210
|
|
11383
|
+
],
|
|
11384
|
+
lightgray: [
|
|
11385
|
+
211,
|
|
11386
|
+
211,
|
|
11387
|
+
211
|
|
11388
|
+
],
|
|
11389
|
+
lightgreen: [
|
|
11390
|
+
144,
|
|
11391
|
+
238,
|
|
11392
|
+
144
|
|
11393
|
+
],
|
|
11394
|
+
lightgrey: [
|
|
11395
|
+
211,
|
|
11396
|
+
211,
|
|
11397
|
+
211
|
|
11398
|
+
],
|
|
11399
|
+
lightpink: [
|
|
11400
|
+
255,
|
|
11401
|
+
182,
|
|
11402
|
+
193
|
|
11403
|
+
],
|
|
11404
|
+
lightsalmon: [
|
|
11405
|
+
255,
|
|
11406
|
+
160,
|
|
11407
|
+
122
|
|
11408
|
+
],
|
|
11409
|
+
lightseagreen: [
|
|
11410
|
+
32,
|
|
11411
|
+
178,
|
|
11412
|
+
170
|
|
11413
|
+
],
|
|
11414
|
+
lightskyblue: [
|
|
11415
|
+
135,
|
|
11416
|
+
206,
|
|
11417
|
+
250
|
|
11418
|
+
],
|
|
11419
|
+
lightslategray: [
|
|
11420
|
+
119,
|
|
11421
|
+
136,
|
|
11422
|
+
153
|
|
11423
|
+
],
|
|
11424
|
+
lightslategrey: [
|
|
11425
|
+
119,
|
|
11426
|
+
136,
|
|
11427
|
+
153
|
|
11428
|
+
],
|
|
11429
|
+
lightsteelblue: [
|
|
11430
|
+
176,
|
|
11431
|
+
196,
|
|
11432
|
+
222
|
|
11433
|
+
],
|
|
11434
|
+
lightyellow: [
|
|
11435
|
+
255,
|
|
11436
|
+
255,
|
|
11437
|
+
224
|
|
11438
|
+
],
|
|
11439
|
+
lime: [
|
|
11440
|
+
0,
|
|
11441
|
+
255,
|
|
11442
|
+
0
|
|
11443
|
+
],
|
|
11444
|
+
limegreen: [
|
|
11445
|
+
50,
|
|
11446
|
+
205,
|
|
11447
|
+
50
|
|
11448
|
+
],
|
|
11449
|
+
linen: [
|
|
11450
|
+
250,
|
|
11451
|
+
240,
|
|
11452
|
+
230
|
|
11453
|
+
],
|
|
11454
|
+
magenta: [
|
|
11455
|
+
255,
|
|
11456
|
+
0,
|
|
11457
|
+
255
|
|
11458
|
+
],
|
|
11459
|
+
maroon: [
|
|
11460
|
+
128,
|
|
11461
|
+
0,
|
|
11462
|
+
0
|
|
11463
|
+
],
|
|
11464
|
+
mediumaquamarine: [
|
|
11465
|
+
102,
|
|
11466
|
+
205,
|
|
11467
|
+
170
|
|
11468
|
+
],
|
|
11469
|
+
mediumblue: [
|
|
11470
|
+
0,
|
|
11471
|
+
0,
|
|
11472
|
+
205
|
|
11473
|
+
],
|
|
11474
|
+
mediumorchid: [
|
|
11475
|
+
186,
|
|
11476
|
+
85,
|
|
11477
|
+
211
|
|
11478
|
+
],
|
|
11479
|
+
mediumpurple: [
|
|
11480
|
+
147,
|
|
11481
|
+
112,
|
|
11482
|
+
219
|
|
11483
|
+
],
|
|
11484
|
+
mediumseagreen: [
|
|
11485
|
+
60,
|
|
11486
|
+
179,
|
|
11487
|
+
113
|
|
11488
|
+
],
|
|
11489
|
+
mediumslateblue: [
|
|
11490
|
+
123,
|
|
11491
|
+
104,
|
|
11492
|
+
238
|
|
11493
|
+
],
|
|
11494
|
+
mediumspringgreen: [
|
|
11495
|
+
0,
|
|
11496
|
+
250,
|
|
11497
|
+
154
|
|
11498
|
+
],
|
|
11499
|
+
mediumturquoise: [
|
|
11500
|
+
72,
|
|
11501
|
+
209,
|
|
11502
|
+
204
|
|
11503
|
+
],
|
|
11504
|
+
mediumvioletred: [
|
|
11505
|
+
199,
|
|
11506
|
+
21,
|
|
11507
|
+
133
|
|
11508
|
+
],
|
|
11509
|
+
midnightblue: [
|
|
11510
|
+
25,
|
|
11511
|
+
25,
|
|
11512
|
+
112
|
|
11513
|
+
],
|
|
11514
|
+
mintcream: [
|
|
11515
|
+
245,
|
|
11516
|
+
255,
|
|
11517
|
+
250
|
|
11518
|
+
],
|
|
11519
|
+
mistyrose: [
|
|
11520
|
+
255,
|
|
11521
|
+
228,
|
|
11522
|
+
225
|
|
11523
|
+
],
|
|
11524
|
+
moccasin: [
|
|
11525
|
+
255,
|
|
11526
|
+
228,
|
|
11527
|
+
181
|
|
11528
|
+
],
|
|
11529
|
+
navajowhite: [
|
|
11530
|
+
255,
|
|
11531
|
+
222,
|
|
11532
|
+
173
|
|
11533
|
+
],
|
|
11534
|
+
navy: [
|
|
11535
|
+
0,
|
|
11536
|
+
0,
|
|
11537
|
+
128
|
|
11538
|
+
],
|
|
11539
|
+
oldlace: [
|
|
11540
|
+
253,
|
|
11541
|
+
245,
|
|
11542
|
+
230
|
|
11543
|
+
],
|
|
11544
|
+
olive: [
|
|
11545
|
+
128,
|
|
11546
|
+
128,
|
|
11547
|
+
0
|
|
11548
|
+
],
|
|
11549
|
+
olivedrab: [
|
|
11550
|
+
107,
|
|
11551
|
+
142,
|
|
11552
|
+
35
|
|
11553
|
+
],
|
|
11554
|
+
orange: [
|
|
11555
|
+
255,
|
|
11556
|
+
165,
|
|
11557
|
+
0
|
|
11558
|
+
],
|
|
11559
|
+
orangered: [
|
|
11560
|
+
255,
|
|
11561
|
+
69,
|
|
11562
|
+
0
|
|
11563
|
+
],
|
|
11564
|
+
orchid: [
|
|
11565
|
+
218,
|
|
11566
|
+
112,
|
|
11567
|
+
214
|
|
11568
|
+
],
|
|
11569
|
+
palegoldenrod: [
|
|
11570
|
+
238,
|
|
11571
|
+
232,
|
|
11572
|
+
170
|
|
11573
|
+
],
|
|
11574
|
+
palegreen: [
|
|
11575
|
+
152,
|
|
11576
|
+
251,
|
|
11577
|
+
152
|
|
11578
|
+
],
|
|
11579
|
+
paleturquoise: [
|
|
11580
|
+
175,
|
|
11581
|
+
238,
|
|
11582
|
+
238
|
|
11583
|
+
],
|
|
11584
|
+
palevioletred: [
|
|
11585
|
+
219,
|
|
11586
|
+
112,
|
|
11587
|
+
147
|
|
11588
|
+
],
|
|
11589
|
+
papayawhip: [
|
|
11590
|
+
255,
|
|
11591
|
+
239,
|
|
11592
|
+
213
|
|
11593
|
+
],
|
|
11594
|
+
peachpuff: [
|
|
11595
|
+
255,
|
|
11596
|
+
218,
|
|
11597
|
+
185
|
|
11598
|
+
],
|
|
11599
|
+
peru: [
|
|
11600
|
+
205,
|
|
11601
|
+
133,
|
|
11602
|
+
63
|
|
11603
|
+
],
|
|
11604
|
+
pink: [
|
|
11605
|
+
255,
|
|
11606
|
+
192,
|
|
11607
|
+
203
|
|
11608
|
+
],
|
|
11609
|
+
plum: [
|
|
11610
|
+
221,
|
|
11611
|
+
160,
|
|
11612
|
+
221
|
|
11613
|
+
],
|
|
11614
|
+
powderblue: [
|
|
11615
|
+
176,
|
|
11616
|
+
224,
|
|
11617
|
+
230
|
|
11618
|
+
],
|
|
11619
|
+
purple: [
|
|
11620
|
+
128,
|
|
11621
|
+
0,
|
|
11622
|
+
128
|
|
11623
|
+
],
|
|
11624
|
+
rebeccapurple: [
|
|
11625
|
+
102,
|
|
11626
|
+
51,
|
|
11627
|
+
153
|
|
11628
|
+
],
|
|
11629
|
+
red: [
|
|
11630
|
+
255,
|
|
11631
|
+
0,
|
|
11632
|
+
0
|
|
11633
|
+
],
|
|
11634
|
+
rosybrown: [
|
|
11635
|
+
188,
|
|
11636
|
+
143,
|
|
11637
|
+
143
|
|
11638
|
+
],
|
|
11639
|
+
royalblue: [
|
|
11640
|
+
65,
|
|
11641
|
+
105,
|
|
11642
|
+
225
|
|
11643
|
+
],
|
|
11644
|
+
saddlebrown: [
|
|
11645
|
+
139,
|
|
11646
|
+
69,
|
|
11647
|
+
19
|
|
11648
|
+
],
|
|
11649
|
+
salmon: [
|
|
11650
|
+
250,
|
|
11651
|
+
128,
|
|
11652
|
+
114
|
|
11653
|
+
],
|
|
11654
|
+
sandybrown: [
|
|
11655
|
+
244,
|
|
11656
|
+
164,
|
|
11657
|
+
96
|
|
11658
|
+
],
|
|
11659
|
+
seagreen: [
|
|
11660
|
+
46,
|
|
11661
|
+
139,
|
|
11662
|
+
87
|
|
11663
|
+
],
|
|
11664
|
+
seashell: [
|
|
11665
|
+
255,
|
|
11666
|
+
245,
|
|
11667
|
+
238
|
|
11668
|
+
],
|
|
11669
|
+
sienna: [
|
|
11670
|
+
160,
|
|
11671
|
+
82,
|
|
11672
|
+
45
|
|
11673
|
+
],
|
|
11674
|
+
silver: [
|
|
11675
|
+
192,
|
|
11676
|
+
192,
|
|
11677
|
+
192
|
|
11678
|
+
],
|
|
11679
|
+
skyblue: [
|
|
11680
|
+
135,
|
|
11681
|
+
206,
|
|
11682
|
+
235
|
|
11683
|
+
],
|
|
11684
|
+
slateblue: [
|
|
11685
|
+
106,
|
|
11686
|
+
90,
|
|
11687
|
+
205
|
|
11688
|
+
],
|
|
11689
|
+
slategray: [
|
|
11690
|
+
112,
|
|
11691
|
+
128,
|
|
11692
|
+
144
|
|
11693
|
+
],
|
|
11694
|
+
slategrey: [
|
|
11695
|
+
112,
|
|
11696
|
+
128,
|
|
11697
|
+
144
|
|
11698
|
+
],
|
|
11699
|
+
snow: [
|
|
11700
|
+
255,
|
|
11701
|
+
250,
|
|
11702
|
+
250
|
|
11703
|
+
],
|
|
11704
|
+
springgreen: [
|
|
11705
|
+
0,
|
|
11706
|
+
255,
|
|
11707
|
+
127
|
|
11708
|
+
],
|
|
11709
|
+
steelblue: [
|
|
11710
|
+
70,
|
|
11711
|
+
130,
|
|
11712
|
+
180
|
|
11713
|
+
],
|
|
11714
|
+
tan: [
|
|
11715
|
+
210,
|
|
11716
|
+
180,
|
|
11717
|
+
140
|
|
11718
|
+
],
|
|
11719
|
+
teal: [
|
|
11720
|
+
0,
|
|
11721
|
+
128,
|
|
11722
|
+
128
|
|
11723
|
+
],
|
|
11724
|
+
thistle: [
|
|
11725
|
+
216,
|
|
11726
|
+
191,
|
|
11727
|
+
216
|
|
11728
|
+
],
|
|
11729
|
+
tomato: [
|
|
11730
|
+
255,
|
|
11731
|
+
99,
|
|
11732
|
+
71
|
|
11733
|
+
],
|
|
11734
|
+
turquoise: [
|
|
11735
|
+
64,
|
|
11736
|
+
224,
|
|
11737
|
+
208
|
|
11738
|
+
],
|
|
11739
|
+
violet: [
|
|
11740
|
+
238,
|
|
11741
|
+
130,
|
|
11742
|
+
238
|
|
11743
|
+
],
|
|
11744
|
+
wheat: [
|
|
11745
|
+
245,
|
|
11746
|
+
222,
|
|
11747
|
+
179
|
|
11748
|
+
],
|
|
11749
|
+
white: [
|
|
11750
|
+
255,
|
|
11751
|
+
255,
|
|
11752
|
+
255
|
|
11753
|
+
],
|
|
11754
|
+
whitesmoke: [
|
|
11755
|
+
245,
|
|
11756
|
+
245,
|
|
11757
|
+
245
|
|
11758
|
+
],
|
|
11759
|
+
yellow: [
|
|
11760
|
+
255,
|
|
11761
|
+
255,
|
|
11762
|
+
0
|
|
11763
|
+
],
|
|
11764
|
+
yellowgreen: [
|
|
11765
|
+
154,
|
|
11766
|
+
205,
|
|
11767
|
+
50
|
|
11768
|
+
]
|
|
11769
|
+
};
|
|
11770
|
+
const isChannel = (entry)=>'number' == typeof entry && Number.isInteger(entry) && entry >= 0 && entry <= 255;
|
|
11771
|
+
const isFiniteNumber = (entry)=>'number' == typeof entry && Number.isFinite(entry);
|
|
11772
|
+
function parseHexThemeColor(value) {
|
|
11773
|
+
if ('string' != typeof value) return;
|
|
11774
|
+
const match = /^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(value.trim());
|
|
11775
|
+
if (!match) return;
|
|
11776
|
+
const hex = match[1];
|
|
11777
|
+
const digits = hex.length >= 6 ? hex.match(/../g) : hex.split('').map((digit)=>digit + digit);
|
|
11778
|
+
const bytes = digits.map((pair)=>parseInt(pair, 16));
|
|
11779
|
+
if (3 === bytes.length) return bytes;
|
|
11780
|
+
return [
|
|
11781
|
+
...bytes.slice(0, 3),
|
|
11782
|
+
Math.round(bytes[3] / 255 * 1000) / 1000
|
|
11783
|
+
];
|
|
11784
|
+
}
|
|
11785
|
+
function parseCssThemeColor(value) {
|
|
11786
|
+
const hex = parseHexThemeColor(value);
|
|
11787
|
+
if (hex) return hex;
|
|
11788
|
+
if ('string' != typeof value) return;
|
|
11789
|
+
const keyword = value.trim().toLowerCase();
|
|
11790
|
+
if ('transparent' === keyword) return [
|
|
11791
|
+
0,
|
|
11792
|
+
0,
|
|
11793
|
+
0,
|
|
11794
|
+
0
|
|
11795
|
+
];
|
|
11796
|
+
const named = NAMED_CSS_COLORS[keyword];
|
|
11797
|
+
if (named) return [
|
|
11798
|
+
...named
|
|
11799
|
+
];
|
|
11800
|
+
const match = /^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(0|1|0?\.\d+|1\.0+)\s*)?\)$/.exec(keyword);
|
|
11801
|
+
if (!match) return;
|
|
11802
|
+
const channels = match.slice(1, 4).map(Number);
|
|
11803
|
+
if (channels.some((channel)=>channel > 255)) return;
|
|
11804
|
+
if (void 0 === match[4]) return channels;
|
|
11805
|
+
return [
|
|
11806
|
+
...channels,
|
|
11807
|
+
Number(match[4])
|
|
11808
|
+
];
|
|
11809
|
+
}
|
|
11810
|
+
function colorValueDetail(value) {
|
|
11811
|
+
if (parseCssThemeColor(value)) return;
|
|
11812
|
+
if (!Array.isArray(value) || 3 !== value.length && 4 !== value.length) return 'Chrome only accepts an [R, G, B] or [R, G, B, A] array here.';
|
|
11813
|
+
for (const entry of value.slice(0, 3))if (!isChannel(entry)) return 'Chrome only accepts integer color channels from 0 to 255 here.';
|
|
11814
|
+
if (4 === value.length && !isFiniteNumber(value[3])) return 'Chrome only accepts a numeric alpha channel here.';
|
|
11815
|
+
}
|
|
11816
|
+
function tintValueDetail(value) {
|
|
11817
|
+
if (!Array.isArray(value) || 3 !== value.length || !value.every(isFiniteNumber)) return 'Chrome only accepts a [hue, saturation, lightness] array of 3 numbers here.';
|
|
11818
|
+
}
|
|
11819
|
+
function collectThemeValueIssues(manifest) {
|
|
11820
|
+
const issues = [];
|
|
11821
|
+
const theme = manifest?.theme;
|
|
11822
|
+
if (!theme || 'object' != typeof theme) return issues;
|
|
11823
|
+
const groups = [
|
|
11824
|
+
[
|
|
11825
|
+
'colors',
|
|
11826
|
+
theme.colors,
|
|
11827
|
+
colorValueDetail
|
|
11828
|
+
],
|
|
11829
|
+
[
|
|
11830
|
+
'tints',
|
|
11831
|
+
theme.tints,
|
|
11832
|
+
tintValueDetail
|
|
11833
|
+
]
|
|
11834
|
+
];
|
|
11835
|
+
for (const [group, container, detailFor] of groups)if (!(!container || 'object' != typeof container || Array.isArray(container))) for (const [key, value] of Object.entries(container)){
|
|
11836
|
+
const detail = detailFor(value);
|
|
11837
|
+
if (detail) issues.push({
|
|
11838
|
+
field: `theme.${group}.${key}`,
|
|
11839
|
+
detail,
|
|
11840
|
+
value: JSON.stringify(value)
|
|
11841
|
+
});
|
|
11842
|
+
}
|
|
11843
|
+
return issues;
|
|
11844
|
+
}
|
|
11845
|
+
function patchChromiumThemeColors(manifest, browser) {
|
|
11846
|
+
if (!isChromiumBasedBrowser(String(browser))) return manifest;
|
|
11847
|
+
const theme = manifest.theme;
|
|
11848
|
+
if (!theme || 'object' != typeof theme || Array.isArray(theme)) return manifest;
|
|
11849
|
+
const colors = theme.colors;
|
|
11850
|
+
if (!colors || 'object' != typeof colors || Array.isArray(colors)) return manifest;
|
|
11851
|
+
let converted = false;
|
|
11852
|
+
const patchedColors = {};
|
|
11853
|
+
for (const [key, value] of Object.entries(colors)){
|
|
11854
|
+
const rgb = parseCssThemeColor(value);
|
|
11855
|
+
patchedColors[key] = rgb ?? value;
|
|
11856
|
+
if (rgb) converted = true;
|
|
11857
|
+
}
|
|
11858
|
+
if (!converted) return manifest;
|
|
11859
|
+
return {
|
|
11860
|
+
...manifest,
|
|
11861
|
+
theme: {
|
|
11862
|
+
...theme,
|
|
11863
|
+
colors: patchedColors
|
|
11864
|
+
}
|
|
11865
|
+
};
|
|
11866
|
+
}
|
|
11012
11867
|
function patchDevContentScriptManifestPaths(compilation, manifest) {
|
|
11013
11868
|
if ('development' !== compilation.options.mode) return manifest;
|
|
11014
11869
|
const cs = manifest.content_scripts;
|
|
@@ -11127,6 +11982,7 @@ class UpdateManifest {
|
|
|
11127
11982
|
let patchedManifest = buildCanonicalManifest(this.manifestPath, manifest, this.browser);
|
|
11128
11983
|
patchedManifest = patchGeckoBackground(patchedManifest, this.browser);
|
|
11129
11984
|
patchedManifest = patchChromiumBackground(patchedManifest, this.browser);
|
|
11985
|
+
patchedManifest = patchChromiumThemeColors(patchedManifest, this.browser);
|
|
11130
11986
|
const overrides = getManifestOverrides(this.manifestPath, manifest);
|
|
11131
11987
|
if ('development' === compiler.options.mode) {
|
|
11132
11988
|
if (patchedManifest.content_scripts) patchedManifest.content_scripts = this.applyDevOverrides(patchedManifest);
|
|
@@ -11168,42 +12024,6 @@ class UpdateManifest {
|
|
|
11168
12024
|
});
|
|
11169
12025
|
}
|
|
11170
12026
|
}
|
|
11171
|
-
const isChannel = (entry)=>'number' == typeof entry && Number.isInteger(entry) && entry >= 0 && entry <= 255;
|
|
11172
|
-
const isFiniteNumber = (entry)=>'number' == typeof entry && Number.isFinite(entry);
|
|
11173
|
-
function colorValueDetail(value) {
|
|
11174
|
-
if (!Array.isArray(value) || 3 !== value.length && 4 !== value.length) return 'Chrome only accepts an [R, G, B] or [R, G, B, A] array here.';
|
|
11175
|
-
for (const entry of value.slice(0, 3))if (!isChannel(entry)) return 'Chrome only accepts integer color channels from 0 to 255 here.';
|
|
11176
|
-
if (4 === value.length && !isFiniteNumber(value[3])) return 'Chrome only accepts a numeric alpha channel here.';
|
|
11177
|
-
}
|
|
11178
|
-
function tintValueDetail(value) {
|
|
11179
|
-
if (!Array.isArray(value) || 3 !== value.length || !value.every(isFiniteNumber)) return 'Chrome only accepts a [hue, saturation, lightness] array of 3 numbers here.';
|
|
11180
|
-
}
|
|
11181
|
-
function collectThemeValueIssues(manifest) {
|
|
11182
|
-
const issues = [];
|
|
11183
|
-
const theme = manifest?.theme;
|
|
11184
|
-
if (!theme || 'object' != typeof theme) return issues;
|
|
11185
|
-
const groups = [
|
|
11186
|
-
[
|
|
11187
|
-
'colors',
|
|
11188
|
-
theme.colors,
|
|
11189
|
-
colorValueDetail
|
|
11190
|
-
],
|
|
11191
|
-
[
|
|
11192
|
-
'tints',
|
|
11193
|
-
theme.tints,
|
|
11194
|
-
tintValueDetail
|
|
11195
|
-
]
|
|
11196
|
-
];
|
|
11197
|
-
for (const [group, container, detailFor] of groups)if (!(!container || 'object' != typeof container || Array.isArray(container))) for (const [key, value] of Object.entries(container)){
|
|
11198
|
-
const detail = detailFor(value);
|
|
11199
|
-
if (detail) issues.push({
|
|
11200
|
-
field: `theme.${group}.${key}`,
|
|
11201
|
-
detail,
|
|
11202
|
-
value: JSON.stringify(value)
|
|
11203
|
-
});
|
|
11204
|
-
}
|
|
11205
|
-
return issues;
|
|
11206
|
-
}
|
|
11207
12027
|
class ValidateThemeValues {
|
|
11208
12028
|
static name = 'manifest:validate-theme-values';
|
|
11209
12029
|
manifestPath;
|
|
@@ -11730,10 +12550,13 @@ class WebResourcesPlugin {
|
|
|
11730
12550
|
function isCriticalJsonFeatureKey(key) {
|
|
11731
12551
|
return key.startsWith('declarative_net_request') || 'storage.managed_schema' === key;
|
|
11732
12552
|
}
|
|
12553
|
+
function toComparablePath(value) {
|
|
12554
|
+
return 'string' == typeof value ? value : JSON.stringify(value);
|
|
12555
|
+
}
|
|
11733
12556
|
function flattenValues(map) {
|
|
11734
12557
|
const paths = [];
|
|
11735
|
-
for (const val of Object.values(map || {}))if (Array.isArray(val)) paths.push(...val.filter(Boolean));
|
|
11736
|
-
else if (val) paths.push(val);
|
|
12558
|
+
for (const val of Object.values(map || {}))if (Array.isArray(val)) paths.push(...val.filter(Boolean).map(toComparablePath));
|
|
12559
|
+
else if (val) paths.push(toComparablePath(val));
|
|
11737
12560
|
return paths;
|
|
11738
12561
|
}
|
|
11739
12562
|
function diffArray(prev, next) {
|
|
@@ -11786,7 +12609,7 @@ class ManifestFieldsChangeDetector {
|
|
|
11786
12609
|
else if (val) scripts.push(val);
|
|
11787
12610
|
const html = fields.html || {};
|
|
11788
12611
|
const iconsRaw = fields.icons;
|
|
11789
|
-
const icons = iconsRaw ? Array.isArray(iconsRaw) ? iconsRaw : flattenValues(iconsRaw) : [];
|
|
12612
|
+
const icons = iconsRaw ? Array.isArray(iconsRaw) ? iconsRaw.filter(Boolean).map(toComparablePath) : flattenValues(iconsRaw) : [];
|
|
11790
12613
|
const jsonMap = fields.json || {};
|
|
11791
12614
|
const json = [];
|
|
11792
12615
|
for (const [key, val] of Object.entries(jsonMap))if (isCriticalJsonFeatureKey(key)) {
|