base-combos 0.1.0 → 0.3.3
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/README.md +37 -0
- package/dist/present.d.ts.map +1 -1
- package/dist/present.js +122 -62
- package/dist/present.js.map +1 -1
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# base-combos 联动包:组件目录
|
|
2
|
+
|
|
3
|
+
一句话:本包不画页面,只管“哪条命令走哪条取数通道、长什么样”——`combos.yaml` 是唯一真相源。
|
|
4
|
+
|
|
5
|
+
本包不含画图组件;画图去 `base-paint`(`packages/base-render/README.md` 的组件目录)。
|
|
6
|
+
|
|
7
|
+
## 速查
|
|
8
|
+
|
|
9
|
+
| 我要 | 调谁/看哪 |
|
|
10
|
+
|---|---|
|
|
11
|
+
| 发起一条联动取数 | `comboEnvelope(key)`(先过注册表校验,对不上即抛错) |
|
|
12
|
+
| 查有哪些命令可用 | `PRESENT_KEYS`(生成物,147 条,以 `combos.yaml` 重核为准) |
|
|
13
|
+
| 加一条联动 | `combos.yaml` 加一行+过 `tooling/check-combos.mjs`,不改代码 |
|
|
14
|
+
| 看唤醒词与呈现 | `HELP.md` 互联区(构建期注入的静态投影) |
|
|
15
|
+
| 看场景语义与降级 | `combos.yaml` 的 `scenarios`/`fallbacks` 段 |
|
|
16
|
+
|
|
17
|
+
## 成员
|
|
18
|
+
|
|
19
|
+
- `comboEnvelope(key)`:按注册表校验命令后造 `list` 信封(骨架占位;真实载荷各技能实施)。源:`src/index.ts`。
|
|
20
|
+
- `PRESENT_KEYS`:命令表(`src/present.ts`,由 `scripts/gen-present.mjs` 从 `combos.yaml` 生成,手改无效)。
|
|
21
|
+
- 注册表实现来自 `base-link-core`(`createRegistry`):命令先过注册表,载荷走信封全字段。
|
|
22
|
+
|
|
23
|
+
## 配置即契约(`combos.yaml` 头注释铁律)
|
|
24
|
+
|
|
25
|
+
- 本文件只有声明式联动描述,无库定义语句;以后每加一条只加配置。
|
|
26
|
+
- `scenarios` 30 条联动场景+`l6_slots` 6 个空位(一期不实现,内容不记录)。
|
|
27
|
+
- 取数通道 `channels` 15 对(命令 × 形状 × 背书);降级 `fallbacks` 6 条(显式标记,不编造)。
|
|
28
|
+
- `HELP.md` 是真相源的静态投影:构建期注入,运行时不计算。
|
|
29
|
+
|
|
30
|
+
## 红线
|
|
31
|
+
|
|
32
|
+
`present` 层只许 string 字面量引注册表命令,禁 import 页面交付层(`src/present.ts` 首行注释)。
|
|
33
|
+
|
|
34
|
+
## 测试与校验
|
|
35
|
+
|
|
36
|
+
- 单测:`node --test ../../test/scaffold.test.mjs`(包内无单测目录)。
|
|
37
|
+
- 加命令校验:`tooling/check-combos.mjs`。
|
package/dist/present.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"present.d.ts","sourceRoot":"","sources":["../src/present.ts"],"names":[],"mappings":"AAAA;8DAC8D;AAC9D,eAAO,MAAM,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"present.d.ts","sourceRoot":"","sources":["../src/present.ts"],"names":[],"mappings":"AAAA;8DAC8D;AAC9D,eAAO,MAAM,YAAY,EAAE,MAAM,EAoJhC,CAAC"}
|
package/dist/present.js
CHANGED
|
@@ -1,83 +1,141 @@
|
|
|
1
1
|
/** @generated —— 由 scripts/gen-present.mjs 从 combos.yaml 生成,手改无效(构建覆盖)。
|
|
2
2
|
* present 层红线:只许 string 字面量引 registry key,禁 import render。 */
|
|
3
3
|
export const PRESENT_KEYS = [
|
|
4
|
-
'calorie.
|
|
5
|
-
'calorie.
|
|
6
|
-
'calorie.
|
|
7
|
-
'calorie.
|
|
8
|
-
'calorie.view.goal',
|
|
9
|
-
'calorie.view.goal-config',
|
|
10
|
-
'calorie.view.goal-recommend',
|
|
11
|
-
'calorie.view.goal-weight',
|
|
12
|
-
'calorie.view.goal-progress',
|
|
13
|
-
'calorie.view.goal-status',
|
|
14
|
-
'calorie.view.combined',
|
|
15
|
-
'calorie.view.deficit',
|
|
16
|
-
'calorie.view.diet-review',
|
|
17
|
-
'calorie.view.health',
|
|
18
|
-
'calorie.view.ranking',
|
|
19
|
-
'calorie.view.library',
|
|
20
|
-
'calorie.view.search',
|
|
21
|
-
'calorie.photo.list',
|
|
22
|
-
'calorie.photo.detail',
|
|
23
|
-
'calorie.photo.compare',
|
|
24
|
-
'calorie.photo.gif',
|
|
25
|
-
'calorie.help.center',
|
|
26
|
-
'calorie.help.lookup',
|
|
27
|
-
'calorie.history',
|
|
28
|
-
'calorie.view.weight',
|
|
29
|
-
'calorie.view.weight-history',
|
|
30
|
-
'calorie.view.weight-compare',
|
|
31
|
-
'calorie.view.weight-review',
|
|
32
|
-
'calorie.view.volatility',
|
|
33
|
-
'calorie.view.body-composition',
|
|
34
|
-
'calorie.view.body-measure',
|
|
35
|
-
'calorie.view.plan',
|
|
36
|
-
'calorie.view.plan-wizard',
|
|
37
|
-
'calorie.view.exercise-goal',
|
|
38
|
-
'calorie.view.goal-expiring',
|
|
39
|
-
'calorie.view.goal-predict',
|
|
40
|
-
'calorie.view.goal-vs-actual',
|
|
41
|
-
'calorie.view.predict',
|
|
42
|
-
'calorie.view.anomaly',
|
|
43
|
-
'calorie.view.contraindication',
|
|
44
|
-
'calorie.view.dedupe',
|
|
45
|
-
'calorie.view.profile',
|
|
4
|
+
'calorie.body.composition-add',
|
|
5
|
+
'calorie.body.composition-remove',
|
|
6
|
+
'calorie.body.measure-add',
|
|
7
|
+
'calorie.body.measure-remove',
|
|
46
8
|
'calorie.diet.add',
|
|
47
|
-
'calorie.diet.update',
|
|
48
|
-
'calorie.diet.remove',
|
|
49
9
|
'calorie.diet.batch',
|
|
50
10
|
'calorie.diet.copy',
|
|
51
|
-
'calorie.diet.
|
|
11
|
+
'calorie.diet.remove',
|
|
52
12
|
'calorie.diet.remove-by-date',
|
|
53
13
|
'calorie.diet.remove-by-range',
|
|
54
14
|
'calorie.diet.remove-by-type',
|
|
55
|
-
'calorie.
|
|
56
|
-
'calorie.
|
|
57
|
-
'calorie.weight.update',
|
|
58
|
-
'calorie.weight.remove',
|
|
59
|
-
'calorie.weight.batch',
|
|
15
|
+
'calorie.diet.update',
|
|
16
|
+
'calorie.diet.update-by-date',
|
|
60
17
|
'calorie.exercise.add',
|
|
61
|
-
'calorie.exercise.update',
|
|
62
18
|
'calorie.exercise.remove',
|
|
19
|
+
'calorie.exercise.update',
|
|
20
|
+
'calorie.goal.exercise',
|
|
21
|
+
'calorie.goal.pause',
|
|
22
|
+
'calorie.goal.resume',
|
|
23
|
+
'calorie.goal.set',
|
|
24
|
+
'calorie.goal.water',
|
|
25
|
+
'calorie.goal.weight',
|
|
63
26
|
'calorie.photo.add',
|
|
64
27
|
'calorie.photo.remove',
|
|
65
28
|
'calorie.photo.tag',
|
|
66
29
|
'calorie.product.add',
|
|
67
|
-
'calorie.product.update',
|
|
68
30
|
'calorie.product.deprecate',
|
|
69
|
-
'calorie.
|
|
31
|
+
'calorie.product.import',
|
|
32
|
+
'calorie.product.update',
|
|
70
33
|
'calorie.profile.activity',
|
|
34
|
+
'calorie.profile.set',
|
|
71
35
|
'calorie.profile.update',
|
|
72
|
-
'calorie.
|
|
73
|
-
'calorie.
|
|
74
|
-
'calorie.
|
|
75
|
-
'calorie.
|
|
76
|
-
'calorie.
|
|
77
|
-
'calorie.
|
|
78
|
-
'calorie.
|
|
79
|
-
'calorie.
|
|
80
|
-
'calorie.
|
|
36
|
+
'calorie.water.log',
|
|
37
|
+
'calorie.weight.batch',
|
|
38
|
+
'calorie.weight.log',
|
|
39
|
+
'calorie.weight.remove',
|
|
40
|
+
'calorie.weight.update',
|
|
41
|
+
'calorie.workout.land',
|
|
42
|
+
'calorie.workout.land-monthend',
|
|
43
|
+
'calorie.workout.land-weekend',
|
|
44
|
+
'calorie.workout.plan-add-movement',
|
|
45
|
+
'calorie.workout.plan-copy',
|
|
46
|
+
'calorie.workout.plan-delete',
|
|
47
|
+
'calorie.workout.plan-delete-day',
|
|
48
|
+
'calorie.workout.plan-set',
|
|
49
|
+
'calorie.workout.plan-set-rest',
|
|
50
|
+
'calorie.workout.plan-set-week',
|
|
51
|
+
'calorie.workout.plan-update',
|
|
52
|
+
'calorie.workout.plan-update-day',
|
|
53
|
+
'calorie.workout.plan-update-movement',
|
|
54
|
+
'calorie.workout.xunji-backfill',
|
|
55
|
+
'calorie.workout.xunji-push',
|
|
56
|
+
'calorie.help.center',
|
|
57
|
+
'calorie.help.lookup',
|
|
58
|
+
'calorie.history',
|
|
59
|
+
'calorie.photo.compare',
|
|
60
|
+
'calorie.photo.detail',
|
|
61
|
+
'calorie.photo.gif',
|
|
62
|
+
'calorie.photo.list',
|
|
63
|
+
'calorie.report.bmi',
|
|
64
|
+
'calorie.report.bmr',
|
|
65
|
+
'calorie.report.compare',
|
|
66
|
+
'calorie.report.protein',
|
|
67
|
+
'calorie.report.score',
|
|
68
|
+
'calorie.report.tdee',
|
|
69
|
+
'calorie.report.trend',
|
|
70
|
+
'calorie.report.water',
|
|
71
|
+
'calorie.today',
|
|
72
|
+
'calorie.view.anomaly',
|
|
73
|
+
'calorie.view.batch-import-preview',
|
|
74
|
+
'calorie.view.body-composition',
|
|
75
|
+
'calorie.view.body-composition-compare',
|
|
76
|
+
'calorie.view.body-measure',
|
|
77
|
+
'calorie.view.body-measure-compare',
|
|
78
|
+
'calorie.view.calorie-trend',
|
|
79
|
+
'calorie.view.combined',
|
|
80
|
+
'calorie.view.composition-wizard',
|
|
81
|
+
'calorie.view.contraindication',
|
|
82
|
+
'calorie.view.dedupe',
|
|
83
|
+
'calorie.view.deficit',
|
|
84
|
+
'calorie.view.diet',
|
|
85
|
+
'calorie.view.diet-review',
|
|
86
|
+
'calorie.view.exercise',
|
|
87
|
+
'calorie.view.exercise-cardio',
|
|
88
|
+
'calorie.view.exercise-distribution',
|
|
89
|
+
'calorie.view.exercise-goal',
|
|
90
|
+
'calorie.view.exercise-recap',
|
|
91
|
+
'calorie.view.exercise-records',
|
|
92
|
+
'calorie.view.exercise-review',
|
|
93
|
+
'calorie.view.exercise-strength',
|
|
94
|
+
'calorie.view.exercise-trend',
|
|
95
|
+
'calorie.view.gif-planner',
|
|
96
|
+
'calorie.view.goal',
|
|
97
|
+
'calorie.view.goal-config',
|
|
98
|
+
'calorie.view.goal-expiring',
|
|
99
|
+
'calorie.view.goal-predict',
|
|
100
|
+
'calorie.view.goal-progress',
|
|
101
|
+
'calorie.view.goal-recommend',
|
|
102
|
+
'calorie.view.goal-status',
|
|
103
|
+
'calorie.view.goal-vs-actual',
|
|
104
|
+
'calorie.view.goal-weight',
|
|
105
|
+
'calorie.view.goal-wizard',
|
|
106
|
+
'calorie.view.health',
|
|
107
|
+
'calorie.view.home',
|
|
108
|
+
'calorie.view.label-precheck',
|
|
109
|
+
'calorie.view.library',
|
|
110
|
+
'calorie.view.lint-health',
|
|
111
|
+
'calorie.view.long-trend',
|
|
112
|
+
'calorie.view.measure-wizard',
|
|
113
|
+
'calorie.view.multi-trend',
|
|
114
|
+
'calorie.view.nutrition-analysis',
|
|
115
|
+
'calorie.view.nutrition-detail',
|
|
116
|
+
'calorie.view.nutrition-ratio',
|
|
117
|
+
'calorie.view.photo-log-wizard',
|
|
118
|
+
'calorie.view.photo-picker',
|
|
119
|
+
'calorie.view.plan',
|
|
120
|
+
'calorie.view.plan-vs-actual',
|
|
121
|
+
'calorie.view.plan-wizard',
|
|
122
|
+
'calorie.view.plan-write-preview',
|
|
123
|
+
'calorie.view.predict',
|
|
124
|
+
'calorie.view.process-progress',
|
|
125
|
+
'calorie.view.profile',
|
|
126
|
+
'calorie.view.profile-wizard',
|
|
127
|
+
'calorie.view.ranking',
|
|
128
|
+
'calorie.view.review-template',
|
|
129
|
+
'calorie.view.search',
|
|
130
|
+
'calorie.view.six-factors',
|
|
131
|
+
'calorie.view.source-stats',
|
|
132
|
+
'calorie.view.today-water',
|
|
133
|
+
'calorie.view.volatility',
|
|
134
|
+
'calorie.view.weight',
|
|
135
|
+
'calorie.view.weight-compare',
|
|
136
|
+
'calorie.view.weight-history',
|
|
137
|
+
'calorie.view.weight-review',
|
|
138
|
+
'home.help.lookup',
|
|
81
139
|
'memo.search',
|
|
82
140
|
'memo.detail',
|
|
83
141
|
'memo.create',
|
|
@@ -88,5 +146,7 @@ export const PRESENT_KEYS = [
|
|
|
88
146
|
'memo.sync',
|
|
89
147
|
'memo.batch',
|
|
90
148
|
'memo.stats',
|
|
149
|
+
'memo.help.lookup',
|
|
150
|
+
'memo.auth',
|
|
91
151
|
];
|
|
92
152
|
//# sourceMappingURL=present.js.map
|
package/dist/present.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"present.js","sourceRoot":"","sources":["../src/present.ts"],"names":[],"mappings":"AAAA;8DAC8D;AAC9D,MAAM,CAAC,MAAM,YAAY,GAAa;IACpC,
|
|
1
|
+
{"version":3,"file":"present.js","sourceRoot":"","sources":["../src/present.ts"],"names":[],"mappings":"AAAA;8DAC8D;AAC9D,MAAM,CAAC,MAAM,YAAY,GAAa;IACpC,8BAA8B;IAC9B,iCAAiC;IACjC,0BAA0B;IAC1B,6BAA6B;IAC7B,kBAAkB;IAClB,oBAAoB;IACpB,mBAAmB;IACnB,qBAAqB;IACrB,6BAA6B;IAC7B,8BAA8B;IAC9B,6BAA6B;IAC7B,qBAAqB;IACrB,6BAA6B;IAC7B,sBAAsB;IACtB,yBAAyB;IACzB,yBAAyB;IACzB,uBAAuB;IACvB,oBAAoB;IACpB,qBAAqB;IACrB,kBAAkB;IAClB,oBAAoB;IACpB,qBAAqB;IACrB,mBAAmB;IACnB,sBAAsB;IACtB,mBAAmB;IACnB,qBAAqB;IACrB,2BAA2B;IAC3B,wBAAwB;IACxB,wBAAwB;IACxB,0BAA0B;IAC1B,qBAAqB;IACrB,wBAAwB;IACxB,mBAAmB;IACnB,sBAAsB;IACtB,oBAAoB;IACpB,uBAAuB;IACvB,uBAAuB;IACvB,sBAAsB;IACtB,+BAA+B;IAC/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BAAsB;IACtB,6BAA6B;IAC7B,sBAAsB;IACtB,8BAA8B;IAC9B,qBAAqB;IACrB,0BAA0B;IAC1B,2BAA2B;IAC3B,0BAA0B;IAC1B,yBAAyB;IACzB,qBAAqB;IACrB,6BAA6B;IAC7B,6BAA6B;IAC7B,4BAA4B;IAC5B,kBAAkB;IAClB,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,WAAW;IACX,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,kBAAkB;IAClB,WAAW;CACZ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "base-combos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "语义包:combos.yaml 唯一真相源,36 组语义条目",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"base-link-core": "
|
|
15
|
+
"base-link-core": "^0.3.0"
|
|
16
16
|
},
|
|
17
17
|
"engines": {
|
|
18
18
|
"node": ">=22.13"
|