@tbox.cn/app-module-activity-play 0.4.0 → 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.
package/INTEGRATION.md CHANGED
@@ -21,12 +21,12 @@
21
21
  - 消费并归属 `activity-play.query` + `activity-play.prizes` 双槽(TIER1 词汇域槽);供给须由
22
22
  provider 包承担(当前唯一供给 = `provider-hupo` 远端连接形态——query→`hupo-activity-play@2`、
23
23
  prizes→`hupo-prize@1`;不得把绑定指向其他域槽)。entry 槽已退场。
24
- - 依赖 `contracts-mall ≥ 0.18.0`(`ACTIVITY_PLAY_QUERY_SERVICE`/`ACTIVITY_PLAY_PRIZES_SERVICE` /
24
+ - 依赖 `contracts-mall ≥ 1.0.0-alpha.1`(`ACTIVITY_PLAY_QUERY_SERVICE`/`ACTIVITY_PLAY_PRIZES_SERVICE` /
25
25
  双 Port / 字段级单源)。
26
- - 接入顺序:安装本模块(`npx --yes @tbox.cn/app-cli module add @tbox.cn/app-module-activity-play`,
26
+ - 接入顺序:安装本模块(`pnpm exec tbox-app module add @tbox.cn/app-module-activity-play`,
27
27
  显式加装,不在 mall profile 默认清单)→ 配置业务连接(integrations.json 归属层连接 +
28
28
  双槽 `instances` 激活——激活恒显式;连接形态见 provider-hupo README「任务 07 复用交接」节)
29
- → `npx --yes @tbox.cn/app-cli module doctor` 复查。
29
+ → `pnpm exec tbox-app module doctor` 复查。
30
30
 
31
31
  ## 智能体消费面(四只读工具 + 服务端出卡 + 模块技能)
32
32
 
package/README.md CHANGED
@@ -28,7 +28,7 @@ renderer(活动单文件 + 奖品目录 activity-play-prize——中立保形
28
28
  ```sh
29
29
  pnpm install # workspace 成员(modules/* 已在根 workspace glob 内)
30
30
  pnpm --filter @tbox.cn/app-module-activity-play typecheck && pnpm --filter @tbox.cn/app-module-activity-play test
31
- npx --yes @tbox.cn/app-cli module doctor
31
+ pnpm exec tbox-app module doctor
32
32
  ```
33
33
 
34
34
  ## 交付清单(新增能力后)
@@ -515,7 +515,7 @@ function cardNoteOf(items) {
515
515
  function createActivityPlayTools(opts) {
516
516
  const listActivityPlays = createTool({
517
517
  id: "listActivityPlays",
518
- description: "\u67E5\u8BE2\u5F53\u524D\u5546\u573A\u5728\u552E\u7684\u6D3B\u52A8\u73A9\u6CD5\u5217\u8868\uFF08\u5927\u8F6C\u76D8\u3001\u62BD\u5956\u3001\u7B7E\u5230\u3001\u4E92\u52A8\u6E38\u620F\u7B49\u2014\u2014\u6765\u81EA\u5916\u90E8\u4F9B\u5E94\u5546\u5B9E\u65F6\u6570\u636E\uFF09\uFF0C\u53EF\u7528 keyword \u6309\u540D\u79F0\u6216\u8BF4\u660E\u8FC7\u6EE4\u3001limit \u63A7\u5236\u8FD4\u56DE\u6570\u91CF\uFF08\u7F3A\u7701 20\uFF09\uFF1B\u53EA\u8BFB\u67E5\u8BE2\uFF0C\u4E0D\u6267\u884C\u53C2\u4E0E\u6216\u62BD\u5956\uFF1B\u67E5\u8BE2\u7ED3\u679C\u4E3A\u5F53\u4E0B\u7684\u6D3B\u52A8\u4E8B\u5B9E\u4E0E\u72B6\u6001\uFF0C\u4E0D\u4EE3\u8868\u53C2\u4E0E\u8D44\u683C\u3002",
518
+ description: "\u67E5\u8BE2\u5F53\u524D\u5546\u573A\u5728\u552E\u7684\u6D3B\u52A8\u73A9\u6CD5\u5217\u8868\uFF08\u5927\u8F6C\u76D8\u3001\u62BD\u5956\u3001\u7B7E\u5230\u3001\u4E92\u52A8\u6E38\u620F\u7B49\u2014\u2014\u6765\u81EA\u5916\u90E8\u4F9B\u5E94\u5546\u5B9E\u65F6\u6570\u636E\uFF09\uFF0C\u53EF\u7528 keyword \u6309\u540D\u79F0\u6216\u8BF4\u660E\u8FC7\u6EE4\u3001limit \u63A7\u5236\u8FD4\u56DE\u6570\u91CF\uFF08\u7F3A\u7701 20\uFF09\uFF1Bkeyword \u53EA\u6309\u540D\u79F0/\u8BF4\u660E\u6587\u672C\u5339\u914D\u3001\u4E0D\u5339\u914D\u6D3B\u52A8\u6807\u8BC6\u2014\u2014\u7528\u6237\u7ED9\u51FA\u6D3B\u52A8\u6807\u8BC6\uFF08ID\uFF09\u67E5\u8BE6\u60C5\u65F6\u76F4\u63A5\u7528 getActivityPlayDetail\uFF0C\u4E0D\u8981\u628A\u6807\u8BC6\u5F53 keyword\uFF1B\u53EA\u8BFB\u67E5\u8BE2\uFF0C\u4E0D\u6267\u884C\u53C2\u4E0E\u6216\u62BD\u5956\uFF1B\u67E5\u8BE2\u7ED3\u679C\u4E3A\u5F53\u4E0B\u7684\u6D3B\u52A8\u4E8B\u5B9E\u4E0E\u72B6\u6001\uFF0C\u4E0D\u4EE3\u8868\u53C2\u4E0E\u8D44\u683C\u3002",
519
519
  inputSchema: z.object({
520
520
  keyword: z.string().optional(),
521
521
  limit: z.string().optional()
@@ -38,14 +38,19 @@ function formatActivityPlayTime(value) {
38
38
 
39
39
  // src/client/cards/activity-play/ActivityPlayCard.tsx
40
40
  import { jsx, jsxs } from "react/jsx-runtime";
41
+ var BADGE_TONE = {
42
+ success: "bg-success-soft text-success",
43
+ warning: "bg-warning-soft text-warning",
44
+ muted: "bg-neutral-soft text-muted-foreground"
45
+ };
41
46
  function ActivityRow({ item }) {
42
47
  const tone = activityPlayStatusTone(item.status);
43
- return /* @__PURE__ */ jsx("div", { className: "ap-card__row", children: /* @__PURE__ */ jsxs("div", { className: "ap-card__row-main", children: [
44
- /* @__PURE__ */ jsxs("div", { className: "ap-card__row-title", children: [
45
- /* @__PURE__ */ jsx("strong", { children: item.title }),
46
- /* @__PURE__ */ jsx("span", { className: `ap-badge ap-badge--${tone}`, children: activityPlayStatusText(item.status) })
48
+ return /* @__PURE__ */ jsx("div", { className: "ap-card__row border-t border-border py-2.5 first:border-t-0", children: /* @__PURE__ */ jsxs("div", { className: "ap-card__row-main", children: [
49
+ /* @__PURE__ */ jsxs("div", { className: "ap-card__row-title flex items-center gap-1.5", children: [
50
+ /* @__PURE__ */ jsx("strong", { className: "truncate text-sm text-foreground", children: item.title }),
51
+ /* @__PURE__ */ jsx("span", { className: `ap-badge ap-badge--${tone} shrink-0 rounded-full px-1.5 text-xs leading-4.5 ${BADGE_TONE[tone]}`, children: activityPlayStatusText(item.status) })
47
52
  ] }),
48
- item.description && /* @__PURE__ */ jsx("p", { className: "ap-card__row-desc", children: item.description })
53
+ item.description && /* @__PURE__ */ jsx("p", { className: "ap-card__row-desc mt-1 line-clamp-2 text-xs leading-4.5 text-muted-foreground", children: item.description })
49
54
  ] }) });
50
55
  }
51
56
  function ActivityPlayCard(props) {
@@ -54,33 +59,33 @@ function ActivityPlayCard(props) {
54
59
  const item = data.items[0];
55
60
  if (!item) return null;
56
61
  const range = [formatActivityPlayTime(item.startsAt), formatActivityPlayTime(item.endsAt)].filter(Boolean).join(" \u2014 ");
57
- return /* @__PURE__ */ jsxs("section", { className: "ap-card ap-card--detail", children: [
58
- /* @__PURE__ */ jsx("span", { className: "ap-card__eyebrow", children: "\u6D3B\u52A8\u73A9\u6CD5" }),
59
- /* @__PURE__ */ jsxs("div", { className: "ap-card__detail-head", children: [
60
- /* @__PURE__ */ jsx("strong", { children: item.title }),
61
- /* @__PURE__ */ jsx("span", { className: `ap-badge ap-badge--${activityPlayStatusTone(item.status)}`, children: activityPlayStatusText(item.status) })
62
+ return /* @__PURE__ */ jsxs("section", { className: "ap-card ap-card--detail flex flex-col gap-2.5 bg-muted p-3", children: [
63
+ /* @__PURE__ */ jsx("span", { className: "ap-card__eyebrow text-xs leading-none tracking-wide text-muted-foreground", children: "\u6D3B\u52A8\u73A9\u6CD5" }),
64
+ /* @__PURE__ */ jsxs("div", { className: "ap-card__detail-head flex flex-wrap items-center gap-2", children: [
65
+ /* @__PURE__ */ jsx("strong", { className: "text-base text-foreground", children: item.title }),
66
+ /* @__PURE__ */ jsx("span", { className: `ap-badge ap-badge--${activityPlayStatusTone(item.status)} shrink-0 rounded-full px-1.5 text-xs leading-4.5 ${BADGE_TONE[activityPlayStatusTone(item.status)]}`, children: activityPlayStatusText(item.status) })
62
67
  ] }),
63
- item.description && /* @__PURE__ */ jsx("p", { className: "ap-card__detail-desc", children: item.description }),
64
- item.imageUrl && /* @__PURE__ */ jsx("img", { className: "ap-card__cover", src: item.imageUrl, alt: `${item.title}\u5C01\u9762`, loading: "lazy" }),
65
- range && /* @__PURE__ */ jsxs("p", { className: "ap-card__meta", children: [
68
+ item.description && /* @__PURE__ */ jsx("p", { className: "ap-card__detail-desc text-xs leading-5 text-muted-foreground", children: item.description }),
69
+ item.imageUrl && /* @__PURE__ */ jsx("img", { className: "ap-card__cover max-h-45 w-full rounded-md object-cover", src: item.imageUrl, alt: `${item.title}\u5C01\u9762`, loading: "lazy" }),
70
+ range && /* @__PURE__ */ jsxs("p", { className: "ap-card__meta text-xs leading-4.5 text-muted-foreground", children: [
66
71
  "\u6D3B\u52A8\u65F6\u95F4\uFF1A",
67
72
  range
68
73
  ] })
69
74
  ] });
70
75
  }
71
76
  if (data.items.length === 0) {
72
- return /* @__PURE__ */ jsxs("section", { className: "ap-card ap-card--list", children: [
73
- /* @__PURE__ */ jsx("span", { className: "ap-card__eyebrow", children: "\u6D3B\u52A8\u73A9\u6CD5" }),
74
- /* @__PURE__ */ jsx("p", { className: "ap-card__empty", children: "\u5F53\u524D\u5546\u573A\u6682\u65E0\u8FDB\u884C\u4E2D\u7684\u6D3B\u52A8\u73A9\u6CD5" })
77
+ return /* @__PURE__ */ jsxs("section", { className: "ap-card ap-card--list flex flex-col gap-2.5 bg-muted p-3", children: [
78
+ /* @__PURE__ */ jsx("span", { className: "ap-card__eyebrow text-xs leading-none tracking-wide text-muted-foreground", children: "\u6D3B\u52A8\u73A9\u6CD5" }),
79
+ /* @__PURE__ */ jsx("p", { className: "ap-card__empty text-xs leading-5 text-muted-foreground", children: "\u5F53\u524D\u5546\u573A\u6682\u65E0\u8FDB\u884C\u4E2D\u7684\u6D3B\u52A8\u73A9\u6CD5" })
75
80
  ] });
76
81
  }
77
- return /* @__PURE__ */ jsxs("section", { className: "ap-card ap-card--list", children: [
78
- /* @__PURE__ */ jsxs("span", { className: "ap-card__eyebrow", children: [
82
+ return /* @__PURE__ */ jsxs("section", { className: "ap-card ap-card--list flex flex-col gap-2.5 bg-muted p-3", children: [
83
+ /* @__PURE__ */ jsxs("span", { className: "ap-card__eyebrow text-xs leading-none tracking-wide text-muted-foreground", children: [
79
84
  "\u6D3B\u52A8\u73A9\u6CD5\uFF08",
80
85
  data.items.length,
81
86
  "\uFF09"
82
87
  ] }),
83
- /* @__PURE__ */ jsx("div", { className: "ap-card__list", children: data.items.map((item) => /* @__PURE__ */ jsx(ActivityRow, { item }, item.activityId)) })
88
+ /* @__PURE__ */ jsx("div", { className: "ap-card__list flex flex-col", children: data.items.map((item) => /* @__PURE__ */ jsx(ActivityRow, { item }, item.activityId)) })
84
89
  ] });
85
90
  }
86
91
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clientModule
3
- } from "../chunk-GDHTMID6.js";
3
+ } from "../chunk-KK4F22GE.js";
4
4
  export {
5
5
  clientModule
6
6
  };
package/dist/index.js CHANGED
@@ -32,10 +32,10 @@ import {
32
32
  toActivityPlayPrizeError,
33
33
  toPrizeDetailCardData,
34
34
  toPrizeListCardData
35
- } from "./chunk-XIDGKP5D.js";
35
+ } from "./chunk-HXO47NYM.js";
36
36
  import {
37
37
  clientModule
38
- } from "./chunk-GDHTMID6.js";
38
+ } from "./chunk-KK4F22GE.js";
39
39
  export {
40
40
  ACTIVITY_PLAY_CARD_TYPE,
41
41
  ACTIVITY_PLAY_LIMIT_DEFAULT,
@@ -32,7 +32,7 @@ import {
32
32
  toActivityPlayPrizeError,
33
33
  toPrizeDetailCardData,
34
34
  toPrizeListCardData
35
- } from "../chunk-XIDGKP5D.js";
35
+ } from "../chunk-HXO47NYM.js";
36
36
  export {
37
37
  ACTIVITY_PLAY_CARD_TYPE,
38
38
  ACTIVITY_PLAY_LIMIT_DEFAULT,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tbox.cn/app-module-activity-play",
3
- "version": "0.4.0",
3
+ "version": "1.0.0-alpha.6",
4
4
  "type": "module",
5
5
  "description": "活动玩法业务模块:供应商活动查询(HTTP/工具/出卡)",
6
6
  "exports": {
@@ -19,10 +19,10 @@
19
19
  "./package.json": "./package.json"
20
20
  },
21
21
  "dependencies": {
22
- "@tbox.cn/app-contracts": "0.13.4",
23
- "@tbox.cn/app-contracts-mall": "0.18.0",
24
- "@tbox.cn/app-agent-sdk-client": "0.2.2",
25
- "@tbox.cn/app-agent-sdk-server": "0.3.6"
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
  "zod": "3.25.76",
@@ -59,9 +59,6 @@
59
59
  "access": "public"
60
60
  },
61
61
  "license": "MIT",
62
- "sideEffects": [
63
- "**/*.css"
64
- ],
65
62
  "scripts": {
66
63
  "typecheck": "tsc --noEmit",
67
64
  "test": "vitest run",
@@ -49,6 +49,9 @@ routingTerms:
49
49
  2. 详情:`getActivityPlayDetail` 需要 `activityId`——用户只说名称(如「那个转盘」)时,
50
50
  **先查列表拿到 activityId 再查详情**;不要按名称猜 ID、查不到就选第一项或编一份详情。
51
51
  活动标识是供应商返回的字符串(如 `001`),引用原文即可。
52
+ 列表 `keyword` 只按名称/说明匹配、**不匹配活动标识**——用户直接给出活动标识(一串
53
+ 编码形态的字符串也算)时,跳过列表直接按 ID 查详情;不要拿标识当关键词搜索,
54
+ 也不因关键词搜不到就断言活动不存在。
52
55
  3. limit 非法会被拒绝(合法范围 1—50);返回条数是本次数量,被截断不代表没有更多活动。
53
56
  4. 查询失败按错误码如实说明(如供给未配置、活动不存在),不要把失败说成「暂无活动」。
54
57
  5. 本人奖品列表:`listMyPrizes`(零参数——始终按当前登录用户查当前商场);返回
@@ -13,17 +13,27 @@ import {
13
13
  formatActivityPlayTime,
14
14
  } from '../view';
15
15
 
16
+ const BADGE_TONE = {
17
+ success: 'bg-success-soft text-success',
18
+ warning: 'bg-warning-soft text-warning',
19
+ muted: 'bg-neutral-soft text-muted-foreground',
20
+ } as const;
21
+
16
22
  /** 列表条目(紧凑行形态——占位期不映封面大图,imageUrl 仅详情态展示) */
17
23
  function ActivityRow({ item }: { item: ActivityPlayCardData['items'][number] }) {
18
24
  const tone = activityPlayStatusTone(item.status);
19
25
  return (
20
- <div className="ap-card__row">
26
+ <div className="ap-card__row border-t border-border py-2.5 first:border-t-0">
21
27
  <div className="ap-card__row-main">
22
- <div className="ap-card__row-title">
23
- <strong>{item.title}</strong>
24
- <span className={`ap-badge ap-badge--${tone}`}>{activityPlayStatusText(item.status)}</span>
28
+ <div className="ap-card__row-title flex items-center gap-1.5">
29
+ <strong className="truncate text-sm text-foreground">{item.title}</strong>
30
+ <span className={`ap-badge ap-badge--${tone} shrink-0 rounded-full px-1.5 text-xs leading-4.5 ${BADGE_TONE[tone]}`}>
31
+ {activityPlayStatusText(item.status)}
32
+ </span>
25
33
  </div>
26
- {item.description && <p className="ap-card__row-desc">{item.description}</p>}
34
+ {item.description && (
35
+ <p className="ap-card__row-desc mt-1 line-clamp-2 text-xs leading-4.5 text-muted-foreground">{item.description}</p>
36
+ )}
27
37
  </div>
28
38
  </div>
29
39
  );
@@ -38,34 +48,38 @@ export function ActivityPlayCard(props: { data: ActivityPlayCardData }) {
38
48
  .filter(Boolean)
39
49
  .join(' — ');
40
50
  return (
41
- <section className="ap-card ap-card--detail">
42
- <span className="ap-card__eyebrow">活动玩法</span>
43
- <div className="ap-card__detail-head">
44
- <strong>{item.title}</strong>
45
- <span className={`ap-badge ap-badge--${activityPlayStatusTone(item.status)}`}>
51
+ <section className="ap-card ap-card--detail flex flex-col gap-2.5 bg-muted p-3">
52
+ <span className="ap-card__eyebrow text-xs leading-none tracking-wide text-muted-foreground">活动玩法</span>
53
+ <div className="ap-card__detail-head flex flex-wrap items-center gap-2">
54
+ <strong className="text-base text-foreground">{item.title}</strong>
55
+ <span className={`ap-badge ap-badge--${activityPlayStatusTone(item.status)} shrink-0 rounded-full px-1.5 text-xs leading-4.5 ${BADGE_TONE[activityPlayStatusTone(item.status)]}`}>
46
56
  {activityPlayStatusText(item.status)}
47
57
  </span>
48
58
  </div>
49
- {item.description && <p className="ap-card__detail-desc">{item.description}</p>}
59
+ {item.description && (
60
+ <p className="ap-card__detail-desc text-xs leading-5 text-muted-foreground">{item.description}</p>
61
+ )}
50
62
  {item.imageUrl && (
51
- <img className="ap-card__cover" src={item.imageUrl} alt={`${item.title}封面`} loading="lazy" />
63
+ <img className="ap-card__cover max-h-45 w-full rounded-md object-cover" src={item.imageUrl} alt={`${item.title}封面`} loading="lazy" />
52
64
  )}
53
- {range && <p className="ap-card__meta">活动时间:{range}</p>}
65
+ {range && <p className="ap-card__meta text-xs leading-4.5 text-muted-foreground">活动时间:{range}</p>}
54
66
  </section>
55
67
  );
56
68
  }
57
69
  if (data.items.length === 0) {
58
70
  return (
59
- <section className="ap-card ap-card--list">
60
- <span className="ap-card__eyebrow">活动玩法</span>
61
- <p className="ap-card__empty">当前商场暂无进行中的活动玩法</p>
71
+ <section className="ap-card ap-card--list flex flex-col gap-2.5 bg-muted p-3">
72
+ <span className="ap-card__eyebrow text-xs leading-none tracking-wide text-muted-foreground">活动玩法</span>
73
+ <p className="ap-card__empty text-xs leading-5 text-muted-foreground">当前商场暂无进行中的活动玩法</p>
62
74
  </section>
63
75
  );
64
76
  }
65
77
  return (
66
- <section className="ap-card ap-card--list">
67
- <span className="ap-card__eyebrow">活动玩法({data.items.length})</span>
68
- <div className="ap-card__list">
78
+ <section className="ap-card ap-card--list flex flex-col gap-2.5 bg-muted p-3">
79
+ <span className="ap-card__eyebrow text-xs leading-none tracking-wide text-muted-foreground">
80
+ 活动玩法({data.items.length})
81
+ </span>
82
+ <div className="ap-card__list flex flex-col">
69
83
  {data.items.map((item) => (
70
84
  <ActivityRow key={item.activityId} item={item} />
71
85
  ))}
@@ -1,5 +1,3 @@
1
- import './styles/activity-play.css'; // 占位渲染器自持样式(副作用 import 首行先加载)
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 { ActivityPlayCard } from './cards/activity-play';
@@ -95,7 +95,7 @@ export function createActivityPlayTools(opts: { getCtx: () => ServerContext }) {
95
95
  const listActivityPlays = createTool({
96
96
  id: 'listActivityPlays',
97
97
  description:
98
- '查询当前商场在售的活动玩法列表(大转盘、抽奖、签到、互动游戏等——来自外部供应商实时数据),可用 keyword 按名称或说明过滤、limit 控制返回数量(缺省 20);只读查询,不执行参与或抽奖;查询结果为当下的活动事实与状态,不代表参与资格。',
98
+ '查询当前商场在售的活动玩法列表(大转盘、抽奖、签到、互动游戏等——来自外部供应商实时数据),可用 keyword 按名称或说明过滤、limit 控制返回数量(缺省 20);keyword 只按名称/说明文本匹配、不匹配活动标识——用户给出活动标识(ID)查详情时直接用 getActivityPlayDetail,不要把标识当 keyword;只读查询,不执行参与或抽奖;查询结果为当下的活动事实与状态,不代表参与资格。',
99
99
  inputSchema: z.object({
100
100
  keyword: z.string().optional(),
101
101
  limit: z.string().optional(),
package/tbox.module.json CHANGED
@@ -3,7 +3,6 @@
3
3
  "id": "module-activity-play",
4
4
  "name": "活动玩法",
5
5
  "description": "查询供应商活动与本人奖品(HTTP 列表/详情、只读工具出卡);详情只服务展示,参与跳转由前端经宿主桥处理,奖品领取/核销归供应商",
6
- "version": "0.4.0",
7
6
  "kind": "business",
8
7
  "risk": {
9
8
  "level": "low",
@@ -1,107 +0,0 @@
1
- /* src/client/styles/activity-play.css */
2
- .ap-card {
3
- --ap-muted: var(--tbox-text-secondary, #8a8a8a);
4
- --ap-faint: var(--tbox-text-muted, #b0b0b0);
5
- --ap-border: var(--tbox-border-color, #ebebeb);
6
- --ap-surface: var(--tbox-surface-subtle, #fafafa);
7
- --ap-success: var(--tbox-success, #0f8a5f);
8
- --ap-success-light: var(--tbox-success-light, #e6f7f0);
9
- --ap-warning: var(--tbox-warning, #b26a00);
10
- --ap-warning-light: var(--tbox-warning-light, #fff4e0);
11
- }
12
- .ap-card {
13
- padding: 12px;
14
- background: var(--ap-surface);
15
- display: flex;
16
- flex-direction: column;
17
- gap: 10px;
18
- }
19
- .ap-card__eyebrow {
20
- font-size: 12px;
21
- line-height: 1;
22
- color: var(--ap-faint);
23
- letter-spacing: 1px;
24
- }
25
- .ap-badge {
26
- flex: none;
27
- font-size: 12px;
28
- line-height: 18px;
29
- padding: 0 6px;
30
- border-radius: 9px;
31
- }
32
- .ap-badge--success {
33
- color: var(--ap-success);
34
- background: var(--ap-success-light);
35
- }
36
- .ap-badge--warning {
37
- color: var(--ap-warning);
38
- background: var(--ap-warning-light);
39
- }
40
- .ap-badge--muted {
41
- color: var(--ap-muted);
42
- background: rgba(0, 0, 0, 0.06);
43
- }
44
- .ap-card__list {
45
- display: flex;
46
- flex-direction: column;
47
- }
48
- .ap-card__row {
49
- padding: 10px 0;
50
- border-top: 1px solid var(--ap-border);
51
- }
52
- .ap-card__row:first-child {
53
- border-top: none;
54
- }
55
- .ap-card__row-title {
56
- display: flex;
57
- align-items: center;
58
- gap: 6px;
59
- }
60
- .ap-card__row-title strong {
61
- font-size: 14px;
62
- color: var(--tbox-text-primary, #303030);
63
- overflow: hidden;
64
- text-overflow: ellipsis;
65
- white-space: nowrap;
66
- }
67
- .ap-card__row-desc {
68
- margin-top: 4px;
69
- font-size: 12px;
70
- line-height: 18px;
71
- color: var(--ap-muted);
72
- display: -webkit-box;
73
- -webkit-box-orient: vertical;
74
- -webkit-line-clamp: 2;
75
- overflow: hidden;
76
- }
77
- .ap-card__empty {
78
- font-size: 13px;
79
- line-height: 20px;
80
- color: var(--ap-muted);
81
- }
82
- .ap-card--detail .ap-card__detail-head {
83
- display: flex;
84
- align-items: center;
85
- gap: 8px;
86
- flex-wrap: wrap;
87
- }
88
- .ap-card--detail .ap-card__detail-head strong {
89
- font-size: 16px;
90
- color: var(--tbox-text-primary, #303030);
91
- }
92
- .ap-card--detail .ap-card__detail-desc {
93
- font-size: 13px;
94
- line-height: 20px;
95
- color: var(--ap-muted);
96
- }
97
- .ap-card__cover {
98
- width: 100%;
99
- max-height: 180px;
100
- object-fit: cover;
101
- border-radius: 6px;
102
- }
103
- .ap-card__meta {
104
- font-size: 12px;
105
- line-height: 18px;
106
- color: var(--ap-faint);
107
- }
package/dist/index.css DELETED
@@ -1,107 +0,0 @@
1
- /* src/client/styles/activity-play.css */
2
- .ap-card {
3
- --ap-muted: var(--tbox-text-secondary, #8a8a8a);
4
- --ap-faint: var(--tbox-text-muted, #b0b0b0);
5
- --ap-border: var(--tbox-border-color, #ebebeb);
6
- --ap-surface: var(--tbox-surface-subtle, #fafafa);
7
- --ap-success: var(--tbox-success, #0f8a5f);
8
- --ap-success-light: var(--tbox-success-light, #e6f7f0);
9
- --ap-warning: var(--tbox-warning, #b26a00);
10
- --ap-warning-light: var(--tbox-warning-light, #fff4e0);
11
- }
12
- .ap-card {
13
- padding: 12px;
14
- background: var(--ap-surface);
15
- display: flex;
16
- flex-direction: column;
17
- gap: 10px;
18
- }
19
- .ap-card__eyebrow {
20
- font-size: 12px;
21
- line-height: 1;
22
- color: var(--ap-faint);
23
- letter-spacing: 1px;
24
- }
25
- .ap-badge {
26
- flex: none;
27
- font-size: 12px;
28
- line-height: 18px;
29
- padding: 0 6px;
30
- border-radius: 9px;
31
- }
32
- .ap-badge--success {
33
- color: var(--ap-success);
34
- background: var(--ap-success-light);
35
- }
36
- .ap-badge--warning {
37
- color: var(--ap-warning);
38
- background: var(--ap-warning-light);
39
- }
40
- .ap-badge--muted {
41
- color: var(--ap-muted);
42
- background: rgba(0, 0, 0, 0.06);
43
- }
44
- .ap-card__list {
45
- display: flex;
46
- flex-direction: column;
47
- }
48
- .ap-card__row {
49
- padding: 10px 0;
50
- border-top: 1px solid var(--ap-border);
51
- }
52
- .ap-card__row:first-child {
53
- border-top: none;
54
- }
55
- .ap-card__row-title {
56
- display: flex;
57
- align-items: center;
58
- gap: 6px;
59
- }
60
- .ap-card__row-title strong {
61
- font-size: 14px;
62
- color: var(--tbox-text-primary, #303030);
63
- overflow: hidden;
64
- text-overflow: ellipsis;
65
- white-space: nowrap;
66
- }
67
- .ap-card__row-desc {
68
- margin-top: 4px;
69
- font-size: 12px;
70
- line-height: 18px;
71
- color: var(--ap-muted);
72
- display: -webkit-box;
73
- -webkit-box-orient: vertical;
74
- -webkit-line-clamp: 2;
75
- overflow: hidden;
76
- }
77
- .ap-card__empty {
78
- font-size: 13px;
79
- line-height: 20px;
80
- color: var(--ap-muted);
81
- }
82
- .ap-card--detail .ap-card__detail-head {
83
- display: flex;
84
- align-items: center;
85
- gap: 8px;
86
- flex-wrap: wrap;
87
- }
88
- .ap-card--detail .ap-card__detail-head strong {
89
- font-size: 16px;
90
- color: var(--tbox-text-primary, #303030);
91
- }
92
- .ap-card--detail .ap-card__detail-desc {
93
- font-size: 13px;
94
- line-height: 20px;
95
- color: var(--ap-muted);
96
- }
97
- .ap-card__cover {
98
- width: 100%;
99
- max-height: 180px;
100
- object-fit: cover;
101
- border-radius: 6px;
102
- }
103
- .ap-card__meta {
104
- font-size: 12px;
105
- line-height: 18px;
106
- color: var(--ap-faint);
107
- }
@@ -1,136 +0,0 @@
1
- /* ============================================================
2
- * module-activity-play 客户端域样式(占位渲染器 2026-11-16)。
3
- * 中立形态:卡框纪律沿平台 .tbox-card(描边/圆角/裁切平台统一),本文件只铺域 surface
4
- * 与占位排版;厂商/品牌视觉归正式渲染器与主题包(模块兜底 = 中立,禁 --tbox-asset-* 声明)。
5
- * 机械规则:直引 --tbox-* 恒带 fallback;rgba() 传统语法;禁 color-mix / !important。
6
- * ============================================================ */
7
-
8
- /* ===== 域变量 ===== */
9
- .ap-card {
10
- --ap-muted: var(--tbox-text-secondary, #8a8a8a);
11
- --ap-faint: var(--tbox-text-muted, #b0b0b0);
12
- --ap-border: var(--tbox-border-color, #ebebeb);
13
- --ap-surface: var(--tbox-surface-subtle, #fafafa);
14
- --ap-success: var(--tbox-success, #0f8a5f);
15
- --ap-success-light: var(--tbox-success-light, #e6f7f0);
16
- --ap-warning: var(--tbox-warning, #b26a00);
17
- --ap-warning-light: var(--tbox-warning-light, #fff4e0);
18
- }
19
-
20
- /* ===== 卡根 ===== */
21
- .ap-card {
22
- padding: 12px;
23
- background: var(--ap-surface);
24
- display: flex;
25
- flex-direction: column;
26
- gap: 10px;
27
- }
28
-
29
- .ap-card__eyebrow {
30
- font-size: 12px;
31
- line-height: 1;
32
- color: var(--ap-faint);
33
- letter-spacing: 1px;
34
- }
35
-
36
- /* ===== 状态徽标 ===== */
37
- .ap-badge {
38
- flex: none;
39
- font-size: 12px;
40
- line-height: 18px;
41
- padding: 0 6px;
42
- border-radius: 9px;
43
- }
44
-
45
- .ap-badge--success {
46
- color: var(--ap-success);
47
- background: var(--ap-success-light);
48
- }
49
-
50
- .ap-badge--warning {
51
- color: var(--ap-warning);
52
- background: var(--ap-warning-light);
53
- }
54
-
55
- .ap-badge--muted {
56
- color: var(--ap-muted);
57
- background: rgba(0, 0, 0, 0.06);
58
- }
59
-
60
- /* ===== 列表形态 ===== */
61
- .ap-card__list {
62
- display: flex;
63
- flex-direction: column;
64
- }
65
-
66
- .ap-card__row {
67
- padding: 10px 0;
68
- border-top: 1px solid var(--ap-border);
69
- }
70
-
71
- .ap-card__row:first-child {
72
- border-top: none;
73
- }
74
-
75
- .ap-card__row-title {
76
- display: flex;
77
- align-items: center;
78
- gap: 6px;
79
- }
80
-
81
- .ap-card__row-title strong {
82
- font-size: 14px;
83
- color: var(--tbox-text-primary, #303030);
84
- overflow: hidden;
85
- text-overflow: ellipsis;
86
- white-space: nowrap;
87
- }
88
-
89
- .ap-card__row-desc {
90
- margin-top: 4px;
91
- font-size: 12px;
92
- line-height: 18px;
93
- color: var(--ap-muted);
94
- display: -webkit-box;
95
- -webkit-box-orient: vertical;
96
- -webkit-line-clamp: 2;
97
- overflow: hidden;
98
- }
99
-
100
- .ap-card__empty {
101
- font-size: 13px;
102
- line-height: 20px;
103
- color: var(--ap-muted);
104
- }
105
-
106
- /* ===== 详情形态 ===== */
107
- .ap-card--detail .ap-card__detail-head {
108
- display: flex;
109
- align-items: center;
110
- gap: 8px;
111
- flex-wrap: wrap;
112
- }
113
-
114
- .ap-card--detail .ap-card__detail-head strong {
115
- font-size: 16px;
116
- color: var(--tbox-text-primary, #303030);
117
- }
118
-
119
- .ap-card--detail .ap-card__detail-desc {
120
- font-size: 13px;
121
- line-height: 20px;
122
- color: var(--ap-muted);
123
- }
124
-
125
- .ap-card__cover {
126
- width: 100%;
127
- max-height: 180px;
128
- object-fit: cover;
129
- border-radius: 6px;
130
- }
131
-
132
- .ap-card__meta {
133
- font-size: 12px;
134
- line-height: 18px;
135
- color: var(--ap-faint);
136
- }