@tbox.cn/app-module-mall-core 1.0.0-alpha.1 → 1.0.0-alpha.6

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.
@@ -240,7 +240,7 @@ import { createLogger as createLogger2 } from "@tbox.cn/app-agent-sdk-server";
240
240
  var portsLogger = createLogger2("server");
241
241
  function warnUnassembled(specifier, e) {
242
242
  portsLogger.warn(
243
- "module ports \u672A\u88C5\u914D\uFF08npx --yes @tbox.cn/app-cli module add \u540E\u751F\u6548\uFF09",
243
+ "module ports \u672A\u88C5\u914D\uFF08pnpm exec tbox-app module add \u540E\u751F\u6548\uFF09",
244
244
  specifier,
245
245
  String(e?.message ?? e).slice(0, 120)
246
246
  );
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clientModule,
3
3
  client_default
4
- } from "../chunk-QPBYZO27.js";
4
+ } from "../chunk-DVEZRTKC.js";
5
5
  export {
6
6
  clientModule,
7
7
  client_default as default
package/dist/index.js CHANGED
@@ -9,10 +9,10 @@ import {
9
9
  resolveMallInfo,
10
10
  resolveMallScopeAssembly,
11
11
  serverModule
12
- } from "./chunk-FIHBQMON.js";
12
+ } from "./chunk-ZVXAPBVE.js";
13
13
  import {
14
14
  clientModule
15
- } from "./chunk-QPBYZO27.js";
15
+ } from "./chunk-DVEZRTKC.js";
16
16
  export {
17
17
  bindMallInfoContext,
18
18
  buildDefaultMallContext,
@@ -204,17 +204,17 @@ declare const serverModule: {
204
204
  parkedMinutes: zod.ZodOptional<zod.ZodNumber>;
205
205
  }, "strip", zod.ZodTypeAny, {
206
206
  status: "ready";
207
- primaryPlate: string;
208
207
  plateCount: number;
209
- parkedPlates?: string[] | undefined;
208
+ primaryPlate: string;
210
209
  freeMinutesRemaining?: number | undefined;
210
+ parkedPlates?: string[] | undefined;
211
211
  parkedMinutes?: number | undefined;
212
212
  }, {
213
213
  status: "ready";
214
- primaryPlate: string;
215
214
  plateCount: number;
216
- parkedPlates?: string[] | undefined;
215
+ primaryPlate: string;
217
216
  freeMinutesRemaining?: number | undefined;
217
+ parkedPlates?: string[] | undefined;
218
218
  parkedMinutes?: number | undefined;
219
219
  }>, zod.ZodObject<{
220
220
  status: zod.ZodLiteral<"unavailable">;
@@ -245,34 +245,34 @@ declare const serverModule: {
245
245
  progressUnit: zod.ZodOptional<zod.ZodString>;
246
246
  }, "strip", zod.ZodTypeAny, {
247
247
  title: string;
248
- progressStyle?: "bar" | "steps" | undefined;
249
248
  totalProgress?: string | undefined;
250
249
  currentProgress?: string | undefined;
251
250
  progressUnit?: string | undefined;
251
+ progressStyle?: "steps" | "bar" | undefined;
252
252
  }, {
253
253
  title: string;
254
- progressStyle?: "bar" | "steps" | undefined;
255
254
  totalProgress?: string | undefined;
256
255
  currentProgress?: string | undefined;
257
256
  progressUnit?: string | undefined;
257
+ progressStyle?: "steps" | "bar" | undefined;
258
258
  }>;
259
259
  }, "strip", zod.ZodTypeAny, {
260
260
  status: "ready";
261
261
  banner: {
262
262
  title: string;
263
- progressStyle?: "bar" | "steps" | undefined;
264
263
  totalProgress?: string | undefined;
265
264
  currentProgress?: string | undefined;
266
265
  progressUnit?: string | undefined;
266
+ progressStyle?: "steps" | "bar" | undefined;
267
267
  };
268
268
  }, {
269
269
  status: "ready";
270
270
  banner: {
271
271
  title: string;
272
- progressStyle?: "bar" | "steps" | undefined;
273
272
  totalProgress?: string | undefined;
274
273
  currentProgress?: string | undefined;
275
274
  progressUnit?: string | undefined;
275
+ progressStyle?: "steps" | "bar" | undefined;
276
276
  };
277
277
  }>, zod.ZodObject<{
278
278
  status: zod.ZodLiteral<"unauthenticated">;
@@ -329,10 +329,10 @@ declare const serverModule: {
329
329
  status: "empty";
330
330
  } | {
331
331
  status: "ready";
332
- primaryPlate: string;
333
332
  plateCount: number;
334
- parkedPlates?: string[] | undefined;
333
+ primaryPlate: string;
335
334
  freeMinutesRemaining?: number | undefined;
335
+ parkedPlates?: string[] | undefined;
336
336
  parkedMinutes?: number | undefined;
337
337
  } | {
338
338
  status: "unavailable";
@@ -345,10 +345,10 @@ declare const serverModule: {
345
345
  status: "ready";
346
346
  banner: {
347
347
  title: string;
348
- progressStyle?: "bar" | "steps" | undefined;
349
348
  totalProgress?: string | undefined;
350
349
  currentProgress?: string | undefined;
351
350
  progressUnit?: string | undefined;
351
+ progressStyle?: "steps" | "bar" | undefined;
352
352
  };
353
353
  } | {
354
354
  status: "unauthenticated";
@@ -359,9 +359,9 @@ declare const serverModule: {
359
359
  } | {
360
360
  status: "error";
361
361
  };
362
+ enrollUrl?: string | null | undefined;
362
363
  mallName?: string | undefined;
363
364
  showDevServices?: boolean | undefined;
364
- enrollUrl?: string | null | undefined;
365
365
  }, {
366
366
  member: {
367
367
  status: "loading";
@@ -392,10 +392,10 @@ declare const serverModule: {
392
392
  status: "empty";
393
393
  } | {
394
394
  status: "ready";
395
- primaryPlate: string;
396
395
  plateCount: number;
397
- parkedPlates?: string[] | undefined;
396
+ primaryPlate: string;
398
397
  freeMinutesRemaining?: number | undefined;
398
+ parkedPlates?: string[] | undefined;
399
399
  parkedMinutes?: number | undefined;
400
400
  } | {
401
401
  status: "unavailable";
@@ -408,10 +408,10 @@ declare const serverModule: {
408
408
  status: "ready";
409
409
  banner: {
410
410
  title: string;
411
- progressStyle?: "bar" | "steps" | undefined;
412
411
  totalProgress?: string | undefined;
413
412
  currentProgress?: string | undefined;
414
413
  progressUnit?: string | undefined;
414
+ progressStyle?: "steps" | "bar" | undefined;
415
415
  };
416
416
  } | {
417
417
  status: "unauthenticated";
@@ -422,9 +422,9 @@ declare const serverModule: {
422
422
  } | {
423
423
  status: "error";
424
424
  };
425
+ enrollUrl?: string | null | undefined;
425
426
  mallName?: string | undefined;
426
427
  showDevServices?: boolean | undefined;
427
- enrollUrl?: string | null | undefined;
428
428
  }>>;
429
429
  };
430
430
  preTools: {
@@ -10,7 +10,7 @@ import {
10
10
  resolveMallScopeAssembly,
11
11
  serverModule,
12
12
  server_default
13
- } from "../chunk-FIHBQMON.js";
13
+ } from "../chunk-ZVXAPBVE.js";
14
14
  export {
15
15
  bindMallInfoContext,
16
16
  buildDefaultMallContext,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tbox.cn/app-module-mall-core",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.6",
4
4
  "type": "module",
5
5
  "description": "商圈基础模块:scope 域装配注册 + mall-info 工具链 + mall-directory 服务 + 首页主屏(home 槽 / 联单面板 / 会员停车快览)+ 首页预览卡。",
6
6
  "exports": {
@@ -19,10 +19,10 @@
19
19
  "./package.json": "./package.json"
20
20
  },
21
21
  "dependencies": {
22
- "@tbox.cn/app-contracts": "1.0.0-alpha.1",
23
- "@tbox.cn/app-contracts-mall": "1.0.0-alpha.1",
24
- "@tbox.cn/app-agent-sdk-client": "1.0.0-alpha.1",
25
- "@tbox.cn/app-agent-sdk-server": "1.0.0-alpha.1"
22
+ "@tbox.cn/app-agent-sdk-client": "1.0.0-alpha.6",
23
+ "@tbox.cn/app-contracts-mall": "1.0.0-alpha.6",
24
+ "@tbox.cn/app-contracts": "1.0.0-alpha.6",
25
+ "@tbox.cn/app-agent-sdk-server": "1.0.0-alpha.6"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": "18.3.1",
@@ -30,7 +30,7 @@
30
30
  "@phosphor-icons/react": "2.1.10",
31
31
  "express": "4.22.2",
32
32
  "zod": "3.25.76",
33
- "@tbox.cn/app-agent-ui-kit": "1.0.0-alpha.1"
33
+ "@tbox.cn/app-agent-ui-kit": "1.0.0-alpha.6"
34
34
  },
35
35
  "peerDependenciesMeta": {
36
36
  "@tbox.cn/app-agent-ui-kit": {
@@ -12,8 +12,6 @@ import { createPortal } from 'react-dom';
12
12
  import { X } from '@phosphor-icons/react';
13
13
  import type { TboxCardPayload } from '@tbox.cn/app-contracts';
14
14
  import { ActivityDetailPresentation } from './components/ActivityDetailPresentation';
15
- import './HomeActivityDetailDialog.less';
16
-
17
15
  const FOCUSABLE_SELECTOR = [
18
16
  'button:not([disabled])',
19
17
  '[href]',
@@ -221,32 +219,32 @@ export function HomeActivityDetailDialog({
221
219
 
222
220
  return createPortal(
223
221
  <div
224
- className="home-activity-detail"
222
+ className="home-activity-detail group/detail fixed inset-0 z-[1200]"
225
223
  data-motion={motion}
226
224
  data-phase={phase}
227
225
  data-return-origin={returnToOrigin ? 'true' : 'false'}
228
226
  >
229
- <button type="button" className="home-activity-detail__mask" aria-label="关闭活动详情" onClick={requestClose} />
227
+ <button type="button" className="home-activity-detail__mask absolute inset-0 size-full border-0 bg-transparent p-0 transition-colors duration-200 group-data-[phase=open]/detail:bg-scrim" aria-label="关闭活动详情" onClick={requestClose} />
230
228
  <section
231
229
  ref={panelRef}
232
230
  id={getHomeActivityDialogId(card.id)}
233
- className="home-activity-detail__surface"
231
+ className="home-activity-detail__surface fixed z-10 min-h-0 min-w-0 overflow-hidden rounded-xl bg-card shadow-[0_20px_60px_rgba(22,42,30,0.22)] contain-[layout_paint] transition-all duration-300 will-change-[top,left,width,height,border-radius,transform] group-data-[phase=open]/detail:rounded-2xl group-data-[motion=fade]/detail:group-data-[phase=opening]/detail:scale-[0.985] group-data-[motion=fade]/detail:group-data-[phase=opening]/detail:opacity-0 group-data-[motion=fade]/detail:group-data-[phase=open]/detail:scale-100 group-data-[motion=fade]/detail:group-data-[phase=open]/detail:opacity-100 group-data-[phase=closing]/detail:group-data-[return-origin=false]/detail:scale-[0.98] group-data-[phase=closing]/detail:group-data-[return-origin=false]/detail:opacity-0 max-[600px]:h-dvh! max-[600px]:w-screen! max-[600px]:rounded-none! motion-reduce:transition-none"
234
232
  style={surfaceStyle}
235
233
  role="dialog"
236
234
  aria-modal="true"
237
235
  aria-labelledby={titleId}
238
236
  tabIndex={-1}
239
237
  >
240
- <h2 id={titleId} className="home-activity-detail__sr-title">{title}</h2>
238
+ <h2 id={titleId} className="home-activity-detail__sr-title sr-only">{title}</h2>
241
239
  {transitionVisual && (
242
- <div className="home-activity-detail__transition-visual" aria-hidden="true">{transitionVisual}</div>
240
+ <div className="home-activity-detail__transition-visual absolute inset-0 z-20 overflow-hidden bg-warn-surface transition-opacity duration-150 group-data-[phase=open]/detail:pointer-events-none group-data-[phase=open]/detail:opacity-0 group-data-[phase=open]/detail:delay-150 [&_.mall-home__linked-order]:m-0 [&_.mall-home__linked-order]:aspect-[353/240] [&_.mall-home__linked-order]:h-auto [&_.mall-home__linked-order]:w-full [&_.mall-home__linked-order]:rounded-none [&_.mall-home__linked-order]:shadow-none" aria-hidden="true">{transitionVisual}</div>
243
241
  )}
244
- <div className="home-activity-detail__content">
242
+ <div className="home-activity-detail__content absolute inset-0 z-10 min-h-0 translate-y-3 overflow-y-auto overscroll-contain bg-card pb-[env(safe-area-inset-bottom)] opacity-0 transition-[opacity,transform] duration-150 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden group-data-[phase=open]/detail:translate-y-0 group-data-[phase=open]/detail:opacity-100 group-data-[phase=open]/detail:delay-150 group-data-[motion=fade]/detail:group-data-[phase=open]/detail:delay-0 motion-reduce:transition-none">
245
243
  <ActivityDetailPresentation variant="page">
246
244
  {children}
247
245
  </ActivityDetailPresentation>
248
246
  </div>
249
- <button ref={closeRef} type="button" className="home-activity-detail__close" aria-label="关闭活动详情,返回首页" onClick={requestClose}>
247
+ <button ref={closeRef} type="button" className="home-activity-detail__close absolute right-3.5 top-[max(14px,env(safe-area-inset-top))] z-30 grid size-10.5 place-items-center rounded-full border border-border bg-card p-0 text-foreground opacity-0 shadow-lg transition-opacity duration-150 group-data-[phase=open]/detail:opacity-100 group-data-[phase=open]/detail:delay-150 focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-focus-ring motion-reduce:transition-none" aria-label="关闭活动详情,返回首页" onClick={requestClose}>
250
248
  <X size={21} weight="bold" aria-hidden="true" />
251
249
  </button>
252
250
  </section>
@@ -35,7 +35,6 @@ import {
35
35
  HomeActivityDetailDialog,
36
36
  type SurfaceRect,
37
37
  } from './HomeActivityDetailDialog';
38
- import './MallHome.less';
39
38
  interface MallHomeProps {
40
39
  readonly mallName?: string;
41
40
  readonly linkedOrder: LinkedOrderLoadState;
@@ -95,9 +94,12 @@ function HomeServiceCard({
95
94
  const valueId = `mall-home-${tone}-value`;
96
95
  const metaId = `mall-home-${tone}-meta`;
97
96
  return (
98
- <section className={`mall-home__service-card mall-home__service-card--${tone}`} aria-label={label}>
97
+ <section
98
+ className={`mall-home__service-card mall-home__service-card--${tone} relative min-w-0 overflow-hidden rounded-[16px] border-[0.5px] border-border bg-card shadow-[0_2px_16px_rgba(106,119,137,0.08)]`}
99
+ aria-label={label}
100
+ >
99
101
  <button
100
- className="mall-home__service-card-main"
102
+ className="mall-home__service-card-main relative flex h-full min-h-[95px] w-full cursor-pointer flex-col gap-1.5 border-0 bg-transparent p-3 text-left text-inherit [font-family:inherit] disabled:cursor-default disabled:opacity-[0.72] max-[360px]:px-2.5"
101
103
  type="button"
102
104
  disabled={disabled}
103
105
  onClick={onClick}
@@ -105,26 +107,37 @@ function HomeServiceCard({
105
107
  aria-labelledby={`${labelId} ${valueId}`}
106
108
  aria-describedby={metaId}
107
109
  >
108
- <img className="mall-home__service-card-icon" src={iconSrc} alt="" aria-hidden="true" />
109
- <span id={labelId} className="mall-home__service-card-eyebrow">{label}</span>
110
- <span id={valueId} className="mall-home__service-card-value" aria-live="polite">
110
+ <img
111
+ className="mall-home__service-card-icon absolute top-3 right-3 z-[1] block h-8 w-[33.18px] object-contain max-[360px]:right-2.5"
112
+ src={iconSrc}
113
+ alt=""
114
+ aria-hidden="true"
115
+ />
116
+ <span id={labelId} className="mall-home__service-card-eyebrow truncate pr-9 text-sm leading-5 text-foreground">{label}</span>
117
+ <span id={valueId} className="mall-home__service-card-value flex min-h-[22px] min-w-0 items-center" aria-live="polite">
111
118
  {loading
112
119
  ? (
113
120
  <>
114
121
  <span
115
- className="mall-home__service-card-skeleton mall-home__service-card-skeleton--value"
122
+ className="mall-home__service-card-skeleton mall-home__service-card-skeleton--value block h-[18px] w-[72%] shrink-0 rounded-[5px] bg-[linear-gradient(90deg,rgba(20,50,91,0.08),rgba(20,50,91,0.15),rgba(20,50,91,0.08))]"
116
123
  aria-hidden="true"
117
124
  />
118
- <span className="mall-home__service-card-loading-label">{loadingLabel}</span>
125
+ <span className="sr-only">{loadingLabel}</span>
119
126
  </>
120
127
  )
121
- : <strong className={primaryMonospace ? 'mall-home__plate' : undefined}>{primary}</strong>}
128
+ : (
129
+ <strong
130
+ className={`line-clamp-2 text-base font-semibold leading-[22px] text-foreground ${primaryMonospace ? ' mall-home__plate font-mono tracking-[0.02em] tabular-nums' : ''}`}
131
+ >
132
+ {primary}
133
+ </strong>
134
+ )}
122
135
  </span>
123
- <span id={metaId} className="mall-home__service-card-meta">
136
+ <span id={metaId} className="mall-home__service-card-meta line-clamp-2 min-h-[17px] text-left text-xs leading-[17px] text-secondary-foreground">
124
137
  {loading
125
138
  ? (
126
139
  <span
127
- className="mall-home__service-card-skeleton mall-home__service-card-skeleton--meta"
140
+ className="mall-home__service-card-skeleton mall-home__service-card-skeleton--meta block h-[13px] w-[88%] shrink-0 rounded-[5px] bg-[linear-gradient(90deg,rgba(20,50,91,0.08),rgba(20,50,91,0.15),rgba(20,50,91,0.08))]"
128
141
  aria-hidden="true"
129
142
  />
130
143
  )
@@ -234,6 +247,20 @@ interface BusinessArea {
234
247
  readonly actions: readonly HomeAction[];
235
248
  }
236
249
 
250
+ /**
251
+ * 区块色调:Tailwind 类名必须完整字面量才能被扫描,故按 tone 登记,不在运行时拼接。
252
+ * 图标底色/前景 + 动作卡键盘焦点描边;guide 是缺省主蓝(等价旧 `--area-color` 默认值)。
253
+ */
254
+ const AREA_TONE_CLASS: Record<BusinessArea['tone'], { readonly icon: string; readonly focus: string }> = Object.freeze({
255
+ guide: Object.freeze({ icon: 'bg-[#edf6ff] text-[#1679df]', focus: 'focus-visible:outline-[#1679df]' }),
256
+ member: Object.freeze({ icon: 'bg-[#fff7e7] text-[#bd7200]', focus: 'focus-visible:outline-[#bd7200]' }),
257
+ marketing: Object.freeze({ icon: 'bg-[#fff1ef] text-[#db4e45]', focus: 'focus-visible:outline-[#db4e45]' }),
258
+ parking: Object.freeze({ icon: 'bg-[#edf3fb] text-[#173e78]', focus: 'focus-visible:outline-[#173e78]' }),
259
+ });
260
+
261
+ /** 联单进度条内的提示行(含重试/授权按钮)共用一份样式,只换文案 */
262
+ const PROGRESS_MESSAGE_CLASS = 'mall-home__progress-message flex h-full w-full items-center justify-center gap-2 rounded-[16px] bg-[rgba(244,252,255,0.94)] px-2.5 text-center text-xs font-bold leading-[1.2] text-[#0a6eb8]';
263
+
237
264
  /**
238
265
  * 首页开发测试入口:保留旧首页已经验证过的自然语言 query,统一走现有对话分发链。
239
266
  * 这些入口不声明服务端能力已成功,只负责让同事快速触发对应能力做联调。
@@ -309,27 +336,39 @@ function LinkedOrderStatus({
309
336
  onReauthorizeLinkedOrder,
310
337
  }: Pick<MallHomeProps, 'linkedOrder' | 'onReloadLinkedOrder' | 'onReauthorizeLinkedOrder'>) {
311
338
  if (linkedOrder.status === 'loading') {
312
- return <div className="mall-home__progress-message" role="status">正在同步联单进度…</div>;
339
+ return <div className={PROGRESS_MESSAGE_CLASS} role="status">正在同步联单进度…</div>;
313
340
  }
314
341
 
315
342
  if (linkedOrder.status === 'unauthenticated') {
316
343
  return (
317
- <div className="mall-home__progress-message">
344
+ <div className={PROGRESS_MESSAGE_CLASS}>
318
345
  <span>登录支付宝后查看联单进度</span>
319
- <button type="button" onClick={() => onReauthorizeLinkedOrder?.()}>重新授权</button>
346
+ <button
347
+ className="shrink-0 cursor-pointer rounded-[10px] border-0 bg-[#137dc4] px-2 py-[3px] text-xs leading-[1.2] text-white [font-family:inherit]"
348
+ type="button"
349
+ onClick={() => onReauthorizeLinkedOrder?.()}
350
+ >
351
+ 重新授权
352
+ </button>
320
353
  </div>
321
354
  );
322
355
  }
323
356
 
324
357
  if (linkedOrder.status === 'forbidden') {
325
- return <div className="mall-home__progress-message">当前账号暂时无法查看联单进度</div>;
358
+ return <div className={PROGRESS_MESSAGE_CLASS}>当前账号暂时无法查看联单进度</div>;
326
359
  }
327
360
 
328
361
  if (linkedOrder.status === 'error') {
329
362
  return (
330
- <div className="mall-home__progress-message" role="alert">
363
+ <div className={PROGRESS_MESSAGE_CLASS} role="alert">
331
364
  <span>联单进度暂时无法同步</span>
332
- <button type="button" onClick={() => onReloadLinkedOrder?.()}>重新加载</button>
365
+ <button
366
+ className="shrink-0 cursor-pointer rounded-[10px] border-0 bg-[#137dc4] px-2 py-[3px] text-xs leading-[1.2] text-white [font-family:inherit]"
367
+ type="button"
368
+ onClick={() => onReloadLinkedOrder?.()}
369
+ >
370
+ 重新加载
371
+ </button>
333
372
  </div>
334
373
  );
335
374
  }
@@ -338,7 +377,7 @@ function LinkedOrderStatus({
338
377
  ? deriveLinkedOrderProgress(linkedOrder.banner)
339
378
  : null;
340
379
  if (!progress) {
341
- return <div className="mall-home__progress-message">当前暂无可查看的联单活动</div>;
380
+ return <div className={PROGRESS_MESSAGE_CLASS}>当前暂无可查看的联单活动</div>;
342
381
  }
343
382
 
344
383
  const nodes = progress.target <= 10
@@ -348,21 +387,31 @@ function LinkedOrderStatus({
348
387
 
349
388
  return (
350
389
  <div
351
- className="mall-home__progress-content"
390
+ className="mall-home__progress-content flex h-full w-full items-center justify-between"
352
391
  aria-label={`联单支付进度 ${progress.completed} / ${progress.target} ${progress.unit}`}
353
392
  >
354
- <strong className="mall-home__progress-label">联单进度</strong>
355
- <div className={`mall-home__nodes${nodes.length === 0 ? ' mall-home__nodes--summary' : ''}`} aria-hidden="true">
356
- <span className="mall-home__rail" />
357
- <span className="mall-home__rail-fill" style={{ width: railFill }} />
358
- {nodes.length === 0 && <span className="mall-home__nodes-summary">已完成 {progress.completed} {progress.unit}</span>}
393
+ <strong className="mall-home__progress-label shrink-0 text-xs font-extrabold leading-none whitespace-nowrap text-[#0a6eb8] [text-shadow:0_1px_0_rgba(255,255,255,0.72)]">联单进度</strong>
394
+ <div
395
+ className={`mall-home__nodes relative mx-2.5 flex min-w-0 flex-1 justify-between ${nodes.length === 0 ? ' mall-home__nodes--summary h-[22px] justify-center' : ''}`}
396
+ aria-hidden="true"
397
+ >
398
+ <span className="mall-home__rail absolute top-1/2 right-2 left-2 h-[3px] -translate-y-1/2 rounded-[2px] bg-[rgba(22,126,194,0.3)]" />
399
+ <span
400
+ className="mall-home__rail-fill absolute top-1/2 left-2 z-[1] h-[3px] max-w-[calc(100%_-_16px)] -translate-y-1/2 rounded-[2px] bg-[#087dd0] shadow-[0_0_6px_rgba(0,104,190,0.34)]"
401
+ style={{ width: railFill }}
402
+ />
403
+ {nodes.length === 0 && (
404
+ <span className="mall-home__nodes-summary relative z-[2] rounded-[9px] bg-[rgba(234,248,255,0.94)] px-[7px] py-0.5 text-xs font-bold leading-[1.2] text-[#0a6eb8]">
405
+ 已完成 {progress.completed} {progress.unit}
406
+ </span>
407
+ )}
359
408
  {nodes.map((node) => {
360
409
  const completed = node <= progress.completed;
361
410
  const milestone = node === progress.target;
362
411
  return (
363
412
  <span
364
413
  key={node}
365
- className={`mall-home__node${completed ? ' mall-home__node--completed' : ''}${milestone ? ' mall-home__node--milestone' : ''}`}
414
+ className={`mall-home__node relative z-[2] flex size-[22px] shrink-0 items-center justify-center rounded-full border-[1.5px] border-[#1682cb] bg-[#eaf8ff] text-xs font-extrabold leading-none text-[#0d6fae] shadow-[0_2px_5px_rgba(0,83,151,0.22)] ${completed ? ' mall-home__node--completed border-white bg-[#91dcf2] text-[#0068e8]' : milestone ? ' mall-home__node--milestone border-[#ffdc6a] bg-[#1475b6] text-white' : ''}`}
366
415
  >
367
416
  {completed
368
417
  ? <Check size={15} weight="bold" />
@@ -373,7 +422,7 @@ function LinkedOrderStatus({
373
422
  );
374
423
  })}
375
424
  </div>
376
- <strong className="mall-home__progress-value">{progress.completed}/{progress.target}</strong>
425
+ <strong className="mall-home__progress-value shrink-0 text-xs font-extrabold leading-none whitespace-nowrap text-[#0a6eb8] [text-shadow:0_1px_0_rgba(255,255,255,0.72)]">{progress.completed}/{progress.target}</strong>
377
426
  </div>
378
427
  );
379
428
  }
@@ -510,10 +559,10 @@ export function MallHome({
510
559
  {/* 素材变量链(主题轨 T-2.3):poster 转 CSS background(stage 默认 + 移动断点 compact 覆写);
511
560
  可点开活动详情时(canOpenActivity)为纯装饰,否则以 role=img 保留原 alt 语义 */}
512
561
  <span
513
- className="mall-home__linked-order-poster"
562
+ className="mall-home__linked-order-poster absolute top-0 left-1/2 block h-full w-full -translate-x-1/2 bg-cover bg-center bg-[image:var(--tbox-asset-home-poster-stage,linear-gradient(135deg,#eaf3ff,#d7e7fd))] max-[392px]:bg-[image:var(--tbox-asset-home-poster-compact,linear-gradient(135deg,#eaf3ff,#d7e7fd))]"
514
563
  {...(canOpenActivity ? { 'aria-hidden': true } : { role: 'img', 'aria-label': '参与联单,碰出惊喜' })}
515
564
  />
516
- <div className="mall-home__progress">
565
+ <div className="mall-home__progress absolute bottom-[18px] left-1/2 z-[2] h-8 w-[300px] -translate-x-1/2 max-[392px]:bottom-[7%] max-[392px]:h-[13.33%] max-[392px]:w-[85%]">
517
566
  <LinkedOrderStatus
518
567
  linkedOrder={linkedOrder}
519
568
  onReloadLinkedOrder={onReloadLinkedOrder}
@@ -538,7 +587,7 @@ export function MallHome({
538
587
  card: activityCard,
539
588
  renderDetail: renderActivityDetail,
540
589
  transitionVisual: (
541
- <section className="mall-home__linked-order" aria-hidden="true">
590
+ <section className="mall-home__linked-order relative mx-page h-60 overflow-hidden rounded-[14px] bg-[#fff8e9] leading-[0] shadow-[0_10px_24px_rgba(47,88,121,0.1)] max-[392px]:aspect-[353/240] max-[392px]:h-auto" aria-hidden="true">
542
591
  {linkedOrderVisual}
543
592
  </section>
544
593
  ),
@@ -547,25 +596,28 @@ export function MallHome({
547
596
  }, [activityCard, activityDetail, linkedOrderVisual, renderActivityDetail]);
548
597
 
549
598
  return (
550
- <main className="mall-home" aria-label="商场智能服务首页">
551
- <header className="mall-home__welcome">
599
+ <main className="mall-home @container/mall-home w-full pt-2 pb-8.5 text-foreground" aria-label="商场智能服务首页">
600
+ <header className="mall-home__welcome px-page pb-5.5 pt-1">
552
601
  <img
553
- className="mall-home__welcome-sparkle"
602
+ className="mall-home__welcome-sparkle block h-[25.5px] w-9 object-contain"
554
603
  src={welcomeSparkle}
555
604
  alt=""
556
605
  aria-hidden="true"
557
606
  />
558
- <h1>欢迎来到{displayMallName}</h1>
559
- <p>我可以帮你看联单进度、查停车、看会员与活动服务</p>
607
+ <h1 className="mt-1 text-xl font-bold leading-7 tracking-tight text-foreground">欢迎来到{displayMallName}</h1>
608
+ <p className="mt-1 text-xs leading-4.75 text-secondary-foreground">我可以帮你看联单进度、查停车、看会员与活动服务</p>
560
609
  </header>
561
610
 
562
- <section className="mall-home__linked-order" aria-label="碰一下联单活动">
611
+ <section
612
+ className="mall-home__linked-order relative mx-page h-60 overflow-hidden rounded-[14px] bg-[#fff8e9] leading-[0] shadow-[0_10px_24px_rgba(47,88,121,0.1)] max-[392px]:aspect-[353/240] max-[392px]:h-auto"
613
+ aria-label="碰一下联单活动"
614
+ >
563
615
  {linkedOrderVisual}
564
616
  {canOpenActivity && activityCard && (
565
617
  <button
566
618
  ref={activityTriggerRef}
567
619
  type="button"
568
- className="mall-home__linked-order-trigger"
620
+ className="mall-home__linked-order-trigger absolute inset-0 z-[3] h-full w-full cursor-pointer rounded-[inherit] border-0 bg-transparent p-0 outline-none focus-visible:shadow-[inset_0_0_0_3px_rgba(82,126,56,0.5)]"
569
621
  aria-label={`查看${linkedOrder.status === 'ready' ? linkedOrder.banner.title || '联单活动' : '联单活动'}详情`}
570
622
  aria-haspopup="dialog"
571
623
  aria-expanded={Boolean(activityDetail)}
@@ -587,7 +639,7 @@ export function MallHome({
587
639
  </HomeActivityDetailDialog>
588
640
  )}
589
641
 
590
- <div className="mall-home__service-pair">
642
+ <div className="mall-home__service-pair mx-page mt-4 grid grid-cols-2 items-stretch gap-3">
591
643
  <MemberServiceCard
592
644
  member={member}
593
645
  onMemberPointsQuery={onMemberPointsQuery}
@@ -608,37 +660,40 @@ export function MallHome({
608
660
 
609
661
  {/* 开发测试入口:后端开关(MALL_HOME_DEV_SERVICES → /api/m/mall-home/config)控制,fail-closed 缺省隐藏 */}
610
662
  {showDevServices && (
611
- <section className="mall-home__services" aria-labelledby="mall-home-services-title">
612
- <header className="mall-home__section-header">
663
+ <section className="mall-home__services mx-page mt-5.5" aria-labelledby="mall-home-services-title">
664
+ <header className="mall-home__section-header mb-3 flex items-end justify-between gap-2">
613
665
  <div>
614
- <h2 id="mall-home-services-title">常用服务</h2>
615
- <span className="mall-home__section-kicker">以下部分为开发测试入口,不对正式用户透出</span>
666
+ <h2 id="mall-home-services-title" className="text-lg font-bold leading-6 text-foreground">常用服务</h2>
667
+ <span className="mall-home__section-kicker mt-0.5 block text-xs leading-4 text-secondary-foreground">以下部分为开发测试入口,不对正式用户透出</span>
616
668
  </div>
617
669
  </header>
618
670
 
619
- <div className="mall-home__areas">
671
+ <div className="mall-home__areas grid grid-cols-1 gap-3 @min-[820px]/mall-home:grid-cols-2">
620
672
  {BUSINESS_AREAS.map((area) => {
621
673
  const AreaIcon = area.icon;
622
674
  return (
623
675
  <section
624
- className={`mall-home__area mall-home__area--${area.tone}`}
676
+ className={`mall-home__area mall-home__area--${area.tone} min-w-0 rounded-[16px] border-[0.5px] border-border bg-card p-3 shadow-[0_2px_16px_rgba(106,119,137,0.08)]`}
625
677
  aria-labelledby={`mall-home-${area.moduleId}`}
626
678
  key={area.moduleId}
627
679
  >
628
- <header className="mall-home__area-header">
629
- <span className="mall-home__area-copy">
630
- <h3 id={`mall-home-${area.moduleId}`}>{area.title}</h3>
631
- <p>{area.description}</p>
680
+ <header className="mall-home__area-header mb-3 flex items-center justify-between gap-2">
681
+ <span className="mall-home__area-copy min-w-0">
682
+ <h3 id={`mall-home-${area.moduleId}`} className="text-sm font-semibold leading-5 text-foreground">{area.title}</h3>
683
+ <p className="text-xs leading-[17px] text-secondary-foreground">{area.description}</p>
632
684
  </span>
633
- <span className="mall-home__area-icon" aria-hidden="true">
685
+ <span
686
+ className={`mall-home__area-icon flex size-8 shrink-0 items-center justify-center rounded-[10px] ${AREA_TONE_CLASS[area.tone].icon}`}
687
+ aria-hidden="true"
688
+ >
634
689
  <AreaIcon size={22} weight="regular" />
635
690
  </span>
636
691
  </header>
637
- <div className="mall-home__action-grid">
692
+ <div className="mall-home__action-grid grid grid-cols-[repeat(auto-fit,minmax(min(150px,100%),1fr))] gap-2">
638
693
  {area.actions.map((action) => {
639
694
  return (
640
695
  <button
641
- className="mall-home__action"
696
+ className={`mall-home__action grid min-h-[72px] w-full min-w-0 cursor-pointer grid-cols-[minmax(0,1fr)_12px] items-center gap-2 rounded-[14px] border-[0.5px] border-border bg-card p-2.5 text-left text-foreground shadow-[0_2px_12px_rgba(106,119,137,0.05)] [font-family:inherit] active:scale-[0.99] active:bg-[rgba(11,15,23,0.02)] focus-visible:outline-2 focus-visible:outline-offset-2 ${AREA_TONE_CLASS[area.tone].focus}`}
642
697
  type="button"
643
698
  key={action.label}
644
699
  onClick={() => {
@@ -647,11 +702,11 @@ export function MallHome({
647
702
  onSend(action.query);
648
703
  }}
649
704
  >
650
- <span className="mall-home__action-copy">
651
- <strong>{action.label}</strong>
652
- <small>{action.description}</small>
705
+ <span className="mall-home__action-copy min-w-0">
706
+ <strong className="block text-sm font-semibold leading-[18px] [overflow-wrap:anywhere]">{action.label}</strong>
707
+ <small className="mt-[3px] block text-xs leading-4 text-secondary-foreground [overflow-wrap:anywhere]">{action.description}</small>
653
708
  </span>
654
- <CaretRight size={14} weight="bold" aria-hidden="true" />
709
+ <CaretRight className="shrink-0 text-secondary-foreground" size={14} weight="bold" aria-hidden="true" />
655
710
  </button>
656
711
  );
657
712
  })}
@@ -54,7 +54,7 @@ export const BumpInActivityChatCard: CardComponent = (props) => {
54
54
  <button
55
55
  ref={triggerRef}
56
56
  type="button"
57
- className="activity-detail-presentation__detail-trigger"
57
+ className="activity-detail-presentation__detail-trigger mt-2 mb-0 flex min-h-8 w-full cursor-pointer items-center justify-center gap-0.5 rounded-none border-0 bg-transparent p-0 text-xs font-normal leading-[18px] text-[#686d69] shadow-none [font-family:inherit] [&_svg]:shrink-0 active:opacity-[0.68] focus-visible:rounded-[5px] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[rgba(9,107,250,0.28)]"
58
58
  aria-haspopup="dialog"
59
59
  aria-expanded={detailOrigin !== null}
60
60
  aria-controls={getHomeActivityDialogId(cardId)}