dsh-m 0.9.69 → 0.9.70
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/CHANGELOG.md +12 -0
- package/lib/client.js +10 -41
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,12 @@ The full release history of dsh-m, maintained bilingually: **Chinese first, Engl
|
|
|
8
8
|
|
|
9
9
|
## 中文
|
|
10
10
|
|
|
11
|
+
### 0.9.70 修复:拖拽观感与静止态一致——退役拖拽期实心固化(ADR-0017 v2)
|
|
12
|
+
|
|
13
|
+
- **根因(用户浅色模式双态实拍)**:0.9.69 的拖拽期「计算值固化强制实心」在按住/松手瞬间造成实心↔玻璃的观感跳变,浅色模式下尤为突兀——防透字与观感连续两个目标里,实心方案牺牲了后者。
|
|
14
|
+
- **修复(ADR-0017 决策 3 修订 v2)**:拖拽态与静止态**同玻璃同 blur,外观逐像素一致**——透字防护回归静止态既有不变量(毛玻璃模糊背景自持;透字病灶的成因是「关 blur 还留半透明」,两样都不动即无此病,openbmc 静止态可读性本就由 blur 兜住)。拖拽可供性只剩 grabbing 光标与投影加深;`solidifyColor`/`--dshm-drag-bg`/拖拽态 `!important` 全部退役(清单定长回归 4,`client-lightbox` 断言含「无残留」负向锚)。性能保底手段(pointer capture/手势期监听/rAF 帧内写/translate3d/will-change)全部保留;拖拽期恢复的每帧 backdrop 重滤镜由 GPU 合成承担,弱机若报告掉帧再评估。
|
|
15
|
+
- **验证**:1323 项测试全绿、typecheck 零错误;ADR-0017 修订 v2(Considered Options 翻案记录在案)。
|
|
16
|
+
|
|
11
17
|
### 0.9.69 功能:还原态面板头部拖拽 + 位置记忆(ADR-0017)
|
|
12
18
|
|
|
13
19
|
- **方案**:市场面板(`.dshm-panel`)还原态下按住头部(标题/tab 行)即可自由拖拽——头部全域为手柄,tab/全屏/关闭钮点击语义原样(`closest("button")` 门卫 + 多指重入守卫);双击头部非按钮区切换全屏;释放位置烘焙为视口绝对坐标存 `dshm-panel-pos`,下次打开还原,无记忆首开与旧版 flex 居中渲染逐字节一致。运动范围四周 8px;desktop profile 额外让出壳层标题拖拽带(quota-watch 契约:`data-windows-titlebar` + `--dsh-windows-titlebar-height`,web 无此变量恒 0)——胶囊时代「停进系统按钮区就再也抓不回」的坑由 clamp 机制性杜绝。挂载/全屏往返/resize 三触发源重夹紧,还原 commit 的重夹紧时序由 render 期 latest-ref 镜像保证(执行评审 E1-1 实证修复并以结构锚钉死)。
|
|
@@ -511,6 +517,12 @@ The full release history of dsh-m, maintained bilingually: **Chinese first, Engl
|
|
|
511
517
|
|
|
512
518
|
## English
|
|
513
519
|
|
|
520
|
+
### Fix in 0.9.70 — drag appearance matches the resting state: drag-time solidification retired (ADR-0017 v2)
|
|
521
|
+
|
|
522
|
+
- **Root cause (user side-by-side capture in light mode)**: the 0.9.69 drag-time "computed-value solidification" made the panel jump between solid and glass at grab/release - jarring in light mode. Of the two goals (no see-through, visual continuity), the solid approach sacrificed continuity.
|
|
523
|
+
- **Fix (ADR-0017 decision 3 revised to v2)**: the drag state now shares the resting state's exact glass and blur - pixel-identical appearance. See-through protection returns to the resting invariant (frosted blur holds the background; the disease class was "blur off while still translucent" - leave both untouched and it cannot occur, exactly how openbmc's resting readability is already held). Drag affordance reduces to the grabbing cursor and a deeper shadow; `solidifyColor` / `--dshm-drag-bg` / drag-time `!important` are all retired (inventory back to a pinned 4, with a no-residue negative anchor in `client-lightbox`). The performance toolbox (pointer capture / gesture-scoped listeners / rAF-frame writes / translate3d / will-change) is fully retained; the restored per-frame backdrop re-filter is carried by GPU compositing - revisit only if weak-GPU jank is reported.
|
|
524
|
+
- **Verification**: 1323 tests green, typecheck clean; ADR-0017 revised to v2 (Considered Options overruling recorded).
|
|
525
|
+
|
|
514
526
|
### Feature in 0.9.69 — drag the marketplace panel by its header in restore state, with position memory (ADR-0017)
|
|
515
527
|
|
|
516
528
|
- **Design**: hold the panel header (title/tab row) in restore state to drag the marketplace panel freely - the whole header is the handle while tab / fullscreen / close buttons keep their click semantics (`closest("button")` gate + multi-pointer re-entry guard); double-click on a non-button header area toggles fullscreen; on release the position is baked into absolute viewport coordinates and stored under `dshm-panel-pos`, restored on next open - with no stored position the first render stays byte-identical to the old flex-centered layout. The motion range is clamped 8px on all sides; the desktop profile additionally yields the shell titlebar drag band (quota-watch contract: `data-windows-titlebar` + `--dsh-windows-titlebar-height`; web without the variable is always 0) - the capsule-era trap of parking inside the system button zone and never being grabbable again is eliminated by construction. Mount, fullscreen round-trips and window resize all re-clamp; the restore-commit re-clamp is ordered by render-phase latest-ref mirrors (execution review E1-1, reproduced, fixed, and pinned by structural anchors).
|
package/lib/client.js
CHANGED
|
@@ -507,7 +507,6 @@ __export(window_drag_exports, {
|
|
|
507
507
|
isDragTarget: () => isDragTarget,
|
|
508
508
|
loadPanelPos: () => loadPanelPos,
|
|
509
509
|
savePanelPos: () => savePanelPos,
|
|
510
|
-
solidifyColor: () => solidifyColor,
|
|
511
510
|
titlebarTopInset: () => titlebarTopInset
|
|
512
511
|
});
|
|
513
512
|
function dragSlop(pointerType) {
|
|
@@ -545,29 +544,6 @@ function clampPoint(point, viewport, size = 0, insets = ZERO_INSETS) {
|
|
|
545
544
|
y: Math.min(Math.max(point.y, minY), maxY)
|
|
546
545
|
};
|
|
547
546
|
}
|
|
548
|
-
function solidifyColor(computedColor) {
|
|
549
|
-
if (typeof computedColor !== "string") return null;
|
|
550
|
-
const srgb = COLOR_SRGB_RE.exec(computedColor.trim());
|
|
551
|
-
if (srgb) {
|
|
552
|
-
const alpha = srgb[4] !== void 0 ? Number.parseFloat(srgb[4]) : 1;
|
|
553
|
-
if (!Number.isFinite(alpha) || alpha < 0.05) return null;
|
|
554
|
-
const to255 = (v) => Math.round(Number.parseFloat(v) * 255);
|
|
555
|
-
return `rgb(${to255(srgb[1])}, ${to255(srgb[2])}, ${to255(srgb[3])})`;
|
|
556
|
-
}
|
|
557
|
-
const rgb = RGB_RE.exec(computedColor.trim());
|
|
558
|
-
if (rgb) {
|
|
559
|
-
const parts = rgb[1].split(",").map((p) => p.trim());
|
|
560
|
-
if (parts.length !== 3 && parts.length !== 4) return null;
|
|
561
|
-
const r = Number.parseFloat(parts[0]);
|
|
562
|
-
const g = Number.parseFloat(parts[1]);
|
|
563
|
-
const b = Number.parseFloat(parts[2]);
|
|
564
|
-
const a = parts.length === 4 ? Number.parseFloat(parts[3]) : 1;
|
|
565
|
-
if (![r, g, b, a].every(Number.isFinite)) return null;
|
|
566
|
-
if (a < 0.05) return null;
|
|
567
|
-
return `rgb(${Math.round(r)}, ${Math.round(g)}, ${Math.round(b)})`;
|
|
568
|
-
}
|
|
569
|
-
return null;
|
|
570
|
-
}
|
|
571
547
|
function loadPanelPos(storage) {
|
|
572
548
|
if (!storage || typeof storage.getItem !== "function") return null;
|
|
573
549
|
try {
|
|
@@ -594,7 +570,7 @@ function savePanelPos(storage, point) {
|
|
|
594
570
|
function isDragTarget(el) {
|
|
595
571
|
return Boolean(el?.closest?.("button"));
|
|
596
572
|
}
|
|
597
|
-
var POS_KEY, PANEL_MARGIN, DRAG_SLOP_MOUSE, DRAG_SLOP_TOUCH, ZERO_INSETS
|
|
573
|
+
var POS_KEY, PANEL_MARGIN, DRAG_SLOP_MOUSE, DRAG_SLOP_TOUCH, ZERO_INSETS;
|
|
598
574
|
var init_window_drag = __esm({
|
|
599
575
|
"src/client/window-drag.js"() {
|
|
600
576
|
"use strict";
|
|
@@ -603,8 +579,6 @@ var init_window_drag = __esm({
|
|
|
603
579
|
DRAG_SLOP_MOUSE = 6;
|
|
604
580
|
DRAG_SLOP_TOUCH = 10;
|
|
605
581
|
ZERO_INSETS = { left: 0, right: 0, top: 0, bottom: 0 };
|
|
606
|
-
RGB_RE = /^rgba?\(([^)]+)\)$/i;
|
|
607
|
-
COLOR_SRGB_RE = /^color\(srgb\s+([0-9.]+)\s+([0-9.]+)\s+([0-9.]+)(?:\s*\/\s*([0-9.]+))?\)$/i;
|
|
608
582
|
}
|
|
609
583
|
});
|
|
610
584
|
|
|
@@ -1782,7 +1756,7 @@ var { DEFAULT_PAGE_SIZE: DEFAULT_PAGE_SIZE2, MARKET_PAGE_SIZES: MARKET_PAGE_SIZE
|
|
|
1782
1756
|
var { readMarketSnapshot: readMarketSnapshot2, writeMarketSnapshot: writeMarketSnapshot2, isDefaultFirstPageQuery: isDefaultFirstPageQuery2 } = (init_market_snapshot(), __toCommonJS(market_snapshot_exports));
|
|
1783
1757
|
var { backdropCloseHandlers: backdropCloseHandlers2 } = (init_backdrop(), __toCommonJS(backdrop_exports));
|
|
1784
1758
|
var { lbStep: lbStep2, lbNeighbors: lbNeighbors2, swipeDir: swipeDir2 } = (init_lightbox(), __toCommonJS(lightbox_exports));
|
|
1785
|
-
var { dragSlop: dragSlop2, grabOffset: grabOffset2, titlebarTopInset: titlebarTopInset2, clampPoint: clampPoint2,
|
|
1759
|
+
var { dragSlop: dragSlop2, grabOffset: grabOffset2, titlebarTopInset: titlebarTopInset2, clampPoint: clampPoint2, loadPanelPos: loadPanelPos2, savePanelPos: savePanelPos2, isDragTarget: isDragTarget2 } = (init_window_drag(), __toCommonJS(window_drag_exports));
|
|
1786
1760
|
var { WESERV_TIMEOUT_MS: WESERV_TIMEOUT_MS2, weservUrl: weservUrl2, serviceBucketOf: serviceBucketOf2, tierOrder: tierOrder2, nextTier: nextTier2, needsTimeout: needsTimeout2, preferredTier: preferredTier2, rememberSuccess: rememberSuccess2 } = (init_img_chain(), __toCommonJS(img_chain_exports));
|
|
1787
1761
|
var { createMarkdown: createMarkdown2 } = (init_markdown(), __toCommonJS(markdown_exports));
|
|
1788
1762
|
var { ExtLink, MdImg, renderMarkdown } = createMarkdown2(h);
|
|
@@ -2392,16 +2366,16 @@ function communityLabels(data) {
|
|
|
2392
2366
|
var CSS = `
|
|
2393
2367
|
.dshm-overlay{position:fixed;inset:0;z-index:2147483000;background:var(--dsw-alias-bg-mask-3,rgba(15,23,42,.48));display:flex;align-items:center;justify-content:center;padding:max(24px,var(--dsh-windows-titlebar-height,0px)) 16px 24px;box-sizing:border-box}
|
|
2394
2368
|
.dshm-panel{width:min(920px,100%);height:min(680px,86vh);display:flex;flex-direction:column;background:var(--dsw-alias-bg-elevated,var(--dsw-alias-bg-base,#fff));background:color-mix(in srgb,var(--dsw-alias-bg-base,#fff) 86%,transparent);backdrop-filter:blur(14px) saturate(1.3);-webkit-backdrop-filter:blur(14px) saturate(1.3);border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:14px;box-shadow:0 18px 48px rgba(2,6,23,.25);overflow:hidden;font-family:inherit;color:var(--dsw-alias-label-primary,inherit)}
|
|
2395
|
-
/* 0.9.
|
|
2369
|
+
/* 0.9.70 \u8FD8\u539F\u6001\u62D6\u62FD\uFF1A.abs = \u6709\u4F4D\u7F6E\u8BB0\u5FC6\u65F6\u7684\u7EDD\u5BF9\u5B9A\u4F4D\u5F62\u6001\uFF08overlay \u4E3A inset:0 fixed\uFF0C
|
|
2396
2370
|
\u7EDD\u5BF9\u5B9A\u4F4D\u5750\u6807\u5373\u89C6\u53E3\u5750\u6807\uFF09\uFF1B\u65E0\u8BB0\u5F55\u65F6\u9762\u677F\u4ECD\u8D70 overlay flex \u5C45\u4E2D\uFF0C\u6E32\u67D3\u8DEF\u5F84\u4E0E\u65E7\u7248\u9010\u5B57\u8282\u4E00\u81F4\u3002
|
|
2397
|
-
\u62D6\u62FD\
|
|
2398
|
-
\
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
\
|
|
2371
|
+
\u62D6\u62FD\u89C2\u611F\u4E0D\u53D8\u91CF\uFF080.9.70 \u4FEE\u8BA2\uFF0CADR-0017 v2\uFF09\uFF1A\u62D6\u62FD\u6001\u4E0E\u9759\u6B62\u6001\u540C\u73BB\u7483\u540C blur\uFF0C\u5916\u89C2\u9010\u50CF\u7D20\u4E00\u81F4
|
|
2372
|
+
\u2014\u2014\u7528\u6237\u53CC\u6001\u5B9E\u62CD\u88C1\u51B3\uFF1A0.9.69 \u7684\u62D6\u62FD\u671F\u5B9E\u5FC3\u56FA\u5316\u5728\u6D45\u8272\u6A21\u5F0F\u4E0B\u5B9E/\u73BB\u7483\u8DF3\u53D8\u89C2\u611F\u7A81\u5140\uFF0C\u9000\u5F79\uFF1B
|
|
2373
|
+
\u900F\u5B57\u9632\u62A4\u56DE\u5F52\u9759\u6B62\u6001\u65E2\u6709\u4E0D\u53D8\u91CF\uFF08\u6BDB\u73BB\u7483\u6A21\u7CCA\u80CC\u666F\u81EA\u6301\u2014\u2014\u900F\u5B57\u75C5\u7076\u7684\u6210\u56E0\u662F\u300C\u5173 blur \u8FD8\u7559
|
|
2374
|
+
\u534A\u900F\u660E\u300D\uFF0C\u4E24\u6837\u90FD\u4E0D\u52A8\u5373\u65E0\u6B64\u75C5\uFF09\u3002\u62D6\u62FD\u53EF\u4F9B\u6027\u53EA\u5269 grabbing \u5149\u6807\u4E0E\u6295\u5F71\u52A0\u6DF1\uFF1B\u4EE3\u4EF7\u662F\u62D6\u62FD\u671F
|
|
2375
|
+
\u6062\u590D\u6BCF\u5E27 backdrop \u91CD\u6EE4\u955C\uFF08GPU \u5408\u6210\u627F\u62C5\uFF0C\u5F31\u673A\u82E5\u62A5\u544A\u6389\u5E27\u518D\u8BC4\u4F30\uFF09\uFF0C\u5E27\u5185\u5199/capture/
|
|
2376
|
+
\u624B\u52BF\u671F\u76D1\u542C\u7B49\u5176\u4F59\u6027\u80FD\u624B\u6BB5\u5168\u90E8\u4FDD\u7559\u3002 */
|
|
2403
2377
|
.dshm-panel.abs{position:absolute;margin:0}
|
|
2404
|
-
.dshm-panel--dragging{cursor:grabbing;
|
|
2378
|
+
.dshm-panel--dragging{cursor:grabbing;box-shadow:0 24px 64px rgba(2,6,23,.38)}
|
|
2405
2379
|
/* 0.9.69 \u62D6\u62FD\u624B\u67C4\uFF1Auser-select/touch-action/tap-highlight \u65E0\u6761\u4EF6\u751F\u6548\uFF08\u5168\u5C4F\u53CC\u51FB\u5207\u6362\u65F6
|
|
2406
2380
|
\u6807\u9898\u4E0D\u51FA\u73B0\u9009\u4E2D\u95EA\u73B0\uFF09\uFF1Bgrab \u5149\u6807\u4EC5\u5728\u300C\u8FD8\u539F\u6001\u4E14\u975E\u62D6\u62FD\u4E2D\u300D\u76F4\u63A5\u547D\u4E2D head\u2014\u2014\u62D6\u62FD\u4E2D head
|
|
2407
2381
|
\u65E0\u81EA\u6709 cursor \u58F0\u660E\uFF0C\u81EA\u7136\u7EE7\u627F\u9762\u677F\u6839 .dshm-panel--dragging \u7684 grabbing\uFF08cursor \u6309
|
|
@@ -4934,7 +4908,6 @@ function MarketPanel({ onClose }) {
|
|
|
4934
4908
|
panel.classList.remove("dshm-panel--dragging");
|
|
4935
4909
|
panel.style.willChange = "";
|
|
4936
4910
|
panel.style.transform = "";
|
|
4937
|
-
panel.style.removeProperty("--dshm-drag-bg");
|
|
4938
4911
|
try {
|
|
4939
4912
|
savePanelPos2(window.localStorage, final);
|
|
4940
4913
|
} catch {
|
|
@@ -4961,7 +4934,6 @@ function MarketPanel({ onClose }) {
|
|
|
4961
4934
|
panel.classList.remove("dshm-panel--dragging");
|
|
4962
4935
|
panel.style.willChange = "";
|
|
4963
4936
|
panel.style.transform = "";
|
|
4964
|
-
panel.style.removeProperty("--dshm-drag-bg");
|
|
4965
4937
|
};
|
|
4966
4938
|
const onPointerDown = (event) => {
|
|
4967
4939
|
if (dragging) return;
|
|
@@ -4979,9 +4951,6 @@ function MarketPanel({ onClose }) {
|
|
|
4979
4951
|
grab = grabOffset2({ x: event.clientX, y: event.clientY }, rect);
|
|
4980
4952
|
rest = { x: rect.left, y: rect.top };
|
|
4981
4953
|
size = { width: rect.width, height: rect.height };
|
|
4982
|
-
const solid = solidifyColor2(window.getComputedStyle(panel).backgroundColor);
|
|
4983
|
-
if (solid) panel.style.setProperty("--dshm-drag-bg", solid);
|
|
4984
|
-
else panel.style.removeProperty("--dshm-drag-bg");
|
|
4985
4954
|
if (headEl.setPointerCapture) {
|
|
4986
4955
|
try {
|
|
4987
4956
|
headEl.setPointerCapture(event.pointerId);
|