@tbox.cn/app-module-shopping-guide 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.
@@ -3,7 +3,7 @@ import {
3
3
  resolveShoppingGuidePorts,
4
4
  serverModule,
5
5
  shoppingGuideCards
6
- } from "../chunk-HWPVP7N5.js";
6
+ } from "../chunk-V777N5YK.js";
7
7
  export {
8
8
  createShoppingGuideTools,
9
9
  resolveShoppingGuidePorts,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tbox.cn/app-module-shopping-guide",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "description": "商圈导购模块:商品/商户搜索、推荐、对比、商场目录、人工导购、位置导航。",
6
6
  "exports": {
@@ -19,10 +19,10 @@
19
19
  "./package.json": "./package.json"
20
20
  },
21
21
  "dependencies": {
22
- "@tbox.cn/app-contracts": "0.12.0",
23
- "@tbox.cn/app-contracts-mall": "0.12.1",
24
- "@tbox.cn/app-agent-sdk-client": "0.1.1",
25
- "@tbox.cn/app-agent-sdk-server": "0.1.1"
22
+ "@tbox.cn/app-contracts": "0.12.2",
23
+ "@tbox.cn/app-contracts-mall": "0.12.2",
24
+ "@tbox.cn/app-agent-sdk-client": "0.1.2",
25
+ "@tbox.cn/app-agent-sdk-server": "0.1.3"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "zod": "3.25.76",
@@ -12,6 +12,8 @@ const meta: CardMeta<typeof categoryListCardDataSchema> = {
12
12
  observedAt: nowIso(),
13
13
  },
14
14
  schemaVersion: 1,
15
+ // 暂停型不出卡:list-categories 工具 2026-09-02 下线(业态浏览统一 shop-list),恢复时移除本标记
16
+ hidden: true,
15
17
  };
16
18
 
17
19
  export default meta;
@@ -12,6 +12,8 @@ const meta: CardMeta<typeof humanGuideListCardDataSchema> = {
12
12
  guides: [{ guideId: 'g1', name: '小导', available: true, itemActions: [] }],
13
13
  },
14
14
  schemaVersion: 1,
15
+ // 暂停型不出卡:list-human-guides 工具暂停(provider 暂无导购员接口),恢复时移除本标记
16
+ hidden: true,
15
17
  };
16
18
 
17
19
  export default meta;
@@ -13,6 +13,8 @@ const meta: CardMeta<typeof locationHandoffCardDataSchema> = {
13
13
  itemActions: [],
14
14
  },
15
15
  schemaVersion: 1,
16
+ // 暂停型不出卡:get-location 工具暂停(provider 暂无导航接口),恢复时移除本标记
17
+ hidden: true,
16
18
  };
17
19
 
18
20
  export default meta;
@@ -20,6 +20,8 @@ const meta: CardMeta<typeof mallDirectoryCardDataSchema> = {
20
20
  observedAt: nowIso(),
21
21
  },
22
22
  schemaVersion: 1,
23
+ // 暂停型不出卡:mall-directory 工具 2026-09-02 下线(楼层分布走 mall-context 正文),恢复时移除本标记
24
+ hidden: true,
23
25
  };
24
26
 
25
27
  export default meta;
@@ -10,6 +10,8 @@ const meta: CardMeta<typeof nearbyMallListCardDataSchema> = {
10
10
  malls: [{ mallId: 'mall-1', name: '示例商场', address: '示例地址', status: { code: 'open', label: '营业中' }, itemActions: [] }],
11
11
  },
12
12
  schemaVersion: 1,
13
+ // 暂停型不出卡:list-nearby-malls 工具暂停(周边商场暂不涉及),恢复时移除本标记
14
+ hidden: true,
13
15
  };
14
16
 
15
17
  export default meta;
@@ -22,6 +22,8 @@ const meta: CardMeta<typeof productComparisonCardDataSchema> = {
22
22
  observedAt: nowIso(),
23
23
  },
24
24
  schemaVersion: 1,
25
+ // 暂停型不出卡:compare-products 工具暂停(provider 暂无商品接口),恢复时移除本标记
26
+ hidden: true,
25
27
  };
26
28
 
27
29
  export default meta;
