dsh-workbench-salary 0.4.23 → 0.4.24

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 CHANGED
@@ -1,8 +1,13 @@
1
1
  # 工资插件 CHANGELOG
2
2
 
3
- > 包名:`dsh-workbench-salary`;当前版本:0.4.23(以 `package.json` 为准)。
3
+ > 包名:`dsh-workbench-salary`;当前版本:0.4.24(以 `package.json` 为准)。
4
4
  > 源码入口 `lib/index.js` 只保留用途与当前版本,版本历史统一记录在这里;此后发版只追加本文件,不再往源码写版本史。
5
5
 
6
+ ## 0.4.24 — 2026-12-06
7
+
8
+ - 工资域不再注册空同步清单:`salary_record` 进云同步,多台设备上的记录与统计收敛。
9
+ - 域说明、市场描述与交付文案同步改为「随宿主备份并参与云同步」,不再写「不参与云同步」。
10
+
6
11
  ## 0.4.23 — 2026-12-06
7
12
 
8
13
  - DDL 改声明式(共享 `lib/backend/schema.js`),建库顺序统一为「建表 → 补列 → 建索引」。
package/README.md CHANGED
@@ -10,7 +10,7 @@ dsh plugin --profile web add dsh-workbench-salary
10
10
 
11
11
  安装或升级后按 DSH 提示重启/刷新。
12
12
 
13
- 只存本机 SQLite,不存姓名与工号,不参与云同步;不限月结,日结多笔也可按日期记录。
13
+ 存本机 SQLite 并随宿主备份、云同步在多台设备间收敛,不存姓名与工号;不限月结,日结多笔也可按日期记录。
14
14
 
15
15
  ## 兼容性
16
16
 
