@liberfi.io/ui-tokens 0.1.190 → 1.0.0

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/README.md CHANGED
@@ -91,6 +91,39 @@ import { SearchWidget } from "@liberfi.io/ui-tokens";
91
91
  | `PulseMigratedListWidget` | Widget | Migrated tokens pulse feed. |
92
92
  | `PulseFinalStretchListWidget` | Widget | Final-stretch tokens pulse feed. |
93
93
 
94
+ ### Components — Shared primitives
95
+
96
+ | Export | Kind | Description |
97
+ | -------------------- | ---- | -------------------------------------------------------------------------- |
98
+ | `TraderTagBadge` | UI | Classification chip for a single trader tag (`kol`, `smart`, `sniper`, …). |
99
+ | `TraderTagBadgeList` | UI | Row of trader tags with max-visible + overflow counter. |
100
+ | `HolderTagBadge` | UI | Classification chip for a single holder tag (same palette as trader tags). |
101
+ | `HolderTagBadgeList` | UI | Row of holder tags with max-visible + overflow counter. |
102
+
103
+ ### Components — Token Detail
104
+
105
+ Token-detail widgets follow the `*.ui.tsx` / `*.script.ts` / `*.widget.tsx` triad. Every script layer calls `@liberfi.io/react` hooks only; UI layers are pure presentational and driven by props. The header composes the basic-info strip by default — pass `dataStrip={null}` to hide it.
106
+
107
+ | Export | Kind | Description |
108
+ | --------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
109
+ | `TokenDetailHeaderWidget` | Widget | Live-updating header: avatar, symbol / name, copy-address, slot for favorite / share actions, and an injectable data strip. |
110
+ | `TokenBasicInfoWidget` | Widget | Compact strip: price, market cap, volume, holders, social media. Consumes `useTokenQuery` + `useTokenSubscription`. |
111
+ | `TokenPriceWidget` | Widget | Live price + 24h change badge. |
112
+ | `TokenMarketCapWidget` | Widget | Market cap / liquidity / age summary. |
113
+ | `TokenVolumeWidget` | Widget | 24h volume / trades / traders summary. |
114
+ | `TokenHoldersCountWidget` | Widget | Holder count + top-10 / top-100 ratio summary. |
115
+ | `TokenSocialMediaWidget` | Widget | Row of social-media icon links (website, twitter, telegram, discord, …). |
116
+ | `TokenHoldersListWidget` | Widget | Paginated token-holders table (**Phase 3**): `sortBy` selector (`holdingUsd` / `lastActiveAt`), holder tags, first-held-at, last-active-at. |
117
+ | `TokenActivitiesListWidget` | Widget | Paginated token-activities table (**Phase 3**): `sortBy` selector, type filter, trader tags, gas fee. |
118
+ | `TokenTradersOverviewWidget` | Widget | Unique-traders card with buy / sell split and progress bar. |
119
+ | `TokenTransactionsOverviewWidget` | Widget | Tx-count card with buy / sell split and progress bar. |
120
+ | `TokenVolumesOverviewWidget` | Widget | USD-volume card with buy / sell split and progress bar. |
121
+ | `TokenSecurityWidget` | Widget | Security flags from `useTokenSecurityQuery` (transfer fee / freezable / closable / …) + optional external auditor link. |
122
+ | `TokenAboutWidget` | Widget | Name / symbol / human-readable description section. |
123
+ | `TokenLiquiditiesWidget` | Widget | DEX liquidity breakdown with per-pool TVL and collapse-at-N support. |
124
+ | `TokenCexListingWidget` | Widget | CEX listings chips. Data is caller-supplied (the `Token` domain type does not model CEX listings). |
125
+ | `TokenCategoriesWidget` | Widget | Category chips sourced from `token.tags`. |
126
+
94
127
  ### Hooks
95
128
 
96
129
  | Export | Description |
@@ -137,9 +170,58 @@ function Sidebar() {
137
170
  }
138
171
  ```
139
172
 
173
+ ### Composing the token-detail page
174
+
175
+ ```tsx
176
+ import {
177
+ TokenDetailHeaderWidget,
178
+ TokenHoldersListWidget,
179
+ TokenActivitiesListWidget,
180
+ TokenSecurityWidget,
181
+ TokenAboutWidget,
182
+ TokenLiquiditiesWidget,
183
+ TokenCategoriesWidget,
184
+ TokenTradersOverviewWidget,
185
+ TokenTransactionsOverviewWidget,
186
+ TokenVolumesOverviewWidget,
187
+ } from "@liberfi.io/ui-tokens";
188
+
189
+ function TokenDetailPage({
190
+ chain,
191
+ address,
192
+ }: {
193
+ chain: Chain;
194
+ address: string;
195
+ }) {
196
+ return (
197
+ <div className="flex flex-col gap-4">
198
+ <TokenDetailHeaderWidget chain={chain} address={address} />
199
+
200
+ <div className="grid grid-cols-1 gap-4 lg:grid-cols-3">
201
+ <TokenTradersOverviewWidget chain={chain} address={address} />
202
+ <TokenTransactionsOverviewWidget chain={chain} address={address} />
203
+ <TokenVolumesOverviewWidget chain={chain} address={address} />
204
+ </div>
205
+
206
+ <TokenActivitiesListWidget chain={chain} address={address} />
207
+ <TokenHoldersListWidget chain={chain} address={address} />
208
+
209
+ <div className="grid grid-cols-1 gap-4 lg:grid-cols-2">
210
+ <TokenAboutWidget chain={chain} address={address} />
211
+ <TokenSecurityWidget chain={chain} address={address} />
212
+ <TokenCategoriesWidget chain={chain} address={address} />
213
+ <TokenLiquiditiesWidget chain={chain} address={address} />
214
+ </div>
215
+ </div>
216
+ );
217
+ }
218
+ ```
219
+
140
220
  ## Future Improvements
141
221
 
142
222
  - Add tab system (Discover / Favorite / View) for the empty-state content when no keyword is entered.
143
223
  - Support sort and filter controls in search result headers.
144
224
  - Add chain selector to scope search to a specific chain.
145
225
  - Support custom `atomWithStorage` storage adapter for search history (e.g. server-side persistence).
226
+ - Token-detail widgets: add skeleton loading states that match the final layout.
227
+ - Token-holders list: wire a real-time WebSocket channel once the server exposes one (currently refreshes via pagination).