@lukso/transaction-view-core 0.7.0-dev.ce42189 → 0.7.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.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,4 @@
1
- export { safeCustomElement } from '@lukso/core/utils';
2
- export { AddressData, AddressDisplay, AddressView, CustomOption, CustomSelect, FunctionNameView, GasProviderView, IconView, ImageLoadState, ImageLoaderController, MultiSignalController, NotificationView, ProgressSegment, ProgressView, ScrollToBottomButton, SelectOption, SignalController, TransactionSignalController, TransactionViewController, TransactionViewState, UrlView, ValueView, useImageLoader, useSignal, useSignals, useTransactionSignal, useTransactionView } from './shared/index.cjs';
1
+ export { AddressData, AddressDisplay, AddressView, CustomOption, CustomSelect, FunctionNameView, GasProviderView, IconView, ImageLoadState, ImageLoaderController, MultiSignalController, NotificationView, ProgressSegment, ProgressView, ScrollToBottomButton, SelectOption, SignalController, TransactionSignalController, TransactionViewController, TransactionViewState, UrlView, ValueView, safeCustomElement, useImageLoader, useSignal, useSignals, useTransactionSignal, useTransactionView } from './shared/index.cjs';
3
2
  import * as lit from 'lit';
4
3
  import { LitElement, PropertyValues } from 'lit';
5
4
  import { CoreLitElement } from './styles/index.cjs';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- export { safeCustomElement } from '@lukso/core/utils';
2
- export { AddressData, AddressDisplay, AddressView, CustomOption, CustomSelect, FunctionNameView, GasProviderView, IconView, ImageLoadState, ImageLoaderController, MultiSignalController, NotificationView, ProgressSegment, ProgressView, ScrollToBottomButton, SelectOption, SignalController, TransactionSignalController, TransactionViewController, TransactionViewState, UrlView, ValueView, useImageLoader, useSignal, useSignals, useTransactionSignal, useTransactionView } from './shared/index.js';
1
+ export { AddressData, AddressDisplay, AddressView, CustomOption, CustomSelect, FunctionNameView, GasProviderView, IconView, ImageLoadState, ImageLoaderController, MultiSignalController, NotificationView, ProgressSegment, ProgressView, ScrollToBottomButton, SelectOption, SignalController, TransactionSignalController, TransactionViewController, TransactionViewState, UrlView, ValueView, safeCustomElement, useImageLoader, useSignal, useSignals, useTransactionSignal, useTransactionView } from './shared/index.js';
3
2
  import * as lit from 'lit';
4
3
  import { LitElement, PropertyValues } from 'lit';
5
4
  import { CoreLitElement } from './styles/index.js';
package/dist/index.js CHANGED
@@ -9,18 +9,26 @@ var __decorateClass = (decorators, target, key, kind) => {
9
9
  return result;
10
10
  };
11
11
 
12
- // src/shared/index.ts
13
- import { safeCustomElement as safeCustomElement12 } from "@lukso/core/utils";
14
-
15
12
  // src/shared/address-display.ts
16
13
  import { Task } from "@lit/task";
17
- import { safeCustomElement } from "@lukso/core/utils";
18
14
  import {
19
15
  useAddressResolver,
20
16
  useImageLoader
21
17
  } from "@lukso/transaction-view-headless";
22
18
  import { css, html, LitElement } from "lit";
23
19
  import { property } from "lit/decorators.js";
