@lukso/transaction-view-core 0.7.8 → 0.7.9-dev.4059436

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,876 +0,0 @@
1
- export { safeCustomElement } from '@lukso/core/utils';
2
- import * as lit from 'lit';
3
- import { LitElement, ReactiveController, ReactiveControllerHost, TemplateResult } from 'lit';
4
- import { CoreLitElement } from '../styles/index.js';
5
- import { ImageResult, ImageLoadOptions, AddressImageData, UseTransactionViewOptions, ViewMatch } from '@lukso/transaction-view-headless';
6
- import { Signal } from '@preact/signals-core';
7
- import { DecoderResult } from '@lukso/transaction-decoder';
8
-
9
- /**
10
- * Address data interface for display
11
- */
12
- interface AddressData$1 {
13
- address: string;
14
- name?: string;
15
- lsp4TokenName?: string;
16
- lsp4TokenSymbol?: string;
17
- baseAsset?: {
18
- lsp4TokenName?: string;
19
- lsp4TokenSymbol?: string;
20
- };
21
- profileImages?: any[];
22
- avatar?: any[];
23
- icon?: any[];
24
- images?: any[];
25
- __gqltype?: string;
26
- __identity?: string;
27
- identity?: string;
28
- }
29
- /**
30
- * Universal address display component with profile resolution
31
- *
32
- * Displays an address with profile image and name, supporting both
33
- * Universal Profiles and contract addresses with proper styling.
34
- *
35
- * @example
36
- * ```html
37
- * <address-display
38
- * address="0x1234..."
39
- * .resolved="${resolvedData}"
40
- * size="medium"
41
- * show-copy-button
42
- * ></address-display>
43
- * ```
44
- */
45
- declare class AddressDisplay extends LitElement {
46
- /**
47
- * The address to display (required)
48
- */
49
- value: string;
50
- /**
51
- * @deprecated Use `value` instead
52
- */
53
- address?: string;
54
- /**
55
- * Resolved address data (profile, images, etc.)
56
- */
57
- resolved?: AddressData$1;
58
- /**
59
- * Display size
60
- */
61
- size: 'x-small' | 'small' | 'medium' | 'large';
62
- /**
63
- * Optional label to display above the address
64
- */
65
- label?: string;
66
- /**
67
- * Whether to show the copy button
68
- */
69
- showCopyButton: boolean;
70
- /**
71
- * Whether to show the full address or just the name
72
- */
73
- nameOnly: boolean;
74
- /**
75
- * Maximum width for the name display (in pixels)
76
- */
77
- maxWidth: number;
78
- /**
79
- * Get the effective address value (supports both `value` and legacy `address` props)
80
- */
81
- private get effectiveAddress();
82
- private imageLoader;
83
- private addressResolver;
84
- isLoadingImage: boolean;
85
- private imageTask;
86
- /**
87
- * Get pixel size for the current size setting
88
- */
89
- private getSizePixels;
90
- /**
91
- * Get display name for the address
92
- */
93
- private getDisplayName;
94
- /**
95
- * Check if this is a contract address (shows square icon)
96
- */
97
- private get isContract();
98
- /**
99
- * Get prefix for the address display
100
- */
101
- private get addressPrefix();
102
- /**
103
- * Check if should show name colors
104
- */
105
- private get shouldShowNameColor();
106
- /**
107
- * Handle copy button click
108
- */
109
- private handleCopy;
110
- /**
111
- * Handle address click
112
- */
113
- private handleAddressClick;
114
- render(): lit.TemplateResult<1>;
115
- static styles: lit.CSSResult;
116
- }
117
- declare global {
118
- interface HTMLElementTagNameMap {
119
- 'address-display': AddressDisplay;
120
- }
121
- }
122
-
123
- /**
124
- * Address text view component (text only, no image)
125
- *
126
- * A text-only address display component that shows name and/or address.
127
- * Use alongside <icon-view> for complete address presentation.
128
- *
129
- * @example
130
- * ```html
131
- * <address-view
132
- * address="0x1234..."
133
- * size="medium"
134
- * ></address-view>
135
- * ```
136
- */
137
- declare class AddressView extends CoreLitElement {
138
- /**
139
- * The address to display (required)
140
- */
141
- address: string;
142
- /**
143
- * Display size
144
- */
145
- size: 'x-small' | 'small' | 'medium' | 'large';
146
- /**
147
- * Whether to show only the name (no address)
148
- */
149
- nameOnly: boolean;
150
- /**
151
- * Whether to show only the address (no name)
152
- */
153
- addressOnly: boolean;
154
- /**
155
- * Card view: render with bordered container, header label and copy button
156
- */
157
- isCardView: boolean;
158
- /**
159
- * Optional label to show in card header (only when isCardView)
160
- */
161
- label?: string;
162
- /**
163
- * Whether to show a copy button (only relevant for card view)
164
- */
165
- showCopyButton: boolean;
166
- /**
167
- * Maximum width for the display (in pixels)
168
- */
169
- maxWidth: number;
170
- /**
171
- * Whether to show the small identicon next to the name/address
172
- */
173
- showIdenticon: boolean;
174
- /**
175
- * Address text color token (e.g., "red-55")
176
- */
177
- addressColor?: string;
178
- /**
179
- * Name text color token (e.g., "blue-50")
180
- */
181
- nameColor?: string;
182
- private isLoadingAddress;
183
- private identicon?;
184
- private addressResolver;
185
- private addressTask;
186
- /**
187
- * Get the display address (first segment only for compound addresses)
188
- * e.g., "0x123...-0x456..." becomes "0x123..."
189
- */
190
- private get displayAddress();
191
- /**
192
- * Get display name for the address
193
- */
194
- private getDisplayName;
195
- /**
196
- * Get prefix for the address display
197
- */
198
- private get addressPrefix();
199
- /**
200
- * Check if should show name colors
201
- */
202
- private get shouldShowNameColor();
203
- /**
204
- * Handle address click
205
- */
206
- private handleClick;
207
- /** Generate identicon when address changes */
208
- protected willUpdate(changed: Map<string, unknown>): void;
209
- /** Copy the display address to clipboard (card view) */
210
- private handleCopy;
211
- /** ========== RENDER HELPERS (Use Cases) ========== */
212
- /** Pixel size mapping for identicon based on component size */
213
- private getIdenticonSizePx;
214
- /**
215
- * Render only the name (and optionally the address hash when allowed for profiles)
216
- */
217
- private renderNameOnly;
218
- /**
219
- * Render only the raw address (no name)
220
- */
221
- private renderAddressOnly;
222
- /**
223
- * Render both name and (conditionally) the address hash (profiles show hash, contracts may hide it)
224
- */
225
- private renderNameAndAddress;
226
- private renderIdenticon;
227
- /** Map size to a typography class for the label */
228
- private getLabelClass;
229
- private renderDisplayName;
230
- /**
231
- * Decide which of the three core inline variants to render
232
- */
233
- private renderInlineVariant;
234
- render(): lit.TemplateResult<1>;
235
- }
236
- declare global {
237
- interface HTMLElementTagNameMap {
238
- 'address-view': AddressView;
239
- }
240
- }
241
-
242
- interface SelectOption {
243
- value: string;
244
- label: string;
245
- disabled: boolean;
246
- }
247
- declare class CustomOption extends CoreLitElement {
248
- selected: boolean;
249
- disabled: boolean;
250
- hoverable: boolean;
251
- render(): lit.TemplateResult<1>;
252
- }
253
- declare class CustomSelect extends CoreLitElement {
254
- value?: string;
255
- open: boolean;
256
- options: SelectOption[];
257
- size: 'x-small' | 'small' | 'medium' | 'large';
258
- private toggleOpen;
259
- private close;
260
- private onOptionClick;
261
- private onKeyDown;
262
- private onOutsideClick;
263
- connectedCallback(): void;
264
- disconnectedCallback(): void;
265
- updated(): void;
266
- private getSelectedOption;
267
- private getIdenticonSizePx;
268
- private renderIdenticon;
269
- private renderOptionLabel;
270
- render(): lit.TemplateResult<1>;
271
- }
272
- declare global {
273
- interface HTMLElementTagNameMap {
274
- 'custom-select': CustomSelect;
275
- 'custom-option': CustomOption;
276
- }
277
- }
278
-
279
- /**
280
- * Compact function name badge with icon
281
- * Props:
282
- * - label (deprecated): text to display; use default slot instead
283
- * - icon: lukso-icon name
284
- * - size: x-small | small | medium | large (affects paddings and font)
285
- * - color: optional lukso-icon color token (e.g., "blue-50")
286
- */
287
- declare class FunctionNameView extends CoreLitElement {
288
- /**
289
- * Deprecated: Prefer slot content for the label. Will be used as fallback
290
- * when no slot is provided to maintain backward compatibility.
291
- */
292
- label: string;
293
- icon: string;
294
- size: 'x-small' | 'small' | 'medium' | 'large';
295
- color?: string;
296
- private getPadding;
297
- private getFontSize;
298
- private getIconSize;
299
- private getHeight;
300
- render(): lit.TemplateResult<1>;
301
- }
302
- declare global {
303
- interface HTMLElementTagNameMap {
304
- 'function-name-view': FunctionNameView;
305
- }
306
- }
307
-
308
- type GasProvider = {
309
- type: 'relayer' | 'controller';
310
- id: string;
311
- };
312
- type Relayer = {
313
- id: string;
314
- name: string;
315
- isCustom: boolean;
316
- apiUrl: string;
317
- chainIds: string[];
318
- createdAt: number;
319
- website?: string;
320
- };
321
- declare class GasProviderView extends CoreLitElement {
322
- allRelayers: Relayer[];
323
- balance: number;
324
- selectedGasProvider?: GasProvider;
325
- controllerAddress?: string;
326
- controllerName?: string;
327
- symbol: string;
328
- decimals: number;
329
- transactionFee: number;
330
- relayerAvailable: number;
331
- relayerUsed: number;
332
- relayerToBeUsed: number;
333
- relayerResetDate: string;
334
- private formatToken;
335
- private onSelectChanged;
336
- private renderProgress;
337
- private renderControllerProgress;
338
- private renderRelayerProgress;
339
- private displayRelayerResetDate;
340
- render(): lit.TemplateResult<1>;
341
- }
342
- declare global {
343
- interface HTMLElementTagNameMap {
344
- 'gas-provider-view': GasProviderView;
345
- }
346
- }
347
-
348
- /**
349
- * Address data interface for display
350
- */
351
- interface AddressData {
352
- address: string;
353
- name?: string;
354
- lsp4TokenName?: string;
355
- lsp4TokenSymbol?: string;
356
- baseAsset?: {
357
- lsp4TokenName?: string;
358
- lsp4TokenSymbol?: string;
359
- };
360
- profileImages?: any[];
361
- avatar?: any[];
362
- icon?: any[];
363
- images?: any[];
364
- __gqltype?: string;
365
- __identity?: string;
366
- identity?: string;
367
- }
368
- /**
369
- * Icon/Avatar display component for addresses
370
- *
371
- * Displays just the profile image/avatar for an address with proper styling.
372
- * Supports both Universal Profiles and contract addresses.
373
- *
374
- * @example
375
- * ```html
376
- * <icon-view
377
- * address="0x1234..."
378
- * .resolved="${resolvedData}"
379
- * size="medium"
380
- * ></icon-view>
381
- * ```
382
- */
383
- declare class IconView extends CoreLitElement {
384
- /**
385
- * The address to display (required)
386
- */
387
- address: string;
388
- /**
389
- * Resolved address data (profile, images, etc.)
390
- */
391
- resolved?: AddressData;
392
- /**
393
- * Display size
394
- */
395
- size: 'x-small' | 'small' | 'medium' | 'large' | '2x-large';
396
- /**
397
- * Optional label to display above the icon
398
- */
399
- label?: string;
400
- /**
401
- * Whether to show the resolved display name below/beside the icon
402
- */
403
- showName: boolean;
404
- /**
405
- * Name placement relative to the icon: 'below' (stacked) or 'beside' (inline)
406
- */
407
- namePosition: 'below' | 'beside';
408
- /**
409
- * Maximum width for the name label (pixels)
410
- */
411
- maxWidth: number;
412
- /**
413
- * Whether to show small identicon badge on the avatar
414
- */
415
- showIconIdenticon: boolean;
416
- /**
417
- * Whether to show small identicon badge on the label
418
- */
419
- showLabelIdenticon: boolean;
420
- /**
421
- * Force unresolved display (for testing)
422
- */
423
- forceUnresolved: boolean;
424
- /**
425
- * Property name to use for loading images (e.g., 'images', 'icons', 'profileImages')
426
- * If not set, uses default image loading logic
427
- */
428
- imageHint?: string;
429
- /**
430
- * Index to use when loading from an image array (e.g., images[0])
431
- * Only used when imageHint points to an array property
432
- */
433
- imageIndex?: number;
434
- private imageLoader;
435
- private addressResolver;
436
- isLoadingAddress: boolean;
437
- isLoadingImage: boolean;
438
- private addressTask;
439
- private imageTask;
440
- /**
441
- * Get pixel size for the current size setting
442
- */
443
- private getSizePixels;
444
- /**
445
- * Check if this is a contract address (shows square icon)
446
- */
447
- private get isContract();
448
- /**
449
- * Handle icon click
450
- */
451
- private handleClick;
452
- render(): lit.TemplateResult<1>;
453
- }
454
- declare global {
455
- interface HTMLElementTagNameMap {
456
- 'icon-view': IconView;
457
- }
458
- }
459
-
460
- /**
461
- * Lit controller state for image loading
462
- */
463
- interface ImageLoadState {
464
- result: ImageResult | null;
465
- loading: boolean;
466
- error: string | null;
467
- }
468
- /**
469
- * Lit Reactive Controller for image loading functionality
470
- * Integrates the headless image loader with Lit elements
471
- */
472
- declare class ImageLoaderController implements ReactiveController {
473
- private host;
474
- private headlessLoader;
475
- private _state;
476
- constructor(host: ReactiveControllerHost);
477
- hostConnected(): void;
478
- hostDisconnected(): void;
479
- get state(): ImageLoadState;
480
- get isLoading(): boolean;
481
- get error(): string | null;
482
- get result(): ImageResult | null;
483
- /**
484
- * Load image from data array
485
- */
486
- loadImage(imageData: any[], options?: ImageLoadOptions): Promise<ImageResult | null>;
487
- /**
488
- * Load profile image from address data
489
- */
490
- loadProfileImage(addressData: AddressImageData, options?: ImageLoadOptions): Promise<ImageResult | null>;
491
- /**
492
- * Load image from address signal (reactive)
493
- */
494
- loadFromSignal(addressSignal: Signal<{
495
- data?: AddressImageData;
496
- }>, options?: ImageLoadOptions): void;
497
- /**
498
- * Get fallback image synchronously
499
- */
500
- getFallbackImage(addressData: AddressImageData): ImageResult;
501
- /**
502
- * Check if address is a contract
503
- */
504
- isContractAddress(addressData: AddressImageData): boolean;
505
- /**
506
- * Clear current state
507
- */
508
- clear(): void;
509
- private updateState;
510
- }
511
- /**
512
- * Utility function to create an image loader controller
513
- */
514
- declare function useImageLoader(host: ReactiveControllerHost): ImageLoaderController;
515
-
516
- declare class NotificationView extends CoreLitElement {
517
- /** Variant controls background/emphasis */
518
- variant: 'success' | 'warning' | 'error' | 'info';
519
- /** Notification message content */
520
- message: string;
521
- /** Optional title shown above the description */
522
- title: string;
523
- /** Whether the acknowledge button is shown */
524
- acknowledgeable: boolean;
525
- /** Text shown next to acknowledge checkbox */
526
- acknowledgeText: string;
527
- /** Internal acknowledged state (for default behavior) */
528
- private acknowledged;
529
- /** External control for acknowledge checkbox */
530
- checked: boolean;
531
- private handleAcknowledgeChange;
532
- render(): lit.TemplateResult<1>;
533
- private renderIcon;
534
- private getVariantColor;
535
- private getVariantBackgroundClass;
536
- }
537
- declare global {
538
- interface HTMLElementTagNameMap {
539
- 'notification-view': NotificationView;
540
- }
541
- }
542
-
543
- type ProgressSegment = {
544
- value: number;
545
- color?: string;
546
- title?: string;
547
- };
548
- declare class ProgressView extends CoreLitElement {
549
- data: ProgressSegment[];
550
- label?: string;
551
- unit?: string;
552
- address?: string;
553
- labelPosition: 'left' | 'right';
554
- private renderGasProviderLabel;
555
- render(): lit.TemplateResult<1>;
556
- }
557
- declare global {
558
- interface HTMLElementTagNameMap {
559
- 'progress-view': ProgressView;
560
- }
561
- }
562
-
563
- /**
564
- * ScrollToBottomButton (core) - reusable scroll helper.
565
- * Emits `scroll-to-bottom` when clicked.
566
- */
567
- declare class ScrollToBottomButton extends CoreLitElement {
568
- /** Controls visibility */
569
- show: boolean;
570
- /** Icon color (CSS var or token) */
571
- color: string;
572
- /** Icon size token */
573
- iconSize: 'x-small' | 'small' | 'medium' | 'large';
574
- /** Icon name (attribute: icon-name) */
575
- iconName: string;
576
- private handleClick;
577
- render(): lit.TemplateResult<1>;
578
- }
579
- declare global {
580
- interface HTMLElementTagNameMap {
581
- 'scroll-to-bottom-button': ScrollToBottomButton;
582
- }
583
- }
584
-
585
- /**
586
- * Lit Reactive Controller for @preact/signals-core integration
587
- * This controller allows Lit elements to reactively update when signals change
588
- */
589
- declare class SignalController<T = any> implements ReactiveController {
590
- private host;
591
- private signal;
592
- private unsubscribe?;
593
- constructor(host: ReactiveControllerHost, signal: Signal<T>);
594
- hostConnected(): void;
595
- hostDisconnected(): void;
596
- get value(): T;
597
- /**
598
- * Create a new SignalController for a different signal
599
- */
600
- static create<U>(host: ReactiveControllerHost, signal: Signal<U>): SignalController<U>;
601
- }
602
- /**
603
- * Lit Reactive Controller for multiple signals
604
- * Updates the host when any of the tracked signals change
605
- */
606
- declare class MultiSignalController implements ReactiveController {
607
- private host;
608
- private signals;
609
- private unsubscribes;
610
- constructor(host: ReactiveControllerHost, signals: Signal<any>[]);
611
- hostConnected(): void;
612
- hostDisconnected(): void;
613
- getValue(index: number): any;
614
- getValues(): any[];
615
- }
616
- /**
617
- * Utility function to create a signal controller
618
- */
619
- declare function useSignal<T>(host: ReactiveControllerHost, signal: Signal<T>): SignalController<T>;
620
- /**
621
- * Utility function to create a multi-signal controller
622
- */
623
- declare function useSignals(host: ReactiveControllerHost, signals: Signal<any>[]): MultiSignalController;
624
-
625
- /**
626
- * Lit controller state for transaction view
627
- */
628
- interface TransactionViewState {
629
- matches: ViewMatch[];
630
- bestMatch: ViewMatch | null;
631
- component: any;
632
- loading: boolean;
633
- error: Error | null;
634
- isResolvingAddresses: boolean;
635
- resolvedAddresses: Record<string, any>;
636
- }
637
- /**
638
- * Lit Reactive Controller for transaction view functionality
639
- * Integrates the headless transaction view system with Lit elements
640
- */
641
- declare class TransactionViewController implements ReactiveController {
642
- private transaction;
643
- private options;
644
- private host;
645
- private headlessInstance;
646
- private _state;
647
- private syncInterval?;
648
- constructor(host: ReactiveControllerHost, transaction: DecoderResult, options: UseTransactionViewOptions);
649
- hostConnected(): void;
650
- hostDisconnected(): void;
651
- get state(): TransactionViewState;
652
- get matches(): ViewMatch[];
653
- get bestMatch(): ViewMatch | null;
654
- get component(): any;
655
- get isLoading(): boolean;
656
- get error(): Error | null;
657
- get isResolvingAddresses(): boolean;
658
- get resolvedAddresses(): Record<string, any>;
659
- /**
660
- * Load a specific match
661
- */
662
- loadMatch(match: ViewMatch): Promise<any>;
663
- /**
664
- * Load the best match
665
- */
666
- loadBestMatch(): Promise<any>;
667
- /**
668
- * Refresh matches
669
- */
670
- refreshMatches(): void;
671
- /**
672
- * Resolve addresses
673
- */
674
- resolveAddresses(): Promise<void>;
675
- /**
676
- * Update transaction and options
677
- */
678
- update(transaction: DecoderResult, options: UseTransactionViewOptions): void;
679
- /**
680
- * Get the best matching view without loading
681
- */
682
- static findBestMatch(transaction: DecoderResult, framework?: 'lit' | 'rn'): ViewMatch | null;
683
- /**
684
- * Get all matching views without loading
685
- */
686
- static findAllMatches(transaction: DecoderResult, framework?: 'lit' | 'rn'): ViewMatch[];
687
- private initialize;
688
- private setupSync;
689
- private syncState;
690
- private updateState;
691
- }
692
- /**
693
- * Utility function to create a transaction view controller
694
- */
695
- declare function useTransactionView(host: ReactiveControllerHost, transaction: DecoderResult, options: UseTransactionViewOptions): TransactionViewController;
696
- /**
697
- * Controller for working with transaction signals from the decoder
698
- */
699
- declare class TransactionSignalController<_T = any> implements ReactiveController {
700
- private host;
701
- private signal;
702
- private unsubscribe?;
703
- private _data;
704
- private _loading;
705
- private _error;
706
- constructor(host: ReactiveControllerHost, signal: Signal<{
707
- data: DecoderResult;
708
- loading: boolean;
709
- error?: string;
710
- }>);
711
- hostConnected(): void;
712
- hostDisconnected(): void;
713
- get data(): DecoderResult | null;
714
- get loading(): boolean;
715
- get error(): string | null;
716
- get isReady(): boolean;
717
- private setupSignalSync;
718
- }
719
- /**
720
- * Utility function to create a transaction signal controller
721
- */
722
- declare function useTransactionSignal(host: ReactiveControllerHost, signal: Signal<{
723
- data: DecoderResult;
724
- loading: boolean;
725
- error?: string;
726
- }>): TransactionSignalController;
727
-
728
- /**
729
- * UrlView - display a URL with favicon/logo and human-friendly name
730
- *
731
- * Props:
732
- * - url (required): full URL like https://example.com/path
733
- * - size: x-small | small | medium | large
734
- * - label?: optional label displayed above
735
- * - showLogo: whether to show favicon/logo (default true)
736
- * - logoUrl?: explicit logo URL to use instead of favicon
737
- * - maxWidth: name truncation width in px
738
- */
739
- declare class UrlView extends CoreLitElement {
740
- url: string;
741
- size: 'x-small' | 'small' | 'medium' | 'large';
742
- label?: string;
743
- showLogo: boolean;
744
- logoUrl?: string;
745
- maxWidth: number;
746
- private favicon?;
747
- private displayName;
748
- private faviconCandidates;
749
- private faviconIndex;
750
- protected willUpdate(changed: Map<string, unknown>): void;
751
- private computeMeta;
752
- private handleImageError;
753
- private getSizePixels;
754
- render(): lit.TemplateResult<1>;
755
- }
756
- declare global {
757
- interface HTMLElementTagNameMap {
758
- 'url-view': UrlView;
759
- }
760
- }
761
-
762
- /**
763
- * Value display component
764
- *
765
- * Displays various types of values with appropriate formatting and styling.
766
- * Supports numbers, strings, booleans, BigInt values, and special handling
767
- * for Ethereum values with currency symbols.
768
- *
769
- * @example
770
- * ```html
771
- * <value-view
772
- * value="1000000000000000000"
773
- * type="currency"
774
- * currency-symbol="LYX"
775
- * decimals="18"
776
- * ></value-view>
777
- * ```
778
- */
779
- declare class ValueView extends CoreLitElement {
780
- /**
781
- * The value to display (required)
782
- * Can be string, number, boolean, or bigint
783
- */
784
- value?: TemplateResult | string | number | boolean | bigint | null;
785
- /**
786
- * The key name (used for special formatting logic)
787
- */
788
- keyName?: string;
789
- containerClassNames?: string;
790
- /**
791
- * Value type for formatting
792
- */
793
- type: 'string' | 'number' | 'boolean' | 'currency' | 'bigint' | 'address' | 'auto';
794
- /**
795
- * Currency symbol for currency type
796
- */
797
- currencySymbol: string;
798
- /**
799
- * Number of decimals for currency formatting
800
- */
801
- decimals: number;
802
- /**
803
- * Display size
804
- */
805
- size: 'x-small' | 'small' | 'medium' | 'large';
806
- /**
807
- * Whether to show copy button
808
- */
809
- showCopyButton: boolean;
810
- /**
811
- * Render as a card with bordered container and label
812
- */
813
- isCardView: boolean;
814
- /**
815
- * Optional label to show in card header
816
- */
817
- label?: string | TemplateResult;
818
- /**
819
- * Maximum width for truncation
820
- */
821
- maxWidth?: number;
822
- /**
823
- * Token/contract address for automatic metadata resolution
824
- * When provided, ValueView will automatically resolve token symbol and decimals
825
- */
826
- address?: string;
827
- private _hasSlotContent;
828
- private _onSlotChange;
829
- protected firstUpdated(): void;
830
- private get addressResolver();
831
- private addressTask;
832
- /**
833
- * Get the effective type for the value
834
- */
835
- private getEffectiveType;
836
- /**
837
- * Get CSS class for the value type
838
- */
839
- private getValueClass;
840
- /**
841
- * Format the value for display
842
- */
843
- private getFormattedValue;
844
- /**
845
- * Compute currency display parts: numeric portion and symbol
846
- */
847
- private getCurrencyParts;
848
- /** Typography class for numeric value based on size */
849
- private getNumericClass;
850
- /** Typography class for currency symbol based on size */
851
- private getCurrencyClass;
852
- /**
853
- * Get size-appropriate font size
854
- */
855
- private getContainerTextClass;
856
- /**
857
- * Handle copy to clipboard
858
- */
859
- private handleCopy;
860
- /**
861
- * Handle value click
862
- */
863
- private handleClick;
864
- render(): TemplateResult<1>;
865
- /** Whether to use monospace font for the value content */
866
- private getUseMonospace;
867
- /** Map size to a typography class for the label */
868
- private getLabelClass;
869
- }
870
- declare global {
871
- interface HTMLElementTagNameMap {
872
- 'value-view': ValueView;
873
- }
874
- }
875
-
876
- export { type AddressData$1 as AddressData, AddressDisplay, AddressView, CustomOption, CustomSelect, FunctionNameView, GasProviderView, IconView, type ImageLoadState, ImageLoaderController, MultiSignalController, NotificationView, type ProgressSegment, ProgressView, ScrollToBottomButton, type SelectOption, SignalController, TransactionSignalController, TransactionViewController, type TransactionViewState, UrlView, ValueView, useImageLoader, useSignal, useSignals, useTransactionSignal, useTransactionView };