@lukso/transaction-view-core 0.6.9 → 0.6.10-dev.2df3eae

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.
@@ -559,6 +559,34 @@ declare global {
559
559
  }
560
560
  }
561
561
 
562
+ /**
563
+ * SSR-safe custom element decorator that prevents duplicate registration errors.
564
+ *
565
+ * ## Why this exists
566
+ *
567
+ * The standard `@customElement()` decorator from Lit will throw an error if
568
+ * a component is registered twice. This can happen in SSR environments where:
569
+ * - Components are dynamically imported via multiple paths
570
+ * - HMR causes modules to be re-executed during development
571
+ * - Server and client bundles both try to register components
572
+ *
573
+ * ## Usage
574
+ *
575
+ * Use this instead of `@customElement()`:
576
+ * ```ts
577
+ * import { safeCustomElement } from './safe-custom-element'
578
+ *
579
+ * @safeCustomElement('my-component')
580
+ * export class MyComponent extends LitElement {
581
+ * // ...
582
+ * }
583
+ * ```
584
+ *
585
+ * @param tagName - The custom element tag name (must contain a hyphen)
586
+ * @returns A class decorator that safely registers the element
587
+ */
588
+ declare function safeCustomElement(tagName: string): <T extends CustomElementConstructor>(classOrDescriptor: T) => T;
589
+
562
590
  /**
563
591
  * ScrollToBottomButton (core) - reusable scroll helper.
564
592
  * Emits `scroll-to-bottom` when clicked.
@@ -872,4 +900,4 @@ declare global {
872
900
  }
873
901
  }
874
902
 
875
- 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 };
903
+ 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, safeCustomElement, useImageLoader, useSignal, useSignals, useTransactionSignal, useTransactionView };
@@ -559,6 +559,34 @@ declare global {
559
559
  }
560
560
  }
561
561
 
562
+ /**
563
+ * SSR-safe custom element decorator that prevents duplicate registration errors.
564
+ *
565
+ * ## Why this exists
566
+ *
567
+ * The standard `@customElement()` decorator from Lit will throw an error if
568
+ * a component is registered twice. This can happen in SSR environments where:
569
+ * - Components are dynamically imported via multiple paths
570
+ * - HMR causes modules to be re-executed during development
571
+ * - Server and client bundles both try to register components
572
+ *
573
+ * ## Usage
574
+ *
575
+ * Use this instead of `@customElement()`:
576
+ * ```ts
577
+ * import { safeCustomElement } from './safe-custom-element'
578
+ *
579
+ * @safeCustomElement('my-component')
580
+ * export class MyComponent extends LitElement {
581
+ * // ...
582
+ * }
583
+ * ```
584
+ *
585
+ * @param tagName - The custom element tag name (must contain a hyphen)
586
+ * @returns A class decorator that safely registers the element
587
+ */
588
+ declare function safeCustomElement(tagName: string): <T extends CustomElementConstructor>(classOrDescriptor: T) => T;
589
+
562
590
  /**
563
591
  * ScrollToBottomButton (core) - reusable scroll helper.
564
592
  * Emits `scroll-to-bottom` when clicked.
@@ -872,4 +900,4 @@ declare global {
872
900
  }
873
901
  }
874
902
 
875
- 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 };
903
+ 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, safeCustomElement, useImageLoader, useSignal, useSignals, useTransactionSignal, useTransactionView };
@@ -2395,6 +2395,7 @@ export {
2395
2395
  TransactionViewController,
2396
2396
  UrlView,
2397
2397
  ValueView,
2398
+ safeCustomElement,
2398
2399
  useImageLoader3 as useImageLoader,
2399
2400
  useSignal,
2400
2401
  useSignals,