20
+
21
+ // src/shared/safe-custom-element.ts
22
+ function safeCustomElement(tagName) {
23
+ return (classOrDescriptor) => {
24
+ if (typeof customElements !== "undefined" && !customElements.get(tagName)) {
25
+ customElements.define(tagName, classOrDescriptor);
26
+ }
27
+ return classOrDescriptor;
28
+ };
29
+ }
30
+
31
+ // src/shared/address-display.ts
24
32
  var AddressDisplay = class extends LitElement {
25
33
  constructor() {
26
34
  super(...arguments);
@@ -295,7 +303,6 @@ AddressDisplay = __decorateClass([
295
303
 
296
304
  // src/shared/address-view.ts
297
305
  import { Task as Task2 } from "@lit/task";
298
- import { safeCustomElement as safeCustomElement2 } from "@lukso/core/utils";
299
306
  import { useAddressResolver as useAddressResolver2 } from "@lukso/transaction-view-headless";
300
307
  import makeBlockie from "ethereum-blockies-base64";
301
308
  import { html as html2 } from "lit";
@@ -636,11 +643,10 @@ __decorateClass([
636
643
  state()
637
644
  ], AddressView.prototype, "identicon", 2);
638
645
  AddressView = __decorateClass([
639
- safeCustomElement2("address-view")
646
+ safeCustomElement("address-view")
640
647
  ], AddressView);
641
648
 
642
649
  // src/shared/custom-select.ts
643
- import { safeCustomElement as safeCustomElement3 } from "@lukso/core/utils";
644
650
  import { html as html3 } from "lit";
645
651
  import { property as property3 } from "lit/decorators.js";
646
652
  import makeBlockie2 from "ethereum-blockies-base64";
@@ -669,7 +675,7 @@ __decorateClass([
669
675
  property3({ type: Boolean, reflect: true })
670
676
  ], CustomOption.prototype, "hoverable", 2);
671
677
  CustomOption = __decorateClass([
672
- safeCustomElement3("custom-option")
678
+ safeCustomElement("custom-option")
673
679
  ], CustomOption);
674
680
  var CustomSelect = class extends CoreLitElement {
675
681
  constructor() {
@@ -786,11 +792,10 @@ __decorateClass([
786
792
  property3({ type: String })
787
793
  ], CustomSelect.prototype, "size", 2);
788
794
  CustomSelect = __decorateClass([
789
- safeCustomElement3("custom-select")
795
+ safeCustomElement("custom-select")
790
796
  ], CustomSelect);
791
797
 
792
798
  // src/shared/function-name-view.ts
793
- import { safeCustomElement as safeCustomElement4 } from "@lukso/core/utils";
794
799
  import { html as html4 } from "lit";
795
800
  import { property as property4 } from "lit/decorators.js";
796
801
  var FunctionNameView = class extends CoreLitElement {
@@ -867,11 +872,10 @@ __decorateClass([
867
872
  property4({ attribute: "color" })
868
873
  ], FunctionNameView.prototype, "color", 2);
869
874
  FunctionNameView = __decorateClass([
870
- safeCustomElement4("function-name-view")
875
+ safeCustomElement("function-name-view")
871
876
  ], FunctionNameView);
872
877
 
873
878
  // src/shared/gas-provider-view.ts
874
- import { safeCustomElement as safeCustomElement5 } from "@lukso/core/utils";
875
879
  import { html as html5 } from "lit";
876
880
  import { property as property5 } from "lit/decorators.js";
877
881
  var GasProviderView = class extends CoreLitElement {
@@ -1045,12 +1049,11 @@ __decorateClass([
1045
1049
  property5({ attribute: "relayer-reset-date", reflect: true })
1046
1050
  ], GasProviderView.prototype, "relayerResetDate", 2);
1047
1051
  GasProviderView = __decorateClass([
1048
- safeCustomElement5("gas-provider-view")
1052
+ safeCustomElement("gas-provider-view")
1049
1053
  ], GasProviderView);
1050
1054
 
1051
1055
  // src/shared/icon-view.ts
1052
1056
  import { Task as Task3 } from "@lit/task";
1053
- import { safeCustomElement as safeCustomElement6 } from "@lukso/core/utils";
1054
1057
  import {
1055
1058
  useAddressResolver as useAddressResolver3,
1056
1059
  useImageLoader as useImageLoader2
@@ -1235,7 +1238,7 @@ __decorateClass([
1235
1238
  property6({ type: Number, attribute: "image-index" })
1236
1239
  ], IconView.prototype, "imageIndex", 2);
1237
1240
  IconView = __decorateClass([
1238
- safeCustomElement6("icon-view")
1241
+ safeCustomElement("icon-view")
1239
1242
  ], IconView);
1240
1243
 
1241
1244
  // src/shared/image-loader-controller.ts
@@ -1341,7 +1344,6 @@ function useImageLoader3(host) {
1341
1344
  }
1342
1345
 
1343
1346
  // src/shared/notification-view.ts
1344
- import { safeCustomElement as safeCustomElement7 } from "@lukso/core/utils";
1345
1347
  import { html as html7 } from "lit";
1346
1348
  import { property as property7, state as state2 } from "lit/decorators.js";
1347
1349
  var NotificationView = class extends CoreLitElement {
@@ -1459,11 +1461,10 @@ __decorateClass([
1459
1461
  property7({ type: Boolean, reflect: true })
1460
1462
  ], NotificationView.prototype, "checked", 2);
1461
1463
  NotificationView = __decorateClass([
1462
- safeCustomElement7("notification-view")
1464
+ safeCustomElement("notification-view")
1463
1465
  ], NotificationView);
1464
1466
 
1465
1467
  // src/shared/progress-view.ts
1466
- import { safeCustomElement as safeCustomElement8 } from "@lukso/core/utils";
1467
1468
  import { html as html8 } from "lit";
1468
1469
  import { property as property8 } from "lit/decorators.js";
1469
1470
  var ProgressView = class extends CoreLitElement {
@@ -1524,11 +1525,10 @@ __decorateClass([
1524
1525
  property8({ attribute: "label-position" })
1525
1526
  ], ProgressView.prototype, "labelPosition", 2);
1526
1527
  ProgressView = __decorateClass([
1527
- safeCustomElement8("progress-view")
1528
+ safeCustomElement("progress-view")
1528
1529
  ], ProgressView);
1529
1530
 
1530
1531
  // src/shared/scroll-to-bottom-button.ts
1531
- import { safeCustomElement as safeCustomElement9 } from "@lukso/core/utils";
1532
1532
  import { html as html9 } from "lit";
1533
1533
  import { property as property9 } from "lit/decorators.js";
1534
1534
  var ScrollToBottomButton = class extends CoreLitElement {
@@ -1569,7 +1569,7 @@ __decorateClass([
1569
1569
  property9({ attribute: "icon-name" })
1570
1570
  ], ScrollToBottomButton.prototype, "iconName", 2);
1571
1571
  ScrollToBottomButton = __decorateClass([
1572
- safeCustomElement9("scroll-to-bottom-button")
1572
+ safeCustomElement("scroll-to-bottom-button")
1573
1573
  ], ScrollToBottomButton);
1574
1574
 
1575
1575
  // src/shared/signal-controller.ts
@@ -1877,7 +1877,6 @@ function useTransactionSignal(host, signal) {
1877
1877
  }
1878
1878
 
1879
1879
  // src/shared/url-view.ts
1880
- import { safeCustomElement as safeCustomElement10 } from "@lukso/core/utils";
1881
1880
  import { html as html10 } from "lit";
1882
1881
  import { property as property10, state as state3 } from "lit/decorators.js";
1883
1882
  var UrlView = class extends CoreLitElement {
@@ -1987,12 +1986,11 @@ __decorateClass([
1987
1986
  state3()
1988
1987
  ], UrlView.prototype, "displayName", 2);
1989
1988
  UrlView = __decorateClass([
1990
- safeCustomElement10("url-view")
1989
+ safeCustomElement("url-view")
1991
1990
  ], UrlView);
1992
1991
 
1993
1992
  // src/shared/value-view.ts
1994
1993
  import { Task as Task4 } from "@lit/task";
1995
- import { safeCustomElement as safeCustomElement11 } from "@lukso/core/utils";
1996
1994
  import { useAddressResolver as useAddressResolver4 } from "@lukso/transaction-view-headless";
1997
1995
  import { html as html11 } from "lit";
1998
1996
  import { property as property11, state as state4 } from "lit/decorators.js";
@@ -2399,12 +2397,11 @@ __decorateClass([
2399
2397
  state4()
2400
2398
  ], ValueView.prototype, "_hasSlotContent", 2);
2401
2399
  ValueView = __decorateClass([
2402
- safeCustomElement11("value-view")
2400
+ safeCustomElement("value-view")
2403
2401
  ], ValueView);
2404
2402
 
2405
2403
  // src/shared/image-list.ts
2406
2404
  import { Task as Task5 } from "@lit/task";
2407
- import { safeCustomElement as safeCustomElement13 } from "@lukso/core/utils";
2408
2405
  import { useAddressResolver as useAddressResolver5 } from "@lukso/transaction-view-headless";
2409
2406
  import { html as html12 } from "lit";
2410
2407
  import { property as property12, state as state5 } from "lit/decorators.js";
@@ -2585,11 +2582,10 @@ __decorateClass([
2585
2582
  state5()
2586
2583
  ], ImageList.prototype, "isLoading", 2);
2587
2584
  ImageList = __decorateClass([
2588
- safeCustomElement13("image-list")
2585
+ safeCustomElement("image-list")
2589
2586
  ], ImageList);
2590
2587
 
2591
2588
  // src/components/info-panel.ts
2592
- import { safeCustomElement as safeCustomElement14 } from "@lukso/core/utils";
2593
2589
  import { css as css3, html as html13, LitElement as LitElement3 } from "lit";
2594
2590
  import { property as property13, state as state6 } from "lit/decorators.js";
2595
2591
  import { classMap } from "lit/directives/class-map.js";
@@ -2966,7 +2962,7 @@ __decorateClass([
2966
2962
  state6()
2967
2963
  ], InfoPanel.prototype, "_resolvedData", 2);
2968
2964
  InfoPanel = __decorateClass([
2969
- safeCustomElement14("info-panel")
2965
+ safeCustomElement("info-panel")
2970
2966
  ], InfoPanel);
2971
2967
 
2972
2968
  // src/components/asset-card.ts
@@ -2976,7 +2972,6 @@ import { repeat as repeat3 } from "lit/directives/repeat.js";
2976
2972
  import { when as when3 } from "lit/directives/when.js";
2977
2973
  import "@lukso/web-components/components";
2978
2974
  import { Task as Task6 } from "@lit/task";
2979
- import { safeCustomElement as safeCustomElement15 } from "@lukso/core/utils";
2980
2975
  import {
2981
2976
  useAddressResolver as useAddressResolver6
2982
2977
  } from "@lukso/transaction-view-headless";
@@ -3323,11 +3318,10 @@ __decorateClass([
3323
3318
  state7()
3324
3319
  ], AssetCard.prototype, "_resolvedData", 2);
3325
3320
  AssetCard = __decorateClass([
3326
- safeCustomElement15("asset-card")
3321
+ safeCustomElement("asset-card")
3327
3322
  ], AssetCard);
3328
3323
 
3329
3324
  // src/components/description-view.ts
3330
- import { safeCustomElement as safeCustomElement16 } from "@lukso/core/utils";
3331
3325
  import { css as css4, html as html15, LitElement as LitElement4 } from "lit";
3332
3326
  import { property as property15 } from "lit/decorators.js";
3333
3327
  import { repeat as repeat4 } from "lit/directives/repeat.js";
@@ -3823,11 +3817,10 @@ __decorateClass([
3823
3817
  property15({ type: String })
3824
3818
  ], DescriptionView.prototype, "variant", 2);
3825
3819
  DescriptionView = __decorateClass([
3826
- safeCustomElement16("description-view")
3820
+ safeCustomElement("description-view")
3827
3821
  ], DescriptionView);
3828
3822
 
3829
3823
  // src/components/universal-token-view.ts
3830
- import { safeCustomElement as safeCustomElement17 } from "@lukso/core/utils";
3831
3824
  import { css as css5, html as html16, LitElement as LitElement5 } from "lit";
3832
3825
  import { property as property16, state as state8 } from "lit/decorators.js";
3833
3826
  import { when as when5 } from "lit/directives/when.js";
@@ -4040,11 +4033,10 @@ __decorateClass([
4040
4033
  state8()
4041
4034
  ], UniversalTokenView.prototype, "_infoPanelOpen", 2);
4042
4035
  UniversalTokenView = __decorateClass([
4043
- safeCustomElement17("universal-token-view")
4036
+ safeCustomElement("universal-token-view")
4044
4037
  ], UniversalTokenView);
4045
4038
 
4046
4039
  // src/components/contract-card.ts
4047
- import { safeCustomElement as safeCustomElement18 } from "@lukso/core/utils";
4048
4040
  import { css as css6, html as html17, LitElement as LitElement6 } from "lit";
4049
4041
  import { property as property17, state as state9 } from "lit/decorators.js";
4050
4042
  var ContractCard = class extends LitElement6 {
@@ -4149,11 +4141,10 @@ __decorateClass([
4149
4141
  state9()
4150
4142
  ], ContractCard.prototype, "_backgroundImageUrl", 2);
4151
4143
  ContractCard = __decorateClass([
4152
- safeCustomElement18("contract-card")
4144
+ safeCustomElement("contract-card")
4153
4145
  ], ContractCard);
4154
4146
 
4155
4147
  // src/components/permissions-block.ts
4156
- import { safeCustomElement as safeCustomElement19 } from "@lukso/core/utils";
4157
4148
  import { html as html18, nothing } from "lit";
4158
4149
  import { property as property18 } from "lit/decorators.js";
4159
4150
  var PermissionsBlock = class extends CoreLitElement {
@@ -4261,11 +4252,10 @@ __decorateClass([
4261
4252
  property18({ type: Array })
4262
4253
  ], PermissionsBlock.prototype, "permissions", 2);
4263
4254
  PermissionsBlock = __decorateClass([
4264
- safeCustomElement19("permissions-block")
4255
+ safeCustomElement("permissions-block")
4265
4256
  ], PermissionsBlock);
4266
4257
 
4267
4258
  // src/components/transaction-playback.ts
4268
- import { safeCustomElement as safeCustomElement20 } from "@lukso/core/utils";
4269
4259
  import {
4270
4260
  decodeTransaction,
4271
4261
  JSONbigString
@@ -4780,7 +4770,7 @@ __decorateClass([
4780
4770
  state10()
4781
4771
  ], TransactionPlayback.prototype, "decodedTransaction", 2);
4782
4772
  TransactionPlayback = __decorateClass([
4783
- safeCustomElement20("transaction-playback")
4773
+ safeCustomElement("transaction-playback")
4784
4774
  ], TransactionPlayback);
4785
4775
 
4786
4776
  // src/registry/index.ts
@@ -4814,7 +4804,7 @@ export {
4814
4804
  getGlobalRegistry,
4815
4805
  resetGlobalLitLoader,
4816
4806
  resetGlobalRegistry,
4817
- safeCustomElement12 as safeCustomElement,
4807
+ safeCustomElement,
4818
4808
  setGlobalLitLoader,
4819
4809
  setGlobalRegistry,
4820
4810
  useImageLoader3 as useImageLoader,