dsh-m 0.9.62 → 0.9.63
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 -2
- package/lib/client.js +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,12 +8,17 @@ The full release history of dsh-m, maintained bilingually: **Chinese first, Engl
|
|
|
8
8
|
|
|
9
9
|
## 中文
|
|
10
10
|
|
|
11
|
+
### 0.9.63 修复:点在加载转圈上不再无动作——转圈显式接 onClick=onClose
|
|
12
|
+
|
|
13
|
+
- **背景**:0.9.62 给灯箱加了走链转圈占位,但转圈是遮罩根的**子元素**,而 `backdropCloseHandlers`(0.9.27 防拖拽误关)只在 `mousedown` 与 `click` 都命中遮罩自身(`target === currentTarget`)时才关——点在 34px 转圈正中因此无动作。转圈显式接 `onClick: onClose`,与「点图即关」同语义:走链期间的任何一次点击都是有效的关闭逃生门。
|
|
14
|
+
- **验证**:`client-lightbox.test.mjs` 转圈锚随签名更新(门控 + onClick 语义);全量测试/typecheck 照常。
|
|
15
|
+
|
|
11
16
|
### 0.9.62 修复:灯箱控件浅色模式下不可见——影院遮罩自持 + 控件深色玻璃芯片 + 加载转圈/淡入
|
|
12
17
|
|
|
13
18
|
- **根因(2026-10-09 用户浅/深双模式实拍)**:dsh-skins ADR-0007 浮层毛玻璃并集按 `[role="dialog"][aria-modal="true"]` 命中灯箱根(灯箱根带 dialog 语义),浅色模式下 86% 暖白 tint + blur14 把影院式黑遮罩改成了浅色毛玻璃;而 ‹›/✕ 沿用基础 `.dsvm-btn` 白色半透配方(`rgba(255,255,255,.14)` 底 + 白字白边),浅底上整体隐形。深色模式走皮肤 `rgb(18,18,26)` 分支尚可读,故「浅色看不清、深色还行」。无皮肤的原生形态(黑遮罩恒在)无症状——这正是它漏网到 0.9.61 的原因。
|
|
14
19
|
- **双侧修复**:① dsh-m 侧(本版):灯箱 `background` 加 `!important` 自持——「深色遮罩 + 浅色控件」是影院面的组件自有可读性不变量,不随颜色模式/皮肤翻转;marketplace 社区皮肤不可枚举,不变量必须组件自己兜底(`!important` 清单定长 4,回归门钉住,新增须显式登记)。② dsh-skins 侧:三皮肤 `[role="dialog"][aria-modal="true"]` 追加 `:not(.dsvm-lightbox)` 豁免(1.5.1,ADR-0007 amendment)——语义上「弹窗毛玻璃」本就不该染指图片影院。
|
|
15
20
|
- **控件深色玻璃芯片**:‹›/✕ 从裸透明白改为与底部 pill 同族的深色芯片(slate-900 55% + 白描边 + blur8 + 投影)——深遮罩上靠描边/blur/投影出层次,浅遮罩上芯片本身就是对比面,任何颜色模式与皮肤下都可读;显式 `:hover` 提亮(特异性 0,3,0 压基础 `.dsvm-btn:hover` 0,2,0,免疫源顺序——评审 R1 同族教训)。
|
|
16
|
-
- **加载指示与淡入(UX 补强)**:灯箱走链期间(weserv 慢速/8s 守卫换层/直连大图)此前是空黑黑洞,现转圈占位(`useImgChain` 暴露 `settled
|
|
21
|
+
- **加载指示与淡入(UX 补强)**:灯箱走链期间(weserv 慢速/8s 守卫换层/直连大图)此前是空黑黑洞,现转圈占位(`useImgChain` 暴露 `settled`);图片 onLoad 后 160ms 淡入换场;`prefers-reduced-motion` 下停用淡入、转圈降速。已知小瑕疵:转圈是遮罩的子元素,`backdropCloseHandlers` 防拖拽误关只认根元素——点在 34px 转圈正中无动作(点周边遮罩可关),0.9.63 补 `onClick` 收口。
|
|
17
22
|
- **验证**:1283 项测试全绿、typecheck 零错误;`client-lightbox.test.mjs` 新增 6 项结构锚(遮罩 `!important` 定长清单/芯片规则与显式 hover/转圈门控/淡入类名/settled 暴露/reduced-motion),0.9.60 批次既有锚(portal/复合选择器/拖拽带/焦点还原/序号 key)全数保持。
|
|
18
23
|
|
|
19
24
|
### 0.9.61 修复:大陆浏览器拉不到插件截图/图标——图片加载链 weserv 优先双兜底
|
|
@@ -461,12 +466,17 @@ The full release history of dsh-m, maintained bilingually: **Chinese first, Engl
|
|
|
461
466
|
|
|
462
467
|
## English
|
|
463
468
|
|
|
469
|
+
### Fixed in 0.9.63 — clicking dead-center on the loading spinner no longer no-ops: spinner gets an explicit onClick=onClose
|
|
470
|
+
|
|
471
|
+
- **Background**: 0.9.62 added the chain-loading spinner, but the spinner is a **child** of the backdrop root, and `backdropCloseHandlers` (0.9.27 drag-misfire guard) closes only when both `mousedown` and `click` land on the backdrop itself (`target === currentTarget`) - so a click dead-center on the 34px spinner did nothing. The spinner now carries `onClick: onClose`, same semantics as click-image-to-close: during loading, any click is a valid escape hatch.
|
|
472
|
+
- **Verification**: the spinner anchor in `client-lightbox.test.mjs` follows the new signature (gating + onClick semantics); full suite/typecheck as usual.
|
|
473
|
+
|
|
464
474
|
### Fixed in 0.9.62 — lightbox controls invisible in light color schemes: self-owned cinema backdrop + dark glass control chips + loading spinner/fade
|
|
465
475
|
|
|
466
476
|
- **Root cause (user photos, both color schemes, 2026-10-09)**: the dsh-skins ADR-0007 overlay-frost union targets `[role="dialog"][aria-modal="true"]` - which matches the lightbox root (it carries dialog semantics). In light schemes the 86% warm-white tint + blur14 turned the cinema-black backdrop into light frosted glass, while ‹›/✕ reuse the base `.dsvm-btn` translucent-white recipe (`rgba(255,255,255,.14)` fill, white glyph/border) - invisible on a light surface. Dark schemes hit the skin's `rgb(18,18,26)` branch and stayed readable, hence "light mode unreadable, dark mode okay". Vanilla installs (backdrop always near-black) never showed it - which is how it slipped past 0.9.61.
|
|
467
477
|
- **Two-sided fix**: ① dsh-m side (this release): the lightbox `background` is now `!important`-owned - "dark backdrop + light controls" is the component's own readability invariant for a cinema surface and must not flip with color schemes or skins; marketplace community skins are un-enumerable, so the component must defend itself (the `!important` inventory is pinned at a fixed length of 4 by the regression gate; additions must register explicitly). ② dsh-skins side: all three skins exempt `.dsvm-lightbox` via `:not(...)` (1.5.1, ADR-0007 amendment) - semantically a "dialog frost" never should have tinted an image theater.
|
|
468
478
|
- **Dark glass control chips**: ‹›/✕ move from bare translucent white to a chip in the same family as the bottom pill (slate-900 55% + white border + blur8 + shadow) - on dark backdrops the border/blur/shadow provide edge definition, on light backdrops the chip itself is the contrast surface; readable under any scheme or skin. Explicit `:hover` brightening (specificity 0,3,0 beats base `.dsvm-btn:hover` 0,2,0 regardless of source order - the R1 family lesson).
|
|
469
|
-
- **Loading indicator & fade (UX)**: while the image chain runs (slow weserv / 8s guard tier-swap / large direct original) the lightbox used to be a silent black void; it now shows a spinner (`useImgChain` exposes `settled
|
|
479
|
+
- **Loading indicator & fade (UX)**: while the image chain runs (slow weserv / 8s guard tier-swap / large direct original) the lightbox used to be a silent black void; it now shows a spinner (`useImgChain` exposes `settled`). The image fades in over 160ms on onLoad; under `prefers-reduced-motion` the fade is disabled and the spinner slows down. Known nit: the spinner is a child of the backdrop and `backdropCloseHandlers` only honors the root element (drag-misfire guard), so a click dead-center on the 34px spinner does nothing (the surrounding backdrop still closes) - `onClick` added in 0.9.63.
|
|
470
480
|
- **Verification**: 1283 tests green, typecheck clean; `client-lightbox.test.mjs` gains 6 structural anchors (backdrop `!important` fixed-length inventory / chip rules with explicit hover / spinner gating / fade class / settled exposure / reduced-motion); all 0.9.60-era anchors (portal / compound selectors / titlebar offset / focus restore / index keys) retained.
|
|
471
481
|
|
|
472
482
|
### Fixed in 0.9.61 — screenshots/icons unreachable from mainland browsers: weserv-first dual-fallback image chain
|
package/lib/client.js
CHANGED
|
@@ -3170,8 +3170,10 @@ function Lightbox({ shots, index, onNav, onClose }) {
|
|
|
3170
3170
|
h("button", { className: "dsvm-btn", onClick: chain.retry }, lookup("lb.retry")),
|
|
3171
3171
|
h(ExtLink, { href: shots[index] }, lookup("lb.open"))
|
|
3172
3172
|
) : [
|
|
3173
|
-
// 0.9.62 走链期间转圈占位(settled
|
|
3174
|
-
|
|
3173
|
+
// 0.9.62 走链期间转圈占位(settled 即卸载);0.9.63 onClick=onClose——
|
|
3174
|
+
// backdropCloseHandlers 仅 target===根 时关(防拖拽误关),转圈是子元素,
|
|
3175
|
+
// 不补这条则点在 34px 转圈上无动作;急躁关闭是合理逃生门,与点图即关同语义。
|
|
3176
|
+
!chain.settled && chain.src ? h("div", { className: "dsvm-lbspin", "aria-hidden": "true", onClick: onClose }) : null,
|
|
3175
3177
|
h("img", { className: `dsvm-lbimg${chain.settled ? " dsvm-lbimg-on" : ""}`, src: chain.src, alt: "", onClick: onClose, referrerPolicy: "no-referrer", decoding: "async", onError: chain.onError, onLoad: chain.onLoad })
|
|
3176
3178
|
],
|
|
3177
3179
|
h("button", { ref: closeRef, className: "dsvm-btn dsvm-lbclose", "aria-label": lookup("common.close"), title: lookup("common.close"), onClick: onClose }, h(XIcon)),
|