wallpaper-engine-dsh 0.1.3 → 0.1.5
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/lib/client.js +59 -33
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -722,8 +722,6 @@ window.__ModuleLoader__.load({
|
|
|
722
722
|
s.setProperty("--webg-saturate", String(1.15 + selection.blur * 0.028));
|
|
723
723
|
s.setProperty("--webg-glass-brightness", "1.04");
|
|
724
724
|
s.setProperty("--webg-wallpaper-blur", selection.wallpaperBlur + "px");
|
|
725
|
-
// Scaling compensates the transparent fringe CSS blur reveals at edges.
|
|
726
|
-
s.setProperty("--webg-wallpaper-scale", (1 + selection.wallpaperBlur * 0.006).toFixed(4));
|
|
727
725
|
// Canvas fit: object-fit/position for video and still wallpapers (iframes
|
|
728
726
|
// ignore object-fit — web wallpapers always fill their layer).
|
|
729
727
|
s.setProperty("--webg-fit", selection.fit);
|
|
@@ -746,7 +744,6 @@ window.__ModuleLoader__.load({
|
|
|
746
744
|
s.removeProperty("--webg-saturate");
|
|
747
745
|
s.removeProperty("--webg-glass-brightness");
|
|
748
746
|
s.removeProperty("--webg-wallpaper-blur");
|
|
749
|
-
s.removeProperty("--webg-wallpaper-scale");
|
|
750
747
|
s.removeProperty("--webg-fit");
|
|
751
748
|
s.removeProperty("--webg-position");
|
|
752
749
|
const scrim = document.getElementById(SCRIM_ID);
|
|
@@ -755,7 +752,10 @@ window.__ModuleLoader__.load({
|
|
|
755
752
|
|
|
756
753
|
// ── Settings picker ─────────────────────────────────────────────────────────
|
|
757
754
|
function SliderRow(label, min, max, step, value, onInput, suffix) {
|
|
758
|
-
|
|
755
|
+
// A Fragment of three cells — the surrounding .webg-effects grid keeps
|
|
756
|
+
// every slider starting and ending at the same x regardless of how wide
|
|
757
|
+
// the label text is (壁纸模糊 vs 暗化 vs Wallpaper blur…).
|
|
758
|
+
return React.createElement(React.Fragment, null,
|
|
759
759
|
React.createElement("span", { className: "webg-hint webg-label" }, label),
|
|
760
760
|
React.createElement("input", {
|
|
761
761
|
className: "webg-slider", type: "range",
|
|
@@ -1144,10 +1144,12 @@ window.__ModuleLoader__.load({
|
|
|
1144
1144
|
React.createElement("option", { key: POSITIONS[i], value: POSITIONS[i] }, label),
|
|
1145
1145
|
)),
|
|
1146
1146
|
),
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1147
|
+
React.createElement("div", { className: "webg-effects" },
|
|
1148
|
+
SliderRow(t.wallpaperBlur, 0, 60, 1, sel.wallpaperBlur, onWallpaperBlur, sel.wallpaperBlur + "px"),
|
|
1149
|
+
SliderRow(t.scrim, 0, 90, 5, Math.round(sel.scrim * 100), onScrim, Math.round(sel.scrim * 100) + "%"),
|
|
1150
|
+
SliderRow(t.border, 0, 90, 5, Math.round(sel.border * 100), onBorder, Math.round(sel.border * 100) + "%"),
|
|
1151
|
+
SliderRow(t.glass, 0, 40, 1, sel.blur, onBlur, sel.blur + "px"),
|
|
1152
|
+
),
|
|
1151
1153
|
),
|
|
1152
1154
|
// ── Resource monitor ──
|
|
1153
1155
|
sel.id && React.createElement("div", { className: "webg-row webg-monitor-row" },
|
|
@@ -1198,14 +1200,21 @@ window.__ModuleLoader__.load({
|
|
|
1198
1200
|
}
|
|
1199
1201
|
.webg-layer--enter { opacity: 0; }
|
|
1200
1202
|
.webg-layer--leave { opacity: 0; }
|
|
1203
|
+
/* Overscan: the media is LARGER than the layer by two blur radii on every
|
|
1204
|
+
side, so the transparent fringe CSS blur produces is clipped by the
|
|
1205
|
+
layer's overflow:hidden instead of compensated with a content-warping
|
|
1206
|
+
scale. A slight saturate keeps blurred colours from washing out. */
|
|
1201
1207
|
.webg-layer .webg-media {
|
|
1202
|
-
|
|
1208
|
+
position: absolute;
|
|
1209
|
+
inset: calc(-2 * var(--webg-wallpaper-blur, 0px));
|
|
1210
|
+
width: calc(100% + 4 * var(--webg-wallpaper-blur, 0px));
|
|
1211
|
+
height: calc(100% + 4 * var(--webg-wallpaper-blur, 0px));
|
|
1212
|
+
max-width: none; max-height: none;
|
|
1213
|
+
object-fit: var(--webg-fit, cover);
|
|
1203
1214
|
object-position: var(--webg-position, center);
|
|
1204
1215
|
display: block;
|
|
1205
1216
|
background: transparent; border: 0;
|
|
1206
|
-
filter: blur(var(--webg-wallpaper-blur, 0px));
|
|
1207
|
-
transform: scale(var(--webg-wallpaper-scale, 1));
|
|
1208
|
-
transform-origin: center;
|
|
1217
|
+
filter: blur(var(--webg-wallpaper-blur, 0px)) saturate(1.06);
|
|
1209
1218
|
}
|
|
1210
1219
|
|
|
1211
1220
|
/* Scrim: above the wallpaper (-1 > -2), below the UI. */
|
|
@@ -1263,15 +1272,16 @@ window.__ModuleLoader__.load({
|
|
|
1263
1272
|
|
|
1264
1273
|
/* ── Picker chrome (token-driven, theme-aware) ── */
|
|
1265
1274
|
/* padding-top lifts the first row off the settings-section divider so the
|
|
1266
|
-
search/language row breathes; gap keeps every row evenly spaced.
|
|
1275
|
+
search/language row breathes; gap keeps every row evenly spaced.
|
|
1276
|
+
Type scale follows the shell: 14px body → 13px controls → 12px hints. */
|
|
1267
1277
|
.webg-picker { display: flex; flex-direction: column; gap: 12px; padding-top: 10px; }
|
|
1268
1278
|
.webg-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
|
|
1269
|
-
.webg-hint { font-size:
|
|
1279
|
+
.webg-hint { font-size: 12px; opacity: 0.7; color: var(--dsw-alias-label-tertiary, inherit); }
|
|
1270
1280
|
.webg-error {
|
|
1271
|
-
font-size:
|
|
1281
|
+
font-size: 13px;
|
|
1272
1282
|
color: var(--dsw-alias-state-error-primary, #d44);
|
|
1273
1283
|
}
|
|
1274
|
-
.webg-label {
|
|
1284
|
+
.webg-label { white-space: nowrap; }
|
|
1275
1285
|
.webg-value { min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
|
|
1276
1286
|
|
|
1277
1287
|
.webg-btn {
|
|
@@ -1281,21 +1291,26 @@ window.__ModuleLoader__.load({
|
|
|
1281
1291
|
border: 1px solid var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.35));
|
|
1282
1292
|
background: var(--dsw-alias-bg-layer-1, rgba(128, 128, 128, 0.12));
|
|
1283
1293
|
color: var(--dsw-alias-label-primary, inherit);
|
|
1284
|
-
font-size:
|
|
1294
|
+
font-size: 12px;
|
|
1285
1295
|
transition: background-color 120ms ease, border-color 120ms ease;
|
|
1286
1296
|
}
|
|
1297
|
+
/* Ghost-button hover rides the shell's own interactive-hover token. */
|
|
1287
1298
|
.webg-btn:hover:not(:disabled) {
|
|
1288
|
-
background: var(--dsw-alias-bg-
|
|
1299
|
+
background: var(--dsw-alias-interactive-bg-hover,
|
|
1300
|
+
var(--dsw-alias-bg-layer-2, rgba(128, 128, 128, 0.2)));
|
|
1289
1301
|
border-color: var(--dsw-alias-border-l1, rgba(128, 128, 128, 0.5));
|
|
1290
1302
|
}
|
|
1291
1303
|
.webg-btn:disabled { opacity: 0.45; cursor: not-allowed; }
|
|
1304
|
+
/* brand-primary is monochrome (near-black light / near-white dark), so
|
|
1305
|
+
the label must use its inverse token — never a hardcoded white. */
|
|
1292
1306
|
.webg-btn--primary {
|
|
1293
|
-
background: var(--dsw-alias-brand-primary,
|
|
1307
|
+
background: var(--dsw-alias-brand-primary, rgb(15, 17, 21));
|
|
1294
1308
|
border-color: transparent;
|
|
1295
|
-
color:
|
|
1309
|
+
color: var(--dsw-alias-brand-primary-invert, rgb(249, 250, 251));
|
|
1296
1310
|
}
|
|
1297
1311
|
.webg-btn--primary:hover:not(:disabled) {
|
|
1298
|
-
background: var(--dsw-alias-brand-primary
|
|
1312
|
+
background: var(--dsw-alias-brand-primary, rgb(15, 17, 21));
|
|
1313
|
+
opacity: 0.85;
|
|
1299
1314
|
}
|
|
1300
1315
|
|
|
1301
1316
|
.webg-select, .webg-text {
|
|
@@ -1304,7 +1319,7 @@ window.__ModuleLoader__.load({
|
|
|
1304
1319
|
border: 1px solid var(--dsw-alias-border-l2, rgba(128, 128, 128, 0.35));
|
|
1305
1320
|
background: var(--dsw-alias-bg-layer-1, rgba(128, 128, 128, 0.12));
|
|
1306
1321
|
color: var(--dsw-alias-label-primary, inherit);
|
|
1307
|
-
font-size:
|
|
1322
|
+
font-size: 13px;
|
|
1308
1323
|
}
|
|
1309
1324
|
.webg-text { flex: 1; min-width: 0; }
|
|
1310
1325
|
.webg-search { max-width: 320px; }
|
|
@@ -1313,12 +1328,21 @@ window.__ModuleLoader__.load({
|
|
|
1313
1328
|
.webg-rotation-interval { margin-left: auto; }
|
|
1314
1329
|
.webg-toggle {
|
|
1315
1330
|
display: inline-flex; align-items: center; gap: 6px;
|
|
1316
|
-
accent-color: var(--dsw-alias-brand-primary,
|
|
1317
|
-
font-size:
|
|
1331
|
+
accent-color: var(--dsw-alias-brand-primary, rgb(15, 17, 21));
|
|
1332
|
+
font-size: 13px; cursor: pointer;
|
|
1318
1333
|
}
|
|
1319
1334
|
|
|
1320
|
-
.webg-slider {
|
|
1321
|
-
|
|
1335
|
+
.webg-slider { width: 100%; accent-color: var(--dsw-alias-brand-primary, rgb(15, 17, 21)); }
|
|
1336
|
+
/* Effects grid: one shared grid across all slider rows, so every slider
|
|
1337
|
+
starts and ends at the same x no matter how wide its label is. */
|
|
1338
|
+
.webg-effects {
|
|
1339
|
+
display: grid;
|
|
1340
|
+
grid-template-columns: max-content 1fr 3.2em;
|
|
1341
|
+
gap: 8px 10px;
|
|
1342
|
+
align-items: center;
|
|
1343
|
+
}
|
|
1344
|
+
.webg-effects .webg-label { white-space: nowrap; }
|
|
1345
|
+
.webg-effects .webg-value { text-align: right; }
|
|
1322
1346
|
|
|
1323
1347
|
.webg-monitor-row { gap: 14px; }
|
|
1324
1348
|
.webg-fps { font-variant-numeric: tabular-nums; }
|
|
@@ -1343,23 +1367,23 @@ window.__ModuleLoader__.load({
|
|
|
1343
1367
|
}
|
|
1344
1368
|
.webg-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
|
1345
1369
|
.webg-card--selected {
|
|
1346
|
-
outline: 2px solid var(--dsw-alias-brand-primary,
|
|
1370
|
+
outline: 2px solid var(--dsw-alias-brand-primary, rgb(15, 17, 21));
|
|
1347
1371
|
outline-offset: -2px;
|
|
1348
1372
|
}
|
|
1349
1373
|
.webg-card-close {
|
|
1350
1374
|
position: absolute; inset: 0;
|
|
1351
1375
|
display: flex; align-items: center; justify-content: center;
|
|
1352
|
-
font-size:
|
|
1376
|
+
font-size: 12px; color: var(--dsw-alias-label-secondary, #888);
|
|
1353
1377
|
}
|
|
1354
1378
|
.webg-card-type {
|
|
1355
1379
|
position: absolute; top: 4px; right: 4px;
|
|
1356
1380
|
padding: 1px 6px; border-radius: 4px;
|
|
1357
|
-
font-size:
|
|
1381
|
+
font-size: 10px; line-height: 1.5;
|
|
1358
1382
|
color: #fff; background: rgba(0, 0, 0, 0.5);
|
|
1359
1383
|
}
|
|
1360
1384
|
.webg-card-title {
|
|
1361
1385
|
position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px;
|
|
1362
|
-
font-size:
|
|
1386
|
+
font-size: 11px; line-height: 1.2; color: #fff;
|
|
1363
1387
|
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
|
|
1364
1388
|
text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
|
|
1365
1389
|
text-align: left;
|
|
@@ -1367,7 +1391,7 @@ window.__ModuleLoader__.load({
|
|
|
1367
1391
|
.webg-card-placeholder {
|
|
1368
1392
|
position: absolute; inset: 0;
|
|
1369
1393
|
display: flex; align-items: center; justify-content: center;
|
|
1370
|
-
font-size:
|
|
1394
|
+
font-size: 11px; opacity: 0.55;
|
|
1371
1395
|
}
|
|
1372
1396
|
|
|
1373
1397
|
/* Rotation group editor. */
|
|
@@ -1393,12 +1417,14 @@ window.__ModuleLoader__.load({
|
|
|
1393
1417
|
.webg-editor-card:hover { transform: translateY(-1px); }
|
|
1394
1418
|
.webg-editor-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
|
1395
1419
|
.webg-editor-card--checked {
|
|
1396
|
-
outline: 2px solid var(--dsw-alias-brand-primary,
|
|
1420
|
+
outline: 2px solid var(--dsw-alias-brand-primary, rgb(15, 17, 21));
|
|
1397
1421
|
outline-offset: -2px;
|
|
1398
1422
|
}
|
|
1399
1423
|
.webg-editor-check {
|
|
1400
1424
|
position: absolute; top: 4px; left: 4px; width: 18px; height: 18px;
|
|
1401
|
-
border-radius: 4px;
|
|
1425
|
+
border-radius: 4px;
|
|
1426
|
+
background: var(--dsw-alias-brand-primary, rgb(15, 17, 21));
|
|
1427
|
+
color: var(--dsw-alias-brand-primary-invert, rgb(249, 250, 251));
|
|
1402
1428
|
font-size: 12px; line-height: 18px; text-align: center;
|
|
1403
1429
|
}
|
|
1404
1430
|
`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wallpaper-engine-dsh",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Wallpaper Engine Video/Web wallpapers as the DSH web GUI background — discovery, sandboxed rendering, rotation lists, liquid-glass tuning.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|