@lukso/transaction-view-core 0.5.0-dev.5916302 → 0.5.0-dev.a98e9bc

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,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';
@@ -780,7 +780,7 @@ declare class ValueView extends CoreLitElement {
780
780
  * The value to display (required)
781
781
  * Can be string, number, boolean, or bigint
782
782
  */
783
- value?: TemplateResult | string | number | boolean | bigint | null;
783
+ value?: string | number | boolean | bigint | null;
784
784
  /**
785
785
  * The key name (used for special formatting logic)
786
786
  */
@@ -813,7 +813,7 @@ declare class ValueView extends CoreLitElement {
813
813
  /**
814
814
  * Optional label to show in card header
815
815
  */
816
- label?: string | TemplateResult;
816
+ label?: string;
817
817
  /**
818
818
  * Maximum width for truncation
819
819
  */
@@ -860,7 +860,7 @@ declare class ValueView extends CoreLitElement {
860
860
  * Handle value click
861
861
  */
862
862
  private handleClick;
863
- render(): TemplateResult<1>;
863
+ render(): lit.TemplateResult<1>;
864
864
  /** Whether to use monospace font for the value content */
865
865
  private getUseMonospace;
866
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, 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';
@@ -780,7 +780,7 @@ declare class ValueView extends CoreLitElement {
780
780
  * The value to display (required)
781
781
  * Can be string, number, boolean, or bigint
782
782
  */
783
- value?: TemplateResult | string | number | boolean | bigint | null;
783
+ value?: string | number | boolean | bigint | null;
784
784
  /**
785
785
  * The key name (used for special formatting logic)
786
786
  */
@@ -813,7 +813,7 @@ declare class ValueView extends CoreLitElement {
813
813
  /**
814
814
  * Optional label to show in card header
815
815
  */
816
- label?: string | TemplateResult;
816
+ label?: string;
817
817
  /**
818
818
  * Maximum width for truncation
819
819
  */
@@ -860,7 +860,7 @@ declare class ValueView extends CoreLitElement {
860
860
  * Handle value click
861
861
  */
862
862
  private handleClick;
863
- render(): TemplateResult<1>;
863
+ render(): lit.TemplateResult<1>;
864
864
  /** Whether to use monospace font for the value content */
865
865
  private getUseMonospace;
866
866
  /** Map size to a typography class for the label */
@@ -1995,8 +1995,6 @@ import { useAddressResolver as useAddressResolver4 } from "@lukso/transaction-vi
1995
1995
  import { html as html11 } from "lit";
1996
1996
  import { property as property11, state as state4 } from "lit/decorators.js";
1997
1997
  import { when } from "lit/directives/when.js";
1998
-
1999
- // src/utils.ts
2000
1998
  function formatUnits(value, decimals = 18) {
2001
1999
  const divisor = 10n ** BigInt(decimals);
2002
2000
  const quotient = value / divisor;
@@ -2008,8 +2006,6 @@ function formatUnits(value, decimals = 18) {
2008
2006
  const trimmed = remainderStr.replace(/0+$/, "");
2009
2007
  return `${quotient}.${trimmed}`;
2010
2008
  }
2011
-
2012
- // src/shared/value-view.ts
2013
2009
  var ValueView = class extends CoreLitElement {
2014
2010
  constructor() {
2015
2011
  super(...arguments);
@@ -2242,7 +2238,7 @@ var ValueView = class extends CoreLitElement {
2242
2238
  `;
2243
2239
  if (effectiveType === "currency") {
2244
2240
  const { numeric, symbol } = this.getCurrencyParts();
2245
- if (this.label) {
2241
+ if (this.label && this.label.trim() !== "") {
2246
2242
  headerText = this.label;
2247
2243
  contentTemplate = html11`
2248
2244
  <span class="inline-block overflow-hidden text-ellipsis whitespace-nowrap min-w-0 ${this.getNumericClass()}">${numeric}</span>