@lukso/transaction-view-core 0.5.0 → 0.6.0-dev.360c7b1
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/.turbo/turbo-build.log +20 -20
- package/.turbo/turbo-typecheck.log +4 -0
- package/CHANGELOG.md +21 -0
- package/dist/index.cjs +131 -220
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -10
- package/dist/index.d.ts +1 -10
- package/dist/index.js +158 -252
- package/dist/index.js.map +1 -1
- package/dist/shared/index.cjs +31 -64
- package/dist/shared/index.cjs.map +1 -1
- package/dist/shared/index.d.cts +8 -20
- package/dist/shared/index.d.ts +8 -20
- package/dist/shared/index.js +43 -76
- package/dist/shared/index.js.map +1 -1
- package/dist/styles/index.cjs +1 -1
- package/dist/styles/index.cjs.map +1 -1
- package/dist/styles/index.js +1 -1
- package/dist/styles/index.js.map +1 -1
- package/package.json +5 -4
- package/src/components/asset-card.ts +63 -80
- package/src/components/contract-card.ts +2 -67
- package/src/components/info-panel.ts +1 -21
- package/src/components/permissions-block.ts +7 -5
- package/src/components/transaction-playback.ts +4 -4
- package/src/shared/address-display.ts +3 -6
- package/src/shared/address-view.ts +2 -18
- package/src/shared/custom-select.ts +1 -1
- package/src/shared/function-name-view.ts +1 -1
- package/src/shared/gas-provider-view.ts +4 -7
- package/src/shared/icon-view.ts +7 -9
- package/src/shared/image-list.ts +3 -4
- package/src/shared/load-web-components.ts +3 -2
- package/src/shared/notification-view.ts +3 -3
- package/src/shared/progress-view.ts +1 -10
- package/src/shared/scroll-to-bottom-button.ts +1 -1
- package/src/shared/signal-controller.ts +3 -1
- package/src/shared/transaction-view-controller.ts +1 -1
- package/src/shared/url-view.ts +3 -3
- package/src/shared/value-view.ts +10 -30
- package/src/styles/styles.css +1 -1
- package/src/utils.test.ts +47 -0
- package/src/utils.ts +82 -0
- package/src/vue-entry.ts +0 -1
- package/tsup.config.ts +3 -3
package/dist/shared/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
|
-
import { LitElement, ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
import { LitElement, ReactiveController, ReactiveControllerHost, TemplateResult } from 'lit';
|
|
3
3
|
import { CoreLitElement } from '../styles/index.cjs';
|
|
4
4
|
import { ImageResult, ImageLoadOptions, AddressImageData, UseTransactionViewOptions, ViewMatch } from '@lukso/transaction-view-headless';
|
|
5
5
|
import { Signal } from '@preact/signals-core';
|
|
@@ -78,10 +78,9 @@ declare class AddressDisplay extends LitElement {
|
|
|
78
78
|
* Get the effective address value (supports both `value` and legacy `address` props)
|
|
79
79
|
*/
|
|
80
80
|
private get effectiveAddress();
|
|
81
|
-
private imageData?;
|
|
82
|
-
private isLoadingImage;
|
|
83
81
|
private imageLoader;
|
|
84
82
|
private addressResolver;
|
|
83
|
+
isLoadingImage: boolean;
|
|
85
84
|
private imageTask;
|
|
86
85
|
/**
|
|
87
86
|
* Get pixel size for the current size setting
|
|
@@ -192,14 +191,6 @@ declare class AddressView extends CoreLitElement {
|
|
|
192
191
|
* Get display name for the address
|
|
193
192
|
*/
|
|
194
193
|
private getDisplayName;
|
|
195
|
-
/**
|
|
196
|
-
* Check if this is a contract address (non-profile)
|
|
197
|
-
*/
|
|
198
|
-
private get isContract();
|
|
199
|
-
/**
|
|
200
|
-
* Check if this should show the address hash (profiles show hash, contracts don't)
|
|
201
|
-
*/
|
|
202
|
-
private get shouldShowAddressHash();
|
|
203
194
|
/**
|
|
204
195
|
* Get prefix for the address display
|
|
205
196
|
*/
|
|
@@ -439,11 +430,10 @@ declare class IconView extends CoreLitElement {
|
|
|
439
430
|
* Only used when imageHint points to an array property
|
|
440
431
|
*/
|
|
441
432
|
imageIndex?: number;
|
|
442
|
-
private imageData?;
|
|
443
|
-
private isLoadingImage;
|
|
444
|
-
private isLoadingAddress;
|
|
445
433
|
private imageLoader;
|
|
446
434
|
private addressResolver;
|
|
435
|
+
isLoadingAddress: boolean;
|
|
436
|
+
isLoadingImage: boolean;
|
|
447
437
|
private addressTask;
|
|
448
438
|
private imageTask;
|
|
449
439
|
/**
|
|
@@ -561,7 +551,6 @@ declare class ProgressView extends CoreLitElement {
|
|
|
561
551
|
address?: string;
|
|
562
552
|
labelPosition: 'left' | 'right';
|
|
563
553
|
private renderGasProviderLabel;
|
|
564
|
-
private renderAddressLabel;
|
|
565
554
|
render(): lit.TemplateResult<1>;
|
|
566
555
|
}
|
|
567
556
|
declare global {
|
|
@@ -706,7 +695,7 @@ declare function useTransactionView(host: ReactiveControllerHost, transaction: D
|
|
|
706
695
|
/**
|
|
707
696
|
* Controller for working with transaction signals from the decoder
|
|
708
697
|
*/
|
|
709
|
-
declare class TransactionSignalController<
|
|
698
|
+
declare class TransactionSignalController<_T = any> implements ReactiveController {
|
|
710
699
|
private host;
|
|
711
700
|
private signal;
|
|
712
701
|
private unsubscribe?;
|
|
@@ -791,7 +780,7 @@ declare class ValueView extends CoreLitElement {
|
|
|
791
780
|
* The value to display (required)
|
|
792
781
|
* Can be string, number, boolean, or bigint
|
|
793
782
|
*/
|
|
794
|
-
value?: string | number | boolean | bigint | null;
|
|
783
|
+
value?: TemplateResult | string | number | boolean | bigint | null;
|
|
795
784
|
/**
|
|
796
785
|
* The key name (used for special formatting logic)
|
|
797
786
|
*/
|
|
@@ -824,7 +813,7 @@ declare class ValueView extends CoreLitElement {
|
|
|
824
813
|
/**
|
|
825
814
|
* Optional label to show in card header
|
|
826
815
|
*/
|
|
827
|
-
label?: string;
|
|
816
|
+
label?: string | TemplateResult;
|
|
828
817
|
/**
|
|
829
818
|
* Maximum width for truncation
|
|
830
819
|
*/
|
|
@@ -834,7 +823,6 @@ declare class ValueView extends CoreLitElement {
|
|
|
834
823
|
* When provided, ValueView will automatically resolve token symbol and decimals
|
|
835
824
|
*/
|
|
836
825
|
address?: string;
|
|
837
|
-
private resolvedMetadata?;
|
|
838
826
|
private _hasSlotContent;
|
|
839
827
|
private _onSlotChange;
|
|
840
828
|
protected firstUpdated(): void;
|
|
@@ -872,7 +860,7 @@ declare class ValueView extends CoreLitElement {
|
|
|
872
860
|
* Handle value click
|
|
873
861
|
*/
|
|
874
862
|
private handleClick;
|
|
875
|
-
render():
|
|
863
|
+
render(): TemplateResult<1>;
|
|
876
864
|
/** Whether to use monospace font for the value content */
|
|
877
865
|
private getUseMonospace;
|
|
878
866
|
/** Map size to a typography class for the label */
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
|
-
import { LitElement, ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
import { LitElement, ReactiveController, ReactiveControllerHost, TemplateResult } from 'lit';
|
|
3
3
|
import { CoreLitElement } from '../styles/index.js';
|
|
4
4
|
import { ImageResult, ImageLoadOptions, AddressImageData, UseTransactionViewOptions, ViewMatch } from '@lukso/transaction-view-headless';
|
|
5
5
|
import { Signal } from '@preact/signals-core';
|
|
@@ -78,10 +78,9 @@ declare class AddressDisplay extends LitElement {
|
|
|
78
78
|
* Get the effective address value (supports both `value` and legacy `address` props)
|
|
79
79
|
*/
|
|
80
80
|
private get effectiveAddress();
|
|
81
|
-
private imageData?;
|
|
82
|
-
private isLoadingImage;
|
|
83
81
|
private imageLoader;
|
|
84
82
|
private addressResolver;
|
|
83
|
+
isLoadingImage: boolean;
|
|
85
84
|
private imageTask;
|
|
86
85
|
/**
|
|
87
86
|
* Get pixel size for the current size setting
|
|
@@ -192,14 +191,6 @@ declare class AddressView extends CoreLitElement {
|
|
|
192
191
|
* Get display name for the address
|
|
193
192
|
*/
|
|
194
193
|
private getDisplayName;
|
|
195
|
-
/**
|
|
196
|
-
* Check if this is a contract address (non-profile)
|
|
197
|
-
*/
|
|
198
|
-
private get isContract();
|
|
199
|
-
/**
|
|
200
|
-
* Check if this should show the address hash (profiles show hash, contracts don't)
|
|
201
|
-
*/
|
|
202
|
-
private get shouldShowAddressHash();
|
|
203
194
|
/**
|
|
204
195
|
* Get prefix for the address display
|
|
205
196
|
*/
|
|
@@ -439,11 +430,10 @@ declare class IconView extends CoreLitElement {
|
|
|
439
430
|
* Only used when imageHint points to an array property
|
|
440
431
|
*/
|
|
441
432
|
imageIndex?: number;
|
|
442
|
-
private imageData?;
|
|
443
|
-
private isLoadingImage;
|
|
444
|
-
private isLoadingAddress;
|
|
445
433
|
private imageLoader;
|
|
446
434
|
private addressResolver;
|
|
435
|
+
isLoadingAddress: boolean;
|
|
436
|
+
isLoadingImage: boolean;
|
|
447
437
|
private addressTask;
|
|
448
438
|
private imageTask;
|
|
449
439
|
/**
|
|
@@ -561,7 +551,6 @@ declare class ProgressView extends CoreLitElement {
|
|
|
561
551
|
address?: string;
|
|
562
552
|
labelPosition: 'left' | 'right';
|
|
563
553
|
private renderGasProviderLabel;
|
|
564
|
-
private renderAddressLabel;
|
|
565
554
|
render(): lit.TemplateResult<1>;
|
|
566
555
|
}
|
|
567
556
|
declare global {
|
|
@@ -706,7 +695,7 @@ declare function useTransactionView(host: ReactiveControllerHost, transaction: D
|
|
|
706
695
|
/**
|
|
707
696
|
* Controller for working with transaction signals from the decoder
|
|
708
697
|
*/
|
|
709
|
-
declare class TransactionSignalController<
|
|
698
|
+
declare class TransactionSignalController<_T = any> implements ReactiveController {
|
|
710
699
|
private host;
|
|
711
700
|
private signal;
|
|
712
701
|
private unsubscribe?;
|
|
@@ -791,7 +780,7 @@ declare class ValueView extends CoreLitElement {
|
|
|
791
780
|
* The value to display (required)
|
|
792
781
|
* Can be string, number, boolean, or bigint
|
|
793
782
|
*/
|
|
794
|
-
value?: string | number | boolean | bigint | null;
|
|
783
|
+
value?: TemplateResult | string | number | boolean | bigint | null;
|
|
795
784
|
/**
|
|
796
785
|
* The key name (used for special formatting logic)
|
|
797
786
|
*/
|
|
@@ -824,7 +813,7 @@ declare class ValueView extends CoreLitElement {
|
|
|
824
813
|
/**
|
|
825
814
|
* Optional label to show in card header
|
|
826
815
|
*/
|
|
827
|
-
label?: string;
|
|
816
|
+
label?: string | TemplateResult;
|
|
828
817
|
/**
|
|
829
818
|
* Maximum width for truncation
|
|
830
819
|
*/
|
|
@@ -834,7 +823,6 @@ declare class ValueView extends CoreLitElement {
|
|
|
834
823
|
* When provided, ValueView will automatically resolve token symbol and decimals
|
|
835
824
|
*/
|
|
836
825
|
address?: string;
|
|
837
|
-
private resolvedMetadata?;
|
|
838
826
|
private _hasSlotContent;
|
|
839
827
|
private _onSlotChange;
|
|
840
828
|
protected firstUpdated(): void;
|
|
@@ -872,7 +860,7 @@ declare class ValueView extends CoreLitElement {
|
|
|
872
860
|
* Handle value click
|
|
873
861
|
*/
|
|
874
862
|
private handleClick;
|
|
875
|
-
render():
|
|
863
|
+
render(): TemplateResult<1>;
|
|
876
864
|
/** Whether to use monospace font for the value content */
|
|
877
865
|
private getUseMonospace;
|
|
878
866
|
/** Map size to a typography class for the label */
|