@chainberry/ui-components 1.0.14 → 1.0.16

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/dist/index.d.ts CHANGED
@@ -30,6 +30,114 @@ export declare function ActionFooter({ actions, bleed, className, ...props }: {
30
30
  className?: string;
31
31
  } & Omit<ComponentProps<"div">, "className">): JSX.Element;
32
32
 
33
+ /** Fields every activity row carries, regardless of kind. */
34
+ declare type ActivityBase = {
35
+ /** stable id + React key */
36
+ id: string;
37
+ /** e.g. "Jul 14, 2026" */
38
+ date: string;
39
+ /** e.g. "03:41 PM" */
40
+ time: string;
41
+ status: TxStatus;
42
+ };
43
+
44
+ export declare namespace activityData {
45
+ export {
46
+ activityTimestamp,
47
+ TREASURY_ACTIVITY,
48
+ TREASURY_ACTIVITY as default
49
+ }
50
+ }
51
+
52
+ export declare function ActivityDetailPanel({ record, open, onOpenChange, show, onApprove, onReject, }: {
53
+ record: TreasuryActivityRecord | null;
54
+ open: boolean;
55
+ onOpenChange: (open: boolean) => void;
56
+ /** per-section visibility — every section defaults to shown */
57
+ show?: ActivityDetailVisibility;
58
+ onApprove?: () => void;
59
+ onReject?: () => void;
60
+ }): JSX.Element;
61
+
62
+ /** Per-section visibility — every section defaults to shown. Lets a caller (or a
63
+ story) trim sections without touching the panel. */
64
+ declare type ActivityDetailVisibility = {
65
+ timeline?: boolean;
66
+ approvals?: boolean;
67
+ compliance?: boolean;
68
+ onchain?: boolean;
69
+ notes?: boolean;
70
+ };
71
+
72
+ declare type ActivityFilter = {
73
+ kinds: ActivityKind[];
74
+ statuses: TxStatus[];
75
+ };
76
+
77
+ export declare function ActivityFilterPanel({ open, onOpenChange, value, statuses, onApply, }: {
78
+ open: boolean;
79
+ onOpenChange: (open: boolean) => void;
80
+ value: ActivityFilter;
81
+ /** statuses present in the feed, in display order */
82
+ statuses: TxStatus[];
83
+ onApply: (filter: ActivityFilter) => void;
84
+ }): JSX.Element;
85
+
86
+ export declare namespace activityFilters {
87
+ export {
88
+ isFilterEmpty_2 as isFilterEmpty,
89
+ filterMatches_2 as filterMatches,
90
+ ActivityFilter,
91
+ EMPTY_FILTER_2 as EMPTY_FILTER,
92
+ KIND_OPTIONS
93
+ }
94
+ }
95
+
96
+ /** The `kind` discriminator, handy for iterating / filter chips. */
97
+ declare type ActivityKind = TreasuryActivityRecord["kind"];
98
+
99
+ export declare namespace activityKinds {
100
+ export {
101
+ KIND_LABEL,
102
+ KIND_DIRECTION,
103
+ KIND_ICON
104
+ }
105
+ }
106
+
107
+ /** Flattened text of a row, for the page-level search box. */
108
+ export declare function activitySearchText(r: TreasuryActivityRecord): string;
109
+
110
+ export declare function ActivityTable({ data, pageSize, layout, className, onRowClick, }: {
111
+ data: TreasuryActivityRecord[];
112
+ /** rows per page; the pagination footer follows the Transactions table */
113
+ pageSize?: number;
114
+ /** "fill" = fixed header + scrolling body + pinned footer (needs a
115
+ flex-column parent with a height, like the Transactions table); "auto" =
116
+ normal document flow */
117
+ layout?: "auto" | "fill";
118
+ className?: string;
119
+ /** click a row to open its Activity details panel */
120
+ onRowClick?: (row: TreasuryActivityRecord) => void;
121
+ }): JSX.Element;
122
+
123
+ /** "Jul 14, 2026" + "03:41 PM" → a sortable epoch (0 when unparseable). */
124
+ declare function activityTimestamp(r: {
125
+ date: string;
126
+ time: string;
127
+ }): number;
128
+
129
+ export declare namespace activityTypes {
130
+ export {
131
+ DepositActivity,
132
+ WithdrawalActivity,
133
+ TransferActivity,
134
+ ConversionActivity,
135
+ AutomationActivity,
136
+ TreasuryActivityRecord,
137
+ ActivityKind
138
+ }
139
+ }
140
+
33
141
  export declare function AmountField({ id, label, value, onChange,
34
142
  /** trailing unit, e.g. the coin code */
35
143
  suffix,
@@ -124,6 +232,22 @@ export declare function AssetValue({ value, code, icon, className, }: {
124
232
  className?: string;
125
233
  }): JSX.Element;
126
234
 
235
+ /** One run of a scheduled automation rule — bundles many on-chain transactions
236
+ into a single activity row (Amount shows the batch total + a tx count). */
237
+ declare type AutomationActivity = ActivityBase & {
238
+ kind: "automation";
239
+ /** rule name, e.g. "Automatic Withdraw" · "Sweep" · "Payout Top-up" */
240
+ rule: string;
241
+ /** source side, e.g. "Main" / "User wallets" / "Operational" */
242
+ fromLabel: string;
243
+ /** destination side, e.g. "External wallets" / "Main" / "Payout" */
244
+ toLabel: string;
245
+ /** batch total in fiat, e.g. "$48,320.00" */
246
+ amountFiat: string;
247
+ /** number of on-chain transactions the run bundled */
248
+ txCount: number;
249
+ };
250
+
127
251
  export declare function Avatar({ src, name, size, className, }: {
128
252
  src?: string;
129
253
  name?: string;
@@ -339,6 +463,22 @@ export declare function ConfirmDialog({ open, onOpenChange, title, description,
339
463
  /** Past conversions — the team audit trail. Mixed members, wallets and pairs. */
340
464
  declare const CONVERSION_HISTORY: ConversionRecord[];
341
465
 
466
+ /** A swap of one treasury asset for another. Details reads "FROM → TO". */
467
+ declare type ConversionActivity = ActivityBase & {
468
+ kind: "conversion";
469
+ fromCoin: string;
470
+ toCoin: string;
471
+ /** signed from figure — an outflow, e.g. "-0.05000000" */
472
+ fromAmount: string;
473
+ /** signed to figure — an inflow, e.g. "+3,069.35" */
474
+ toAmount: string;
475
+ /** USD value of the conversion, e.g. "$3,069.35" */
476
+ amountFiat: string;
477
+ /** wallet the funds were converted in */
478
+ wallet?: string;
479
+ initiator?: string;
480
+ };
481
+
342
482
  /** One past conversion — the team audit trail. */
343
483
  declare type ConversionRecord = {
344
484
  id: string;
@@ -534,6 +674,19 @@ declare const DEPOSIT_HISTORY: DepositRecord[];
534
674
  address shown for the chosen coin+network. */
535
675
  declare const DEPOSIT_WALLETS: DepositWallet[];
536
676
 
677
+ /** Inbound funds landing in a treasury wallet. Details reads "COIN → wallet". */
678
+ declare type DepositActivity = ActivityBase & {
679
+ kind: "deposit";
680
+ coin: string;
681
+ network: string;
682
+ /** receiving treasury wallet, e.g. "Main Wallet" */
683
+ toWallet: string;
684
+ /** signed inflow, e.g. "+450.00" */
685
+ amount: string;
686
+ /** signed fiat sub-line, e.g. "+$450.00" */
687
+ amountFiat: string;
688
+ };
689
+
537
690
  export declare namespace depositData {
538
691
  export {
539
692
  figureToNumber_2 as figureToNumber,
@@ -708,6 +861,8 @@ export declare function DropdownMenuTrigger(props: ComponentProps<typeof Dropdow
708
861
 
709
862
  declare const EMPTY_FILTER: TxFilter;
710
863
 
864
+ declare const EMPTY_FILTER_2: ActivityFilter;
865
+
711
866
  declare type Endpoint = {
712
867
  /** human label, e.g. a named wallet — omit for a raw typed address */
713
868
  label?: string;
@@ -740,6 +895,8 @@ declare function figureToNumber_3(value: string): number;
740
895
 
741
896
  declare function filterMatches(tx: Transaction, f: TxFilter): boolean;
742
897
 
898
+ declare function filterMatches_2(r: TreasuryActivityRecord, f: ActivityFilter): boolean;
899
+
743
900
  /** A short, human name summarizing the selection — used to prefill the preset name. */
744
901
  declare function filterToName(f: TxFilter): string;
745
902
 
@@ -1094,6 +1251,19 @@ export declare function Input({ className, type, ...props }: React_2.ComponentPr
1094
1251
 
1095
1252
  declare function isFilterEmpty(f: TxFilter): boolean;
1096
1253
 
1254
+ declare function isFilterEmpty_2(f: ActivityFilter): boolean;
1255
+
1256
+ declare const KIND_DIRECTION: Record<ActivityKind, PaymentDirection>;
1257
+
1258
+ declare const KIND_ICON: Partial<Record<ActivityKind, IconSvgElement>>;
1259
+
1260
+ declare const KIND_LABEL: Record<ActivityKind, string>;
1261
+
1262
+ declare const KIND_OPTIONS: {
1263
+ value: ActivityKind;
1264
+ label: string;
1265
+ }[];
1266
+
1097
1267
  export declare function Label({ className, ...props }: ComponentProps<typeof LabelPrimitive.Root>): JSX.Element;
1098
1268
 
1099
1269
  export declare function Logo({ src, alt, href, collapsed, }: {
@@ -2054,6 +2224,25 @@ export declare function TransactionSummary({ detail, show, className, }: {
2054
2224
 
2055
2225
  export declare type TransactionSummaryField = 'type' | 'status' | 'amount' | 'amountFiat';
2056
2226
 
2227
+ /** Internal wallet → wallet move of a single asset. Amount is unsigned. */
2228
+ declare type TransferActivity = ActivityBase & {
2229
+ kind: "transfer";
2230
+ coin: string;
2231
+ network: string;
2232
+ fromWallet: string;
2233
+ toWallet: string;
2234
+ /** unsigned figure, e.g. "5,000.00" */
2235
+ amount: string;
2236
+ amountFiat: string;
2237
+ initiator?: string;
2238
+ };
2239
+
2240
+ /** The unified Treasury Activity feed — all kinds merged, newest first. */
2241
+ declare const TREASURY_ACTIVITY: TreasuryActivityRecord[];
2242
+
2243
+ /** One row in the Treasury Activity feed — a discriminated union over `kind`. */
2244
+ declare type TreasuryActivityRecord = DepositActivity | WithdrawalActivity | TransferActivity | ConversionActivity | AutomationActivity;
2245
+
2057
2246
  declare type TxFilter = {
2058
2247
  types: TxType[];
2059
2248
  statuses: TxStatus[];
@@ -2187,6 +2376,22 @@ export declare function WalletRowActions({ variant,
2187
2376
  /** Past withdrawals — the team audit trail. Mixed members, wallets and chains. */
2188
2377
  declare const WITHDRAWAL_HISTORY: WithdrawalRecord[];
2189
2378
 
2379
+ /** Outbound funds leaving a treasury wallet for an address. */
2380
+ declare type WithdrawalActivity = ActivityBase & {
2381
+ kind: "withdrawal";
2382
+ coin: string;
2383
+ network: string;
2384
+ /** source treasury wallet, e.g. "Main Wallet" */
2385
+ fromWallet: string;
2386
+ /** destination on-chain address (rendered truncated, copyable in full) */
2387
+ toAddress: string;
2388
+ /** signed outflow, e.g. "-199.00" */
2389
+ amount: string;
2390
+ amountFiat: string;
2391
+ /** team member who initiated it */
2392
+ initiator?: string;
2393
+ };
2394
+
2190
2395
  /** One past withdrawal — the audit-trail row shown in the history table. */
2191
2396
  declare type WithdrawalRecord = {
2192
2397
  id: string;