@tbox.cn/app-module-member 0.9.2 → 0.9.4

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.
@@ -28,10 +28,10 @@ function cardFace(from, to) {
28
28
  const marks = '<rect x="58" y="52" width="210" height="42" rx="8" fill="%23000000" opacity="0.14"/><rect x="58" y="130" width="132" height="26" rx="6" fill="%23000000" opacity="0.10"/>';
29
29
  return `data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="672" height="347"><defs><linearGradient id="f" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="%23${from}"/><stop offset="1" stop-color="%23${to}"/></linearGradient></defs><rect width="672" height="347" fill="url(%23f)"/><circle cx="548" cy="60" r="150" fill="%23ffffff" opacity="0.16"/>` + marks + "</svg>";
30
30
  }
31
- var BLACK_CARD_IMAGE = "https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*sdTfQ5NaRN8AAAAAgEAAAAgAegitAQ/fmt.webp";
31
+ var BLACK_CARD_IMAGE = "https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*c7obRqceNlYAAAAAR0AAAAgAegitAQ/fmt.webp";
32
32
  var FACE = {
33
- blue: "https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*OVn3SL73QbQAAAAAgDAAAAgAegitAQ/fmt.webp",
34
- silver: cardFace("eef1f7", "c4cddf"),
33
+ blue: "https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*FrvURLH4UywAAAAARFAAAAgAegitAQ/fmt.webp",
34
+ silver: "https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*Zby2R6FBuFwAAAAASwAAAAgAegitAQ/fmt.webp",
35
35
  // gold 配浅金 SVG:恢复真实厂商世代叠字后金卡是浅底深字,黑金深图配金档=深字压深底不可读;
36
36
  // 待世代规格(1344×694+透明边)浅金素材重制后再换平台 CDN 图。
37
37
  gold: cardFace("f9ecca", "e3c283"),
@@ -335,7 +335,9 @@ var meta3 = {
335
335
  items: [{ usageRecordRef: "r1", title: "\u6D88\u8D39\u5956\u52B1", amount: "+100", usedAt: "2026-08-13T00:00:00Z" }],
336
336
  total: 1
337
337
  },
338
- schemaVersion: 1
338
+ schemaVersion: 1,
339
+ // 永久型不出卡:积分流水仅作文本事实(queryPoints SKILL 9-03),不构造积分流水卡
340
+ hidden: true
339
341
  };
340
342
  var meta_default3 = meta3;
341
343
 
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  resolveMemberEnrollmentPort,
8
8
  resolveMemberProfilePort,
9
9
  serverModule
10
- } from "./chunk-YQZ64C6P.js";
10
+ } from "./chunk-T3VRIVI4.js";
11
11
  import {
12
12
  clientModule
13
13
  } from "./chunk-GMHJMLRV.js";
@@ -7,7 +7,7 @@ import {
7
7
  resolveMemberEnrollmentPort,
8
8
  resolveMemberProfilePort,
9
9
  serverModule
10
- } from "../chunk-YQZ64C6P.js";
10
+ } from "../chunk-T3VRIVI4.js";
11
11
  export {
12
12
  InMemoryMemberService,
13
13
  memberCards,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tbox.cn/app-module-member",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
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.0",
21
+ "@tbox.cn/app-contracts": "0.12.1",
22
22
  "@tbox.cn/app-contracts-mall": "0.12.1",
23
23
  "@tbox.cn/app-agent-sdk-client": "0.1.1",
24
- "@tbox.cn/app-agent-sdk-server": "0.1.1"
24
+ "@tbox.cn/app-agent-sdk-server": "0.1.2"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "zod": "3.25.76",
@@ -10,7 +10,7 @@
10
10
  * 素材边界(规范真源 = 厂商中立门禁:禁厂商租户字样/标识/深链——平台 CDN 演示素材不在禁列):
11
11
  * - 卡面底图:平台 CDN 演示素材(mdn.alipayobjects.com,预览/截图保真)。样本只服务预览,
12
12
  * 运行时素材恒由 provider 下发(mock 发 dynamic face 与真实厂商集成同构,见 provider-mock
13
- * member);silver 档保留内联 SVG 作「无外部素材占位」分支;
13
+ * member);gold 档保留内联 SVG 作浅金占位;
14
14
  * - 权益图标:内联 SVG 按变体分色——验证的是「图标配色压不压得住卡面底色」与四列网格
