@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.
Files changed (45) hide show
  1. package/.turbo/turbo-build.log +20 -20
  2. package/.turbo/turbo-typecheck.log +4 -0
  3. package/CHANGELOG.md +21 -0
  4. package/dist/index.cjs +131 -220
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +1 -10
  7. package/dist/index.d.ts +1 -10
  8. package/dist/index.js +158 -252
  9. package/dist/index.js.map +1 -1
  10. package/dist/shared/index.cjs +31 -64
  11. package/dist/shared/index.cjs.map +1 -1
  12. package/dist/shared/index.d.cts +8 -20
  13. package/dist/shared/index.d.ts +8 -20
  14. package/dist/shared/index.js +43 -76
  15. package/dist/shared/index.js.map +1 -1
  16. package/dist/styles/index.cjs +1 -1
  17. package/dist/styles/index.cjs.map +1 -1
  18. package/dist/styles/index.js +1 -1
  19. package/dist/styles/index.js.map +1 -1
  20. package/package.json +5 -4
  21. package/src/components/asset-card.ts +63 -80
  22. package/src/components/contract-card.ts +2 -67
  23. package/src/components/info-panel.ts +1 -21
  24. package/src/components/permissions-block.ts +7 -5
  25. package/src/components/transaction-playback.ts +4 -4
  26. package/src/shared/address-display.ts +3 -6
  27. package/src/shared/address-view.ts +2 -18
  28. package/src/shared/custom-select.ts +1 -1
  29. package/src/shared/function-name-view.ts +1 -1
  30. package/src/shared/gas-provider-view.ts +4 -7
  31. package/src/shared/icon-view.ts +7 -9
  32. package/src/shared/image-list.ts +3 -4
  33. package/src/shared/load-web-components.ts +3 -2
  34. package/src/shared/notification-view.ts +3 -3
  35. package/src/shared/progress-view.ts +1 -10
  36. package/src/shared/scroll-to-bottom-button.ts +1 -1
  37. package/src/shared/signal-controller.ts +3 -1
  38. package/src/shared/transaction-view-controller.ts +1 -1
  39. package/src/shared/url-view.ts +3 -3
  40. package/src/shared/value-view.ts +10 -30
  41. package/src/styles/styles.css +1 -1
  42. package/src/utils.test.ts +47 -0
  43. package/src/utils.ts +82 -0
  44. package/src/vue-entry.ts +0 -1
  45. package/tsup.config.ts +3 -3
@@ -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<T = any> implements ReactiveController {
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(): lit.TemplateResult<1>;
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 */
@@ -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<T = any> implements ReactiveController {
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(): lit.TemplateResult<1>;
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 */