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