15
15
  * 换行(低两档 14 项、高两档 15 项的数量差异照实铺),不是图标的图案还原度
16
16
  * (真实图标由 provider 运行时下发;图案语义兜底归组件内 ImageWithFallback);
@@ -21,7 +21,7 @@
21
21
  import type { CardSample } from '@tbox.cn/app-contracts';
22
22
  import type { MemberCardSummaryCardData } from '@tbox.cn/app-contracts-mall';
23
23
 
24
- /** 内联卡面底图:银/金档占位(浅底深字,与模块叠字配色配对)。 */
24
+ /** 内联卡面底图:金档占位(浅底深字,与模块叠字配色配对)。 */
25
25
  function cardFace(from: string, to: string): string {
26
26
  // 真实卡图恒自带卡名与「我的积分」字样(labelsEmbedded 恒 true),前端只叠积分数字。
27
27
  // 两块半透明色块代表那两行字的占位——不写真文字是为了不依赖 SVG 内的中文字体,
@@ -41,11 +41,11 @@ function cardFace(from: string, to: string): string {
41
41
  }
42
42
 
43
43
  export const BLACK_CARD_IMAGE
44
- = 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*sdTfQ5NaRN8AAAAAgEAAAAgAegitAQ/fmt.webp';
44
+ = 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*c7obRqceNlYAAAAAR0AAAAgAegitAQ/fmt.webp';
45
45
 
46
46
  const FACE = {
47
- blue: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*OVn3SL73QbQAAAAAgDAAAAgAegitAQ/fmt.webp',
48
- silver: cardFace('eef1f7', 'c4cddf'),
47
+ blue: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*FrvURLH4UywAAAAARFAAAAgAegitAQ/fmt.webp',
48
+ silver: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*Zby2R6FBuFwAAAAASwAAAAgAegitAQ/fmt.webp',
49
49
  // gold 配浅金 SVG:恢复真实厂商世代叠字后金卡是浅底深字,黑金深图配金档=深字压深底不可读;
50
50
  // 待世代规格(1344×694+透明边)浅金素材重制后再换平台 CDN 图。
51
51
  gold: cardFace('f9ecca', 'e3c283'),
@@ -14,6 +14,8 @@ const meta: CardMeta<typeof memberPointUsageListCardDataSchema> = {
14
14
  total: 1,
15
15
  },
16
16
  schemaVersion: 1,
17
+ // 永久型不出卡:积分流水仅作文本事实(queryPoints SKILL 9-03),不构造积分流水卡
18
+ hidden: true,
17
19
  };
18
20
 
19
21
  export default meta;
@@ -60,7 +60,23 @@ describe('member samples 双断言(样本即契约)', () => {
60
60
  it('初始态深卡配对:black 变体配深底卡图(恢复真实厂商世代叠字后浅金字压深底可读)', () => {
61
61
  const data = meta.sampleData as { presentation?: { variant?: string }; cardImageUrl?: string };
62
62
  expect(data.presentation?.variant).toBe('black');
63
- expect(data.cardImageUrl).toMatch(/^https:\/\/mdn\.alipayobjects\.com\//);
63
+ expect(data.cardImageUrl).toBe(
64
+ 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*c7obRqceNlYAAAAAR0AAAAgAegitAQ/fmt.webp',
65
+ );
66
+ });
67
+
68
+ it('蓝卡、银卡、黑卡样本使用各自指定卡面', () => {
69
+ const expected = {
70
+ blue: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*FrvURLH4UywAAAAARFAAAAgAegitAQ/fmt.webp',
71
+ silver: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*Zby2R6FBuFwAAAAASwAAAAgAegitAQ/fmt.webp',
72
+ black: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*c7obRqceNlYAAAAAR0AAAAgAegitAQ/fmt.webp',
73
+ } as const;
74
+ for (const [variant, cardImageUrl] of Object.entries(expected)) {
75
+ const sample = (meta.samples ?? []).find(
76
+ (item) => (item.data as { presentation?: { variant?: string } }).presentation?.variant === variant,
77
+ );
78
+ expect((sample?.data as { cardImageUrl?: string } | undefined)?.cardImageUrl).toBe(cardImageUrl);
79
+ }
64
80
  });
65
81
 
66
82
  it('素材中立:权益图标全部为内联 SVG 分色占位或 example.com 占位', () => {