@tbox.cn/app-module-member 0.9.4 → 0.9.5
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.
|
@@ -163,6 +163,7 @@ var samples = [
|
|
|
163
163
|
label: "\u5361\u9762\xB7\u5361\u56FE\u7F3A\u5931",
|
|
164
164
|
note: "presentation \u5728\u4F46 cardImageUrl \u7F3A\u7701\u2014\u2014\u9000\u5230\u6E10\u53D8\u515C\u5E95\u5E95\u7EB9\uFF0C\u53E0\u5B57\u6392\u5E03\u5E94\u4E0D\u53D8",
|
|
165
165
|
group: "\u5361\u9762\u7D20\u6750\u5206\u652F",
|
|
166
|
+
hidden: true,
|
|
166
167
|
data: {
|
|
167
168
|
userId: "u_1001",
|
|
168
169
|
cardRef: "card:u_1001",
|
|
@@ -178,6 +179,7 @@ var samples = [
|
|
|
178
179
|
label: "\u5361\u9762\xB7\u5916\u94FE\u52A0\u8F7D\u5931\u8D25",
|
|
179
180
|
note: "\u7EBF\u4E0A\u5361\u56FE 404 / \u65AD\u7F51\u7684\u5B9E\u51B5\u2014\u2014ImageWithFallback \u5360\u4F4D\u4E0D\u5E94\u628A\u5361\u9762\u6491\u53D8\u5F62",
|
|
180
181
|
group: "\u5361\u9762\u7D20\u6750\u5206\u652F",
|
|
182
|
+
hidden: true,
|
|
181
183
|
data: {
|
|
182
184
|
userId: "u_1001",
|
|
183
185
|
cardRef: "card:u_1001",
|
|
@@ -194,6 +196,7 @@ var samples = [
|
|
|
194
196
|
label: "\u5361\u9762\xB7\u8FDB\u5EA6\u957F\u6587\u6848",
|
|
195
197
|
note: "progress.message \u8D85 24 \u5B57\u89E6\u53D1 --scroll \u8DD1\u9A6C\u706F\uFF1Bpercent=0 \u65F6\u8FDB\u5EA6\u6761\u5E94\u53EF\u89C1\u8F68\u9053",
|
|
196
198
|
group: "\u5361\u9762\u7D20\u6750\u5206\u652F",
|
|
199
|
+
hidden: true,
|
|
197
200
|
data: {
|
|
198
201
|
userId: "u_1001",
|
|
199
202
|
cardRef: "card:u_1001",
|
|
@@ -215,6 +218,7 @@ var samples = [
|
|
|
215
218
|
label: "\u5361\u9762\xB7\u65E0\u8FDB\u5EA6\u65E0\u6743\u76CA",
|
|
216
219
|
note: "progress \u4E0E benefits \u540C\u65F6\u7F3A\u7701\u2014\u2014\u53EA\u5269\u5361\u9762 + \u504F\u597D\u5F15\u5BFC\uFF0C\u68C0\u67E5\u5E95\u90E8\u6536\u53E3",
|
|
217
220
|
group: "\u5361\u9762\u7D20\u6750\u5206\u652F",
|
|
221
|
+
hidden: true,
|
|
218
222
|
data: {
|
|
219
223
|
userId: "u_1001",
|
|
220
224
|
cardRef: "card:u_1001",
|
|
@@ -229,6 +233,7 @@ var samples = [
|
|
|
229
233
|
label: "\u5361\u9762\xB7\u6743\u76CA\u56FE\u6807\u5931\u8D25",
|
|
230
234
|
note: "iconUrl \u52A0\u8F7D\u5931\u8D25 \u2192 \u6309\u6743\u76CA\u540D\u5339\u914D\u7684\u515C\u5E95\u56FE\u6807\uFF08\u505C\u8F66/\u79EF\u5206/\u6D3B\u52A8/\u5176\u5B83\u56DB\u6761\u5206\u652F\uFF09",
|
|
231
235
|
group: "\u5361\u9762\u7D20\u6750\u5206\u652F",
|
|
236
|
+
hidden: true,
|
|
232
237
|
data: {
|
|
233
238
|
userId: "u_1001",
|
|
234
239
|
cardRef: "card:u_1001",
|
|
@@ -278,7 +283,8 @@ var samples = [
|
|
|
278
283
|
progress: PROGRESS_SHORT,
|
|
279
284
|
benefits: benefitsOf("gold")
|
|
280
285
|
},
|
|
281
|
-
isHistory: true
|
|
286
|
+
isHistory: true,
|
|
287
|
+
hidden: true
|
|
282
288
|
}
|
|
283
289
|
];
|
|
284
290
|
|
package/dist/index.js
CHANGED
package/dist/server/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tbox.cn/app-module-member",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "商圈会员模块:会员账户、会员卡、积分流水与入会流程(codegen 源)。",
|
|
6
6
|
"exports": {
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@tbox.cn/app-contracts": "0.12.
|
|
22
|
-
"@tbox.cn/app-contracts-mall": "0.12.
|
|
23
|
-
"@tbox.cn/app-agent-sdk-client": "0.1.
|
|
24
|
-
"@tbox.cn/app-agent-sdk-server": "0.1.
|
|
21
|
+
"@tbox.cn/app-contracts": "0.12.3",
|
|
22
|
+
"@tbox.cn/app-contracts-mall": "0.12.3",
|
|
23
|
+
"@tbox.cn/app-agent-sdk-client": "0.1.3",
|
|
24
|
+
"@tbox.cn/app-agent-sdk-server": "0.1.4"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"zod": "3.25.76",
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
* 换行(低两档 14 项、高两档 15 项的数量差异照实铺),不是图标的图案还原度
|
|
16
16
|
* (真实图标由 provider 运行时下发;图案语义兜底归组件内 ImageWithFallback);
|
|
17
17
|
* - 卡图/图标的外链失败分支刻意保留 example.com 占位(该分支本身是合法预览态);
|
|
18
|
+
* - 「卡面素材分支」组五格 hidden: true(2026-09-23 预览降噪裁决——真源保留,shape/schema
|
|
19
|
+
* 质量检查仍全量巡走;恢复展示 = 移除标记);
|
|
18
20
|
* - 白名单由 tests/samples.test.ts 断言收口:卡面 URL 仅允许 mdn.alipayobjects.com /
|
|
19
21
|
* example.com / data:image/svg+xml,厂商租户素材回潜即 fail。
|
|
20
22
|
*/
|
|
@@ -194,6 +196,7 @@ export const samples: CardSample<MemberCardSummaryCardData>[] = [
|
|
|
194
196
|
label: '卡面·卡图缺失',
|
|
195
197
|
note: 'presentation 在但 cardImageUrl 缺省——退到渐变兜底底纹,叠字排布应不变',
|
|
196
198
|
group: '卡面素材分支',
|
|
199
|
+
hidden: true,
|
|
197
200
|
data: {
|
|
198
201
|
userId: 'u_1001', cardRef: 'card:u_1001', cardDisplay: '金卡会员', status: 'active',
|
|
199
202
|
availablePoints: 860,
|
|
@@ -205,6 +208,7 @@ export const samples: CardSample<MemberCardSummaryCardData>[] = [
|
|
|
205
208
|
label: '卡面·外链加载失败',
|
|
206
209
|
note: '线上卡图 404 / 断网的实况——ImageWithFallback 占位不应把卡面撑变形',
|
|
207
210
|
group: '卡面素材分支',
|
|
211
|
+
hidden: true,
|
|
208
212
|
data: {
|
|
209
213
|
userId: 'u_1001', cardRef: 'card:u_1001', cardDisplay: '金卡会员', status: 'active',
|
|
210
214
|
availablePoints: 860, cardImageUrl: 'https://assets.example.com/member/gold-card.png',
|
|
@@ -216,6 +220,7 @@ export const samples: CardSample<MemberCardSummaryCardData>[] = [
|
|
|
216
220
|
label: '卡面·进度长文案',
|
|
217
221
|
note: 'progress.message 超 24 字触发 --scroll 跑马灯;percent=0 时进度条应可见轨道',
|
|
218
222
|
group: '卡面素材分支',
|
|
223
|
+
hidden: true,
|
|
219
224
|
data: {
|
|
220
225
|
userId: 'u_1001', cardRef: 'card:u_1001', cardDisplay: '金卡会员', status: 'active',
|
|
221
226
|
availablePoints: 860, cardImageUrl: FACE.gold,
|
|
@@ -231,6 +236,7 @@ export const samples: CardSample<MemberCardSummaryCardData>[] = [
|
|
|
231
236
|
label: '卡面·无进度无权益',
|
|
232
237
|
note: 'progress 与 benefits 同时缺省——只剩卡面 + 偏好引导,检查底部收口',
|
|
233
238
|
group: '卡面素材分支',
|
|
239
|
+
hidden: true,
|
|
234
240
|
data: {
|
|
235
241
|
userId: 'u_1001', cardRef: 'card:u_1001', cardDisplay: '悦享卡', status: 'active',
|
|
236
242
|
availablePoints: 0, cardImageUrl: FACE.blue,
|
|
@@ -241,6 +247,7 @@ export const samples: CardSample<MemberCardSummaryCardData>[] = [
|
|
|
241
247
|
label: '卡面·权益图标失败',
|
|
242
248
|
note: 'iconUrl 加载失败 → 按权益名匹配的兜底图标(停车/积分/活动/其它四条分支)',
|
|
243
249
|
group: '卡面素材分支',
|
|
250
|
+
hidden: true,
|
|
244
251
|
data: {
|
|
245
252
|
userId: 'u_1001', cardRef: 'card:u_1001', cardDisplay: '金卡会员', status: 'active',
|
|
246
253
|
availablePoints: 860, cardImageUrl: FACE.gold,
|
|
@@ -277,5 +284,6 @@ export const samples: CardSample<MemberCardSummaryCardData>[] = [
|
|
|
277
284
|
progress: PROGRESS_SHORT, benefits: benefitsOf('gold'),
|
|
278
285
|
},
|
|
279
286
|
isHistory: true,
|
|
287
|
+
hidden: true,
|
|
280
288
|
},
|
|
281
289
|
];
|
package/tests/samples.test.ts
CHANGED
|
@@ -27,6 +27,12 @@ describe('member samples 双断言(样本即契约)', () => {
|
|
|
27
27
|
expect(meta.samples).toHaveLength(11);
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
+
it('历史卡保留质量检查但不进入 Preview', () => {
|
|
31
|
+
const histories = (meta.samples ?? []).filter((sample) => sample.isHistory === true);
|
|
32
|
+
expect(histories).toHaveLength(1);
|
|
33
|
+
expect(histories.every((sample) => sample.hidden === true)).toBe(true);
|
|
34
|
+
});
|
|
35
|
+
|
|
30
36
|
it('四档 variant 全覆盖 + 高低档权益数量差异照实(14/15)', () => {
|
|
31
37
|
const variants = new Set(
|
|
32
38
|
(meta.samples ?? [])
|