package/lib/client.js CHANGED
@@ -539,6 +539,8 @@ var require_client_base_styles = __commonJS({
539
539
  var SECRET_FIELD = [
540
540
  ".wb-secret-field{position:relative;display:flex;align-items:center;min-width:0}",
541
541
  ".wb-secret-field input{flex:1 1 auto;min-width:0;padding-right:34px}",
542
+ // 多行(textarea):眼睛仍然贴右侧居中,右侧留出 34px 让每一行都不压到按钮;高度可纵向拖。
543
+ ".wb-secret-field textarea{flex:1 1 auto;min-width:0;padding-right:34px;resize:vertical;min-height:76px;line-height:1.5;white-space:pre-wrap}",
542
544
  ".wb-eye{position:absolute;right:4px;display:inline-flex;align-items:center;justify-content:center;background:transparent;border:0;border-radius:6px;padding:4px;color:var(--wb-muted);cursor:pointer}",
543
545
  ".wb-eye:hover:not(:disabled){color:var(--wb-accent);background:color-mix(in srgb, var(--wb-accent) 12%, transparent)}",
544
546
  ".wb-eye:focus-visible{outline:2px solid var(--wb-accent);outline-offset:1px}",
@@ -547,7 +549,7 @@ var require_client_base_styles = __commonJS({
547
549
  module2.exports = function baseStyles(prefix) {
548
550
  var p = String(prefix || "wb");
549
551
  var s = "." + p;
550
- return SECRET_FIELD.concat([
552
+ return SECRET_FIELD.concat(STATE_STYLES(p), [
551
553
  s + "-wrap{display:flex;flex-direction:column;gap:12px;padding:16px;overflow:auto;height:100%;box-sizing:border-box}",
552
554
  s + "-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}",
553
555
  s + "-title{font-size:16px;font-weight:650;margin:0}",
@@ -578,6 +580,16 @@ var require_client_base_styles = __commonJS({
578
580
  ]);
579
581
  };
580
582
  module2.exports.secretFieldStyles = SECRET_FIELD;
583
+ function STATE_STYLES(p) {
584
+ var s = "." + p;
585
+ return [
586
+ s + "-table tbody tr{transition:background .14s ease}",
587
+ s + "-table tbody tr:hover{background:color-mix(in oklab,var(--wb-accent) 6%,transparent)}",
588
+ s + "-list-row:hover," + s + "-row-item:hover{background:color-mix(in oklab,var(--wb-accent) 7%,transparent)}",
589
+ s + "-list-row:focus-visible," + s + "-row-item:focus-visible," + s + "-item:focus-visible," + s + "-btn:focus-visible," + s + "-icon-btn:focus-visible," + s + "-tab:focus-visible{outline:2px solid var(--wb-accent);outline-offset:1px}",
590
+ s + "-input:focus-visible," + s + "-select:focus-visible," + s + "-textarea:focus-visible," + s + "-field input:focus-visible," + s + "-field select:focus-visible," + s + "-field textarea:focus-visible{outline:2px solid var(--wb-accent);outline-offset:1px;box-shadow:0 0 0 3px color-mix(in oklab,var(--wb-accent) 18%,transparent)}"
591
+ ];
592
+ }
581
593
  }
582
594
  });
583
595
 
@@ -1086,7 +1098,7 @@ var require_staged_dialog = __commonJS({
1086
1098
  ".wbctl-btn:focus-visible{outline:2px solid var(--wb-accent,#2563eb);outline-offset:2px}",
1087
1099
  ".wbctl-btn:disabled{opacity:.55;cursor:default}",
1088
1100
  ".wbctl-btn.wbctl-btn-p{background:var(--wb-accent,#2563eb);border-color:transparent;color:var(--wb-on-accent,#fff)}",
1089
- ".wbctl-btn.wbctl-btn-p:hover:not(:disabled){background:color-mix(in oklab,var(--wb-accent,#2563eb) 86%,#000)}",
1101
+ ".wbctl-btn.wbctl-btn-p:hover:not(:disabled){background:color-mix(in oklab,var(--wb-accent,#2563eb) 88%,transparent)}",
1090
1102
  // 确认步:键值对清单,各插件共用,避免再各写一套只读摘要。
1091
1103
  ".wbctl-review{display:flex;flex-direction:column;border:1px solid var(--wb-line,var(--wb-border));border-radius:10px;overflow:hidden}",
1092
1104
  ".wbctl-review-row{display:grid;grid-template-columns:96px minmax(0,1fr);gap:10px;padding:8px 12px;font-size:12.5px;background:var(--wb-surface,transparent)}",
@@ -1291,9 +1303,9 @@ var require_number_field = __commonJS({
1291
1303
  ".wbctl-num-box{display:inline-flex;align-items:center;gap:6px;min-width:0}",
1292
1304
  ".wbctl-num-input{box-sizing:border-box;width:96px;min-width:0;padding:6px 9px;border:1px solid var(--wb-line,rgba(127,127,127,.35));border-radius:6px;background:var(--wb-surface,var(--wb-card,transparent));color:inherit;font:inherit;font-size:13px;font-variant-numeric:tabular-nums;transition:border-color .14s ease,outline-color .14s ease}",
1293
1305
  ".wbctl-num-input:hover:not(:disabled){border-color:var(--wb-border,var(--wb-line))}",
1294
- ".wbctl-num-input:focus{outline:2px solid color-mix(in oklab,var(--wb-accent) 55%,transparent);outline-offset:1px;border-color:var(--wb-accent)}",
1306
+ ".wbctl-num-input:focus-visible{outline:2px solid color-mix(in oklab,var(--wb-accent) 55%,transparent);outline-offset:1px;border-color:var(--wb-accent)}",
1295
1307
  ".wbctl-num-input.is-invalid{border-color:var(--wb-danger)}",
1296
- ".wbctl-num-input.is-invalid:focus{outline-color:color-mix(in oklab,var(--wb-danger) 55%,transparent)}",
1308
+ ".wbctl-num-input.is-invalid:focus-visible{outline-color:color-mix(in oklab,var(--wb-danger) 55%,transparent)}",
1297
1309
  ".wbctl-num-input:disabled{opacity:.5;cursor:not-allowed}",
1298
1310
  ".wbctl-num-unit{color:var(--wb-muted,inherit);font-size:12px;white-space:nowrap}",
1299
1311
  ".wbctl-num-hint{color:var(--wb-muted,inherit);font-size:11px;line-height:1.4}",
@@ -1353,7 +1365,7 @@ var require_styles = __commonJS({
1353
1365
  ".wbsal-btn.ghost{border-color:transparent;background:color-mix(in srgb,var(--wb-muted) 11%,transparent);color:var(--wb-text,inherit)}",
1354
1366
  ".wbsal-btn.ghost:hover:not(:disabled){background:color-mix(in srgb,var(--wb-accent) 12%,transparent);color:var(--wb-accent)}",
1355
1367
  ".wbsal-input{border:1px solid var(--wb-border);border-radius:8px;padding:7px 9px;font:inherit;font-size:12.5px;background:var(--wb-surface);color:var(--wb-text,inherit);min-width:88px;box-sizing:border-box}",
1356
- ".wbsal-input:focus{outline:2px solid color-mix(in srgb,var(--wb-accent) 45%,transparent);outline-offset:1px;border-color:var(--wb-accent)}",
1368
+ ".wbsal-input:focus-visible{outline:2px solid color-mix(in srgb,var(--wb-accent) 45%,transparent);outline-offset:1px;border-color:var(--wb-accent)}",
1357
1369
  ".wbsal-field{display:flex;flex-direction:column;gap:4px;font-size:12px;min-width:0}",
1358
1370
  ".wbsal-label{font-size:11.5px;font-weight:600;color:var(--wb-muted)}",
1359
1371
  ".wbsal-hint{font-size:11px;color:var(--wb-muted)}",
@@ -4371,7 +4383,7 @@ var GLYPHS = require_icons2().ICONS;
4371
4383
  ensureStyles();
4372
4384
  host.registerAddon({
4373
4385
  id: "wb-addon-salary",
4374
- version: "0.4.23",
4386
+ version: "0.4.24",
4375
4387
  icon: GLYPHS["wallet"],
4376
4388
  views: [
4377
4389
  { id: "stats", icon: tabIcon("stats"), title: { zh: "\u7EDF\u8BA1", en: "Stats" }, component: withProps(require_stats(), "\u7EDF\u8BA1") },
package/lib/index.js CHANGED
@@ -38,11 +38,11 @@ export function apply(ctx) {
38
38
  // 更新来源:宿主「插件」页按它查新版本并安装(只认官方 npm registry)。
39
39
  update: { source: "npm", package: "dsh-workbench-salary" },
40
40
  category: "finance",
41
- // 工资记录随备份迁移(同步清单为空:不上云)。
41
+ // 工资记录随备份迁移,也参与云同步(软删除行按墓碑同步到其它设备)。
42
42
  tables: [
43
43
  { name: "salary_record", persistence: "persistent", backupKey: "records" },
44
44
  ],
45
- sync: { tables: [] },
45
+ sync: { tables: [{ name: "salary_record" }] },
46
46
  views: VIEWS,
47
47
  capability: {
48
48
  summary: "记录每一笔工资的日期、用工类型(实习/试用/正式等)、结算方式与全部金额明细,按年/按月统计实发、应发、个税与社保;不做报销与支出流水。",
@@ -69,7 +69,7 @@ export function apply(ctx) {
69
69
  notFor: ["不做工资条 OCR", "不做多公司并行核算", "不存姓名等身份信息"],
70
70
  notes: [
71
71
  "同日允许多笔;统计可按到账月或所属月聚合,未归属的旧记录仅纳入到账口径。",
72
- "金额在本机 SQLite 保存,随宿主备份;不参与云同步。",
72
+ "金额在本机 SQLite 保存,随宿主备份并参与云同步;删除按墓碑同步到其它设备。",
73
73
  "agent 可新增、修改、软删除工资记录;删除后不再出现在列表与统计。",
74
74
  ],
75
75
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-workbench-salary",
3
- "version": "0.4.23",
3
+ "version": "0.4.24",
4
4
  "description": "个人工作台工资插件:按发薪日期记录工资构成、扣款与实发",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -17,7 +17,7 @@
17
17
  "addon": {
18
18
  "id": "wb-addon-salary",
19
19
  "title": "工资",
20
- "version": "0.4.23",
20
+ "version": "0.4.24",
21
21
  "minShell": "0.8.0",
22
22
  "tables": [
23
23
  "salary_record"
@@ -40,7 +40,7 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "dsh-workbench-host": "^0.33.0"
43
+ "dsh-workbench-host": "^0.35.4"
44
44
  },
45
45
  "dsh": {
46
46
  "bundle": {