@lukso/transaction-view-core 0.3.1-dev.a8c9315

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 (62) hide show
  1. package/.turbo/turbo-build.log +33 -0
  2. package/CHANGELOG.md +104 -0
  3. package/LICENSE +201 -0
  4. package/README.md +264 -0
  5. package/dist/index.cjs +4573 -0
  6. package/dist/index.cjs.map +1 -0
  7. package/dist/index.d.cts +493 -0
  8. package/dist/index.d.ts +493 -0
  9. package/dist/index.js +4534 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/shared/index.cjs +2480 -0
  12. package/dist/shared/index.cjs.map +1 -0
  13. package/dist/shared/index.d.cts +887 -0
  14. package/dist/shared/index.d.ts +887 -0
  15. package/dist/shared/index.js +2437 -0
  16. package/dist/shared/index.js.map +1 -0
  17. package/dist/styles/index.cjs +58 -0
  18. package/dist/styles/index.cjs.map +1 -0
  19. package/dist/styles/index.d.cts +9 -0
  20. package/dist/styles/index.d.ts +9 -0
  21. package/dist/styles/index.js +31 -0
  22. package/dist/styles/index.js.map +1 -0
  23. package/package.json +57 -0
  24. package/publish.log +0 -0
  25. package/src/components/asset-card.ts +426 -0
  26. package/src/components/contract-card.ts +238 -0
  27. package/src/components/description-view.ts +605 -0
  28. package/src/components/index.ts +20 -0
  29. package/src/components/info-panel.ts +437 -0
  30. package/src/components/permissions-block.ts +138 -0
  31. package/src/components/transaction-playback.ts +429 -0
  32. package/src/components/universal-token-view.ts +281 -0
  33. package/src/declaration.d.ts +4 -0
  34. package/src/examples/INTEGRATION_GUIDE.md +240 -0
  35. package/src/examples/TransactionContentWithReplacement.vue +269 -0
  36. package/src/index.ts +38 -0
  37. package/src/registry/index.ts +31 -0
  38. package/src/registry/lit-view-loader.ts +191 -0
  39. package/src/shared/address-display.ts +370 -0
  40. package/src/shared/address-view.ts +385 -0
  41. package/src/shared/custom-select.ts +164 -0
  42. package/src/shared/function-name-view.ts +89 -0
  43. package/src/shared/gas-provider-view.ts +218 -0
  44. package/src/shared/icon-view.ts +288 -0
  45. package/src/shared/image-list.ts +261 -0
  46. package/src/shared/image-loader-controller.ts +160 -0
  47. package/src/shared/index.ts +34 -0
  48. package/src/shared/load-web-components.ts +56 -0
  49. package/src/shared/notification-view.ts +132 -0
  50. package/src/shared/progress-view.ts +86 -0
  51. package/src/shared/safe-custom-element.ts +35 -0
  52. package/src/shared/scroll-to-bottom-button.ts +55 -0
  53. package/src/shared/signal-controller.ts +124 -0
  54. package/src/shared/transaction-view-controller.ts +345 -0
  55. package/src/shared/url-view.ts +129 -0
  56. package/src/shared/value-view.ts +510 -0
  57. package/src/styles/index.ts +28 -0
  58. package/src/styles/styles.css +1 -0
  59. package/src/vue-entry.ts +15 -0
  60. package/tailwind.config.cjs +9 -0
  61. package/tsconfig.json +22 -0
  62. package/tsup.config.ts +90 -0
