@tbox.cn/app-module-promotion 1.0.0-alpha.18 → 1.0.0-alpha.20

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,16 +1,22 @@
1
1
  // src/client/cards/promotion-offer-list/index.tsx
2
- import { CalendarBlank, CalendarDots, CaretDown as CaretDown2, Lightbulb, MapPin, Sparkle, Ticket as Ticket2 } from "@phosphor-icons/react";
2
+ import { CalendarBlankIcon as CalendarBlank } from "@phosphor-icons/react/CalendarBlank";
3
+ import { CalendarDotsIcon as CalendarDots } from "@phosphor-icons/react/CalendarDots";
4
+ import { CaretDownIcon as CaretDown2 } from "@phosphor-icons/react/CaretDown";
5
+ import { LightbulbIcon as Lightbulb } from "@phosphor-icons/react/Lightbulb";
6
+ import { MapPinIcon as MapPin } from "@phosphor-icons/react/MapPin";
7
+ import { SparkleIcon as Sparkle } from "@phosphor-icons/react/Sparkle";
8
+ import { TicketIcon as Ticket2 } from "@phosphor-icons/react/Ticket";
3
9
  import { useEffect as useEffect2, useState as useState5 } from "react";
4
10
  import { ItemActionsRow, markSelfRendering, navigateToAlipayPage, sendCardAction as sendCardAction2 } from "@tbox.cn/app-agent-sdk-client";
5
11
 
6
12
  // src/client/components/CouponSheet.tsx
7
- import { X } from "@phosphor-icons/react";
13
+ import { XIcon as X } from "@phosphor-icons/react/X";
8
14
  import { useState as useState2 } from "react";
9
15
  import { Overlay } from "@tbox.cn/app-agent-ui-kit/overlay";
10
16
 
11
17
  // src/client/components/ImageWithFallback.tsx
12
18
  import { useState } from "react";
13
- import { ImageSquare } from "@phosphor-icons/react";
19
+ import { ImageSquareIcon as ImageSquare } from "@phosphor-icons/react/ImageSquare";
14
20
  import { jsx } from "react/jsx-runtime";