@@ -22,6 +22,8 @@ const meta: CardMeta<typeof productDetailCardDataSchema> = {
22
22
  itemActions: [],
23
23
  },
24
24
  schemaVersion: 1,
25
+ // 暂停型不出卡:get-product 工具暂停(provider 暂无商品详情接口),恢复时移除本标记
26
+ hidden: true,
25
27
  };
26
28
 
27
29
  export default meta;
@@ -25,6 +25,8 @@ const meta: CardMeta<typeof productListCardDataSchema> = {
25
25
  refinements: [],
26
26
  },
27
27
  schemaVersion: 1,
28
+ // 暂停型不出卡:search-products 工具暂停(provider 暂无商品目录接口),恢复时移除本标记
29
+ hidden: true,
28
30
  };
29
31
 
30
32
  export default meta;
@@ -32,6 +32,8 @@ const meta: CardMeta<typeof recommendMerchantsCardDataSchema> = {
32
32
  },
33
33
  samples,
34
34
  schemaVersion: 1,
35
+ // 暂停型不出卡:recommend 工具暂停(知识库未接入,KB 召回路径未通),恢复时移除本标记
36
+ hidden: true,
35
37
  };
36
38
 
37
39
  export default meta;
@@ -12,12 +12,13 @@ const meta: CardMeta<typeof shopListCardDataSchema> = {
12
12
  context: 'search',
13
13
  items: [
14
14
  {
15
- merchantId: 'm1',
16
- name: '示例门店',
15
+ merchantId: 'demo-shop-1002',
16
+ name: '星巴克',
17
+ logoUrl: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*pa08SZMqBNYAAAAAQEAAAAgAegitAQ/original',
17
18
  businessCategories: ['餐饮'],
18
- location: { displayText: 'A 栋 3 楼 301' },
19
+ location: { buildingName: 'A 栋', floorName: '1 楼', unitName: '101', displayText: 'A 栋 1 楼 101' },
19
20
  status: { code: 'enabled', label: '营业中', observedAt: nowIso() },
20
- services: ['堂食'],
21
+ services: [],
21
22
  promotionFacts: [],
22
23
  itemActions: [],
23
24
  },
@@ -6,129 +6,184 @@
6
6
  * 而非 sampleData 的形状;
7
7
  * - 视觉等价的输入合并为一格,note 列全合并口径;
8
8
  * - 样本即契约:data 必须 dataSchema 校验通过且无 shape 外键(tests/samples.test.ts 双断言);
9
- * - 图位为 https 中性占位(契约 httpsUrlSchema 强制 https 前缀,data URI 不可用)——
10
- * 预览页恒走缺图兜底,「有图」形态需真机 provider 数据(画廊时期的本地素材替换机制
11
- * 刻意不迁移);「搜索结果」样本另保留无 logo 行考察兜底。
9
+ * - 数据源与 modules/provider-mock/src/server/shopping.ts DEMO_BUILDINGS 一致
10
+ * (真实 CDN logo,厂商中立——预览页展示真实图片,非缺图兜底)。
12
11
  */
13
12
  import type { CardSample } from '@tbox.cn/app-contracts';
14
13
  import type { ShopListCardData } from '@tbox.cn/app-contracts-mall';
15
14
 
16
15
  const OBSERVED_AT = '2026-08-28T00:00:00.000Z';
17
16
 
18
-
19
-
20
- /** https 占位(契约 httpsUrlSchema 强制 https 前缀——data URI 不可用;gallery.invalid 恒不解析,
21
- * 预览页图位走缺图兜底,有图形态需真机 provider 数据) */
22
- const ASSET = {
23
- coffeeLogo: 'https://gallery.invalid/brand-guide/coffee-photo.png',
24
- diningLogo: 'https://gallery.invalid/brand-guide/dining-photo.png',
25
- lifestyleLogo: 'https://gallery.invalid/brand-guide/lifestyle-photo.png',
26
- } as const;
27
-
28
17
  const BROWSE_DATA = {
29
18
  context: 'search',
30
- summary: '按想逛的品类快速找到合适门店',
19
+ summary: '12 家精选门店,按品类快速找到合适门店',
31
20
  categoryTabs: [
21
+ { code: 'supermarket', name: '超市' },
32
22
  { code: 'food', name: '餐饮' },
33
- { code: 'coffee', name: '咖啡' },
34
- { code: 'fashion', name: '服饰' },
35
- { code: 'lifestyle', name: '生活方式' },
36
- { code: 'sports', name: '运动' },
23
+ { code: 'jewelry', name: '珠宝' },
24
+ { code: 'beauty', name: '美妆' },
25
+ { code: 'digital', name: '数码' },
26
+ { code: 'sports', name: '运动服饰' },
37
27
  ],
38
28
  items: [
39
29
  {
40
- merchantId: 'shop-coffee',
41
- name: '日光咖啡实验室',
42
- logoUrl: ASSET.coffeeLogo,
43
- brand: '日光咖啡',
44
- businessCategories: ['咖啡', '餐饮'],
45
- location: { buildingName: 'A 座', floorName: 'L1', unitName: 'A117', displayText: 'A 座 L1 A117' },
30
+ merchantId: 'demo-shop-1001',
31
+ name: '永辉超市',
32
+ logoUrl: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*5Y45SqtTrvcAAAAAQCAAAAgAegitAQ/original',
33
+ businessCategories: ['超市'],
34
+ location: { buildingName: 'A 栋', floorName: 'B1', unitName: 'B1-01', displayText: 'A 栋 B1 B1-01' },
46
35
  status: { code: 'enabled', label: '营业中', observedAt: OBSERVED_AT },
47
- contactInfo: [{ channel: 'phone', value: '400-000-1122' }],
48
- services: ['堂食', '外带'],
36
+ services: [],
49
37
  promotionFacts: [],
50
- itemActions: [{ kind: 'send', label: '查看详情', value: '介绍一下日光咖啡实验室' }],
38
+ itemActions: [],
51
39
  },
52
40
  {
53
- merchantId: 'shop-fashion',
54
- name: '织野城市生活馆',
55
- logoUrl: ASSET.lifestyleLogo,
56
- brand: '织野',
57
- businessCategories: ['服饰', '生活方式'],
58
- location: { buildingName: 'A 座', floorName: 'L2', unitName: 'A238', displayText: 'A 座 L2 A238' },
59
- status: { code: 'disabled', label: '休息中', observedAt: OBSERVED_AT },
60
- services: ['到店自提'],
41
+ merchantId: 'demo-shop-1002',
42
+ name: '星巴克',
43
+ logoUrl: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*pa08SZMqBNYAAAAAQEAAAAgAegitAQ/original',
44
+ businessCategories: ['餐饮'],
45
+ location: { buildingName: 'A 栋', floorName: '1 楼', unitName: '101', displayText: 'A 栋 1 楼 101' },
46
+ status: { code: 'enabled', label: '营业中', observedAt: OBSERVED_AT },
47
+ services: [],
48
+ promotionFacts: [],
49
+ itemActions: [],
50
+ },
51
+ {
52
+ merchantId: 'demo-shop-1003',
53
+ name: '周大福',
54
+ logoUrl: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*WKXJTqR3BwQAAAAAQCAAAAgAegitAQ/original',
55
+ businessCategories: ['珠宝'],
56
+ location: { buildingName: 'A 栋', floorName: '1 楼', unitName: '102', displayText: 'A 栋 1 楼 102' },
57
+ status: { code: 'enabled', label: '营业中', observedAt: OBSERVED_AT },
58
+ services: [],
59
+ promotionFacts: [],
60
+ itemActions: [],
61
+ },
62
+ {
63
+ merchantId: 'demo-shop-1004',
64
+ name: '屈臣氏',
65
+ logoUrl: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*c7cRQIe83NYAAAAAQFAAAAgAegitAQ/original',
66
+ businessCategories: ['美妆'],
67
+ location: { buildingName: 'A 栋', floorName: '1 楼', unitName: '103', displayText: 'A 栋 1 楼 103' },
68
+ status: { code: 'enabled', label: '营业中', observedAt: OBSERVED_AT },
69
+ services: [],
70
+ promotionFacts: [],
71
+ itemActions: [],
72
+ },
73
+ {
74
+ merchantId: 'demo-shop-1005',
75
+ name: '华为',
76
+ logoUrl: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*BrpxQ6dwGj0AAAAAQCAAAAgAegitAQ/original',
77
+ businessCategories: ['数码'],
78
+ location: { buildingName: 'A 栋', floorName: '2 楼', unitName: '201', displayText: 'A 栋 2 楼 201' },
79
+ status: { code: 'enabled', label: '营业中', observedAt: OBSERVED_AT },
80
+ services: [],
81
+ promotionFacts: [],
82
+ itemActions: [],
83
+ },
84
+ {
85
+ merchantId: 'demo-shop-1006',
86
+ name: '小米',
87
+ logoUrl: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*6FBqSYVXFDEAAAAAMrAAAAgAegitAQ/original',
88
+ businessCategories: ['数码'],
89
+ location: { buildingName: 'A 栋', floorName: '2 楼', unitName: '202', displayText: 'A 栋 2 楼 202' },
90
+ status: { code: 'enabled', label: '营业中', observedAt: OBSERVED_AT },
91
+ services: [],
92
+ promotionFacts: [],
93
+ itemActions: [],
94
+ },
95
+ {
96
+ merchantId: 'demo-shop-1007',
97
+ name: 'NIKE 专卖店',
98
+ brand: 'NIKE',
99
+ logoUrl: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*dFmuSKEMDwIAAAAAQCAAAAgAegitAQ/original',
100
+ businessCategories: ['运动服饰'],
101
+ location: { buildingName: 'A 栋', floorName: '3 楼', unitName: '301', displayText: 'A 栋 3 楼 301' },
102
+ status: { code: 'enabled', label: '营业中', observedAt: OBSERVED_AT },
103
+ services: [],
61
104
  promotionFacts: [],
62
- itemActions: [{ kind: 'send', label: '品牌介绍', value: '介绍一下织野城市生活馆' }],
105
+ itemActions: [],
63
106
  },
64
107
  {
65
- merchantId: 'shop-sport',
66
- name: '跃动运动集合空间旗舰体验店',
67
- businessCategories: ['运动'],
68
- location: { displayText: '位置待确认' },
69
- status: { code: 'unknown', label: '状态待确认', observedAt: OBSERVED_AT },
108
+ merchantId: 'demo-shop-1008',
109
+ name: 'NIKE 跑步体验店',
110
+ brand: 'NIKE',
111
+ logoUrl: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*dFmuSKEMDwIAAAAAQCAAAAgAegitAQ/original',
112
+ businessCategories: ['运动服饰'],
113
+ location: { buildingName: 'A 栋', floorName: '3 楼', unitName: '302', displayText: 'A 栋 3 楼 302' },
114
+ status: { code: 'enabled', label: '营业中', observedAt: OBSERVED_AT },
70
115
  services: [],
71
116
  promotionFacts: [],
72
117
  itemActions: [],
73
118
  },
74
119
  {
75
- merchantId: 'shop-family',
76
- name: '小小星球亲子成长空间',
77
- logoUrl: ASSET.lifestyleLogo,
78
- businessCategories: ['亲子', '娱乐'],
79
- location: { buildingName: 'B 座', floorName: 'L4', unitName: 'B408', displayText: 'B 座 L4 B408' },
120
+ merchantId: 'demo-shop-1009',
121
+ name: '安踏',
122
+ logoUrl: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*edsgTpDq0GUAAAAAQDAAAAgAegitAQ/original',
123
+ businessCategories: ['运动服饰'],
124
+ location: { buildingName: 'A 栋', floorName: '3 楼', unitName: '303', displayText: 'A 栋 3 楼 303' },
80
125
  status: { code: 'enabled', label: '营业中', observedAt: OBSERVED_AT },
81
- services: ['亲子友好'],
126
+ services: [],
82
127
  promotionFacts: [],
83
128
  itemActions: [],
84
129
  },
85
130
  {
86
- merchantId: 'shop-dining',
87
- name: '暖屿家庭餐厅',
88
- logoUrl: ASSET.diningLogo,
131
+ merchantId: 'demo-shop-1010',
132
+ name: '海底捞',
133
+ logoUrl: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*18hVSI5dg6EAAAAAQCAAAAgAegitAQ/original',
89
134
  businessCategories: ['餐饮'],
90
- location: { buildingName: 'B 座', floorName: 'L3', unitName: 'B305', displayText: 'B 座 L3 B305' },
91
- status: { code: 'unknown', label: '状态待确认', observedAt: OBSERVED_AT },
135
+ location: { buildingName: 'A 栋', floorName: '4 楼', unitName: '401', displayText: 'A 栋 4 楼 401' },
136
+ status: { code: 'enabled', label: '营业中', observedAt: OBSERVED_AT },
92
137
  services: [],
93
138
  promotionFacts: [],
94
139
  itemActions: [],
95
140
  },
96
141
  {
97
- merchantId: 'shop-bakery',
98
- name: '麦町烘焙工房',
99
- logoUrl: ASSET.coffeeLogo,
100
- businessCategories: ['咖啡', '餐饮'],
101
- location: { buildingName: 'A 座', floorName: 'L1', unitName: 'A106', displayText: 'A 座 L1 A106' },
142
+ merchantId: 'demo-shop-1011',
143
+ name: '外婆家',
144
+ businessCategories: ['餐饮'],
145
+ location: { buildingName: 'A 栋', floorName: '4 楼', unitName: '402', displayText: 'A 栋 4 楼 402' },
102
146
  status: { code: 'enabled', label: '营业中', observedAt: OBSERVED_AT },
103
- services: ['外带'],
147
+ services: [],
148
+ promotionFacts: [],
149
+ itemActions: [],
150
+ },
151
+ {
152
+ merchantId: 'demo-shop-1012',
153
+ name: '西贝莜面村',
154
+ logoUrl: 'https://mdn.alipayobjects.com/huamei_b00jk5/afts/img/A*9X-US6dZvcIAAAAARAAAAAgAegitAQ/fmt.webp',
155
+ businessCategories: ['餐饮'],
156
+ location: { buildingName: 'A 栋', floorName: '4 楼', unitName: '403', displayText: 'A 栋 4 楼 403' },
157
+ status: { code: 'disabled', label: '休息中', observedAt: OBSERVED_AT },
158
+ services: [],
104
159
  promotionFacts: [],
105
160
  itemActions: [],
106
161
  },
107
162
  ],
108
- pageInfo: { page: 1, pageSize: 10, total: 18, hasMore: true },
163
+ pageInfo: { page: 1, pageSize: 10, total: 12, hasMore: false },
109
164
  refinements: [
110
165
  { label: '只看营业中', queryText: '只看现在营业的门店' },
111
- { label: '查看 L1', queryText: '查看 L1 的门店' },
166
+ { label: '查看 3 楼', queryText: '查看 3 楼的门店' },
112
167
  ],
113
168
  } satisfies ShopListCardData;
114
169
 
115
170
  export const samples: CardSample<ShopListCardData>[] = [
116
171
  {
117
172
  label: '门店列表·完整浏览',
118
- note: '默认门店导览入口;四个类目 Tab、三种营业状态、电话与筛选建议(第三行无 logo 走兜底;契约强制 https 图位 → 预览页恒缺图兜底,有图形态需真机数据)',
173
+ note: '默认门店导览入口;六个类目 Tab、12 家门店覆盖超市/餐饮/珠宝/美妆/数码/运动服饰、含 NIKE 双店与西贝休息中(真实 CDN logo 展示)',
119
174
  group: '门店导览(默认入口)',
120
175
  data: BROWSE_DATA,
121
176
  },
122
177
  {
123
178
  label: '门店列表·搜索结果',
124
- note: '无 Tab 头的定向搜索态,长名称与无 Logo 使用稳定兜底',
179
+ note: '搜索 NIKE 的定向结果,无 Tab 头,双店同品牌',
125
180
  group: '门店导览(默认入口)',
126
181
  data: {
127
182
  ...BROWSE_DATA,
128
- summary: '找到 1 家运动品牌门店',
183
+ summary: '找到 2 家 NIKE 运动品牌门店',
129
184
  categoryTabs: undefined,
130
- items: [BROWSE_DATA.items[2]],
131
- pageInfo: { page: 1, pageSize: 10, total: 1, hasMore: false },
185
+ items: BROWSE_DATA.items.filter((item) => item.brand === 'NIKE'),
186
+ pageInfo: { page: 1, pageSize: 10, total: 2, hasMore: false },
132
187
  refinements: [],
133
188
  } satisfies ShopListCardData,
134
189
  },