@tbox.cn/app-module-alipay-activity 0.3.7 → 1.0.0-alpha.10

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.
package/AGENTS.md CHANGED
@@ -6,10 +6,10 @@
6
6
  ## 自定义 API 对接(AI 集成)
7
7
 
8
8
  见本包 `INTEGRATION.md`(接入语义真源);实施落点与流程见
9
- `npx --yes @tbox.cn/app-cli skills get integration`(任务路由/材料清单)与
10
- `npx --yes @tbox.cn/app-cli skills get provider-custom`(adapter 实施)。
9
+ `pnpm exec tbox-app skills get integration`(任务路由/材料清单)与
10
+ `pnpm exec tbox-app skills get provider-custom`(adapter 实施)。
11
11
 
12
12
  ## 真实厂商接入
13
13
 
14
- 见本包 `INTEGRATION.md`;官方 provider 包形态:应用态 `npx --yes @tbox.cn/app-cli new provider <name>`(`packages/provider-<id>`
14
+ 见本包 `INTEGRATION.md`;官方 provider 包形态:应用态 `pnpm exec tbox-app new provider <name>`(`packages/provider-<id>`
15
15
  local 形态)/ 仓内发布源 `tbox-app-dev new provider <name>`(`modules/provider-<id>` 发布形态)。
package/README.md CHANGED
@@ -44,5 +44,5 @@ NOT_START 有效期行改「{startAt} 开始」、RECEIVED 奖励池标题「已
44
44
  在生成应用中:
45
45
 
46
46
  ```sh
47
- npx --yes @tbox.cn/app-cli module add @tbox.cn/app-module-alipay-activity
47
+ pnpm exec tbox-app module add @tbox.cn/app-module-alipay-activity
48
48
  ```
@@ -1,6 +1,3 @@
1
- // src/client/index.ts
2
- import "../bumpin-UR4NBS7F.css";
3
-
4
1
  // src/client/cards/bumpin-activity/index.tsx
5
2
  import { useState as useState2 } from "react";
6
3
  import { CaretDown, CaretUp, Lock, Trophy } from "@phosphor-icons/react";
@@ -91,25 +88,25 @@ function StepsProgress({
91
88
  unit
92
89
  }) {
93
90
  const steps = Array.from({ length: total }, (_, index) => index + 1);
94
- return /* @__PURE__ */ jsx2("div", { className: "promotion-bumpin__steps", children: steps.map((stepNumber, index) => {
91
+ return /* @__PURE__ */ jsx2("div", { className: "promotion-bumpin__steps flex items-start justify-between px-3 pb-1 pt-2.5", children: steps.map((stepNumber, index) => {
95
92
  const isDone = stepNumber <= current;
96
93
  const isLast = index === steps.length - 1;
97
94
  const isLocked = isLast && !isDone;
98
- return /* @__PURE__ */ jsxs("div", { className: "promotion-bumpin__step-item", children: [
95
+ return /* @__PURE__ */ jsxs("div", { className: "promotion-bumpin__step-item relative flex flex-1 flex-col items-center gap-1", children: [
99
96
  index > 0 && /* @__PURE__ */ jsx2(
100
97
  "div",
101
98
  {
102
- className: `promotion-bumpin__step-line${isDone && steps[index - 1] <= current ? " promotion-bumpin__step-line--done" : ""}`
99
+ className: `promotion-bumpin__step-line absolute left-[-50%] right-1/2 top-2.5 h-0.75 -translate-y-1/2 ${isDone && steps[index - 1] <= current ? "bg-warning shadow-sm promotion-bumpin__step-line--done" : "bg-[rgba(255,255,255,0.18)]"}`
103
100
  }
104
101
  ),
105
102
  /* @__PURE__ */ jsx2(
106
103
  "div",
107
104
  {
108
- className: `promotion-bumpin__step-node${isDone ? " promotion-bumpin__step-node--done" : ""}${isLocked ? " promotion-bumpin__step-node--locked" : ""}`,
105
+ className: `promotion-bumpin__step-node relative z-10 flex size-5.5 items-center justify-center rounded-full border-2 text-xs font-bold leading-none ${isLocked ? "border-warning bg-warn-surface text-warn-ink promotion-bumpin__step-node--locked" : isDone ? "border-warning bg-white text-primary promotion-bumpin__step-node--done" : "border-[rgba(255,255,255,0.3)] bg-[rgba(255,255,255,0.12)] text-[rgba(255,255,255,0.7)]"}`,
109
106
  children: isLocked ? /* @__PURE__ */ jsx2(Lock, { weight: "fill", size: 20 }) : /* @__PURE__ */ jsx2("span", { children: stepNumber })
110
107
  }
111
108
  ),
112
- /* @__PURE__ */ jsxs("span", { className: "promotion-bumpin__step-label", children: [
109
+ /* @__PURE__ */ jsxs("span", { className: "promotion-bumpin__step-label whitespace-nowrap text-xs leading-tight text-white-dim", children: [
113
110
  stepNumber,
114
111
  " ",
115
112
  unit
@@ -130,31 +127,31 @@ function AlipayActivityBumpInCard(props) {
130
127
  const visibleVouchers = prizesExpanded ? data.vouchers : data.vouchers.slice(0, PRIZES_PREVIEW_COUNT);
131
128
  const hiddenCount = data.vouchers.length - PRIZES_PREVIEW_COUNT;
132
129
  const statusBadge = data.actStatus === "NOT_START" ? "\u672A\u5F00\u59CB" : data.actStatus === "FINISH" ? "\u5DF2\u7ED3\u675F" : data.actStatus === "RECEIVED" ? "\u5DF2\u9886\u5956" : void 0;
133
- const statusClass = data.actStatus === "NOT_START" ? "promotion-bumpin__status--pending" : data.actStatus === "RECEIVED" ? "promotion-bumpin__status--received" : "promotion-bumpin__status--terminal";
130
+ const statusClass = data.actStatus === "NOT_START" ? "promotion-bumpin__status--pending border border-white-line bg-white-soft text-white" : data.actStatus === "RECEIVED" ? "promotion-bumpin__status--received border border-warn-border bg-warn-surface text-warn-ink" : "promotion-bumpin__status--terminal border border-border bg-neutral-soft text-muted-foreground";
134
131
  const notStarted = data.actStatus === "NOT_START";
135
132
  const periodDateText = notStarted ? data.startAtText ?? data.endAtText : data.endAtText;
136
133
  const periodText = periodDateText ? periodDateText.replace(/^\d{4}-/, "").replace("-", " \u6708 ").concat(notStarted && data.startAtText ? " \u65E5\u5F00\u59CB" : " \u65E5\u524D\u6709\u6548") : void 0;
137
- return /* @__PURE__ */ jsxs("section", { className: "promotion-card promotion-bumpin", children: [
134
+ return /* @__PURE__ */ jsxs("section", { className: "promotion-card promotion-bumpin relative w-full overflow-hidden bg-card text-sm leading-[normal] tracking-[0] text-foreground", children: [
138
135
  /* @__PURE__ */ jsxs(
139
136
  "div",
140
137
  {
141
- className: `promotion-bumpin__header${hasBackground ? " promotion-bumpin__header--bg" : ""}`,
138
+ className: `promotion-bumpin__header ${hasBackground ? "promotion-bumpin__header--bg bumpin-hero bumpin-scrim block min-h-25 p-3 pb-3.5" : "flex items-center gap-2.5 bg-linear-to-br from-primary-foreground to-card p-3.5"}`,
142
139
  style: serverBgUrl ? { backgroundImage: `url(${serverBgUrl})` } : void 0,
143
140
  children: [
144
- !hasBackground && data.coverUrl && /* @__PURE__ */ jsx2(ImageWithFallback, { src: data.coverUrl, alt: data.title, className: "promotion-bumpin__cover" }),
145
- !hasBackground && !data.coverUrl && /* @__PURE__ */ jsx2("div", { className: "promotion-bumpin__cover-placeholder" }),
146
- /* @__PURE__ */ jsxs("div", { className: "promotion-bumpin__header-copy", children: [
147
- (data.tagLabel || statusBadge) && /* @__PURE__ */ jsxs("div", { className: "promotion-bumpin__tag-row", children: [
148
- data.tagLabel && /* @__PURE__ */ jsx2("span", { className: "promotion-bumpin__tag", children: data.tagLabel }),
149
- statusBadge && /* @__PURE__ */ jsx2("span", { className: `promotion-bumpin__status ${statusClass}`, children: statusBadge })
141
+ !hasBackground && data.coverUrl && /* @__PURE__ */ jsx2(ImageWithFallback, { src: data.coverUrl, alt: data.title, className: "promotion-bumpin__cover size-14.5 shrink-0 rounded-md object-cover shadow-lg" }),
142
+ !hasBackground && !data.coverUrl && /* @__PURE__ */ jsx2("div", { className: "promotion-bumpin__cover-placeholder grid size-14.5 shrink-0 place-items-center rounded-md bg-white-soft text-white" }),
143
+ /* @__PURE__ */ jsxs("div", { className: "promotion-bumpin__header-copy grid min-w-0 gap-1", children: [
144
+ (data.tagLabel || statusBadge) && /* @__PURE__ */ jsxs("div", { className: "promotion-bumpin__tag-row flex flex-wrap items-center gap-1", children: [
145
+ data.tagLabel && /* @__PURE__ */ jsx2("span", { className: "promotion-bumpin__tag inline-block rounded-full border border-warn-border bg-warn-surface px-1.5 py-0.5 text-xs font-semibold leading-3.5 text-warn-ink", children: data.tagLabel }),
146
+ statusBadge && /* @__PURE__ */ jsx2("span", { className: `promotion-bumpin__status inline-block rounded-full px-1.5 py-0.5 text-xs font-semibold leading-3.5 ${statusClass}`, children: statusBadge })
150
147
  ] }),
151
- /* @__PURE__ */ jsx2("h3", { className: "promotion-bumpin__title", children: data.mainTitle || data.title }),
152
- periodText && /* @__PURE__ */ jsx2("small", { className: "promotion-bumpin__period", children: periodText })
148
+ /* @__PURE__ */ jsx2("h3", { className: "promotion-bumpin__title flex items-center gap-1 break-words text-base font-bold leading-5 text-white [&_svg]:shrink-0", children: data.mainTitle || data.title }),
149
+ periodText && /* @__PURE__ */ jsx2("small", { className: "promotion-bumpin__period justify-self-start rounded-full bg-white-soft px-1.5 py-0.5 text-xs leading-3.5 text-white", children: periodText })
153
150
  ] })
154
151
  ]
155
152
  }
156
153
  ),
157
- data.totalProgress && /* @__PURE__ */ jsx2("div", { className: "promotion-bumpin__progress", children: isStepsMode ? /* @__PURE__ */ jsx2(
154
+ data.totalProgress && /* @__PURE__ */ jsx2("div", { className: "promotion-bumpin__progress grid gap-1.25 px-3.5 pt-3", children: isStepsMode ? /* @__PURE__ */ jsx2(
158
155
  StepsProgress,
159
156
  {
160
157
  total: totalNum,
@@ -162,33 +159,33 @@ function AlipayActivityBumpInCard(props) {
162
159
  unit: data.progressUnit ?? "\u6B21"
163
160
  }
164
161
  ) : /* @__PURE__ */ jsxs(Fragment, { children: [
165
- /* @__PURE__ */ jsx2("div", { className: "promotion-bumpin__progress-bar", children: /* @__PURE__ */ jsx2("div", { className: "promotion-bumpin__progress-fill", style: { width: `${progressPercent}%` } }) }),
166
- /* @__PURE__ */ jsx2("span", { className: "promotion-bumpin__progress-text", children: notStarted ? "\u5C1A\u672A\u5F00\u59CB" : `\u5DF2\u5B8C\u6210 ${data.currentProgress ?? "0"} / ${data.totalProgress} ${data.progressUnit ?? "\u6B21"}` })
162
+ /* @__PURE__ */ jsx2("div", { className: "promotion-bumpin__progress-bar h-1.75 overflow-hidden rounded-full bg-border", children: /* @__PURE__ */ jsx2("div", { className: "promotion-bumpin__progress-fill h-full rounded-full bg-warning transition-all duration-300", style: { width: `${progressPercent}%` } }) }),
163
+ /* @__PURE__ */ jsx2("span", { className: "promotion-bumpin__progress-text text-xs leading-4 text-muted-foreground", children: notStarted ? "\u5C1A\u672A\u5F00\u59CB" : `\u5DF2\u5B8C\u6210 ${data.currentProgress ?? "0"} / ${data.totalProgress} ${data.progressUnit ?? "\u6B21"}` })
167
164
  ] }) }),
168
- !isBanner && data.vouchers.length > 0 && /* @__PURE__ */ jsxs("div", { className: "promotion-bumpin__prizes", children: [
169
- /* @__PURE__ */ jsxs("header", { className: "promotion-bumpin__prizes-header", children: [
165
+ !isBanner && data.vouchers.length > 0 && /* @__PURE__ */ jsxs("div", { className: "promotion-bumpin__prizes mx-3.5 mt-3 overflow-hidden rounded-lg border-2 border-border bg-muted", children: [
166
+ /* @__PURE__ */ jsxs("header", { className: "promotion-bumpin__prizes-header flex items-center gap-1 border-b-2 border-border px-2.5 py-2 text-xs font-bold leading-4 text-warn-ink", children: [
170
167
  /* @__PURE__ */ jsx2(Trophy, { weight: "fill" }),
171
168
  data.actStatus === "RECEIVED" ? "\u5DF2\u9886\u53D6 \xB7 \u5956\u52B1\u6C60" : "\u5956\u52B1\u6C60"
172
169
  ] }),
173
- /* @__PURE__ */ jsx2("ul", { className: "promotion-bumpin__prizes-list", children: visibleVouchers.map((voucher) => /* @__PURE__ */ jsxs("li", { className: "promotion-bumpin__prize-item", children: [
170
+ /* @__PURE__ */ jsx2("ul", { className: "promotion-bumpin__prizes-list m-0 grid list-none p-0", children: visibleVouchers.map((voucher) => /* @__PURE__ */ jsxs("li", { className: "promotion-bumpin__prize-item flex items-center gap-2 border-b-2 border-border bg-card px-2.5 py-2 last:border-b-0", children: [
174
171
  voucher.itemLogo ? /* @__PURE__ */ jsx2(
175
172
  ImageWithFallback,
176
173
  {
177
174
  src: voucher.itemLogo,
178
175
  alt: voucher.voucherName,
179
- className: "promotion-bumpin__prize-logo"
176
+ className: "promotion-bumpin__prize-logo size-9 shrink-0 rounded-md object-cover"
180
177
  }
181
- ) : /* @__PURE__ */ jsx2("span", { className: "promotion-bumpin__prize-logo-placeholder" }),
182
- /* @__PURE__ */ jsxs("span", { className: "promotion-bumpin__prize-copy", children: [
183
- /* @__PURE__ */ jsx2("strong", { children: voucher.voucherName }),
184
- /* @__PURE__ */ jsx2("small", { children: voucher.thresholdAmountText || voucher.merchantName })
178
+ ) : /* @__PURE__ */ jsx2("span", { className: "promotion-bumpin__prize-logo-placeholder size-9 shrink-0 rounded-md bg-success-soft" }),
179
+ /* @__PURE__ */ jsxs("span", { className: "promotion-bumpin__prize-copy grid min-w-0 gap-0.5", children: [
180
+ /* @__PURE__ */ jsx2("strong", { className: "truncate text-xs font-semibold leading-4 text-foreground", children: voucher.voucherName }),
181
+ /* @__PURE__ */ jsx2("small", { className: "truncate text-xs leading-3.5 text-muted-foreground", children: voucher.thresholdAmountText || voucher.merchantName })
185
182
  ] })
186
183
  ] }, voucher.prizeId)) }),
187
184
  data.vouchers.length > PRIZES_PREVIEW_COUNT && /* @__PURE__ */ jsx2(
188
185
  "button",
189
186
  {
190
187
  type: "button",
191
- className: "promotion-bumpin__prizes-toggle",
188
+ className: "promotion-bumpin__prizes-toggle flex w-full cursor-pointer items-center justify-center gap-1.5 border-0 border-t-2 border-border bg-transparent px-2.5 py-2 text-xs font-semibold text-muted-foreground [font-family:inherit] active:opacity-70",
192
189
  onClick: () => setPrizesExpanded((prev) => !prev),
193
190
  children: prizesExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
194
191
  /* @__PURE__ */ jsx2(CaretUp, { weight: "bold", size: 12 }),
@@ -202,12 +199,12 @@ function AlipayActivityBumpInCard(props) {
202
199
  }
203
200
  )
204
201
  ] }),
205
- data.description && /* @__PURE__ */ jsxs("div", { className: "promotion-bumpin__rules", children: [
206
- /* @__PURE__ */ jsx2("header", { className: "promotion-bumpin__rules-header", children: "\u6D3B\u52A8\u89C4\u5219" }),
202
+ data.description && /* @__PURE__ */ jsxs("div", { className: "promotion-bumpin__rules mx-3.5 mb-3.5 mt-3 overflow-hidden rounded-lg bg-muted", children: [
203
+ /* @__PURE__ */ jsx2("header", { className: "promotion-bumpin__rules-header px-2.5 pt-1.75 text-xs font-bold leading-3.5 text-muted-foreground", children: "\u6D3B\u52A8\u89C4\u5219" }),
207
204
  /* @__PURE__ */ jsx2(
208
205
  "div",
209
206
  {
210
- className: "promotion-bumpin__rules-content",
207
+ className: "promotion-bumpin__rules-content break-words px-2.5 pb-2 pt-1.25 text-xs leading-4 text-muted-foreground [&_img]:max-w-full",
211
208
  dangerouslySetInnerHTML: { __html: sanitizeActivityHtml(data.description) }
212
209
  }
213
210
  )
@@ -115,23 +115,23 @@ declare const serverModule: {
115
115
  merchantLogo: zod.ZodOptional<zod.ZodString>;
116
116
  itemLogo: zod.ZodOptional<zod.ZodString>;
117
117
  }, "strip", zod.ZodTypeAny, {
118
- merchantName: string;
119
118
  prizeId: string;
120
119
  voucherName: string;
121
120
  voucherType: string;
122
121
  reductionAmount: string;
123
122
  thresholdAmountText: string;
124
123
  unit: string;
124
+ merchantName: string;
125
125
  merchantLogo?: string | undefined;
126
126
  itemLogo?: string | undefined;
127
127
  }, {
128
- merchantName: string;
129
128
  prizeId: string;
130
129
  voucherName: string;
131
130
  voucherType: string;
132
131
  reductionAmount: string;
133
132
  thresholdAmountText: string;
134
133
  unit: string;
134
+ merchantName: string;
135
135
  merchantLogo?: string | undefined;
136
136
  itemLogo?: string | undefined;
137
137
  }>, "many">;
@@ -148,29 +148,25 @@ declare const serverModule: {
148
148
  description?: string | undefined;
149
149
  }>, "many">>;
150
150
  }, "strip", zod.ZodTypeAny, {
151
- title: string;
152
- mode: "detail" | "banner";
153
151
  activityRef: string;
152
+ title: string;
154
153
  actStatus: "NOT_START" | "INIT" | "PROCESSING" | "FINISH" | "RECEIVED";
155
154
  vouchers: {
156
- merchantName: string;
157
155
  prizeId: string;
158
156
  voucherName: string;
159
157
  voucherType: string;
160
158
  reductionAmount: string;
161
159
  thresholdAmountText: string;
162
160
  unit: string;
161
+ merchantName: string;
163
162
  merchantLogo?: string | undefined;
164
163
  itemLogo?: string | undefined;
165
164
  }[];
166
- progressStyle: "steps" | "bar";
165
+ mode: "detail" | "banner";
166
+ progressStyle: "bar" | "steps";
167
167
  description?: string | undefined;
168
- steps?: {
169
- title: string;
170
- description?: string | undefined;
171
- }[] | undefined;
172
- coverUrl?: string | undefined;
173
168
  mainTitle?: string | undefined;
169
+ coverUrl?: string | undefined;
174
170
  backgroundUrl?: string | undefined;
175
171
  tagLabel?: string | undefined;
176
172
  cardLogoUrl?: string | undefined;
@@ -179,29 +175,28 @@ declare const serverModule: {
179
175
  progressUnit?: string | undefined;
180
176
  startAtText?: string | undefined;
181
177
  endAtText?: string | undefined;
178
+ steps?: {
179
+ title: string;
180
+ description?: string | undefined;
181
+ }[] | undefined;
182
182
  }, {
183
- title: string;
184
183
  activityRef: string;
184
+ title: string;
185
185
  actStatus: "NOT_START" | "INIT" | "PROCESSING" | "FINISH" | "RECEIVED";
186
186
  vouchers: {
187
- merchantName: string;
188
187
  prizeId: string;
189
188
  voucherName: string;
190
189
  voucherType: string;
191
190
  reductionAmount: string;
192
191
  thresholdAmountText: string;
193
192
  unit: string;
193
+ merchantName: string;
194
194
  merchantLogo?: string | undefined;
195
195
  itemLogo?: string | undefined;
196
196
  }[];
197
197
  description?: string | undefined;
198
- mode?: "detail" | "banner" | undefined;
199
- steps?: {
200
- title: string;
201
- description?: string | undefined;
202
- }[] | undefined;
203
- coverUrl?: string | undefined;
204
198
  mainTitle?: string | undefined;
199
+ coverUrl?: string | undefined;
205
200
  backgroundUrl?: string | undefined;
206
201
  tagLabel?: string | undefined;
207
202
  cardLogoUrl?: string | undefined;
@@ -210,7 +205,12 @@ declare const serverModule: {
210
205
  progressUnit?: string | undefined;
211
206
  startAtText?: string | undefined;
212
207
  endAtText?: string | undefined;
213
- progressStyle?: "steps" | "bar" | undefined;
208
+ mode?: "detail" | "banner" | undefined;
209
+ steps?: {
210
+ title: string;
211
+ description?: string | undefined;
212
+ }[] | undefined;
213
+ progressStyle?: "bar" | "steps" | undefined;
214
214
  }>>;
215
215
  };
216
216
  skills: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tbox.cn/app-module-alipay-activity",
3
- "version": "0.3.7",
3
+ "version": "1.0.0-alpha.10",
4
4
  "type": "module",
5
5
  "description": "支付宝互动营销活动模块:碰出惊喜(碰一下)活动查询与展示(codegen 源)。",
6
6
  "exports": {
@@ -18,11 +18,11 @@
18
18
  }
19
19
  },
20
20
  "dependencies": {
21
- "@tbox.cn/app-contracts": "0.13.3",
22
- "@tbox.cn/app-contracts-mall": "0.13.2",
23
21
  "alipay-sdk": "4.14.0",
24
- "@tbox.cn/app-agent-sdk-client": "0.2.0",
25
- "@tbox.cn/app-agent-sdk-server": "0.3.1"
22
+ "@tbox.cn/app-contracts": "1.0.0-alpha.10",
23
+ "@tbox.cn/app-contracts-mall": "1.0.0-alpha.10",
24
+ "@tbox.cn/app-agent-sdk-server": "1.0.0-alpha.10",
25
+ "@tbox.cn/app-agent-sdk-client": "1.0.0-alpha.10"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "zod": "3.25.76",
@@ -60,9 +60,6 @@
60
60
  "access": "public"
61
61
  },
62
62
  "license": "MIT",
63
- "sideEffects": [
64
- "**/*.css"
65
- ],
66
63
  "scripts": {
67
64
  "typecheck": "tsc --noEmit",
68
65
  "test": "vitest run",
@@ -18,20 +18,20 @@ function StepsProgress({
18
18
  }) {
19
19
  const steps = Array.from({ length: total }, (_, index) => index + 1);
20
20
  return (
21
- <div className="promotion-bumpin__steps">
21
+ <div className="promotion-bumpin__steps flex items-start justify-between px-3 pb-1 pt-2.5">
22
22
  {steps.map((stepNumber, index) => {
23
23
  const isDone = stepNumber <= current;
24
24
  const isLast = index === steps.length - 1;
25
25
  const isLocked = isLast && !isDone;
26
26
  return (
27
- <div key={stepNumber} className="promotion-bumpin__step-item">
27
+ <div key={stepNumber} className="promotion-bumpin__step-item relative flex flex-1 flex-col items-center gap-1">
28
28
  {index > 0 && (
29
29
  <div
30
- className={`promotion-bumpin__step-line${isDone && steps[index - 1] <= current ? ' promotion-bumpin__step-line--done' : ''}`}
30
+ className={`promotion-bumpin__step-line absolute left-[-50%] right-1/2 top-2.5 h-0.75 -translate-y-1/2 ${isDone && steps[index - 1] <= current ? 'bg-warning shadow-sm promotion-bumpin__step-line--done' : 'bg-[rgba(255,255,255,0.18)]'}`}
31
31
  />
32
32
  )}
33
33
  <div
34
- className={`promotion-bumpin__step-node${isDone ? ' promotion-bumpin__step-node--done' : ''}${isLocked ? ' promotion-bumpin__step-node--locked' : ''}`}
34
+ className={`promotion-bumpin__step-node relative z-10 flex size-5.5 items-center justify-center rounded-full border-2 text-xs font-bold leading-none ${isLocked ? 'border-warning bg-warn-surface text-warn-ink promotion-bumpin__step-node--locked' : isDone ? 'border-warning bg-white text-primary promotion-bumpin__step-node--done' : 'border-[rgba(255,255,255,0.3)] bg-[rgba(255,255,255,0.12)] text-[rgba(255,255,255,0.7)]'}`}
35
35
  >
36
36
  {isLocked ? (
37
37
  <Lock weight="fill" size={20} />
@@ -39,7 +39,7 @@ function StepsProgress({
39
39
  <span>{stepNumber}</span>
40
40
  )}
41
41
  </div>
42
- <span className="promotion-bumpin__step-label">{stepNumber} {unit}</span>
42
+ <span className="promotion-bumpin__step-label whitespace-nowrap text-xs leading-tight text-white-dim">{stepNumber} {unit}</span>
43
43
  </div>
44
44
  );
45
45
  })}
@@ -83,10 +83,10 @@ export function AlipayActivityBumpInCard(props: {
83
83
  : undefined;
84
84
  const statusClass =
85
85
  data.actStatus === 'NOT_START'
86
- ? 'promotion-bumpin__status--pending'
86
+ ? 'promotion-bumpin__status--pending border border-white-line bg-white-soft text-white'
87
87
  : data.actStatus === 'RECEIVED'
88
- ? 'promotion-bumpin__status--received'
89
- : 'promotion-bumpin__status--terminal';
88
+ ? 'promotion-bumpin__status--received border border-warn-border bg-warn-surface text-warn-ink'
89
+ : 'promotion-bumpin__status--terminal border border-border bg-neutral-soft text-muted-foreground';
90
90
  // 未开始:有效期行改「{startAtText} 开始」(活动尚未开始,"日前有效"是误导)
91
91
  const notStarted = data.actStatus === 'NOT_START';
92
92
  const periodDateText = notStarted ? (data.startAtText ?? data.endAtText) : data.endAtText;
@@ -98,36 +98,36 @@ export function AlipayActivityBumpInCard(props: {
98
98
  : undefined;
99
99
 
100
100
  return (
101
- <section className="promotion-card promotion-bumpin">
101
+ <section className="promotion-card promotion-bumpin relative w-full overflow-hidden bg-card text-sm leading-[normal] tracking-[0] text-foreground">
102
102
  {/* ── 头部:全幅背景图(联单)或 cover 小图(普通)── */}
103
103
  <div
104
- className={`promotion-bumpin__header${hasBackground ? ' promotion-bumpin__header--bg' : ''}`}
104
+ className={`promotion-bumpin__header ${hasBackground ? 'promotion-bumpin__header--bg bumpin-hero bumpin-scrim block min-h-25 p-3 pb-3.5' : 'flex items-center gap-2.5 bg-linear-to-br from-primary-foreground to-card p-3.5'}`}
105
105
  style={serverBgUrl ? { backgroundImage: `url(${serverBgUrl})` } : undefined}
106
106
  >
107
107
  {!hasBackground && data.coverUrl && (
108
- <ImageWithFallback src={data.coverUrl} alt={data.title} className="promotion-bumpin__cover" />
108
+ <ImageWithFallback src={data.coverUrl} alt={data.title} className="promotion-bumpin__cover size-14.5 shrink-0 rounded-md object-cover shadow-lg" />
109
109
  )}
110
110
  {!hasBackground && !data.coverUrl && (
111
- <div className="promotion-bumpin__cover-placeholder" />
111
+ <div className="promotion-bumpin__cover-placeholder grid size-14.5 shrink-0 place-items-center rounded-md bg-white-soft text-white" />
112
112
  )}
113
113
 
114
- <div className="promotion-bumpin__header-copy">
114
+ <div className="promotion-bumpin__header-copy grid min-w-0 gap-1">
115
115
  {(data.tagLabel || statusBadge) && (
116
- <div className="promotion-bumpin__tag-row">
116
+ <div className="promotion-bumpin__tag-row flex flex-wrap items-center gap-1">
117
117
  {data.tagLabel && (
118
- <span className="promotion-bumpin__tag">{data.tagLabel}</span>
118
+ <span className="promotion-bumpin__tag inline-block rounded-full border border-warn-border bg-warn-surface px-1.5 py-0.5 text-xs font-semibold leading-3.5 text-warn-ink">{data.tagLabel}</span>
119
119
  )}
120
- {statusBadge && <span className={`promotion-bumpin__status ${statusClass}`}>{statusBadge}</span>}
120
+ {statusBadge && <span className={`promotion-bumpin__status inline-block rounded-full px-1.5 py-0.5 text-xs font-semibold leading-3.5 ${statusClass}`}>{statusBadge}</span>}
121
121
  </div>
122
122
  )}
123
- <h3 className="promotion-bumpin__title">{data.mainTitle || data.title}</h3>
124
- {periodText && <small className="promotion-bumpin__period">{periodText}</small>}
123
+ <h3 className="promotion-bumpin__title flex items-center gap-1 break-words text-base font-bold leading-5 text-white [&_svg]:shrink-0">{data.mainTitle || data.title}</h3>
124
+ {periodText && <small className="promotion-bumpin__period justify-self-start rounded-full bg-white-soft px-1.5 py-0.5 text-xs leading-3.5 text-white">{periodText}</small>}
125
125
  </div>
126
126
  </div>
127
127
 
128
128
  {/* ── 进度:steps 步骤节点 或 bar 线性条 ── */}
129
129
  {data.totalProgress && (
130
- <div className="promotion-bumpin__progress">
130
+ <div className="promotion-bumpin__progress grid gap-1.25 px-3.5 pt-3">
131
131
  {isStepsMode ? (
132
132
  <StepsProgress
133
133
  total={totalNum}
@@ -136,10 +136,10 @@ export function AlipayActivityBumpInCard(props: {
136
136
  />
137
137
  ) : (
138
138
  <>
139
- <div className="promotion-bumpin__progress-bar">
140
- <div className="promotion-bumpin__progress-fill" style={{ width: `${progressPercent}%` }} />
139
+ <div className="promotion-bumpin__progress-bar h-1.75 overflow-hidden rounded-full bg-border">
140
+ <div className="promotion-bumpin__progress-fill h-full rounded-full bg-warning transition-all duration-300" style={{ width: `${progressPercent}%` }} />
141
141
  </div>
142
- <span className="promotion-bumpin__progress-text">
142
+ <span className="promotion-bumpin__progress-text text-xs leading-4 text-muted-foreground">
143
143
  {notStarted
144
144
  ? '尚未开始'
145
145
  : `已完成 ${data.currentProgress ?? '0'} / ${data.totalProgress} ${data.progressUnit ?? '次'}`}
@@ -151,26 +151,26 @@ export function AlipayActivityBumpInCard(props: {
151
151
 
152
152
  {/* ── 奖励池 ── */}
153
153
  {!isBanner && data.vouchers.length > 0 && (
154
- <div className="promotion-bumpin__prizes">
155
- <header className="promotion-bumpin__prizes-header">
154
+ <div className="promotion-bumpin__prizes mx-3.5 mt-3 overflow-hidden rounded-lg border-2 border-border bg-muted">
155
+ <header className="promotion-bumpin__prizes-header flex items-center gap-1 border-b-2 border-border px-2.5 py-2 text-xs font-bold leading-4 text-warn-ink">
156
156
  <Trophy weight="fill" />
157
157
  {data.actStatus === 'RECEIVED' ? '已领取 · 奖励池' : '奖励池'}
158
158
  </header>
159
- <ul className="promotion-bumpin__prizes-list">
159
+ <ul className="promotion-bumpin__prizes-list m-0 grid list-none p-0">
160
160
  {visibleVouchers.map((voucher) => (
161
- <li key={voucher.prizeId} className="promotion-bumpin__prize-item">
161
+ <li key={voucher.prizeId} className="promotion-bumpin__prize-item flex items-center gap-2 border-b-2 border-border bg-card px-2.5 py-2 last:border-b-0">
162
162
  {voucher.itemLogo ? (
163
163
  <ImageWithFallback
164
164
  src={voucher.itemLogo}
165
165
  alt={voucher.voucherName}
166
- className="promotion-bumpin__prize-logo"
166
+ className="promotion-bumpin__prize-logo size-9 shrink-0 rounded-md object-cover"
167
167
  />
168
168
  ) : (
169
- <span className="promotion-bumpin__prize-logo-placeholder" />
169
+ <span className="promotion-bumpin__prize-logo-placeholder size-9 shrink-0 rounded-md bg-success-soft" />
170
170
  )}
171
- <span className="promotion-bumpin__prize-copy">
172
- <strong>{voucher.voucherName}</strong>
173
- <small>{voucher.thresholdAmountText || voucher.merchantName}</small>
171
+ <span className="promotion-bumpin__prize-copy grid min-w-0 gap-0.5">
172
+ <strong className="truncate text-xs font-semibold leading-4 text-foreground">{voucher.voucherName}</strong>
173
+ <small className="truncate text-xs leading-3.5 text-muted-foreground">{voucher.thresholdAmountText || voucher.merchantName}</small>
174
174
  </span>
175
175
  </li>
176
176
  ))}
@@ -178,7 +178,7 @@ export function AlipayActivityBumpInCard(props: {
178
178
  {data.vouchers.length > PRIZES_PREVIEW_COUNT && (
179
179
  <button
180
180
  type="button"
181
- className="promotion-bumpin__prizes-toggle"
181
+ className="promotion-bumpin__prizes-toggle flex w-full cursor-pointer items-center justify-center gap-1.5 border-0 border-t-2 border-border bg-transparent px-2.5 py-2 text-xs font-semibold text-muted-foreground [font-family:inherit] active:opacity-70"
182
182
  onClick={() => setPrizesExpanded((prev) => !prev)}
183
183
  >
184
184
  {prizesExpanded ? (
@@ -199,10 +199,10 @@ export function AlipayActivityBumpInCard(props: {
199
199
 
200
200
  {/* ── 活动规则 ── */}
201
201
  {data.description && (
202
- <div className="promotion-bumpin__rules">
203
- <header className="promotion-bumpin__rules-header">活动规则</header>
202
+ <div className="promotion-bumpin__rules mx-3.5 mb-3.5 mt-3 overflow-hidden rounded-lg bg-muted">
203
+ <header className="promotion-bumpin__rules-header px-2.5 pt-1.75 text-xs font-bold leading-3.5 text-muted-foreground">活动规则</header>
204
204
  <div
205
- className="promotion-bumpin__rules-content"
205
+ className="promotion-bumpin__rules-content break-words px-2.5 pb-2 pt-1.25 text-xs leading-4 text-muted-foreground [&_img]:max-w-full"
206
206
  dangerouslySetInnerHTML={{ __html: sanitizeActivityHtml(data.description) }}
207
207
  />
208
208
  </div>
@@ -1,5 +1,3 @@
1
- import './styles/bumpin.css';
2
-
3
1
  import type { CardComponent } from '@tbox.cn/app-contracts';
4
2
  import type { ClientContext, ClientModule } from '@tbox.cn/app-agent-sdk-client';
5
3
  import { AlipayActivityBumpInCard } from './cards/bumpin-activity/index';
package/tbox.module.json CHANGED
@@ -3,7 +3,6 @@
3
3
  "id": "module-alipay-activity",
4
4
  "name": "联单活动",
5
5
  "description": "支付宝联单活动",
6
- "version": "0.3.1",
7
6
  "hidden": true,
8
7
  "kind": "business",
9
8
  "risk": {
package/tsup.config.ts CHANGED
@@ -28,9 +28,6 @@ export default defineConfig({
28
28
  '@phosphor-icons/react',
29
29
  'alipay-sdk',
30
30
  ],
31
- loader: {
32
- '.css': 'copy',
33
- },
34
31
  esbuildOptions(options) {
35
32
  options.jsx = 'automatic';
36
33
  },