15
21
  function ImageWithFallback(props) {
16
22
  const { src, alt, className, size = 40 } = props;
@@ -212,7 +218,7 @@ function CouponListRow({ title, imageUrl, subtitle, tags, price, originalPrice,
212
218
  }
213
219
 
214
220
  // src/client/components/CouponListToggle.tsx
215
- import { CaretDown } from "@phosphor-icons/react";
221
+ import { CaretDownIcon as CaretDown } from "@phosphor-icons/react/CaretDown";
216
222
  import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
217
223
  var DEFAULT_VISIBLE_COUPONS = 4;
218
224
  var COUPON_LIST_TOGGLE_CLASS = "promotion-list__toggle flex min-h-8 w-full cursor-pointer items-center justify-center gap-0.5 mt-0.5 border-0 bg-transparent px-0 py-0 text-xs font-normal leading-[normal] text-[#686d69] [font-family:inherit] hover:brightness-100 focus-visible:rounded-[5px] focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[rgba(9,107,250,0.28)] [&_svg]:transition-transform [&_svg]:duration-[160ms] [&_svg]:ease-[ease] [&_svg[data-rotated=true]]:rotate-180";
@@ -326,7 +332,7 @@ function useCouponListExpansion(itemCount, maxItems, isHistory, hidden = false)
326
332
  }
327
333
 
328
334
  // src/client/cards/promotion-offer-list/NearbyDealsPanel.tsx
329
- import { Ticket } from "@phosphor-icons/react";
335
+ import { TicketIcon as Ticket } from "@phosphor-icons/react/Ticket";
330
336
  import { httpPost, readHelloContext } from "@tbox.cn/app-agent-sdk-client";
331
337
  import { useEffect, useRef as useRef2, useState as useState4 } from "react";
332
338
 
@@ -751,7 +757,15 @@ function Empty({ text }) {
751
757
  var promotion_offer_list_default = PromotionOfferListCard;
752
758
 
753
759
  // src/client/cards/promotion-offer-detail/index.tsx
754
- import { CalendarBlank as CalendarBlank2, CheckCircle, Clock, Gift, Info, ListChecks, MapPin as MapPin2, SealCheck, Ticket as Ticket3 } from "@phosphor-icons/react";
760
+ import { CalendarBlankIcon as CalendarBlank2 } from "@phosphor-icons/react/CalendarBlank";
761
+ import { CheckCircleIcon as CheckCircle } from "@phosphor-icons/react/CheckCircle";
762
+ import { ClockIcon as Clock } from "@phosphor-icons/react/Clock";
763
+ import { GiftIcon as Gift } from "@phosphor-icons/react/Gift";
764
+ import { InfoIcon as Info } from "@phosphor-icons/react/Info";
765
+ import { ListChecksIcon as ListChecks } from "@phosphor-icons/react/ListChecks";
766
+ import { MapPinIcon as MapPin2 } from "@phosphor-icons/react/MapPin";
767
+ import { SealCheckIcon as SealCheck } from "@phosphor-icons/react/SealCheck";
768
+ import { TicketIcon as Ticket3 } from "@phosphor-icons/react/Ticket";
755
769
  import { useEffect as useEffect3, useRef as useRef3, useState as useState6 } from "react";
756
770
  import { markSelfRendering as markSelfRendering2, navigateToAlipayPage as navigateToAlipayPage2, sendCardAction as sendCardAction3 } from "@tbox.cn/app-agent-sdk-client";
757
771
  import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
@@ -961,7 +975,15 @@ var promotion_offer_detail_default = PromotionOfferDetailCard;
961
975
  markSelfRendering2(PromotionOfferDetailCard);
962
976
 
963
977
  // src/client/cards/promotion-entitlement-list/index.tsx
964
- import { CalendarBlank as CalendarBlank3, CaretDown as CaretDown3, CaretRight, Copy, MapPinLine, NavigationArrow, ShieldCheck, Ticket as Ticket4, Wallet } from "@phosphor-icons/react";
978
+ import { CalendarBlankIcon as CalendarBlank3 } from "@phosphor-icons/react/CalendarBlank";
979
+ import { CaretDownIcon as CaretDown3 } from "@phosphor-icons/react/CaretDown";
980
+ import { CaretRightIcon as CaretRight } from "@phosphor-icons/react/CaretRight";
981
+ import { CopyIcon as Copy } from "@phosphor-icons/react/Copy";
982
+ import { MapPinLineIcon as MapPinLine } from "@phosphor-icons/react/MapPinLine";
983
+ import { NavigationArrowIcon as NavigationArrow } from "@phosphor-icons/react/NavigationArrow";
984
+ import { ShieldCheckIcon as ShieldCheck } from "@phosphor-icons/react/ShieldCheck";
985
+ import { TicketIcon as Ticket4 } from "@phosphor-icons/react/Ticket";
986
+ import { WalletIcon as Wallet } from "@phosphor-icons/react/Wallet";
965
987
  import { useEffect as useEffect5, useRef as useRef5, useState as useState8 } from "react";
966
988
  import { callJsapi, httpGet, isInAlipayShell } from "@tbox.cn/app-agent-sdk-client";
967
989
 
@@ -1224,7 +1246,9 @@ function sheetFact(icon, label, value) {
1224
1246
  var promotion_entitlement_list_default = PromotionEntitlementListCard;
1225
1247
 
1226
1248
  // src/client/cards/promotion-activity-list/index.tsx
1227
- import { CalendarDots as CalendarDots2, Sparkle as Sparkle2, Ticket as Ticket5 } from "@phosphor-icons/react";
1249
+ import { CalendarDotsIcon as CalendarDots2 } from "@phosphor-icons/react/CalendarDots";
1250
+ import { SparkleIcon as Sparkle2 } from "@phosphor-icons/react/Sparkle";
1251
+ import { TicketIcon as Ticket5 } from "@phosphor-icons/react/Ticket";
1228
1252
  import { sendCardAction as sendCardAction4 } from "@tbox.cn/app-agent-sdk-client";
1229
1253
  import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
1230
1254
  var statusText2 = { AVAILABLE: "\u53EF\u62A5\u540D", FULL: "\u5DF2\u6EE1", ENDED: "\u5DF2\u7ED3\u675F", UPCOMING: "\u5373\u5C06\u5F00\u59CB", UNKNOWN: "\u5F85\u786E\u8BA4" };
@@ -1292,7 +1316,15 @@ function PromotionActivityListCard(props) {
1292
1316
  var promotion_activity_list_default = PromotionActivityListCard;
1293
1317
 
1294
1318
  // src/client/cards/promotion-activity-detail/index.tsx
1295
- import { ArrowSquareOut, CalendarDots as CalendarDots3, CheckCircle as CheckCircle2, Clock as Clock2, Crown, ListChecks as ListChecks2, MapPin as MapPin3, Sparkle as Sparkle3, Users } from "@phosphor-icons/react";
1319
+ import { ArrowSquareOutIcon as ArrowSquareOut } from "@phosphor-icons/react/ArrowSquareOut";
1320
+ import { CalendarDotsIcon as CalendarDots3 } from "@phosphor-icons/react/CalendarDots";
1321
+ import { CheckCircleIcon as CheckCircle2 } from "@phosphor-icons/react/CheckCircle";
1322
+ import { ClockIcon as Clock2 } from "@phosphor-icons/react/Clock";
1323
+ import { CrownIcon as Crown } from "@phosphor-icons/react/Crown";
1324
+ import { ListChecksIcon as ListChecks2 } from "@phosphor-icons/react/ListChecks";
1325
+ import { MapPinIcon as MapPin3 } from "@phosphor-icons/react/MapPin";
1326
+ import { SparkleIcon as Sparkle3 } from "@phosphor-icons/react/Sparkle";
1327
+ import { UsersIcon as Users } from "@phosphor-icons/react/Users";
1296
1328
  import { sendCardAction as sendCardAction5 } from "@tbox.cn/app-agent-sdk-client";
1297
1329
  import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
1298
1330
  var ACTIVITY_HEADER_COMPACT = "flex min-w-0 items-center gap-2.5 px-4 pt-3.5 pb-2.5 max-[380px]:px-[13px] min-[760px]:pt-[15px]";
@@ -1467,7 +1499,10 @@ function ActivityHeader({ title, subtitle, icon }) {
1467
1499
  var promotion_activity_detail_default = PromotionActivityDetailCard;
1468
1500
 
1469
1501
  // src/client/cards/promotion-activity-category-list/index.tsx
1470
- import { GameController, Palette, Sparkle as Sparkle4, Storefront } from "@phosphor-icons/react";
1502
+ import { GameControllerIcon as GameController } from "@phosphor-icons/react/GameController";
1503
+ import { PaletteIcon as Palette } from "@phosphor-icons/react/Palette";
1504
+ import { SparkleIcon as Sparkle4 } from "@phosphor-icons/react/Sparkle";
1505
+ import { StorefrontIcon as Storefront } from "@phosphor-icons/react/Storefront";
1471
1506
  import { ItemActionsRow as ItemActionsRow2 } from "@tbox.cn/app-agent-sdk-client";
1472
1507
  import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
1473
1508
  var icons = [GameController, Storefront, Palette, Sparkle4];
@@ -1502,7 +1537,8 @@ function PromotionActivityCategoryListCard(props) {
1502
1537
  var promotion_activity_category_list_default = PromotionActivityCategoryListCard;
1503
1538
 
1504
1539
  // src/client/cards/promotion-best-deal/index.tsx
1505
- import { Calculator, TrendUp } from "@phosphor-icons/react";
1540
+ import { CalculatorIcon as Calculator } from "@phosphor-icons/react/Calculator";
1541
+ import { TrendUpIcon as TrendUp } from "@phosphor-icons/react/TrendUp";
1506
1542
  import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
1507
1543
  var money = (cents) => (cents / 100).toFixed(2);
1508
1544
  function PromotionBestDealCard({ data }) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cards,
3
3
  clientModule
4
- } from "../chunk-NJGYYTGM.js";
4
+ } from "../chunk-5XT654N4.js";
5
5
  export {
6
6
  clientModule,
7
7
  cards as promotionClientCards
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  cards,
13
13
  clientModule
14
- } from "./chunk-NJGYYTGM.js";
14
+ } from "./chunk-5XT654N4.js";
15
15
  export {
16
16
  InMemoryPromotionService,
17
17
  clientModule,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tbox.cn/app-module-promotion",
3
- "version": "1.0.0-alpha.18",
3
+ "version": "1.0.0-alpha.20",
4
4
  "type": "module",
5
5
  "description": "商圈营销模块:资格校验、推荐降级链、券卡(codegen 源)。",
6
6
  "exports": {
@@ -20,16 +20,16 @@
20
20
  "dependencies": {
21
21
  "jsbarcode": "^3.12.3",
22
22
  "qrcode": "^1.5.4",
23
- "@tbox.cn/app-contracts": "1.0.0-alpha.18",
24
- "@tbox.cn/app-agent-sdk-client": "1.0.0-alpha.18",
25
- "@tbox.cn/app-agent-sdk-server": "1.0.0-alpha.18",
26
- "@tbox.cn/app-contracts-mall": "1.0.0-alpha.18"
23
+ "@tbox.cn/app-contracts": "1.0.0-alpha.20",
24
+ "@tbox.cn/app-agent-sdk-client": "1.0.0-alpha.20",
25
+ "@tbox.cn/app-contracts-mall": "1.0.0-alpha.20",
26
+ "@tbox.cn/app-agent-sdk-server": "1.0.0-alpha.20"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@phosphor-icons/react": "2.1.10",
30
30
  "react": "18.3.1",
31
31
  "zod": "3.25.76",
32
- "@tbox.cn/app-agent-ui-kit": "^1.0.0-alpha.18"
32
+ "@tbox.cn/app-agent-ui-kit": "^1.0.0-alpha.20"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/express": "4.17.25",
@@ -1,4 +1,7 @@
1
- import { GameController, Palette, Sparkle, Storefront } from '@phosphor-icons/react';
1
+ import { GameControllerIcon as GameController } from '@phosphor-icons/react/GameController';
2
+ import { PaletteIcon as Palette } from '@phosphor-icons/react/Palette';
3
+ import { SparkleIcon as Sparkle } from '@phosphor-icons/react/Sparkle';
4
+ import { StorefrontIcon as Storefront } from '@phosphor-icons/react/Storefront';
2
5
  import { ItemActionsRow } from '@tbox.cn/app-agent-sdk-client';
3
6
  import {
4
7
  PROMOTION_CATEGORY_ICON_TONE_CLASS,
@@ -1,4 +1,12 @@
1
- import { ArrowSquareOut, CalendarDots, CheckCircle, Clock, Crown, ListChecks, MapPin, Sparkle, Users } from '@phosphor-icons/react';
1
+ import { ArrowSquareOutIcon as ArrowSquareOut } from '@phosphor-icons/react/ArrowSquareOut';
2
+ import { CalendarDotsIcon as CalendarDots } from '@phosphor-icons/react/CalendarDots';
3
+ import { CheckCircleIcon as CheckCircle } from '@phosphor-icons/react/CheckCircle';
4
+ import { ClockIcon as Clock } from '@phosphor-icons/react/Clock';
5
+ import { CrownIcon as Crown } from '@phosphor-icons/react/Crown';
6
+ import { ListChecksIcon as ListChecks } from '@phosphor-icons/react/ListChecks';
7
+ import { MapPinIcon as MapPin } from '@phosphor-icons/react/MapPin';
8
+ import { SparkleIcon as Sparkle } from '@phosphor-icons/react/Sparkle';
9
+ import { UsersIcon as Users } from '@phosphor-icons/react/Users';
2
10
  import type { PromotionActivityDetailCardData } from '@tbox.cn/app-contracts-mall';
3
11
  import { sendCardAction } from '@tbox.cn/app-agent-sdk-client';
4
12
  import { ImageWithFallback } from '../../components/ImageWithFallback';
@@ -1,4 +1,6 @@
1
- import { CalendarDots, Sparkle, Ticket } from '@phosphor-icons/react';
1
+ import { CalendarDotsIcon as CalendarDots } from '@phosphor-icons/react/CalendarDots';
2
+ import { SparkleIcon as Sparkle } from '@phosphor-icons/react/Sparkle';
3
+ import { TicketIcon as Ticket } from '@phosphor-icons/react/Ticket';
2
4
  import { sendCardAction } from '@tbox.cn/app-agent-sdk-client';
3
5
  import type { PromotionActivityListCardData } from '@tbox.cn/app-contracts-mall';
4
6
  import { ImageWithFallback } from '../../components/ImageWithFallback';
@@ -1,4 +1,5 @@
1
- import { Calculator, TrendUp } from '@phosphor-icons/react';
1
+ import { CalculatorIcon as Calculator } from '@phosphor-icons/react/Calculator';
2
+ import { TrendUpIcon as TrendUp } from '@phosphor-icons/react/TrendUp';
2
3
  import type { PromotionBestDealCardData } from '@tbox.cn/app-contracts-mall';
3
4
 
4
5
  const money = (cents: number) => (cents / 100).toFixed(2);
@@ -1,4 +1,12 @@
1
- import { CalendarBlank, CaretDown, CaretRight, Copy, MapPinLine, NavigationArrow, ShieldCheck, Ticket, Wallet } from '@phosphor-icons/react';
1
+ import { CalendarBlankIcon as CalendarBlank } from '@phosphor-icons/react/CalendarBlank';
2
+ import { CaretDownIcon as CaretDown } from '@phosphor-icons/react/CaretDown';
3
+ import { CaretRightIcon as CaretRight } from '@phosphor-icons/react/CaretRight';
4
+ import { CopyIcon as Copy } from '@phosphor-icons/react/Copy';
5
+ import { MapPinLineIcon as MapPinLine } from '@phosphor-icons/react/MapPinLine';
6
+ import { NavigationArrowIcon as NavigationArrow } from '@phosphor-icons/react/NavigationArrow';
7
+ import { ShieldCheckIcon as ShieldCheck } from '@phosphor-icons/react/ShieldCheck';
8
+ import { TicketIcon as Ticket } from '@phosphor-icons/react/Ticket';
9
+ import { WalletIcon as Wallet } from '@phosphor-icons/react/Wallet';
2
10
  import { useEffect, useRef, useState } from 'react';
3
11
  import { callJsapi, httpGet, isInAlipayShell } from '@tbox.cn/app-agent-sdk-client';
4
12
  import type { PromotionEntitlementListCardData } from '@tbox.cn/app-contracts-mall';
@@ -1,4 +1,12 @@
1
- import { CalendarBlank, CheckCircle, Clock, Gift, Info, ListChecks, MapPin, SealCheck, Ticket } from '@phosphor-icons/react';
1
+ import { CalendarBlankIcon as CalendarBlank } from '@phosphor-icons/react/CalendarBlank';
2
+ import { CheckCircleIcon as CheckCircle } from '@phosphor-icons/react/CheckCircle';
3
+ import { ClockIcon as Clock } from '@phosphor-icons/react/Clock';
4
+ import { GiftIcon as Gift } from '@phosphor-icons/react/Gift';
5
+ import { InfoIcon as Info } from '@phosphor-icons/react/Info';
6
+ import { ListChecksIcon as ListChecks } from '@phosphor-icons/react/ListChecks';
7
+ import { MapPinIcon as MapPin } from '@phosphor-icons/react/MapPin';
8
+ import { SealCheckIcon as SealCheck } from '@phosphor-icons/react/SealCheck';
9
+ import { TicketIcon as Ticket } from '@phosphor-icons/react/Ticket';
2
10
  import { useEffect, useRef, useState } from 'react';
3
11
  import type { PromotionOfferDetailCardData } from '@tbox.cn/app-contracts-mall';
4
12
  import { markSelfRendering, navigateToAlipayPage, sendCardAction } from '@tbox.cn/app-agent-sdk-client';
@@ -1,4 +1,4 @@
1
- import { Ticket } from '@phosphor-icons/react';
1
+ import { TicketIcon as Ticket } from '@phosphor-icons/react/Ticket';
2
2
  import { httpPost, readHelloContext } from '@tbox.cn/app-agent-sdk-client';
3
3
  import { useEffect, useRef, useState } from 'react';
4
4
  import type { DealRecallResult } from '@tbox.cn/app-contracts-mall';
@@ -1,4 +1,10 @@
1
- import { CalendarBlank, CalendarDots, CaretDown, Lightbulb, MapPin, Sparkle, Ticket } from '@phosphor-icons/react';
1
+ import { CalendarBlankIcon as CalendarBlank } from '@phosphor-icons/react/CalendarBlank';
2
+ import { CalendarDotsIcon as CalendarDots } from '@phosphor-icons/react/CalendarDots';
3
+ import { CaretDownIcon as CaretDown } from '@phosphor-icons/react/CaretDown';
4
+ import { LightbulbIcon as Lightbulb } from '@phosphor-icons/react/Lightbulb';
5
+ import { MapPinIcon as MapPin } from '@phosphor-icons/react/MapPin';
6
+ import { SparkleIcon as Sparkle } from '@phosphor-icons/react/Sparkle';
7
+ import { TicketIcon as Ticket } from '@phosphor-icons/react/Ticket';
2
8
  import { useEffect, useState } from 'react';
3
9
  import { ItemActionsRow, markSelfRendering, navigateToAlipayPage, sendCardAction } from '@tbox.cn/app-agent-sdk-client';
4
10
  import type { PromotionOfferListCardData } from '@tbox.cn/app-contracts-mall';
@@ -1,4 +1,4 @@
1
- import { CaretDown } from '@phosphor-icons/react';
1
+ import { CaretDownIcon as CaretDown } from '@phosphor-icons/react/CaretDown';
2
2
 
3
3
  export const DEFAULT_VISIBLE_COUPONS = 4;
4
4
  export const COUPON_LIST_TOGGLE_CLASS = 'promotion-list__toggle flex min-h-8 w-full cursor-pointer items-center justify-center gap-0.5 mt-0.5 border-0 bg-transparent px-0 py-0 text-xs font-normal leading-[normal] text-[#686d69] [font-family:inherit] hover:brightness-100 focus-visible:rounded-[5px] focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[rgba(9,107,250,0.28)] [&_svg]:transition-transform [&_svg]:duration-[160ms] [&_svg]:ease-[ease] [&_svg[data-rotated=true]]:rotate-180';
@@ -4,7 +4,7 @@
4
4
  * 它替代了原来的券详情卡——就地展开、没有二次请求可补,所以呈现什么完全取决于
5
5
  * 列表这一跳已经下发的字段:**缺的整块不渲染,绝不留空壳,也不编造占位文案**。
6
6
  */
7
- import { X } from '@phosphor-icons/react';
7
+ import { XIcon as X } from '@phosphor-icons/react/X';
8
8
  import { useState } from 'react';
9
9
  import { Overlay } from '@tbox.cn/app-agent-ui-kit/overlay';
10
10
  import { ImageWithFallback } from './ImageWithFallback';
@@ -3,7 +3,7 @@
3
3
  * 源:POC shopping-guide 占位语义。src 缺省或加载失败 → 图标占位。
4
4
  */
5
5
  import { useState } from 'react';
6
- import { ImageSquare } from '@phosphor-icons/react';
6
+ import { ImageSquareIcon as ImageSquare } from '@phosphor-icons/react/ImageSquare';
7
7
 
8
8
  export function ImageWithFallback(props: {
9
9
  src?: string;