@@ -0,0 +1,33 @@
1
+
2
+ > @lukso/transaction-view-core@0.3.1 build /home/runner/work/service-auth-simple/service-auth-simple/packages/transaction-view-core
3
+ > tsup
4
+
5
+ CLI Building entry: src/index.ts, src/shared/index.ts, src/styles/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.1
8
+ CLI Using tsup config: /home/runner/work/service-auth-simple/service-auth-simple/packages/transaction-view-core/tsup.config.ts
9
+ CLI Target: es2022
10
+ ESM Build start
11
+ CJS Build start
12
+ DTS Build start
13
+ CJS dist/index.cjs 268.27 KB
14
+ CJS dist/shared/index.cjs 209.96 KB
15
+ CJS dist/styles/index.cjs 132.07 KB
16
+ CJS dist/index.cjs.map 366.43 KB
17
+ CJS dist/shared/index.cjs.map 270.47 KB
18
+ CJS dist/styles/index.cjs.map 140.22 KB
19
+ CJS ⚡️ Build success in 4636ms
20
+ ESM dist/index.js 259.91 KB
21
+ ESM dist/shared/index.js 204.44 KB
22
+ ESM dist/styles/index.js 131.02 KB
23
+ ESM dist/index.js.map 365.86 KB
24
+ ESM dist/shared/index.js.map 269.66 KB
25
+ ESM dist/styles/index.js.map 140.16 KB
26
+ ESM ⚡️ Build success in 4750ms
27
+ DTS ⚡️ Build success in 11823ms
28
+ DTS dist/styles/index.d.ts 233.00 B
29
+ DTS dist/index.d.ts 14.33 KB
30
+ DTS dist/shared/index.d.ts 23.91 KB
31
+ DTS dist/styles/index.d.cts 233.00 B
32
+ DTS dist/index.d.cts 14.33 KB
33
+ DTS dist/shared/index.d.cts 23.91 KB
package/CHANGELOG.md ADDED
@@ -0,0 +1,104 @@
1
+ # Changelog
2
+
3
+ ## [0.3.1](https://github.com/lukso-network/service-auth-simple/compare/transaction-view-core-v0.3.0...transaction-view-core-v0.3.1) (2025-12-03)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * More upgrades nuxt, wagmi/connectors, vue, wagmi/vue and so on. Leaving tailwindcss ([#38](https://github.com/lukso-network/service-auth-simple/issues/38)) ([4af08be](https://github.com/lukso-network/service-auth-simple/commit/4af08be832780c515ba9e29f486c5ae88481fd1a))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @lukso/transaction-decoder bumped to 1.0.1
16
+ * @lukso/transaction-view-headless bumped to 0.2.2
17
+
18
+ ## [0.3.0](https://github.com/lukso-network/service-auth-simple/compare/transaction-view-core-v0.2.0...transaction-view-core-v0.3.0) (2025-12-02)
19
+
20
+
21
+ ### Features
22
+
23
+ * LSP screens (transfer & mint) ([#18](https://github.com/lukso-network/service-auth-simple/issues/18)) ([7b7e00a](https://github.com/lukso-network/service-auth-simple/commit/7b7e00a4fe8fe7a6003d9d9f6c2d32b6929392c7))
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * Allow multi chain resolutions, using preact signals-core. ([#25](https://github.com/lukso-network/service-auth-simple/issues/25)) ([94fbbe9](https://github.com/lukso-network/service-auth-simple/commit/94fbbe982a64e3fda13c4ea94fb7be8f5a188025))
29
+ * Upgrade storybook ([#31](https://github.com/lukso-network/service-auth-simple/issues/31)) ([b4251d4](https://github.com/lukso-network/service-auth-simple/commit/b4251d4065b27311f74ce583eed07090523000ef))
30
+
31
+
32
+ ### Dependencies
33
+
34
+ * The following workspace dependencies were updated
35
+ * dependencies
36
+ * @lukso/transaction-decoder bumped to 1.0.0
37
+ * @lukso/transaction-view-headless bumped to 0.2.1
38
+
39
+ ## [0.2.0](https://github.com/lukso-network/service-auth-simple/compare/transaction-view-core-v0.1.0...transaction-view-core-v0.2.0) (2025-11-25)
40
+
41
+
42
+ ### Features
43
+
44
+ * Add favicons and update titles (LUKSO Auth / LUKSO Auth Demo) ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
45
+ * setup address view ([#9](https://github.com/lukso-network/service-auth-simple/issues/9)) ([e61b5e0](https://github.com/lukso-network/service-auth-simple/commit/e61b5e09776d6ea62801fc96d5fa817753ddd146))
46
+
47
+
48
+ ### Bug Fixes
49
+
50
+ * Add backup plan ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
51
+ * Add lint-staged ([d77afe6](https://github.com/lukso-network/service-auth-simple/commit/d77afe66d4778fbd85ce2d995cfbabd34eeb3c85))
52
+ * Add Playback views. ([81bd63e](https://github.com/lukso-network/service-auth-simple/commit/81bd63e4b6cb86ec3df45c38cb334c355e2643f8))
53
+ * Additional turbo changes ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
54
+ * Change to turbo and start backup/restore ([#14](https://github.com/lukso-network/service-auth-simple/issues/14)) ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
55
+ * Cleanup ([62d22d0](https://github.com/lukso-network/service-auth-simple/commit/62d22d0c5e763ad6f1bcdca8dc2503c8c06c426b))
56
+ * Cleanup some docs ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
57
+ * Cleanup to make sure everything builds. There were some dangling refactor issues, we might need turbo... ([60d8374](https://github.com/lukso-network/service-auth-simple/commit/60d8374e1fd62f6bd3a275eb872f25777bfa4afa))
58
+ * Correct PR number detection in workflow ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
59
+ * Found some more lint problems ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
60
+ * More deps used to be from base ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
61
+ * More docs on backup ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
62
+ * More work ([7e5cd06](https://github.com/lukso-network/service-auth-simple/commit/7e5cd06df13ce12a394d2e974eb5444605da9135))
63
+ * More work ([39262dd](https://github.com/lukso-network/service-auth-simple/commit/39262ddd33f60c60f35e360571ffeb62b8df35ac))
64
+ * More work ([cd29d2b](https://github.com/lukso-network/service-auth-simple/commit/cd29d2b6e0d17c067a350564dc4c45707aa9fbc9))
65
+ * More work ([c0e5d8f](https://github.com/lukso-network/service-auth-simple/commit/c0e5d8fceb9ddb791ad1b54f525ec96c06421e22))
66
+ * More work ([1722f13](https://github.com/lukso-network/service-auth-simple/commit/1722f13101c3a6ce59a12ada8f6433c478ad3daf))
67
+ * More work ([fe60cfb](https://github.com/lukso-network/service-auth-simple/commit/fe60cfb824878dbaa0fe64730a153991c53f7bf6))
68
+ * More Work ([6497ca1](https://github.com/lukso-network/service-auth-simple/commit/6497ca195ebe6919b916f57a27452ae35b59cae1))
69
+ * Move apps ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
70
+ * npm upgrades and main build fixes ([#17](https://github.com/lukso-network/service-auth-simple/issues/17)) ([95d7e83](https://github.com/lukso-network/service-auth-simple/commit/95d7e831a47e0d8f9118f2ec11021c995cc90351))
71
+ * Refactor complete ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
72
+ * Refactor into two 'apps' ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
73
+ * Refactor keygen into separate package ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
74
+ * Refactor wallet-app into package in monorepo ([#12](https://github.com/lukso-network/service-auth-simple/issues/12)) ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
75
+ * Remove weird .dev.vars symlink ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
76
+ * Rename config variable to avoid conflict with wagmi config ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
77
+ * Repair ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
78
+ * Repair avatar ([02ef3e0](https://github.com/lukso-network/service-auth-simple/commit/02ef3e0cc79d7cfb9d729695d0386c73f7afa339))
79
+ * Repair build ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
80
+ * Repair build issues ([91e51ad](https://github.com/lukso-network/service-auth-simple/commit/91e51ad7003de13189a23c99bec594e1a397f3a4))
81
+ * Repair build of storybook ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
82
+ * Repair ci build ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
83
+ * Repair deployment. ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
84
+ * Repair lint errors showing up once in a while ([11d06e7](https://github.com/lukso-network/service-auth-simple/commit/11d06e712cdebc365871b18306eedea809b9a61a))
85
+ * Repair lockfile ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
86
+ * Repair nav of storybooks ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
87
+ * Repair sequence of .env/.dev.vars since we're now loading both ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
88
+ * Repair storybook build. ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
89
+ * Repair URL mappings for demo ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
90
+ * Repair workflow ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
91
+ * Repair/Finalize backup ([#15](https://github.com/lukso-network/service-auth-simple/issues/15)) ([e941cc7](https://github.com/lukso-network/service-auth-simple/commit/e941cc71f4a3fccee05fb2b143d5b662b9f0a05b))
92
+ * Some small cleanup (typedef error) ([a36b7c6](https://github.com/lukso-network/service-auth-simple/commit/a36b7c6ce3c29294e69b483988342ea864e04a94))
93
+ * Update vars ([bbc339a](https://github.com/lukso-network/service-auth-simple/commit/bbc339a87cc62f66b2c18b8ecb5652e9999c3352))
94
+ * WIP ([fd6e07c](https://github.com/lukso-network/service-auth-simple/commit/fd6e07cecbc2fdea671714dbe71d2da11f593481))
95
+ * WIP commit ([df1c934](https://github.com/lukso-network/service-auth-simple/commit/df1c9349b08cd68217eba483424ce5bfc8b62459))
96
+ * Work on decoder and api ([ccdd3c9](https://github.com/lukso-network/service-auth-simple/commit/ccdd3c9559811a3b4026a1c3940febb788c862a5))
97
+
98
+
99
+ ### Dependencies
100
+
101
+ * The following workspace dependencies were updated
102
+ * dependencies
103
+ * @lukso/transaction-decoder bumped to 1.1.0
104
+ * @lukso/transaction-view-headless bumped to 0.2.0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,264 @@
1
+ # @lukso/transaction-view-core
2
+
3
+ Lit elements, web components, and reactive controllers for LUKSO transaction display with `@preact/signals-core` integration.
4
+
5
+ ## 🚀 Quick Usage
6
+
7
+ ### Web Components (Any Framework)
8
+ ```typescript
9
+ // Auto-registers all web components
10
+ import '@lukso/transaction-view-core'
11
+ // Include styles (see Tailwind section below for options)
12
+ import '@lukso/transaction-view-core/dist/styles/tailwind.css'
13
+ import '@lukso/transaction-view-core/dist/styles/index.css' // fonts and base styles
14
+ ```
15
+
16
+ ```html
17
+ <!-- Use in any framework -->
18
+ <address-view
19
+ address="0x1234..."
20
+ size="medium"
21
+ show-copy-button
22
+ ></address-view>
23
+
24
+ <value-view
25
+ value="1000000000000000000"
26
+ currency-symbol="LYX"
27
+ type="currency"
28
+ ></value-view>
29
+ ```
30
+
31
+ ### Reactive Controllers (Lit Elements)
32
+ ```typescript
33
+ import { LitElement, html } from 'lit'
34
+ import { customElement, property } from 'lit/decorators.js'
35
+ import { SignalController, TransactionViewController } from '@lukso/transaction-view-core'
36
+
37
+ @customElement('my-transaction-display')
38
+ export class TransactionDisplay extends LitElement {
39
+ @property({ type: Object }) transaction!: DecoderResult
40
+
41
+ // Signal integration
42
+ private addressSignal = window.TransactionDecoder.getAddress('0x1234...')
43
+ private addressController = new SignalController(this, this.addressSignal)
44
+
45
+ // Transaction view controller
46
+ private transactionController = new TransactionViewController(
47
+ this,
48
+ this.transaction,
49
+ { framework: 'lit', resolve: true, autoLoad: true }
50
+ )
51
+
52
+ render() {
53
+ const addressData = this.addressController.value
54
+ const { component, isLoading } = this.transactionController.state
55
+
56
+ return html`
57
+ ${isLoading ? html`<p>Loading...</p>` : ''}
58
+ ${addressData.data ? html`<p>${addressData.data.name}</p>` : ''}
59
+ ${component ? component : ''}
60
+ `
61
+ }
62
+ }
63
+ ```
64
+
65
+ ## 📦 Exports
66
+
67
+ ### Web Components
68
+ - `<address-view>` - Address display with profile image and name
69
+ - `<address-display>` - Enhanced address display with full features
70
+ - `<icon-view>` - Profile icon only display
71
+ - `<value-view>` - Value formatting and display
72
+
73
+ ### Reactive Controllers
74
+ - `SignalController` - Single signal integration
75
+ - `MultiSignalController` - Multiple signals integration
76
+ - `ImageLoaderController` - Image loading with signal integration
77
+ - `TransactionViewController` - Transaction view functionality
78
+ - `TransactionSignalController` - Transaction signal integration
79
+
80
+ ### Utilities
81
+ - `useSignal(host, signal)` - Create signal controller
82
+ - `useSignals(host, signals)` - Create multi-signal controller
83
+ - `useImageLoader(host)` - Create image loader controller
84
+ - `useTransactionView(host, transaction, options)` - Create transaction view controller
85
+ - `useTransactionSignal(host, signal)` - Create transaction signal controller
86
+
87
+ ## 🔧 Signal Integration
88
+
89
+ All controllers integrate seamlessly with `@preact/signals-core` from the transaction decoder:
90
+
91
+ ```typescript
92
+ import { SignalController } from '@lukso/transaction-view-core'
93
+
94
+ @customElement('address-component')
95
+ export class AddressComponent extends LitElement {
96
+ // Get signal from global data model
97
+ private addressSignal = window.TransactionDecoder.getAddress('0x1234...')
98
+
99
+ // Create reactive controller
100
+ private addressController = new SignalController(this, this.addressSignal)
101
+
102
+ render() {
103
+ const { data, loading, error } = this.addressController.value
104
+
105
+ return html`
106
+ ${loading ? html`<span>Loading...</span>` : ''}
107
+ ${error ? html`<span>Error: ${error}</span>` : ''}
108
+ ${data ? html`<span>${data.name}</span>` : ''}
109
+ `
110
+ }
111
+ }
112
+ ```
113
+
114
+ ## 📚 Controller API Reference
115
+
116
+ ### SignalController<T>
117
+
118
+ Reactive controller for single signal integration.
119
+
120
+ **Constructor:**
121
+ - `new SignalController(host, signal)` - Create controller
122
+
123
+ **Properties:**
124
+ - `value: T` - Current signal value
125
+
126
+ **Methods:**
127
+ - `static create<U>(host, signal)` - Create typed controller
128
+
129
+ ### TransactionViewController
130
+
131
+ Controller for transaction view functionality.
132
+
133
+ **Constructor:**
134
+ - `new TransactionViewController(host, transaction, options)`
135
+
136
+ **Properties:**
137
+ - `state: TransactionViewState` - Current controller state
138
+ - `matches: ViewMatch[]` - All matching views
139
+ - `bestMatch: ViewMatch | null` - Best matching view
140
+ - `component: any` - Loaded component
141
+ - `isLoading: boolean` - Loading state
142
+ - `error: Error | null` - Error state
143
+
144
+ **Methods:**
145
+ - `loadMatch(match): Promise<any>` - Load specific match
146
+ - `loadBestMatch(): Promise<any>` - Load best match
147
+ - `refreshMatches(): void` - Refresh matches
148
+ - `resolveAddresses(): Promise<void>` - Resolve addresses
149
+
150
+ ### ImageLoaderController
151
+
152
+ Controller for image loading functionality.
153
+
154
+ **Constructor:**
155
+ - `new ImageLoaderController(host)`
156
+
157
+ **Properties:**
158
+ - `state: ImageLoadState` - Current controller state
159
+ - `isLoading: boolean` - Loading state
160
+ - `error: string | null` - Error state
161
+ - `result: ImageResult | null` - Loaded image
162
+
163
+ **Methods:**
164
+ - `loadImage(imageData, options): Promise<ImageResult | null>`
165
+ - `loadProfileImage(addressData, options): Promise<ImageResult | null>`
166
+ - `loadFromSignal(signal, options): void` - Load from address signal
167
+ - `getFallbackImage(addressData): ImageResult`
168
+ - `clear(): void` - Clear current state
169
+
170
+ ## 🎯 Usage Patterns
171
+
172
+ ### Pattern 1: Signal Integration
173
+ ```typescript
174
+ @customElement('my-component')
175
+ export class MyComponent extends LitElement {
176
+ private signalController = new SignalController(this, mySignal)
177
+
178
+ render() {
179
+ return html`<div>${this.signalController.value}</div>`
180
+ }
181
+ }
182
+ ```
183
+
184
+ ### Pattern 2: Multiple Signals
185
+ ```typescript
186
+ @customElement('multi-signal-component')
187
+ export class MultiSignalComponent extends LitElement {
188
+ private multiController = new MultiSignalController(this, [signal1, signal2])
189
+
190
+ render() {
191
+ const [value1, value2] = this.multiController.getValues()
192
+ return html`<div>${value1} + ${value2}</div>`
193
+ }
194
+ }
195
+ ```
196
+
197
+ ### Pattern 3: Transaction Views
198
+ ```typescript
199
+ @customElement('transaction-component')
200
+ export class TransactionComponent extends LitElement {
201
+ @property({ type: Object }) transaction!: DecoderResult
202
+
203
+ private transactionController = new TransactionViewController(
204
+ this,
205
+ this.transaction,
206
+ { framework: 'lit', resolve: true }
207
+ )
208
+
209
+ render() {
210
+ const { bestMatch, component } = this.transactionController.state
211
+ return component || html`<div>No view found</div>`
212
+ }
213
+ }
214
+ ```
215
+
216
+ ## 📚 Documentation
217
+
218
+ See the main documentation in `/docs/`:
219
+
220
+ - **[Framework Wrappers Implementation](../../docs/FRAMEWORK_WRAPPERS_IMPLEMENTATION.md)** - Signal integration patterns
221
+ - **[Multi-Framework Migration Plan](../../docs/MULTI_FRAMEWORK_MIGRATION_PLAN.md)** - Architecture overview
222
+ - **[Vue to Lit Conversion Guide](../../docs/VUE_TO_LIT_CONVERSION_GUIDE.md)** - Component conversion
223
+
224
+ ## 🎨 Styles (Tailwind v4)
225
+
226
+ This package ships Tailwind v4 utilities compiled via PostCSS, plus base fonts. You can include styles in one of two ways:
227
+
228
+ 1) Prebuilt CSS (recommended if your app doesn’t already run Tailwind)
229
+
230
+ ```ts
231
+ import '@lukso/transaction-view-core/dist/styles/index.css' // fonts and base styles
232
+ ```
233
+
234
+ Or include via HTML:
235
+
236
+ ```html
237
+ <link rel="stylesheet" href="/node_modules/@lukso/transaction-view-core/dist/styles/index.css" />
238
+ ```
239
+
240
+ 2) Integrate with your app’s Tailwind v4 build (if you already use Tailwind)
241
+
242
+ - Ensure Tailwind v4 is configured with PostCSS using the official plugin per docs: https://tailwindcss.com/docs/installation/using-postcss
243
+ - In your app’s CSS entry, you likely already have:
244
+
245
+ ```css
246
+ @import 'tailwindcss';
247
+ ```
248
+
249
+ - Then add our base fonts if desired:
250
+
251
+ ```css
252
+ @import '@lukso/transaction-view-core/src/styles/fonts.css';
253
+ ```
254
+
255
+ Notes:
256
+ - Web components render in shadow DOM; our components include their own styling. Including `dist/styles/tailwind.css` guarantees Tailwind utilities used internally are available where needed.
257
+ - If your bundler supports CSS imports from packages and you prefer module form, you can also import the style module entry: `import '@lukso/transaction-view-core/styles'`. Ensure your build loads the corresponding `dist/styles/tailwind.css` as well.
258
+
259
+ ## 🧩 Available Components
260
+
261
+ - ✅ `<address-view>` - Address display with profile and name
262
+ - ✅ `<address-display>` - Enhanced address display
263
+ - ✅ `<icon-view>` - Profile icon only display
264
+ - ✅ `<value-view>` - Value formatting and display