@tbox.cn/app-module-shopping-guide 0.8.2 → 0.9.0

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.
@@ -1,6 +1,6 @@
1
1
  /* ============================================================
2
2
  * module-shopping-guide 客户端域样式(0.4.0 D1/D2;头注二轮评审修正)。
3
- * 视觉源:mall-vis 双演示(BrandGuideMessageCard 导购蓝系);域色矩阵对照 docs/mall/visual.md。
3
+ * 视觉源:mall-vis 双演示(BrandGuideMessageCard 导购蓝系);域色矩阵对照 docs/reference/templates.md(视觉体系与域色矩阵)。
4
4
  * 基线(D2):本仓库统一 750 设计稿 2x——源码 px 经 rootValue 100 转 rem,渲染折半(375 下 1px 源码 = 0.5px 物理)。
5
5
  * POC sg 源文件本身即按 750 稿惯例作稿(正文 24/26px),故值 1:1 迁移、管线等价、渲染还原。
6
6
  * (评审修正:POC client 亦为 rootValue 100 管线,"POC = 物理 px 生态、一律 ×2" 的前提不成立,换算按源文件作稿惯例分域裁定。)
@@ -18,9 +18,9 @@
18
18
  .sg-card,
19
19
  .sg-store-list-sheet,
20
20
  .sg-shop-sheet {
21
- --sg-accent: #096bfa;
22
- --sg-surface: #f7faff;
23
- --sg-accent-border: #cfe0f7;
21
+ --sg-accent: var(--tbox-domain-sg-accent, #096bfa);
22
+ --sg-surface: var(--tbox-domain-sg-surface, #f7faff);
23
+ --sg-accent-border: var(--tbox-domain-sg-border, #cfe0f7);
24
24
  --sg-navy-gradient: linear-gradient(135deg, #0e2f80 0%, #1e5ed7 100%);
25
25
  --sg-cta-gradient: linear-gradient(108deg, #2493ff 0%, #0b63ff 100%);
26
26
  --sg-open-bg: #e9f8ef;
@@ -1773,13 +1773,18 @@
1773
1773
  border-radius: 0;
1774
1774
  background: #f9f0df;
1775
1775
  }
1776
- .sg-rm-header-art {
1776
+ /* 门店导览头图(主题品牌资产轨 A1 级联修复):img 层转伪元素背景;
1777
+ 元素只消费不声明(声明截断主题覆写继承),兜底 = 中立渐变(零品牌资产——B2),
1778
+ 主题包经 html[data-theme] 段覆写 --tbox-asset-sg-header */
1779
+ .sg-rm-header::after {
1780
+ content: '';
1777
1781
  position: absolute;
1778
1782
  inset: 0 0 0 auto;
1779
1783
  width: 62%;
1780
1784
  height: 100%;
1781
- object-fit: cover;
1782
- object-position: right center;
1785
+ background-image: var(--tbox-asset-sg-header, linear-gradient(135deg, #f9f0df, #f3e5cd));
1786
+ background-size: cover;
1787
+ background-position: right center;
1783
1788
  opacity: 0.9;
1784
1789
  pointer-events: none;
1785
1790
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tbox.cn/app-module-shopping-guide",
3
- "version": "0.8.2",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "description": "商圈导购模块:商品/商户搜索、推荐、对比、商场目录、人工导购、位置导航。",
6
6
  "exports": {
@@ -19,9 +19,9 @@
19
19
  "./package.json": "./package.json"
20
20
  },
21
21
  "dependencies": {
22
- "@tbox.cn/app-sdk": "0.17.0",
23
- "@tbox.cn/app-contracts": "0.9.0",
24
- "@tbox.cn/app-contracts-mall": "0.9.0"
22
+ "@tbox.cn/app-sdk": "0.20.0",
23
+ "@tbox.cn/app-contracts": "0.11.0",
24
+ "@tbox.cn/app-contracts-mall": "0.11.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "zod": "3.25.76",
@@ -5,12 +5,11 @@
5
5
  * (「按品类发现值得逛的门店」/「按品类快速找到想逛的门店」)。抄第三份之前先收成组件。
6
6
  */
7
7
  import { Storefront } from '@phosphor-icons/react';
8
- import shopGuideHeaderArtUrl from '../assets/shop-guide-header-art-pea-v2.jpg';
9
8
 
10
9
  export function ShopGuideHeader(props: { readonly subtitle: string }) {
11
10
  return (
12
11
  <header className="sg-rm-header">
13
- <img src={shopGuideHeaderArtUrl} alt="" className="sg-rm-header-art" aria-hidden="true" />
12
+ {/* 头图经 CSS background(.sg-rm-header::after + --tbox-asset-sg-header 变量链,主题轨 T-2.3) */}
14
13
  <div className="sg-rm-header-copy">
15
14
  <div className="sg-rm-header-title-row">
16
15
  <Storefront size={22} weight="fill" />
@@ -1,6 +1,6 @@
1
1
  /* ============================================================
2
2
  * module-shopping-guide 客户端域样式(0.4.0 D1/D2;头注二轮评审修正)。
3
- * 视觉源:mall-vis 双演示(BrandGuideMessageCard 导购蓝系);域色矩阵对照 docs/mall/visual.md。
3
+ * 视觉源:mall-vis 双演示(BrandGuideMessageCard 导购蓝系);域色矩阵对照 docs/reference/templates.md(视觉体系与域色矩阵)。
4
4
  * 基线(D2):本仓库统一 750 设计稿 2x——源码 px 经 rootValue 100 转 rem,渲染折半(375 下 1px 源码 = 0.5px 物理)。
5
5
  * POC sg 源文件本身即按 750 稿惯例作稿(正文 24/26px),故值 1:1 迁移、管线等价、渲染还原。
6
6
  * (评审修正:POC client 亦为 rootValue 100 管线,"POC = 物理 px 生态、一律 ×2" 的前提不成立,换算按源文件作稿惯例分域裁定。)
@@ -18,9 +18,9 @@
18
18
  .sg-card,
19
19
  .sg-store-list-sheet,
20
20
  .sg-shop-sheet {
21
- --sg-accent: #096bfa;
22
- --sg-surface: #f7faff;
23
- --sg-accent-border: #cfe0f7;
21
+ --sg-accent: var(--tbox-domain-sg-accent, #096bfa);
22
+ --sg-surface: var(--tbox-domain-sg-surface, #f7faff);
23
+ --sg-accent-border: var(--tbox-domain-sg-border, #cfe0f7);
24
24
  --sg-navy-gradient: linear-gradient(135deg, #0e2f80 0%, #1e5ed7 100%);
25
25
  --sg-cta-gradient: linear-gradient(108deg, #2493ff 0%, #0b63ff 100%);
26
26
  --sg-open-bg: #e9f8ef;
@@ -1773,13 +1773,18 @@
1773
1773
  border-radius: 0;
1774
1774
  background: #f9f0df;
1775
1775
  }
1776
- .sg-rm-header-art {
1776
+ /* 门店导览头图(主题品牌资产轨 A1 级联修复):img 层转伪元素背景;
1777
+ 元素只消费不声明(声明截断主题覆写继承),兜底 = 中立渐变(零品牌资产——B2),
1778
+ 主题包经 html[data-theme] 段覆写 --tbox-asset-sg-header */
1779
+ .sg-rm-header::after {
1780
+ content: '';
1777
1781
  position: absolute;
1778
1782
  inset: 0 0 0 auto;
1779
1783
  width: 62%;
1780
1784
  height: 100%;
1781
- object-fit: cover;
1782
- object-position: right center;
1785
+ background-image: var(--tbox-asset-sg-header, linear-gradient(135deg, #f9f0df, #f3e5cd));
1786
+ background-size: cover;
1787
+ background-position: right center;
1783
1788
  opacity: 0.9;
1784
1789
  pointer-events: none;
1785
1790
  }
@@ -11,7 +11,7 @@ import { parseMallScope } from '@tbox.cn/app-contracts-mall';
11
11
  import { resolveShoppingGuidePorts } from './ports';
12
12
  import { buildShopListCard, toContext } from './tools';
13
13
 
14
- /** 品牌导览按钮整句(templates/template-agent-mall config/chat.json QuickCommands query——exact 全等唯一入口) */
14
+ /** 品牌导览按钮整句(templates/template-agent/profiles/mall/config/chat.json QuickCommands query——exact 全等唯一入口;W4 前在 template-agent-mall) */
15
15
  const BRAND_GUIDE_QUERY = '品牌导览';
16
16
 
17
17
  /** 常驻入口全量页大小:LLM 面 search-shops 工具 pageSize 钳 50(提示词防爆护栏),此通道直调 port 特批 200 */
package/tbox.module.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "module-shopping-guide",
4
+ "title": "智能导购",
5
+ "description": "商户检索、楼层类目浏览、券导与真人导览预约",
4
6
  "version": "0.3.0",
5
7
  "kind": "business",
6
8
  "risk": {
@@ -13,7 +13,7 @@ import { resolveShoppingGuidePorts } from '../src/server/ports';
13
13
 
14
14
  function requestContext(mallId = 'mall-demo'): RequestContext {
15
15
  return {
16
- identity: { userId: 'u_1001', source: 'dev' },
16
+ identity: { userId: 'u_1001', source: 'local' },
17
17
  credentials: { provider: 'dev', token: 'user-token' },
18
18
  attributes: { mall: { miniAppId: 'app', mallId } },
19
19
  };
@@ -1,10 +0,0 @@
1
- /** 静态图片资产类型声明(Vite asset import) */
2
- declare module '*.png' {
3
- const url: string;
4
- export default url;
5
- }
6
-
7
- declare module '*.jpg' {
8
- const url: string;
9
- export default url;
10
- }