dsh-workbench-danmaku 0.4.9 → 0.4.11
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 -1
- package/lib/client.js +44 -9
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
# 弹幕插件 CHANGELOG
|
|
2
2
|
|
|
3
|
-
> 包名:`dsh-workbench-danmaku`;当前版本:0.4.
|
|
3
|
+
> 包名:`dsh-workbench-danmaku`;当前版本:0.4.11 `package.json` 为准)。
|
|
4
4
|
> 源码入口 `lib/index.js` 只保留用途与当前版本,版本历史统一记录在这里;此后发版只追加本文件,不再往源码写版本史。
|
|
5
5
|
|
|
6
|
+
## 0.4.11 — 2026-12-06
|
|
7
|
+
|
|
8
|
+
- 跟随共享层修复重建产物:面板栈按真正的固定定位包含块换算原点(壳根带 `backdrop-filter`
|
|
9
|
+
时面板会整体偏移)、sheet 选择器提升权重(否则插件皮肤把整屏表单压回居中对话框)、
|
|
10
|
+
底条新增 `data-flow="inline"` 供整屏面板使用。
|
|
11
|
+
|
|
12
|
+
## 0.4.10 — 2026-12-06
|
|
13
|
+
|
|
14
|
+
- 列表行窄档改由宿主宽度阶梯属性驱动:把 `@media(max-width:Npx)` 换成宿主编译出的 `[data-wb-ltN]`,
|
|
15
|
+
阈值只在宿主 `packages/shell/client/display.cjs` 的宽度阶梯里出现一次,插件不再自己判断视口。
|
|
16
|
+
|
|
6
17
|
## 0.4.9 — 2026-12-06
|
|
7
18
|
|
|
8
19
|
- 悬停底色与焦点环全部改走主题 token:列表行悬停由灰色 `rgba(127,127,127,.06)` 改为 accent 混色、图标按钮悬停改 `currentColor` 混色、输入框焦点环由蓝色 `rgba(37,99,235,.14)` 改为 accent 20% 混色,`:focus` 统一改 `:focus-visible`。
|
package/lib/client.js
CHANGED
|
@@ -827,10 +827,33 @@ var require_icons2 = __commonJS({
|
|
|
827
827
|
}
|
|
828
828
|
});
|
|
829
829
|
|
|
830
|
+
// packages/addons/lib/density-tokens.cjs
|
|
831
|
+
var require_density_tokens = __commonJS({
|
|
832
|
+
"packages/addons/lib/density-tokens.cjs"(exports2, module2) {
|
|
833
|
+
"use strict";
|
|
834
|
+
var CSS = [
|
|
835
|
+
// 基础尺寸:全仓唯一允许出现控件高度像素的地方。
|
|
836
|
+
":root{--wb-ctl-h-xs:22px;--wb-ctl-h-sm:26px;--wb-ctl-h-md:32px;--wb-ctl-h-lg:40px;--wb-ctl-h-xl:46px;--wb-ctl-px-xs:6px;--wb-ctl-px-sm:10px;--wb-ctl-px-md:14px;--wb-ctl-px-lg:18px;--wb-ctl-font-sm:11px;--wb-ctl-font-md:12px;--wb-ctl-font-lg:13px}",
|
|
837
|
+
// 缺省密度 = comfortable:没有 [data-wb-density] 时(独立预览页、老宿主)也有一组合法映射。
|
|
838
|
+
':root,[data-wb-density="comfortable"]{--wb-btn-primary:var(--wb-ctl-h-lg);--wb-btn-toolbar:var(--wb-ctl-h-md);--wb-btn-row:var(--wb-ctl-h-sm);--wb-btn-icon:var(--wb-ctl-h-md);--wb-field-h:var(--wb-ctl-h-md);--wb-gap-block:14px;--wb-font-body:var(--wb-ctl-font-md)}',
|
|
839
|
+
// 桌面大屏:更紧的间距,控件高度下降一档。
|
|
840
|
+
'[data-wb-density="compact"]{--wb-btn-primary:var(--wb-ctl-h-md);--wb-btn-toolbar:var(--wb-ctl-h-sm);--wb-btn-row:var(--wb-ctl-h-xs);--wb-btn-icon:var(--wb-ctl-h-sm);--wb-field-h:var(--wb-ctl-h-sm);--wb-gap-block:10px;--wb-font-body:var(--wb-ctl-font-md)}',
|
|
841
|
+
// 显式声明的宽松档:只放大尺寸与间距,不引入第三套结构。
|
|
842
|
+
'[data-wb-density="spacious"]{--wb-btn-primary:var(--wb-ctl-h-xl);--wb-btn-toolbar:var(--wb-ctl-h-lg);--wb-btn-row:var(--wb-ctl-h-md);--wb-btn-icon:var(--wb-ctl-h-lg);--wb-field-h:var(--wb-ctl-h-lg);--wb-gap-block:18px;--wb-font-body:var(--wb-ctl-font-lg)}',
|
|
843
|
+
// 触控底线:粗指针设备上把按钮撑到 32px,宽档(fine pointer)像素不变。
|
|
844
|
+
'[data-wb-pointer="coarse"] :is(button,[role="button"],input[type="button"],input[type="submit"],select){min-height:var(--wb-ctl-h-md);min-width:var(--wb-ctl-h-sm)}',
|
|
845
|
+
// 触控端表单控件同样不能低于 32px,否则点按会漏。
|
|
846
|
+
'[data-wb-pointer="coarse"] :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select){min-height:var(--wb-ctl-h-md)}'
|
|
847
|
+
].join("\n");
|
|
848
|
+
module2.exports = CSS;
|
|
849
|
+
}
|
|
850
|
+
});
|
|
851
|
+
|
|
830
852
|
// packages/addons/lib/client-base-styles.cjs
|
|
831
853
|
var require_client_base_styles = __commonJS({
|
|
832
854
|
"packages/addons/lib/client-base-styles.cjs"(exports2, module2) {
|
|
833
855
|
"use strict";
|
|
856
|
+
var DENSITY = require_density_tokens();
|
|
834
857
|
var SECRET_FIELD = [
|
|
835
858
|
".wb-secret-field{position:relative;display:flex;align-items:center;min-width:0}",
|
|
836
859
|
".wb-secret-field input{flex:1 1 auto;min-width:0;padding-right:34px}",
|
|
@@ -844,8 +867,10 @@ var require_client_base_styles = __commonJS({
|
|
|
844
867
|
module2.exports = function baseStyles(prefix) {
|
|
845
868
|
var p = String(prefix || "wb");
|
|
846
869
|
var s = "." + p;
|
|
847
|
-
return
|
|
848
|
-
|
|
870
|
+
return [DENSITY].concat(SECRET_FIELD, STATE_STYLES(p), [
|
|
871
|
+
// 视图根容器:填满 wb-view-host 的剩余高度,自己可以有滚动能力(页面里没有内部滚动槽时它就是唯一滚动层)。
|
|
872
|
+
// 不再写 height:100%:父级是 flex 列时 flex:1 才能正确解析,写死 100% 在 auto 高度父级里会被忽略。
|
|
873
|
+
s + "-wrap{display:flex;flex-direction:column;gap:12px;padding:16px;overflow:auto;flex:1;min-height:0;box-sizing:border-box}",
|
|
849
874
|
s + "-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}",
|
|
850
875
|
s + "-title{font-size:16px;font-weight:650;margin:0}",
|
|
851
876
|
s + "-sub{font-size:12px;color:var(--wb-muted);margin:2px 0 0}",
|
|
@@ -855,12 +880,13 @@ var require_client_base_styles = __commonJS({
|
|
|
855
880
|
s + "-kpi{font-size:22px;font-weight:700;line-height:1.2}" + s + "-kpi-label{font-size:12px;color:var(--wb-muted)}",
|
|
856
881
|
s + "-table{width:100%;border-collapse:collapse;font-size:12px}" + s + "-table th," + s + "-table td{padding:7px 8px;border-bottom:1px solid var(--wb-border);text-align:left;vertical-align:top}",
|
|
857
882
|
s + "-table th{font-weight:600;color:var(--wb-muted);white-space:nowrap}",
|
|
858
|
-
|
|
883
|
+
// 按钮尺寸只引用语义 token:具体多大由密度层决定,插件不再各写一遍 padding。
|
|
884
|
+
s + "-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--wb-border);background:var(--wb-surface);color:inherit;border-radius:7px;min-height:var(--wb-btn-toolbar,26px);padding:0 var(--wb-ctl-px-sm,10px);font-size:var(--wb-ctl-font-md,12px);line-height:1.1;cursor:pointer}",
|
|
859
885
|
s + "-btn:hover:not(:disabled){border-color:var(--wb-accent)}" + s + "-btn:disabled{opacity:.5;cursor:default}",
|
|
860
886
|
s + "-btn.primary{background:var(--wb-accent);border-color:var(--wb-accent);color:var(--dsw-alias-label-primary-inverted)}",
|
|
861
887
|
s + "-btn.danger{color:var(--wb-danger);border-color:color-mix(in oklab,var(--wb-danger) 35%,transparent)}",
|
|
862
888
|
s + "-field{display:flex;flex-direction:column;gap:4px;font-size:12px}" + s + "-label{font-weight:600}",
|
|
863
|
-
s + "-field input," + s + "-field select," + s + "-field textarea{border:1px solid var(--wb-border);border-radius:7px;padding:
|
|
889
|
+
s + "-field input," + s + "-field select," + s + "-field textarea{border:1px solid var(--wb-border);border-radius:7px;min-height:var(--wb-field-h,26px);padding:0 8px;font:inherit;background:var(--wb-surface);color:inherit;min-width:0}",
|
|
864
890
|
s + "-hint{color:var(--wb-muted);font-size:11px}" + s + "-notice{padding:8px 10px;border-radius:8px;font-size:12px;background:color-mix(in oklab,var(--wb-accent) 9%,transparent);color:var(--dsw-alias-label-primary,inherit)}",
|
|
865
891
|
s + "-notice.error{background:color-mix(in oklab,var(--wb-danger) 10%,transparent);color:var(--wb-danger)}" + s + "-notice.ok{background:color-mix(in oklab,var(--wb-ok) 10%,transparent);color:var(--wb-ok)}",
|
|
866
892
|
s + "-empty{padding:18px;text-align:center;color:var(--wb-muted);font-size:12px;border:1px dashed var(--wb-border);border-radius:8px}",
|
|
@@ -871,7 +897,9 @@ var require_client_base_styles = __commonJS({
|
|
|
871
897
|
s + "-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}",
|
|
872
898
|
// 窄屏:页面容器不再自带左右内边距(宿主的 .wb-immersive-main 已经给过),
|
|
873
899
|
// 卡片与栅格收紧,把宽度尽量留给内容——窄屏下两侧留白比桌面更影响可读性。
|
|
874
|
-
|
|
900
|
+
// 窄档不加整段媒体查询:宿主编译出的 data-wb-lt* 属性就是「可用宽度 < N」的布尔事实,
|
|
901
|
+
// 这样阈值只出现在宿主一处,插件与共享层都只表达「窄到什么程度」。
|
|
902
|
+
":where([data-wb-lt760]) " + s + "-wrap{padding:0 0 8px;gap:10px}:where([data-wb-lt760]) " + s + "-card{padding:12px;border-radius:10px}:where([data-wb-lt760]) " + s + "-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px}:where([data-wb-lt760]) " + s + "-form{grid-template-columns:minmax(0,1fr)}:where([data-wb-lt760]) " + s + "-title{font-size:15px}:where([data-wb-lt760]) " + s + "-btn." + s + "-icon-text ." + s + "-btn-label{display:none}:where([data-wb-lt760]) " + s + "-btn." + s + "-icon-text{padding-left:8px;padding-right:8px}:where([data-wb-lt760]) " + s + "-table-wrap{overflow-x:auto;max-width:100%}:where([data-wb-lt760]) " + s + "-table{width:max-content;min-width:100%}button .wb-icon-label:not(.wb-icon-label-fallback) .wb-icon-label-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}button .wb-icon-label.wb-icon-label-short .wb-icon-label-text{position:static;width:auto;height:auto;margin:0;overflow:visible;clip-path:none;white-space:normal}:where([data-wb-lt420]) " + s + "-wrap{padding:0 0 6px}:where([data-wb-lt420]) " + s + "-card{padding:10px}:where([data-wb-lt420]) " + s + "-grid{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}"
|
|
875
903
|
]);
|
|
876
904
|
};
|
|
877
905
|
module2.exports.secretFieldStyles = SECRET_FIELD;
|
|
@@ -1266,7 +1294,7 @@ var require_styles = __commonJS({
|
|
|
1266
1294
|
/* 深色:卡片底色更贴近主题表面 */
|
|
1267
1295
|
"@media (prefers-color-scheme:dark){.wbdm-kpi,.wbdm-card,.wbdm-status-cell{background:var(--wb-surface)}}",
|
|
1268
1296
|
/* 窄屏:配置行从「标签 + 控件」两列改成上下单列,输入框不再固定 280px 宽。 */
|
|
1269
|
-
"
|
|
1297
|
+
":where([data-wb-lt600]) .wbdm-crow{grid-template-columns:minmax(0,1fr);gap:8px;padding:10px 0}:where([data-wb-lt600]) .wbdm-ctl{flex-wrap:wrap}:where([data-wb-lt600]) .wbdm-input, :where([data-wb-lt600]) .wbdm-select{max-width:none;width:100%}:where([data-wb-lt600]) .wbdm-crow .wbctl-num .wbctl-num-input{width:100%}:where([data-wb-lt600]) .wbdm-preview{margin:10px 12px 0}:where([data-wb-lt600]) .wbdm-page-title{font-size:16px}:where([data-wb-lt600]) .wbdm-card-h{flex-direction:column;align-items:stretch;gap:6px}:where([data-wb-lt600]) .wbdm-card-t, :where([data-wb-lt600]) .wbdm-card-s{white-space:nowrap}:where([data-wb-lt600]) .wbdm-card-action{width:100%;white-space:nowrap;padding-left:10px;padding-right:10px}:where([data-wb-lt600]) .wbdm-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}:where([data-wb-lt600]) .wbdm-kpi{min-width:0;padding:7px 8px}:where([data-wb-lt600]) .wbdm-kpi-n{font-size:17px}:where([data-wb-lt600]) .wbdm-status{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}:where([data-wb-lt600]) .wbdm-status-cell{padding:7px 8px}:where([data-wb-lt600]) .wbdm-status-k{font-size:10px}"
|
|
1270
1298
|
];
|
|
1271
1299
|
}
|
|
1272
1300
|
module2.exports = function styles2() {
|
|
@@ -2255,6 +2283,11 @@ var require_overlay = __commonJS({
|
|
|
2255
2283
|
"use strict";
|
|
2256
2284
|
var defaultReact = require("react");
|
|
2257
2285
|
var FOCUSABLE = "button:not(:disabled),input:not(:disabled),textarea:not(:disabled),select:not(:disabled),a[href]";
|
|
2286
|
+
var SHEET_STYLES = [
|
|
2287
|
+
".wbov-mask.is-sheet.is-sheet{display:block;padding:0;background:var(--wb-card,#141414)}",
|
|
2288
|
+
".wbov-sheet.wbov-sheet{position:static;inset:auto;width:auto;max-width:none;height:100%;max-height:none;border-radius:0;box-shadow:none;display:flex;flex-direction:column;overflow:hidden;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}",
|
|
2289
|
+
".wbov-sheet.wbov-sheet>*{max-width:100%}"
|
|
2290
|
+
].join("\n");
|
|
2258
2291
|
module2.exports = function createOverlay(options) {
|
|
2259
2292
|
var opts = options || {};
|
|
2260
2293
|
var React2 = opts.React || defaultReact;
|
|
@@ -2319,10 +2352,11 @@ var require_overlay = __commonJS({
|
|
|
2319
2352
|
}
|
|
2320
2353
|
}
|
|
2321
2354
|
var labelledBy = ariaLabelledByOf(props);
|
|
2355
|
+
var sheet = props.sheet === true;
|
|
2322
2356
|
return h(
|
|
2323
2357
|
"div",
|
|
2324
2358
|
{
|
|
2325
|
-
className: maskClass,
|
|
2359
|
+
className: maskClass + (sheet ? " is-sheet" : ""),
|
|
2326
2360
|
onMouseDown: function(e) {
|
|
2327
2361
|
var allowed = props.closeOnMask !== void 0 ? props.closeOnMask : closeOnMask(props);
|
|
2328
2362
|
if (e.target === e.currentTarget && props.onClose && allowed) props.onClose();
|
|
@@ -2331,7 +2365,7 @@ var require_overlay = __commonJS({
|
|
|
2331
2365
|
h(
|
|
2332
2366
|
tag,
|
|
2333
2367
|
{
|
|
2334
|
-
className: dialogClass + dialogClassOf(props),
|
|
2368
|
+
className: dialogClass + dialogClassOf(props) + (sheet ? " wbov-sheet" : ""),
|
|
2335
2369
|
role: "dialog",
|
|
2336
2370
|
"aria-modal": true,
|
|
2337
2371
|
"aria-label": labelledBy ? null : ariaLabelOf(props),
|
|
@@ -2347,6 +2381,7 @@ var require_overlay = __commonJS({
|
|
|
2347
2381
|
}
|
|
2348
2382
|
return Modal;
|
|
2349
2383
|
};
|
|
2384
|
+
module2.exports.sheetStyles = SHEET_STYLES;
|
|
2350
2385
|
}
|
|
2351
2386
|
});
|
|
2352
2387
|
|
|
@@ -3247,7 +3282,7 @@ function definition() {
|
|
|
3247
3282
|
var tab = makeTab(React);
|
|
3248
3283
|
return {
|
|
3249
3284
|
id: ADDON_ID,
|
|
3250
|
-
version: "0.4.
|
|
3285
|
+
version: "0.4.11",
|
|
3251
3286
|
icon: tab("megaphone"),
|
|
3252
3287
|
views: [
|
|
3253
3288
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-workbench-danmaku",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.11",
|
|
4
4
|
"description": "个人工作台弹幕插件:把自建弹幕轮播在整个 DSH 界面,并可叠加到整个桌面",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"id": "wb-addon-danmaku",
|
|
19
19
|
"title": "弹幕",
|
|
20
20
|
"description": "在整个 DSH 界面(含工作台业务页与宿主弹窗之外的所有区域)与桌面透明层轮播自建弹幕;含弹幕库视图,配置项由宿主统一配置中心渲染",
|
|
21
|
-
"version": "0.4.
|
|
21
|
+
"version": "0.4.11",
|
|
22
22
|
"minShell": "0.8.0",
|
|
23
23
|
"tables": [
|
|
24
24
|
"danmaku"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"./package.json": "./package.json"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"dsh-workbench-host": "^0.35.
|
|
49
|
+
"dsh-workbench-host": "^0.35.11"
|
|
50
50
|
},
|
|
51
51
|
"dsh": {
|
|
52
52
|
"bundle": {
|