@tbox.cn/app-agent-ui-kit 1.0.0-alpha.18 → 1.0.0-alpha.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tbox.cn/app-agent-ui-kit",
3
- "version": "1.0.0-alpha.18",
3
+ "version": "1.0.0-alpha.19",
4
4
  "type": "module",
5
5
  "description": "Agent 对话壳 UI 组件包(源码发布,单一模板统一化 W2-1):ChatPage/壳组件族/主题 tokens。",
6
6
  "exports": {
@@ -44,8 +44,8 @@
44
44
  "remark-gfm": "4.0.1",
45
45
  "yet-another-react-lightbox": "3.33.1",
46
46
  "zustand": "4.5.7",
47
- "@tbox.cn/app-contracts": "1.0.0-alpha.18",
48
- "@tbox.cn/app-agent-sdk-client": "1.0.0-alpha.18"
47
+ "@tbox.cn/app-agent-sdk-client": "1.0.0-alpha.19",
48
+ "@tbox.cn/app-contracts": "1.0.0-alpha.19"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "react": "18.3.1",
@@ -2,7 +2,7 @@ import { createLogger } from '@tbox.cn/app-agent-sdk-client';
2
2
 
3
3
  const debugLogger = createLogger('DebugButton');
4
4
 
5
- import { Bug } from '@phosphor-icons/react';
5
+ import { BugIcon as Bug } from '@phosphor-icons/react/Bug';
6
6
 
7
7
  /**
8
8
  * 调试按钮:点击把本轮 requestId / conversationId / messageId / messageCreatedAt
@@ -2,7 +2,10 @@ import { useEffect, useState, useSyncExternalStore } from 'react';
2
2
  import { createLogger } from '@tbox.cn/app-agent-sdk-client';
3
3
 
4
4
  const ttsActionLogger = createLogger('tts');
5
- import { Copy, SpeakerHigh, ThumbsDown, ThumbsUp } from '@phosphor-icons/react';
5
+ import { CopyIcon as Copy } from '@phosphor-icons/react/Copy';
6
+ import { SpeakerHighIcon as SpeakerHigh } from '@phosphor-icons/react/SpeakerHigh';
7
+ import { ThumbsDownIcon as ThumbsDown } from '@phosphor-icons/react/ThumbsDown';
8
+ import { ThumbsUpIcon as ThumbsUp } from '@phosphor-icons/react/ThumbsUp';
6
9
  import { useChatStore } from '../../store-context';
7
10
  import { useChatConfigStore } from '../../chat-config';
8
11
  import { useFeedbackAdapter, useRefreshSession, useTTSAdapter } from '@tbox.cn/app-agent-sdk-client';
@@ -1,5 +1,9 @@
1
1
  import { useCallback, useEffect, useState } from 'react';
2
- import { X, Warning, Prohibit, Plus, VideoCamera } from '@phosphor-icons/react';
2
+ import { XIcon as X } from '@phosphor-icons/react/X';
3
+ import { WarningIcon as Warning } from '@phosphor-icons/react/Warning';
4
+ import { ProhibitIcon as Prohibit } from '@phosphor-icons/react/Prohibit';
5
+ import { PlusIcon as Plus } from '@phosphor-icons/react/Plus';
6
+ import { VideoCameraIcon as VideoCamera } from '@phosphor-icons/react/VideoCamera';
3
7
  import { previewImages } from '../../utils/imagePreview';
4
8
  import { toast } from '../../utils/toast';
5
9
  import type { MediaItem } from '../../types';
@@ -1,7 +1,7 @@
1
1
  import { useMemo } from 'react';
2
2
  import ReactMarkdown from 'react-markdown';
3
3
  import remarkGfm from 'remark-gfm';
4
- import { Copy } from '@phosphor-icons/react';
4
+ import { CopyIcon as Copy } from '@phosphor-icons/react/Copy';
5
5
  import { previewImages } from '../../utils/imagePreview';
6
6
  import type { ChatMessage } from '../../types';
7
7
  import ReasoningBlock from '../../components/ReasoningBlock';
@@ -1,5 +1,8 @@
1
1
  import { useId, useMemo, useState } from 'react';
2
- import { CaretDown, Check, Copy, X } from '@phosphor-icons/react';
2
+ import { CaretDownIcon as CaretDown } from '@phosphor-icons/react/CaretDown';
3
+ import { CheckIcon as Check } from '@phosphor-icons/react/Check';
4
+ import { CopyIcon as Copy } from '@phosphor-icons/react/Copy';
5
+ import { XIcon as X } from '@phosphor-icons/react/X';
3
6
  import type { ToolCallInfo } from '../../types';
4
7
  import { formatCompactToolIo } from '../../utils/tool-call-display';
5
8
  import { buildSummaryText, deriveSummary, deriveToolCallItem, prettyDetailText } from './detail';
package/src/icons.ts CHANGED
@@ -1,39 +1,38 @@
1
1
  /**
2
- * 图标入口:应用侧不再直接依赖 `@phosphor-icons/react`。
2
+ * 图标兼容入口:卡片与空态常用的一组,含义稳定、体积可控。
3
3
  *
4
- * 只再导出卡片与空态常用的一组,含义稳定、体积可控;需要新图标时在此增补,
5
- * 应用侧 `import { IconName } from '@tbox.cn/app-agent-ui-kit/icons'`。
4
+ * 主路径是按单个导入 `import { BellIcon } from '@phosphor-icons/react/Bell'`(名字带
5
+ * `Icon` 后缀;从包根导入会把全部 1512 个图标拉进构建与类型检查,lint 报错)。
6
+ * 本入口只作兼容消费面,新代码优先用主路径;清单见 docs/agent/kit.md 图标节。
6
7
  */
7
- export {
8
- ArrowRight,
9
- ArrowsClockwise,
10
- Calendar,
11
- CaretDown,
12
- CaretRight,
13
- Check,
14
- CheckCircle,
15
- Clock,
16
- Coins,
17
- Copy,
18
- CreditCard,
19
- CurrencyCny,
20
- Gift,
21
- Info,
22
- MapPin,
23
- MapTrifold,
24
- Plus,
25
- QrCode,
26
- Receipt,
27
- SealCheck,
28
- ShareNetwork,
29
- Sparkle,
30
- Star,
31
- Storefront,
32
- Ticket,
33
- Trash,
34
- User,
35
- UserCircle,
36
- Warning,
37
- WarningCircle,
38
- X,
39
- } from '@phosphor-icons/react';
8
+ export { ArrowRightIcon as ArrowRight } from '@phosphor-icons/react/ArrowRight';
9
+ export { ArrowsClockwiseIcon as ArrowsClockwise } from '@phosphor-icons/react/ArrowsClockwise';
10
+ export { CalendarIcon as Calendar } from '@phosphor-icons/react/Calendar';
11
+ export { CaretDownIcon as CaretDown } from '@phosphor-icons/react/CaretDown';
12
+ export { CaretRightIcon as CaretRight } from '@phosphor-icons/react/CaretRight';
13
+ export { CheckIcon as Check } from '@phosphor-icons/react/Check';
14
+ export { CheckCircleIcon as CheckCircle } from '@phosphor-icons/react/CheckCircle';
15
+ export { ClockIcon as Clock } from '@phosphor-icons/react/Clock';
16
+ export { CoinsIcon as Coins } from '@phosphor-icons/react/Coins';
17
+ export { CopyIcon as Copy } from '@phosphor-icons/react/Copy';
18
+ export { CreditCardIcon as CreditCard } from '@phosphor-icons/react/CreditCard';
19
+ export { CurrencyCnyIcon as CurrencyCny } from '@phosphor-icons/react/CurrencyCny';
20
+ export { GiftIcon as Gift } from '@phosphor-icons/react/Gift';
21
+ export { InfoIcon as Info } from '@phosphor-icons/react/Info';
22
+ export { MapPinIcon as MapPin } from '@phosphor-icons/react/MapPin';
23
+ export { MapTrifoldIcon as MapTrifold } from '@phosphor-icons/react/MapTrifold';
24
+ export { PlusIcon as Plus } from '@phosphor-icons/react/Plus';
25
+ export { QrCodeIcon as QrCode } from '@phosphor-icons/react/QrCode';
26
+ export { ReceiptIcon as Receipt } from '@phosphor-icons/react/Receipt';
27
+ export { SealCheckIcon as SealCheck } from '@phosphor-icons/react/SealCheck';
28
+ export { ShareNetworkIcon as ShareNetwork } from '@phosphor-icons/react/ShareNetwork';
29
+ export { SparkleIcon as Sparkle } from '@phosphor-icons/react/Sparkle';
30
+ export { StarIcon as Star } from '@phosphor-icons/react/Star';
31
+ export { StorefrontIcon as Storefront } from '@phosphor-icons/react/Storefront';
32
+ export { TicketIcon as Ticket } from '@phosphor-icons/react/Ticket';
33
+ export { TrashIcon as Trash } from '@phosphor-icons/react/Trash';
34
+ export { UserIcon as User } from '@phosphor-icons/react/User';
35
+ export { UserCircleIcon as UserCircle } from '@phosphor-icons/react/UserCircle';
36
+ export { WarningIcon as Warning } from '@phosphor-icons/react/Warning';
37
+ export { WarningCircleIcon as WarningCircle } from '@phosphor-icons/react/WarningCircle';
38
+ export { XIcon as X } from '@phosphor-icons/react/X';