@sunr/dsh-reminder 0.14.0 → 0.14.2
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/package.json +6 -6
- package/src/client.js +2 -0
- package/src/view.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sunr/dsh-reminder",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "记日:农历纪念日、倒数与重复待办的 DeepSeek Harness 插件",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"engines": {
|
|
30
30
|
"node": "^22.19.0 || >=24.0.0",
|
|
31
|
-
"dsh": ">=0.2.
|
|
31
|
+
"dsh": ">=0.2.0-rc.2"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"astronomy-engine": "^2.1.19",
|
|
@@ -41,6 +41,9 @@
|
|
|
41
41
|
"react": "18.3.1",
|
|
42
42
|
"react-dom": "18.3.1"
|
|
43
43
|
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"test": "node --test test/"
|
|
46
|
+
},
|
|
44
47
|
"dsh": {
|
|
45
48
|
"bundle": {
|
|
46
49
|
"patch": "./bundles/cordis.patch.yml"
|
|
@@ -48,8 +51,5 @@
|
|
|
48
51
|
"client": {
|
|
49
52
|
"platform": "web"
|
|
50
53
|
}
|
|
51
|
-
},
|
|
52
|
-
"scripts": {
|
|
53
|
-
"test": "node --test test/"
|
|
54
54
|
}
|
|
55
|
-
}
|
|
55
|
+
}
|
package/src/client.js
CHANGED
|
@@ -842,6 +842,7 @@ window.__ModuleLoader__.load({
|
|
|
842
842
|
h('thead', { key: 'head' }, h('tr', null, [
|
|
843
843
|
h('th', { key: 'w', style: styles.th }, '单双周'),
|
|
844
844
|
h('th', { key: 'd', style: styles.th }, '日期'),
|
|
845
|
+
h('th', { key: 'wd', style: styles.th }, '星期'),
|
|
845
846
|
compact ? null : h('th', { key: 'i', style: styles.th }, '距今'),
|
|
846
847
|
h('th', { key: 't', style: styles.th }, '事项'),
|
|
847
848
|
h('th', { key: 'a', style: Object.assign({}, styles.th, { textAlign: 'right' }) }, ''),
|
|
@@ -851,6 +852,7 @@ window.__ModuleLoader__.load({
|
|
|
851
852
|
return h('tr', { key: row.id, style: row.doneNow ? styles.doneRow : undefined }, [
|
|
852
853
|
h('td', { key: 'w', style: Object.assign({}, styles.td, { color: MUTED, fontSize: 12 }) }, weekLabel(row.weekNo || 1)),
|
|
853
854
|
h('td', { key: 'd', style: Object.assign({}, styles.td, tone || {}) }, row.date),
|
|
855
|
+
h('td', { key: 'wd', style: Object.assign({}, styles.td, { color: MUTED, fontSize: 12 }) }, '周' + WEEKDAYS[row.weekday || 0]),
|
|
854
856
|
compact ? null : h('td', { key: 'i', style: Object.assign({}, styles.td, tone || {}) }, when(row)),
|
|
855
857
|
h('td', { key: 't', style: styles.td }, [
|
|
856
858
|
h('span', { key: 'c', style: Object.assign({}, styles.colorBar, { background: colorOf(row.id) }) }),
|
package/src/view.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* 两个视图共用同一个 rowOf,保证编辑表单拿到的字段一致。
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { nextOccurrence, matchesItem, isoWeekOf } from './repeat.js'
|
|
8
|
+
import { nextOccurrence, matchesItem, isoWeekOf, weekdayOf } from './repeat.js'
|
|
9
9
|
import { almanacOf } from './almanac.js'
|
|
10
10
|
import { normalizeAdvance } from './service.js'
|
|
11
11
|
import { mercuryRetrogradeRanges, isRetrograde } from './retrograde.js'
|
|
@@ -38,6 +38,7 @@ function rowOf(item, iso, todayISO) {
|
|
|
38
38
|
date: iso,
|
|
39
39
|
anchor: item.date,
|
|
40
40
|
weekNo: isoWeekOf(iso),
|
|
41
|
+
weekday: weekdayOf(iso),
|
|
41
42
|
inDays: daysBetween(todayISO, iso),
|
|
42
43
|
lunar: lunarLabel(item, iso),
|
|
43
44
|
lunarMonth: item.lunar?.month ?? null,
|
|
@@ -91,6 +92,7 @@ export function buildMonth(items, year, month, todayISO) {
|
|
|
91
92
|
items: hits,
|
|
92
93
|
almanac: almanacOf(iso),
|
|
93
94
|
weekNo: isoWeekOf(iso),
|
|
95
|
+
weekday: weekdayOf(iso),
|
|
94
96
|
mercuryRetrograde: isRetrograde(iso, retrograde),
|
|
95
97
|
})
|
|
96
98
|
}
|